@ankhorage/expo-runtime 7.4.0 → 7.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +1 -2
- package/dist/generatedAppScaffold.d.ts +2 -1
- package/dist/generatedAppScaffold.d.ts.map +1 -1
- package/dist/generatedAppScaffold.js +31 -4
- package/dist/generatedAppScaffold.js.map +1 -1
- package/package.json +1 -1
- package/src/generatedAppScaffold.test.ts +25 -6
- package/src/generatedAppScaffold.ts +41 -2
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
|
|
|
@@ -59,5 +59,4 @@ export function createBasicExpoRuntimePlan() {
|
|
|
59
59
|
- [ExpoZoraIconFontProvider sequence](././paradox/diagrams/sequences/expo-zora-icon-font-provider.mmd)
|
|
60
60
|
- [getExpoBundledMediaRegistrySource sequence](././paradox/diagrams/sequences/get-expo-bundled-media-registry-source.mmd)
|
|
61
61
|
- [resolveExpoRuntimeGeneratedAppOutput sequence](././paradox/diagrams/sequences/resolve-expo-runtime-generated-app-output.mmd)
|
|
62
|
-
- [resolveExpoRuntimeGeneratedAppScaffold sequence](././paradox/diagrams/sequences/resolve-expo-runtime-generated-app-scaffold.mmd)
|
|
63
62
|
- [resolveExpoRuntimeNativeOutput sequence](././paradox/diagrams/sequences/resolve-expo-runtime-native-output.mmd)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AppManifest } from '@ankhorage/contracts';
|
|
1
2
|
import type { ExpoRuntimePlan } from './resolveExpoRuntimePlan';
|
|
2
3
|
export interface ExpoRuntimeGeneratedAppScaffoldFile {
|
|
3
4
|
readonly relativePath: 'package.json' | 'app.config.ts' | 'src/generated/runtimeShell.tsx';
|
|
@@ -7,5 +8,5 @@ export interface ExpoRuntimeGeneratedAppScaffold {
|
|
|
7
8
|
readonly files: readonly ExpoRuntimeGeneratedAppScaffoldFile[];
|
|
8
9
|
}
|
|
9
10
|
/*** Emit the Runtime-owned files needed to finish a generated Expo application without writing to disk. */
|
|
10
|
-
export declare function resolveExpoRuntimeGeneratedAppScaffold(runtimePlan: ExpoRuntimePlan | undefined): ExpoRuntimeGeneratedAppScaffold;
|
|
11
|
+
export declare function resolveExpoRuntimeGeneratedAppScaffold(manifest: Pick<AppManifest, 'metadata'>, runtimePlan: ExpoRuntimePlan | undefined): ExpoRuntimeGeneratedAppScaffold;
|
|
11
12
|
//# sourceMappingURL=generatedAppScaffold.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatedAppScaffold.d.ts","sourceRoot":"","sources":["../src/generatedAppScaffold.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generatedAppScaffold.d.ts","sourceRoot":"","sources":["../src/generatedAppScaffold.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,YAAY,EAAE,cAAc,GAAG,eAAe,GAAG,gCAAgC,CAAC;IAC3F,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,KAAK,EAAE,SAAS,mCAAmC,EAAE,CAAC;CAChE;AAED,2GAA2G;AAC3G,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,EACvC,WAAW,EAAE,eAAe,GAAG,SAAS,GACvC,+BAA+B,CAmBjC"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { resolveExpoRuntimeGeneratedAppOutput } from './generatedAppOutput';
|
|
2
|
+
import { EXPO_PLATFORM } from './platform';
|
|
2
3
|
/*** Emit the Runtime-owned files needed to finish a generated Expo application without writing to disk. */
|
|
3
|
-
export function resolveExpoRuntimeGeneratedAppScaffold(runtimePlan) {
|
|
4
|
+
export function resolveExpoRuntimeGeneratedAppScaffold(manifest, runtimePlan) {
|
|
4
5
|
const output = resolveExpoRuntimeGeneratedAppOutput(runtimePlan);
|
|
5
6
|
return {
|
|
6
7
|
files: [
|
|
7
8
|
{
|
|
8
9
|
relativePath: 'package.json',
|
|
9
|
-
source:
|
|
10
|
+
source: createPackageSource(manifest, output.dependencies),
|
|
10
11
|
},
|
|
11
12
|
{
|
|
12
13
|
relativePath: 'app.config.ts',
|
|
13
|
-
source: createExpoConfigSource(output.native),
|
|
14
|
+
source: createExpoConfigSource(manifest, output.native),
|
|
14
15
|
},
|
|
15
16
|
{
|
|
16
17
|
relativePath: 'src/generated/runtimeShell.tsx',
|
|
@@ -19,10 +20,36 @@ export function resolveExpoRuntimeGeneratedAppScaffold(runtimePlan) {
|
|
|
19
20
|
],
|
|
20
21
|
};
|
|
21
22
|
}
|
|
23
|
+
/*** Render the independently installable Expo Router package boundary for one generated application. */
|
|
24
|
+
function createPackageSource(manifest, dependencies) {
|
|
25
|
+
return `${JSON.stringify({
|
|
26
|
+
name: manifest.metadata.slug,
|
|
27
|
+
version: manifest.metadata.version,
|
|
28
|
+
private: true,
|
|
29
|
+
type: 'module',
|
|
30
|
+
main: 'expo-router/entry',
|
|
31
|
+
dependencies: {
|
|
32
|
+
...dependencies,
|
|
33
|
+
'@ankhorage/expo-runtime': '^7.3.0',
|
|
34
|
+
'@expo/metro-runtime': EXPO_PLATFORM.packages.metroRuntime.version,
|
|
35
|
+
expo: EXPO_PLATFORM.runtime.expo.version,
|
|
36
|
+
'expo-router': EXPO_PLATFORM.navigation.expoRouter.version,
|
|
37
|
+
react: EXPO_PLATFORM.runtime.react.version,
|
|
38
|
+
'react-dom': EXPO_PLATFORM.runtime.reactDom.version,
|
|
39
|
+
'react-native': EXPO_PLATFORM.runtime.reactNative.version,
|
|
40
|
+
'react-native-safe-area-context': EXPO_PLATFORM.navigation.safeArea.version,
|
|
41
|
+
'react-native-screens': EXPO_PLATFORM.navigation.screens.version,
|
|
42
|
+
'react-native-web': EXPO_PLATFORM.runtime.reactNativeWeb.version,
|
|
43
|
+
},
|
|
44
|
+
}, null, 2)}\n`;
|
|
45
|
+
}
|
|
22
46
|
/*** Render the native Expo configuration fragment from Runtime's resolved plugin and permission plan. */
|
|
23
|
-
function createExpoConfigSource(native) {
|
|
47
|
+
function createExpoConfigSource(manifest, native) {
|
|
24
48
|
return `export default {
|
|
25
49
|
expo: {
|
|
50
|
+
name: ${JSON.stringify(manifest.metadata.name)},
|
|
51
|
+
slug: ${JSON.stringify(manifest.metadata.slug)},
|
|
52
|
+
scheme: ${JSON.stringify(manifest.metadata.slug)},
|
|
26
53
|
android: ${JSON.stringify({ permissions: native.androidPermissions }, null, 4)},
|
|
27
54
|
plugins: ${JSON.stringify(native.configPlugins, null, 4)},
|
|
28
55
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatedAppScaffold.js","sourceRoot":"","sources":["../src/generatedAppScaffold.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generatedAppScaffold.js","sourceRoot":"","sources":["../src/generatedAppScaffold.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oCAAoC,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAY3C,2GAA2G;AAC3G,MAAM,UAAU,sCAAsC,CACpD,QAAuC,EACvC,WAAwC;IAExC,MAAM,MAAM,GAAG,oCAAoC,CAAC,WAAW,CAAC,CAAC;IAEjE,OAAO;QACL,KAAK,EAAE;YACL;gBACE,YAAY,EAAE,cAAc;gBAC5B,MAAM,EAAE,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAY,CAAC;aAC3D;YACD;gBACE,YAAY,EAAE,eAAe;gBAC7B,MAAM,EAAE,sBAAsB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC;aACxD;YACD;gBACE,YAAY,EAAE,gCAAgC;gBAC9C,MAAM,EAAE,wBAAwB,CAAC,WAAW,EAAE,SAAS,IAAI,EAAE,CAAC;aAC/D;SACF;KACF,CAAC;AACJ,CAAC;AAED,wGAAwG;AACxG,SAAS,mBAAmB,CAC1B,QAAuC,EACvC,YAA8C;IAE9C,OAAO,GAAG,IAAI,CAAC,SAAS,CACtB;QACE,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI;QAC5B,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO;QAClC,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,mBAAmB;QACzB,YAAY,EAAE;YACZ,GAAG,YAAY;YACf,yBAAyB,EAAE,QAAQ;YACnC,qBAAqB,EAAE,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,OAAO;YAClE,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;YACxC,aAAa,EAAE,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO;YAC1D,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO;YAC1C,WAAW,EAAE,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO;YACnD,cAAc,EAAE,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO;YACzD,gCAAgC,EAAE,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO;YAC3E,sBAAsB,EAAE,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO;YAChE,kBAAkB,EAAE,aAAa,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO;SACjE;KACF,EACD,IAAI,EACJ,CAAC,CACF,IAAI,CAAC;AACR,CAAC;AAED,yGAAyG;AACzG,SAAS,sBAAsB,CAC7B,QAAuC,EACvC,MAAyE;IAEzE,OAAO;;YAEG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;YACtC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;cACpC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;eACrC,IAAI,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;eACnE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;;cAE9C,CAAC;AACf,CAAC;AAED,wGAAwG;AACxG,SAAS,wBAAwB,CAAC,SAA4B;IAC5D,OAAO;;;;4CAImC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;;CAEpE,CAAC;AACF,CAAC","sourcesContent":["import type { AppManifest } from '@ankhorage/contracts';\n\nimport { resolveExpoRuntimeGeneratedAppOutput } from './generatedAppOutput';\nimport { EXPO_PLATFORM } from './platform';\nimport type { ExpoRuntimePlan } from './resolveExpoRuntimePlan';\n\nexport interface ExpoRuntimeGeneratedAppScaffoldFile {\n readonly relativePath: 'package.json' | 'app.config.ts' | 'src/generated/runtimeShell.tsx';\n readonly source: string;\n}\n\nexport interface ExpoRuntimeGeneratedAppScaffold {\n readonly files: readonly ExpoRuntimeGeneratedAppScaffoldFile[];\n}\n\n/*** Emit the Runtime-owned files needed to finish a generated Expo application without writing to disk. */\nexport function resolveExpoRuntimeGeneratedAppScaffold(\n manifest: Pick<AppManifest, 'metadata'>,\n runtimePlan: ExpoRuntimePlan | undefined,\n): ExpoRuntimeGeneratedAppScaffold {\n const output = resolveExpoRuntimeGeneratedAppOutput(runtimePlan);\n\n return {\n files: [\n {\n relativePath: 'package.json',\n source: createPackageSource(manifest, output.dependencies),\n },\n {\n relativePath: 'app.config.ts',\n source: createExpoConfigSource(manifest, output.native),\n },\n {\n relativePath: 'src/generated/runtimeShell.tsx',\n source: createRuntimeShellSource(runtimePlan?.providers ?? []),\n },\n ],\n };\n}\n\n/*** Render the independently installable Expo Router package boundary for one generated application. */\nfunction createPackageSource(\n manifest: Pick<AppManifest, 'metadata'>,\n dependencies: Readonly<Record<string, string>>,\n): string {\n return `${JSON.stringify(\n {\n name: manifest.metadata.slug,\n version: manifest.metadata.version,\n private: true,\n type: 'module',\n main: 'expo-router/entry',\n dependencies: {\n ...dependencies,\n '@ankhorage/expo-runtime': '^7.3.0',\n '@expo/metro-runtime': EXPO_PLATFORM.packages.metroRuntime.version,\n expo: EXPO_PLATFORM.runtime.expo.version,\n 'expo-router': EXPO_PLATFORM.navigation.expoRouter.version,\n react: EXPO_PLATFORM.runtime.react.version,\n 'react-dom': EXPO_PLATFORM.runtime.reactDom.version,\n 'react-native': EXPO_PLATFORM.runtime.reactNative.version,\n 'react-native-safe-area-context': EXPO_PLATFORM.navigation.safeArea.version,\n 'react-native-screens': EXPO_PLATFORM.navigation.screens.version,\n 'react-native-web': EXPO_PLATFORM.runtime.reactNativeWeb.version,\n },\n },\n null,\n 2,\n )}\\n`;\n}\n\n/*** Render the native Expo configuration fragment from Runtime's resolved plugin and permission plan. */\nfunction createExpoConfigSource(\n manifest: Pick<AppManifest, 'metadata'>,\n native: ReturnType<typeof resolveExpoRuntimeGeneratedAppOutput>['native'],\n): string {\n return `export default {\n expo: {\n name: ${JSON.stringify(manifest.metadata.name)},\n slug: ${JSON.stringify(manifest.metadata.slug)},\n scheme: ${JSON.stringify(manifest.metadata.slug)},\n android: ${JSON.stringify({ permissions: native.androidPermissions }, null, 4)},\n plugins: ${JSON.stringify(native.configPlugins, null, 4)},\n },\n} as const;\\n`;\n}\n\n/*** Render the canonical Runtime provider shell while leaving application composition to the caller. */\nfunction createRuntimeShellSource(providers: readonly string[]): string {\n return `import type { ReactNode } from 'react';\nimport { ExpoRuntimeProviders } from '@ankhorage/expo-runtime/providers';\n\nexport function GeneratedRuntimeShell({ children }: { readonly children: ReactNode }) {\n return <ExpoRuntimeProviders providers={${JSON.stringify(providers)}}>{children}</ExpoRuntimeProviders>;\n}\n`;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/expo-runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.4.
|
|
4
|
+
"version": "7.4.1",
|
|
5
5
|
"description": "Declarative runtime integration for Expo apps: maps app capabilities to permissions, packages, config plugins, providers, and adapters",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/expo-runtime#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { expect, test } from 'bun:test';
|
|
2
2
|
|
|
3
3
|
import { resolveExpoRuntimeGeneratedAppScaffold } from './generatedAppScaffold';
|
|
4
|
+
import { EXPO_PLATFORM } from './platform';
|
|
4
5
|
import type { ExpoRuntimePlan } from './resolveExpoRuntimePlan';
|
|
5
6
|
|
|
7
|
+
const MANIFEST = {
|
|
8
|
+
metadata: {
|
|
9
|
+
category: 'utilities_tools',
|
|
10
|
+
name: 'Generated App',
|
|
11
|
+
slug: 'generated-app',
|
|
12
|
+
themeId: 'default',
|
|
13
|
+
version: '1.2.3',
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
|
|
6
17
|
const PLAN: ExpoRuntimePlan = {
|
|
7
18
|
capabilities: [],
|
|
8
19
|
dependencies: [{ name: 'expo-camera', version: '~57.0.6', reasons: [] }],
|
|
@@ -21,17 +32,25 @@ const PLAN: ExpoRuntimePlan = {
|
|
|
21
32
|
};
|
|
22
33
|
|
|
23
34
|
test('emits deterministic portable package, Expo config, and Runtime shell sources', () => {
|
|
24
|
-
const result = resolveExpoRuntimeGeneratedAppScaffold(PLAN);
|
|
35
|
+
const result = resolveExpoRuntimeGeneratedAppScaffold(MANIFEST, PLAN);
|
|
25
36
|
|
|
26
|
-
expect(result).toEqual(resolveExpoRuntimeGeneratedAppScaffold(PLAN));
|
|
37
|
+
expect(result).toEqual(resolveExpoRuntimeGeneratedAppScaffold(MANIFEST, PLAN));
|
|
27
38
|
expect(result.files).toEqual([
|
|
28
|
-
{
|
|
29
|
-
relativePath: 'package.json',
|
|
30
|
-
source: '{\n "dependencies": {\n "expo-camera": "~57.0.6"\n }\n}\n',
|
|
31
|
-
},
|
|
39
|
+
expect.objectContaining({ relativePath: 'package.json' }),
|
|
32
40
|
expect.objectContaining({ relativePath: 'app.config.ts' }),
|
|
33
41
|
expect.objectContaining({ relativePath: 'src/generated/runtimeShell.tsx' }),
|
|
34
42
|
]);
|
|
43
|
+
expect(result.files[0]?.source).toContain('"main": "expo-router/entry"');
|
|
44
|
+
expect(result.files[0]?.source).toContain(`"expo": "${EXPO_PLATFORM.runtime.expo.version}"`);
|
|
45
|
+
expect(result.files[0]?.source).toContain(
|
|
46
|
+
`"expo-router": "${EXPO_PLATFORM.navigation.expoRouter.version}"`,
|
|
47
|
+
);
|
|
48
|
+
expect(result.files[0]?.source).toContain(
|
|
49
|
+
`"react-native": "${EXPO_PLATFORM.runtime.reactNative.version}"`,
|
|
50
|
+
);
|
|
51
|
+
expect(result.files[0]?.source).toContain('"@ankhorage/expo-runtime": "^7.3.0"');
|
|
35
52
|
expect(result.files[1]?.source).toContain('"expo-camera"');
|
|
53
|
+
expect(result.files[1]?.source).toContain('name: "Generated App"');
|
|
54
|
+
expect(result.files[1]?.source).toContain('slug: "generated-app"');
|
|
36
55
|
expect(result.files[2]?.source).toContain('providers={["permissions"]}');
|
|
37
56
|
});
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { AppManifest } from '@ankhorage/contracts';
|
|
2
|
+
|
|
1
3
|
import { resolveExpoRuntimeGeneratedAppOutput } from './generatedAppOutput';
|
|
4
|
+
import { EXPO_PLATFORM } from './platform';
|
|
2
5
|
import type { ExpoRuntimePlan } from './resolveExpoRuntimePlan';
|
|
3
6
|
|
|
4
7
|
export interface ExpoRuntimeGeneratedAppScaffoldFile {
|
|
@@ -12,6 +15,7 @@ export interface ExpoRuntimeGeneratedAppScaffold {
|
|
|
12
15
|
|
|
13
16
|
/*** Emit the Runtime-owned files needed to finish a generated Expo application without writing to disk. */
|
|
14
17
|
export function resolveExpoRuntimeGeneratedAppScaffold(
|
|
18
|
+
manifest: Pick<AppManifest, 'metadata'>,
|
|
15
19
|
runtimePlan: ExpoRuntimePlan | undefined,
|
|
16
20
|
): ExpoRuntimeGeneratedAppScaffold {
|
|
17
21
|
const output = resolveExpoRuntimeGeneratedAppOutput(runtimePlan);
|
|
@@ -20,11 +24,11 @@ export function resolveExpoRuntimeGeneratedAppScaffold(
|
|
|
20
24
|
files: [
|
|
21
25
|
{
|
|
22
26
|
relativePath: 'package.json',
|
|
23
|
-
source:
|
|
27
|
+
source: createPackageSource(manifest, output.dependencies),
|
|
24
28
|
},
|
|
25
29
|
{
|
|
26
30
|
relativePath: 'app.config.ts',
|
|
27
|
-
source: createExpoConfigSource(output.native),
|
|
31
|
+
source: createExpoConfigSource(manifest, output.native),
|
|
28
32
|
},
|
|
29
33
|
{
|
|
30
34
|
relativePath: 'src/generated/runtimeShell.tsx',
|
|
@@ -34,12 +38,47 @@ export function resolveExpoRuntimeGeneratedAppScaffold(
|
|
|
34
38
|
};
|
|
35
39
|
}
|
|
36
40
|
|
|
41
|
+
/*** Render the independently installable Expo Router package boundary for one generated application. */
|
|
42
|
+
function createPackageSource(
|
|
43
|
+
manifest: Pick<AppManifest, 'metadata'>,
|
|
44
|
+
dependencies: Readonly<Record<string, string>>,
|
|
45
|
+
): string {
|
|
46
|
+
return `${JSON.stringify(
|
|
47
|
+
{
|
|
48
|
+
name: manifest.metadata.slug,
|
|
49
|
+
version: manifest.metadata.version,
|
|
50
|
+
private: true,
|
|
51
|
+
type: 'module',
|
|
52
|
+
main: 'expo-router/entry',
|
|
53
|
+
dependencies: {
|
|
54
|
+
...dependencies,
|
|
55
|
+
'@ankhorage/expo-runtime': '^7.3.0',
|
|
56
|
+
'@expo/metro-runtime': EXPO_PLATFORM.packages.metroRuntime.version,
|
|
57
|
+
expo: EXPO_PLATFORM.runtime.expo.version,
|
|
58
|
+
'expo-router': EXPO_PLATFORM.navigation.expoRouter.version,
|
|
59
|
+
react: EXPO_PLATFORM.runtime.react.version,
|
|
60
|
+
'react-dom': EXPO_PLATFORM.runtime.reactDom.version,
|
|
61
|
+
'react-native': EXPO_PLATFORM.runtime.reactNative.version,
|
|
62
|
+
'react-native-safe-area-context': EXPO_PLATFORM.navigation.safeArea.version,
|
|
63
|
+
'react-native-screens': EXPO_PLATFORM.navigation.screens.version,
|
|
64
|
+
'react-native-web': EXPO_PLATFORM.runtime.reactNativeWeb.version,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
null,
|
|
68
|
+
2,
|
|
69
|
+
)}\n`;
|
|
70
|
+
}
|
|
71
|
+
|
|
37
72
|
/*** Render the native Expo configuration fragment from Runtime's resolved plugin and permission plan. */
|
|
38
73
|
function createExpoConfigSource(
|
|
74
|
+
manifest: Pick<AppManifest, 'metadata'>,
|
|
39
75
|
native: ReturnType<typeof resolveExpoRuntimeGeneratedAppOutput>['native'],
|
|
40
76
|
): string {
|
|
41
77
|
return `export default {
|
|
42
78
|
expo: {
|
|
79
|
+
name: ${JSON.stringify(manifest.metadata.name)},
|
|
80
|
+
slug: ${JSON.stringify(manifest.metadata.slug)},
|
|
81
|
+
scheme: ${JSON.stringify(manifest.metadata.slug)},
|
|
43
82
|
android: ${JSON.stringify({ permissions: native.androidPermissions }, null, 4)},
|
|
44
83
|
plugins: ${JSON.stringify(native.configPlugins, null, 4)},
|
|
45
84
|
},
|