Files
self/package.json
Seshanth.S 60de8d6c1e Feat/webview sdk (#1856)
* feat: add iOS native shell package (NSL-02)

Plain Swift implementation of the WebView host with bridge handlers
for secure storage (Keychain), crypto (EC P-256), and lifecycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add Android native shell package (NSL-01)

Plain Kotlin implementation of the WebView host with bridge handlers
for secure storage (EncryptedSharedPreferences), crypto (Android Keystore
EC P-256), and lifecycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: integrate Sumsub Web SDK into ProviderLaunchScreen (WV-05)

Rewrites ProviderLaunchScreen to launch Sumsub Web SDK, adds KYC
provider types, result normalization, and a ProviderResultScreen
for displaying verification outcomes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: update spec status for NSL-01, NSL-02, WV-05 to in-progress

All three items are code-complete but need integration testing
before marking done.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add build-pipeline workstream specs, update NSL-03 and BP-01 status

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add WebView bundle build pipeline (BP-01)

Build script copies webview-app dist into both native shell asset
directories. Gradle preBuild validation fails fast when bundle is
missing. Root package.json gets build:sdk-* scripts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add SDK test apps for Android and iOS (NSL-03)

Minimal test apps to exercise native shells end-to-end:
- Android: Jetpack Compose app using SelfSdk.launch() via composite build
- iOS: SwiftUI app using SelfSdk.createViewController() via local SPM dep

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* update lockfile

* fix: address CodeRabbit PR review findings for native shells

- Fix iOS double callback: add hasEmittedResult flag to LifecycleHandler
  so dismiss() won't fire onCancelled after onResult already emitted
- Fix Android error result codes: use RESULT_FIRST_USER for failed
  verifications instead of always RESULT_OK; add dedicated handler in
  SelfSdk.handleResult
- Fix iOS production query params: append params to file URL via
  URLComponents so WebView receives teeUrl/verificationId/userId
- Fix build:sdk-ios false-green: chain swift build after bundle script
- Add expectedRequestCode param to handleResult for flexibility
- Upgrade security-crypto 1.1.0-alpha06 → 1.1.0 stable
- Improve callback type safety: onSuccess takes raw JSON string,
  onFailure takes SelfSdkException instead of generic Exception
- Add requireBiometric intent comments to both SecureStorageHandlers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address remaining CodeRabbit PR review findings (round 2)

- iOS BridgeResponse: add requestId/success fields, rename result→data to match JS bridge contract
- iOS test app: fix callback deallocation with Coordinator pattern
- ProviderLaunchScreen: fail closed on missing verificationId, fix retry via retryCount state
- ProviderResultScreen: guard unknown status with fallback to error config
- build-webview-bundle.sh: validate index.html before deleting targets
- Package.swift: fix SPM resource path with target path/sources

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 02:26:40 +05:30

92 lines
5.3 KiB
JSON

{
"name": "self-workspace-root",
"workspaces": {
"packages": [
"app",
"circuits",
"common",
"contracts",
"new-common",
"packages/*",
"prover/tests",
"scripts/tests",
"sdk/*"
]
},
"scripts": {
"audit:tech-debt": "node scripts/audit/tech-debt-baseline.mjs",
"build": "yarn workspaces foreach --topological-dev --parallel --exclude @selfxyz/contracts --exclude @selfxyz/circuits --exclude mobile-sdk-demo --exclude @selfxyz/kmp-sdk --exclude @selfxyz/kmp-sdk-test-app -i --all run build",
"build:demo": "yarn workspace mobile-sdk-demo build",
"build:mobile-sdk": "yarn workspace @selfxyz/mobile-sdk-alpha build",
"build:sdk-android": "./scripts/build-webview-bundle.sh && cd packages/native-shell-android && ./gradlew assembleRelease",
"build:sdk-bundle": "./scripts/build-webview-bundle.sh",
"build:sdk-ios": "./scripts/build-webview-bundle.sh && cd packages/native-shell-ios && swift build",
"check:versions": "node scripts/check-package-versions.mjs",
"demo:mobile": "yarn build:mobile-sdk && yarn build:demo && yarn workspace mobile-sdk-demo start",
"docstrings": "yarn docstrings:app && yarn docstrings:sdk",
"docstrings:app": "yarn tsx scripts/docstring-report.ts \"app/src/**/*.{ts,tsx}\" --label \"Mobile App\" --write-report docs/coverage/app.json",
"docstrings:sdk": "yarn tsx scripts/docstring-report.ts \"packages/mobile-sdk-alpha/src/**/*.{ts,tsx}\" --label \"Mobile SDK Alpha\" --write-report docs/coverage/sdk.json",
"format": "SKIP_BUILD_DEPS=1 yarn format:root && yarn format:github && GRADLE_USER_HOME=/tmp/self-gradle-format yarn workspace @selfxyz/kmp-sdk format && GRADLE_USER_HOME=/tmp/self-gradle-format yarn workspace @selfxyz/kmp-sdk-test-app format && SKIP_BUILD_DEPS=1 yarn workspaces foreach --parallel -i --all --exclude self-workspace-root --exclude @selfxyz/kmp-sdk --exclude @selfxyz/kmp-sdk-test-app run format",
"format:github": "yarn prettier --parser yaml --write .github/**/*.yml --single-quote false",
"format:root": "echo 'format markdown' && yarn prettier --parser markdown --write '*.md' 'docs/**/*.md' 'specs/**/*.md' && echo 'format yaml' && yarn prettier --parser yaml --write .*.{yml,yaml} --single-quote false && yarn prettier --write scripts/**/*.{js,mjs,ts} && yarn prettier --parser json --write scripts/**/*.json",
"gitleaks": "gitleaks protect --staged --redact --config=gitleaks-override.toml",
"postinstall": "node scripts/run-patch-package.cjs",
"kmp:android": "yarn workspace @selfxyz/kmp-sdk-test-app android",
"kmp:clean": "yarn workspace @selfxyz/kmp-sdk clean && yarn workspace @selfxyz/kmp-sdk-test-app clean && rm -rf packages/kmp-sdk/.gradle packages/kmp-sdk/build packages/kmp-sdk/shared/build packages/kmp-sdk-test-app/.gradle packages/kmp-sdk-test-app/build packages/kmp-sdk-test-app/composeApp/build",
"kmp:format": "yarn workspace @selfxyz/kmp-sdk-test-app format",
"kmp:ios": "yarn workspace @selfxyz/kmp-sdk-test-app ios:open",
"kmp:lint": "yarn workspace @selfxyz/kmp-sdk-test-app lint",
"kmp:start": "bash scripts/kmp-start.sh",
"kmp:test": "yarn workspace @selfxyz/kmp-sdk test",
"lint": "yarn lint:headers && yarn workspaces foreach --parallel -i --all --exclude self-workspace-root run lint",
"lint:headers": "node scripts/check-duplicate-headers.cjs . && node scripts/check-license-headers.mjs . --check",
"lint:headers:fix": "node scripts/check-duplicate-headers.cjs . && node scripts/check-license-headers.mjs . --fix",
"prepare": "husky",
"reinstall-app": "yarn install && (cd app && yarn clean:watchman && yarn clean:build && yarn clean:ios && yarn clean:xcode && yarn clean:pod-cache && yarn clean:android-deps && rm -rf app/node_modules) && yarn install && yarn workspace @selfxyz/mobile-app run install-app",
"sort-package-jsons": "find . -name 'package.json' -not -path './node_modules/*' -not -path './*/node_modules/*' | xargs npx sort-package-json",
"test": "yarn workspaces foreach --parallel -i --all run test",
"test:license-headers": "cd scripts/tests && node check-license-headers.test.mjs",
"types": "yarn workspaces foreach --topological-dev --parallel --exclude @selfxyz/contracts --exclude @selfxyz/common --exclude @selfxyz/mobile-app -i --all run types"
},
"resolutions": {
"@babel/core": "^7.28.6",
"@babel/runtime": "^7.28.6",
"@noble/curves": "1.9.7",
"@noble/hashes": "1.8.0",
"@swc/core": "1.7.36",
"@tamagui/animations-react-native": "1.126.14",
"@tamagui/toast": "1.126.14",
"@types/node": "^22.18.3",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"ethereum-cryptography": "3.2.0",
"punycode": "npm:punycode.js@^2.3.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-native-passkey": "3.3.2",
"react-native-webview": "13.16.0"
},
"dependencies": {
"@babel/runtime": "^7.28.6",
"js-sha1": "^0.7.0",
"react": "^18.3.1",
"react-native": "0.76.9",
"uuid": "^13.0.0"
},
"devDependencies": {
"@react-native-community/cli-server-api": "^16.0.3",
"@types/node": "^22.18.3",
"gitleaks": "1.0.0",
"husky": "9.1.7",
"knip": "^5.63.1",
"patch-package": "^8.0.0",
"prettier": "^3.6.2",
"tsx": "^4.21.0",
"typescript": "^5.9.3"
},
"packageManager": "yarn@4.12.0",
"engines": {
"node": ">=22 <23"
}
}