@expo/cli 56.0.5 → 56.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/build/bin/cli +1 -1
  2. package/build/src/events/index.js +1 -1
  3. package/build/src/start/checkDependenciesOnStart.js +41 -8
  4. package/build/src/start/checkDependenciesOnStart.js.map +1 -1
  5. package/build/src/start/interface/commandsTable.js.map +1 -1
  6. package/build/src/start/interface/interactiveActions.js +7 -1
  7. package/build/src/start/interface/interactiveActions.js.map +1 -1
  8. package/build/src/start/interface/startInterface.js +7 -27
  9. package/build/src/start/interface/startInterface.js.map +1 -1
  10. package/build/src/start/resolveOptions.js +2 -2
  11. package/build/src/start/resolveOptions.js.map +1 -1
  12. package/build/src/start/server/getStaticRenderFunctions.js +7 -19
  13. package/build/src/start/server/getStaticRenderFunctions.js.map +1 -1
  14. package/build/src/start/server/metro/MetroBundlerDevServer.js +4 -12
  15. package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
  16. package/build/src/start/server/metro/MetroTerminalReporter.js +58 -8
  17. package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
  18. package/build/src/start/server/metro/TerminalReporter.js +18 -0
  19. package/build/src/start/server/metro/TerminalReporter.js.map +1 -1
  20. package/build/src/start/server/metro/createFileMap-fork.js +2 -17
  21. package/build/src/start/server/metro/createFileMap-fork.js.map +1 -1
  22. package/build/src/start/server/metro/instantiateMetro.js +46 -3
  23. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  24. package/build/src/start/server/metro/runServer-fork.js +1 -8
  25. package/build/src/start/server/metro/runServer-fork.js.map +1 -1
  26. package/build/src/start/server/metro/withMetroErrorReportingResolver.js +48 -26
  27. package/build/src/start/server/metro/withMetroErrorReportingResolver.js.map +1 -1
  28. package/build/src/start/server/metro/withMetroMultiPlatform.js +17 -4
  29. package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
  30. package/build/src/start/server/middleware/DomComponentsMiddleware.js +0 -8
  31. package/build/src/start/server/middleware/DomComponentsMiddleware.js.map +1 -1
  32. package/build/src/start/server/middleware/metroOptions.js +3 -2
  33. package/build/src/start/server/middleware/metroOptions.js.map +1 -1
  34. package/build/src/start/server/serverLogLikeMetro.js +5 -28
  35. package/build/src/start/server/serverLogLikeMetro.js.map +1 -1
  36. package/build/src/start/startAsync.js +6 -7
  37. package/build/src/start/startAsync.js.map +1 -1
  38. package/build/src/utils/composeMetroIgnorePatterns.js +69 -0
  39. package/build/src/utils/composeMetroIgnorePatterns.js.map +1 -0
  40. package/build/src/utils/port.js +7 -0
  41. package/build/src/utils/port.js.map +1 -1
  42. package/build/src/utils/telemetry/clients/FetchClient.js +1 -1
  43. package/build/src/utils/telemetry/utils/context.js +1 -1
  44. package/package.json +17 -19
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/start/server/serverLogLikeMetro.ts"],"sourcesContent":["/**\n * Copyright © 2024 650 Industries.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport type { SourcePosition } from '@expo/metro/metro-source-map/Consumer/types';\nimport { INTERNAL_CALLSITES_REGEX } from '@expo/metro-config';\nimport chalk from 'chalk';\nimport path from 'path';\nimport { mapSourcePosition } from 'source-map-support';\nimport * as stackTraceParser from 'stacktrace-parser';\n\nimport type { StackFrame } from './metro/log-box/LogBoxSymbolication';\nimport { parseErrorStack } from './metro/log-box/LogBoxSymbolication';\nimport { env } from '../../utils/env';\nimport { memoize } from '../../utils/fn';\nimport { LogBoxLog } from './metro/log-box/LogBoxLog';\nimport { getStackAsFormattedLog } from './metro/metroErrorInterface';\n\nconst debug = require('debug')('expo:metro:logger') as typeof console.log;\n\nconst CONSOLE_METHODS = [\n 'trace',\n 'info',\n 'error',\n 'warn',\n 'log',\n 'group',\n 'groupCollapsed',\n 'groupEnd',\n 'debug',\n] as const;\n\ntype ConsoleMethod = (typeof CONSOLE_METHODS)[number];\n\nconst groupStack: any = [];\nlet collapsedGuardTimer: ReturnType<typeof setTimeout> | undefined;\n\nexport function logLikeMetro(\n originalLogFunction: (...args: any[]) => void,\n level: ConsoleMethod,\n platform: 'BRIDGE' | 'NOBRIDGE' | 'λ' | null,\n ...data: any[]\n) {\n const logFunction = console[level] && level !== 'trace' ? level : 'log';\n const color =\n level === 'error'\n ? chalk.inverse.red\n : level === 'warn'\n ? chalk.inverse.yellow\n : chalk.inverse.white;\n\n if (level === 'group') {\n groupStack.push(level);\n } else if (level === 'groupCollapsed') {\n groupStack.push(level);\n clearTimeout(collapsedGuardTimer);\n // Inform users that logs get swallowed if they forget to call `groupEnd`.\n collapsedGuardTimer = setTimeout(() => {\n if (groupStack.includes('groupCollapsed')) {\n originalLogFunction(\n chalk.inverse.yellow.bold(' WARN '),\n 'Expected `console.groupEnd` to be called after `console.groupCollapsed`.'\n );\n groupStack.length = 0;\n }\n }, 3000);\n return;\n } else if (level === 'groupEnd') {\n groupStack.pop();\n if (!groupStack.length) {\n clearTimeout(collapsedGuardTimer);\n }\n return;\n }\n\n if (!groupStack.includes('groupCollapsed')) {\n // Remove excess whitespace at the end of a log message, if possible.\n const lastItem = data[data.length - 1];\n if (typeof lastItem === 'string') {\n data[data.length - 1] = lastItem.trimEnd();\n }\n\n const modePrefix =\n platform && platform !== 'BRIDGE' && platform !== 'NOBRIDGE' ? chalk.bold`${platform} ` : '';\n originalLogFunction(\n modePrefix +\n color.bold(` ${logFunction.toUpperCase()} `) +\n ''.padEnd(groupStack.length * 2, ' '),\n ...data\n );\n }\n}\n\nconst escapedPathSep = path.sep === '\\\\' ? '\\\\\\\\' : path.sep;\nconst SERVER_STACK_MATCHER = new RegExp(\n `${escapedPathSep}(react-dom|metro-runtime|expo-router)${escapedPathSep}`\n);\n\nexport async function maybeSymbolicateAndFormatJSErrorStackLogAsync(\n projectRoot: string,\n level: 'error' | 'warn' | (string & {}),\n error: {\n message: string;\n stack: StackFrame[];\n }\n): Promise<{\n isFallback: boolean;\n stack: string;\n}> {\n const log = new LogBoxLog({\n level: level as 'error' | 'warn',\n message: {\n content: error.message,\n substitutions: [],\n },\n isComponentError: false,\n stack: error.stack,\n category: 'static',\n componentStack: [],\n });\n\n await new Promise((res) => log.symbolicate('stack', res));\n\n const formatted = getStackAsFormattedLog(projectRoot, {\n stack: log.symbolicated?.stack?.stack ?? [],\n codeFrame: log.codeFrame,\n });\n\n // NOTE: Message is printed above stack by the default Metro logic. So we don't need to include it here.\n const symbolicatedErrorStackLog = `\\n\\n${formatted.stack}`;\n\n return {\n isFallback: formatted.isFallback,\n stack: symbolicatedErrorStackLog,\n };\n}\n\n/**\n * Attempt to parse an error message string to an unsymbolicated stack.\n */\nexport function parseErrorStringToObject(errorString: string) {\n // Find the first line of the possible stack trace\n const stackStartIndex = errorString.indexOf('\\n at ');\n if (stackStartIndex === -1) {\n // No stack trace found, return the original error string\n return null;\n }\n const message = errorString.slice(0, stackStartIndex).trim();\n const stack = errorString.slice(stackStartIndex + 1);\n\n try {\n const parsedStack = parseErrorStack(stack);\n\n return {\n message,\n stack: parsedStack,\n };\n } catch (e) {\n // If parsing fails, return the original error string\n debug('Failed to parse error stack:', e);\n return null;\n }\n}\n\ntype ConsoleLogAugmented = typeof console.log & {\n __polyfilled?: typeof console.log;\n};\n\nfunction augmentLogsInternal(projectRoot: string) {\n const augmentLog = (name: ConsoleMethod, fn: ConsoleLogAugmented) => {\n if (fn.__polyfilled) {\n return fn;\n }\n const originalFn = fn.bind(console);\n function logWithStack(...args: any[]) {\n const stack = new Error().stack;\n // Check if the log originates from the server.\n const isServerLog = !!stack?.match(SERVER_STACK_MATCHER);\n\n if (isServerLog) {\n if (name === 'error' || name === 'warn') {\n if (\n args.length === 2 &&\n typeof args[1] === 'string' &&\n args[1].trim().startsWith('at ')\n ) {\n // react-dom custom stacks which are always broken.\n // A stack string like:\n // at div\n // at http://localhost:8081/node_modules/expo-router/node/render.bundle?platform=web&dev=true&hot=false&transform.engine=hermes&transform.routerRoot=app&resolver.environment=node&transform.environment=node:38008:27\n // at Background (http://localhost:8081/node_modules/expo-router/node/render.bundle?platform=web&dev=true&hot=false&transform.engine=hermes&transform.routerRoot=app&resolver.environment=node&transform.environment=node:151009:7)\n const customStack = args[1];\n\n try {\n const parsedStack = parseErrorStack(customStack);\n const symbolicatedStack = parsedStack.map((line) => {\n // TODO(@kitten): Is there overlap here with metro-source-map?\n const mapped = mapSourcePosition({\n // TODO(@kitten): Check if these non-null casts are correct and cannot fail\n source: line.file!,\n line: line.lineNumber!,\n column: line.column!,\n }) as SourcePosition;\n\n const fallbackName = mapped.name ?? '<unknown>';\n return {\n file: mapped.source ?? null,\n lineNumber: mapped.line ?? null,\n column: mapped.column ?? null,\n // Attempt to preserve the react component name if possible.\n methodName: line.methodName\n ? line.methodName === '<unknown>'\n ? fallbackName\n : line.methodName\n : fallbackName,\n arguments: line.arguments ?? [],\n };\n });\n\n // Replace args[1] with the formatted stack.\n args[1] = '\\n' + formatParsedStackLikeMetro(projectRoot, symbolicatedStack, true);\n } catch {\n // If symbolication fails, log the original stack.\n args.push('\\n' + formatStackLikeMetro(projectRoot, customStack));\n }\n } else {\n args.push('\\n' + formatStackLikeMetro(projectRoot, stack!));\n }\n }\n\n logLikeMetro(originalFn, name, 'λ', ...args);\n } else {\n originalFn(...args);\n }\n }\n logWithStack.__polyfilled = true;\n return logWithStack;\n };\n\n for (const name of CONSOLE_METHODS) {\n console[name] = augmentLog(name, console[name]);\n }\n}\n\nexport function formatStackLikeMetro(projectRoot: string, stack: string) {\n // Remove `Error: ` from the beginning of the stack trace.\n // Dim traces that match `INTERNAL_CALLSITES_REGEX`\n\n const stackTrace = stackTraceParser.parse(stack);\n return formatParsedStackLikeMetro(projectRoot, stackTrace);\n}\n\nfunction formatParsedStackLikeMetro(\n projectRoot: string,\n stackTrace: stackTraceParser.StackFrame[],\n isComponentStack = false\n) {\n // Remove `Error: ` from the beginning of the stack trace.\n // Dim traces that match `INTERNAL_CALLSITES_REGEX`\n\n return stackTrace\n .filter(\n (line) =>\n line.file &&\n // Ignore unsymbolicated stack frames. It's not clear how this is possible but it sometimes happens when the graph changes.\n !/^https?:\\/\\//.test(line.file) &&\n (isComponentStack ? true : line.file !== '<anonymous>')\n )\n .map((line) => {\n // Use the same regex we use in Metro config to filter out traces:\n const isCollapsed = INTERNAL_CALLSITES_REGEX.test(line.file!);\n if (!isComponentStack && isCollapsed && !env.EXPO_DEBUG) {\n return null;\n }\n // If a file is collapsed, print it with dim styling.\n const style = isCollapsed ? chalk.dim : chalk.gray;\n // Use the `at` prefix to match Node.js\n let fileName = line.file!;\n if (fileName.startsWith(path.sep)) {\n fileName = path.relative(projectRoot, fileName);\n }\n if (line.lineNumber != null) {\n fileName += `:${line.lineNumber}`;\n if (line.column != null) {\n fileName += `:${line.column}`;\n }\n }\n\n return style(` ${line.methodName} (${fileName})`);\n })\n .filter(Boolean)\n .join('\\n');\n}\n\n/** Augment console logs to check the stack trace and format like Metro logs if we think the log came from the SSR renderer or an API route. */\nexport const augmentLogs = memoize(augmentLogsInternal);\n"],"names":["augmentLogs","formatStackLikeMetro","logLikeMetro","maybeSymbolicateAndFormatJSErrorStackLogAsync","parseErrorStringToObject","debug","require","CONSOLE_METHODS","groupStack","collapsedGuardTimer","originalLogFunction","level","platform","data","logFunction","console","color","chalk","inverse","red","yellow","white","push","clearTimeout","setTimeout","includes","bold","length","pop","lastItem","trimEnd","modePrefix","toUpperCase","padEnd","escapedPathSep","path","sep","SERVER_STACK_MATCHER","RegExp","projectRoot","error","log","LogBoxLog","message","content","substitutions","isComponentError","stack","category","componentStack","Promise","res","symbolicate","formatted","getStackAsFormattedLog","symbolicated","codeFrame","symbolicatedErrorStackLog","isFallback","errorString","stackStartIndex","indexOf","slice","trim","parsedStack","parseErrorStack","e","augmentLogsInternal","augmentLog","name","fn","__polyfilled","originalFn","bind","logWithStack","args","Error","isServerLog","match","startsWith","customStack","symbolicatedStack","map","line","mapped","mapSourcePosition","source","file","lineNumber","column","fallbackName","methodName","arguments","formatParsedStackLikeMetro","stackTrace","stackTraceParser","parse","isComponentStack","filter","test","isCollapsed","INTERNAL_CALLSITES_REGEX","env","EXPO_DEBUG","style","dim","gray","fileName","relative","Boolean","join","memoize"],"mappings":"AAAA;;;;;CAKC;;;;;;;;;;;QAoSYA;eAAAA;;QAnDGC;eAAAA;;QA/MAC;eAAAA;;QA6DMC;eAAAA;;QA0CNC;eAAAA;;;;yBAvIyB;;;;;;;gEACvB;;;;;;;gEACD;;;;;;;yBACiB;;;;;;;iEACA;;;;;;qCAGF;qBACZ;oBACI;2BACE;qCACa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvC,MAAMC,QAAQC,QAAQ,SAAS;AAE/B,MAAMC,kBAAkB;IACtB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAID,MAAMC,aAAkB,EAAE;AAC1B,IAAIC;AAEG,SAASP,aACdQ,mBAA6C,EAC7CC,KAAoB,EACpBC,QAA4C,EAC5C,GAAGC,IAAW;IAEd,MAAMC,cAAcC,OAAO,CAACJ,MAAM,IAAIA,UAAU,UAAUA,QAAQ;IAClE,MAAMK,QACJL,UAAU,UACNM,gBAAK,CAACC,OAAO,CAACC,GAAG,GACjBR,UAAU,SACRM,gBAAK,CAACC,OAAO,CAACE,MAAM,GACpBH,gBAAK,CAACC,OAAO,CAACG,KAAK;IAE3B,IAAIV,UAAU,SAAS;QACrBH,WAAWc,IAAI,CAACX;IAClB,OAAO,IAAIA,UAAU,kBAAkB;QACrCH,WAAWc,IAAI,CAACX;QAChBY,aAAad;QACb,0EAA0E;QAC1EA,sBAAsBe,WAAW;YAC/B,IAAIhB,WAAWiB,QAAQ,CAAC,mBAAmB;gBACzCf,oBACEO,gBAAK,CAACC,OAAO,CAACE,MAAM,CAACM,IAAI,CAAC,WAC1B;gBAEFlB,WAAWmB,MAAM,GAAG;YACtB;QACF,GAAG;QACH;IACF,OAAO,IAAIhB,UAAU,YAAY;QAC/BH,WAAWoB,G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BAAiBC,KAAK,CAACjD;IAC1C,OAAO8C,2BAA2BtD,aAAauD;AACjD;AAEA,SAASD,2BACPtD,WAAmB,EACnBuD,UAAyC,EACzCG,mBAAmB,KAAK;IAExB,0DAA0D;IAC1D,mDAAmD;IAEnD,OAAOH,WACJI,MAAM,CACL,CAACf,OACCA,KAAKI,IAAI,IACT,2HAA2H;QAC3H,CAAC,eAAeY,IAAI,CAAChB,KAAKI,IAAI,KAC7BU,CAAAA,mBAAmB,OAAOd,KAAKI,IAAI,KAAK,aAAY,GAExDL,GAAG,CAAC,CAACC;QACJ,kEAAkE;QAClE,MAAMiB,cAAcC,uCAAwB,CAACF,IAAI,CAAChB,KAAKI,IAAI;QAC3D,IAAI,CAACU,oBAAoBG,eAAe,CAACE,QAAG,CAACC,UAAU,EAAE;YACvD,OAAO;QACT;QACA,qDAAqD;QACrD,MAAMC,QAAQJ,cAAcnF,gBAAK,CAACwF,GAAG,GAAGxF,gBAAK,CAACyF,IAAI;QAClD,uCAAuC;QACvC,IAAIC,WAAWxB,KAAKI,IAAI;QACxB,IAAIoB,SAAS5B,UAAU,CAAC5C,eAAI,CAACC,GAAG,GAAG;YACjCuE,WAAWxE,eAAI,CAACyE,QAAQ,CAACrE,aAAaoE;QACxC;QACA,IAAIxB,KAAKK,UAAU,IAAI,MAAM;YAC3BmB,YAAY,CAAC,CAAC,EAAExB,KAAKK,UAAU,EAAE;YACjC,IAAIL,KAAKM,MAAM,IAAI,MAAM;gBACvBkB,YAAY,CAAC,CAAC,EAAExB,KAAKM,MAAM,EAAE;YAC/B;QACF;QAEA,OAAOe,MAAM,CAAC,EAAE,EAAErB,KAAKQ,UAAU,CAAC,EAAE,EAAEgB,SAAS,CAAC,CAAC;IACnD,GACCT,MAAM,CAACW,SACPC,IAAI,CAAC;AACV;AAGO,MAAM9G,cAAc+G,IAAAA,WAAO,EAAC5C"}
1
+ {"version":3,"sources":["../../../../src/start/server/serverLogLikeMetro.ts"],"sourcesContent":["/**\n * Copyright © 2024 650 Industries.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { INTERNAL_CALLSITES_REGEX } from '@expo/metro-config';\nimport chalk from 'chalk';\nimport path from 'path';\nimport * as stackTraceParser from 'stacktrace-parser';\n\nimport type { StackFrame } from './metro/log-box/LogBoxSymbolication';\nimport { parseErrorStack } from './metro/log-box/LogBoxSymbolication';\nimport { env } from '../../utils/env';\nimport { memoize } from '../../utils/fn';\nimport { LogBoxLog } from './metro/log-box/LogBoxLog';\nimport { getStackAsFormattedLog } from './metro/metroErrorInterface';\n\nconst debug = require('debug')('expo:metro:logger') as typeof console.log;\n\nconst CONSOLE_METHODS = [\n 'trace',\n 'info',\n 'error',\n 'warn',\n 'log',\n 'group',\n 'groupCollapsed',\n 'groupEnd',\n 'debug',\n] as const;\n\ntype ConsoleMethod = (typeof CONSOLE_METHODS)[number];\n\nconst groupStack: any = [];\nlet collapsedGuardTimer: ReturnType<typeof setTimeout> | undefined;\n\nexport function logLikeMetro(\n originalLogFunction: (...args: any[]) => void,\n level: ConsoleMethod,\n platform: string | null,\n ...data: any[]\n) {\n const logFunction = console[level] && level !== 'trace' ? level : 'log';\n const color =\n level === 'error'\n ? chalk.inverse.red\n : level === 'warn'\n ? chalk.inverse.yellow\n : chalk.inverse.white;\n\n if (level === 'group') {\n groupStack.push(level);\n } else if (level === 'groupCollapsed') {\n groupStack.push(level);\n clearTimeout(collapsedGuardTimer);\n // Inform users that logs get swallowed if they forget to call `groupEnd`.\n collapsedGuardTimer = setTimeout(() => {\n if (groupStack.includes('groupCollapsed')) {\n originalLogFunction(\n chalk.inverse.yellow.bold(' WARN '),\n 'Expected `console.groupEnd` to be called after `console.groupCollapsed`.'\n );\n groupStack.length = 0;\n }\n }, 3000);\n return;\n } else if (level === 'groupEnd') {\n groupStack.pop();\n if (!groupStack.length) {\n clearTimeout(collapsedGuardTimer);\n }\n return;\n }\n\n if (!groupStack.includes('groupCollapsed')) {\n // Remove excess whitespace at the end of a log message, if possible.\n const lastItem = data[data.length - 1];\n if (typeof lastItem === 'string') {\n data[data.length - 1] = lastItem.trimEnd();\n }\n\n const modePrefix =\n platform && platform !== 'BRIDGE' && platform !== 'NOBRIDGE' ? chalk.bold`${platform} ` : '';\n originalLogFunction(\n modePrefix +\n color.bold(` ${logFunction.toUpperCase()} `) +\n ''.padEnd(groupStack.length * 2, ' '),\n ...data\n );\n }\n}\n\nconst escapedPathSep = path.sep === '\\\\' ? '\\\\\\\\' : path.sep;\nconst SERVER_STACK_MATCHER = new RegExp(\n `${escapedPathSep}(react-dom|metro-runtime|expo-router)${escapedPathSep}`\n);\n\nexport async function maybeSymbolicateAndFormatJSErrorStackLogAsync(\n projectRoot: string,\n level: 'error' | 'warn' | (string & {}),\n error: {\n message: string;\n stack: StackFrame[];\n }\n): Promise<{\n isFallback: boolean;\n stack: string;\n}> {\n const log = new LogBoxLog({\n level: level as 'error' | 'warn',\n message: {\n content: error.message,\n substitutions: [],\n },\n isComponentError: false,\n stack: error.stack,\n category: 'static',\n componentStack: [],\n });\n\n await new Promise((res) => log.symbolicate('stack', res));\n\n const formatted = getStackAsFormattedLog(projectRoot, {\n stack: log.symbolicated?.stack?.stack ?? [],\n codeFrame: log.codeFrame,\n });\n\n // NOTE: Message is printed above stack by the default Metro logic. So we don't need to include it here.\n const symbolicatedErrorStackLog = `\\n\\n${formatted.stack}`;\n\n return {\n isFallback: formatted.isFallback,\n stack: symbolicatedErrorStackLog,\n };\n}\n\n/**\n * Attempt to parse an error message string to an unsymbolicated stack.\n */\nexport function parseErrorStringToObject(errorString: string) {\n // Find the first line of the possible stack trace\n const stackStartIndex = errorString.indexOf('\\n at ');\n if (stackStartIndex === -1) {\n // No stack trace found, return the original error string\n return null;\n }\n const message = errorString.slice(0, stackStartIndex).trim();\n const stack = errorString.slice(stackStartIndex + 1);\n\n try {\n const parsedStack = parseErrorStack(stack);\n\n return {\n message,\n stack: parsedStack,\n };\n } catch (e) {\n // If parsing fails, return the original error string\n debug('Failed to parse error stack:', e);\n return null;\n }\n}\n\ntype ConsoleLogAugmented = typeof console.log & {\n __polyfilled?: typeof console.log;\n};\n\nfunction augmentLogsInternal(projectRoot: string) {\n const augmentLog = (name: ConsoleMethod, fn: ConsoleLogAugmented) => {\n if (fn.__polyfilled) {\n return fn;\n }\n const originalFn = fn.bind(console);\n function logWithStack(...args: any[]) {\n const stack = new Error().stack;\n // Check if the log originates from the server.\n const isServerLog = !!stack?.match(SERVER_STACK_MATCHER);\n\n if (isServerLog) {\n if (name === 'error' || name === 'warn') {\n if (\n args.length === 2 &&\n typeof args[1] === 'string' &&\n args[1].trim().startsWith('at ')\n ) {\n // react-dom custom stacks which are always broken.\n // A stack string like:\n // at div\n // at http://localhost:8081/node_modules/expo-router/node/render.bundle?platform=web&dev=true&hot=false&transform.engine=hermes&transform.routerRoot=app&resolver.environment=node&transform.environment=node:38008:27\n // at Background (http://localhost:8081/node_modules/expo-router/node/render.bundle?platform=web&dev=true&hot=false&transform.engine=hermes&transform.routerRoot=app&resolver.environment=node&transform.environment=node:151009:7)\n const customStack = args[1];\n\n try {\n // `error.stack` is already symbolicated by Node's source map support\n // (registered by `@expo/require-utils` when the SSR bundle is compiled), so the\n // parsed frames already point at original sources. We just reformat them.\n const parsedStack = parseErrorStack(customStack);\n args[1] = '\\n' + formatParsedStackLikeMetro(projectRoot, parsedStack, true);\n } catch {\n // If parsing fails, log the original stack.\n args.push('\\n' + formatStackLikeMetro(projectRoot, customStack));\n }\n } else {\n args.push('\\n' + formatStackLikeMetro(projectRoot, stack!));\n }\n }\n\n logLikeMetro(originalFn, name, 'λ', ...args);\n } else {\n originalFn(...args);\n }\n }\n logWithStack.__polyfilled = true;\n return logWithStack;\n };\n\n for (const name of CONSOLE_METHODS) {\n console[name] = augmentLog(name, console[name]);\n }\n}\n\nexport function formatStackLikeMetro(projectRoot: string, stack: string) {\n // Remove `Error: ` from the beginning of the stack trace.\n // Dim traces that match `INTERNAL_CALLSITES_REGEX`\n\n const stackTrace = stackTraceParser.parse(stack);\n return formatParsedStackLikeMetro(projectRoot, stackTrace);\n}\n\nfunction formatParsedStackLikeMetro(\n projectRoot: string,\n stackTrace: stackTraceParser.StackFrame[],\n isComponentStack = false\n) {\n // Remove `Error: ` from the beginning of the stack trace.\n // Dim traces that match `INTERNAL_CALLSITES_REGEX`\n\n return stackTrace\n .filter(\n (line) =>\n line.file &&\n // Ignore unsymbolicated stack frames. It's not clear how this is possible but it sometimes happens when the graph changes.\n !/^https?:\\/\\//.test(line.file) &&\n (isComponentStack ? true : line.file !== '<anonymous>')\n )\n .map((line) => {\n // Use the same regex we use in Metro config to filter out traces:\n const isCollapsed = INTERNAL_CALLSITES_REGEX.test(line.file!);\n if (!isComponentStack && isCollapsed && !env.EXPO_DEBUG) {\n return null;\n }\n // If a file is collapsed, print it with dim styling.\n const style = isCollapsed ? chalk.dim : chalk.gray;\n // Use the `at` prefix to match Node.js\n let fileName = line.file!;\n if (fileName.startsWith(path.sep)) {\n fileName = path.relative(projectRoot, fileName);\n }\n if (line.lineNumber != null) {\n fileName += `:${line.lineNumber}`;\n if (line.column != null) {\n fileName += `:${line.column}`;\n }\n }\n\n return style(` ${line.methodName} (${fileName})`);\n })\n .filter(Boolean)\n .join('\\n');\n}\n\n/** Augment console logs to check the stack trace and format like Metro logs if we think the log came from the SSR renderer or an API route. */\nexport const augmentLogs = memoize(augmentLogsInternal);\n"],"names":["augmentLogs","formatStackLikeMetro","logLikeMetro","maybeSymbolicateAndFormatJSErrorStackLogAsync","parseErrorStringToObject","debug","require","CONSOLE_METHODS","groupStack","collapsedGuardTimer","originalLogFunction","level","platform","data","logFunction","console","color","chalk","inverse","red","yellow","white","push","clearTimeout","setTimeout","includes","bold","length","pop","lastItem","trimEnd","modePrefix","toUpperCase","padEnd","escapedPathSep","path","sep","SERVER_STACK_MATCHER","RegExp","projectRoot","error","log","LogBoxLog","message","content","substitutions","isComponentError","stack","category","componentStack","Promise","res","symbolicate","formatted","getStackAsFormattedLog","symbolicated","codeFrame","symbolicatedErrorStackLog","isFallback","errorString","stackStartIndex","indexOf","slice","trim","parsedStack","parseErrorStack","e","augmentLogsInternal","augmentLog","name","fn","__polyfilled","originalFn","bind","logWithStack","args","Error","isServerLog","match","startsWith","customStack","formatParsedStackLikeMetro","stackTrace","stackTraceParser","parse","isComponentStack","filter","line","file","test","map","isCollapsed","INTERNAL_CALLSITES_REGEX","env","EXPO_DEBUG","style","dim","gray","fileName","relative","lineNumber","column","methodName","Boolean","join","memoize"],"mappings":"AAAA;;;;;CAKC;;;;;;;;;;;QA4QYA;eAAAA;;QAnDGC;eAAAA;;QAzLAC;eAAAA;;QA6DMC;eAAAA;;QA0CNC;eAAAA;;;;yBAtIyB;;;;;;;gEACvB;;;;;;;gEACD;;;;;;;iEACiB;;;;;;qCAGF;qBACZ;oBACI;2BACE;qCACa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvC,MAAMC,QAAQC,QAAQ,SAAS;AAE/B,MAAMC,kBAAkB;IACtB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAID,MAAMC,aAAkB,EAAE;AAC1B,IAAIC;AAEG,SAASP,aACdQ,mBAA6C,EAC7CC,KAAoB,EACpBC,QAAuB,EACvB,GAAGC,IAAW;IAEd,MAAMC,cAAcC,OAAO,CAACJ,MAAM,IAAIA,UAAU,UAAUA,QAAQ;IAClE,MAAMK,QACJL,UAAU,UACNM,gBAAK,CAACC,OAAO,CAACC,GAAG,GACjBR,UAAU,SACRM,gBAAK,CAACC,OAAO,CAACE,MAAM,GACpBH,gBAAK,CAACC,OAAO,CAACG,KAAK;IAE3B,IAAIV,UAAU,SAAS;QACrBH,WAAWc,IAAI,CAACX;IAClB,OAAO,IAAIA,UAAU,kBAAkB;QACrCH,WAAWc,IAAI,CAACX;QAChBY,aAAad;QACb,0EAA0E;QAC1EA,sBAAsBe,WAAW;YAC/B,IAAIhB,WAAWiB,QAAQ,CAAC,mBAAmB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,CAACH;QACJ,kEAAkE;QAClE,MAAMI,cAAcC,uCAAwB,CAACH,IAAI,CAACF,KAAKC,IAAI;QAC3D,IAAI,CAACH,oBAAoBM,eAAe,CAACE,QAAG,CAACC,UAAU,EAAE;YACvD,OAAO;QACT;QACA,qDAAqD;QACrD,MAAMC,QAAQJ,cAAc1E,gBAAK,CAAC+E,GAAG,GAAG/E,gBAAK,CAACgF,IAAI;QAClD,uCAAuC;QACvC,IAAIC,WAAWX,KAAKC,IAAI;QACxB,IAAIU,SAASnB,UAAU,CAAC5C,eAAI,CAACC,GAAG,GAAG;YACjC8D,WAAW/D,eAAI,CAACgE,QAAQ,CAAC5D,aAAa2D;QACxC;QACA,IAAIX,KAAKa,UAAU,IAAI,MAAM;YAC3BF,YAAY,CAAC,CAAC,EAAEX,KAAKa,UAAU,EAAE;YACjC,IAAIb,KAAKc,MAAM,IAAI,MAAM;gBACvBH,YAAY,CAAC,CAAC,EAAEX,KAAKc,MAAM,EAAE;YAC/B;QACF;QAEA,OAAON,MAAM,CAAC,EAAE,EAAER,KAAKe,UAAU,CAAC,EAAE,EAAEJ,SAAS,CAAC,CAAC;IACnD,GACCZ,MAAM,CAACiB,SACPC,IAAI,CAAC;AACV;AAGO,MAAMxG,cAAcyG,IAAAA,WAAO,EAACtC"}
@@ -137,9 +137,9 @@ async function startAsync(projectRoot, options, settings) {
137
137
  const { exp, pkg } = (0, _profile.profile)(_config().getConfig)(projectRoot);
138
138
  // Start dependency version check in the background as early as possible (non-blocking).
139
139
  // The result will be displayed in the TUI once it resolves.
140
- let dependencyCheckPromise;
140
+ let dependencyCheckRef;
141
141
  if (!_env.env.EXPO_OFFLINE && !_env.env.EXPO_NO_DEPENDENCY_VALIDATION && !settings.webOnly) {
142
- dependencyCheckPromise = (0, _checkDependenciesOnStart.checkDependenciesAsync)(projectRoot, exp, pkg).catch(()=>null);
142
+ dependencyCheckRef = (0, _checkDependenciesOnStart.checkDependencies)(projectRoot, exp, pkg);
143
143
  }
144
144
  if (((_exp_platforms = exp.platforms) == null ? void 0 : _exp_platforms.includes('ios')) && process.platform !== 'win32') {
145
145
  // If Xcode could potentially be used, then we should eagerly perform the
@@ -181,7 +181,7 @@ async function startAsync(projectRoot, options, settings) {
181
181
  'web'
182
182
  ],
183
183
  mcpServer,
184
- dependencyCheckPromise
184
+ dependencyCheckRef
185
185
  });
186
186
  } else {
187
187
  // Display the server location in CI...
@@ -194,10 +194,9 @@ async function startAsync(projectRoot, options, settings) {
194
194
  }
195
195
  _log.log((0, _chalk().default)`Waiting on {underline ${defaultServerUrl}}`);
196
196
  }
197
- // In non-interactive mode, await the check and print if available.
198
- const result = await dependencyCheckPromise;
199
- if (result) {
200
- (0, _checkDependenciesOnStart.printDependencyCheckResult)(result);
197
+ // In non-interactive mode, print the check outside of an interface, if it's available
198
+ if (dependencyCheckRef == null ? void 0 : dependencyCheckRef.result) {
199
+ (0, _checkDependenciesOnStart.printDependencyCheckResult)(dependencyCheckRef.result);
201
200
  }
202
201
  }
203
202
  if (mcpServer) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/start/startAsync.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\nimport chalk from 'chalk';\n\nimport { getLogFile, shouldReduceLogs } from '../events';\nimport type { DependencyCheckResult } from './checkDependenciesOnStart';\nimport { checkDependenciesAsync, printDependencyCheckResult } from './checkDependenciesOnStart';\nimport { SimulatorAppPrerequisite } from './doctor/apple/SimulatorAppPrerequisite';\nimport { getXcodeVersionAsync } from './doctor/apple/XcodePrerequisite';\nimport { WebSupportProjectPrerequisite } from './doctor/web/WebSupportProjectPrerequisite';\nimport { startInterfaceAsync } from './interface/startInterface';\nimport type { Options } from './resolveOptions';\nimport { resolvePortsAsync } from './resolveOptions';\nimport * as Log from '../log';\nimport type { BundlerStartOptions } from './server/BundlerDevServer';\nimport type { MultiBundlerStartOptions } from './server/DevServerManager';\nimport { DevServerManager } from './server/DevServerManager';\nimport { maybeCreateMCPServerAsync } from './server/MCP';\nimport { openPlatformsAsync } from './server/openPlatforms';\nimport type { PlatformBundlers } from './server/platformBundlers';\nimport { getPlatformBundlers } from './server/platformBundlers';\nimport { env } from '../utils/env';\nimport { isInteractive } from '../utils/interactive';\nimport { profile } from '../utils/profile';\nimport { addMcpCapabilities } from './server/MCPDevToolsPluginCLIExtensions';\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 if (!shouldReduceLogs()) {\n Log.log(chalk.gray(`Starting project at ${projectRoot}`));\n const logFile = getLogFile();\n if (!isInteractive() && logFile) {\n Log.log(chalk.gray(`Logs: ${logFile}`));\n }\n }\n\n const { exp, pkg } = profile(getConfig)(projectRoot);\n\n // Start dependency version check in the background as early as possible (non-blocking).\n // The result will be displayed in the TUI once it resolves.\n let dependencyCheckPromise: Promise<DependencyCheckResult | null> | undefined;\n if (!env.EXPO_OFFLINE && !env.EXPO_NO_DEPENDENCY_VALIDATION && !settings.webOnly) {\n dependencyCheckPromise = checkDependenciesAsync(projectRoot, exp, pkg).catch(() => null);\n }\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 // 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 dependencyCheckPromise,\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 // In non-interactive mode, await the check and print if available.\n const result = await dependencyCheckPromise;\n if (result) {\n printDependencyCheckResult(result);\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","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","shouldReduceLogs","Log","log","chalk","gray","logFile","getLogFile","isInteractive","pkg","profile","getConfig","dependencyCheckPromise","env","EXPO_OFFLINE","EXPO_NO_DEPENDENCY_VALIDATION","webOnly","checkDependenciesAsync","catch","platforms","includes","process","platform","getXcodeVersionAsync","silent","SimulatorAppPrerequisite","instance","assertAsync","getPlatformBundlers","defaultOptions","startOptions","DevServerManager","ensureProjectPrerequisiteAsync","WebSupportProjectPrerequisite","bind","watchEnvironmentVariables","bootstrapTypeScriptAsync","openPlatformsAsync","defaultServerUrl","getDefaultDevServer","getDevServerUrl","mcpServer","maybeCreateMCPServerAsync","devServerUrl","startInterfaceAsync","__EXPO_E2E_TEST","console","info","JSON","stringify","url","result","printDependencyCheckResult","addMcpCapabilities","start","logLocation","dim"],"mappings":";;;;+BAqEsBA;;;eAAAA;;;;yBArEI;;;;;;;gEACR;;;;;;wBAE2B;0CAEsB;0CAC1B;mCACJ;+CACS;gCACV;gCAEF;6DACb;kCAGY;qBACS;+BACP;kCAEC;qBAChB;6BACU;yBACN;gDACW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEnC,eAAeC,4BACbC,WAAmB,EAC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'@expo/config';\nimport chalk from 'chalk';\n\nimport { getLogFile, shouldReduceLogs } from '../events';\nimport {\n checkDependencies,\n printDependencyCheckResult,\n type DependencyCheckRef,\n} from './checkDependenciesOnStart';\nimport { SimulatorAppPrerequisite } from './doctor/apple/SimulatorAppPrerequisite';\nimport { getXcodeVersionAsync } from './doctor/apple/XcodePrerequisite';\nimport { WebSupportProjectPrerequisite } from './doctor/web/WebSupportProjectPrerequisite';\nimport { startInterfaceAsync } from './interface/startInterface';\nimport type { Options } from './resolveOptions';\nimport { resolvePortsAsync } from './resolveOptions';\nimport * as Log from '../log';\nimport type { BundlerStartOptions } from './server/BundlerDevServer';\nimport type { MultiBundlerStartOptions } from './server/DevServerManager';\nimport { DevServerManager } from './server/DevServerManager';\nimport { maybeCreateMCPServerAsync } from './server/MCP';\nimport { openPlatformsAsync } from './server/openPlatforms';\nimport type { PlatformBundlers } from './server/platformBundlers';\nimport { getPlatformBundlers } from './server/platformBundlers';\nimport { env } from '../utils/env';\nimport { isInteractive } from '../utils/interactive';\nimport { profile } from '../utils/profile';\nimport { addMcpCapabilities } from './server/MCPDevToolsPluginCLIExtensions';\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 if (!shouldReduceLogs()) {\n Log.log(chalk.gray(`Starting project at ${projectRoot}`));\n const logFile = getLogFile();\n if (!isInteractive() && logFile) {\n Log.log(chalk.gray(`Logs: ${logFile}`));\n }\n }\n\n const { exp, pkg } = profile(getConfig)(projectRoot);\n\n // Start dependency version check in the background as early as possible (non-blocking).\n // The result will be displayed in the TUI once it resolves.\n let dependencyCheckRef: DependencyCheckRef | undefined;\n if (!env.EXPO_OFFLINE && !env.EXPO_NO_DEPENDENCY_VALIDATION && !settings.webOnly) {\n dependencyCheckRef = checkDependencies(projectRoot, exp, pkg);\n }\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 // 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 dependencyCheckRef,\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 // In non-interactive mode, print the check outside of an interface, if it's available\n if (dependencyCheckRef?.result) {\n printDependencyCheckResult(dependencyCheckRef.result);\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","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","shouldReduceLogs","Log","log","chalk","gray","logFile","getLogFile","isInteractive","pkg","profile","getConfig","dependencyCheckRef","env","EXPO_OFFLINE","EXPO_NO_DEPENDENCY_VALIDATION","webOnly","checkDependencies","platforms","includes","process","platform","getXcodeVersionAsync","silent","SimulatorAppPrerequisite","instance","assertAsync","catch","getPlatformBundlers","defaultOptions","startOptions","DevServerManager","ensureProjectPrerequisiteAsync","WebSupportProjectPrerequisite","bind","watchEnvironmentVariables","bootstrapTypeScriptAsync","openPlatformsAsync","defaultServerUrl","getDefaultDevServer","getDevServerUrl","mcpServer","maybeCreateMCPServerAsync","devServerUrl","startInterfaceAsync","__EXPO_E2E_TEST","console","info","JSON","stringify","url","result","printDependencyCheckResult","addMcpCapabilities","start","logLocation","dim"],"mappings":";;;;+BAwEsBA;;;eAAAA;;;;yBAxEI;;;;;;;gEACR;;;;;;wBAE2B;0CAKtC;0CACkC;mCACJ;+CACS;gCACV;gCAEF;6DACb;kCAGY;qBACS;+BACP;kCAEC;qBAChB;6BACU;yBACN;gDACW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEnC,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,IAAIC,OAAOC,MAAM,CAACL;KAAmB;IAC9D,MAAMM,2BAA2BJ,SAASK,GAAG,CAAC,CAACC;QAC7C,MAAMC,OACJD,YAAY,Y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AA,mBAAoBuC,MAAM,EAAE;YAC9BC,IAAAA,oDAA0B,EAACxC,mBAAmBuC,MAAM;QACtD;IACF;IAEA,IAAIV,WAAW;QACbY,IAAAA,kDAAkB,EAACZ,WAAWzC;QAC9ByC,UAAUa,KAAK;IACjB;IAEA,uCAAuC;IACvC,MAAMC,cAAcxF,SAASiD,OAAO,GAAG,2BAA2B;IAClEd,KAAIC,GAAG,CACLC,IAAAA,gBAAK,CAAA,CAAC,kCAAkC,EAAEmD,YAAY,CAAC,EACrD/C,IAAAA,0BAAa,MAAKJ,gBAAK,CAACoD,GAAG,CAAC,CAAC,sBAAsB,CAAC,IAAI,GACzD,CAAC;AAEN"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "composeMetroIgnorePatterns", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return composeMetroIgnorePatterns;
9
+ }
10
+ });
11
+ const NEVER_MATCHES = /(?!)/;
12
+ function isEscapedAt(source, dotIdx) {
13
+ let backslashes = 0;
14
+ for(let i = dotIdx - 1; i >= 0 && source.charCodeAt(i) === 92; i--){
15
+ backslashes++;
16
+ }
17
+ return backslashes % 2 === 1;
18
+ }
19
+ function stripUnanchoredDecoration(source) {
20
+ let s = source;
21
+ if (s.startsWith('^.*?')) s = s.slice(4);
22
+ else if (s.startsWith('^.*')) s = s.slice(3);
23
+ else if (s.startsWith('^[\\s\\S]*?')) s = s.slice(9);
24
+ else if (s.startsWith('^[\\s\\S]*')) s = s.slice(8);
25
+ else if (s.startsWith('.*?')) s = s.slice(3);
26
+ else if (s.startsWith('.*')) s = s.slice(2);
27
+ else if (s.startsWith('[\\s\\S]*?')) s = s.slice(8);
28
+ else if (s.startsWith('[\\s\\S]*')) s = s.slice(7);
29
+ if (s.endsWith('.*?$') && !isEscapedAt(s, s.length - 4)) s = s.slice(0, -4);
30
+ else if (s.endsWith('.*$') && !isEscapedAt(s, s.length - 3)) s = s.slice(0, -3);
31
+ else if (s.endsWith('[\\s\\S]*?$')) s = s.slice(0, -9);
32
+ else if (s.endsWith('[\\s\\S]*$')) s = s.slice(0, -8);
33
+ else if (s.endsWith('.*?') && !isEscapedAt(s, s.length - 3)) s = s.slice(0, -3);
34
+ else if (s.endsWith('.*') && !isEscapedAt(s, s.length - 2)) s = s.slice(0, -2);
35
+ else if (s.endsWith('[\\s\\S]*?')) s = s.slice(0, -8);
36
+ else if (s.endsWith('[\\s\\S]*')) s = s.slice(0, -7);
37
+ if (s === '' || s === '^' || s === '$' || s === '^$') return source;
38
+ return s;
39
+ }
40
+ function rankForOrdering(source) {
41
+ if (source.startsWith('^')) return 0;
42
+ if (source.startsWith('.*') || source.startsWith('.*?') || source.startsWith('[\\s\\S]*')) {
43
+ return 2;
44
+ }
45
+ return 1;
46
+ }
47
+ function composeMetroIgnorePatterns(input) {
48
+ if (!input) return NEVER_MATCHES;
49
+ if (!Array.isArray(input)) {
50
+ const regex = input;
51
+ return new RegExp(stripUnanchoredDecoration(regex.source), regex.flags);
52
+ }
53
+ const patterns = input;
54
+ if (patterns.length === 0) return NEVER_MATCHES;
55
+ if (patterns.length === 1) {
56
+ const regex = patterns[0];
57
+ return new RegExp(stripUnanchoredDecoration(regex.source), regex.flags);
58
+ }
59
+ const flags = patterns[0].flags;
60
+ for(let i = 1; i < patterns.length; i++){
61
+ if (patterns[i].flags !== flags) {
62
+ throw new Error('Cannot combine blockList patterns, because they have different flags:\n' + ` - Pattern 0: ${patterns[0].toString()}\n` + ` - Pattern ${i}: ${patterns[i].toString()}`);
63
+ }
64
+ }
65
+ const sources = patterns.map((regex)=>stripUnanchoredDecoration(regex.source)).sort((a, b)=>rankForOrdering(a) - rankForOrdering(b)).map((s)=>'(?:' + s + ')');
66
+ return new RegExp(sources.join('|'), flags);
67
+ }
68
+
69
+ //# sourceMappingURL=composeMetroIgnorePatterns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/utils/composeMetroIgnorePatterns.ts"],"sourcesContent":["const NEVER_MATCHES = /(?!)/;\n\nfunction isEscapedAt(source: string, dotIdx: number): boolean {\n let backslashes = 0;\n for (let i = dotIdx - 1; i >= 0 && source.charCodeAt(i) === 92; i--) {\n backslashes++;\n }\n return backslashes % 2 === 1;\n}\n\nfunction stripUnanchoredDecoration(source: string): string {\n let s = source;\n\n if (s.startsWith('^.*?')) s = s.slice(4);\n else if (s.startsWith('^.*')) s = s.slice(3);\n else if (s.startsWith('^[\\\\s\\\\S]*?')) s = s.slice(9);\n else if (s.startsWith('^[\\\\s\\\\S]*')) s = s.slice(8);\n else if (s.startsWith('.*?')) s = s.slice(3);\n else if (s.startsWith('.*')) s = s.slice(2);\n else if (s.startsWith('[\\\\s\\\\S]*?')) s = s.slice(8);\n else if (s.startsWith('[\\\\s\\\\S]*')) s = s.slice(7);\n\n if (s.endsWith('.*?$') && !isEscapedAt(s, s.length - 4)) s = s.slice(0, -4);\n else if (s.endsWith('.*$') && !isEscapedAt(s, s.length - 3)) s = s.slice(0, -3);\n else if (s.endsWith('[\\\\s\\\\S]*?$')) s = s.slice(0, -9);\n else if (s.endsWith('[\\\\s\\\\S]*$')) s = s.slice(0, -8);\n else if (s.endsWith('.*?') && !isEscapedAt(s, s.length - 3)) s = s.slice(0, -3);\n else if (s.endsWith('.*') && !isEscapedAt(s, s.length - 2)) s = s.slice(0, -2);\n else if (s.endsWith('[\\\\s\\\\S]*?')) s = s.slice(0, -8);\n else if (s.endsWith('[\\\\s\\\\S]*')) s = s.slice(0, -7);\n\n if (s === '' || s === '^' || s === '$' || s === '^$') return source;\n return s;\n}\n\nfunction rankForOrdering(source: string): number {\n if (source.startsWith('^')) return 0;\n if (source.startsWith('.*') || source.startsWith('.*?') || source.startsWith('[\\\\s\\\\S]*')) {\n return 2;\n }\n return 1;\n}\n\n/**\n * Composes Metro `blockList` regexes into a single ignore pattern, normalizing\n * leading/trailing `.*` decoration so V8 can extract a literal prefilter from\n * each alternative.\n */\nexport function composeMetroIgnorePatterns(\n input: RegExp | readonly RegExp[] | null | undefined\n): RegExp {\n if (!input) return NEVER_MATCHES;\n if (!Array.isArray(input)) {\n const regex = input as RegExp;\n return new RegExp(stripUnanchoredDecoration(regex.source), regex.flags);\n }\n\n const patterns = input as readonly RegExp[];\n if (patterns.length === 0) return NEVER_MATCHES;\n if (patterns.length === 1) {\n const regex = patterns[0]!;\n return new RegExp(stripUnanchoredDecoration(regex.source), regex.flags);\n }\n\n const flags = patterns[0]!.flags;\n for (let i = 1; i < patterns.length; i++) {\n if (patterns[i]!.flags !== flags) {\n throw new Error(\n 'Cannot combine blockList patterns, because they have different flags:\\n' +\n ` - Pattern 0: ${patterns[0]!.toString()}\\n` +\n ` - Pattern ${i}: ${patterns[i]!.toString()}`\n );\n }\n }\n\n const sources = patterns\n .map((regex) => stripUnanchoredDecoration(regex.source))\n .sort((a, b) => rankForOrdering(a) - rankForOrdering(b))\n .map((s) => '(?:' + s + ')');\n return new RegExp(sources.join('|'), flags);\n}\n"],"names":["composeMetroIgnorePatterns","NEVER_MATCHES","isEscapedAt","source","dotIdx","backslashes","i","charCodeAt","stripUnanchoredDecoration","s","startsWith","slice","endsWith","length","rankForOrdering","input","Array","isArray","regex","RegExp","flags","patterns","Error","toString","sources","map","sort","a","b","join"],"mappings":";;;;+BAgDgBA;;;eAAAA;;;AAhDhB,MAAMC,gBAAgB;AAEtB,SAASC,YAAYC,MAAc,EAAEC,MAAc;IACjD,IAAIC,cAAc;IAClB,IAAK,IAAIC,IAAIF,SAAS,GAAGE,KAAK,KAAKH,OAAOI,UAAU,CAACD,OAAO,IAAIA,IAAK;QACnED;IACF;IACA,OAAOA,cAAc,MAAM;AAC7B;AAEA,SAASG,0BAA0BL,MAAc;IAC/C,IAAIM,IAAIN;IAER,IAAIM,EAAEC,UAAU,CAAC,SAASD,IAAIA,EAAEE,KAAK,CAAC;SACjC,IAAIF,EAAEC,UAAU,CAAC,QAAQD,IAAIA,EAAEE,KAAK,CAAC;SAC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,CAAChB,IAAM,QAAQA,IAAI;IAC1B,OAAO,IAAIU,OAAOK,QAAQK,IAAI,CAAC,MAAMT;AACvC"}
@@ -178,6 +178,13 @@ async function resolvePortAsync(projectRoot, { /** Should opt to reuse a port th
178
178
  } else {
179
179
  port = _env.env.RCT_METRO_PORT || fallbackPort || 8081;
180
180
  }
181
+ // Port 0 means "pick any available port" — scan from the fallback port without prompting.
182
+ if (port === 0) {
183
+ const scanFrom = _env.env.RCT_METRO_PORT || fallbackPort || 8081;
184
+ const resolvedPort = await getFreePortAsync(scanFrom);
185
+ process.env.RCT_METRO_PORT = String(resolvedPort);
186
+ return resolvedPort;
187
+ }
181
188
  // Only check the port when the bundler is running.
182
189
  const resolvedPort = await choosePortAsync(projectRoot, {
183
190
  defaultPort: port,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/port.ts"],"sourcesContent":["import chalk from 'chalk';\n\nimport { env } from './env';\nimport { CommandError } from './errors';\nimport { testPortAsync, freePortAsync } from './freeport';\nimport * as Log from '../log';\n\n/** Get a free port or assert a CLI command error. */\nexport async function getFreePortAsync(rangeStart: number): Promise<number> {\n const port = await freePortAsync(rangeStart, [null, 'localhost']);\n if (!port) {\n throw new CommandError('NO_PORT_FOUND', 'No available port found');\n }\n\n return port;\n}\n\n/** @return `true` if the port can still be used to start the dev server, `false` if the dev server should be skipped, and asserts if the port is now taken. */\nexport async function ensurePortAvailabilityAsync(\n projectRoot: string,\n { port }: { port: number }\n): Promise<boolean> {\n const isFreePort = await testPortAsync(port, [null]);\n // Check if port has become busy during the build.\n if (isFreePort) {\n return true;\n }\n\n const isBusy = await isBusyPortRunningSameProcessAsync(projectRoot, { port });\n if (!isBusy) {\n throw new CommandError(\n `Port \"${port}\" became busy running another process while the app was compiling. Re-run command to use a new port.`\n );\n }\n\n // Log that the dev server will not be started and that the logs will appear in another window.\n Log.log(\n '› The dev server for this app is already running in another window. Logs will appear there.'\n );\n return false;\n}\n\nfunction isRestrictedPort(port: number) {\n if (process.platform !== 'win32' && port < 1024) {\n const isRoot = process.getuid && process.getuid() === 0;\n return !isRoot;\n }\n return false;\n}\n\nasync function isBusyPortRunningSameProcessAsync(projectRoot: string, { port }: { port: number }) {\n const { getRunningProcess } =\n require('./getRunningProcess') as typeof import('./getRunningProcess');\n const runningProcess = isRestrictedPort(port) ? null : await getRunningProcess(port);\n if (runningProcess) {\n if (runningProcess.directory === projectRoot) {\n return true;\n } else {\n return false;\n }\n }\n\n return null;\n}\n\n// TODO(Bacon): Revisit after all start and run code is merged.\nexport async function choosePortAsync(\n projectRoot: string,\n {\n defaultPort,\n host,\n reuseExistingPort,\n }: {\n defaultPort: number;\n host?: string;\n reuseExistingPort?: boolean;\n }\n): Promise<number | null> {\n try {\n const port = await freePortAsync(defaultPort, [host ?? null]);\n if (port === defaultPort || defaultPort === 0) {\n return port;\n }\n\n const isRestricted = port && isRestrictedPort(port);\n\n let message = isRestricted\n ? `Admin permissions are required to run a server on a port below 1024`\n : `Port ${chalk.bold(defaultPort)} is`;\n\n const { getRunningProcess } =\n require('./getRunningProcess') as typeof import('./getRunningProcess');\n const runningProcess = isRestricted ? null : await getRunningProcess(defaultPort);\n\n if (runningProcess) {\n const pidTag = chalk.gray(`(pid ${runningProcess.pid})`);\n if (runningProcess.directory === projectRoot) {\n message += ` running this app in another window`;\n if (reuseExistingPort) {\n return null;\n }\n } else {\n message += ` running ${chalk.cyan(runningProcess.command)} in another window`;\n }\n message += '\\n' + chalk.gray(` ${runningProcess.directory} ${pidTag}`);\n } else {\n message += ' being used by another process';\n }\n\n Log.log(`\\u203A ${message}`);\n const { confirmAsync } = require('./prompts') as typeof import('./prompts');\n const change = await confirmAsync({\n message: `Use port ${port} instead?`,\n initial: true,\n });\n return change ? port : null;\n } catch (error: any) {\n if (error.code === 'ABORTED') {\n throw error;\n } else if (error.code === 'NON_INTERACTIVE') {\n Log.warn(chalk.yellow(error.message));\n return null;\n }\n throw error;\n }\n}\n\n// TODO(Bacon): Revisit after all start and run code is merged.\nexport async function resolvePortAsync(\n projectRoot: string,\n {\n /** Should opt to reuse a port that is running the same project in another window. */\n reuseExistingPort,\n /** Preferred port. */\n defaultPort,\n /** Backup port for when the default isn't available. */\n fallbackPort,\n }: {\n reuseExistingPort?: boolean;\n defaultPort?: string | number;\n fallbackPort?: number;\n } = {}\n): Promise<number | null> {\n let port: number;\n if (typeof defaultPort === 'string') {\n port = parseInt(defaultPort, 10);\n } else if (typeof defaultPort === 'number') {\n port = defaultPort;\n } else {\n port = env.RCT_METRO_PORT || fallbackPort || 8081;\n }\n\n // Only check the port when the bundler is running.\n const resolvedPort = await choosePortAsync(projectRoot, {\n defaultPort: port,\n reuseExistingPort,\n });\n if (resolvedPort == null) {\n Log.log('\\u203A Skipping dev server');\n // Skip bundling if the port is null\n } else {\n // Use the new or resolved port\n process.env.RCT_METRO_PORT = String(resolvedPort);\n }\n\n return resolvedPort;\n}\n"],"names":["choosePortAsync","ensurePortAvailabilityAsync","getFreePortAsync","resolvePortAsync","rangeStart","port","freePortAsync","CommandError","projectRoot","isFreePort","testPortAsync","isBusy","isBusyPortRunningSameProcessAsync","Log","log","isRestrictedPort","process","platform","isRoot","getuid","getRunningProcess","require","runningProcess","directory","defaultPort","host","reuseExistingPort","isRestricted","message","chalk","bold","pidTag","gray","pid","cyan","command","confirmAsync","change","initial","error","code","warn","yellow","fallbackPort","parseInt","env","RCT_METRO_PORT","resolvedPort","String"],"mappings":";;;;;;;;;;;QAkEsBA;eAAAA;;QAhDAC;eAAAA;;QAVAC;eAAAA;;QAwHAC;eAAAA;;;;gEAhIJ;;;;;;qBAEE;wBACS;0BACgB;6DACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGd,eAAeD,iBAAiBE,UAAkB;IACvD,MAAMC,OAAO,MAAMC,IAAAA,uBAAa,EAACF,YAAY;QAAC;QAAM;KAAY;IAChE,IAAI,CAACC,MAAM;QACT,MAAM,IAAIE,oBAAY,CAAC,iBAAiB;IA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EN,IAAItC;IACJ,IAAI,OAAOmB,gBAAgB,UAAU;QACnCnB,OAAOuC,SAASpB,aAAa;IAC/B,OAAO,IAAI,OAAOA,gBAAgB,UAAU;QAC1CnB,OAAOmB;IACT,OAAO;QACLnB,OAAOwC,QAAG,CAACC,cAAc,IAAIH,gBAAgB;IAC/C;IAEA,mDAAmD;IACnD,MAAMI,eAAe,MAAM/C,gBAAgBQ,aAAa;QACtDgB,aAAanB;QACbqB;IACF;IACA,IAAIqB,gBAAgB,MAAM;QACxBlC,KAAIC,GAAG,CAAC;IACR,oCAAoC;IACtC,OAAO;QACL,+BAA+B;QAC/BE,QAAQ6B,GAAG,CAACC,cAAc,GAAGE,OAAOD;IACtC;IAEA,OAAOA;AACT"}
1
+ {"version":3,"sources":["../../../src/utils/port.ts"],"sourcesContent":["import chalk from 'chalk';\n\nimport { env } from './env';\nimport { CommandError } from './errors';\nimport { testPortAsync, freePortAsync } from './freeport';\nimport * as Log from '../log';\n\n/** Get a free port or assert a CLI command error. */\nexport async function getFreePortAsync(rangeStart: number): Promise<number> {\n const port = await freePortAsync(rangeStart, [null, 'localhost']);\n if (!port) {\n throw new CommandError('NO_PORT_FOUND', 'No available port found');\n }\n\n return port;\n}\n\n/** @return `true` if the port can still be used to start the dev server, `false` if the dev server should be skipped, and asserts if the port is now taken. */\nexport async function ensurePortAvailabilityAsync(\n projectRoot: string,\n { port }: { port: number }\n): Promise<boolean> {\n const isFreePort = await testPortAsync(port, [null]);\n // Check if port has become busy during the build.\n if (isFreePort) {\n return true;\n }\n\n const isBusy = await isBusyPortRunningSameProcessAsync(projectRoot, { port });\n if (!isBusy) {\n throw new CommandError(\n `Port \"${port}\" became busy running another process while the app was compiling. Re-run command to use a new port.`\n );\n }\n\n // Log that the dev server will not be started and that the logs will appear in another window.\n Log.log(\n '› The dev server for this app is already running in another window. Logs will appear there.'\n );\n return false;\n}\n\nfunction isRestrictedPort(port: number) {\n if (process.platform !== 'win32' && port < 1024) {\n const isRoot = process.getuid && process.getuid() === 0;\n return !isRoot;\n }\n return false;\n}\n\nasync function isBusyPortRunningSameProcessAsync(projectRoot: string, { port }: { port: number }) {\n const { getRunningProcess } =\n require('./getRunningProcess') as typeof import('./getRunningProcess');\n const runningProcess = isRestrictedPort(port) ? null : await getRunningProcess(port);\n if (runningProcess) {\n if (runningProcess.directory === projectRoot) {\n return true;\n } else {\n return false;\n }\n }\n\n return null;\n}\n\n// TODO(Bacon): Revisit after all start and run code is merged.\nexport async function choosePortAsync(\n projectRoot: string,\n {\n defaultPort,\n host,\n reuseExistingPort,\n }: {\n defaultPort: number;\n host?: string;\n reuseExistingPort?: boolean;\n }\n): Promise<number | null> {\n try {\n const port = await freePortAsync(defaultPort, [host ?? null]);\n if (port === defaultPort || defaultPort === 0) {\n return port;\n }\n\n const isRestricted = port && isRestrictedPort(port);\n\n let message = isRestricted\n ? `Admin permissions are required to run a server on a port below 1024`\n : `Port ${chalk.bold(defaultPort)} is`;\n\n const { getRunningProcess } =\n require('./getRunningProcess') as typeof import('./getRunningProcess');\n const runningProcess = isRestricted ? null : await getRunningProcess(defaultPort);\n\n if (runningProcess) {\n const pidTag = chalk.gray(`(pid ${runningProcess.pid})`);\n if (runningProcess.directory === projectRoot) {\n message += ` running this app in another window`;\n if (reuseExistingPort) {\n return null;\n }\n } else {\n message += ` running ${chalk.cyan(runningProcess.command)} in another window`;\n }\n message += '\\n' + chalk.gray(` ${runningProcess.directory} ${pidTag}`);\n } else {\n message += ' being used by another process';\n }\n\n Log.log(`\\u203A ${message}`);\n const { confirmAsync } = require('./prompts') as typeof import('./prompts');\n const change = await confirmAsync({\n message: `Use port ${port} instead?`,\n initial: true,\n });\n return change ? port : null;\n } catch (error: any) {\n if (error.code === 'ABORTED') {\n throw error;\n } else if (error.code === 'NON_INTERACTIVE') {\n Log.warn(chalk.yellow(error.message));\n return null;\n }\n throw error;\n }\n}\n\n// TODO(Bacon): Revisit after all start and run code is merged.\nexport async function resolvePortAsync(\n projectRoot: string,\n {\n /** Should opt to reuse a port that is running the same project in another window. */\n reuseExistingPort,\n /** Preferred port. */\n defaultPort,\n /** Backup port for when the default isn't available. */\n fallbackPort,\n }: {\n reuseExistingPort?: boolean;\n defaultPort?: string | number;\n fallbackPort?: number;\n } = {}\n): Promise<number | null> {\n let port: number;\n if (typeof defaultPort === 'string') {\n port = parseInt(defaultPort, 10);\n } else if (typeof defaultPort === 'number') {\n port = defaultPort;\n } else {\n port = env.RCT_METRO_PORT || fallbackPort || 8081;\n }\n\n // Port 0 means \"pick any available port\" — scan from the fallback port without prompting.\n if (port === 0) {\n const scanFrom = env.RCT_METRO_PORT || fallbackPort || 8081;\n const resolvedPort = await getFreePortAsync(scanFrom);\n process.env.RCT_METRO_PORT = String(resolvedPort);\n return resolvedPort;\n }\n\n // Only check the port when the bundler is running.\n const resolvedPort = await choosePortAsync(projectRoot, {\n defaultPort: port,\n reuseExistingPort,\n });\n if (resolvedPort == null) {\n Log.log('\\u203A Skipping dev server');\n // Skip bundling if the port is null\n } else {\n // Use the new or resolved port\n process.env.RCT_METRO_PORT = String(resolvedPort);\n }\n\n return resolvedPort;\n}\n"],"names":["choosePortAsync","ensurePortAvailabilityAsync","getFreePortAsync","resolvePortAsync","rangeStart","port","freePortAsync","CommandError","projectRoot","isFreePort","testPortAsync","isBusy","isBusyPortRunningSameProcessAsync","Log","log","isRestrictedPort","process","platform","isRoot","getuid","getRunningProcess","require","runningProcess","directory","defaultPort","host","reuseExistingPort","isRestricted","message","chalk","bold","pidTag","gray","pid","cyan","command","confirmAsync","change","initial","error","code","warn","yellow","fallbackPort","parseInt","env","RCT_METRO_PORT","scanFrom","resolvedPort","String"],"mappings":";;;;;;;;;;;QAkEsBA;eAAAA;;QAhDAC;eAAAA;;QAVAC;eAAAA;;QAwHAC;eAAAA;;;;gEAhIJ;;;;;;qBAEE;wBACS;0BACgB;6DACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGd,eAAeD,iBAAiBE,UA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,eAAepC,iBACpBK,WAAmB,EACnB,EACE,mFAAmF,GACnFkB,iBAAiB,EACjB,oBAAoB,GACpBF,WAAW,EACX,sDAAsD,GACtDmB,YAAY,EAKb,GAAG,CAAC,CAAC;IAEN,IAAItC;IACJ,IAAI,OAAOmB,gBAAgB,UAAU;QACnCnB,OAAOuC,SAASpB,aAAa;IAC/B,OAAO,IAAI,OAAOA,gBAAgB,UAAU;QAC1CnB,OAAOmB;IACT,OAAO;QACLnB,OAAOwC,QAAG,CAACC,cAAc,IAAIH,gBAAgB;IAC/C;IAEA,0FAA0F;IAC1F,IAAItC,SAAS,GAAG;QACd,MAAM0C,WAAWF,QAAG,CAACC,cAAc,IAAIH,gBAAgB;QACvD,MAAMK,eAAe,MAAM9C,iBAAiB6C;QAC5C/B,QAAQ6B,GAAG,CAACC,cAAc,GAAGG,OAAOD;QACpC,OAAOA;IACT;IAEA,mDAAmD;IACnD,MAAMA,eAAe,MAAMhD,gBAAgBQ,aAAa;QACtDgB,aAAanB;QACbqB;IACF;IACA,IAAIsB,gBAAgB,MAAM;QACxBnC,KAAIC,GAAG,CAAC;IACR,oCAAoC;IACtC,OAAO;QACL,+BAA+B;QAC/BE,QAAQ6B,GAAG,CAACC,cAAc,GAAGG,OAAOD;IACtC;IAEA,OAAOA;AACT"}
@@ -26,7 +26,7 @@ class FetchClient {
26
26
  this.headers = {
27
27
  accept: 'application/json',
28
28
  'content-type': 'application/json',
29
- 'user-agent': `expo-cli/${"56.0.5"}`,
29
+ 'user-agent': `expo-cli/${"56.1.0"}`,
30
30
  authorization: 'Basic ' + _nodebuffer().Buffer.from(`${target}:`).toString('base64')
31
31
  };
32
32
  }
@@ -83,7 +83,7 @@ function createContext() {
83
83
  cpu: summarizeCpuInfo(),
84
84
  app: {
85
85
  name: 'expo/cli',
86
- version: "56.0.5"
86
+ version: "56.1.0"
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": "56.0.5",
3
+ "version": "56.1.0",
4
4
  "description": "The Expo CLI",
5
5
  "main": "main.js",
6
6
  "bin": {
@@ -39,27 +39,27 @@
39
39
  "homepage": "https://github.com/expo/expo/tree/main/packages/@expo/cli",
40
40
  "dependencies": {
41
41
  "@expo/code-signing-certificates": "^0.0.6",
42
- "@expo/config": "~56.0.2",
43
- "@expo/config-plugins": "~56.0.2",
42
+ "@expo/config": "~56.0.3",
43
+ "@expo/config-plugins": "~56.0.3",
44
44
  "@expo/devcert": "^1.2.1",
45
45
  "@expo/env": "~2.2.0",
46
- "@expo/image-utils": "^0.9.0",
47
- "@expo/inline-modules": "0.0.4",
46
+ "@expo/image-utils": "^0.9.2",
47
+ "@expo/inline-modules": "^0.0.4",
48
48
  "@expo/json-file": "^10.1.0",
49
- "@expo/log-box": "56.0.4",
49
+ "@expo/log-box": "^56.0.6",
50
50
  "@expo/metro": "~56.0.0",
51
- "@expo/metro-config": "~56.0.3",
52
- "@expo/metro-file-map": "56.0.0-2",
51
+ "@expo/metro-config": "~56.0.5",
52
+ "@expo/metro-file-map": "^56.0.0",
53
53
  "@expo/osascript": "^2.5.0",
54
54
  "@expo/package-manager": "^1.11.0",
55
55
  "@expo/plist": "^0.6.0",
56
- "@expo/prebuild-config": "^56.0.3",
57
- "@expo/require-utils": "^56.0.0",
58
- "@expo/router-server": "^56.0.4",
56
+ "@expo/prebuild-config": "^56.0.4",
57
+ "@expo/require-utils": "^56.1.0",
58
+ "@expo/router-server": "^56.0.5",
59
59
  "@expo/schema-utils": "^56.0.0",
60
60
  "@expo/spawn-async": "^1.7.2",
61
61
  "@expo/ws-tunnel": "^1.0.1",
62
- "@expo/xcpretty": "^4.4.0",
62
+ "@expo/xcpretty": "^4.4.4",
63
63
  "@react-native/dev-middleware": "0.85.3",
64
64
  "accepts": "^1.3.8",
65
65
  "arg": "^5.0.2",
@@ -89,7 +89,6 @@
89
89
  "semver": "^7.6.0",
90
90
  "send": "^0.19.0",
91
91
  "slugify": "^1.3.4",
92
- "source-map-support": "~0.5.21",
93
92
  "stacktrace-parser": "^0.1.10",
94
93
  "structured-headers": "^0.4.1",
95
94
  "terminal-link": "^2.1.1",
@@ -142,7 +141,6 @@
142
141
  "@types/resolve": "^1.20.2",
143
142
  "@types/semver": "^7.5.8",
144
143
  "@types/send": "^0.17.1",
145
- "@types/source-map-support": "^0.5.10",
146
144
  "@types/webpack": "~4.41.32",
147
145
  "@types/webpack-dev-server": "^3.11.0",
148
146
  "@types/wrap-ansi": "^3.0.0",
@@ -159,13 +157,13 @@
159
157
  "playwright": "^1.59.0",
160
158
  "taskr": "^1.1.0",
161
159
  "tree-kill": "^1.2.2",
162
- "@expo/fingerprint": "0.17.3",
163
- "expo": "56.0.0-preview.5",
160
+ "expo": "56.0.0-preview.7",
164
161
  "expo-module-scripts": "56.0.2",
165
- "expo-modules-autolinking": "56.0.2",
166
- "expo-router": "56.0.4"
162
+ "expo-modules-autolinking": "56.0.3",
163
+ "expo-router": "56.1.1",
164
+ "@expo/fingerprint": "0.17.4"
167
165
  },
168
- "gitHead": "a8ab3da510a34b7bdb2262aa9887d4f78b102280",
166
+ "gitHead": "a30353e69ca0d72b9fac5830abc631feda1ba3ae",
169
167
  "scripts": {
170
168
  "build": "taskr",
171
169
  "clean": "expo-module clean",