@expo/cli 55.0.16 → 55.0.18

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.16");
142
+ console.log("55.0.18");
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.16" ?? 'UNVERSIONED'
73
+ version: "55.0.18" ?? '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"}
@@ -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.16"}`,
29
+ 'user-agent': `expo-cli/${"55.0.18"}`,
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.16"
86
+ version: "55.0.18"
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.16",
3
+ "version": "55.0.18",
4
4
  "description": "The Expo CLI",
5
5
  "main": "build/bin/cli",
6
6
  "bin": {
@@ -41,21 +41,21 @@
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",
45
- "@expo/config-plugins": "~55.0.6",
44
+ "@expo/config": "~55.0.10",
45
+ "@expo/config-plugins": "~55.0.7",
46
46
  "@expo/devcert": "^1.2.1",
47
47
  "@expo/env": "~2.1.1",
48
48
  "@expo/image-utils": "^0.8.12",
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.11",
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.10",
56
+ "@expo/prebuild-config": "^55.0.10",
57
+ "@expo/require-utils": "^55.0.3",
58
+ "@expo/router-server": "^55.0.11",
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": "bcdd2c239f8a92cdf5140e35cde768352630acd6"
161
+ "gitHead": "a6f3e8c977474f3f8a3aad658d2b3cc23d5c43b4"
162
162
  }