@expo/cli 0.18.27 → 0.18.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/bin/cli CHANGED
@@ -120,7 +120,7 @@ const args = (0, _arg().default)({
120
120
  });
121
121
  if (args["--version"]) {
122
122
  // Version is added in the build script.
123
- console.log("0.18.27");
123
+ console.log("0.18.29");
124
124
  process.exit(0);
125
125
  }
126
126
  if (args["--non-interactive"]) {
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "createDevToolsPluginWebsocketEndpoint", {
6
+ enumerable: true,
7
+ get: ()=>createDevToolsPluginWebsocketEndpoint
8
+ });
9
+ function _ws() {
10
+ const data = require("ws");
11
+ _ws = function() {
12
+ return data;
13
+ };
14
+ return data;
15
+ }
16
+ function createDevToolsPluginWebsocketEndpoint() {
17
+ const wss = new (_ws()).WebSocketServer({
18
+ noServer: true
19
+ });
20
+ wss.on("connection", (ws)=>{
21
+ ws.on("message", (message)=>{
22
+ // Broadcast the received message to all other connected clients
23
+ wss.clients.forEach((client)=>{
24
+ if (client !== ws && client.readyState === _ws().WebSocket.OPEN) {
25
+ client.send(message);
26
+ }
27
+ });
28
+ });
29
+ });
30
+ return {
31
+ "/expo-dev-plugins/broadcast": wss
32
+ };
33
+ }
34
+
35
+ //# sourceMappingURL=DevToolsPluginWebsocketEndpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/start/server/metro/DevToolsPluginWebsocketEndpoint.ts"],"sourcesContent":["import { WebSocket, WebSocketServer } from 'ws';\n\nexport function createDevToolsPluginWebsocketEndpoint(): Record<string, WebSocketServer> {\n const wss = new WebSocketServer({ noServer: true });\n\n wss.on('connection', (ws: WebSocket) => {\n ws.on('message', (message: string) => {\n // Broadcast the received message to all other connected clients\n wss.clients.forEach((client) => {\n if (client !== ws && client.readyState === WebSocket.OPEN) {\n client.send(message);\n }\n });\n });\n });\n\n return { '/expo-dev-plugins/broadcast': wss };\n}\n"],"names":["createDevToolsPluginWebsocketEndpoint","wss","WebSocketServer","noServer","on","ws","message","clients","forEach","client","readyState","WebSocket","OPEN","send"],"mappings":"AAAA;;;;+BAEgBA,uCAAqC;;aAArCA,qCAAqC;;;yBAFV,IAAI;;;;;;AAExC,SAASA,qCAAqC,GAAoC;IACvF,MAAMC,GAAG,GAAG,IAAIC,CAAAA,GAAe,EAAA,CAAA,gBAAA,CAAC;QAAEC,QAAQ,EAAE,IAAI;KAAE,CAAC,AAAC;IAEpDF,GAAG,CAACG,EAAE,CAAC,YAAY,EAAE,CAACC,EAAa,GAAK;QACtCA,EAAE,CAACD,EAAE,CAAC,SAAS,EAAE,CAACE,OAAe,GAAK;YACpC,gEAAgE;YAChEL,GAAG,CAACM,OAAO,CAACC,OAAO,CAAC,CAACC,MAAM,GAAK;gBAC9B,IAAIA,MAAM,KAAKJ,EAAE,IAAII,MAAM,CAACC,UAAU,KAAKC,GAAS,EAAA,UAAA,CAACC,IAAI,EAAE;oBACzDH,MAAM,CAACI,IAAI,CAACP,OAAO,CAAC,CAAC;gBACvB,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO;QAAE,6BAA6B,EAAEL,GAAG;KAAE,CAAC;AAChD,CAAC"}
@@ -69,6 +69,7 @@ function _url() {
69
69
  };
70
70
  return data;
71
71
  }
72
+ const _devToolsPluginWebsocketEndpoint = require("./DevToolsPluginWebsocketEndpoint");
72
73
  const _metroTerminalReporter = require("./MetroTerminalReporter");
73
74
  const _attachAtlas = require("./debugging/attachAtlas");
74
75
  const _createDebugMiddleware = require("./debugging/createDebugMiddleware");
@@ -241,7 +242,8 @@ async function instantiateMetroAsync(metroBundler, options, { isExporting , exp
241
242
  // @ts-expect-error: Inconsistent `websocketEndpoints` type between metro and @react-native-community/cli-server-api
242
243
  websocketEndpoints: {
243
244
  ...websocketEndpoints,
244
- ...debugWebsocketEndpoints
245
+ ...debugWebsocketEndpoints,
246
+ ...(0, _devToolsPluginWebsocketEndpoint.createDevToolsPluginWebsocketEndpoint)()
245
247
  },
246
248
  watch: !isExporting && isWatchEnabled()
247
249
  }, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/start/server/metro/instantiateMetro.ts"],"sourcesContent":["import { ExpoConfig, getConfig } from '@expo/config';\nimport { getDefaultConfig, LoadOptions } from '@expo/metro-config';\nimport chalk from 'chalk';\nimport { Server as ConnectServer } from 'connect';\nimport http from 'http';\nimport type Metro from 'metro';\nimport Bundler from 'metro/src/Bundler';\nimport { loadConfig, resolveConfig, ConfigT } from 'metro-config';\nimport { Terminal } from 'metro-core';\nimport util from 'node:util';\nimport semver from 'semver';\nimport { URL } from 'url';\n\nimport { MetroBundlerDevServer } from './MetroBundlerDevServer';\nimport { MetroTerminalReporter } from './MetroTerminalReporter';\nimport { attachAtlasAsync } from './debugging/attachAtlas';\nimport { createDebugMiddleware } from './debugging/createDebugMiddleware';\nimport { runServer } from './runServer-fork';\nimport { withMetroMultiPlatformAsync } from './withMetroMultiPlatform';\nimport { Log } from '../../../log';\nimport { getMetroProperties } from '../../../utils/analytics/getMetroProperties';\nimport { createDebuggerTelemetryMiddleware } from '../../../utils/analytics/metroDebuggerMiddleware';\nimport { env } from '../../../utils/env';\nimport { logEventAsync } from '../../../utils/telemetry';\nimport { createCorsMiddleware } from '../middleware/CorsMiddleware';\nimport { getMetroServerRoot } from '../middleware/ManifestMiddleware';\nimport { createJsInspectorMiddleware } from '../middleware/inspector/createJsInspectorMiddleware';\nimport { prependMiddleware, replaceMiddlewareWith } from '../middleware/mutations';\nimport { ServerNext, ServerRequest, ServerResponse } from '../middleware/server.types';\nimport { suppressRemoteDebuggingErrorMiddleware } from '../middleware/suppressErrorMiddleware';\nimport { getPlatformBundlers } from '../platformBundlers';\n\n// From expo/dev-server but with ability to use custom logger.\ntype MessageSocket = {\n broadcast: (method: string, params?: Record<string, any> | undefined) => void;\n};\n\nfunction gteSdkVersion(exp: Pick<ExpoConfig, 'sdkVersion'>, sdkVersion: string): boolean {\n if (!exp.sdkVersion) {\n return false;\n }\n\n if (exp.sdkVersion === 'UNVERSIONED') {\n return true;\n }\n\n try {\n return semver.gte(exp.sdkVersion, sdkVersion);\n } catch {\n throw new Error(`${exp.sdkVersion} is not a valid version. Must be in the form of x.y.z`);\n }\n}\n\n// Wrap terminal and polyfill console.log so we can log during bundling without breaking the indicator.\nclass LogRespectingTerminal extends Terminal {\n constructor(stream: import('node:net').Socket | import('node:stream').Writable) {\n super(stream);\n\n const sendLog = (...args: any[]) => {\n // @ts-expect-error\n this._logLines.push(\n // format args like console.log\n util.format(...args)\n );\n // @ts-expect-error\n this._scheduleUpdate();\n\n // Flush the logs to the terminal immediately so logs at the end of the process are not lost.\n this.flush();\n };\n\n console.log = sendLog;\n console.info = sendLog;\n }\n}\n\n// Share one instance of Terminal for all instances of Metro.\nconst terminal = new LogRespectingTerminal(process.stdout);\n\nexport async function loadMetroConfigAsync(\n projectRoot: string,\n options: LoadOptions,\n {\n exp,\n isExporting,\n getMetroBundler,\n }: { exp: ExpoConfig; isExporting: boolean; getMetroBundler: () => Bundler }\n) {\n let reportEvent: ((event: any) => void) | undefined;\n const serverRoot = getMetroServerRoot(projectRoot);\n const terminalReporter = new MetroTerminalReporter(serverRoot, terminal);\n\n const hasConfig = await resolveConfig(options.config, projectRoot);\n let config: ConfigT = {\n ...(await loadConfig(\n { cwd: projectRoot, projectRoot, ...options },\n // If the project does not have a metro.config.js, then we use the default config.\n hasConfig.isEmpty ? getDefaultConfig(projectRoot) : undefined\n )),\n reporter: {\n update(event: any) {\n terminalReporter.update(event);\n if (reportEvent) {\n reportEvent(event);\n }\n },\n },\n };\n\n if (\n // Requires SDK 50 for expo-assets hashAssetPlugin change.\n !exp.sdkVersion ||\n gteSdkVersion(exp, '50.0.0')\n ) {\n if (isExporting) {\n // This token will be used in the asset plugin to ensure the path is correct for writing locally.\n // @ts-expect-error: typed as readonly.\n config.transformer.publicPath = `/assets?export_path=${\n (exp.experiments?.baseUrl ?? '') + '/assets'\n }`;\n } else {\n // @ts-expect-error: typed as readonly\n config.transformer.publicPath = '/assets/?unstable_path=.';\n }\n } else {\n if (isExporting && exp.experiments?.baseUrl) {\n // This token will be used in the asset plugin to ensure the path is correct for writing locally.\n // @ts-expect-error: typed as readonly.\n config.transformer.publicPath = exp.experiments?.baseUrl;\n }\n }\n\n const platformBundlers = getPlatformBundlers(projectRoot, exp);\n\n if (exp.experiments?.reactCompiler) {\n Log.warn(`Experimental React Compiler is enabled.`);\n }\n\n config = await withMetroMultiPlatformAsync(projectRoot, {\n config,\n exp,\n platformBundlers,\n isTsconfigPathsEnabled: exp.experiments?.tsconfigPaths ?? true,\n webOutput: exp.web?.output ?? 'single',\n isFastResolverEnabled: env.EXPO_USE_FAST_RESOLVER,\n isExporting,\n isReactCanaryEnabled: exp.experiments?.reactCanary ?? false,\n getMetroBundler,\n });\n\n if (process.env.NODE_ENV !== 'test') {\n logEventAsync('metro config', getMetroProperties(projectRoot, exp, config));\n }\n\n return {\n config,\n setEventReporter: (logger: (event: any) => void) => (reportEvent = logger),\n reporter: terminalReporter,\n };\n}\n\n/** The most generic possible setup for Metro bundler. */\nexport async function instantiateMetroAsync(\n metroBundler: MetroBundlerDevServer,\n options: Omit<LoadOptions, 'logger'>,\n {\n isExporting,\n exp = getConfig(metroBundler.projectRoot, {\n skipSDKVersionRequirement: true,\n }).exp,\n }: { isExporting: boolean; exp?: ExpoConfig }\n): Promise<{\n metro: Metro.Server;\n server: http.Server;\n middleware: any;\n messageSocket: MessageSocket;\n}> {\n const projectRoot = metroBundler.projectRoot;\n\n const { config: metroConfig, setEventReporter } = await loadMetroConfigAsync(\n projectRoot,\n options,\n {\n exp,\n isExporting,\n getMetroBundler() {\n return metro.getBundler().getBundler();\n },\n }\n );\n\n const { createDevServerMiddleware, securityHeadersMiddleware } =\n require('@react-native-community/cli-server-api') as typeof import('@react-native-community/cli-server-api');\n\n const { middleware, messageSocketEndpoint, eventsSocketEndpoint, websocketEndpoints } =\n createDevServerMiddleware({\n port: metroConfig.server.port,\n watchFolders: metroConfig.watchFolders,\n });\n\n let debugWebsocketEndpoints: {\n [path: string]: import('ws').WebSocketServer;\n } = {};\n\n if (!isExporting) {\n // The `securityHeadersMiddleware` does not support cross-origin requests, we replace with the enhanced version.\n replaceMiddlewareWith(\n middleware as ConnectServer,\n securityHeadersMiddleware,\n createCorsMiddleware(exp)\n );\n\n prependMiddleware(middleware, suppressRemoteDebuggingErrorMiddleware);\n\n // TODO: We can probably drop this now.\n const customEnhanceMiddleware = metroConfig.server.enhanceMiddleware;\n // @ts-expect-error: can't mutate readonly config\n metroConfig.server.enhanceMiddleware = (metroMiddleware: any, server: Metro.Server) => {\n if (customEnhanceMiddleware) {\n metroMiddleware = customEnhanceMiddleware(metroMiddleware, server);\n }\n return middleware.use(metroMiddleware);\n };\n\n middleware.use(createDebuggerTelemetryMiddleware(projectRoot, exp));\n\n // Initialize all React Native debug features\n const { debugMiddleware, ...options } = createDebugMiddleware(metroBundler);\n debugWebsocketEndpoints = options.debugWebsocketEndpoints;\n prependMiddleware(middleware, debugMiddleware);\n middleware.use('/_expo/debugger', createJsInspectorMiddleware());\n }\n\n // Attach Expo Atlas if enabled\n const atlas = await attachAtlasAsync({\n isExporting,\n exp,\n projectRoot,\n middleware,\n metroConfig,\n // NOTE(cedric): reset the Atlas file once, and reuse it for static exports\n resetAtlasFile: isExporting,\n });\n\n const { server, metro } = await runServer(\n metroBundler,\n metroConfig,\n {\n // @ts-expect-error: Inconsistent `websocketEndpoints` type between metro and @react-native-community/cli-server-api\n websocketEndpoints: {\n ...websocketEndpoints,\n ...debugWebsocketEndpoints,\n },\n watch: !isExporting && isWatchEnabled(),\n },\n {\n mockServer: isExporting,\n }\n );\n\n // If Atlas is enabled, and can register to Metro, attach it to listen for changes\n atlas?.registerMetro(metro);\n\n prependMiddleware(middleware, (req: ServerRequest, res: ServerResponse, next: ServerNext) => {\n // If the URL is a Metro asset request, then we need to skip all other middleware to prevent\n // the community CLI's serve-static from hosting `/assets/index.html` in place of all assets if it exists.\n // /assets/?unstable_path=.\n if (req.url) {\n const url = new URL(req.url!, 'http://localhost:8000');\n if (url.pathname.match(/^\\/assets\\/?/) && url.searchParams.get('unstable_path') != null) {\n return metro.processRequest(req, res, next);\n }\n }\n return next();\n });\n\n setEventReporter(eventsSocketEndpoint.reportEvent);\n\n return {\n metro,\n server,\n middleware,\n messageSocket: messageSocketEndpoint,\n };\n}\n\n/**\n * Simplify and communicate if Metro is running without watching file updates,.\n * Exposed for testing.\n */\nexport function isWatchEnabled() {\n if (env.CI) {\n Log.log(\n chalk`Metro is running in CI mode, reloads are disabled. Remove {bold CI=true} to enable watch mode.`\n );\n }\n\n return !env.CI;\n}\n"],"names":["loadMetroConfigAsync","instantiateMetroAsync","isWatchEnabled","gteSdkVersion","exp","sdkVersion","semver","gte","Error","LogRespectingTerminal","Terminal","constructor","stream","sendLog","args","_logLines","push","util","format","_scheduleUpdate","flush","console","log","info","terminal","process","stdout","projectRoot","options","isExporting","getMetroBundler","reportEvent","serverRoot","getMetroServerRoot","terminalReporter","MetroTerminalReporter","hasConfig","resolveConfig","config","loadConfig","cwd","isEmpty","getDefaultConfig","undefined","reporter","update","event","transformer","publicPath","experiments","baseUrl","platformBundlers","getPlatformBundlers","reactCompiler","Log","warn","withMetroMultiPlatformAsync","isTsconfigPathsEnabled","tsconfigPaths","webOutput","web","output","isFastResolverEnabled","env","EXPO_USE_FAST_RESOLVER","isReactCanaryEnabled","reactCanary","NODE_ENV","logEventAsync","getMetroProperties","setEventReporter","logger","metroBundler","getConfig","skipSDKVersionRequirement","metroConfig","metro","getBundler","createDevServerMiddleware","securityHeadersMiddleware","require","middleware","messageSocketEndpoint","eventsSocketEndpoint","websocketEndpoints","port","server","watchFolders","debugWebsocketEndpoints","replaceMiddlewareWith","createCorsMiddleware","prependMiddleware","suppressRemoteDebuggingErrorMiddleware","customEnhanceMiddleware","enhanceMiddleware","metroMiddleware","use","createDebuggerTelemetryMiddleware","debugMiddleware","createDebugMiddleware","createJsInspectorMiddleware","atlas","attachAtlasAsync","resetAtlasFile","runServer","watch","mockServer","registerMetro","req","res","next","url","URL","pathname","match","searchParams","get","processRequest","messageSocket","CI","chalk"],"mappings":"AAAA;;;;;;;;;;;IA+EsBA,oBAAoB,MAApBA,oBAAoB;IAmFpBC,qBAAqB,MAArBA,qBAAqB;IAgI3BC,cAAc,MAAdA,cAAc;;;yBAlSQ,cAAc;;;;;;;yBACN,oBAAoB;;;;;;;8DAChD,OAAO;;;;;;;yBAK0B,cAAc;;;;;;;yBACxC,YAAY;;;;;;;8DACpB,WAAW;;;;;;;8DACT,QAAQ;;;;;;;yBACP,KAAK;;;;;;uCAGa,yBAAyB;6BAC9B,yBAAyB;uCACpB,mCAAmC;+BAC/C,kBAAkB;wCACA,0BAA0B;qBAClD,cAAc;oCACC,6CAA6C;yCAC9B,kDAAkD;qBAChF,oBAAoB;2BACV,0BAA0B;gCACnB,8BAA8B;oCAChC,kCAAkC;6CACzB,qDAAqD;2BACxC,yBAAyB;yCAE3B,uCAAuC;kCAC1D,qBAAqB;;;;;;AAOzD,SAASC,aAAa,CAACC,GAAmC,EAAEC,UAAkB,EAAW;IACvF,IAAI,CAACD,GAAG,CAACC,UAAU,EAAE;QACnB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAID,GAAG,CAACC,UAAU,KAAK,aAAa,EAAE;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI;QACF,OAAOC,OAAM,EAAA,QAAA,CAACC,GAAG,CAACH,GAAG,CAACC,UAAU,EAAEA,UAAU,CAAC,CAAC;IAChD,EAAE,OAAM;QACN,MAAM,IAAIG,KAAK,CAAC,CAAC,EAAEJ,GAAG,CAACC,UAAU,CAAC,qDAAqD,CAAC,CAAC,CAAC;IAC5F,CAAC;AACH,CAAC;AAED,uGAAu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AAE;QACVjE,IAAG,IAAA,CAAChC,GAAG,CACLkG,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,8FAA8F,CAAC,CACtG,CAAC;IACJ,CAAC;IAED,OAAO,CAACzD,IAAG,IAAA,CAACwD,EAAE,CAAC;AACjB,CAAC"}
1
+ {"version":3,"sources":["../../../../../src/start/server/metro/instantiateMetro.ts"],"sourcesContent":["import { ExpoConfig, getConfig } from '@expo/config';\nimport { getDefaultConfig, LoadOptions } from '@expo/metro-config';\nimport chalk from 'chalk';\nimport { Server as ConnectServer } from 'connect';\nimport http from 'http';\nimport type Metro from 'metro';\nimport Bundler from 'metro/src/Bundler';\nimport { loadConfig, resolveConfig, ConfigT } from 'metro-config';\nimport { Terminal } from 'metro-core';\nimport util from 'node:util';\nimport semver from 'semver';\nimport { URL } from 'url';\n\nimport { createDevToolsPluginWebsocketEndpoint } from './DevToolsPluginWebsocketEndpoint';\nimport { MetroBundlerDevServer } from './MetroBundlerDevServer';\nimport { MetroTerminalReporter } from './MetroTerminalReporter';\nimport { attachAtlasAsync } from './debugging/attachAtlas';\nimport { createDebugMiddleware } from './debugging/createDebugMiddleware';\nimport { runServer } from './runServer-fork';\nimport { withMetroMultiPlatformAsync } from './withMetroMultiPlatform';\nimport { Log } from '../../../log';\nimport { getMetroProperties } from '../../../utils/analytics/getMetroProperties';\nimport { createDebuggerTelemetryMiddleware } from '../../../utils/analytics/metroDebuggerMiddleware';\nimport { env } from '../../../utils/env';\nimport { logEventAsync } from '../../../utils/telemetry';\nimport { createCorsMiddleware } from '../middleware/CorsMiddleware';\nimport { getMetroServerRoot } from '../middleware/ManifestMiddleware';\nimport { createJsInspectorMiddleware } from '../middleware/inspector/createJsInspectorMiddleware';\nimport { prependMiddleware, replaceMiddlewareWith } from '../middleware/mutations';\nimport { ServerNext, ServerRequest, ServerResponse } from '../middleware/server.types';\nimport { suppressRemoteDebuggingErrorMiddleware } from '../middleware/suppressErrorMiddleware';\nimport { getPlatformBundlers } from '../platformBundlers';\n\n// From expo/dev-server but with ability to use custom logger.\ntype MessageSocket = {\n broadcast: (method: string, params?: Record<string, any> | undefined) => void;\n};\n\nfunction gteSdkVersion(exp: Pick<ExpoConfig, 'sdkVersion'>, sdkVersion: string): boolean {\n if (!exp.sdkVersion) {\n return false;\n }\n\n if (exp.sdkVersion === 'UNVERSIONED') {\n return true;\n }\n\n try {\n return semver.gte(exp.sdkVersion, sdkVersion);\n } catch {\n throw new Error(`${exp.sdkVersion} is not a valid version. Must be in the form of x.y.z`);\n }\n}\n\n// Wrap terminal and polyfill console.log so we can log during bundling without breaking the indicator.\nclass LogRespectingTerminal extends Terminal {\n constructor(stream: import('node:net').Socket | import('node:stream').Writable) {\n super(stream);\n\n const sendLog = (...args: any[]) => {\n // @ts-expect-error\n this._logLines.push(\n // format args like console.log\n util.format(...args)\n );\n // @ts-expect-error\n this._scheduleUpdate();\n\n // Flush the logs to the terminal immediately so logs at the end of the process are not lost.\n this.flush();\n };\n\n console.log = sendLog;\n console.info = sendLog;\n }\n}\n\n// Share one instance of Terminal for all instances of Metro.\nconst terminal = new LogRespectingTerminal(process.stdout);\n\nexport async function loadMetroConfigAsync(\n projectRoot: string,\n options: LoadOptions,\n {\n exp,\n isExporting,\n getMetroBundler,\n }: { exp: ExpoConfig; isExporting: boolean; getMetroBundler: () => Bundler }\n) {\n let reportEvent: ((event: any) => void) | undefined;\n const serverRoot = getMetroServerRoot(projectRoot);\n const terminalReporter = new MetroTerminalReporter(serverRoot, terminal);\n\n const hasConfig = await resolveConfig(options.config, projectRoot);\n let config: ConfigT = {\n ...(await loadConfig(\n { cwd: projectRoot, projectRoot, ...options },\n // If the project does not have a metro.config.js, then we use the default config.\n hasConfig.isEmpty ? getDefaultConfig(projectRoot) : undefined\n )),\n reporter: {\n update(event: any) {\n terminalReporter.update(event);\n if (reportEvent) {\n reportEvent(event);\n }\n },\n },\n };\n\n if (\n // Requires SDK 50 for expo-assets hashAssetPlugin change.\n !exp.sdkVersion ||\n gteSdkVersion(exp, '50.0.0')\n ) {\n if (isExporting) {\n // This token will be used in the asset plugin to ensure the path is correct for writing locally.\n // @ts-expect-error: typed as readonly.\n config.transformer.publicPath = `/assets?export_path=${\n (exp.experiments?.baseUrl ?? '') + '/assets'\n }`;\n } else {\n // @ts-expect-error: typed as readonly\n config.transformer.publicPath = '/assets/?unstable_path=.';\n }\n } else {\n if (isExporting && exp.experiments?.baseUrl) {\n // This token will be used in the asset plugin to ensure the path is correct for writing locally.\n // @ts-expect-error: typed as readonly.\n config.transformer.publicPath = exp.experiments?.baseUrl;\n }\n }\n\n const platformBundlers = getPlatformBundlers(projectRoot, exp);\n\n if (exp.experiments?.reactCompiler) {\n Log.warn(`Experimental React Compiler is enabled.`);\n }\n\n config = await withMetroMultiPlatformAsync(projectRoot, {\n config,\n exp,\n platformBundlers,\n isTsconfigPathsEnabled: exp.experiments?.tsconfigPaths ?? true,\n webOutput: exp.web?.output ?? 'single',\n isFastResolverEnabled: env.EXPO_USE_FAST_RESOLVER,\n isExporting,\n isReactCanaryEnabled: exp.experiments?.reactCanary ?? false,\n getMetroBundler,\n });\n\n if (process.env.NODE_ENV !== 'test') {\n logEventAsync('metro config', getMetroProperties(projectRoot, exp, config));\n }\n\n return {\n config,\n setEventReporter: (logger: (event: any) => void) => (reportEvent = logger),\n reporter: terminalReporter,\n };\n}\n\n/** The most generic possible setup for Metro bundler. */\nexport async function instantiateMetroAsync(\n metroBundler: MetroBundlerDevServer,\n options: Omit<LoadOptions, 'logger'>,\n {\n isExporting,\n exp = getConfig(metroBundler.projectRoot, {\n skipSDKVersionRequirement: true,\n }).exp,\n }: { isExporting: boolean; exp?: ExpoConfig }\n): Promise<{\n metro: Metro.Server;\n server: http.Server;\n middleware: any;\n messageSocket: MessageSocket;\n}> {\n const projectRoot = metroBundler.projectRoot;\n\n const { config: metroConfig, setEventReporter } = await loadMetroConfigAsync(\n projectRoot,\n options,\n {\n exp,\n isExporting,\n getMetroBundler() {\n return metro.getBundler().getBundler();\n },\n }\n );\n\n const { createDevServerMiddleware, securityHeadersMiddleware } =\n require('@react-native-community/cli-server-api') as typeof import('@react-native-community/cli-server-api');\n\n const { middleware, messageSocketEndpoint, eventsSocketEndpoint, websocketEndpoints } =\n createDevServerMiddleware({\n port: metroConfig.server.port,\n watchFolders: metroConfig.watchFolders,\n });\n\n let debugWebsocketEndpoints: {\n [path: string]: import('ws').WebSocketServer;\n } = {};\n\n if (!isExporting) {\n // The `securityHeadersMiddleware` does not support cross-origin requests, we replace with the enhanced version.\n replaceMiddlewareWith(\n middleware as ConnectServer,\n securityHeadersMiddleware,\n createCorsMiddleware(exp)\n );\n\n prependMiddleware(middleware, suppressRemoteDebuggingErrorMiddleware);\n\n // TODO: We can probably drop this now.\n const customEnhanceMiddleware = metroConfig.server.enhanceMiddleware;\n // @ts-expect-error: can't mutate readonly config\n metroConfig.server.enhanceMiddleware = (metroMiddleware: any, server: Metro.Server) => {\n if (customEnhanceMiddleware) {\n metroMiddleware = customEnhanceMiddleware(metroMiddleware, server);\n }\n return middleware.use(metroMiddleware);\n };\n\n middleware.use(createDebuggerTelemetryMiddleware(projectRoot, exp));\n\n // Initialize all React Native debug features\n const { debugMiddleware, ...options } = createDebugMiddleware(metroBundler);\n debugWebsocketEndpoints = options.debugWebsocketEndpoints;\n prependMiddleware(middleware, debugMiddleware);\n middleware.use('/_expo/debugger', createJsInspectorMiddleware());\n }\n\n // Attach Expo Atlas if enabled\n const atlas = await attachAtlasAsync({\n isExporting,\n exp,\n projectRoot,\n middleware,\n metroConfig,\n // NOTE(cedric): reset the Atlas file once, and reuse it for static exports\n resetAtlasFile: isExporting,\n });\n\n const { server, metro } = await runServer(\n metroBundler,\n metroConfig,\n {\n // @ts-expect-error: Inconsistent `websocketEndpoints` type between metro and @react-native-community/cli-server-api\n websocketEndpoints: {\n ...websocketEndpoints,\n ...debugWebsocketEndpoints,\n ...createDevToolsPluginWebsocketEndpoint(),\n },\n watch: !isExporting && isWatchEnabled(),\n },\n {\n mockServer: isExporting,\n }\n );\n\n // If Atlas is enabled, and can register to Metro, attach it to listen for changes\n atlas?.registerMetro(metro);\n\n prependMiddleware(middleware, (req: ServerRequest, res: ServerResponse, next: ServerNext) => {\n // If the URL is a Metro asset request, then we need to skip all other middleware to prevent\n // the community CLI's serve-static from hosting `/assets/index.html` in place of all assets if it exists.\n // /assets/?unstable_path=.\n if (req.url) {\n const url = new URL(req.url!, 'http://localhost:8000');\n if (url.pathname.match(/^\\/assets\\/?/) && url.searchParams.get('unstable_path') != null) {\n return metro.processRequest(req, res, next);\n }\n }\n return next();\n });\n\n setEventReporter(eventsSocketEndpoint.reportEvent);\n\n return {\n metro,\n server,\n middleware,\n messageSocket: messageSocketEndpoint,\n };\n}\n\n/**\n * Simplify and communicate if Metro is running without watching file updates,.\n * Exposed for testing.\n */\nexport function isWatchEnabled() {\n if (env.CI) {\n Log.log(\n chalk`Metro is running in CI mode, reloads are disabled. Remove {bold CI=true} to enable watch mode.`\n );\n }\n\n return !env.CI;\n}\n"],"names":["loadMetroConfigAsync","instantiateMetroAsync","isWatchEnabled","gteSdkVersion","exp","sdkVersion","semver","gte","Error","LogRespectingTerminal","Terminal","constructor","stream","sendLog","args","_logLines","push","util","format","_scheduleUpdate","flush","console","log","info","terminal","process","stdout","projectRoot","options","isExporting","getMetroBundler","reportEvent","serverRoot","getMetroServerRoot","terminalReporter","MetroTerminalReporter","hasConfig","resolveConfig","config","loadConfig","cwd","isEmpty","getDefaultConfig","undefined","reporter","update","event","transformer","publicPath","experiments","baseUrl","platformBundlers","getPlatformBundlers","reactCompiler","Log","warn","withMetroMultiPlatformAsync","isTsconfigPathsEnabled","tsconfigPaths","webOutput","web","output","isFastResolverEnabled","env","EXPO_USE_FAST_RESOLVER","isReactCanaryEnabled","reactCanary","NODE_ENV","logEventAsync","getMetroProperties","setEventReporter","logger","metroBundler","getConfig","skipSDKVersionRequirement","metroConfig","metro","getBundler","createDevServerMiddleware","securityHeadersMiddleware","require","middleware","messageSocketEndpoint","eventsSocketEndpoint","websocketEndpoints","port","server","watchFolders","debugWebsocketEndpoints","replaceMiddlewareWith","createCorsMiddleware","prependMiddleware","suppressRemoteDebuggingErrorMiddleware","customEnhanceMiddleware","enhanceMiddleware","metroMiddleware","use","createDebuggerTelemetryMiddleware","debugMiddleware","createDebugMiddleware","createJsInspectorMiddleware","atlas","attachAtlasAsync","resetAtlasFile","runServer","createDevToolsPluginWebsocketEndpoint","watch","mockServer","registerMetro","req","res","next","url","URL","pathname","match","searchParams","get","processRequest","messageSocket","CI","chalk"],"mappings":"AAAA;;;;;;;;;;;IAgFsBA,oBAAoB,MAApBA,oBAAoB;IAmFpBC,qBAAqB,MAArBA,qBAAqB;IAiI3BC,cAAc,MAAdA,cAAc;;;yBApSQ,cAAc;;;;;;;yBACN,oBAAoB;;;;;;;8DAChD,OAAO;;;;;;;yBAK0B,cAAc;;;;;;;yBACxC,YAAY;;;;;;;8DACpB,WAAW;;;;;;;8DACT,QAAQ;;;;;;;yBACP,KAAK;;;;;;iDAE6B,mCAAmC;uCAEnD,yBAAyB;6BAC9B,yBAAyB;uCACpB,mCAAmC;+BAC/C,kBAAkB;wCACA,0BAA0B;qBAClD,cAAc;oCACC,6CAA6C;yCAC9B,kDAAkD;qBAChF,oBAAoB;2BACV,0BAA0B;gCACnB,8BAA8B;oCAChC,kCAAkC;6CACzB,qDAAqD;2BACxC,yBAAyB;yCAE3B,uCAAuC;kCAC1D,qBAAqB;;;;;;AAOzD,SAASC,aAAa,CAACC,GAAmC,EAAEC,UAAkB,EAAW;IACvF,IAAI,CAACD,GAAG,CAACC,UAAU,EAAE;QACnB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAID,GAAG,CAACC,UAAU,KAAK,aAAa,EAAE;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI;QACF,OAAOC,OAAM,EAAA,QAAA,CAACC,GAAG,CAACH,GAAG,CAACC,UAAU,EAAEA,UAAU,CAAC,CAAC;IAChD,EAAE,OAAM;QACN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EnD,OAAO;QACL6C,KAAK;QACLU,MAAM;QACNL,UAAU;QACVsC,aAAa,EAAErC,qBAAqB;KACrC,CAAC;AACJ,CAAC;AAMM,SAAShF,cAAc,GAAG;IAC/B,IAAI6D,IAAG,IAAA,CAACyD,EAAE,EAAE;QACVlE,IAAG,IAAA,CAAChC,GAAG,CACLmG,IAAAA,MAAK,EAAA,QAAA,CAAA,CAAC,8FAA8F,CAAC,CACtG,CAAC;IACJ,CAAC;IAED,OAAO,CAAC1D,IAAG,IAAA,CAACyD,EAAE,CAAC;AACjB,CAAC"}
@@ -79,7 +79,7 @@ function getContext() {
79
79
  cpu: summarizeCpuInfo(),
80
80
  app: {
81
81
  name: "expo/cli",
82
- version: "0.18.27"
82
+ version: "0.18.29"
83
83
  },
84
84
  ci: _ciInfo().isCI ? {
85
85
  name: _ciInfo().name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/cli",
3
- "version": "0.18.27",
3
+ "version": "0.18.29",
4
4
  "description": "The Expo CLI",
5
5
  "main": "build/bin/cli",
6
6
  "bin": {
@@ -46,7 +46,7 @@
46
46
  "@expo/env": "~0.3.0",
47
47
  "@expo/image-utils": "^0.5.0",
48
48
  "@expo/json-file": "^8.3.0",
49
- "@expo/metro-config": "~0.18.6",
49
+ "@expo/metro-config": "0.18.11",
50
50
  "@expo/osascript": "^2.0.31",
51
51
  "@expo/package-manager": "^1.5.0",
52
52
  "@expo/plist": "^0.1.0",
@@ -173,5 +173,5 @@
173
173
  "tree-kill": "^1.2.2",
174
174
  "tsd": "^0.28.1"
175
175
  },
176
- "gitHead": "e3eef0d33a4cf869112bc0d7922ee9c7fd35a642"
176
+ "gitHead": "332ba65c4e421bdb8973cc749e3e34b5fa5ce903"
177
177
  }