@ankhorage/expo-runtime 7.2.0 → 7.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 +6 -0
- package/README.md +1 -1
- package/dist/generatedAppSources.d.ts +32 -0
- package/dist/generatedAppSources.d.ts.map +1 -0
- package/dist/generatedAppSources.js +129 -0
- package/dist/generatedAppSources.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +9 -2
- package/src/generatedAppSources.test.ts +125 -0
- package/src/generatedAppSources.ts +202 -0
- package/src/index.ts +7 -0
package/CHANGELOG.md
CHANGED
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,32 @@
|
|
|
1
|
+
import type { AppManifest, NavigatorGenerationBindings } from '@ankhorage/contracts';
|
|
2
|
+
import { type ExpoRuntimeGeneratedAppOutputPlan } from './generatedAppOutput';
|
|
3
|
+
import type { ExpoRuntimePlan } from './resolveExpoRuntimePlan';
|
|
4
|
+
export interface ExpoRuntimeGeneratedAppSourceFile {
|
|
5
|
+
readonly relativePath: string;
|
|
6
|
+
readonly source: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ExpoRuntimeGeneratedAppSourceDiagnostic {
|
|
9
|
+
readonly code: 'invalid-manifest-module-specifier' | 'missing-manifest-screen';
|
|
10
|
+
readonly severity: 'error';
|
|
11
|
+
readonly screenId?: string;
|
|
12
|
+
readonly message: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ExpoRuntimeGeneratedAppSources extends ExpoRuntimeGeneratedAppOutputPlan {
|
|
15
|
+
readonly diagnostics: readonly ExpoRuntimeGeneratedAppSourceDiagnostic[];
|
|
16
|
+
readonly files: readonly ExpoRuntimeGeneratedAppSourceFile[];
|
|
17
|
+
readonly navigatorBindings: NavigatorGenerationBindings;
|
|
18
|
+
}
|
|
19
|
+
export interface ResolveExpoRuntimeGeneratedAppSourcesOptions {
|
|
20
|
+
/** Static module specifier through which the caller exposes its immutable manifest. */
|
|
21
|
+
readonly manifestModuleSpecifier: string;
|
|
22
|
+
/** Static module specifier Navigator uses to import the generated manifest screen exports. */
|
|
23
|
+
readonly screenModuleSpecifier: string;
|
|
24
|
+
}
|
|
25
|
+
/***
|
|
26
|
+
* Emit the Runtime-owned, filesystem-independent source module and Navigator screen bindings for one manifest.
|
|
27
|
+
*
|
|
28
|
+
* The caller owns manifest materialization and file writes. This boundary intentionally emits no Authoring
|
|
29
|
+
* routes: unresolved `/ankh` routes remain the responsibility of their published owner.
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveExpoRuntimeGeneratedAppSources(manifest: AppManifest, runtimePlan: ExpoRuntimePlan | undefined, options: ResolveExpoRuntimeGeneratedAppSourcesOptions): ExpoRuntimeGeneratedAppSources;
|
|
32
|
+
//# sourceMappingURL=generatedAppSources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generatedAppSources.d.ts","sourceRoot":"","sources":["../src/generatedAppSources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,2BAA2B,EAG5B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,KAAK,iCAAiC,EAEvC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,IAAI,EAAE,mCAAmC,GAAG,yBAAyB,CAAC;IAC/E,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,8BAA+B,SAAQ,iCAAiC;IACvF,QAAQ,CAAC,WAAW,EAAE,SAAS,uCAAuC,EAAE,CAAC;IACzE,QAAQ,CAAC,KAAK,EAAE,SAAS,iCAAiC,EAAE,CAAC;IAC7D,QAAQ,CAAC,iBAAiB,EAAE,2BAA2B,CAAC;CACzD;AAED,MAAM,WAAW,4CAA4C;IAC3D,uFAAuF;IACvF,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC,8FAA8F;IAC9F,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,qCAAqC,CACnD,QAAQ,EAAE,WAAW,EACrB,WAAW,EAAE,eAAe,GAAG,SAAS,EACxC,OAAO,EAAE,4CAA4C,GACpD,8BAA8B,CAoBhC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { resolveExpoRuntimeGeneratedAppOutput, } from './generatedAppOutput';
|
|
2
|
+
/***
|
|
3
|
+
* Emit the Runtime-owned, filesystem-independent source module and Navigator screen bindings for one manifest.
|
|
4
|
+
*
|
|
5
|
+
* The caller owns manifest materialization and file writes. This boundary intentionally emits no Authoring
|
|
6
|
+
* routes: unresolved `/ankh` routes remain the responsibility of their published owner.
|
|
7
|
+
*/
|
|
8
|
+
export function resolveExpoRuntimeGeneratedAppSources(manifest, runtimePlan, options) {
|
|
9
|
+
const output = resolveExpoRuntimeGeneratedAppOutput(runtimePlan);
|
|
10
|
+
const diagnostics = collectDiagnostics(manifest, options);
|
|
11
|
+
const screenIds = collectNavigatorScreenIds(manifest.navigator);
|
|
12
|
+
const navigatorBindings = createNavigatorBindings(screenIds, options.screenModuleSpecifier);
|
|
13
|
+
return {
|
|
14
|
+
...output,
|
|
15
|
+
diagnostics,
|
|
16
|
+
files: diagnostics.length === 0
|
|
17
|
+
? [
|
|
18
|
+
{
|
|
19
|
+
relativePath: 'src/generated/runtimeManifestScreens.tsx',
|
|
20
|
+
source: createRuntimeManifestScreensSource(manifest, options.manifestModuleSpecifier),
|
|
21
|
+
},
|
|
22
|
+
]
|
|
23
|
+
: [],
|
|
24
|
+
navigatorBindings: diagnostics.length === 0 ? navigatorBindings : { guards: {}, screens: {} },
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/*** Collect every manifest screen identity that Navigator can render or reference as a native accessory. */
|
|
28
|
+
function collectNavigatorScreenIds(navigator) {
|
|
29
|
+
return Array.from(collectNavigatorScreenIdSet(navigator)).sort();
|
|
30
|
+
}
|
|
31
|
+
/*** Traverse one navigator subtree without treating unowned Authoring paths as Runtime screens. */
|
|
32
|
+
function collectNavigatorScreenIdSet(navigator) {
|
|
33
|
+
const screenIds = new Set();
|
|
34
|
+
for (const route of navigator.routes) {
|
|
35
|
+
if (route.screenId !== undefined)
|
|
36
|
+
screenIds.add(route.screenId);
|
|
37
|
+
if (route.navigator !== undefined) {
|
|
38
|
+
for (const screenId of collectNavigatorScreenIdSet(route.navigator))
|
|
39
|
+
screenIds.add(screenId);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (navigator.type === 'split-view') {
|
|
43
|
+
screenIds.add(navigator.columns.primary.screenId);
|
|
44
|
+
if (navigator.columns.supplementary !== undefined) {
|
|
45
|
+
screenIds.add(navigator.columns.supplementary.screenId);
|
|
46
|
+
}
|
|
47
|
+
if (navigator.inspector !== undefined)
|
|
48
|
+
screenIds.add(navigator.inspector.screenId);
|
|
49
|
+
}
|
|
50
|
+
if (navigator.type === 'tabs' && navigator.implementation === 'native') {
|
|
51
|
+
if (navigator.bottomAccessory !== undefined)
|
|
52
|
+
screenIds.add(navigator.bottomAccessory.screenId);
|
|
53
|
+
}
|
|
54
|
+
return screenIds;
|
|
55
|
+
}
|
|
56
|
+
/*** Report invalid caller module bindings and every Navigator screen that the manifest does not define. */
|
|
57
|
+
function collectDiagnostics(manifest, options) {
|
|
58
|
+
const invalidSpecifierDiagnostics = [
|
|
59
|
+
['manifestModuleSpecifier', options.manifestModuleSpecifier],
|
|
60
|
+
['screenModuleSpecifier', options.screenModuleSpecifier],
|
|
61
|
+
].flatMap(([name, value]) => isStaticModuleSpecifier(value)
|
|
62
|
+
? []
|
|
63
|
+
: [
|
|
64
|
+
{
|
|
65
|
+
code: 'invalid-manifest-module-specifier',
|
|
66
|
+
severity: 'error',
|
|
67
|
+
message: `${name} must be a non-empty static module specifier.`,
|
|
68
|
+
},
|
|
69
|
+
]);
|
|
70
|
+
const missingScreenDiagnostics = collectNavigatorScreenIds(manifest.navigator)
|
|
71
|
+
.filter((screenId) => !Object.hasOwn(manifest.screens, screenId))
|
|
72
|
+
.map((screenId) => ({
|
|
73
|
+
code: 'missing-manifest-screen',
|
|
74
|
+
severity: 'error',
|
|
75
|
+
screenId,
|
|
76
|
+
message: `Navigator references manifest screen '${screenId}', but no matching manifest screen exists.`,
|
|
77
|
+
}));
|
|
78
|
+
return [...invalidSpecifierDiagnostics, ...missingScreenDiagnostics].sort((left, right) => `${left.code}\0${left.screenId ?? ''}\0${left.message}`.localeCompare(`${right.code}\0${right.screenId ?? ''}\0${right.message}`));
|
|
79
|
+
}
|
|
80
|
+
/*** Keep generated static imports safe without imposing a filesystem layout on the caller. */
|
|
81
|
+
function isStaticModuleSpecifier(value) {
|
|
82
|
+
return (value.trim().length > 0 &&
|
|
83
|
+
Array.from(value).every((character) => character.charCodeAt(0) >= 32 && !["'", '"', '`', '\\'].includes(character)));
|
|
84
|
+
}
|
|
85
|
+
/*** Map each actual Navigator screen identity onto a stable named export in the generated Runtime module. */
|
|
86
|
+
function createNavigatorBindings(screenIds, screenModuleSpecifier) {
|
|
87
|
+
return {
|
|
88
|
+
guards: {},
|
|
89
|
+
screens: Object.fromEntries(screenIds.map((screenId, index) => [
|
|
90
|
+
screenId,
|
|
91
|
+
{
|
|
92
|
+
module: screenModuleSpecifier,
|
|
93
|
+
exportName: getManifestScreenExportName(index),
|
|
94
|
+
},
|
|
95
|
+
])),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/*** Produce a safe export name independently of user-authored screen identifiers. */
|
|
99
|
+
function getManifestScreenExportName(index) {
|
|
100
|
+
return `ManifestScreen${index}`;
|
|
101
|
+
}
|
|
102
|
+
/*** Render the one Runtime-owned module whose exports bind Navigator routes to actual manifest screens. */
|
|
103
|
+
function createRuntimeManifestScreensSource(manifest, manifestModuleSpecifier) {
|
|
104
|
+
const screenIds = collectNavigatorScreenIds(manifest.navigator);
|
|
105
|
+
const exports = screenIds
|
|
106
|
+
.map((screenId, index) => `export const ${getManifestScreenExportName(index)} = createManifestScreen(${JSON.stringify(screenId)});`)
|
|
107
|
+
.join('\n');
|
|
108
|
+
return `import type { AppManifest } from '@ankhorage/contracts';
|
|
109
|
+
import { RuntimeScreen } from '@ankhorage/runtime';
|
|
110
|
+
import { createZoraComponentRegistry } from '@ankhorage/zora';
|
|
111
|
+
import runtimeManifest from ${JSON.stringify(manifestModuleSpecifier)};
|
|
112
|
+
|
|
113
|
+
const manifest = runtimeManifest as AppManifest;
|
|
114
|
+
const registry = createZoraComponentRegistry();
|
|
115
|
+
|
|
116
|
+
function createManifestScreen(screenId: string) {
|
|
117
|
+
const screen = manifest.screens[screenId];
|
|
118
|
+
if (screen === undefined) {
|
|
119
|
+
throw new Error(\`Generated Runtime screen binding is missing manifest screen '\${screenId}'.\`);
|
|
120
|
+
}
|
|
121
|
+
return function ManifestScreen() {
|
|
122
|
+
return <RuntimeScreen manifest={manifest} registry={registry} screen={screen} />;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
${exports}
|
|
127
|
+
`;
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=generatedAppSources.js.map
|
|
@@ -0,0 +1 @@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EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAC3F,CACF,CAAC;AACJ,CAAC;AAED,6GAA6G;AAC7G,SAAS,uBAAuB,CAC9B,SAA4B,EAC5B,qBAA6B;IAE7B,OAAO;QACL,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,MAAM,CAAC,WAAW,CACzB,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC;YACjC,QAAQ;YACR;gBACE,MAAM,EAAE,qBAAqB;gBAC7B,UAAU,EAAE,2BAA2B,CAAC,KAAK,CAAC;aACf;SAClC,CAAC,CACH;KACF,CAAC;AACJ,CAAC;AAED,qFAAqF;AACrF,SAAS,2BAA2B,CAAC,KAAa;IAChD,OAAO,iBAAiB,KAAK,EAAE,CAAC;AAClC,CAAC;AAED,2GAA2G;AAC3G,SAAS,kCAAkC,CACzC,QAAqB,EACrB,uBAA+B;IAE/B,MAAM,SAAS,GAAG,yBAAyB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAChE,MAAM,OAAO,GAAG,SAAS;SACtB,GAAG,CACF,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAClB,gBAAgB,2BAA2B,CAAC,KAAK,CAAC,2BAA2B,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAC5G;SACA,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,OAAO;;;8BAGqB,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC;;;;;;;;;;;;;;;EAenE,OAAO;CACR,CAAC;AACF,CAAC","sourcesContent":["import type {\n AppManifest,\n NavigatorGenerationBindings,\n NavigatorNode,\n NavigatorScreenModule,\n} from '@ankhorage/contracts';\n\nimport {\n type ExpoRuntimeGeneratedAppOutputPlan,\n resolveExpoRuntimeGeneratedAppOutput,\n} from './generatedAppOutput';\nimport type { ExpoRuntimePlan } from './resolveExpoRuntimePlan';\n\nexport interface ExpoRuntimeGeneratedAppSourceFile {\n readonly relativePath: string;\n readonly source: string;\n}\n\nexport interface ExpoRuntimeGeneratedAppSourceDiagnostic {\n readonly code: 'invalid-manifest-module-specifier' | 'missing-manifest-screen';\n readonly severity: 'error';\n readonly screenId?: string;\n readonly message: string;\n}\n\nexport interface ExpoRuntimeGeneratedAppSources extends ExpoRuntimeGeneratedAppOutputPlan {\n readonly diagnostics: readonly ExpoRuntimeGeneratedAppSourceDiagnostic[];\n readonly files: readonly ExpoRuntimeGeneratedAppSourceFile[];\n readonly navigatorBindings: NavigatorGenerationBindings;\n}\n\nexport interface ResolveExpoRuntimeGeneratedAppSourcesOptions {\n /** Static module specifier through which the caller exposes its immutable manifest. */\n readonly manifestModuleSpecifier: string;\n /** Static module specifier Navigator uses to import the generated manifest screen exports. */\n readonly screenModuleSpecifier: string;\n}\n\n/***\n * Emit the Runtime-owned, filesystem-independent source module and Navigator screen bindings for one manifest.\n *\n * The caller owns manifest materialization and file writes. This boundary intentionally emits no Authoring\n * routes: unresolved `/ankh` routes remain the responsibility of their published owner.\n */\nexport function resolveExpoRuntimeGeneratedAppSources(\n manifest: AppManifest,\n runtimePlan: ExpoRuntimePlan | undefined,\n options: ResolveExpoRuntimeGeneratedAppSourcesOptions,\n): ExpoRuntimeGeneratedAppSources {\n const output = resolveExpoRuntimeGeneratedAppOutput(runtimePlan);\n const diagnostics = collectDiagnostics(manifest, options);\n const screenIds = collectNavigatorScreenIds(manifest.navigator);\n const navigatorBindings = createNavigatorBindings(screenIds, options.screenModuleSpecifier);\n\n return {\n ...output,\n diagnostics,\n files:\n diagnostics.length === 0\n ? [\n {\n relativePath: 'src/generated/runtimeManifestScreens.tsx',\n source: createRuntimeManifestScreensSource(manifest, options.manifestModuleSpecifier),\n },\n ]\n : [],\n navigatorBindings: diagnostics.length === 0 ? navigatorBindings : { guards: {}, screens: {} },\n };\n}\n\n/*** Collect every manifest screen identity that Navigator can render or reference as a native accessory. */\nfunction collectNavigatorScreenIds(navigator: NavigatorNode): readonly string[] {\n return Array.from(collectNavigatorScreenIdSet(navigator)).sort();\n}\n\n/*** Traverse one navigator subtree without treating unowned Authoring paths as Runtime screens. */\nfunction collectNavigatorScreenIdSet(navigator: NavigatorNode): ReadonlySet<string> {\n const screenIds = new Set<string>();\n for (const route of navigator.routes) {\n if (route.screenId !== undefined) screenIds.add(route.screenId);\n if (route.navigator !== undefined) {\n for (const screenId of collectNavigatorScreenIdSet(route.navigator)) screenIds.add(screenId);\n }\n }\n if (navigator.type === 'split-view') {\n screenIds.add(navigator.columns.primary.screenId);\n if (navigator.columns.supplementary !== undefined) {\n screenIds.add(navigator.columns.supplementary.screenId);\n }\n if (navigator.inspector !== undefined) screenIds.add(navigator.inspector.screenId);\n }\n if (navigator.type === 'tabs' && navigator.implementation === 'native') {\n if (navigator.bottomAccessory !== undefined) screenIds.add(navigator.bottomAccessory.screenId);\n }\n return screenIds;\n}\n\n/*** Report invalid caller module bindings and every Navigator screen that the manifest does not define. */\nfunction collectDiagnostics(\n manifest: AppManifest,\n options: ResolveExpoRuntimeGeneratedAppSourcesOptions,\n): readonly ExpoRuntimeGeneratedAppSourceDiagnostic[] {\n const invalidSpecifierDiagnostics: ExpoRuntimeGeneratedAppSourceDiagnostic[] = [\n ['manifestModuleSpecifier', options.manifestModuleSpecifier] as const,\n ['screenModuleSpecifier', options.screenModuleSpecifier] as const,\n ].flatMap(([name, value]) =>\n isStaticModuleSpecifier(value)\n ? []\n : [\n {\n code: 'invalid-manifest-module-specifier',\n severity: 'error',\n message: `${name} must be a non-empty static module specifier.`,\n } satisfies ExpoRuntimeGeneratedAppSourceDiagnostic,\n ],\n );\n const missingScreenDiagnostics: ExpoRuntimeGeneratedAppSourceDiagnostic[] =\n collectNavigatorScreenIds(manifest.navigator)\n .filter((screenId) => !Object.hasOwn(manifest.screens, screenId))\n .map(\n (screenId) =>\n ({\n code: 'missing-manifest-screen',\n severity: 'error',\n screenId,\n message: `Navigator references manifest screen '${screenId}', but no matching manifest screen exists.`,\n }) satisfies ExpoRuntimeGeneratedAppSourceDiagnostic,\n );\n return [...invalidSpecifierDiagnostics, ...missingScreenDiagnostics].sort((left, right) =>\n `${left.code}\\0${left.screenId ?? ''}\\0${left.message}`.localeCompare(\n `${right.code}\\0${right.screenId ?? ''}\\0${right.message}`,\n ),\n );\n}\n\n/*** Keep generated static imports safe without imposing a filesystem layout on the caller. */\nfunction isStaticModuleSpecifier(value: string): boolean {\n return (\n value.trim().length > 0 &&\n Array.from(value).every(\n (character) => character.charCodeAt(0) >= 32 && ![\"'\", '\"', '`', '\\\\'].includes(character),\n )\n );\n}\n\n/*** Map each actual Navigator screen identity onto a stable named export in the generated Runtime module. */\nfunction createNavigatorBindings(\n screenIds: readonly string[],\n screenModuleSpecifier: string,\n): NavigatorGenerationBindings {\n return {\n guards: {},\n screens: Object.fromEntries(\n screenIds.map((screenId, index) => [\n screenId,\n {\n module: screenModuleSpecifier,\n exportName: getManifestScreenExportName(index),\n } satisfies NavigatorScreenModule,\n ]),\n ),\n };\n}\n\n/*** Produce a safe export name independently of user-authored screen identifiers. */\nfunction getManifestScreenExportName(index: number): string {\n return `ManifestScreen${index}`;\n}\n\n/*** Render the one Runtime-owned module whose exports bind Navigator routes to actual manifest screens. */\nfunction createRuntimeManifestScreensSource(\n manifest: AppManifest,\n manifestModuleSpecifier: string,\n): string {\n const screenIds = collectNavigatorScreenIds(manifest.navigator);\n const exports = screenIds\n .map(\n (screenId, index) =>\n `export const ${getManifestScreenExportName(index)} = createManifestScreen(${JSON.stringify(screenId)});`,\n )\n .join('\\n');\n return `import type { AppManifest } from '@ankhorage/contracts';\nimport { RuntimeScreen } from '@ankhorage/runtime';\nimport { createZoraComponentRegistry } from '@ankhorage/zora';\nimport runtimeManifest from ${JSON.stringify(manifestModuleSpecifier)};\n\nconst manifest = runtimeManifest as AppManifest;\nconst registry = createZoraComponentRegistry();\n\nfunction createManifestScreen(screenId: string) {\n const screen = manifest.screens[screenId];\n if (screen === undefined) {\n throw new Error(\\`Generated Runtime screen binding is missing manifest screen '\\${screenId}'.\\`);\n }\n return function ManifestScreen() {\n return <RuntimeScreen manifest={manifest} registry={registry} screen={screen} />;\n };\n}\n\n${exports}\n`;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { ExpoRuntimeProviders, type ExpoRuntimeProvidersProps } from './ExpoRunt
|
|
|
10
10
|
export { ExpoZoraIconFontProvider, type ExpoZoraIconFontProviderProps, } from './ExpoZoraIconFontProvider';
|
|
11
11
|
export { type ExpoAuthoringRoutePlanning, getExpoAuthoringRoutePlanning, } from './features/navigation/getExpoAuthoringRoutePlanning';
|
|
12
12
|
export { type ExpoRuntimeConfigPluginOutput, type ExpoRuntimeDependencyMap, type ExpoRuntimeGeneratedAppOutputPlan, type ExpoRuntimeNativeOutputPlan, resolveExpoRuntimeConfigPluginOutput, resolveExpoRuntimeDependencyMap, resolveExpoRuntimeGeneratedAppOutput, resolveExpoRuntimeNativeOutput, } from './generatedAppOutput';
|
|
13
|
+
export { type ExpoRuntimeGeneratedAppSourceDiagnostic, type ExpoRuntimeGeneratedAppSourceFile, type ExpoRuntimeGeneratedAppSources, resolveExpoRuntimeGeneratedAppSources, type ResolveExpoRuntimeGeneratedAppSourcesOptions, } from './generatedAppSources';
|
|
13
14
|
export { getExpoBarcodeScannerViewSource } from './generatedSources';
|
|
14
15
|
export { type ExpoRuntimeLayoutIntegrationPlan, resolveExpoRuntimeLayoutIntegration, } from './layoutIntegrationPlanning';
|
|
15
16
|
export type { ExpoRuntimeAdapterId, ExpoRuntimePlan, ExpoRuntimeProviderId, } from './resolveExpoRuntimePlan';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,2CAA2C,GAC5C,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,mCAAmC,EACxC,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L,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,EACL,KAAK,uCAAuC,EAC5C,KAAK,iCAAiC,EACtC,KAAK,8BAA8B,EACnC,qCAAqC,EACrC,KAAK,4CAA4C,GAClD,MAAM,uBAAuB,CAAC;AAC/B,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;AAClE,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export { ExpoRuntimeProviders } from './ExpoRuntimeProviders';
|
|
|
9
9
|
export { ExpoZoraIconFontProvider, } from './ExpoZoraIconFontProvider';
|
|
10
10
|
export { getExpoAuthoringRoutePlanning, } from './features/navigation/getExpoAuthoringRoutePlanning';
|
|
11
11
|
export { resolveExpoRuntimeConfigPluginOutput, resolveExpoRuntimeDependencyMap, resolveExpoRuntimeGeneratedAppOutput, resolveExpoRuntimeNativeOutput, } from './generatedAppOutput';
|
|
12
|
+
export { resolveExpoRuntimeGeneratedAppSources, } from './generatedAppSources';
|
|
12
13
|
export { getExpoBarcodeScannerViewSource } from './generatedSources';
|
|
13
14
|
export { resolveExpoRuntimeLayoutIntegration, } from './layoutIntegrationPlanning';
|
|
14
15
|
export { resolveExpoRuntimePlan } from './resolveExpoRuntimePlan';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,2CAA2C,GAC5C,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,EACL,yBAAyB,GAE1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAkC,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EACL,wBAAwB,GAEzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,6BAA6B,GAC9B,MAAM,qDAAqD,CAAC;AAC7D,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;AAClE,OAAO,EAIL,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC","sourcesContent":["export {\n BARCODE_SCANNER_TYPES,\n mapPermissionStatusToCameraPermissionStatus,\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 {\n ExpoBarcodeScannerAdapter,\n type ExpoBarcodeScannerAdapterProps,\n} from './ExpoBarcodeScannerAdapter';\nexport { ExpoRuntimeProviders, type ExpoRuntimeProvidersProps } from './ExpoRuntimeProviders';\nexport {\n ExpoZoraIconFontProvider,\n type ExpoZoraIconFontProviderProps,\n} from './ExpoZoraIconFontProvider';\nexport {\n type ExpoAuthoringRoutePlanning,\n getExpoAuthoringRoutePlanning,\n} from './features/navigation/getExpoAuthoringRoutePlanning';\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';\nexport {\n type ExpoAuthoringRouteFile,\n type ExpoAuthoringRouteHostPort,\n type ExpoAuthoringRouteHostPorts,\n getExpoAuthoringRouteFiles,\n} from './routeDelivery';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,2CAA2C,GAC5C,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,EACL,yBAAyB,GAE1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAkC,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EACL,wBAAwB,GAEzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,6BAA6B,GAC9B,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAKL,oCAAoC,EACpC,+BAA+B,EAC/B,oCAAoC,EACpC,8BAA8B,GAC/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAIL,qCAAqC,GAEtC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAEL,mCAAmC,GACpC,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAIL,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC","sourcesContent":["export {\n BARCODE_SCANNER_TYPES,\n mapPermissionStatusToCameraPermissionStatus,\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 {\n ExpoBarcodeScannerAdapter,\n type ExpoBarcodeScannerAdapterProps,\n} from './ExpoBarcodeScannerAdapter';\nexport { ExpoRuntimeProviders, type ExpoRuntimeProvidersProps } from './ExpoRuntimeProviders';\nexport {\n ExpoZoraIconFontProvider,\n type ExpoZoraIconFontProviderProps,\n} from './ExpoZoraIconFontProvider';\nexport {\n type ExpoAuthoringRoutePlanning,\n getExpoAuthoringRoutePlanning,\n} from './features/navigation/getExpoAuthoringRoutePlanning';\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 {\n type ExpoRuntimeGeneratedAppSourceDiagnostic,\n type ExpoRuntimeGeneratedAppSourceFile,\n type ExpoRuntimeGeneratedAppSources,\n resolveExpoRuntimeGeneratedAppSources,\n type ResolveExpoRuntimeGeneratedAppSourcesOptions,\n} from './generatedAppSources';\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';\nexport {\n type ExpoAuthoringRouteFile,\n type ExpoAuthoringRouteHostPort,\n type ExpoAuthoringRouteHostPorts,\n getExpoAuthoringRouteFiles,\n} from './routeDelivery';\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/expo-runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.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": {
|
|
@@ -74,6 +74,13 @@
|
|
|
74
74
|
"import": "./dist/routeDelivery.js",
|
|
75
75
|
"default": "./dist/routeDelivery.js"
|
|
76
76
|
},
|
|
77
|
+
"./generated-app": {
|
|
78
|
+
"react-native": "./src/generatedAppSources.ts",
|
|
79
|
+
"browser": "./src/generatedAppSources.ts",
|
|
80
|
+
"types": "./src/generatedAppSources.ts",
|
|
81
|
+
"import": "./dist/generatedAppSources.js",
|
|
82
|
+
"default": "./dist/generatedAppSources.js"
|
|
83
|
+
},
|
|
77
84
|
"./platform": {
|
|
78
85
|
"react-native": "./src/platform.ts",
|
|
79
86
|
"browser": "./src/platform.ts",
|
|
@@ -260,7 +267,7 @@
|
|
|
260
267
|
}
|
|
261
268
|
},
|
|
262
269
|
"devDependencies": {
|
|
263
|
-
"@ankhorage/devtools": "^2.
|
|
270
|
+
"@ankhorage/devtools": "^2.11.0",
|
|
264
271
|
"@ankhorage/paradox": "^0.2.27",
|
|
265
272
|
"@ankhorage/permissions": "^0.2.63",
|
|
266
273
|
"@ankhorage/zora": "^25.8.3 || ^27.2.0",
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { AppManifest } from '@ankhorage/contracts';
|
|
2
|
+
import { expect, test } from 'bun:test';
|
|
3
|
+
|
|
4
|
+
import { resolveExpoRuntimeGeneratedAppSources } from './generatedAppSources';
|
|
5
|
+
|
|
6
|
+
test('emits deterministic Runtime source and Navigator bindings for every referenced manifest screen', () => {
|
|
7
|
+
const manifest = createManifest();
|
|
8
|
+
|
|
9
|
+
const first = resolveExpoRuntimeGeneratedAppSources(manifest, undefined, {
|
|
10
|
+
manifestModuleSpecifier: '../ankh.config.json',
|
|
11
|
+
screenModuleSpecifier: '@/generated/runtimeManifestScreens',
|
|
12
|
+
});
|
|
13
|
+
const second = resolveExpoRuntimeGeneratedAppSources(manifest, undefined, {
|
|
14
|
+
manifestModuleSpecifier: '../ankh.config.json',
|
|
15
|
+
screenModuleSpecifier: '@/generated/runtimeManifestScreens',
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
expect(first).toEqual(second);
|
|
19
|
+
expect(first.diagnostics).toEqual([]);
|
|
20
|
+
expect(first.navigatorBindings).toEqual({
|
|
21
|
+
guards: {},
|
|
22
|
+
screens: {
|
|
23
|
+
detail: {
|
|
24
|
+
exportName: 'ManifestScreen0',
|
|
25
|
+
module: '@/generated/runtimeManifestScreens',
|
|
26
|
+
},
|
|
27
|
+
home: {
|
|
28
|
+
exportName: 'ManifestScreen1',
|
|
29
|
+
module: '@/generated/runtimeManifestScreens',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
expect(first.files).toEqual([
|
|
34
|
+
expect.objectContaining({ relativePath: 'src/generated/runtimeManifestScreens.tsx' }),
|
|
35
|
+
]);
|
|
36
|
+
expect(first.files[0]?.source).toContain("import { RuntimeScreen } from '@ankhorage/runtime';");
|
|
37
|
+
expect(first.files[0]?.source).toContain('createManifestScreen("detail")');
|
|
38
|
+
expect(first.files[0]?.source).toContain('createManifestScreen("home")');
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
test('fails closed with deterministic diagnostics when Navigator references no manifest screen', () => {
|
|
42
|
+
const manifest = createManifest({ navigatorScreenId: 'missing' });
|
|
43
|
+
|
|
44
|
+
const result = resolveExpoRuntimeGeneratedAppSources(manifest, undefined, {
|
|
45
|
+
manifestModuleSpecifier: '../ankh.config.json',
|
|
46
|
+
screenModuleSpecifier: '@/generated/runtimeManifestScreens',
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
expect(result.diagnostics).toEqual([
|
|
50
|
+
{
|
|
51
|
+
code: 'missing-manifest-screen',
|
|
52
|
+
message:
|
|
53
|
+
"Navigator references manifest screen 'missing', but no matching manifest screen exists.",
|
|
54
|
+
screenId: 'missing',
|
|
55
|
+
severity: 'error',
|
|
56
|
+
},
|
|
57
|
+
]);
|
|
58
|
+
expect(result.files).toEqual([]);
|
|
59
|
+
expect(result.navigatorBindings).toEqual({ guards: {}, screens: {} });
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
test('reports an invalid caller module binding without emitting a fake Runtime screen', () => {
|
|
63
|
+
const result = resolveExpoRuntimeGeneratedAppSources(createManifest(), undefined, {
|
|
64
|
+
manifestModuleSpecifier: '',
|
|
65
|
+
screenModuleSpecifier: '@/generated/runtimeManifestScreens',
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
expect(result.diagnostics).toEqual([
|
|
69
|
+
{
|
|
70
|
+
code: 'invalid-manifest-module-specifier',
|
|
71
|
+
message: 'manifestModuleSpecifier must be a non-empty static module specifier.',
|
|
72
|
+
severity: 'error',
|
|
73
|
+
},
|
|
74
|
+
]);
|
|
75
|
+
expect(result.files).toEqual([]);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
/*** Create the smallest complete manifest needed to exercise generated Runtime screen ownership. */
|
|
79
|
+
function createManifest(options: { readonly navigatorScreenId?: string } = {}): AppManifest {
|
|
80
|
+
const navigatorScreenId = options.navigatorScreenId ?? 'home';
|
|
81
|
+
return {
|
|
82
|
+
activeThemeId: 'default',
|
|
83
|
+
infra: {
|
|
84
|
+
environments: {
|
|
85
|
+
local: {
|
|
86
|
+
deployment: {
|
|
87
|
+
compute: { provider: 'local' },
|
|
88
|
+
runtime: { provider: 'minikube' },
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
modules: {},
|
|
93
|
+
},
|
|
94
|
+
metadata: {
|
|
95
|
+
category: 'utilities_tools',
|
|
96
|
+
name: 'Generated app',
|
|
97
|
+
slug: 'generated-app',
|
|
98
|
+
themeId: 'default',
|
|
99
|
+
version: '1.0.0',
|
|
100
|
+
},
|
|
101
|
+
navigator: {
|
|
102
|
+
routes: [
|
|
103
|
+
{ name: 'home', screenId: navigatorScreenId },
|
|
104
|
+
{
|
|
105
|
+
name: 'detail',
|
|
106
|
+
navigator: { routes: [{ name: 'detail', screenId: 'detail' }], type: 'stack' },
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
type: 'stack',
|
|
110
|
+
},
|
|
111
|
+
screens: {
|
|
112
|
+
detail: { id: 'detail', name: 'Detail', root: { id: 'detail-root', type: 'Screen' } },
|
|
113
|
+
home: { id: 'home', name: 'Home', root: { id: 'home-root', type: 'Screen' } },
|
|
114
|
+
},
|
|
115
|
+
settings: { localization: { defaultLocale: 'en', locales: ['en'] } },
|
|
116
|
+
themes: {
|
|
117
|
+
default: {
|
|
118
|
+
dark: { harmony: 'analogous', primaryColor: '#000000' },
|
|
119
|
+
id: 'default',
|
|
120
|
+
light: { harmony: 'analogous', primaryColor: '#ffffff' },
|
|
121
|
+
name: 'Default',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AppManifest,
|
|
3
|
+
NavigatorGenerationBindings,
|
|
4
|
+
NavigatorNode,
|
|
5
|
+
NavigatorScreenModule,
|
|
6
|
+
} from '@ankhorage/contracts';
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
type ExpoRuntimeGeneratedAppOutputPlan,
|
|
10
|
+
resolveExpoRuntimeGeneratedAppOutput,
|
|
11
|
+
} from './generatedAppOutput';
|
|
12
|
+
import type { ExpoRuntimePlan } from './resolveExpoRuntimePlan';
|
|
13
|
+
|
|
14
|
+
export interface ExpoRuntimeGeneratedAppSourceFile {
|
|
15
|
+
readonly relativePath: string;
|
|
16
|
+
readonly source: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ExpoRuntimeGeneratedAppSourceDiagnostic {
|
|
20
|
+
readonly code: 'invalid-manifest-module-specifier' | 'missing-manifest-screen';
|
|
21
|
+
readonly severity: 'error';
|
|
22
|
+
readonly screenId?: string;
|
|
23
|
+
readonly message: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ExpoRuntimeGeneratedAppSources extends ExpoRuntimeGeneratedAppOutputPlan {
|
|
27
|
+
readonly diagnostics: readonly ExpoRuntimeGeneratedAppSourceDiagnostic[];
|
|
28
|
+
readonly files: readonly ExpoRuntimeGeneratedAppSourceFile[];
|
|
29
|
+
readonly navigatorBindings: NavigatorGenerationBindings;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ResolveExpoRuntimeGeneratedAppSourcesOptions {
|
|
33
|
+
/** Static module specifier through which the caller exposes its immutable manifest. */
|
|
34
|
+
readonly manifestModuleSpecifier: string;
|
|
35
|
+
/** Static module specifier Navigator uses to import the generated manifest screen exports. */
|
|
36
|
+
readonly screenModuleSpecifier: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/***
|
|
40
|
+
* Emit the Runtime-owned, filesystem-independent source module and Navigator screen bindings for one manifest.
|
|
41
|
+
*
|
|
42
|
+
* The caller owns manifest materialization and file writes. This boundary intentionally emits no Authoring
|
|
43
|
+
* routes: unresolved `/ankh` routes remain the responsibility of their published owner.
|
|
44
|
+
*/
|
|
45
|
+
export function resolveExpoRuntimeGeneratedAppSources(
|
|
46
|
+
manifest: AppManifest,
|
|
47
|
+
runtimePlan: ExpoRuntimePlan | undefined,
|
|
48
|
+
options: ResolveExpoRuntimeGeneratedAppSourcesOptions,
|
|
49
|
+
): ExpoRuntimeGeneratedAppSources {
|
|
50
|
+
const output = resolveExpoRuntimeGeneratedAppOutput(runtimePlan);
|
|
51
|
+
const diagnostics = collectDiagnostics(manifest, options);
|
|
52
|
+
const screenIds = collectNavigatorScreenIds(manifest.navigator);
|
|
53
|
+
const navigatorBindings = createNavigatorBindings(screenIds, options.screenModuleSpecifier);
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
...output,
|
|
57
|
+
diagnostics,
|
|
58
|
+
files:
|
|
59
|
+
diagnostics.length === 0
|
|
60
|
+
? [
|
|
61
|
+
{
|
|
62
|
+
relativePath: 'src/generated/runtimeManifestScreens.tsx',
|
|
63
|
+
source: createRuntimeManifestScreensSource(manifest, options.manifestModuleSpecifier),
|
|
64
|
+
},
|
|
65
|
+
]
|
|
66
|
+
: [],
|
|
67
|
+
navigatorBindings: diagnostics.length === 0 ? navigatorBindings : { guards: {}, screens: {} },
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/*** Collect every manifest screen identity that Navigator can render or reference as a native accessory. */
|
|
72
|
+
function collectNavigatorScreenIds(navigator: NavigatorNode): readonly string[] {
|
|
73
|
+
return Array.from(collectNavigatorScreenIdSet(navigator)).sort();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/*** Traverse one navigator subtree without treating unowned Authoring paths as Runtime screens. */
|
|
77
|
+
function collectNavigatorScreenIdSet(navigator: NavigatorNode): ReadonlySet<string> {
|
|
78
|
+
const screenIds = new Set<string>();
|
|
79
|
+
for (const route of navigator.routes) {
|
|
80
|
+
if (route.screenId !== undefined) screenIds.add(route.screenId);
|
|
81
|
+
if (route.navigator !== undefined) {
|
|
82
|
+
for (const screenId of collectNavigatorScreenIdSet(route.navigator)) screenIds.add(screenId);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (navigator.type === 'split-view') {
|
|
86
|
+
screenIds.add(navigator.columns.primary.screenId);
|
|
87
|
+
if (navigator.columns.supplementary !== undefined) {
|
|
88
|
+
screenIds.add(navigator.columns.supplementary.screenId);
|
|
89
|
+
}
|
|
90
|
+
if (navigator.inspector !== undefined) screenIds.add(navigator.inspector.screenId);
|
|
91
|
+
}
|
|
92
|
+
if (navigator.type === 'tabs' && navigator.implementation === 'native') {
|
|
93
|
+
if (navigator.bottomAccessory !== undefined) screenIds.add(navigator.bottomAccessory.screenId);
|
|
94
|
+
}
|
|
95
|
+
return screenIds;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/*** Report invalid caller module bindings and every Navigator screen that the manifest does not define. */
|
|
99
|
+
function collectDiagnostics(
|
|
100
|
+
manifest: AppManifest,
|
|
101
|
+
options: ResolveExpoRuntimeGeneratedAppSourcesOptions,
|
|
102
|
+
): readonly ExpoRuntimeGeneratedAppSourceDiagnostic[] {
|
|
103
|
+
const invalidSpecifierDiagnostics: ExpoRuntimeGeneratedAppSourceDiagnostic[] = [
|
|
104
|
+
['manifestModuleSpecifier', options.manifestModuleSpecifier] as const,
|
|
105
|
+
['screenModuleSpecifier', options.screenModuleSpecifier] as const,
|
|
106
|
+
].flatMap(([name, value]) =>
|
|
107
|
+
isStaticModuleSpecifier(value)
|
|
108
|
+
? []
|
|
109
|
+
: [
|
|
110
|
+
{
|
|
111
|
+
code: 'invalid-manifest-module-specifier',
|
|
112
|
+
severity: 'error',
|
|
113
|
+
message: `${name} must be a non-empty static module specifier.`,
|
|
114
|
+
} satisfies ExpoRuntimeGeneratedAppSourceDiagnostic,
|
|
115
|
+
],
|
|
116
|
+
);
|
|
117
|
+
const missingScreenDiagnostics: ExpoRuntimeGeneratedAppSourceDiagnostic[] =
|
|
118
|
+
collectNavigatorScreenIds(manifest.navigator)
|
|
119
|
+
.filter((screenId) => !Object.hasOwn(manifest.screens, screenId))
|
|
120
|
+
.map(
|
|
121
|
+
(screenId) =>
|
|
122
|
+
({
|
|
123
|
+
code: 'missing-manifest-screen',
|
|
124
|
+
severity: 'error',
|
|
125
|
+
screenId,
|
|
126
|
+
message: `Navigator references manifest screen '${screenId}', but no matching manifest screen exists.`,
|
|
127
|
+
}) satisfies ExpoRuntimeGeneratedAppSourceDiagnostic,
|
|
128
|
+
);
|
|
129
|
+
return [...invalidSpecifierDiagnostics, ...missingScreenDiagnostics].sort((left, right) =>
|
|
130
|
+
`${left.code}\0${left.screenId ?? ''}\0${left.message}`.localeCompare(
|
|
131
|
+
`${right.code}\0${right.screenId ?? ''}\0${right.message}`,
|
|
132
|
+
),
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/*** Keep generated static imports safe without imposing a filesystem layout on the caller. */
|
|
137
|
+
function isStaticModuleSpecifier(value: string): boolean {
|
|
138
|
+
return (
|
|
139
|
+
value.trim().length > 0 &&
|
|
140
|
+
Array.from(value).every(
|
|
141
|
+
(character) => character.charCodeAt(0) >= 32 && !["'", '"', '`', '\\'].includes(character),
|
|
142
|
+
)
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/*** Map each actual Navigator screen identity onto a stable named export in the generated Runtime module. */
|
|
147
|
+
function createNavigatorBindings(
|
|
148
|
+
screenIds: readonly string[],
|
|
149
|
+
screenModuleSpecifier: string,
|
|
150
|
+
): NavigatorGenerationBindings {
|
|
151
|
+
return {
|
|
152
|
+
guards: {},
|
|
153
|
+
screens: Object.fromEntries(
|
|
154
|
+
screenIds.map((screenId, index) => [
|
|
155
|
+
screenId,
|
|
156
|
+
{
|
|
157
|
+
module: screenModuleSpecifier,
|
|
158
|
+
exportName: getManifestScreenExportName(index),
|
|
159
|
+
} satisfies NavigatorScreenModule,
|
|
160
|
+
]),
|
|
161
|
+
),
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/*** Produce a safe export name independently of user-authored screen identifiers. */
|
|
166
|
+
function getManifestScreenExportName(index: number): string {
|
|
167
|
+
return `ManifestScreen${index}`;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/*** Render the one Runtime-owned module whose exports bind Navigator routes to actual manifest screens. */
|
|
171
|
+
function createRuntimeManifestScreensSource(
|
|
172
|
+
manifest: AppManifest,
|
|
173
|
+
manifestModuleSpecifier: string,
|
|
174
|
+
): string {
|
|
175
|
+
const screenIds = collectNavigatorScreenIds(manifest.navigator);
|
|
176
|
+
const exports = screenIds
|
|
177
|
+
.map(
|
|
178
|
+
(screenId, index) =>
|
|
179
|
+
`export const ${getManifestScreenExportName(index)} = createManifestScreen(${JSON.stringify(screenId)});`,
|
|
180
|
+
)
|
|
181
|
+
.join('\n');
|
|
182
|
+
return `import type { AppManifest } from '@ankhorage/contracts';
|
|
183
|
+
import { RuntimeScreen } from '@ankhorage/runtime';
|
|
184
|
+
import { createZoraComponentRegistry } from '@ankhorage/zora';
|
|
185
|
+
import runtimeManifest from ${JSON.stringify(manifestModuleSpecifier)};
|
|
186
|
+
|
|
187
|
+
const manifest = runtimeManifest as AppManifest;
|
|
188
|
+
const registry = createZoraComponentRegistry();
|
|
189
|
+
|
|
190
|
+
function createManifestScreen(screenId: string) {
|
|
191
|
+
const screen = manifest.screens[screenId];
|
|
192
|
+
if (screen === undefined) {
|
|
193
|
+
throw new Error(\`Generated Runtime screen binding is missing manifest screen '\${screenId}'.\`);
|
|
194
|
+
}
|
|
195
|
+
return function ManifestScreen() {
|
|
196
|
+
return <RuntimeScreen manifest={manifest} registry={registry} screen={screen} />;
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
${exports}
|
|
201
|
+
`;
|
|
202
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -51,6 +51,13 @@ export {
|
|
|
51
51
|
resolveExpoRuntimeGeneratedAppOutput,
|
|
52
52
|
resolveExpoRuntimeNativeOutput,
|
|
53
53
|
} from './generatedAppOutput';
|
|
54
|
+
export {
|
|
55
|
+
type ExpoRuntimeGeneratedAppSourceDiagnostic,
|
|
56
|
+
type ExpoRuntimeGeneratedAppSourceFile,
|
|
57
|
+
type ExpoRuntimeGeneratedAppSources,
|
|
58
|
+
resolveExpoRuntimeGeneratedAppSources,
|
|
59
|
+
type ResolveExpoRuntimeGeneratedAppSourcesOptions,
|
|
60
|
+
} from './generatedAppSources';
|
|
54
61
|
export { getExpoBarcodeScannerViewSource } from './generatedSources';
|
|
55
62
|
export {
|
|
56
63
|
type ExpoRuntimeLayoutIntegrationPlan,
|