@expo/cli 0.24.4 → 0.24.5

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
@@ -123,7 +123,7 @@ const args = (0, _arg().default)({
123
123
  });
124
124
  if (args['--version']) {
125
125
  // Version is added in the build script.
126
- console.log("0.24.4");
126
+ console.log("0.24.5");
127
127
  process.exit(0);
128
128
  }
129
129
  if (args['--non-interactive']) {
@@ -22,7 +22,7 @@ function _undici() {
22
22
  };
23
23
  return data;
24
24
  }
25
- const _fetch = require("../../../utils/fetch");
25
+ const _fetch = require("../../fetch");
26
26
  const _constants = require("../utils/constants");
27
27
  class FetchClient {
28
28
  constructor({ fetch = createTelemetryFetch(), url = _constants.TELEMETRY_ENDPOINT, target = _constants.TELEMETRY_TARGET } = {}){
@@ -33,7 +33,7 @@ class FetchClient {
33
33
  this.headers = {
34
34
  accept: 'application/json',
35
35
  'content-type': 'application/json',
36
- 'user-agent': `expo-cli/${"0.24.4"}`,
36
+ 'user-agent': `expo-cli/${"0.24.5"}`,
37
37
  authorization: 'Basic ' + _nodebuffer().Buffer.from(`${target}:`).toString('base64')
38
38
  };
39
39
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/utils/telemetry/clients/FetchClient.ts"],"sourcesContent":["import { Buffer } from 'node:buffer';\nimport { URL } from 'node:url';\nimport { Agent, RetryAgent, type RequestInfo, type RequestInit } from 'undici';\n\nimport { fetch } from '../../../utils/fetch';\nimport { TelemetryClient, TelemetryClientStrategy, TelemetryRecordInternal } from '../types';\nimport { TELEMETRY_ENDPOINT, TELEMETRY_TARGET } from '../utils/constants';\n\ntype FetchClientOptions = {\n /** The fetch method for sending events, should handle retries and timeouts */\n fetch?: typeof fetch;\n /** The endpoint for recorded events */\n url?: string;\n /** The telemetry target for all events */\n target?: string;\n};\n\ntype FetchClientEntry = Promise<void> & {\n records: TelemetryRecordInternal[];\n controller: AbortController;\n};\n\nexport class FetchClient implements TelemetryClient {\n /** This client should be used for long-running commands */\n readonly strategy: TelemetryClientStrategy = 'instant';\n /** The fetch instance used to transport telemetry to the backend */\n private fetch: typeof fetch;\n /** The endpoint to send events to */\n private url: string;\n /** Additional headers to send with every event */\n private headers: RequestInit['headers'];\n /** All records that are queued and being sent */\n private entries: Set<FetchClientEntry> = new Set();\n\n constructor({\n fetch = createTelemetryFetch(),\n url = TELEMETRY_ENDPOINT,\n target = TELEMETRY_TARGET,\n }: FetchClientOptions = {}) {\n this.fetch = fetch;\n this.url = url;\n this.headers = {\n accept: 'application/json',\n 'content-type': 'application/json',\n 'user-agent': `expo-cli/${process.env.__EXPO_VERSION}`,\n authorization: 'Basic ' + Buffer.from(`${target}:`).toString('base64'),\n };\n }\n\n private queue(\n records: TelemetryRecordInternal[],\n controller: AbortController,\n request: ReturnType<typeof fetch>\n ) {\n const entry: FetchClientEntry = mutePromise(request) as any;\n entry.finally(() => this.entries.delete(entry));\n entry.controller = controller;\n entry.records = records;\n\n this.entries.add(entry);\n\n return entry;\n }\n\n record(record: TelemetryRecordInternal[]) {\n const records = Array.isArray(record) ? record : [record];\n\n if (!records.length) return;\n\n const controller = new AbortController();\n const body = JSON.stringify({\n sentAt: new Date(),\n batch: records,\n });\n\n return this.queue(\n records,\n controller,\n this.fetch(this.url, {\n body,\n method: 'POST',\n signal: controller.signal,\n headers: this.headers,\n })\n );\n }\n\n flush() {\n return mutePromise(Promise.all(this.entries));\n }\n\n abort() {\n const records: TelemetryRecordInternal[] = [];\n\n this.entries.forEach((entry) => {\n try {\n entry.controller.abort();\n records.push(...entry.records);\n } catch {\n // Ignore abort errors\n }\n });\n\n return records;\n }\n}\n\nfunction createTelemetryFetch(): typeof fetch {\n const agent = new RetryAgent(new Agent(), {\n maxRetries: 3,\n retryAfter: true,\n minTimeout: 500,\n maxTimeout: 2000,\n timeoutFactor: 2,\n });\n\n return (info: RequestInfo | URL, init: RequestInit = {}) =>\n fetch(extractUrl(info), { ...init, dispatcher: agent });\n}\n\n/** Extract the URL string from either `RequestInfo` or `URL` */\nfunction extractUrl(info: RequestInfo | URL) {\n if (typeof info === 'string') return info;\n if ('url' in info) return info.url;\n return info.toString();\n}\n\n/** Mute a promise by removing the original return type and hide errors */\nfunction mutePromise(promise: Promise<any>) {\n return promise.then(\n () => {},\n () => {}\n );\n}\n"],"names":["FetchClient","constructor","fetch","createTelemetryFetch","url","TELEMETRY_ENDPOINT","target","TELEMETRY_TARGET","strategy","entries","Set","headers","accept","process","env","__EXPO_VERSION","authorization","Buffer","from","toString","queue","records","controller","request","entry","mutePromise","finally","delete","add","record","Array","isArray","length","AbortController","body","JSON","stringify","sentAt","Date","batch","method","signal","flush","Promise","all","abort","forEach","push","agent","RetryAgent","Agent","maxRetries","retryAfter","minTimeout","maxTimeout","timeoutFactor","info","init","extractUrl","dispatcher","promise","then"],"mappings":";;;;+BAsBaA;;;eAAAA;;;;yBAtBU;;;;;;;yBAE+C;;;;;;uBAEhD;2BAE+B;AAgB9C,MAAMA;IAYXC,YAAY,EACVC,QAAQC,sBAAsB,EAC9BC,MAAMC,6BAAkB,EACxBC,SAASC,2BAAgB,EACN,GAAG,CAAC,CAAC,CAAE;QAf5B,yDAAyD,QAChDC,WAAoC;QAO7C,+CAA+C,QACvCC,UAAiC,IAAIC;QAO3C,IAAI,CAACR,KAAK,GAAGA;QACb,IAAI,CAACE,GAAG,GAAGA;QACX,IAAI,CAACO,OAAO,GAAG;YACbC,QAAQ;YACR,gBAAgB;YAChB,cAAc,CAAC,SAAS,EAAEC,QAAQC,GAAG,CAACC,cAAc,EAAE;YACtDC,eAAe,WAAWC,oBAAM,CAACC,IAAI,CAAC,GAAGZ,OAAO,CAAC,CAAC,EAAEa,QAAQ,CAAC;QAC/D;IACF;IAEQC,MACNC,OAAkC,EAClCC,UAA2B,EAC3BC,OAAiC,EACjC;QACA,MAAMC,QAA0BC,YAAYF;QAC5CC,MAAME,OAAO,CAAC,IAAM,IAAI,CAACjB,OAAO,CAACkB,MAAM,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AAuB;IACzC,IAAI,OAAOA,SAAS,UAAU,OAAOA;IACrC,IAAI,SAASA,MAAM,OAAOA,KAAKpD,GAAG;IAClC,OAAOoD,KAAKrC,QAAQ;AACtB;AAEA,wEAAwE,GACxE,SAASM,YAAYmC,OAAqB;IACxC,OAAOA,QAAQC,IAAI,CACjB,KAAO,GACP,KAAO;AAEX"}
1
+ {"version":3,"sources":["../../../../../src/utils/telemetry/clients/FetchClient.ts"],"sourcesContent":["import { Buffer } from 'node:buffer';\nimport { URL } from 'node:url';\nimport { Agent, RetryAgent, type RequestInfo, type RequestInit } from 'undici';\n\nimport { fetch } from '../../fetch';\nimport { TelemetryClient, TelemetryClientStrategy, TelemetryRecordInternal } from '../types';\nimport { TELEMETRY_ENDPOINT, TELEMETRY_TARGET } from '../utils/constants';\n\ntype Fetch = typeof fetch;\n\ntype FetchClientOptions = {\n /** The fetch method for sending events, should handle retries and timeouts */\n fetch?: Fetch;\n /** The endpoint for recorded events */\n url?: string;\n /** The telemetry target for all events */\n target?: string;\n};\n\ntype FetchClientEntry = Promise<void> & {\n records: TelemetryRecordInternal[];\n controller: AbortController;\n};\n\nexport class FetchClient implements TelemetryClient {\n /** This client should be used for long-running commands */\n readonly strategy: TelemetryClientStrategy = 'instant';\n /** The fetch instance used to transport telemetry to the backend */\n private fetch: Fetch;\n /** The endpoint to send events to */\n private url: string;\n /** Additional headers to send with every event */\n private headers: RequestInit['headers'];\n /** All records that are queued and being sent */\n private entries: Set<FetchClientEntry> = new Set();\n\n constructor({\n fetch = createTelemetryFetch(),\n url = TELEMETRY_ENDPOINT,\n target = TELEMETRY_TARGET,\n }: FetchClientOptions = {}) {\n this.fetch = fetch;\n this.url = url;\n this.headers = {\n accept: 'application/json',\n 'content-type': 'application/json',\n 'user-agent': `expo-cli/${process.env.__EXPO_VERSION}`,\n authorization: 'Basic ' + Buffer.from(`${target}:`).toString('base64'),\n };\n }\n\n private queue(\n records: TelemetryRecordInternal[],\n controller: AbortController,\n request: ReturnType<typeof fetch>\n ) {\n const entry: FetchClientEntry = mutePromise(request) as any;\n entry.finally(() => this.entries.delete(entry));\n entry.controller = controller;\n entry.records = records;\n\n this.entries.add(entry);\n\n return entry;\n }\n\n record(record: TelemetryRecordInternal[]) {\n const records = Array.isArray(record) ? record : [record];\n\n if (!records.length) return;\n\n const controller = new AbortController();\n const body = JSON.stringify({\n sentAt: new Date(),\n batch: records,\n });\n\n return this.queue(\n records,\n controller,\n this.fetch(this.url, {\n body,\n method: 'POST',\n signal: controller.signal,\n headers: this.headers,\n })\n );\n }\n\n flush() {\n return mutePromise(Promise.all(this.entries));\n }\n\n abort() {\n const records: TelemetryRecordInternal[] = [];\n\n this.entries.forEach((entry) => {\n try {\n entry.controller.abort();\n records.push(...entry.records);\n } catch {\n // Ignore abort errors\n }\n });\n\n return records;\n }\n}\n\nfunction createTelemetryFetch(): typeof fetch {\n const agent = new RetryAgent(new Agent(), {\n maxRetries: 3,\n retryAfter: true,\n minTimeout: 500,\n maxTimeout: 2000,\n timeoutFactor: 2,\n });\n\n return (info: RequestInfo | URL, init: RequestInit = {}) =>\n fetch(extractUrl(info), { ...init, dispatcher: agent });\n}\n\n/** Extract the URL string from either `RequestInfo` or `URL` */\nfunction extractUrl(info: RequestInfo | URL) {\n if (typeof info === 'string') return info;\n if ('url' in info) return info.url;\n return info.toString();\n}\n\n/** Mute a promise by removing the original return type and hide errors */\nfunction mutePromise(promise: Promise<any>) {\n return promise.then(\n () => {},\n () => {}\n );\n}\n"],"names":["FetchClient","constructor","fetch","createTelemetryFetch","url","TELEMETRY_ENDPOINT","target","TELEMETRY_TARGET","strategy","entries","Set","headers","accept","process","env","__EXPO_VERSION","authorization","Buffer","from","toString","queue","records","controller","request","entry","mutePromise","finally","delete","add","record","Array","isArray","length","AbortController","body","JSON","stringify","sentAt","Date","batch","method","signal","flush","Promise","all","abort","forEach","push","agent","RetryAgent","Agent","maxRetries","retryAfter","minTimeout","maxTimeout","timeoutFactor","info","init","extractUrl","dispatcher","promise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B,SAAS,IAAI,CAACA,OAAO;QACvB;IAEJ;IAEA+B,QAAQ;QACN,OAAOjB,YAAYkB,QAAQC,GAAG,CAAC,IAAI,CAACnC,OAAO;IAC7C;IAEAoC,QAAQ;QACN,MAAMxB,UAAqC,EAAE;QAE7C,IAAI,CAACZ,OAAO,CAACqC,OAAO,CAAC,CAACtB;YACpB,IAAI;gBACFA,MAAMF,UAAU,CAACuB,KAAK;gBACtBxB,QAAQ0B,IAAI,IAAIvB,MAAMH,OAAO;YAC/B,EAAE,OAAM;YACN,sBAAsB;YACxB;QACF;QAEA,OAAOA;IACT;AACF;AAEA,SAASlB;IACP,MAAM6C,QAAQ,IAAIC,CAAAA,SAAS,YAAC,CAAC,IAAIC,CAAAA,SAAI,OAAC,IAAI;QACxCC,YAAY;QACZC,YAAY;QACZC,YAAY;QACZC,YAAY;QACZC,eAAe;IACjB;IAEA,OAAO,CAACC,MAAyBC,OAAoB,CAAC,CAAC,GACrDvD,IAAAA,YAAK,EAACwD,WAAWF,OAAO;YAAE,GAAGC,IAAI;YAAEE,YAAYX;QAAM;AACzD;AAEA,8DAA8D,GAC9D,SAASU,WAAWF,IAAuB;IACzC,IAAI,OAAOA,SAAS,UAAU,OAAOA;IACrC,IAAI,SAASA,MAAM,OAAOA,KAAKpD,GAAG;IAClC,OAAOoD,KAAKrC,QAAQ;AACtB;AAEA,wEAAwE,GACxE,SAASM,YAAYmC,OAAqB;IACxC,OAAOA,QAAQC,IAAI,CACjB,KAAO,GACP,KAAO;AAEX"}
@@ -83,7 +83,7 @@ function createContext() {
83
83
  cpu: summarizeCpuInfo(),
84
84
  app: {
85
85
  name: 'expo/cli',
86
- version: "0.24.4"
86
+ version: "0.24.5"
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": "0.24.4",
3
+ "version": "0.24.5",
4
4
  "description": "The Expo CLI",
5
5
  "main": "build/bin/cli",
6
6
  "bin": {
@@ -42,17 +42,17 @@
42
42
  "@0no-co/graphql.web": "^1.0.8",
43
43
  "@babel/runtime": "^7.20.0",
44
44
  "@expo/code-signing-certificates": "^0.0.5",
45
- "@expo/config": "~11.0.4",
46
- "@expo/config-plugins": "~9.1.6",
45
+ "@expo/config": "~11.0.5",
46
+ "@expo/config-plugins": "~9.1.7",
47
47
  "@expo/devcert": "^1.1.2",
48
- "@expo/env": "~1.0.3",
49
- "@expo/image-utils": "^0.7.2",
50
- "@expo/json-file": "^9.1.2",
51
- "@expo/metro-config": "~0.20.6",
52
- "@expo/osascript": "^2.2.2",
53
- "@expo/package-manager": "^1.8.2",
54
- "@expo/plist": "^0.3.2",
55
- "@expo/prebuild-config": "^9.0.1",
48
+ "@expo/env": "~1.0.4",
49
+ "@expo/image-utils": "^0.7.3",
50
+ "@expo/json-file": "^9.1.3",
51
+ "@expo/metro-config": "~0.20.7",
52
+ "@expo/osascript": "^2.2.3",
53
+ "@expo/package-manager": "^1.8.3",
54
+ "@expo/plist": "^0.3.3",
55
+ "@expo/prebuild-config": "^9.0.2",
56
56
  "@expo/spawn-async": "^1.7.2",
57
57
  "@expo/ws-tunnel": "^1.0.1",
58
58
  "@expo/xcpretty": "^4.3.0",
@@ -139,7 +139,7 @@
139
139
  "@types/ws": "^8.5.4",
140
140
  "devtools-protocol": "^0.0.1113120",
141
141
  "expo-atlas": "^0.4.0",
142
- "expo-module-scripts": "^4.1.4",
142
+ "expo-module-scripts": "^4.1.5",
143
143
  "find-process": "^1.4.7",
144
144
  "jest-runner-tsd": "^6.0.0",
145
145
  "klaw-sync": "^6.0.0",
@@ -152,5 +152,5 @@
152
152
  "tree-kill": "^1.2.2",
153
153
  "tsd": "^0.28.1"
154
154
  },
155
- "gitHead": "dd4ea2ac865a2b0c1f4ea3fc5879d90679099862"
155
+ "gitHead": "3cd208465df78e385ca9380531bbbfe33ca68e81"
156
156
  }