@ankhorage/expo-runtime 2.2.0 → 2.3.0

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
+ ## 2.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - de6bd74: Add canonical native scheme planning for enabled Expo application targets.
8
+
9
+ ## 2.2.1
10
+
11
+ ### Patch Changes
12
+
13
+ - f9a8210: Expose bundled media resolution and registry generation through a lightweight bundled-media subpath.
14
+
3
15
  ## 2.2.0
4
16
 
5
17
  ### Minor 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: v2.1.0](././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) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v2.2.0](././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) ![docs: paradox](././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
 
@@ -0,0 +1,3 @@
1
+ export { type ExpoBundledMediaRegistrySourceEntry, getExpoBundledMediaRegistrySource, } from '../bundledMediaRegistrySource';
2
+ export { createExpoBundledMediaResolver, type ExpoBundledMediaRegistry, type ExpoBundledMediaResolver, type ExpoBundledMediaResolverArgs, type ExpoBundledMediaValue, resolveExpoBundledMediaAsset, } from '../bundledMediaResolver';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundledMedia/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mCAAmC,EACxC,iCAAiC,GAClC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,8BAA8B,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,KAAK,qBAAqB,EAC1B,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { getExpoBundledMediaRegistrySource, } from '../bundledMediaRegistrySource';
2
+ export { createExpoBundledMediaResolver, resolveExpoBundledMediaAsset, } from '../bundledMediaResolver';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bundledMedia/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iCAAiC,GAClC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,8BAA8B,EAK9B,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC","sourcesContent":["export {\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';\n"]}
@@ -2,7 +2,7 @@ export function getExpoBundledMediaRegistrySource(entries) {
2
2
  const normalized = normalizeEntries(entries);
3
3
  const rows = normalized.map((entry) => ` ${JSON.stringify(entry.path)}: require(${JSON.stringify(entry.requirePath)}),`);
4
4
  return [
5
- "import type { ExpoBundledMediaRegistry } from '@ankhorage/expo-runtime';",
5
+ "import type { ExpoBundledMediaRegistry } from '@ankhorage/expo-runtime/bundled-media';",
6
6
  '',
7
7
  'declare const require: (path: string) => ExpoBundledMediaRegistry[string];',
8
8
  '',
@@ -1 +1 @@
1
- {"version":3,"file":"bundledMediaRegistrySource.js","sourceRoot":"","sources":["../src/bundledMediaRegistrySource.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,iCAAiC,CAC/C,OAAuD;IAEvD,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC7C,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CACzB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAC7F,CAAC;IACF,OAAO;QACL,0EAA0E;QAC1E,EAAE;QACF,4EAA4E;QAC5E,EAAE;QACF,iEAAiE;QACjE,GAAG,IAAI;QACP,IAAI;QACJ,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,gBAAgB,CACvB,OAAuD;IAEvD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC;YAC7D,MAAM,IAAI,KAAK,CAAC,uDAAuD,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QACvF,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;SACzB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SACpD,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["export interface ExpoBundledMediaRegistrySourceEntry {\n readonly path: string;\n readonly requirePath: string;\n}\n\nexport function getExpoBundledMediaRegistrySource(\n entries: readonly ExpoBundledMediaRegistrySourceEntry[],\n): string {\n const normalized = normalizeEntries(entries);\n const rows = normalized.map(\n (entry) => ` ${JSON.stringify(entry.path)}: require(${JSON.stringify(entry.requirePath)}),`,\n );\n return [\n \"import type { ExpoBundledMediaRegistry } from '@ankhorage/expo-runtime';\",\n '',\n 'declare const require: (path: string) => ExpoBundledMediaRegistry[string];',\n '',\n 'export const bundledMediaRegistry: ExpoBundledMediaRegistry = {',\n ...rows,\n '};',\n '',\n ].join('\\n');\n}\n\nfunction normalizeEntries(\n entries: readonly ExpoBundledMediaRegistrySourceEntry[],\n): readonly ExpoBundledMediaRegistrySourceEntry[] {\n const byPath = new Map<string, string>();\n for (const entry of entries) {\n const existing = byPath.get(entry.path);\n if (existing !== undefined && existing !== entry.requirePath) {\n throw new Error(`Bundled media path has conflicting require targets: ${entry.path}`);\n }\n byPath.set(entry.path, entry.requirePath);\n }\n return [...byPath.entries()]\n .sort(([left], [right]) => left.localeCompare(right))\n .map(([path, requirePath]) => ({ path, requirePath }));\n}\n"]}
1
+ {"version":3,"file":"bundledMediaRegistrySource.js","sourceRoot":"","sources":["../src/bundledMediaRegistrySource.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,iCAAiC,CAC/C,OAAuD;IAEvD,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC7C,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CACzB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAC7F,CAAC;IACF,OAAO;QACL,wFAAwF;QACxF,EAAE;QACF,4EAA4E;QAC5E,EAAE;QACF,iEAAiE;QACjE,GAAG,IAAI;QACP,IAAI;QACJ,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,gBAAgB,CACvB,OAAuD;IAEvD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC;YAC7D,MAAM,IAAI,KAAK,CAAC,uDAAuD,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QACvF,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;SACzB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SACpD,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["export interface ExpoBundledMediaRegistrySourceEntry {\n readonly path: string;\n readonly requirePath: string;\n}\n\nexport function getExpoBundledMediaRegistrySource(\n entries: readonly ExpoBundledMediaRegistrySourceEntry[],\n): string {\n const normalized = normalizeEntries(entries);\n const rows = normalized.map(\n (entry) => ` ${JSON.stringify(entry.path)}: require(${JSON.stringify(entry.requirePath)}),`,\n );\n return [\n \"import type { ExpoBundledMediaRegistry } from '@ankhorage/expo-runtime/bundled-media';\",\n '',\n 'declare const require: (path: string) => ExpoBundledMediaRegistry[string];',\n '',\n 'export const bundledMediaRegistry: ExpoBundledMediaRegistry = {',\n ...rows,\n '};',\n '',\n ].join('\\n');\n}\n\nfunction normalizeEntries(\n entries: readonly ExpoBundledMediaRegistrySourceEntry[],\n): readonly ExpoBundledMediaRegistrySourceEntry[] {\n const byPath = new Map<string, string>();\n for (const entry of entries) {\n const existing = byPath.get(entry.path);\n if (existing !== undefined && existing !== entry.requirePath) {\n throw new Error(`Bundled media path has conflicting require targets: ${entry.path}`);\n }\n byPath.set(entry.path, entry.requirePath);\n }\n return [...byPath.entries()]\n .sort(([left], [right]) => left.localeCompare(right))\n .map(([path, requirePath]) => ({ path, requirePath }));\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import type { AppDeployTargets } from '@ankhorage/contracts/deploy';
2
+ export type ExpoRuntimeNativePlatform = 'android' | 'ios';
3
+ export type ExpoRuntimeNativeSchemeMap = Readonly<Partial<Record<ExpoRuntimeNativePlatform, string>>>;
4
+ export declare function resolveExpoRuntimeNativeSchemeMap(targets: AppDeployTargets): ExpoRuntimeNativeSchemeMap;
5
+ //# sourceMappingURL=nativeLinkingPlanning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativeLinkingPlanning.d.ts","sourceRoot":"","sources":["../src/nativeLinkingPlanning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,KAAK,CAAC;AAE1D,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAC/C,OAAO,CAAC,MAAM,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC,CACnD,CAAC;AAEF,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,gBAAgB,GACxB,0BAA0B,CAW5B"}
@@ -0,0 +1,11 @@
1
+ export function resolveExpoRuntimeNativeSchemeMap(targets) {
2
+ const schemes = {};
3
+ if (targets.android?.enabled && targets.android.scheme !== undefined) {
4
+ schemes.android = targets.android.scheme;
5
+ }
6
+ if (targets.ios?.enabled && targets.ios.scheme !== undefined) {
7
+ schemes.ios = targets.ios.scheme;
8
+ }
9
+ return schemes;
10
+ }
11
+ //# sourceMappingURL=nativeLinkingPlanning.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativeLinkingPlanning.js","sourceRoot":"","sources":["../src/nativeLinkingPlanning.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,iCAAiC,CAC/C,OAAyB;IAEzB,MAAM,OAAO,GAAuD,EAAE,CAAC;IAEvE,IAAI,OAAO,CAAC,OAAO,EAAE,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACrE,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;IAC3C,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,EAAE,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC7D,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;IACnC,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import type { AppDeployTargets } from '@ankhorage/contracts/deploy';\n\nexport type ExpoRuntimeNativePlatform = 'android' | 'ios';\n\nexport type ExpoRuntimeNativeSchemeMap = Readonly<\n Partial<Record<ExpoRuntimeNativePlatform, string>>\n>;\n\nexport function resolveExpoRuntimeNativeSchemeMap(\n targets: AppDeployTargets,\n): ExpoRuntimeNativeSchemeMap {\n const schemes: Partial<Record<ExpoRuntimeNativePlatform, string>> = {};\n\n if (targets.android?.enabled && targets.android.scheme !== undefined) {\n schemes.android = targets.android.scheme;\n }\n if (targets.ios?.enabled && targets.ios.scheme !== undefined) {\n schemes.ios = targets.ios.scheme;\n }\n\n return schemes;\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  export { type ExpoRuntimeConfigPluginOutput, type ExpoRuntimeDependencyMap, type ExpoRuntimeGeneratedAppOutputPlan, type ExpoRuntimeNativeOutputPlan, resolveExpoRuntimeConfigPluginOutput, resolveExpoRuntimeDependencyMap, resolveExpoRuntimeGeneratedAppOutput, resolveExpoRuntimeNativeOutput, } from './generatedAppOutput';
2
2
  export { getExpoBarcodeScannerViewSource } from './generatedSources';
3
3
  export { type ExpoRuntimeLayoutIntegrationPlan, resolveExpoRuntimeLayoutIntegration, } from './layoutIntegrationPlanning';
4
+ export { type ExpoRuntimeNativePlatform, type ExpoRuntimeNativeSchemeMap, resolveExpoRuntimeNativeSchemeMap, } from './nativeLinkingPlanning';
4
5
  export type { ExpoRuntimeAdapterId, ExpoRuntimePlan, ExpoRuntimeProviderId, } from './resolveExpoRuntimePlan';
5
6
  export { resolveExpoRuntimePlan } from './resolveExpoRuntimePlan';
6
7
  //# sourceMappingURL=planning.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"planning.d.ts","sourceRoot":"","sources":["../src/planning.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EACtC,KAAK,2BAA2B,EAChC,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,EACL,KAAK,gCAAgC,EACrC,mCAAmC,GACpC,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"planning.d.ts","sourceRoot":"","sources":["../src/planning.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EACtC,KAAK,2BAA2B,EAChC,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,EACL,KAAK,gCAAgC,EACrC,mCAAmC,GACpC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,iCAAiC,GAClC,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
package/dist/planning.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export { resolveExpoRuntimeConfigPluginOutput, resolveExpoRuntimeDependencyMap, resolveExpoRuntimeGeneratedAppOutput, resolveExpoRuntimeNativeOutput, } from './generatedAppOutput';
2
2
  export { getExpoBarcodeScannerViewSource } from './generatedSources';
3
3
  export { resolveExpoRuntimeLayoutIntegration, } from './layoutIntegrationPlanning';
4
+ export { resolveExpoRuntimeNativeSchemeMap, } from './nativeLinkingPlanning';
4
5
  export { resolveExpoRuntimePlan } from './resolveExpoRuntimePlan';
5
6
  //# sourceMappingURL=planning.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"planning.js","sourceRoot":"","sources":["../src/planning.ts"],"names":[],"mappings":"AAAA,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 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":"planning.js","sourceRoot":"","sources":["../src/planning.ts"],"names":[],"mappings":"AAAA,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;AACrC,OAAO,EAGL,iCAAiC,GAClC,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["export {\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 {\n type ExpoRuntimeNativePlatform,\n type ExpoRuntimeNativeSchemeMap,\n resolveExpoRuntimeNativeSchemeMap,\n} from './nativeLinkingPlanning';\nexport type {\n ExpoRuntimeAdapterId,\n ExpoRuntimePlan,\n ExpoRuntimeProviderId,\n} from './resolveExpoRuntimePlan';\nexport { resolveExpoRuntimePlan } from './resolveExpoRuntimePlan';\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ankhorage/expo-runtime",
3
3
  "type": "module",
4
- "version": "2.2.0",
4
+ "version": "2.3.0",
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": {
@@ -22,7 +22,7 @@
22
22
  "runtime"
23
23
  ],
24
24
  "dependencies": {
25
- "@ankhorage/contracts": "^7.6.0",
25
+ "@ankhorage/contracts": "^7.8.0",
26
26
  "@ankhorage/permissions": "^0.2.1"
27
27
  },
28
28
  "files": [
@@ -54,6 +54,13 @@
54
54
  "types": "./src/mediaPicker/index.ts",
55
55
  "import": "./dist/mediaPicker/index.js",
56
56
  "default": "./dist/mediaPicker/index.js"
57
+ },
58
+ "./bundled-media": {
59
+ "react-native": "./src/bundledMedia/index.ts",
60
+ "browser": "./src/bundledMedia/index.ts",
61
+ "types": "./src/bundledMedia/index.ts",
62
+ "import": "./dist/bundledMedia/index.js",
63
+ "default": "./dist/bundledMedia/index.js"
57
64
  }
58
65
  },
59
66
  "publishConfig": {
@@ -0,0 +1,24 @@
1
+ import type { MediaAsset } from '@ankhorage/contracts';
2
+ import { describe, expect, test } from 'bun:test';
3
+
4
+ import { createExpoBundledMediaResolver, getExpoBundledMediaRegistrySource } from './index';
5
+
6
+ describe('bundled media subpath surface', () => {
7
+ test('exposes bundled resolution without the root runtime barrel', () => {
8
+ const asset: MediaAsset = {
9
+ id: 'hero',
10
+ name: 'Hero',
11
+ kind: 'image',
12
+ source: { kind: 'bundled', path: 'assets/hero.png' },
13
+ };
14
+ expect(createExpoBundledMediaResolver({ 'assets/hero.png': 42 })({ asset })).toBe(42);
15
+ });
16
+
17
+ test('generates registry modules that import the lightweight subpath', () => {
18
+ const source = getExpoBundledMediaRegistrySource([
19
+ { path: 'assets/hero.png', requirePath: '../../assets/hero.png' },
20
+ ]);
21
+ expect(source).toContain("from '@ankhorage/expo-runtime/bundled-media'");
22
+ expect(source).not.toContain("from '@ankhorage/expo-runtime';");
23
+ });
24
+ });
@@ -0,0 +1,12 @@
1
+ export {
2
+ type ExpoBundledMediaRegistrySourceEntry,
3
+ getExpoBundledMediaRegistrySource,
4
+ } from '../bundledMediaRegistrySource';
5
+ export {
6
+ createExpoBundledMediaResolver,
7
+ type ExpoBundledMediaRegistry,
8
+ type ExpoBundledMediaResolver,
9
+ type ExpoBundledMediaResolverArgs,
10
+ type ExpoBundledMediaValue,
11
+ resolveExpoBundledMediaAsset,
12
+ } from '../bundledMediaResolver';
@@ -11,7 +11,7 @@ export function getExpoBundledMediaRegistrySource(
11
11
  (entry) => ` ${JSON.stringify(entry.path)}: require(${JSON.stringify(entry.requirePath)}),`,
12
12
  );
13
13
  return [
14
- "import type { ExpoBundledMediaRegistry } from '@ankhorage/expo-runtime';",
14
+ "import type { ExpoBundledMediaRegistry } from '@ankhorage/expo-runtime/bundled-media';",
15
15
  '',
16
16
  'declare const require: (path: string) => ExpoBundledMediaRegistry[string];',
17
17
  '',
@@ -0,0 +1,77 @@
1
+ import type { AppDeployTargets } from '@ankhorage/contracts/deploy';
2
+ import { describe, expect, test } from 'bun:test';
3
+
4
+ import { resolveExpoRuntimeNativeSchemeMap } from './nativeLinkingPlanning';
5
+
6
+ const TARGET_CASES: readonly [string, AppDeployTargets, Readonly<Record<string, string>>][] = [
7
+ ['web', { web: { enabled: true } }, {}],
8
+ [
9
+ 'android',
10
+ { android: { enabled: true, package: 'com.ankh.android', scheme: 'ankh-android' } },
11
+ { android: 'ankh-android' },
12
+ ],
13
+ [
14
+ 'ios',
15
+ { ios: { enabled: true, bundleIdentifier: 'com.ankh.ios', scheme: 'ankh-ios' } },
16
+ { ios: 'ankh-ios' },
17
+ ],
18
+ [
19
+ 'web + android',
20
+ {
21
+ web: { enabled: true },
22
+ android: { enabled: true, package: 'com.ankh.android', scheme: 'ankh-android' },
23
+ },
24
+ { android: 'ankh-android' },
25
+ ],
26
+ [
27
+ 'web + ios',
28
+ {
29
+ web: { enabled: true },
30
+ ios: { enabled: true, bundleIdentifier: 'com.ankh.ios', scheme: 'ankh-ios' },
31
+ },
32
+ { ios: 'ankh-ios' },
33
+ ],
34
+ [
35
+ 'android + ios',
36
+ {
37
+ android: { enabled: true, package: 'com.ankh.android', scheme: 'ankh-android' },
38
+ ios: { enabled: true, bundleIdentifier: 'com.ankh.ios', scheme: 'ankh-ios' },
39
+ },
40
+ { android: 'ankh-android', ios: 'ankh-ios' },
41
+ ],
42
+ [
43
+ 'web + android + ios',
44
+ {
45
+ web: { enabled: true },
46
+ android: { enabled: true, package: 'com.ankh.android', scheme: 'ankh-android' },
47
+ ios: { enabled: true, bundleIdentifier: 'com.ankh.ios', scheme: 'ankh-ios' },
48
+ },
49
+ { android: 'ankh-android', ios: 'ankh-ios' },
50
+ ],
51
+ ];
52
+
53
+ describe('resolveExpoRuntimeNativeSchemeMap', () => {
54
+ for (const [name, targets, expected] of TARGET_CASES) {
55
+ test(`derives only enabled native schemes for ${name}`, () => {
56
+ expect(resolveExpoRuntimeNativeSchemeMap(targets)).toEqual(expected);
57
+ });
58
+ }
59
+
60
+ test('does not guess schemes from native application identifiers', () => {
61
+ expect(
62
+ resolveExpoRuntimeNativeSchemeMap({
63
+ android: { enabled: true, package: 'com.ankh.android' },
64
+ ios: { enabled: true, bundleIdentifier: 'com.ankh.ios' },
65
+ }),
66
+ ).toEqual({});
67
+ });
68
+
69
+ test('omits disabled native targets even when they retain stable schemes', () => {
70
+ expect(
71
+ resolveExpoRuntimeNativeSchemeMap({
72
+ android: { enabled: false, package: 'com.ankh.android', scheme: 'ankh-android' },
73
+ ios: { enabled: false, bundleIdentifier: 'com.ankh.ios', scheme: 'ankh-ios' },
74
+ }),
75
+ ).toEqual({});
76
+ });
77
+ });
@@ -0,0 +1,22 @@
1
+ import type { AppDeployTargets } from '@ankhorage/contracts/deploy';
2
+
3
+ export type ExpoRuntimeNativePlatform = 'android' | 'ios';
4
+
5
+ export type ExpoRuntimeNativeSchemeMap = Readonly<
6
+ Partial<Record<ExpoRuntimeNativePlatform, string>>
7
+ >;
8
+
9
+ export function resolveExpoRuntimeNativeSchemeMap(
10
+ targets: AppDeployTargets,
11
+ ): ExpoRuntimeNativeSchemeMap {
12
+ const schemes: Partial<Record<ExpoRuntimeNativePlatform, string>> = {};
13
+
14
+ if (targets.android?.enabled && targets.android.scheme !== undefined) {
15
+ schemes.android = targets.android.scheme;
16
+ }
17
+ if (targets.ios?.enabled && targets.ios.scheme !== undefined) {
18
+ schemes.ios = targets.ios.scheme;
19
+ }
20
+
21
+ return schemes;
22
+ }
package/src/planning.ts CHANGED
@@ -13,6 +13,11 @@ export {
13
13
  type ExpoRuntimeLayoutIntegrationPlan,
14
14
  resolveExpoRuntimeLayoutIntegration,
15
15
  } from './layoutIntegrationPlanning';
16
+ export {
17
+ type ExpoRuntimeNativePlatform,
18
+ type ExpoRuntimeNativeSchemeMap,
19
+ resolveExpoRuntimeNativeSchemeMap,
20
+ } from './nativeLinkingPlanning';
16
21
  export type {
17
22
  ExpoRuntimeAdapterId,
18
23
  ExpoRuntimePlan,