@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/export/embed/resolveOptions.ts"],"sourcesContent":["import arg from 'arg';\nimport path from 'path';\n\nimport { env } from '../../utils/env';\nimport { CommandError } from '../../utils/errors';\nimport { resolveCustomBooleanArgsAsync } from '../../utils/resolveArgs';\n\nexport interface Options {\n assetsDest?: string;\n assetCatalogDest?: string;\n entryFile: string;\n resetCache: boolean;\n resetGlobalCache: boolean;\n transformer?: string;\n minify?: boolean;\n config?: string;\n platform: string;\n dev: boolean;\n bundleOutput: string;\n bundleEncoding?: string;\n maxWorkers?: number;\n sourcemapOutput?: string;\n sourcemapSourcesRoot?: string;\n sourcemapUseAbsolutePath: boolean;\n verbose: boolean;\n unstableTransformProfile
|
|
1
|
+
{"version":3,"sources":["../../../../src/export/embed/resolveOptions.ts"],"sourcesContent":["import arg from 'arg';\nimport path from 'path';\n\nimport { env } from '../../utils/env';\nimport { CommandError } from '../../utils/errors';\nimport { resolveCustomBooleanArgsAsync } from '../../utils/resolveArgs';\n\nexport interface Options {\n assetsDest?: string;\n assetCatalogDest?: string;\n entryFile: string;\n resetCache: boolean;\n resetGlobalCache: boolean;\n transformer?: string;\n minify?: boolean;\n config?: string;\n platform: string;\n dev: boolean;\n bundleOutput: string;\n bundleEncoding?: string;\n maxWorkers?: number;\n sourcemapOutput?: string;\n sourcemapSourcesRoot?: string;\n sourcemapUseAbsolutePath: boolean;\n verbose: boolean;\n unstableTransformProfile?: string;\n}\n\nfunction assertIsBoolean(val: any): asserts val is boolean {\n if (typeof val !== 'boolean') {\n throw new CommandError(`Expected boolean, got ${typeof val}`);\n }\n}\n\nexport function resolveOptions(\n args: arg.Result<arg.Spec>,\n parsed: Awaited<ReturnType<typeof resolveCustomBooleanArgsAsync>>\n): Options {\n const dev = parsed.args['--dev'] ?? true;\n assertIsBoolean(dev);\n\n const minify = parsed.args['--minify'] ?? !dev;\n assertIsBoolean(minify);\n\n const entryFile = args['--entry-file'];\n if (!entryFile) {\n throw new CommandError(`Missing required argument: --entry-file`);\n }\n const bundleOutput = args['--bundle-output'];\n if (!bundleOutput) {\n throw new CommandError(`Missing required argument: --bundle-output`);\n }\n return {\n entryFile,\n assetCatalogDest: args['--asset-catalog-dest'],\n platform: args['--platform'] ?? 'ios',\n transformer: args['--transformer'],\n // TODO: Support `--dev false`\n // dev: false,\n bundleOutput,\n bundleEncoding: args['--bundle-encoding'] ?? 'utf8',\n maxWorkers: args['--max-workers'],\n sourcemapOutput: args['--sourcemap-output'],\n sourcemapSourcesRoot: args['--sourcemap-sources-root'],\n sourcemapUseAbsolutePath: !!parsed.args['--sourcemap-use-absolute-path'],\n assetsDest: args['--assets-dest'],\n unstableTransformProfile: args['--unstable-transform-profile'],\n resetCache: !!parsed.args['--reset-cache'],\n resetGlobalCache: false,\n verbose: args['--verbose'] ?? env.EXPO_DEBUG,\n config: args['--config'] ? path.resolve(args['--config']) : undefined,\n dev,\n minify,\n };\n}\n"],"names":["resolveOptions","assertIsBoolean","val","CommandError","args","parsed","dev","minify","entryFile","bundleOutput","assetCatalogDest","platform","transformer","bundleEncoding","maxWorkers","sourcemapOutput","sourcemapSourcesRoot","sourcemapUseAbsolutePath","assetsDest","unstableTransformProfile","resetCache","resetGlobalCache","verbose","env","EXPO_DEBUG","config","path","resolve","undefined"],"mappings":"AAAA;;;;QAkCgBA,cAAc,GAAdA,cAAc;AAjCb,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEH,IAAA,IAAiB,WAAjB,iBAAiB,CAAA;AACR,IAAA,OAAoB,WAApB,oBAAoB,CAAA;;;;;;AAwBjD,SAASC,eAAe,CAACC,GAAQ,EAA0B;IACzD,IAAI,OAAOA,GAAG,KAAK,SAAS,EAAE;QAC5B,MAAM,IAAIC,OAAY,aAAA,CAAC,CAAC,sBAAsB,EAAE,OAAOD,GAAG,CAAC,CAAC,CAAC,CAAC;KAC/D;CACF;AAEM,SAASF,cAAc,CAC5BI,IAA0B,EAC1BC,MAAiE,EACxD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EAAE,CAAC,CAACZ,MAAM,CAACD,IAAI,CAAC,+BAA+B,CAAC;QACxEc,UAAU,EAAEd,IAAI,CAAC,eAAe,CAAC;QACjCe,wBAAwB,EAAEf,IAAI,CAAC,8BAA8B,CAAC;QAC9DgB,UAAU,EAAE,CAAC,CAACf,MAAM,CAACD,IAAI,CAAC,eAAe,CAAC;QAC1CiB,gBAAgB,EAAE,KAAK;QACvBC,OAAO,EAAElB,CAAAA,IAAiB,GAAjBA,IAAI,CAAC,WAAW,CAAC,YAAjBA,IAAiB,GAAImB,IAAG,IAAA,CAACC,UAAU;QAC5CC,MAAM,EAAErB,IAAI,CAAC,UAAU,CAAC,GAAGsB,KAAI,QAAA,CAACC,OAAO,CAACvB,IAAI,CAAC,UAAU,CAAC,CAAC,GAAGwB,SAAS;QACrEtB,GAAG;QACHC,MAAM;KACP,CAAC;CACH"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.getXcodeCompilerErrorMessage = getXcodeCompilerErrorMessage;
|
|
6
|
+
exports.logMetroErrorInXcode = logMetroErrorInXcode;
|
|
7
|
+
exports.isExecutingFromXcodebuild = isExecutingFromXcodebuild;
|
|
8
|
+
var _fs = _interopRequireDefault(require("fs"));
|
|
9
|
+
var _path = _interopRequireDefault(require("path"));
|
|
10
|
+
function _interopRequireDefault(obj) {
|
|
11
|
+
return obj && obj.__esModule ? obj : {
|
|
12
|
+
default: obj
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function isPossiblyUnableToResolveError(error) {
|
|
16
|
+
return "message" in error && typeof error.message === "string" && "originModulePath" in error && typeof error.originModulePath === "string" && "targetModuleName" in error && typeof error.targetModuleName === "string";
|
|
17
|
+
}
|
|
18
|
+
function isPossiblyTransformError(error) {
|
|
19
|
+
return "message" in error && typeof error.message === "string" && "filename" in error && typeof error.filename === "string" && "lineNumber" in error && typeof error.lineNumber === "number";
|
|
20
|
+
}
|
|
21
|
+
function getXcodeCompilerErrorMessage(projectRoot, error) {
|
|
22
|
+
const makeFilepathAbsolute = (filepath)=>filepath.startsWith("/") ? filepath : _path.default.join(projectRoot, filepath)
|
|
23
|
+
;
|
|
24
|
+
if ("message" in error) {
|
|
25
|
+
// Metro's `UnableToResolveError`
|
|
26
|
+
if (isPossiblyUnableToResolveError(error)) {
|
|
27
|
+
const loc = getLineNumberForStringInFile(error.originModulePath, error.targetModuleName);
|
|
28
|
+
return makeXcodeCompilerLog("error", error.message, {
|
|
29
|
+
fileName: error.originModulePath,
|
|
30
|
+
lineNumber: loc == null ? void 0 : loc.lineNumber,
|
|
31
|
+
column: loc == null ? void 0 : loc.column
|
|
32
|
+
});
|
|
33
|
+
} else if (isPossiblyTransformError(error)) {
|
|
34
|
+
return makeXcodeCompilerLog("error", error.message, {
|
|
35
|
+
// Metro generally returns the filename as relative from the project root.
|
|
36
|
+
fileName: makeFilepathAbsolute(error.filename),
|
|
37
|
+
lineNumber: error.lineNumber,
|
|
38
|
+
column: error.column
|
|
39
|
+
});
|
|
40
|
+
// TODO: ResourceNotFoundError, GraphNotFoundError, RevisionNotFoundError, AmbiguousModuleResolutionError
|
|
41
|
+
} else {
|
|
42
|
+
// Unknown error
|
|
43
|
+
return makeXcodeCompilerLog("error", error.message);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
function logMetroErrorInXcode(projectRoot, error) {
|
|
49
|
+
const message = getXcodeCompilerErrorMessage(projectRoot, error);
|
|
50
|
+
if (message != null) {
|
|
51
|
+
console.error(message);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function isExecutingFromXcodebuild() {
|
|
55
|
+
return !!process.env.BUILT_PRODUCTS_DIR;
|
|
56
|
+
}
|
|
57
|
+
function makeXcodeCompilerLog(type, message, { fileName , lineNumber , column } = {}) {
|
|
58
|
+
// TODO: Figure out how to support multi-line logs.
|
|
59
|
+
const firstLine = message.split("\n")[0];
|
|
60
|
+
if (fileName && !(fileName == null ? void 0 : fileName.includes(":"))) {
|
|
61
|
+
return `${fileName}:${lineNumber || 0}:${column != null ? column + ":" : ""} ${type}: ${firstLine}`;
|
|
62
|
+
}
|
|
63
|
+
return `${type}: ${firstLine}`;
|
|
64
|
+
}
|
|
65
|
+
// TODO: Metro doesn't expose this info even though it knows it.
|
|
66
|
+
function getLineNumberForStringInFile(originModulePath, targetModuleName) {
|
|
67
|
+
let file;
|
|
68
|
+
try {
|
|
69
|
+
file = _fs.default.readFileSync(originModulePath, "utf8");
|
|
70
|
+
} catch (error) {
|
|
71
|
+
if (error.code === "ENOENT" || error.code === "EISDIR") {
|
|
72
|
+
// We're probably dealing with a virtualised file system where
|
|
73
|
+
// `this.originModulePath` doesn't actually exist on disk.
|
|
74
|
+
// We can't show a code frame, but there's no need to let this I/O
|
|
75
|
+
// error shadow the original module resolution error.
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
throw error;
|
|
79
|
+
}
|
|
80
|
+
const lines = file.split("\n");
|
|
81
|
+
let lineNumber = 0;
|
|
82
|
+
let column = -1;
|
|
83
|
+
for(let line = 0; line < lines.length; line++){
|
|
84
|
+
const columnLocation = lines[line].lastIndexOf(targetModuleName);
|
|
85
|
+
if (columnLocation >= 0) {
|
|
86
|
+
lineNumber = line;
|
|
87
|
+
column = columnLocation;
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
lineNumber,
|
|
93
|
+
column
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
//# sourceMappingURL=xcodeCompilerLogger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/export/embed/xcodeCompilerLogger.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 fs from 'fs';\nimport path from 'path';\n\nfunction isPossiblyUnableToResolveError(\n error: any\n): error is { message: string; originModulePath: string; targetModuleName: string } {\n return (\n 'message' in error &&\n typeof error.message === 'string' &&\n 'originModulePath' in error &&\n typeof error.originModulePath === 'string' &&\n 'targetModuleName' in error &&\n typeof error.targetModuleName === 'string'\n );\n}\nfunction isPossiblyTransformError(\n error: any\n): error is { message: string; filename: string; lineNumber: number; column?: number } {\n return (\n 'message' in error &&\n typeof error.message === 'string' &&\n 'filename' in error &&\n typeof error.filename === 'string' &&\n 'lineNumber' in error &&\n typeof error.lineNumber === 'number'\n );\n}\n\nexport function getXcodeCompilerErrorMessage(\n projectRoot: string,\n error: Error | any\n): string | null {\n const makeFilepathAbsolute = (filepath: string) =>\n filepath.startsWith('/') ? filepath : path.join(projectRoot, filepath);\n\n if ('message' in error) {\n // Metro's `UnableToResolveError`\n if (isPossiblyUnableToResolveError(error)) {\n const loc = getLineNumberForStringInFile(error.originModulePath, error.targetModuleName);\n return makeXcodeCompilerLog('error', error.message, {\n fileName: error.originModulePath,\n lineNumber: loc?.lineNumber,\n column: loc?.column,\n });\n } else if (isPossiblyTransformError(error)) {\n return makeXcodeCompilerLog('error', error.message, {\n // Metro generally returns the filename as relative from the project root.\n fileName: makeFilepathAbsolute(error.filename),\n lineNumber: error.lineNumber,\n column: error.column,\n });\n // TODO: ResourceNotFoundError, GraphNotFoundError, RevisionNotFoundError, AmbiguousModuleResolutionError\n } else {\n // Unknown error\n return makeXcodeCompilerLog('error', error.message);\n }\n }\n\n return null;\n}\n\nexport function logMetroErrorInXcode(projectRoot: string, error: Error) {\n const message = getXcodeCompilerErrorMessage(projectRoot, error);\n if (message != null) {\n console.error(message);\n }\n}\n\n// https://developer.apple.com/documentation/xcode/running-custom-scripts-during-a-build#Access-script-related-files-from-environment-variables\nexport function isExecutingFromXcodebuild() {\n return !!process.env.BUILT_PRODUCTS_DIR;\n}\n\nfunction makeXcodeCompilerLog(\n type: 'error' | 'fatal error' | 'warning' | 'note',\n message: string,\n {\n fileName,\n lineNumber,\n column,\n }: {\n /** Absolute file path to link to in Xcode. */\n fileName?: string;\n lineNumber?: number;\n column?: number;\n } = {}\n) {\n // TODO: Figure out how to support multi-line logs.\n const firstLine = message.split('\\n')[0];\n if (fileName && !fileName?.includes(':')) {\n return `${fileName}:${lineNumber || 0}:${\n column != null ? column + ':' : ''\n } ${type}: ${firstLine}`;\n }\n return `${type}: ${firstLine}`;\n}\n\n// TODO: Metro doesn't expose this info even though it knows it.\nfunction getLineNumberForStringInFile(originModulePath: string, targetModuleName: string) {\n let file;\n try {\n file = fs.readFileSync(originModulePath, 'utf8');\n } catch (error: any) {\n if (error.code === 'ENOENT' || error.code === 'EISDIR') {\n // We're probably dealing with a virtualised file system where\n // `this.originModulePath` doesn't actually exist on disk.\n // We can't show a code frame, but there's no need to let this I/O\n // error shadow the original module resolution error.\n return null;\n }\n throw error;\n }\n const lines = file.split('\\n');\n let lineNumber = 0;\n let column = -1;\n for (let line = 0; line < lines.length; line++) {\n const columnLocation = lines[line].lastIndexOf(targetModuleName);\n if (columnLocation >= 0) {\n lineNumber = line;\n column = columnLocation;\n break;\n }\n }\n return { lineNumber, column };\n}\n"],"names":["getXcodeCompilerErrorMessage","logMetroErrorInXcode","isExecutingFromXcodebuild","isPossiblyUnableToResolveError","error","message","originModulePath","targetModuleName","isPossiblyTransformError","filename","lineNumber","projectRoot","makeFilepathAbsolute","filepath","startsWith","path","join","loc","getLineNumberForStringInFile","makeXcodeCompilerLog","fileName","column","console","process","env","BUILT_PRODUCTS_DIR","type","firstLine","split","includes","file","fs","readFileSync","code","lines","line","length","columnLocation","lastIndexOf"],"mappings":"AAMA;;;;QA4BgBA,4BAA4B,GAA5BA,4BAA4B;QAiC5BC,oBAAoB,GAApBA,oBAAoB;QAQpBC,yBAAyB,GAAzBA,yBAAyB;AArE1B,IAAA,GAAI,kCAAJ,IAAI,EAAA;AACF,IAAA,KAAM,kCAAN,MAAM,EAA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@@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
exports.exportAppAsync = exportAppAsync;
|
|
6
6
|
var _config = require("@expo/config");
|
|
7
7
|
var _chalk = _interopRequireDefault(require("chalk"));
|
|
8
|
-
var _fs = _interopRequireDefault(require("fs"));
|
|
9
8
|
var _path = _interopRequireDefault(require("path"));
|
|
9
|
+
var _createMetadataJson = require("./createMetadataJson");
|
|
10
10
|
var _exportAssets = require("./exportAssets");
|
|
11
11
|
var _exportStaticAsync = require("./exportStaticAsync");
|
|
12
12
|
var _favicon = require("./favicon");
|
|
13
13
|
var _forkBundleAsync = require("./fork-bundleAsync");
|
|
14
14
|
var _getPublicExpoManifest = require("./getPublicExpoManifest");
|
|
15
|
-
var
|
|
16
|
-
var
|
|
15
|
+
var _publicFolder = require("./publicFolder");
|
|
16
|
+
var _saveAssets = require("./saveAssets");
|
|
17
17
|
var _writeContents = require("./writeContents");
|
|
18
18
|
var Log = _interopRequireWildcard(require("../log"));
|
|
19
|
+
var _router = require("../start/server/metro/router");
|
|
20
|
+
var _serializeHtml = require("../start/server/metro/serializeHtml");
|
|
21
|
+
var _metroOptions = require("../start/server/middleware/metroOptions");
|
|
19
22
|
var _webTemplate = require("../start/server/webTemplate");
|
|
20
|
-
var _dir = require("../utils/dir");
|
|
21
23
|
var _env = require("../utils/env");
|
|
22
24
|
var _nodeEnv = require("../utils/nodeEnv");
|
|
23
25
|
function _interopRequireDefault(obj) {
|
|
@@ -46,8 +48,8 @@ function _interopRequireWildcard(obj) {
|
|
|
46
48
|
return newObj;
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
|
-
async function exportAppAsync(projectRoot, { platforms , outputDir , clear , dev , dumpAssetmap ,
|
|
50
|
-
var ref
|
|
51
|
+
async function exportAppAsync(projectRoot, { platforms , outputDir , clear , dev , dumpAssetmap , sourceMaps , minify , maxWorkers }) {
|
|
52
|
+
var ref;
|
|
51
53
|
(0, _nodeEnv).setNodeEnv(dev ? "development" : "production");
|
|
52
54
|
require("@expo/env").load(projectRoot);
|
|
53
55
|
const projectConfig = (0, _config).getConfig(projectRoot);
|
|
@@ -55,169 +57,143 @@ async function exportAppAsync(projectRoot, { platforms , outputDir , clear , dev
|
|
|
55
57
|
// Web doesn't require validation.
|
|
56
58
|
skipValidation: platforms.length === 1 && platforms[0] === "web"
|
|
57
59
|
});
|
|
58
|
-
var
|
|
60
|
+
var ref1;
|
|
59
61
|
const useServerRendering = [
|
|
60
62
|
"static",
|
|
61
63
|
"server"
|
|
62
|
-
].includes((
|
|
63
|
-
|
|
64
|
-
const basePath = ((ref4 = (ref1 = exp.experiments) == null ? void 0 : (ref2 = ref1.basePath) == null ? void 0 : ref2.replace(/\/+$/, "")) != null ? ref4 : "").trim();
|
|
64
|
+
].includes((ref1 = (ref = exp.web) == null ? void 0 : ref.output) != null ? ref1 : "");
|
|
65
|
+
const baseUrl = (0, _metroOptions).getBaseUrlFromExpoConfig(exp);
|
|
65
66
|
// Print out logs
|
|
66
|
-
if (
|
|
67
|
+
if (baseUrl) {
|
|
67
68
|
Log.log();
|
|
68
|
-
Log.log(_chalk.default.gray`Using (experimental) base path: ${
|
|
69
|
+
Log.log(_chalk.default.gray`Using (experimental) base path: ${baseUrl}`);
|
|
69
70
|
// Warn if not using an absolute path.
|
|
70
|
-
if (!
|
|
71
|
+
if (!baseUrl.startsWith("/")) {
|
|
71
72
|
Log.log(_chalk.default.yellow` Base path does not start with a slash. Requests will not be absolute.`);
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
const publicPath = _path.default.resolve(projectRoot, _env.env.EXPO_PUBLIC_FOLDER);
|
|
75
76
|
const outputPath = _path.default.resolve(projectRoot, outputDir);
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
await Promise.all([
|
|
80
|
-
assetsPath,
|
|
81
|
-
bundlesPath
|
|
82
|
-
].map(_dir.ensureDirectoryAsync));
|
|
83
|
-
await copyPublicFolderAsync(publicPath, staticFolder);
|
|
77
|
+
// NOTE(kitten): The public folder is currently always copied, regardless of targetDomain
|
|
78
|
+
// split. Hence, there's another separate `copyPublicFolderAsync` call below for `web`
|
|
79
|
+
await (0, _publicFolder).copyPublicFolderAsync(publicPath, outputPath);
|
|
84
80
|
// Run metro bundler and create the JS bundles/source maps.
|
|
85
81
|
const bundles = await (0, _forkBundleAsync).createBundlesAsync(projectRoot, projectConfig, {
|
|
86
82
|
clear: !!clear,
|
|
87
|
-
platforms,
|
|
88
83
|
minify,
|
|
89
|
-
sourcemaps:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
84
|
+
sourcemaps: sourceMaps,
|
|
85
|
+
platforms: useServerRendering ? platforms.filter((platform)=>platform !== "web"
|
|
86
|
+
) : platforms,
|
|
87
|
+
dev,
|
|
88
|
+
maxWorkers
|
|
89
|
+
});
|
|
90
|
+
// Write the JS bundles to disk, and get the bundle file names (this could change with async chunk loading support).
|
|
91
|
+
const files = new Map();
|
|
92
|
+
Object.values(bundles).forEach((bundle)=>{
|
|
93
|
+
(0, _saveAssets).getFilesFromSerialAssets(bundle.artifacts, {
|
|
94
|
+
includeSourceMaps: sourceMaps,
|
|
95
|
+
files
|
|
96
|
+
});
|
|
95
97
|
});
|
|
96
98
|
const bundleEntries = Object.entries(bundles);
|
|
99
|
+
// Can be empty during web-only SSG.
|
|
97
100
|
if (bundleEntries.length) {
|
|
98
|
-
//
|
|
99
|
-
(0,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
101
|
+
// TODO: Use same asset system across platforms again.
|
|
102
|
+
const { assets , embeddedHashSet } = await (0, _exportAssets).exportAssetsAsync(projectRoot, {
|
|
103
|
+
files,
|
|
104
|
+
exp,
|
|
105
|
+
outputDir: outputPath,
|
|
106
|
+
bundles,
|
|
107
|
+
baseUrl
|
|
108
|
+
});
|
|
109
|
+
if (dumpAssetmap) {
|
|
110
|
+
Log.log("Creating asset map");
|
|
111
|
+
files.set("assetmap.json", {
|
|
112
|
+
contents: JSON.stringify((0, _writeContents).createAssetMap({
|
|
113
|
+
assets
|
|
114
|
+
}))
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
const fileNames = Object.fromEntries(Object.entries(bundles).map(([platform, bundle])=>[
|
|
118
|
+
platform,
|
|
119
|
+
bundle.artifacts.filter((asset)=>asset.type === "js"
|
|
120
|
+
).map((asset)=>asset.filename
|
|
121
|
+
),
|
|
122
|
+
]
|
|
123
|
+
));
|
|
124
|
+
// build source maps
|
|
125
|
+
if (sourceMaps) {
|
|
126
|
+
Log.log("Preparing additional debugging files");
|
|
127
|
+
// If we output source maps, then add a debug HTML file which the user can open in
|
|
128
|
+
// the web browser to inspect the output like web.
|
|
129
|
+
files.set("debug.html", {
|
|
130
|
+
contents: (0, _writeContents).createSourceMapDebugHtml({
|
|
131
|
+
fileNames: Object.values(fileNames).flat()
|
|
132
|
+
})
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
// Generate a `metadata.json` for EAS Update.
|
|
136
|
+
const contents = (0, _createMetadataJson).createMetadataJson({
|
|
137
|
+
bundles,
|
|
138
|
+
fileNames,
|
|
139
|
+
embeddedHashSet
|
|
140
|
+
});
|
|
141
|
+
files.set("metadata.json", {
|
|
142
|
+
contents: JSON.stringify(contents)
|
|
143
|
+
});
|
|
115
144
|
}
|
|
116
|
-
//
|
|
117
|
-
const { hashes , fileNames } = await (0, _writeContents).writeBundlesAsync({
|
|
118
|
-
bundles,
|
|
119
|
-
useServerRendering,
|
|
120
|
-
outputDir: bundlesPath
|
|
121
|
-
});
|
|
122
|
-
Log.log("Finished saving JS Bundles");
|
|
145
|
+
// Additional web-only steps...
|
|
123
146
|
if (platforms.includes("web")) {
|
|
124
147
|
if (useServerRendering) {
|
|
125
|
-
var
|
|
148
|
+
var ref2;
|
|
149
|
+
const exportServer = ((ref2 = exp.web) == null ? void 0 : ref2.output) === "server";
|
|
150
|
+
if (exportServer) {
|
|
151
|
+
// TODO: Remove when this is abstracted into the files map
|
|
152
|
+
await (0, _publicFolder).copyPublicFolderAsync(publicPath, _path.default.resolve(outputPath, "client"));
|
|
153
|
+
}
|
|
126
154
|
await (0, _exportStaticAsync).unstable_exportStaticAsync(projectRoot, {
|
|
155
|
+
files,
|
|
156
|
+
clear: !!clear,
|
|
127
157
|
outputDir: outputPath,
|
|
128
158
|
minify,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
159
|
+
baseUrl,
|
|
160
|
+
includeSourceMaps: sourceMaps,
|
|
161
|
+
asyncRoutes: (0, _metroOptions).getAsyncRoutesFromExpoConfig(exp, dev ? "development" : "production", "web"),
|
|
162
|
+
routerRoot: (0, _router).getRouterDirectoryModuleIdWithManifest(projectRoot, exp),
|
|
163
|
+
exportServer,
|
|
164
|
+
maxWorkers
|
|
133
165
|
});
|
|
134
|
-
Log.log("Finished saving static files");
|
|
135
166
|
} else {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
167
|
+
// TODO: Unify with exportStaticAsync
|
|
168
|
+
// TODO: Maybe move to the serializer.
|
|
169
|
+
let html = await (0, _serializeHtml).serializeHtmlWithAssets({
|
|
170
|
+
mode: "production",
|
|
171
|
+
resources: bundles.web.artifacts,
|
|
172
|
+
template: await (0, _webTemplate).createTemplateHtmlFromExpoConfigAsync(projectRoot, {
|
|
173
|
+
scripts: [],
|
|
174
|
+
cssLinks: []
|
|
175
|
+
}),
|
|
176
|
+
baseUrl
|
|
146
177
|
});
|
|
147
178
|
// Add the favicon assets to the HTML.
|
|
148
179
|
const modifyHtml = await (0, _favicon).getVirtualFaviconAssetsAsync(projectRoot, {
|
|
149
180
|
outputDir,
|
|
150
|
-
|
|
181
|
+
baseUrl,
|
|
182
|
+
files
|
|
151
183
|
});
|
|
152
184
|
if (modifyHtml) {
|
|
153
185
|
html = modifyHtml(html);
|
|
154
186
|
}
|
|
155
187
|
// Generate SPA-styled HTML file.
|
|
156
188
|
// If web exists, then write the template HTML file.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
if (bundles.web) {
|
|
161
|
-
// Save assets like a typical bundler, preserving the file paths on web.
|
|
162
|
-
// TODO: Update React Native Web to support loading files from asset hashes.
|
|
163
|
-
await (0, _persistMetroAssets).persistMetroAssetsAsync(bundles.web.assets, {
|
|
164
|
-
platform: "web",
|
|
165
|
-
outputDirectory: staticFolder,
|
|
166
|
-
basePath
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
// Can be empty during web-only SSG.
|
|
171
|
-
// TODO: Use same asset system across platforms again.
|
|
172
|
-
if (Object.keys(fileNames).length) {
|
|
173
|
-
const { assets } = await (0, _exportAssets).exportAssetsAsync(projectRoot, {
|
|
174
|
-
exp,
|
|
175
|
-
outputDir: staticFolder,
|
|
176
|
-
bundles
|
|
177
|
-
});
|
|
178
|
-
if (dumpAssetmap) {
|
|
179
|
-
Log.log("Dumping asset map");
|
|
180
|
-
await (0, _writeContents).writeAssetMapAsync({
|
|
181
|
-
outputDir: staticFolder,
|
|
182
|
-
assets
|
|
189
|
+
files.set("index.html", {
|
|
190
|
+
contents: html,
|
|
191
|
+
targetDomain: "client"
|
|
183
192
|
});
|
|
184
193
|
}
|
|
185
|
-
// build source maps
|
|
186
|
-
if (dumpSourcemap) {
|
|
187
|
-
Log.log("Dumping source maps");
|
|
188
|
-
await (0, _writeContents).writeSourceMapsAsync({
|
|
189
|
-
bundles,
|
|
190
|
-
hashes,
|
|
191
|
-
outputDir: bundlesPath,
|
|
192
|
-
fileNames
|
|
193
|
-
});
|
|
194
|
-
Log.log("Preparing additional debugging files");
|
|
195
|
-
// If we output source maps, then add a debug HTML file which the user can open in
|
|
196
|
-
// the web browser to inspect the output like web.
|
|
197
|
-
await (0, _writeContents).writeDebugHtmlAsync({
|
|
198
|
-
outputDir: staticFolder,
|
|
199
|
-
fileNames
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
// Generate a `metadata.json` and the export is complete.
|
|
203
|
-
await (0, _writeContents).writeMetadataJsonAsync({
|
|
204
|
-
outputDir: staticFolder,
|
|
205
|
-
bundles,
|
|
206
|
-
fileNames
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Copy the contents of the public folder into the output folder.
|
|
212
|
-
* This enables users to add static files like `favicon.ico` or `serve.json`.
|
|
213
|
-
*
|
|
214
|
-
* The contents of this folder are completely universal since they refer to
|
|
215
|
-
* static network requests which fall outside the scope of React Native's magic
|
|
216
|
-
* platform resolution patterns.
|
|
217
|
-
*/ async function copyPublicFolderAsync(publicFolder, outputFolder) {
|
|
218
|
-
if (_fs.default.existsSync(publicFolder)) {
|
|
219
|
-
await (0, _dir).copyAsync(publicFolder, outputFolder);
|
|
220
194
|
}
|
|
195
|
+
// Write all files at the end for unified logging.
|
|
196
|
+
await (0, _saveAssets).persistMetroFilesAsync(files, outputPath);
|
|
221
197
|
}
|
|
222
198
|
|
|
223
199
|
//# sourceMappingURL=exportApp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/export/exportApp.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport { exportAssetsAsync, exportCssAssetsAsync } from './exportAssets';\nimport { unstable_exportStaticAsync } from './exportStaticAsync';\nimport { getVirtualFaviconAssetsAsync } from './favicon';\nimport { createBundlesAsync } from './fork-bundleAsync';\nimport { getPublicExpoManifestAsync } from './getPublicExpoManifest';\nimport { persistMetroAssetsAsync } from './persistMetroAssets';\nimport { printBundleSizes } from './printBundleSizes';\nimport { Options } from './resolveOptions';\nimport {\n writeAssetMapAsync,\n writeBundlesAsync,\n writeDebugHtmlAsync,\n writeMetadataJsonAsync,\n writeSourceMapsAsync,\n} from './writeContents';\nimport * as Log from '../log';\nimport { createTemplateHtmlFromExpoConfigAsync } from '../start/server/webTemplate';\nimport { copyAsync, ensureDirectoryAsync } from '../utils/dir';\nimport { env } from '../utils/env';\nimport { setNodeEnv } from '../utils/nodeEnv';\n\n/**\n * The structure of the outputDir will be:\n *\n * ```\n * ├── assets\n * │ └── *\n * ├── bundles\n * │ ├── android-01ee6e3ab3e8c16a4d926c91808d5320.js\n * │ └── ios-ee8206cc754d3f7aa9123b7f909d94ea.js\n * └── metadata.json\n * ```\n */\nexport async function exportAppAsync(\n projectRoot: string,\n {\n platforms,\n outputDir,\n clear,\n dev,\n dumpAssetmap,\n dumpSourcemap,\n minify,\n }: Pick<\n Options,\n 'dumpAssetmap' | 'dumpSourcemap' | 'dev' | 'clear' | 'outputDir' | 'platforms' | 'minify'\n >\n): Promise<void> {\n setNodeEnv(dev ? 'development' : 'production');\n require('@expo/env').load(projectRoot);\n\n const projectConfig = getConfig(projectRoot);\n const exp = await getPublicExpoManifestAsync(projectRoot, {\n // Web doesn't require validation.\n skipValidation: platforms.length === 1 && platforms[0] === 'web',\n });\n\n const useServerRendering = ['static', 'server'].includes(exp.web?.output ?? '');\n const basePath = (exp.experiments?.basePath?.replace(/\\/+$/, '') ?? '').trim();\n\n // Print out logs\n if (basePath) {\n Log.log();\n Log.log(chalk.gray`Using (experimental) base path: ${basePath}`);\n // Warn if not using an absolute path.\n if (!basePath.startsWith('/')) {\n Log.log(\n chalk.yellow` Base path does not start with a slash. Requests will not be absolute.`\n );\n }\n }\n\n const publicPath = path.resolve(projectRoot, env.EXPO_PUBLIC_FOLDER);\n\n const outputPath = path.resolve(projectRoot, outputDir);\n const staticFolder = outputPath;\n const assetsPath = path.join(staticFolder, 'assets');\n const bundlesPath = path.join(staticFolder, 'bundles');\n\n await Promise.all([assetsPath, bundlesPath].map(ensureDirectoryAsync));\n\n await copyPublicFolderAsync(publicPath, staticFolder);\n\n // Run metro bundler and create the JS bundles/source maps.\n const bundles = await createBundlesAsync(projectRoot, projectConfig, {\n clear: !!clear,\n platforms,\n minify,\n sourcemaps: dumpSourcemap,\n // TODO: Breaks asset exports\n // platforms: useServerRendering\n // ? platforms.filter((platform) => platform !== 'web')\n // : platforms,\n dev,\n });\n\n const bundleEntries = Object.entries(bundles);\n if (bundleEntries.length) {\n // Log bundle size info to the user\n printBundleSizes(\n Object.fromEntries(\n bundleEntries.map(([key, value]) => {\n if (!dumpSourcemap) {\n return [\n key,\n {\n ...value,\n // Remove source maps from the bundles if they aren't going to be written.\n map: undefined,\n },\n ];\n }\n\n return [key, value];\n })\n )\n );\n }\n\n // Write the JS bundles to disk, and get the bundle file names (this could change with async chunk loading support).\n const { hashes, fileNames } = await writeBundlesAsync({\n bundles,\n useServerRendering,\n outputDir: bundlesPath,\n });\n\n Log.log('Finished saving JS Bundles');\n\n if (platforms.includes('web')) {\n if (useServerRendering) {\n await unstable_exportStaticAsync(projectRoot, {\n outputDir: outputPath,\n minify,\n basePath,\n includeMaps: dumpSourcemap,\n // @ts-expect-error: server not on type yet\n exportServer: exp.web?.output === 'server',\n });\n Log.log('Finished saving static files');\n } else {\n const cssLinks = await exportCssAssetsAsync({\n outputDir,\n bundles,\n basePath,\n });\n let html = await createTemplateHtmlFromExpoConfigAsync(projectRoot, {\n scripts: [`${basePath}/bundles/${fileNames.web}`],\n cssLinks,\n });\n // Add the favicon assets to the HTML.\n const modifyHtml = await getVirtualFaviconAssetsAsync(projectRoot, {\n outputDir,\n basePath,\n });\n if (modifyHtml) {\n html = modifyHtml(html);\n }\n // Generate SPA-styled HTML file.\n // If web exists, then write the template HTML file.\n await fs.promises.writeFile(path.join(staticFolder, 'index.html'), html);\n }\n\n // TODO: Use a different mechanism for static web.\n if (bundles.web) {\n // Save assets like a typical bundler, preserving the file paths on web.\n // TODO: Update React Native Web to support loading files from asset hashes.\n await persistMetroAssetsAsync(bundles.web.assets, {\n platform: 'web',\n outputDirectory: staticFolder,\n basePath,\n });\n }\n }\n\n // Can be empty during web-only SSG.\n // TODO: Use same asset system across platforms again.\n if (Object.keys(fileNames).length) {\n const { assets } = await exportAssetsAsync(projectRoot, {\n exp,\n outputDir: staticFolder,\n bundles,\n });\n\n if (dumpAssetmap) {\n Log.log('Dumping asset map');\n await writeAssetMapAsync({ outputDir: staticFolder, assets });\n }\n // build source maps\n if (dumpSourcemap) {\n Log.log('Dumping source maps');\n await writeSourceMapsAsync({\n bundles,\n hashes,\n outputDir: bundlesPath,\n fileNames,\n });\n\n Log.log('Preparing additional debugging files');\n // If we output source maps, then add a debug HTML file which the user can open in\n // the web browser to inspect the output like web.\n await writeDebugHtmlAsync({\n outputDir: staticFolder,\n fileNames,\n });\n }\n\n // Generate a `metadata.json` and the export is complete.\n await writeMetadataJsonAsync({ outputDir: staticFolder, bundles, fileNames });\n }\n}\n\n/**\n * Copy the contents of the public folder into the output folder.\n * This enables users to add static files like `favicon.ico` or `serve.json`.\n *\n * The contents of this folder are completely universal since they refer to\n * static network requests which fall outside the scope of React Native's magic\n * platform resolution patterns.\n */\nasync function copyPublicFolderAsync(publicFolder: string, outputFolder: string) {\n if (fs.existsSync(publicFolder)) {\n await copyAsync(publicFolder, outputFolder);\n }\n}\n"],"names":["exportAppAsync","Log","projectRoot","platforms","outputDir","clear","dev","dumpAssetmap","dumpSourcemap","minify","exp","setNodeEnv","require","load","projectConfig","getConfig","getPublicExpoManifestAsync","skipValidation","length","useServerRendering","includes","web","output","basePath","experiments","replace","trim","log","chalk","gray","startsWith","yellow","publicPath","path","resolve","env","EXPO_PUBLIC_FOLDER","outputPath","staticFolder","assetsPath","join","bundlesPath","Promise","all","map","ensureDirectoryAsync","copyPublicFolderAsync","bundles","createBundlesAsync","sourcemaps","bundleEntries","Object","entries","printBundleSizes","fromEntries","key","value","undefined","hashes","fileNames","writeBundlesAsync","unstable_exportStaticAsync","includeMaps","exportServer","cssLinks","exportCssAssetsAsync","html","createTemplateHtmlFromExpoConfigAsync","scripts","modifyHtml","getVirtualFaviconAssetsAsync","fs","promises","writeFile","persistMetroAssetsAsync","assets","platform","outputDirectory","keys","exportAssetsAsync","writeAssetMapAsync","writeSourceMapsAsync","writeDebugHtmlAsync","writeMetadataJsonAsync","publicFolder","outputFolder","existsSync","copyAsync"],"mappings":"AAAA;;;;QAsCsBA,cAAc,GAAdA,cAAc;AAtCV,IAAA,OAAc,WAAd,cAAc,CAAA;AACtB,IAAA,MAAO,kCAAP,OAAO,EAAA;AACV,IAAA,GAAI,kCAAJ,IAAI,EAAA;AACF,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEiC,IAAA,aAAgB,WAAhB,gBAAgB,CAAA;AAC7B,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AACnB,IAAA,QAAW,WAAX,WAAW,CAAA;AACrB,IAAA,gBAAoB,WAApB,oBAAoB,CAAA;AACZ,IAAA,sBAAyB,WAAzB,yBAAyB,CAAA;AAC5B,IAAA,mBAAsB,WAAtB,sBAAsB,CAAA;AAC7B,IAAA,iBAAoB,WAApB,oBAAoB,CAAA;AAQ9C,IAAA,cAAiB,WAAjB,iBAAiB,CAAA;AACZC,IAAAA,GAAG,mCAAM,QAAQ,EAAd;AACuC,IAAA,YAA6B,WAA7B,6BAA6B,CAAA;AACnC,IAAA,IAAc,WAAd,cAAc,CAAA;AAC1C,IAAA,IAAc,WAAd,cAAc,CAAA;AACP,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AActC,eAAeD,cAAc,CAClCE,WAAmB,EACnB,EACEC,SAAS,CAAA,EACTC,SAAS,CAAA,EACTC,KAAK,CAAA,EACLC,GAAG,CAAA,EACHC,YAAY,CAAA,EACZC,aAAa,CAAA,EACbC,MAAM,CAAA,EAIP,EACc;QAU0CC,GAAO,EAC9CA,IAAe;IAVjCC,CAAAA,G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;SACR,CAAC,AAAC;QAEH,IAAIxC,YAAY,EAAE;YAChBN,GAAG,CAAC0B,GAAG,CAAC,mBAAmB,CAAC,CAAC;YAC7B,MAAMqD,CAAAA,GAAAA,cAAkB,AAAqC,CAAA,mBAArC,CAAC;gBAAE5E,SAAS,EAAEkC,YAAY;gBAAEqC,MAAM;aAAE,CAAC,CAAC;SAC/D;QACD,oBAAoB;QACpB,IAAInE,aAAa,EAAE;YACjBP,GAAG,CAAC0B,GAAG,CAAC,qBAAqB,CAAC,CAAC;YAC/B,MAAMsD,CAAAA,GAAAA,cAAoB,AAKxB,CAAA,qBALwB,CAAC;gBACzBlC,OAAO;gBACPW,MAAM;gBACNtD,SAAS,EAAEqC,WAAW;gBACtBkB,SAAS;aACV,CAAC,CAAC;YAEH1D,GAAG,CAAC0B,GAAG,CAAC,sCAAsC,CAAC,CAAC;YAChD,kFAAkF;YAClF,kDAAkD;YAClD,MAAMuD,CAAAA,GAAAA,cAAmB,AAGvB,CAAA,oBAHuB,CAAC;gBACxB9E,SAAS,EAAEkC,YAAY;gBACvBqB,SAAS;aACV,CAAC,CAAC;SACJ;QAED,yDAAyD;QACzD,MAAMwB,CAAAA,GAAAA,cAAsB,AAAiD,CAAA,uBAAjD,CAAC;YAAE/E,SAAS,EAAEkC,YAAY;YAAES,OAAO;YAAEY,SAAS;SAAE,CAAC,CAAC;KAC/E;CACF;AAED;;;;;;;GAOG,CACH,eAAeb,qBAAqB,CAACsC,YAAoB,EAAEC,YAAoB,EAAE;IAC/E,IAAId,GAAE,QAAA,CAACe,UAAU,CAACF,YAAY,CAAC,EAAE;QAC/B,MAAMG,CAAAA,GAAAA,IAAS,AAA4B,CAAA,UAA5B,CAACH,YAAY,EAAEC,YAAY,CAAC,CAAC;KAC7C;CACF"}
|
|
1
|
+
{"version":3,"sources":["../../../src/export/exportApp.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\nimport chalk from 'chalk';\nimport path from 'path';\n\nimport { createMetadataJson } from './createMetadataJson';\nimport { exportAssetsAsync } from './exportAssets';\nimport { unstable_exportStaticAsync } from './exportStaticAsync';\nimport { getVirtualFaviconAssetsAsync } from './favicon';\nimport { createBundlesAsync } from './fork-bundleAsync';\nimport { getPublicExpoManifestAsync } from './getPublicExpoManifest';\nimport { copyPublicFolderAsync } from './publicFolder';\nimport { Options } from './resolveOptions';\nimport { ExportAssetMap, getFilesFromSerialAssets, persistMetroFilesAsync } from './saveAssets';\nimport { createAssetMap, createSourceMapDebugHtml } from './writeContents';\nimport * as Log from '../log';\nimport { getRouterDirectoryModuleIdWithManifest } from '../start/server/metro/router';\nimport { serializeHtmlWithAssets } from '../start/server/metro/serializeHtml';\nimport {\n getAsyncRoutesFromExpoConfig,\n getBaseUrlFromExpoConfig,\n} from '../start/server/middleware/metroOptions';\nimport { createTemplateHtmlFromExpoConfigAsync } from '../start/server/webTemplate';\nimport { env } from '../utils/env';\nimport { setNodeEnv } from '../utils/nodeEnv';\n\nexport async function exportAppAsync(\n projectRoot: string,\n {\n platforms,\n outputDir,\n clear,\n dev,\n dumpAssetmap,\n sourceMaps,\n minify,\n maxWorkers,\n }: Pick<\n Options,\n | 'dumpAssetmap'\n | 'sourceMaps'\n | 'dev'\n | 'clear'\n | 'outputDir'\n | 'platforms'\n | 'minify'\n | 'maxWorkers'\n >\n): Promise<void> {\n setNodeEnv(dev ? 'development' : 'production');\n require('@expo/env').load(projectRoot);\n\n const projectConfig = getConfig(projectRoot);\n const exp = await getPublicExpoManifestAsync(projectRoot, {\n // Web doesn't require validation.\n skipValidation: platforms.length === 1 && platforms[0] === 'web',\n });\n\n const useServerRendering = ['static', 'server'].includes(exp.web?.output ?? '');\n const baseUrl = getBaseUrlFromExpoConfig(exp);\n\n // Print out logs\n if (baseUrl) {\n Log.log();\n Log.log(chalk.gray`Using (experimental) base path: ${baseUrl}`);\n // Warn if not using an absolute path.\n if (!baseUrl.startsWith('/')) {\n Log.log(\n chalk.yellow` Base path does not start with a slash. Requests will not be absolute.`\n );\n }\n }\n\n const publicPath = path.resolve(projectRoot, env.EXPO_PUBLIC_FOLDER);\n const outputPath = path.resolve(projectRoot, outputDir);\n\n // NOTE(kitten): The public folder is currently always copied, regardless of targetDomain\n // split. Hence, there's another separate `copyPublicFolderAsync` call below for `web`\n await copyPublicFolderAsync(publicPath, outputPath);\n\n // Run metro bundler and create the JS bundles/source maps.\n const bundles = await createBundlesAsync(projectRoot, projectConfig, {\n clear: !!clear,\n minify,\n sourcemaps: sourceMaps,\n platforms: useServerRendering ? platforms.filter((platform) => platform !== 'web') : platforms,\n dev,\n maxWorkers,\n });\n\n // Write the JS bundles to disk, and get the bundle file names (this could change with async chunk loading support).\n\n const files: ExportAssetMap = new Map();\n\n Object.values(bundles).forEach((bundle) => {\n getFilesFromSerialAssets(bundle.artifacts, {\n includeSourceMaps: sourceMaps,\n files,\n });\n });\n\n const bundleEntries = Object.entries(bundles);\n // Can be empty during web-only SSG.\n if (bundleEntries.length) {\n // TODO: Use same asset system across platforms again.\n const { assets, embeddedHashSet } = await exportAssetsAsync(projectRoot, {\n files,\n exp,\n outputDir: outputPath,\n bundles,\n baseUrl,\n });\n\n if (dumpAssetmap) {\n Log.log('Creating asset map');\n files.set('assetmap.json', { contents: JSON.stringify(createAssetMap({ assets })) });\n }\n\n const fileNames = Object.fromEntries(\n Object.entries(bundles).map(([platform, bundle]) => [\n platform,\n bundle.artifacts.filter((asset) => asset.type === 'js').map((asset) => asset.filename),\n ])\n );\n\n // build source maps\n if (sourceMaps) {\n Log.log('Preparing additional debugging files');\n // If we output source maps, then add a debug HTML file which the user can open in\n // the web browser to inspect the output like web.\n files.set('debug.html', {\n contents: createSourceMapDebugHtml({\n fileNames: Object.values(fileNames).flat(),\n }),\n });\n }\n\n // Generate a `metadata.json` for EAS Update.\n const contents = createMetadataJson({\n bundles,\n fileNames,\n embeddedHashSet,\n });\n files.set('metadata.json', { contents: JSON.stringify(contents) });\n }\n\n // Additional web-only steps...\n\n if (platforms.includes('web')) {\n if (useServerRendering) {\n const exportServer = exp.web?.output === 'server';\n\n if (exportServer) {\n // TODO: Remove when this is abstracted into the files map\n await copyPublicFolderAsync(publicPath, path.resolve(outputPath, 'client'));\n }\n\n await unstable_exportStaticAsync(projectRoot, {\n files,\n clear: !!clear,\n outputDir: outputPath,\n minify,\n baseUrl,\n includeSourceMaps: sourceMaps,\n asyncRoutes: getAsyncRoutesFromExpoConfig(exp, dev ? 'development' : 'production', 'web'),\n routerRoot: getRouterDirectoryModuleIdWithManifest(projectRoot, exp),\n exportServer,\n maxWorkers,\n });\n } else {\n // TODO: Unify with exportStaticAsync\n // TODO: Maybe move to the serializer.\n let html = await serializeHtmlWithAssets({\n mode: 'production',\n resources: bundles.web!.artifacts,\n template: await createTemplateHtmlFromExpoConfigAsync(projectRoot, {\n scripts: [],\n cssLinks: [],\n }),\n baseUrl,\n });\n\n // Add the favicon assets to the HTML.\n const modifyHtml = await getVirtualFaviconAssetsAsync(projectRoot, {\n outputDir,\n baseUrl,\n files,\n });\n if (modifyHtml) {\n html = modifyHtml(html);\n }\n\n // Generate SPA-styled HTML file.\n // If web exists, then write the template HTML file.\n files.set('index.html', {\n contents: html,\n targetDomain: 'client',\n });\n }\n }\n\n // Write all files at the end for unified logging.\n await persistMetroFilesAsync(files, outputPath);\n}\n"],"names":["exportAppAsync","Log","projectRoot","platforms","outputDir","clear","dev","dumpAssetmap","sourceMaps","minify","maxWorkers","exp","setNodeEnv","require","load","projectConfig","getConfig","getPublicExpoManifestAsync","skipValidation","length","useServerRendering","includes","web","output","baseUrl","getBaseUrlFromExpoConfig","log","chalk","gray","startsWith","yellow","publicPath","path","resolve","env","EXPO_PUBLIC_FOLDER","outputPath","copyPublicFolderAsync","bundles","createBundlesAsync","sourcemaps","filter","platform","files","Map","Object","values","forEach","bundle","getFilesFromSerialAssets","artifacts","includeSourceMaps","bundleEntries","entries","assets","embeddedHashSet","exportAssetsAsync","set","contents","JSON","stringify","createAssetMap","fileNames","fromEntries","map","asset","type","filename","createSourceMapDebugHtml","flat","createMetadataJson","exportServer","unstable_exportStaticAsync","asyncRoutes","getAsyncRoutesFromExpoConfig","routerRoot","getRouterDirectoryModuleIdWithManifest","html","serializeHtmlWithAssets","mode","resources","template","createTemplateHtmlFromExpoConfigAsync","scripts","cssLinks","modifyHtml","getVirtualFaviconAssetsAsync","targetDomain","persistMetroFilesAsync"],"mappings":"AAAA;;;;QAyBsBA,cAAc,GAAdA,cAAc;AAzBV,IAAA,OAAc,WAAd,cAAc,CAAA;AACtB,IAAA,MAAO,kCAAP,OAAO,EAAA;AACR,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEY,IAAA,mBAAsB,WAAtB,sBAAsB,CAAA;AACvB,IAAA,aAAgB,WAAhB,gBAAgB,CAAA;AACP,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AACnB,IAAA,QAAW,WAAX,WAAW,CAAA;AACrB,IAAA,gBAAoB,WAApB,oBAAoB,CAAA;AACZ,IAAA,sBAAyB,WAAzB,yBAAyB,CAAA;AAC9B,IAAA,aAAgB,WAAhB,gBAAgB,CAAA;AAE2B,IAAA,WAAc,WAAd,cAAc,CAAA;AACtC,IAAA,cAAiB,WAAjB,iBAAiB,CAAA;AAC9DC,IAAAA,GAAG,mCAAM,QAAQ,EAAd;AACwC,IAAA,OAA8B,WAA9B,8BAA8B,CAAA;AAC7C,IAAA,cAAqC,WAArC,qCAAqC,CAAA;AAItE,IAAA,aAAyC,WAAzC,yCAAyC,CAAA;AACM,IAAA,YAA6B,WAA7B,6BAA6B,CAAA;AAC/D,IAAA,IAAc,WAAd,cAAc,CAAA;AACP,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,eAAeD,cAAc,CAClCE,WAAmB,EACnB,EACEC,SAAS,CAAA,EACTC,SAAS,CAAA,EACTC,KAAK,CAAA,EACLC,GAAG,CAAA,EACHC,YAAY,CAAA,EACZC,UAAU,CAAA,EACVC,MAAM,CAAA,EACNC,UAAU,CAA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