@expo/cli 55.0.0-canary-20260105-6b962e6 → 55.0.0-canary-20260119-70f7c28

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.
Files changed (50) hide show
  1. package/build/bin/cli +1 -1
  2. package/build/src/export/embed/exportEmbedAsync.js +1 -2
  3. package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
  4. package/build/src/export/exportStaticAsync.js +117 -7
  5. package/build/src/export/exportStaticAsync.js.map +1 -1
  6. package/build/src/export/saveAssets.js +6 -4
  7. package/build/src/export/saveAssets.js.map +1 -1
  8. package/build/src/start/interface/interactiveActions.js +0 -1
  9. package/build/src/start/interface/interactiveActions.js.map +1 -1
  10. package/build/src/start/server/Bonjour.js +100 -0
  11. package/build/src/start/server/Bonjour.js.map +1 -0
  12. package/build/src/start/server/BundlerDevServer.js +22 -4
  13. package/build/src/start/server/BundlerDevServer.js.map +1 -1
  14. package/build/src/start/server/DevToolsPluginCliExtensionExecutor.js +2 -2
  15. package/build/src/start/server/DevToolsPluginCliExtensionExecutor.js.map +1 -1
  16. package/build/src/start/server/MCPDevToolsPluginCLIExtensions.js +86 -0
  17. package/build/src/start/server/MCPDevToolsPluginCLIExtensions.js.map +1 -0
  18. package/build/src/start/server/createMCPDevToolsExtensionSchema.js +67 -0
  19. package/build/src/start/server/createMCPDevToolsExtensionSchema.js.map +1 -0
  20. package/build/src/start/server/metro/DevToolsPluginWebsocketEndpoint.js +10 -2
  21. package/build/src/start/server/metro/DevToolsPluginWebsocketEndpoint.js.map +1 -1
  22. package/build/src/start/server/metro/MetroBundlerDevServer.js +103 -31
  23. package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
  24. package/build/src/start/server/metro/createServerRouteMiddleware.js +25 -1
  25. package/build/src/start/server/metro/createServerRouteMiddleware.js.map +1 -1
  26. package/build/src/start/server/metro/debugging/createDebugMiddleware.js +22 -8
  27. package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
  28. package/build/src/start/server/metro/dev-server/compression.js +45 -0
  29. package/build/src/start/server/metro/dev-server/compression.js.map +1 -0
  30. package/build/src/start/server/metro/dev-server/createMetroMiddleware.js +2 -2
  31. package/build/src/start/server/metro/dev-server/createMetroMiddleware.js.map +1 -1
  32. package/build/src/start/server/metro/instantiateMetro.js +19 -7
  33. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  34. package/build/src/start/server/metro/resolveLoader.js +2 -1
  35. package/build/src/start/server/metro/resolveLoader.js.map +1 -1
  36. package/build/src/start/server/middleware/metroOptions.js +3 -2
  37. package/build/src/start/server/middleware/metroOptions.js.map +1 -1
  38. package/build/src/start/startAsync.js +6 -1
  39. package/build/src/start/startAsync.js.map +1 -1
  40. package/build/src/utils/env.js +15 -1
  41. package/build/src/utils/env.js.map +1 -1
  42. package/build/src/utils/git.js +1 -1
  43. package/build/src/utils/git.js.map +1 -1
  44. package/build/src/utils/net.js +43 -0
  45. package/build/src/utils/net.js.map +1 -0
  46. package/build/src/utils/telemetry/clients/FetchClient.js +1 -1
  47. package/build/src/utils/telemetry/utils/context.js +1 -1
  48. package/package.json +22 -21
  49. package/build/src/start/server/middleware/DataLoaderModuleMiddleware.js +0 -75
  50. package/build/src/start/server/middleware/DataLoaderModuleMiddleware.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/start/server/metro/resolveLoader.ts"],"sourcesContent":["import type { RouteNode } from 'expo-router/build/Route';\nimport { type RouteInfo, type RoutesManifest } from 'expo-server/private';\n\n/**\n * Unified route information needed for loader execution\n */\nexport interface ResolvedLoaderRoute {\n /** Path to the route file (relative or absolute). For static routes, this will point to the parent dynamic route */\n file: string;\n /** The pathname being rendered */\n pathname: string;\n /** Extracted URL parameters */\n params: Record<string, string | string[]>;\n}\n\ntype FromRuntimeManifestRouteOptions = {\n appDir: string;\n serverManifest: RoutesManifest<RegExp>;\n};\n\n/**\n * Converts a `RouteNode` to a `ResolvedLoaderRoute` object using runtime manifest lookup\n */\nexport function fromRuntimeManifestRoute(\n pathname: string,\n route: RouteNode,\n options: FromRuntimeManifestRouteOptions\n): ResolvedLoaderRoute | null {\n if (route.generated) {\n return null;\n }\n\n // For static routes that were generated from dynamic routes, we need to use the parent's\n // context key to find the loader\n // @see expo-router/src/loadStaticParamsAsync.ts\n const contextKey =\n route.dynamic === null && route.parentContextKey ? route.parentContextKey : route.contextKey;\n\n if (!contextKey) {\n return null;\n }\n\n // Find the server manifest route that matches this context key\n const serverManifestRoute = options.serverManifest.htmlRoutes.find((r) => r.file === contextKey);\n\n if (!serverManifestRoute) {\n return null;\n }\n\n return {\n file: serverManifestRoute.file,\n pathname,\n params: extractParams(pathname, serverManifestRoute),\n };\n}\n\n/**\n * Converts a `RouteInfo` to a `ResolvedLoaderRoute` object using server manifest lookup\n */\nexport function fromServerManifestRoute(\n pathname: string,\n route: RouteInfo<RegExp>\n): ResolvedLoaderRoute | null {\n if (route.generated) {\n return null;\n }\n\n return {\n file: route.file,\n pathname,\n params: extractParams(pathname, route),\n };\n}\n\n/**\n * Extract URL parameters from a pathname using a route's named regex\n */\nfunction extractParams(\n pathname: string,\n route: RouteInfo<RegExp>\n): Record<string, string | string[]> {\n const params: Record<string, string | string[]> = {};\n const match = route.namedRegex.exec(pathname);\n if (match?.groups) {\n for (const [key, value] of Object.entries(match.groups)) {\n const namedKey = route.routeKeys[key];\n params[namedKey] = value;\n }\n }\n return params;\n}\n"],"names":["fromRuntimeManifestRoute","fromServerManifestRoute","pathname","route","options","generated","contextKey","dynamic","parentContextKey","serverManifestRoute","serverManifest","htmlRoutes","find","r","file","params","extractParams","match","namedRegex","exec","groups","key","value","Object","entries","namedKey","routeKeys"],"mappings":";;;;;;;;;;;IAuBgBA,wBAAwB;eAAxBA;;IAoCAC,uBAAuB;eAAvBA;;;AApCT,SAASD,yBACdE,QAAgB,EAChBC,KAAgB,EAChBC,OAAwC;IAExC,IAAID,MAAME,SAAS,EAAE;QACnB,OAAO;IACT;IAEA,yFAAyF;IACzF,iCAAiC;IACjC,gDAAgD;IAChD,MAAMC,aACJH,MAAMI,OAAO,KAAK,QAAQJ,MAAMK,gBAAgB,GAAGL,MAAMK,gBAAgB,GAAGL,MAAMG,UAAU;IAE9F,IAAI,CAACA,YAAY;QACf,OAAO;IACT;IAEA,+DAA+D;IAC/D,MAAMG,sBAAsBL,QAAQM,cAAc,CAACC,UAAU,CAACC,IAAI,CAAC,CAACC,IAAMA,EAAEC,IAAI,KAAKR;IAErF,IAAI,CAACG,qBAAqB;QACxB,OAAO;IACT;IAEA,OAAO;QACLK,MAAML,oBAAoBK,IAAI;QAC9BZ;QACAa,QAAQC,cAAcd,UAAUO;IAClC;AACF;AAKO,SAASR,wBACdC,QAAgB,EAChBC,KAAwB;IAExB,IAAIA,MAAME,SAAS,EAAE;QACnB,OAAO;IACT;IAEA,OAAO;QACLS,MAAMX,MAAMW,IAAI;QAChBZ;QACAa,QAAQC,cAAcd,UAAUC;IAClC;AACF;AAEA;;CAEC,GACD,SAASa,cACPd,QAAgB,EAChBC,KAAwB;IAExB,MAAMY,SAA4C,CAAC;IACnD,MAAME,QAAQd,MAAMe,UAAU,CAACC,IAAI,CAACjB;IACpC,IAAIe,yBAAAA,MAAOG,MAAM,EAAE;QACjB,KAAK,MAAM,CAACC,KAAKC,MAAM,IAAIC,OAAOC,OAAO,CAACP,MAAMG,MAAM,EAAG;YACvD,MAAMK,WAAWtB,MAAMuB,SAAS,CAACL,IAAI;YACrCN,MAAM,CAACU,SAAS,GAAGH;QACrB;IACF;IACA,OAAOP;AACT"}
1
+ {"version":3,"sources":["../../../../../src/start/server/metro/resolveLoader.ts"],"sourcesContent":["import type { RouteNode } from 'expo-router/build/Route';\nimport { type RouteInfo, type RoutesManifest } from 'expo-server/private';\n\n/**\n * Unified route information needed for loader execution\n */\nexport interface ResolvedLoaderRoute {\n /** Path to the route file (relative or absolute). For static routes, this will point to the parent dynamic route */\n file: string;\n /** The pathname being rendered */\n pathname: string;\n /** Extracted URL parameters */\n params: Record<string, string | string[]>;\n}\n\ntype FromRuntimeManifestRouteOptions = {\n appDir: string;\n serverManifest: RoutesManifest<RegExp>;\n};\n\n/**\n * Converts a `RouteNode` to a `ResolvedLoaderRoute` object using runtime manifest lookup\n */\nexport function fromRuntimeManifestRoute(\n pathname: string,\n route: RouteNode,\n options: FromRuntimeManifestRouteOptions\n): ResolvedLoaderRoute | null {\n // Skip internal routes (like `_sitemap` or `+not-found`)\n if (route.internal) {\n return null;\n }\n\n // For static routes that were generated from dynamic routes, we need to use the parent's\n // context key to find the loader\n // @see expo-router/src/loadStaticParamsAsync.ts\n const contextKey =\n route.dynamic === null && route.parentContextKey ? route.parentContextKey : route.contextKey;\n\n if (!contextKey) {\n return null;\n }\n\n // Find the server manifest route that matches this context key\n const serverManifestRoute = options.serverManifest.htmlRoutes.find((r) => r.file === contextKey);\n\n if (!serverManifestRoute) {\n return null;\n }\n\n return {\n file: serverManifestRoute.file,\n pathname,\n params: extractParams(pathname, serverManifestRoute),\n };\n}\n\n/**\n * Converts a `RouteInfo` to a `ResolvedLoaderRoute` object using server manifest lookup\n */\nexport function fromServerManifestRoute(\n pathname: string,\n route: RouteInfo<RegExp>\n): ResolvedLoaderRoute | null {\n if (route.generated) {\n return null;\n }\n\n return {\n file: route.file,\n pathname,\n params: extractParams(pathname, route),\n };\n}\n\n/**\n * Extract URL parameters from a pathname using a route's named regex\n */\nfunction extractParams(\n pathname: string,\n route: RouteInfo<RegExp>\n): Record<string, string | string[]> {\n const params: Record<string, string | string[]> = {};\n const match = route.namedRegex.exec(pathname);\n if (match?.groups) {\n for (const [key, value] of Object.entries(match.groups)) {\n const namedKey = route.routeKeys[key];\n params[namedKey] = value;\n }\n }\n return params;\n}\n"],"names":["fromRuntimeManifestRoute","fromServerManifestRoute","pathname","route","options","internal","contextKey","dynamic","parentContextKey","serverManifestRoute","serverManifest","htmlRoutes","find","r","file","params","extractParams","generated","match","namedRegex","exec","groups","key","value","Object","entries","namedKey","routeKeys"],"mappings":";;;;;;;;;;;IAuBgBA,wBAAwB;eAAxBA;;IAqCAC,uBAAuB;eAAvBA;;;AArCT,SAASD,yBACdE,QAAgB,EAChBC,KAAgB,EAChBC,OAAwC;IAExC,yDAAyD;IACzD,IAAID,MAAME,QAAQ,EAAE;QAClB,OAAO;IACT;IAEA,yFAAyF;IACzF,iCAAiC;IACjC,gDAAgD;IAChD,MAAMC,aACJH,MAAMI,OAAO,KAAK,QAAQJ,MAAMK,gBAAgB,GAAGL,MAAMK,gBAAgB,GAAGL,MAAMG,UAAU;IAE9F,IAAI,CAACA,YAAY;QACf,OAAO;IACT;IAEA,+DAA+D;IAC/D,MAAMG,sBAAsBL,QAAQM,cAAc,CAACC,UAAU,CAACC,IAAI,CAAC,CAACC,IAAMA,EAAEC,IAAI,KAAKR;IAErF,IAAI,CAACG,qBAAqB;QACxB,OAAO;IACT;IAEA,OAAO;QACLK,MAAML,oBAAoBK,IAAI;QAC9BZ;QACAa,QAAQC,cAAcd,UAAUO;IAClC;AACF;AAKO,SAASR,wBACdC,QAAgB,EAChBC,KAAwB;IAExB,IAAIA,MAAMc,SAAS,EAAE;QACnB,OAAO;IACT;IAEA,OAAO;QACLH,MAAMX,MAAMW,IAAI;QAChBZ;QACAa,QAAQC,cAAcd,UAAUC;IAClC;AACF;AAEA;;CAEC,GACD,SAASa,cACPd,QAAgB,EAChBC,KAAwB;IAExB,MAAMY,SAA4C,CAAC;IACnD,MAAMG,QAAQf,MAAMgB,UAAU,CAACC,IAAI,CAAClB;IACpC,IAAIgB,yBAAAA,MAAOG,MAAM,EAAE;QACjB,KAAK,MAAM,CAACC,KAAKC,MAAM,IAAIC,OAAOC,OAAO,CAACP,MAAMG,MAAM,EAAG;YACvD,MAAMK,WAAWvB,MAAMwB,SAAS,CAACL,IAAI;YACrCP,MAAM,CAACW,SAAS,GAAGH;QACrB;IACF;IACA,OAAOR;AACT"}
@@ -120,7 +120,7 @@ function getMetroDirectBundleOptionsForExpoConfig(projectRoot, exp, options) {
120
120
  });
121
121
  }
122
122
  function getMetroDirectBundleOptions(options) {
123
- const { mainModuleName, platform, mode, minify, environment, serializerOutput, serializerIncludeMaps, bytecode, lazy, engine, preserveEnvVars, asyncRoutes, baseUrl, routerRoot, isExporting, inlineSourceMap, splitChunks, usedExports, reactCompiler, optimize, domRoot, clientBoundaries, runModule, modulesOnly, useMd5Filename, hosted, liveBindings } = withDefaults(options);
123
+ const { mainModuleName, platform, mode, minify, environment, serializerOutput, serializerIncludeMaps, bytecode, lazy, engine, preserveEnvVars, asyncRoutes, baseUrl, routerRoot, isExporting, inlineSourceMap, splitChunks, usedExports, reactCompiler, optimize, domRoot, clientBoundaries, runModule, modulesOnly, useMd5Filename, hosted, liveBindings, isLoaderBundle } = withDefaults(options);
124
124
  const dev = mode !== 'production';
125
125
  const isHermes = engine === 'hermes';
126
126
  if (isExporting) {
@@ -152,7 +152,8 @@ function getMetroDirectBundleOptions(options) {
152
152
  dom: domRoot,
153
153
  hosted: hosted ? '1' : undefined,
154
154
  useMd5Filename: useMd5Filename || undefined,
155
- liveBindings: !liveBindings ? String(liveBindings) : undefined
155
+ liveBindings: !liveBindings ? String(liveBindings) : undefined,
156
+ isLoaderBundle: isLoaderBundle ? String(isLoaderBundle) : undefined
156
157
  };
157
158
  // Iterate and delete undefined values
158
159
  for(const key in customTransformOptions){
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/start/server/middleware/metroOptions.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport Server from '@expo/metro/metro/Server';\nimport type { BundleOptions as MetroBundleOptions } from '@expo/metro/metro/shared/types';\n\nimport { env } from '../../../utils/env';\nimport { CommandError } from '../../../utils/errors';\nimport { toPosixPath } from '../../../utils/filePath';\nimport { getRouterDirectoryModuleIdWithManifest } from '../metro/router';\n\nconst debug = require('debug')('expo:metro:options') as typeof console.log;\n\nexport type MetroEnvironment = 'node' | 'react-server' | 'client';\n\nexport type ExpoMetroOptions = {\n platform: string;\n mainModuleName: string;\n mode: string;\n minify?: boolean;\n environment?: MetroEnvironment;\n serializerOutput?: 'static';\n serializerIncludeMaps?: boolean;\n lazy?: boolean;\n engine?: 'hermes';\n preserveEnvVars?: boolean;\n bytecode?: boolean;\n /** Enable async routes (route-based bundle splitting) in Expo Router. */\n asyncRoutes?: boolean;\n /** Module ID relative to the projectRoot for the Expo Router app directory. */\n routerRoot?: string;\n /** Enable React compiler support in Babel. */\n reactCompiler?: boolean;\n baseUrl?: string;\n isExporting: boolean;\n /** Is bundling a DOM Component (\"use dom\"). Requires the entry dom component file path. */\n domRoot?: string;\n /** Exporting MD5 filename based on file contents, for EAS Update. */\n useMd5Filename?: boolean;\n inlineSourceMap?: boolean;\n clientBoundaries?: string[];\n splitChunks?: boolean;\n usedExports?: boolean;\n /** Enable optimized bundling (required for tree shaking). */\n optimize?: boolean;\n\n modulesOnly?: boolean;\n runModule?: boolean;\n\n /** Should assets be exported for hosting. Always true on web. Always false for embedded builds. Optional for native exports. */\n hosted?: boolean;\n /** Disable live bindings (enabled by default, required for circular deps) in experimental import export support. */\n liveBindings?: boolean;\n};\n\n// See: @expo/metro-config/src/serializer/fork/baseJSBundle.ts `ExpoSerializerOptions`\nexport type SerializerOptions = {\n includeSourceMaps?: boolean;\n output?: 'static';\n splitChunks?: boolean;\n usedExports?: boolean;\n exporting?: boolean;\n};\n\nexport type ExpoMetroBundleOptions = MetroBundleOptions & {\n serializerOptions?: SerializerOptions;\n};\n\nexport function isServerEnvironment(environment?: any): boolean {\n return environment === 'node' || environment === 'react-server';\n}\n\nfunction withDefaults({\n mode = 'development',\n minify = mode === 'production',\n preserveEnvVars = mode !== 'development' && env.EXPO_NO_CLIENT_ENV_VARS,\n lazy,\n environment,\n ...props\n}: ExpoMetroOptions): ExpoMetroOptions {\n if (props.bytecode) {\n if (props.platform === 'web') {\n throw new CommandError('Cannot use bytecode with the web platform');\n }\n if (props.engine !== 'hermes') {\n throw new CommandError('Bytecode is only supported with the Hermes engine');\n }\n }\n\n const optimize =\n props.optimize ??\n (environment !== 'node' && mode === 'production' && env.EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH);\n\n return {\n mode,\n minify,\n preserveEnvVars,\n optimize,\n usedExports: optimize && env.EXPO_UNSTABLE_TREE_SHAKING,\n lazy: !props.isExporting && lazy,\n environment: environment === 'client' ? undefined : environment,\n liveBindings: env.EXPO_UNSTABLE_LIVE_BINDINGS,\n ...props,\n };\n}\n\nexport function getBaseUrlFromExpoConfig(exp: ExpoConfig) {\n return exp.experiments?.baseUrl?.trim().replace(/\\/+$/, '') ?? '';\n}\n\nexport function getAsyncRoutesFromExpoConfig(exp: ExpoConfig, mode: string, platform: string) {\n let asyncRoutesSetting;\n\n if (exp.extra?.router?.asyncRoutes) {\n const asyncRoutes = exp.extra?.router?.asyncRoutes;\n if (['boolean', 'string'].includes(typeof asyncRoutes)) {\n asyncRoutesSetting = asyncRoutes;\n } else if (typeof asyncRoutes === 'object') {\n asyncRoutesSetting = asyncRoutes[platform] ?? asyncRoutes.default;\n }\n }\n\n return [mode, true].includes(asyncRoutesSetting);\n}\n\nexport function getMetroDirectBundleOptionsForExpoConfig(\n projectRoot: string,\n exp: ExpoConfig,\n options: Omit<ExpoMetroOptions, 'baseUrl' | 'reactCompiler' | 'routerRoot' | 'asyncRoutes'>\n) {\n return getMetroDirectBundleOptions({\n ...options,\n reactCompiler: !!exp.experiments?.reactCompiler,\n baseUrl: getBaseUrlFromExpoConfig(exp),\n routerRoot: getRouterDirectoryModuleIdWithManifest(projectRoot, exp),\n asyncRoutes: getAsyncRoutesFromExpoConfig(exp, options.mode, options.platform),\n });\n}\n\nexport function getMetroDirectBundleOptions(options: ExpoMetroOptions) {\n const {\n mainModuleName,\n platform,\n mode,\n minify,\n environment,\n serializerOutput,\n serializerIncludeMaps,\n bytecode,\n lazy,\n engine,\n preserveEnvVars,\n asyncRoutes,\n baseUrl,\n routerRoot,\n isExporting,\n inlineSourceMap,\n splitChunks,\n usedExports,\n reactCompiler,\n optimize,\n domRoot,\n clientBoundaries,\n runModule,\n modulesOnly,\n useMd5Filename,\n hosted,\n liveBindings,\n } = withDefaults(options);\n\n const dev = mode !== 'production';\n const isHermes = engine === 'hermes';\n\n if (isExporting) {\n debug('Disabling lazy bundling for export build');\n options.lazy = false;\n }\n\n let fakeSourceUrl: string | undefined;\n let fakeSourceMapUrl: string | undefined;\n\n // TODO: Upstream support to Metro for passing custom serializer options.\n if (serializerIncludeMaps != null || serializerOutput != null) {\n fakeSourceUrl = new URL(\n createBundleUrlPath(options).replace(/^\\//, ''),\n 'http://localhost:8081'\n ).toString();\n if (serializerIncludeMaps) {\n fakeSourceMapUrl = fakeSourceUrl.replace('.bundle?', '.map?');\n }\n }\n\n const customTransformOptions: ExpoMetroBundleOptions['customTransformOptions'] = {\n __proto__: null,\n optimize: optimize || undefined,\n engine,\n clientBoundaries,\n preserveEnvVars: preserveEnvVars || undefined,\n // Use string to match the query param behavior.\n asyncRoutes: asyncRoutes ? String(asyncRoutes) : undefined,\n environment,\n baseUrl: baseUrl || undefined,\n routerRoot,\n bytecode: bytecode ? '1' : undefined,\n reactCompiler: reactCompiler ? String(reactCompiler) : undefined,\n dom: domRoot,\n hosted: hosted ? '1' : undefined,\n useMd5Filename: useMd5Filename || undefined,\n liveBindings: !liveBindings ? String(liveBindings) : undefined,\n };\n\n // Iterate and delete undefined values\n for (const key in customTransformOptions) {\n if (customTransformOptions[key] === undefined) {\n delete customTransformOptions[key];\n }\n }\n\n return {\n platform,\n entryFile: mainModuleName,\n dev,\n minify: minify ?? !dev,\n inlineSourceMap: inlineSourceMap ?? false,\n lazy: (!isExporting && lazy) || undefined,\n unstable_transformProfile: isHermes ? 'hermes-stable' : 'default',\n customTransformOptions,\n runModule,\n modulesOnly,\n customResolverOptions: {\n __proto__: null,\n environment,\n exporting: isExporting || undefined,\n },\n sourceMapUrl: fakeSourceMapUrl,\n sourceUrl: fakeSourceUrl,\n serializerOptions: {\n splitChunks,\n usedExports: usedExports || undefined,\n output: serializerOutput,\n includeSourceMaps: serializerIncludeMaps,\n exporting: isExporting || undefined,\n excludeSource: Server.DEFAULT_BUNDLE_OPTIONS.excludeSource,\n },\n // TODO(@kitten): See comments in MetroBundlerDevServer.ts; should all defaults be added and the logic\n // from `src/start/server/middleware/metroOptions.ts` that adds default be moved here?\n shallow: Server.DEFAULT_BUNDLE_OPTIONS.shallow,\n } as const;\n}\n\nexport function createBundleUrlPathFromExpoConfig(\n projectRoot: string,\n exp: ExpoConfig,\n options: Omit<ExpoMetroOptions, 'reactCompiler' | 'baseUrl' | 'routerRoot'>\n): string {\n return createBundleUrlPath({\n ...options,\n reactCompiler: !!exp.experiments?.reactCompiler,\n baseUrl: getBaseUrlFromExpoConfig(exp),\n routerRoot: getRouterDirectoryModuleIdWithManifest(projectRoot, exp),\n });\n}\n\nexport function createBundleUrlPath(options: ExpoMetroOptions): string {\n const queryParams = createBundleUrlSearchParams(options);\n return `/${encodeURI(options.mainModuleName.replace(/^\\/+/, ''))}.bundle?${queryParams.toString()}`;\n}\n\n/**\n * Create a bundle URL, containing all required query parameters, using a valid \"os path\".\n * On POSIX systems, this would look something like `/Users/../project/file.js?dev=false&..`.\n * On UNIX systems, this would look something like `C:\\Users\\..\\project\\file.js?dev=false&..`.\n * This path can safely be used with `path.*` modifiers and resolved.\n */\nexport function createBundleOsPath(options: ExpoMetroOptions): string {\n const queryParams = createBundleUrlSearchParams(options);\n const mainModuleName = toPosixPath(options.mainModuleName);\n return `${mainModuleName}.bundle?${queryParams.toString()}`;\n}\n\nexport function createBundleUrlSearchParams(options: ExpoMetroOptions): URLSearchParams {\n const {\n platform,\n mode,\n minify,\n environment,\n serializerOutput,\n serializerIncludeMaps,\n lazy,\n bytecode,\n engine,\n preserveEnvVars,\n asyncRoutes,\n baseUrl,\n routerRoot,\n reactCompiler,\n inlineSourceMap,\n isExporting,\n clientBoundaries,\n splitChunks,\n usedExports,\n optimize,\n domRoot,\n modulesOnly,\n runModule,\n hosted,\n liveBindings,\n } = withDefaults(options);\n\n const dev = String(mode !== 'production');\n const queryParams = new URLSearchParams({\n platform: encodeURIComponent(platform),\n dev,\n // TODO: Is this still needed?\n hot: String(false),\n });\n\n // Lazy bundling must be disabled for bundle splitting to work.\n if (!isExporting && lazy) {\n queryParams.append('lazy', String(lazy));\n }\n\n if (inlineSourceMap) {\n queryParams.append('inlineSourceMap', String(inlineSourceMap));\n }\n\n if (minify) {\n queryParams.append('minify', String(minify));\n }\n\n // We split bytecode from the engine since you could technically use Hermes without bytecode.\n // Hermes indicates the type of language features you want to transform out of the JS, whereas bytecode\n // indicates whether you want to use the Hermes bytecode format.\n if (engine) {\n queryParams.append('transform.engine', engine);\n }\n if (bytecode) {\n queryParams.append('transform.bytecode', '1');\n }\n if (asyncRoutes) {\n queryParams.append('transform.asyncRoutes', String(asyncRoutes));\n }\n if (preserveEnvVars) {\n queryParams.append('transform.preserveEnvVars', String(preserveEnvVars));\n }\n if (baseUrl) {\n queryParams.append('transform.baseUrl', baseUrl);\n }\n if (clientBoundaries?.length) {\n queryParams.append('transform.clientBoundaries', JSON.stringify(clientBoundaries));\n }\n if (routerRoot != null) {\n queryParams.append('transform.routerRoot', routerRoot);\n }\n if (reactCompiler) {\n queryParams.append('transform.reactCompiler', String(reactCompiler));\n }\n if (domRoot) {\n queryParams.append('transform.dom', domRoot);\n }\n if (hosted) {\n queryParams.append('transform.hosted', '1');\n }\n\n if (environment) {\n queryParams.append('resolver.environment', environment);\n queryParams.append('transform.environment', environment);\n }\n\n if (isExporting) {\n queryParams.append('resolver.exporting', String(isExporting));\n }\n\n if (splitChunks) {\n queryParams.append('serializer.splitChunks', String(splitChunks));\n }\n if (usedExports) {\n queryParams.append('serializer.usedExports', String(usedExports));\n }\n if (optimize) {\n queryParams.append('transform.optimize', String(optimize));\n }\n if (serializerOutput) {\n queryParams.append('serializer.output', serializerOutput);\n }\n if (serializerIncludeMaps) {\n queryParams.append('serializer.map', String(serializerIncludeMaps));\n }\n if (engine === 'hermes') {\n queryParams.append('unstable_transformProfile', 'hermes-stable');\n }\n\n if (modulesOnly != null) {\n queryParams.set('modulesOnly', String(modulesOnly));\n }\n if (runModule != null) {\n queryParams.set('runModule', String(runModule));\n }\n\n if (liveBindings === false) {\n queryParams.append('transform.liveBindings', String(false));\n }\n\n return queryParams;\n}\n\n/**\n * Convert all path separators to `/`, including on Windows.\n * Metro asumes that all module specifiers are posix paths.\n * References to directories can still be Windows-style paths in Metro.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#importing_features_into_your_script\n * @see https://github.com/facebook/metro/pull/1286\n */\nexport function convertPathToModuleSpecifier(pathLike: string) {\n return toPosixPath(pathLike);\n}\n\nexport function getMetroOptionsFromUrl(urlFragment: string) {\n const url = new URL(urlFragment, 'http://localhost:0');\n const getStringParam = (key: string) => {\n const param = url.searchParams.get(key);\n if (Array.isArray(param)) {\n throw new Error(`Expected single value for ${key}`);\n }\n return param;\n };\n\n let pathname = url.pathname;\n if (pathname.endsWith('.bundle')) {\n pathname = pathname.slice(0, -'.bundle'.length);\n }\n\n const options: ExpoMetroOptions = {\n mode: isTruthy(getStringParam('dev') ?? 'true') ? 'development' : 'production',\n minify: isTruthy(getStringParam('minify') ?? 'false'),\n lazy: isTruthy(getStringParam('lazy') ?? 'false'),\n routerRoot: getStringParam('transform.routerRoot') ?? 'app',\n hosted: isTruthy(getStringParam('transform.hosted')),\n isExporting: isTruthy(getStringParam('resolver.exporting') ?? 'false'),\n environment: assertEnvironment(getStringParam('transform.environment') ?? 'node'),\n platform: url.searchParams.get('platform') ?? 'web',\n bytecode: isTruthy(getStringParam('transform.bytecode') ?? 'false'),\n mainModuleName: convertPathToModuleSpecifier(pathname),\n reactCompiler: isTruthy(getStringParam('transform.reactCompiler') ?? 'false'),\n asyncRoutes: isTruthy(getStringParam('transform.asyncRoutes') ?? 'false'),\n baseUrl: getStringParam('transform.baseUrl') ?? undefined,\n // clientBoundaries: JSON.parse(getStringParam('transform.clientBoundaries') ?? '[]'),\n engine: assertEngine(getStringParam('transform.engine')),\n runModule: isTruthy(getStringParam('runModule') ?? 'true'),\n modulesOnly: isTruthy(getStringParam('modulesOnly') ?? 'false'),\n liveBindings: isTruthy(getStringParam('transform.liveBindings') ?? 'true'),\n };\n\n return options;\n}\n\nfunction isTruthy(value: string | null): boolean {\n return value === 'true' || value === '1';\n}\n\nfunction assertEnvironment(environment: string | undefined): MetroEnvironment | undefined {\n if (!environment) {\n return undefined;\n }\n if (!['node', 'react-server', 'client'].includes(environment)) {\n throw new Error(`Expected transform.environment to be one of: node, react-server, client`);\n }\n return environment as MetroEnvironment;\n}\nfunction assertEngine(engine: string | undefined | null): 'hermes' | undefined {\n if (!engine) {\n return undefined;\n }\n if (!['hermes'].includes(engine)) {\n throw new Error(`Expected transform.engine to be one of: hermes`);\n }\n return engine as 'hermes';\n}\n"],"names":["convertPathToModuleSpecifier","createBundleOsPath","createBundleUrlPath","createBundleUrlPathFromExpoConfig","createBundleUrlSearchParams","getAsyncRoutesFromExpoConfig","getBaseUrlFromExpoConfig","getMetroDirectBundleOptions","getMetroDirectBundleOptionsForExpoConfig","getMetroOptionsFromUrl","isServerEnvironment","debug","require","environment","withDefaults","mode","minify","preserveEnvVars","env","EXPO_NO_CLIENT_ENV_VARS","lazy","props","bytecode","platform","CommandError","engine","optimize","EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH","usedExports","EXPO_UNSTABLE_TREE_SHAKING","isExporting","undefined","liveBindings","EXPO_UNSTABLE_LIVE_BINDINGS","exp","experiments","baseUrl","trim","replace","asyncRoutesSetting","extra","router","asyncRoutes","includes","default","projectRoot","options","reactCompiler","routerRoot","getRouterDirectoryModuleIdWithManifest","mainModuleName","serializerOutput","serializerIncludeMaps","inlineSourceMap","splitChunks","domRoot","clientBoundaries","runModule","modulesOnly","useMd5Filename","hosted","dev","isHermes","fakeSourceUrl","fakeSourceMapUrl","URL","toString","customTransformOptions","__proto__","String","dom","key","entryFile","unstable_transformProfile","customResolverOptions","exporting","sourceMapUrl","sourceUrl","serializerOptions","output","includeSourceMaps","excludeSource","Server","DEFAULT_BUNDLE_OPTIONS","shallow","queryParams","encodeURI","toPosixPath","URLSearchParams","encodeURIComponent","hot","append","length","JSON","stringify","set","pathLike","urlFragment","url","getStringParam","param","searchParams","get","Array","isArray","Error","pathname","endsWith","slice","isTruthy","assertEnvironment","assertEngine","value"],"mappings":";;;;;;;;;;;IA4ZgBA,4BAA4B;eAA5BA;;IA5IAC,kBAAkB;eAAlBA;;IAXAC,mBAAmB;eAAnBA;;IAbAC,iCAAiC;eAAjCA;;IA8BAC,2BAA2B;eAA3BA;;IA1KAC,4BAA4B;eAA5BA;;IAJAC,wBAAwB;eAAxBA;;IAiCAC,2BAA2B;eAA3BA;;IAdAC,wCAAwC;eAAxCA;;IAqSAC,sBAAsB;eAAtBA;;IA9VAC,mBAAmB;eAAnBA;;;;gEAjEG;;;;;;qBAGC;wBACS;0BACD;wBAC2B;;;;;;AAEvD,MAAMC,QAAQC,QAAQ,SAAS;AAyDxB,SAASF,oBAAoBG,WAAiB;IACnD,OAAOA,gBAAgB,UAAUA,gBAAgB;AACnD;AAEA,SAASC,aAAa,EACpBC,OAAO,aAAa,EACpBC,SAASD,SAAS,YAAY,EAC9BE,kBAAkBF,SAAS,iBAAiBG,QAAG,CAACC,uBAAuB,EACvEC,IAAI,EACJP,WAAW,EACX,GAAGQ,OACc;IACjB,IAAIA,MAAMC,QAAQ,EAAE;QAClB,IAAID,MAAME,QAAQ,KAAK,OAAO;YAC5B,MAAM,IAAIC,oBAAY,CAAC;QACzB;QACA,IAAIH,MAAMI,MAAM,KAAK,UAAU;YAC7B,MAAM,IAAID,oBAAY,CAAC;QACzB;IACF;IAEA,MAAME,WACJL,MAAMK,QAAQ,IACbb,CAAAA,gBAAgB,UAAUE,SAAS,gBAAgBG,QAAG,CAACS,kCAAkC,AAAD;IAE3F,OAAO;QACLZ;QACAC;QACAC;QACAS;QACAE,aAAaF,YAAYR,QAAG,CAACW,0BAA0B;QAC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WAA+B;IACxD,IAAI,CAACA,aAAa;QAChB,OAAOkB;IACT;IACA,IAAI,CAAC;QAAC;QAAQ;QAAgB;KAAS,CAACY,QAAQ,CAAC9B,cAAc;QAC7D,MAAM,IAAI4F,MAAM,CAAC,uEAAuE,CAAC;IAC3F;IACA,OAAO5F;AACT;AACA,SAASkG,aAAatF,MAAiC;IACrD,IAAI,CAACA,QAAQ;QACX,OAAOM;IACT;IACA,IAAI,CAAC;QAAC;KAAS,CAACY,QAAQ,CAAClB,SAAS;QAChC,MAAM,IAAIgF,MAAM,CAAC,8CAA8C,CAAC;IAClE;IACA,OAAOhF;AACT"}
1
+ {"version":3,"sources":["../../../../../src/start/server/middleware/metroOptions.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport Server from '@expo/metro/metro/Server';\nimport type { BundleOptions as MetroBundleOptions } from '@expo/metro/metro/shared/types';\n\nimport { env } from '../../../utils/env';\nimport { CommandError } from '../../../utils/errors';\nimport { toPosixPath } from '../../../utils/filePath';\nimport { getRouterDirectoryModuleIdWithManifest } from '../metro/router';\n\nconst debug = require('debug')('expo:metro:options') as typeof console.log;\n\nexport type MetroEnvironment = 'node' | 'react-server' | 'client';\n\nexport type ExpoMetroOptions = {\n platform: string;\n mainModuleName: string;\n mode: string;\n minify?: boolean;\n environment?: MetroEnvironment;\n serializerOutput?: 'static';\n serializerIncludeMaps?: boolean;\n lazy?: boolean;\n engine?: 'hermes';\n preserveEnvVars?: boolean;\n bytecode?: boolean;\n /** Enable async routes (route-based bundle splitting) in Expo Router. */\n asyncRoutes?: boolean;\n /** Module ID relative to the projectRoot for the Expo Router app directory. */\n routerRoot?: string;\n /** Enable React compiler support in Babel. */\n reactCompiler?: boolean;\n baseUrl?: string;\n isExporting: boolean;\n /** Is bundling a DOM Component (\"use dom\"). Requires the entry dom component file path. */\n domRoot?: string;\n /** Exporting MD5 filename based on file contents, for EAS Update. */\n useMd5Filename?: boolean;\n inlineSourceMap?: boolean;\n clientBoundaries?: string[];\n splitChunks?: boolean;\n usedExports?: boolean;\n /** Enable optimized bundling (required for tree shaking). */\n optimize?: boolean;\n\n modulesOnly?: boolean;\n runModule?: boolean;\n\n /** Should assets be exported for hosting. Always true on web. Always false for embedded builds. Optional for native exports. */\n hosted?: boolean;\n /** Disable live bindings (enabled by default, required for circular deps) in experimental import export support. */\n liveBindings?: boolean;\n /** When true, indicates this bundle should contain only the loader export. */\n isLoaderBundle?: boolean;\n};\n\n// See: @expo/metro-config/src/serializer/fork/baseJSBundle.ts `ExpoSerializerOptions`\nexport type SerializerOptions = {\n includeSourceMaps?: boolean;\n output?: 'static';\n splitChunks?: boolean;\n usedExports?: boolean;\n exporting?: boolean;\n};\n\nexport type ExpoMetroBundleOptions = MetroBundleOptions & {\n serializerOptions?: SerializerOptions;\n};\n\nexport function isServerEnvironment(environment?: any): boolean {\n return environment === 'node' || environment === 'react-server';\n}\n\nfunction withDefaults({\n mode = 'development',\n minify = mode === 'production',\n preserveEnvVars = mode !== 'development' && env.EXPO_NO_CLIENT_ENV_VARS,\n lazy,\n environment,\n ...props\n}: ExpoMetroOptions): ExpoMetroOptions {\n if (props.bytecode) {\n if (props.platform === 'web') {\n throw new CommandError('Cannot use bytecode with the web platform');\n }\n if (props.engine !== 'hermes') {\n throw new CommandError('Bytecode is only supported with the Hermes engine');\n }\n }\n\n const optimize =\n props.optimize ??\n (environment !== 'node' && mode === 'production' && env.EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH);\n\n return {\n mode,\n minify,\n preserveEnvVars,\n optimize,\n usedExports: optimize && env.EXPO_UNSTABLE_TREE_SHAKING,\n lazy: !props.isExporting && lazy,\n environment: environment === 'client' ? undefined : environment,\n liveBindings: env.EXPO_UNSTABLE_LIVE_BINDINGS,\n ...props,\n };\n}\n\nexport function getBaseUrlFromExpoConfig(exp: ExpoConfig) {\n return exp.experiments?.baseUrl?.trim().replace(/\\/+$/, '') ?? '';\n}\n\nexport function getAsyncRoutesFromExpoConfig(exp: ExpoConfig, mode: string, platform: string) {\n let asyncRoutesSetting;\n\n if (exp.extra?.router?.asyncRoutes) {\n const asyncRoutes = exp.extra?.router?.asyncRoutes;\n if (['boolean', 'string'].includes(typeof asyncRoutes)) {\n asyncRoutesSetting = asyncRoutes;\n } else if (typeof asyncRoutes === 'object') {\n asyncRoutesSetting = asyncRoutes[platform] ?? asyncRoutes.default;\n }\n }\n\n return [mode, true].includes(asyncRoutesSetting);\n}\n\nexport function getMetroDirectBundleOptionsForExpoConfig(\n projectRoot: string,\n exp: ExpoConfig,\n options: Omit<ExpoMetroOptions, 'baseUrl' | 'reactCompiler' | 'routerRoot' | 'asyncRoutes'>\n) {\n return getMetroDirectBundleOptions({\n ...options,\n reactCompiler: !!exp.experiments?.reactCompiler,\n baseUrl: getBaseUrlFromExpoConfig(exp),\n routerRoot: getRouterDirectoryModuleIdWithManifest(projectRoot, exp),\n asyncRoutes: getAsyncRoutesFromExpoConfig(exp, options.mode, options.platform),\n });\n}\n\nexport function getMetroDirectBundleOptions(options: ExpoMetroOptions) {\n const {\n mainModuleName,\n platform,\n mode,\n minify,\n environment,\n serializerOutput,\n serializerIncludeMaps,\n bytecode,\n lazy,\n engine,\n preserveEnvVars,\n asyncRoutes,\n baseUrl,\n routerRoot,\n isExporting,\n inlineSourceMap,\n splitChunks,\n usedExports,\n reactCompiler,\n optimize,\n domRoot,\n clientBoundaries,\n runModule,\n modulesOnly,\n useMd5Filename,\n hosted,\n liveBindings,\n isLoaderBundle,\n } = withDefaults(options);\n\n const dev = mode !== 'production';\n const isHermes = engine === 'hermes';\n\n if (isExporting) {\n debug('Disabling lazy bundling for export build');\n options.lazy = false;\n }\n\n let fakeSourceUrl: string | undefined;\n let fakeSourceMapUrl: string | undefined;\n\n // TODO: Upstream support to Metro for passing custom serializer options.\n if (serializerIncludeMaps != null || serializerOutput != null) {\n fakeSourceUrl = new URL(\n createBundleUrlPath(options).replace(/^\\//, ''),\n 'http://localhost:8081'\n ).toString();\n if (serializerIncludeMaps) {\n fakeSourceMapUrl = fakeSourceUrl.replace('.bundle?', '.map?');\n }\n }\n\n const customTransformOptions: ExpoMetroBundleOptions['customTransformOptions'] = {\n __proto__: null,\n optimize: optimize || undefined,\n engine,\n clientBoundaries,\n preserveEnvVars: preserveEnvVars || undefined,\n // Use string to match the query param behavior.\n asyncRoutes: asyncRoutes ? String(asyncRoutes) : undefined,\n environment,\n baseUrl: baseUrl || undefined,\n routerRoot,\n bytecode: bytecode ? '1' : undefined,\n reactCompiler: reactCompiler ? String(reactCompiler) : undefined,\n dom: domRoot,\n hosted: hosted ? '1' : undefined,\n useMd5Filename: useMd5Filename || undefined,\n liveBindings: !liveBindings ? String(liveBindings) : undefined,\n isLoaderBundle: isLoaderBundle ? String(isLoaderBundle) : undefined,\n };\n\n // Iterate and delete undefined values\n for (const key in customTransformOptions) {\n if (customTransformOptions[key] === undefined) {\n delete customTransformOptions[key];\n }\n }\n\n return {\n platform,\n entryFile: mainModuleName,\n dev,\n minify: minify ?? !dev,\n inlineSourceMap: inlineSourceMap ?? false,\n lazy: (!isExporting && lazy) || undefined,\n unstable_transformProfile: isHermes ? 'hermes-stable' : 'default',\n customTransformOptions,\n runModule,\n modulesOnly,\n customResolverOptions: {\n __proto__: null,\n environment,\n exporting: isExporting || undefined,\n },\n sourceMapUrl: fakeSourceMapUrl,\n sourceUrl: fakeSourceUrl,\n serializerOptions: {\n splitChunks,\n usedExports: usedExports || undefined,\n output: serializerOutput,\n includeSourceMaps: serializerIncludeMaps,\n exporting: isExporting || undefined,\n excludeSource: Server.DEFAULT_BUNDLE_OPTIONS.excludeSource,\n },\n // TODO(@kitten): See comments in MetroBundlerDevServer.ts; should all defaults be added and the logic\n // from `src/start/server/middleware/metroOptions.ts` that adds default be moved here?\n shallow: Server.DEFAULT_BUNDLE_OPTIONS.shallow,\n } as const;\n}\n\nexport function createBundleUrlPathFromExpoConfig(\n projectRoot: string,\n exp: ExpoConfig,\n options: Omit<ExpoMetroOptions, 'reactCompiler' | 'baseUrl' | 'routerRoot'>\n): string {\n return createBundleUrlPath({\n ...options,\n reactCompiler: !!exp.experiments?.reactCompiler,\n baseUrl: getBaseUrlFromExpoConfig(exp),\n routerRoot: getRouterDirectoryModuleIdWithManifest(projectRoot, exp),\n });\n}\n\nexport function createBundleUrlPath(options: ExpoMetroOptions): string {\n const queryParams = createBundleUrlSearchParams(options);\n return `/${encodeURI(options.mainModuleName.replace(/^\\/+/, ''))}.bundle?${queryParams.toString()}`;\n}\n\n/**\n * Create a bundle URL, containing all required query parameters, using a valid \"os path\".\n * On POSIX systems, this would look something like `/Users/../project/file.js?dev=false&..`.\n * On UNIX systems, this would look something like `C:\\Users\\..\\project\\file.js?dev=false&..`.\n * This path can safely be used with `path.*` modifiers and resolved.\n */\nexport function createBundleOsPath(options: ExpoMetroOptions): string {\n const queryParams = createBundleUrlSearchParams(options);\n const mainModuleName = toPosixPath(options.mainModuleName);\n return `${mainModuleName}.bundle?${queryParams.toString()}`;\n}\n\nexport function createBundleUrlSearchParams(options: ExpoMetroOptions): URLSearchParams {\n const {\n platform,\n mode,\n minify,\n environment,\n serializerOutput,\n serializerIncludeMaps,\n lazy,\n bytecode,\n engine,\n preserveEnvVars,\n asyncRoutes,\n baseUrl,\n routerRoot,\n reactCompiler,\n inlineSourceMap,\n isExporting,\n clientBoundaries,\n splitChunks,\n usedExports,\n optimize,\n domRoot,\n modulesOnly,\n runModule,\n hosted,\n liveBindings,\n } = withDefaults(options);\n\n const dev = String(mode !== 'production');\n const queryParams = new URLSearchParams({\n platform: encodeURIComponent(platform),\n dev,\n // TODO: Is this still needed?\n hot: String(false),\n });\n\n // Lazy bundling must be disabled for bundle splitting to work.\n if (!isExporting && lazy) {\n queryParams.append('lazy', String(lazy));\n }\n\n if (inlineSourceMap) {\n queryParams.append('inlineSourceMap', String(inlineSourceMap));\n }\n\n if (minify) {\n queryParams.append('minify', String(minify));\n }\n\n // We split bytecode from the engine since you could technically use Hermes without bytecode.\n // Hermes indicates the type of language features you want to transform out of the JS, whereas bytecode\n // indicates whether you want to use the Hermes bytecode format.\n if (engine) {\n queryParams.append('transform.engine', engine);\n }\n if (bytecode) {\n queryParams.append('transform.bytecode', '1');\n }\n if (asyncRoutes) {\n queryParams.append('transform.asyncRoutes', String(asyncRoutes));\n }\n if (preserveEnvVars) {\n queryParams.append('transform.preserveEnvVars', String(preserveEnvVars));\n }\n if (baseUrl) {\n queryParams.append('transform.baseUrl', baseUrl);\n }\n if (clientBoundaries?.length) {\n queryParams.append('transform.clientBoundaries', JSON.stringify(clientBoundaries));\n }\n if (routerRoot != null) {\n queryParams.append('transform.routerRoot', routerRoot);\n }\n if (reactCompiler) {\n queryParams.append('transform.reactCompiler', String(reactCompiler));\n }\n if (domRoot) {\n queryParams.append('transform.dom', domRoot);\n }\n if (hosted) {\n queryParams.append('transform.hosted', '1');\n }\n\n if (environment) {\n queryParams.append('resolver.environment', environment);\n queryParams.append('transform.environment', environment);\n }\n\n if (isExporting) {\n queryParams.append('resolver.exporting', String(isExporting));\n }\n\n if (splitChunks) {\n queryParams.append('serializer.splitChunks', String(splitChunks));\n }\n if (usedExports) {\n queryParams.append('serializer.usedExports', String(usedExports));\n }\n if (optimize) {\n queryParams.append('transform.optimize', String(optimize));\n }\n if (serializerOutput) {\n queryParams.append('serializer.output', serializerOutput);\n }\n if (serializerIncludeMaps) {\n queryParams.append('serializer.map', String(serializerIncludeMaps));\n }\n if (engine === 'hermes') {\n queryParams.append('unstable_transformProfile', 'hermes-stable');\n }\n\n if (modulesOnly != null) {\n queryParams.set('modulesOnly', String(modulesOnly));\n }\n if (runModule != null) {\n queryParams.set('runModule', String(runModule));\n }\n\n if (liveBindings === false) {\n queryParams.append('transform.liveBindings', String(false));\n }\n\n return queryParams;\n}\n\n/**\n * Convert all path separators to `/`, including on Windows.\n * Metro asumes that all module specifiers are posix paths.\n * References to directories can still be Windows-style paths in Metro.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#importing_features_into_your_script\n * @see https://github.com/facebook/metro/pull/1286\n */\nexport function convertPathToModuleSpecifier(pathLike: string) {\n return toPosixPath(pathLike);\n}\n\nexport function getMetroOptionsFromUrl(urlFragment: string) {\n const url = new URL(urlFragment, 'http://localhost:0');\n const getStringParam = (key: string) => {\n const param = url.searchParams.get(key);\n if (Array.isArray(param)) {\n throw new Error(`Expected single value for ${key}`);\n }\n return param;\n };\n\n let pathname = url.pathname;\n if (pathname.endsWith('.bundle')) {\n pathname = pathname.slice(0, -'.bundle'.length);\n }\n\n const options: ExpoMetroOptions = {\n mode: isTruthy(getStringParam('dev') ?? 'true') ? 'development' : 'production',\n minify: isTruthy(getStringParam('minify') ?? 'false'),\n lazy: isTruthy(getStringParam('lazy') ?? 'false'),\n routerRoot: getStringParam('transform.routerRoot') ?? 'app',\n hosted: isTruthy(getStringParam('transform.hosted')),\n isExporting: isTruthy(getStringParam('resolver.exporting') ?? 'false'),\n environment: assertEnvironment(getStringParam('transform.environment') ?? 'node'),\n platform: url.searchParams.get('platform') ?? 'web',\n bytecode: isTruthy(getStringParam('transform.bytecode') ?? 'false'),\n mainModuleName: convertPathToModuleSpecifier(pathname),\n reactCompiler: isTruthy(getStringParam('transform.reactCompiler') ?? 'false'),\n asyncRoutes: isTruthy(getStringParam('transform.asyncRoutes') ?? 'false'),\n baseUrl: getStringParam('transform.baseUrl') ?? undefined,\n // clientBoundaries: JSON.parse(getStringParam('transform.clientBoundaries') ?? '[]'),\n engine: assertEngine(getStringParam('transform.engine')),\n runModule: isTruthy(getStringParam('runModule') ?? 'true'),\n modulesOnly: isTruthy(getStringParam('modulesOnly') ?? 'false'),\n liveBindings: isTruthy(getStringParam('transform.liveBindings') ?? 'true'),\n };\n\n return options;\n}\n\nfunction isTruthy(value: string | null): boolean {\n return value === 'true' || value === '1';\n}\n\nfunction assertEnvironment(environment: string | undefined): MetroEnvironment | undefined {\n if (!environment) {\n return undefined;\n }\n if (!['node', 'react-server', 'client'].includes(environment)) {\n throw new Error(`Expected transform.environment to be one of: node, react-server, client`);\n }\n return environment as MetroEnvironment;\n}\nfunction assertEngine(engine: string | undefined | null): 'hermes' | undefined {\n if (!engine) {\n return undefined;\n }\n if (!['hermes'].includes(engine)) {\n throw new Error(`Expected transform.engine to be one of: hermes`);\n }\n return engine as 'hermes';\n}\n"],"names":["convertPathToModuleSpecifier","createBundleOsPath","createBundleUrlPath","createBundleUrlPathFromExpoConfig","createBundleUrlSearchParams","getAsyncRoutesFromExpoConfig","getBaseUrlFromExpoConfig","getMetroDirectBundleOptions","getMetroDirectBundleOptionsForExpoConfig","getMetroOptionsFromUrl","isServerEnvironment","debug","require","environment","withDefaults","mode","minify","preserveEnvVars","env","EXPO_NO_CLIENT_ENV_VARS","lazy","props","bytecode","platform","CommandError","engine","optimize","EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH","usedExports","EXPO_UNSTABLE_TREE_SHAKING","isExporting","undefined","liveBindings","EXPO_UNSTABLE_LIVE_BINDINGS","exp","experiments","baseUrl","trim","replace","asyncRoutesSetting","extra","router","asyncRoutes","includes","default","projectRoot","options","reactCompiler","routerRoot","getRouterDirectoryModuleIdWithManifest","mainModuleName","serializerOutput","serializerIncludeMaps","inlineSourceMap","splitChunks","domRoot","clientBoundaries","runModule","modulesOnly","useMd5Filename","hosted","isLoaderBundle","dev","isHermes","fakeSourceUrl","fakeSourceMapUrl","URL","toString","customTransformOptions","__proto__","String","dom","key","entryFile","unstable_transformProfile","customResolverOptions","exporting","sourceMapUrl","sourceUrl","serializerOptions","output","includeSourceMaps","excludeSource","Server","DEFAULT_BUNDLE_OPTIONS","shallow","queryParams","encodeURI","toPosixPath","URLSearchParams","encodeURIComponent","hot","append","length","JSON","stringify","set","pathLike","urlFragment","url","getStringParam","param","searchParams","get","Array","isArray","Error","pathname","endsWith","slice","isTruthy","assertEnvironment","assertEngine","value"],"mappings":";;;;;;;;;;;IAgagBA,4BAA4B;eAA5BA;;IA5IAC,kBAAkB;eAAlBA;;IAXAC,mBAAmB;eAAnBA;;IAbAC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CAAC;QAAC;KAAS,CAACY,QAAQ,CAAClB,SAAS;QAChC,MAAM,IAAIiF,MAAM,CAAC,8CAA8C,CAAC;IAClE;IACA,OAAOjF;AACT"}
@@ -36,6 +36,7 @@ const _env = require("../utils/env");
36
36
  const _interactive = require("../utils/interactive");
37
37
  const _profile = require("../utils/profile");
38
38
  const _MCP = require("./server/MCP");
39
+ const _MCPDevToolsPluginCLIExtensions = require("./server/MCPDevToolsPluginCLIExtensions");
39
40
  function _interop_require_default(obj) {
40
41
  return obj && obj.__esModule ? obj : {
41
42
  default: obj
@@ -82,6 +83,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
82
83
  }
83
84
  return newObj;
84
85
  }
86
+ const debug = require('debug')('expo:start');
85
87
  async function getMultiBundlerStartOptions(projectRoot, options, settings, platformBundlers) {
86
88
  const commonOptions = {
87
89
  mode: options.dev ? 'development' : 'production',
@@ -183,7 +185,10 @@ async function startAsync(projectRoot, options, settings) {
183
185
  _log.log((0, _chalk().default)`Waiting on {underline ${defaultServerUrl}}`);
184
186
  }
185
187
  }
186
- mcpServer == null ? void 0 : mcpServer.start();
188
+ if (mcpServer) {
189
+ (0, _MCPDevToolsPluginCLIExtensions.addMcpCapabilities)(mcpServer, devServerManager);
190
+ mcpServer.start();
191
+ }
187
192
  // Final note about closing the server.
188
193
  const logLocation = settings.webOnly ? 'in the browser console' : 'below';
189
194
  _log.log((0, _chalk().default)`Logs for your project will appear ${logLocation}.${(0, _interactive.isInteractive)() ? _chalk().default.dim(` Press Ctrl+C to exit.`) : ''}`);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/start/startAsync.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\nimport chalk from 'chalk';\n\nimport { SimulatorAppPrerequisite } from './doctor/apple/SimulatorAppPrerequisite';\nimport { getXcodeVersionAsync } from './doctor/apple/XcodePrerequisite';\nimport { validateDependenciesVersionsAsync } from './doctor/dependencies/validateDependenciesVersions';\nimport { WebSupportProjectPrerequisite } from './doctor/web/WebSupportProjectPrerequisite';\nimport { startInterfaceAsync } from './interface/startInterface';\nimport { Options, resolvePortsAsync } from './resolveOptions';\nimport * as Log from '../log';\nimport { BundlerStartOptions } from './server/BundlerDevServer';\nimport { DevServerManager, MultiBundlerStartOptions } from './server/DevServerManager';\nimport { openPlatformsAsync } from './server/openPlatforms';\nimport { getPlatformBundlers, PlatformBundlers } from './server/platformBundlers';\nimport { env } from '../utils/env';\nimport { isInteractive } from '../utils/interactive';\nimport { profile } from '../utils/profile';\nimport { maybeCreateMCPServerAsync } from './server/MCP';\n\nasync function getMultiBundlerStartOptions(\n projectRoot: string,\n options: Options,\n settings: { webOnly?: boolean },\n platformBundlers: PlatformBundlers\n): Promise<[BundlerStartOptions, MultiBundlerStartOptions]> {\n const commonOptions: BundlerStartOptions = {\n mode: options.dev ? 'development' : 'production',\n devClient: options.devClient,\n privateKeyPath: options.privateKeyPath ?? undefined,\n https: options.https,\n maxWorkers: options.maxWorkers,\n resetDevServer: options.clear,\n minify: options.minify,\n location: {\n hostType: options.host,\n scheme: options.scheme,\n },\n };\n const multiBundlerSettings = await resolvePortsAsync(projectRoot, options, settings);\n\n const optionalBundlers: Partial<PlatformBundlers> = { ...platformBundlers };\n // In the default case, we don't want to start multiple bundlers since this is\n // a bit slower. Our priority (for legacy) is native platforms.\n if (!options.web) {\n delete optionalBundlers['web'];\n }\n\n const bundlers = [...new Set(Object.values(optionalBundlers))];\n const multiBundlerStartOptions = bundlers.map((bundler) => {\n const port =\n bundler === 'webpack' ? multiBundlerSettings.webpackPort : multiBundlerSettings.metroPort;\n return {\n type: bundler,\n options: {\n ...commonOptions,\n port,\n },\n };\n });\n\n return [commonOptions, multiBundlerStartOptions];\n}\n\nexport async function startAsync(\n projectRoot: string,\n options: Options,\n settings: { webOnly?: boolean }\n) {\n Log.log(chalk.gray(`Starting project at ${projectRoot}`));\n\n const { exp, pkg } = profile(getConfig)(projectRoot);\n\n if (exp.platforms?.includes('ios') && process.platform !== 'win32') {\n // If Xcode could potentially be used, then we should eagerly perform the\n // assertions since they can take a while on cold boots.\n getXcodeVersionAsync({ silent: true });\n SimulatorAppPrerequisite.instance.assertAsync().catch(() => {\n // noop -- this will be thrown again when the user attempts to open the project.\n });\n }\n\n const platformBundlers = getPlatformBundlers(projectRoot, exp);\n\n const [defaultOptions, startOptions] = await getMultiBundlerStartOptions(\n projectRoot,\n options,\n settings,\n platformBundlers\n );\n\n const devServerManager = new DevServerManager(projectRoot, defaultOptions);\n\n // Validations\n\n if (options.web || settings.webOnly) {\n await devServerManager.ensureProjectPrerequisiteAsync(WebSupportProjectPrerequisite);\n }\n\n // Start the server as soon as possible.\n await profile(devServerManager.startAsync.bind(devServerManager))(startOptions);\n\n if (!settings.webOnly) {\n await devServerManager.watchEnvironmentVariables();\n\n // After the server starts, we can start attempting to bootstrap TypeScript.\n await devServerManager.bootstrapTypeScriptAsync();\n }\n\n if (!env.EXPO_NO_DEPENDENCY_VALIDATION && !settings.webOnly && !options.devClient) {\n await profile(validateDependenciesVersionsAsync)(projectRoot, exp, pkg);\n }\n\n // Open project on devices.\n await profile(openPlatformsAsync)(devServerManager, options);\n\n const defaultServerUrl = devServerManager.getDefaultDevServer()?.getDevServerUrl() ?? '';\n const mcpServer =\n (await profile(maybeCreateMCPServerAsync)({\n projectRoot,\n devServerUrl: defaultServerUrl,\n })) ?? undefined;\n\n // Present the Terminal UI.\n if (isInteractive()) {\n await profile(startInterfaceAsync)(devServerManager, {\n platforms: exp.platforms ?? ['ios', 'android', 'web'],\n mcpServer,\n });\n } else {\n // Display the server location in CI...\n if (defaultServerUrl) {\n if (env.__EXPO_E2E_TEST) {\n // Print the URL to stdout for tests\n console.info(`[__EXPO_E2E_TEST:server] ${JSON.stringify({ url: defaultServerUrl })}`);\n }\n Log.log(chalk`Waiting on {underline ${defaultServerUrl}}`);\n }\n }\n mcpServer?.start();\n\n // Final note about closing the server.\n const logLocation = settings.webOnly ? 'in the browser console' : 'below';\n Log.log(\n chalk`Logs for your project will appear ${logLocation}.${\n isInteractive() ? chalk.dim(` Press Ctrl+C to exit.`) : ''\n }`\n );\n}\n"],"names":["startAsync","getMultiBundlerStartOptions","projectRoot","options","settings","platformBundlers","commonOptions","mode","dev","devClient","privateKeyPath","undefined","https","maxWorkers","resetDevServer","clear","minify","location","hostType","host","scheme","multiBundlerSettings","resolvePortsAsync","optionalBundlers","web","bundlers","Set","Object","values","multiBundlerStartOptions","map","bundler","port","webpackPort","metroPort","type","exp","devServerManager","Log","log","chalk","gray","pkg","profile","getConfig","platforms","includes","process","platform","getXcodeVersionAsync","silent","SimulatorAppPrerequisite","instance","assertAsync","catch","getPlatformBundlers","defaultOptions","startOptions","DevServerManager","webOnly","ensureProjectPrerequisiteAsync","WebSupportProjectPrerequisite","bind","watchEnvironmentVariables","bootstrapTypeScriptAsync","env","EXPO_NO_DEPENDENCY_VALIDATION","validateDependenciesVersionsAsync","openPlatformsAsync","defaultServerUrl","getDefaultDevServer","getDevServerUrl","mcpServer","maybeCreateMCPServerAsync","devServerUrl","isInteractive","startInterfaceAsync","__EXPO_E2E_TEST","console","info","JSON","stringify","url","start","logLocation","dim"],"mappings":";;;;+BA+DsBA;;;eAAAA;;;;yBA/DI;;;;;;;gEACR;;;;;;0CAEuB;mCACJ;8CACa;+CACJ;gCACV;gCACO;6DACtB;kCAEsC;+BACxB;kCACmB;qBAClC;6BACU;yBACN;qBACkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE1C,eAAeC,4BACbC,WAAmB,EACnBC,OAAgB,EAChBC,QAA+B,EAC/BC,gBAAkC;IAElC,MAAMC,gBAAqC;QACzCC,MAAMJ,QAAQK,GAAG,GAAG,gBAAgB;QACpCC,WAAWN,QAAQM,SAAS;QAC5BC,gBAAgBP,QAAQO,cAAc,IAAIC;QAC1CC,OAAOT,QAAQS,KAAK;QACpBC,YAAYV,QAAQU,UAAU;QAC9BC,gBAAgBX,QAAQY,KAAK;QAC7BC,QAAQb,QAAQa,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AAyB,EAAEC,KAAKC,SAAS,CAAC;oBAAEC,KAAKb;gBAAiB,IAAI;YACtF;YACA/B,KAAIC,GAAG,CAACC,IAAAA,gBAAK,CAAA,CAAC,sBAAsB,EAAE6B,iBAAiB,CAAC,CAAC;QAC3D;IACF;IACAG,6BAAAA,UAAWW,KAAK;IAEhB,uCAAuC;IACvC,MAAMC,cAAchF,SAASuD,OAAO,GAAG,2BAA2B;IAClErB,KAAIC,GAAG,CACLC,IAAAA,gBAAK,CAAA,CAAC,kCAAkC,EAAE4C,YAAY,CAAC,EACrDT,IAAAA,0BAAa,MAAKnC,gBAAK,CAAC6C,GAAG,CAAC,CAAC,sBAAsB,CAAC,IAAI,GACzD,CAAC;AAEN"}
1
+ {"version":3,"sources":["../../../src/start/startAsync.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\nimport chalk from 'chalk';\n\nimport { SimulatorAppPrerequisite } from './doctor/apple/SimulatorAppPrerequisite';\nimport { getXcodeVersionAsync } from './doctor/apple/XcodePrerequisite';\nimport { validateDependenciesVersionsAsync } from './doctor/dependencies/validateDependenciesVersions';\nimport { WebSupportProjectPrerequisite } from './doctor/web/WebSupportProjectPrerequisite';\nimport { startInterfaceAsync } from './interface/startInterface';\nimport { Options, resolvePortsAsync } from './resolveOptions';\nimport * as Log from '../log';\nimport { BundlerStartOptions } from './server/BundlerDevServer';\nimport { DevServerManager, MultiBundlerStartOptions } from './server/DevServerManager';\nimport { openPlatformsAsync } from './server/openPlatforms';\nimport { getPlatformBundlers, PlatformBundlers } from './server/platformBundlers';\nimport { env } from '../utils/env';\nimport { isInteractive } from '../utils/interactive';\nimport { profile } from '../utils/profile';\nimport { maybeCreateMCPServerAsync } from './server/MCP';\nimport { addMcpCapabilities } from './server/MCPDevToolsPluginCLIExtensions';\n\nconst debug = require('debug')('expo:start');\n\nasync function getMultiBundlerStartOptions(\n projectRoot: string,\n options: Options,\n settings: { webOnly?: boolean },\n platformBundlers: PlatformBundlers\n): Promise<[BundlerStartOptions, MultiBundlerStartOptions]> {\n const commonOptions: BundlerStartOptions = {\n mode: options.dev ? 'development' : 'production',\n devClient: options.devClient,\n privateKeyPath: options.privateKeyPath ?? undefined,\n https: options.https,\n maxWorkers: options.maxWorkers,\n resetDevServer: options.clear,\n minify: options.minify,\n location: {\n hostType: options.host,\n scheme: options.scheme,\n },\n };\n const multiBundlerSettings = await resolvePortsAsync(projectRoot, options, settings);\n\n const optionalBundlers: Partial<PlatformBundlers> = { ...platformBundlers };\n // In the default case, we don't want to start multiple bundlers since this is\n // a bit slower. Our priority (for legacy) is native platforms.\n if (!options.web) {\n delete optionalBundlers['web'];\n }\n\n const bundlers = [...new Set(Object.values(optionalBundlers))];\n const multiBundlerStartOptions = bundlers.map((bundler) => {\n const port =\n bundler === 'webpack' ? multiBundlerSettings.webpackPort : multiBundlerSettings.metroPort;\n return {\n type: bundler,\n options: {\n ...commonOptions,\n port,\n },\n };\n });\n\n return [commonOptions, multiBundlerStartOptions];\n}\n\nexport async function startAsync(\n projectRoot: string,\n options: Options,\n settings: { webOnly?: boolean }\n) {\n Log.log(chalk.gray(`Starting project at ${projectRoot}`));\n\n const { exp, pkg } = profile(getConfig)(projectRoot);\n\n if (exp.platforms?.includes('ios') && process.platform !== 'win32') {\n // If Xcode could potentially be used, then we should eagerly perform the\n // assertions since they can take a while on cold boots.\n getXcodeVersionAsync({ silent: true });\n SimulatorAppPrerequisite.instance.assertAsync().catch(() => {\n // noop -- this will be thrown again when the user attempts to open the project.\n });\n }\n\n const platformBundlers = getPlatformBundlers(projectRoot, exp);\n\n const [defaultOptions, startOptions] = await getMultiBundlerStartOptions(\n projectRoot,\n options,\n settings,\n platformBundlers\n );\n\n const devServerManager = new DevServerManager(projectRoot, defaultOptions);\n\n // Validations\n\n if (options.web || settings.webOnly) {\n await devServerManager.ensureProjectPrerequisiteAsync(WebSupportProjectPrerequisite);\n }\n\n // Start the server as soon as possible.\n await profile(devServerManager.startAsync.bind(devServerManager))(startOptions);\n\n if (!settings.webOnly) {\n await devServerManager.watchEnvironmentVariables();\n\n // After the server starts, we can start attempting to bootstrap TypeScript.\n await devServerManager.bootstrapTypeScriptAsync();\n }\n\n if (!env.EXPO_NO_DEPENDENCY_VALIDATION && !settings.webOnly && !options.devClient) {\n await profile(validateDependenciesVersionsAsync)(projectRoot, exp, pkg);\n }\n\n // Open project on devices.\n await profile(openPlatformsAsync)(devServerManager, options);\n\n const defaultServerUrl = devServerManager.getDefaultDevServer()?.getDevServerUrl() ?? '';\n const mcpServer =\n (await profile(maybeCreateMCPServerAsync)({\n projectRoot,\n devServerUrl: defaultServerUrl,\n })) ?? undefined;\n\n // Present the Terminal UI.\n if (isInteractive()) {\n await profile(startInterfaceAsync)(devServerManager, {\n platforms: exp.platforms ?? ['ios', 'android', 'web'],\n mcpServer,\n });\n } else {\n // Display the server location in CI...\n if (defaultServerUrl) {\n if (env.__EXPO_E2E_TEST) {\n // Print the URL to stdout for tests\n console.info(`[__EXPO_E2E_TEST:server] ${JSON.stringify({ url: defaultServerUrl })}`);\n }\n Log.log(chalk`Waiting on {underline ${defaultServerUrl}}`);\n }\n }\n\n if (mcpServer) {\n addMcpCapabilities(mcpServer, devServerManager);\n mcpServer.start();\n }\n\n // Final note about closing the server.\n const logLocation = settings.webOnly ? 'in the browser console' : 'below';\n Log.log(\n chalk`Logs for your project will appear ${logLocation}.${\n isInteractive() ? chalk.dim(` Press Ctrl+C to exit.`) : ''\n }`\n );\n}\n"],"names":["startAsync","debug","require","getMultiBundlerStartOptions","projectRoot","options","settings","platformBundlers","commonOptions","mode","dev","devClient","privateKeyPath","undefined","https","maxWorkers","resetDevServer","clear","minify","location","hostType","host","scheme","multiBundlerSettings","resolvePortsAsync","optionalBundlers","web","bundlers","Set","Object","values","multiBundlerStartOptions","map","bundler","port","webpackPort","metroPort","type","exp","devServerManager","Log","log","chalk","gray","pkg","profile","getConfig","platforms","includes","process","platform","getXcodeVersionAsync","silent","SimulatorAppPrerequisite","instance","assertAsync","catch","getPlatformBundlers","defaultOptions","startOptions","DevServerManager","webOnly","ensureProjectPrerequisiteAsync","WebSupportProjectPrerequisite","bind","watchEnvironmentVariables","bootstrapTypeScriptAsync","env","EXPO_NO_DEPENDENCY_VALIDATION","validateDependenciesVersionsAsync","openPlatformsAsync","defaultServerUrl","getDefaultDevServer","getDevServerUrl","mcpServer","maybeCreateMCPServerAsync","devServerUrl","isInteractive","startInterfaceAsync","__EXPO_E2E_TEST","console","info","JSON","stringify","url","addMcpCapabilities","start","logLocation","dim"],"mappings":";;;;+BAkEsBA;;;eAAAA;;;;yBAlEI;;;;;;;gEACR;;;;;;0CAEuB;mCACJ;8CACa;+CACJ;gCACV;gCACO;6DACtB;kCAEsC;+BACxB;kCACmB;qBAClC;6BACU;yBACN;qBACkB;gDACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEnC,MAAMC,QAAQC,QAAQ,SAAS;AAE/B,eAAeC,4BACbC,WAAmB,EACnBC,OAAgB,EAChBC,QAA+B,EAC/BC,gBAAkC;IAElC,MAAMC,gBAAqC;QACzCC,MAAMJ,QAAQK,GAAG,GAAG,gBAAgB;QACpCC,WAAWN,QAAQM,SAAS;QAC5BC,gBAAgBP,QAAQO,cAAc,IAAIC;QAC1CC,OAAOT,QAAQS,KAAK;QACpBC,YAAYV,QAAQU,UAAU;QAC9BC,gBAAgBX,QAAQY,KAAK;QAC7BC,QAAQb,QAAQa,MAAM;QACtBC,UAAU;YACRC,UAAUf,QAAQgB,IAAI;YACtBC,QAAQjB,QAAQiB,MAAM;QACxB;IACF;IACA,MAAMC,uBAAuB,MAAMC,IAAAA,iCAAiB,EAACpB,aAAaC,SAASC;IAE3E,MAAMmB,mBAA8C;QAAE,GAAGlB,gBAAgB;IAAC;IAC1E,8EAA8E;IAC9E,+DAA+D;IAC/D,IAAI,CAACF,QAAQqB,GAAG,EAAE;QAChB,OAAOD,gBAAgB,CAAC,MAAM;IAChC;IAEA,MAAME,WAAW;WAAI,IAAIC,I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AA,gBAAK,CAAA,CAAC,kCAAkC,EAAE6C,YAAY,CAAC,EACrDV,IAAAA,0BAAa,MAAKnC,gBAAK,CAAC8C,GAAG,CAAC,CAAC,sBAAsB,CAAC,IAAI,GACzD,CAAC;AAEN"}
@@ -72,7 +72,7 @@ class Env {
72
72
  return (0, _getenv().string)('WEB_HOST', '0.0.0.0');
73
73
  }
74
74
  /** Skip warning users about a dirty git status */ get EXPO_NO_GIT_STATUS() {
75
- return (0, _getenv().boolish)('EXPO_NO_GIT_STATUS', false);
75
+ return (0, _getenv().boolish)('EXPO_NO_GIT_STATUS', true);
76
76
  }
77
77
  /** Disable auto web setup */ get EXPO_NO_WEB_SETUP() {
78
78
  return (0, _getenv().boolish)('EXPO_NO_WEB_SETUP', false);
@@ -141,6 +141,15 @@ class Env {
141
141
  return _nodeprocess().default.env.HTTP_PROXY || _nodeprocess().default.env.http_proxy || '';
142
142
  }
143
143
  /**
144
+ * Instructs a different Metro config to be loaded.
145
+ * The path, according to metro-config, should be a path relative to the current working directory.
146
+ * This flag is internal and was added for external tools.
147
+ * @internal
148
+ */ get EXPO_OVERRIDE_METRO_CONFIG() {
149
+ var _process_env_EXPO_OVERRIDE_METRO_CONFIG;
150
+ return ((_process_env_EXPO_OVERRIDE_METRO_CONFIG = _nodeprocess().default.env.EXPO_OVERRIDE_METRO_CONFIG) == null ? void 0 : _process_env_EXPO_OVERRIDE_METRO_CONFIG.trim()) || undefined;
151
+ }
152
+ /**
144
153
  * Use the network inspector by overriding the metro inspector proxy with a custom version.
145
154
  * @deprecated This has been replaced by `@react-native/dev-middleware` and is now unused.
146
155
  */ get EXPO_NO_INSPECTOR_PROXY() {
@@ -237,6 +246,11 @@ class Env {
237
246
  /** Enable Expo Log Box for iOS and Android (Web is enabled by default) */ get EXPO_UNSTABLE_LOG_BOX() {
238
247
  return (0, _getenv().boolish)('EXPO_UNSTABLE_LOG_BOX', false);
239
248
  }
249
+ /**
250
+ * Enable Bonjour advertising of the Expo CLI on local networks
251
+ */ get EXPO_UNSTABLE_BONJOUR() {
252
+ return (0, _getenv().boolish)('EXPO_UNSTABLE_BONJOUR', false);
253
+ }
240
254
  }
241
255
  const env = new Env();
242
256
  function envIsWebcontainer() {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/env.ts"],"sourcesContent":["import { boolish, int, string } from 'getenv';\nimport process from 'node:process';\n\n// @expo/webpack-config -> expo-pwa -> @expo/image-utils: EXPO_IMAGE_UTILS_NO_SHARP\n\n// TODO: EXPO_CLI_USERNAME, EXPO_CLI_PASSWORD\n\nclass Env {\n /** Enable profiling metrics */\n get EXPO_PROFILE() {\n return boolish('EXPO_PROFILE', false);\n }\n\n /** Enable debug logging */\n get EXPO_DEBUG() {\n return boolish('EXPO_DEBUG', false);\n }\n\n /** Disable all network requests */\n get EXPO_OFFLINE() {\n return boolish('EXPO_OFFLINE', false);\n }\n\n /** Enable the beta version of Expo (TODO: Should this just be in the beta version of expo releases?) */\n get EXPO_BETA() {\n return boolish('EXPO_BETA', false);\n }\n\n /** Enable staging API environment */\n get EXPO_STAGING() {\n return boolish('EXPO_STAGING', false);\n }\n\n /** Enable local API environment */\n get EXPO_LOCAL() {\n return boolish('EXPO_LOCAL', false);\n }\n\n /** Is running in non-interactive CI mode */\n get CI() {\n return boolish('CI', false);\n }\n\n /** Disable telemetry (analytics) */\n get EXPO_NO_TELEMETRY() {\n return boolish('EXPO_NO_TELEMETRY', false);\n }\n\n /** Disable detaching telemetry to separate process */\n get EXPO_NO_TELEMETRY_DETACH() {\n return boolish('EXPO_NO_TELEMETRY_DETACH', false);\n }\n\n /** local directory to the universe repo for testing locally */\n get EXPO_UNIVERSE_DIR() {\n return string('EXPO_UNIVERSE_DIR', '');\n }\n\n /** @deprecated Default Webpack host string */\n get WEB_HOST() {\n return string('WEB_HOST', '0.0.0.0');\n }\n\n /** Skip warning users about a dirty git status */\n get EXPO_NO_GIT_STATUS() {\n return boolish('EXPO_NO_GIT_STATUS', false);\n }\n /** Disable auto web setup */\n get EXPO_NO_WEB_SETUP() {\n return boolish('EXPO_NO_WEB_SETUP', false);\n }\n /** Disable auto TypeScript setup */\n get EXPO_NO_TYPESCRIPT_SETUP() {\n return boolish('EXPO_NO_TYPESCRIPT_SETUP', false);\n }\n /** Disable all API caches. Does not disable bundler caches. */\n get EXPO_NO_CACHE() {\n return boolish('EXPO_NO_CACHE', false);\n }\n /** Disable the app select redirect page. */\n get EXPO_NO_REDIRECT_PAGE() {\n return boolish('EXPO_NO_REDIRECT_PAGE', false);\n }\n /** The React Metro port that's baked into react-native scripts and tools. */\n get RCT_METRO_PORT() {\n return int('RCT_METRO_PORT', 0);\n }\n /** Skip validating the manifest during `export`. */\n get EXPO_SKIP_MANIFEST_VALIDATION_TOKEN(): boolean {\n return !!string('EXPO_SKIP_MANIFEST_VALIDATION_TOKEN', '');\n }\n\n /** Public folder path relative to the project root. Default to `public` */\n get EXPO_PUBLIC_FOLDER(): string {\n return string('EXPO_PUBLIC_FOLDER', 'public');\n }\n\n /** Higher priority `$EDIOTR` variable for indicating which editor to use when pressing `o` in the Terminal UI. */\n get EXPO_EDITOR(): string {\n return string('EXPO_EDITOR', '');\n }\n\n /**\n * Overwrite the dev server URL, disregarding the `--port`, `--host`, `--tunnel`, `--lan`, `--localhost` arguments.\n * This is useful for browser editors that require custom proxy URLs.\n */\n get EXPO_PACKAGER_PROXY_URL(): string {\n return string('EXPO_PACKAGER_PROXY_URL', '');\n }\n\n /**\n * **Experimental** - Disable using `exp.direct` as the hostname for\n * `--tunnel` connections. This enables **https://** forwarding which\n * can be used to test universal links on iOS.\n *\n * This may cause issues with `expo-linking` and Expo Go.\n *\n * Select the exact subdomain by passing a string value that is not one of: `true`, `false`, `1`, `0`.\n */\n get EXPO_TUNNEL_SUBDOMAIN(): string | boolean {\n const subdomain = string('EXPO_TUNNEL_SUBDOMAIN', '');\n if (['0', 'false', ''].includes(subdomain)) {\n return false;\n } else if (['1', 'true'].includes(subdomain)) {\n return true;\n }\n return subdomain;\n }\n\n /**\n * Force Expo CLI to use the [`resolver.resolverMainFields`](https://facebook.github.io/metro/docs/configuration/#resolvermainfields) from the project `metro.config.js` for all platforms.\n *\n * By default, Expo CLI will use `['browser', 'module', 'main']` (default for Webpack) for web and the user-defined main fields for other platforms.\n */\n get EXPO_METRO_NO_MAIN_FIELD_OVERRIDE(): boolean {\n return boolish('EXPO_METRO_NO_MAIN_FIELD_OVERRIDE', false);\n }\n\n /**\n * HTTP/HTTPS proxy to connect to for network requests. Configures [https-proxy-agent](https://www.npmjs.com/package/https-proxy-agent).\n */\n get HTTP_PROXY(): string {\n return process.env.HTTP_PROXY || process.env.http_proxy || '';\n }\n\n /**\n * Use the network inspector by overriding the metro inspector proxy with a custom version.\n * @deprecated This has been replaced by `@react-native/dev-middleware` and is now unused.\n */\n get EXPO_NO_INSPECTOR_PROXY(): boolean {\n return boolish('EXPO_NO_INSPECTOR_PROXY', false);\n }\n\n /** Disable lazy bundling in Metro bundler. */\n get EXPO_NO_METRO_LAZY() {\n return boolish('EXPO_NO_METRO_LAZY', false);\n }\n\n /**\n * Enable the unstable inverse dependency stack trace for Metro bundling errors.\n * @deprecated This will be removed in the future.\n */\n get EXPO_METRO_UNSTABLE_ERRORS() {\n return boolish('EXPO_METRO_UNSTABLE_ERRORS', true);\n }\n\n /** Enable the experimental sticky resolver for Metro (Uses Expo Autolinking results and applies them to Metro's resolution)\n * @deprecated Replaced by `exp.experiments.autolinkingModuleResolution`\n */\n get EXPO_USE_STICKY_RESOLVER() {\n return boolish('EXPO_USE_STICKY_RESOLVER', false);\n }\n\n /** Disable Environment Variable injection in client bundles. */\n get EXPO_NO_CLIENT_ENV_VARS(): boolean {\n return boolish('EXPO_NO_CLIENT_ENV_VARS', false);\n }\n\n /** Set the default `user` that should be passed to `--user` with ADB commands. Used for installing APKs on Android devices with multiple profiles. Defaults to `0`. */\n get EXPO_ADB_USER(): string {\n return string('EXPO_ADB_USER', '0');\n }\n\n /** Used internally to enable E2E utilities. This behavior is not stable to external users. */\n get __EXPO_E2E_TEST(): boolean {\n return boolish('__EXPO_E2E_TEST', false);\n }\n\n /** Unstable: Force single-bundle exports in production. */\n get EXPO_NO_BUNDLE_SPLITTING(): boolean {\n return boolish('EXPO_NO_BUNDLE_SPLITTING', false);\n }\n\n /**\n * Enable Atlas to gather bundle information during development or export.\n * Note, because this used to be an experimental feature, both `EXPO_ATLAS` and `EXPO_UNSTABLE_ATLAS` are supported.\n */\n get EXPO_ATLAS() {\n return boolish('EXPO_ATLAS', boolish('EXPO_UNSTABLE_ATLAS', false));\n }\n\n /** Unstable: Enable tree shaking for Metro. */\n get EXPO_UNSTABLE_TREE_SHAKING() {\n return boolish('EXPO_UNSTABLE_TREE_SHAKING', false);\n }\n\n /** Unstable: Enable eager bundling where transformation runs uncached after the entire bundle has been created. This is required for production tree shaking and less optimized for development bundling. */\n get EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH() {\n return boolish('EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH', false);\n }\n\n /** Enable the use of Expo's custom metro require implementation. The custom require supports better debugging, tree shaking, and React Server Components. */\n get EXPO_USE_METRO_REQUIRE() {\n return boolish('EXPO_USE_METRO_REQUIRE', false);\n }\n\n /** Internal key used to pass eager bundle data from the CLI to the native run scripts during `npx expo run` commands. */\n get __EXPO_EAGER_BUNDLE_OPTIONS() {\n return string('__EXPO_EAGER_BUNDLE_OPTIONS', '');\n }\n\n /** Disable server deployment during production builds (during `expo export:embed`). This is useful for testing API routes and server components against a local server. */\n get EXPO_NO_DEPLOY(): boolean {\n return boolish('EXPO_NO_DEPLOY', false);\n }\n\n /** Enable hydration during development when rendering Expo Web */\n get EXPO_WEB_DEV_HYDRATE(): boolean {\n return boolish('EXPO_WEB_DEV_HYDRATE', false);\n }\n\n /** Enable experimental React Server Functions support. */\n get EXPO_UNSTABLE_SERVER_FUNCTIONS(): boolean {\n return boolish('EXPO_UNSTABLE_SERVER_FUNCTIONS', false);\n }\n\n /** Enable unstable/experimental mode where React Native Web isn't required to run Expo apps on web. */\n get EXPO_NO_REACT_NATIVE_WEB(): boolean {\n return boolish('EXPO_NO_REACT_NATIVE_WEB', false);\n }\n\n /** Enable unstable/experimental support for deploying the native server in `npx expo run` commands. */\n get EXPO_UNSTABLE_DEPLOY_SERVER(): boolean {\n return boolish('EXPO_UNSTABLE_DEPLOY_SERVER', false);\n }\n\n /** Is running in EAS Build. This is set by EAS: https://docs.expo.dev/eas/environment-variables/ */\n get EAS_BUILD(): boolean {\n return boolish('EAS_BUILD', false);\n }\n\n /** Disable the React Native Directory compatibility check for new architecture when installing packages */\n get EXPO_NO_NEW_ARCH_COMPAT_CHECK(): boolean {\n return boolish('EXPO_NO_NEW_ARCH_COMPAT_CHECK', false);\n }\n\n /** Disable the dependency validation when installing other dependencies and starting the project */\n get EXPO_NO_DEPENDENCY_VALIDATION(): boolean {\n // Default to disabling when running in a web container (stackblitz, bolt, etc).\n const isWebContainer = process.versions.webcontainer != null;\n return boolish('EXPO_NO_DEPENDENCY_VALIDATION', isWebContainer);\n }\n\n /** Force Expo CLI to run in webcontainer mode, this has impact on which URL Expo is using by default */\n get EXPO_FORCE_WEBCONTAINER_ENV(): boolean {\n return boolish('EXPO_FORCE_WEBCONTAINER_ENV', false);\n }\n\n /** Force Expo CLI to run in webcontainer mode, this has impact on which URL Expo is using by default */\n get EXPO_UNSTABLE_WEB_MODAL(): boolean {\n return boolish('EXPO_UNSTABLE_WEB_MODAL', false);\n }\n\n /** Disable by falsy value live binding in experimental import export support. Enabled by default. */\n get EXPO_UNSTABLE_LIVE_BINDINGS(): boolean {\n return boolish('EXPO_UNSTABLE_LIVE_BINDINGS', true);\n }\n\n /**\n * Enable the experimental MCP integration or further specify the MCP server URL.\n */\n get EXPO_UNSTABLE_MCP_SERVER(): string {\n const value = string('EXPO_UNSTABLE_MCP_SERVER', '');\n if (value === '1' || value.toLowerCase() === 'true') {\n return this.EXPO_STAGING ? 'staging-mcp.expo.dev' : 'mcp.expo.dev';\n }\n return value;\n }\n\n /** Enable Expo Log Box for iOS and Android (Web is enabled by default) */\n get EXPO_UNSTABLE_LOG_BOX(): boolean {\n return boolish('EXPO_UNSTABLE_LOG_BOX', false);\n }\n}\n\nexport const env = new Env();\n\nexport function envIsWebcontainer() {\n // See: https://github.com/unjs/std-env/blob/4b1e03c4efce58249858efc2cc5f5eac727d0adb/src/providers.ts#L134-L143\n return (\n env.EXPO_FORCE_WEBCONTAINER_ENV ||\n (process.env.SHELL === '/bin/jsh' && !!process.versions.webcontainer)\n );\n}\n"],"names":["env","envIsWebcontainer","Env","EXPO_PROFILE","boolish","EXPO_DEBUG","EXPO_OFFLINE","EXPO_BETA","EXPO_STAGING","EXPO_LOCAL","CI","EXPO_NO_TELEMETRY","EXPO_NO_TELEMETRY_DETACH","EXPO_UNIVERSE_DIR","string","WEB_HOST","EXPO_NO_GIT_STATUS","EXPO_NO_WEB_SETUP","EXPO_NO_TYPESCRIPT_SETUP","EXPO_NO_CACHE","EXPO_NO_REDIRECT_PAGE","RCT_METRO_PORT","int","EXPO_SKIP_MANIFEST_VALIDATION_TOKEN","EXPO_PUBLIC_FOLDER","EXPO_EDITOR","EXPO_PACKAGER_PROXY_URL","EXPO_TUNNEL_SUBDOMAIN","subdomain","includes","EXPO_METRO_NO_MAIN_FIELD_OVERRIDE","HTTP_PROXY","process","http_proxy","EXPO_NO_INSPECTOR_PROXY","EXPO_NO_METRO_LAZY","EXPO_METRO_UNSTABLE_ERRORS","EXPO_USE_STICKY_RESOLVER","EXPO_NO_CLIENT_ENV_VARS","EXPO_ADB_USER","__EXPO_E2E_TEST","EXPO_NO_BUNDLE_SPLITTING","EXPO_ATLAS","EXPO_UNSTABLE_TREE_SHAKING","EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH","EXPO_USE_METRO_REQUIRE","__EXPO_EAGER_BUNDLE_OPTIONS","EXPO_NO_DEPLOY","EXPO_WEB_DEV_HYDRATE","EXPO_UNSTABLE_SERVER_FUNCTIONS","EXPO_NO_REACT_NATIVE_WEB","EXPO_UNSTABLE_DEPLOY_SERVER","EAS_BUILD","EXPO_NO_NEW_ARCH_COMPAT_CHECK","EXPO_NO_DEPENDENCY_VALIDATION","isWebContainer","versions","webcontainer","EXPO_FORCE_WEBCONTAINER_ENV","EXPO_UNSTABLE_WEB_MODAL","EXPO_UNSTABLE_LIVE_BINDINGS","EXPO_UNSTABLE_MCP_SERVER","value","toLowerCase","EXPO_UNSTABLE_LOG_BOX","SHELL"],"mappings":";;;;;;;;;;;IAuSaA,GAAG;eAAHA;;IAEGC,iBAAiB;eAAjBA;;;;yBAzSqB;;;;;;;gEACjB;;;;;;;;;;;AAEpB,mFAAmF;AAEnF,6CAA6C;AAE7C,MAAMC;IACJ,6BAA6B,GAC7B,IAAIC,eAAe;QACjB,OAAOC,IAAAA,iBAAO,EAAC,gBAAgB;IACjC;IAEA,yBAAyB,GACzB,IAAIC,aAAa;QACf,OAAOD,IAAAA,iBAAO,EAAC,cAAc;IAC/B;IAEA,iCAAiC,GACjC,IAAIE,eAAe;QACjB,OAAOF,IAAAA,iBAAO,EAAC,gBAAgB;IACjC;IAEA,sGAAsG,GACtG,IAAIG,YAAY;QACd,OAAOH,IAAAA,iBAAO,EAAC,aAAa;IAC9B;IAEA,mCAAmC,GACnC,IAAII,eAAe;QACjB,OAAOJ,IAAAA,iBAAO,EAAC,gBAAgB;IACjC;IAEA,iCAAiC,GACjC,IAAIK,aAAa;QACf,OAAOL,IAAAA,iBAAO,EAAC,cAAc;IAC/B;IAEA,0CAA0C,GAC1C,IAAIM,KAAK;QACP,OAAON,IAAAA,iBAAO,EAAC,MAAM;IACvB;IAEA,kCAAkC,GAClC,IAAIO,oBAAoB;QACtB,OAAOP,IAAAA,iBAAO,EAAC,qBAAqB;IACtC;IAEA,oDAAoD,GACpD,IAAIQ,2BAA2B;QAC7B,OAAOR,IAAAA,iBAAO,EAAC,4BAA4B;IAC7C;IAEA,6DAA6D,GAC7D,IAAIS,oBAAoB;QACtB,OAAOC,IAA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ACrC,MAAMC,QAAQhD,IAAAA,gBAAM,EAAC,4BAA4B;QACjD,IAAIgD,UAAU,OAAOA,MAAMC,WAAW,OAAO,QAAQ;YACnD,OAAO,IAAI,CAACvD,YAAY,GAAG,yBAAyB;QACtD;QACA,OAAOsD;IACT;IAEA,wEAAwE,GACxE,IAAIE,wBAAiC;QACnC,OAAO5D,IAAAA,iBAAO,EAAC,yBAAyB;IAC1C;AACF;AAEO,MAAMJ,MAAM,IAAIE;AAEhB,SAASD;IACd,gHAAgH;IAChH,OACED,IAAI0D,2BAA2B,IAC9B1B,sBAAO,CAAChC,GAAG,CAACiE,KAAK,KAAK,cAAc,CAAC,CAACjC,sBAAO,CAACwB,QAAQ,CAACC,YAAY;AAExE"}
1
+ {"version":3,"sources":["../../../src/utils/env.ts"],"sourcesContent":["import { boolish, int, string } from 'getenv';\nimport process from 'node:process';\n\n// @expo/webpack-config -> expo-pwa -> @expo/image-utils: EXPO_IMAGE_UTILS_NO_SHARP\n\n// TODO: EXPO_CLI_USERNAME, EXPO_CLI_PASSWORD\n\nclass Env {\n /** Enable profiling metrics */\n get EXPO_PROFILE() {\n return boolish('EXPO_PROFILE', false);\n }\n\n /** Enable debug logging */\n get EXPO_DEBUG() {\n return boolish('EXPO_DEBUG', false);\n }\n\n /** Disable all network requests */\n get EXPO_OFFLINE() {\n return boolish('EXPO_OFFLINE', false);\n }\n\n /** Enable the beta version of Expo (TODO: Should this just be in the beta version of expo releases?) */\n get EXPO_BETA() {\n return boolish('EXPO_BETA', false);\n }\n\n /** Enable staging API environment */\n get EXPO_STAGING() {\n return boolish('EXPO_STAGING', false);\n }\n\n /** Enable local API environment */\n get EXPO_LOCAL() {\n return boolish('EXPO_LOCAL', false);\n }\n\n /** Is running in non-interactive CI mode */\n get CI() {\n return boolish('CI', false);\n }\n\n /** Disable telemetry (analytics) */\n get EXPO_NO_TELEMETRY() {\n return boolish('EXPO_NO_TELEMETRY', false);\n }\n\n /** Disable detaching telemetry to separate process */\n get EXPO_NO_TELEMETRY_DETACH() {\n return boolish('EXPO_NO_TELEMETRY_DETACH', false);\n }\n\n /** local directory to the universe repo for testing locally */\n get EXPO_UNIVERSE_DIR() {\n return string('EXPO_UNIVERSE_DIR', '');\n }\n\n /** @deprecated Default Webpack host string */\n get WEB_HOST() {\n return string('WEB_HOST', '0.0.0.0');\n }\n\n /** Skip warning users about a dirty git status */\n get EXPO_NO_GIT_STATUS() {\n return boolish('EXPO_NO_GIT_STATUS', true);\n }\n /** Disable auto web setup */\n get EXPO_NO_WEB_SETUP() {\n return boolish('EXPO_NO_WEB_SETUP', false);\n }\n /** Disable auto TypeScript setup */\n get EXPO_NO_TYPESCRIPT_SETUP() {\n return boolish('EXPO_NO_TYPESCRIPT_SETUP', false);\n }\n /** Disable all API caches. Does not disable bundler caches. */\n get EXPO_NO_CACHE() {\n return boolish('EXPO_NO_CACHE', false);\n }\n /** Disable the app select redirect page. */\n get EXPO_NO_REDIRECT_PAGE() {\n return boolish('EXPO_NO_REDIRECT_PAGE', false);\n }\n /** The React Metro port that's baked into react-native scripts and tools. */\n get RCT_METRO_PORT() {\n return int('RCT_METRO_PORT', 0);\n }\n /** Skip validating the manifest during `export`. */\n get EXPO_SKIP_MANIFEST_VALIDATION_TOKEN(): boolean {\n return !!string('EXPO_SKIP_MANIFEST_VALIDATION_TOKEN', '');\n }\n\n /** Public folder path relative to the project root. Default to `public` */\n get EXPO_PUBLIC_FOLDER(): string {\n return string('EXPO_PUBLIC_FOLDER', 'public');\n }\n\n /** Higher priority `$EDIOTR` variable for indicating which editor to use when pressing `o` in the Terminal UI. */\n get EXPO_EDITOR(): string {\n return string('EXPO_EDITOR', '');\n }\n\n /**\n * Overwrite the dev server URL, disregarding the `--port`, `--host`, `--tunnel`, `--lan`, `--localhost` arguments.\n * This is useful for browser editors that require custom proxy URLs.\n */\n get EXPO_PACKAGER_PROXY_URL(): string {\n return string('EXPO_PACKAGER_PROXY_URL', '');\n }\n\n /**\n * **Experimental** - Disable using `exp.direct` as the hostname for\n * `--tunnel` connections. This enables **https://** forwarding which\n * can be used to test universal links on iOS.\n *\n * This may cause issues with `expo-linking` and Expo Go.\n *\n * Select the exact subdomain by passing a string value that is not one of: `true`, `false`, `1`, `0`.\n */\n get EXPO_TUNNEL_SUBDOMAIN(): string | boolean {\n const subdomain = string('EXPO_TUNNEL_SUBDOMAIN', '');\n if (['0', 'false', ''].includes(subdomain)) {\n return false;\n } else if (['1', 'true'].includes(subdomain)) {\n return true;\n }\n return subdomain;\n }\n\n /**\n * Force Expo CLI to use the [`resolver.resolverMainFields`](https://facebook.github.io/metro/docs/configuration/#resolvermainfields) from the project `metro.config.js` for all platforms.\n *\n * By default, Expo CLI will use `['browser', 'module', 'main']` (default for Webpack) for web and the user-defined main fields for other platforms.\n */\n get EXPO_METRO_NO_MAIN_FIELD_OVERRIDE(): boolean {\n return boolish('EXPO_METRO_NO_MAIN_FIELD_OVERRIDE', false);\n }\n\n /**\n * HTTP/HTTPS proxy to connect to for network requests. Configures [https-proxy-agent](https://www.npmjs.com/package/https-proxy-agent).\n */\n get HTTP_PROXY(): string {\n return process.env.HTTP_PROXY || process.env.http_proxy || '';\n }\n\n /**\n * Instructs a different Metro config to be loaded.\n * The path, according to metro-config, should be a path relative to the current working directory.\n * This flag is internal and was added for external tools.\n * @internal\n */\n get EXPO_OVERRIDE_METRO_CONFIG(): string | undefined {\n return process.env.EXPO_OVERRIDE_METRO_CONFIG?.trim() || undefined;\n }\n\n /**\n * Use the network inspector by overriding the metro inspector proxy with a custom version.\n * @deprecated This has been replaced by `@react-native/dev-middleware` and is now unused.\n */\n get EXPO_NO_INSPECTOR_PROXY(): boolean {\n return boolish('EXPO_NO_INSPECTOR_PROXY', false);\n }\n\n /** Disable lazy bundling in Metro bundler. */\n get EXPO_NO_METRO_LAZY() {\n return boolish('EXPO_NO_METRO_LAZY', false);\n }\n\n /**\n * Enable the unstable inverse dependency stack trace for Metro bundling errors.\n * @deprecated This will be removed in the future.\n */\n get EXPO_METRO_UNSTABLE_ERRORS() {\n return boolish('EXPO_METRO_UNSTABLE_ERRORS', true);\n }\n\n /** Enable the experimental sticky resolver for Metro (Uses Expo Autolinking results and applies them to Metro's resolution)\n * @deprecated Replaced by `exp.experiments.autolinkingModuleResolution`\n */\n get EXPO_USE_STICKY_RESOLVER() {\n return boolish('EXPO_USE_STICKY_RESOLVER', false);\n }\n\n /** Disable Environment Variable injection in client bundles. */\n get EXPO_NO_CLIENT_ENV_VARS(): boolean {\n return boolish('EXPO_NO_CLIENT_ENV_VARS', false);\n }\n\n /** Set the default `user` that should be passed to `--user` with ADB commands. Used for installing APKs on Android devices with multiple profiles. Defaults to `0`. */\n get EXPO_ADB_USER(): string {\n return string('EXPO_ADB_USER', '0');\n }\n\n /** Used internally to enable E2E utilities. This behavior is not stable to external users. */\n get __EXPO_E2E_TEST(): boolean {\n return boolish('__EXPO_E2E_TEST', false);\n }\n\n /** Unstable: Force single-bundle exports in production. */\n get EXPO_NO_BUNDLE_SPLITTING(): boolean {\n return boolish('EXPO_NO_BUNDLE_SPLITTING', false);\n }\n\n /**\n * Enable Atlas to gather bundle information during development or export.\n * Note, because this used to be an experimental feature, both `EXPO_ATLAS` and `EXPO_UNSTABLE_ATLAS` are supported.\n */\n get EXPO_ATLAS() {\n return boolish('EXPO_ATLAS', boolish('EXPO_UNSTABLE_ATLAS', false));\n }\n\n /** Unstable: Enable tree shaking for Metro. */\n get EXPO_UNSTABLE_TREE_SHAKING() {\n return boolish('EXPO_UNSTABLE_TREE_SHAKING', false);\n }\n\n /** Unstable: Enable eager bundling where transformation runs uncached after the entire bundle has been created. This is required for production tree shaking and less optimized for development bundling. */\n get EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH() {\n return boolish('EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH', false);\n }\n\n /** Enable the use of Expo's custom metro require implementation. The custom require supports better debugging, tree shaking, and React Server Components. */\n get EXPO_USE_METRO_REQUIRE() {\n return boolish('EXPO_USE_METRO_REQUIRE', false);\n }\n\n /** Internal key used to pass eager bundle data from the CLI to the native run scripts during `npx expo run` commands. */\n get __EXPO_EAGER_BUNDLE_OPTIONS() {\n return string('__EXPO_EAGER_BUNDLE_OPTIONS', '');\n }\n\n /** Disable server deployment during production builds (during `expo export:embed`). This is useful for testing API routes and server components against a local server. */\n get EXPO_NO_DEPLOY(): boolean {\n return boolish('EXPO_NO_DEPLOY', false);\n }\n\n /** Enable hydration during development when rendering Expo Web */\n get EXPO_WEB_DEV_HYDRATE(): boolean {\n return boolish('EXPO_WEB_DEV_HYDRATE', false);\n }\n\n /** Enable experimental React Server Functions support. */\n get EXPO_UNSTABLE_SERVER_FUNCTIONS(): boolean {\n return boolish('EXPO_UNSTABLE_SERVER_FUNCTIONS', false);\n }\n\n /** Enable unstable/experimental mode where React Native Web isn't required to run Expo apps on web. */\n get EXPO_NO_REACT_NATIVE_WEB(): boolean {\n return boolish('EXPO_NO_REACT_NATIVE_WEB', false);\n }\n\n /** Enable unstable/experimental support for deploying the native server in `npx expo run` commands. */\n get EXPO_UNSTABLE_DEPLOY_SERVER(): boolean {\n return boolish('EXPO_UNSTABLE_DEPLOY_SERVER', false);\n }\n\n /** Is running in EAS Build. This is set by EAS: https://docs.expo.dev/eas/environment-variables/ */\n get EAS_BUILD(): boolean {\n return boolish('EAS_BUILD', false);\n }\n\n /** Disable the React Native Directory compatibility check for new architecture when installing packages */\n get EXPO_NO_NEW_ARCH_COMPAT_CHECK(): boolean {\n return boolish('EXPO_NO_NEW_ARCH_COMPAT_CHECK', false);\n }\n\n /** Disable the dependency validation when installing other dependencies and starting the project */\n get EXPO_NO_DEPENDENCY_VALIDATION(): boolean {\n // Default to disabling when running in a web container (stackblitz, bolt, etc).\n const isWebContainer = process.versions.webcontainer != null;\n return boolish('EXPO_NO_DEPENDENCY_VALIDATION', isWebContainer);\n }\n\n /** Force Expo CLI to run in webcontainer mode, this has impact on which URL Expo is using by default */\n get EXPO_FORCE_WEBCONTAINER_ENV(): boolean {\n return boolish('EXPO_FORCE_WEBCONTAINER_ENV', false);\n }\n\n /** Force Expo CLI to run in webcontainer mode, this has impact on which URL Expo is using by default */\n get EXPO_UNSTABLE_WEB_MODAL(): boolean {\n return boolish('EXPO_UNSTABLE_WEB_MODAL', false);\n }\n\n /** Disable by falsy value live binding in experimental import export support. Enabled by default. */\n get EXPO_UNSTABLE_LIVE_BINDINGS(): boolean {\n return boolish('EXPO_UNSTABLE_LIVE_BINDINGS', true);\n }\n\n /**\n * Enable the experimental MCP integration or further specify the MCP server URL.\n */\n get EXPO_UNSTABLE_MCP_SERVER(): string {\n const value = string('EXPO_UNSTABLE_MCP_SERVER', '');\n if (value === '1' || value.toLowerCase() === 'true') {\n return this.EXPO_STAGING ? 'staging-mcp.expo.dev' : 'mcp.expo.dev';\n }\n return value;\n }\n\n /** Enable Expo Log Box for iOS and Android (Web is enabled by default) */\n get EXPO_UNSTABLE_LOG_BOX(): boolean {\n return boolish('EXPO_UNSTABLE_LOG_BOX', false);\n }\n\n /**\n * Enable Bonjour advertising of the Expo CLI on local networks\n */\n get EXPO_UNSTABLE_BONJOUR(): boolean {\n return boolish('EXPO_UNSTABLE_BONJOUR', false);\n }\n}\n\nexport const env = new Env();\n\nexport function envIsWebcontainer() {\n // See: https://github.com/unjs/std-env/blob/4b1e03c4efce58249858efc2cc5f5eac727d0adb/src/providers.ts#L134-L143\n return (\n env.EXPO_FORCE_WEBCONTAINER_ENV ||\n (process.env.SHELL === '/bin/jsh' && !!process.versions.webcontainer)\n );\n}\n"],"names":["env","envIsWebcontainer","Env","EXPO_PROFILE","boolish","EXPO_DEBUG","EXPO_OFFLINE","EXPO_BETA","EXPO_STAGING","EXPO_LOCAL","CI","EXPO_NO_TELEMETRY","EXPO_NO_TELEMETRY_DETACH","EXPO_UNIVERSE_DIR","string","WEB_HOST","EXPO_NO_GIT_STATUS","EXPO_NO_WEB_SETUP","EXPO_NO_TYPESCRIPT_SETUP","EXPO_NO_CACHE","EXPO_NO_REDIRECT_PAGE","RCT_METRO_PORT","int","EXPO_SKIP_MANIFEST_VALIDATION_TOKEN","EXPO_PUBLIC_FOLDER","EXPO_EDITOR","EXPO_PACKAGER_PROXY_URL","EXPO_TUNNEL_SUBDOMAIN","subdomain","includes","EXPO_METRO_NO_MAIN_FIELD_OVERRIDE","HTTP_PROXY","process","http_proxy","EXPO_OVERRIDE_METRO_CONFIG","trim","undefined","EXPO_NO_INSPECTOR_PROXY","EXPO_NO_METRO_LAZY","EXPO_METRO_UNSTABLE_ERRORS","EXPO_USE_STICKY_RESOLVER","EXPO_NO_CLIENT_ENV_VARS","EXPO_ADB_USER","__EXPO_E2E_TEST","EXPO_NO_BUNDLE_SPLITTING","EXPO_ATLAS","EXPO_UNSTABLE_TREE_SHAKING","EXPO_UNSTABLE_METRO_OPTIMIZE_GRAPH","EXPO_USE_METRO_REQUIRE","__EXPO_EAGER_BUNDLE_OPTIONS","EXPO_NO_DEPLOY","EXPO_WEB_DEV_HYDRATE","EXPO_UNSTABLE_SERVER_FUNCTIONS","EXPO_NO_REACT_NATIVE_WEB","EXPO_UNSTABLE_DEPLOY_SERVER","EAS_BUILD","EXPO_NO_NEW_ARCH_COMPAT_CHECK","EXPO_NO_DEPENDENCY_VALIDATION","isWebContainer","versions","webcontainer","EXPO_FORCE_WEBCONTAINER_ENV","EXPO_UNSTABLE_WEB_MODAL","EXPO_UNSTABLE_LIVE_BINDINGS","EXPO_UNSTABLE_MCP_SERVER","value","toLowerCase","EXPO_UNSTABLE_LOG_BOX","EXPO_UNSTABLE_BONJOUR","SHELL"],"mappings":";;;;;;;;;;;IAwTaA,GAAG;eAAHA;;IAEGC,iBAAiB;eAAjBA;;;;yBA1TqB;;;;;;;gEACjB;;;;;;;;;;;AAEpB,mFAAmF;AAEnF,6CAA6C;AAE7C,MAAMC;IACJ,6BAA6B,GAC7B,IAAIC,eAAe;QACjB,OAAOC,IAAAA,iBAAO,EAAC,gBAAgB;IACjC;IAEA,yBAAyB,GACzB,IAAIC,aAAa;QACf,OA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AAI6D,2BAA2B,IAC9B7B,sBAAO,CAAChC,GAAG,CAACqE,KAAK,KAAK,cAAc,CAAC,CAACrC,sBAAO,CAAC2B,QAAQ,CAACC,YAAY;AAExE"}
@@ -82,9 +82,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
82
82
  }
83
83
  async function maybeBailOnGitStatusAsync() {
84
84
  if (_env.env.EXPO_NO_GIT_STATUS) {
85
- _log.warn('Git status is dirty but the command will continue because EXPO_NO_GIT_STATUS is enabled...');
86
85
  return false;
87
86
  }
87
+ _log.warn('Git status is dirty are you sure you want to continue (Set EXPO_NO_GIT_STATUS=0 to disable)');
88
88
  const isGitStatusClean = await validateGitStatusAsync();
89
89
  // Give people a chance to bail out if git working tree is dirty
90
90
  if (!isGitStatusClean) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/git.ts"],"sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport chalk from 'chalk';\n\nimport { env } from './env';\nimport { isInteractive } from './interactive';\nimport { confirmAsync } from './prompts';\nimport * as Log from '../log';\n\nexport async function maybeBailOnGitStatusAsync(): Promise<boolean> {\n if (env.EXPO_NO_GIT_STATUS) {\n Log.warn(\n 'Git status is dirty but the command will continue because EXPO_NO_GIT_STATUS is enabled...'\n );\n return false;\n }\n const isGitStatusClean = await validateGitStatusAsync();\n\n // Give people a chance to bail out if git working tree is dirty\n if (!isGitStatusClean) {\n if (!isInteractive()) {\n Log.warn(\n `Git status is dirty but the command will continue because the terminal is not interactive.`\n );\n return false;\n }\n\n Log.log();\n const answer = await confirmAsync({\n message: `Continue with uncommitted changes?`,\n });\n\n if (!answer) {\n return true;\n }\n\n Log.log();\n }\n return false;\n}\n\nexport async function validateGitStatusAsync(): Promise<boolean> {\n let workingTreeStatus = 'unknown';\n try {\n const result = await spawnAsync('git', ['status', '--porcelain']);\n workingTreeStatus = result.stdout === '' ? 'clean' : 'dirty';\n } catch {\n // Maybe git is not installed?\n // Maybe this project is not using git?\n }\n\n if (workingTreeStatus === 'clean') {\n return true;\n } else if (workingTreeStatus === 'dirty') {\n logWarning(\n 'Git branch has uncommitted file changes',\n `It's recommended to commit all changes before proceeding in case you want to revert generated changes.`\n );\n } else {\n logWarning(\n 'No git repo found in current directory',\n `Use git to track file changes before running commands that modify project files.`\n );\n }\n\n return false;\n}\n\nfunction logWarning(warning: string, hint: string) {\n Log.warn(chalk.bold`! ` + warning);\n Log.log(chalk.gray`\\u203A ` + chalk.gray(hint));\n}\n"],"names":["maybeBailOnGitStatusAsync","validateGitStatusAsync","env","EXPO_NO_GIT_STATUS","Log","warn","isGitStatusClean","isInteractive","log","answer","confirmAsync","message","workingTreeStatus","result","spawnAsync","stdout","logWarning","warning","hint","chalk","bold","gray"],"mappings":";;;;;;;;;;;IAQsBA,yBAAyB;eAAzBA;;IAgCAC,sBAAsB;eAAtBA;;;;gEAxCC;;;;;;;gEACL;;;;;;qBAEE;6BACU;yBACD;6DACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,eAAeD;IACpB,IAAIE,QAAG,CAACC,kBAAkB,EAAE;QAC1BC,KAAIC,IAAI,CACN;QAEF,OAAO;IACT;IACA,MAAMC,mBAAmB,MAAML;IAE/B,gEAAgE;IAChE,IAAI,CAACK,kBAAkB;QACrB,IAAI,CAACC,IAAAA,0BAAa,KAAI;YACpBH,KAAIC,IAAI,CACN,CAAC,0FAA0F,CAAC;YAE9F,OAAO;QACT;QAEAD,KAAII,GAAG;QACP,MAAMC,SAAS,MAAMC,IAAAA,qBAAY,EAAC;YAChCC,SAAS,CAAC,kCAAkC,CAAC;QAC/C;QAEA,IAAI,CAACF,QAAQ;YACX,OAAO;QACT;QAEAL,KAAII,GAAG;IACT;IACA,OAAO;AACT;AAEO,eAAeP;IACpB,IAAIW,oBAAoB;IACxB,IAAI;QACF,MAAMC,SAAS,MAAMC,IAAAA,qBAAU,EAAC,OAAO;YAAC;YAAU;SAAc;QAChEF,oBAAoBC,OAAOE,MAAM,KAAK,KAAK,UAAU;IACvD,EAAE,OAAM;IACN,8BAA8B;IAC9B,uCAAuC;IACzC;IAEA,IAAIH,sBAAsB,SAAS;QACjC,OAAO;IACT,OAAO,IAAIA,sBAAsB,SAAS;QACxCI,WACE,2CACA,CAAC,sGAAsG,CAAC;IAE5G,OAAO;QACLA,WACE,0CACA,CAAC,gFAAgF,CAAC;IAEtF;IAEA,OAAO;AACT;AAEA,SAASA,WAAWC,OAAe,EAAEC,IAAY;IAC/Cd,KAAIC,IAAI,CAACc,gBAAK,CAACC,IAAI,CAAC,EAAE,CAAC,GAAGH;IAC1Bb,KAAII,GAAG,CAACW,gBAAK,CAACE,IAAI,CAAC,OAAO,CAAC,GAAGF,gBAAK,CAACE,IAAI,CAACH;AAC3C"}
1
+ {"version":3,"sources":["../../../src/utils/git.ts"],"sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport chalk from 'chalk';\n\nimport { env } from './env';\nimport { isInteractive } from './interactive';\nimport { confirmAsync } from './prompts';\nimport * as Log from '../log';\n\nexport async function maybeBailOnGitStatusAsync(): Promise<boolean> {\n if (env.EXPO_NO_GIT_STATUS) {\n return false;\n }\n Log.warn(\n 'Git status is dirty are you sure you want to continue (Set EXPO_NO_GIT_STATUS=0 to disable)'\n );\n const isGitStatusClean = await validateGitStatusAsync();\n\n // Give people a chance to bail out if git working tree is dirty\n if (!isGitStatusClean) {\n if (!isInteractive()) {\n Log.warn(\n `Git status is dirty but the command will continue because the terminal is not interactive.`\n );\n return false;\n }\n\n Log.log();\n const answer = await confirmAsync({\n message: `Continue with uncommitted changes?`,\n });\n\n if (!answer) {\n return true;\n }\n\n Log.log();\n }\n return false;\n}\n\nexport async function validateGitStatusAsync(): Promise<boolean> {\n let workingTreeStatus = 'unknown';\n try {\n const result = await spawnAsync('git', ['status', '--porcelain']);\n workingTreeStatus = result.stdout === '' ? 'clean' : 'dirty';\n } catch {\n // Maybe git is not installed?\n // Maybe this project is not using git?\n }\n\n if (workingTreeStatus === 'clean') {\n return true;\n } else if (workingTreeStatus === 'dirty') {\n logWarning(\n 'Git branch has uncommitted file changes',\n `It's recommended to commit all changes before proceeding in case you want to revert generated changes.`\n );\n } else {\n logWarning(\n 'No git repo found in current directory',\n `Use git to track file changes before running commands that modify project files.`\n );\n }\n\n return false;\n}\n\nfunction logWarning(warning: string, hint: string) {\n Log.warn(chalk.bold`! ` + warning);\n Log.log(chalk.gray`\\u203A ` + chalk.gray(hint));\n}\n"],"names":["maybeBailOnGitStatusAsync","validateGitStatusAsync","env","EXPO_NO_GIT_STATUS","Log","warn","isGitStatusClean","isInteractive","log","answer","confirmAsync","message","workingTreeStatus","result","spawnAsync","stdout","logWarning","warning","hint","chalk","bold","gray"],"mappings":";;;;;;;;;;;IAQsBA,yBAAyB;eAAzBA;;IAgCAC,sBAAsB;eAAtBA;;;;gEAxCC;;;;;;;gEACL;;;;;;qBAEE;6BACU;yBACD;6DACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,eAAeD;IACpB,IAAIE,QAAG,CAACC,kBAAkB,EAAE;QAC1B,OAAO;IACT;IACAC,KAAIC,IAAI,CACN;IAEF,MAAMC,mBAAmB,MAAML;IAE/B,gEAAgE;IAChE,IAAI,CAACK,kBAAkB;QACrB,IAAI,CAACC,IAAAA,0BAAa,KAAI;YACpBH,KAAIC,IAAI,CACN,CAAC,0FAA0F,CAAC;YAE9F,OAAO;QACT;QAEAD,KAAII,GAAG;QACP,MAAMC,SAAS,MAAMC,IAAAA,qBAAY,EAAC;YAChCC,SAAS,CAAC,kCAAkC,CAAC;QAC/C;QAEA,IAAI,CAACF,QAAQ;YACX,OAAO;QACT;QAEAL,KAAII,GAAG;IACT;IACA,OAAO;AACT;AAEO,eAAeP;IACpB,IAAIW,oBAAoB;IACxB,IAAI;QACF,MAAMC,SAAS,MAAMC,IAAAA,qBAAU,EAAC,OAAO;YAAC;YAAU;SAAc;QAChEF,oBAAoBC,OAAOE,MAAM,KAAK,KAAK,UAAU;IACvD,EAAE,OAAM;IACN,8BAA8B;IAC9B,uCAAuC;IACzC;IAEA,IAAIH,sBAAsB,SAAS;QACjC,OAAO;IACT,OAAO,IAAIA,sBAAsB,SAAS;QACxCI,WACE,2CACA,CAAC,sGAAsG,CAAC;IAE5G,OAAO;QACLA,WACE,0CACA,CAAC,gFAAgF,CAAC;IAEtF;IAEA,OAAO;AACT;AAEA,SAASA,WAAWC,OAAe,EAAEC,IAAY;IAC/Cd,KAAIC,IAAI,CAACc,gBAAK,CAACC,IAAI,CAAC,EAAE,CAAC,GAAGH;IAC1Bb,KAAII,GAAG,CAACW,gBAAK,CAACE,IAAI,CAAC,OAAO,CAAC,GAAGF,gBAAK,CAACE,IAAI,CAACH;AAC3C"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ isLocalSocket: function() {
13
+ return isLocalSocket;
14
+ },
15
+ isMatchingOrigin: function() {
16
+ return isMatchingOrigin;
17
+ }
18
+ });
19
+ const ipv6To4Prefix = '::ffff:';
20
+ const isLocalSocket = (socket)=>{
21
+ let { localAddress, remoteAddress, remoteFamily } = socket;
22
+ const isLoopbackRequest = localAddress && localAddress === remoteAddress;
23
+ if (isLoopbackRequest) {
24
+ return true;
25
+ } else if (!remoteAddress || !remoteFamily) {
26
+ return false;
27
+ }
28
+ if (remoteFamily === 'IPv6' && remoteAddress.startsWith(ipv6To4Prefix)) {
29
+ remoteAddress = remoteAddress.slice(ipv6To4Prefix.length);
30
+ }
31
+ return remoteAddress === '::1' || remoteAddress.startsWith('127.');
32
+ };
33
+ const isMatchingOrigin = (request, serverBaseUrl)=>{
34
+ // NOTE(@kitten): The browser will always send an origin header for websocket upgrade connections
35
+ if (!request.headers.origin) {
36
+ return true;
37
+ }
38
+ const actualHost = new URL(`${request.headers.origin}`).host;
39
+ const expectedHost = new URL(serverBaseUrl).host;
40
+ return actualHost === expectedHost;
41
+ };
42
+
43
+ //# sourceMappingURL=net.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/utils/net.ts"],"sourcesContent":["import type { IncomingHttpHeaders } from 'node:http';\nimport type { Socket } from 'node:net';\n\nconst ipv6To4Prefix = '::ffff:';\n\nexport const isLocalSocket = (socket: Socket): boolean => {\n let { localAddress, remoteAddress, remoteFamily } = socket;\n\n const isLoopbackRequest = localAddress && localAddress === remoteAddress;\n if (isLoopbackRequest) {\n return true;\n } else if (!remoteAddress || !remoteFamily) {\n return false;\n }\n\n if (remoteFamily === 'IPv6' && remoteAddress.startsWith(ipv6To4Prefix)) {\n remoteAddress = remoteAddress.slice(ipv6To4Prefix.length);\n }\n\n return remoteAddress === '::1' || remoteAddress.startsWith('127.');\n};\n\ninterface AbstractIncomingMessage {\n headers: IncomingHttpHeaders | Record<string, string | string[]>;\n}\n\nexport const isMatchingOrigin = (\n request: AbstractIncomingMessage,\n serverBaseUrl: string\n): boolean => {\n // NOTE(@kitten): The browser will always send an origin header for websocket upgrade connections\n if (!request.headers.origin) {\n return true;\n }\n const actualHost = new URL(`${request.headers.origin}`).host;\n const expectedHost = new URL(serverBaseUrl).host;\n return actualHost === expectedHost;\n};\n"],"names":["isLocalSocket","isMatchingOrigin","ipv6To4Prefix","socket","localAddress","remoteAddress","remoteFamily","isLoopbackRequest","startsWith","slice","length","request","serverBaseUrl","headers","origin","actualHost","URL","host","expectedHost"],"mappings":";;;;;;;;;;;IAKaA,aAAa;eAAbA;;IAqBAC,gBAAgB;eAAhBA;;;AAvBb,MAAMC,gBAAgB;AAEf,MAAMF,gBAAgB,CAACG;IAC5B,IAAI,EAAEC,YAAY,EAAEC,aAAa,EAAEC,YAAY,EAAE,GAAGH;IAEpD,MAAMI,oBAAoBH,gBAAgBA,iBAAiBC;IAC3D,IAAIE,mBAAmB;QACrB,OAAO;IACT,OAAO,IAAI,CAACF,iBAAiB,CAACC,cAAc;QAC1C,OAAO;IACT;IAEA,IAAIA,iBAAiB,UAAUD,cAAcG,UAAU,CAACN,gBAAgB;QACtEG,gBAAgBA,cAAcI,KAAK,CAACP,cAAcQ,MAAM;IAC1D;IAEA,OAAOL,kBAAkB,SAASA,cAAcG,UAAU,CAAC;AAC7D;AAMO,MAAMP,mBAAmB,CAC9BU,SACAC;IAEA,iGAAiG;IACjG,IAAI,CAACD,QAAQE,OAAO,CAACC,MAAM,EAAE;QAC3B,OAAO;IACT;IACA,MAAMC,aAAa,IAAIC,IAAI,GAAGL,QAAQE,OAAO,CAACC,MAAM,EAAE,EAAEG,IAAI;IAC5D,MAAMC,eAAe,IAAIF,IAAIJ,eAAeK,IAAI;IAChD,OAAOF,eAAeG;AACxB"}
@@ -33,7 +33,7 @@ class FetchClient {
33
33
  this.headers = {
34
34
  accept: 'application/json',
35
35
  'content-type': 'application/json',
36
- 'user-agent': `expo-cli/${"55.0.0-canary-20260105-6b962e6"}`,
36
+ 'user-agent': `expo-cli/${"55.0.0-canary-20260119-70f7c28"}`,
37
37
  authorization: 'Basic ' + _nodebuffer().Buffer.from(`${target}:`).toString('base64')
38
38
  };
39
39
  }
@@ -83,7 +83,7 @@ function createContext() {
83
83
  cpu: summarizeCpuInfo(),
84
84
  app: {
85
85
  name: 'expo/cli',
86
- version: "55.0.0-canary-20260105-6b962e6"
86
+ version: "55.0.0-canary-20260119-70f7c28"
87
87
  },
88
88
  ci: _ciinfo().isCI ? {
89
89
  name: _ciinfo().name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/cli",
3
- "version": "55.0.0-canary-20260105-6b962e6",
3
+ "version": "55.0.0-canary-20260119-70f7c28",
4
4
  "description": "The Expo CLI",
5
5
  "main": "build/bin/cli",
6
6
  "bin": {
@@ -42,22 +42,22 @@
42
42
  "homepage": "https://github.com/expo/expo/tree/main/packages/@expo/cli",
43
43
  "dependencies": {
44
44
  "@0no-co/graphql.web": "^1.0.8",
45
- "@expo/code-signing-certificates": "^0.0.5",
46
- "@expo/config": "12.0.14-canary-20260105-6b962e6",
47
- "@expo/config-plugins": "54.0.5-canary-20260105-6b962e6",
45
+ "@expo/code-signing-certificates": "^0.0.6",
46
+ "@expo/config": "12.0.14-canary-20260119-70f7c28",
47
+ "@expo/config-plugins": "54.1.0-canary-20260119-70f7c28",
48
48
  "@expo/devcert": "^1.2.1",
49
- "@expo/env": "2.0.9-canary-20260105-6b962e6",
50
- "@expo/image-utils": "0.8.9-canary-20260105-6b962e6",
51
- "@expo/json-file": "10.0.9-canary-20260105-6b962e6",
49
+ "@expo/env": "2.0.9-canary-20260119-70f7c28",
50
+ "@expo/image-utils": "0.8.9-canary-20260119-70f7c28",
51
+ "@expo/json-file": "10.0.9-canary-20260119-70f7c28",
52
52
  "@expo/metro": "~54.2.0",
53
- "@expo/metro-config": "54.1.0-canary-20260105-6b962e6",
54
- "@expo/osascript": "2.3.9-canary-20260105-6b962e6",
55
- "@expo/package-manager": "1.9.10-canary-20260105-6b962e6",
56
- "@expo/plist": "0.4.9-canary-20260105-6b962e6",
57
- "@expo/prebuild-config": "54.0.9-canary-20260105-6b962e6",
58
- "@expo/router-server": "0.2.0-canary-20260105-6b962e6",
59
- "@expo/log-box": "0.0.13-canary-20260105-6b962e6",
60
- "@expo/schema-utils": "0.1.9-canary-20260105-6b962e6",
53
+ "@expo/metro-config": "54.1.0-canary-20260119-70f7c28",
54
+ "@expo/osascript": "2.3.9-canary-20260119-70f7c28",
55
+ "@expo/package-manager": "1.9.11-canary-20260119-70f7c28",
56
+ "@expo/plist": "0.4.9-canary-20260119-70f7c28",
57
+ "@expo/prebuild-config": "55.0.0-canary-20260119-70f7c28",
58
+ "@expo/router-server": "0.2.0-canary-20260119-70f7c28",
59
+ "@expo/log-box": "0.0.13-canary-20260119-70f7c28",
60
+ "@expo/schema-utils": "0.1.9-canary-20260119-70f7c28",
61
61
  "@expo/spawn-async": "^1.7.2",
62
62
  "@expo/ws-tunnel": "^1.0.1",
63
63
  "@expo/xcpretty": "^4.3.0",
@@ -74,14 +74,15 @@
74
74
  "compression": "^1.7.4",
75
75
  "connect": "^3.7.0",
76
76
  "debug": "^4.3.4",
77
+ "dnssd-advertise": "^1.0.8",
77
78
  "env-editor": "^0.4.1",
78
- "expo-server": "1.0.6-canary-20260105-6b962e6",
79
+ "expo-server": "1.1.0-canary-20260119-70f7c28",
79
80
  "freeport-async": "^2.0.0",
80
81
  "getenv": "^2.0.0",
81
82
  "glob": "^13.0.0",
82
83
  "lan-network": "^0.1.6",
83
84
  "minimatch": "^9.0.0",
84
- "node-forge": "^1.3.1",
85
+ "node-forge": "^1.3.3",
85
86
  "npm-package-arg": "^11.0.0",
86
87
  "ora": "^3.4.0",
87
88
  "picomatch": "^3.0.1",
@@ -112,8 +113,8 @@
112
113
  ]
113
114
  },
114
115
  "peerDependencies": {
115
- "expo": "55.0.0-canary-20260105-6b962e6",
116
- "expo-router": "7.0.0-canary-20260105-6b962e6",
116
+ "expo": "55.0.0-canary-20260119-70f7c28",
117
+ "expo-router": "7.0.0-canary-20260119-70f7c28",
117
118
  "react-native": "*"
118
119
  },
119
120
  "peerDependenciesMeta": {
@@ -125,7 +126,7 @@
125
126
  }
126
127
  },
127
128
  "devDependencies": {
128
- "@expo/mcp-tunnel": "~0.2.1",
129
+ "@expo/mcp-tunnel": "~0.2.3",
129
130
  "@expo/multipart-body-parser": "^1.0.0",
130
131
  "@expo/ngrok": "4.1.3",
131
132
  "@graphql-codegen/cli": "^2.16.3",
@@ -158,7 +159,7 @@
158
159
  "@types/ws": "^8.5.4",
159
160
  "devtools-protocol": "^0.0.1113120",
160
161
  "expo-atlas": "^0.4.1",
161
- "expo-module-scripts": "5.1.0-canary-20260105-6b962e6",
162
+ "expo-module-scripts": "5.1.0-canary-20260119-70f7c28",
162
163
  "find-process": "^1.4.7",
163
164
  "jest-runner-tsd": "^6.0.0",
164
165
  "klaw-sync": "^6.0.0",