Files
callstack__agent-device/examples/test-app/package.json
Michał Pierzchała 89c7536850 feat(ios): support explicit iOS simulator keychain reset (#2345)
* feat(ios): support explicit iOS simulator keychain reset

`settings clear-app-state` never touched keychain-backed credentials
(e.g. Firebase auth), so a customer's fresh-install reset via the CLI
left an app signed in when their in-app reset button did not (#2282).

simctl exposes no per-app keychain reset, only a whole-simulator one
(`simctl keychain <device> reset`), so this ships as a separate,
explicit `settings reset-keychain clear` command rather than folding
it into `clear-app-state` — callers opt in knowing the scope is the
whole simulator, not just the app under test.

Split the pre-existing `apps.test.ts` and `snapshot-handler.test.ts`
suites along the `app-settings.ts`/`snapshot-settings.ts` modules they
actually mirror, since both were already over the test-file-size
tripwire and could not grow further.

* fix(ios): reject extra reset-keychain arguments and add live-tested keychain fixture

settings reset-keychain clear <extra-arg> silently dropped the extra
argument in both the CLI reader and the direct-daemon parser, so a
caller expecting per-app scoping could get a whole-simulator wipe
without any signal something was off. Reject it instead in both
places, with tests proving no settings mutation happens.

Also add a small keychain-backed "auth" fixture to the test-app's
automation lab (expo-secure-store) so the settings reset-keychain
guarantee has a real regression surface: authenticate, verify the
credential survives clear-app-state and a plain relaunch, then verify
reset-keychain actually clears it. Validated live against a disposable
iOS simulator.

* fix(ci): stop a bare gradle.properties append from corrupting the last line

expo prebuild's generated android/gradle.properties has no trailing
newline, so `echo "org.gradle.jvmargs=-Xmx4g" >> gradle.properties`
appended directly onto its last line instead of a new one, producing
expo.inlineModules.watchedDirectories=[]org.gradle.jvmargs=-Xmx4g.
Gradle's JSON.parse of that property then fails at configure time,
before any real compilation runs -- the exact "Process 'command
'node'' finished with non-zero exit value 1" failure this branch hit
on Android Release and the Smoke Tests fixture-app fallback build.

This was a dormant bug: the Android build-cache job only runs on a
fingerprint miss, and no PR had changed the test-app's native
dependencies in a while. Adding expo-secure-store (#2282's keychain
fixture) was enough to trigger it. Reproduced locally against a clean
install with the exact CI script, confirmed the corrupted property,
and confirmed the printf-based fix builds cleanly (870/870 tasks).
2026-09-06 12:51:51 +02:00

42 lines
1.2 KiB
JSON

{
"name": "agent-device-test-app",
"version": "1.0.0",
"private": true,
"main": "expo-router/entry",
"scripts": {
"start": "expo start --dev-client",
"ios": "expo run:ios",
"android": "expo run:android",
"typecheck": "tsc --noEmit",
"security:test": "node --test security/image-size-security.test.mjs"
},
"dependencies": {
"@expo/dom-webview": "~56.0.5",
"@expo/metro-runtime": "~56.0.15",
"expo": "~56.0.12",
"expo-audio": "~56.0.12",
"expo-constants": "56.0.18",
"expo-dev-client": "~56.0.20",
"expo-linking": "56.0.14",
"expo-modules-core": "56.0.17",
"expo-router": "~56.2.11",
"expo-secure-store": "~56.0.4",
"expo-status-bar": "~56.0.4",
"react": "19.2.3",
"react-dom": "19.2.3",
"react-native": "0.85.3",
"react-native-gesture-handler": "^2.31.2",
"react-native-safe-area-context": "~5.7.0",
"react-native-screens": "~4.25.2",
"react-native-web": "^0.21.2",
"react-native-webview": "13.16.1"
},
"devDependencies": {
"@expo/fingerprint": "^0.19.4",
"@expo/repack-app": "^0.7.2",
"@types/react": "~19.2.2",
"expo-build-disk-cache": "^0.7.4",
"typescript": "~6.0.3"
}
}