@expo/cli 0.22.7 → 0.22.8
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 +1 -1
- package/build/src/customize/customizeAsync.js +4 -1
- package/build/src/customize/customizeAsync.js.map +1 -1
- package/build/src/customize/templates.js +12 -0
- package/build/src/customize/templates.js.map +1 -1
- package/build/src/export/embed/exportEager.js +5 -3
- package/build/src/export/embed/exportEager.js.map +1 -1
- package/build/src/export/embed/exportEmbedAsync.js +1 -1
- package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
- package/build/src/export/embed/exportServer.js +2 -1
- package/build/src/export/embed/exportServer.js.map +1 -1
- package/build/src/export/exportApp.js +2 -1
- package/build/src/export/exportApp.js.map +1 -1
- package/build/src/install/index.js +1 -1
- package/build/src/install/index.js.map +1 -1
- package/build/src/prebuild/index.js +1 -1
- package/build/src/prebuild/index.js.map +1 -1
- package/build/src/run/ios/XcodeBuild.types.js.map +1 -1
- package/build/src/run/ios/index.js +4 -0
- package/build/src/run/ios/index.js.map +1 -1
- package/build/src/run/ios/options/resolveOptions.js +2 -1
- package/build/src/run/ios/options/resolveOptions.js.map +1 -1
- package/build/src/run/ios/runIosAsync.js +87 -8
- package/build/src/run/ios/runIosAsync.js.map +1 -1
- package/build/src/start/server/metro/MetroBundlerDevServer.js +1 -2
- package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
- package/build/src/start/server/metro/createServerComponentsMiddleware.js +42 -5
- package/build/src/start/server/metro/createServerComponentsMiddleware.js.map +1 -1
- package/build/src/utils/env.js +3 -0
- package/build/src/utils/env.js.map +1 -1
- package/build/src/utils/telemetry/clients/FetchClient.js +1 -1
- package/build/src/utils/telemetry/utils/context.js +1 -1
- package/package.json +6 -6
- package/static/template/+html.tsx +28 -0
- package/static/template/+native-intent.ts +9 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/export/exportApp.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\nimport type { Platform } from '@expo/config';\nimport assert from 'assert';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport { type PlatformMetadata, createMetadataJson } from './createMetadataJson';\nimport { exportAssetsAsync } from './exportAssets';\nimport {\n exportDomComponentAsync,\n updateDomComponentAssetsForMD5Naming,\n} from './exportDomComponents';\nimport { assertEngineMismatchAsync, isEnableHermesManaged } from './exportHermes';\nimport { exportApiRoutesStandaloneAsync, exportFromServerAsync } from './exportStaticAsync';\nimport { getVirtualFaviconAssetsAsync } from './favicon';\nimport { getPublicExpoManifestAsync } from './getPublicExpoManifest';\nimport { copyPublicFolderAsync } from './publicFolder';\nimport { Options } from './resolveOptions';\nimport {\n ExportAssetMap,\n BundleOutput,\n getFilesFromSerialAssets,\n persistMetroFilesAsync,\n} from './saveAssets';\nimport { createAssetMap } from './writeContents';\nimport * as Log from '../log';\nimport { WebSupportProjectPrerequisite } from '../start/doctor/web/WebSupportProjectPrerequisite';\nimport { DevServerManager } from '../start/server/DevServerManager';\nimport { MetroBundlerDevServer } from '../start/server/metro/MetroBundlerDevServer';\nimport { getRouterDirectoryModuleIdWithManifest } from '../start/server/metro/router';\nimport { serializeHtmlWithAssets } from '../start/server/metro/serializeHtml';\nimport { getEntryWithServerRoot } from '../start/server/middleware/ManifestMiddleware';\nimport { getBaseUrlFromExpoConfig } from '../start/server/middleware/metroOptions';\nimport { createTemplateHtmlFromExpoConfigAsync } from '../start/server/webTemplate';\nimport { env } from '../utils/env';\nimport { CommandError } from '../utils/errors';\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 bytecode,\n maxWorkers,\n skipSSG,\n }: Pick<\n Options,\n | 'dumpAssetmap'\n | 'sourceMaps'\n | 'dev'\n | 'clear'\n | 'outputDir'\n | 'platforms'\n | 'minify'\n | 'bytecode'\n | 'maxWorkers'\n | 'skipSSG'\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 if (platforms.includes('web')) {\n await new WebSupportProjectPrerequisite(projectRoot).assertAsync();\n }\n\n const useServerRendering = ['static', 'server'].includes(exp.web?.output ?? '');\n\n if (skipSSG && exp.web?.output !== 'server') {\n throw new CommandError('--no-ssg can only be used with `web.output: server`');\n }\n\n const baseUrl = getBaseUrlFromExpoConfig(exp);\n\n if (!bytecode && (platforms.includes('ios') || platforms.includes('android'))) {\n Log.warn(\n `Bytecode makes the app startup faster, disabling bytecode is highly discouraged and should only be used for debugging purposes.`\n );\n }\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 mode = dev ? 'development' : 'production';\n const publicPath = path.resolve(projectRoot, env.EXPO_PUBLIC_FOLDER);\n const outputPath = path.resolve(projectRoot, outputDir);\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 const devServerManager = await DevServerManager.startMetroAsync(projectRoot, {\n minify,\n mode,\n port: 8081,\n isExporting: true,\n location: {},\n resetDevServer: clear,\n maxWorkers,\n });\n\n const devServer = devServerManager.getDefaultDevServer();\n assert(devServer instanceof MetroBundlerDevServer);\n\n const bundles: Partial<Record<Platform, BundleOutput>> = {};\n const domComponentAssetsMetadata: Partial<Record<Platform, PlatformMetadata['assets']>> = {};\n\n const spaPlatforms = useServerRendering\n ? platforms.filter((platform) => platform !== 'web')\n : platforms;\n\n try {\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 // Can be empty during web-only SSG.\n if (spaPlatforms.length) {\n await Promise.all(\n spaPlatforms.map(async (platform) => {\n // Assert early so the user doesn't have to wait until bundling is complete to find out that\n // Hermes won't be available.\n const isHermes = isEnableHermesManaged(exp, platform);\n if (isHermes) {\n await assertEngineMismatchAsync(projectRoot, exp, platform);\n }\n\n // Run metro bundler and create the JS bundles/source maps.\n const bundle = await devServer.nativeExportBundleAsync(\n {\n platform,\n splitChunks:\n !env.EXPO_NO_BUNDLE_SPLITTING &&\n ((devServer.isReactServerComponentsEnabled && !bytecode) || platform === 'web'),\n mainModuleName: getEntryWithServerRoot(projectRoot, {\n platform,\n pkg: projectConfig.pkg,\n }),\n mode: dev ? 'development' : 'production',\n engine: isHermes ? 'hermes' : undefined,\n serializerIncludeMaps: sourceMaps,\n bytecode: bytecode && isHermes,\n reactCompiler: !!exp.experiments?.reactCompiler,\n },\n files\n );\n\n bundles[platform] = bundle;\n domComponentAssetsMetadata[platform] = [];\n\n getFilesFromSerialAssets(bundle.artifacts, {\n includeSourceMaps: sourceMaps,\n files,\n isServerHosted: devServer.isReactServerComponentsEnabled,\n });\n\n // TODO: Remove duplicates...\n const expoDomComponentReferences = bundle.artifacts\n .map((artifact) =>\n Array.isArray(artifact.metadata.expoDomComponentReferences)\n ? artifact.metadata.expoDomComponentReferences\n : []\n )\n .flat();\n await Promise.all(\n // TODO: Make a version of this which uses `this.metro.getBundler().buildGraphForEntries([])` to bundle all the DOM components at once.\n expoDomComponentReferences.map(async (filePath) => {\n const { bundle: platformDomComponentsBundle, htmlOutputName } =\n await exportDomComponentAsync({\n filePath,\n projectRoot,\n dev,\n devServer,\n isHermes,\n includeSourceMaps: sourceMaps,\n exp,\n files,\n });\n\n // Merge the assets from the DOM component into the output assets.\n // @ts-expect-error: mutate assets\n bundle.assets.push(...platformDomComponentsBundle.assets);\n\n const assetsMetadata = updateDomComponentAssetsForMD5Naming({\n domComponentReference: filePath,\n nativeBundle: bundle,\n domComponentBundle: platformDomComponentsBundle,\n files,\n htmlOutputName,\n });\n domComponentAssetsMetadata[platform]?.push(...assetsMetadata);\n })\n );\n\n if (platform === 'web') {\n // TODO: Unify with exportStaticAsync\n // TODO: Maybe move to the serializer.\n let html = await serializeHtmlWithAssets({\n isExporting: true,\n resources: bundle.artifacts,\n template: await createTemplateHtmlFromExpoConfigAsync(projectRoot, {\n scripts: [],\n cssLinks: [],\n exp: projectConfig.exp,\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 exp: projectConfig.exp,\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: devServer.isReactServerComponentsEnabled ? 'server' : 'client',\n });\n }\n })\n );\n\n if (devServer.isReactServerComponentsEnabled) {\n const isWeb = platforms.includes('web');\n if (!(isWeb && useServerRendering)) {\n await exportApiRoutesStandaloneAsync(devServer, {\n files,\n platform: 'web',\n apiRoutesOnly: !isWeb,\n });\n }\n }\n\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 // Generate a `metadata.json` for EAS Update.\n const contents = createMetadataJson({\n bundles,\n fileNames,\n embeddedHashSet,\n domComponentAssetsMetadata,\n });\n files.set('metadata.json', { contents: JSON.stringify(contents) });\n }\n\n // Additional web-only steps...\n\n if (platforms.includes('web') && 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 if (skipSSG) {\n Log.log('Skipping static site generation');\n await exportApiRoutesStandaloneAsync(devServer, {\n files,\n platform: 'web',\n apiRoutesOnly: true,\n });\n\n // Output a placeholder index.html if one doesn't exist in the public directory.\n // This ensures native + API routes have some content at the root URL.\n const placeholderIndex = path.resolve(outputPath, 'client/index.html');\n if (!fs.existsSync(placeholderIndex)) {\n files.set('index.html', {\n contents: `<html><body></body></html>`,\n targetDomain: 'client',\n });\n }\n } else {\n await exportFromServerAsync(projectRoot, devServer, {\n mode,\n files,\n clear: !!clear,\n outputDir: outputPath,\n minify,\n baseUrl,\n includeSourceMaps: sourceMaps,\n routerRoot: getRouterDirectoryModuleIdWithManifest(projectRoot, exp),\n reactCompiler: !!exp.experiments?.reactCompiler,\n exportServer,\n maxWorkers,\n isExporting: true,\n exp: projectConfig.exp,\n });\n }\n }\n } finally {\n await devServerManager.stopAsync();\n }\n\n // Write all files at the end for unified logging.\n await persistMetroFilesAsync(files, outputPath);\n}\n"],"names":["exportAppAsync","projectRoot","platforms","outputDir","clear","dev","dumpAssetmap","sourceMaps","minify","bytecode","maxWorkers","skipSSG","exp","setNodeEnv","require","load","projectConfig","getConfig","getPublicExpoManifestAsync","skipValidation","length","includes","WebSupportProjectPrerequisite","assertAsync","useServerRendering","web","output","CommandError","baseUrl","getBaseUrlFromExpoConfig","Log","warn","log","chalk","gray","startsWith","yellow","mode","publicPath","path","resolve","env","EXPO_PUBLIC_FOLDER","outputPath","files","Map","devServerManager","DevServerManager","startMetroAsync","port","isExporting","location","resetDevServer","devServer","getDefaultDevServer","assert","MetroBundlerDevServer","bundles","domComponentAssetsMetadata","spaPlatforms","filter","platform","copyPublicFolderAsync","Promise","all","map","isHermes","isEnableHermesManaged","assertEngineMismatchAsync","bundle","nativeExportBundleAsync","splitChunks","EXPO_NO_BUNDLE_SPLITTING","isReactServerComponentsEnabled","mainModuleName","getEntryWithServerRoot","pkg","engine","undefined","serializerIncludeMaps","reactCompiler","experiments","getFilesFromSerialAssets","artifacts","includeSourceMaps","isServerHosted","expoDomComponentReferences","artifact","Array","isArray","metadata","flat","filePath","platformDomComponentsBundle","htmlOutputName","exportDomComponentAsync","assets","push","assetsMetadata","updateDomComponentAssetsForMD5Naming","domComponentReference","nativeBundle","domComponentBundle","html","serializeHtmlWithAssets","resources","template","createTemplateHtmlFromExpoConfigAsync","scripts","cssLinks","modifyHtml","getVirtualFaviconAssetsAsync","set","contents","targetDomain","isWeb","exportApiRoutesStandaloneAsync","apiRoutesOnly","embeddedHashSet","exportAssetsAsync","JSON","stringify","createAssetMap","fileNames","Object","fromEntries","entries","asset","type","filename","createMetadataJson","exportServer","placeholderIndex","fs","existsSync","exportFromServerAsync","routerRoot","getRouterDirectoryModuleIdWithManifest","stopAsync","persistMetroFilesAsync"],"mappings":"AAAA;;;;+BAuCsBA,gBAAc;;aAAdA,cAAc;;;yBAvCV,cAAc;;;;;;;8DAErB,QAAQ;;;;;;;8DACT,OAAO;;;;;;;8DACV,IAAI;;;;;;;8DACF,MAAM;;;;;;oCAEmC,sBAAsB;8BAC9C,gBAAgB;qCAI3C,uBAAuB;8BACmC,gBAAgB;mCACX,qBAAqB;yBAC9C,WAAW;uCACb,yBAAyB;8BAC9B,gBAAgB;4BAO/C,cAAc;+BACU,iBAAiB;2DAC3B,QAAQ;+CACiB,mDAAmD;kCAChE,kCAAkC;uCAC7B,6CAA6C;wBAC5B,8BAA8B;+BAC7C,qCAAqC;oCACtC,+CAA+C;8BAC7C,yCAAyC;6BAC5B,6BAA6B;qBAC/D,cAAc;wBACL,iBAAiB;yBACnB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,eAAeA,cAAc,CAClCC,WAAmB,EACnB,EACEC,SAAS,CAAA,EACT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fig } from '@expo/config';\nimport type { Platform } from '@expo/config';\nimport assert from 'assert';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport { type PlatformMetadata, createMetadataJson } from './createMetadataJson';\nimport { exportAssetsAsync } from './exportAssets';\nimport {\n exportDomComponentAsync,\n updateDomComponentAssetsForMD5Naming,\n} from './exportDomComponents';\nimport { assertEngineMismatchAsync, isEnableHermesManaged } from './exportHermes';\nimport { exportApiRoutesStandaloneAsync, exportFromServerAsync } from './exportStaticAsync';\nimport { getVirtualFaviconAssetsAsync } from './favicon';\nimport { getPublicExpoManifestAsync } from './getPublicExpoManifest';\nimport { copyPublicFolderAsync } from './publicFolder';\nimport { Options } from './resolveOptions';\nimport {\n ExportAssetMap,\n BundleOutput,\n getFilesFromSerialAssets,\n persistMetroFilesAsync,\n} from './saveAssets';\nimport { createAssetMap } from './writeContents';\nimport * as Log from '../log';\nimport { WebSupportProjectPrerequisite } from '../start/doctor/web/WebSupportProjectPrerequisite';\nimport { DevServerManager } from '../start/server/DevServerManager';\nimport { MetroBundlerDevServer } from '../start/server/metro/MetroBundlerDevServer';\nimport { getRouterDirectoryModuleIdWithManifest } from '../start/server/metro/router';\nimport { serializeHtmlWithAssets } from '../start/server/metro/serializeHtml';\nimport { getEntryWithServerRoot } from '../start/server/middleware/ManifestMiddleware';\nimport { getBaseUrlFromExpoConfig } from '../start/server/middleware/metroOptions';\nimport { createTemplateHtmlFromExpoConfigAsync } from '../start/server/webTemplate';\nimport { env } from '../utils/env';\nimport { CommandError } from '../utils/errors';\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 bytecode,\n maxWorkers,\n skipSSG,\n }: Pick<\n Options,\n | 'dumpAssetmap'\n | 'sourceMaps'\n | 'dev'\n | 'clear'\n | 'outputDir'\n | 'platforms'\n | 'minify'\n | 'bytecode'\n | 'maxWorkers'\n | 'skipSSG'\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 if (platforms.includes('web')) {\n await new WebSupportProjectPrerequisite(projectRoot).assertAsync();\n }\n\n const useServerRendering = ['static', 'server'].includes(exp.web?.output ?? '');\n\n if (skipSSG && exp.web?.output !== 'server') {\n throw new CommandError('--no-ssg can only be used with `web.output: server`');\n }\n\n const baseUrl = getBaseUrlFromExpoConfig(exp);\n\n if (!bytecode && (platforms.includes('ios') || platforms.includes('android'))) {\n Log.warn(\n `Bytecode makes the app startup faster, disabling bytecode is highly discouraged and should only be used for debugging purposes.`\n );\n }\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 mode = dev ? 'development' : 'production';\n const publicPath = path.resolve(projectRoot, env.EXPO_PUBLIC_FOLDER);\n const outputPath = path.resolve(projectRoot, outputDir);\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 const devServerManager = await DevServerManager.startMetroAsync(projectRoot, {\n minify,\n mode,\n port: 8081,\n isExporting: true,\n location: {},\n resetDevServer: clear,\n maxWorkers,\n });\n\n const devServer = devServerManager.getDefaultDevServer();\n assert(devServer instanceof MetroBundlerDevServer);\n\n const bundles: Partial<Record<Platform, BundleOutput>> = {};\n const domComponentAssetsMetadata: Partial<Record<Platform, PlatformMetadata['assets']>> = {};\n\n const spaPlatforms = useServerRendering\n ? platforms.filter((platform) => platform !== 'web')\n : platforms;\n\n try {\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 // Can be empty during web-only SSG.\n if (spaPlatforms.length) {\n await Promise.all(\n spaPlatforms.map(async (platform) => {\n // Assert early so the user doesn't have to wait until bundling is complete to find out that\n // Hermes won't be available.\n const isHermes = isEnableHermesManaged(exp, platform);\n if (isHermes) {\n await assertEngineMismatchAsync(projectRoot, exp, platform);\n }\n\n // Run metro bundler and create the JS bundles/source maps.\n const bundle = await devServer.nativeExportBundleAsync(\n {\n platform,\n splitChunks:\n !env.EXPO_NO_BUNDLE_SPLITTING &&\n ((devServer.isReactServerComponentsEnabled && !bytecode) || platform === 'web'),\n mainModuleName: getEntryWithServerRoot(projectRoot, {\n platform,\n pkg: projectConfig.pkg,\n }),\n mode: dev ? 'development' : 'production',\n engine: isHermes ? 'hermes' : undefined,\n serializerIncludeMaps: sourceMaps,\n bytecode: bytecode && isHermes,\n reactCompiler: !!exp.experiments?.reactCompiler,\n },\n files\n );\n\n bundles[platform] = bundle;\n domComponentAssetsMetadata[platform] = [];\n\n getFilesFromSerialAssets(bundle.artifacts, {\n includeSourceMaps: sourceMaps,\n files,\n isServerHosted: devServer.isReactServerComponentsEnabled,\n });\n\n // TODO: Remove duplicates...\n const expoDomComponentReferences = bundle.artifacts\n .map((artifact) =>\n Array.isArray(artifact.metadata.expoDomComponentReferences)\n ? artifact.metadata.expoDomComponentReferences\n : []\n )\n .flat();\n await Promise.all(\n // TODO: Make a version of this which uses `this.metro.getBundler().buildGraphForEntries([])` to bundle all the DOM components at once.\n expoDomComponentReferences.map(async (filePath) => {\n const { bundle: platformDomComponentsBundle, htmlOutputName } =\n await exportDomComponentAsync({\n filePath,\n projectRoot,\n dev,\n devServer,\n isHermes,\n includeSourceMaps: sourceMaps,\n exp,\n files,\n });\n\n // Merge the assets from the DOM component into the output assets.\n // @ts-expect-error: mutate assets\n bundle.assets.push(...platformDomComponentsBundle.assets);\n\n const assetsMetadata = updateDomComponentAssetsForMD5Naming({\n domComponentReference: filePath,\n nativeBundle: bundle,\n domComponentBundle: platformDomComponentsBundle,\n files,\n htmlOutputName,\n });\n domComponentAssetsMetadata[platform]?.push(...assetsMetadata);\n })\n );\n\n if (platform === 'web') {\n // TODO: Unify with exportStaticAsync\n // TODO: Maybe move to the serializer.\n let html = await serializeHtmlWithAssets({\n isExporting: true,\n resources: bundle.artifacts,\n template: await createTemplateHtmlFromExpoConfigAsync(projectRoot, {\n scripts: [],\n cssLinks: [],\n exp: projectConfig.exp,\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 exp: projectConfig.exp,\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: devServer.isReactServerComponentsEnabled ? 'server' : 'client',\n });\n }\n })\n );\n\n if (devServer.isReactServerComponentsEnabled) {\n const isWeb = platforms.includes('web');\n if (!(isWeb && useServerRendering)) {\n await exportApiRoutesStandaloneAsync(devServer, {\n files,\n platform: 'web',\n apiRoutesOnly: !isWeb,\n });\n }\n }\n\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 targetDomain = devServer.isReactServerComponentsEnabled ? 'client/' : '';\n const fileNames = Object.fromEntries(\n Object.entries(bundles).map(([platform, bundle]) => [\n platform,\n bundle.artifacts\n .filter((asset) => asset.type === 'js')\n .map((asset) => targetDomain + asset.filename),\n ])\n );\n\n // Generate a `metadata.json` for EAS Update.\n const contents = createMetadataJson({\n bundles,\n fileNames,\n embeddedHashSet,\n domComponentAssetsMetadata,\n });\n files.set('metadata.json', { contents: JSON.stringify(contents) });\n }\n\n // Additional web-only steps...\n\n if (platforms.includes('web') && 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 if (skipSSG) {\n Log.log('Skipping static site generation');\n await exportApiRoutesStandaloneAsync(devServer, {\n files,\n platform: 'web',\n apiRoutesOnly: true,\n });\n\n // Output a placeholder index.html if one doesn't exist in the public directory.\n // This ensures native + API routes have some content at the root URL.\n const placeholderIndex = path.resolve(outputPath, 'client/index.html');\n if (!fs.existsSync(placeholderIndex)) {\n files.set('index.html', {\n contents: `<html><body></body></html>`,\n targetDomain: 'client',\n });\n }\n } else {\n await exportFromServerAsync(projectRoot, devServer, {\n mode,\n files,\n clear: !!clear,\n outputDir: outputPath,\n minify,\n baseUrl,\n includeSourceMaps: sourceMaps,\n routerRoot: getRouterDirectoryModuleIdWithManifest(projectRoot, exp),\n reactCompiler: !!exp.experiments?.reactCompiler,\n exportServer,\n maxWorkers,\n isExporting: true,\n exp: projectConfig.exp,\n });\n }\n }\n } finally {\n await devServerManager.stopAsync();\n }\n\n // Write all files at the end for unified logging.\n await persistMetroFilesAsync(files, outputPath);\n}\n"],"names":["exportAppAsync","projectRoot","platforms","outputDir","clear","dev","dumpAssetmap","sourceMaps","minify","bytecode","maxWorkers","skipSSG","exp","setNodeEnv","require","load","projectConfig","getConfig","getPublicExpoManifestAsync","skipValidation","length","includes","WebSupportProjectPrerequisite","assertAsync","useServerRendering","web","output","CommandError","baseUrl","getBaseUrlFromExpoConfig","Log","warn","log","chalk","gray","startsWith","yellow","mode","publicPath","path","resolve","env","EXPO_PUBLIC_FOLDER","outputPath","files","Map","devServerManager","DevServerManager","startMetroAsync","port","isExporting","location","resetDevServer","devServer","getDefaultDevServer","assert","MetroBundlerDevServer","bundles","domComponentAssetsMetadata","spaPlatforms","filter","platform","copyPublicFolderAsync","Promise","all","map","isHermes","isEnableHermesManaged","assertEngineMismatchAsync","bundle","nativeExportBundleAsync","splitChunks","EXPO_NO_BUNDLE_SPLITTING","isReactServerComponentsEnabled","mainModuleName","getEntryWithServerRoot","pkg","engine","undefined","serializerIncludeMaps","reactCompiler","experiments","getFilesFromSerialAssets","artifacts","includeSourceMaps","isServerHosted","expoDomComponentReferences","artifact","Array","isArray","metadata","flat","filePath","platformDomComponentsBundle","htmlOutputName","exportDomComponentAsync","assets","push","assetsMetadata","updateDomComponentAssetsForMD5Naming","domComponentReference","nativeBundle","domComponentBundle","html","serializeHtmlWithAssets","resources","template","createTemplateHtmlFromExpoConfigAsync","scripts","cssLinks","modifyHtml","getVirtualFaviconAssetsAsync","set","contents","targetDomain","isWeb","exportApiRoutesStandaloneAsync","apiRoutesOnly","embeddedHashSet","exportAssetsAsync","JSON","stringify","createAssetMap","fileNames","Object","fromEntries","entries","asset","type","filename","createMetadataJson","exportServer","placeholderIndex","fs","existsSync","exportFromServerAsync","routerRoot","getRouterDirectoryModuleIdWithManifest","stopAsync","persistMetroFilesAsync"],"mappings":"AAAA;;;;+BAuCsBA,gBAAc;;aAAdA,cAAc;;;yBAvCV,cAAc;;;;;;;8DAErB,QAAQ;;;;;;;8DACT,OAAO;;;;;;;8DACV,IAAI;;;;;;;8DACF,MAAM;;;;;;oCAEmC,sBAAsB;8BAC9C,gBAAgB;qCAI3C,uBAAuB;8BACmC,gBAAgB;mCACX,qBAAqB;yBAC9C,WAAW;uCACb,yBAAyB;8BAC9B,gBAAgB;4BAO/C,cAAc;+BACU,iBAAiB;2DAC3B,QAAQ;+CACiB,mDAAmD;kCAChE,kCAAkC;uCAC7B,6CAA6C;wBAC5B,8BAA8B;+BAC7C,qCAAqC;oCACtC,+CAA+C;8BAC7C,yCAAyC;6BAC5B,6BAA6B;qBAC/D,cAAc;wBACL,iBAAiB;yBACnB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,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D;IAClD,MAAMC,IAAAA,WAAsB,uBAAA,EAAC/F,KAAK,EAAED,UAAU,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -37,7 +37,7 @@ const expoInstall = async (argv)=>{
|
|
|
37
37
|
`--fix Automatically update any invalid package versions`,
|
|
38
38
|
(0, _chalk().default)`--npm Use npm to install dependencies. {dim Default when package-lock.json exists}`,
|
|
39
39
|
(0, _chalk().default)`--yarn Use Yarn to install dependencies. {dim Default when yarn.lock exists}`,
|
|
40
|
-
(0, _chalk().default)`--bun Use bun to install dependencies. {dim Default when bun.lockb exists}`,
|
|
40
|
+
(0, _chalk().default)`--bun Use bun to install dependencies. {dim Default when bun.lock or bun.lockb exists}`,
|
|
41
41
|
(0, _chalk().default)`--pnpm Use pnpm to install dependencies. {dim Default when pnpm-lock.yaml exists}`,
|
|
42
42
|
`-h, --help Usage info`,
|
|
43
43
|
].join("\n"), [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/install/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../bin/cli';\nimport { assertWithOptionsArgs, printHelp } from '../utils/args';\n\nexport const expoInstall: Command = async (argv) => {\n const args = assertWithOptionsArgs(\n {\n // Other options are parsed manually.\n '--help': Boolean,\n // Aliases\n '-h': '--help',\n },\n {\n argv,\n // Allow other options, we'll throw an error if unexpected values are passed.\n permissive: true,\n }\n );\n\n if (args['--help']) {\n printHelp(\n `Install a module or other package to a project`,\n `npx expo install`,\n [\n `--check Check which installed packages need to be updated`,\n `--fix Automatically update any invalid package versions`,\n chalk`--npm Use npm to install dependencies. {dim Default when package-lock.json exists}`,\n chalk`--yarn Use Yarn to install dependencies. {dim Default when yarn.lock exists}`,\n chalk`--bun Use bun to install dependencies. {dim Default when bun.lockb exists}`,\n chalk`--pnpm Use pnpm to install dependencies. {dim Default when pnpm-lock.yaml exists}`,\n `-h, --help Usage info`,\n ].join('\\n'),\n [\n '',\n chalk` Additional options can be passed to the underlying install command by using {bold --}`,\n chalk` {dim $} npx expo install react -- --verbose`,\n chalk` {dim >} yarn add react --verbose`,\n '',\n ].join('\\n')\n );\n }\n\n // Load modules after the help prompt so `npx expo install -h` shows as fast as possible.\n const { installAsync } = require('./installAsync') as typeof import('./installAsync');\n const { logCmdError } = require('../utils/errors') as typeof import('../utils/errors');\n const { resolveArgsAsync } = require('./resolveOptions') as typeof import('./resolveOptions');\n\n const { variadic, options, extras } = await resolveArgsAsync(process.argv.slice(3)).catch(\n logCmdError\n );\n return installAsync(variadic, options, extras).catch(logCmdError);\n};\n"],"names":["expoInstall","argv","args","assertWithOptionsArgs","Boolean","permissive","printHelp","chalk","join","installAsync","require","logCmdError","resolveArgsAsync","variadic","options","extras","process","slice","catch"],"mappings":"AAAA;;;;;+BAMaA,aAAW;;aAAXA,WAAW;;;8DALN,OAAO;;;;;;sBAGwB,eAAe;;;;;;AAEzD,MAAMA,WAAW,GAAY,OAAOC,IAAI,GAAK;IAClD,MAAMC,IAAI,GAAGC,IAAAA,KAAqB,sBAAA,EAChC;QACE,qCAAqC;QACrC,QAAQ,EAAEC,OAAO;QACjB,UAAU;QACV,IAAI,EAAE,QAAQ;KACf,EACD;QACEH,IAAI;QACJ,6EAA6E;QAC7EI,UAAU,EAAE,IAAI;KACjB,CACF,AAAC;IAEF,IAAIH,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBI,IAAAA,KAAS,UAAA,EACP,CAAC,8CAA8C,CAAC,EAChD,CAAC,gBAAgB,CAAC,EAClB;YACE,CAAC,6DAA6D,CAAC;YAC/D,CAAC,6DAA6D,CAAC;YAC/DC,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,wFAAwF,CAAC;YAC/FA,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,iFAAiF,CAAC;YACxFA,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,
|
|
1
|
+
{"version":3,"sources":["../../../src/install/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../bin/cli';\nimport { assertWithOptionsArgs, printHelp } from '../utils/args';\n\nexport const expoInstall: Command = async (argv) => {\n const args = assertWithOptionsArgs(\n {\n // Other options are parsed manually.\n '--help': Boolean,\n // Aliases\n '-h': '--help',\n },\n {\n argv,\n // Allow other options, we'll throw an error if unexpected values are passed.\n permissive: true,\n }\n );\n\n if (args['--help']) {\n printHelp(\n `Install a module or other package to a project`,\n `npx expo install`,\n [\n `--check Check which installed packages need to be updated`,\n `--fix Automatically update any invalid package versions`,\n chalk`--npm Use npm to install dependencies. {dim Default when package-lock.json exists}`,\n chalk`--yarn Use Yarn to install dependencies. {dim Default when yarn.lock exists}`,\n chalk`--bun Use bun to install dependencies. {dim Default when bun.lock or bun.lockb exists}`,\n chalk`--pnpm Use pnpm to install dependencies. {dim Default when pnpm-lock.yaml exists}`,\n `-h, --help Usage info`,\n ].join('\\n'),\n [\n '',\n chalk` Additional options can be passed to the underlying install command by using {bold --}`,\n chalk` {dim $} npx expo install react -- --verbose`,\n chalk` {dim >} yarn add react --verbose`,\n '',\n ].join('\\n')\n );\n }\n\n // Load modules after the help prompt so `npx expo install -h` shows as fast as possible.\n const { installAsync } = require('./installAsync') as typeof import('./installAsync');\n const { logCmdError } = require('../utils/errors') as typeof import('../utils/errors');\n const { resolveArgsAsync } = require('./resolveOptions') as typeof import('./resolveOptions');\n\n const { variadic, options, extras } = await resolveArgsAsync(process.argv.slice(3)).catch(\n logCmdError\n );\n return installAsync(variadic, options, extras).catch(logCmdError);\n};\n"],"names":["expoInstall","argv","args","assertWithOptionsArgs","Boolean","permissive","printHelp","chalk","join","installAsync","require","logCmdError","resolveArgsAsync","variadic","options","extras","process","slice","catch"],"mappings":"AAAA;;;;;+BAMaA,aAAW;;aAAXA,WAAW;;;8DALN,OAAO;;;;;;sBAGwB,eAAe;;;;;;AAEzD,MAAMA,WAAW,GAAY,OAAOC,IAAI,GAAK;IAClD,MAAMC,IAAI,GAAGC,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,EAAEC,OAAO,CAAA,EAAEC,MAAM,CAAA,EAAE,GAAG,MAAMH,gBAAgB,CAACI,OAAO,CAACf,IAAI,CAACgB,KAAK,CAAC,CAAC,CAAC,CAAC,CAACC,KAAK,CACvFP,WAAW,CACZ,AAAC;IACF,OAAOF,YAAY,CAACI,QAAQ,EAAEC,OAAO,EAAEC,MAAM,CAAC,CAACG,KAAK,CAACP,WAAW,CAAC,CAAC;AACpE,CAAC,AAAC"}
|
|
@@ -84,7 +84,7 @@ const expoPrebuild = async (argv)=>{
|
|
|
84
84
|
`--clean Delete the native folders and regenerate them before applying changes`,
|
|
85
85
|
(0, _chalk().default)`--npm Use npm to install dependencies. {dim Default when package-lock.json exists}`,
|
|
86
86
|
(0, _chalk().default)`--yarn Use Yarn to install dependencies. {dim Default when yarn.lock exists}`,
|
|
87
|
-
(0, _chalk().default)`--bun Use bun to install dependencies. {dim Default when bun.lockb exists}`,
|
|
87
|
+
(0, _chalk().default)`--bun Use bun to install dependencies. {dim Default when bun.lock or bun.lockb exists}`,
|
|
88
88
|
(0, _chalk().default)`--pnpm Use pnpm to install dependencies. {dim Default when pnpm-lock.yaml exists}`,
|
|
89
89
|
`--template <template> Project template to clone from. File path pointing to a local tar file, npm package or a github repo`,
|
|
90
90
|
(0, _chalk().default)`-p, --platform <all|android|ios> Platforms to sync: ios, android, all. {dim Default: all}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/prebuild/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../utils/args';\n\nexport const expoPrebuild: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clean': Boolean,\n '--npm': Boolean,\n '--pnpm': Boolean,\n '--yarn': Boolean,\n '--bun': Boolean,\n '--no-install': Boolean,\n '--template': String,\n '--platform': String,\n '--skip-dependency-update': String,\n // Aliases\n '-h': '--help',\n '-p': '--platform',\n '-t': '--type',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Create native iOS and Android project files for building natively`,\n chalk`npx expo prebuild {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `--no-install Skip installing npm packages and CocoaPods`,\n `--clean Delete the native folders and regenerate them before applying changes`,\n chalk`--npm Use npm to install dependencies. {dim Default when package-lock.json exists}`,\n chalk`--yarn Use Yarn to install dependencies. {dim Default when yarn.lock exists}`,\n chalk`--bun Use bun to install dependencies. {dim Default when bun.lockb exists}`,\n chalk`--pnpm Use pnpm to install dependencies. {dim Default when pnpm-lock.yaml exists}`,\n `--template <template> Project template to clone from. File path pointing to a local tar file, npm package or a github repo`,\n chalk`-p, --platform <all|android|ios> Platforms to sync: ios, android, all. {dim Default: all}`,\n `--skip-dependency-update <dependencies> Preserves versions of listed packages in package.json (comma separated list)`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n // Load modules after the help prompt so `npx expo prebuild -h` shows as fast as possible.\n const [\n // ./prebuildAsync\n { prebuildAsync },\n // ./resolveOptions\n { resolvePlatformOption, resolvePackageManagerOptions, resolveSkipDependencyUpdate },\n // ../utils/errors\n { logCmdError },\n ] = await Promise.all([\n import('./prebuildAsync.js'),\n import('./resolveOptions.js'),\n import('../utils/errors.js'),\n ]);\n\n return (() => {\n return prebuildAsync(getProjectRoot(args), {\n // Parsed options\n clean: args['--clean'],\n\n packageManager: resolvePackageManagerOptions(args),\n install: !args['--no-install'],\n platforms: resolvePlatformOption(args['--platform']),\n // TODO: Parse\n skipDependencyUpdate: resolveSkipDependencyUpdate(args['--skip-dependency-update']),\n template: args['--template'],\n });\n })().catch(logCmdError);\n};\n"],"names":["expoPrebuild","argv","args","assertArgs","Boolean","String","printHelp","chalk","join","prebuildAsync","resolvePlatformOption","resolvePackageManagerOptions","resolveSkipDependencyUpdate","logCmdError","Promise","all","getProjectRoot","clean","packageManager","install","platforms","skipDependencyUpdate","template","catch"],"mappings":"AAAA;;;;;+BAMaA,cAAY;;aAAZA,YAAY;;;8DALP,OAAO;;;;;;sBAG6B,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE9D,MAAMA,YAAY,GAAY,OAAOC,IAAI,GAAK;IACnD,MAAMC,IAAI,GAAGC,IAAAA,KAAU,WAAA,EACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,OAAO,EAAEA,OAAO;QAChB,QAAQ,EAAEA,OAAO;QACjB,QAAQ,EAAEA,OAAO;QACjB,OAAO,EAAEA,OAAO;QAChB,cAAc,EAAEA,OAAO;QACvB,YAAY,EAAEC,MAAM;QACpB,YAAY,EAAEA,MAAM;QACpB,0BAA0B,EAAEA,MAAM;QAClC,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;KACf,EACDJ,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBI,IAAAA,KAAS,UAAA,EACP,CAAC,iEAAiE,CAAC,EACnEC,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,6BAA6B,CAAC,EACpC;YACEA,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,gHAAgH,CAAC;YACvH,CAAC,mFAAmF,CAAC;YACrF,CAAC,8GAA8G,CAAC;YAChHA,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,qHAAqH,CAAC;YAC5HA,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,8GAA8G,CAAC;YACrHA,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,
|
|
1
|
+
{"version":3,"sources":["../../../src/prebuild/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../utils/args';\n\nexport const expoPrebuild: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clean': Boolean,\n '--npm': Boolean,\n '--pnpm': Boolean,\n '--yarn': Boolean,\n '--bun': Boolean,\n '--no-install': Boolean,\n '--template': String,\n '--platform': String,\n '--skip-dependency-update': String,\n // Aliases\n '-h': '--help',\n '-p': '--platform',\n '-t': '--type',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Create native iOS and Android project files for building natively`,\n chalk`npx expo prebuild {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `--no-install Skip installing npm packages and CocoaPods`,\n `--clean Delete the native folders and regenerate them before applying changes`,\n chalk`--npm Use npm to install dependencies. {dim Default when package-lock.json exists}`,\n chalk`--yarn Use Yarn to install dependencies. {dim Default when yarn.lock exists}`,\n chalk`--bun Use bun to install dependencies. {dim Default when bun.lock or bun.lockb exists}`,\n chalk`--pnpm Use pnpm to install dependencies. {dim Default when pnpm-lock.yaml exists}`,\n `--template <template> Project template to clone from. File path pointing to a local tar file, npm package or a github repo`,\n chalk`-p, --platform <all|android|ios> Platforms to sync: ios, android, all. {dim Default: all}`,\n `--skip-dependency-update <dependencies> Preserves versions of listed packages in package.json (comma separated list)`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n // Load modules after the help prompt so `npx expo prebuild -h` shows as fast as possible.\n const [\n // ./prebuildAsync\n { prebuildAsync },\n // ./resolveOptions\n { resolvePlatformOption, resolvePackageManagerOptions, resolveSkipDependencyUpdate },\n // ../utils/errors\n { logCmdError },\n ] = await Promise.all([\n import('./prebuildAsync.js'),\n import('./resolveOptions.js'),\n import('../utils/errors.js'),\n ]);\n\n return (() => {\n return prebuildAsync(getProjectRoot(args), {\n // Parsed options\n clean: args['--clean'],\n\n packageManager: resolvePackageManagerOptions(args),\n install: !args['--no-install'],\n platforms: resolvePlatformOption(args['--platform']),\n // TODO: Parse\n skipDependencyUpdate: resolveSkipDependencyUpdate(args['--skip-dependency-update']),\n template: args['--template'],\n });\n })().catch(logCmdError);\n};\n"],"names":["expoPrebuild","argv","args","assertArgs","Boolean","String","printHelp","chalk","join","prebuildAsync","resolvePlatformOption","resolvePackageManagerOptions","resolveSkipDependencyUpdate","logCmdError","Promise","all","getProjectRoot","clean","packageManager","install","platforms","skipDependencyUpdate","template","catch"],"mappings":"AAAA;;;;;+BAMaA,cAAY;;aAAZA,YAAY;;;8DALP,OAAO;;;;;;sBAG6B,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE9D,MAAMA,YAAY,GAAY,OAAOC,IAAI,GAAK;IACnD,MAAMC,IAAI,GAAGC,IAAAA,KAAU,WAAA,EACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,OAAO,EAAEA,OAAO;QAChB,QAAQ,EAAEA,OAAO;QACjB,QAAQ,EAAEA,OAAO;QACjB,OAAO,EAAEA,OAAO;QAChB,cAAc,EAAEA,OAAO;QACvB,YAAY,EAAEC,MAAM;QACpB,YAAY,EAAEA,MAAM;QACpB,0BAA0B,EAAEA,MAAM;QAClC,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;KACf,EACDJ,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBI,IAAAA,KAAS,UAAA,EACP,CAAC,iEAAiE,CAAC,EACnEC,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,6BAA6B,CAAC,EACpC;YACEA,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,gHAAgH,CAAC;YACvH,CAAC,mFAAmF,CAAC;YACrF,CAAC,8GAA8G,CAAC;YAChHA,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,qHAAqH,CAAC;YAC5HA,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,8GAA8G,CAAC;YACrHA,IAAAA,MAAK,EAA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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/run/ios/XcodeBuild.types.ts"],"sourcesContent":["import { OSType } from '../../start/platforms/ios/simctl';\nimport { BundlerProps } from '../resolveBundlerProps';\n\nexport type XcodeConfiguration = 'Debug' | 'Release';\n\nexport type Options = {\n /** iOS device to target. */\n device?: string | boolean;\n /** Dev server port to use, ignored if `bundler` is `false`. */\n port?: number;\n /** Xcode scheme to build. */\n scheme?: string | boolean;\n /** Xcode configuration to build. Default `Debug` */\n configuration?: XcodeConfiguration;\n /** Should start the bundler dev server. */\n bundler?: boolean;\n /** Should install missing dependencies before building. */\n install?: boolean;\n /** Should use derived data for builds. */\n buildCache?: boolean;\n /** Path to an existing binary to install on the device. */\n binary?: string;\n};\n\nexport type ProjectInfo = {\n isWorkspace: boolean;\n name: string;\n};\n\nexport type BuildProps = {\n /** Root to the iOS native project. */\n projectRoot: string;\n /** Is the target a simulator. */\n isSimulator: boolean;\n xcodeProject: ProjectInfo;\n device: { name: string; udid: string; osType: OSType };\n configuration: XcodeConfiguration;\n /** Disable the initial bundling from the native script. */\n shouldSkipInitialBundling: boolean;\n /** Should use derived data for builds. */\n buildCache: boolean;\n scheme: string;\n\n /** Options that were used to create the eager bundle in release builds. */\n eagerBundleOptions?: string;\n} & BundlerProps;\n"],"names":[],"mappings":"AAAA"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/run/ios/XcodeBuild.types.ts"],"sourcesContent":["import { OSType } from '../../start/platforms/ios/simctl';\nimport { BundlerProps } from '../resolveBundlerProps';\n\nexport type XcodeConfiguration = 'Debug' | 'Release';\n\nexport type Options = {\n /** iOS device to target. */\n device?: string | boolean;\n /** Dev server port to use, ignored if `bundler` is `false`. */\n port?: number;\n /** Xcode scheme to build. */\n scheme?: string | boolean;\n /** Xcode configuration to build. Default `Debug` */\n configuration?: XcodeConfiguration;\n /** Should start the bundler dev server. */\n bundler?: boolean;\n /** Should install missing dependencies before building. */\n install?: boolean;\n /** Should use derived data for builds. */\n buildCache?: boolean;\n /** Path to an existing binary to install on the device. */\n binary?: string;\n\n /** Re-bundle JS and assets, then embed in existing app, and install again. */\n rebundle?: boolean;\n};\n\nexport type ProjectInfo = {\n isWorkspace: boolean;\n name: string;\n};\n\nexport type BuildProps = {\n /** Root to the iOS native project. */\n projectRoot: string;\n /** Is the target a simulator. */\n isSimulator: boolean;\n xcodeProject: ProjectInfo;\n device: { name: string; udid: string; osType: OSType };\n configuration: XcodeConfiguration;\n /** Disable the initial bundling from the native script. */\n shouldSkipInitialBundling: boolean;\n /** Should use derived data for builds. */\n buildCache: boolean;\n scheme: string;\n\n /** Options that were used to create the eager bundle in release builds. */\n eagerBundleOptions?: string;\n} & BundlerProps;\n"],"names":[],"mappings":"AAAA"}
|
|
@@ -77,6 +77,9 @@ const expoRunIos = async (argv)=>{
|
|
|
77
77
|
"--configuration": String,
|
|
78
78
|
"--binary": String,
|
|
79
79
|
"--port": Number,
|
|
80
|
+
// Undocumented flag for re-bundling the app and assets for a build to try different JS code in release builds.
|
|
81
|
+
// Also updates the app.json.
|
|
82
|
+
"--unstable-rebundle": Boolean,
|
|
80
83
|
// Aliases
|
|
81
84
|
"-p": "--port",
|
|
82
85
|
"-h": "--help"
|
|
@@ -119,6 +122,7 @@ const expoRunIos = async (argv)=>{
|
|
|
119
122
|
bundler: !args["--no-bundler"],
|
|
120
123
|
port: args["--port"],
|
|
121
124
|
binary: args["--binary"],
|
|
125
|
+
rebundle: args["--unstable-rebundle"],
|
|
122
126
|
// Custom parsed args
|
|
123
127
|
device: parsed.args["--device"],
|
|
124
128
|
scheme: parsed.args["--scheme"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/run/ios/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport arg from 'arg';\nimport chalk from 'chalk';\nimport path from 'path';\n\nimport { XcodeConfiguration } from './XcodeBuild.types';\nimport { Command } from '../../../bin/cli';\nimport { assertWithOptionsArgs, printHelp } from '../../utils/args';\nimport { logCmdError } from '../../utils/errors';\n\nexport const expoRunIos: Command = async (argv) => {\n const rawArgsMap: arg.Spec = {\n // Types\n '--help': Boolean,\n '--no-build-cache': Boolean,\n '--no-install': Boolean,\n '--no-bundler': Boolean,\n '--configuration': String,\n '--binary': String,\n\n '--port': Number,\n // Aliases\n '-p': '--port',\n\n '-h': '--help',\n };\n const args = assertWithOptionsArgs(rawArgsMap, {\n argv,\n\n permissive: true,\n });\n\n // '-d' -> '--device': Boolean,\n // '--scheme': String,\n\n if (args['--help']) {\n printHelp(\n `Run the iOS app binary locally`,\n `npx expo run:ios`,\n [\n `--no-build-cache Clear the native derived data before building`,\n `--no-install Skip installing dependencies`,\n `--no-bundler Skip starting the Metro bundler`,\n `--scheme [scheme] Scheme to build`,\n `--binary <path> Path to existing .app or .ipa to install.`,\n chalk`--configuration <configuration> Xcode configuration to use. Debug or Release. {dim Default: Debug}`,\n `-d, --device [device] Device name or UDID to build the app on`,\n chalk`-p, --port <port> Port to start the Metro bundler on. {dim Default: 8081}`,\n `-h, --help Usage info`,\n ].join('\\n'),\n [\n '',\n chalk` Build for production (unsigned) with the {bold Release} configuration:`,\n chalk` {dim $} npx expo run:ios --configuration Release`,\n '',\n ].join('\\n')\n );\n }\n\n const { resolveStringOrBooleanArgsAsync } = await import('../../utils/resolveArgs.js');\n const parsed = await resolveStringOrBooleanArgsAsync(argv ?? [], rawArgsMap, {\n '--scheme': Boolean,\n '--device': Boolean,\n '-d': '--device',\n }).catch(logCmdError);\n\n const { runIosAsync } = await import('./runIosAsync.js');\n return runIosAsync(path.resolve(parsed.projectRoot), {\n // Parsed options\n buildCache: !args['--no-build-cache'],\n install: !args['--no-install'],\n bundler: !args['--no-bundler'],\n port: args['--port'],\n binary: args['--binary'],\n\n // Custom parsed args\n device: parsed.args['--device'],\n scheme: parsed.args['--scheme'],\n configuration: parsed.args['--configuration'] as XcodeConfiguration,\n }).catch(logCmdError);\n};\n"],"names":["expoRunIos","argv","rawArgsMap","Boolean","String","Number","args","assertWithOptionsArgs","permissive","printHelp","chalk","join","resolveStringOrBooleanArgsAsync","parsed","catch","logCmdError","runIosAsync","path","resolve","projectRoot","buildCache","install","bundler","port","binary","device","scheme","configuration"],"mappings":"AAAA;;;;;+BAUaA,YAAU;;aAAVA,UAAU;;;8DARL,OAAO;;;;;;;8DACR,MAAM;;;;;;sBAI0B,kBAAkB;wBACvC,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC,MAAMA,UAAU,GAAY,OAAOC,IAAI,GAAK;IACjD,MAAMC,UAAU,GAAa;QAC3B,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,kBAAkB,EAAEA,OAAO;QAC3B,cAAc,EAAEA,OAAO;QACvB,cAAc,EAAEA,OAAO;QACvB,iBAAiB,EAAEC,MAAM;QACzB,UAAU,EAAEA,MAAM;QAElB,QAAQ,EAAEC,MAAM;
|
|
1
|
+
{"version":3,"sources":["../../../../src/run/ios/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport arg from 'arg';\nimport chalk from 'chalk';\nimport path from 'path';\n\nimport { XcodeConfiguration } from './XcodeBuild.types';\nimport { Command } from '../../../bin/cli';\nimport { assertWithOptionsArgs, printHelp } from '../../utils/args';\nimport { logCmdError } from '../../utils/errors';\n\nexport const expoRunIos: Command = async (argv) => {\n const rawArgsMap: arg.Spec = {\n // Types\n '--help': Boolean,\n '--no-build-cache': Boolean,\n '--no-install': Boolean,\n '--no-bundler': Boolean,\n '--configuration': String,\n '--binary': String,\n\n '--port': Number,\n\n // Undocumented flag for re-bundling the app and assets for a build to try different JS code in release builds.\n // Also updates the app.json.\n '--unstable-rebundle': Boolean,\n // Aliases\n '-p': '--port',\n\n '-h': '--help',\n };\n const args = assertWithOptionsArgs(rawArgsMap, {\n argv,\n\n permissive: true,\n });\n\n // '-d' -> '--device': Boolean,\n // '--scheme': String,\n\n if (args['--help']) {\n printHelp(\n `Run the iOS app binary locally`,\n `npx expo run:ios`,\n [\n `--no-build-cache Clear the native derived data before building`,\n `--no-install Skip installing dependencies`,\n `--no-bundler Skip starting the Metro bundler`,\n `--scheme [scheme] Scheme to build`,\n `--binary <path> Path to existing .app or .ipa to install.`,\n chalk`--configuration <configuration> Xcode configuration to use. Debug or Release. {dim Default: Debug}`,\n `-d, --device [device] Device name or UDID to build the app on`,\n chalk`-p, --port <port> Port to start the Metro bundler on. {dim Default: 8081}`,\n `-h, --help Usage info`,\n ].join('\\n'),\n [\n '',\n chalk` Build for production (unsigned) with the {bold Release} configuration:`,\n chalk` {dim $} npx expo run:ios --configuration Release`,\n '',\n ].join('\\n')\n );\n }\n\n const { resolveStringOrBooleanArgsAsync } = await import('../../utils/resolveArgs.js');\n const parsed = await resolveStringOrBooleanArgsAsync(argv ?? [], rawArgsMap, {\n '--scheme': Boolean,\n '--device': Boolean,\n '-d': '--device',\n }).catch(logCmdError);\n\n const { runIosAsync } = await import('./runIosAsync.js');\n return runIosAsync(path.resolve(parsed.projectRoot), {\n // Parsed options\n buildCache: !args['--no-build-cache'],\n install: !args['--no-install'],\n bundler: !args['--no-bundler'],\n port: args['--port'],\n binary: args['--binary'],\n rebundle: args['--unstable-rebundle'],\n\n // Custom parsed args\n device: parsed.args['--device'],\n scheme: parsed.args['--scheme'],\n configuration: parsed.args['--configuration'] as XcodeConfiguration,\n }).catch(logCmdError);\n};\n"],"names":["expoRunIos","argv","rawArgsMap","Boolean","String","Number","args","assertWithOptionsArgs","permissive","printHelp","chalk","join","resolveStringOrBooleanArgsAsync","parsed","catch","logCmdError","runIosAsync","path","resolve","projectRoot","buildCache","install","bundler","port","binary","rebundle","device","scheme","configuration"],"mappings":"AAAA;;;;;+BAUaA,YAAU;;aAAVA,UAAU;;;8DARL,OAAO;;;;;;;8DACR,MAAM;;;;;;sBAI0B,kBAAkB;wBACvC,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC,MAAMA,UAAU,GAA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BAA+B,CAAA,EAAE,GAAG,MAAM,iEAAA,OAAM,CAAC,4BAA4B,GAAC,AAAC;IACvF,MAAMC,MAAM,GAAG,MAAMD,+BAA+B,CAACX,IAAI,IAAI,EAAE,EAAEC,UAAU,EAAE;QAC3E,UAAU,EAAEC,OAAO;QACnB,UAAU,EAAEA,OAAO;QACnB,IAAI,EAAE,UAAU;KACjB,CAAC,CAACW,KAAK,CAACC,OAAW,YAAA,CAAC,AAAC;IAEtB,MAAM,EAAEC,WAAW,CAAA,EAAE,GAAG,MAAM,iEAAA,OAAM,CAAC,kBAAkB,GAAC,AAAC;IACzD,OAAOA,WAAW,CAACC,KAAI,EAAA,QAAA,CAACC,OAAO,CAACL,MAAM,CAACM,WAAW,CAAC,EAAE;QACnD,iBAAiB;QACjBC,UAAU,EAAE,CAACd,IAAI,CAAC,kBAAkB,CAAC;QACrCe,OAAO,EAAE,CAACf,IAAI,CAAC,cAAc,CAAC;QAC9BgB,OAAO,EAAE,CAAChB,IAAI,CAAC,cAAc,CAAC;QAC9BiB,IAAI,EAAEjB,IAAI,CAAC,QAAQ,CAAC;QACpBkB,MAAM,EAAElB,IAAI,CAAC,UAAU,CAAC;QACxBmB,QAAQ,EAAEnB,IAAI,CAAC,qBAAqB,CAAC;QAErC,qBAAqB;QACrBoB,MAAM,EAAEb,MAAM,CAACP,IAAI,CAAC,UAAU,CAAC;QAC/BqB,MAAM,EAAEd,MAAM,CAACP,IAAI,CAAC,UAAU,CAAC;QAC/BsB,aAAa,EAAEf,MAAM,CAACP,IAAI,CAAC,iBAAiB,CAAC;KAC9C,CAAC,CAACQ,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;AACxB,CAAC,AAAC"}
|
|
@@ -10,6 +10,7 @@ const _resolveDevice = require("./resolveDevice");
|
|
|
10
10
|
const _resolveNativeScheme = require("./resolveNativeScheme");
|
|
11
11
|
const _resolveXcodeProject = require("./resolveXcodeProject");
|
|
12
12
|
const _simctl = require("../../../start/platforms/ios/simctl");
|
|
13
|
+
const _profile = require("../../../utils/profile");
|
|
13
14
|
const _resolveBundlerProps = require("../../resolveBundlerProps");
|
|
14
15
|
async function resolveOptionsAsync(projectRoot, options) {
|
|
15
16
|
const xcodeProject = (0, _resolveXcodeProject.resolveXcodeProject)(projectRoot);
|
|
@@ -21,7 +22,7 @@ async function resolveOptionsAsync(projectRoot, options) {
|
|
|
21
22
|
const configuration = options.configuration || "Debug";
|
|
22
23
|
// Resolve the device based on the provided device id or prompt
|
|
23
24
|
// from a list of devices (connected or simulated) that are filtered by the scheme.
|
|
24
|
-
const device = await (0, _resolveDevice.resolveDeviceAsync)(options.device, {
|
|
25
|
+
const device = await (0, _profile.profile)(_resolveDevice.resolveDeviceAsync)(options.device, {
|
|
25
26
|
// It's unclear if there's any value to asserting that we haven't hardcoded the os type in the CLI.
|
|
26
27
|
osType: (0, _simctl.isOSType)(osType) ? osType : undefined,
|
|
27
28
|
xcodeProject,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/run/ios/options/resolveOptions.ts"],"sourcesContent":["import { isSimulatorDevice, resolveDeviceAsync } from './resolveDevice';\nimport { resolveNativeSchemePropsAsync } from './resolveNativeScheme';\nimport { resolveXcodeProject } from './resolveXcodeProject';\nimport { isOSType } from '../../../start/platforms/ios/simctl';\nimport { resolveBundlerPropsAsync } from '../../resolveBundlerProps';\nimport { BuildProps, Options } from '../XcodeBuild.types';\n\n/** Resolve arguments for the `run:ios` command. */\nexport async function resolveOptionsAsync(\n projectRoot: string,\n options: Options\n): Promise<BuildProps> {\n const xcodeProject = resolveXcodeProject(projectRoot);\n\n const bundlerProps = await resolveBundlerPropsAsync(projectRoot, options);\n\n // Resolve the scheme before the device so we can filter devices based on\n // whichever scheme is selected (i.e. don't present TV devices if the scheme cannot be run on a TV).\n const { osType, name: scheme } = await resolveNativeSchemePropsAsync(\n projectRoot,\n options,\n xcodeProject\n );\n\n // Use the configuration or `Debug` if none is provided.\n const configuration = options.configuration || 'Debug';\n\n // Resolve the device based on the provided device id or prompt\n // from a list of devices (connected or simulated) that are filtered by the scheme.\n const device = await resolveDeviceAsync(options.device, {\n // It's unclear if there's any value to asserting that we haven't hardcoded the os type in the CLI.\n osType: isOSType(osType) ? osType : undefined,\n xcodeProject,\n scheme,\n configuration,\n });\n\n const isSimulator = isSimulatorDevice(device);\n\n // This optimization skips resetting the Metro cache needlessly.\n // The cache is reset in `../node_modules/react-native/scripts/react-native-xcode.sh` when the\n // project is running in Debug and built onto a physical device. It seems that this is done because\n // the script is run from Xcode and unaware of the CLI instance.\n const shouldSkipInitialBundling = configuration === 'Debug' && !isSimulator;\n\n return {\n ...bundlerProps,\n shouldStartBundler: options.configuration === 'Debug' || bundlerProps.shouldStartBundler,\n projectRoot,\n isSimulator,\n xcodeProject,\n device,\n configuration,\n shouldSkipInitialBundling,\n buildCache: options.buildCache !== false,\n scheme,\n };\n}\n"],"names":["resolveOptionsAsync","projectRoot","options","xcodeProject","resolveXcodeProject","bundlerProps","resolveBundlerPropsAsync","osType","name","scheme","resolveNativeSchemePropsAsync","configuration","device","resolveDeviceAsync","isOSType","undefined","isSimulator","isSimulatorDevice","shouldSkipInitialBundling","shouldStartBundler","buildCache"],"mappings":"AAAA;;;;+
|
|
1
|
+
{"version":3,"sources":["../../../../../src/run/ios/options/resolveOptions.ts"],"sourcesContent":["import { isSimulatorDevice, resolveDeviceAsync } from './resolveDevice';\nimport { resolveNativeSchemePropsAsync } from './resolveNativeScheme';\nimport { resolveXcodeProject } from './resolveXcodeProject';\nimport { isOSType } from '../../../start/platforms/ios/simctl';\nimport { profile } from '../../../utils/profile';\nimport { resolveBundlerPropsAsync } from '../../resolveBundlerProps';\nimport { BuildProps, Options } from '../XcodeBuild.types';\n\n/** Resolve arguments for the `run:ios` command. */\nexport async function resolveOptionsAsync(\n projectRoot: string,\n options: Options\n): Promise<BuildProps> {\n const xcodeProject = resolveXcodeProject(projectRoot);\n\n const bundlerProps = await resolveBundlerPropsAsync(projectRoot, options);\n\n // Resolve the scheme before the device so we can filter devices based on\n // whichever scheme is selected (i.e. don't present TV devices if the scheme cannot be run on a TV).\n const { osType, name: scheme } = await resolveNativeSchemePropsAsync(\n projectRoot,\n options,\n xcodeProject\n );\n\n // Use the configuration or `Debug` if none is provided.\n const configuration = options.configuration || 'Debug';\n\n // Resolve the device based on the provided device id or prompt\n // from a list of devices (connected or simulated) that are filtered by the scheme.\n const device = await profile(resolveDeviceAsync)(options.device, {\n // It's unclear if there's any value to asserting that we haven't hardcoded the os type in the CLI.\n osType: isOSType(osType) ? osType : undefined,\n xcodeProject,\n scheme,\n configuration,\n });\n\n const isSimulator = isSimulatorDevice(device);\n\n // This optimization skips resetting the Metro cache needlessly.\n // The cache is reset in `../node_modules/react-native/scripts/react-native-xcode.sh` when the\n // project is running in Debug and built onto a physical device. It seems that this is done because\n // the script is run from Xcode and unaware of the CLI instance.\n const shouldSkipInitialBundling = configuration === 'Debug' && !isSimulator;\n\n return {\n ...bundlerProps,\n shouldStartBundler: options.configuration === 'Debug' || bundlerProps.shouldStartBundler,\n projectRoot,\n isSimulator,\n xcodeProject,\n device,\n configuration,\n shouldSkipInitialBundling,\n buildCache: options.buildCache !== false,\n scheme,\n };\n}\n"],"names":["resolveOptionsAsync","projectRoot","options","xcodeProject","resolveXcodeProject","bundlerProps","resolveBundlerPropsAsync","osType","name","scheme","resolveNativeSchemePropsAsync","configuration","device","profile","resolveDeviceAsync","isOSType","undefined","isSimulator","isSimulatorDevice","shouldSkipInitialBundling","shouldStartBundler","buildCache"],"mappings":"AAAA;;;;+BASsBA,qBAAmB;;aAAnBA,mBAAmB;;+BATa,iBAAiB;qCACzB,uBAAuB;qCACjC,uBAAuB;wBAClC,qCAAqC;yBACtC,wBAAwB;qCACP,2BAA2B;AAI7D,eAAeA,mBAAmB,CACvCC,WAAmB,EACnBC,OAAgB,EACK;IACrB,MAAMC,YAAY,GAAGC,IAAAA,oBAAmB,oBAAA,EAACH,WAAW,CAAC,AAAC;IAEtD,MA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
|
|
8
8
|
});
|
|
9
|
+
function _spawnAsync() {
|
|
10
|
+
const data = /*#__PURE__*/ _interopRequireDefault(require("@expo/spawn-async"));
|
|
11
|
+
_spawnAsync = function() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
return data;
|
|
15
|
+
}
|
|
9
16
|
function _chalk() {
|
|
10
17
|
const data = /*#__PURE__*/ _interopRequireDefault(require("chalk"));
|
|
11
18
|
_chalk = function() {
|
|
@@ -13,7 +20,22 @@ function _chalk() {
|
|
|
13
20
|
};
|
|
14
21
|
return data;
|
|
15
22
|
}
|
|
23
|
+
function _fs() {
|
|
24
|
+
const data = /*#__PURE__*/ _interopRequireDefault(require("fs"));
|
|
25
|
+
_fs = function() {
|
|
26
|
+
return data;
|
|
27
|
+
};
|
|
28
|
+
return data;
|
|
29
|
+
}
|
|
30
|
+
function _path() {
|
|
31
|
+
const data = /*#__PURE__*/ _interopRequireDefault(require("path"));
|
|
32
|
+
_path = function() {
|
|
33
|
+
return data;
|
|
34
|
+
};
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
16
37
|
const _log = /*#__PURE__*/ _interopRequireWildcard(require("../../log"));
|
|
38
|
+
const _appleAppIdResolver = require("../../start/platforms/ios/AppleAppIdResolver");
|
|
17
39
|
const _cocoapods = require("../../utils/cocoapods");
|
|
18
40
|
const _nodeEnv = require("../../utils/nodeEnv");
|
|
19
41
|
const _port = require("../../utils/port");
|
|
@@ -27,6 +49,8 @@ const _launchApp = require("./launchApp");
|
|
|
27
49
|
const _resolveOptions = require("./options/resolveOptions");
|
|
28
50
|
const _validateExternalBinary = require("./validateExternalBinary");
|
|
29
51
|
const _exportEager = require("../../export/embed/exportEager");
|
|
52
|
+
const _simctl = require("../../start/platforms/ios/simctl");
|
|
53
|
+
const _errors = require("../../utils/errors");
|
|
30
54
|
function _interopRequireDefault(obj) {
|
|
31
55
|
return obj && obj.__esModule ? obj : {
|
|
32
56
|
default: obj
|
|
@@ -85,11 +109,53 @@ async function runIosAsync(projectRoot, options) {
|
|
|
85
109
|
await (0, _cocoapods.maybePromptToSyncPodsAsync)(projectRoot);
|
|
86
110
|
}
|
|
87
111
|
// Resolve the CLI arguments into useable options.
|
|
88
|
-
const props = await (0, _resolveOptions.resolveOptionsAsync)(projectRoot, options);
|
|
89
|
-
|
|
112
|
+
const props = await (0, _profile.profile)(_resolveOptions.resolveOptionsAsync)(projectRoot, options);
|
|
113
|
+
if (options.rebundle) {
|
|
114
|
+
_log.warn(`The --unstable-rebundle flag is experimental and may not work as expected.`);
|
|
115
|
+
// Get the existing binary path to re-bundle the app.
|
|
116
|
+
let binaryPath;
|
|
117
|
+
if (!options.binary) {
|
|
118
|
+
if (!props.isSimulator) {
|
|
119
|
+
throw new Error("Re-bundling on physical devices requires the --binary flag.");
|
|
120
|
+
}
|
|
121
|
+
const appId = await new _appleAppIdResolver.AppleAppIdResolver(projectRoot).getAppIdAsync();
|
|
122
|
+
const possibleBinaryPath = await (0, _simctl.getContainerPathAsync)(props.device, {
|
|
123
|
+
appId
|
|
124
|
+
});
|
|
125
|
+
if (!possibleBinaryPath) {
|
|
126
|
+
throw new _errors.CommandError(`Cannot rebundle because no --binary was provided and no existing binary was found on the device for ID: ${appId}.`);
|
|
127
|
+
}
|
|
128
|
+
binaryPath = possibleBinaryPath;
|
|
129
|
+
_log.log("Re-using existing binary path:", binaryPath);
|
|
130
|
+
// Set the binary path to the existing binary path.
|
|
131
|
+
options.binary = binaryPath;
|
|
132
|
+
}
|
|
133
|
+
_log.log("Rebundling the Expo config file");
|
|
134
|
+
// Re-bundle the config file the same way the app was originally bundled.
|
|
135
|
+
await (0, _spawnAsync().default)("node", [
|
|
136
|
+
_path().default.join(require.resolve("expo-constants/package.json"), "../scripts/getAppConfig.js"),
|
|
137
|
+
projectRoot,
|
|
138
|
+
_path().default.join(options.binary, "EXConstants.bundle"),
|
|
139
|
+
]);
|
|
140
|
+
// Re-bundle the app.
|
|
141
|
+
const possibleBundleOutput = _path().default.join(options.binary, "main.jsbundle");
|
|
142
|
+
if (_fs().default.existsSync(possibleBundleOutput)) {
|
|
143
|
+
_log.log("Rebundling the app...");
|
|
144
|
+
await (0, _exportEager.exportEagerAsync)(projectRoot, {
|
|
145
|
+
resetCache: false,
|
|
146
|
+
dev: false,
|
|
147
|
+
platform: "ios",
|
|
148
|
+
assetsDest: _path().default.join(options.binary, "assets"),
|
|
149
|
+
bundleOutput: possibleBundleOutput
|
|
150
|
+
});
|
|
151
|
+
} else {
|
|
152
|
+
_log.warn("Bundle output not found at expected location:", possibleBundleOutput);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
let binaryPath1;
|
|
90
156
|
if (options.binary) {
|
|
91
|
-
|
|
92
|
-
_log.log("Using custom binary path:",
|
|
157
|
+
binaryPath1 = await (0, _validateExternalBinary.getValidBinaryPathAsync)(options.binary, props);
|
|
158
|
+
_log.log("Using custom binary path:", binaryPath1);
|
|
93
159
|
} else {
|
|
94
160
|
let eagerBundleOptions;
|
|
95
161
|
if (options.configuration === "Release") {
|
|
@@ -105,15 +171,28 @@ async function runIosAsync(projectRoot, options) {
|
|
|
105
171
|
});
|
|
106
172
|
// Find the path to the built app binary, this will be used to install the binary
|
|
107
173
|
// on a device.
|
|
108
|
-
|
|
174
|
+
binaryPath1 = await (0, _profile.profile)(_xcodeBuild.getAppBinaryPath)(buildOutput);
|
|
109
175
|
}
|
|
110
|
-
debug("Binary path:",
|
|
176
|
+
debug("Binary path:", binaryPath1);
|
|
111
177
|
// Ensure the port hasn't become busy during the build.
|
|
112
178
|
if (props.shouldStartBundler && !await (0, _port.ensurePortAvailabilityAsync)(projectRoot, props)) {
|
|
113
179
|
props.shouldStartBundler = false;
|
|
114
180
|
}
|
|
115
|
-
const launchInfo = await (0, _launchApp.getLaunchInfoForBinaryAsync)(
|
|
181
|
+
const launchInfo = await (0, _launchApp.getLaunchInfoForBinaryAsync)(binaryPath1);
|
|
116
182
|
const isCustomBinary = !!options.binary;
|
|
183
|
+
// Always close the app before launching on a simulator. Otherwise certain cached resources like the splashscreen will not be available.
|
|
184
|
+
if (props.isSimulator) {
|
|
185
|
+
try {
|
|
186
|
+
await (0, _simctl.simctlAsync)([
|
|
187
|
+
"terminate",
|
|
188
|
+
props.device.udid,
|
|
189
|
+
launchInfo.bundleId
|
|
190
|
+
]);
|
|
191
|
+
} catch (error) {
|
|
192
|
+
// If we failed it's likely that the app was not running to begin with and we will get an `invalid device` error
|
|
193
|
+
debug("Failed to terminate app (possibly because it was not running):", error);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
117
196
|
// Start the dev server which creates all of the required info for
|
|
118
197
|
// launching the app on a simulator.
|
|
119
198
|
const manager = await (0, _startBundler.startBundlerAsync)(projectRoot, {
|
|
@@ -123,7 +202,7 @@ async function runIosAsync(projectRoot, options) {
|
|
|
123
202
|
scheme: isCustomBinary ? launchInfo.schemes[0] : (ref = await (0, _scheme.getSchemesForIosAsync)(projectRoot)) == null ? void 0 : ref[0]
|
|
124
203
|
});
|
|
125
204
|
// Install and launch the app binary on a device.
|
|
126
|
-
await (0, _launchApp.launchAppAsync)(
|
|
205
|
+
await (0, _launchApp.launchAppAsync)(binaryPath1, manager, {
|
|
127
206
|
isSimulator: props.isSimulator,
|
|
128
207
|
device: props.device,
|
|
129
208
|
shouldStartBundler: props.shouldStartBundler
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/run/ios/runIosAsync.ts"],"sourcesContent":["import chalk from 'chalk';\n\nimport * as Log from '../../log';\nimport { maybePromptToSyncPodsAsync } from '../../utils/cocoapods';\nimport { setNodeEnv } from '../../utils/nodeEnv';\nimport { ensurePortAvailabilityAsync } from '../../utils/port';\nimport { profile } from '../../utils/profile';\nimport { getSchemesForIosAsync } from '../../utils/scheme';\nimport { ensureNativeProjectAsync } from '../ensureNativeProject';\nimport { logProjectLogsLocation } from '../hints';\nimport { startBundlerAsync } from '../startBundler';\nimport * as XcodeBuild from './XcodeBuild';\nimport { Options } from './XcodeBuild.types';\nimport { getLaunchInfoForBinaryAsync, launchAppAsync } from './launchApp';\nimport { resolveOptionsAsync } from './options/resolveOptions';\nimport { getValidBinaryPathAsync } from './validateExternalBinary';\nimport { exportEagerAsync } from '../../export/embed/exportEager';\n\nconst debug = require('debug')('expo:run:ios');\n\nexport async function runIosAsync(projectRoot: string, options: Options) {\n setNodeEnv(options.configuration === 'Release' ? 'production' : 'development');\n require('@expo/env').load(projectRoot);\n\n assertPlatform();\n\n const install = !!options.install;\n\n if ((await ensureNativeProjectAsync(projectRoot, { platform: 'ios', install })) && install) {\n await maybePromptToSyncPodsAsync(projectRoot);\n }\n\n // Resolve the CLI arguments into useable options.\n const props = await resolveOptionsAsync(projectRoot, options);\n\n let binaryPath: string;\n if (options.binary) {\n binaryPath = await getValidBinaryPathAsync(options.binary, props);\n Log.log('Using custom binary path:', binaryPath);\n } else {\n let eagerBundleOptions: string | undefined;\n\n if (options.configuration === 'Release') {\n eagerBundleOptions = JSON.stringify(\n await exportEagerAsync(projectRoot, {\n dev: false,\n platform: 'ios',\n })\n );\n }\n\n // Spawn the `xcodebuild` process to create the app binary.\n const buildOutput = await XcodeBuild.buildAsync({\n ...props,\n eagerBundleOptions,\n });\n\n // Find the path to the built app binary, this will be used to install the binary\n // on a device.\n binaryPath = await profile(XcodeBuild.getAppBinaryPath)(buildOutput);\n }\n debug('Binary path:', binaryPath);\n\n // Ensure the port hasn't become busy during the build.\n if (props.shouldStartBundler && !(await ensurePortAvailabilityAsync(projectRoot, props))) {\n props.shouldStartBundler = false;\n }\n\n const launchInfo = await getLaunchInfoForBinaryAsync(binaryPath);\n const isCustomBinary = !!options.binary;\n\n // Start the dev server which creates all of the required info for\n // launching the app on a simulator.\n const manager = await startBundlerAsync(projectRoot, {\n port: props.port,\n headless: !props.shouldStartBundler,\n // If a scheme is specified then use that instead of the package name.\n\n scheme: isCustomBinary\n ? // If launching a custom binary, use the schemes in the Info.plist.\n launchInfo.schemes[0]\n : // If a scheme is specified then use that instead of the package name.\n (await getSchemesForIosAsync(projectRoot))?.[0],\n });\n\n // Install and launch the app binary on a device.\n await launchAppAsync(\n binaryPath,\n manager,\n {\n isSimulator: props.isSimulator,\n device: props.device,\n shouldStartBundler: props.shouldStartBundler,\n },\n launchInfo.bundleId\n );\n\n // Log the location of the JS logs for the device.\n if (props.shouldStartBundler) {\n logProjectLogsLocation();\n } else {\n await manager.stopAsync();\n }\n}\n\nfunction assertPlatform() {\n if (process.platform !== 'darwin') {\n Log.exit(\n chalk`iOS apps can only be built on macOS devices. Use {cyan eas build -p ios} to build in the cloud.`\n );\n }\n}\n"],"names":["runIosAsync","debug","require","projectRoot","options","setNodeEnv","configuration","load","assertPlatform","install","ensureNativeProjectAsync","platform","maybePromptToSyncPodsAsync","props","resolveOptionsAsync","binaryPath","binary","getValidBinaryPathAsync","Log","log","eagerBundleOptions","JSON","stringify","exportEagerAsync","dev","buildOutput","XcodeBuild","buildAsync","profile","getAppBinaryPath","shouldStartBundler","ensurePortAvailabilityAsync","launchInfo","getLaunchInfoForBinaryAsync","isCustomBinary","manager","startBundlerAsync","port","headless","scheme","schemes","getSchemesForIosAsync","launchAppAsync","isSimulator","device","bundleId","logProjectLogsLocation","stopAsync","process","exit","chalk"],"mappings":"AAAA;;;;+BAoBsBA,aAAW;;aAAXA,WAAW;;;8DApBf,OAAO;;;;;;2DAEJ,WAAW;2BACW,uBAAuB;yBACvC,qBAAqB;sBACJ,kBAAkB;yBACtC,qBAAqB;wBACP,oBAAoB;qCACjB,wBAAwB;uBAC1B,UAAU;8BACf,iBAAiB;kEACvB,cAAc;2BAEkB,aAAa;gCACrC,0BAA0B;wCACtB,0BAA0B;6BACjC,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjE,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,AAAC;AAExC,eAAeF,WAAW,CAACG,WAAmB,EAAEC,OAAgB,EAAE;QA8DjE,GA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AAIhC,KAAK,CAACiB,kBAAkB,EAAE;QAC5BgB,IAAAA,MAAsB,uBAAA,GAAE,CAAC;IAC3B,OAAO;QACL,MAAMX,OAAO,CAACY,SAAS,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC;AAED,SAASvC,cAAc,GAAG;IACxB,IAAIwC,OAAO,CAACrC,QAAQ,KAAK,QAAQ,EAAE;QACjCO,IAAG,CAAC+B,IAAI,CACNC,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,+FAA+F,CAAC,CACvG,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/run/ios/runIosAsync.ts"],"sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport * as Log from '../../log';\nimport { AppleAppIdResolver } from '../../start/platforms/ios/AppleAppIdResolver';\nimport { maybePromptToSyncPodsAsync } from '../../utils/cocoapods';\nimport { setNodeEnv } from '../../utils/nodeEnv';\nimport { ensurePortAvailabilityAsync } from '../../utils/port';\nimport { profile } from '../../utils/profile';\nimport { getSchemesForIosAsync } from '../../utils/scheme';\nimport { ensureNativeProjectAsync } from '../ensureNativeProject';\nimport { logProjectLogsLocation } from '../hints';\nimport { startBundlerAsync } from '../startBundler';\nimport * as XcodeBuild from './XcodeBuild';\nimport { Options } from './XcodeBuild.types';\nimport { getLaunchInfoForBinaryAsync, launchAppAsync } from './launchApp';\nimport { resolveOptionsAsync } from './options/resolveOptions';\nimport { getValidBinaryPathAsync } from './validateExternalBinary';\nimport { exportEagerAsync } from '../../export/embed/exportEager';\nimport { getContainerPathAsync, simctlAsync } from '../../start/platforms/ios/simctl';\nimport { CommandError } from '../../utils/errors';\n\nconst debug = require('debug')('expo:run:ios');\n\nexport async function runIosAsync(projectRoot: string, options: Options) {\n setNodeEnv(options.configuration === 'Release' ? 'production' : 'development');\n require('@expo/env').load(projectRoot);\n\n assertPlatform();\n\n const install = !!options.install;\n\n if ((await ensureNativeProjectAsync(projectRoot, { platform: 'ios', install })) && install) {\n await maybePromptToSyncPodsAsync(projectRoot);\n }\n\n // Resolve the CLI arguments into useable options.\n const props = await profile(resolveOptionsAsync)(projectRoot, options);\n\n if (options.rebundle) {\n Log.warn(`The --unstable-rebundle flag is experimental and may not work as expected.`);\n // Get the existing binary path to re-bundle the app.\n\n let binaryPath: string;\n if (!options.binary) {\n if (!props.isSimulator) {\n throw new Error('Re-bundling on physical devices requires the --binary flag.');\n }\n const appId = await new AppleAppIdResolver(projectRoot).getAppIdAsync();\n const possibleBinaryPath = await getContainerPathAsync(props.device, {\n appId,\n });\n if (!possibleBinaryPath) {\n throw new CommandError(\n `Cannot rebundle because no --binary was provided and no existing binary was found on the device for ID: ${appId}.`\n );\n }\n binaryPath = possibleBinaryPath;\n Log.log('Re-using existing binary path:', binaryPath);\n // Set the binary path to the existing binary path.\n options.binary = binaryPath;\n }\n\n Log.log('Rebundling the Expo config file');\n // Re-bundle the config file the same way the app was originally bundled.\n await spawnAsync('node', [\n path.join(require.resolve('expo-constants/package.json'), '../scripts/getAppConfig.js'),\n projectRoot,\n path.join(options.binary, 'EXConstants.bundle'),\n ]);\n // Re-bundle the app.\n\n const possibleBundleOutput = path.join(options.binary, 'main.jsbundle');\n\n if (fs.existsSync(possibleBundleOutput)) {\n Log.log('Rebundling the app...');\n await exportEagerAsync(projectRoot, {\n resetCache: false,\n dev: false,\n platform: 'ios',\n assetsDest: path.join(options.binary, 'assets'),\n bundleOutput: possibleBundleOutput,\n });\n } else {\n Log.warn('Bundle output not found at expected location:', possibleBundleOutput);\n }\n }\n\n let binaryPath: string;\n if (options.binary) {\n binaryPath = await getValidBinaryPathAsync(options.binary, props);\n Log.log('Using custom binary path:', binaryPath);\n } else {\n let eagerBundleOptions: string | undefined;\n\n if (options.configuration === 'Release') {\n eagerBundleOptions = JSON.stringify(\n await exportEagerAsync(projectRoot, {\n dev: false,\n platform: 'ios',\n })\n );\n }\n\n // Spawn the `xcodebuild` process to create the app binary.\n const buildOutput = await XcodeBuild.buildAsync({\n ...props,\n eagerBundleOptions,\n });\n\n // Find the path to the built app binary, this will be used to install the binary\n // on a device.\n binaryPath = await profile(XcodeBuild.getAppBinaryPath)(buildOutput);\n }\n debug('Binary path:', binaryPath);\n\n // Ensure the port hasn't become busy during the build.\n if (props.shouldStartBundler && !(await ensurePortAvailabilityAsync(projectRoot, props))) {\n props.shouldStartBundler = false;\n }\n\n const launchInfo = await getLaunchInfoForBinaryAsync(binaryPath);\n const isCustomBinary = !!options.binary;\n\n // Always close the app before launching on a simulator. Otherwise certain cached resources like the splashscreen will not be available.\n if (props.isSimulator) {\n try {\n await simctlAsync(['terminate', props.device.udid, launchInfo.bundleId]);\n } catch (error) {\n // If we failed it's likely that the app was not running to begin with and we will get an `invalid device` error\n debug('Failed to terminate app (possibly because it was not running):', error);\n }\n }\n\n // Start the dev server which creates all of the required info for\n // launching the app on a simulator.\n const manager = await startBundlerAsync(projectRoot, {\n port: props.port,\n headless: !props.shouldStartBundler,\n // If a scheme is specified then use that instead of the package name.\n\n scheme: isCustomBinary\n ? // If launching a custom binary, use the schemes in the Info.plist.\n launchInfo.schemes[0]\n : // If a scheme is specified then use that instead of the package name.\n (await getSchemesForIosAsync(projectRoot))?.[0],\n });\n\n // Install and launch the app binary on a device.\n await launchAppAsync(\n binaryPath,\n manager,\n {\n isSimulator: props.isSimulator,\n device: props.device,\n shouldStartBundler: props.shouldStartBundler,\n },\n launchInfo.bundleId\n );\n\n // Log the location of the JS logs for the device.\n if (props.shouldStartBundler) {\n logProjectLogsLocation();\n } else {\n await manager.stopAsync();\n }\n}\n\nfunction assertPlatform() {\n if (process.platform !== 'darwin') {\n Log.exit(\n chalk`iOS apps can only be built on macOS devices. Use {cyan eas build -p ios} to build in the cloud.`\n );\n }\n}\n"],"names":["runIosAsync","debug","require","projectRoot","options","setNodeEnv","configuration","load","assertPlatform","install","ensureNativeProjectAsync","platform","maybePromptToSyncPodsAsync","props","profile","resolveOptionsAsync","rebundle","Log","warn","binaryPath","binary","isSimulator","Error","appId","AppleAppIdResolver","getAppIdAsync","possibleBinaryPath","getContainerPathAsync","device","CommandError","log","spawnAsync","path","join","resolve","possibleBundleOutput","fs","existsSync","exportEagerAsync","resetCache","dev","assetsDest","bundleOutput","getValidBinaryPathAsync","eagerBundleOptions","JSON","stringify","buildOutput","XcodeBuild","buildAsync","getAppBinaryPath","shouldStartBundler","ensurePortAvailabilityAsync","launchInfo","getLaunchInfoForBinaryAsync","isCustomBinary","simctlAsync","udid","bundleId","error","manager","startBundlerAsync","port","headless","scheme","schemes","getSchemesForIosAsync","launchAppAsync","logProjectLogsLocation","stopAsync","process","exit","chalk"],"mappings":"AAAA;;;;+BA0BsBA,aAAW;;aAAXA,WAAW;;;8DA1BV,mBAAmB;;;;;;;8DACxB,OAAO;;;;;;;8DACV,IAAI;;;;;;;8DACF,MAAM;;;;;;2DAEF,WAAW;oCACG,8CAA8C;2BACtC,uBAAuB;yBACvC,qBAAqB;sBACJ,kBAAkB;yBACtC,qBAAqB;wBACP,oBAAoB;qCACjB,wBAAwB;uBAC1B,UAAU;8BACf,iBAAiB;kEACvB,cAAc;2BAEkB,aAAa;gCACrC,0BAA0B;wCACtB,0BAA0B;6BACjC,gCAAgC;wBACd,kCAAkC;wBACxD,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjD,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,AAAC;AAExC,eAAeF,WAAW,CAACG,WAAmB,EAAEC,OAAgB,EAAE;QAyHjE,GAA0C;IAxHhDC,IAAAA,QAAU,WAAA,EAACD,OAAO,CAACE,aAAa,KAAK,SAAS,GAAG,YAAY,GAAG,aAAa,CAAC,CAAC;IAC/EJ,OAAO,CAAC,WAAW,CAAC,CAACK,IAAI,CAACJ,WAAW,CAAC,CAAC;IAEvCK,cAAc,EAAE,CAAC;IAEjB,MAAMC,OAAO,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,CAAC;IAED,kEAAkE;IAClE,oCAAoC;IACpC,MAAMC,OAAO,GAAG,MAAMC,IAAAA,aAAiB,kBAAA,EAAC1D,WAAW,EAAE;QACnD2D,IAAI,EAAEjD,KAAK,CAACiD,IAAI;QAChBC,QAAQ,EAAE,CAAClD,KAAK,CAACsC,kBAAkB;QACnC,sEAAsE;QAEtEa,MAAM,EAAET,cAAc,GAElBF,UAAU,CAACY,OAAO,CAAC,CAAC,CAAC,GAErB,CAAA,GAA0C,GAAzC,MAAMC,IAAAA,OAAqB,sBAAA,EAAC/D,WAAW,CAAC,SAAM,GAA/C,KAAA,CAA+C,GAA/C,GAA0C,AAAE,CAAC,CAAC,CAAC;KACpD,CAAC,AAAC;IAEH,iDAAiD;IACjD,MAAMgE,IAAAA,UAAc,eAAA,EAClBhD,WAAU,EACVyC,OAAO,EACP;QACEvC,WAAW,EAAER,KAAK,CAACQ,WAAW;QAC9BO,MAAM,EAAEf,KAAK,CAACe,MAAM;QACpBuB,kBAAkB,EAAEtC,KAAK,CAACsC,kBAAkB;KAC7C,EACDE,UAAU,CAACK,QAAQ,CACpB,CAAC;IAEF,kDAAkD;IAClD,IAAI7C,KAAK,CAACsC,kBAAkB,EAAE;QAC5BiB,IAAAA,MAAsB,uBAAA,GAAE,CAAC;IAC3B,OAAO;QACL,MAAMR,OAAO,CAACS,SAAS,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC;AAED,SAAS7D,cAAc,GAAG;IACxB,IAAI8D,OAAO,CAAC3D,QAAQ,KAAK,QAAQ,EAAE;QACjCM,IAAG,CAACsD,IAAI,CACNC,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,+FAA+F,CAAC,CACvG,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -890,8 +890,7 @@ class MetroBundlerDevServer extends _bundlerDevServer.BundlerDevServer {
|
|
|
890
890
|
// NOTE: We throw away the updates and instead simply send a trigger to the client to re-fetch the server route.
|
|
891
891
|
if (!isInitialUpdate && hasUpdate) {
|
|
892
892
|
// Clear all SSR modules before sending the reload event. This ensures that the next event will rebuild the in-memory state from scratch.
|
|
893
|
-
//
|
|
894
|
-
if (typeof globalThis.__c === "function") globalThis.__c();
|
|
893
|
+
// if (typeof globalThis.__c === 'function') globalThis.__c();
|
|
895
894
|
onReload();
|
|
896
895
|
}
|
|
897
896
|
}
|