@ankhorage/expo-runtime 2.7.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/actionBridge.d.ts +2 -0
- package/dist/actionBridge.d.ts.map +1 -0
- package/dist/actionBridge.js +2 -0
- package/dist/actionBridge.js.map +1 -0
- package/dist/expoRuntimePlanningMetadata.d.ts +1 -1
- package/dist/expoRuntimePlanningMetadata.js +1 -1
- package/dist/expoRuntimePlanningMetadata.js.map +1 -1
- package/package.json +42 -5
- package/src/actionBridge.test.ts +10 -0
- package/src/actionBridge.ts +10 -0
- package/src/expoRuntimePlanningMetadata.ts +1 -1
- package/src/resolveExpoRuntimePlan.test.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ankhorage/expo-runtime
|
|
2
2
|
|
|
3
|
+
## 3.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c14bbd0: Expose the Expo action bridge through a lightweight public subpath that does not require native runtime peers.
|
|
8
|
+
|
|
9
|
+
## 3.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- 8621e2b: Align the root Expo 57 runtime with released ZORA 3 and Surface 3, and make package-wide application peers optional at install time so the public `platform` subpath remains independently consumable by headless planners. Root and feature entrypoints still require consumers to install the peers they execute.
|
|
14
|
+
|
|
3
15
|
## 2.7.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# EXPO-RUNTIME
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Declarative runtime integration for Expo apps: maps app capabilities to permissions, packages, config plugins, providers, and adapters
|
|
9
9
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { executeExpoRuntimeAction, type ExecuteExpoRuntimeActionArgs, type ExpoRuntimeActionHandlerArgs, type ExpoRuntimeActionHandlers, type ExpoRuntimeRouteResolution, type ExpoRuntimeRouterLike, type ExpoRuntimeThemeMode, resolveExpoRuntimeRoutePath, } from './expoActionBridge';
|
|
2
|
+
//# sourceMappingURL=actionBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actionBridge.d.ts","sourceRoot":"","sources":["../src/actionBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actionBridge.js","sourceRoot":"","sources":["../src/actionBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAOxB,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC","sourcesContent":["export {\n executeExpoRuntimeAction,\n type ExecuteExpoRuntimeActionArgs,\n type ExpoRuntimeActionHandlerArgs,\n type ExpoRuntimeActionHandlers,\n type ExpoRuntimeRouteResolution,\n type ExpoRuntimeRouterLike,\n type ExpoRuntimeThemeMode,\n resolveExpoRuntimeRoutePath,\n} from './expoActionBridge';\n"]}
|
|
@@ -27,7 +27,7 @@ export interface ExpoRuntimeHintMetadata {
|
|
|
27
27
|
}
|
|
28
28
|
export declare const GENERATED_RUNTIME_DEPENDENCY_VERSIONS: {
|
|
29
29
|
readonly '@ankhorage/permissions': "^0.2.2";
|
|
30
|
-
readonly '@ankhorage/expo-runtime': "^
|
|
30
|
+
readonly '@ankhorage/expo-runtime': "^3.0.0";
|
|
31
31
|
};
|
|
32
32
|
export declare const EXPO_RUNTIME_PROVIDER_PACKAGES: {
|
|
33
33
|
readonly permissions: "@ankhorage/permissions";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EXPO_PLATFORM } from './platform';
|
|
2
2
|
const GENERATED_ANKHORAGE_DEPENDENCY_VERSIONS = {
|
|
3
3
|
'@ankhorage/permissions': '^0.2.2',
|
|
4
|
-
'@ankhorage/expo-runtime': '^
|
|
4
|
+
'@ankhorage/expo-runtime': '^3.0.0',
|
|
5
5
|
};
|
|
6
6
|
const GENERATED_EXPO_DEPENDENCY_VERSIONS = Object.fromEntries(Object.values(EXPO_PLATFORM.packages).map((dependency) => [
|
|
7
7
|
dependency.name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expoRuntimePlanningMetadata.js","sourceRoot":"","sources":["../src/expoRuntimePlanningMetadata.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAA4B,MAAM,YAAY,CAAC;AAgCrE,MAAM,uCAAuC,GAAG;IAC9C,wBAAwB,EAAE,QAAQ;IAClC,yBAAyB,EAAE,QAAQ;CACM,CAAC;AAE5C,MAAM,kCAAkC,GAAG,MAAM,CAAC,WAAW,CAC3D,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,UAA+B,EAAE,EAAE,CAAC;IAC7E,UAAU,CAAC,IAAI;IACf,UAAU,CAAC,OAAO;CACnB,CAAC,CACiC,CAAC;AAEtC,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,GAAG,uCAAuC;IAC1C,GAAG,kCAAkC;CACc,CAAC;AAEtD,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,WAAW,EAAE,wBAAwB;CACmB,CAAC;AAE3D,MAAM,yBAAyB,GAAG;IAChC,gBAAgB,EAAE;QAChB,MAAM,EAAE;YACN,IAAI,EAAE,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI;YACxC,OAAO,EAAE;gBACP,qBAAqB,EAAE,KAAK;gBAC5B,gBAAgB,EAAE,sBAAsB;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1B,OAAO;QACL,QAAQ,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;QACrD,eAAe,EAAE,YAAY;QAC7B,WAAW,EAAE,UAAU;QACvB,OAAO,EAAE,6BAA6B,UAAU,SAAS,OAAO,IAAI;QACpE,OAAO;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,UAAkB;IAC5D,OAAO;QACL,QAAQ,EAAE,SAAS;QACnB,eAAe,EAAE,YAAY;QAC7B,WAAW,EAAE,UAAU;QACvB,OAAO,EAAE,0DAA0D,UAAU,IAAI;KAClF,CAAC;AACJ,CAAC","sourcesContent":["import type {\n AnkhorageCapabilityName,\n ScreenCapabilityRequirement,\n ScreenPermissionRequirement,\n} from '@ankhorage/contracts';\nimport type { PermissionSupport } from '@ankhorage/permissions/expo/manifest';\n\nimport { EXPO_PLATFORM, type ExpoPlatformPackage } from './platform';\n\nexport interface ExpoRuntimeConfigPlugin {\n readonly name: string;\n readonly options?: Readonly<Record<string, boolean | string>>;\n}\n\nexport type ExpoRuntimeProviderId = 'permissions';\nexport type ExpoRuntimeAdapterId = 'ExpoBarcodeScannerAdapter';\n\nexport interface ExpoRuntimeDiagnostic {\n readonly severity: 'error' | 'warning';\n readonly requirementType: 'capability' | 'configHint' | 'package' | 'permission';\n readonly requirement: string;\n readonly message: string;\n readonly support?: PermissionSupport;\n}\n\nexport interface ExpoRuntimeCapabilityMetadata {\n readonly impliedPermissions?: readonly ScreenPermissionRequirement[];\n readonly requiredPackages?: readonly string[];\n readonly providers?: readonly ExpoRuntimeProviderId[];\n readonly runtimeAdapters?: readonly ExpoRuntimeAdapterId[];\n readonly androidPermissions?: readonly string[];\n readonly plugins?: readonly ExpoRuntimeConfigPlugin[];\n}\n\nexport interface ExpoRuntimeHintMetadata {\n readonly androidPermissions?: readonly string[];\n readonly plugin?: ExpoRuntimeConfigPlugin;\n}\n\nconst GENERATED_ANKHORAGE_DEPENDENCY_VERSIONS = {\n '@ankhorage/permissions': '^0.2.2',\n '@ankhorage/expo-runtime': '^
|
|
1
|
+
{"version":3,"file":"expoRuntimePlanningMetadata.js","sourceRoot":"","sources":["../src/expoRuntimePlanningMetadata.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAA4B,MAAM,YAAY,CAAC;AAgCrE,MAAM,uCAAuC,GAAG;IAC9C,wBAAwB,EAAE,QAAQ;IAClC,yBAAyB,EAAE,QAAQ;CACM,CAAC;AAE5C,MAAM,kCAAkC,GAAG,MAAM,CAAC,WAAW,CAC3D,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,UAA+B,EAAE,EAAE,CAAC;IAC7E,UAAU,CAAC,IAAI;IACf,UAAU,CAAC,OAAO;CACnB,CAAC,CACiC,CAAC;AAEtC,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,GAAG,uCAAuC;IAC1C,GAAG,kCAAkC;CACc,CAAC;AAEtD,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,WAAW,EAAE,wBAAwB;CACmB,CAAC;AAE3D,MAAM,yBAAyB,GAAG;IAChC,gBAAgB,EAAE;QAChB,MAAM,EAAE;YACN,IAAI,EAAE,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI;YACxC,OAAO,EAAE;gBACP,qBAAqB,EAAE,KAAK;gBAC5B,gBAAgB,EAAE,sBAAsB;gBACxC,oBAAoB,EAAE,KAAK;gBAC3B,kBAAkB,EAAE,KAAK;aAC1B;SACF;KACF;IACD,oBAAoB,EAAE;QACpB,MAAM,EAAE;YACN,IAAI,EAAE,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI;YACvC,OAAO,EAAE;gBACP,wBAAwB,EAAE,KAAK;gBAC/B,yBAAyB,EAAE,KAAK;gBAChC,oBAAoB,EAAE,0BAA0B;aACjD;SACF;KACF;IACD,kBAAkB,EAAE;QAClB,MAAM,EAA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AY;QAC7B,WAAW,EAAE,UAAU;QACvB,OAAO,EAAE,0DAA0D,UAAU,IAAI;KAClF,CAAC;AACJ,CAAC","sourcesContent":["import type {\n AnkhorageCapabilityName,\n ScreenCapabilityRequirement,\n ScreenPermissionRequirement,\n} from '@ankhorage/contracts';\nimport type { PermissionSupport } from '@ankhorage/permissions/expo/manifest';\n\nimport { EXPO_PLATFORM, type ExpoPlatformPackage } from './platform';\n\nexport interface ExpoRuntimeConfigPlugin {\n readonly name: string;\n readonly options?: Readonly<Record<string, boolean | string>>;\n}\n\nexport type ExpoRuntimeProviderId = 'permissions';\nexport type ExpoRuntimeAdapterId = 'ExpoBarcodeScannerAdapter';\n\nexport interface ExpoRuntimeDiagnostic {\n readonly severity: 'error' | 'warning';\n readonly requirementType: 'capability' | 'configHint' | 'package' | 'permission';\n readonly requirement: string;\n readonly message: string;\n readonly support?: PermissionSupport;\n}\n\nexport interface ExpoRuntimeCapabilityMetadata {\n readonly impliedPermissions?: readonly ScreenPermissionRequirement[];\n readonly requiredPackages?: readonly string[];\n readonly providers?: readonly ExpoRuntimeProviderId[];\n readonly runtimeAdapters?: readonly ExpoRuntimeAdapterId[];\n readonly androidPermissions?: readonly string[];\n readonly plugins?: readonly ExpoRuntimeConfigPlugin[];\n}\n\nexport interface ExpoRuntimeHintMetadata {\n readonly androidPermissions?: readonly string[];\n readonly plugin?: ExpoRuntimeConfigPlugin;\n}\n\nconst GENERATED_ANKHORAGE_DEPENDENCY_VERSIONS = {\n '@ankhorage/permissions': '^0.2.2',\n '@ankhorage/expo-runtime': '^3.0.0',\n} as const satisfies Record<string, string>;\n\nconst GENERATED_EXPO_DEPENDENCY_VERSIONS = Object.fromEntries(\n Object.values(EXPO_PLATFORM.packages).map((dependency: ExpoPlatformPackage) => [\n dependency.name,\n dependency.version,\n ]),\n) as Readonly<Record<string, string>>;\n\nexport const GENERATED_RUNTIME_DEPENDENCY_VERSIONS = {\n ...GENERATED_ANKHORAGE_DEPENDENCY_VERSIONS,\n ...GENERATED_EXPO_DEPENDENCY_VERSIONS,\n} as const satisfies Readonly<Record<string, string>>;\n\nexport const EXPO_RUNTIME_PROVIDER_PACKAGES = {\n permissions: '@ankhorage/permissions',\n} as const satisfies Record<ExpoRuntimeProviderId, string>;\n\nconst EXPO_RUNTIME_CONFIG_HINTS = {\n cameraPermission: {\n plugin: {\n name: EXPO_PLATFORM.packages.camera.name,\n options: {\n barcodeScannerEnabled: false,\n cameraPermission: 'Allow camera access.',\n microphonePermission: false,\n recordAudioAndroid: false,\n },\n },\n },\n microphonePermission: {\n plugin: {\n name: EXPO_PLATFORM.packages.audio.name,\n options: {\n enableBackgroundPlayback: false,\n enableBackgroundRecording: false,\n microphonePermission: 'Allow microphone access.',\n },\n },\n },\n recordAudioAndroid: {\n plugin: {\n name: EXPO_PLATFORM.packages.audio.name,\n options: {\n enableBackgroundPlayback: false,\n enableBackgroundRecording: false,\n recordAudioAndroid: true,\n },\n },\n },\n mediaLibraryPermission: {\n plugin: {\n name: EXPO_PLATFORM.packages.mediaLibrary.name,\n options: {\n photosPermission: 'Allow photo library access.',\n savePhotosPermission: 'Allow saving to the photo library.',\n },\n },\n },\n locationWhenInUsePermission: {\n plugin: {\n name: EXPO_PLATFORM.packages.location.name,\n options: {\n locationWhenInUsePermission: 'Allow location access while using the app.',\n },\n },\n },\n locationAlwaysAndWhenInUsePermission: {\n plugin: {\n name: EXPO_PLATFORM.packages.location.name,\n options: {\n locationAlwaysAndWhenInUsePermission: 'Allow location access.',\n isAndroidBackgroundLocationEnabled: true,\n isAndroidForegroundServiceEnabled: true,\n isIosBackgroundLocationEnabled: true,\n },\n },\n },\n notificationsPermission: {\n plugin: {\n name: EXPO_PLATFORM.packages.notifications.name,\n },\n },\n} as const satisfies Readonly<Record<string, ExpoRuntimeHintMetadata>>;\n\nexport const EXPO_CAPABILITY_RUNTIME_REGISTRY = {\n barcodeScanner: {\n impliedPermissions: [{ permission: 'camera' }],\n requiredPackages: [EXPO_PLATFORM.packages.camera.name],\n providers: ['permissions'],\n runtimeAdapters: ['ExpoBarcodeScannerAdapter'],\n plugins: [\n {\n name: EXPO_PLATFORM.packages.camera.name,\n options: {\n cameraPermission: 'Allow camera access to scan barcodes.',\n barcodeScannerEnabled: true,\n microphonePermission: false,\n recordAudioAndroid: false,\n },\n },\n ],\n },\n} as const satisfies Readonly<\n Partial<Record<AnkhorageCapabilityName, ExpoRuntimeCapabilityMetadata>>\n>;\n\nexport function findCapabilityMetadata(\n registry: Readonly<Partial<Record<AnkhorageCapabilityName, ExpoRuntimeCapabilityMetadata>>>,\n requirement: ScreenCapabilityRequirement,\n): ExpoRuntimeCapabilityMetadata | undefined {\n return Object.entries(registry).find(([name]) => name === requirement.capability)?.[1];\n}\n\nexport function findConfigHintMetadata(configHint: string): ExpoRuntimeHintMetadata | undefined {\n return Object.entries(EXPO_RUNTIME_CONFIG_HINTS).find(([name]) => name === configHint)?.[1];\n}\n\nexport function unknownPermissionDiagnostic(permission: string): ExpoRuntimeDiagnostic {\n return {\n severity: 'error',\n requirementType: 'permission',\n requirement: permission,\n message: `Unknown permission '${permission}' cannot be resolved for Expo runtime generation.`,\n };\n}\n\nexport function unsupportedPermissionDiagnostic(\n permission: string,\n support: PermissionSupport,\n): ExpoRuntimeDiagnostic {\n return {\n severity: support === 'limited' ? 'warning' : 'error',\n requirementType: 'permission',\n requirement: permission,\n message: `Expo runtime support for '${permission}' is '${support}'.`,\n support,\n };\n}\n\nexport function unknownCapabilityDiagnostic(capability: string): ExpoRuntimeDiagnostic {\n return {\n severity: 'warning',\n requirementType: 'capability',\n requirement: capability,\n message: `No Expo runtime metadata is registered for capability '${capability}'.`,\n };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/expo-runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.1",
|
|
5
5
|
"description": "Declarative runtime integration for Expo apps: maps app capabilities to permissions, packages, config plugins, providers, and adapters",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/expo-runtime#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -25,8 +25,7 @@
|
|
|
25
25
|
"runtime"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@ankhorage/contracts": "^8.0.0"
|
|
29
|
-
"@ankhorage/permissions": "^0.2.2"
|
|
28
|
+
"@ankhorage/contracts": "^8.0.0"
|
|
30
29
|
},
|
|
31
30
|
"files": [
|
|
32
31
|
"dist",
|
|
@@ -44,6 +43,13 @@
|
|
|
44
43
|
"import": "./dist/index.js",
|
|
45
44
|
"default": "./dist/index.js"
|
|
46
45
|
},
|
|
46
|
+
"./action-bridge": {
|
|
47
|
+
"react-native": "./src/actionBridge.ts",
|
|
48
|
+
"browser": "./src/actionBridge.ts",
|
|
49
|
+
"types": "./src/actionBridge.ts",
|
|
50
|
+
"import": "./dist/actionBridge.js",
|
|
51
|
+
"default": "./dist/actionBridge.js"
|
|
52
|
+
},
|
|
47
53
|
"./planning": {
|
|
48
54
|
"react-native": "./src/planning.ts",
|
|
49
55
|
"browser": "./src/planning.ts",
|
|
@@ -103,12 +109,16 @@
|
|
|
103
109
|
"prepack": "bun run build",
|
|
104
110
|
"test": "bun test src",
|
|
105
111
|
"typecheck": "bun x tsc --noEmit -p tsconfig.json && bun x tsc --noEmit -p tsconfig.scripts.json",
|
|
112
|
+
"validate:action-bridge": "bun scripts/actionBridgeAcceptance.ts",
|
|
106
113
|
"validate:expo-platform": "bun scripts/validateExpoPlatform.ts",
|
|
114
|
+
"validate:headless-platform": "bun scripts/headlessPlatformAcceptance.ts",
|
|
115
|
+
"validate:packed-runtime": "bun scripts/packedRuntimeAcceptance.ts",
|
|
107
116
|
"validate:web-barcode": "bun scripts/webBarcodeAcceptance.ts",
|
|
108
117
|
"version-packages": "changeset version"
|
|
109
118
|
},
|
|
110
119
|
"peerDependencies": {
|
|
111
|
-
"@ankhorage/
|
|
120
|
+
"@ankhorage/permissions": "^0.2.2",
|
|
121
|
+
"@ankhorage/zora": "^3.0.0",
|
|
112
122
|
"expo": "~57.0.15",
|
|
113
123
|
"expo-camera": "~57.0.4",
|
|
114
124
|
"expo-constants": "~57.0.13",
|
|
@@ -119,6 +129,18 @@
|
|
|
119
129
|
"react-native": "0.86.2"
|
|
120
130
|
},
|
|
121
131
|
"peerDependenciesMeta": {
|
|
132
|
+
"@ankhorage/permissions": {
|
|
133
|
+
"optional": true
|
|
134
|
+
},
|
|
135
|
+
"@ankhorage/zora": {
|
|
136
|
+
"optional": true
|
|
137
|
+
},
|
|
138
|
+
"expo": {
|
|
139
|
+
"optional": true
|
|
140
|
+
},
|
|
141
|
+
"expo-camera": {
|
|
142
|
+
"optional": true
|
|
143
|
+
},
|
|
122
144
|
"expo-constants": {
|
|
123
145
|
"optional": true
|
|
124
146
|
},
|
|
@@ -130,13 +152,25 @@
|
|
|
130
152
|
},
|
|
131
153
|
"expo-image-picker": {
|
|
132
154
|
"optional": true
|
|
155
|
+
},
|
|
156
|
+
"react": {
|
|
157
|
+
"optional": true
|
|
158
|
+
},
|
|
159
|
+
"react-native": {
|
|
160
|
+
"optional": true
|
|
133
161
|
}
|
|
134
162
|
},
|
|
135
163
|
"devDependencies": {
|
|
136
164
|
"@ankhorage/devtools": "^1.6.0",
|
|
137
165
|
"@ankhorage/paradox": "^0.1.21",
|
|
138
|
-
"@ankhorage/
|
|
166
|
+
"@ankhorage/permissions": "^0.2.2",
|
|
167
|
+
"@ankhorage/zora": "^3.0.0",
|
|
139
168
|
"@changesets/cli": "^2.31.0",
|
|
169
|
+
"@react-native-picker/picker": "2.11.4",
|
|
170
|
+
"@react-native-vector-icons/fontawesome": "^13.1.3",
|
|
171
|
+
"@react-native-vector-icons/fontawesome5": "^13.1.3",
|
|
172
|
+
"@react-native-vector-icons/fontawesome6": "^13.1.3",
|
|
173
|
+
"@react-native-vector-icons/ionicons": "^13.1.3",
|
|
140
174
|
"@types/bun": "^1.3.14",
|
|
141
175
|
"@types/node": "^24.13.3",
|
|
142
176
|
"@types/pngjs": "^6.0.5",
|
|
@@ -149,7 +183,10 @@
|
|
|
149
183
|
"expo-file-system": "~57.0.5",
|
|
150
184
|
"expo-image-picker": "~57.0.12",
|
|
151
185
|
"react": "19.2.3",
|
|
186
|
+
"react-dom": "19.2.3",
|
|
152
187
|
"react-native": "0.86.2",
|
|
188
|
+
"react-native-safe-area-context": "~5.7.0",
|
|
189
|
+
"react-native-web": "~0.21.0",
|
|
153
190
|
"playwright-core": "^1.62.1",
|
|
154
191
|
"pngjs": "^7.0.0",
|
|
155
192
|
"typescript": "~6.0.3"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { describe, expect, test } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import { executeExpoRuntimeAction, resolveExpoRuntimeRoutePath } from './actionBridge';
|
|
4
|
+
|
|
5
|
+
describe('action bridge entrypoint', () => {
|
|
6
|
+
test('exports the standalone action helpers', () => {
|
|
7
|
+
expect(typeof executeExpoRuntimeAction).toBe('function');
|
|
8
|
+
expect(typeof resolveExpoRuntimeRoutePath).toBe('function');
|
|
9
|
+
});
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export {
|
|
2
|
+
executeExpoRuntimeAction,
|
|
3
|
+
type ExecuteExpoRuntimeActionArgs,
|
|
4
|
+
type ExpoRuntimeActionHandlerArgs,
|
|
5
|
+
type ExpoRuntimeActionHandlers,
|
|
6
|
+
type ExpoRuntimeRouteResolution,
|
|
7
|
+
type ExpoRuntimeRouterLike,
|
|
8
|
+
type ExpoRuntimeThemeMode,
|
|
9
|
+
resolveExpoRuntimeRoutePath,
|
|
10
|
+
} from './expoActionBridge';
|
|
@@ -39,7 +39,7 @@ export interface ExpoRuntimeHintMetadata {
|
|
|
39
39
|
|
|
40
40
|
const GENERATED_ANKHORAGE_DEPENDENCY_VERSIONS = {
|
|
41
41
|
'@ankhorage/permissions': '^0.2.2',
|
|
42
|
-
'@ankhorage/expo-runtime': '^
|
|
42
|
+
'@ankhorage/expo-runtime': '^3.0.0',
|
|
43
43
|
} as const satisfies Record<string, string>;
|
|
44
44
|
|
|
45
45
|
const GENERATED_EXPO_DEPENDENCY_VERSIONS = Object.fromEntries(
|
|
@@ -195,7 +195,7 @@ describe('resolveExpoRuntimePlan platform-neutral permissions', () => {
|
|
|
195
195
|
});
|
|
196
196
|
|
|
197
197
|
const SUPPORTED_PERMISSION_DEPENDENCIES = [
|
|
198
|
-
{ name: '@ankhorage/expo-runtime', version: '^
|
|
198
|
+
{ name: '@ankhorage/expo-runtime', version: '^3.0.0' },
|
|
199
199
|
{ name: '@ankhorage/permissions', version: '^0.2.2' },
|
|
200
200
|
{ name: 'expo-audio', version: EXPO_PLATFORM.packages.audio.version },
|
|
201
201
|
{ name: 'expo-location', version: EXPO_PLATFORM.packages.location.version },
|