@ankhorage/studio 0.0.21 → 0.1.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/README.md +1 -2
- package/dist/cli/index.d.ts +4 -4
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +81 -66
- package/dist/cli/index.js.map +1 -1
- package/dist/hooks/useProjects.js +1 -1
- package/dist/hooks/useProjects.js.map +1 -1
- package/dist/host/createStudioHost.d.ts +13 -0
- package/dist/host/createStudioHost.d.ts.map +1 -0
- package/dist/host/createStudioHost.js +16 -0
- package/dist/host/createStudioHost.js.map +1 -0
- package/dist/host/http/security.d.ts +2 -0
- package/dist/host/http/security.d.ts.map +1 -0
- package/dist/host/http/security.js +55 -0
- package/dist/host/http/security.js.map +1 -0
- package/dist/host/http/server.d.ts +16 -0
- package/dist/host/http/server.d.ts.map +1 -0
- package/dist/host/http/server.js +549 -0
- package/dist/host/http/server.js.map +1 -0
- package/dist/host/layout/auth/resolveAuthLayoutPlan.d.ts +38 -0
- package/dist/host/layout/auth/resolveAuthLayoutPlan.d.ts.map +1 -0
- package/dist/host/layout/auth/resolveAuthLayoutPlan.js +262 -0
- package/dist/host/layout/auth/resolveAuthLayoutPlan.js.map +1 -0
- package/dist/host/layout/layoutGenerator.d.ts +19 -0
- package/dist/host/layout/layoutGenerator.d.ts.map +1 -0
- package/dist/host/layout/layoutGenerator.js +418 -0
- package/dist/host/layout/layoutGenerator.js.map +1 -0
- package/dist/host/layout/templates/auth/adapter.d.ts +6 -0
- package/dist/host/layout/templates/auth/adapter.d.ts.map +1 -0
- package/dist/host/layout/templates/auth/adapter.js +94 -0
- package/dist/host/layout/templates/auth/adapter.js.map +1 -0
- package/dist/host/layout/templates/auth/screen.d.ts +12 -0
- package/dist/host/layout/templates/auth/screen.d.ts.map +1 -0
- package/dist/host/layout/templates/auth/screen.js +648 -0
- package/dist/host/layout/templates/auth/screen.js.map +1 -0
- package/dist/host/layout/templates/auth/session.d.ts +2 -0
- package/dist/host/layout/templates/auth/session.d.ts.map +1 -0
- package/dist/host/layout/templates/auth/session.js +326 -0
- package/dist/host/layout/templates/auth/session.js.map +1 -0
- package/dist/host/layout/templates/auth/signOut.d.ts +2 -0
- package/dist/host/layout/templates/auth/signOut.d.ts.map +1 -0
- package/dist/host/layout/templates/auth/signOut.js +43 -0
- package/dist/host/layout/templates/auth/signOut.js.map +1 -0
- package/dist/host/layout/templates/index.d.ts +11 -0
- package/dist/host/layout/templates/index.d.ts.map +1 -0
- package/dist/host/layout/templates/index.js +10 -0
- package/dist/host/layout/templates/index.js.map +1 -0
- package/dist/host/layout/templates/navigation.d.ts +16 -0
- package/dist/host/layout/templates/navigation.d.ts.map +1 -0
- package/dist/host/layout/templates/navigation.js +332 -0
- package/dist/host/layout/templates/navigation.js.map +1 -0
- package/dist/host/layout/templates/nestedLayout.d.ts +7 -0
- package/dist/host/layout/templates/nestedLayout.d.ts.map +1 -0
- package/dist/host/layout/templates/nestedLayout.js +56 -0
- package/dist/host/layout/templates/nestedLayout.js.map +1 -0
- package/dist/host/layout/templates/redirect.d.ts +2 -0
- package/dist/host/layout/templates/redirect.d.ts.map +1 -0
- package/dist/host/layout/templates/redirect.js +10 -0
- package/dist/host/layout/templates/redirect.js.map +1 -0
- package/dist/host/layout/templates/rootLayout.d.ts +28 -0
- package/dist/host/layout/templates/rootLayout.d.ts.map +1 -0
- package/dist/host/layout/templates/rootLayout.js +507 -0
- package/dist/host/layout/templates/rootLayout.js.map +1 -0
- package/dist/host/layout/templates/screen.d.ts +6 -0
- package/dist/host/layout/templates/screen.d.ts.map +1 -0
- package/dist/host/layout/templates/screen.js +94 -0
- package/dist/host/layout/templates/screen.js.map +1 -0
- package/dist/host/layout/templates/utils/routes.d.ts +3 -0
- package/dist/host/layout/templates/utils/routes.d.ts.map +1 -0
- package/dist/host/layout/templates/utils/routes.js +15 -0
- package/dist/host/layout/templates/utils/routes.js.map +1 -0
- package/dist/host/layout/templates/utils/strings.d.ts +3 -0
- package/dist/host/layout/templates/utils/strings.d.ts.map +1 -0
- package/dist/host/layout/templates/utils/strings.js +7 -0
- package/dist/host/layout/templates/utils/strings.js.map +1 -0
- package/dist/host/layout/utils/escapeStringLiteral.d.ts +2 -0
- package/dist/host/layout/utils/escapeStringLiteral.d.ts.map +1 -0
- package/dist/host/layout/utils/escapeStringLiteral.js +8 -0
- package/dist/host/layout/utils/escapeStringLiteral.js.map +1 -0
- package/dist/host/manifestSystem/auth/index.d.ts +2 -0
- package/dist/host/manifestSystem/auth/index.d.ts.map +1 -0
- package/dist/host/manifestSystem/auth/index.js +2 -0
- package/dist/host/manifestSystem/auth/index.js.map +1 -0
- package/dist/host/manifestSystem/auth/shared/global.auth.system.tpl.d.ts +4 -0
- package/dist/host/manifestSystem/auth/shared/global.auth.system.tpl.d.ts.map +1 -0
- package/dist/host/manifestSystem/auth/shared/global.auth.system.tpl.js +7 -0
- package/dist/host/manifestSystem/auth/shared/global.auth.system.tpl.js.map +1 -0
- package/dist/host/manifestSystem/auth/shared/index.d.ts +3 -0
- package/dist/host/manifestSystem/auth/shared/index.d.ts.map +1 -0
- package/dist/host/manifestSystem/auth/shared/index.js +8 -0
- package/dist/host/manifestSystem/auth/shared/index.js.map +1 -0
- package/dist/host/manifestSystem/index.d.ts +5 -0
- package/dist/host/manifestSystem/index.d.ts.map +1 -0
- package/dist/host/manifestSystem/index.js +23 -0
- package/dist/host/manifestSystem/index.js.map +1 -0
- package/dist/host/manifestSystem/types.d.ts +8 -0
- package/dist/host/manifestSystem/types.d.ts.map +1 -0
- package/dist/host/manifestSystem/types.js +2 -0
- package/dist/host/manifestSystem/types.js.map +1 -0
- package/dist/host/modules/catalog.d.ts +40 -0
- package/dist/host/modules/catalog.d.ts.map +1 -0
- package/dist/host/modules/catalog.js +112 -0
- package/dist/host/modules/catalog.js.map +1 -0
- package/dist/host/modules/layout.d.ts +7 -0
- package/dist/host/modules/layout.d.ts.map +1 -0
- package/dist/host/modules/layout.js +2 -0
- package/dist/host/modules/layout.js.map +1 -0
- package/dist/host/modules/runtime/LocalFsTargetAdapter.d.ts +34 -0
- package/dist/host/modules/runtime/LocalFsTargetAdapter.d.ts.map +1 -0
- package/dist/host/modules/runtime/LocalFsTargetAdapter.js +85 -0
- package/dist/host/modules/runtime/LocalFsTargetAdapter.js.map +1 -0
- package/dist/host/orchestrator/generatedAppFiles.d.ts +8 -0
- package/dist/host/orchestrator/generatedAppFiles.d.ts.map +1 -0
- package/dist/host/orchestrator/generatedAppFiles.js +125 -0
- package/dist/host/orchestrator/generatedAppFiles.js.map +1 -0
- package/dist/host/orchestrator/generatedRouteCleanup.d.ts +5 -0
- package/dist/host/orchestrator/generatedRouteCleanup.d.ts.map +1 -0
- package/dist/host/orchestrator/generatedRouteCleanup.js +117 -0
- package/dist/host/orchestrator/generatedRouteCleanup.js.map +1 -0
- package/dist/host/orchestrator/infraGenerator.d.ts +35 -0
- package/dist/host/orchestrator/infraGenerator.d.ts.map +1 -0
- package/dist/host/orchestrator/infraGenerator.js +135 -0
- package/dist/host/orchestrator/infraGenerator.js.map +1 -0
- package/dist/host/orchestrator/infraRuntime.d.ts +38 -0
- package/dist/host/orchestrator/infraRuntime.d.ts.map +1 -0
- package/dist/host/orchestrator/infraRuntime.js +227 -0
- package/dist/host/orchestrator/infraRuntime.js.map +1 -0
- package/dist/host/orchestrator/infraValidation.d.ts +3 -0
- package/dist/host/orchestrator/infraValidation.d.ts.map +1 -0
- package/dist/host/orchestrator/infraValidation.js +59 -0
- package/dist/host/orchestrator/infraValidation.js.map +1 -0
- package/dist/host/orchestrator/moduleManager.d.ts +86 -0
- package/dist/host/orchestrator/moduleManager.d.ts.map +1 -0
- package/dist/host/orchestrator/moduleManager.js +312 -0
- package/dist/host/orchestrator/moduleManager.js.map +1 -0
- package/dist/host/orchestrator/projectDeletion.d.ts +27 -0
- package/dist/host/orchestrator/projectDeletion.d.ts.map +1 -0
- package/dist/host/orchestrator/projectDeletion.js +242 -0
- package/dist/host/orchestrator/projectDeletion.js.map +1 -0
- package/dist/host/orchestrator/projectManager.d.ts +87 -0
- package/dist/host/orchestrator/projectManager.d.ts.map +1 -0
- package/dist/host/orchestrator/projectManager.js +371 -0
- package/dist/host/orchestrator/projectManager.js.map +1 -0
- package/dist/host/orchestrator/projectPaths.d.ts +4 -0
- package/dist/host/orchestrator/projectPaths.d.ts.map +1 -0
- package/dist/host/orchestrator/projectPaths.js +25 -0
- package/dist/host/orchestrator/projectPaths.js.map +1 -0
- package/dist/host/orchestrator/projectStore.d.ts +24 -0
- package/dist/host/orchestrator/projectStore.d.ts.map +1 -0
- package/dist/host/orchestrator/projectStore.js +155 -0
- package/dist/host/orchestrator/projectStore.js.map +1 -0
- package/dist/host/orchestrator/resolveMutations.d.ts +3 -0
- package/dist/host/orchestrator/resolveMutations.d.ts.map +1 -0
- package/dist/host/orchestrator/resolveMutations.js +12 -0
- package/dist/host/orchestrator/resolveMutations.js.map +1 -0
- package/dist/host/orchestrator/scaffolder.d.ts +33 -0
- package/dist/host/orchestrator/scaffolder.d.ts.map +1 -0
- package/dist/host/orchestrator/scaffolder.js +246 -0
- package/dist/host/orchestrator/scaffolder.js.map +1 -0
- package/dist/host/orchestrator/templates.d.ts +83 -0
- package/dist/host/orchestrator/templates.d.ts.map +1 -0
- package/dist/host/orchestrator/templates.js +355 -0
- package/dist/host/orchestrator/templates.js.map +1 -0
- package/dist/host/orchestrator/workspaceRuntime.d.ts +2 -0
- package/dist/host/orchestrator/workspaceRuntime.d.ts.map +1 -0
- package/dist/host/orchestrator/workspaceRuntime.js +82 -0
- package/dist/host/orchestrator/workspaceRuntime.js.map +1 -0
- package/dist/host/templateRegistry/index.d.ts +16 -0
- package/dist/host/templateRegistry/index.d.ts.map +1 -0
- package/dist/host/templateRegistry/index.js +74 -0
- package/dist/host/templateRegistry/index.js.map +1 -0
- package/dist/host/utils/requirementsInference.d.ts +4 -0
- package/dist/host/utils/requirementsInference.d.ts.map +1 -0
- package/dist/host/utils/requirementsInference.js +49 -0
- package/dist/host/utils/requirementsInference.js.map +1 -0
- package/dist/host/utils/trimOutput.d.ts +7 -0
- package/dist/host/utils/trimOutput.d.ts.map +1 -0
- package/dist/host/utils/trimOutput.js +32 -0
- package/dist/host/utils/trimOutput.js.map +1 -0
- package/dist/host/utils/workspaceRoot.d.ts +2 -0
- package/dist/host/utils/workspaceRoot.d.ts.map +1 -0
- package/dist/host/utils/workspaceRoot.js +33 -0
- package/dist/host/utils/workspaceRoot.js.map +1 -0
- package/dist/host/zoraExtensions/index.d.ts +11 -0
- package/dist/host/zoraExtensions/index.d.ts.map +1 -0
- package/dist/host/zoraExtensions/index.js +54 -0
- package/dist/host/zoraExtensions/index.js.map +1 -0
- package/package.json +16 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escapeStringLiteral.js","sourceRoot":"","sources":["../../../../src/host/layout/utils/escapeStringLiteral.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAC/C,OAAO,KAAK;SACT,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC;SACxB,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC;SACtB,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC;SACvB,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/host/manifestSystem/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/host/manifestSystem/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AppManifest } from '@ankhorage/contracts';
|
|
2
|
+
export declare function supportsGlobalAuthSystemTemplate(manifest: AppManifest): boolean;
|
|
3
|
+
export declare function applyGlobalAuthSystemTemplate(manifest: AppManifest): AppManifest;
|
|
4
|
+
//# sourceMappingURL=global.auth.system.tpl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.auth.system.tpl.d.ts","sourceRoot":"","sources":["../../../../../src/host/manifestSystem/auth/shared/global.auth.system.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAE/E;AAED,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,WAAW,GAAG,WAAW,CAEhF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.auth.system.tpl.js","sourceRoot":"","sources":["../../../../../src/host/manifestSystem/auth/shared/global.auth.system.tpl.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gCAAgC,CAAC,QAAqB;IACpE,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,KAAK,QAAQ,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,QAAqB;IACjE,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/host/manifestSystem/auth/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAM1D,eAAO,MAAM,mCAAmC,EAAE,sBAKjD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { applyGlobalAuthSystemTemplate, supportsGlobalAuthSystemTemplate, } from './global.auth.system.tpl';
|
|
2
|
+
export const SYSTEM_TEMPLATE_AUTH_GLOBAL_DEFAULT = {
|
|
3
|
+
id: 'auth.global.default',
|
|
4
|
+
description: 'Shared global auth defaults for generated sign-in and sign-up flows.',
|
|
5
|
+
applies: supportsGlobalAuthSystemTemplate,
|
|
6
|
+
apply: applyGlobalAuthSystemTemplate,
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/host/manifestSystem/auth/shared/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,6BAA6B,EAC7B,gCAAgC,GACjC,MAAM,0BAA0B,CAAC;AAElC,MAAM,CAAC,MAAM,mCAAmC,GAA2B;IACzE,EAAE,EAAE,qBAAqB;IACzB,WAAW,EAAE,sEAAsE;IACnF,OAAO,EAAE,gCAAgC;IACzC,KAAK,EAAE,6BAA6B;CACrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/host/manifestSystem/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASxD,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AAIxB,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,WAAW,GAAG,WAAW,CAmBvE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { inferScreenRequirementsFromUi, mergeScreenRequirements, } from '../utils/requirementsInference';
|
|
2
|
+
import { SYSTEM_TEMPLATE_AUTH_GLOBAL_DEFAULT } from './auth';
|
|
3
|
+
export * from './auth';
|
|
4
|
+
export * from './types';
|
|
5
|
+
const SYSTEM_MANIFEST_TEMPLATES = [SYSTEM_TEMPLATE_AUTH_GLOBAL_DEFAULT];
|
|
6
|
+
export function applySystemTemplates(manifest) {
|
|
7
|
+
const enrichedManifest = SYSTEM_MANIFEST_TEMPLATES.reduce((currentManifest, template) => {
|
|
8
|
+
if (!template.applies(currentManifest)) {
|
|
9
|
+
return currentManifest;
|
|
10
|
+
}
|
|
11
|
+
return template.apply(currentManifest);
|
|
12
|
+
}, manifest);
|
|
13
|
+
// Return a new manifest with enriched screen requirements
|
|
14
|
+
return {
|
|
15
|
+
...enrichedManifest,
|
|
16
|
+
screens: Object.fromEntries(Object.entries(enrichedManifest.screens).map(([id, screen]) => {
|
|
17
|
+
const inferred = inferScreenRequirementsFromUi(screen.root);
|
|
18
|
+
const merged = mergeScreenRequirements(screen.requires, inferred);
|
|
19
|
+
return [id, { ...screen, requires: merged }];
|
|
20
|
+
})),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/host/manifestSystem/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,6BAA6B,EAC7B,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,mCAAmC,EAAE,MAAM,QAAQ,CAAC;AAG7D,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AAExB,MAAM,yBAAyB,GAA6B,CAAC,mCAAmC,CAAC,CAAC;AAElG,MAAM,UAAU,oBAAoB,CAAC,QAAqB;IACxD,MAAM,gBAAgB,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,QAAQ,EAAE,EAAE;QACtF,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;YACvC,OAAO,eAAe,CAAC;QACzB,CAAC;QACD,OAAO,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC,EAAE,QAAQ,CAAC,CAAC;IAEb,0DAA0D;IAC1D,OAAO;QACL,GAAG,gBAAgB;QACnB,OAAO,EAAE,MAAM,CAAC,WAAW,CACzB,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE;YAC5D,MAAM,QAAQ,GAAG,6BAA6B,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC5D,MAAM,MAAM,GAAG,uBAAuB,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAClE,OAAO,CAAC,EAAE,EAAE,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QAC/C,CAAC,CAAC,CACH;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AppManifest } from '@ankhorage/contracts';
|
|
2
|
+
export interface ManifestSystemTemplate {
|
|
3
|
+
id: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
applies: (manifest: AppManifest) => boolean;
|
|
6
|
+
apply: (manifest: AppManifest) => AppManifest;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/host/manifestSystem/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,CAAC,QAAQ,EAAE,WAAW,KAAK,OAAO,CAAC;IAC5C,KAAK,EAAE,CAAC,QAAQ,EAAE,WAAW,KAAK,WAAW,CAAC;CAC/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/host/manifestSystem/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { AppManifest } from '@ankhorage/contracts';
|
|
2
|
+
import type { ModuleDefinition } from '@ankhorage/orchestrator';
|
|
3
|
+
import { type NormalizedExpoGoogleFontsModuleConfig } from '@ankhorage/orchestrator-module-expo-google-fonts';
|
|
4
|
+
import type { LayoutMutation } from './layout';
|
|
5
|
+
export interface HostManifest extends AppManifest {
|
|
6
|
+
infra: AppManifest['infra'] & {
|
|
7
|
+
modulesConfig?: Record<string, unknown>;
|
|
8
|
+
};
|
|
9
|
+
settings: AppManifest['settings'] & {
|
|
10
|
+
googleFonts?: NormalizedExpoGoogleFontsModuleConfig;
|
|
11
|
+
};
|
|
12
|
+
typography?: {
|
|
13
|
+
activeFontId?: string | null;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface HostModuleDefinition {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
definition: ModuleDefinition<Record<string, unknown>>;
|
|
21
|
+
normalizeConfig: (config: Record<string, unknown>) => Record<string, unknown>;
|
|
22
|
+
readStoredConfig: (manifest: HostManifest) => Record<string, unknown>;
|
|
23
|
+
applyManifestConfig: (manifest: HostManifest, config: Record<string, unknown>) => HostManifest;
|
|
24
|
+
layout?: LayoutMutation;
|
|
25
|
+
ui?: {
|
|
26
|
+
modal?: {
|
|
27
|
+
title: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
proxyGet?: (path: string) => Promise<unknown>;
|
|
31
|
+
}
|
|
32
|
+
declare const localizationModule: HostModuleDefinition;
|
|
33
|
+
declare const googleFontsModule: HostModuleDefinition;
|
|
34
|
+
export declare const MODULE_CATALOG: {
|
|
35
|
+
[localizationModule.id]: HostModuleDefinition;
|
|
36
|
+
[googleFontsModule.id]: HostModuleDefinition;
|
|
37
|
+
};
|
|
38
|
+
export declare function listHostModules(): HostModuleDefinition[];
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/host/modules/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EA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AAO,CAAC,OAAO,CAAC,CAAC;CAC/C;AAmCD,QAAA,MAAM,kBAAkB,EAAE,oBAiCzB,CAAC;AAEF,QAAA,MAAM,iBAAiB,EAAE,oBA6CxB,CAAC;AAEF,eAAO,MAAM,cAAc;IACzB,CAAC,kBAAkB,CAAC,EAAE,CAAC,uBAAoB;IAC3C,CAAC,iBAAiB,CAAC,EAAE,CAAC,uBAAmB;CACK,CAAC;AAEjD,wBAAgB,eAAe,IAAI,oBAAoB,EAAE,CAExD"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { EXPO_GOOGLE_FONTS_MODULE_ID, expoGoogleFontsModule, parseExpoGoogleFontsModuleConfig, } from '@ankhorage/orchestrator-module-expo-google-fonts';
|
|
2
|
+
import { EXPO_LOCALIZATION_MODULE_ID, expoLocalizationModule, parseExpoLocalizationModuleConfig, } from '@ankhorage/orchestrator-module-expo-localization';
|
|
3
|
+
const localizationLayout = {
|
|
4
|
+
imports: ['import { LocalizationModuleProvider } from "@/modules/localization";'],
|
|
5
|
+
hooks: [],
|
|
6
|
+
providerStart: ['<LocalizationModuleProvider>'],
|
|
7
|
+
providerEnd: ['</LocalizationModuleProvider>'],
|
|
8
|
+
};
|
|
9
|
+
const googleFontsLayout = {
|
|
10
|
+
imports: ['import { GoogleFontsProvider } from "@/modules/google-fonts";'],
|
|
11
|
+
hooks: [],
|
|
12
|
+
providerStart: ['<GoogleFontsProvider>'],
|
|
13
|
+
providerEnd: ['</GoogleFontsProvider>'],
|
|
14
|
+
};
|
|
15
|
+
function isHostManagedAction(action) {
|
|
16
|
+
return ((action.type === 'patch-text-block' && action.path === 'src/app/_layout.tsx') ||
|
|
17
|
+
(action.type === 'json-set' && action.path === 'ankh.config.json'));
|
|
18
|
+
}
|
|
19
|
+
function wrapHostManagedModule(definition) {
|
|
20
|
+
return {
|
|
21
|
+
...definition,
|
|
22
|
+
async plan(context) {
|
|
23
|
+
const actions = await definition.plan(context);
|
|
24
|
+
return actions.filter((action) => !isHostManagedAction(action));
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const localizationModule = {
|
|
29
|
+
id: EXPO_LOCALIZATION_MODULE_ID,
|
|
30
|
+
name: 'Localization (Expo)',
|
|
31
|
+
description: 'Multi-language support powered by expo-localization and i18next.',
|
|
32
|
+
definition: wrapHostManagedModule(expoLocalizationModule),
|
|
33
|
+
normalizeConfig(config) {
|
|
34
|
+
return parseExpoLocalizationModuleConfig(config);
|
|
35
|
+
},
|
|
36
|
+
readStoredConfig(manifest) {
|
|
37
|
+
const storedConfig = manifest.infra.modulesConfig?.[EXPO_LOCALIZATION_MODULE_ID];
|
|
38
|
+
if (isRecord(storedConfig)) {
|
|
39
|
+
return storedConfig;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
defaultLocale: manifest.settings.localization.defaultLocale,
|
|
43
|
+
locales: manifest.settings.localization.locales,
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
applyManifestConfig(manifest, config) {
|
|
47
|
+
const normalizedConfig = parseExpoLocalizationModuleConfig(config);
|
|
48
|
+
return {
|
|
49
|
+
...manifest,
|
|
50
|
+
settings: {
|
|
51
|
+
...manifest.settings,
|
|
52
|
+
localization: {
|
|
53
|
+
defaultLocale: normalizedConfig.defaultLocale,
|
|
54
|
+
locales: normalizedConfig.locales,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
layout: localizationLayout,
|
|
60
|
+
};
|
|
61
|
+
const googleFontsModule = {
|
|
62
|
+
id: EXPO_GOOGLE_FONTS_MODULE_ID,
|
|
63
|
+
name: 'Google Fonts (Expo)',
|
|
64
|
+
description: 'Deterministic Google Fonts integration via @expo-google-fonts packages.',
|
|
65
|
+
definition: wrapHostManagedModule(expoGoogleFontsModule),
|
|
66
|
+
normalizeConfig(config) {
|
|
67
|
+
return { ...parseExpoGoogleFontsModuleConfig(config) };
|
|
68
|
+
},
|
|
69
|
+
readStoredConfig(manifest) {
|
|
70
|
+
const storedConfig = manifest.infra.modulesConfig?.[EXPO_GOOGLE_FONTS_MODULE_ID];
|
|
71
|
+
const baseConfig = isRecord(storedConfig)
|
|
72
|
+
? storedConfig
|
|
73
|
+
: isRecord(manifest.settings.googleFonts)
|
|
74
|
+
? manifest.settings.googleFonts
|
|
75
|
+
: {};
|
|
76
|
+
const activeFontId = typeof manifest.typography?.activeFontId === 'string'
|
|
77
|
+
? manifest.typography.activeFontId
|
|
78
|
+
: undefined;
|
|
79
|
+
return {
|
|
80
|
+
...parseExpoGoogleFontsModuleConfig(activeFontId === undefined ? baseConfig : { ...baseConfig, activeFontId }),
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
applyManifestConfig(manifest, config) {
|
|
84
|
+
const normalizedConfig = parseExpoGoogleFontsModuleConfig(config);
|
|
85
|
+
return {
|
|
86
|
+
...manifest,
|
|
87
|
+
settings: {
|
|
88
|
+
...manifest.settings,
|
|
89
|
+
googleFonts: normalizedConfig,
|
|
90
|
+
},
|
|
91
|
+
typography: {
|
|
92
|
+
...manifest.typography,
|
|
93
|
+
activeFontId: normalizedConfig.activeFontId,
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
layout: googleFontsLayout,
|
|
98
|
+
ui: {
|
|
99
|
+
modal: { title: 'Google Fonts' },
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
export const MODULE_CATALOG = {
|
|
103
|
+
[localizationModule.id]: localizationModule,
|
|
104
|
+
[googleFontsModule.id]: googleFontsModule,
|
|
105
|
+
};
|
|
106
|
+
export function listHostModules() {
|
|
107
|
+
return Object.values(MODULE_CATALOG);
|
|
108
|
+
}
|
|
109
|
+
function isRecord(value) {
|
|
110
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.js","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SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/host/modules/layout.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/host/modules/layout.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
interface FileTargetAdapter {
|
|
2
|
+
exists(path: string): Promise<boolean>;
|
|
3
|
+
readText(path: string): Promise<string | null>;
|
|
4
|
+
writeText(path: string, content: string): Promise<void>;
|
|
5
|
+
readDir(path: string): Promise<string[]>;
|
|
6
|
+
ensureDir(path: string): Promise<void>;
|
|
7
|
+
remove(path: string): Promise<void>;
|
|
8
|
+
move(fromPath: string, toPath: string): Promise<void>;
|
|
9
|
+
readJson<T>(path: string): Promise<T | null>;
|
|
10
|
+
writeJson(path: string, value: unknown): Promise<void>;
|
|
11
|
+
exec?(cwd: string, command: string, args: string[]): Promise<{
|
|
12
|
+
code: number;
|
|
13
|
+
stdout: string;
|
|
14
|
+
stderr: string;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
export declare class LocalFsTargetAdapter implements FileTargetAdapter {
|
|
18
|
+
exists(p: string): Promise<boolean>;
|
|
19
|
+
readText(p: string): Promise<string | null>;
|
|
20
|
+
writeText(p: string, content: string): Promise<void>;
|
|
21
|
+
readDir(absDir: string): Promise<string[]>;
|
|
22
|
+
ensureDir(p: string): Promise<void>;
|
|
23
|
+
remove(p: string): Promise<void>;
|
|
24
|
+
move(fromPath: string, toPath: string): Promise<void>;
|
|
25
|
+
readJson<T>(p: string): Promise<T | null>;
|
|
26
|
+
writeJson(p: string, value: unknown): Promise<void>;
|
|
27
|
+
exec(cwd: string, command: string, args: string[]): Promise<{
|
|
28
|
+
code: number;
|
|
29
|
+
stdout: string;
|
|
30
|
+
stderr: string;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=LocalFsTargetAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalFsTargetAdapter.d.ts","sourceRoot":"","sources":["../../../../src/host/modules/runtime/LocalFsTargetAdapter.ts"],"names":[],"mappings":"AAOA,UAAU,iBAAiB;IACzB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC/C,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7C,SAAS,CAAC,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|
2
|
+
import { promises as fs } from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { promisify } from 'util';
|
|
5
|
+
const execFileAsync = promisify(execFileCb);
|
|
6
|
+
function trace(op, p) {
|
|
7
|
+
if (process.env.ANKH_TRACE_FS) {
|
|
8
|
+
const [, time] = new Date().toISOString().split('T');
|
|
9
|
+
console.log(`[FS-TRACE][${time}] ${op.padEnd(10)}: ${p}`);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export class LocalFsTargetAdapter {
|
|
13
|
+
async exists(p) {
|
|
14
|
+
try {
|
|
15
|
+
await fs.access(p);
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async readText(p) {
|
|
23
|
+
try {
|
|
24
|
+
return await fs.readFile(p, 'utf8');
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
async writeText(p, content) {
|
|
31
|
+
trace('writeText', p);
|
|
32
|
+
await fs.mkdir(path.dirname(p), { recursive: true });
|
|
33
|
+
await fs.writeFile(p, content, 'utf8');
|
|
34
|
+
}
|
|
35
|
+
async readDir(absDir) {
|
|
36
|
+
try {
|
|
37
|
+
return await fs.readdir(absDir);
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
async ensureDir(p) {
|
|
44
|
+
trace('ensureDir', p);
|
|
45
|
+
await fs.mkdir(p, { recursive: true });
|
|
46
|
+
}
|
|
47
|
+
async remove(p) {
|
|
48
|
+
trace('remove', p);
|
|
49
|
+
try {
|
|
50
|
+
await fs.rm(p, { recursive: true, force: true });
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
// ignore
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
async move(fromPath, toPath) {
|
|
57
|
+
trace('move', `${fromPath} -> ${toPath}`);
|
|
58
|
+
await fs.mkdir(path.dirname(toPath), { recursive: true });
|
|
59
|
+
await fs.rename(fromPath, toPath);
|
|
60
|
+
}
|
|
61
|
+
async readJson(p) {
|
|
62
|
+
const txt = await this.readText(p);
|
|
63
|
+
if (!txt)
|
|
64
|
+
return null;
|
|
65
|
+
return JSON.parse(txt);
|
|
66
|
+
}
|
|
67
|
+
async writeJson(p, value) {
|
|
68
|
+
// trace handled by writeText
|
|
69
|
+
const content = JSON.stringify(value, null, 2).replace(/\r\n/g, '\n') + '\n';
|
|
70
|
+
await this.writeText(p, content);
|
|
71
|
+
}
|
|
72
|
+
async exec(cwd, command, args) {
|
|
73
|
+
try {
|
|
74
|
+
const { stdout, stderr } = await execFileAsync(command, args, { cwd });
|
|
75
|
+
return { code: 0, stdout, stderr };
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
if (err instanceof Error) {
|
|
79
|
+
return { code: 1, stdout: '', stderr: err.message };
|
|
80
|
+
}
|
|
81
|
+
return { code: 1, stdout: '', stderr: 'Unknown exec error' };
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=LocalFsTargetAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalFsTargetAdapter.js","sourceRoot":"","sources":["../../../../src/host/modules/runtime/LocalFsTargetAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,MAAM,aAAa,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;AAmB5C,SAAS,KAAK,CAAC,EAAU,EAAE,CAAS;IAClC,IAAI,OAAO,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S,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,GAAW,EAAE,OAAe,EAAE,IAAc;QACrD,IAAI,CAAC;YACH,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;YACvE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QACrC,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACtB,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;gBACzB,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;YACtD,CAAC;YACD,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,oBAAoB,EAAE,CAAC;QAC/D,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ExpoRuntimePlan } from '@ankhorage/expo-runtime/planning';
|
|
2
|
+
import { type ZoraExtensionDefinition } from '../zoraExtensions';
|
|
3
|
+
export interface GeneratedAppFilesOptions {
|
|
4
|
+
runtimePlan?: ExpoRuntimePlan;
|
|
5
|
+
zoraExtensions?: readonly ZoraExtensionDefinition[];
|
|
6
|
+
}
|
|
7
|
+
export declare function syncGeneratedAppFiles(targetProjectPath: string, options?: GeneratedAppFilesOptions): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=generatedAppFiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generatedAppFiles.d.ts","sourceRoot":"","sources":["../../../src/host/orchestrator/generatedAppFiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAKxE,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEjE,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,cAAc,CAAC,EAAE,SAAS,uBAAuB,EAAE,CAAC;CACrD;AAYD,wBAAsB,qBAAqB,CACzC,iBAAiB,EAAE,MAAM,EACzB,OAAO,GAAE,wBAA6B,iBAiCvC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { getExpoBarcodeScannerViewSource } from '@ankhorage/expo-runtime/planning';
|
|
2
|
+
import { promises as fs } from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import {} from '../zoraExtensions';
|
|
5
|
+
const FORBIDDEN_SPECIFIER_PATTERN = /['"]@ankh\//;
|
|
6
|
+
const GENERATED_APP_SCAN_FILES = [
|
|
7
|
+
'package.json',
|
|
8
|
+
'tsconfig.json',
|
|
9
|
+
'babel.config.js',
|
|
10
|
+
'metro.config.js',
|
|
11
|
+
'app.config.ts',
|
|
12
|
+
'index.js',
|
|
13
|
+
];
|
|
14
|
+
export async function syncGeneratedAppFiles(targetProjectPath, options = {}) {
|
|
15
|
+
const { runtimePlan, zoraExtensions = [] } = options;
|
|
16
|
+
const generatedDest = path.join(targetProjectPath, 'src/generated');
|
|
17
|
+
const appExtensionRegistryDest = path.join(generatedDest, 'appExtensionRegistry.ts');
|
|
18
|
+
const expoBarcodeScannerDest = path.join(generatedDest, 'expo/ExpoBarcodeScannerView.tsx');
|
|
19
|
+
const usesExpoBarcodeScannerAdapter = runtimePlan?.runtimeAdapters.includes('ExpoBarcodeScannerAdapter') ?? false;
|
|
20
|
+
await Promise.all([
|
|
21
|
+
removePath(path.join(targetProjectPath, 'src/runtime')),
|
|
22
|
+
removePath(path.join(targetProjectPath, 'src/studio')),
|
|
23
|
+
removePath(path.join(targetProjectPath, 'src/dnd')),
|
|
24
|
+
removePath(appExtensionRegistryDest),
|
|
25
|
+
removePath(expoBarcodeScannerDest),
|
|
26
|
+
]);
|
|
27
|
+
await fs.mkdir(generatedDest, { recursive: true });
|
|
28
|
+
if (usesExpoBarcodeScannerAdapter) {
|
|
29
|
+
await fs.mkdir(path.dirname(expoBarcodeScannerDest), { recursive: true });
|
|
30
|
+
await fs.writeFile(expoBarcodeScannerDest, getExpoBarcodeScannerViewSource(), 'utf8');
|
|
31
|
+
}
|
|
32
|
+
await fs.writeFile(appExtensionRegistryDest, createGeneratedAppExtensionRegistrySource({
|
|
33
|
+
usesExpoBarcodeScannerAdapter,
|
|
34
|
+
zoraExtensions,
|
|
35
|
+
}), 'utf8');
|
|
36
|
+
await assertNoForbiddenSpecifiers(targetProjectPath);
|
|
37
|
+
}
|
|
38
|
+
function createGeneratedAppExtensionRegistrySource(args) {
|
|
39
|
+
const importLines = new Set();
|
|
40
|
+
const entries = args.zoraExtensions
|
|
41
|
+
.flatMap((extension) => {
|
|
42
|
+
const exportNames = Array.from(new Set(Object.values(extension.components))).sort();
|
|
43
|
+
importLines.add(`import { ${exportNames.join(', ')} } from '${extension.packageName}';`);
|
|
44
|
+
return Object.entries(extension.components).map(([componentName, exportName]) => ({
|
|
45
|
+
componentName,
|
|
46
|
+
exportName,
|
|
47
|
+
}));
|
|
48
|
+
})
|
|
49
|
+
.sort((left, right) => left.componentName.localeCompare(right.componentName));
|
|
50
|
+
if (args.usesExpoBarcodeScannerAdapter) {
|
|
51
|
+
importLines.add("import { ExpoBarcodeScannerView } from './expo/ExpoBarcodeScannerView';");
|
|
52
|
+
entries.unshift({
|
|
53
|
+
componentName: 'BarcodeScannerView',
|
|
54
|
+
exportName: 'ExpoBarcodeScannerView',
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
const registryEntries = entries
|
|
58
|
+
.map(({ componentName, exportName }) => ` ${formatRegistryKey(componentName)}: ${exportName},`)
|
|
59
|
+
.join('\n');
|
|
60
|
+
return [
|
|
61
|
+
"import type { ComponentRegistry } from '@ankhorage/runtime';",
|
|
62
|
+
...[...importLines].sort(),
|
|
63
|
+
'',
|
|
64
|
+
'export const APP_EXTENSION_COMPONENT_REGISTRY: ComponentRegistry = {',
|
|
65
|
+
registryEntries,
|
|
66
|
+
'};',
|
|
67
|
+
'',
|
|
68
|
+
]
|
|
69
|
+
.filter((line, index, lines) => line.length > 0 || lines[index - 1]?.length !== 0)
|
|
70
|
+
.join('\n');
|
|
71
|
+
}
|
|
72
|
+
function formatRegistryKey(key) {
|
|
73
|
+
if (/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(key)) {
|
|
74
|
+
return key;
|
|
75
|
+
}
|
|
76
|
+
return JSON.stringify(key);
|
|
77
|
+
}
|
|
78
|
+
async function removePath(pathToRemove) {
|
|
79
|
+
await fs.rm(pathToRemove, { recursive: true, force: true });
|
|
80
|
+
}
|
|
81
|
+
async function assertNoForbiddenSpecifiers(targetProjectPath) {
|
|
82
|
+
const filesToCheck = GENERATED_APP_SCAN_FILES.map((file) => path.join(targetProjectPath, file));
|
|
83
|
+
filesToCheck.push(...(await listSourceFiles(path.join(targetProjectPath, 'src'))));
|
|
84
|
+
for (const filePath of filesToCheck) {
|
|
85
|
+
let source;
|
|
86
|
+
try {
|
|
87
|
+
source = await fs.readFile(filePath, 'utf8');
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
if (isMissingPathError(error))
|
|
91
|
+
continue;
|
|
92
|
+
throw error;
|
|
93
|
+
}
|
|
94
|
+
if (FORBIDDEN_SPECIFIER_PATTERN.test(source)) {
|
|
95
|
+
throw new Error(`Generated app file ${filePath} still references @ankh/* packages.`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
async function listSourceFiles(rootPath) {
|
|
100
|
+
let entries;
|
|
101
|
+
try {
|
|
102
|
+
entries = await fs.readdir(rootPath, { withFileTypes: true });
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
if (isMissingPathError(error))
|
|
106
|
+
return [];
|
|
107
|
+
throw error;
|
|
108
|
+
}
|
|
109
|
+
const files = [];
|
|
110
|
+
for (const entry of entries) {
|
|
111
|
+
const entryPath = path.join(rootPath, entry.name);
|
|
112
|
+
if (entry.isDirectory()) {
|
|
113
|
+
files.push(...(await listSourceFiles(entryPath)));
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
if (entry.isFile() && /\.(?:[cm]?[jt]sx?|json)$/.test(entry.name)) {
|
|
117
|
+
files.push(entryPath);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return files;
|
|
121
|
+
}
|
|
122
|
+
function isMissingPathError(error) {
|
|
123
|
+
return error instanceof Error && 'code' in error && error.code === 'ENOENT';
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=generatedAppFiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generatedAppFiles.js","sourceRoot":"","sources":["../../../src/host/orchestrator/generatedAppFiles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAgC,MAAM,mBAAmB,CAAC;AAOjE,MAAM,2BAA2B,GAAG,aAAa,CAAC;AAClD,MAAM,wBAAwB,GAAG;IAC/B,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,UAAU;CACX,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,iBAAyB,EACzB,UAAoC,EAAE;IAEtC,MAAM,EAAE,WAAW,EAAE,cAAc,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;IACrD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;IACpE,MAAM,wBAAwB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,yBAAyB,CAAC,CAAC;IACrF,MAAM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