@expo/cli 0.24.2 → 0.24.4
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/install/utils/checkPackagesCompatibility.js +1 -1
- package/build/src/install/utils/checkPackagesCompatibility.js.map +1 -1
- package/build/src/lint/ESlintPrerequisite.js +2 -2
- package/build/src/lint/ESlintPrerequisite.js.map +1 -1
- package/build/src/lint/index.js +45 -47
- package/build/src/lint/index.js.map +1 -1
- package/build/src/lint/lintAsync.js +150 -4
- package/build/src/lint/lintAsync.js.map +1 -1
- package/build/src/lint/resolveOptions.js +115 -0
- package/build/src/lint/resolveOptions.js.map +1 -0
- package/build/src/prebuild/renameTemplateAppName.js +4 -1
- package/build/src/prebuild/renameTemplateAppName.js.map +1 -1
- package/build/src/run/android/runAndroidAsync.js +20 -19
- package/build/src/run/android/runAndroidAsync.js.map +1 -1
- package/build/src/run/ios/runIosAsync.js +4 -2
- package/build/src/run/ios/runIosAsync.js.map +1 -1
- package/build/src/run/remoteBuildCache.js +27 -115
- package/build/src/run/remoteBuildCache.js.map +1 -1
- package/build/src/start/server/metro/log-box/formatProjectFilePath.js +15 -12
- package/build/src/start/server/metro/log-box/formatProjectFilePath.js.map +1 -1
- package/build/src/start/server/middleware/metroOptions.js +2 -1
- package/build/src/start/server/middleware/metroOptions.js.map +1 -1
- package/build/src/utils/ip.js +7 -104
- package/build/src/utils/ip.js.map +1 -1
- package/build/src/utils/remote-build-cache-providers/eas.js +147 -0
- package/build/src/utils/remote-build-cache-providers/eas.js.map +1 -0
- package/build/src/utils/remote-build-cache-providers/helpers.js +25 -0
- package/build/src/utils/remote-build-cache-providers/helpers.js.map +1 -0
- package/build/src/utils/resolveArgs.js +8 -0
- package/build/src/utils/resolveArgs.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/build/src/utils/variadic.js +63 -6
- package/build/src/utils/variadic.js.map +1 -1
- package/package.json +9 -9
package/build/src/utils/ip.js
CHANGED
|
@@ -8,117 +8,20 @@ Object.defineProperty(exports, "getIpAddress", {
|
|
|
8
8
|
return getIpAddress;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
function
|
|
12
|
-
const data =
|
|
13
|
-
|
|
11
|
+
function _lannetwork() {
|
|
12
|
+
const data = require("lan-network");
|
|
13
|
+
_lannetwork = function() {
|
|
14
14
|
return data;
|
|
15
15
|
};
|
|
16
16
|
return data;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
const data = require("node:child_process");
|
|
20
|
-
_nodechild_process = function() {
|
|
21
|
-
return data;
|
|
22
|
-
};
|
|
23
|
-
return data;
|
|
24
|
-
}
|
|
25
|
-
function _nodenet() {
|
|
26
|
-
const data = require("node:net");
|
|
27
|
-
_nodenet = function() {
|
|
28
|
-
return data;
|
|
29
|
-
};
|
|
30
|
-
return data;
|
|
31
|
-
}
|
|
32
|
-
function _nodeos() {
|
|
33
|
-
const data = require("node:os");
|
|
34
|
-
_nodeos = function() {
|
|
35
|
-
return data;
|
|
36
|
-
};
|
|
37
|
-
return data;
|
|
38
|
-
}
|
|
39
|
-
function _interop_require_default(obj) {
|
|
40
|
-
return obj && obj.__esModule ? obj : {
|
|
41
|
-
default: obj
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
/** Gets a route address by opening a UDP socket to a publicly routed address.
|
|
45
|
-
* @privateRemarks
|
|
46
|
-
* This is wrapped in `spawnSync` since the original `getIpAddress` utility exported
|
|
47
|
-
* in this module is used synchronosly. An appropriate timeout has been set and UDP
|
|
48
|
-
* ports don't send a message when opened.
|
|
49
|
-
* @throws if `spawnSync` fails
|
|
50
|
-
*/ function getRouteAddress() {
|
|
51
|
-
const { error, status, stdout } = (0, _nodechild_process().spawnSync)(process.execPath, [
|
|
52
|
-
'-'
|
|
53
|
-
], {
|
|
54
|
-
// This should be the cheapest method to determine the default route
|
|
55
|
-
// By opening a socket to a publicly routed IP address, we let the default
|
|
56
|
-
// gateway handle this socket, which means the socket's address will be
|
|
57
|
-
// the prioritised route for public IP addresses.
|
|
58
|
-
// It might fall back to `"0.0.0.0"` when no network connection is established
|
|
59
|
-
input: `
|
|
60
|
-
var socket = require('dgram').createSocket({ type: 'udp4', reuseAddr: true });
|
|
61
|
-
socket.unref();
|
|
62
|
-
socket.connect(53, '1.1.1.1', function() {
|
|
63
|
-
var address = socket.address();
|
|
64
|
-
socket.close();
|
|
65
|
-
if (address && 'address' in address) {
|
|
66
|
-
process.stdout.write(address.address);
|
|
67
|
-
process.exit(0);
|
|
68
|
-
} else {
|
|
69
|
-
process.exit(1);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
`,
|
|
73
|
-
shell: false,
|
|
74
|
-
timeout: 500,
|
|
75
|
-
encoding: 'utf8',
|
|
76
|
-
windowsVerbatimArguments: false,
|
|
77
|
-
windowsHide: true
|
|
78
|
-
});
|
|
79
|
-
// We only use the stdout as an IP, if it validates as an IP and we got a zero exit code
|
|
80
|
-
if (status || error) {
|
|
81
|
-
return null;
|
|
82
|
-
} else if (!status && typeof stdout === 'string' && (0, _nodenet().isIPv4)(stdout.trim())) {
|
|
83
|
-
return stdout.trim();
|
|
84
|
-
} else {
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
/** By convention, a zero mac address means we have a virtual device, which we'd like to exclude */ const VIRTUAL_MAC_ADDRESS = '00:00:00:00:00:00';
|
|
89
|
-
/** Determines the internal IP address by opening a socket, then checking the socket address against non-internal network interface assignments
|
|
90
|
-
* @throws If no address can be determined.
|
|
91
|
-
*/ function getRouteIPAddress() {
|
|
92
|
-
// We check the IP address we get against the available network interfaces
|
|
93
|
-
// It's only an internal IP address if we have a matching address on an interface's IP assignment
|
|
94
|
-
let routeAddress = null;
|
|
95
|
-
try {
|
|
96
|
-
routeAddress = getRouteAddress();
|
|
97
|
-
} catch {}
|
|
98
|
-
if (!routeAddress) {
|
|
99
|
-
return null;
|
|
100
|
-
}
|
|
101
|
-
let ifaces;
|
|
18
|
+
function getIpAddress() {
|
|
102
19
|
try {
|
|
103
|
-
|
|
20
|
+
const lan = (0, _lannetwork().lanNetworkSync)();
|
|
21
|
+
return lan.address;
|
|
104
22
|
} catch {
|
|
105
|
-
|
|
106
|
-
// can cause this call to unexpectedly raise a system error
|
|
107
|
-
return null;
|
|
108
|
-
}
|
|
109
|
-
for(const iface in ifaces){
|
|
110
|
-
const assignments = ifaces[iface];
|
|
111
|
-
for(let i = 0; assignments && i < assignments.length; i++){
|
|
112
|
-
const assignment = assignments[i];
|
|
113
|
-
// Only use IPv4 assigments that aren't internal
|
|
114
|
-
// Only use IPv4 assignment if it's not a virtual device (e.g. a VPN network interface)
|
|
115
|
-
if (assignment.family === 'IPv4' && !assignment.internal && assignment.address === routeAddress && assignment.mac !== VIRTUAL_MAC_ADDRESS) return routeAddress;
|
|
116
|
-
}
|
|
23
|
+
return '127.0.0.1';
|
|
117
24
|
}
|
|
118
|
-
return null;
|
|
119
|
-
}
|
|
120
|
-
function getIpAddress() {
|
|
121
|
-
return _internalip().default.v4.sync() || getRouteIPAddress() || '127.0.0.1';
|
|
122
25
|
}
|
|
123
26
|
|
|
124
27
|
//# sourceMappingURL=ip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/ip.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/ip.ts"],"sourcesContent":["import { lanNetworkSync } from 'lan-network';\n\nexport function getIpAddress(): string {\n try {\n const lan = lanNetworkSync();\n return lan.address;\n } catch {\n return '127.0.0.1';\n }\n}\n"],"names":["getIpAddress","lan","lanNetworkSync","address"],"mappings":";;;;+BAEgBA;;;eAAAA;;;;yBAFe;;;;;;AAExB,SAASA;IACd,IAAI;QACF,MAAMC,MAAMC,IAAAA,4BAAc;QAC1B,OAAOD,IAAIE,OAAO;IACpB,EAAE,OAAM;QACN,OAAO;IACT;AACF"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
calculateEASFingerprintHashAsync: function() {
|
|
13
|
+
return calculateEASFingerprintHashAsync;
|
|
14
|
+
},
|
|
15
|
+
resolveEASRemoteBuildCache: function() {
|
|
16
|
+
return resolveEASRemoteBuildCache;
|
|
17
|
+
},
|
|
18
|
+
uploadEASRemoteBuildCache: function() {
|
|
19
|
+
return uploadEASRemoteBuildCache;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
function _spawnasync() {
|
|
23
|
+
const data = /*#__PURE__*/ _interop_require_default(require("@expo/spawn-async"));
|
|
24
|
+
_spawnasync = function() {
|
|
25
|
+
return data;
|
|
26
|
+
};
|
|
27
|
+
return data;
|
|
28
|
+
}
|
|
29
|
+
function _chalk() {
|
|
30
|
+
const data = /*#__PURE__*/ _interop_require_default(require("chalk"));
|
|
31
|
+
_chalk = function() {
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
return data;
|
|
35
|
+
}
|
|
36
|
+
function _fs() {
|
|
37
|
+
const data = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
38
|
+
_fs = function() {
|
|
39
|
+
return data;
|
|
40
|
+
};
|
|
41
|
+
return data;
|
|
42
|
+
}
|
|
43
|
+
function _path() {
|
|
44
|
+
const data = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
45
|
+
_path = function() {
|
|
46
|
+
return data;
|
|
47
|
+
};
|
|
48
|
+
return data;
|
|
49
|
+
}
|
|
50
|
+
const _helpers = require("./helpers");
|
|
51
|
+
const _log = require("../../log");
|
|
52
|
+
const _xcrun = require("../../start/platforms/ios/xcrun");
|
|
53
|
+
function _interop_require_default(obj) {
|
|
54
|
+
return obj && obj.__esModule ? obj : {
|
|
55
|
+
default: obj
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
const debug = require('debug')('expo:eas-remote-build-cache');
|
|
59
|
+
async function resolveEASRemoteBuildCache({ projectRoot, platform, fingerprintHash, runOptions }) {
|
|
60
|
+
const easJsonPath = _path().default.join(projectRoot, 'eas.json');
|
|
61
|
+
if (!_fs().default.existsSync(easJsonPath)) {
|
|
62
|
+
debug('eas.json not found, skip checking for remote builds');
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
_log.Log.log((0, _chalk().default)`{whiteBright \u203A} {bold Searching builds with matching fingerprint on EAS servers}`);
|
|
66
|
+
try {
|
|
67
|
+
const results = await (0, _spawnasync().default)('npx', [
|
|
68
|
+
'eas-cli',
|
|
69
|
+
'build:download',
|
|
70
|
+
`--platform=${platform}`,
|
|
71
|
+
`--fingerprint=${fingerprintHash}`,
|
|
72
|
+
'--non-interactive',
|
|
73
|
+
(0, _helpers.isDevClientBuild)({
|
|
74
|
+
runOptions,
|
|
75
|
+
projectRoot
|
|
76
|
+
}) ? '--dev-client' : '--no-dev-client',
|
|
77
|
+
'--json'
|
|
78
|
+
], {
|
|
79
|
+
cwd: projectRoot
|
|
80
|
+
});
|
|
81
|
+
_log.Log.log((0, _chalk().default)`{whiteBright \u203A} {bold Successfully downloaded cached build}`);
|
|
82
|
+
// {
|
|
83
|
+
// "path": "/var/folders/03/lppcpcnn61q3mz5ckzmzd8w80000gn/T/eas-cli-nodejs/eas-build-run-cache/c0f9ba9c-0cf1-4c5c-8566-b28b7971050f_22f1bbfa-1c09-4b67-9e4a-721906546b58.app"
|
|
84
|
+
// }
|
|
85
|
+
const json = JSON.parse(results.stdout.trim());
|
|
86
|
+
return json == null ? void 0 : json.path;
|
|
87
|
+
} catch (error) {
|
|
88
|
+
debug('eas-cli error:', error);
|
|
89
|
+
// @TODO(2025-04-11): remove this in a future release
|
|
90
|
+
if ((0, _xcrun.isSpawnResultError)(error) && error.stderr.includes('command build:download not found')) {
|
|
91
|
+
_log.Log.warn(`To take advantage of remote build cache, upgrade your eas-cli installation to latest.`);
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
async function uploadEASRemoteBuildCache({ projectRoot, platform, fingerprintHash, buildPath }) {
|
|
97
|
+
const easJsonPath = _path().default.join(projectRoot, 'eas.json');
|
|
98
|
+
if (!_fs().default.existsSync(easJsonPath)) {
|
|
99
|
+
debug('eas.json not found, skip checking for remote builds');
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
try {
|
|
103
|
+
_log.Log.log((0, _chalk().default)`{whiteBright \u203A} {bold Uploading build to remote cache}`);
|
|
104
|
+
const results = await (0, _spawnasync().default)('npx', [
|
|
105
|
+
'eas-cli',
|
|
106
|
+
'upload',
|
|
107
|
+
`--platform=${platform}`,
|
|
108
|
+
`--fingerprint=${fingerprintHash}`,
|
|
109
|
+
buildPath ? `--build-path=${buildPath}` : '',
|
|
110
|
+
'--non-interactive',
|
|
111
|
+
'--json'
|
|
112
|
+
], {
|
|
113
|
+
cwd: projectRoot
|
|
114
|
+
});
|
|
115
|
+
// {
|
|
116
|
+
// "url": "/var/folders/03/lppcpcnn61q3mz5ckzmzd8w80000gn/T/eas-cli-nodejs/eas-build-run-cache/c0f9ba9c-0cf1-4c5c-8566-b28b7971050f_22f1bbfa-1c09-4b67-9e4a-721906546b58.app"
|
|
117
|
+
// }
|
|
118
|
+
const json = JSON.parse(results.stdout.trim());
|
|
119
|
+
_log.Log.log((0, _chalk().default)`{whiteBright \u203A} {bold Build successfully uploaded: ${json == null ? void 0 : json.url}}`);
|
|
120
|
+
} catch (error) {
|
|
121
|
+
debug('eas-cli error:', error);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
async function calculateEASFingerprintHashAsync({ projectRoot, platform }) {
|
|
125
|
+
// prefer using `eas fingerprint:generate` because it automatically upload sources
|
|
126
|
+
try {
|
|
127
|
+
const results = await (0, _spawnasync().default)('npx', [
|
|
128
|
+
'eas-cli',
|
|
129
|
+
'fingerprint:generate',
|
|
130
|
+
`--platform=${platform}`,
|
|
131
|
+
'--json',
|
|
132
|
+
'--non-interactive'
|
|
133
|
+
], {
|
|
134
|
+
cwd: projectRoot
|
|
135
|
+
});
|
|
136
|
+
// {
|
|
137
|
+
// "hash": "203f960b965e154b77dc31c6c42e5582e8d77196"
|
|
138
|
+
// }
|
|
139
|
+
const json = JSON.parse(results.stdout.trim());
|
|
140
|
+
return json == null ? void 0 : json.hash;
|
|
141
|
+
} catch (error) {
|
|
142
|
+
debug('eas-cli error:', error);
|
|
143
|
+
}
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
//# sourceMappingURL=eas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/utils/remote-build-cache-providers/eas.ts"],"sourcesContent":["import { ModPlatform } from '@expo/config-plugins';\nimport spawnAsync from '@expo/spawn-async';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport { isDevClientBuild } from './helpers';\nimport { Log } from '../../log';\nimport { type Options as AndroidRunOptions } from '../../run/android/resolveOptions';\nimport { type Options as IosRunOptions } from '../../run/ios/XcodeBuild.types';\nimport { isSpawnResultError } from '../../start/platforms/ios/xcrun';\n\nconst debug = require('debug')('expo:eas-remote-build-cache') as typeof console.log;\n\nexport async function resolveEASRemoteBuildCache({\n projectRoot,\n platform,\n fingerprintHash,\n runOptions,\n}: {\n projectRoot: string;\n platform: ModPlatform;\n fingerprintHash: string;\n runOptions: AndroidRunOptions | IosRunOptions;\n}): Promise<string | null> {\n const easJsonPath = path.join(projectRoot, 'eas.json');\n if (!fs.existsSync(easJsonPath)) {\n debug('eas.json not found, skip checking for remote builds');\n return null;\n }\n\n Log.log(\n chalk`{whiteBright \\u203A} {bold Searching builds with matching fingerprint on EAS servers}`\n );\n try {\n const results = await spawnAsync(\n 'npx',\n [\n 'eas-cli',\n 'build:download',\n `--platform=${platform}`,\n `--fingerprint=${fingerprintHash}`,\n '--non-interactive',\n isDevClientBuild({ runOptions, projectRoot }) ? '--dev-client' : '--no-dev-client',\n '--json',\n ],\n {\n cwd: projectRoot,\n }\n );\n\n Log.log(chalk`{whiteBright \\u203A} {bold Successfully downloaded cached build}`);\n // {\n // \"path\": \"/var/folders/03/lppcpcnn61q3mz5ckzmzd8w80000gn/T/eas-cli-nodejs/eas-build-run-cache/c0f9ba9c-0cf1-4c5c-8566-b28b7971050f_22f1bbfa-1c09-4b67-9e4a-721906546b58.app\"\n // }\n const json = JSON.parse(results.stdout.trim());\n return json?.path;\n } catch (error) {\n debug('eas-cli error:', error);\n // @TODO(2025-04-11): remove this in a future release\n if (isSpawnResultError(error) && error.stderr.includes('command build:download not found')) {\n Log.warn(\n `To take advantage of remote build cache, upgrade your eas-cli installation to latest.`\n );\n }\n return null;\n }\n}\n\nexport async function uploadEASRemoteBuildCache({\n projectRoot,\n platform,\n fingerprintHash,\n buildPath,\n}: {\n projectRoot: string;\n platform: ModPlatform;\n fingerprintHash: string;\n buildPath?: string;\n}): Promise<void> {\n const easJsonPath = path.join(projectRoot, 'eas.json');\n if (!fs.existsSync(easJsonPath)) {\n debug('eas.json not found, skip checking for remote builds');\n return;\n }\n\n try {\n Log.log(chalk`{whiteBright \\u203A} {bold Uploading build to remote cache}`);\n const results = await spawnAsync(\n 'npx',\n [\n 'eas-cli',\n 'upload',\n `--platform=${platform}`,\n `--fingerprint=${fingerprintHash}`,\n buildPath ? `--build-path=${buildPath}` : '',\n '--non-interactive',\n '--json',\n ],\n {\n cwd: projectRoot,\n }\n );\n // {\n // \"url\": \"/var/folders/03/lppcpcnn61q3mz5ckzmzd8w80000gn/T/eas-cli-nodejs/eas-build-run-cache/c0f9ba9c-0cf1-4c5c-8566-b28b7971050f_22f1bbfa-1c09-4b67-9e4a-721906546b58.app\"\n // }\n const json = JSON.parse(results.stdout.trim());\n Log.log(chalk`{whiteBright \\u203A} {bold Build successfully uploaded: ${json?.url}}`);\n } catch (error) {\n debug('eas-cli error:', error);\n }\n}\n\nexport async function calculateEASFingerprintHashAsync({\n projectRoot,\n platform,\n}: {\n projectRoot: string;\n platform: ModPlatform;\n}): Promise<string | null> {\n // prefer using `eas fingerprint:generate` because it automatically upload sources\n try {\n const results = await spawnAsync(\n 'npx',\n ['eas-cli', 'fingerprint:generate', `--platform=${platform}`, '--json', '--non-interactive'],\n {\n cwd: projectRoot,\n }\n );\n // {\n // \"hash\": \"203f960b965e154b77dc31c6c42e5582e8d77196\"\n // }\n const json = JSON.parse(results.stdout.trim());\n return json?.hash;\n } catch (error) {\n debug('eas-cli error:', error);\n }\n return null;\n}\n"],"names":["calculateEASFingerprintHashAsync","resolveEASRemoteBuildCache","uploadEASRemoteBuildCache","debug","require","projectRoot","platform","fingerprintHash","runOptions","easJsonPath","path","join","fs","existsSync","Log","log","chalk","results","spawnAsync","isDevClientBuild","cwd","json","JSON","parse","stdout","trim","error","isSpawnResultError","stderr","includes","warn","buildPath","url","hash"],"mappings":";;;;;;;;;;;IAiHsBA,gCAAgC;eAAhCA;;IAnGAC,0BAA0B;eAA1BA;;IAuDAC,yBAAyB;eAAzBA;;;;gEApEC;;;;;;;gEACL;;;;;;;gEACH;;;;;;;gEACE;;;;;;yBAEgB;qBACb;uBAGe;;;;;;AAEnC,MAAMC,QAAQC,QAAQ,SAAS;AAExB,eAAeH,2BAA2B,EAC/CI,WAAW,EACXC,QAAQ,EACRC,eAAe,EACfC,UAAU,EAMX;IACC,MAAMC,cAAcC,eAAI,CAACC,IAAI,CAACN,aAAa;IAC3C,IAAI,CAACO,aAAE,CAACC,UAAU,CAACJ,cAAc;QAC/BN,MAAM;QACN,OAAO;IACT;IAEAW,QAAG,CAACC,GAAG,CACLC,IAAAA,gBAAK,CAAA,CAAC,qFAAqF,CA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I;QACJ,MAAMgB,OAAOC,KAAKC,KAAK,CAACN,QAAQO,MAAM,CAACC,IAAI;QAC3CX,QAAG,CAACC,GAAG,CAACC,IAAAA,gBAAK,CAAA,CAAC,wDAAwD,EAAEK,wBAAAA,KAAMW,GAAG,CAAC,CAAC,CAAC;IACtF,EAAE,OAAON,OAAO;QACdvB,MAAM,kBAAkBuB;IAC1B;AACF;AAEO,eAAe1B,iCAAiC,EACrDK,WAAW,EACXC,QAAQ,EAIT;IACC,kFAAkF;IAClF,IAAI;QACF,MAAMW,UAAU,MAAMC,IAAAA,qBAAU,EAC9B,OACA;YAAC;YAAW;YAAwB,CAAC,WAAW,EAAEZ,UAAU;YAAE;YAAU;SAAoB,EAC5F;YACEc,KAAKf;QACP;QAEF,IAAI;QACJ,uDAAuD;QACvD,IAAI;QACJ,MAAMgB,OAAOC,KAAKC,KAAK,CAACN,QAAQO,MAAM,CAACC,IAAI;QAC3C,OAAOJ,wBAAAA,KAAMY,IAAI;IACnB,EAAE,OAAOP,OAAO;QACdvB,MAAM,kBAAkBuB;IAC1B;IACA,OAAO;AACT"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "isDevClientBuild", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return isDevClientBuild;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _detectDevClient = require("../../start/detectDevClient");
|
|
12
|
+
function isDevClientBuild({ runOptions, projectRoot }) {
|
|
13
|
+
if (!(0, _detectDevClient.hasDirectDevClientDependency)(projectRoot)) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
if ('variant' in runOptions && runOptions.variant !== undefined) {
|
|
17
|
+
return runOptions.variant === 'debug';
|
|
18
|
+
}
|
|
19
|
+
if ('configuration' in runOptions && runOptions.configuration !== undefined) {
|
|
20
|
+
return runOptions.configuration === 'Debug';
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/utils/remote-build-cache-providers/helpers.ts"],"sourcesContent":["import { type Options as AndroidRunOptions } from '../../run/android/resolveOptions';\nimport { type Options as IosRunOptions } from '../../run/ios/XcodeBuild.types';\nimport { hasDirectDevClientDependency } from '../../start/detectDevClient';\n\nexport function isDevClientBuild({\n runOptions,\n projectRoot,\n}: {\n runOptions: AndroidRunOptions | IosRunOptions;\n projectRoot: string;\n}) {\n if (!hasDirectDevClientDependency(projectRoot)) {\n return false;\n }\n\n if ('variant' in runOptions && runOptions.variant !== undefined) {\n return runOptions.variant === 'debug';\n }\n if ('configuration' in runOptions && runOptions.configuration !== undefined) {\n return runOptions.configuration === 'Debug';\n }\n\n return true;\n}\n"],"names":["isDevClientBuild","runOptions","projectRoot","hasDirectDevClientDependency","variant","undefined","configuration"],"mappings":";;;;+BAIgBA;;;eAAAA;;;iCAF6B;AAEtC,SAASA,iBAAiB,EAC/BC,UAAU,EACVC,WAAW,EAIZ;IACC,IAAI,CAACC,IAAAA,6CAA4B,EAACD,cAAc;QAC9C,OAAO;IACT;IAEA,IAAI,aAAaD,cAAcA,WAAWG,OAAO,KAAKC,WAAW;QAC/D,OAAOJ,WAAWG,OAAO,KAAK;IAChC;IACA,IAAI,mBAAmBH,cAAcA,WAAWK,aAAa,KAAKD,WAAW;QAC3E,OAAOJ,WAAWK,aAAa,KAAK;IACtC;IAEA,OAAO;AACT"}
|
|
@@ -15,6 +15,9 @@ _export(exports, {
|
|
|
15
15
|
assertDuplicateArgs: function() {
|
|
16
16
|
return assertDuplicateArgs;
|
|
17
17
|
},
|
|
18
|
+
assertNonBooleanArg: function() {
|
|
19
|
+
return assertNonBooleanArg;
|
|
20
|
+
},
|
|
18
21
|
assertUnknownArgs: function() {
|
|
19
22
|
return assertUnknownArgs;
|
|
20
23
|
},
|
|
@@ -157,5 +160,10 @@ function assertDuplicateArgs(args, argNameAliasTuple) {
|
|
|
157
160
|
}
|
|
158
161
|
}
|
|
159
162
|
}
|
|
163
|
+
function assertNonBooleanArg(argName, arg) {
|
|
164
|
+
if (arg == null || typeof arg === 'boolean') {
|
|
165
|
+
throw new _errors.CommandError('BAD_ARGS', `Expected input for arg ${argName}`);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
160
168
|
|
|
161
169
|
//# sourceMappingURL=resolveArgs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/resolveArgs.ts"],"sourcesContent":["import arg, { Spec } from 'arg';\n\nimport { replaceValue } from './array';\nimport { CommandError } from './errors';\n\n/** Split up arguments that are formatted like `--foo=bar` or `-f=\"bar\"` to `['--foo', 'bar']` */\nfunction splitArgs(args: string[]): string[] {\n const result: string[] = [];\n\n for (const arg of args) {\n if (arg.startsWith('-')) {\n const [key, ...props] = arg.split('=');\n result.push(key);\n if (props.length) {\n result.push(props.join('='));\n }\n } else {\n result.push(arg);\n }\n }\n\n return result;\n}\n\n/**\n * Enables the resolution of arguments that can either be a string or a boolean.\n *\n * @param args arguments that were passed to the command.\n * @param rawMap raw map of arguments that are passed to the command.\n * @param extraArgs extra arguments and aliases that should be resolved as string or boolean.\n * @returns parsed arguments and project root.\n */\nexport async function resolveStringOrBooleanArgsAsync(\n args: string[],\n rawMap: arg.Spec,\n extraArgs: arg.Spec\n) {\n args = splitArgs(args);\n\n // Assert any missing arguments\n assertUnknownArgs(\n {\n ...rawMap,\n ...extraArgs,\n },\n args\n );\n\n // Collapse aliases into fully qualified arguments.\n args = collapseAliases(extraArgs, args);\n\n // Resolve all of the string or boolean arguments and the project root.\n return _resolveStringOrBooleanArgs({ ...rawMap, ...extraArgs }, args);\n}\n\n/**\n * Enables the resolution of boolean arguments that can be formatted like `--foo=true` or `--foo false`\n *\n * @param args arguments that were passed to the command.\n * @param rawMap raw map of arguments that are passed to the command.\n * @param extraArgs extra arguments and aliases that should be resolved as string or boolean.\n * @returns parsed arguments and project root.\n */\nexport async function resolveCustomBooleanArgsAsync(\n args: string[],\n rawMap: arg.Spec,\n extraArgs: arg.Spec\n) {\n const results = await resolveStringOrBooleanArgsAsync(args, rawMap, extraArgs);\n\n return {\n ...results,\n args: Object.fromEntries(\n Object.entries(results.args).map(([key, value]) => {\n if (extraArgs[key]) {\n if (typeof value === 'string') {\n if (!['true', 'false'].includes(value)) {\n throw new CommandError(\n 'BAD_ARGS',\n `Invalid boolean argument: ${key}=${value}. Expected one of: true, false`\n );\n }\n return [key, value === 'true'];\n }\n }\n return [key, value];\n })\n ),\n };\n}\n\nexport function _resolveStringOrBooleanArgs(arg: Spec, args: string[]) {\n // Default project root, if a custom one is defined then it will overwrite this.\n let projectRoot: string = '.';\n // The resolved arguments.\n const settings: Record<string, string | boolean | undefined> = {};\n\n // Create a list of possible arguments, this will filter out aliases.\n const possibleArgs = Object.entries(arg)\n .filter(([, value]) => typeof value !== 'string')\n .map(([key]) => key);\n\n // Loop over arguments in reverse order so we can resolve if a value belongs to a flag.\n for (let i = args.length - 1; i > -1; i--) {\n const value = args[i];\n // At this point we should have converted all aliases to fully qualified arguments.\n if (value.startsWith('--')) {\n // If we ever find an argument then it must be a boolean because we are checking in reverse\n // and removing arguments from the array if we find a string.\n // We don't override arguments that are already set\n if (!(value in settings)) {\n settings[value] = true;\n }\n } else {\n // Get the previous argument in the array.\n const nextValue = i > 0 ? args[i - 1] : null;\n if (nextValue && possibleArgs.includes(nextValue)) {\n // We don't override arguments that are already set\n if (!(nextValue in settings)) {\n settings[nextValue] = value;\n }\n i--;\n } else if (\n // If the last value is not a flag and it doesn't have a recognized flag before it (instead having a string value or nothing)\n // then it must be the project root.\n i ===\n args.length - 1\n ) {\n projectRoot = value;\n } else {\n // This will asserts if two strings are passed in a row and not at the end of the line.\n throw new CommandError('BAD_ARGS', `Unknown argument: ${value}`);\n }\n }\n }\n\n return {\n args: settings,\n projectRoot,\n };\n}\n\n/** Convert all aliases to fully qualified flag names. */\nexport function collapseAliases(arg: Spec, args: string[]): string[] {\n const aliasMap = getAliasTuples(arg);\n\n for (const [arg, alias] of aliasMap) {\n args = replaceValue(args, arg, alias);\n }\n\n // Assert if there are duplicate flags after we collapse the aliases.\n assertDuplicateArgs(args, aliasMap);\n return args;\n}\n\n/** Assert that the spec has unknown arguments. */\nexport function assertUnknownArgs(arg: Spec, args: string[]) {\n const allowedArgs = Object.keys(arg);\n const unknownArgs = args.filter((arg) => !allowedArgs.includes(arg) && arg.startsWith('-'));\n if (unknownArgs.length > 0) {\n throw new CommandError(`Unknown arguments: ${unknownArgs.join(', ')}`);\n }\n}\n\nfunction getAliasTuples(arg: Spec): [string, string][] {\n return Object.entries(arg).filter(([, value]) => typeof value === 'string') as [string, string][];\n}\n\n/** Asserts that a duplicate flag has been used, this naively throws without knowing if an alias or flag were used as the duplicate. */\nexport function assertDuplicateArgs(args: string[], argNameAliasTuple: [string, string][]) {\n for (const [argName, argNameAlias] of argNameAliasTuple) {\n if (args.filter((a) => [argName, argNameAlias].includes(a)).length > 1) {\n throw new CommandError(\n 'BAD_ARGS',\n `Can only provide one instance of ${argName} or ${argNameAlias}`\n );\n }\n }\n}\n"],"names":["_resolveStringOrBooleanArgs","assertDuplicateArgs","assertUnknownArgs","collapseAliases","resolveCustomBooleanArgsAsync","resolveStringOrBooleanArgsAsync","splitArgs","args","result","arg","startsWith","key","props","split","push","length","join","rawMap","extraArgs","results","Object","fromEntries","entries","map","value","includes","CommandError","projectRoot","settings","possibleArgs","filter","i","nextValue","aliasMap","getAliasTuples","alias","replaceValue","allowedArgs","keys","unknownArgs","argNameAliasTuple","argName","argNameAlias","a"],"mappings":";;;;;;;;;;;IA2FgBA,2BAA2B;eAA3BA;;IA8EAC,mBAAmB;eAAnBA;;IAbAC,iBAAiB;eAAjBA;;IAbAC,eAAe;eAAfA;;IAh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ASxB,gBAAgBM,GAAS,EAAEF,IAAc;IACvD,MAAM0B,WAAWC,eAAezB;IAEhC,KAAK,MAAM,CAACA,KAAK0B,MAAM,IAAIF,SAAU;QACnC1B,OAAO6B,IAAAA,mBAAY,EAAC7B,MAAME,KAAK0B;IACjC;IAEA,qEAAqE;IACrElC,oBAAoBM,MAAM0B;IAC1B,OAAO1B;AACT;AAGO,SAASL,kBAAkBO,GAAS,EAAEF,IAAc;IACzD,MAAM8B,cAAcjB,OAAOkB,IAAI,CAAC7B;IAChC,MAAM8B,cAAchC,KAAKuB,MAAM,CAAC,CAACrB,MAAQ,CAAC4B,YAAYZ,QAAQ,CAAChB,QAAQA,IAAIC,UAAU,CAAC;IACtF,IAAI6B,YAAYxB,MAAM,GAAG,GAAG;QAC1B,MAAM,IAAIW,oBAAY,CAAC,CAAC,mBAAmB,EAAEa,YAAYvB,IAAI,CAAC,OAAO;IACvE;AACF;AAEA,SAASkB,eAAezB,GAAS;IAC/B,OAAOW,OAAOE,OAAO,CAACb,KAAKqB,MAAM,CAAC,CAAC,GAAGN,MAAM,GAAK,OAAOA,UAAU;AACpE;AAGO,SAASvB,oBAAoBM,IAAc,EAAEiC,iBAAqC;IACvF,KAAK,MAAM,CAACC,SAASC,aAAa,IAAIF,kBAAmB;QACvD,IAAIjC,KAAKuB,MAAM,CAAC,CAACa,IAAM;gBAACF;gBAASC;aAAa,CAACjB,QAAQ,CAACkB,IAAI5B,MAAM,GAAG,GAAG;YACtE,MAAM,IAAIW,oBAAY,CACpB,YACA,CAAC,iCAAiC,EAAEe,QAAQ,IAAI,EAAEC,cAAc;QAEpE;IACF;AACF"}
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/resolveArgs.ts"],"sourcesContent":["import arg, { Spec } from 'arg';\n\nimport { replaceValue } from './array';\nimport { CommandError } from './errors';\n\n/** Split up arguments that are formatted like `--foo=bar` or `-f=\"bar\"` to `['--foo', 'bar']` */\nfunction splitArgs(args: string[]): string[] {\n const result: string[] = [];\n\n for (const arg of args) {\n if (arg.startsWith('-')) {\n const [key, ...props] = arg.split('=');\n result.push(key);\n if (props.length) {\n result.push(props.join('='));\n }\n } else {\n result.push(arg);\n }\n }\n\n return result;\n}\n\n/**\n * Enables the resolution of arguments that can either be a string or a boolean.\n *\n * @param args arguments that were passed to the command.\n * @param rawMap raw map of arguments that are passed to the command.\n * @param extraArgs extra arguments and aliases that should be resolved as string or boolean.\n * @returns parsed arguments and project root.\n */\nexport async function resolveStringOrBooleanArgsAsync(\n args: string[],\n rawMap: arg.Spec,\n extraArgs: arg.Spec\n) {\n args = splitArgs(args);\n\n // Assert any missing arguments\n assertUnknownArgs(\n {\n ...rawMap,\n ...extraArgs,\n },\n args\n );\n\n // Collapse aliases into fully qualified arguments.\n args = collapseAliases(extraArgs, args);\n\n // Resolve all of the string or boolean arguments and the project root.\n return _resolveStringOrBooleanArgs({ ...rawMap, ...extraArgs }, args);\n}\n\n/**\n * Enables the resolution of boolean arguments that can be formatted like `--foo=true` or `--foo false`\n *\n * @param args arguments that were passed to the command.\n * @param rawMap raw map of arguments that are passed to the command.\n * @param extraArgs extra arguments and aliases that should be resolved as string or boolean.\n * @returns parsed arguments and project root.\n */\nexport async function resolveCustomBooleanArgsAsync(\n args: string[],\n rawMap: arg.Spec,\n extraArgs: arg.Spec\n) {\n const results = await resolveStringOrBooleanArgsAsync(args, rawMap, extraArgs);\n\n return {\n ...results,\n args: Object.fromEntries(\n Object.entries(results.args).map(([key, value]) => {\n if (extraArgs[key]) {\n if (typeof value === 'string') {\n if (!['true', 'false'].includes(value)) {\n throw new CommandError(\n 'BAD_ARGS',\n `Invalid boolean argument: ${key}=${value}. Expected one of: true, false`\n );\n }\n return [key, value === 'true'];\n }\n }\n return [key, value];\n })\n ),\n };\n}\n\nexport function _resolveStringOrBooleanArgs(arg: Spec, args: string[]) {\n // Default project root, if a custom one is defined then it will overwrite this.\n let projectRoot: string = '.';\n // The resolved arguments.\n const settings: Record<string, string | boolean | undefined> = {};\n\n // Create a list of possible arguments, this will filter out aliases.\n const possibleArgs = Object.entries(arg)\n .filter(([, value]) => typeof value !== 'string')\n .map(([key]) => key);\n\n // Loop over arguments in reverse order so we can resolve if a value belongs to a flag.\n for (let i = args.length - 1; i > -1; i--) {\n const value = args[i];\n // At this point we should have converted all aliases to fully qualified arguments.\n if (value.startsWith('--')) {\n // If we ever find an argument then it must be a boolean because we are checking in reverse\n // and removing arguments from the array if we find a string.\n // We don't override arguments that are already set\n if (!(value in settings)) {\n settings[value] = true;\n }\n } else {\n // Get the previous argument in the array.\n const nextValue = i > 0 ? args[i - 1] : null;\n if (nextValue && possibleArgs.includes(nextValue)) {\n // We don't override arguments that are already set\n if (!(nextValue in settings)) {\n settings[nextValue] = value;\n }\n i--;\n } else if (\n // If the last value is not a flag and it doesn't have a recognized flag before it (instead having a string value or nothing)\n // then it must be the project root.\n i ===\n args.length - 1\n ) {\n projectRoot = value;\n } else {\n // This will asserts if two strings are passed in a row and not at the end of the line.\n throw new CommandError('BAD_ARGS', `Unknown argument: ${value}`);\n }\n }\n }\n\n return {\n args: settings,\n projectRoot,\n };\n}\n\n/** Convert all aliases to fully qualified flag names. */\nexport function collapseAliases(arg: Spec, args: string[]): string[] {\n const aliasMap = getAliasTuples(arg);\n\n for (const [arg, alias] of aliasMap) {\n args = replaceValue(args, arg, alias);\n }\n\n // Assert if there are duplicate flags after we collapse the aliases.\n assertDuplicateArgs(args, aliasMap);\n return args;\n}\n\n/** Assert that the spec has unknown arguments. */\nexport function assertUnknownArgs(arg: Spec, args: string[]) {\n const allowedArgs = Object.keys(arg);\n const unknownArgs = args.filter((arg) => !allowedArgs.includes(arg) && arg.startsWith('-'));\n if (unknownArgs.length > 0) {\n throw new CommandError(`Unknown arguments: ${unknownArgs.join(', ')}`);\n }\n}\n\nfunction getAliasTuples(arg: Spec): [string, string][] {\n return Object.entries(arg).filter(([, value]) => typeof value === 'string') as [string, string][];\n}\n\n/** Asserts that a duplicate flag has been used, this naively throws without knowing if an alias or flag were used as the duplicate. */\nexport function assertDuplicateArgs(args: string[], argNameAliasTuple: [string, string][]) {\n for (const [argName, argNameAlias] of argNameAliasTuple) {\n if (args.filter((a) => [argName, argNameAlias].includes(a)).length > 1) {\n throw new CommandError(\n 'BAD_ARGS',\n `Can only provide one instance of ${argName} or ${argNameAlias}`\n );\n }\n }\n}\n\nexport function assertNonBooleanArg(argName: string, arg: any): asserts arg is string | string[] {\n if (arg == null || typeof arg === 'boolean') {\n throw new CommandError('BAD_ARGS', `Expected input for arg ${argName}`);\n }\n}\n"],"names":["_resolveStringOrBooleanArgs","assertDuplicateArgs","assertNonBooleanArg","assertUnknownArgs","collapseAliases","resolveCustomBooleanArgsAsync","resolveStringOrBooleanArgsAsync","splitArgs","args","result","arg","startsWith","key","props","split","push","length","join","rawMap","extraArgs","results","Object","fromEntries","entries","map","value","includes","CommandError","projectRoot","settings","possibleArgs","filter","i","nextValue","aliasMap","getAliasTuples","alias","replaceValue","allowedArgs","keys","unknownArgs","argNameAliasTuple","argName","argNameAlias","a"],"mappings":";;;;;;;;;;;IA2FgBA,2BAA2B;eAA3BA;;IA8EAC,mBAAmB;eAAnBA;;IAWAC,mBAAmB;eAAnBA;;IAxBAC,iBAAiB;eAAjBA;;IAbAC,eAAe;eAAfA;;IAhFMC,6BAA6B;eAA7BA;;IA/BAC,+BAA+B;eAA/BA;;;uBA9BO;wBACA;AAE7B,+FAA+F,GAC/F,SAASC,UAAUC,IAAc;IAC/B,MAAMC,SAAmB,EAAE;IAE3B,KAAK,MAAMC,OAAOF,KAAM;QACtB,IAAIE,IAAIC,UAAU,CAAC,MAAM;YACvB,MAAM,CAACC,KAAK,GAAGC,MAAM,GAAGH,IAAII,KAAK,CAAC;YAClCL,OAAOM,IAAI,CAACH;YACZ,IAAIC,MAAMG,MAAM,EAAE;gBAChBP,OAAOM,IAAI,CAACF,MAAMI,IAAI,CAAC;YACzB;QACF,OAAO;YACLR,OAAOM,IAAI,CAACL;QACd;IACF;IAEA,OAAOD;AACT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IAAI6B,YAAYxB,MAAM,GAAG,GAAG;QAC1B,MAAM,IAAIW,oBAAY,CAAC,CAAC,mBAAmB,EAAEa,YAAYvB,IAAI,CAAC,OAAO;IACvE;AACF;AAEA,SAASkB,eAAezB,GAAS;IAC/B,OAAOW,OAAOE,OAAO,CAACb,KAAKqB,MAAM,CAAC,CAAC,GAAGN,MAAM,GAAK,OAAOA,UAAU;AACpE;AAGO,SAASxB,oBAAoBO,IAAc,EAAEiC,iBAAqC;IACvF,KAAK,MAAM,CAACC,SAASC,aAAa,IAAIF,kBAAmB;QACvD,IAAIjC,KAAKuB,MAAM,CAAC,CAACa,IAAM;gBAACF;gBAASC;aAAa,CAACjB,QAAQ,CAACkB,IAAI5B,MAAM,GAAG,GAAG;YACtE,MAAM,IAAIW,oBAAY,CACpB,YACA,CAAC,iCAAiC,EAAEe,QAAQ,IAAI,EAAEC,cAAc;QAEpE;IACF;AACF;AAEO,SAASzC,oBAAoBwC,OAAe,EAAEhC,GAAQ;IAC3D,IAAIA,OAAO,QAAQ,OAAOA,QAAQ,WAAW;QAC3C,MAAM,IAAIiB,oBAAY,CAAC,YAAY,CAAC,uBAAuB,EAAEe,SAAS;IACxE;AACF"}
|
|
@@ -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.
|
|
36
|
+
'user-agent': `expo-cli/${"0.24.4"}`,
|
|
37
37
|
authorization: 'Basic ' + _nodebuffer().Buffer.from(`${target}:`).toString('base64')
|
|
38
38
|
};
|
|
39
39
|
}
|
|
@@ -21,17 +21,74 @@ _export(exports, {
|
|
|
21
21
|
});
|
|
22
22
|
const _errors = require("../utils/errors");
|
|
23
23
|
const debug = require('debug')('expo:utils:variadic');
|
|
24
|
-
function parseVariadicArguments(argv) {
|
|
24
|
+
function parseVariadicArguments(argv, strFlags = []) {
|
|
25
25
|
const variadic = [];
|
|
26
|
-
const
|
|
27
|
-
|
|
26
|
+
const parsedFlags = {};
|
|
27
|
+
let i = 0;
|
|
28
|
+
while(i < argv.length){
|
|
29
|
+
const arg = argv[i];
|
|
28
30
|
if (!arg.startsWith('-')) {
|
|
29
31
|
variadic.push(arg);
|
|
30
32
|
} else if (arg === '--') {
|
|
31
33
|
break;
|
|
32
34
|
} else {
|
|
33
|
-
|
|
35
|
+
const flagIndex = strFlags.indexOf(arg.split('=')[0]);
|
|
36
|
+
if (flagIndex !== -1) {
|
|
37
|
+
// Handle flags that expect a value
|
|
38
|
+
const [flag, value] = arg.split('=');
|
|
39
|
+
if (value !== undefined) {
|
|
40
|
+
// If the flag has a value inline (e.g., --flag=value)
|
|
41
|
+
if (parsedFlags[flag] === undefined) {
|
|
42
|
+
parsedFlags[flag] = value;
|
|
43
|
+
} else if (Array.isArray(parsedFlags[flag])) {
|
|
44
|
+
parsedFlags[flag].push(value);
|
|
45
|
+
} else {
|
|
46
|
+
parsedFlags[flag] = [
|
|
47
|
+
parsedFlags[flag],
|
|
48
|
+
value
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
const nextArg = argv[i + 1];
|
|
53
|
+
if (nextArg && !nextArg.startsWith('-')) {
|
|
54
|
+
if (parsedFlags[arg] === undefined) {
|
|
55
|
+
parsedFlags[arg] = nextArg;
|
|
56
|
+
} else if (Array.isArray(parsedFlags[arg])) {
|
|
57
|
+
parsedFlags[arg].push(nextArg);
|
|
58
|
+
} else {
|
|
59
|
+
parsedFlags[arg] = [
|
|
60
|
+
parsedFlags[arg],
|
|
61
|
+
nextArg
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
i++; // Skip the next argument since it's part of the current flag
|
|
65
|
+
} else {
|
|
66
|
+
if (parsedFlags[arg] === undefined) {
|
|
67
|
+
parsedFlags[arg] = true; // Flag without a value
|
|
68
|
+
} else if (Array.isArray(parsedFlags[arg])) {
|
|
69
|
+
parsedFlags[arg].push(true);
|
|
70
|
+
} else {
|
|
71
|
+
parsedFlags[arg] = [
|
|
72
|
+
parsedFlags[arg],
|
|
73
|
+
true
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
} else {
|
|
79
|
+
if (parsedFlags[arg] === undefined) {
|
|
80
|
+
parsedFlags[arg] = true; // Unknown flag
|
|
81
|
+
} else if (Array.isArray(parsedFlags[arg])) {
|
|
82
|
+
parsedFlags[arg].push(true);
|
|
83
|
+
} else {
|
|
84
|
+
parsedFlags[arg] = [
|
|
85
|
+
parsedFlags[arg],
|
|
86
|
+
true
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
34
90
|
}
|
|
91
|
+
i++;
|
|
35
92
|
}
|
|
36
93
|
// Everything after `--` that is not an option is passed to the underlying install command.
|
|
37
94
|
const extras = [];
|
|
@@ -44,10 +101,10 @@ function parseVariadicArguments(argv) {
|
|
|
44
101
|
extras.push(...extraArgs);
|
|
45
102
|
debug('Extra arguments: ' + extras.join(', '));
|
|
46
103
|
}
|
|
47
|
-
debug(`Parsed arguments (variadic: %O, flags: %O, extra: %O)`, variadic,
|
|
104
|
+
debug(`Parsed arguments (variadic: %O, flags: %O, extra: %O)`, variadic, parsedFlags, extras);
|
|
48
105
|
return {
|
|
49
106
|
variadic,
|
|
50
|
-
flags,
|
|
107
|
+
flags: parsedFlags,
|
|
51
108
|
extras
|
|
52
109
|
};
|
|
53
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/variadic.ts"],"sourcesContent":["import { CommandError } from '../utils/errors';\n\nconst debug = require('debug')('expo:utils:variadic') as typeof console.log;\n\n/** Given a list of CLI args, return a sorted set of args based on categories used in a complex command. */\nexport function parseVariadicArguments(argv: string[]): {\n variadic: string[];\n extras: string[];\n flags: Record<string, boolean | undefined>;\n} {\n const variadic: string[] = [];\n const
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/variadic.ts"],"sourcesContent":["import { CommandError } from '../utils/errors';\n\nconst debug = require('debug')('expo:utils:variadic') as typeof console.log;\n\n/** Given a list of CLI args, return a sorted set of args based on categories used in a complex command. */\nexport function parseVariadicArguments(\n argv: string[],\n strFlags: string[] = []\n): {\n variadic: string[];\n extras: string[];\n flags: Record<string, boolean | string | string[] | undefined>;\n} {\n const variadic: string[] = [];\n const parsedFlags: Record<string, boolean | string | string[]> = {};\n\n let i = 0;\n while (i < argv.length) {\n const arg = argv[i];\n\n if (!arg.startsWith('-')) {\n variadic.push(arg);\n } else if (arg === '--') {\n break;\n } else {\n const flagIndex = strFlags.indexOf(arg.split('=')[0]);\n if (flagIndex !== -1) {\n // Handle flags that expect a value\n const [flag, value] = arg.split('=');\n if (value !== undefined) {\n // If the flag has a value inline (e.g., --flag=value)\n if (parsedFlags[flag] === undefined) {\n parsedFlags[flag] = value;\n } else if (Array.isArray(parsedFlags[flag])) {\n (parsedFlags[flag] as string[]).push(value);\n } else {\n parsedFlags[flag] = [parsedFlags[flag] as string, value];\n }\n } else {\n const nextArg = argv[i + 1];\n if (nextArg && !nextArg.startsWith('-')) {\n if (parsedFlags[arg] === undefined) {\n parsedFlags[arg] = nextArg;\n } else if (Array.isArray(parsedFlags[arg])) {\n (parsedFlags[arg] as string[]).push(nextArg);\n } else {\n parsedFlags[arg] = [parsedFlags[arg] as string, nextArg];\n }\n i++; // Skip the next argument since it's part of the current flag\n } else {\n if (parsedFlags[arg] === undefined) {\n parsedFlags[arg] = true; // Flag without a value\n } else if (Array.isArray(parsedFlags[arg])) {\n (parsedFlags[arg] as (string | boolean)[]).push(true);\n } else {\n parsedFlags[arg] = [parsedFlags[arg] as any, true];\n }\n }\n }\n } else {\n if (parsedFlags[arg] === undefined) {\n parsedFlags[arg] = true; // Unknown flag\n } else if (Array.isArray(parsedFlags[arg])) {\n (parsedFlags[arg] as (string | boolean)[]).push(true);\n } else {\n parsedFlags[arg] = [parsedFlags[arg] as any, true];\n }\n }\n }\n i++;\n }\n\n // Everything after `--` that is not an option is passed to the underlying install command.\n const extras: string[] = [];\n const extraOperator = argv.indexOf('--');\n if (extraOperator > -1 && argv.length > extraOperator + 1) {\n const extraArgs = argv.slice(extraOperator + 1);\n if (extraArgs.includes('--')) {\n throw new CommandError('BAD_ARGS', 'Unexpected multiple --');\n }\n extras.push(...extraArgs);\n debug('Extra arguments: ' + extras.join(', '));\n }\n\n debug(`Parsed arguments (variadic: %O, flags: %O, extra: %O)`, variadic, parsedFlags, extras);\n\n return {\n variadic,\n flags: parsedFlags,\n extras,\n };\n}\n\nexport function assertUnexpectedObjectKeys(keys: string[], obj: Record<string, any>): void {\n const unexpectedKeys = Object.keys(obj).filter((key) => !keys.includes(key));\n if (unexpectedKeys.length > 0) {\n throw new CommandError('BAD_ARGS', `Unexpected: ${unexpectedKeys.join(', ')}`);\n }\n}\n\nexport function assertUnexpectedVariadicFlags(\n expectedFlags: string[],\n { extras, flags, variadic }: ReturnType<typeof parseVariadicArguments>,\n prefixCommand = ''\n) {\n const unexpectedFlags = Object.keys(flags).filter((key) => !expectedFlags.includes(key));\n\n if (unexpectedFlags.length > 0) {\n const intendedFlags = Object.entries(flags)\n .filter(([key]) => expectedFlags.includes(key))\n .map(([key]) => key);\n\n const cmd = [\n prefixCommand,\n ...variadic,\n ...intendedFlags,\n '--',\n ...extras.concat(unexpectedFlags),\n ].join(' ');\n\n throw new CommandError(\n 'BAD_ARGS',\n `Unexpected: ${unexpectedFlags.join(', ')}\\nDid you mean: ${cmd.trim()}`\n );\n }\n}\n"],"names":["assertUnexpectedObjectKeys","assertUnexpectedVariadicFlags","parseVariadicArguments","debug","require","argv","strFlags","variadic","parsedFlags","i","length","arg","startsWith","push","flagIndex","indexOf","split","flag","value","undefined","Array","isArray","nextArg","extras","extraOperator","extraArgs","slice","includes","CommandError","join","flags","keys","obj","unexpectedKeys","Object","filter","key","expectedFlags","prefixCommand","unexpectedFlags","intendedFlags","entries","map","cmd","concat","trim"],"mappings":";;;;;;;;;;;IA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AAOtB;QACPe;IACF;AACF;AAEO,SAASvB,2BAA2B+B,IAAc,EAAEC,GAAwB;IACjF,MAAMC,iBAAiBC,OAAOH,IAAI,CAACC,KAAKG,MAAM,CAAC,CAACC,MAAQ,CAACL,KAAKJ,QAAQ,CAACS;IACvE,IAAIH,eAAevB,MAAM,GAAG,GAAG;QAC7B,MAAM,IAAIkB,oBAAY,CAAC,YAAY,CAAC,YAAY,EAAEK,eAAeJ,IAAI,CAAC,OAAO;IAC/E;AACF;AAEO,SAAS5B,8BACdoC,aAAuB,EACvB,EAAEd,MAAM,EAAEO,KAAK,EAAEvB,QAAQ,EAA6C,EACtE+B,gBAAgB,EAAE;IAElB,MAAMC,kBAAkBL,OAAOH,IAAI,CAACD,OAAOK,MAAM,CAAC,CAACC,MAAQ,CAACC,cAAcV,QAAQ,CAACS;IAEnF,IAAIG,gBAAgB7B,MAAM,GAAG,GAAG;QAC9B,MAAM8B,gBAAgBN,OAAOO,OAAO,CAACX,OAClCK,MAAM,CAAC,CAAC,CAACC,IAAI,GAAKC,cAAcV,QAAQ,CAACS,MACzCM,GAAG,CAAC,CAAC,CAACN,IAAI,GAAKA;QAElB,MAAMO,MAAM;YACVL;eACG/B;eACAiC;YACH;eACGjB,OAAOqB,MAAM,CAACL;SAClB,CAACV,IAAI,CAAC;QAEP,MAAM,IAAID,oBAAY,CACpB,YACA,CAAC,YAAY,EAAEW,gBAAgBV,IAAI,CAAC,MAAM,gBAAgB,EAAEc,IAAIE,IAAI,IAAI;IAE5E;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/cli",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.4",
|
|
4
4
|
"description": "The Expo CLI",
|
|
5
5
|
"main": "build/bin/cli",
|
|
6
6
|
"bin": {
|
|
@@ -42,21 +42,21 @@
|
|
|
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.
|
|
46
|
-
"@expo/config-plugins": "~9.1.
|
|
45
|
+
"@expo/config": "~11.0.4",
|
|
46
|
+
"@expo/config-plugins": "~9.1.6",
|
|
47
47
|
"@expo/devcert": "^1.1.2",
|
|
48
48
|
"@expo/env": "~1.0.3",
|
|
49
49
|
"@expo/image-utils": "^0.7.2",
|
|
50
50
|
"@expo/json-file": "^9.1.2",
|
|
51
|
-
"@expo/metro-config": "~0.20.
|
|
51
|
+
"@expo/metro-config": "~0.20.6",
|
|
52
52
|
"@expo/osascript": "^2.2.2",
|
|
53
53
|
"@expo/package-manager": "^1.8.2",
|
|
54
54
|
"@expo/plist": "^0.3.2",
|
|
55
|
-
"@expo/prebuild-config": "^9.0.
|
|
55
|
+
"@expo/prebuild-config": "^9.0.1",
|
|
56
56
|
"@expo/spawn-async": "^1.7.2",
|
|
57
57
|
"@expo/ws-tunnel": "^1.0.1",
|
|
58
58
|
"@expo/xcpretty": "^4.3.0",
|
|
59
|
-
"@react-native/dev-middleware": "0.79.
|
|
59
|
+
"@react-native/dev-middleware": "0.79.1",
|
|
60
60
|
"@urql/core": "^5.0.6",
|
|
61
61
|
"@urql/exchange-retry": "^1.3.0",
|
|
62
62
|
"accepts": "^1.3.8",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"freeport-async": "^2.0.0",
|
|
74
74
|
"getenv": "^1.0.0",
|
|
75
75
|
"glob": "^10.4.2",
|
|
76
|
-
"internal-ip": "6.1.0",
|
|
77
76
|
"minimatch": "^9.0.0",
|
|
77
|
+
"lan-network": "^0.1.4",
|
|
78
78
|
"node-forge": "^1.3.1",
|
|
79
79
|
"npm-package-arg": "^11.0.0",
|
|
80
80
|
"ora": "^3.4.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.
|
|
142
|
+
"expo-module-scripts": "^4.1.4",
|
|
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": "
|
|
155
|
+
"gitHead": "dd4ea2ac865a2b0c1f4ea3fc5879d90679099862"
|
|
156
156
|
}
|