@expo/cli 0.19.10 → 0.19.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/bin/cli CHANGED
@@ -120,7 +120,7 @@ const args = (0, _arg().default)({
120
120
  });
121
121
  if (args["--version"]) {
122
122
  // Version is added in the build script.
123
- console.log("0.19.10");
123
+ console.log("0.19.12");
124
124
  process.exit(0);
125
125
  }
126
126
  if (args["--non-interactive"]) {
@@ -31,7 +31,7 @@ class FetchClient {
31
31
  this.headers = {
32
32
  accept: "application/json",
33
33
  "content-type": "application/json",
34
- "user-agent": `expo-cli/${"0.19.10"}`,
34
+ "user-agent": `expo-cli/${"0.19.12"}`,
35
35
  authorization: "Basic " + _nodeBuffer().Buffer.from(`${target}:`).toString("base64")
36
36
  };
37
37
  }
@@ -59,16 +59,22 @@ class RudderDetachedClient {
59
59
  recursive: true
60
60
  });
61
61
  await _nodeFs().default.promises.writeFile(file, data);
62
- const child = (0, _nodeChildProcess().spawn)(process.execPath, [
63
- require.resolve("./flushRudderDetached"),
64
- file
65
- ], {
66
- detached: true,
67
- windowsHide: true,
68
- shell: false,
69
- stdio: "ignore"
70
- });
71
- child.unref();
62
+ try {
63
+ const child = (0, _nodeChildProcess().spawn)(process.execPath, [
64
+ require.resolve("./flushRudderDetached"),
65
+ file
66
+ ], {
67
+ detached: true,
68
+ windowsHide: true,
69
+ shell: false,
70
+ stdio: "ignore"
71
+ });
72
+ child.unref();
73
+ } catch (error) {
74
+ // This could fail if the detached flush import changes during an upgrade to the `expo` dependency via `npx expo install --fix`,
75
+ // since this file may no longer be present after the upgrade, but before the process under the old Expo CLI version is terminated.
76
+ debug("Exception while initiating detached flush:", error);
77
+ }
72
78
  debug("Detached flush started");
73
79
  }
74
80
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/utils/telemetry/clients/RudderDetachedClient.ts"],"sourcesContent":["import { spawn } from 'node:child_process';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createTempFilePath } from '../../createTempPath';\nimport type { TelemetryClient, TelemetryClientStrategy, TelemetryRecordInternal } from '../types';\n\nconst debug = require('debug')('expo:telemetry:client:detached') as typeof console.log;\n\nexport class RudderDetachedClient implements TelemetryClient {\n /** This client should be used for short-lived commands */\n readonly strategy: TelemetryClientStrategy = 'detached';\n /** All recorded telemetry events */\n private records: TelemetryRecordInternal[] = [];\n\n abort() {\n return this.records;\n }\n\n record(record: TelemetryRecordInternal[]) {\n this.records.push(\n ...record.map((record) => ({\n ...record,\n originalTimestamp: record.sentAt,\n }))\n );\n }\n\n async flush() {\n if (!this.records.length) {\n return debug('No records to flush, skipping...');\n }\n\n const file = createTempFilePath('expo-telemetry.json');\n const data = JSON.stringify({ records: this.records });\n\n this.records = [];\n\n await fs.promises.mkdir(path.dirname(file), { recursive: true });\n await fs.promises.writeFile(file, data);\n\n const child = spawn(process.execPath, [require.resolve('./flushRudderDetached'), file], {\n detached: true,\n windowsHide: true,\n shell: false,\n stdio: 'ignore',\n });\n\n child.unref();\n\n debug('Detached flush started');\n }\n}\n"],"names":["RudderDetachedClient","debug","require","strategy","records","abort","record","push","map","originalTimestamp","sentAt","flush","length","file","createTempFilePath","data","JSON","stringify","fs","promises","mkdir","path","dirname","recursive","writeFile","child","spawn","process","execPath","resolve","detached","windowsHide","shell","stdio","unref"],"mappings":"AAAA;;;;+BASaA,sBAAoB;;aAApBA,oBAAoB;;;yBATX,oBAAoB;;;;;;;8DAC3B,SAAS;;;;;;;8DACP,WAAW;;;;;;gCAEO,sBAAsB;;;;;;AAGzD,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,gCAAgC,CAAC,AAAsB,AAAC;AAEhF,MAAMF,oBAAoB;IAC/B,wDAAwD,GACxD,AAASG,QAAQ,GAA4B,UAAU,CAAC;IACxD,kCAAkC,GAClC,AAAQC,OAAO,GAA8B,EAAE,CAAC;IAEhDC,KAAK,GAAG;QACN,OAAO,IAAI,CAACD,OAA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../../../../../src/utils/telemetry/clients/RudderDetachedClient.ts"],"sourcesContent":["import { spawn } from 'node:child_process';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createTempFilePath } from '../../createTempPath';\nimport type { TelemetryClient, TelemetryClientStrategy, TelemetryRecordInternal } from '../types';\n\nconst debug = require('debug')('expo:telemetry:client:detached') as typeof console.log;\n\nexport class RudderDetachedClient implements TelemetryClient {\n /** This client should be used for short-lived commands */\n readonly strategy: TelemetryClientStrategy = 'detached';\n /** All recorded telemetry events */\n private records: TelemetryRecordInternal[] = [];\n\n abort() {\n return this.records;\n }\n\n record(record: TelemetryRecordInternal[]) {\n this.records.push(\n ...record.map((record) => ({\n ...record,\n originalTimestamp: record.sentAt,\n }))\n );\n }\n\n async flush() {\n if (!this.records.length) {\n return debug('No records to flush, skipping...');\n }\n\n const file = createTempFilePath('expo-telemetry.json');\n const data = JSON.stringify({ records: this.records });\n\n this.records = [];\n\n await fs.promises.mkdir(path.dirname(file), { recursive: true });\n await fs.promises.writeFile(file, data);\n\n try {\n const child = spawn(process.execPath, [require.resolve('./flushRudderDetached'), file], {\n detached: true,\n windowsHide: true,\n shell: false,\n stdio: 'ignore',\n });\n\n child.unref();\n } catch (error) {\n // This could fail if the detached flush import changes during an upgrade to the `expo` dependency via `npx expo install --fix`,\n // since this file may no longer be present after the upgrade, but before the process under the old Expo CLI version is terminated.\n debug('Exception while initiating detached flush:', error);\n }\n\n debug('Detached flush started');\n }\n}\n"],"names":["RudderDetachedClient","debug","require","strategy","records","abort","record","push","map","originalTimestamp","sentAt","flush","length","file","createTempFilePath","data","JSON","stringify","fs","promises","mkdir","path","dirname","recursive","writeFile","child","spawn","process","execPath","resolve","detached","windowsHide","shell","stdio","unref","error"],"mappings":"AAAA;;;;+BASaA,sBAAoB;;aAApBA,oBAAoB;;;yBATX,oBAAoB;;;;;;;8DAC3B,SAAS;;;;;;;8DACP,WAAW;;;;;;gCAEO,sBAAsB;;;;;;AAGzD,MAAMC,KAAK,GA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EhB,IAAI;aAAC,EAAE;gBACtFiB,QAAQ,EAAE,IAAI;gBACdC,WAAW,EAAE,IAAI;gBACjBC,KAAK,EAAE,KAAK;gBACZC,KAAK,EAAE,QAAQ;aAChB,CAAC,AAAC;YAEHR,KAAK,CAACS,KAAK,EAAE,CAAC;QAChB,EAAE,OAAOC,KAAK,EAAE;YACd,gIAAgI;YAChI,mIAAmI;YACnIlC,KAAK,CAAC,4CAA4C,EAAEkC,KAAK,CAAC,CAAC;QAC7D,CAAC;QAEDlC,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAClC;CACD"}
@@ -0,0 +1,5 @@
1
+ // this file is intentionally left blank for the purposes of upgrading to SDK 52 via `npx expo install expo@next|latest --fix`.
2
+ // The upgrade of the `expo` package is completed under the old CLI version, which expects this file.
3
+ "use strict";
4
+
5
+ //# sourceMappingURL=flushDetached.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/utils/telemetry/flushDetached.ts"],"sourcesContent":["// this file is intentionally left blank for the purposes of upgrading to SDK 52 via `npx expo install expo@next|latest --fix`.\n// The upgrade of the `expo` package is completed under the old CLI version, which expects this file.\n"],"names":[],"mappings":"AAAA,+HAA+H;AAC/H,qGAAqG;AADrG"}
@@ -79,7 +79,7 @@ function createContext() {
79
79
  cpu: summarizeCpuInfo(),
80
80
  app: {
81
81
  name: "expo/cli",
82
- version: "0.19.10"
82
+ version: "0.19.12"
83
83
  },
84
84
  ci: _ciInfo().isCI ? {
85
85
  name: _ciInfo().name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/cli",
3
- "version": "0.19.10",
3
+ "version": "0.19.12",
4
4
  "description": "The Expo CLI",
5
5
  "main": "build/bin/cli",
6
6
  "bin": {
@@ -164,8 +164,9 @@
164
164
  "nullthrows": "^1.1.1",
165
165
  "playwright": "^1.40.1",
166
166
  "taskr": "^1.1.0",
167
+ "tempy": "^0.7.1",
167
168
  "tree-kill": "^1.2.2",
168
169
  "tsd": "^0.28.1"
169
170
  },
170
- "gitHead": "bcb207e3106cbb6568e419296f43e03703d6f0bc"
171
+ "gitHead": "5f7d8ead5082a943e29e36a61acb317947ac9d40"
171
172
  }