@expo/cli 55.0.15 → 55.0.17

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
@@ -139,7 +139,7 @@ const args = (0, _arg().default)({
139
139
  });
140
140
  if (args['--version']) {
141
141
  // Version is added in the build script.
142
- console.log("55.0.15");
142
+ console.log("55.0.17");
143
143
  process.exit(0);
144
144
  }
145
145
  if (args['--non-interactive']) {
@@ -39,13 +39,6 @@ function _nodepath() {
39
39
  };
40
40
  return data;
41
41
  }
42
- function _nodetty() {
43
- const data = require("node:tty");
44
- _nodetty = function() {
45
- return data;
46
- };
47
- return data;
48
- }
49
42
  const _stream = require("./stream");
50
43
  const _env = require("../utils/env");
51
44
  function _interop_require_default(obj) {
@@ -77,20 +70,22 @@ function getInitMetadata() {
77
70
  return {
78
71
  format: 'v0-jsonl',
79
72
  // Version is added in the build script.
80
- version: "55.0.15" ?? 'UNVERSIONED'
73
+ version: "55.0.17" ?? 'UNVERSIONED'
81
74
  };
82
75
  }
83
76
  function installEventLogger(env = process.env.LOG_EVENTS) {
84
77
  const eventLogDestination = parseLogTarget(env);
85
78
  if (eventLogDestination) {
86
79
  if (eventLogDestination === 1) {
87
- const output = new (_nodetty()).WriteStream(2);
80
+ // Reuse Node's existing stdio streams so redirected or piped terminals don't
81
+ // attempt TTY-only initialization when LOG_EVENTS swaps console output.
82
+ const output = process.stderr;
88
83
  Object.defineProperty(process, 'stdout', {
89
84
  get: ()=>output
90
85
  });
91
86
  globalThis.console = new (_nodeconsole()).Console(output, output);
92
87
  } else if (eventLogDestination === 2) {
93
- const output = new (_nodetty()).WriteStream(1);
88
+ const output = process.stdout;
94
89
  Object.defineProperty(process, 'stderr', {
95
90
  get: ()=>output
96
91
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/events/index.ts"],"sourcesContent":["import { Console } from 'node:console';\nimport path from 'node:path';\nimport { WriteStream } from 'node:tty';\n\nimport type { EventBuilder, EventLoggerBuilder, EventShape } from './builder';\nimport { LogStream } from './stream';\nimport { env } from '../utils/env';\n\ninterface InitMetadata {\n format: 'v0-jsonl' | (string & {});\n version: string;\n}\n\nlet logPath = process.cwd();\nlet logStream: LogStream | undefined;\n\nfunction parseLogTarget(env: string | undefined) {\n let logDestination: string | number | undefined;\n if (env) {\n const fd = parseInt(env, 10);\n if (fd > 0 && Number.isSafeInteger(fd)) {\n logDestination = fd;\n } else {\n try {\n const parsedPath = path.parse(env);\n logDestination = path.format(parsedPath);\n logPath = parsedPath.dir;\n } catch {\n logDestination = undefined;\n }\n }\n }\n return logDestination;\n}\n\nfunction getInitMetadata(): InitMetadata {\n return {\n format: 'v0-jsonl',\n // Version is added in the build script.\n version: process.env.__EXPO_VERSION ?? 'UNVERSIONED',\n };\n}\n\n/** Activates the event logger based on the input env var\n * @param env - The target to write the logs to; defaults to `$LOG_EVENTS`\n */\nexport function installEventLogger(env = process.env.LOG_EVENTS) {\n const eventLogDestination = parseLogTarget(env);\n if (eventLogDestination) {\n if (eventLogDestination === 1) {\n const output = new WriteStream(2);\n Object.defineProperty(process, 'stdout', { get: () => output });\n globalThis.console = new Console(output, output);\n } else if (eventLogDestination === 2) {\n const output = new WriteStream(1);\n Object.defineProperty(process, 'stderr', { get: () => output });\n globalThis.console = new Console(output, output);\n }\n logStream = new LogStream(eventLogDestination);\n rootEvent('init', getInitMetadata());\n }\n}\n\n/** Returns whether the event logger is active */\nexport const isEventLoggerActive = () => !!logStream?.writable;\n\n/** Whether logs shown in the terminal should be reduced.\n * @remarks\n * We indicate that we're in an automated tool (e.g. E2E tests) with `EXPO_UNSTABLE_HEADLESS`.\n * If the event logger is activate and we're running in a headless tool, we should reduce\n * interactive or noisy logs, in favour of the event logger.\n */\nexport const shouldReduceLogs = () => !!logStream && env.EXPO_UNSTABLE_HEADLESS;\n\n/** Used to create an event logger for structured JSONL logs activated with the `LOG_EVENTS` environment variable.\n *\n * @remarks\n * Structured logs are streamed to a JSONL output file or file descriptor, and are meant for automated tooling\n * or normal usage to document what happened during a user session. When creating a module that outputs errors,\n * events, or captures what the user was doing, create a new event logger category for them and add structured\n * log events.\n * For example, `../start/server/metro/MetroTerminalReporter` captures most of Metro's logged events.\n * Structured JSONL logs don't have a large performance impact, unlike `DEBUG` logs, and are easily parseable\n * and filterable, including by wrapper processes.\n *\n * After adding a new event category, don't forget to add it to `./types.ts` to collect all event shape types\n * in one place.\n *\n * @example\n * ```ts\n * export const event = events('test', (t) => [\n * t.event<'my_event', {\n * myValue: string | null;\n * }>(),\n * ]);\n *\n * event('my_event', { myValue: 'test' });\n * ```\n *\n * This will log a `{ _e: 'test:my_event', _t: 0, myValue: 'test' }` entry in the event log.\n */\nexport const events: EventLoggerBuilder = ((\n category: string,\n _fn: (builder: EventBuilder) => readonly EventShape<string>[]\n) => {\n function log(event: string, data: any) {\n if (logStream) {\n const _e = `${category}:${String(event)}`;\n const _t = Date.now();\n const payload = JSON.stringify({ _e, _t, ...data });\n logStream._write(payload + '\\n');\n }\n }\n log.category = category;\n\n log.path = function relativePath(target: string | undefined | null): string | null {\n try {\n return target != null && path.isAbsolute(target)\n ? path.relative(logPath, target).replace(/\\\\/, '/') || '.'\n : (target ?? null);\n } catch {\n return target || null;\n }\n };\n\n return log;\n}) as EventLoggerBuilder;\n\n// These are built-in events: We choose an ambiguous name on purpose,\n// since we don't assume this implementation will necessarily only be in `@expo/cli`\nexport const rootEvent = events('root', (t) => [t.event<'init', InitMetadata>()]);\n\nexport type { EventLogger } from './builder';\n"],"names":["events","installEventLogger","isEventLoggerActive","rootEvent","shouldReduceLogs","logPath","process","cwd","logStream","parseLogTarget","env","logDestination","fd","parseInt","Number","isSafeInteger","parsedPath","path","parse","format","dir","undefined","getInitMetadata","version","__EXPO_VERSION","LOG_EVENTS","eventLogDestination","output","WriteStream","Object","defineProperty","get","globalThis","console","Console","LogStream","writable","EXPO_UNSTABLE_HEADLESS","category","_fn","log","event","data","_e","String","_t","Date","now","payload","JSON","stringify","_write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IAAMJ;YAAO;YAC7DK,WAAWC,OAAO,GAAG,IAAIC,CAAAA,cAAM,SAAC,CAACP,QAAQA;QAC3C;QACAnB,YAAY,IAAI2B,iBAAS,CAACT;QAC1BvB,UAAU,QAAQmB;IACpB;AACF;AAGO,MAAMpB,sBAAsB,IAAM,CAAC,EAACM,6BAAAA,UAAW4B,QAAQ;AAQvD,MAAMhC,mBAAmB,IAAM,CAAC,CAACI,aAAaE,QAAG,CAAC2B,sBAAsB;AA6BxE,MAAMrC,SAA8B,CACzCsC,UACAC;IAEA,SAASC,IAAIC,KAAa,EAAEC,IAAS;QACnC,IAAIlC,WAAW;YACb,MAAMmC,KAAK,GAAGL,SAAS,CAAC,EAAEM,OAAOH,QAAQ;YACzC,MAAMI,KAAKC,KAAKC,GAAG;YACnB,MAAMC,UAAUC,KAAKC,SAAS,CAAC;gBAAEP;gBAAIE;gBAAI,GAAGH,IAAI;YAAC;YACjDlC,UAAU2C,MAAM,CAACH,UAAU;QAC7B;IACF;IACAR,IAAIF,QAAQ,GAAGA;IAEfE,IAAIvB,IAAI,GAAG,SAASmC,aAAaC,MAAiC;QAChE,IAAI;YACF,OAAOA,UAAU,QAAQpC,mBAAI,CAACqC,UAAU,CAACD,UACrCpC,mBAAI,CAACsC,QAAQ,CAAClD,SAASgD,QAAQG,OAAO,CAAC,MAAM,QAAQ,MACpDH,UAAU;QACjB,EAAE,OAAM;YACN,OAAOA,UAAU;QACnB;IACF;IAEA,OAAOb;AACT;AAIO,MAAMrC,YAAYH,OAAO,QAAQ,CAACyD,IAAM;QAACA,EAAEhB,KAAK;KAAyB"}
1
+ {"version":3,"sources":["../../../src/events/index.ts"],"sourcesContent":["import { Console } from 'node:console';\nimport path from 'node:path';\n\nimport type { EventBuilder, EventLoggerBuilder, EventShape } from './builder';\nimport { LogStream } from './stream';\nimport { env } from '../utils/env';\n\ninterface InitMetadata {\n format: 'v0-jsonl' | (string & {});\n version: string;\n}\n\nlet logPath = process.cwd();\nlet logStream: LogStream | undefined;\n\nfunction parseLogTarget(env: string | undefined) {\n let logDestination: string | number | undefined;\n if (env) {\n const fd = parseInt(env, 10);\n if (fd > 0 && Number.isSafeInteger(fd)) {\n logDestination = fd;\n } else {\n try {\n const parsedPath = path.parse(env);\n logDestination = path.format(parsedPath);\n logPath = parsedPath.dir;\n } catch {\n logDestination = undefined;\n }\n }\n }\n return logDestination;\n}\n\nfunction getInitMetadata(): InitMetadata {\n return {\n format: 'v0-jsonl',\n // Version is added in the build script.\n version: process.env.__EXPO_VERSION ?? 'UNVERSIONED',\n };\n}\n\n/** Activates the event logger based on the input env var\n * @param env - The target to write the logs to; defaults to `$LOG_EVENTS`\n */\nexport function installEventLogger(env = process.env.LOG_EVENTS) {\n const eventLogDestination = parseLogTarget(env);\n if (eventLogDestination) {\n if (eventLogDestination === 1) {\n // Reuse Node's existing stdio streams so redirected or piped terminals don't\n // attempt TTY-only initialization when LOG_EVENTS swaps console output.\n const output = process.stderr;\n Object.defineProperty(process, 'stdout', { get: () => output });\n globalThis.console = new Console(output, output);\n } else if (eventLogDestination === 2) {\n const output = process.stdout;\n Object.defineProperty(process, 'stderr', { get: () => output });\n globalThis.console = new Console(output, output);\n }\n logStream = new LogStream(eventLogDestination);\n rootEvent('init', getInitMetadata());\n }\n}\n\n/** Returns whether the event logger is active */\nexport const isEventLoggerActive = () => !!logStream?.writable;\n\n/** Whether logs shown in the terminal should be reduced.\n * @remarks\n * We indicate that we're in an automated tool (e.g. E2E tests) with `EXPO_UNSTABLE_HEADLESS`.\n * If the event logger is activate and we're running in a headless tool, we should reduce\n * interactive or noisy logs, in favour of the event logger.\n */\nexport const shouldReduceLogs = () => !!logStream && env.EXPO_UNSTABLE_HEADLESS;\n\n/** Used to create an event logger for structured JSONL logs activated with the `LOG_EVENTS` environment variable.\n *\n * @remarks\n * Structured logs are streamed to a JSONL output file or file descriptor, and are meant for automated tooling\n * or normal usage to document what happened during a user session. When creating a module that outputs errors,\n * events, or captures what the user was doing, create a new event logger category for them and add structured\n * log events.\n * For example, `../start/server/metro/MetroTerminalReporter` captures most of Metro's logged events.\n * Structured JSONL logs don't have a large performance impact, unlike `DEBUG` logs, and are easily parseable\n * and filterable, including by wrapper processes.\n *\n * After adding a new event category, don't forget to add it to `./types.ts` to collect all event shape types\n * in one place.\n *\n * @example\n * ```ts\n * export const event = events('test', (t) => [\n * t.event<'my_event', {\n * myValue: string | null;\n * }>(),\n * ]);\n *\n * event('my_event', { myValue: 'test' });\n * ```\n *\n * This will log a `{ _e: 'test:my_event', _t: 0, myValue: 'test' }` entry in the event log.\n */\nexport const events: EventLoggerBuilder = ((\n category: string,\n _fn: (builder: EventBuilder) => readonly EventShape<string>[]\n) => {\n function log(event: string, data: any) {\n if (logStream) {\n const _e = `${category}:${String(event)}`;\n const _t = Date.now();\n const payload = JSON.stringify({ _e, _t, ...data });\n logStream._write(payload + '\\n');\n }\n }\n log.category = category;\n\n log.path = function relativePath(target: string | undefined | null): string | null {\n try {\n return target != null && path.isAbsolute(target)\n ? path.relative(logPath, target).replace(/\\\\/, '/') || '.'\n : (target ?? null);\n } catch {\n return target || null;\n }\n };\n\n return log;\n}) as EventLoggerBuilder;\n\n// These are built-in events: We choose an ambiguous name on purpose,\n// since we don't assume this implementation will necessarily only be in `@expo/cli`\nexport const rootEvent = events('root', (t) => [t.event<'init', InitMetadata>()]);\n\nexport type { EventLogger } from './builder';\n"],"names":["events","installEventLogger","isEventLoggerActive","rootEvent","shouldReduceLogs","logPath","process","cwd","logStream","parseLogTarget","env","logDestination","fd","parseInt","Number","isSafeInteger","parsedPath","path","parse","format","dir","undefined","getInitMetadata","version","__EXPO_VERSION","LOG_EVENTS","eventLogDestination","output","stderr","Object","defineProperty","get","globalThis","console","Console","stdout","LogStream","writable","EXPO_UNSTABLE_HEADLESS","category","_fn","log","event","data","_e","String","_t","Date","now","payload","JSON","stringify","_write","relativePath","target","isAbsolute","relative","replace","t"],"mappings":";;;;;;;;;;;IAsGaA,MAAM;eAANA;;IAzDGC,kBAA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AY,IAAI4B,iBAAS,CAACV;QAC1BvB,UAAU,QAAQmB;IACpB;AACF;AAGO,MAAMpB,sBAAsB,IAAM,CAAC,EAACM,6BAAAA,UAAW6B,QAAQ;AAQvD,MAAMjC,mBAAmB,IAAM,CAAC,CAACI,aAAaE,QAAG,CAAC4B,sBAAsB;AA6BxE,MAAMtC,SAA8B,CACzCuC,UACAC;IAEA,SAASC,IAAIC,KAAa,EAAEC,IAAS;QACnC,IAAInC,WAAW;YACb,MAAMoC,KAAK,GAAGL,SAAS,CAAC,EAAEM,OAAOH,QAAQ;YACzC,MAAMI,KAAKC,KAAKC,GAAG;YACnB,MAAMC,UAAUC,KAAKC,SAAS,CAAC;gBAAEP;gBAAIE;gBAAI,GAAGH,IAAI;YAAC;YACjDnC,UAAU4C,MAAM,CAACH,UAAU;QAC7B;IACF;IACAR,IAAIF,QAAQ,GAAGA;IAEfE,IAAIxB,IAAI,GAAG,SAASoC,aAAaC,MAAiC;QAChE,IAAI;YACF,OAAOA,UAAU,QAAQrC,mBAAI,CAACsC,UAAU,CAACD,UACrCrC,mBAAI,CAACuC,QAAQ,CAACnD,SAASiD,QAAQG,OAAO,CAAC,MAAM,QAAQ,MACpDH,UAAU;QACjB,EAAE,OAAM;YACN,OAAOA,UAAU;QACnB;IACF;IAEA,OAAOb;AACT;AAIO,MAAMtC,YAAYH,OAAO,QAAQ,CAAC0D,IAAM;QAACA,EAAEhB,KAAK;KAAyB"}
@@ -22,6 +22,13 @@ function _spawnasync() {
22
22
  };
23
23
  return data;
24
24
  }
25
+ function _path() {
26
+ const data = /*#__PURE__*/ _interop_require_default(require("path"));
27
+ _path = function() {
28
+ return data;
29
+ };
30
+ return data;
31
+ }
25
32
  const _log = /*#__PURE__*/ _interop_require_wildcard(require("../../../log"));
26
33
  const _Prerequisite = require("../Prerequisite");
27
34
  function _interop_require_default(obj) {
@@ -71,14 +78,44 @@ function _interop_require_wildcard(obj, nodeInterop) {
71
78
  return newObj;
72
79
  }
73
80
  const debug = require('debug')('expo:doctor:apple:simulatorApp');
74
- async function getSimulatorAppIdAsync() {
81
+ /**
82
+ * Get the bundle ID of the Simulator.app via AppleScript / LaunchServices.
83
+ * May return null if the Simulator.app is not registered in LaunchServices
84
+ * (e.g. when Xcode lives on an external or renamed volume).
85
+ */ async function getSimulatorAppIdViaAppleScriptAsync() {
75
86
  try {
76
87
  return (await (0, _osascript().execAsync)('id of app "Simulator"')).trim();
77
88
  } catch {
78
- // This error may occur in CI where the users intends to install just the simulators but no Xcode.
89
+ // This error may occur in CI where the user intends to install just the simulators but no
90
+ // Xcode, or when Simulator.app is not registered in LaunchServices (e.g. Xcode on an
91
+ // external or renamed volume).
92
+ }
93
+ return null;
94
+ }
95
+ /**
96
+ * Fallback: locate Simulator.app via the active Xcode developer directory and read its
97
+ * CFBundleIdentifier directly from the app bundle's Info.plist.
98
+ * This works even when LaunchServices hasn't indexed Simulator.app.
99
+ */ async function getSimulatorAppIdFromBundleAsync() {
100
+ try {
101
+ const { stdout: developerDir } = await (0, _spawnasync().default)('xcode-select', [
102
+ '--print-path'
103
+ ]);
104
+ const simulatorInfoPlist = _path().default.join(developerDir.trim(), 'Applications', 'Simulator.app', 'Contents', 'Info.plist');
105
+ const { stdout: bundleId } = await (0, _spawnasync().default)('defaults', [
106
+ 'read',
107
+ simulatorInfoPlist,
108
+ 'CFBundleIdentifier'
109
+ ]);
110
+ return bundleId.trim() || null;
111
+ } catch {
112
+ // Simulator.app not found at the expected path or xcode-select is unavailable.
79
113
  }
80
114
  return null;
81
115
  }
116
+ async function getSimulatorAppIdAsync() {
117
+ return await getSimulatorAppIdViaAppleScriptAsync() ?? await getSimulatorAppIdFromBundleAsync();
118
+ }
82
119
  class SimulatorAppPrerequisite extends _Prerequisite.Prerequisite {
83
120
  static #_ = this.instance = new SimulatorAppPrerequisite();
84
121
  async assertImplementation() {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/start/doctor/apple/SimulatorAppPrerequisite.ts"],"sourcesContent":["import { execAsync } from '@expo/osascript';\nimport spawnAsync from '@expo/spawn-async';\n\nimport * as Log from '../../../log';\nimport { Prerequisite, PrerequisiteCommandError } from '../Prerequisite';\n\nconst debug = require('debug')('expo:doctor:apple:simulatorApp') as typeof console.log;\n\nasync function getSimulatorAppIdAsync(): Promise<string | null> {\n try {\n return (await execAsync('id of app \"Simulator\"')).trim();\n } catch {\n // This error may occur in CI where the users intends to install just the simulators but no Xcode.\n }\n return null;\n}\n\nexport class SimulatorAppPrerequisite extends Prerequisite {\n static instance = new SimulatorAppPrerequisite();\n\n async assertImplementation(): Promise<void> {\n const result = await getSimulatorAppIdAsync();\n if (!result) {\n // This error may occur in CI where the users intends to install just the simulators but no Xcode.\n throw new PrerequisiteCommandError(\n 'SIMULATOR_APP',\n \"Can't determine id of Simulator app; the Simulator is most likely not installed on this machine. Run `sudo xcode-select -s /Applications/Xcode.app`\"\n );\n }\n if (\n result !== 'com.apple.iphonesimulator' &&\n result !== 'com.apple.CoreSimulator.SimulatorTrampoline'\n ) {\n throw new PrerequisiteCommandError(\n 'SIMULATOR_APP',\n \"Simulator is installed but is identified as '\" + result + \"'; don't know what that is.\"\n );\n }\n debug(`Simulator app id: ${result}`);\n\n try {\n // make sure we can run simctl\n await spawnAsync('xcrun', ['simctl', 'help']);\n } catch (error: any) {\n Log.warn(`Unable to run simctl:\\n${error.toString()}`);\n throw new PrerequisiteCommandError(\n 'SIMCTL',\n 'xcrun is not configured correctly. Ensure `sudo xcode-select --reset` works before running this command again.'\n );\n }\n }\n}\n"],"names":["SimulatorAppPrerequisite","debug","require","getSimulatorAppIdAsync","execAsync","trim","Prerequisite","instance","assertImplementation","result","PrerequisiteCommandError","spawnAsync","error","Log","warn","toString"],"mappings":";;;;+BAiBaA;;;eAAAA;;;;yBAjBa;;;;;;;gEACH;;;;;;6DAEF;8BACkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvD,MAAMC,QAAQC,QAAQ,SAAS;AAE/B,eAAeC;IACb,IAAI;QACF,OAAO,AAAC,CAAA,MAAMC,IAAAA,sBAAS,EAAC,wBAAuB,EAAGC,IAAI;IACxD,EAAE,OAAM;IACN,kGAAkG;IACpG;IACA,OAAO;AACT;AAEO,MAAML,iCAAiCM,0BAAY;qBACjDC,WAAW,IAAIP;IAEtB,MAAMQ,uBAAsC;QAC1C,MAAMC,SAAS,MAAMN;QACrB,IAAI,CAACM,QAAQ;YACX,kGAAkG;YAClG,MAAM,IAAIC,sCAAwB,CAChC,iBACA;QAEJ;QACA,IACED,WAAW,+BACXA,WAAW,+CACX;YACA,MAAM,IAAIC,sCAAwB,CAChC,iBACA,kDAAkDD,SAAS;QAE/D;QACAR,MAAM,CAAC,kBAAkB,EAAEQ,QAAQ;QAEnC,IAAI;YACF,8BAA8B;YAC9B,MAAME,IAAAA,qBAAU,EAAC,SAAS;gBAAC;gBAAU;aAAO;QAC9C,EAAE,OAAOC,OAAY;YACnBC,KAAIC,IAAI,CAAC,CAAC,uBAAuB,EAAEF,MAAMG,QAAQ,IAAI;YACrD,MAAM,IAAIL,sCAAwB,CAChC,UACA;QAEJ;IACF;AACF"}
1
+ {"version":3,"sources":["../../../../../src/start/doctor/apple/SimulatorAppPrerequisite.ts"],"sourcesContent":["import { execAsync } from '@expo/osascript';\nimport spawnAsync from '@expo/spawn-async';\nimport path from 'path';\n\nimport * as Log from '../../../log';\nimport { Prerequisite, PrerequisiteCommandError } from '../Prerequisite';\n\nconst debug = require('debug')('expo:doctor:apple:simulatorApp') as typeof console.log;\n\n/**\n * Get the bundle ID of the Simulator.app via AppleScript / LaunchServices.\n * May return null if the Simulator.app is not registered in LaunchServices\n * (e.g. when Xcode lives on an external or renamed volume).\n */\nasync function getSimulatorAppIdViaAppleScriptAsync(): Promise<string | null> {\n try {\n return (await execAsync('id of app \"Simulator\"')).trim();\n } catch {\n // This error may occur in CI where the user intends to install just the simulators but no\n // Xcode, or when Simulator.app is not registered in LaunchServices (e.g. Xcode on an\n // external or renamed volume).\n }\n return null;\n}\n\n/**\n * Fallback: locate Simulator.app via the active Xcode developer directory and read its\n * CFBundleIdentifier directly from the app bundle's Info.plist.\n * This works even when LaunchServices hasn't indexed Simulator.app.\n */\nasync function getSimulatorAppIdFromBundleAsync(): Promise<string | null> {\n try {\n const { stdout: developerDir } = await spawnAsync('xcode-select', ['--print-path']);\n const simulatorInfoPlist = path.join(\n developerDir.trim(),\n 'Applications',\n 'Simulator.app',\n 'Contents',\n 'Info.plist'\n );\n const { stdout: bundleId } = await spawnAsync('defaults', [\n 'read',\n simulatorInfoPlist,\n 'CFBundleIdentifier',\n ]);\n return bundleId.trim() || null;\n } catch {\n // Simulator.app not found at the expected path or xcode-select is unavailable.\n }\n return null;\n}\n\nasync function getSimulatorAppIdAsync(): Promise<string | null> {\n return (\n (await getSimulatorAppIdViaAppleScriptAsync()) ?? (await getSimulatorAppIdFromBundleAsync())\n );\n}\n\nexport class SimulatorAppPrerequisite extends Prerequisite {\n static instance = new SimulatorAppPrerequisite();\n\n async assertImplementation(): Promise<void> {\n const result = await getSimulatorAppIdAsync();\n if (!result) {\n // This error may occur in CI where the users intends to install just the simulators but no Xcode.\n throw new PrerequisiteCommandError(\n 'SIMULATOR_APP',\n \"Can't determine id of Simulator app; the Simulator is most likely not installed on this machine. Run `sudo xcode-select -s /Applications/Xcode.app`\"\n );\n }\n if (\n result !== 'com.apple.iphonesimulator' &&\n result !== 'com.apple.CoreSimulator.SimulatorTrampoline'\n ) {\n throw new PrerequisiteCommandError(\n 'SIMULATOR_APP',\n \"Simulator is installed but is identified as '\" + result + \"'; don't know what that is.\"\n );\n }\n debug(`Simulator app id: ${result}`);\n\n try {\n // make sure we can run simctl\n await spawnAsync('xcrun', ['simctl', 'help']);\n } catch (error: any) {\n Log.warn(`Unable to run simctl:\\n${error.toString()}`);\n throw new PrerequisiteCommandError(\n 'SIMCTL',\n 'xcrun is not configured correctly. Ensure `sudo xcode-select --reset` works before running this command again.'\n );\n }\n }\n}\n"],"names":["SimulatorAppPrerequisite","debug","require","getSimulatorAppIdViaAppleScriptAsync","execAsync","trim","getSimulatorAppIdFromBundleAsync","stdout","developerDir","spawnAsync","simulatorInfoPlist","path","join","bundleId","getSimulatorAppIdAsync","Prerequisite","instance","assertImplementation","result","PrerequisiteCommandError","error","Log","warn","toString"],"mappings":";;;;+BA0DaA;;;eAAAA;;;;yBA1Da;;;;;;;gEACH;;;;;;;gEACN;;;;;;6DAEI;8BACkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvD,MAAMC,QAAQC,QAAQ,SAAS;AAE/B;;;;CAIC,GACD,eAAeC;IACb,IAAI;QACF,OAAO,AAAC,CAAA,MAAMC,IAAAA,sBAAS,EAAC,wBAAuB,EAAGC,IAAI;IACxD,EAAE,OAAM;IACN,0FAA0F;IAC1F,qFAAqF;IACrF,+BAA+B;IACjC;IACA,OAAO;AACT;AAEA;;;;CAIC,GACD,eAAeC;IACb,IAAI;QACF,MAAM,EAAEC,QAAQC,YAAY,EAAE,GAAG,MAAMC,IAAAA,qBAAU,EAAC,gBAAgB;YAAC;SAAe;QAClF,MAAMC,qBAAqBC,eAAI,CAACC,IAAI,CAClCJ,aAAaH,IAAI,IACjB,gBACA,iBACA,YACA;QAEF,MAAM,EAAEE,QAAQM,QAAQ,EAAE,GAAG,MAAMJ,IAAAA,qBAAU,EAAC,YAAY;YACxD;YACAC;YACA;SACD;QACD,OAAOG,SAASR,IAAI,MAAM;IAC5B,EAAE,OAAM;IACN,+EAA+E;IACjF;IACA,OAAO;AACT;AAEA,eAAeS;IACb,OACE,AAAC,MAAMX,0CAA4C,MAAMG;AAE7D;AAEO,MAAMN,iCAAiCe,0BAAY;qBACjDC,WAAW,IAAIhB;IAEtB,MAAMiB,uBAAsC;QAC1C,MAAMC,SAAS,MAAMJ;QACrB,IAAI,CAACI,QAAQ;YACX,kGAAkG;YAClG,MAAM,IAAIC,sCAAwB,CAChC,iBACA;QAEJ;QACA,IACED,WAAW,+BACXA,WAAW,+CACX;YACA,MAAM,IAAIC,sCAAwB,CAChC,iBACA,kDAAkDD,SAAS;QAE/D;QACAjB,MAAM,CAAC,kBAAkB,EAAEiB,QAAQ;QAEnC,IAAI;YACF,8BAA8B;YAC9B,MAAMT,IAAAA,qBAAU,EAAC,SAAS;gBAAC;gBAAU;aAAO;QAC9C,EAAE,OAAOW,OAAY;YACnBC,KAAIC,IAAI,CAAC,CAAC,uBAAuB,EAAEF,MAAMG,QAAQ,IAAI;YACrD,MAAM,IAAIJ,sCAAwB,CAChC,UACA;QAEJ;IACF;AACF"}
@@ -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/${"55.0.15"}`,
29
+ 'user-agent': `expo-cli/${"55.0.17"}`,
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: "55.0.15"
86
+ version: "55.0.17"
87
87
  },
88
88
  ci: _ciinfo().isCI ? {
89
89
  name: _ciinfo().name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/cli",
3
- "version": "55.0.15",
3
+ "version": "55.0.17",
4
4
  "description": "The Expo CLI",
5
5
  "main": "build/bin/cli",
6
6
  "bin": {
@@ -41,7 +41,7 @@
41
41
  "homepage": "https://github.com/expo/expo/tree/main/packages/@expo/cli",
42
42
  "dependencies": {
43
43
  "@expo/code-signing-certificates": "^0.0.6",
44
- "@expo/config": "~55.0.8",
44
+ "@expo/config": "~55.0.9",
45
45
  "@expo/config-plugins": "~55.0.6",
46
46
  "@expo/devcert": "^1.2.1",
47
47
  "@expo/env": "~2.1.1",
@@ -49,13 +49,13 @@
49
49
  "@expo/json-file": "^10.0.12",
50
50
  "@expo/log-box": "55.0.7",
51
51
  "@expo/metro": "~54.2.0",
52
- "@expo/metro-config": "~55.0.9",
52
+ "@expo/metro-config": "~55.0.10",
53
53
  "@expo/osascript": "^2.4.2",
54
54
  "@expo/package-manager": "^1.10.3",
55
55
  "@expo/plist": "^0.5.2",
56
- "@expo/prebuild-config": "^55.0.8",
57
- "@expo/require-utils": "^55.0.2",
58
- "@expo/router-server": "^55.0.9",
56
+ "@expo/prebuild-config": "^55.0.9",
57
+ "@expo/require-utils": "^55.0.3",
58
+ "@expo/router-server": "^55.0.10",
59
59
  "@expo/schema-utils": "^55.0.2",
60
60
  "@expo/spawn-async": "^1.7.2",
61
61
  "@expo/ws-tunnel": "^1.0.1",
@@ -158,5 +158,5 @@
158
158
  "tree-kill": "^1.2.2",
159
159
  "tsd": "^0.28.1"
160
160
  },
161
- "gitHead": "756404b0eb18d441b54c7136b4142349193f554b"
161
+ "gitHead": "9260ae10a08271027d85792b7128e0d4883dca4d"
162
162
  }