@expo/cli 0.18.22 → 0.18.24

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 CHANGED
@@ -120,7 +120,7 @@ const args = (0, _arg().default)({
120
120
  });
121
121
  if (args["--version"]) {
122
122
  // Version is added in the build script.
123
- console.log("0.18.22");
123
+ console.log("0.18.24");
124
124
  process.exit(0);
125
125
  }
126
126
  if (args["--non-interactive"]) {
@@ -170,7 +170,7 @@ async function exportEmbedBundleAndAssetsAsync(projectRoot, options) {
170
170
  var ref, ref1;
171
171
  const bundles = await devServer.legacySinglePageExportBundleAsync({
172
172
  splitChunks: false,
173
- mainModuleName: options.entryFile,
173
+ mainModuleName: resolveRealEntryFilePath(projectRoot, options.entryFile),
174
174
  platform: options.platform,
175
175
  minify: options.minify,
176
176
  mode: options.dev ? "development" : "production",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/export/embed/exportEmbedAsync.ts"],"sourcesContent":["/**\n * Copyright © 2023 650 Industries.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { getConfig } from '@expo/config';\nimport getMetroAssets from '@expo/metro-config/build/transform-worker/getAssets';\nimport assert from 'assert';\nimport fs from 'fs';\nimport { sync as globSync } from 'glob';\nimport Server from 'metro/src/Server';\nimport splitBundleOptions from 'metro/src/lib/splitBundleOptions';\nimport output from 'metro/src/shared/output/bundle';\nimport type { BundleOptions } from 'metro/src/shared/types';\nimport path from 'path';\n\nimport { Options } from './resolveOptions';\nimport { isExecutingFromXcodebuild, logMetroErrorInXcode } from './xcodeCompilerLogger';\nimport { Log } from '../../log';\nimport { DevServerManager } from '../../start/server/DevServerManager';\nimport { MetroBundlerDevServer } from '../../start/server/metro/MetroBundlerDevServer';\nimport { loadMetroConfigAsync } from '../../start/server/metro/instantiateMetro';\nimport { assertMetroPrivateServer } from '../../start/server/metro/metroPrivateServer';\nimport { getMetroDirectBundleOptionsForExpoConfig } from '../../start/server/middleware/metroOptions';\nimport { stripAnsi } from '../../utils/ansi';\nimport { removeAsync } from '../../utils/dir';\nimport { setNodeEnv } from '../../utils/nodeEnv';\nimport { isEnableHermesManaged } from '../exportHermes';\nimport { persistMetroAssetsAsync } from '../persistMetroAssets';\nimport { BundleAssetWithFileHashes } from '../saveAssets';\n\nconst debug = require('debug')('expo:export:embed');\n\nfunction guessCopiedAppleBundlePath(bundleOutput: string) {\n // Ensure the path is familiar before guessing.\n if (!bundleOutput.match(/\\/Xcode\\/DerivedData\\/.*\\/Build\\/Products\\//)) {\n debug('Bundling to non-standard location:', bundleOutput);\n return false;\n }\n const bundleName = path.basename(bundleOutput);\n const bundleParent = path.dirname(bundleOutput);\n const possiblePath = globSync(path.join(bundleParent, `*.app/${bundleName}`), {\n // bundle identifiers can start with dots.\n dot: true,\n })[0];\n debug('Possible path for previous bundle:', possiblePath);\n return possiblePath;\n}\n\nexport async function exportEmbedAsync(projectRoot: string, options: Options) {\n setNodeEnv(options.dev ? 'development' : 'production');\n require('@expo/env').load(projectRoot);\n\n // Ensure we delete the old bundle to trigger a failure if the bundle cannot be created.\n await removeAsync(options.bundleOutput);\n\n // The iOS bundle is copied in to the Xcode project, so we need to remove the old one\n // to prevent Xcode from loading the old one after a build failure.\n if (options.platform === 'ios') {\n const previousPath = guessCopiedAppleBundlePath(options.bundleOutput);\n if (previousPath && fs.existsSync(previousPath)) {\n debug('Removing previous iOS bundle:', previousPath);\n await removeAsync(previousPath);\n }\n }\n\n const { bundle, assets } = await exportEmbedBundleAndAssetsAsync(projectRoot, options);\n\n fs.mkdirSync(path.dirname(options.bundleOutput), { recursive: true, mode: 0o755 });\n\n // Persist bundle and source maps.\n await Promise.all([\n output.save(bundle, options, Log.log),\n // NOTE(EvanBacon): This may need to be adjusted in the future if want to support baseUrl on native\n // platforms when doing production embeds (unlikely).\n options.assetsDest\n ? persistMetroAssetsAsync(assets, {\n platform: options.platform,\n outputDirectory: options.assetsDest,\n iosAssetCatalogDirectory: options.assetCatalogDest,\n })\n : null,\n ]);\n}\n\nexport async function exportEmbedBundleAndAssetsAsync(\n projectRoot: string,\n options: Options\n): Promise<{\n bundle: Awaited<ReturnType<Server['build']>>;\n assets: readonly BundleAssetWithFileHashes[];\n}> {\n const devServerManager = await DevServerManager.startMetroAsync(projectRoot, {\n minify: options.minify,\n mode: options.dev ? 'development' : 'production',\n port: 8081,\n isExporting: true,\n location: {},\n resetDevServer: options.resetCache,\n maxWorkers: options.maxWorkers,\n });\n\n const devServer = devServerManager.getDefaultDevServer();\n assert(devServer instanceof MetroBundlerDevServer);\n\n const exp = getConfig(projectRoot, { skipSDKVersionRequirement: true }).exp;\n const isHermes = isEnableHermesManaged(exp, options.platform);\n\n let sourceMapUrl = options.sourcemapOutput;\n if (sourceMapUrl && !options.sourcemapUseAbsolutePath) {\n sourceMapUrl = path.basename(sourceMapUrl);\n }\n\n try {\n const bundles = await devServer.legacySinglePageExportBundleAsync(\n {\n splitChunks: false,\n mainModuleName: options.entryFile,\n platform: options.platform,\n minify: options.minify,\n mode: options.dev ? 'development' : 'production',\n engine: isHermes ? 'hermes' : undefined,\n serializerIncludeMaps: !!sourceMapUrl,\n // Never output bytecode in the exported bundle since that is hardcoded in the native run script.\n bytecode: false,\n // source map inline\n reactCompiler: !!exp.experiments?.reactCompiler,\n },\n {\n sourceMapUrl,\n unstable_transformProfile: (options.unstableTransformProfile ||\n (isHermes ? 'hermes-stable' : 'default')) as BundleOptions['unstable_transformProfile'],\n }\n );\n\n return {\n bundle: {\n code: bundles.artifacts.filter((a: any) => a.type === 'js')[0].source.toString(),\n // Can be optional when source maps aren't enabled.\n map: bundles.artifacts.filter((a: any) => a.type === 'map')[0]?.source.toString(),\n },\n assets: bundles.assets,\n };\n } catch (error: any) {\n if (isError(error)) {\n // Log using Xcode error format so the errors are picked up by xcodebuild.\n // https://developer.apple.com/documentation/xcode/running-custom-scripts-during-a-build#Log-errors-and-warnings-from-your-script\n if (options.platform === 'ios') {\n // If the error is about to be presented in Xcode, strip the ansi characters from the message.\n if ('message' in error && isExecutingFromXcodebuild()) {\n error.message = stripAnsi(error.message) as string;\n }\n logMetroErrorInXcode(projectRoot, error);\n }\n }\n throw error;\n } finally {\n devServerManager.stopAsync();\n }\n}\n\n// Exports for expo-updates\nexport async function createMetroServerAndBundleRequestAsync(\n projectRoot: string,\n options: Pick<\n Options,\n | 'maxWorkers'\n | 'config'\n | 'platform'\n | 'sourcemapOutput'\n | 'sourcemapUseAbsolutePath'\n | 'entryFile'\n | 'minify'\n | 'dev'\n | 'resetCache'\n | 'unstableTransformProfile'\n >\n): Promise<{ server: Server; bundleRequest: BundleOptions }> {\n const exp = getConfig(projectRoot, { skipSDKVersionRequirement: true }).exp;\n\n // TODO: This is slow ~40ms\n const { config } = await loadMetroConfigAsync(\n projectRoot,\n {\n // TODO: This is always enabled in the native script and there's no way to disable it.\n resetCache: options.resetCache,\n\n maxWorkers: options.maxWorkers,\n config: options.config,\n },\n {\n exp,\n isExporting: true,\n getMetroBundler() {\n return server.getBundler().getBundler();\n },\n }\n );\n\n const isHermes = isEnableHermesManaged(exp, options.platform);\n\n let sourceMapUrl = options.sourcemapOutput;\n if (sourceMapUrl && !options.sourcemapUseAbsolutePath) {\n sourceMapUrl = path.basename(sourceMapUrl);\n }\n\n const bundleRequest = {\n ...Server.DEFAULT_BUNDLE_OPTIONS,\n ...getMetroDirectBundleOptionsForExpoConfig(projectRoot, exp, {\n splitChunks: false,\n mainModuleName: resolveRealEntryFilePath(projectRoot, options.entryFile),\n platform: options.platform,\n minify: options.minify,\n mode: options.dev ? 'development' : 'production',\n engine: isHermes ? 'hermes' : undefined,\n isExporting: true,\n // Never output bytecode in the exported bundle since that is hardcoded in the native run script.\n bytecode: false,\n }),\n sourceMapUrl,\n unstable_transformProfile: (options.unstableTransformProfile ||\n (isHermes ? 'hermes-stable' : 'default')) as BundleOptions['unstable_transformProfile'],\n };\n\n const server = new Server(config, {\n watch: false,\n });\n\n return { server, bundleRequest };\n}\n\nexport async function exportEmbedAssetsAsync(\n server: Server,\n bundleRequest: BundleOptions,\n projectRoot: string,\n options: Pick<Options, 'platform'>\n) {\n try {\n const { entryFile, onProgress, resolverOptions, transformOptions } = splitBundleOptions({\n ...bundleRequest,\n bundleType: 'todo',\n });\n\n assertMetroPrivateServer(server);\n\n const dependencies = await server._bundler.getDependencies(\n [entryFile],\n transformOptions,\n resolverOptions,\n { onProgress, shallow: false, lazy: false }\n );\n\n const config = server._config;\n\n return getMetroAssets(dependencies, {\n processModuleFilter: config.serializer.processModuleFilter,\n assetPlugins: config.transformer.assetPlugins,\n platform: transformOptions.platform!,\n // Forked out of Metro because the `this._getServerRootDir()` doesn't match the development\n // behavior.\n projectRoot: config.projectRoot, // this._getServerRootDir(),\n publicPath: config.transformer.publicPath,\n });\n } catch (error: any) {\n if (isError(error)) {\n // Log using Xcode error format so the errors are picked up by xcodebuild.\n // https://developer.apple.com/documentation/xcode/running-custom-scripts-during-a-build#Log-errors-and-warnings-from-your-script\n if (options.platform === 'ios') {\n // If the error is about to be presented in Xcode, strip the ansi characters from the message.\n if ('message' in error && isExecutingFromXcodebuild()) {\n error.message = stripAnsi(error.message) as string;\n }\n logMetroErrorInXcode(projectRoot, error);\n }\n }\n throw error;\n }\n}\n\nfunction isError(error: any): error is Error {\n return error instanceof Error;\n}\n\n/**\n * This is a workaround for Metro not resolving entry file paths to their real location.\n * When running exports through `eas build --local` on macOS, the `/var/folders` path is used instead of `/private/var/folders`.\n *\n * See: https://github.com/expo/expo/issues/28890\n */\nfunction resolveRealEntryFilePath(projectRoot: string, entryFile: string): string {\n if (projectRoot.startsWith('/private/var') && entryFile.startsWith('/var')) {\n return fs.realpathSync(entryFile);\n }\n\n return entryFile;\n}\n"],"names":["exportEmbedAsync","exportEmbedBundleAndAssetsAsync","createMetroServerAndBundleRequestAsync","exportEmbedAssetsAsync","debug","require","guessCopiedAppleBundlePath","bundleOutput","match","bundleName","path","basename","bundleParent","dirname","possiblePath","globSync","join","dot","projectRoot","options","setNodeEnv","dev","load","removeAsync","platform","previousPath","fs","existsSync","bundle","assets","mkdirSync","recursive","mode","Promise","all","output","save","Log","log","assetsDest","persistMetroAssetsAsync","outputDirectory","iosAssetCatalogDirectory","assetCatalogDest","devServerManager","DevServerManager","startMetroAsync","minify","port","isExporting","location","resetDevServer","resetCache","maxWorkers","devServer","getDefaultDevServer","assert","MetroBundlerDevServer","exp","getConfig","skipSDKVersionRequirement","isHermes","isEnableHermesManaged","sourceMapUrl","sourcemapOutput","sourcemapUseAbsolutePath","bundles","legacySinglePageExportBundleAsync","splitChunks","mainModuleName","entryFile","engine","undefined","serializerIncludeMaps","bytecode","reactCompiler","experiments","unstable_transformProfile","unstableTransformProfile","code","artifacts","filter","a","type","source","toString","map","error","isError","isExecutingFromXcodebuild","message","stripAnsi","logMetroErrorInXcode","stopAsync","config","loadMetroConfigAsync","getMetroBundler","server","getBundler","bundleRequest","Server","DEFAULT_BUNDLE_OPTIONS","getMetroDirectBundleOptionsForExpoConfig","resolveRealEntryFilePath","watch","onProgress","resolverOptions","transformOptions","splitBundleOptions","bundleType","assertMetroPrivateServer","dependencies","_bundler","getDependencies","shallow","lazy","_config","getMetroAssets","processModuleFilter","serializer","assetPlugins","transformer","publicPath","Error","startsWith","realpathSync"],"mappings":"AAAA;;;;;CAKC,GACD;;;;;;;;;;;IA4CsBA,gBAAgB,MAAhBA,gBAAgB;IAoChBC,+BAA+B,MAA/BA,+BAA+B;IA6E/BC,sCAAsC,MAAtCA,sCAAsC;IAqEtCC,sBAAsB,MAAtBA,sBAAsB;;;yBAlOlB,cAAc;;;;;;;8DACb,qDAAqD;;;;;;;8DAC7D,QAAQ;;;;;;;8DACZ,IAAI;;;;;;;yBACc,MAAM;;;;;;;8DACpB,kBAAkB;;;;;;;8DACN,kCAAkC;;;;;;;8DAC9C,gCAAgC;;;;;;;8DAElC,MAAM;;;;;;qCAGyC,uBAAuB;qBACnE,WAAW;kCACE,qCAAqC;uCAChC,gDAAgD;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AAE;QAC1E,OAAOlG,GAAE,EAAA,QAAA,CAACmG,YAAY,CAACvD,SAAS,CAAC,CAAC;IACpC,CAAC;IAED,OAAOA,SAAS,CAAC;AACnB,CAAC"}
1
+ {"version":3,"sources":["../../../../src/export/embed/exportEmbedAsync.ts"],"sourcesContent":["/**\n * Copyright © 2023 650 Industries.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { getConfig } from '@expo/config';\nimport getMetroAssets from '@expo/metro-config/build/transform-worker/getAssets';\nimport assert from 'assert';\nimport fs from 'fs';\nimport { sync as globSync } from 'glob';\nimport Server from 'metro/src/Server';\nimport splitBundleOptions from 'metro/src/lib/splitBundleOptions';\nimport output from 'metro/src/shared/output/bundle';\nimport type { BundleOptions } from 'metro/src/shared/types';\nimport path from 'path';\n\nimport { Options } from './resolveOptions';\nimport { isExecutingFromXcodebuild, logMetroErrorInXcode } from './xcodeCompilerLogger';\nimport { Log } from '../../log';\nimport { DevServerManager } from '../../start/server/DevServerManager';\nimport { MetroBundlerDevServer } from '../../start/server/metro/MetroBundlerDevServer';\nimport { loadMetroConfigAsync } from '../../start/server/metro/instantiateMetro';\nimport { assertMetroPrivateServer } from '../../start/server/metro/metroPrivateServer';\nimport { getMetroDirectBundleOptionsForExpoConfig } from '../../start/server/middleware/metroOptions';\nimport { stripAnsi } from '../../utils/ansi';\nimport { removeAsync } from '../../utils/dir';\nimport { setNodeEnv } from '../../utils/nodeEnv';\nimport { isEnableHermesManaged } from '../exportHermes';\nimport { persistMetroAssetsAsync } from '../persistMetroAssets';\nimport { BundleAssetWithFileHashes } from '../saveAssets';\n\nconst debug = require('debug')('expo:export:embed');\n\nfunction guessCopiedAppleBundlePath(bundleOutput: string) {\n // Ensure the path is familiar before guessing.\n if (!bundleOutput.match(/\\/Xcode\\/DerivedData\\/.*\\/Build\\/Products\\//)) {\n debug('Bundling to non-standard location:', bundleOutput);\n return false;\n }\n const bundleName = path.basename(bundleOutput);\n const bundleParent = path.dirname(bundleOutput);\n const possiblePath = globSync(path.join(bundleParent, `*.app/${bundleName}`), {\n // bundle identifiers can start with dots.\n dot: true,\n })[0];\n debug('Possible path for previous bundle:', possiblePath);\n return possiblePath;\n}\n\nexport async function exportEmbedAsync(projectRoot: string, options: Options) {\n setNodeEnv(options.dev ? 'development' : 'production');\n require('@expo/env').load(projectRoot);\n\n // Ensure we delete the old bundle to trigger a failure if the bundle cannot be created.\n await removeAsync(options.bundleOutput);\n\n // The iOS bundle is copied in to the Xcode project, so we need to remove the old one\n // to prevent Xcode from loading the old one after a build failure.\n if (options.platform === 'ios') {\n const previousPath = guessCopiedAppleBundlePath(options.bundleOutput);\n if (previousPath && fs.existsSync(previousPath)) {\n debug('Removing previous iOS bundle:', previousPath);\n await removeAsync(previousPath);\n }\n }\n\n const { bundle, assets } = await exportEmbedBundleAndAssetsAsync(projectRoot, options);\n\n fs.mkdirSync(path.dirname(options.bundleOutput), { recursive: true, mode: 0o755 });\n\n // Persist bundle and source maps.\n await Promise.all([\n output.save(bundle, options, Log.log),\n // NOTE(EvanBacon): This may need to be adjusted in the future if want to support baseUrl on native\n // platforms when doing production embeds (unlikely).\n options.assetsDest\n ? persistMetroAssetsAsync(assets, {\n platform: options.platform,\n outputDirectory: options.assetsDest,\n iosAssetCatalogDirectory: options.assetCatalogDest,\n })\n : null,\n ]);\n}\n\nexport async function exportEmbedBundleAndAssetsAsync(\n projectRoot: string,\n options: Options\n): Promise<{\n bundle: Awaited<ReturnType<Server['build']>>;\n assets: readonly BundleAssetWithFileHashes[];\n}> {\n const devServerManager = await DevServerManager.startMetroAsync(projectRoot, {\n minify: options.minify,\n mode: options.dev ? 'development' : 'production',\n port: 8081,\n isExporting: true,\n location: {},\n resetDevServer: options.resetCache,\n maxWorkers: options.maxWorkers,\n });\n\n const devServer = devServerManager.getDefaultDevServer();\n assert(devServer instanceof MetroBundlerDevServer);\n\n const exp = getConfig(projectRoot, { skipSDKVersionRequirement: true }).exp;\n const isHermes = isEnableHermesManaged(exp, options.platform);\n\n let sourceMapUrl = options.sourcemapOutput;\n if (sourceMapUrl && !options.sourcemapUseAbsolutePath) {\n sourceMapUrl = path.basename(sourceMapUrl);\n }\n\n try {\n const bundles = await devServer.legacySinglePageExportBundleAsync(\n {\n splitChunks: false,\n mainModuleName: resolveRealEntryFilePath(projectRoot, options.entryFile),\n platform: options.platform,\n minify: options.minify,\n mode: options.dev ? 'development' : 'production',\n engine: isHermes ? 'hermes' : undefined,\n serializerIncludeMaps: !!sourceMapUrl,\n // Never output bytecode in the exported bundle since that is hardcoded in the native run script.\n bytecode: false,\n // source map inline\n reactCompiler: !!exp.experiments?.reactCompiler,\n },\n {\n sourceMapUrl,\n unstable_transformProfile: (options.unstableTransformProfile ||\n (isHermes ? 'hermes-stable' : 'default')) as BundleOptions['unstable_transformProfile'],\n }\n );\n\n return {\n bundle: {\n code: bundles.artifacts.filter((a: any) => a.type === 'js')[0].source.toString(),\n // Can be optional when source maps aren't enabled.\n map: bundles.artifacts.filter((a: any) => a.type === 'map')[0]?.source.toString(),\n },\n assets: bundles.assets,\n };\n } catch (error: any) {\n if (isError(error)) {\n // Log using Xcode error format so the errors are picked up by xcodebuild.\n // https://developer.apple.com/documentation/xcode/running-custom-scripts-during-a-build#Log-errors-and-warnings-from-your-script\n if (options.platform === 'ios') {\n // If the error is about to be presented in Xcode, strip the ansi characters from the message.\n if ('message' in error && isExecutingFromXcodebuild()) {\n error.message = stripAnsi(error.message) as string;\n }\n logMetroErrorInXcode(projectRoot, error);\n }\n }\n throw error;\n } finally {\n devServerManager.stopAsync();\n }\n}\n\n// Exports for expo-updates\nexport async function createMetroServerAndBundleRequestAsync(\n projectRoot: string,\n options: Pick<\n Options,\n | 'maxWorkers'\n | 'config'\n | 'platform'\n | 'sourcemapOutput'\n | 'sourcemapUseAbsolutePath'\n | 'entryFile'\n | 'minify'\n | 'dev'\n | 'resetCache'\n | 'unstableTransformProfile'\n >\n): Promise<{ server: Server; bundleRequest: BundleOptions }> {\n const exp = getConfig(projectRoot, { skipSDKVersionRequirement: true }).exp;\n\n // TODO: This is slow ~40ms\n const { config } = await loadMetroConfigAsync(\n projectRoot,\n {\n // TODO: This is always enabled in the native script and there's no way to disable it.\n resetCache: options.resetCache,\n\n maxWorkers: options.maxWorkers,\n config: options.config,\n },\n {\n exp,\n isExporting: true,\n getMetroBundler() {\n return server.getBundler().getBundler();\n },\n }\n );\n\n const isHermes = isEnableHermesManaged(exp, options.platform);\n\n let sourceMapUrl = options.sourcemapOutput;\n if (sourceMapUrl && !options.sourcemapUseAbsolutePath) {\n sourceMapUrl = path.basename(sourceMapUrl);\n }\n\n const bundleRequest = {\n ...Server.DEFAULT_BUNDLE_OPTIONS,\n ...getMetroDirectBundleOptionsForExpoConfig(projectRoot, exp, {\n splitChunks: false,\n mainModuleName: resolveRealEntryFilePath(projectRoot, options.entryFile),\n platform: options.platform,\n minify: options.minify,\n mode: options.dev ? 'development' : 'production',\n engine: isHermes ? 'hermes' : undefined,\n isExporting: true,\n // Never output bytecode in the exported bundle since that is hardcoded in the native run script.\n bytecode: false,\n }),\n sourceMapUrl,\n unstable_transformProfile: (options.unstableTransformProfile ||\n (isHermes ? 'hermes-stable' : 'default')) as BundleOptions['unstable_transformProfile'],\n };\n\n const server = new Server(config, {\n watch: false,\n });\n\n return { server, bundleRequest };\n}\n\nexport async function exportEmbedAssetsAsync(\n server: Server,\n bundleRequest: BundleOptions,\n projectRoot: string,\n options: Pick<Options, 'platform'>\n) {\n try {\n const { entryFile, onProgress, resolverOptions, transformOptions } = splitBundleOptions({\n ...bundleRequest,\n bundleType: 'todo',\n });\n\n assertMetroPrivateServer(server);\n\n const dependencies = await server._bundler.getDependencies(\n [entryFile],\n transformOptions,\n resolverOptions,\n { onProgress, shallow: false, lazy: false }\n );\n\n const config = server._config;\n\n return getMetroAssets(dependencies, {\n processModuleFilter: config.serializer.processModuleFilter,\n assetPlugins: config.transformer.assetPlugins,\n platform: transformOptions.platform!,\n // Forked out of Metro because the `this._getServerRootDir()` doesn't match the development\n // behavior.\n projectRoot: config.projectRoot, // this._getServerRootDir(),\n publicPath: config.transformer.publicPath,\n });\n } catch (error: any) {\n if (isError(error)) {\n // Log using Xcode error format so the errors are picked up by xcodebuild.\n // https://developer.apple.com/documentation/xcode/running-custom-scripts-during-a-build#Log-errors-and-warnings-from-your-script\n if (options.platform === 'ios') {\n // If the error is about to be presented in Xcode, strip the ansi characters from the message.\n if ('message' in error && isExecutingFromXcodebuild()) {\n error.message = stripAnsi(error.message) as string;\n }\n logMetroErrorInXcode(projectRoot, error);\n }\n }\n throw error;\n }\n}\n\nfunction isError(error: any): error is Error {\n return error instanceof Error;\n}\n\n/**\n * This is a workaround for Metro not resolving entry file paths to their real location.\n * When running exports through `eas build --local` on macOS, the `/var/folders` path is used instead of `/private/var/folders`.\n *\n * See: https://github.com/expo/expo/issues/28890\n */\nfunction resolveRealEntryFilePath(projectRoot: string, entryFile: string): string {\n if (projectRoot.startsWith('/private/var') && entryFile.startsWith('/var')) {\n return fs.realpathSync(entryFile);\n }\n\n return entryFile;\n}\n"],"names":["exportEmbedAsync","exportEmbedBundleAndAssetsAsync","createMetroServerAndBundleRequestAsync","exportEmbedAssetsAsync","debug","require","guessCopiedAppleBundlePath","bundleOutput","match","bundleName","path","basename","bundleParent","dirname","possiblePath","globSync","join","dot","projectRoot","options","setNodeEnv","dev","load","removeAsync","platform","previousPath","fs","existsSync","bundle","assets","mkdirSync","recursive","mode","Promise","all","output","save","Log","log","assetsDest","persistMetroAssetsAsync","outputDirectory","iosAssetCatalogDirectory","assetCatalogDest","devServerManager","DevServerManager","startMetroAsync","minify","port","isExporting","location","resetDevServer","resetCache","maxWorkers","devServer","getDefaultDevServer","assert","MetroBundlerDevServer","exp","getConfig","skipSDKVersionRequirement","isHermes","isEnableHermesManaged","sourceMapUrl","sourcemapOutput","sourcemapUseAbsolutePath","bundles","legacySinglePageExportBundleAsync","splitChunks","mainModuleName","resolveRealEntryFilePath","entryFile","engine","undefined","serializerIncludeMaps","bytecode","reactCompiler","experiments","unstable_transformProfile","unstableTransformProfile","code","artifacts","filter","a","type","source","toString","map","error","isError","isExecutingFromXcodebuild","message","stripAnsi","logMetroErrorInXcode","stopAsync","config","loadMetroConfigAsync","getMetroBundler","server","getBundler","bundleRequest","Server","DEFAULT_BUNDLE_OPTIONS","getMetroDirectBundleOptionsForExpoConfig","watch","onProgress","resolverOptions","transformOptions","splitBundleOptions","bundleType","assertMetroPrivateServer","dependencies","_bundler","getDependencies","shallow","lazy","_config","getMetroAssets","processModuleFilter","serializer","assetPlugins","transformer","publicPath","Error","startsWith","realpathSync"],"mappings":"AAAA;;;;;CAKC,GACD;;;;;;;;;;;IA4CsBA,gBAAgB,MAAhBA,gBAAgB;IAoChBC,+BAA+B,MAA/BA,+BAA+B;IA6E/BC,sCAAsC,MAAtCA,sCAAsC;IAqEtCC,sBAAsB,MAAtBA,sBAAsB;;;yBAlOlB,cAAc;;;;;;;8DACb,qDAAqD;;;;;;;8DAC7D,QAAQ;;;;;;;8DACZ,IAAI;;;;;;;yBACc,MAAM;;;;;;;8DACpB,kBAAkB;;;;;;;8DACN,kCAAkC;;;;;;;8DAC9C,gCAAgC;;;;;;;8DAElC,MAAM;;;;;;qCAGyC,uBAAuB;qBACnE,WAAW;kCACE,qCAAqC;uCAChC,gDAAgD;kCACjD,2CAA2C;oCACvC,6CAA6C;8BAC7B,4CAA4C;sBAC3E,kBAAkB;qBAChB,iBAAiB;yBAClB,qBAAqB;8BACV,iBAAiB;oCACf,uBAAuB;;;;;;AAG/D,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,mBAAmB,CAAC,AAAC;AAEpD,SAASC,0BAA0B,CAACC,YAAoB,EAAE;IACxD,+CAA+C;IAC/C,IAAI,CAACA,YAAY,CAACC,KAAK,+CAA+C,EAAE;QACtEJ,KAAK,CAAC,oCAAoC,EAAEG,YAAY,CAAC,CAAC;QAC1D,OAAO,KAAK,CAAC;IACf,CAAC;IACD,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M,CAAC7E,WAAW;YAC/BwG,UAAU,EAAE3B,MAAM,CAAC0B,WAAW,CAACC,UAAU;SAC1C,CAAC,CAAC;IACL,EAAE,OAAOlC,KAAK,EAAO;QACnB,IAAIC,OAAO,CAACD,KAAK,CAAC,EAAE;YAClB,0EAA0E;YAC1E,iIAAiI;YACjI,IAAIrE,OAAO,CAACK,QAAQ,KAAK,KAAK,EAAE;gBAC9B,8FAA8F;gBAC9F,IAAI,SAAS,IAAIgE,KAAK,IAAIE,IAAAA,oBAAyB,0BAAA,GAAE,EAAE;oBACrDF,KAAK,CAACG,OAAO,GAAGC,IAAAA,KAAS,UAAA,EAACJ,KAAK,CAACG,OAAO,CAAC,AAAU,CAAC;gBACrD,CAAC;gBACDE,IAAAA,oBAAoB,qBAAA,EAAC3E,WAAW,EAAEsE,KAAK,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC;QACD,MAAMA,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAASC,OAAO,CAACD,KAAU,EAAkB;IAC3C,OAAOA,KAAK,YAAYmC,KAAK,CAAC;AAChC,CAAC;AAED;;;;;CAKC,GACD,SAASrD,wBAAwB,CAACpD,WAAmB,EAAEqD,SAAiB,EAAU;IAChF,IAAIrD,WAAW,CAAC0G,UAAU,CAAC,cAAc,CAAC,IAAIrD,SAAS,CAACqD,UAAU,CAAC,MAAM,CAAC,EAAE;QAC1E,OAAOlG,GAAE,EAAA,QAAA,CAACmG,YAAY,CAACtD,SAAS,CAAC,CAAC;IACpC,CAAC;IAED,OAAOA,SAAS,CAAC;AACnB,CAAC"}
@@ -11,6 +11,7 @@ const _pageReload = require("./messageHandlers/PageReload");
11
11
  const _vscodeDebuggerGetPossibleBreakpoints = require("./messageHandlers/VscodeDebuggerGetPossibleBreakpoints");
12
12
  const _vscodeDebuggerSetBreakpointByUrl = require("./messageHandlers/VscodeDebuggerSetBreakpointByUrl");
13
13
  const _vscodeRuntimeCallFunctionOn = require("./messageHandlers/VscodeRuntimeCallFunctionOn");
14
+ const _vscodeRuntimeEvaluate = require("./messageHandlers/VscodeRuntimeEvaluate");
14
15
  const _vscodeRuntimeGetProperties = require("./messageHandlers/VscodeRuntimeGetProperties");
15
16
  const _pageIsSupported = require("./pageIsSupported");
16
17
  const debug = require("debug")("expo:metro:debugging:messageHandlers");
@@ -29,7 +30,8 @@ function createHandlersFactory(metroBundler) {
29
30
  new _vscodeDebuggerGetPossibleBreakpoints.VscodeDebuggerGetPossibleBreakpointsHandler(connection),
30
31
  new _vscodeDebuggerSetBreakpointByUrl.VscodeDebuggerSetBreakpointByUrlHandler(connection),
31
32
  new _vscodeRuntimeGetProperties.VscodeRuntimeGetPropertiesHandler(connection),
32
- new _vscodeRuntimeCallFunctionOn.VscodeRuntimeCallFunctionOnHandler(connection),
33
+ new _vscodeRuntimeCallFunctionOn.VscodeRuntimeCallFunctionOnHandler(connection),
34
+ new _vscodeRuntimeEvaluate.VscodeRuntimeEvaluateHandler(connection),
33
35
  ].filter((middleware)=>middleware.isEnabled());
34
36
  if (!handlers.length) {
35
37
  debug("Aborted, all handlers are disabled");
@@ -43,7 +45,7 @@ function createHandlersFactory(metroBundler) {
43
45
  }));
44
46
  },
45
47
  handleDebuggerMessage: (message)=>{
46
- withMessageDebug("debugger", message, handlers.some((middleware)=>{
48
+ return withMessageDebug("debugger", message, handlers.some((middleware)=>{
47
49
  return middleware.handleDebuggerMessage == null ? void 0 : middleware.handleDebuggerMessage(message);
48
50
  }));
49
51
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/start/server/metro/debugging/createHandlersFactory.ts"],"sourcesContent":["import type { CreateCustomMessageHandlerFn } from '@react-native/dev-middleware';\n\nimport { NetworkResponseHandler } from './messageHandlers/NetworkResponse';\nimport { PageReloadHandler } from './messageHandlers/PageReload';\nimport { VscodeDebuggerGetPossibleBreakpointsHandler } from './messageHandlers/VscodeDebuggerGetPossibleBreakpoints';\nimport { VscodeDebuggerSetBreakpointByUrlHandler } from './messageHandlers/VscodeDebuggerSetBreakpointByUrl';\nimport { VscodeRuntimeCallFunctionOnHandler } from './messageHandlers/VscodeRuntimeCallFunctionOn';\nimport { VscodeRuntimeGetPropertiesHandler } from './messageHandlers/VscodeRuntimeGetProperties';\nimport { pageIsSupported } from './pageIsSupported';\nimport type { MetroBundlerDevServer } from '../MetroBundlerDevServer';\n\nconst debug = require('debug')('expo:metro:debugging:messageHandlers') as typeof console.log;\n\nexport function createHandlersFactory(\n metroBundler: MetroBundlerDevServer\n): CreateCustomMessageHandlerFn {\n return (connection) => {\n debug('Initializing for connection: ', connection.page.title);\n\n if (!pageIsSupported(connection.page)) {\n debug('Aborted, unsupported page capabiltiies:', connection.page.capabilities);\n return null;\n }\n\n const handlers = [\n // Generic handlers\n new NetworkResponseHandler(connection),\n new PageReloadHandler(connection, metroBundler),\n // Vscode-specific handlers\n new VscodeDebuggerGetPossibleBreakpointsHandler(connection),\n new VscodeDebuggerSetBreakpointByUrlHandler(connection),\n new VscodeRuntimeGetPropertiesHandler(connection),\n new VscodeRuntimeCallFunctionOnHandler(connection),\n ].filter((middleware) => middleware.isEnabled());\n\n if (!handlers.length) {\n debug('Aborted, all handlers are disabled');\n return null;\n }\n\n debug(\n 'Initialized with handlers: ',\n handlers.map((middleware) => middleware.constructor.name).join(', ')\n );\n\n return {\n handleDeviceMessage: (message: any) =>\n withMessageDebug(\n 'device',\n message,\n handlers.some((middleware) => middleware.handleDeviceMessage?.(message))\n ),\n handleDebuggerMessage: (message: any) => {\n withMessageDebug(\n 'debugger',\n message,\n handlers.some((middleware) => middleware.handleDebuggerMessage?.(message))\n );\n },\n };\n };\n}\n\nfunction withMessageDebug(type: 'device' | 'debugger', message: any, result?: null | boolean) {\n const status = result ? 'handled' : 'ignored';\n const prefix = type === 'device' ? '(debugger) <- (device)' : '(debugger) -> (device)';\n\n try {\n debug(`%s = %s:`, prefix, status, JSON.stringify(message));\n } catch {\n debug(`%s = %s:`, prefix, status, 'message not serializable');\n }\n\n return result || undefined;\n}\n"],"names":["createHandlersFactory","debug","require","metroBundler","connection","page","title","pageIsSupported","capabilities","handlers","NetworkResponseHandler","PageReloadHandler","VscodeDebuggerGetPossibleBreakpointsHandler","VscodeDebuggerSetBreakpointByUrlHandler","VscodeRuntimeGetPropertiesHandler","VscodeRuntimeCallFunctionOnHandler","filter","middleware","isEnabled","length","map","constructor","name","join","handleDeviceMessage","message","withMessageDebug","some","handleDebuggerMessage","type","result","status","prefix","JSON","stringify","undefined"],"mappings":"AAAA;;;;+BAagBA,uBAAqB;;aAArBA,qBAAqB;;iCAXE,mCAAmC;4BACxC,8BAA8B;sDACJ,wDAAwD;kDAC5D,oDAAoD;6CACzD,+CAA+C;4CAChD,8CAA8C;iCAChE,mBAAmB;AAGnD,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,sCAAsC,CAAC,AAAsB,AAAC;AAEtF,SAASF,qBAAqB,CACnCG,YAAmC,EACL;IAC9B,OAAO,CAACC,UAAU,GAAK;QACrBH,KAAK,CAAC,+BAA+B,EAAEG,UAAU,CAACC,IAAI,CAACC,KAAK,CAAC,CAAC;QAE9D,IAAI,CAACC,IAAAA,gBAAe,gBAAA,EAACH,UAAU,CAACC,IAAI,CAAC,EAAE;YACrCJ,KAAK,CAAC,yCAAyC,EAAEG,UAAU,CAACC,IAAI,CAACG,YAAY,CAAC,CAAC;YAC/E,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAMC,QAAQ,GAAG;YACf,mBAAmB;YACnB,IAAIC,gBAAsB,uBAAA,CAACN,UAAU,CAAC;YACtC,IAAIO,WAAiB,kBAAA,CAACP,UAAU,EAAED,YAAY,CAAC;YAC/C,2BAA2B;YAC3B,IAAIS,qCAA2C,4CAAA,CAACR,UAAU,CAAC;YAC3D,IAAIS,iCAAuC,wCAAA,CAACT,UAAU,CAAC;YACvD,IAAIU,2BAAiC,kCAAA,CAACV,UAAU,CAAC;YACjD,IAAIW,4BAAkC,mCAAA,CAACX,UAAU,CAAC;SACn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AAE+B,MAAM,EAAED,MAAM,EAAEE,IAAI,CAACC,SAAS,CAACT,OAAO,CAAC,CAAC,CAAC;IAC7D,EAAE,OAAM;QACNxB,KAAK,CAAC,CAAC,QAAQ,CAAC,EAAE+B,MAAM,EAAED,MAAM,EAAE,0BAA0B,CAAC,CAAC;IAChE,CAAC;IAED,OAAOD,MAAM,IAAIK,SAAS,CAAC;AAC7B,CAAC"}
1
+ {"version":3,"sources":["../../../../../../src/start/server/metro/debugging/createHandlersFactory.ts"],"sourcesContent":["import type { CreateCustomMessageHandlerFn } from '@react-native/dev-middleware';\n\nimport { NetworkResponseHandler } from './messageHandlers/NetworkResponse';\nimport { PageReloadHandler } from './messageHandlers/PageReload';\nimport { VscodeDebuggerGetPossibleBreakpointsHandler } from './messageHandlers/VscodeDebuggerGetPossibleBreakpoints';\nimport { VscodeDebuggerSetBreakpointByUrlHandler } from './messageHandlers/VscodeDebuggerSetBreakpointByUrl';\nimport { VscodeRuntimeCallFunctionOnHandler } from './messageHandlers/VscodeRuntimeCallFunctionOn';\nimport { VscodeRuntimeEvaluateHandler } from './messageHandlers/VscodeRuntimeEvaluate';\nimport { VscodeRuntimeGetPropertiesHandler } from './messageHandlers/VscodeRuntimeGetProperties';\nimport { pageIsSupported } from './pageIsSupported';\nimport type { MetroBundlerDevServer } from '../MetroBundlerDevServer';\n\nconst debug = require('debug')('expo:metro:debugging:messageHandlers') as typeof console.log;\n\nexport function createHandlersFactory(\n metroBundler: Pick<MetroBundlerDevServer, 'broadcastMessage'>\n): CreateCustomMessageHandlerFn {\n return (connection) => {\n debug('Initializing for connection: ', connection.page.title);\n\n if (!pageIsSupported(connection.page)) {\n debug('Aborted, unsupported page capabiltiies:', connection.page.capabilities);\n return null;\n }\n\n const handlers = [\n // Generic handlers\n new NetworkResponseHandler(connection),\n new PageReloadHandler(connection, metroBundler),\n // Vscode-specific handlers\n new VscodeDebuggerGetPossibleBreakpointsHandler(connection),\n new VscodeDebuggerSetBreakpointByUrlHandler(connection),\n new VscodeRuntimeGetPropertiesHandler(connection),\n new VscodeRuntimeCallFunctionOnHandler(connection),\n new VscodeRuntimeEvaluateHandler(connection),\n ].filter((middleware) => middleware.isEnabled());\n\n if (!handlers.length) {\n debug('Aborted, all handlers are disabled');\n return null;\n }\n\n debug(\n 'Initialized with handlers: ',\n handlers.map((middleware) => middleware.constructor.name).join(', ')\n );\n\n return {\n handleDeviceMessage: (message: any) =>\n withMessageDebug(\n 'device',\n message,\n handlers.some((middleware) => middleware.handleDeviceMessage?.(message))\n ),\n handleDebuggerMessage: (message: any) =>\n withMessageDebug(\n 'debugger',\n message,\n handlers.some((middleware) => middleware.handleDebuggerMessage?.(message))\n ),\n };\n };\n}\n\nfunction withMessageDebug(type: 'device' | 'debugger', message: any, result?: null | boolean) {\n const status = result ? 'handled' : 'ignored';\n const prefix = type === 'device' ? '(debugger) <- (device)' : '(debugger) -> (device)';\n\n try {\n debug(`%s = %s:`, prefix, status, JSON.stringify(message));\n } catch {\n debug(`%s = %s:`, prefix, status, 'message not serializable');\n }\n\n return result || undefined;\n}\n"],"names":["createHandlersFactory","debug","require","metroBundler","connection","page","title","pageIsSupported","capabilities","handlers","NetworkResponseHandler","PageReloadHandler","VscodeDebuggerGetPossibleBreakpointsHandler","VscodeDebuggerSetBreakpointByUrlHandler","VscodeRuntimeGetPropertiesHandler","VscodeRuntimeCallFunctionOnHandler","VscodeRuntimeEvaluateHandler","filter","middleware","isEnabled","length","map","constructor","name","join","handleDeviceMessage","message","withMessageDebug","some","handleDebuggerMessage","type","result","status","prefix","JSON","stringify","undefined"],"mappings":"AAAA;;;;+BAcgBA,uBAAqB;;aAArBA,qBAAqB;;iCAZE,mCAAmC;4BACxC,8BAA8B;sDACJ,wDAAwD;kDAC5D,oDAAoD;6CACzD,+CAA+C;uCACrD,yCAAyC;4CACpC,8CAA8C;iCAChE,mBAAmB;AAGnD,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,sCAAsC,CAAC,AAAs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AC,CAACV,UAAU;oBAAKA,OAAAA,UAAU,CAACO,mBAAmB,QAAW,GAAzCP,KAAAA,CAAyC,GAAzCA,UAAU,CAACO,mBAAmB,CAAGC,OAAO,CAAC,CAAA;iBAAA,CAAC,CACzE,CAAA;aAAA;YACHG,qBAAqB,EAAE,CAACH,OAAY;gBAClCC,OAAAA,gBAAgB,CACd,UAAU,EACVD,OAAO,EACPjB,QAAQ,CAACmB,IAAI,CAAC,CAACV,UAAU;oBAAKA,OAAAA,UAAU,CAACW,qBAAqB,QAAW,GAA3CX,KAAAA,CAA2C,GAA3CA,UAAU,CAACW,qBAAqB,CAAGH,OAAO,CAAC,CAAA;iBAAA,CAAC,CAC3E,CAAA;aAAA;SACJ,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,SAASC,gBAAgB,CAACG,IAA2B,EAAEJ,OAAY,EAAEK,MAAuB,EAAE;IAC5F,MAAMC,MAAM,GAAGD,MAAM,GAAG,SAAS,GAAG,SAAS,AAAC;IAC9C,MAAME,MAAM,GAAGH,IAAI,KAAK,QAAQ,GAAG,wBAAwB,GAAG,wBAAwB,AAAC;IAEvF,IAAI;QACF7B,KAAK,CAAC,CAAC,QAAQ,CAAC,EAAEgC,MAAM,EAAED,MAAM,EAAEE,IAAI,CAACC,SAAS,CAACT,OAAO,CAAC,CAAC,CAAC;IAC7D,EAAE,OAAM;QACNzB,KAAK,CAAC,CAAC,QAAQ,CAAC,EAAEgC,MAAM,EAAED,MAAM,EAAE,0BAA0B,CAAC,CAAC;IAChE,CAAC;IAED,OAAOD,MAAM,IAAIK,SAAS,CAAC;AAC7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/start/server/metro/debugging/messageHandlers/PageReload.ts"],"sourcesContent":["import type { Protocol } from 'devtools-protocol';\n\nimport type { MetroBundlerDevServer } from '../../MetroBundlerDevServer';\nimport { MessageHandler } from '../MessageHandler';\nimport type { CdpMessage, Connection, DebuggerRequest } from '../types';\n\nexport class PageReloadHandler extends MessageHandler {\n private metroBundler: MetroBundlerDevServer;\n\n constructor(connection: Connection, metroBundler: MetroBundlerDevServer) {\n super(connection);\n this.metroBundler = metroBundler;\n }\n\n handleDebuggerMessage(message: DebuggerRequest<PageReload>) {\n if (message.method === 'Page.reload') {\n this.metroBundler.broadcastMessage('reload');\n return this.sendToDebugger({ id: message.id });\n }\n\n return false;\n }\n}\n\n/** @see https://chromedevtools.github.io/devtools-protocol/1-2/Page/#method-reload */\nexport type PageReload = CdpMessage<'Page.reload', Protocol.Page.ReloadRequest, never>;\n"],"names":["PageReloadHandler","MessageHandler","constructor","connection","metroBundler","handleDebuggerMessage","message","method","broadcastMessage","sendToDebugger","id"],"mappings":"AAAA;;;;+BAMaA,mBAAiB;;aAAjBA,iBAAiB;;gCAHC,mBAAmB;AAG3C,MAAMA,iBAAiB,SAASC,eAAc,eAAA;IAGnDC,YAAYC,UAAsB,EAAEC,YAAmC,CAAE;QACvE,KAAK,CAACD,UAAU,CAAC,CAAC;QAClB,IAAI,CAACC,YAAY,GAAGA,YAAY,CAAC;IACnC;IAEAC,qBAAqB,CAACC,OAAoC,EAAE;QAC1D,IAAIA,OAAO,CAACC,MAAM,KAAK,aAAa,EAAE;YACpC,IAAI,CAACH,YAAY,CAACI,gBAAgB,CAAC,QAAQ,CAAC,CAAC;YAC7C,OAAO,IAAI,CAACC,cAAc,CAAC;gBAAEC,EAAE,EAAEJ,OAAO,CAACI,EAAE;aAAE,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,KAAK,CAAC;IACf;CACD"}
1
+ {"version":3,"sources":["../../../../../../../src/start/server/metro/debugging/messageHandlers/PageReload.ts"],"sourcesContent":["import type { Protocol } from 'devtools-protocol';\n\nimport type { MetroBundlerDevServer } from '../../MetroBundlerDevServer';\nimport { MessageHandler } from '../MessageHandler';\nimport type { CdpMessage, Connection, DebuggerRequest } from '../types';\n\nexport class PageReloadHandler extends MessageHandler {\n private metroBundler: Pick<MetroBundlerDevServer, 'broadcastMessage'>;\n\n constructor(\n connection: Connection,\n metroBundler: Pick<MetroBundlerDevServer, 'broadcastMessage'>\n ) {\n super(connection);\n this.metroBundler = metroBundler;\n }\n\n handleDebuggerMessage(message: DebuggerRequest<PageReload>) {\n if (message.method === 'Page.reload') {\n this.metroBundler.broadcastMessage('reload');\n return this.sendToDebugger({ id: message.id });\n }\n\n return false;\n }\n}\n\n/** @see https://chromedevtools.github.io/devtools-protocol/1-2/Page/#method-reload */\nexport type PageReload = CdpMessage<'Page.reload', Protocol.Page.ReloadRequest, never>;\n"],"names":["PageReloadHandler","MessageHandler","constructor","connection","metroBundler","handleDebuggerMessage","message","method","broadcastMessage","sendToDebugger","id"],"mappings":"AAAA;;;;+BAMaA,mBAAiB;;aAAjBA,iBAAiB;;gCAHC,mBAAmB;AAG3C,MAAMA,iBAAiB,SAASC,eAAc,eAAA;IAGnDC,YACEC,UAAsB,EACtBC,YAA6D,CAC7D;QACA,KAAK,CAACD,UAAU,CAAC,CAAC;QAClB,IAAI,CAACC,YAAY,GAAGA,YAAY,CAAC;IACnC;IAEAC,qBAAqB,CAACC,OAAoC,EAAE;QAC1D,IAAIA,OAAO,CAACC,MAAM,KAAK,aAAa,EAAE;YACpC,IAAI,CAACH,YAAY,CAACI,gBAAgB,CAAC,QAAQ,CAAC,CAAC;YAC7C,OAAO,IAAI,CAACC,cAAc,CAAC;gBAAEC,EAAE,EAAEJ,OAAO,CAACI,EAAE;aAAE,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,KAAK,CAAC;IACf;CACD"}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "VscodeRuntimeEvaluateHandler", {
6
+ enumerable: true,
7
+ get: ()=>VscodeRuntimeEvaluateHandler
8
+ });
9
+ const _messageHandler = require("../MessageHandler");
10
+ const _getDebuggerType = require("../getDebuggerType");
11
+ class VscodeRuntimeEvaluateHandler extends _messageHandler.MessageHandler {
12
+ isEnabled() {
13
+ return (0, _getDebuggerType.getDebuggerType)(this.debugger.userAgent) === "vscode";
14
+ }
15
+ handleDebuggerMessage(message) {
16
+ if (message.method === "Runtime.evaluate" && isVscodeNodeAttachEnvironmentInjection(message)) {
17
+ return this.sendToDebugger({
18
+ id: message.id,
19
+ result: {
20
+ result: {
21
+ type: "string",
22
+ value: `Hermes doesn't support environment variables through process.env`
23
+ }
24
+ }
25
+ });
26
+ }
27
+ if (message.method === "Runtime.evaluate" && isVscodeNodeTelemetry(message)) {
28
+ return this.sendToDebugger({
29
+ id: message.id,
30
+ result: {
31
+ result: {
32
+ type: "object",
33
+ value: {
34
+ processId: this.page.id,
35
+ nodeVersion: process.version,
36
+ architecture: process.arch
37
+ }
38
+ }
39
+ }
40
+ });
41
+ }
42
+ return false;
43
+ }
44
+ }
45
+ /** @see https://github.com/microsoft/vscode-js-debug/blob/1d104b5184736677ab5cc280c70bbd227403850c/src/targets/node/nodeAttacherBase.ts#L22-L54 */ function isVscodeNodeAttachEnvironmentInjection(message) {
46
+ var ref, ref1, ref2;
47
+ return ((ref = message.params) == null ? void 0 : ref.expression.includes(`typeof process==='undefined'`)) && ((ref1 = message.params) == null ? void 0 : ref1.expression.includes(`'process not defined'`)) && ((ref2 = message.params) == null ? void 0 : ref2.expression.includes(`process.env["NODE_OPTIONS"]`));
48
+ }
49
+ /** @see https://github.com/microsoft/vscode-js-debug/blob/1d104b5184736677ab5cc280c70bbd227403850c/src/targets/node/nodeLauncherBase.ts#L523-L531 */ function isVscodeNodeTelemetry(message) {
50
+ var ref, ref1, ref2, ref3, ref4;
51
+ return ((ref = message.params) == null ? void 0 : ref.expression.includes(`typeof process === 'undefined'`)) && ((ref1 = message.params) == null ? void 0 : ref1.expression.includes(`'process not defined'`)) && ((ref2 = message.params) == null ? void 0 : ref2.expression.includes(`process.pid`)) && ((ref3 = message.params) == null ? void 0 : ref3.expression.includes(`process.version`)) && ((ref4 = message.params) == null ? void 0 : ref4.expression.includes(`process.arch`));
52
+ }
53
+
54
+ //# sourceMappingURL=VscodeRuntimeEvaluate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../src/start/server/metro/debugging/messageHandlers/VscodeRuntimeEvaluate.ts"],"sourcesContent":["import type Protocol from 'devtools-protocol';\n\nimport { MessageHandler } from '../MessageHandler';\nimport { getDebuggerType } from '../getDebuggerType';\nimport type { CdpMessage, DebuggerRequest, DeviceResponse } from '../types';\n\n/**\n * Vscode is trying to inject a script to configure Node environment variables.\n * This won't work in Hermes, but vscode will retry this 200x.\n * Avoid sending this \"spam\" to the device.\n *\n * @see https://github.com/microsoft/vscode-js-debug/blob/1d104b5184736677ab5cc280c70bbd227403850c/src/targets/node/nodeAttacherBase.ts#L22-L54\n */\nexport class VscodeRuntimeEvaluateHandler extends MessageHandler {\n isEnabled() {\n return getDebuggerType(this.debugger.userAgent) === 'vscode';\n }\n\n handleDebuggerMessage(message: DebuggerRequest<RuntimeEvaluate>) {\n if (message.method === 'Runtime.evaluate' && isVscodeNodeAttachEnvironmentInjection(message)) {\n return this.sendToDebugger<DeviceResponse<RuntimeEvaluate>>({\n id: message.id,\n result: {\n result: {\n type: 'string',\n value: `Hermes doesn't support environment variables through process.env`,\n },\n },\n });\n }\n\n if (message.method === 'Runtime.evaluate' && isVscodeNodeTelemetry(message)) {\n return this.sendToDebugger<DeviceResponse<RuntimeEvaluate>>({\n id: message.id,\n result: {\n result: {\n type: 'object',\n value: {\n processId: this.page.id,\n nodeVersion: process.version,\n architecture: process.arch,\n },\n },\n },\n });\n }\n\n return false;\n }\n}\n\n/** @see https://chromedevtools.github.io/devtools-protocol/v8/Runtime/#method-evaluate */\nexport type RuntimeEvaluate = CdpMessage<\n 'Runtime.evaluate',\n Protocol.Runtime.EvaluateRequest,\n Protocol.Runtime.EvaluateResponse\n>;\n\n/** @see https://github.com/microsoft/vscode-js-debug/blob/1d104b5184736677ab5cc280c70bbd227403850c/src/targets/node/nodeAttacherBase.ts#L22-L54 */\nfunction isVscodeNodeAttachEnvironmentInjection(message: DebuggerRequest<RuntimeEvaluate>) {\n return (\n message.params?.expression.includes(`typeof process==='undefined'`) &&\n message.params?.expression.includes(`'process not defined'`) &&\n message.params?.expression.includes(`process.env[\"NODE_OPTIONS\"]`)\n );\n}\n\n/** @see https://github.com/microsoft/vscode-js-debug/blob/1d104b5184736677ab5cc280c70bbd227403850c/src/targets/node/nodeLauncherBase.ts#L523-L531 */\nfunction isVscodeNodeTelemetry(message: DebuggerRequest<RuntimeEvaluate>) {\n return (\n message.params?.expression.includes(`typeof process === 'undefined'`) &&\n message.params?.expression.includes(`'process not defined'`) &&\n message.params?.expression.includes(`process.pid`) &&\n message.params?.expression.includes(`process.version`) &&\n message.params?.expression.includes(`process.arch`)\n );\n}\n"],"names":["VscodeRuntimeEvaluateHandler","MessageHandler","isEnabled","getDebuggerType","debugger","userAgent","handleDebuggerMessage","message","method","isVscodeNodeAttachEnvironmentInjection","sendToDebugger","id","result","type","value","isVscodeNodeTelemetry","processId","page","nodeVersion","process","version","architecture","arch","params","expression","includes"],"mappings":"AAAA;;;;+BAaaA,8BAA4B;;aAA5BA,4BAA4B;;gCAXV,mBAAmB;iCAClB,oBAAoB;AAU7C,MAAMA,4BAA4B,SAASC,eAAc,eAAA;IAC9DC,SAAS,GAAG;QACV,OAAOC,IAAAA,gBAAe,gBAAA,EAAC,IAAI,CAACC,QAAQ,CAACC,SAAS,CAAC,KAAK,QAAQ,CAAC;IAC/D;IAEAC,qBAAqB,CAACC,OAAyC,EAAE;QAC/D,IAAIA,OAAO,CAACC,MAAM,KAAK,kBAAkB,IAAIC,sCAAsC,CAACF,OAAO,CAAC,EAAE;YAC5F,OAAO,IAAI,CAACG,cAAc,CAAkC;gBAC1DC,EAAE,EAAEJ,OAAO,CAACI,EAAE;gBACdC,MAAM,EAAE;oBACNA,MAAM,EAAE;wBACNC,IAAI,EAAE,QAAQ;wBACdC,KAAK,EAAE,CAAC,gEAAgE,CAAC;qBAC1E;iBAC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A,CAAAA,CAAAA,GAAc,GAAdA,OAAO,CAACgB,MAAM,SAAY,GAA1BhB,KAAAA,CAA0B,GAA1BA,GAAc,CAAEiB,UAAU,CAACC,QAAQ,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAA,IACrElB,CAAAA,CAAAA,IAAc,GAAdA,OAAO,CAACgB,MAAM,SAAY,GAA1BhB,KAAAA,CAA0B,GAA1BA,IAAc,CAAEiB,UAAU,CAACC,QAAQ,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAA,IAC5DlB,CAAAA,CAAAA,IAAc,GAAdA,OAAO,CAACgB,MAAM,SAAY,GAA1BhB,KAAAA,CAA0B,GAA1BA,IAAc,CAAEiB,UAAU,CAACC,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC,CAAA,IAClDlB,CAAAA,CAAAA,IAAc,GAAdA,OAAO,CAACgB,MAAM,SAAY,GAA1BhB,KAAAA,CAA0B,GAA1BA,IAAc,CAAEiB,UAAU,CAACC,QAAQ,CAAC,CAAC,eAAe,CAAC,CAAC,CAAA,IACtDlB,CAAAA,CAAAA,IAAc,GAAdA,OAAO,CAACgB,MAAM,SAAY,GAA1BhB,KAAAA,CAA0B,GAA1BA,IAAc,CAAEiB,UAAU,CAACC,QAAQ,CAAC,CAAC,YAAY,CAAC,CAAC,CAAA,CACnD;AACJ,CAAC"}
@@ -79,7 +79,7 @@ function getContext() {
79
79
  cpu: summarizeCpuInfo(),
80
80
  app: {
81
81
  name: "expo/cli",
82
- version: "0.18.22"
82
+ version: "0.18.24"
83
83
  },
84
84
  ci: _ciInfo().isCI ? {
85
85
  name: _ciInfo().name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/cli",
3
- "version": "0.18.22",
3
+ "version": "0.18.24",
4
4
  "description": "The Expo CLI",
5
5
  "main": "build/bin/cli",
6
6
  "bin": {
@@ -172,5 +172,5 @@
172
172
  "tree-kill": "^1.2.2",
173
173
  "tsd": "^0.28.1"
174
174
  },
175
- "gitHead": "c37efa4f4ebe6137c34eb5813843df7015f3c22f"
175
+ "gitHead": "48f1ec9d91c5c38c7684cb98a314e443cbeb2185"
176
176
  }