@ankhorage/expo-runtime 6.0.1 → 6.0.3

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ankhorage/expo-runtime
2
2
 
3
+ ## 6.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 7b0e21d: Return structured execution results and actionable rejection diagnostics from the Expo Runtime capability bridge.
8
+
9
+ ## 6.0.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 533cb81: Refresh the canonical Expo SDK 57 platform baseline to Expo 57.0.30.
14
+
3
15
  ## 6.0.1
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # EXPO-RUNTIME
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v6.0.1](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![paradox: warnings](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v6.0.3](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![paradox: warnings](././paradox/badges/docs.svg)
7
7
 
8
8
  Declarative runtime integration for Expo apps: maps app capabilities to permissions, packages, config plugins, providers, and adapters
9
9
 
@@ -55,7 +55,6 @@ export function createBasicExpoRuntimePlan() {
55
55
  - [Module relationships](././paradox/diagrams/module-relationships.mmd)
56
56
  - [Export graph](././paradox/diagrams/export-graph.mmd)
57
57
  - [createExpoRuntimeRegistry sequence](././paradox/diagrams/sequences/create-expo-runtime-registry.mmd)
58
- - [executeExpoRuntimeCapabilityAsync sequence](././paradox/diagrams/sequences/execute-expo-runtime-capability-async.mmd)
59
58
  - [ExpoBarcodeScannerAdapter sequence](././paradox/diagrams/sequences/expo-barcode-scanner-adapter.mmd)
60
59
  - [ExpoZoraIconFontProvider sequence](././paradox/diagrams/sequences/expo-zora-icon-font-provider.mmd)
61
60
  - [getExpoBundledMediaRegistrySource sequence](././paradox/diagrams/sequences/get-expo-bundled-media-registry-source.mmd)
@@ -1,5 +1,5 @@
1
1
  export { executeExpoRuntimeCapabilityAsync } from './features/capabilities/executeExpoRuntimeCapabilityAsync';
2
2
  export { resolveExpoRuntimeRoutePath } from './features/navigation/resolveExpoRuntimeRoutePath';
3
- export type { ExecuteExpoRuntimeCapabilityArgs, ExpoRuntimeCapabilityHandler, ExpoRuntimeCapabilityHandlerArgs, } from './types/expoRuntimeCapability';
3
+ export type { ExecuteExpoRuntimeCapabilityArgs, ExpoRuntimeCapabilityDiagnostic, ExpoRuntimeCapabilityDiagnosticCode, ExpoRuntimeCapabilityExecutionResult, ExpoRuntimeCapabilityHandler, ExpoRuntimeCapabilityHandlerArgs, } from './types/expoRuntimeCapability';
4
4
  export type { ExpoRuntimeRouteResolution } from './types/expoRuntimeRoute';
5
5
  //# sourceMappingURL=capabilityBridge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"capabilityBridge.d.ts","sourceRoot":"","sources":["../src/capabilityBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,2DAA2D,CAAC;AAC9G,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAChG,YAAY,EACV,gCAAgC,EAChC,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"capabilityBridge.d.ts","sourceRoot":"","sources":["../src/capabilityBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,2DAA2D,CAAC;AAC9G,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAChG,YAAY,EACV,gCAAgC,EAChC,+BAA+B,EAC/B,mCAAmC,EACnC,oCAAoC,EACpC,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"capabilityBridge.js","sourceRoot":"","sources":["../src/capabilityBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,2DAA2D,CAAC;AAC9G,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC","sourcesContent":["export { executeExpoRuntimeCapabilityAsync } from './features/capabilities/executeExpoRuntimeCapabilityAsync';\nexport { resolveExpoRuntimeRoutePath } from './features/navigation/resolveExpoRuntimeRoutePath';\nexport type {\n ExecuteExpoRuntimeCapabilityArgs,\n ExpoRuntimeCapabilityHandler,\n ExpoRuntimeCapabilityHandlerArgs,\n} from './types/expoRuntimeCapability';\nexport type { ExpoRuntimeRouteResolution } from './types/expoRuntimeRoute';\n"]}
1
+ {"version":3,"file":"capabilityBridge.js","sourceRoot":"","sources":["../src/capabilityBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,2DAA2D,CAAC;AAC9G,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC","sourcesContent":["export { executeExpoRuntimeCapabilityAsync } from './features/capabilities/executeExpoRuntimeCapabilityAsync';\nexport { resolveExpoRuntimeRoutePath } from './features/navigation/resolveExpoRuntimeRoutePath';\nexport type {\n ExecuteExpoRuntimeCapabilityArgs,\n ExpoRuntimeCapabilityDiagnostic,\n ExpoRuntimeCapabilityDiagnosticCode,\n ExpoRuntimeCapabilityExecutionResult,\n ExpoRuntimeCapabilityHandler,\n ExpoRuntimeCapabilityHandlerArgs,\n} from './types/expoRuntimeCapability';\nexport type { ExpoRuntimeRouteResolution } from './types/expoRuntimeRoute';\n"]}
@@ -1,4 +1,4 @@
1
- import type { ExecuteExpoRuntimeCapabilityArgs } from '../../types/expoRuntimeCapability';
1
+ import type { ExecuteExpoRuntimeCapabilityArgs, ExpoRuntimeCapabilityExecutionResult } from '../../types/expoRuntimeCapability';
2
2
  /*** Execute an Expo-owned capability or delegate another canonical capability to its runtime handler. */
3
- export declare function executeExpoRuntimeCapabilityAsync(args: ExecuteExpoRuntimeCapabilityArgs): Promise<void>;
3
+ export declare function executeExpoRuntimeCapabilityAsync(args: ExecuteExpoRuntimeCapabilityArgs): Promise<ExpoRuntimeCapabilityExecutionResult>;
4
4
  //# sourceMappingURL=executeExpoRuntimeCapabilityAsync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"executeExpoRuntimeCapabilityAsync.d.ts","sourceRoot":"","sources":["../../../src/features/capabilities/executeExpoRuntimeCapabilityAsync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gCAAgC,EAGjC,MAAM,mCAAmC,CAAC;AAE3C,yGAAyG;AACzG,wBAAsB,iCAAiC,CACrD,IAAI,EAAE,gCAAgC,GACrC,OAAO,CAAC,IAAI,CAAC,CAUf"}
1
+ {"version":3,"file":"executeExpoRuntimeCapabilityAsync.d.ts","sourceRoot":"","sources":["../../../src/features/capabilities/executeExpoRuntimeCapabilityAsync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gCAAgC,EAEhC,oCAAoC,EAGrC,MAAM,mCAAmC,CAAC;AAE3C,yGAAyG;AACzG,wBAAsB,iCAAiC,CACrD,IAAI,EAAE,gCAAgC,GACrC,OAAO,CAAC,oCAAoC,CAAC,CAqB/C"}
@@ -2,13 +2,36 @@ import { isCapability } from '@ankhorage/capability';
2
2
  /*** Execute an Expo-owned capability or delegate another canonical capability to its runtime handler. */
3
3
  export async function executeExpoRuntimeCapabilityAsync(args) {
4
4
  const { capability, input, capabilityHandlers, alertImpl } = args;
5
- if (!isCapability(capability))
6
- return;
5
+ if (!isCapability(capability)) {
6
+ return rejectCapabilityExecution({
7
+ code: 'invalid-capability-descriptor',
8
+ message: 'The capability descriptor is invalid.',
9
+ });
10
+ }
7
11
  if (capability.id === 'expo.alert') {
8
- executeExpoAlert(input, alertImpl);
9
- return;
12
+ return executeExpoAlert(input, alertImpl);
13
+ }
14
+ const handler = findCapabilityHandler(capabilityHandlers, capability.id);
15
+ if (!handler) {
16
+ return rejectCapabilityExecution({
17
+ code: 'missing-capability-handler',
18
+ message: `No Expo Runtime capability handler is configured for '${capability.id}'.`,
19
+ });
20
+ }
21
+ return executeForeignCapabilityHandlerAsync(handler, capability, input);
22
+ }
23
+ /*** Execute a foreign capability handler and translate its failure into the bridge result contract. */
24
+ async function executeForeignCapabilityHandlerAsync(handler, capability, input) {
25
+ try {
26
+ await handler({ capability, input });
27
+ return { ok: true };
28
+ }
29
+ catch (error) {
30
+ return rejectCapabilityExecution({
31
+ code: 'capability-handler-failed',
32
+ message: `The handler for '${capability.id}' failed: ${getFailureMessage(error)}`,
33
+ });
10
34
  }
11
- await findCapabilityHandler(capabilityHandlers, capability.id)?.({ capability, input });
12
35
  }
13
36
  /*** Find the configured executor for one canonical capability without dynamic record access. */
14
37
  function findCapabilityHandler(capabilityHandlers, capabilityId) {
@@ -16,15 +39,38 @@ function findCapabilityHandler(capabilityHandlers, capabilityId) {
16
39
  }
17
40
  /*** Display a valid Expo-owned alert invocation without exposing alert as a generic action. */
18
41
  function executeExpoAlert(input, alertImpl) {
19
- if (!isExpoAlertInput(input))
20
- return;
21
- alertImpl?.(input.message);
42
+ if (!isExpoAlertInput(input)) {
43
+ return rejectCapabilityExecution({
44
+ code: 'invalid-expo-alert-input',
45
+ message: "The 'expo.alert' capability requires an input object with only a string 'message'.",
46
+ });
47
+ }
48
+ if (!alertImpl) {
49
+ return rejectCapabilityExecution({
50
+ code: 'missing-expo-alert-handler',
51
+ message: "No Expo alert host callback is configured for 'expo.alert'.",
52
+ });
53
+ }
54
+ alertImpl(input.message);
55
+ return { ok: true };
22
56
  }
23
57
  /*** Validate the serializable input accepted by the Expo alert capability. */
24
58
  function isExpoAlertInput(input) {
25
- return (typeof input === 'object' &&
26
- input !== null &&
27
- 'message' in input &&
28
- typeof input.message === 'string');
59
+ if (typeof input !== 'object' ||
60
+ input === null ||
61
+ Array.isArray(input) ||
62
+ !('message' in input)) {
63
+ return false;
64
+ }
65
+ const entries = Object.entries(input);
66
+ return entries.length === 1 && typeof input.message === 'string';
67
+ }
68
+ /*** Report a rejected capability invocation with a diagnostic that a runtime owner can surface. */
69
+ function rejectCapabilityExecution(diagnostic) {
70
+ return { ok: false, diagnostics: [diagnostic] };
71
+ }
72
+ /*** Convert any foreign handler failure into a diagnostic-safe message. */
73
+ function getFailureMessage(error) {
74
+ return error instanceof Error ? error.message : String(error);
29
75
  }
30
76
  //# sourceMappingURL=executeExpoRuntimeCapabilityAsync.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"executeExpoRuntimeCapabilityAsync.js","sourceRoot":"","sources":["../../../src/features/capabilities/executeExpoRuntimeCapabilityAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AASrD,yGAAyG;AACzG,MAAM,CAAC,KAAK,UAAU,iCAAiC,CACrD,IAAsC;IAEtC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAClE,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;QAAE,OAAO;IAEtC,IAAI,UAAU,CAAC,EAAE,KAAK,YAAY,EAAE,CAAC;QACnC,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACnC,OAAO;IACT,CAAC;IAED,MAAM,qBAAqB,CAAC,kBAAkB,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;AAC1F,CAAC;AAED,gGAAgG;AAChG,SAAS,qBAAqB,CAC5B,kBAAuE,EACvE,YAA8B;IAE9B,OAAO,kBAAkB,EAAE,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,KAAK,YAAY,CAAC,EAAE,OAAO,CAAC;AAC/F,CAAC;AAED,+FAA+F;AAC/F,SAAS,gBAAgB,CACvB,KAAc,EACd,SAAkD;IAElD,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC;QAAE,OAAO;IACrC,SAAS,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC;AAED,8EAA8E;AAC9E,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,SAAS,IAAI,KAAK;QAClB,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAClC,CAAC;AACJ,CAAC","sourcesContent":["import { isCapability } from '@ankhorage/capability';\nimport type { Capability } from '@ankhorage/contracts/capability';\n\nimport type {\n ExecuteExpoRuntimeCapabilityArgs,\n ExpoRuntimeCapabilityHandler,\n ExpoRuntimeCapabilityHandlerArgs,\n} from '../../types/expoRuntimeCapability';\n\n/*** Execute an Expo-owned capability or delegate another canonical capability to its runtime handler. */\nexport async function executeExpoRuntimeCapabilityAsync(\n args: ExecuteExpoRuntimeCapabilityArgs,\n): Promise<void> {\n const { capability, input, capabilityHandlers, alertImpl } = args;\n if (!isCapability(capability)) return;\n\n if (capability.id === 'expo.alert') {\n executeExpoAlert(input, alertImpl);\n return;\n }\n\n await findCapabilityHandler(capabilityHandlers, capability.id)?.({ capability, input });\n}\n\n/*** Find the configured executor for one canonical capability without dynamic record access. */\nfunction findCapabilityHandler(\n capabilityHandlers: readonly ExpoRuntimeCapabilityHandler[] | undefined,\n capabilityId: Capability['id'],\n): ((args: ExpoRuntimeCapabilityHandlerArgs) => Promise<void> | void) | undefined {\n return capabilityHandlers?.find((handler) => handler.capabilityId === capabilityId)?.execute;\n}\n\n/*** Display a valid Expo-owned alert invocation without exposing alert as a generic action. */\nfunction executeExpoAlert(\n input: unknown,\n alertImpl: ((message: string) => void) | undefined,\n): void {\n if (!isExpoAlertInput(input)) return;\n alertImpl?.(input.message);\n}\n\n/*** Validate the serializable input accepted by the Expo alert capability. */\nfunction isExpoAlertInput(input: unknown): input is { readonly message: string } {\n return (\n typeof input === 'object' &&\n input !== null &&\n 'message' in input &&\n typeof input.message === 'string'\n );\n}\n"]}
1
+ {"version":3,"file":"executeExpoRuntimeCapabilityAsync.js","sourceRoot":"","sources":["../../../src/features/capabilities/executeExpoRuntimeCapabilityAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAWrD,yGAAyG;AACzG,MAAM,CAAC,KAAK,UAAU,iCAAiC,CACrD,IAAsC;IAEtC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAClE,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,OAAO,yBAAyB,CAAC;YAC/B,IAAI,EAAE,+BAA+B;YACrC,OAAO,EAAE,uCAAuC;SACjD,CAAC,CAAC;IACL,CAAC;IAED,IAAI,UAAU,CAAC,EAAE,KAAK,YAAY,EAAE,CAAC;QACnC,OAAO,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,OAAO,GAAG,qBAAqB,CAAC,kBAAkB,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;IACzE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,yBAAyB,CAAC;YAC/B,IAAI,EAAE,4BAA4B;YAClC,OAAO,EAAE,yDAAyD,UAAU,CAAC,EAAE,IAAI;SACpF,CAAC,CA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B,CAAC,KAAc;IACtC,IACE,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACpB,CAAC,CAAC,SAAS,IAAI,KAAK,CAAC,EACrB,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACtC,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC;AACnE,CAAC;AAED,mGAAmG;AACnG,SAAS,yBAAyB,CAChC,UAA2C;IAE3C,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;AAClD,CAAC;AAED,2EAA2E;AAC3E,SAAS,iBAAiB,CAAC,KAAc;IACvC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC","sourcesContent":["import { isCapability } from '@ankhorage/capability';\nimport type { Capability } from '@ankhorage/contracts/capability';\n\nimport type {\n ExecuteExpoRuntimeCapabilityArgs,\n ExpoRuntimeCapabilityDiagnostic,\n ExpoRuntimeCapabilityExecutionResult,\n ExpoRuntimeCapabilityHandler,\n ExpoRuntimeCapabilityHandlerArgs,\n} from '../../types/expoRuntimeCapability';\n\n/*** Execute an Expo-owned capability or delegate another canonical capability to its runtime handler. */\nexport async function executeExpoRuntimeCapabilityAsync(\n args: ExecuteExpoRuntimeCapabilityArgs,\n): Promise<ExpoRuntimeCapabilityExecutionResult> {\n const { capability, input, capabilityHandlers, alertImpl } = args;\n if (!isCapability(capability)) {\n return rejectCapabilityExecution({\n code: 'invalid-capability-descriptor',\n message: 'The capability descriptor is invalid.',\n });\n }\n\n if (capability.id === 'expo.alert') {\n return executeExpoAlert(input, alertImpl);\n }\n\n const handler = findCapabilityHandler(capabilityHandlers, capability.id);\n if (!handler) {\n return rejectCapabilityExecution({\n code: 'missing-capability-handler',\n message: `No Expo Runtime capability handler is configured for '${capability.id}'.`,\n });\n }\n return executeForeignCapabilityHandlerAsync(handler, capability, input);\n}\n\n/*** Execute a foreign capability handler and translate its failure into the bridge result contract. */\nasync function executeForeignCapabilityHandlerAsync(\n handler: (args: ExpoRuntimeCapabilityHandlerArgs) => Promise<void> | void,\n capability: Capability,\n input: unknown,\n): Promise<ExpoRuntimeCapabilityExecutionResult> {\n try {\n await handler({ capability, input });\n return { ok: true };\n } catch (error) {\n return rejectCapabilityExecution({\n code: 'capability-handler-failed',\n message: `The handler for '${capability.id}' failed: ${getFailureMessage(error)}`,\n });\n }\n}\n\n/*** Find the configured executor for one canonical capability without dynamic record access. */\nfunction findCapabilityHandler(\n capabilityHandlers: readonly ExpoRuntimeCapabilityHandler[] | undefined,\n capabilityId: Capability['id'],\n): ((args: ExpoRuntimeCapabilityHandlerArgs) => Promise<void> | void) | undefined {\n return capabilityHandlers?.find((handler) => handler.capabilityId === capabilityId)?.execute;\n}\n\n/*** Display a valid Expo-owned alert invocation without exposing alert as a generic action. */\nfunction executeExpoAlert(\n input: unknown,\n alertImpl: ((message: string) => void) | undefined,\n): ExpoRuntimeCapabilityExecutionResult {\n if (!isExpoAlertInput(input)) {\n return rejectCapabilityExecution({\n code: 'invalid-expo-alert-input',\n message: \"The 'expo.alert' capability requires an input object with only a string 'message'.\",\n });\n }\n if (!alertImpl) {\n return rejectCapabilityExecution({\n code: 'missing-expo-alert-handler',\n message: \"No Expo alert host callback is configured for 'expo.alert'.\",\n });\n }\n alertImpl(input.message);\n return { ok: true };\n}\n\n/*** Validate the serializable input accepted by the Expo alert capability. */\nfunction isExpoAlertInput(input: unknown): input is { readonly message: string } {\n if (\n typeof input !== 'object' ||\n input === null ||\n Array.isArray(input) ||\n !('message' in input)\n ) {\n return false;\n }\n const entries = Object.entries(input);\n return entries.length === 1 && typeof input.message === 'string';\n}\n\n/*** Report a rejected capability invocation with a diagnostic that a runtime owner can surface. */\nfunction rejectCapabilityExecution(\n diagnostic: ExpoRuntimeCapabilityDiagnostic,\n): ExpoRuntimeCapabilityExecutionResult {\n return { ok: false, diagnostics: [diagnostic] };\n}\n\n/*** Convert any foreign handler failure into a diagnostic-safe message. */\nfunction getFailureMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { BARCODE_SCAN_DEDUPE_WINDOW_MS, BARCODE_SCANNER_TYPES, type BarcodeScanRecord, type ExpoBarcodeScanResultLike, mapPermissionStatusToCameraPermissionStatus, normalizeExpoBarcodeScanResult, shouldIgnoreBarcodeScan, } from './barcodeScanRuntime';
2
2
  export { type ExpoBundledMediaRegistrySourceEntry, getExpoBundledMediaRegistrySource, } from './bundledMediaRegistrySource';
3
3
  export { createExpoBundledMediaResolver, type ExpoBundledMediaRegistry, type ExpoBundledMediaResolver, type ExpoBundledMediaResolverArgs, type ExpoBundledMediaValue, resolveExpoBundledMediaAsset, } from './bundledMediaResolver';
4
- export { type ExecuteExpoRuntimeCapabilityArgs, executeExpoRuntimeCapabilityAsync, type ExpoRuntimeCapabilityHandler, type ExpoRuntimeCapabilityHandlerArgs, type ExpoRuntimeRouteResolution, resolveExpoRuntimeRoutePath, } from './capabilityBridge';
4
+ export { type ExecuteExpoRuntimeCapabilityArgs, executeExpoRuntimeCapabilityAsync, type ExpoRuntimeCapabilityDiagnostic, type ExpoRuntimeCapabilityDiagnosticCode, type ExpoRuntimeCapabilityExecutionResult, type ExpoRuntimeCapabilityHandler, type ExpoRuntimeCapabilityHandlerArgs, type ExpoRuntimeRouteResolution, resolveExpoRuntimeRoutePath, } from './capabilityBridge';
5
5
  export type { ComponentRegistry } from './componentRegistry';
6
6
  export { createComponentRegistry } from './componentRegistry';
7
7
  export { createExpoRuntimeRegistry } from './createExpoRuntimeRegistry';
@@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E,OAAO,EAEL,mCAAmC,GACpC,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["export {\n BARCODE_SCAN_DEDUPE_WINDOW_MS,\n BARCODE_SCANNER_TYPES,\n type BarcodeScanRecord,\n type ExpoBarcodeScanResultLike,\n mapPermissionStatusToCameraPermissionStatus,\n normalizeExpoBarcodeScanResult,\n shouldIgnoreBarcodeScan,\n} from './barcodeScanRuntime';\nexport {\n type ExpoBundledMediaRegistrySourceEntry,\n getExpoBundledMediaRegistrySource,\n} from './bundledMediaRegistrySource';\nexport {\n createExpoBundledMediaResolver,\n type ExpoBundledMediaRegistry,\n type ExpoBundledMediaResolver,\n type ExpoBundledMediaResolverArgs,\n type ExpoBundledMediaValue,\n resolveExpoBundledMediaAsset,\n} from './bundledMediaResolver';\nexport {\n type ExecuteExpoRuntimeCapabilityArgs,\n executeExpoRuntimeCapabilityAsync,\n type ExpoRuntimeCapabilityHandler,\n type ExpoRuntimeCapabilityHandlerArgs,\n type ExpoRuntimeRouteResolution,\n resolveExpoRuntimeRoutePath,\n} from './capabilityBridge';\nexport type { ComponentRegistry } from './componentRegistry';\nexport { createComponentRegistry } from './componentRegistry';\nexport { createExpoRuntimeRegistry } from './createExpoRuntimeRegistry';\nexport { ExpoBarcodeScannerAdapter } from './ExpoBarcodeScannerAdapter';\nexport { ExpoRuntimeProviders, type ExpoRuntimeProvidersProps } from './ExpoRuntimeProviders';\nexport {\n ExpoZoraIconFontProvider,\n type ExpoZoraIconFontProviderProps,\n} from './ExpoZoraIconFontProvider';\nexport {\n type ExpoRuntimeConfigPluginOutput,\n type ExpoRuntimeDependencyMap,\n type ExpoRuntimeGeneratedAppOutputPlan,\n type ExpoRuntimeNativeOutputPlan,\n resolveExpoRuntimeConfigPluginOutput,\n resolveExpoRuntimeDependencyMap,\n resolveExpoRuntimeGeneratedAppOutput,\n resolveExpoRuntimeNativeOutput,\n} from './generatedAppOutput';\nexport { getExpoBarcodeScannerViewSource } from './generatedSources';\nexport {\n type ExpoRuntimeLayoutIntegrationPlan,\n resolveExpoRuntimeLayoutIntegration,\n} from './layoutIntegrationPlanning';\nexport type {\n ExpoRuntimeAdapterId,\n ExpoRuntimePlan,\n ExpoRuntimeProviderId,\n} from './resolveExpoRuntimePlan';\nexport { resolveExpoRuntimePlan } from './resolveExpoRuntimePlan';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EAGrB,2CAA2C,EAC3C,8BAA8B,EAC9B,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,iCAAiC,GAClC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,8BAA8B,EAK9B,4BAA4B,GAC7B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,iCAAiC,EAOjC,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAkC,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EACL,wBAAwB,GAEzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAKL,oCAAoC,EACpC,+BAA+B,EAC/B,oCAAoC,EACpC,8BAA8B,GAC/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAEL,mCAAmC,GACpC,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["export {\n BARCODE_SCAN_DEDUPE_WINDOW_MS,\n BARCODE_SCANNER_TYPES,\n type BarcodeScanRecord,\n type ExpoBarcodeScanResultLike,\n mapPermissionStatusToCameraPermissionStatus,\n normalizeExpoBarcodeScanResult,\n shouldIgnoreBarcodeScan,\n} from './barcodeScanRuntime';\nexport {\n type ExpoBundledMediaRegistrySourceEntry,\n getExpoBundledMediaRegistrySource,\n} from './bundledMediaRegistrySource';\nexport {\n createExpoBundledMediaResolver,\n type ExpoBundledMediaRegistry,\n type ExpoBundledMediaResolver,\n type ExpoBundledMediaResolverArgs,\n type ExpoBundledMediaValue,\n resolveExpoBundledMediaAsset,\n} from './bundledMediaResolver';\nexport {\n type ExecuteExpoRuntimeCapabilityArgs,\n executeExpoRuntimeCapabilityAsync,\n type ExpoRuntimeCapabilityDiagnostic,\n type ExpoRuntimeCapabilityDiagnosticCode,\n type ExpoRuntimeCapabilityExecutionResult,\n type ExpoRuntimeCapabilityHandler,\n type ExpoRuntimeCapabilityHandlerArgs,\n type ExpoRuntimeRouteResolution,\n resolveExpoRuntimeRoutePath,\n} from './capabilityBridge';\nexport type { ComponentRegistry } from './componentRegistry';\nexport { createComponentRegistry } from './componentRegistry';\nexport { createExpoRuntimeRegistry } from './createExpoRuntimeRegistry';\nexport { ExpoBarcodeScannerAdapter } from './ExpoBarcodeScannerAdapter';\nexport { ExpoRuntimeProviders, type ExpoRuntimeProvidersProps } from './ExpoRuntimeProviders';\nexport {\n ExpoZoraIconFontProvider,\n type ExpoZoraIconFontProviderProps,\n} from './ExpoZoraIconFontProvider';\nexport {\n type ExpoRuntimeConfigPluginOutput,\n type ExpoRuntimeDependencyMap,\n type ExpoRuntimeGeneratedAppOutputPlan,\n type ExpoRuntimeNativeOutputPlan,\n resolveExpoRuntimeConfigPluginOutput,\n resolveExpoRuntimeDependencyMap,\n resolveExpoRuntimeGeneratedAppOutput,\n resolveExpoRuntimeNativeOutput,\n} from './generatedAppOutput';\nexport { getExpoBarcodeScannerViewSource } from './generatedSources';\nexport {\n type ExpoRuntimeLayoutIntegrationPlan,\n resolveExpoRuntimeLayoutIntegration,\n} from './layoutIntegrationPlanning';\nexport type {\n ExpoRuntimeAdapterId,\n ExpoRuntimePlan,\n ExpoRuntimeProviderId,\n} from './resolveExpoRuntimePlan';\nexport { resolveExpoRuntimePlan } from './resolveExpoRuntimePlan';\n"]}
package/dist/platform.js CHANGED
@@ -12,7 +12,7 @@ export const EXPO_PLATFORM = {
12
12
  sdk: 57,
13
13
  architecture: 'new-architecture-only',
14
14
  runtime: {
15
- expo: definePackage('expo', '57.0.27'),
15
+ expo: definePackage('expo', '57.0.30'),
16
16
  react: definePackage('react', '19.2.3'),
17
17
  reactDom: definePackage('react-dom', '19.2.3'),
18
18
  reactNative: definePackage('react-native', '0.86.3'),
@@ -29,7 +29,7 @@ export const EXPO_PLATFORM = {
29
29
  expoDoctor: definePackage('expo-doctor', '1.20.4'),
30
30
  },
31
31
  navigation: {
32
- expoRouter: definePackage('expo-router', '~57.0.25'),
32
+ expoRouter: definePackage('expo-router', '~57.0.28'),
33
33
  screens: definePackage('react-native-screens', '~4.26.0'),
34
34
  safeArea: definePackage('react-native-safe-area-context', '~5.7.0'),
35
35
  },
@@ -49,28 +49,28 @@ export const EXPO_PLATFORM = {
49
49
  },
50
50
  },
51
51
  packages: {
52
- metroRuntime: definePackage('@expo/metro-runtime', '~57.0.16'),
53
- asset: definePackage('expo-asset', '~57.0.19'),
52
+ metroRuntime: definePackage('@expo/metro-runtime', '~57.0.17'),
53
+ asset: definePackage('expo-asset', '~57.0.20'),
54
54
  audio: definePackage('expo-audio', '~57.0.5'),
55
- authSession: definePackage('expo-auth-session', '~57.0.14'),
55
+ authSession: definePackage('expo-auth-session', '~57.0.16'),
56
56
  camera: definePackage('expo-camera', '~57.0.6'),
57
- constants: definePackage('expo-constants', '~57.0.21'),
58
- crypto: definePackage('expo-crypto', '~57.0.3'),
59
- devClient: definePackage('expo-dev-client', '~57.0.19'),
57
+ constants: definePackage('expo-constants', '~57.0.22'),
58
+ crypto: definePackage('expo-crypto', '~57.0.4'),
59
+ devClient: definePackage('expo-dev-client', '~57.0.20'),
60
60
  documentPicker: definePackage('expo-document-picker', '~57.0.3'),
61
61
  fileSystem: definePackage('expo-file-system', '~57.0.7'),
62
62
  font: definePackage('expo-font', '~57.0.4'),
63
63
  imagePicker: definePackage('expo-image-picker', '~57.0.20'),
64
64
  linearGradient: definePackage('expo-linear-gradient', '~57.0.2'),
65
- linking: definePackage('expo-linking', '~57.0.12'),
65
+ linking: definePackage('expo-linking', '~57.0.13'),
66
66
  localization: definePackage('expo-localization', '~57.0.2'),
67
- location: definePackage('expo-location', '~57.0.20'),
67
+ location: definePackage('expo-location', '~57.0.21'),
68
68
  mediaLibrary: definePackage('expo-media-library', '~57.0.5'),
69
- notifications: definePackage('expo-notifications', '~57.0.22'),
69
+ notifications: definePackage('expo-notifications', '~57.0.23'),
70
70
  secureStore: definePackage('expo-secure-store', '~57.0.4'),
71
- splashScreen: definePackage('expo-splash-screen', '~57.0.9'),
71
+ splashScreen: definePackage('expo-splash-screen', '~57.0.10'),
72
72
  statusBar: definePackage('expo-status-bar', '~57.0.1'),
73
- updates: definePackage('expo-updates', '~57.0.25'),
73
+ updates: definePackage('expo-updates', '~57.0.26'),
74
74
  webBrowser: definePackage('expo-web-browser', '~57.0.3'),
75
75
  },
76
76
  platforms: {
@@ -1 +1 @@
1
- {"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAKA,SAAS,aAAa,CAAC,IAAY,EAAE,OAAe;IAClD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC3B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,EAAE;IACP,YAAY,EAAE,uBAAuB;IACrC,OAAO,EAAE;QACP,IAAI,EAAE,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC;QACtC,KAAK,EAAE,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC;QACvC,QAAQ,EAAE,aAAa,CAAC,WAAW,E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AE,UAAU,CAAC;QAClD,UAAU,EAAE,aAAa,CAAC,kBAAkB,EAAE,SAAS,CAAC;KACzD;IACD,SAAS,EAAE;QACT,OAAO,EAAE;YACP,cAAc,EAAE,CAAC;YACjB,eAAe,EAAE,EAAE;YACnB,UAAU,EAAE,EAAE;YACd,SAAS,EAAE,EAAE;YACb,UAAU,EAAE,IAAI;SACjB;QACD,GAAG,EAAE;YACH,cAAc,EAAE,MAAM;YACtB,mBAAmB,EAAE,MAAM;SAC5B;KACF;CACO,CAAC","sourcesContent":["export interface ExpoPlatformPackage {\n readonly name: string;\n readonly version: string;\n}\n\nfunction definePackage(name: string, version: string): ExpoPlatformPackage {\n return { name, version };\n}\n\n/**\n * The canonical Ankhorage projection of the supported Expo platform.\n *\n * Package versions come from Expo SDK 57's bundled native module map. Keep this\n * structure as the only hand-maintained Expo compatibility authority in this\n * repository; generated manifests and runtime planning derive from it.\n */\nexport const EXPO_PLATFORM = {\n sdk: 57,\n architecture: 'new-architecture-only',\n runtime: {\n expo: definePackage('expo', '57.0.27'),\n react: definePackage('react', '19.2.3'),\n reactDom: definePackage('react-dom', '19.2.3'),\n reactNative: definePackage('react-native', '0.86.3'),\n reactNativeWeb: definePackage('react-native-web', '~0.21.3'),\n },\n tooling: {\n node: {\n lts: 24,\n version: '24.x',\n },\n nodeTypes: definePackage('@types/node', '^24.13.3'),\n reactTypes: definePackage('@types/react', '~19.2.4'),\n typescript: definePackage('typescript', '~6.0.3'),\n expoDoctor: definePackage('expo-doctor', '1.20.4'),\n },\n navigation: {\n expoRouter: definePackage('expo-router', '~57.0.25'),\n screens: definePackage('react-native-screens', '~4.26.0'),\n safeArea: definePackage('react-native-safe-area-context', '~5.7.0'),\n },\n animation: {\n reanimated: definePackage('react-native-reanimated', '4.5.1'),\n worklets: definePackage('react-native-worklets', '0.10.1'),\n gestureHandler: definePackage('react-native-gesture-handler', '~2.32.0'),\n },\n ui: {\n svg: definePackage('react-native-svg', '15.15.4'),\n iconProviders: {\n Ionicons: definePackage('@react-native-vector-icons/ionicons', '^13.1.4'),\n FontAwesome: definePackage('@react-native-vector-icons/fontawesome', '^13.1.4'),\n FontAwesome5: definePackage('@react-native-vector-icons/fontawesome5', '^13.1.4'),\n FontAwesome6: definePackage('@react-native-vector-icons/fontawesome6', '^13.1.4'),\n MaterialDesignIcons: definePackage(\n '@react-native-vector-icons/material-design-icons',\n '^13.1.4',\n ),\n },\n },\n packages: {\n metroRuntime: definePackage('@expo/metro-runtime', '~57.0.16'),\n asset: definePackage('expo-asset', '~57.0.19'),\n audio: definePackage('expo-audio', '~57.0.5'),\n authSession: definePackage('expo-auth-session', '~57.0.14'),\n camera: definePackage('expo-camera', '~57.0.6'),\n constants: definePackage('expo-constants', '~57.0.21'),\n crypto: definePackage('expo-crypto', '~57.0.3'),\n devClient: definePackage('expo-dev-client', '~57.0.19'),\n documentPicker: definePackage('expo-document-picker', '~57.0.3'),\n fileSystem: definePackage('expo-file-system', '~57.0.7'),\n font: definePackage('expo-font', '~57.0.4'),\n imagePicker: definePackage('expo-image-picker', '~57.0.20'),\n linearGradient: definePackage('expo-linear-gradient', '~57.0.2'),\n linking: definePackage('expo-linking', '~57.0.12'),\n localization: definePackage('expo-localization', '~57.0.2'),\n location: definePackage('expo-location', '~57.0.20'),\n mediaLibrary: definePackage('expo-media-library', '~57.0.5'),\n notifications: definePackage('expo-notifications', '~57.0.22'),\n secureStore: definePackage('expo-secure-store', '~57.0.4'),\n splashScreen: definePackage('expo-splash-screen', '~57.0.9'),\n statusBar: definePackage('expo-status-bar', '~57.0.1'),\n updates: definePackage('expo-updates', '~57.0.25'),\n webBrowser: definePackage('expo-web-browser', '~57.0.3'),\n },\n platforms: {\n android: {\n minimumVersion: 7,\n minimumApiLevel: 24,\n compileSdk: 36,\n targetSdk: 36,\n edgeToEdge: true,\n },\n ios: {\n minimumVersion: '16.4',\n minimumXcodeVersion: '26.4',\n },\n },\n} as const;\n\nexport type ExpoPlatform = typeof EXPO_PLATFORM;\n"]}
1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YAAY,EAAE,aAAa,CAAC,mBAAmB,EAAE,SAAS,CAAC;QAC3D,QAAQ,EAAE,aAAa,CAAC,eAAe,EAAE,UAAU,CAAC;QACpD,YAAY,EAAE,aAAa,CAAC,oBAAoB,EAAE,SAAS,CAAC;QAC5D,aAAa,EAAE,aAAa,CAAC,oBAAoB,EAAE,UAAU,CAAC;QAC9D,WAAW,EAAE,aAAa,CAAC,mBAAmB,EAAE,SAAS,CAAC;QAC1D,YAAY,EAAE,aAAa,CAAC,oBAAoB,EAAE,UAAU,CAAC;QAC7D,SAAS,EAAE,aAAa,CAAC,iBAAiB,EAAE,SAAS,CAAC;QACtD,OAAO,EAAE,aAAa,CAAC,cAAc,EAAE,UAAU,CAAC;QAClD,UAAU,EAAE,aAAa,CAAC,kBAAkB,EAAE,SAAS,CAAC;KACzD;IACD,SAAS,EAAE;QACT,OAAO,EAAE;YACP,cAAc,EAAE,CAAC;YACjB,eAAe,EAAE,EAAE;YACnB,UAAU,EAAE,EAAE;YACd,SAAS,EAAE,EAAE;YACb,UAAU,EAAE,IAAI;SACjB;QACD,GAAG,EAAE;YACH,cAAc,EAAE,MAAM;YACtB,mBAAmB,EAAE,MAAM;SAC5B;KACF;CACO,CAAC","sourcesContent":["export interface ExpoPlatformPackage {\n readonly name: string;\n readonly version: string;\n}\n\nfunction definePackage(name: string, version: string): ExpoPlatformPackage {\n return { name, version };\n}\n\n/**\n * The canonical Ankhorage projection of the supported Expo platform.\n *\n * Package versions come from Expo SDK 57's bundled native module map. Keep this\n * structure as the only hand-maintained Expo compatibility authority in this\n * repository; generated manifests and runtime planning derive from it.\n */\nexport const EXPO_PLATFORM = {\n sdk: 57,\n architecture: 'new-architecture-only',\n runtime: {\n expo: definePackage('expo', '57.0.30'),\n react: definePackage('react', '19.2.3'),\n reactDom: definePackage('react-dom', '19.2.3'),\n reactNative: definePackage('react-native', '0.86.3'),\n reactNativeWeb: definePackage('react-native-web', '~0.21.3'),\n },\n tooling: {\n node: {\n lts: 24,\n version: '24.x',\n },\n nodeTypes: definePackage('@types/node', '^24.13.3'),\n reactTypes: definePackage('@types/react', '~19.2.4'),\n typescript: definePackage('typescript', '~6.0.3'),\n expoDoctor: definePackage('expo-doctor', '1.20.4'),\n },\n navigation: {\n expoRouter: definePackage('expo-router', '~57.0.28'),\n screens: definePackage('react-native-screens', '~4.26.0'),\n safeArea: definePackage('react-native-safe-area-context', '~5.7.0'),\n },\n animation: {\n reanimated: definePackage('react-native-reanimated', '4.5.1'),\n worklets: definePackage('react-native-worklets', '0.10.1'),\n gestureHandler: definePackage('react-native-gesture-handler', '~2.32.0'),\n },\n ui: {\n svg: definePackage('react-native-svg', '15.15.4'),\n iconProviders: {\n Ionicons: definePackage('@react-native-vector-icons/ionicons', '^13.1.4'),\n FontAwesome: definePackage('@react-native-vector-icons/fontawesome', '^13.1.4'),\n FontAwesome5: definePackage('@react-native-vector-icons/fontawesome5', '^13.1.4'),\n FontAwesome6: definePackage('@react-native-vector-icons/fontawesome6', '^13.1.4'),\n MaterialDesignIcons: definePackage(\n '@react-native-vector-icons/material-design-icons',\n '^13.1.4',\n ),\n },\n },\n packages: {\n metroRuntime: definePackage('@expo/metro-runtime', '~57.0.17'),\n asset: definePackage('expo-asset', '~57.0.20'),\n audio: definePackage('expo-audio', '~57.0.5'),\n authSession: definePackage('expo-auth-session', '~57.0.16'),\n camera: definePackage('expo-camera', '~57.0.6'),\n constants: definePackage('expo-constants', '~57.0.22'),\n crypto: definePackage('expo-crypto', '~57.0.4'),\n devClient: definePackage('expo-dev-client', '~57.0.20'),\n documentPicker: definePackage('expo-document-picker', '~57.0.3'),\n fileSystem: definePackage('expo-file-system', '~57.0.7'),\n font: definePackage('expo-font', '~57.0.4'),\n imagePicker: definePackage('expo-image-picker', '~57.0.20'),\n linearGradient: definePackage('expo-linear-gradient', '~57.0.2'),\n linking: definePackage('expo-linking', '~57.0.13'),\n localization: definePackage('expo-localization', '~57.0.2'),\n location: definePackage('expo-location', '~57.0.21'),\n mediaLibrary: definePackage('expo-media-library', '~57.0.5'),\n notifications: definePackage('expo-notifications', '~57.0.23'),\n secureStore: definePackage('expo-secure-store', '~57.0.4'),\n splashScreen: definePackage('expo-splash-screen', '~57.0.10'),\n statusBar: definePackage('expo-status-bar', '~57.0.1'),\n updates: definePackage('expo-updates', '~57.0.26'),\n webBrowser: definePackage('expo-web-browser', '~57.0.3'),\n },\n platforms: {\n android: {\n minimumVersion: 7,\n minimumApiLevel: 24,\n compileSdk: 36,\n targetSdk: 36,\n edgeToEdge: true,\n },\n ios: {\n minimumVersion: '16.4',\n minimumXcodeVersion: '26.4',\n },\n },\n} as const;\n\nexport type ExpoPlatform = typeof EXPO_PLATFORM;\n"]}
@@ -7,6 +7,17 @@ export interface ExpoRuntimeCapabilityHandler {
7
7
  readonly capabilityId: Capability['id'];
8
8
  readonly execute: (args: ExpoRuntimeCapabilityHandlerArgs) => Promise<void> | void;
9
9
  }
10
+ export type ExpoRuntimeCapabilityDiagnosticCode = 'invalid-capability-descriptor' | 'invalid-expo-alert-input' | 'capability-handler-failed' | 'missing-capability-handler' | 'missing-expo-alert-handler';
11
+ export interface ExpoRuntimeCapabilityDiagnostic {
12
+ readonly code: ExpoRuntimeCapabilityDiagnosticCode;
13
+ readonly message: string;
14
+ }
15
+ export type ExpoRuntimeCapabilityExecutionResult = {
16
+ readonly ok: true;
17
+ } | {
18
+ readonly ok: false;
19
+ readonly diagnostics: readonly ExpoRuntimeCapabilityDiagnostic[];
20
+ };
10
21
  export interface ExecuteExpoRuntimeCapabilityArgs {
11
22
  readonly capability: unknown;
12
23
  readonly input?: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"expoRuntimeCapability.d.ts","sourceRoot":"","sources":["../../src/types/expoRuntimeCapability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ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AAoC,GAC5C;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAA;CAAE,GACrB;IACE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,WAAW,EAAE,SAAS,+BAA+B,EAAE,CAAC;CAClE,CAAC;AAEN,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,4BAA4B,EAAE,CAAC;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD"}
@@ -1 +1 @@
1
- {"version":3,"file":"expoRuntimeCapability.js","sourceRoot":"","sources":["../../src/types/expoRuntimeCapability.ts"],"names":[],"mappings":"","sourcesContent":["import type { Capability } from '@ankhorage/contracts/capability';\n\nexport interface ExpoRuntimeCapabilityHandlerArgs {\n readonly capability: Capability;\n readonly input: unknown;\n}\n\nexport interface ExpoRuntimeCapabilityHandler {\n readonly capabilityId: Capability['id'];\n readonly execute: (args: ExpoRuntimeCapabilityHandlerArgs) => Promise<void> | void;\n}\n\nexport interface ExecuteExpoRuntimeCapabilityArgs {\n readonly capability: unknown;\n readonly input?: unknown;\n readonly capabilityHandlers?: readonly ExpoRuntimeCapabilityHandler[];\n readonly alertImpl?: (message: string) => void;\n}\n"]}
1
+ {"version":3,"file":"expoRuntimeCapability.js","sourceRoot":"","sources":["../../src/types/expoRuntimeCapability.ts"],"names":[],"mappings":"","sourcesContent":["import type { Capability } from '@ankhorage/contracts/capability';\n\nexport interface ExpoRuntimeCapabilityHandlerArgs {\n readonly capability: Capability;\n readonly input: unknown;\n}\n\nexport interface ExpoRuntimeCapabilityHandler {\n readonly capabilityId: Capability['id'];\n readonly execute: (args: ExpoRuntimeCapabilityHandlerArgs) => Promise<void> | void;\n}\n\nexport type ExpoRuntimeCapabilityDiagnosticCode =\n | 'invalid-capability-descriptor'\n | 'invalid-expo-alert-input'\n | 'capability-handler-failed'\n | 'missing-capability-handler'\n | 'missing-expo-alert-handler';\n\nexport interface ExpoRuntimeCapabilityDiagnostic {\n readonly code: ExpoRuntimeCapabilityDiagnosticCode;\n readonly message: string;\n}\n\nexport type ExpoRuntimeCapabilityExecutionResult =\n | { readonly ok: true }\n | {\n readonly ok: false;\n readonly diagnostics: readonly ExpoRuntimeCapabilityDiagnostic[];\n };\n\nexport interface ExecuteExpoRuntimeCapabilityArgs {\n readonly capability: unknown;\n readonly input?: unknown;\n readonly capabilityHandlers?: readonly ExpoRuntimeCapabilityHandler[];\n readonly alertImpl?: (message: string) => void;\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ankhorage/expo-runtime",
3
3
  "type": "module",
4
- "version": "6.0.1",
4
+ "version": "6.0.3",
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": {
@@ -189,9 +189,9 @@
189
189
  "@react-native-vector-icons/fontawesome6": "^13.1.4",
190
190
  "@react-native-vector-icons/ionicons": "^13.1.4",
191
191
  "@react-native-vector-icons/material-design-icons": "^13.1.4",
192
- "expo": "57.0.27",
192
+ "expo": "57.0.30",
193
193
  "expo-camera": "~57.0.6",
194
- "expo-constants": "~57.0.21",
194
+ "expo-constants": "~57.0.22",
195
195
  "expo-document-picker": "~57.0.3",
196
196
  "expo-file-system": "~57.0.7",
197
197
  "expo-font": "~57.0.4",
@@ -250,7 +250,7 @@
250
250
  }
251
251
  },
252
252
  "devDependencies": {
253
- "@ankhorage/devtools": "^2.3.13",
253
+ "@ankhorage/devtools": "^2.3.18",
254
254
  "@ankhorage/paradox": "^0.2.27",
255
255
  "@ankhorage/permissions": "^0.2.63",
256
256
  "@ankhorage/zora": "^24.0.0",
@@ -264,14 +264,14 @@
264
264
  "@types/pngjs": "^6.0.5",
265
265
  "@types/react": "~19.2.18",
266
266
  "bwip-js": "^4.11.4",
267
- "expo": "57.0.27",
267
+ "expo": "57.0.30",
268
268
  "expo-camera": "~57.0.6",
269
- "expo-constants": "~57.0.21",
269
+ "expo-constants": "~57.0.22",
270
270
  "expo-document-picker": "~57.0.3",
271
271
  "expo-file-system": "~57.0.7",
272
272
  "expo-font": "~57.0.4",
273
273
  "expo-image-picker": "~57.0.20",
274
- "playwright-core": "^1.64.0",
274
+ "playwright-core": "^1.64.1",
275
275
  "pngjs": "^7.0.0",
276
276
  "react": "19.2.3",
277
277
  "react-dom": "19.2.3",
@@ -2,6 +2,9 @@ export { executeExpoRuntimeCapabilityAsync } from './features/capabilities/execu
2
2
  export { resolveExpoRuntimeRoutePath } from './features/navigation/resolveExpoRuntimeRoutePath';
3
3
  export type {
4
4
  ExecuteExpoRuntimeCapabilityArgs,
5
+ ExpoRuntimeCapabilityDiagnostic,
6
+ ExpoRuntimeCapabilityDiagnosticCode,
7
+ ExpoRuntimeCapabilityExecutionResult,
5
8
  ExpoRuntimeCapabilityHandler,
6
9
  ExpoRuntimeCapabilityHandlerArgs,
7
10
  } from './types/expoRuntimeCapability';
@@ -4,7 +4,7 @@ import { describe, expect, test } from 'bun:test';
4
4
  import { CAPABILITIES } from './capabilities';
5
5
  import { executeExpoRuntimeCapabilityAsync, resolveExpoRuntimeRoutePath } from './capabilityBridge';
6
6
 
7
- describe('expoCapabilityBridge', () => {
7
+ describe('expoCapabilityBridge Expo-owned capabilities', () => {
8
8
  test('resolves dynamic route params and keeps unused params', () => {
9
9
  expect(resolveExpoRuntimeRoutePath('/users/[id]', { id: 42, tab: 'profile' })).toEqual({
10
10
  resolvedPath: '/users/42',
@@ -17,15 +17,74 @@ describe('expoCapabilityBridge', () => {
17
17
 
18
18
  const expoAlertCapability = findCapabilityById('expo.alert');
19
19
 
20
- await executeExpoRuntimeCapabilityAsync({
20
+ const result = await executeExpoRuntimeCapabilityAsync({
21
21
  capability: expoAlertCapability,
22
22
  input: { message: 'Saved' },
23
23
  alertImpl: (message) => messages.push(message),
24
24
  });
25
25
 
26
+ expect(result).toEqual({ ok: true });
26
27
  expect(messages).toEqual(['Saved']);
27
28
  });
28
29
 
30
+ test('rejects malformed Expo alert input without invoking the host callback', async () => {
31
+ const messages: string[] = [];
32
+
33
+ const result = await executeExpoRuntimeCapabilityAsync({
34
+ capability: findCapabilityById('expo.alert'),
35
+ input: { message: 42 },
36
+ alertImpl: (message) => messages.push(message),
37
+ });
38
+
39
+ expect(result).toEqual({
40
+ ok: false,
41
+ diagnostics: [
42
+ {
43
+ code: 'invalid-expo-alert-input',
44
+ message:
45
+ "The 'expo.alert' capability requires an input object with only a string 'message'.",
46
+ },
47
+ ],
48
+ });
49
+ expect(messages).toEqual([]);
50
+ });
51
+ });
52
+ describe('expoCapabilityBridge rejected Expo-owned capabilities', () => {
53
+ test('rejects a valid Expo alert invocation when no alert host is configured', async () => {
54
+ const result = await executeExpoRuntimeCapabilityAsync({
55
+ capability: findCapabilityById('expo.alert'),
56
+ input: { message: 'Saved' },
57
+ });
58
+
59
+ expect(result).toEqual({
60
+ ok: false,
61
+ diagnostics: [
62
+ {
63
+ code: 'missing-expo-alert-handler',
64
+ message: "No Expo alert host callback is configured for 'expo.alert'.",
65
+ },
66
+ ],
67
+ });
68
+ });
69
+
70
+ test('rejects an invalid capability descriptor', async () => {
71
+ const result = await executeExpoRuntimeCapabilityAsync({
72
+ capability: { id: 'expo.alert' },
73
+ });
74
+
75
+ expect(result).toEqual({
76
+ ok: false,
77
+ diagnostics: [
78
+ {
79
+ code: 'invalid-capability-descriptor',
80
+ message: 'The capability descriptor is invalid.',
81
+ },
82
+ ],
83
+ });
84
+ });
85
+ });
86
+
87
+ describe('expoCapabilityBridge foreign capabilities', () => {
29
88
  test('delegates foreign canonical capabilities to their configured runtime handler', async () => {
30
89
  const calls: string[] = [];
31
90
  const capability = {
@@ -35,7 +94,7 @@ describe('expoCapabilityBridge', () => {
35
94
  binding: { kind: 'action', bindableAs: ['target'] },
36
95
  } as const;
37
96
 
38
- await executeExpoRuntimeCapabilityAsync({
97
+ const result = await executeExpoRuntimeCapabilityAsync({
39
98
  capability,
40
99
  input: { route: 'users/[id]', params: { id: 42 } },
41
100
  capabilityHandlers: [
@@ -46,8 +105,65 @@ describe('expoCapabilityBridge', () => {
46
105
  ],
47
106
  });
48
107
 
108
+ expect(result).toEqual({ ok: true });
49
109
  expect(calls).toEqual(['navigator.navigate']);
50
110
  });
111
+
112
+ test('rejects a foreign canonical capability without a configured runtime handler', async () => {
113
+ const result = await executeExpoRuntimeCapabilityAsync({
114
+ capability: {
115
+ id: 'theme.setMode',
116
+ owner: '@ankhorage/surface',
117
+ access: ['invoke'],
118
+ binding: { kind: 'action', bindableAs: ['target'] },
119
+ },
120
+ });
121
+
122
+ expect(result).toEqual({
123
+ ok: false,
124
+ diagnostics: [
125
+ {
126
+ code: 'missing-capability-handler',
127
+ message: "No Expo Runtime capability handler is configured for 'theme.setMode'.",
128
+ },
129
+ ],
130
+ });
131
+ });
132
+ });
133
+ describe('expoCapabilityBridge failed foreign capability handlers', () => {
134
+ test('rejects synchronous and asynchronous foreign handler failures', async () => {
135
+ const capability = {
136
+ id: 'navigator.navigate',
137
+ owner: '@ankhorage/navigator',
138
+ access: ['invoke'],
139
+ binding: { kind: 'action', bindableAs: ['target'] },
140
+ } as const;
141
+ const failures = [
142
+ () => {
143
+ throw new Error('synchronous failure');
144
+ },
145
+ () => Promise.reject(new Error('asynchronous failure')),
146
+ ];
147
+
148
+ for (const execute of failures) {
149
+ const result = await executeExpoRuntimeCapabilityAsync({
150
+ capability,
151
+ capabilityHandlers: [{ capabilityId: 'navigator.navigate', execute }],
152
+ });
153
+
154
+ expect(result).toEqual({
155
+ ok: false,
156
+ diagnostics: [
157
+ {
158
+ code: 'capability-handler-failed',
159
+ message: `The handler for 'navigator.navigate' failed: ${
160
+ execute === failures[0] ? 'synchronous failure' : 'asynchronous failure'
161
+ }`,
162
+ },
163
+ ],
164
+ });
165
+ }
166
+ });
51
167
  });
52
168
 
53
169
  function findCapabilityById(capabilityId: string): Capability {
@@ -3,6 +3,8 @@ import type { Capability } from '@ankhorage/contracts/capability';
3
3
 
4
4
  import type {
5
5
  ExecuteExpoRuntimeCapabilityArgs,
6
+ ExpoRuntimeCapabilityDiagnostic,
7
+ ExpoRuntimeCapabilityExecutionResult,
6
8
  ExpoRuntimeCapabilityHandler,
7
9
  ExpoRuntimeCapabilityHandlerArgs,
8
10
  } from '../../types/expoRuntimeCapability';
@@ -10,16 +12,44 @@ import type {
10
12
  /*** Execute an Expo-owned capability or delegate another canonical capability to its runtime handler. */
11
13
  export async function executeExpoRuntimeCapabilityAsync(
12
14
  args: ExecuteExpoRuntimeCapabilityArgs,
13
- ): Promise<void> {
15
+ ): Promise<ExpoRuntimeCapabilityExecutionResult> {
14
16
  const { capability, input, capabilityHandlers, alertImpl } = args;
15
- if (!isCapability(capability)) return;
17
+ if (!isCapability(capability)) {
18
+ return rejectCapabilityExecution({
19
+ code: 'invalid-capability-descriptor',
20
+ message: 'The capability descriptor is invalid.',
21
+ });
22
+ }
16
23
 
17
24
  if (capability.id === 'expo.alert') {
18
- executeExpoAlert(input, alertImpl);
19
- return;
25
+ return executeExpoAlert(input, alertImpl);
20
26
  }
21
27
 
22
- await findCapabilityHandler(capabilityHandlers, capability.id)?.({ capability, input });
28
+ const handler = findCapabilityHandler(capabilityHandlers, capability.id);
29
+ if (!handler) {
30
+ return rejectCapabilityExecution({
31
+ code: 'missing-capability-handler',
32
+ message: `No Expo Runtime capability handler is configured for '${capability.id}'.`,
33
+ });
34
+ }
35
+ return executeForeignCapabilityHandlerAsync(handler, capability, input);
36
+ }
37
+
38
+ /*** Execute a foreign capability handler and translate its failure into the bridge result contract. */
39
+ async function executeForeignCapabilityHandlerAsync(
40
+ handler: (args: ExpoRuntimeCapabilityHandlerArgs) => Promise<void> | void,
41
+ capability: Capability,
42
+ input: unknown,
43
+ ): Promise<ExpoRuntimeCapabilityExecutionResult> {
44
+ try {
45
+ await handler({ capability, input });
46
+ return { ok: true };
47
+ } catch (error) {
48
+ return rejectCapabilityExecution({
49
+ code: 'capability-handler-failed',
50
+ message: `The handler for '${capability.id}' failed: ${getFailureMessage(error)}`,
51
+ });
52
+ }
23
53
  }
24
54
 
25
55
  /*** Find the configured executor for one canonical capability without dynamic record access. */
@@ -34,17 +64,45 @@ function findCapabilityHandler(
34
64
  function executeExpoAlert(
35
65
  input: unknown,
36
66
  alertImpl: ((message: string) => void) | undefined,
37
- ): void {
38
- if (!isExpoAlertInput(input)) return;
39
- alertImpl?.(input.message);
67
+ ): ExpoRuntimeCapabilityExecutionResult {
68
+ if (!isExpoAlertInput(input)) {
69
+ return rejectCapabilityExecution({
70
+ code: 'invalid-expo-alert-input',
71
+ message: "The 'expo.alert' capability requires an input object with only a string 'message'.",
72
+ });
73
+ }
74
+ if (!alertImpl) {
75
+ return rejectCapabilityExecution({
76
+ code: 'missing-expo-alert-handler',
77
+ message: "No Expo alert host callback is configured for 'expo.alert'.",
78
+ });
79
+ }
80
+ alertImpl(input.message);
81
+ return { ok: true };
40
82
  }
41
83
 
42
84
  /*** Validate the serializable input accepted by the Expo alert capability. */
43
85
  function isExpoAlertInput(input: unknown): input is { readonly message: string } {
44
- return (
45
- typeof input === 'object' &&
46
- input !== null &&
47
- 'message' in input &&
48
- typeof input.message === 'string'
49
- );
86
+ if (
87
+ typeof input !== 'object' ||
88
+ input === null ||
89
+ Array.isArray(input) ||
90
+ !('message' in input)
91
+ ) {
92
+ return false;
93
+ }
94
+ const entries = Object.entries(input);
95
+ return entries.length === 1 && typeof input.message === 'string';
96
+ }
97
+
98
+ /*** Report a rejected capability invocation with a diagnostic that a runtime owner can surface. */
99
+ function rejectCapabilityExecution(
100
+ diagnostic: ExpoRuntimeCapabilityDiagnostic,
101
+ ): ExpoRuntimeCapabilityExecutionResult {
102
+ return { ok: false, diagnostics: [diagnostic] };
103
+ }
104
+
105
+ /*** Convert any foreign handler failure into a diagnostic-safe message. */
106
+ function getFailureMessage(error: unknown): string {
107
+ return error instanceof Error ? error.message : String(error);
50
108
  }
package/src/index.ts CHANGED
@@ -22,6 +22,9 @@ export {
22
22
  export {
23
23
  type ExecuteExpoRuntimeCapabilityArgs,
24
24
  executeExpoRuntimeCapabilityAsync,
25
+ type ExpoRuntimeCapabilityDiagnostic,
26
+ type ExpoRuntimeCapabilityDiagnosticCode,
27
+ type ExpoRuntimeCapabilityExecutionResult,
25
28
  type ExpoRuntimeCapabilityHandler,
26
29
  type ExpoRuntimeCapabilityHandlerArgs,
27
30
  type ExpoRuntimeRouteResolution,
@@ -32,17 +32,17 @@ describe('EXPO_PLATFORM', () => {
32
32
  expect(EXPO_PLATFORM.tooling.expoDoctor.name).toBe('expo-doctor');
33
33
  expect(EXPO_PLATFORM.tooling.reactTypes.name).toBe('@types/react');
34
34
  expect(EXPO_PLATFORM.animation.worklets.name).toBe('react-native-worklets');
35
- expect(EXPO_PLATFORM.runtime.expo.version).toBe('57.0.27');
36
- expect(EXPO_PLATFORM.navigation.expoRouter.version).toBe('~57.0.25');
37
- expect(EXPO_PLATFORM.packages.linking.version).toBe('~57.0.12');
38
- expect(EXPO_PLATFORM.packages.metroRuntime.version).toBe('~57.0.16');
39
- expect(EXPO_PLATFORM.packages.constants.version).toBe('~57.0.21');
40
- expect(EXPO_PLATFORM.packages.asset.version).toBe('~57.0.19');
41
- expect(EXPO_PLATFORM.packages.authSession.version).toBe('~57.0.14');
35
+ expect(EXPO_PLATFORM.runtime.expo.version).toBe('57.0.30');
36
+ expect(EXPO_PLATFORM.navigation.expoRouter.version).toBe('~57.0.28');
37
+ expect(EXPO_PLATFORM.packages.linking.version).toBe('~57.0.13');
38
+ expect(EXPO_PLATFORM.packages.metroRuntime.version).toBe('~57.0.17');
39
+ expect(EXPO_PLATFORM.packages.constants.version).toBe('~57.0.22');
40
+ expect(EXPO_PLATFORM.packages.asset.version).toBe('~57.0.20');
41
+ expect(EXPO_PLATFORM.packages.authSession.version).toBe('~57.0.16');
42
42
  expect(EXPO_PLATFORM.packages.imagePicker.version).toBe('~57.0.20');
43
- expect(EXPO_PLATFORM.packages.location.version).toBe('~57.0.20');
44
- expect(EXPO_PLATFORM.packages.notifications.version).toBe('~57.0.22');
45
- expect(EXPO_PLATFORM.packages.updates.version).toBe('~57.0.25');
43
+ expect(EXPO_PLATFORM.packages.location.version).toBe('~57.0.21');
44
+ expect(EXPO_PLATFORM.packages.notifications.version).toBe('~57.0.23');
45
+ expect(EXPO_PLATFORM.packages.updates.version).toBe('~57.0.26');
46
46
  });
47
47
  });
48
48
 
package/src/platform.ts CHANGED
@@ -18,7 +18,7 @@ export const EXPO_PLATFORM = {
18
18
  sdk: 57,
19
19
  architecture: 'new-architecture-only',
20
20
  runtime: {
21
- expo: definePackage('expo', '57.0.27'),
21
+ expo: definePackage('expo', '57.0.30'),
22
22
  react: definePackage('react', '19.2.3'),
23
23
  reactDom: definePackage('react-dom', '19.2.3'),
24
24
  reactNative: definePackage('react-native', '0.86.3'),
@@ -35,7 +35,7 @@ export const EXPO_PLATFORM = {
35
35
  expoDoctor: definePackage('expo-doctor', '1.20.4'),
36
36
  },
37
37
  navigation: {
38
- expoRouter: definePackage('expo-router', '~57.0.25'),
38
+ expoRouter: definePackage('expo-router', '~57.0.28'),
39
39
  screens: definePackage('react-native-screens', '~4.26.0'),
40
40
  safeArea: definePackage('react-native-safe-area-context', '~5.7.0'),
41
41
  },
@@ -58,28 +58,28 @@ export const EXPO_PLATFORM = {
58
58
  },
59
59
  },
60
60
  packages: {
61
- metroRuntime: definePackage('@expo/metro-runtime', '~57.0.16'),
62
- asset: definePackage('expo-asset', '~57.0.19'),
61
+ metroRuntime: definePackage('@expo/metro-runtime', '~57.0.17'),
62
+ asset: definePackage('expo-asset', '~57.0.20'),
63
63
  audio: definePackage('expo-audio', '~57.0.5'),
64
- authSession: definePackage('expo-auth-session', '~57.0.14'),
64
+ authSession: definePackage('expo-auth-session', '~57.0.16'),
65
65
  camera: definePackage('expo-camera', '~57.0.6'),
66
- constants: definePackage('expo-constants', '~57.0.21'),
67
- crypto: definePackage('expo-crypto', '~57.0.3'),
68
- devClient: definePackage('expo-dev-client', '~57.0.19'),
66
+ constants: definePackage('expo-constants', '~57.0.22'),
67
+ crypto: definePackage('expo-crypto', '~57.0.4'),
68
+ devClient: definePackage('expo-dev-client', '~57.0.20'),
69
69
  documentPicker: definePackage('expo-document-picker', '~57.0.3'),
70
70
  fileSystem: definePackage('expo-file-system', '~57.0.7'),
71
71
  font: definePackage('expo-font', '~57.0.4'),
72
72
  imagePicker: definePackage('expo-image-picker', '~57.0.20'),
73
73
  linearGradient: definePackage('expo-linear-gradient', '~57.0.2'),
74
- linking: definePackage('expo-linking', '~57.0.12'),
74
+ linking: definePackage('expo-linking', '~57.0.13'),
75
75
  localization: definePackage('expo-localization', '~57.0.2'),
76
- location: definePackage('expo-location', '~57.0.20'),
76
+ location: definePackage('expo-location', '~57.0.21'),
77
77
  mediaLibrary: definePackage('expo-media-library', '~57.0.5'),
78
- notifications: definePackage('expo-notifications', '~57.0.22'),
78
+ notifications: definePackage('expo-notifications', '~57.0.23'),
79
79
  secureStore: definePackage('expo-secure-store', '~57.0.4'),
80
- splashScreen: definePackage('expo-splash-screen', '~57.0.9'),
80
+ splashScreen: definePackage('expo-splash-screen', '~57.0.10'),
81
81
  statusBar: definePackage('expo-status-bar', '~57.0.1'),
82
- updates: definePackage('expo-updates', '~57.0.25'),
82
+ updates: definePackage('expo-updates', '~57.0.26'),
83
83
  webBrowser: definePackage('expo-web-browser', '~57.0.3'),
84
84
  },
85
85
  platforms: {
@@ -10,6 +10,25 @@ export interface ExpoRuntimeCapabilityHandler {
10
10
  readonly execute: (args: ExpoRuntimeCapabilityHandlerArgs) => Promise<void> | void;
11
11
  }
12
12
 
13
+ export type ExpoRuntimeCapabilityDiagnosticCode =
14
+ | 'invalid-capability-descriptor'
15
+ | 'invalid-expo-alert-input'
16
+ | 'capability-handler-failed'
17
+ | 'missing-capability-handler'
18
+ | 'missing-expo-alert-handler';
19
+
20
+ export interface ExpoRuntimeCapabilityDiagnostic {
21
+ readonly code: ExpoRuntimeCapabilityDiagnosticCode;
22
+ readonly message: string;
23
+ }
24
+
25
+ export type ExpoRuntimeCapabilityExecutionResult =
26
+ | { readonly ok: true }
27
+ | {
28
+ readonly ok: false;
29
+ readonly diagnostics: readonly ExpoRuntimeCapabilityDiagnostic[];
30
+ };
31
+
13
32
  export interface ExecuteExpoRuntimeCapabilityArgs {
14
33
  readonly capability: unknown;
15
34
  readonly input?: unknown;