@expo/cli 55.0.15 → 55.0.16

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.16");
143
143
  process.exit(0);
144
144
  }
145
145
  if (args['--non-interactive']) {
@@ -77,7 +77,7 @@ function getInitMetadata() {
77
77
  return {
78
78
  format: 'v0-jsonl',
79
79
  // Version is added in the build script.
80
- version: "55.0.15" ?? 'UNVERSIONED'
80
+ version: "55.0.16" ?? 'UNVERSIONED'
81
81
  };
82
82
  }
83
83
  function installEventLogger(env = process.env.LOG_EVENTS) {
@@ -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;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
  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.16"}`,
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.16"
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.16",
4
4
  "description": "The Expo CLI",
5
5
  "main": "build/bin/cli",
6
6
  "bin": {
@@ -55,7 +55,7 @@
55
55
  "@expo/plist": "^0.5.2",
56
56
  "@expo/prebuild-config": "^55.0.8",
57
57
  "@expo/require-utils": "^55.0.2",
58
- "@expo/router-server": "^55.0.9",
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": "bcdd2c239f8a92cdf5140e35cde768352630acd6"
162
162
  }