@expo/cli 0.14.0 → 0.16.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/build/bin/cli +13 -5
- package/build/bin/cli.map +1 -1
- package/build/src/api/getVersions.js.map +1 -1
- package/build/src/api/rest/cache/response.js.map +1 -1
- package/build/src/api/rest/client.js +2 -2
- package/build/src/api/rest/client.js.map +1 -1
- package/build/src/api/user/actions.js +1 -1
- package/build/src/api/user/actions.js.map +1 -1
- package/build/src/customize/typescript.js +3 -1
- package/build/src/customize/typescript.js.map +1 -1
- package/build/src/export/createMetadataJson.js +5 -3
- package/build/src/export/createMetadataJson.js.map +1 -1
- package/build/src/export/embed/exportEmbedAsync.js +92 -18
- package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
- package/build/src/export/embed/resolveOptions.js +3 -3
- package/build/src/export/embed/resolveOptions.js.map +1 -1
- package/build/src/export/embed/xcodeCompilerLogger.js +97 -0
- package/build/src/export/embed/xcodeCompilerLogger.js.map +1 -0
- package/build/src/export/exportApp.js +106 -130
- package/build/src/export/exportApp.js.map +1 -1
- package/build/src/export/exportAssets.js +93 -38
- package/build/src/export/exportAssets.js.map +1 -1
- package/build/src/export/exportAsync.js +1 -1
- package/build/src/export/exportAsync.js.map +1 -1
- package/build/src/export/exportHermes.js +0 -90
- package/build/src/export/exportHermes.js.map +1 -1
- package/build/src/export/exportStaticAsync.js +165 -101
- package/build/src/export/exportStaticAsync.js.map +1 -1
- package/build/src/export/favicon.js +13 -5
- package/build/src/export/favicon.js.map +1 -1
- package/build/src/export/fork-bundleAsync.js +84 -57
- package/build/src/export/fork-bundleAsync.js.map +1 -1
- package/build/src/export/index.js +9 -7
- package/build/src/export/index.js.map +1 -1
- package/build/src/export/metroAssetLocalPath.js +101 -0
- package/build/src/export/metroAssetLocalPath.js.map +1 -0
- package/build/src/export/persistMetroAssets.js +115 -31
- package/build/src/export/persistMetroAssets.js.map +1 -1
- package/build/src/export/publicFolder.js +7 -0
- package/build/src/export/publicFolder.js.map +1 -1
- package/build/src/export/resolveOptions.js +1 -1
- package/build/src/export/resolveOptions.js.map +1 -1
- package/build/src/export/saveAssets.js +168 -43
- package/build/src/export/saveAssets.js.map +1 -1
- package/build/src/export/web/exportWebAsync.js +1 -1
- package/build/src/export/web/exportWebAsync.js.map +1 -1
- package/build/src/export/writeContents.js +8 -106
- package/build/src/export/writeContents.js.map +1 -1
- package/build/src/install/applyPlugins.js +52 -0
- package/build/src/install/applyPlugins.js.map +1 -0
- package/build/src/install/checkPackages.js +2 -2
- package/build/src/install/checkPackages.js.map +1 -1
- package/build/src/install/fixPackages.js +84 -0
- package/build/src/install/fixPackages.js.map +1 -0
- package/build/src/install/installAsync.js +50 -60
- package/build/src/install/installAsync.js.map +1 -1
- package/build/src/install/installExpoPackage.js +79 -0
- package/build/src/install/installExpoPackage.js.map +1 -0
- package/build/src/prebuild/clearNativeFolder.js +1 -1
- package/build/src/prebuild/clearNativeFolder.js.map +1 -1
- package/build/src/prebuild/configureProjectAsync.js +3 -3
- package/build/src/prebuild/configureProjectAsync.js.map +1 -1
- package/build/src/prebuild/copyTemplateFiles.js +21 -30
- package/build/src/prebuild/copyTemplateFiles.js.map +1 -1
- package/build/src/prebuild/prebuildAsync.js +45 -16
- package/build/src/prebuild/prebuildAsync.js.map +1 -1
- package/build/src/prebuild/resolveOptions.js +2 -2
- package/build/src/prebuild/resolveOptions.js.map +1 -1
- package/build/src/prebuild/updateFromTemplate.js +6 -6
- package/build/src/prebuild/updateFromTemplate.js.map +1 -1
- package/build/src/prebuild/updatePackageJson.js +49 -36
- package/build/src/prebuild/updatePackageJson.js.map +1 -1
- package/build/src/prebuild/validateTemplatePlatforms.js +2 -2
- package/build/src/prebuild/validateTemplatePlatforms.js.map +1 -1
- package/build/src/run/hints.js +4 -0
- package/build/src/run/hints.js.map +1 -1
- package/build/src/run/index.js +101 -0
- package/build/src/run/index.js.map +1 -0
- package/build/src/start/doctor/dependencies/bundledNativeModules.js +2 -2
- package/build/src/start/doctor/dependencies/bundledNativeModules.js.map +1 -1
- package/build/src/start/doctor/dependencies/getVersionedPackages.js +22 -7
- package/build/src/start/doctor/dependencies/getVersionedPackages.js.map +1 -1
- package/build/src/start/doctor/dependencies/resolvePackages.js +66 -0
- package/build/src/start/doctor/dependencies/resolvePackages.js.map +1 -0
- package/build/src/start/doctor/dependencies/validateDependenciesVersions.js +22 -33
- package/build/src/start/doctor/dependencies/validateDependenciesVersions.js.map +1 -1
- package/build/src/start/interface/interactiveActions.js +54 -19
- package/build/src/start/interface/interactiveActions.js.map +1 -1
- package/build/src/start/server/BundlerDevServer.js +14 -10
- package/build/src/start/server/BundlerDevServer.js.map +1 -1
- package/build/src/start/server/DevServerManager.js +6 -1
- package/build/src/start/server/DevServerManager.js.map +1 -1
- package/build/src/start/server/DevToolsPluginManager.js +63 -0
- package/build/src/start/server/DevToolsPluginManager.js.map +1 -0
- package/build/src/start/server/getStaticRenderFunctions.js +25 -23
- package/build/src/start/server/getStaticRenderFunctions.js.map +1 -1
- package/build/src/start/server/metro/MetroBundlerDevServer.js +76 -69
- package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
- package/build/src/start/server/metro/MetroTerminalReporter.js +6 -2
- package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
- package/build/src/start/server/metro/TerminalReporter.js +18 -1
- package/build/src/start/server/metro/TerminalReporter.js.map +1 -1
- package/build/src/start/server/metro/bundleApiRoutes.js +5 -3
- package/build/src/start/server/metro/bundleApiRoutes.js.map +1 -1
- package/build/src/start/server/metro/createExpoMetroResolver.js +80 -46
- package/build/src/start/server/metro/createExpoMetroResolver.js.map +1 -1
- package/build/src/start/server/metro/createJResolver.js +152 -0
- package/build/src/start/server/metro/createJResolver.js.map +1 -0
- package/build/src/start/server/metro/createServerRouteMiddleware.js +15 -2
- package/build/src/start/server/metro/createServerRouteMiddleware.js.map +1 -1
- package/build/src/start/server/metro/{inspector-proxy/device.js → debugging/InspectorDevice.js} +10 -38
- package/build/src/start/server/metro/debugging/InspectorDevice.js.map +1 -0
- package/build/src/start/server/metro/debugging/InspectorProxy.js +116 -0
- package/build/src/start/server/metro/debugging/InspectorProxy.js.map +1 -0
- package/build/src/start/server/metro/debugging/createDebugMiddleware.js +45 -0
- package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -0
- package/build/src/start/server/metro/{inspector-proxy/handlers → debugging/inspectorHandlers}/NetworkResponse.js +3 -4
- package/build/src/start/server/metro/debugging/inspectorHandlers/NetworkResponse.js.map +1 -0
- package/build/src/start/server/metro/debugging/inspectorHandlers/PageReload.js.map +1 -0
- package/build/src/start/server/metro/{inspector-proxy/handlers → debugging/inspectorHandlers}/VscodeDebuggerGetPossibleBreakpoints.js +5 -6
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeDebuggerGetPossibleBreakpoints.js.map +1 -0
- package/build/src/start/server/metro/{inspector-proxy/handlers → debugging/inspectorHandlers}/VscodeDebuggerScriptParsed.js +3 -2
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeDebuggerScriptParsed.js.map +1 -0
- package/build/src/start/server/metro/{inspector-proxy/handlers → debugging/inspectorHandlers}/VscodeDebuggerSetBreakpointByUrl.js +3 -2
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeDebuggerSetBreakpointByUrl.js.map +1 -0
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeRuntimeCallFunctionOn.js +24 -0
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeRuntimeCallFunctionOn.js.map +1 -0
- package/build/src/start/server/metro/{inspector-proxy/handlers → debugging/inspectorHandlers}/VscodeRuntimeGetProperties.js +5 -4
- package/build/src/start/server/metro/debugging/inspectorHandlers/VscodeRuntimeGetProperties.js.map +1 -0
- package/build/src/start/server/metro/debugging/inspectorHandlers/types.js.map +1 -0
- package/build/src/start/server/metro/debugging/inspectorHandlers/utils.js +20 -0
- package/build/src/start/server/metro/debugging/inspectorHandlers/utils.js.map +1 -0
- package/build/src/start/server/metro/externals.js +25 -3
- package/build/src/start/server/metro/externals.js.map +1 -1
- package/build/src/start/server/metro/getCssModulesFromBundler.js.map +1 -1
- package/build/src/start/server/metro/instantiateMetro.js +40 -15
- package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
- package/build/src/start/server/metro/metroErrorInterface.js +3 -2
- package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
- package/build/src/start/server/metro/router.js +5 -6
- package/build/src/start/server/metro/router.js.map +1 -1
- package/build/src/start/server/metro/runServer-fork.js +17 -27
- package/build/src/start/server/metro/runServer-fork.js.map +1 -1
- package/build/src/start/server/metro/serializeHtml.js +59 -0
- package/build/src/start/server/metro/serializeHtml.js.map +1 -0
- package/build/src/start/server/metro/waitForMetroToObserveTypeScriptFile.js +1 -2
- package/build/src/start/server/metro/waitForMetroToObserveTypeScriptFile.js.map +1 -1
- package/build/src/start/server/metro/withMetroMultiPlatform.js +237 -214
- package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
- package/build/src/start/server/metro/withMetroResolvers.js +114 -40
- package/build/src/start/server/metro/withMetroResolvers.js.map +1 -1
- package/build/src/start/server/middleware/DevToolsPluginMiddleware.js +61 -0
- package/build/src/start/server/middleware/DevToolsPluginMiddleware.js.map +1 -0
- package/build/src/start/server/middleware/ExpoMiddleware.js +2 -2
- package/build/src/start/server/middleware/ExpoMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ManifestMiddleware.js +22 -66
- package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/inspector/JsInspector.js +23 -2
- package/build/src/start/server/middleware/inspector/JsInspector.js.map +1 -1
- package/build/src/start/server/middleware/inspector/LaunchBrowser.js +30 -26
- package/build/src/start/server/middleware/inspector/LaunchBrowser.js.map +1 -1
- package/build/src/start/server/middleware/inspector/LaunchBrowser.types.js +7 -7
- package/build/src/start/server/middleware/inspector/LaunchBrowser.types.js.map +1 -1
- package/build/src/start/server/middleware/inspector/LaunchBrowserImplLinux.js +5 -2
- package/build/src/start/server/middleware/inspector/LaunchBrowserImplLinux.js.map +1 -1
- package/build/src/start/server/middleware/inspector/LaunchBrowserImplMacOS.js +3 -2
- package/build/src/start/server/middleware/inspector/LaunchBrowserImplMacOS.js.map +1 -1
- package/build/src/start/server/middleware/inspector/LaunchBrowserImplWindows.js +8 -7
- package/build/src/start/server/middleware/inspector/LaunchBrowserImplWindows.js.map +1 -1
- package/build/src/start/server/middleware/metroOptions.js +176 -0
- package/build/src/start/server/middleware/metroOptions.js.map +1 -0
- package/build/src/start/server/type-generation/__typetests__/fixtures/basic.js.map +1 -1
- package/build/src/start/server/type-generation/__typetests__/route.test.js +11 -3
- package/build/src/start/server/type-generation/__typetests__/route.test.js.map +1 -1
- package/build/src/start/server/type-generation/routes.js +6 -4
- package/build/src/start/server/type-generation/routes.js.map +1 -1
- package/build/src/start/server/type-generation/startTypescriptTypeGeneration.js +1 -1
- package/build/src/start/server/type-generation/startTypescriptTypeGeneration.js.map +1 -1
- package/build/src/utils/analytics/getMetroDebugProperties.js +1 -2
- package/build/src/utils/analytics/getMetroDebugProperties.js.map +1 -1
- package/build/src/utils/analytics/getMetroProperties.js +1 -2
- package/build/src/utils/analytics/getMetroProperties.js.map +1 -1
- package/build/src/utils/analytics/rudderstackClient.js +2 -2
- package/build/src/utils/args.js +4 -2
- package/build/src/utils/args.js.map +1 -1
- package/build/src/utils/cocoapods.js +1 -1
- package/build/src/utils/cocoapods.js.map +1 -1
- package/build/src/utils/codesigning.js +11 -1
- package/build/src/utils/codesigning.js.map +1 -1
- package/build/src/utils/dir.js +18 -8
- package/build/src/utils/dir.js.map +1 -1
- package/build/src/utils/env.js +10 -1
- package/build/src/utils/env.js.map +1 -1
- package/build/src/utils/getOrPromptApplicationId.js +2 -4
- package/build/src/utils/getOrPromptApplicationId.js.map +1 -1
- package/build/src/utils/prompts.js +1 -28
- package/build/src/utils/prompts.js.map +1 -1
- package/build/src/utils/tsconfig/loadTsConfigPaths.js +3 -11
- package/build/src/utils/tsconfig/loadTsConfigPaths.js.map +1 -1
- package/build/src/utils/tsconfig/resolveWithTsConfigPaths.js +22 -12
- package/build/src/utils/tsconfig/resolveWithTsConfigPaths.js.map +1 -1
- package/package.json +19 -18
- package/static/shims/react-native-web/dist/cjs/exports/AppRegistry/AppContainer.js +13 -0
- package/static/shims/react-native-web/dist/exports/AppRegistry/AppContainer.js +12 -0
- package/static/template/index.html +14 -95
- package/build/src/export/printBundleSizes.js +0 -101
- package/build/src/export/printBundleSizes.js.map +0 -1
- package/build/src/start/server/metro/inspector-proxy/device.js.map +0 -1
- package/build/src/start/server/metro/inspector-proxy/handlers/NetworkResponse.js.map +0 -1
- package/build/src/start/server/metro/inspector-proxy/handlers/PageReload.js.map +0 -1
- package/build/src/start/server/metro/inspector-proxy/handlers/VscodeDebuggerGetPossibleBreakpoints.js.map +0 -1
- package/build/src/start/server/metro/inspector-proxy/handlers/VscodeDebuggerScriptParsed.js.map +0 -1
- package/build/src/start/server/metro/inspector-proxy/handlers/VscodeDebuggerSetBreakpointByUrl.js.map +0 -1
- package/build/src/start/server/metro/inspector-proxy/handlers/VscodeRuntimeGetProperties.js.map +0 -1
- package/build/src/start/server/metro/inspector-proxy/handlers/types.js.map +0 -1
- package/build/src/start/server/metro/inspector-proxy/index.js +0 -27
- package/build/src/start/server/metro/inspector-proxy/index.js.map +0 -1
- package/build/src/start/server/metro/inspector-proxy/proxy.js +0 -169
- package/build/src/start/server/metro/inspector-proxy/proxy.js.map +0 -1
- package/build/src/start/server/metro/resolveFromProject.js +0 -90
- package/build/src/start/server/metro/resolveFromProject.js.map +0 -1
- package/build/src/start/server/middleware/inspector/createJsInspectorMiddleware.js +0 -64
- package/build/src/start/server/middleware/inspector/createJsInspectorMiddleware.js.map +0 -1
- /package/build/src/start/server/metro/{inspector-proxy/handlers → debugging/inspectorHandlers}/PageReload.js +0 -0
- /package/build/src/start/server/metro/{inspector-proxy/handlers → debugging/inspectorHandlers}/types.js +0 -0
package/build/bin/cli
CHANGED
|
@@ -40,6 +40,11 @@ const defaultCmd = "start";
|
|
|
40
40
|
const commands = {
|
|
41
41
|
// Add a new command here
|
|
42
42
|
// NOTE(EvanBacon): Ensure every bundler-related command sets `NODE_ENV` as expected for the command.
|
|
43
|
+
run: ()=>Promise.resolve().then(function() {
|
|
44
|
+
return _interopRequireWildcard(require("../src/run/index.js"));
|
|
45
|
+
}).then((i)=>i.expoRun
|
|
46
|
+
)
|
|
47
|
+
,
|
|
43
48
|
"run:ios": ()=>Promise.resolve().then(function() {
|
|
44
49
|
return _interopRequireWildcard(require("../src/run/ios/index.js"));
|
|
45
50
|
}).then((i)=>i.expoRunIos
|
|
@@ -132,7 +137,7 @@ const args = (0, _arg).default({
|
|
|
132
137
|
});
|
|
133
138
|
if (args["--version"]) {
|
|
134
139
|
// Version is added in the build script.
|
|
135
|
-
console.log("0.
|
|
140
|
+
console.log("0.16.0");
|
|
136
141
|
process.exit(0);
|
|
137
142
|
}
|
|
138
143
|
if (args["--non-interactive"]) {
|
|
@@ -145,7 +150,9 @@ if (!isSubcommand && args["--help"]) {
|
|
|
145
150
|
const { login , logout , whoami , register , start , install , add , export: _export , config , customize , prebuild , "run:ios": runIos , "run:android": runAndroid , // NOTE(EvanBacon): Don't document this command as it's a temporary
|
|
146
151
|
// workaround until we can use `expo export` for all production bundling.
|
|
147
152
|
// https://github.com/expo/expo/pull/21396/files#r1121025873
|
|
148
|
-
"export:embed": exportEmbed_unused ,
|
|
153
|
+
"export:embed": exportEmbed_unused , // Other ignored commands, these are intentially not listed in the `--help` output
|
|
154
|
+
run: _run , // All other commands
|
|
155
|
+
...others } = commands;
|
|
149
156
|
console.log(_chalk.default`
|
|
150
157
|
{bold Usage}
|
|
151
158
|
{dim $} npx expo <command>
|
|
@@ -195,7 +202,7 @@ if (!isSubcommand) {
|
|
|
195
202
|
"client:install:ios": "npx expo start --ios",
|
|
196
203
|
"client:install:android": "npx expo start --android",
|
|
197
204
|
doctor: "npx expo-doctor",
|
|
198
|
-
upgrade: "expo-
|
|
205
|
+
upgrade: "https://docs.expo.dev/workflow/upgrading-expo-sdk-walkthrough/",
|
|
199
206
|
"customize:web": "npx expo customize",
|
|
200
207
|
publish: "eas update",
|
|
201
208
|
"publish:set": "eas update",
|
|
@@ -227,7 +234,8 @@ if (!isSubcommand) {
|
|
|
227
234
|
if (subcommand in migrationMap) {
|
|
228
235
|
const replacement = migrationMap[subcommand];
|
|
229
236
|
console.log();
|
|
230
|
-
|
|
237
|
+
const instruction = subcommand === "upgrade" ? "follow this guide" : "use";
|
|
238
|
+
console.log(_chalk.default.yellow` {gray $} {bold expo ${subcommand}} is not supported in the local CLI, please ${instruction} {bold ${replacement}} instead`);
|
|
231
239
|
console.log();
|
|
232
240
|
process.exit(1);
|
|
233
241
|
}
|
|
@@ -263,7 +271,7 @@ commands[command]().then((exec)=>{
|
|
|
263
271
|
logEventAsync("action", {
|
|
264
272
|
action: `expo ${command}`,
|
|
265
273
|
source: "expo/cli",
|
|
266
|
-
source_version: "0.
|
|
274
|
+
source_version: "0.16.0"
|
|
267
275
|
});
|
|
268
276
|
}
|
|
269
277
|
});
|
package/build/bin/cli.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../bin/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport arg from 'arg';\nimport chalk from 'chalk';\nimport Debug from 'debug';\nimport { boolish } from 'getenv';\n\n// Setup before requiring `debug`.\nif (boolish('EXPO_DEBUG', false)) {\n Debug.enable('expo:*');\n} else if (Debug.enabled('expo:')) {\n process.env.EXPO_DEBUG = '1';\n}\n\nconst defaultCmd = 'start';\n\nexport type Command = (argv?: string[]) => void;\n\nconst commands: { [command: string]: () => Promise<Command> } = {\n // Add a new command here\n // NOTE(EvanBacon): Ensure every bundler-related command sets `NODE_ENV` as expected for the command.\n 'run:ios': () => import('../src/run/ios/index.js').then((i) => i.expoRunIos),\n 'run:android': () => import('../src/run/android/index.js').then((i) => i.expoRunAndroid),\n start: () => import('../src/start/index.js').then((i) => i.expoStart),\n prebuild: () => import('../src/prebuild/index.js').then((i) => i.expoPrebuild),\n config: () => import('../src/config/index.js').then((i) => i.expoConfig),\n export: () => import('../src/export/index.js').then((i) => i.expoExport),\n 'export:web': () => import('../src/export/web/index.js').then((i) => i.expoExportWeb),\n 'export:embed': () => import('../src/export/embed/index.js').then((i) => i.expoExportEmbed),\n\n // Auxiliary commands\n install: () => import('../src/install/index.js').then((i) => i.expoInstall),\n add: () => import('../src/install/index.js').then((i) => i.expoInstall),\n customize: () => import('../src/customize/index.js').then((i) => i.expoCustomize),\n\n // Auth\n login: () => import('../src/login/index.js').then((i) => i.expoLogin),\n logout: () => import('../src/logout/index.js').then((i) => i.expoLogout),\n register: () => import('../src/register/index.js').then((i) => i.expoRegister),\n whoami: () => import('../src/whoami/index.js').then((i) => i.expoWhoami),\n};\n\nconst args = arg(\n {\n // Types\n '--version': Boolean,\n '--help': Boolean,\n // NOTE(EvanBacon): This is here to silence warnings from processes that\n // expect the global expo-cli.\n '--non-interactive': Boolean,\n\n // Aliases\n '-v': '--version',\n '-h': '--help',\n },\n {\n permissive: true,\n }\n);\n\nif (args['--version']) {\n // Version is added in the build script.\n console.log(process.env.__EXPO_VERSION);\n process.exit(0);\n}\n\nif (args['--non-interactive']) {\n console.warn(chalk.yellow` {bold --non-interactive} is not supported, use {bold $CI=1} instead`);\n}\n\n// Check if we are running `npx expo <subcommand>` or `npx expo`\nconst isSubcommand = Boolean(commands[args._[0]]);\n\n// Handle `--help` flag\nif (!isSubcommand && args['--help']) {\n const {\n login,\n logout,\n whoami,\n register,\n start,\n install,\n add,\n export: _export,\n config,\n customize,\n prebuild,\n 'run:ios': runIos,\n 'run:android': runAndroid,\n // NOTE(EvanBacon): Don't document this command as it's a temporary\n // workaround until we can use `expo export` for all production bundling.\n // https://github.com/expo/expo/pull/21396/files#r1121025873\n 'export:embed': exportEmbed_unused,\n ...others\n } = commands;\n\n console.log(chalk`\n {bold Usage}\n {dim $} npx expo <command>\n\n {bold Commands}\n ${Object.keys({ start, export: _export, ...others }).join(', ')}\n ${Object.keys({ 'run:ios': runIos, 'run:android': runAndroid, prebuild }).join(', ')}\n ${Object.keys({ install, customize, config }).join(', ')}\n {dim ${Object.keys({ login, logout, whoami, register }).join(', ')}}\n\n {bold Options}\n --version, -v Version number\n --help, -h Usage info\n\n For more info run a command with the {bold --help} flag\n {dim $} npx expo start --help\n`);\n\n process.exit(0);\n}\n\n// NOTE(EvanBacon): Squat some directory names to help with migration,\n// users can still use folders named \"send\" or \"eject\" by using the fully qualified `npx expo start ./send`.\nif (!isSubcommand) {\n const migrationMap: Record<string, string> = {\n init: 'npx create-expo-app',\n eject: 'npx expo prebuild',\n web: 'npx expo start --web',\n 'start:web': 'npx expo start --web',\n 'build:ios': 'eas build -p ios',\n 'build:android': 'eas build -p android',\n 'client:install:ios': 'npx expo start --ios',\n 'client:install:android': 'npx expo start --android',\n doctor: 'npx expo-doctor',\n upgrade: 'expo-cli upgrade',\n 'customize:web': 'npx expo customize',\n\n publish: 'eas update',\n 'publish:set': 'eas update',\n 'publish:rollback': 'eas update',\n 'publish:history': 'eas update',\n 'publish:details': 'eas update',\n\n 'build:web': 'npx expo export:web',\n\n 'credentials:manager': `eas credentials`,\n 'fetch:ios:certs': `eas credentials`,\n 'fetch:android:keystore': `eas credentials`,\n 'fetch:android:hashes': `eas credentials`,\n 'fetch:android:upload-cert': `eas credentials`,\n 'push:android:upload': `eas credentials`,\n 'push:android:show': `eas credentials`,\n 'push:android:clear': `eas credentials`,\n url: `eas build:list`,\n 'url:ipa': `eas build:list`,\n 'url:apk': `eas build:list`,\n webhooks: `eas webhook`,\n 'webhooks:add': `eas webhook:create`,\n 'webhooks:remove': `eas webhook:delete`,\n 'webhooks:update': `eas webhook:update`,\n\n 'build:status': `eas build:list`,\n 'upload:android': `eas submit -p android`,\n 'upload:ios': `eas submit -p ios`,\n };\n\n // TODO: Log telemetry about invalid command used.\n const subcommand = args._[0];\n if (subcommand in migrationMap) {\n const replacement = migrationMap[subcommand];\n console.log();\n console.log(\n chalk.yellow` {gray $} {bold expo ${subcommand}} is not supported in the local CLI, please use {bold ${replacement}} instead`\n );\n console.log();\n process.exit(1);\n }\n const deprecated = ['send', 'client:ios'];\n if (deprecated.includes(subcommand)) {\n console.log();\n console.log(chalk.yellow` {gray $} {bold expo ${subcommand}} is deprecated`);\n console.log();\n process.exit(1);\n }\n}\n\nconst command = isSubcommand ? args._[0] : defaultCmd;\nconst commandArgs = isSubcommand ? args._.slice(1) : args._;\n\n// Push the help flag to the subcommand args.\nif (args['--help']) {\n commandArgs.push('--help');\n}\n\n// Install exit hooks\nprocess.on('SIGINT', () => process.exit(0));\nprocess.on('SIGTERM', () => process.exit(0));\n\ncommands[command]().then((exec) => {\n exec(commandArgs);\n\n if (!boolish('EXPO_NO_TELEMETRY', false)) {\n // NOTE(EvanBacon): Track some basic telemetry events indicating the command\n // that was run. This can be disabled with the $EXPO_NO_TELEMETRY environment variable.\n // We do this to determine how well deprecations are going before removing a command.\n const { logEventAsync } =\n require('../src/utils/analytics/rudderstackClient') as typeof import('../src/utils/analytics/rudderstackClient');\n logEventAsync('action', {\n action: `expo ${command}`,\n source: 'expo/cli',\n source_version: process.env.__EXPO_VERSION,\n });\n }\n});\n"],"names":["boolish","Debug","enable","enabled","process","env","EXPO_DEBUG","defaultCmd","commands","then","i","expoRunIos","expoRunAndroid","start","expoStart","prebuild","expoPrebuild","config","expoConfig","export","expoExport","expoExportWeb","expoExportEmbed","install","expoInstall","add","customize","expoCustomize","login","expoLogin","logout","expoLogout","register","expoRegister","whoami","expoWhoami","args","arg","Boolean","permissive","console","log","__EXPO_VERSION","exit","warn","chalk","yellow","isSubcommand","_","_export","runIos","runAndroid","exportEmbed_unused","others","Object","keys","join","migrationMap","init","eject","web","doctor","upgrade","publish","url","webhooks","subcommand","replacement","deprecated","includes","command","commandArgs","slice","push","on","exec","logEventAsync","require","action","source","source_version"],"mappings":"AA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0C,CAAC,AAA6D,AAAC;QACnHD,aAAa,CAAC,QAAQ,EAAE;YACtBE,MAAM,EAAE,CAAC,KAAK,EAAER,OAAO,CAAC,CAAC;YACzBS,MAAM,EAAE,UAAU;YAClBC,cAAc,EAAE5E,OAAO,CAACC,GAAG,CAACqC,cAAc;SAC3C,CAAC,CAAC;KACJ;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"sources":["../../bin/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport arg from 'arg';\nimport chalk from 'chalk';\nimport Debug from 'debug';\nimport { boolish } from 'getenv';\n\n// Setup before requiring `debug`.\nif (boolish('EXPO_DEBUG', false)) {\n Debug.enable('expo:*');\n} else if (Debug.enabled('expo:')) {\n process.env.EXPO_DEBUG = '1';\n}\n\nconst defaultCmd = 'start';\n\nexport type Command = (argv?: string[]) => void;\n\nconst commands: { [command: string]: () => Promise<Command> } = {\n // Add a new command here\n // NOTE(EvanBacon): Ensure every bundler-related command sets `NODE_ENV` as expected for the command.\n run: () => import('../src/run/index.js').then((i) => i.expoRun),\n 'run:ios': () => import('../src/run/ios/index.js').then((i) => i.expoRunIos),\n 'run:android': () => import('../src/run/android/index.js').then((i) => i.expoRunAndroid),\n start: () => import('../src/start/index.js').then((i) => i.expoStart),\n prebuild: () => import('../src/prebuild/index.js').then((i) => i.expoPrebuild),\n config: () => import('../src/config/index.js').then((i) => i.expoConfig),\n export: () => import('../src/export/index.js').then((i) => i.expoExport),\n 'export:web': () => import('../src/export/web/index.js').then((i) => i.expoExportWeb),\n 'export:embed': () => import('../src/export/embed/index.js').then((i) => i.expoExportEmbed),\n\n // Auxiliary commands\n install: () => import('../src/install/index.js').then((i) => i.expoInstall),\n add: () => import('../src/install/index.js').then((i) => i.expoInstall),\n customize: () => import('../src/customize/index.js').then((i) => i.expoCustomize),\n\n // Auth\n login: () => import('../src/login/index.js').then((i) => i.expoLogin),\n logout: () => import('../src/logout/index.js').then((i) => i.expoLogout),\n register: () => import('../src/register/index.js').then((i) => i.expoRegister),\n whoami: () => import('../src/whoami/index.js').then((i) => i.expoWhoami),\n};\n\nconst args = arg(\n {\n // Types\n '--version': Boolean,\n '--help': Boolean,\n // NOTE(EvanBacon): This is here to silence warnings from processes that\n // expect the global expo-cli.\n '--non-interactive': Boolean,\n\n // Aliases\n '-v': '--version',\n '-h': '--help',\n },\n {\n permissive: true,\n }\n);\n\nif (args['--version']) {\n // Version is added in the build script.\n console.log(process.env.__EXPO_VERSION);\n process.exit(0);\n}\n\nif (args['--non-interactive']) {\n console.warn(chalk.yellow` {bold --non-interactive} is not supported, use {bold $CI=1} instead`);\n}\n\n// Check if we are running `npx expo <subcommand>` or `npx expo`\nconst isSubcommand = Boolean(commands[args._[0]]);\n\n// Handle `--help` flag\nif (!isSubcommand && args['--help']) {\n const {\n login,\n logout,\n whoami,\n register,\n start,\n install,\n add,\n export: _export,\n config,\n customize,\n prebuild,\n 'run:ios': runIos,\n 'run:android': runAndroid,\n // NOTE(EvanBacon): Don't document this command as it's a temporary\n // workaround until we can use `expo export` for all production bundling.\n // https://github.com/expo/expo/pull/21396/files#r1121025873\n 'export:embed': exportEmbed_unused,\n // Other ignored commands, these are intentially not listed in the `--help` output\n run: _run,\n // All other commands\n ...others\n } = commands;\n\n console.log(chalk`\n {bold Usage}\n {dim $} npx expo <command>\n\n {bold Commands}\n ${Object.keys({ start, export: _export, ...others }).join(', ')}\n ${Object.keys({ 'run:ios': runIos, 'run:android': runAndroid, prebuild }).join(', ')}\n ${Object.keys({ install, customize, config }).join(', ')}\n {dim ${Object.keys({ login, logout, whoami, register }).join(', ')}}\n\n {bold Options}\n --version, -v Version number\n --help, -h Usage info\n\n For more info run a command with the {bold --help} flag\n {dim $} npx expo start --help\n`);\n\n process.exit(0);\n}\n\n// NOTE(EvanBacon): Squat some directory names to help with migration,\n// users can still use folders named \"send\" or \"eject\" by using the fully qualified `npx expo start ./send`.\nif (!isSubcommand) {\n const migrationMap: Record<string, string> = {\n init: 'npx create-expo-app',\n eject: 'npx expo prebuild',\n web: 'npx expo start --web',\n 'start:web': 'npx expo start --web',\n 'build:ios': 'eas build -p ios',\n 'build:android': 'eas build -p android',\n 'client:install:ios': 'npx expo start --ios',\n 'client:install:android': 'npx expo start --android',\n doctor: 'npx expo-doctor',\n upgrade: 'https://docs.expo.dev/workflow/upgrading-expo-sdk-walkthrough/',\n 'customize:web': 'npx expo customize',\n\n publish: 'eas update',\n 'publish:set': 'eas update',\n 'publish:rollback': 'eas update',\n 'publish:history': 'eas update',\n 'publish:details': 'eas update',\n\n 'build:web': 'npx expo export:web',\n\n 'credentials:manager': `eas credentials`,\n 'fetch:ios:certs': `eas credentials`,\n 'fetch:android:keystore': `eas credentials`,\n 'fetch:android:hashes': `eas credentials`,\n 'fetch:android:upload-cert': `eas credentials`,\n 'push:android:upload': `eas credentials`,\n 'push:android:show': `eas credentials`,\n 'push:android:clear': `eas credentials`,\n url: `eas build:list`,\n 'url:ipa': `eas build:list`,\n 'url:apk': `eas build:list`,\n webhooks: `eas webhook`,\n 'webhooks:add': `eas webhook:create`,\n 'webhooks:remove': `eas webhook:delete`,\n 'webhooks:update': `eas webhook:update`,\n\n 'build:status': `eas build:list`,\n 'upload:android': `eas submit -p android`,\n 'upload:ios': `eas submit -p ios`,\n };\n\n // TODO: Log telemetry about invalid command used.\n const subcommand = args._[0];\n if (subcommand in migrationMap) {\n const replacement = migrationMap[subcommand];\n console.log();\n const instruction = subcommand === 'upgrade' ? 'follow this guide' : 'use'\n console.log(\n chalk.yellow` {gray $} {bold expo ${subcommand}} is not supported in the local CLI, please ${instruction} {bold ${replacement}} instead`\n );\n console.log();\n process.exit(1);\n }\n const deprecated = ['send', 'client:ios'];\n if (deprecated.includes(subcommand)) {\n console.log();\n console.log(chalk.yellow` {gray $} {bold expo ${subcommand}} is deprecated`);\n console.log();\n process.exit(1);\n }\n}\n\nconst command = isSubcommand ? args._[0] : defaultCmd;\nconst commandArgs = isSubcommand ? args._.slice(1) : args._;\n\n// Push the help flag to the subcommand args.\nif (args['--help']) {\n commandArgs.push('--help');\n}\n\n// Install exit hooks\nprocess.on('SIGINT', () => process.exit(0));\nprocess.on('SIGTERM', () => process.exit(0));\n\ncommands[command]().then((exec) => {\n exec(commandArgs);\n\n if (!boolish('EXPO_NO_TELEMETRY', false)) {\n // NOTE(EvanBacon): Track some basic telemetry events indicating the command\n // that was run. This can be disabled with the $EXPO_NO_TELEMETRY environment variable.\n // We do this to determine how well deprecations are going before removing a command.\n const { logEventAsync } =\n require('../src/utils/analytics/rudderstackClient') as typeof import('../src/utils/analytics/rudderstackClient');\n logEventAsync('action', {\n action: `expo ${command}`,\n source: 'expo/cli',\n source_version: process.env.__EXPO_VERSION,\n });\n }\n});\n"],"names":["boolish","Debug","enable","enabled","process","env","EXPO_DEBUG","defaultCmd","commands","run","then","i","expoRun","expoRunIos","expoRunAndroid","start","expoStart","prebuild","expoPrebuild","config","expoConfig","export","expoExport","expoExportWeb","expoExportEmbed","install","expoInstall","add","customize","expoCustomize","login","expoLogin","logout","expoLogout","register","expoRegister","whoami","expoWhoami","args","arg","Boolean","permissive","console","log","__EXPO_VERSION","exit","warn","chalk","yellow","isSubcommand","_","_export","runIos","runAndroid","exportEmbed_unused","_run","others","Object","keys","join","migrationMap","init","eject","web","doctor","upgrade","publish","url","webhooks","subcommand","replacement","instruction","deprecated","includes","command","commandArgs","slice","push","on","exec","logEventAsync","require","action","source","source_version"],"mappings":"AAAA;;AACgB,IAAA,IAAK,kCAAL,KAAK,EAAA;AACH,IAAA,MAAO,kCAAP,OAAO,EAAA;AACP,IAAA,MAAO,kCAAP,OAAO,EAAA;AACD,IAAA,OAAQ,WAAR,QAAQ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhC,kCAAkC;AAClC,IAAIA,CAAAA,GAAAA,OAAO,AAAqB,CAAA,QAArB,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE;IAChCC,MAAK,QAAA,CAACC,MAAM,CAAC,QAAQ,CAAC,CAAC;CACxB,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AM,EAAE,CAAC,KAAK,EAAER,OAAO,CAAC,CAAC;YACzBS,MAAM,EAAE,UAAU;YAClBC,cAAc,EAAEhF,OAAO,CAACC,GAAG,CAACuC,cAAc;SAC3C,CAAC,CAAC;KACJ;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/api/getVersions.ts"],"sourcesContent":["import { createCachedFetch } from './rest/client';\nimport { CommandError } from '../utils/errors';\n\n/** Represents version info for a particular SDK. */\nexport type SDKVersion = {\n /** @example \"2.16.1\" */\n iosVersion?: string;\n /** @example \"https://dpq5q02fu5f55.cloudfront.net/Exponent-2.17.4.tar.gz\" */\n iosClientUrl?: string;\n /** @example \"https://dev.to/expo/expo-sdk-38-is-now-available-5aa0\" */\n releaseNoteUrl?: string;\n /** @example \"2.17.4\" */\n iosClientVersion?: string;\n /** @example \"https://d1ahtucjixef4r.cloudfront.net/Exponent-2.16.1.apk\" */\n androidClientUrl?: string;\n /** @example \"2.16.1\" */\n androidClientVersion?: string;\n /** @example { \"typescript\": \"~3.9.5\" } */\n relatedPackages?: Record<string, string>;\n\n facebookReactNativeVersion: string;\n\n facebookReactVersion?: string;\n\n beta?: boolean;\n};\n\nexport type SDKVersions = Record<string, SDKVersion>;\n\nexport type Versions = {\n androidUrl: string;\n androidVersion: string;\n iosUrl: string;\n iosVersion: string;\n sdkVersions: SDKVersions;\n};\n\n/** Get versions from remote endpoint. */\nexport async function getVersionsAsync({\n skipCache,\n}: { skipCache?: boolean } = {}): Promise<Versions> {\n // Reconstruct the cached fetch since caching could be disabled.\n const fetchAsync = createCachedFetch({\n skipCache,\n cacheDirectory: 'versions-cache',\n // We'll use a 5 minute cache to ensure we stay relatively up to date.\n ttl: 1000 * 60 * 5,\n });\n\n const results = await fetchAsync('versions/latest');\n if (!results.ok) {\n throw new CommandError(\n 'API',\n `Unexpected response when fetching version info from Expo servers: ${results.statusText}.`\n );\n }\n const json = await results.json();\n return json.data;\n}\n"],"names":["getVersionsAsync","skipCache","fetchAsync","createCachedFetch","cacheDirectory","ttl","results","ok","CommandError","statusText","json","data"],"mappings":"AAAA;;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/api/getVersions.ts"],"sourcesContent":["import { createCachedFetch } from './rest/client';\nimport { CommandError } from '../utils/errors';\n\n/** Represents version info for a particular SDK. */\nexport type SDKVersion = {\n /** @example \"2.16.1\" */\n iosVersion?: string;\n /** @example \"https://dpq5q02fu5f55.cloudfront.net/Exponent-2.17.4.tar.gz\" */\n iosClientUrl?: string;\n /** @example \"https://dev.to/expo/expo-sdk-38-is-now-available-5aa0\" */\n releaseNoteUrl?: string;\n /** @example \"2.17.4\" */\n iosClientVersion?: string;\n /** @example \"https://d1ahtucjixef4r.cloudfront.net/Exponent-2.16.1.apk\" */\n androidClientUrl?: string;\n /** @example \"2.16.1\" */\n androidClientVersion?: string;\n /** @example { \"typescript\": \"~3.9.5\" } */\n relatedPackages?: Record<string, string>;\n\n facebookReactNativeVersion: string;\n\n facebookReactVersion?: string;\n\n expoVersion?: string;\n\n beta?: boolean;\n};\n\nexport type SDKVersions = Record<string, SDKVersion>;\n\nexport type Versions = {\n androidUrl: string;\n androidVersion: string;\n iosUrl: string;\n iosVersion: string;\n sdkVersions: SDKVersions;\n};\n\n/** Get versions from remote endpoint. */\nexport async function getVersionsAsync({\n skipCache,\n}: { skipCache?: boolean } = {}): Promise<Versions> {\n // Reconstruct the cached fetch since caching could be disabled.\n const fetchAsync = createCachedFetch({\n skipCache,\n cacheDirectory: 'versions-cache',\n // We'll use a 5 minute cache to ensure we stay relatively up to date.\n ttl: 1000 * 60 * 5,\n });\n\n const results = await fetchAsync('versions/latest');\n if (!results.ok) {\n throw new CommandError(\n 'API',\n `Unexpected response when fetching version info from Expo servers: ${results.statusText}.`\n );\n }\n const json = await results.json();\n return json.data;\n}\n"],"names":["getVersionsAsync","skipCache","fetchAsync","createCachedFetch","cacheDirectory","ttl","results","ok","CommandError","statusText","json","data"],"mappings":"AAAA;;;;QAwCsBA,gBAAgB,GAAhBA,gBAAgB;AAxCJ,IAAA,OAAe,WAAf,eAAe,CAAA;AACpB,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;AAuCvC,eAAeA,gBAAgB,CAAC,EACrCC,SAAS,CAAA,EACe,GAAG,EAAE,EAAqB;IAClD,gEAAgE;IAChE,MAAMC,UAAU,GAAGC,CAAAA,GAAAA,OAAiB,AAKlC,CAAA,kBALkC,CAAC;QACnCF,SAAS;QACTG,cAAc,EAAE,gBAAgB;QAChC,sEAAsE;QACtEC,GAAG,EAAE,IAAI,GAAG,EAAE,GAAG,CAAC;KACnB,CAAC,AAAC;IAEH,MAAMC,OAAO,GAAG,MAAMJ,UAAU,CAAC,iBAAiB,CAAC,AAAC;IACpD,IAAI,CAACI,OAAO,CAACC,EAAE,EAAE;QACf,MAAM,IAAIC,OAAY,aAAA,CACpB,KAAK,EACL,CAAC,kEAAkE,EAAEF,OAAO,CAACG,UAAU,CAAC,CAAC,CAAC,CAC3F,CAAC;KACH;IACD,MAAMC,IAAI,GAAG,MAAMJ,OAAO,CAACI,IAAI,EAAE,AAAC;IAClC,OAAOA,IAAI,CAACC,IAAI,CAAC;CAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/api/rest/cache/response.ts"],"sourcesContent":["import { CacheObject } from 'cacache';\nimport { BodyInit, Response, ResponseInit } from 'node-fetch';\n\nconst responseInternalSymbol = Object.getOwnPropertySymbols(new Response())[1];\n\nexport class NFCResponse extends Response {\n constructor(\n bodyStream?: BodyInit,\n metaData?: ResponseInit,\n public ejectFromCache: () => Promise<[CacheObject, CacheObject]> = function ejectFromCache(\n this: any\n ) {\n return this.ejectSelfFromCache();\n },\n public fromCache: boolean = false\n ) {\n super(bodyStream, metaData);\n }\n\n static serializeMetaFromNodeFetchResponse(res: Response) {\n const metaData = {\n url: res.url,\n status: res.status,\n statusText: res.statusText,\n headers: res.headers.raw(),\n size: res.size,\n timeout: res.timeout,\n // @ts-ignore\n counter: res[responseInternalSymbol].counter,\n };\n\n return metaData;\n }\n}\n"],"names":["responseInternalSymbol","Object","getOwnPropertySymbols","Response","NFCResponse","constructor","bodyStream","metaData","ejectFromCache","ejectSelfFromCache","fromCache","serializeMetaFromNodeFetchResponse","res","url","status","statusText","headers","raw","size","timeout","counter"],"mappings":"AAAA;;;;AACiD,IAAA,UAAY,WAAZ,YAAY,CAAA;AAE7D,MAAMA,sBAAsB,GAAGC,MAAM,CAACC,qBAAqB,CAAC,IAAIC,UAAQ,SAAA,EAAE,CAAC,CAAC,CAAC,CAAC,AAAC;AAExE,MAAMC,WAAW,SAASD,UAAQ,SAAA;IACvCE,YACEC,UAAqB,EACrBC,QAAuB,EAChBC,cAAyD,GAAG,SAASA,cAAc,GAExF;QACA,OAAO,IAAI,CAACC,kBAAkB,EAAE,CAAC;KAClC,EACMC,SAAkB,GAAG,KAAK,CACjC;QACA,KAAK,CAACJ,UAAU,EAAEC,QAAQ,CAAC,CAAC;aAPrBC,cAAyD,GAAzDA,cAAyD;aAKzDE,SAAkB,GAAlBA,SAAkB;KAG1B;IAED,OAAOC,kCAAkC,CAACC,GAAa,EAAE;QACvD,MAAML,QAAQ,GAAG;YACfM,GAAG,EAAED,GAAG,CAACC,GAAG;YACZC,MAAM,EAAEF,GAAG,CAACE,MAAM;YAClBC,UAAU,EAAEH,GAAG,CAACG,UAAU;YAC1BC,OAAO,EAAEJ,GAAG,CAACI,OAAO,CAACC,GAAG,EAAE;YAC1BC,IAAI,EAAEN,GAAG,CAACM,IAAI;YACdC,OAAO,EAAEP,GAAG,CAACO,OAAO;YACpB,aAAa;YACbC,OAAO,EAAER,GAAG,CAACZ,sBAAsB,CAAC,CAACoB,OAAO;SAC7C,AAAC;QAEF,OAAOb,QAAQ,CAAC;KACjB;CACF;QA5BYH,WAAW,GAAXA,WAAW"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/api/rest/cache/response.ts"],"sourcesContent":["import type { CacheObject } from 'cacache';\nimport { BodyInit, Response, ResponseInit } from 'node-fetch';\n\nconst responseInternalSymbol = Object.getOwnPropertySymbols(new Response())[1];\n\nexport class NFCResponse extends Response {\n constructor(\n bodyStream?: BodyInit,\n metaData?: ResponseInit,\n public ejectFromCache: () => Promise<[CacheObject, CacheObject]> = function ejectFromCache(\n this: any\n ) {\n return this.ejectSelfFromCache();\n },\n public fromCache: boolean = false\n ) {\n super(bodyStream, metaData);\n }\n\n static serializeMetaFromNodeFetchResponse(res: Response) {\n const metaData = {\n url: res.url,\n status: res.status,\n statusText: res.statusText,\n headers: res.headers.raw(),\n size: res.size,\n timeout: res.timeout,\n // @ts-ignore\n counter: res[responseInternalSymbol].counter,\n };\n\n return metaData;\n }\n}\n"],"names":["responseInternalSymbol","Object","getOwnPropertySymbols","Response","NFCResponse","constructor","bodyStream","metaData","ejectFromCache","ejectSelfFromCache","fromCache","serializeMetaFromNodeFetchResponse","res","url","status","statusText","headers","raw","size","timeout","counter"],"mappings":"AAAA;;;;AACiD,IAAA,UAAY,WAAZ,YAAY,CAAA;AAE7D,MAAMA,sBAAsB,GAAGC,MAAM,CAACC,qBAAqB,CAAC,IAAIC,UAAQ,SAAA,EAAE,CAAC,CAAC,CAAC,CAAC,AAAC;AAExE,MAAMC,WAAW,SAASD,UAAQ,SAAA;IACvCE,YACEC,UAAqB,EACrBC,QAAuB,EAChBC,cAAyD,GAAG,SAASA,cAAc,GAExF;QACA,OAAO,IAAI,CAACC,kBAAkB,EAAE,CAAC;KAClC,EACMC,SAAkB,GAAG,KAAK,CACjC;QACA,KAAK,CAACJ,UAAU,EAAEC,QAAQ,CAAC,CAAC;aAPrBC,cAAyD,GAAzDA,cAAyD;aAKzDE,SAAkB,GAAlBA,SAAkB;KAG1B;IAED,OAAOC,kCAAkC,CAACC,GAAa,EAAE;QACvD,MAAML,QAAQ,GAAG;YACfM,GAAG,EAAED,GAAG,CAACC,GAAG;YACZC,MAAM,EAAEF,GAAG,CAACE,MAAM;YAClBC,UAAU,EAAEH,GAAG,CAACG,UAAU;YAC1BC,OAAO,EAAEJ,GAAG,CAACI,OAAO,CAACC,GAAG,EAAE;YAC1BC,IAAI,EAAEN,GAAG,CAACM,IAAI;YACdC,OAAO,EAAEP,GAAG,CAACO,OAAO;YACpB,aAAa;YACbC,OAAO,EAAER,GAAG,CAACZ,sBAAsB,CAAC,CAACoB,OAAO;SAC7C,AAAC;QAEF,OAAOb,QAAQ,CAAC;KACjB;CACF;QA5BYH,WAAW,GAAXA,WAAW"}
|
|
@@ -8,7 +8,6 @@ exports.fetchAsync = void 0;
|
|
|
8
8
|
var _getUserState = require("@expo/config/build/getUserState");
|
|
9
9
|
var _nodeFetch = _interopRequireDefault(require("node-fetch"));
|
|
10
10
|
var _path = _interopRequireDefault(require("path"));
|
|
11
|
-
var _fileSystemCache = require("./cache/FileSystemCache");
|
|
12
11
|
var _wrapFetchWithCache = require("./cache/wrapFetchWithCache");
|
|
13
12
|
var _wrapFetchWithBaseUrl = require("./wrapFetchWithBaseUrl");
|
|
14
13
|
var _wrapFetchWithOffline = require("./wrapFetchWithOffline");
|
|
@@ -98,7 +97,8 @@ function createCachedFetch({ fetch =fetchWithCredentials , cacheDirectory , ttl
|
|
|
98
97
|
if (skipCache || _env.env.EXPO_BETA || _env.env.EXPO_NO_CACHE) {
|
|
99
98
|
return fetch;
|
|
100
99
|
}
|
|
101
|
-
|
|
100
|
+
const { FileSystemCache } = require("./cache/FileSystemCache");
|
|
101
|
+
return (0, _wrapFetchWithCache).wrapFetchWithCache(fetch, new FileSystemCache({
|
|
102
102
|
cacheDirectory: _path.default.join((0, _getUserState).getExpoHomeDirectory(), cacheDirectory),
|
|
103
103
|
ttl
|
|
104
104
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/api/rest/client.ts"],"sourcesContent":["import { getExpoHomeDirectory } from '@expo/config/build/getUserState';\nimport { JSONValue } from '@expo/json-file';\nimport fetchInstance from 'node-fetch';\nimport path from 'path';\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/api/rest/client.ts"],"sourcesContent":["import { getExpoHomeDirectory } from '@expo/config/build/getUserState';\nimport { JSONValue } from '@expo/json-file';\nimport fetchInstance from 'node-fetch';\nimport path from 'path';\n\nimport { wrapFetchWithCache } from './cache/wrapFetchWithCache';\nimport { FetchLike } from './client.types';\nimport { wrapFetchWithBaseUrl } from './wrapFetchWithBaseUrl';\nimport { wrapFetchWithOffline } from './wrapFetchWithOffline';\nimport { wrapFetchWithProgress } from './wrapFetchWithProgress';\nimport { wrapFetchWithProxy } from './wrapFetchWithProxy';\nimport { env } from '../../utils/env';\nimport { CommandError } from '../../utils/errors';\nimport { getExpoApiBaseUrl } from '../endpoint';\nimport { disableNetwork } from '../settings';\nimport UserSettings from '../user/UserSettings';\n\nexport class ApiV2Error extends Error {\n readonly name = 'ApiV2Error';\n readonly code: string;\n readonly expoApiV2ErrorCode: string;\n readonly expoApiV2ErrorDetails?: JSONValue;\n readonly expoApiV2ErrorServerStack?: string;\n readonly expoApiV2ErrorMetadata?: object;\n\n constructor(response: {\n message: string;\n code: string;\n stack?: string;\n details?: JSONValue;\n metadata?: object;\n }) {\n super(response.message);\n this.code = response.code;\n this.expoApiV2ErrorCode = response.code;\n this.expoApiV2ErrorDetails = response.details;\n this.expoApiV2ErrorServerStack = response.stack;\n this.expoApiV2ErrorMetadata = response.metadata;\n }\n}\n\n/**\n * An Expo server error that didn't return the expected error JSON information.\n * The only 'expected' place for this is in testing, all other cases are bugs with the server.\n */\nexport class UnexpectedServerError extends Error {\n readonly name = 'UnexpectedServerError';\n}\n\n/**\n * @returns a `fetch` function that will inject user authentication information and handle errors from the Expo API.\n */\nexport function wrapFetchWithCredentials(fetchFunction: FetchLike): FetchLike {\n return async function fetchWithCredentials(url, options = {}) {\n if (Array.isArray(options.headers)) {\n throw new Error('request headers must be in object form');\n }\n\n const resolvedHeaders = options.headers ?? ({} as any);\n\n const token = UserSettings.getAccessToken();\n if (token) {\n resolvedHeaders.authorization = `Bearer ${token}`;\n } else {\n const sessionSecret = UserSettings.getSession()?.sessionSecret;\n if (sessionSecret) {\n resolvedHeaders['expo-session'] = sessionSecret;\n }\n }\n\n try {\n const results = await fetchFunction(url, {\n ...options,\n headers: resolvedHeaders,\n });\n\n if (results.status >= 400 && results.status < 500) {\n const body = await results.text();\n try {\n const data = JSON.parse(body);\n if (data?.errors?.length) {\n throw new ApiV2Error(data.errors[0]);\n }\n } catch (error: any) {\n // Server returned non-json response.\n if (error.message.includes('in JSON at position')) {\n throw new UnexpectedServerError(body);\n }\n throw error;\n }\n }\n return results;\n } catch (error: any) {\n // Specifically, when running `npx expo start` and the wifi is connected but not really (public wifi, airplanes, etc).\n if ('code' in error && error.code === 'ENOTFOUND') {\n disableNetwork();\n\n throw new CommandError(\n 'OFFLINE',\n 'Network connection is unreliable. Try again with the environment variable `EXPO_OFFLINE=1` to skip network requests.'\n );\n }\n\n throw error;\n }\n };\n}\n\nconst fetchWithOffline = wrapFetchWithOffline(fetchInstance);\n\nconst fetchWithBaseUrl = wrapFetchWithBaseUrl(fetchWithOffline, getExpoApiBaseUrl() + '/v2/');\n\nconst fetchWithProxy = wrapFetchWithProxy(fetchWithBaseUrl);\n\nconst fetchWithCredentials = wrapFetchWithProgress(wrapFetchWithCredentials(fetchWithProxy));\n\n/**\n * Create an instance of the fully qualified fetch command (auto authentication and api) but with caching in the '~/.expo' directory.\n * Caching is disabled automatically if the EXPO_NO_CACHE or EXPO_BETA environment variables are enabled.\n */\nexport function createCachedFetch({\n fetch = fetchWithCredentials,\n cacheDirectory,\n ttl,\n skipCache,\n}: {\n fetch?: FetchLike;\n cacheDirectory: string;\n ttl?: number;\n skipCache?: boolean;\n}): FetchLike {\n // Disable all caching in EXPO_BETA.\n if (skipCache || env.EXPO_BETA || env.EXPO_NO_CACHE) {\n return fetch;\n }\n\n const { FileSystemCache } =\n require('./cache/FileSystemCache') as typeof import('./cache/FileSystemCache');\n\n return wrapFetchWithCache(\n fetch,\n new FileSystemCache({\n cacheDirectory: path.join(getExpoHomeDirectory(), cacheDirectory),\n ttl,\n })\n );\n}\n\n/** Instance of fetch with automatic base URL pointing to the Expo API, user credential injection, and API error handling. Caching not included. */\nexport const fetchAsync = wrapFetchWithProgress(wrapFetchWithCredentials(fetchWithProxy));\n"],"names":["wrapFetchWithCredentials","createCachedFetch","ApiV2Error","Error","name","constructor","response","message","code","expoApiV2ErrorCode","expoApiV2ErrorDetails","details","expoApiV2ErrorServerStack","stack","expoApiV2ErrorMetadata","metadata","UnexpectedServerError","fetchFunction","fetchWithCredentials","url","options","Array","isArray","headers","resolvedHeaders","token","UserSettings","getAccessToken","authorization","sessionSecret","getSession","results","status","body","text","data","JSON","parse","errors","length","error","includes","disableNetwork","CommandError","fetchWithOffline","wrapFetchWithOffline","fetchInstance","fetchWithBaseUrl","wrapFetchWithBaseUrl","getExpoApiBaseUrl","fetchWithProxy","wrapFetchWithProxy","wrapFetchWithProgress","fetch","cacheDirectory","ttl","skipCache","env","EXPO_BETA","EXPO_NO_CACHE","FileSystemCache","require","wrapFetchWithCache","path","join","getExpoHomeDirectory","fetchAsync"],"mappings":"AAAA;;;;QAoDgBA,wBAAwB,GAAxBA,wBAAwB;QAoExBC,iBAAiB,GAAjBA,iBAAiB;;AAxHI,IAAA,aAAiC,WAAjC,iCAAiC,CAAA;AAE5C,IAAA,UAAY,kCAAZ,YAAY,EAAA;AACrB,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEY,IAAA,mBAA4B,WAA5B,4BAA4B,CAAA;AAE1B,IAAA,qBAAwB,WAAxB,wBAAwB,CAAA;AACxB,IAAA,qBAAwB,WAAxB,wBAAwB,CAAA;AACvB,IAAA,sBAAyB,WAAzB,yBAAyB,CAAA;AAC5B,IAAA,mBAAsB,WAAtB,sBAAsB,CAAA;AACrC,IAAA,IAAiB,WAAjB,iBAAiB,CAAA;AACR,IAAA,OAAoB,WAApB,oBAAoB,CAAA;AACf,IAAA,SAAa,WAAb,aAAa,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AAC;QACjEC,GAAG;KACJ,CAAC,CACH,CAAC;CACH;AAGM,MAAMW,UAAU,GAAGd,CAAAA,GAAAA,sBAAqB,AAA0C,CAAA,sBAA1C,CAACpD,wBAAwB,CAACkD,cAAc,CAAC,CAAC,AAAC;QAA7EgB,UAAU,GAAVA,UAAU"}
|
|
@@ -53,7 +53,7 @@ async function showLoginPromptAsync({ printNewLine =false , otp , ...options } =
|
|
|
53
53
|
await (0, _user).ssoLoginAsync();
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
-
Log.log(hasCredentials ? `Logging in to EAS with email or username (exit and run '
|
|
56
|
+
Log.log(hasCredentials ? `Logging in to EAS with email or username (exit and run 'npx expo login' for other options)` : `Log in to EAS with email or username (exit and run 'npx expo login' for other options)`);
|
|
57
57
|
let username = options.username;
|
|
58
58
|
let password = options.password;
|
|
59
59
|
if (!hasCredentials) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/api/user/actions.ts"],"sourcesContent":["import assert from 'assert';\nimport chalk from 'chalk';\n\nimport { retryUsernamePasswordAuthWithOTPAsync } from './otp';\nimport { Actor, getUserAsync, loginAsync, ssoLoginAsync } from './user';\nimport * as Log from '../../log';\nimport { env } from '../../utils/env';\nimport { CommandError } from '../../utils/errors';\nimport { learnMore } from '../../utils/link';\nimport promptAsync, { Question } from '../../utils/prompts';\nimport { ApiV2Error } from '../rest/client';\n\n/** Show login prompt while prompting for missing credentials. */\nexport async function showLoginPromptAsync({\n printNewLine = false,\n otp,\n ...options\n}: {\n printNewLine?: boolean;\n username?: string;\n password?: string;\n otp?: string;\n sso?: boolean | undefined;\n} = {}): Promise<void> {\n if (env.EXPO_OFFLINE) {\n throw new CommandError('OFFLINE', 'Cannot authenticate in offline-mode');\n }\n const hasCredentials = options.username && options.password;\n const sso = options.sso;\n\n if (printNewLine) {\n Log.log();\n }\n\n if (sso) {\n await ssoLoginAsync();\n return;\n }\n\n Log.log(\n hasCredentials\n ? `Logging in to EAS with email or username (exit and run '
|
|
1
|
+
{"version":3,"sources":["../../../../src/api/user/actions.ts"],"sourcesContent":["import assert from 'assert';\nimport chalk from 'chalk';\n\nimport { retryUsernamePasswordAuthWithOTPAsync } from './otp';\nimport { Actor, getUserAsync, loginAsync, ssoLoginAsync } from './user';\nimport * as Log from '../../log';\nimport { env } from '../../utils/env';\nimport { CommandError } from '../../utils/errors';\nimport { learnMore } from '../../utils/link';\nimport promptAsync, { Question } from '../../utils/prompts';\nimport { ApiV2Error } from '../rest/client';\n\n/** Show login prompt while prompting for missing credentials. */\nexport async function showLoginPromptAsync({\n printNewLine = false,\n otp,\n ...options\n}: {\n printNewLine?: boolean;\n username?: string;\n password?: string;\n otp?: string;\n sso?: boolean | undefined;\n} = {}): Promise<void> {\n if (env.EXPO_OFFLINE) {\n throw new CommandError('OFFLINE', 'Cannot authenticate in offline-mode');\n }\n const hasCredentials = options.username && options.password;\n const sso = options.sso;\n\n if (printNewLine) {\n Log.log();\n }\n\n if (sso) {\n await ssoLoginAsync();\n return;\n }\n\n Log.log(\n hasCredentials\n ? `Logging in to EAS with email or username (exit and run 'npx expo login' for other options)`\n : `Log in to EAS with email or username (exit and run 'npx expo login' for other options)`\n );\n\n let username = options.username;\n let password = options.password;\n\n if (!hasCredentials) {\n const resolved = await promptAsync(\n [\n !options.username && {\n type: 'text',\n name: 'username',\n message: 'Email or username',\n },\n !options.password && {\n type: 'password',\n name: 'password',\n message: 'Password',\n },\n ].filter(Boolean) as Question<string>[],\n {\n nonInteractiveHelp: `Use the EXPO_TOKEN environment variable to authenticate in CI (${learnMore(\n 'https://docs.expo.dev/accounts/programmatic-access/'\n )})`,\n }\n );\n username ??= resolved.username;\n password ??= resolved.password;\n }\n // This is just for the types.\n assert(username && password);\n\n try {\n await loginAsync({\n username,\n password,\n otp,\n });\n } catch (e) {\n if (e instanceof ApiV2Error && e.expoApiV2ErrorCode === 'ONE_TIME_PASSWORD_REQUIRED') {\n await retryUsernamePasswordAuthWithOTPAsync(\n username,\n password,\n e.expoApiV2ErrorMetadata as any\n );\n } else {\n throw e;\n }\n }\n}\n\n/** Ensure the user is logged in, if not, prompt to login. */\nexport async function ensureLoggedInAsync(): Promise<Actor> {\n let user = await getUserAsync().catch(() => null);\n\n if (!user) {\n Log.warn(chalk.yellow`An Expo user account is required to proceed.`);\n await showLoginPromptAsync({ printNewLine: true });\n user = await getUserAsync();\n }\n\n assert(user, 'User should be logged in');\n return user;\n}\n"],"names":["showLoginPromptAsync","ensureLoggedInAsync","Log","printNewLine","otp","options","env","EXPO_OFFLINE","CommandError","hasCredentials","username","password","sso","log","ssoLoginAsync","resolved","promptAsync","type","name","message","filter","Boolean","nonInteractiveHelp","learnMore","assert","loginAsync","e","ApiV2Error","expoApiV2ErrorCode","retryUsernamePasswordAuthWithOTPAsync","expoApiV2ErrorMetadata","user","getUserAsync","catch","warn","chalk","yellow"],"mappings":"AAAA;;;;QAasBA,oBAAoB,GAApBA,oBAAoB;QAiFpBC,mBAAmB,GAAnBA,mBAAmB;AA9FtB,IAAA,OAAQ,kCAAR,QAAQ,EAAA;AACT,IAAA,MAAO,kCAAP,OAAO,EAAA;AAE6B,IAAA,IAAO,WAAP,OAAO,CAAA;AACE,IAAA,KAAQ,WAAR,QAAQ,CAAA;AAC3DC,IAAAA,GAAG,mCAAM,WAAW,EAAjB;AACK,IAAA,IAAiB,WAAjB,iBAAiB,CAAA;AACR,IAAA,OAAoB,WAApB,oBAAoB,CAAA;AACvB,IAAA,KAAkB,WAAlB,kBAAkB,CAAA;AACN,IAAA,QAAqB,kCAArB,qBAAqB,EAAA;AAChC,IAAA,OAAgB,WAAhB,gBAAgB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGpC,eAAeF,oBAAoB,CAAC,EACzCG,YAAY,EAAG,KAAK,CAAA,EACpBC,GAAG,CAAA,EACH,GAAGC,OAAO,EAOX,GAAG,EAAE,EAAiB;IACrB,IAAIC,IAAG,IAAA,CAACC,YAAY,EAAE;QACpB,MAA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GAAKI,QAAQ,CAACJ,QAAQ,CAAC;KAChC;IACD,8BAA8B;IAC9Ba,CAAAA,GAAAA,OAAM,AAAsB,CAAA,QAAtB,CAACd,QAAQ,IAAIC,QAAQ,CAAC,CAAC;IAE7B,IAAI;QACF,MAAMc,CAAAA,GAAAA,KAAU,AAId,CAAA,WAJc,CAAC;YACff,QAAQ;YACRC,QAAQ;YACRP,GAAG;SACJ,CAAC,CAAC;KACJ,CAAC,OAAOsB,CAAC,EAAE;QACV,IAAIA,CAAC,YAAYC,OAAU,WAAA,IAAID,CAAC,CAACE,kBAAkB,KAAK,4BAA4B,EAAE;YACpF,MAAMC,CAAAA,GAAAA,IAAqC,AAI1C,CAAA,sCAJ0C,CACzCnB,QAAQ,EACRC,QAAQ,EACRe,CAAC,CAACI,sBAAsB,CACzB,CAAC;SACH,MAAM;YACL,MAAMJ,CAAC,CAAC;SACT;KACF;CACF;AAGM,eAAezB,mBAAmB,GAAmB;IAC1D,IAAI8B,IAAI,GAAG,MAAMC,CAAAA,GAAAA,KAAY,AAAE,CAAA,aAAF,EAAE,CAACC,KAAK,CAAC,IAAM,IAAI;IAAA,CAAC,AAAC;IAElD,IAAI,CAACF,IAAI,EAAE;QACT7B,GAAG,CAACgC,IAAI,CAACC,MAAK,QAAA,CAACC,MAAM,CAAC,4CAA4C,CAAC,CAAC,CAAC;QACrE,MAAMpC,oBAAoB,CAAC;YAAEG,YAAY,EAAE,IAAI;SAAE,CAAC,CAAC;QACnD4B,IAAI,GAAG,MAAMC,CAAAA,GAAAA,KAAY,AAAE,CAAA,aAAF,EAAE,CAAC;KAC7B;IAEDR,CAAAA,GAAAA,OAAM,AAAkC,CAAA,QAAlC,CAACO,IAAI,EAAE,0BAA0B,CAAC,CAAC;IACzC,OAAOA,IAAI,CAAC;CACb"}
|
|
@@ -48,7 +48,9 @@ async function typescript(projectRoot) {
|
|
|
48
48
|
const { exp } = (0, _config).getConfig(projectRoot, {
|
|
49
49
|
skipSDKVersionRequirement: true
|
|
50
50
|
});
|
|
51
|
-
await new MetroBundlerDevServer(projectRoot, getPlatformBundlers(exp),
|
|
51
|
+
await new MetroBundlerDevServer(projectRoot, getPlatformBundlers(exp), {
|
|
52
|
+
isDevClient: true
|
|
53
|
+
}).startTypeScriptServices();
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
//# sourceMappingURL=typescript.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/customize/typescript.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\n\nimport { Log } from '../log';\n\nexport async function typescript(projectRoot: string) {\n const { TypeScriptProjectPrerequisite } = await import(\n '../start/doctor/typescript/TypeScriptProjectPrerequisite.js'\n );\n const { MetroBundlerDevServer } = await import('../start/server/metro/MetroBundlerDevServer.js');\n const { getPlatformBundlers } = await import('../start/server/platformBundlers.js');\n\n try {\n await new TypeScriptProjectPrerequisite(projectRoot).bootstrapAsync();\n } catch (error: any) {\n // Ensure the process doesn't fail if the TypeScript check fails.\n // This could happen during the install.\n Log.log();\n Log.exception(error);\n return;\n }\n\n const { exp } = getConfig(projectRoot, { skipSDKVersionRequirement: true });\n await new MetroBundlerDevServer(
|
|
1
|
+
{"version":3,"sources":["../../../src/customize/typescript.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\n\nimport { Log } from '../log';\n\nexport async function typescript(projectRoot: string) {\n const { TypeScriptProjectPrerequisite } = await import(\n '../start/doctor/typescript/TypeScriptProjectPrerequisite.js'\n );\n const { MetroBundlerDevServer } = await import('../start/server/metro/MetroBundlerDevServer.js');\n const { getPlatformBundlers } = await import('../start/server/platformBundlers.js');\n\n try {\n await new TypeScriptProjectPrerequisite(projectRoot).bootstrapAsync();\n } catch (error: any) {\n // Ensure the process doesn't fail if the TypeScript check fails.\n // This could happen during the install.\n Log.log();\n Log.exception(error);\n return;\n }\n\n const { exp } = getConfig(projectRoot, { skipSDKVersionRequirement: true });\n await new MetroBundlerDevServer(projectRoot, getPlatformBundlers(exp), {\n isDevClient: true,\n }).startTypeScriptServices();\n}\n"],"names":["typescript","projectRoot","TypeScriptProjectPrerequisite","MetroBundlerDevServer","getPlatformBundlers","bootstrapAsync","error","Log","log","exception","exp","getConfig","skipSDKVersionRequirement","isDevClient","startTypeScriptServices"],"mappings":"AAAA;;;;QAIsBA,UAAU,GAAVA,UAAU;AAJN,IAAA,OAAc,WAAd,cAAc,CAAA;AAEpB,IAAA,IAAQ,WAAR,QAAQ,CAAA;;;;;;;;;;;;;;;;;;;;;;AAErB,eAAeA,UAAU,CAACC,WAAmB,EAAE;IACpD,MAAM,EAAEC,6BAA6B,CAAA,EAAE,GAAG,MAAM;+CAC9C,6DAA6D;MAC9D,AAAC;IACF,MAAM,EAAEC,qBAAqB,CAAA,EAAE,GAAG,MAAM;+CAAO,gDAAgD;MAAC,AAAC;IACjG,MAAM,EAAEC,mBAAmB,CAAA,EAAE,GAAG,MAAM;+CAAO,qCAAqC;MAAC,AAAC;IAEpF,IAAI;QACF,MAAM,IAAIF,6BAA6B,CAACD,WAAW,CAAC,CAACI,cAAc,EAAE,CAAC;KACvE,CAAC,OAAOC,KAAK,EAAO;QACnB,iEAAiE;QACjE,wCAAwC;QACxCC,IAAG,IAAA,CAACC,GAAG,EAAE,CAAC;QACVD,IAAG,IAAA,CAACE,SAAS,CAACH,KAAK,CAAC,CAAC;QACrB,OAAO;KACR;IAED,MAAM,EAAEI,GAAG,CAAA,EAAE,GAAGC,CAAAA,GAAAA,OAAS,AAAkD,CAAA,UAAlD,CAACV,WAAW,EAAE;QAAEW,yBAAyB,EAAE,IAAI;KAAE,CAAC,AAAC;IAC5E,MAAM,IAAIT,qBAAqB,CAACF,WAAW,EAAEG,mBAAmB,CAACM,GAAG,CAAC,EAAE;QACrEG,WAAW,EAAE,IAAI;KAClB,CAAC,CAACC,uBAAuB,EAAE,CAAC;CAC9B"}
|
|
@@ -9,7 +9,7 @@ function _interopRequireDefault(obj) {
|
|
|
9
9
|
default: obj
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
function createMetadataJson({ bundles , fileNames }) {
|
|
12
|
+
function createMetadataJson({ bundles , fileNames , embeddedHashSet }) {
|
|
13
13
|
// Build metadata.json
|
|
14
14
|
return {
|
|
15
15
|
version: 0,
|
|
@@ -20,9 +20,11 @@ function createMetadataJson({ bundles , fileNames }) {
|
|
|
20
20
|
...metadata,
|
|
21
21
|
[platform]: {
|
|
22
22
|
// Get the filename for each platform's bundle.
|
|
23
|
-
|
|
23
|
+
// TODO: Add multi-bundle support to EAS Update!!
|
|
24
|
+
bundle: fileNames[platform][0],
|
|
24
25
|
// Collect all of the assets and convert them to the serial format.
|
|
25
|
-
assets: bundle.assets.
|
|
26
|
+
assets: bundle.assets.filter((asset)=>!embeddedHashSet || !embeddedHashSet.has(asset.hash)
|
|
27
|
+
).map((asset)=>{
|
|
26
28
|
var // Each asset has multiple hashes which we convert and then flatten.
|
|
27
29
|
ref;
|
|
28
30
|
return (ref = asset.fileHashes) == null ? void 0 : ref.map((hash)=>({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/export/createMetadataJson.ts"],"sourcesContent":["import path from 'path';\n\nimport { BundleOutput } from './fork-bundleAsync';\n\nexport type BundlePlatform = 'android' | 'ios';\n\ntype PlatformMetadataAsset = { path: string; ext: string };\n\ntype PlatformMetadata = { bundle: string; assets: PlatformMetadataAsset[] };\n\ntype FileMetadata = {\n [key in BundlePlatform]: PlatformMetadata;\n};\n\nexport function createMetadataJson({\n bundles,\n fileNames,\n}: {\n bundles: Partial<Record<BundlePlatform, Pick<BundleOutput, 'assets'>>>;\n fileNames: Record<string, string
|
|
1
|
+
{"version":3,"sources":["../../../src/export/createMetadataJson.ts"],"sourcesContent":["import path from 'path';\n\nimport { BundleOutput } from './fork-bundleAsync';\n\nexport type BundlePlatform = 'android' | 'ios';\n\ntype PlatformMetadataAsset = { path: string; ext: string };\n\ntype PlatformMetadata = { bundle: string; assets: PlatformMetadataAsset[] };\n\ntype FileMetadata = {\n [key in BundlePlatform]: PlatformMetadata;\n};\n\nexport function createMetadataJson({\n bundles,\n fileNames,\n embeddedHashSet,\n}: {\n bundles: Partial<Record<BundlePlatform, Pick<BundleOutput, 'assets'>>>;\n fileNames: Record<string, string[]>;\n embeddedHashSet?: Set<string>;\n}): {\n version: 0;\n bundler: 'metro';\n fileMetadata: FileMetadata;\n} {\n // Build metadata.json\n return {\n version: 0,\n bundler: 'metro',\n fileMetadata: Object.entries(bundles).reduce<Record<string, Partial<PlatformMetadata>>>(\n (metadata, [platform, bundle]) => {\n if (platform === 'web') return metadata;\n\n return {\n ...metadata,\n [platform]: {\n // Get the filename for each platform's bundle.\n // TODO: Add multi-bundle support to EAS Update!!\n bundle: fileNames[platform][0],\n // Collect all of the assets and convert them to the serial format.\n assets: bundle.assets\n .filter((asset) => !embeddedHashSet || !embeddedHashSet.has(asset.hash))\n .map(\n (asset) =>\n // Each asset has multiple hashes which we convert and then flatten.\n asset.fileHashes?.map((hash) => ({\n path: path.join('assets', hash),\n ext: asset.type,\n }))\n )\n .filter(Boolean)\n .flat(),\n },\n };\n },\n {}\n ) as FileMetadata,\n };\n}\n"],"names":["createMetadataJson","bundles","fileNames","embeddedHashSet","version","bundler","fileMetadata","Object","entries","reduce","metadata","platform","bundle","assets","filter","asset","has","hash","map","fileHashes","path","join","ext","type","Boolean","flat"],"mappings":"AAAA;;;;QAcgBA,kBAAkB,GAAlBA,kBAAkB;AAdjB,IAAA,KAAM,kCAAN,MAAM,EAAA;;;;;;AAchB,SAASA,kBAAkB,CAAC,EACjCC,OAAO,CAAA,EACPC,SAAS,CAAA,EACTC,eAAe,CAAA,EAKhB,EAIC;IACA,sBAAsB;IACtB,OAAO;QACLC,OAAO,EAAE,CAAC;QACVC,OAAO,EAAE,OAAO;QAChBC,YAAY,EAAEC,MAAM,CAACC,OAAO,CAACP,OAAO,CAAC,CAACQ,MAAM,CAC1C,CAACC,QAAQ,EAAE,CAACC,QAAQ,EAAEC,MAAM,CAAC,GAAK;YAChC,IAAID,QAAQ,KAAK,KAAK,EAAE,OAAOD,QAAQ,CAAC;YAExC,OAAO;gBACL,GAAGA,QAAQ;gBACX,CAACC,QAAQ,CAAC,EAAE;oBACV,+CAA+C;oBAC/C,iDAAiD;oBACjDC,MAAM,EAAEV,SAAS,CAACS,QAAQ,CAAC,CAAC,CAAC,CAAC;oBAC9B,mEAAmE;oBACnEE,MAAM,EAAED,MAAM,CAACC,MAAM,CAClBC,MAAM,CAAC,CAACC,KAAK,GAAK,CAACZ,eAAe,IAAI,CAACA,eAAe,CAACa,GAAG,CAACD,KAAK,CAACE,IAAI,CAAC;oBAAA,CAAC,CACvEC,GAAG,CACF,CAACH,KAAK;4BACJ,oEAAoE;wBACpEA,GAAgB;wBAAhBA,OAAAA,CAAAA,GAAgB,GAAhBA,KAAK,CAACI,UAAU,SAAK,GAArBJ,KAAAA,CAAqB,GAArBA,GAAgB,CAAEG,GAAG,CAAC,CAACD,IAAI,GAAK,CAAC;gCAC/BG,IAAI,EAAEA,KAAI,QAAA,CAACC,IAAI,CAAC,QAAQ,EAAEJ,IAAI,CAAC;gCAC/BK,GAAG,EAAEP,KAAK,CAACQ,IAAI;6BAChB,CAAC;wBAAA,CAAC,CAAA;qBAAA,CACN,CACAT,MAAM,CAACU,OAAO,CAAC,CACfC,IAAI,EAAE;iBACV;aACF,CAAC;SACH,EACD,EAAE,CACH;KACF,CAAC;CACH"}
|
|
@@ -3,69 +3,143 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
5
|
exports.exportEmbedAsync = exportEmbedAsync;
|
|
6
|
+
exports.exportEmbedBundleAsync = exportEmbedBundleAsync;
|
|
7
|
+
var _config = require("@expo/config");
|
|
6
8
|
var _fs = _interopRequireDefault(require("fs"));
|
|
9
|
+
var _glob = require("glob");
|
|
7
10
|
var _server = _interopRequireDefault(require("metro/src/Server"));
|
|
8
11
|
var _bundle = _interopRequireDefault(require("metro/src/shared/output/bundle"));
|
|
9
12
|
var _path = _interopRequireDefault(require("path"));
|
|
13
|
+
var _xcodeCompilerLogger = require("./xcodeCompilerLogger");
|
|
10
14
|
var _log = require("../../log");
|
|
11
15
|
var _instantiateMetro = require("../../start/server/metro/instantiateMetro");
|
|
12
|
-
var
|
|
16
|
+
var _metroOptions = require("../../start/server/middleware/metroOptions");
|
|
17
|
+
var _ansi = require("../../utils/ansi");
|
|
18
|
+
var _dir = require("../../utils/dir");
|
|
13
19
|
var _nodeEnv = require("../../utils/nodeEnv");
|
|
20
|
+
var _profile = require("../../utils/profile");
|
|
21
|
+
var _exportHermes = require("../exportHermes");
|
|
14
22
|
var _forkBundleAsync = require("../fork-bundleAsync");
|
|
23
|
+
var _persistMetroAssets = require("../persistMetroAssets");
|
|
15
24
|
function _interopRequireDefault(obj) {
|
|
16
25
|
return obj && obj.__esModule ? obj : {
|
|
17
26
|
default: obj
|
|
18
27
|
};
|
|
19
28
|
}
|
|
29
|
+
const debug = require("debug")("expo:export:embed");
|
|
30
|
+
function guessCopiedAppleBundlePath(bundleOutput) {
|
|
31
|
+
// Ensure the path is familiar before guessing.
|
|
32
|
+
if (!bundleOutput.match(/\/Xcode\/DerivedData\/.*\/Build\/Products\//)) {
|
|
33
|
+
debug("Bundling to non-standard location:", bundleOutput);
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
const bundleName = _path.default.basename(bundleOutput);
|
|
37
|
+
const bundleParent = _path.default.dirname(bundleOutput);
|
|
38
|
+
const possiblePath = (0, _glob).sync(_path.default.join(bundleParent, `*.app/${bundleName}`), {
|
|
39
|
+
// bundle identifiers can start with dots.
|
|
40
|
+
dot: true
|
|
41
|
+
})[0];
|
|
42
|
+
debug("Possible path for previous bundle:", possiblePath);
|
|
43
|
+
return possiblePath;
|
|
44
|
+
}
|
|
20
45
|
async function exportEmbedAsync(projectRoot, options) {
|
|
21
46
|
(0, _nodeEnv).setNodeEnv(options.dev ? "development" : "production");
|
|
22
47
|
require("@expo/env").load(projectRoot);
|
|
48
|
+
// Ensure we delete the old bundle to trigger a failure if the bundle cannot be created.
|
|
49
|
+
await (0, _dir).removeAsync(options.bundleOutput);
|
|
50
|
+
// The iOS bundle is copied in to the Xcode project, so we need to remove the old one
|
|
51
|
+
// to prevent Xcode from loading the old one after a build failure.
|
|
52
|
+
if (options.platform === "ios") {
|
|
53
|
+
const previousPath = guessCopiedAppleBundlePath(options.bundleOutput);
|
|
54
|
+
if (previousPath && _fs.default.existsSync(previousPath)) {
|
|
55
|
+
debug("Removing previous iOS bundle:", previousPath);
|
|
56
|
+
await (0, _dir).removeAsync(previousPath);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const { bundle , assets } = await exportEmbedBundleAsync(projectRoot, options);
|
|
60
|
+
_fs.default.mkdirSync(_path.default.dirname(options.bundleOutput), {
|
|
61
|
+
recursive: true,
|
|
62
|
+
mode: 493
|
|
63
|
+
});
|
|
64
|
+
// Persist bundle and source maps.
|
|
65
|
+
await Promise.all([
|
|
66
|
+
_bundle.default.save(bundle, options, _log.Log.log),
|
|
67
|
+
// NOTE(EvanBacon): This may need to be adjusted in the future if want to support baseUrl on native
|
|
68
|
+
// platforms when doing production embeds (unlikely).
|
|
69
|
+
options.assetsDest ? (0, _persistMetroAssets).persistMetroAssetsAsync(assets, {
|
|
70
|
+
platform: options.platform,
|
|
71
|
+
outputDirectory: options.assetsDest,
|
|
72
|
+
iosAssetCatalogDirectory: options.assetCatalogDest
|
|
73
|
+
}) : null,
|
|
74
|
+
]);
|
|
75
|
+
}
|
|
76
|
+
async function exportEmbedBundleAsync(projectRoot, options) {
|
|
77
|
+
const exp = (0, _config).getConfig(projectRoot, {
|
|
78
|
+
skipSDKVersionRequirement: true
|
|
79
|
+
}).exp;
|
|
80
|
+
// TODO: This is slow ~40ms
|
|
23
81
|
const { config } = await (0, _instantiateMetro).loadMetroConfigAsync(projectRoot, {
|
|
24
82
|
maxWorkers: options.maxWorkers,
|
|
25
|
-
resetCache:
|
|
83
|
+
resetCache: false,
|
|
26
84
|
config: options.config
|
|
27
85
|
}, {
|
|
86
|
+
exp,
|
|
28
87
|
isExporting: true
|
|
29
88
|
});
|
|
30
|
-
|
|
31
|
-
// platforms when doing production embeds (unlikely).
|
|
32
|
-
const saveAssets = (0, _resolveFromProject).importCliSaveAssetsFromProject(projectRoot);
|
|
89
|
+
const isHermes = (0, _exportHermes).isEnableHermesManaged(exp, options.platform);
|
|
33
90
|
let sourceMapUrl = options.sourcemapOutput;
|
|
34
91
|
if (sourceMapUrl && !options.sourcemapUseAbsolutePath) {
|
|
35
92
|
sourceMapUrl = _path.default.basename(sourceMapUrl);
|
|
36
93
|
}
|
|
37
94
|
const bundleRequest = {
|
|
38
95
|
..._server.default.DEFAULT_BUNDLE_OPTIONS,
|
|
39
|
-
|
|
96
|
+
...(0, _metroOptions).getMetroDirectBundleOptionsForExpoConfig(projectRoot, exp, {
|
|
97
|
+
mainModuleName: options.entryFile,
|
|
98
|
+
platform: options.platform,
|
|
99
|
+
minify: options.minify,
|
|
100
|
+
mode: options.dev ? "development" : "production",
|
|
101
|
+
engine: isHermes ? "hermes" : undefined,
|
|
102
|
+
isExporting: true
|
|
103
|
+
}),
|
|
40
104
|
sourceMapUrl,
|
|
41
|
-
|
|
42
|
-
minify: !!options.minify,
|
|
43
|
-
platform: options.platform,
|
|
44
|
-
unstable_transformProfile: options.unstableTransformProfile
|
|
105
|
+
unstable_transformProfile: options.unstableTransformProfile || (isHermes ? "hermes-stable" : "default")
|
|
45
106
|
};
|
|
46
107
|
const server = new _server.default(config, {
|
|
47
108
|
watch: false
|
|
48
109
|
});
|
|
49
110
|
try {
|
|
50
|
-
const bundle = await server.build({
|
|
111
|
+
const bundle = await (0, _profile).profile(server.build.bind(server), "metro-bundle")({
|
|
51
112
|
...bundleRequest,
|
|
52
113
|
bundleType: "bundle"
|
|
53
114
|
});
|
|
54
|
-
_fs.default.mkdirSync(_path.default.dirname(options.bundleOutput), {
|
|
55
|
-
recursive: true,
|
|
56
|
-
mode: 493
|
|
57
|
-
});
|
|
58
|
-
// Persist bundle and source maps.
|
|
59
|
-
await _bundle.default.save(bundle, options, _log.Log.log);
|
|
60
115
|
// Save the assets of the bundle
|
|
61
116
|
const outputAssets = await (0, _forkBundleAsync).getAssets(server, {
|
|
62
117
|
...bundleRequest,
|
|
63
118
|
bundleType: "todo"
|
|
64
119
|
});
|
|
65
|
-
|
|
120
|
+
return {
|
|
121
|
+
bundle,
|
|
122
|
+
assets: outputAssets
|
|
123
|
+
};
|
|
124
|
+
} catch (error) {
|
|
125
|
+
if (isError(error)) {
|
|
126
|
+
// Log using Xcode error format so the errors are picked up by xcodebuild.
|
|
127
|
+
// https://developer.apple.com/documentation/xcode/running-custom-scripts-during-a-build#Log-errors-and-warnings-from-your-script
|
|
128
|
+
if (options.platform === "ios") {
|
|
129
|
+
// If the error is about to be presented in Xcode, strip the ansi characters from the message.
|
|
130
|
+
if ("message" in error && (0, _xcodeCompilerLogger).isExecutingFromXcodebuild()) {
|
|
131
|
+
error.message = (0, _ansi).stripAnsi(error.message);
|
|
132
|
+
}
|
|
133
|
+
(0, _xcodeCompilerLogger).logMetroErrorInXcode(projectRoot, error);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
throw error;
|
|
66
137
|
} finally{
|
|
67
138
|
server.end();
|
|
68
139
|
}
|
|
69
140
|
}
|
|
141
|
+
function isError(error) {
|
|
142
|
+
return error instanceof Error;
|
|
143
|
+
}
|
|
70
144
|
|
|
71
145
|
//# sourceMappingURL=exportEmbedAsync.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/export/embed/exportEmbedAsync.ts"],"sourcesContent":["import fs from 'fs';\nimport Server from 'metro/src/Server';\nimport output from 'metro/src/shared/output/bundle';\nimport type { BundleOptions } from 'metro/src/shared/types';\nimport path from 'path';\n\nimport { Options } from './resolveOptions';\nimport { Log } from '../../log';\nimport { loadMetroConfigAsync } from '../../start/server/metro/instantiateMetro';\nimport { importCliSaveAssetsFromProject } from '../../start/server/metro/resolveFromProject';\nimport { setNodeEnv } from '../../utils/nodeEnv';\nimport { getAssets } from '../fork-bundleAsync';\n\nexport async function exportEmbedAsync(projectRoot: string, options: Options) {\n setNodeEnv(options.dev ? 'development' : 'production');\n require('@expo/env').load(projectRoot);\n\n const { config } = await loadMetroConfigAsync(\n projectRoot,\n {\n maxWorkers: options.maxWorkers,\n resetCache: options.resetCache,\n config: options.config,\n },\n {\n isExporting: true,\n }\n );\n\n // NOTE(EvanBacon): This may need to be adjusted in the future if want to support basePath on native\n // platforms when doing production embeds (unlikely).\n const saveAssets = importCliSaveAssetsFromProject(projectRoot);\n\n let sourceMapUrl = options.sourcemapOutput;\n if (sourceMapUrl && !options.sourcemapUseAbsolutePath) {\n sourceMapUrl = path.basename(sourceMapUrl);\n }\n\n const bundleRequest = {\n ...Server.DEFAULT_BUNDLE_OPTIONS,\n entryFile: options.entryFile,\n sourceMapUrl,\n dev: options.dev,\n minify: !!options.minify,\n platform: options.platform,\n unstable_transformProfile:\n options.unstableTransformProfile as BundleOptions['unstable_transformProfile'],\n };\n\n const server = new Server(config, {\n watch: false,\n });\n\n try {\n const bundle = await server.build({\n ...bundleRequest,\n bundleType: 'bundle',\n });\n\n fs.mkdirSync(path.dirname(options.bundleOutput), { recursive: true, mode: 0o755 });\n\n // Persist bundle and source maps.\n await output.save(bundle, options, Log.log);\n\n // Save the assets of the bundle\n const outputAssets = await getAssets(server, {\n ...bundleRequest,\n bundleType: 'todo',\n });\n\n await saveAssets(outputAssets, options.platform, options.assetsDest, options.assetCatalogDest);\n } finally {\n server.end();\n }\n}\n"],"names":["exportEmbedAsync","projectRoot","options","setNodeEnv","dev","require","load","config","loadMetroConfigAsync","maxWorkers","resetCache","isExporting","saveAssets","importCliSaveAssetsFromProject","sourceMapUrl","sourcemapOutput","sourcemapUseAbsolutePath","path","basename","bundleRequest","Server","DEFAULT_BUNDLE_OPTIONS","entryFile","minify","platform","unstable_transformProfile","unstableTransformProfile","server","watch","bundle","build","bundleType","fs","mkdirSync","dirname","bundleOutput","recursive","mode","output","save","Log","log","outputAssets","getAssets","assetsDest","assetCatalogDest","end"],"mappings":"AAAA;;;;QAasBA,gBAAgB,GAAhBA,gBAAgB;AAbvB,IAAA,GAAI,kCAAJ,IAAI,EAAA;AACA,IAAA,OAAkB,kCAAlB,kBAAkB,EAAA;AAClB,IAAA,OAAgC,kCAAhC,gCAAgC,EAAA;AAElC,IAAA,KAAM,kCAAN,MAAM,EAAA;AAGH,IAAA,IAAW,WAAX,WAAW,CAAA;AACM,IAAA,iBAA2C,WAA3C,2CAA2C,CAAA;AACjC,IAAA,mBAA6C,WAA7C,6CAA6C,CAAA;AACjE,IAAA,QAAqB,WAArB,qBAAqB,CAAA;AACtB,IAAA,gBAAqB,WAArB,qBAAqB,CAAA;;;;;;AAExC,eAAeA,gBAAgB,CAACC,WAAmB,EAAEC,OAAgB,EAAE;IAC5EC,CAAAA,GAAAA,QAAU,AAA4C,CAAA,WAA5C,CAACD,OAAO,CAACE,GAAG,GAAG,aAAa,GAAG,YAAY,CAAC,CAAC;IACvDC,OAAO,CAAC,WAAW,CAAC,CAACC,IAAI,CAACL,WAAW,CAAC,CAAC;IAEvC,MAAM,EAAEM,MAAM,CAAA,EAAE,GAAG,MAAMC,CAAAA,GAAAA,iBAAoB,AAU5C,CAAA,qBAV4C,CAC3CP,WAAW,EACX;QACEQ,UAAU,EAAEP,OAAO,CAACO,UAAU;QAC9BC,UAAU,EAAER,OAAO,CAACQ,UAAU;QAC9BH,MAAM,EAAEL,OAAO,CAACK,MAAM;KACvB,EACD;QACEI,WAAW,EAAE,IAAI;KAClB,CACF,AAAC;IAEF,oGAAoG;IACpG,qDAAqD;IACrD,MAAMC,UAAU,GAAGC,CAAAA,GAAAA,mBAA8B,AAAa,CAAA,+BAAb,CAACZ,WAAW,CAAC,AAAC;IAE/D,IAAIa,YAAY,GAAGZ,OAAO,CAACa,eAAe,AAAC;IAC3C,IAAID,YA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AE1C,OAAO,CAAC2C,gBAAgB,CAAC,CAAC;KAChG,QAAS;QACRlB,MAAM,CAACmB,GAAG,EAAE,CAAC;KACd;CACF"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/export/embed/exportEmbedAsync.ts"],"sourcesContent":["/**\n * Copyright © 2023 650 Industries.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { getConfig } from '@expo/config';\nimport fs from 'fs';\nimport { sync as globSync } from 'glob';\nimport Server from 'metro/src/Server';\nimport output from 'metro/src/shared/output/bundle';\nimport type { BundleOptions } from 'metro/src/shared/types';\nimport path from 'path';\n\nimport { Options } from './resolveOptions';\nimport { isExecutingFromXcodebuild, logMetroErrorInXcode } from './xcodeCompilerLogger';\nimport { Log } from '../../log';\nimport { loadMetroConfigAsync } from '../../start/server/metro/instantiateMetro';\nimport { getMetroDirectBundleOptionsForExpoConfig } from '../../start/server/middleware/metroOptions';\nimport { stripAnsi } from '../../utils/ansi';\nimport { removeAsync } from '../../utils/dir';\nimport { setNodeEnv } from '../../utils/nodeEnv';\nimport { profile } from '../../utils/profile';\nimport { isEnableHermesManaged } from '../exportHermes';\nimport { getAssets } from '../fork-bundleAsync';\nimport { persistMetroAssetsAsync } from '../persistMetroAssets';\n\nconst debug = require('debug')('expo:export:embed');\n\nfunction guessCopiedAppleBundlePath(bundleOutput: string) {\n // Ensure the path is familiar before guessing.\n if (!bundleOutput.match(/\\/Xcode\\/DerivedData\\/.*\\/Build\\/Products\\//)) {\n debug('Bundling to non-standard location:', bundleOutput);\n return false;\n }\n const bundleName = path.basename(bundleOutput);\n const bundleParent = path.dirname(bundleOutput);\n const possiblePath = globSync(path.join(bundleParent, `*.app/${bundleName}`), {\n // bundle identifiers can start with dots.\n dot: true,\n })[0];\n debug('Possible path for previous bundle:', possiblePath);\n return possiblePath;\n}\n\nexport async function exportEmbedAsync(projectRoot: string, options: Options) {\n setNodeEnv(options.dev ? 'development' : 'production');\n require('@expo/env').load(projectRoot);\n\n // Ensure we delete the old bundle to trigger a failure if the bundle cannot be created.\n await removeAsync(options.bundleOutput);\n\n // The iOS bundle is copied in to the Xcode project, so we need to remove the old one\n // to prevent Xcode from loading the old one after a build failure.\n if (options.platform === 'ios') {\n const previousPath = guessCopiedAppleBundlePath(options.bundleOutput);\n if (previousPath && fs.existsSync(previousPath)) {\n debug('Removing previous iOS bundle:', previousPath);\n await removeAsync(previousPath);\n }\n }\n\n const { bundle, assets } = await exportEmbedBundleAsync(projectRoot, options);\n\n fs.mkdirSync(path.dirname(options.bundleOutput), { recursive: true, mode: 0o755 });\n\n // Persist bundle and source maps.\n await Promise.all([\n output.save(bundle, options, Log.log),\n // NOTE(EvanBacon): This may need to be adjusted in the future if want to support baseUrl on native\n // platforms when doing production embeds (unlikely).\n options.assetsDest\n ? persistMetroAssetsAsync(assets, {\n platform: options.platform,\n outputDirectory: options.assetsDest,\n iosAssetCatalogDirectory: options.assetCatalogDest,\n })\n : null,\n ]);\n}\n\nexport async function exportEmbedBundleAsync(projectRoot: string, options: Options) {\n const exp = getConfig(projectRoot, { skipSDKVersionRequirement: true }).exp;\n\n // TODO: This is slow ~40ms\n const { config } = await loadMetroConfigAsync(\n projectRoot,\n {\n maxWorkers: options.maxWorkers,\n resetCache: false, //options.resetCache,\n config: options.config,\n },\n {\n exp,\n isExporting: true,\n }\n );\n\n const isHermes = isEnableHermesManaged(exp, options.platform);\n\n let sourceMapUrl = options.sourcemapOutput;\n if (sourceMapUrl && !options.sourcemapUseAbsolutePath) {\n sourceMapUrl = path.basename(sourceMapUrl);\n }\n\n const bundleRequest = {\n ...Server.DEFAULT_BUNDLE_OPTIONS,\n ...getMetroDirectBundleOptionsForExpoConfig(projectRoot, exp, {\n mainModuleName: options.entryFile,\n platform: options.platform,\n minify: options.minify,\n mode: options.dev ? 'development' : 'production',\n engine: isHermes ? 'hermes' : undefined,\n isExporting: true,\n }),\n sourceMapUrl,\n unstable_transformProfile: (options.unstableTransformProfile ||\n (isHermes ? 'hermes-stable' : 'default')) as BundleOptions['unstable_transformProfile'],\n };\n\n const server = new Server(config, {\n watch: false,\n });\n\n try {\n const bundle = await profile(\n server.build.bind(server),\n 'metro-bundle'\n )({\n ...bundleRequest,\n bundleType: 'bundle',\n });\n\n // Save the assets of the bundle\n const outputAssets = await getAssets(server, {\n ...bundleRequest,\n bundleType: 'todo',\n });\n\n return {\n bundle,\n assets: outputAssets,\n };\n } catch (error: any) {\n if (isError(error)) {\n // Log using Xcode error format so the errors are picked up by xcodebuild.\n // https://developer.apple.com/documentation/xcode/running-custom-scripts-during-a-build#Log-errors-and-warnings-from-your-script\n if (options.platform === 'ios') {\n // If the error is about to be presented in Xcode, strip the ansi characters from the message.\n if ('message' in error && isExecutingFromXcodebuild()) {\n error.message = stripAnsi(error.message) as string;\n }\n logMetroErrorInXcode(projectRoot, error);\n }\n }\n throw error;\n } finally {\n server.end();\n }\n}\n\nfunction isError(error: any): error is Error {\n return error instanceof Error;\n}\n"],"names":["exportEmbedAsync","exportEmbedBundleAsync","debug","require","guessCopiedAppleBundlePath","bundleOutput","match","bundleName","path","basename","bundleParent","dirname","possiblePath","globSync","join","dot","projectRoot","options","setNodeEnv","dev","load","removeAsync","platform","previousPath","fs","existsSync","bundle","assets","mkdirSync","recursive","mode","Promise","all","output","save","Log","log","assetsDest","persistMetroAssetsAsync","outputDirectory","iosAssetCatalogDirectory","assetCatalogDest","exp","getConfig","skipSDKVersionRequirement","config","loadMetroConfigAsync","maxWorkers","resetCache","isExporting","isHermes","isEnableHermesManaged","sourceMapUrl","sourcemapOutput","sourcemapUseAbsolutePath","bundleRequest","Server","DEFAULT_BUNDLE_OPTIONS","getMetroDirectBundleOptionsForExpoConfig","mainModuleName","entryFile","minify","engine","undefined","unstable_transformProfile","unstableTransformProfile","server","watch","profile","build","bind","bundleType","outputAssets","getAssets","error","isError","isExecutingFromXcodebuild","message","stripAnsi","logMetroErrorInXcode","end","Error"],"mappings":"AAMA;;;;QAuCsBA,gBAAgB,G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K,EAAO;QACnB,IAAIC,OAAO,CAACD,KAAK,CAAC,EAAE;YAClB,0EAA0E;YAC1E,iIAAiI;YACjI,IAAIzD,OAAO,CAACK,QAAQ,KAAK,KAAK,EAAE;gBAC9B,8FAA8F;gBAC9F,IAAI,SAAS,IAAIoD,KAAK,IAAIE,CAAAA,GAAAA,oBAAyB,AAAE,CAAA,0BAAF,EAAE,EAAE;oBACrDF,KAAK,CAACG,OAAO,GAAGC,CAAAA,GAAAA,KAAS,AAAe,CAAA,UAAf,CAACJ,KAAK,CAACG,OAAO,CAAC,AAAU,CAAC;iBACpD;gBACDE,CAAAA,GAAAA,oBAAoB,AAAoB,CAAA,qBAApB,CAAC/D,WAAW,EAAE0D,KAAK,CAAC,CAAC;aAC1C;SACF;QACD,MAAMA,KAAK,CAAC;KACb,QAAS;QACRR,MAAM,CAACc,GAAG,EAAE,CAAC;KACd;CACF;AAED,SAASL,OAAO,CAACD,KAAU,EAAkB;IAC3C,OAAOA,KAAK,YAAYO,KAAK,CAAC;CAC/B"}
|
|
@@ -31,7 +31,7 @@ function resolveOptions(args, parsed) {
|
|
|
31
31
|
if (!bundleOutput) {
|
|
32
32
|
throw new _errors.CommandError(`Missing required argument: --bundle-output`);
|
|
33
33
|
}
|
|
34
|
-
var ref2, ref3, ref4
|
|
34
|
+
var ref2, ref3, ref4;
|
|
35
35
|
return {
|
|
36
36
|
entryFile,
|
|
37
37
|
assetCatalogDest: args["--asset-catalog-dest"],
|
|
@@ -46,10 +46,10 @@ function resolveOptions(args, parsed) {
|
|
|
46
46
|
sourcemapSourcesRoot: args["--sourcemap-sources-root"],
|
|
47
47
|
sourcemapUseAbsolutePath: !!parsed.args["--sourcemap-use-absolute-path"],
|
|
48
48
|
assetsDest: args["--assets-dest"],
|
|
49
|
-
unstableTransformProfile:
|
|
49
|
+
unstableTransformProfile: args["--unstable-transform-profile"],
|
|
50
50
|
resetCache: !!parsed.args["--reset-cache"],
|
|
51
51
|
resetGlobalCache: false,
|
|
52
|
-
verbose: (
|
|
52
|
+
verbose: (ref4 = args["--verbose"]) != null ? ref4 : _env.env.EXPO_DEBUG,
|
|
53
53
|
config: args["--config"] ? _path.default.resolve(args["--config"]) : undefined,
|
|
54
54
|
dev,
|
|
55
55
|
minify
|