@ankhorage/expo-runtime 7.4.1 → 7.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/generatedApp.d.ts +4 -0
- package/dist/generatedApp.d.ts.map +1 -0
- package/dist/generatedApp.js +303 -0
- package/dist/generatedApp.js.map +1 -0
- package/package.json +21 -21
- package/src/adapterEntrypoints.test.ts +2 -2
- package/src/generatedApp.test.ts +11 -0
- package/src/generatedApp.ts +13 -0
- package/src/iconFonts.test.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ankhorage/expo-runtime
|
|
2
2
|
|
|
3
|
+
## 7.4.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b92473a: Publish NodeNext-compatible declarations for the generated app APIs.
|
|
8
|
+
|
|
9
|
+
## 7.4.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- c62677b: Make the published generated-app subpath Node ESM importable.
|
|
14
|
+
|
|
3
15
|
## 7.4.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
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,4 @@
|
|
|
1
|
+
/*** Expose the complete public generated-app planning surface from one Node ESM-safe entrypoint. */
|
|
2
|
+
export { type ExpoRuntimeGeneratedAppScaffold, type ExpoRuntimeGeneratedAppScaffoldFile, resolveExpoRuntimeGeneratedAppScaffold, } from './generatedAppScaffold';
|
|
3
|
+
export { type ExpoRuntimeGeneratedAppSourceDiagnostic, type ExpoRuntimeGeneratedAppSourceFile, type ExpoRuntimeGeneratedAppSources, resolveExpoRuntimeGeneratedAppSources, type ResolveExpoRuntimeGeneratedAppSourcesOptions, } from './generatedAppSources';
|
|
4
|
+
//# sourceMappingURL=generatedApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generatedApp.d.ts","sourceRoot":"","sources":["../src/generatedApp.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,OAAO,EACL,KAAK,+BAA+B,EACpC,KAAK,mCAAmC,EACxC,sCAAsC,GACvC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,uCAAuC,EAC5C,KAAK,iCAAiC,EACtC,KAAK,8BAA8B,EACnC,qCAAqC,EACrC,KAAK,4CAA4C,GAClD,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
// src/layoutIntegrationPlanning.ts
|
|
2
|
+
function resolveExpoRuntimeLayoutIntegration(runtimePlan) {
|
|
3
|
+
const imports = [];
|
|
4
|
+
const expoRuntimeImports = [];
|
|
5
|
+
const moduleDeclarations = [];
|
|
6
|
+
const providerStart = [];
|
|
7
|
+
const providerEnd = [];
|
|
8
|
+
if ((runtimePlan?.providers.length ?? 0) > 0) {
|
|
9
|
+
expoRuntimeImports.push("ExpoRuntimeProviders");
|
|
10
|
+
providerStart.push(`<ExpoRuntimeProviders providers={['${(runtimePlan?.providers ?? []).join("', '")}']}>`);
|
|
11
|
+
providerEnd.push("</ExpoRuntimeProviders>");
|
|
12
|
+
}
|
|
13
|
+
if (expoRuntimeImports.length > 0) {
|
|
14
|
+
imports.push(`import { ${Array.from(new Set(expoRuntimeImports)).join(", ")} } from '@ankhorage/expo-runtime/providers';`);
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
imports,
|
|
18
|
+
moduleDeclarations,
|
|
19
|
+
providerStart,
|
|
20
|
+
providerEnd
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// src/generatedAppOutput.ts
|
|
25
|
+
function resolveExpoRuntimeDependencyMap(runtimePlan) {
|
|
26
|
+
return Object.fromEntries((runtimePlan?.dependencies ?? []).map((dependency) => [dependency.name, dependency.version]));
|
|
27
|
+
}
|
|
28
|
+
function resolveExpoRuntimeConfigPluginOutput(runtimePlan) {
|
|
29
|
+
return (runtimePlan?.nativeConfig.plugins ?? []).map((plugin) => plugin.options === undefined ? plugin.name : [plugin.name, plugin.options]);
|
|
30
|
+
}
|
|
31
|
+
function resolveExpoRuntimeNativeOutput(runtimePlan) {
|
|
32
|
+
return {
|
|
33
|
+
androidPermissions: runtimePlan?.nativeConfig.androidPermissions ?? [],
|
|
34
|
+
configPlugins: resolveExpoRuntimeConfigPluginOutput(runtimePlan)
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function resolveExpoRuntimeGeneratedAppOutput(runtimePlan) {
|
|
38
|
+
return {
|
|
39
|
+
dependencies: resolveExpoRuntimeDependencyMap(runtimePlan),
|
|
40
|
+
layoutIntegration: resolveExpoRuntimeLayoutIntegration(runtimePlan),
|
|
41
|
+
native: resolveExpoRuntimeNativeOutput(runtimePlan)
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// src/platform.ts
|
|
46
|
+
function definePackage(name, version) {
|
|
47
|
+
return { name, version };
|
|
48
|
+
}
|
|
49
|
+
var EXPO_PLATFORM = {
|
|
50
|
+
sdk: 57,
|
|
51
|
+
architecture: "new-architecture-only",
|
|
52
|
+
runtime: {
|
|
53
|
+
expo: definePackage("expo", "57.0.34"),
|
|
54
|
+
react: definePackage("react", "19.2.3"),
|
|
55
|
+
reactDom: definePackage("react-dom", "19.2.3"),
|
|
56
|
+
reactNative: definePackage("react-native", "0.86.3"),
|
|
57
|
+
reactNativeWeb: definePackage("react-native-web", "~0.21.3")
|
|
58
|
+
},
|
|
59
|
+
tooling: {
|
|
60
|
+
node: {
|
|
61
|
+
lts: 24,
|
|
62
|
+
version: "24.x"
|
|
63
|
+
},
|
|
64
|
+
nodeTypes: definePackage("@types/node", "^24.13.3"),
|
|
65
|
+
reactTypes: definePackage("@types/react", "~19.2.4"),
|
|
66
|
+
typescript: definePackage("typescript", "~6.0.3"),
|
|
67
|
+
expoDoctor: definePackage("expo-doctor", "1.20.4")
|
|
68
|
+
},
|
|
69
|
+
navigation: {
|
|
70
|
+
expoRouter: definePackage("expo-router", "~57.0.32"),
|
|
71
|
+
screens: definePackage("react-native-screens", "~4.26.0"),
|
|
72
|
+
safeArea: definePackage("react-native-safe-area-context", "~5.7.0")
|
|
73
|
+
},
|
|
74
|
+
animation: {
|
|
75
|
+
reanimated: definePackage("react-native-reanimated", "4.5.1"),
|
|
76
|
+
worklets: definePackage("react-native-worklets", "0.10.1"),
|
|
77
|
+
gestureHandler: definePackage("react-native-gesture-handler", "~2.32.0")
|
|
78
|
+
},
|
|
79
|
+
ui: {
|
|
80
|
+
svg: definePackage("react-native-svg", "15.15.4"),
|
|
81
|
+
iconProviders: {
|
|
82
|
+
Ionicons: definePackage("@react-native-vector-icons/ionicons", "^13.1.4"),
|
|
83
|
+
FontAwesome: definePackage("@react-native-vector-icons/fontawesome", "^13.1.4"),
|
|
84
|
+
FontAwesome5: definePackage("@react-native-vector-icons/fontawesome5", "^13.1.4"),
|
|
85
|
+
FontAwesome6: definePackage("@react-native-vector-icons/fontawesome6", "^13.1.4"),
|
|
86
|
+
MaterialDesignIcons: definePackage("@react-native-vector-icons/material-design-icons", "^13.1.4")
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
packages: {
|
|
90
|
+
metroRuntime: definePackage("@expo/metro-runtime", "~57.0.19"),
|
|
91
|
+
asset: definePackage("expo-asset", "~57.0.22"),
|
|
92
|
+
audio: definePackage("expo-audio", "~57.0.5"),
|
|
93
|
+
authSession: definePackage("expo-auth-session", "~57.0.17"),
|
|
94
|
+
camera: definePackage("expo-camera", "~57.0.6"),
|
|
95
|
+
constants: definePackage("expo-constants", "~57.0.25"),
|
|
96
|
+
crypto: definePackage("expo-crypto", "~57.0.4"),
|
|
97
|
+
devClient: definePackage("expo-dev-client", "~57.0.22"),
|
|
98
|
+
documentPicker: definePackage("expo-document-picker", "~57.0.3"),
|
|
99
|
+
fileSystem: definePackage("expo-file-system", "~57.0.7"),
|
|
100
|
+
font: definePackage("expo-font", "~57.0.4"),
|
|
101
|
+
imagePicker: definePackage("expo-image-picker", "~57.0.22"),
|
|
102
|
+
linearGradient: definePackage("expo-linear-gradient", "~57.0.2"),
|
|
103
|
+
linking: definePackage("expo-linking", "~57.0.14"),
|
|
104
|
+
localization: definePackage("expo-localization", "~57.0.2"),
|
|
105
|
+
location: definePackage("expo-location", "~57.0.24"),
|
|
106
|
+
mediaLibrary: definePackage("expo-media-library", "~57.0.6"),
|
|
107
|
+
notifications: definePackage("expo-notifications", "~57.0.26"),
|
|
108
|
+
secureStore: definePackage("expo-secure-store", "~57.0.4"),
|
|
109
|
+
splashScreen: definePackage("expo-splash-screen", "~57.0.12"),
|
|
110
|
+
statusBar: definePackage("expo-status-bar", "~57.0.1"),
|
|
111
|
+
updates: definePackage("expo-updates", "~57.0.29"),
|
|
112
|
+
webBrowser: definePackage("expo-web-browser", "~57.0.3")
|
|
113
|
+
},
|
|
114
|
+
platforms: {
|
|
115
|
+
android: {
|
|
116
|
+
minimumVersion: 7,
|
|
117
|
+
minimumApiLevel: 24,
|
|
118
|
+
compileSdk: 36,
|
|
119
|
+
targetSdk: 36,
|
|
120
|
+
edgeToEdge: true
|
|
121
|
+
},
|
|
122
|
+
ios: {
|
|
123
|
+
minimumVersion: "16.4",
|
|
124
|
+
minimumXcodeVersion: "26.4"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// src/generatedAppScaffold.ts
|
|
130
|
+
function resolveExpoRuntimeGeneratedAppScaffold(manifest, runtimePlan) {
|
|
131
|
+
const output = resolveExpoRuntimeGeneratedAppOutput(runtimePlan);
|
|
132
|
+
return {
|
|
133
|
+
files: [
|
|
134
|
+
{
|
|
135
|
+
relativePath: "package.json",
|
|
136
|
+
source: createPackageSource(manifest, output.dependencies)
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
relativePath: "app.config.ts",
|
|
140
|
+
source: createExpoConfigSource(manifest, output.native)
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
relativePath: "src/generated/runtimeShell.tsx",
|
|
144
|
+
source: createRuntimeShellSource(runtimePlan?.providers ?? [])
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function createPackageSource(manifest, dependencies) {
|
|
150
|
+
return `${JSON.stringify({
|
|
151
|
+
name: manifest.metadata.slug,
|
|
152
|
+
version: manifest.metadata.version,
|
|
153
|
+
private: true,
|
|
154
|
+
type: "module",
|
|
155
|
+
main: "expo-router/entry",
|
|
156
|
+
dependencies: {
|
|
157
|
+
...dependencies,
|
|
158
|
+
"@ankhorage/expo-runtime": "^7.3.0",
|
|
159
|
+
"@expo/metro-runtime": EXPO_PLATFORM.packages.metroRuntime.version,
|
|
160
|
+
expo: EXPO_PLATFORM.runtime.expo.version,
|
|
161
|
+
"expo-router": EXPO_PLATFORM.navigation.expoRouter.version,
|
|
162
|
+
react: EXPO_PLATFORM.runtime.react.version,
|
|
163
|
+
"react-dom": EXPO_PLATFORM.runtime.reactDom.version,
|
|
164
|
+
"react-native": EXPO_PLATFORM.runtime.reactNative.version,
|
|
165
|
+
"react-native-safe-area-context": EXPO_PLATFORM.navigation.safeArea.version,
|
|
166
|
+
"react-native-screens": EXPO_PLATFORM.navigation.screens.version,
|
|
167
|
+
"react-native-web": EXPO_PLATFORM.runtime.reactNativeWeb.version
|
|
168
|
+
}
|
|
169
|
+
}, null, 2)}
|
|
170
|
+
`;
|
|
171
|
+
}
|
|
172
|
+
function createExpoConfigSource(manifest, native) {
|
|
173
|
+
return `export default {
|
|
174
|
+
expo: {
|
|
175
|
+
name: ${JSON.stringify(manifest.metadata.name)},
|
|
176
|
+
slug: ${JSON.stringify(manifest.metadata.slug)},
|
|
177
|
+
scheme: ${JSON.stringify(manifest.metadata.slug)},
|
|
178
|
+
android: ${JSON.stringify({ permissions: native.androidPermissions }, null, 4)},
|
|
179
|
+
plugins: ${JSON.stringify(native.configPlugins, null, 4)},
|
|
180
|
+
},
|
|
181
|
+
} as const;
|
|
182
|
+
`;
|
|
183
|
+
}
|
|
184
|
+
function createRuntimeShellSource(providers) {
|
|
185
|
+
return `import type { ReactNode } from 'react';
|
|
186
|
+
import { ExpoRuntimeProviders } from '@ankhorage/expo-runtime/providers';
|
|
187
|
+
|
|
188
|
+
export function GeneratedRuntimeShell({ children }: { readonly children: ReactNode }) {
|
|
189
|
+
return <ExpoRuntimeProviders providers={${JSON.stringify(providers)}}>{children}</ExpoRuntimeProviders>;
|
|
190
|
+
}
|
|
191
|
+
`;
|
|
192
|
+
}
|
|
193
|
+
// src/generatedAppSources.ts
|
|
194
|
+
function resolveExpoRuntimeGeneratedAppSources(manifest, runtimePlan, options) {
|
|
195
|
+
const output = resolveExpoRuntimeGeneratedAppOutput(runtimePlan);
|
|
196
|
+
const diagnostics = collectDiagnostics(manifest, options);
|
|
197
|
+
const screenIds = collectNavigatorScreenIds(manifest.navigator);
|
|
198
|
+
const navigatorBindings = createNavigatorBindings(screenIds, options.screenModuleSpecifier);
|
|
199
|
+
return {
|
|
200
|
+
...output,
|
|
201
|
+
diagnostics,
|
|
202
|
+
files: diagnostics.length === 0 ? [
|
|
203
|
+
{
|
|
204
|
+
relativePath: "src/generated/runtimeManifestScreens.tsx",
|
|
205
|
+
source: createRuntimeManifestScreensSource(manifest, options.manifestModuleSpecifier)
|
|
206
|
+
}
|
|
207
|
+
] : [],
|
|
208
|
+
navigatorBindings: diagnostics.length === 0 ? navigatorBindings : { guards: {}, screens: {} }
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
function collectNavigatorScreenIds(navigator) {
|
|
212
|
+
return Array.from(collectNavigatorScreenIdSet(navigator)).sort();
|
|
213
|
+
}
|
|
214
|
+
function collectNavigatorScreenIdSet(navigator) {
|
|
215
|
+
const screenIds = new Set;
|
|
216
|
+
for (const route of navigator.routes) {
|
|
217
|
+
if (route.screenId !== undefined)
|
|
218
|
+
screenIds.add(route.screenId);
|
|
219
|
+
if (route.navigator !== undefined) {
|
|
220
|
+
for (const screenId of collectNavigatorScreenIdSet(route.navigator))
|
|
221
|
+
screenIds.add(screenId);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
if (navigator.type === "split-view") {
|
|
225
|
+
screenIds.add(navigator.columns.primary.screenId);
|
|
226
|
+
if (navigator.columns.supplementary !== undefined) {
|
|
227
|
+
screenIds.add(navigator.columns.supplementary.screenId);
|
|
228
|
+
}
|
|
229
|
+
if (navigator.inspector !== undefined)
|
|
230
|
+
screenIds.add(navigator.inspector.screenId);
|
|
231
|
+
}
|
|
232
|
+
if (navigator.type === "tabs" && navigator.implementation === "native") {
|
|
233
|
+
if (navigator.bottomAccessory !== undefined)
|
|
234
|
+
screenIds.add(navigator.bottomAccessory.screenId);
|
|
235
|
+
}
|
|
236
|
+
return screenIds;
|
|
237
|
+
}
|
|
238
|
+
function collectDiagnostics(manifest, options) {
|
|
239
|
+
const invalidSpecifierDiagnostics = [
|
|
240
|
+
["manifestModuleSpecifier", options.manifestModuleSpecifier],
|
|
241
|
+
["screenModuleSpecifier", options.screenModuleSpecifier]
|
|
242
|
+
].flatMap(([name, value]) => isStaticModuleSpecifier(value) ? [] : [
|
|
243
|
+
{
|
|
244
|
+
code: "invalid-manifest-module-specifier",
|
|
245
|
+
severity: "error",
|
|
246
|
+
message: `${name} must be a non-empty static module specifier.`
|
|
247
|
+
}
|
|
248
|
+
]);
|
|
249
|
+
const missingScreenDiagnostics = collectNavigatorScreenIds(manifest.navigator).filter((screenId) => !Object.hasOwn(manifest.screens, screenId)).map((screenId) => ({
|
|
250
|
+
code: "missing-manifest-screen",
|
|
251
|
+
severity: "error",
|
|
252
|
+
screenId,
|
|
253
|
+
message: `Navigator references manifest screen '${screenId}', but no matching manifest screen exists.`
|
|
254
|
+
}));
|
|
255
|
+
return [...invalidSpecifierDiagnostics, ...missingScreenDiagnostics].sort((left, right) => `${left.code}\x00${left.screenId ?? ""}\x00${left.message}`.localeCompare(`${right.code}\x00${right.screenId ?? ""}\x00${right.message}`));
|
|
256
|
+
}
|
|
257
|
+
function isStaticModuleSpecifier(value) {
|
|
258
|
+
return value.trim().length > 0 && Array.from(value).every((character) => character.charCodeAt(0) >= 32 && !["'", '"', "`", "\\"].includes(character));
|
|
259
|
+
}
|
|
260
|
+
function createNavigatorBindings(screenIds, screenModuleSpecifier) {
|
|
261
|
+
return {
|
|
262
|
+
guards: {},
|
|
263
|
+
screens: Object.fromEntries(screenIds.map((screenId, index) => [
|
|
264
|
+
screenId,
|
|
265
|
+
{
|
|
266
|
+
module: screenModuleSpecifier,
|
|
267
|
+
exportName: getManifestScreenExportName(index)
|
|
268
|
+
}
|
|
269
|
+
]))
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
function getManifestScreenExportName(index) {
|
|
273
|
+
return `ManifestScreen${index}`;
|
|
274
|
+
}
|
|
275
|
+
function createRuntimeManifestScreensSource(manifest, manifestModuleSpecifier) {
|
|
276
|
+
const screenIds = collectNavigatorScreenIds(manifest.navigator);
|
|
277
|
+
const exports = screenIds.map((screenId, index) => `export const ${getManifestScreenExportName(index)} = createManifestScreen(${JSON.stringify(screenId)});`).join(`
|
|
278
|
+
`);
|
|
279
|
+
return `import type { AppManifest } from '@ankhorage/contracts';
|
|
280
|
+
import { RuntimeScreen } from '@ankhorage/runtime';
|
|
281
|
+
import { createZoraComponentRegistry } from '@ankhorage/zora';
|
|
282
|
+
import runtimeManifest from ${JSON.stringify(manifestModuleSpecifier)};
|
|
283
|
+
|
|
284
|
+
const manifest = runtimeManifest as AppManifest;
|
|
285
|
+
const registry = createZoraComponentRegistry();
|
|
286
|
+
|
|
287
|
+
function createManifestScreen(screenId: string) {
|
|
288
|
+
const screen = manifest.screens[screenId];
|
|
289
|
+
if (screen === undefined) {
|
|
290
|
+
throw new Error(\`Generated Runtime screen binding is missing manifest screen '\${screenId}'.\`);
|
|
291
|
+
}
|
|
292
|
+
return function ManifestScreen() {
|
|
293
|
+
return <RuntimeScreen manifest={manifest} registry={registry} screen={screen} />;
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
${exports}
|
|
298
|
+
`;
|
|
299
|
+
}
|
|
300
|
+
export {
|
|
301
|
+
resolveExpoRuntimeGeneratedAppScaffold,
|
|
302
|
+
resolveExpoRuntimeGeneratedAppSources
|
|
303
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generatedApp.js","sourceRoot":"","sources":["../src/generatedApp.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,OAAO,EAGL,sCAAsC,GACvC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAIL,qCAAqC,GAEtC,MAAM,uBAAuB,CAAC","sourcesContent":["/*** Expose the complete public generated-app planning surface from one Node ESM-safe entrypoint. */\nexport {\n type ExpoRuntimeGeneratedAppScaffold,\n type ExpoRuntimeGeneratedAppScaffoldFile,\n resolveExpoRuntimeGeneratedAppScaffold,\n} from './generatedAppScaffold';\nexport {\n type ExpoRuntimeGeneratedAppSourceDiagnostic,\n type ExpoRuntimeGeneratedAppSourceFile,\n type ExpoRuntimeGeneratedAppSources,\n resolveExpoRuntimeGeneratedAppSources,\n type ResolveExpoRuntimeGeneratedAppSourcesOptions,\n} from './generatedAppSources';\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.3",
|
|
5
5
|
"description": "Declarative runtime integration for Expo apps: maps app capabilities to permissions, packages, config plugins, providers, and adapters",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/expo-runtime#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"main": "./dist/index.js",
|
|
15
15
|
"sideEffects": false,
|
|
16
|
-
"types": "./
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "git+https://github.com/ankhorage/expo-runtime.git"
|
|
@@ -42,98 +42,98 @@
|
|
|
42
42
|
".": {
|
|
43
43
|
"react-native": "./src/index.ts",
|
|
44
44
|
"browser": "./src/index.ts",
|
|
45
|
-
"types": "./
|
|
45
|
+
"types": "./dist/index.d.ts",
|
|
46
46
|
"import": "./dist/index.js",
|
|
47
47
|
"default": "./dist/index.js"
|
|
48
48
|
},
|
|
49
49
|
"./capabilities": {
|
|
50
50
|
"react-native": "./src/capabilities/index.ts",
|
|
51
51
|
"browser": "./src/capabilities/index.ts",
|
|
52
|
-
"types": "./
|
|
52
|
+
"types": "./dist/capabilities/index.d.ts",
|
|
53
53
|
"import": "./dist/capabilities/index.js",
|
|
54
54
|
"default": "./dist/capabilities/index.js"
|
|
55
55
|
},
|
|
56
56
|
"./capability-bridge": {
|
|
57
57
|
"react-native": "./src/capabilityBridge.ts",
|
|
58
58
|
"browser": "./src/capabilityBridge.ts",
|
|
59
|
-
"types": "./
|
|
59
|
+
"types": "./dist/capabilityBridge.d.ts",
|
|
60
60
|
"import": "./dist/capabilityBridge.js",
|
|
61
61
|
"default": "./dist/capabilityBridge.js"
|
|
62
62
|
},
|
|
63
63
|
"./planning": {
|
|
64
64
|
"react-native": "./src/planning.ts",
|
|
65
65
|
"browser": "./src/planning.ts",
|
|
66
|
-
"types": "./
|
|
66
|
+
"types": "./dist/planning.d.ts",
|
|
67
67
|
"import": "./dist/planning.js",
|
|
68
68
|
"default": "./dist/planning.js"
|
|
69
69
|
},
|
|
70
70
|
"./route-delivery": {
|
|
71
71
|
"react-native": "./src/routeDelivery.ts",
|
|
72
72
|
"browser": "./src/routeDelivery.ts",
|
|
73
|
-
"types": "./
|
|
73
|
+
"types": "./dist/routeDelivery.d.ts",
|
|
74
74
|
"import": "./dist/routeDelivery.js",
|
|
75
75
|
"default": "./dist/routeDelivery.js"
|
|
76
76
|
},
|
|
77
77
|
"./generated-app": {
|
|
78
|
-
"react-native": "./src/
|
|
79
|
-
"browser": "./src/
|
|
80
|
-
"types": "./
|
|
81
|
-
"import": "./dist/
|
|
82
|
-
"default": "./dist/
|
|
78
|
+
"react-native": "./src/generatedApp.ts",
|
|
79
|
+
"browser": "./src/generatedApp.ts",
|
|
80
|
+
"types": "./dist/generatedApp.d.ts",
|
|
81
|
+
"import": "./dist/generatedApp.js",
|
|
82
|
+
"default": "./dist/generatedApp.js"
|
|
83
83
|
},
|
|
84
84
|
"./platform": {
|
|
85
85
|
"react-native": "./src/platform.ts",
|
|
86
86
|
"browser": "./src/platform.ts",
|
|
87
|
-
"types": "./
|
|
87
|
+
"types": "./dist/platform.d.ts",
|
|
88
88
|
"import": "./dist/platform.js",
|
|
89
89
|
"default": "./dist/platform.js"
|
|
90
90
|
},
|
|
91
91
|
"./icon-fonts": {
|
|
92
92
|
"browser": "./src/ExpoZoraIconFontProvider.web.tsx",
|
|
93
93
|
"react-native": "./src/ExpoZoraIconFontProvider.tsx",
|
|
94
|
-
"types": "./
|
|
94
|
+
"types": "./dist/ExpoZoraIconFontProvider.d.ts",
|
|
95
95
|
"import": "./dist/ExpoZoraIconFontProvider.js",
|
|
96
96
|
"default": "./dist/ExpoZoraIconFontProvider.js"
|
|
97
97
|
},
|
|
98
98
|
"./oauth-browser": {
|
|
99
99
|
"react-native": "./src/oauthBrowserTransport.ts",
|
|
100
100
|
"browser": "./src/oauthBrowserTransport.ts",
|
|
101
|
-
"types": "./
|
|
101
|
+
"types": "./dist/oauthBrowserTransport.d.ts",
|
|
102
102
|
"import": "./dist/oauthBrowserTransport.js",
|
|
103
103
|
"default": "./dist/oauthBrowserTransport.js"
|
|
104
104
|
},
|
|
105
105
|
"./oauth-browser-runtime": {
|
|
106
106
|
"react-native": "./src/oauthBrowserRuntime.ts",
|
|
107
107
|
"browser": "./src/oauthBrowserRuntime.ts",
|
|
108
|
-
"types": "./
|
|
108
|
+
"types": "./dist/oauthBrowserRuntime.d.ts",
|
|
109
109
|
"import": "./dist/oauthBrowserRuntime.js",
|
|
110
110
|
"default": "./dist/oauthBrowserRuntime.js"
|
|
111
111
|
},
|
|
112
112
|
"./media-picker": {
|
|
113
113
|
"react-native": "./src/mediaPicker/index.ts",
|
|
114
114
|
"browser": "./src/mediaPicker/index.ts",
|
|
115
|
-
"types": "./
|
|
115
|
+
"types": "./dist/mediaPicker/index.d.ts",
|
|
116
116
|
"import": "./dist/mediaPicker/index.js",
|
|
117
117
|
"default": "./dist/mediaPicker/index.js"
|
|
118
118
|
},
|
|
119
119
|
"./bundled-media": {
|
|
120
120
|
"react-native": "./src/bundledMedia/index.ts",
|
|
121
121
|
"browser": "./src/bundledMedia/index.ts",
|
|
122
|
-
"types": "./
|
|
122
|
+
"types": "./dist/bundledMedia/index.d.ts",
|
|
123
123
|
"import": "./dist/bundledMedia/index.js",
|
|
124
124
|
"default": "./dist/bundledMedia/index.js"
|
|
125
125
|
},
|
|
126
126
|
"./providers": {
|
|
127
127
|
"react-native": "./src/ExpoRuntimeProviders.tsx",
|
|
128
128
|
"browser": "./src/ExpoRuntimeProviders.tsx",
|
|
129
|
-
"types": "./
|
|
129
|
+
"types": "./dist/ExpoRuntimeProviders.d.ts",
|
|
130
130
|
"import": "./dist/ExpoRuntimeProviders.js",
|
|
131
131
|
"default": "./dist/ExpoRuntimeProviders.js"
|
|
132
132
|
},
|
|
133
133
|
"./barcode-scanner": {
|
|
134
134
|
"react-native": "./src/barcodeScanner.ts",
|
|
135
135
|
"browser": "./src/barcodeScanner.ts",
|
|
136
|
-
"types": "./
|
|
136
|
+
"types": "./dist/barcodeScanner.d.ts",
|
|
137
137
|
"import": "./dist/barcodeScanner.js",
|
|
138
138
|
"default": "./dist/barcodeScanner.js"
|
|
139
139
|
}
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
]
|
|
178
178
|
},
|
|
179
179
|
"scripts": {
|
|
180
|
-
"build": "rm -rf dist tsconfig.tsbuildinfo && bun x tsc -p tsconfig.json",
|
|
180
|
+
"build": "rm -rf dist tsconfig.tsbuildinfo && bun x tsc -p tsconfig.json && bun build src/generatedApp.ts --outdir dist --target node --format esm --external '@ankhorage/*' --silent >&2",
|
|
181
181
|
"changeset": "ankhorage-changeset",
|
|
182
182
|
"changeset:status": "ankhorage-changeset status --since=origin/main",
|
|
183
183
|
"docs": "paradox",
|
|
@@ -15,12 +15,12 @@ describe('capability-scoped adapter entrypoints', () => {
|
|
|
15
15
|
expect(packageJson.exports['./providers']).toMatchObject({
|
|
16
16
|
import: './dist/ExpoRuntimeProviders.js',
|
|
17
17
|
'react-native': './src/ExpoRuntimeProviders.tsx',
|
|
18
|
-
types: './
|
|
18
|
+
types: './dist/ExpoRuntimeProviders.d.ts',
|
|
19
19
|
});
|
|
20
20
|
expect(packageJson.exports['./barcode-scanner']).toMatchObject({
|
|
21
21
|
import: './dist/barcodeScanner.js',
|
|
22
22
|
'react-native': './src/barcodeScanner.ts',
|
|
23
|
-
types: './
|
|
23
|
+
types: './dist/barcodeScanner.d.ts',
|
|
24
24
|
});
|
|
25
25
|
expect(packageJson.exports).not.toHaveProperty('./reader');
|
|
26
26
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { expect, test } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
resolveExpoRuntimeGeneratedAppScaffold,
|
|
5
|
+
resolveExpoRuntimeGeneratedAppSources,
|
|
6
|
+
} from './generatedApp';
|
|
7
|
+
|
|
8
|
+
test('keeps the generated-app subpath facade focused on both published generated-app APIs', () => {
|
|
9
|
+
expect(resolveExpoRuntimeGeneratedAppScaffold).toBeFunction();
|
|
10
|
+
expect(resolveExpoRuntimeGeneratedAppSources).toBeFunction();
|
|
11
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*** Expose the complete public generated-app planning surface from one Node ESM-safe entrypoint. */
|
|
2
|
+
export {
|
|
3
|
+
type ExpoRuntimeGeneratedAppScaffold,
|
|
4
|
+
type ExpoRuntimeGeneratedAppScaffoldFile,
|
|
5
|
+
resolveExpoRuntimeGeneratedAppScaffold,
|
|
6
|
+
} from './generatedAppScaffold';
|
|
7
|
+
export {
|
|
8
|
+
type ExpoRuntimeGeneratedAppSourceDiagnostic,
|
|
9
|
+
type ExpoRuntimeGeneratedAppSourceFile,
|
|
10
|
+
type ExpoRuntimeGeneratedAppSources,
|
|
11
|
+
resolveExpoRuntimeGeneratedAppSources,
|
|
12
|
+
type ResolveExpoRuntimeGeneratedAppSourcesOptions,
|
|
13
|
+
} from './generatedAppSources';
|
package/src/iconFonts.test.ts
CHANGED
|
@@ -20,7 +20,7 @@ test('exports the icon font boundary through its focused subpath', async () => {
|
|
|
20
20
|
expect(iconFontExport).toEqual({
|
|
21
21
|
browser: './src/ExpoZoraIconFontProvider.web.tsx',
|
|
22
22
|
'react-native': './src/ExpoZoraIconFontProvider.tsx',
|
|
23
|
-
types: './
|
|
23
|
+
types: './dist/ExpoZoraIconFontProvider.d.ts',
|
|
24
24
|
import: './dist/ExpoZoraIconFontProvider.js',
|
|
25
25
|
default: './dist/ExpoZoraIconFontProvider.js',
|
|
26
26
|
});
|