@expo/cli 55.0.32 → 55.0.33
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 +1 -1
- package/build/src/events/index.js +1 -1
- package/build/src/run/ios/appleDevice/client/LockdowndClient.js +1 -1
- package/build/src/run/ios/appleDevice/client/LockdowndClient.js.map +1 -1
- package/build/src/utils/findUp.js +17 -19
- package/build/src/utils/findUp.js.map +1 -1
- package/build/src/utils/qr.js +5 -4
- package/build/src/utils/qr.js.map +1 -1
- package/build/src/utils/telemetry/clients/FetchClient.js +1 -1
- package/build/src/utils/telemetry/utils/context.js +1 -1
- package/package.json +7 -7
package/build/bin/cli
CHANGED
|
@@ -112,7 +112,7 @@ class LockdowndClient extends _ServiceClient.ServiceClient {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
async startSession(pairRecord) {
|
|
115
|
-
debug(
|
|
115
|
+
debug('startSession');
|
|
116
116
|
const resp = await this.protocolClient.sendMessage({
|
|
117
117
|
Request: 'StartSession',
|
|
118
118
|
HostID: pairRecord.HostID,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/run/ios/appleDevice/client/LockdowndClient.ts"],"sourcesContent":["/**\n * Copyright (c) 2021 Expo, Inc.\n * Copyright (c) 2018 Drifty Co.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport Debug from 'debug';\nimport { Socket } from 'net';\nimport * as tls from 'tls';\n\nimport { ResponseError, ServiceClient } from './ServiceClient';\nimport { UsbmuxdPairRecord } from './UsbmuxdClient';\nimport { LockdownProtocolClient } from '../protocol/LockdownProtocol';\n\nconst debug = Debug('expo:apple-device:client:lockdownd');\n\nexport interface DeviceValues {\n BasebandCertId: number;\n BasebandKeyHashInformation: {\n AKeyStatus: number;\n SKeyHash: Buffer;\n SKeyStatus: number;\n };\n BasebandSerialNumber: Buffer;\n BasebandVersion: string;\n BoardId: number;\n BuildVersion: string;\n ChipID: number;\n ConnectionType: 'USB' | 'Network';\n DeviceClass: string;\n DeviceColor: string;\n DeviceName: string;\n DieID: number;\n HardwareModel: string;\n HasSiDP: boolean;\n PartitionType: string;\n ProductName: string;\n ProductType: string;\n ProductVersion: string;\n ProductionSOC: boolean;\n ProtocolVersion: string;\n TelephonyCapability: boolean;\n UniqueChipID: number;\n UniqueDeviceID: string;\n WiFiAddress: string;\n [key: string]: any;\n}\n\ninterface LockdowndServiceResponse {\n Request: 'StartService';\n Service: string;\n Port: number;\n EnableServiceSSL?: boolean; // Only on iOS 13+\n}\n\ninterface LockdowndSessionResponse {\n Request: 'StartSession';\n EnableSessionSSL: boolean;\n}\n\ninterface LockdowndAllValuesResponse {\n Request: 'GetValue';\n Value: DeviceValues;\n}\n\ninterface LockdowndValueResponse {\n Request: 'GetValue';\n Key: string;\n Value: string;\n}\n\ninterface LockdowndQueryTypeResponse {\n Request: 'QueryType';\n Type: string;\n}\n\nfunction isLockdowndServiceResponse(resp: any): resp is LockdowndServiceResponse {\n return resp.Request === 'StartService' && resp.Service !== undefined && resp.Port !== undefined;\n}\n\nfunction isLockdowndSessionResponse(resp: any): resp is LockdowndSessionResponse {\n return resp.Request === 'StartSession';\n}\n\nfunction isLockdowndAllValuesResponse(resp: any): resp is LockdowndAllValuesResponse {\n return resp.Request === 'GetValue' && resp.Value !== undefined;\n}\n\nfunction isLockdowndValueResponse(resp: any): resp is LockdowndValueResponse {\n return resp.Request === 'GetValue' && resp.Key !== undefined && typeof resp.Value === 'string';\n}\n\nfunction isLockdowndQueryTypeResponse(resp: any): resp is LockdowndQueryTypeResponse {\n return resp.Request === 'QueryType' && resp.Type !== undefined;\n}\n\nexport class LockdowndClient extends ServiceClient<LockdownProtocolClient> {\n constructor(public socket: Socket) {\n super(socket, new LockdownProtocolClient(socket));\n }\n\n async startService(name: string) {\n debug(`startService: ${name}`);\n\n const resp = await this.protocolClient.sendMessage({\n Request: 'StartService',\n Service: name,\n });\n\n if (isLockdowndServiceResponse(resp)) {\n return { port: resp.Port, enableServiceSSL: !!resp.EnableServiceSSL };\n } else {\n throw new ResponseError(`Error starting service ${name}`, resp);\n }\n }\n\n async startSession(pairRecord: UsbmuxdPairRecord) {\n debug(
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/run/ios/appleDevice/client/LockdowndClient.ts"],"sourcesContent":["/**\n * Copyright (c) 2021 Expo, Inc.\n * Copyright (c) 2018 Drifty Co.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport Debug from 'debug';\nimport { Socket } from 'net';\nimport * as tls from 'tls';\n\nimport { ResponseError, ServiceClient } from './ServiceClient';\nimport { UsbmuxdPairRecord } from './UsbmuxdClient';\nimport { LockdownProtocolClient } from '../protocol/LockdownProtocol';\n\nconst debug = Debug('expo:apple-device:client:lockdownd');\n\nexport interface DeviceValues {\n BasebandCertId: number;\n BasebandKeyHashInformation: {\n AKeyStatus: number;\n SKeyHash: Buffer;\n SKeyStatus: number;\n };\n BasebandSerialNumber: Buffer;\n BasebandVersion: string;\n BoardId: number;\n BuildVersion: string;\n ChipID: number;\n ConnectionType: 'USB' | 'Network';\n DeviceClass: string;\n DeviceColor: string;\n DeviceName: string;\n DieID: number;\n HardwareModel: string;\n HasSiDP: boolean;\n PartitionType: string;\n ProductName: string;\n ProductType: string;\n ProductVersion: string;\n ProductionSOC: boolean;\n ProtocolVersion: string;\n TelephonyCapability: boolean;\n UniqueChipID: number;\n UniqueDeviceID: string;\n WiFiAddress: string;\n [key: string]: any;\n}\n\ninterface LockdowndServiceResponse {\n Request: 'StartService';\n Service: string;\n Port: number;\n EnableServiceSSL?: boolean; // Only on iOS 13+\n}\n\ninterface LockdowndSessionResponse {\n Request: 'StartSession';\n EnableSessionSSL: boolean;\n}\n\ninterface LockdowndAllValuesResponse {\n Request: 'GetValue';\n Value: DeviceValues;\n}\n\ninterface LockdowndValueResponse {\n Request: 'GetValue';\n Key: string;\n Value: string;\n}\n\ninterface LockdowndQueryTypeResponse {\n Request: 'QueryType';\n Type: string;\n}\n\nfunction isLockdowndServiceResponse(resp: any): resp is LockdowndServiceResponse {\n return resp.Request === 'StartService' && resp.Service !== undefined && resp.Port !== undefined;\n}\n\nfunction isLockdowndSessionResponse(resp: any): resp is LockdowndSessionResponse {\n return resp.Request === 'StartSession';\n}\n\nfunction isLockdowndAllValuesResponse(resp: any): resp is LockdowndAllValuesResponse {\n return resp.Request === 'GetValue' && resp.Value !== undefined;\n}\n\nfunction isLockdowndValueResponse(resp: any): resp is LockdowndValueResponse {\n return resp.Request === 'GetValue' && resp.Key !== undefined && typeof resp.Value === 'string';\n}\n\nfunction isLockdowndQueryTypeResponse(resp: any): resp is LockdowndQueryTypeResponse {\n return resp.Request === 'QueryType' && resp.Type !== undefined;\n}\n\nexport class LockdowndClient extends ServiceClient<LockdownProtocolClient> {\n constructor(public socket: Socket) {\n super(socket, new LockdownProtocolClient(socket));\n }\n\n async startService(name: string) {\n debug(`startService: ${name}`);\n\n const resp = await this.protocolClient.sendMessage({\n Request: 'StartService',\n Service: name,\n });\n\n if (isLockdowndServiceResponse(resp)) {\n return { port: resp.Port, enableServiceSSL: !!resp.EnableServiceSSL };\n } else {\n throw new ResponseError(`Error starting service ${name}`, resp);\n }\n }\n\n async startSession(pairRecord: UsbmuxdPairRecord) {\n debug('startSession');\n\n const resp = await this.protocolClient.sendMessage({\n Request: 'StartSession',\n HostID: pairRecord.HostID,\n SystemBUID: pairRecord.SystemBUID,\n });\n\n if (isLockdowndSessionResponse(resp)) {\n if (resp.EnableSessionSSL) {\n this.protocolClient.socket = new tls.TLSSocket(this.protocolClient.socket, {\n secureContext: tls.createSecureContext({\n // Avoid using `secureProtocol` fixing the socket to a single TLS version.\n // Newer Node versions might not support older TLS versions.\n // By using the default `minVersion` and `maxVersion` options,\n // The socket will automatically use the appropriate TLS version.\n // See: https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions\n cert: pairRecord.RootCertificate,\n key: pairRecord.RootPrivateKey,\n }),\n });\n debug(`Socket upgraded to TLS connection`);\n }\n // TODO: save sessionID for StopSession?\n } else {\n throw new ResponseError('Error starting session', resp);\n }\n }\n\n async getAllValues() {\n debug(`getAllValues`);\n\n const resp = await this.protocolClient.sendMessage({ Request: 'GetValue' });\n\n if (isLockdowndAllValuesResponse(resp)) {\n return resp.Value;\n } else {\n throw new ResponseError('Error getting lockdown value', resp);\n }\n }\n\n async getValue(val: string) {\n debug(`getValue: ${val}`);\n\n const resp = await this.protocolClient.sendMessage({\n Request: 'GetValue',\n Key: val,\n });\n\n if (isLockdowndValueResponse(resp)) {\n return resp.Value;\n } else {\n throw new ResponseError('Error getting lockdown value', resp);\n }\n }\n\n async queryType() {\n debug('queryType');\n\n const resp = await this.protocolClient.sendMessage({\n Request: 'QueryType',\n });\n\n if (isLockdowndQueryTypeResponse(resp)) {\n return resp.Type;\n } else {\n throw new ResponseError('Error getting lockdown query type', resp);\n }\n }\n\n async doHandshake(pairRecord: UsbmuxdPairRecord) {\n debug('doHandshake');\n\n // if (await this.lockdownQueryType() !== 'com.apple.mobile.lockdown') {\n // throw new CommandError('Invalid type received from lockdown handshake');\n // }\n // await this.getLockdownValue('ProductVersion');\n // TODO: validate pair and pair\n await this.startSession(pairRecord);\n }\n}\n"],"names":["LockdowndClient","debug","Debug","isLockdowndServiceResponse","resp","Request","Service","undefined","Port","isLockdowndSessionResponse","isLockdowndAllValuesResponse","Value","isLockdowndValueResponse","Key","isLockdowndQueryTypeResponse","Type","ServiceClient","constructor","socket","LockdownProtocolClient","startService","name","protocolClient","sendMessage","port","enableServiceSSL","EnableServiceSSL","ResponseError","startSession","pairRecord","HostID","SystemBUID","EnableSessionSSL","tls","TLSSocket","secureContext","createSecureContext","cert","RootCertificate","key","RootPrivateKey","getAllValues","getValue","val","queryType","doHandshake"],"mappings":"AAAA;;;;;;CAMC;;;;+BA2FYA;;;eAAAA;;;;gEA1FK;;;;;;;iEAEG;;;;;;+BAEwB;kCAEN;;;;;;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CAAC;YACjDlB,SAAS;QACX;QAEA,IAAIS,6BAA6BV,OAAO;YACtC,OAAOA,KAAKW,IAAI;QAClB,OAAO;YACL,MAAM,IAAIY,4BAAa,CAAC,qCAAqCvB;QAC/D;IACF;IAEA,MAAMyC,YAAYhB,UAA6B,EAAE;QAC/C5B,MAAM;QAEN,wEAAwE;QACxE,6EAA6E;QAC7E,IAAI;QACJ,iDAAiD;QACjD,+BAA+B;QAC/B,MAAM,IAAI,CAAC2B,YAAY,CAACC;IAC1B;AACF"}
|
|
@@ -16,16 +16,16 @@ _export(exports, {
|
|
|
16
16
|
return findUpProjectRootOrAssert;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
function
|
|
20
|
-
const data = /*#__PURE__*/ _interop_require_default(require("
|
|
21
|
-
|
|
19
|
+
function _fs() {
|
|
20
|
+
const data = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
21
|
+
_fs = function() {
|
|
22
22
|
return data;
|
|
23
23
|
};
|
|
24
24
|
return data;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
const data = /*#__PURE__*/ _interop_require_default(require("
|
|
28
|
-
|
|
26
|
+
function _path() {
|
|
27
|
+
const data = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
28
|
+
_path = function() {
|
|
29
29
|
return data;
|
|
30
30
|
};
|
|
31
31
|
return data;
|
|
@@ -41,21 +41,19 @@ function findUpProjectRootOrAssert(cwd) {
|
|
|
41
41
|
if (!projectRoot) {
|
|
42
42
|
throw new _errors.CommandError(`Project root directory not found (working directory: ${cwd})`);
|
|
43
43
|
}
|
|
44
|
-
return projectRoot;
|
|
44
|
+
return _path().default.dirname(projectRoot);
|
|
45
45
|
}
|
|
46
|
-
function findUpProjectRoot(
|
|
47
|
-
|
|
48
|
-
if (found) return _path().default.dirname(found);
|
|
49
|
-
const parent = _path().default.dirname(cwd);
|
|
50
|
-
if (parent === cwd) return null;
|
|
51
|
-
return findUpProjectRoot(parent);
|
|
46
|
+
function findUpProjectRoot(root) {
|
|
47
|
+
return findFileInParents(root, 'package.json');
|
|
52
48
|
}
|
|
53
|
-
function findFileInParents(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
49
|
+
function findFileInParents(root, fileName) {
|
|
50
|
+
for(let dir = root; _path().default.dirname(dir) !== dir; dir = _path().default.dirname(dir)){
|
|
51
|
+
const file = _path().default.resolve(dir, fileName);
|
|
52
|
+
if (_fs().default.existsSync(file)) {
|
|
53
|
+
return file;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return null;
|
|
59
57
|
}
|
|
60
58
|
|
|
61
59
|
//# sourceMappingURL=findUp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/findUp.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/findUp.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\n\nimport { CommandError } from '../utils/errors';\n\n/** Look up directories until one with a `package.json` can be found, assert if none can be found. */\nexport function findUpProjectRootOrAssert(cwd: string): string {\n const projectRoot = findUpProjectRoot(cwd);\n if (!projectRoot) {\n throw new CommandError(`Project root directory not found (working directory: ${cwd})`);\n }\n return path.dirname(projectRoot);\n}\n\nfunction findUpProjectRoot(root: string): string | null {\n return findFileInParents(root, 'package.json');\n}\n\n/**\n * Find a file in the (closest) parent directories.\n * This will recursively look for the file, until the root directory is reached.\n */\nexport function findFileInParents(root: string, fileName: string): string | null {\n for (let dir = root; path.dirname(dir) !== dir; dir = path.dirname(dir)) {\n const file = path.resolve(dir, fileName);\n if (fs.existsSync(file)) {\n return file;\n }\n }\n return null;\n}\n"],"names":["findFileInParents","findUpProjectRootOrAssert","cwd","projectRoot","findUpProjectRoot","CommandError","path","dirname","root","fileName","dir","file","resolve","fs","existsSync"],"mappings":";;;;;;;;;;;IAsBgBA,iBAAiB;eAAjBA;;IAhBAC,yBAAyB;eAAzBA;;;;gEAND;;;;;;;gEACE;;;;;;wBAEY;;;;;;AAGtB,SAASA,0BAA0BC,GAAW;IACnD,MAAMC,cAAcC,kBAAkBF;IACtC,IAAI,CAACC,aAAa;QAChB,MAAM,IAAIE,oBAAY,CAAC,CAAC,qDAAqD,EAAEH,IAAI,CAAC,CAAC;IACvF;IACA,OAAOI,eAAI,CAACC,OAAO,CAACJ;AACtB;AAEA,SAASC,kBAAkBI,IAAY;IACrC,OAAOR,kBAAkBQ,MAAM;AACjC;AAMO,SAASR,kBAAkBQ,IAAY,EAAEC,QAAgB;IAC9D,IAAK,IAAIC,MAAMF,MAAMF,eAAI,CAACC,OAAO,CAACG,SAASA,KAAKA,MAAMJ,eAAI,CAACC,OAAO,CAACG,KAAM;QACvE,MAAMC,OAAOL,eAAI,CAACM,OAAO,CAACF,KAAKD;QAC/B,IAAII,aAAE,CAACC,UAAU,CAACH,OAAO;YACvB,OAAOA;QACT;IACF;IACA,OAAO;AACT"}
|
package/build/src/utils/qr.js
CHANGED
|
@@ -81,18 +81,19 @@ function printQRCode(url) {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
/** On specific terminals we can print a smaller QR code */ function supportsSextants() {
|
|
84
|
-
var
|
|
84
|
+
var _process_env_KITTY_WINDOW_ID, _process_env_ALACRITTY_WINDOW_ID;
|
|
85
85
|
if (_env.env.CI || !_nodetty().default.isatty(1) || !_nodetty().default.isatty(2)) {
|
|
86
86
|
return false;
|
|
87
87
|
} else if (process.env.COLOR === '0' || process.env.COLOR === 'false') {
|
|
88
88
|
return false;
|
|
89
89
|
}
|
|
90
|
-
const isWindowsTerminal = process.platform === 'win32' && !!((_process_env_WT_SESSION = process.env.WT_SESSION) == null ? void 0 : _process_env_WT_SESSION.length);
|
|
91
90
|
const isGhostty = process.env.TERM_PROGRAM === 'ghostty';
|
|
92
91
|
const isWezterm = process.env.TERM_PROGRAM === 'WezTerm';
|
|
92
|
+
// NOTE(@kitten): Zed regressed on rendering sextants
|
|
93
|
+
const isZed = process.env.TERM_PROGRAM === 'zed';
|
|
93
94
|
const isKitty = !!((_process_env_KITTY_WINDOW_ID = process.env.KITTY_WINDOW_ID) == null ? void 0 : _process_env_KITTY_WINDOW_ID.length);
|
|
94
|
-
const isAlacritty = !!((_process_env_ALACRITTY_WINDOW_ID = process.env.ALACRITTY_WINDOW_ID) == null ? void 0 : _process_env_ALACRITTY_WINDOW_ID.length);
|
|
95
|
-
return
|
|
95
|
+
const isAlacritty = !!((_process_env_ALACRITTY_WINDOW_ID = process.env.ALACRITTY_WINDOW_ID) == null ? void 0 : _process_env_ALACRITTY_WINDOW_ID.length) && !isZed;
|
|
96
|
+
return isGhostty || isWezterm || isKitty || isAlacritty;
|
|
96
97
|
}
|
|
97
98
|
/** ANSI QR code output by using half-blocks (1x2-sized unicode blocks) */ function createHalfblockOutput(data) {
|
|
98
99
|
const extent = Math.sqrt(data.byteLength) | 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/qr.ts"],"sourcesContent":["import tty from 'node:tty';\nimport { toQR } from 'toqr';\n\nimport { env } from './env';\nimport * as Log from '../log';\n\nexport interface QROutput {\n lines: number;\n print(): void;\n}\n\n/** Print the world famous 'Expo QR Code'. */\nexport function printQRCode(url: string): QROutput {\n const qr = toQR(url);\n const output = supportsSextants() ? createSextantOutput(qr) : createHalfblockOutput(qr);\n return {\n lines: output.split('\\n').length,\n print() {\n Log.log(output);\n },\n };\n}\n\n/** On specific terminals we can print a smaller QR code */\nfunction supportsSextants() {\n if (env.CI || !tty.isatty(1) || !tty.isatty(2)) {\n return false;\n } else if (process.env.COLOR === '0' || process.env.COLOR === 'false') {\n return false;\n }\n const
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/qr.ts"],"sourcesContent":["import tty from 'node:tty';\nimport { toQR } from 'toqr';\n\nimport { env } from './env';\nimport * as Log from '../log';\n\nexport interface QROutput {\n lines: number;\n print(): void;\n}\n\n/** Print the world famous 'Expo QR Code'. */\nexport function printQRCode(url: string): QROutput {\n const qr = toQR(url);\n const output = supportsSextants() ? createSextantOutput(qr) : createHalfblockOutput(qr);\n return {\n lines: output.split('\\n').length,\n print() {\n Log.log(output);\n },\n };\n}\n\n/** On specific terminals we can print a smaller QR code */\nfunction supportsSextants() {\n if (env.CI || !tty.isatty(1) || !tty.isatty(2)) {\n return false;\n } else if (process.env.COLOR === '0' || process.env.COLOR === 'false') {\n return false;\n }\n const isGhostty = process.env.TERM_PROGRAM === 'ghostty';\n const isWezterm = process.env.TERM_PROGRAM === 'WezTerm';\n // NOTE(@kitten): Zed regressed on rendering sextants\n const isZed = process.env.TERM_PROGRAM === 'zed';\n const isKitty = !!process.env.KITTY_WINDOW_ID?.length;\n const isAlacritty = !!process.env.ALACRITTY_WINDOW_ID?.length && !isZed;\n return isGhostty || isWezterm || isKitty || isAlacritty;\n}\n\n/** ANSI QR code output by using half-blocks (1x2-sized unicode blocks) */\nfunction createHalfblockOutput(data: Uint8Array): string {\n const extent = Math.sqrt(data.byteLength) | 0;\n const CHAR_00 = '\\u2588';\n const CHAR_10 = '\\u2584';\n const CHAR_01 = '\\u2580';\n const CHAR_11 = ' ';\n let output = '';\n output += CHAR_10.repeat(extent + 2);\n for (let row = 0; row < extent; row += 2) {\n output += '\\n' + CHAR_00;\n for (let col = 0; col < extent; col++) {\n const value = (data[row * extent + col] << 1) | data[(row + 1) * extent + col];\n switch (value) {\n case 0b00:\n output += CHAR_00;\n break;\n case 0b01:\n output += CHAR_01;\n break;\n case 0b10:\n output += CHAR_10;\n break;\n case 0b11:\n output += CHAR_11;\n break;\n }\n }\n output += CHAR_00;\n }\n if (extent % 2 === 0) {\n output += '\\n' + CHAR_01.repeat(extent + 2);\n }\n output += '\\n';\n return output;\n}\n\n/** ANSI QR code output by using sextant-blocks (2x3-sized unicode blocks) */\nfunction createSextantOutput(data: Uint8Array): string {\n const getChar = (p: number): string => {\n // Invert then reverse\n let char = p ^ 0b111111;\n char = ((char & 0xaa) >> 1) | ((char & 0x55) << 1);\n char = ((char & 0xcc) >> 2) | ((char & 0x33) << 2);\n char = (char >> 4) | (char << 4);\n char = (char >> 2) & 63;\n switch (char) {\n case 0:\n return ' ';\n case 63:\n return '\\u2588';\n case 21:\n return '\\u258C';\n case 42:\n return '\\u2590';\n default:\n return String.fromCodePoint(0x1fb00 + char - 1 - (char > 21 ? 1 : 0) - (char > 42 ? 1 : 0));\n }\n };\n const extent = Math.sqrt(data.byteLength) | 0;\n const padded = extent + 2;\n let output = '';\n for (let baseRow = 0; baseRow < padded; baseRow += 3) {\n if (baseRow) output += '\\n';\n for (let baseCol = 0; baseCol < padded; baseCol += 2) {\n let p = 0;\n for (let dr = 0; dr < 3; dr++) {\n for (let dc = 0; dc < 2; dc++) {\n const r = baseRow + dr;\n const c = baseCol + dc;\n const bit = 5 - (dr * 2 + dc);\n let cell = 1; // default empty (out of bounds)\n if (r < padded && c < padded) {\n if (r === 0 || c === 0 || r === padded - 1 || c === padded - 1) {\n cell = 0; // border is filled\n } else if (r <= extent && c <= extent) {\n cell = data[(r - 1) * extent + (c - 1)];\n }\n }\n p |= (cell & 1) << bit;\n }\n }\n output += getChar(p);\n }\n }\n if (padded % 3 === 0) {\n // Only add newline if the padded output lines up with a newline exactly\n output += '\\n';\n }\n return output;\n}\n"],"names":["printQRCode","url","qr","toQR","output","supportsSextants","createSextantOutput","createHalfblockOutput","lines","split","length","print","Log","log","process","env","CI","tty","isatty","COLOR","isGhostty","TERM_PROGRAM","isWezterm","isZed","isKitty","KITTY_WINDOW_ID","isAlacritty","ALACRITTY_WINDOW_ID","data","extent","Math","sqrt","byteLength","CHAR_00","CHAR_10","CHAR_01","CHAR_11","repeat","row","col","value","getChar","p","char","String","fromCodePoint","padded","baseRow","baseCol","dr","dc","r","c","bit","cell"],"mappings":";;;;+BAYgBA;;;eAAAA;;;;gEAZA;;;;;;;yBACK;;;;;;qBAED;6DACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQd,SAAS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C,WAAW,EAAG;QACpD,IAAIA,SAAS3C,UAAU;QACvB,IAAK,IAAI4C,UAAU,GAAGA,UAAUF,QAAQE,WAAW,EAAG;YACpD,IAAIN,IAAI;YACR,IAAK,IAAIO,KAAK,GAAGA,KAAK,GAAGA,KAAM;gBAC7B,IAAK,IAAIC,KAAK,GAAGA,KAAK,GAAGA,KAAM;oBAC7B,MAAMC,IAAIJ,UAAUE;oBACpB,MAAMG,IAAIJ,UAAUE;oBACpB,MAAMG,MAAM,IAAKJ,CAAAA,KAAK,IAAIC,EAAC;oBAC3B,IAAII,OAAO,GAAG,gCAAgC;oBAC9C,IAAIH,IAAIL,UAAUM,IAAIN,QAAQ;wBAC5B,IAAIK,MAAM,KAAKC,MAAM,KAAKD,MAAML,SAAS,KAAKM,MAAMN,SAAS,GAAG;4BAC9DQ,OAAO,GAAG,mBAAmB;wBAC/B,OAAO,IAAIH,KAAKtB,UAAUuB,KAAKvB,QAAQ;4BACrCyB,OAAO1B,IAAI,CAAC,AAACuB,CAAAA,IAAI,CAAA,IAAKtB,SAAUuB,CAAAA,IAAI,CAAA,EAAG;wBACzC;oBACF;oBACAV,KAAK,AAACY,CAAAA,OAAO,CAAA,KAAMD;gBACrB;YACF;YACAjD,UAAUqC,QAAQC;QACpB;IACF;IACA,IAAII,SAAS,MAAM,GAAG;QACpB,wEAAwE;QACxE1C,UAAU;IACZ;IACA,OAAOA;AACT"}
|
|
@@ -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.
|
|
29
|
+
'user-agent': `expo-cli/${"55.0.33"}`,
|
|
30
30
|
authorization: 'Basic ' + _nodebuffer().Buffer.from(`${target}:`).toString('base64')
|
|
31
31
|
};
|
|
32
32
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/cli",
|
|
3
|
-
"version": "55.0.
|
|
3
|
+
"version": "55.0.33",
|
|
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.
|
|
44
|
+
"@expo/config": "~55.0.18",
|
|
45
45
|
"@expo/config-plugins": "~55.0.10",
|
|
46
46
|
"@expo/devcert": "^1.2.1",
|
|
47
47
|
"@expo/env": "~2.1.2",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"@expo/json-file": "^10.0.15",
|
|
50
50
|
"@expo/log-box": "55.0.12",
|
|
51
51
|
"@expo/metro": "~55.1.1",
|
|
52
|
-
"@expo/metro-config": "~55.0.
|
|
52
|
+
"@expo/metro-config": "~55.0.24",
|
|
53
53
|
"@expo/osascript": "^2.4.4",
|
|
54
|
-
"@expo/package-manager": "^1.10.
|
|
54
|
+
"@expo/package-manager": "^1.10.6",
|
|
55
55
|
"@expo/plist": "^0.5.4",
|
|
56
|
-
"@expo/prebuild-config": "^55.0.
|
|
56
|
+
"@expo/prebuild-config": "^55.0.19",
|
|
57
57
|
"@expo/require-utils": "^55.0.5",
|
|
58
58
|
"@expo/router-server": "^55.0.18",
|
|
59
59
|
"@expo/schema-utils": "^55.0.4",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"compression": "^1.7.4",
|
|
72
72
|
"connect": "^3.7.0",
|
|
73
73
|
"debug": "^4.3.4",
|
|
74
|
-
"dnssd-advertise": "^1.1.
|
|
74
|
+
"dnssd-advertise": "^1.1.6",
|
|
75
75
|
"expo-server": "^55.0.11",
|
|
76
76
|
"fetch-nodeshim": "^0.4.10",
|
|
77
77
|
"getenv": "^2.0.0",
|
|
@@ -158,5 +158,5 @@
|
|
|
158
158
|
"tree-kill": "^1.2.2",
|
|
159
159
|
"tsd": "^0.28.1"
|
|
160
160
|
},
|
|
161
|
-
"gitHead": "
|
|
161
|
+
"gitHead": "0c1476ccb1494a2019171f5df1d7a1b7803455e9"
|
|
162
162
|
}
|