eas-cli 24.7.0 → 24.9.0
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/README.md +505 -278
- package/build/build/createContext.js +1 -2
- package/build/build/runBuildAndSubmit.js +4 -1
- package/build/commandUtils/supabase.d.ts +6 -1
- package/build/commandUtils/supabase.js +53 -0
- package/build/commandUtils/workflow/validation.d.ts +1 -0
- package/build/commandUtils/workflow/validation.js +19 -5
- package/build/commands/account/view.js +12 -0
- package/build/commands/integrations/asc/connect.js +3 -0
- package/build/commands/integrations/supabase/advisors.d.ts +16 -0
- package/build/commands/integrations/supabase/advisors.js +153 -0
- package/build/commands/simulator/availability.d.ts +0 -1
- package/build/commands/simulator/availability.js +0 -1
- package/build/commands/simulator/egress.d.ts +0 -1
- package/build/commands/simulator/egress.js +0 -1
- package/build/commands/simulator/events.d.ts +0 -1
- package/build/commands/simulator/events.js +4 -3
- package/build/commands/simulator/exec.d.ts +0 -1
- package/build/commands/simulator/exec.js +0 -1
- package/build/commands/simulator/get.d.ts +0 -1
- package/build/commands/simulator/get.js +1 -1
- package/build/commands/simulator/index.d.ts +2 -1
- package/build/commands/simulator/index.js +40 -21
- package/build/commands/simulator/list.d.ts +0 -1
- package/build/commands/simulator/list.js +4 -3
- package/build/commands/simulator/stop.d.ts +0 -1
- package/build/commands/simulator/stop.js +0 -1
- package/build/commands/submit/internal.d.ts +10 -1
- package/build/commands/submit/internal.js +26 -4
- package/build/commands/update/index.d.ts +2 -0
- package/build/commands/update/index.js +45 -4
- package/build/commands/update/republish.d.ts +1 -0
- package/build/commands/update/republish.js +6 -0
- package/build/commands/update/roll-back-to-embedded.d.ts +1 -0
- package/build/commands/update/roll-back-to-embedded.js +7 -1
- package/build/commands/update/rollback.d.ts +1 -0
- package/build/commands/update/rollback.js +11 -3
- package/build/commands/workflow/validate.js +1 -0
- package/build/credentials/context.js +7 -0
- package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +2 -1
- package/build/credentials/ios/actions/AscApiKeyUtils.js +43 -4
- package/build/credentials/ios/appstore/AppStoreApi.d.ts +5 -0
- package/build/credentials/ios/appstore/AppStoreApi.js +18 -9
- package/build/credentials/ios/appstore/authenticate.d.ts +6 -0
- package/build/credentials/ios/appstore/authenticate.js +22 -1
- package/build/credentials/ios/appstore/resolveCredentials.js +16 -4
- package/build/devices/actions/create/developerPortalMethod.js +1 -1
- package/build/env.d.ts +4 -0
- package/build/env.js +4 -0
- package/build/fetch.js +2 -2
- package/build/graphql/generated.d.ts +348 -26
- package/build/graphql/generated.js +42 -3
- package/build/graphql/queries/SupabaseQuery.d.ts +2 -1
- package/build/graphql/queries/SupabaseQuery.js +42 -0
- package/build/graphql/queries/WorkflowJobSshQuery.d.ts +1 -0
- package/build/graphql/queries/WorkflowJobSshQuery.js +43 -0
- package/build/graphql/types/SupabaseConnection.d.ts +9 -2
- package/build/graphql/types/SupabaseConnection.js +16 -1
- package/build/integrations/asc/ascApiKey.js +2 -1
- package/build/integrations/shared/envFile.js +5 -3
- package/build/integrations/supabase/provision.d.ts +2 -2
- package/build/integrations/supabase/provision.js +6 -4
- package/build/metadata/auth.js +4 -4
- package/build/ora.js +12 -2
- package/build/project/maybeUploadSourceMapsAsync.d.ts +34 -0
- package/build/project/maybeUploadSourceMapsAsync.js +156 -0
- package/build/simulator/egress.d.ts +11 -4
- package/build/simulator/egress.js +72 -10
- package/build/simulator/env.d.ts +1 -0
- package/build/simulator/env.js +4 -1
- package/build/simulator/utils.d.ts +15 -5
- package/build/simulator/utils.js +33 -11
- package/build/submit/ios/AscApiKeySource.js +1 -1
- package/build/submit/ios/IosSubmitCommand.js +2 -2
- package/build/submit/ios/ensureTestFlightSetup.js +1 -4
- package/build/update/active-rollout.d.ts +8 -0
- package/build/update/active-rollout.js +82 -0
- package/build/update/republish.d.ts +4 -1
- package/build/update/republish.js +13 -3
- package/build/update/roll-back-to-embedded.d.ts +4 -1
- package/build/update/roll-back-to-embedded.js +14 -3
- package/build/uploads.js +5 -1
- package/build/user/expoBrowserAuthFlowLauncher.js +0 -1
- package/build/worker/upload.js +2 -2
- package/oclif.manifest.json +828 -668
- package/package.json +9 -8
- package/build/commandUtils/new/templates/CLAUDE.md +0 -1
|
@@ -21,7 +21,7 @@ const utils_1 = require("../../simulator/utils");
|
|
|
21
21
|
const json_1 = require("../../utils/json");
|
|
22
22
|
const promise_1 = require("../../utils/promise");
|
|
23
23
|
const POLL_INTERVAL_MS = 5_000; // 5 seconds
|
|
24
|
-
const
|
|
24
|
+
const STARTUP_TIMEOUT_MS = 15 * 60 * 1_000; // 15 minutes, excluding time in the queue
|
|
25
25
|
const OUT_CONFIG_TYPE_VALUES = {
|
|
26
26
|
Env: 'env',
|
|
27
27
|
Dotenv: 'dotenv',
|
|
@@ -33,8 +33,8 @@ const APP_PLATFORM_BY_FLAG_VALUE = {
|
|
|
33
33
|
ios: generated_1.AppPlatform.Ios,
|
|
34
34
|
};
|
|
35
35
|
class Simulator extends EasCommand_1.default {
|
|
36
|
-
static
|
|
37
|
-
static
|
|
36
|
+
static aliases = ['simulator:start', 'sim:start'];
|
|
37
|
+
static hiddenAliases = ['sim'];
|
|
38
38
|
static description = '[EXPERIMENTAL] start a remote simulator session on EAS and get instructions to connect to it';
|
|
39
39
|
static flags = {
|
|
40
40
|
platform: core_1.Flags.option({
|
|
@@ -54,15 +54,19 @@ class Simulator extends EasCommand_1.default {
|
|
|
54
54
|
}),
|
|
55
55
|
'build-id': core_1.Flags.string({
|
|
56
56
|
description: 'EAS Build to install and launch before the simulator session is ready.',
|
|
57
|
-
exclusive: ['application-archive-url', 'expo-go'],
|
|
57
|
+
exclusive: ['build-fingerprint', 'application-archive-url', 'expo-go'],
|
|
58
|
+
}),
|
|
59
|
+
'build-fingerprint': core_1.Flags.string({
|
|
60
|
+
description: 'Fingerprint hash of an EAS Build to install and launch before the simulator session is ready. Uses the most recent finished build with this fingerprint that can be installed on the simulator.',
|
|
61
|
+
exclusive: ['build-id', 'application-archive-url', 'expo-go'],
|
|
58
62
|
}),
|
|
59
63
|
'application-archive-url': core_1.Flags.string({
|
|
60
64
|
description: 'Application archive URL to download, install, and launch before the simulator session is ready.',
|
|
61
|
-
exclusive: ['build-id', 'expo-go'],
|
|
65
|
+
exclusive: ['build-id', 'build-fingerprint', 'expo-go'],
|
|
62
66
|
}),
|
|
63
67
|
'expo-go': core_1.Flags.boolean({
|
|
64
68
|
description: "Install and launch Expo Go matching the current project's Expo SDK before the simulator session is ready.",
|
|
65
|
-
exclusive: ['build-id', 'application-archive-url'],
|
|
69
|
+
exclusive: ['build-id', 'build-fingerprint', 'application-archive-url'],
|
|
66
70
|
}),
|
|
67
71
|
'sdk-version': core_1.Flags.string({
|
|
68
72
|
description: 'Expo SDK version used to select Expo Go when --expo-go is passed. Defaults to the current project SDK.',
|
|
@@ -76,14 +80,14 @@ class Simulator extends EasCommand_1.default {
|
|
|
76
80
|
}),
|
|
77
81
|
type: core_1.Flags.option({
|
|
78
82
|
description: 'Type of simulator session to create. All session types include a web preview. agent-device, appium, and argent also include an automation interface; web-preview-only includes no automation interface.',
|
|
79
|
-
options:
|
|
83
|
+
options: utils_1.DEVICE_RUN_SESSION_TYPE_FLAG_OPTIONS,
|
|
80
84
|
default: utils_1.DEVICE_RUN_SESSION_TYPE_FLAG_VALUES[generated_1.DeviceRunSessionType.AgentDevice],
|
|
81
85
|
})(),
|
|
82
86
|
'package-version': core_1.Flags.string({
|
|
83
87
|
description: 'Version of the package backing the simulator session (e.g. "0.1.3-alpha.3"). Defaults to "latest" when omitted.',
|
|
84
88
|
}),
|
|
85
89
|
'max-duration-minutes': core_1.Flags.integer({
|
|
86
|
-
description:
|
|
90
|
+
description: "Maximum duration of the simulator session in minutes before it is automatically stopped. Defaults to, and cannot exceed, the maximum session duration of the account's plan.",
|
|
87
91
|
min: 0,
|
|
88
92
|
}),
|
|
89
93
|
'max-idle-time-minutes': core_1.Flags.integer({
|
|
@@ -96,11 +100,11 @@ class Simulator extends EasCommand_1.default {
|
|
|
96
100
|
options: Object.values(utils_1.DEVICE_RUN_SESSION_RESOURCE_CLASS_FLAG_VALUES),
|
|
97
101
|
})(),
|
|
98
102
|
egress: core_1.Flags.option({
|
|
99
|
-
description: 'With "local", the simulator system proxy points at this machine: HTTP(S) and WebSocket requests that honor it (WebKit, URLSession) and clients that read proxy environment variables (gRPC, libcurl)
|
|
103
|
+
description: 'With "local", the simulator\'s network traffic exits from this machine and fails while the egress client is disconnected. On iOS, the simulator system proxy points at this machine: HTTP(S) and WebSocket requests that honor it (WebKit, URLSession) and clients that read proxy environment variables (gRPC, libcurl) use it, and connections that ignore both are refused inside the simulator and listed, with the library that tried, in the Logs section of the session page on expo.dev. On Android, all TCP traffic from the emulator goes through its proxy to this machine; traffic that cannot (UDP, such as QUIC) is refused and listed in the same Logs section, and DNS for apps that ignore the system proxy resolves on the device host. The egress client must keep running for the life of the session.',
|
|
100
104
|
options: EGRESS_FLAG_VALUES,
|
|
101
105
|
})(),
|
|
102
106
|
'egress-allow': core_1.Flags.string({
|
|
103
|
-
description: 'Destination on this machine or its network that the simulator may reach through local egress, as an exact host:port (for example localhost:3000). Repeat for multiple destinations. A localhost or 127.0.0.1 entry also forwards that port from the simulator host to this machine (like adb reverse), so dev server URLs that use 127.0.0.1 work. Requires --egress local.',
|
|
107
|
+
description: 'Destination on this machine or its network that the simulator may reach through local egress, as an exact host:port (for example localhost:3000). Repeat for multiple destinations. A localhost or 127.0.0.1 entry also forwards that port from the simulator host to this machine (like adb reverse), so dev server URLs that use 127.0.0.1 work. On Android, such an entry also covers 10.0.2.2 on the same port. Requires --egress local.',
|
|
104
108
|
multiple: true,
|
|
105
109
|
dependsOn: ['egress'],
|
|
106
110
|
}),
|
|
@@ -145,6 +149,7 @@ class Simulator extends EasCommand_1.default {
|
|
|
145
149
|
const tags = flags.tag?.map(tag => tag.trim()).filter(tag => tag.length > 0);
|
|
146
150
|
const deviceIdentifier = flags.device?.trim() || undefined;
|
|
147
151
|
const buildId = flags['build-id']?.trim() || undefined;
|
|
152
|
+
const buildFingerprint = flags['build-fingerprint']?.trim() || undefined;
|
|
148
153
|
const applicationArchiveUrlFromFlag = flags['application-archive-url']?.trim() || undefined;
|
|
149
154
|
const sdkVersionFromFlag = flags['sdk-version']?.trim() || undefined;
|
|
150
155
|
const launchArgs = flags['launch-arg'];
|
|
@@ -157,9 +162,10 @@ class Simulator extends EasCommand_1.default {
|
|
|
157
162
|
}
|
|
158
163
|
if ((launchArgs?.length || openUrl) &&
|
|
159
164
|
!buildId &&
|
|
165
|
+
!buildFingerprint &&
|
|
160
166
|
!applicationArchiveUrlFromFlag &&
|
|
161
167
|
!flags['expo-go']) {
|
|
162
|
-
throw new errors_1.EasCommandError('Launch options require an application source. Pass --build-id, --application-archive-url, or --expo-go.');
|
|
168
|
+
throw new errors_1.EasCommandError('Launch options require an application source. Pass --build-id, --build-fingerprint, --application-archive-url, or --expo-go.');
|
|
163
169
|
}
|
|
164
170
|
await (0, env_1.loadSimulatorEnvAsync)(projectDir);
|
|
165
171
|
const existingDeviceRunSessionId = process.env[env_1.EAS_SIMULATOR_SESSION_ID];
|
|
@@ -168,9 +174,6 @@ class Simulator extends EasCommand_1.default {
|
|
|
168
174
|
}
|
|
169
175
|
const platform = await resolvePlatformAsync(flags.platform, nonInteractive);
|
|
170
176
|
const egress = flags.egress === 'local' ? generated_1.DeviceRunSessionEgress.Local : undefined;
|
|
171
|
-
if (egress && platform !== generated_1.AppPlatform.Ios) {
|
|
172
|
-
throw new errors_1.EasCommandError('--egress local is only supported with --platform ios.');
|
|
173
|
-
}
|
|
174
177
|
let egressAllow = [];
|
|
175
178
|
try {
|
|
176
179
|
egressAllow = (0, egress_1.parseEgressAllowList)(flags['egress-allow'] ?? []);
|
|
@@ -209,6 +212,7 @@ class Simulator extends EasCommand_1.default {
|
|
|
209
212
|
: { android: { deviceIdentifier } }
|
|
210
213
|
: {}),
|
|
211
214
|
...(buildId ? { buildId } : {}),
|
|
215
|
+
...(buildFingerprint ? { buildFingerprint } : {}),
|
|
212
216
|
...(applicationArchiveUrlFromFlag
|
|
213
217
|
? { applicationArchiveUrl: applicationArchiveUrlFromFlag }
|
|
214
218
|
: {}),
|
|
@@ -237,10 +241,10 @@ class Simulator extends EasCommand_1.default {
|
|
|
237
241
|
throw err;
|
|
238
242
|
}
|
|
239
243
|
const pollSpinner = (0, ora_1.ora)(`⏳ Waiting for ${flags.type} session to be ready`).start();
|
|
240
|
-
|
|
244
|
+
let startupDeadline = Date.now() + STARTUP_TIMEOUT_MS;
|
|
241
245
|
let remoteConfig;
|
|
242
246
|
try {
|
|
243
|
-
while (!sessionInterrupt.signal.aborted
|
|
247
|
+
while (!sessionInterrupt.signal.aborted) {
|
|
244
248
|
const session = await Promise.race([
|
|
245
249
|
DeviceRunSessionQuery_1.DeviceRunSessionQuery.byIdAsync(graphqlClient, deviceRunSessionId),
|
|
246
250
|
sessionInterrupt.abortPromise,
|
|
@@ -263,6 +267,17 @@ class Simulator extends EasCommand_1.default {
|
|
|
263
267
|
pollSpinner.succeed(`🎉 ${flags.type} session is ready`);
|
|
264
268
|
break;
|
|
265
269
|
}
|
|
270
|
+
if (jobRunStatus === generated_1.JobRunStatus.New || jobRunStatus === generated_1.JobRunStatus.InQueue) {
|
|
271
|
+
startupDeadline = undefined;
|
|
272
|
+
pollSpinner.text = '⏳ Simulator session queued or waiting for available concurrency';
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
startupDeadline ??= Date.now() + STARTUP_TIMEOUT_MS;
|
|
276
|
+
pollSpinner.text = `⏳ Waiting for ${flags.type} session to start`;
|
|
277
|
+
if (Date.now() >= startupDeadline) {
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
266
281
|
await (0, promise_1.sleepAsync)(POLL_INTERVAL_MS, sessionInterrupt.signal);
|
|
267
282
|
}
|
|
268
283
|
}
|
|
@@ -283,14 +298,14 @@ class Simulator extends EasCommand_1.default {
|
|
|
283
298
|
return;
|
|
284
299
|
}
|
|
285
300
|
if (!remoteConfig) {
|
|
286
|
-
pollSpinner.fail(`Timed out waiting for ${flags.type} session to
|
|
301
|
+
pollSpinner.fail(`Timed out waiting for ${flags.type} session to start`);
|
|
287
302
|
await ensureDeviceRunSessionStoppedSafelyAsync(graphqlClient, deviceRunSessionId);
|
|
288
303
|
sessionInterrupt.dispose();
|
|
289
|
-
throw new Error(`Timed out after ${Math.round(
|
|
304
|
+
throw new Error(`Timed out after ${Math.round(STARTUP_TIMEOUT_MS / 1000)}s waiting for ${flags.type} session to start (excluding time in the queue). ${(0, log_1.link)(deviceRunSessionUrl)}`);
|
|
290
305
|
}
|
|
291
306
|
if (flags['out-config-type'] === OUT_CONFIG_TYPE_VALUES.Dotenv) {
|
|
292
307
|
await writeSimulatorEnvSafelyAsync(projectDir, {
|
|
293
|
-
...(0, utils_1.getRemoteSessionEnvironmentVariables)(remoteConfig, { egressAllow }),
|
|
308
|
+
...(0, utils_1.getRemoteSessionEnvironmentVariables)(remoteConfig, { egressAllow, platform }),
|
|
294
309
|
[env_1.EAS_SIMULATOR_SESSION_ID]: deviceRunSessionId,
|
|
295
310
|
});
|
|
296
311
|
}
|
|
@@ -320,9 +335,10 @@ class Simulator extends EasCommand_1.default {
|
|
|
320
335
|
egressAllow,
|
|
321
336
|
egressClientRunsInline: !nonInteractive,
|
|
322
337
|
sessionUrl: deviceRunSessionUrl,
|
|
338
|
+
platform,
|
|
323
339
|
}));
|
|
324
340
|
log_1.default.newLine();
|
|
325
|
-
const localEgress = (0, utils_1.getLocalEgressConfig)(remoteConfig, egressAllow);
|
|
341
|
+
const localEgress = (0, utils_1.getLocalEgressConfig)(remoteConfig, egressAllow, platform);
|
|
326
342
|
if (nonInteractive) {
|
|
327
343
|
sessionInterrupt.dispose();
|
|
328
344
|
// The instructions above already tell the reader to run eas simulator:egress.
|
|
@@ -401,7 +417,10 @@ async function writeSimulatorEnvSafelyAsync(projectDir, environmentVariables) {
|
|
|
401
417
|
}
|
|
402
418
|
}
|
|
403
419
|
async function waitForSessionEndOrInterruptAsync({ graphqlClient, deviceRunSessionId, deviceRunSessionUrl, projectDir, sessionInterrupt, }) {
|
|
404
|
-
|
|
420
|
+
log_1.default.log(`To stop the session from another shell, run: eas simulator:stop --id ${deviceRunSessionId}`);
|
|
421
|
+
// Keep the spinner text short so it fits on one line. When the text wraps, resizing the
|
|
422
|
+
// terminal can leave copies of the spinner line behind.
|
|
423
|
+
const spinner = (0, ora_1.ora)('Simulator session active — press Ctrl+C to stop').start();
|
|
405
424
|
const { signal } = sessionInterrupt;
|
|
406
425
|
try {
|
|
407
426
|
while (!signal.aborted) {
|
|
@@ -18,6 +18,8 @@ const DEFAULT_LIMIT = 10;
|
|
|
18
18
|
const MAX_LIMIT = 100;
|
|
19
19
|
const STATUS_FLAG_VALUES = {
|
|
20
20
|
[generated_1.DeviceRunSessionStatus.New]: 'new',
|
|
21
|
+
[generated_1.DeviceRunSessionStatus.Queued]: 'queued',
|
|
22
|
+
[generated_1.DeviceRunSessionStatus.Starting]: 'starting',
|
|
21
23
|
[generated_1.DeviceRunSessionStatus.InProgress]: 'in-progress',
|
|
22
24
|
[generated_1.DeviceRunSessionStatus.Stopped]: 'stopped',
|
|
23
25
|
[generated_1.DeviceRunSessionStatus.Errored]: 'errored',
|
|
@@ -32,7 +34,6 @@ const PLATFORM_FLAG_VALUES = {
|
|
|
32
34
|
};
|
|
33
35
|
const PLATFORM_BY_FLAG_VALUE = Object.fromEntries(Object.entries(PLATFORM_FLAG_VALUES).map(([platform, value]) => [value, platform]));
|
|
34
36
|
class SimulatorList extends EasCommand_1.default {
|
|
35
|
-
static hidden = true;
|
|
36
37
|
static aliases = ['sim:list'];
|
|
37
38
|
static description = '[EXPERIMENTAL] list remote simulator sessions for the current project';
|
|
38
39
|
static flags = {
|
|
@@ -43,7 +44,7 @@ class SimulatorList extends EasCommand_1.default {
|
|
|
43
44
|
})(),
|
|
44
45
|
type: core_1.Flags.option({
|
|
45
46
|
description: 'Filter by session type (repeatable). All session types include a web preview. agent-device, appium, and argent also include an automation interface; web-preview-only includes no automation interface.',
|
|
46
|
-
options:
|
|
47
|
+
options: utils_1.DEVICE_RUN_SESSION_TYPE_FLAG_OPTIONS,
|
|
47
48
|
multiple: true,
|
|
48
49
|
})(),
|
|
49
50
|
platform: core_1.Flags.option({
|
|
@@ -82,7 +83,7 @@ class SimulatorList extends EasCommand_1.default {
|
|
|
82
83
|
filter.statuses = flags.status.map(value => STATUS_BY_FLAG_VALUE[value]);
|
|
83
84
|
}
|
|
84
85
|
if (flags.type && flags.type.length > 0) {
|
|
85
|
-
filter.types = flags.type.
|
|
86
|
+
filter.types = flags.type.flatMap(utils_1.deviceRunSessionTypesForFlagValue);
|
|
86
87
|
}
|
|
87
88
|
if (flags.platform && flags.platform.length > 0) {
|
|
88
89
|
filter.platforms = flags.platform.map(value => PLATFORM_BY_FLAG_VALUE[value]);
|
|
@@ -9,7 +9,6 @@ const ora_1 = require("../../ora");
|
|
|
9
9
|
const env_1 = require("../../simulator/env");
|
|
10
10
|
const json_1 = require("../../utils/json");
|
|
11
11
|
class SimulatorStop extends EasCommand_1.default {
|
|
12
|
-
static hidden = true;
|
|
13
12
|
static aliases = ['sim:stop'];
|
|
14
13
|
static description = '[EXPERIMENTAL] stop a remote simulator session on EAS by its simulator session ID';
|
|
15
14
|
static flags = {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Platform } from '@expo/eas-build-job';
|
|
2
2
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
4
|
+
import { IosSubmissionConfigInput } from '../../graphql/generated';
|
|
3
5
|
/**
|
|
4
6
|
* This command will be run on the EAS workers.
|
|
5
7
|
* This command resolves credentials and other
|
|
@@ -12,13 +14,20 @@ export default class SubmitInternal extends EasCommand {
|
|
|
12
14
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<Platform, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
15
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
16
|
id: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
'application-identifier': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
19
|
};
|
|
16
20
|
static contextDefinition: {
|
|
17
21
|
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
18
22
|
analytics: import("../../commandUtils/context/AnalyticsContextField").default;
|
|
19
23
|
projectDir: import("../../commandUtils/context/ProjectDirContextField").default;
|
|
24
|
+
getDynamicPublicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
25
|
+
getDynamicPrivateProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPrivateProjectConfigContextField;
|
|
20
26
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
21
|
-
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
22
27
|
};
|
|
23
28
|
runAsync(): Promise<void>;
|
|
24
29
|
}
|
|
30
|
+
export declare function getAppStoreConnectApiKeyJsonAsync({ iosConfig, graphqlClient, }: {
|
|
31
|
+
iosConfig: IosSubmissionConfigInput;
|
|
32
|
+
graphqlClient: ExpoGraphqlClient;
|
|
33
|
+
}): Promise<string | null>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAppStoreConnectApiKeyJsonAsync = getAppStoreConnectApiKeyJsonAsync;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
5
6
|
const eas_json_1 = require("@expo/eas-json");
|
|
@@ -8,6 +9,7 @@ const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
|
8
9
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
9
10
|
const generated_1 = require("../../graphql/generated");
|
|
10
11
|
const AppStoreConnectApiKeyQuery_1 = require("../../graphql/queries/AppStoreConnectApiKeyQuery");
|
|
12
|
+
const AppQuery_1 = require("../../graphql/queries/AppQuery");
|
|
11
13
|
const GoogleServiceAccountKeyQuery_1 = require("../../graphql/queries/GoogleServiceAccountKeyQuery");
|
|
12
14
|
const AndroidSubmitCommand_1 = tslib_1.__importDefault(require("../../submit/android/AndroidSubmitCommand"));
|
|
13
15
|
const context_1 = require("../../submit/context");
|
|
@@ -34,10 +36,18 @@ class SubmitInternal extends EasCommand_1.default {
|
|
|
34
36
|
description: 'ID of the build to submit',
|
|
35
37
|
required: true,
|
|
36
38
|
}),
|
|
39
|
+
'project-id': core_1.Flags.string({
|
|
40
|
+
description: 'EAS project ID. With --application-identifier, skips loading app config.',
|
|
41
|
+
dependsOn: ['application-identifier'],
|
|
42
|
+
}),
|
|
43
|
+
'application-identifier': core_1.Flags.string({
|
|
44
|
+
description: 'Bundle identifier or Android package name read from the build artifact.',
|
|
45
|
+
dependsOn: ['project-id'],
|
|
46
|
+
}),
|
|
37
47
|
};
|
|
38
48
|
static contextDefinition = {
|
|
39
49
|
...this.ContextOptions.LoggedIn,
|
|
40
|
-
...this.ContextOptions.
|
|
50
|
+
...this.ContextOptions.DynamicProjectConfig,
|
|
41
51
|
...this.ContextOptions.ProjectDir,
|
|
42
52
|
...this.ContextOptions.Analytics,
|
|
43
53
|
...this.ContextOptions.Vcs,
|
|
@@ -46,10 +56,18 @@ class SubmitInternal extends EasCommand_1.default {
|
|
|
46
56
|
const { flags } = await this.parse(SubmitInternal);
|
|
47
57
|
// This command is always run with implicit --non-interactive and --json options
|
|
48
58
|
(0, json_1.enableJsonOutput)();
|
|
49
|
-
const { loggedIn: { actor, graphqlClient },
|
|
59
|
+
const { loggedIn: { actor, graphqlClient }, projectDir, getDynamicPrivateProjectConfigAsync, analytics, vcsClient, } = await this.getContextAsync(SubmitInternal, {
|
|
50
60
|
nonInteractive: true,
|
|
51
61
|
withServerSideEnvironment: null,
|
|
52
62
|
});
|
|
63
|
+
const project = flags['project-id']
|
|
64
|
+
? await AppQuery_1.AppQuery.byIdAsync(graphqlClient, flags['project-id'])
|
|
65
|
+
: undefined;
|
|
66
|
+
// Worker submissions already know the project and artifact identifiers.
|
|
67
|
+
// The existing submission code only needs the project name and slug here.
|
|
68
|
+
const { exp, projectId } = project
|
|
69
|
+
? { exp: { name: project.name, slug: project.slug }, projectId: project.id }
|
|
70
|
+
: await getDynamicPrivateProjectConfigAsync();
|
|
53
71
|
if (vcsClient instanceof git_1.default) {
|
|
54
72
|
// `build:internal` is run on EAS workers and the repo may have been changed
|
|
55
73
|
// by pre-install hooks or other scripts. We don't want to require committing changes
|
|
@@ -71,6 +89,7 @@ class SubmitInternal extends EasCommand_1.default {
|
|
|
71
89
|
analytics,
|
|
72
90
|
exp,
|
|
73
91
|
projectId,
|
|
92
|
+
applicationIdentifier: flags['application-identifier'],
|
|
74
93
|
vcsClient,
|
|
75
94
|
specifiedProfile: flags.profile,
|
|
76
95
|
groups: undefined, // use groups from submit profile
|
|
@@ -142,10 +161,13 @@ async function getGoogleServiceAccountKeyJsonAsync({ androidConfig, graphqlClien
|
|
|
142
161
|
return null;
|
|
143
162
|
}
|
|
144
163
|
async function getAppStoreConnectApiKeyJsonAsync({ iosConfig, graphqlClient, }) {
|
|
164
|
+
// Individual API keys have no issuer. fastlane detects them by the absence of the issuer_id field.
|
|
145
165
|
if (iosConfig.ascApiKey) {
|
|
146
166
|
return JSON.stringify({
|
|
147
167
|
key_id: iosConfig.ascApiKey.keyIdentifier,
|
|
148
|
-
|
|
168
|
+
...(iosConfig.ascApiKey.issuerIdentifier
|
|
169
|
+
? { issuer_id: iosConfig.ascApiKey.issuerIdentifier }
|
|
170
|
+
: null),
|
|
149
171
|
key: iosConfig.ascApiKey.keyP8,
|
|
150
172
|
});
|
|
151
173
|
}
|
|
@@ -153,7 +175,7 @@ async function getAppStoreConnectApiKeyJsonAsync({ iosConfig, graphqlClient, })
|
|
|
153
175
|
const key = await AppStoreConnectApiKeyQuery_1.AppStoreConnectApiKeyQuery.getByIdAsync(graphqlClient, iosConfig.ascApiKeyId);
|
|
154
176
|
return JSON.stringify({
|
|
155
177
|
key_id: key.keyIdentifier,
|
|
156
|
-
issuer_id: key.issuerIdentifier,
|
|
178
|
+
...(key.issuerIdentifier ? { issuer_id: key.issuerIdentifier } : null),
|
|
157
179
|
key: key.keyP8,
|
|
158
180
|
});
|
|
159
181
|
}
|
|
@@ -20,8 +20,10 @@ export default class UpdatePublish extends EasCommand {
|
|
|
20
20
|
'clear-cache': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
21
21
|
'no-bytecode': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
22
22
|
'source-maps': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
23
|
+
'upload-source-maps': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
23
24
|
'emit-metadata': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
24
25
|
'rollout-percentage': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
26
|
+
'force-end-active-rollout': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
25
27
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<RequestedPlatform, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
26
28
|
auto: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
27
29
|
'private-key-path': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -21,10 +21,12 @@ const log_1 = tslib_1.__importStar(require("../../log"));
|
|
|
21
21
|
const ora_1 = require("../../ora");
|
|
22
22
|
const platform_1 = require("../../platform");
|
|
23
23
|
const maybeUploadAssetMapAsync_1 = require("../../project/maybeUploadAssetMapAsync");
|
|
24
|
+
const maybeUploadSourceMapsAsync_1 = require("../../project/maybeUploadSourceMapsAsync");
|
|
24
25
|
const maybeUploadFingerprintAsync_1 = require("../../project/maybeUploadFingerprintAsync");
|
|
25
26
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
26
27
|
const publish_1 = require("../../project/publish");
|
|
27
28
|
const workflow_1 = require("../../project/workflow");
|
|
29
|
+
const active_rollout_1 = require("../../update/active-rollout");
|
|
28
30
|
const configure_1 = require("../../update/configure");
|
|
29
31
|
const utils_2 = require("../../update/utils");
|
|
30
32
|
const code_signing_1 = require("../../utils/code-signing");
|
|
@@ -93,6 +95,10 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
93
95
|
default: 'true',
|
|
94
96
|
hidden: true,
|
|
95
97
|
}),
|
|
98
|
+
'upload-source-maps': core_1.Flags.boolean({
|
|
99
|
+
description: `Upload the generated source maps to EAS so that stack traces from this update can be symbolicated`,
|
|
100
|
+
default: false,
|
|
101
|
+
}),
|
|
96
102
|
'emit-metadata': core_1.Flags.boolean({
|
|
97
103
|
description: `Emit "eas-update-metadata.json" in the bundle folder with detailed information about the generated updates`,
|
|
98
104
|
default: false,
|
|
@@ -103,6 +109,10 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
103
109
|
min: 0,
|
|
104
110
|
max: 100,
|
|
105
111
|
}),
|
|
112
|
+
'force-end-active-rollout': core_1.Flags.boolean({
|
|
113
|
+
description: 'End an in-progress rollout on the runtime version being published, so this update supersedes it.',
|
|
114
|
+
default: false,
|
|
115
|
+
}),
|
|
106
116
|
platform: core_1.Flags.option({
|
|
107
117
|
char: 'p',
|
|
108
118
|
options: Object.values(platform_1.RequestedPlatform), // TODO: Add web when it's fully supported
|
|
@@ -131,7 +141,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
131
141
|
const preprocessedArgv = preprocessSourceMapsArg(this.argv);
|
|
132
142
|
const { flags: rawFlags } = await this.parse(UpdatePublish, preprocessedArgv);
|
|
133
143
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(rawFlags);
|
|
134
|
-
const { auto: autoFlag, platform: requestedPlatform, channelName: channelNameArg, updateMessage: updateMessageArg, inputDir, skipBundler, clearCache, noBytecode, sourceMaps, privateKeyPath, json: jsonFlag, nonInteractive, branchName: branchNameArg, emitMetadata, rolloutPercentage, environment: environmentFromFlags, } = this.sanitizeFlags(rawFlags);
|
|
144
|
+
const { auto: autoFlag, platform: requestedPlatform, channelName: channelNameArg, updateMessage: updateMessageArg, inputDir, skipBundler, clearCache, noBytecode, sourceMaps, uploadSourceMaps, privateKeyPath, json: jsonFlag, nonInteractive, branchName: branchNameArg, emitMetadata, rolloutPercentage, forceEndActiveRollout, environment: environmentFromFlags, } = this.sanitizeFlags(rawFlags);
|
|
135
145
|
const { getDynamicPublicProjectConfigAsync, getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, vcsClient, getServerSideEnvironmentVariablesAsync, } = await this.getContextAsync(UpdatePublish, {
|
|
136
146
|
nonInteractive,
|
|
137
147
|
withServerSideEnvironment: environmentFromFlags ?? null,
|
|
@@ -224,12 +234,15 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
224
234
|
let assetLimitPerUpdateGroup = 0;
|
|
225
235
|
let realizedPlatforms = [];
|
|
226
236
|
let assetMapSource = null;
|
|
237
|
+
let sourceMapSources = null;
|
|
227
238
|
try {
|
|
228
|
-
const [collectedAssets, maybeAssetMapSource] = await Promise.all([
|
|
239
|
+
const [collectedAssets, maybeAssetMapSource, maybeSourceMapSources] = await Promise.all([
|
|
229
240
|
(0, publish_1.collectAssetsAsync)(distRoot),
|
|
230
241
|
(0, maybeUploadAssetMapAsync_1.maybeUploadAssetMapAsync)(distRoot, graphqlClient),
|
|
242
|
+
uploadSourceMaps ? (0, maybeUploadSourceMapsAsync_1.maybeUploadSourceMapsAsync)(distRoot, graphqlClient) : null,
|
|
231
243
|
]);
|
|
232
244
|
assetMapSource = maybeAssetMapSource;
|
|
245
|
+
sourceMapSources = maybeSourceMapSources;
|
|
233
246
|
const assets = (0, publish_1.filterCollectedAssetsByRequestedPlatforms)(collectedAssets, requestedPlatform);
|
|
234
247
|
realizedPlatforms = Object.keys(assets);
|
|
235
248
|
// Timeout mechanism:
|
|
@@ -383,12 +396,21 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
383
396
|
const assetMapGroup = assetMapSource
|
|
384
397
|
? Object.fromEntries(platforms.map(platform => [platform, assetMapSource]))
|
|
385
398
|
: null;
|
|
399
|
+
// Source maps are per platform. The filter narrows to the platforms the
|
|
400
|
+
// SourceMapGroup input accepts; `web` is already excluded further upstream.
|
|
401
|
+
const sourceMapGroupEntries = sourceMapSources
|
|
402
|
+
? platforms
|
|
403
|
+
.filter(maybeUploadSourceMapsAsync_1.isSourceMapPlatform)
|
|
404
|
+
.flatMap(platform => sourceMapSources?.[platform] ? [[platform, sourceMapSources[platform]]] : [])
|
|
405
|
+
: [];
|
|
406
|
+
const sourceMapGroup = sourceMapGroupEntries.length > 0 ? Object.fromEntries(sourceMapGroupEntries) : null;
|
|
386
407
|
return {
|
|
387
408
|
branchId: branch.id,
|
|
388
409
|
updateInfoGroup: localUpdateInfoGroup,
|
|
389
410
|
rolloutInfoGroup: localRolloutInfoGroup,
|
|
390
411
|
fingerprintInfoGroup: transformedFingerprintInfoGroup,
|
|
391
412
|
assetMapGroup,
|
|
413
|
+
sourceMapGroup,
|
|
392
414
|
runtimeVersion,
|
|
393
415
|
message: updateMessage,
|
|
394
416
|
gitCommitHash,
|
|
@@ -399,10 +421,16 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
399
421
|
assetHostOverride: easJsonCliConfig.updateAssetHostOverride ?? null,
|
|
400
422
|
};
|
|
401
423
|
});
|
|
424
|
+
const updateGroupsToPublish = await (0, active_rollout_1.resolveUpdateGroupsSupersedingActiveRolloutsAsync)(graphqlClient, updateGroups, {
|
|
425
|
+
appId: projectId,
|
|
426
|
+
branchName: branch.name,
|
|
427
|
+
forceEndActiveRollout,
|
|
428
|
+
rolloutPercentage,
|
|
429
|
+
});
|
|
402
430
|
let newUpdates;
|
|
403
431
|
const publishSpinner = (0, ora_1.ora)('Publishing...').start();
|
|
404
432
|
try {
|
|
405
|
-
newUpdates = await PublishMutation_1.PublishMutation.publishUpdateGroupAsync(graphqlClient,
|
|
433
|
+
newUpdates = await PublishMutation_1.PublishMutation.publishUpdateGroupAsync(graphqlClient, updateGroupsToPublish);
|
|
406
434
|
if (codeSigningInfo) {
|
|
407
435
|
log_1.default.log('🔒 Signing updates');
|
|
408
436
|
const updatesTemp = [...newUpdates];
|
|
@@ -522,6 +550,17 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
522
550
|
emitMetadata = false;
|
|
523
551
|
log_1.default.warn('ignoring flag --emit-metadata as metadata cannot be generated when skipping bundle generation');
|
|
524
552
|
}
|
|
553
|
+
const uploadSourceMaps = flags['upload-source-maps'] ?? false;
|
|
554
|
+
const sourceMaps = flags['source-maps'];
|
|
555
|
+
// Only the default value reliably writes a standalone source map file. `false` writes none,
|
|
556
|
+
// and any other value is passed straight to `expo export` on SDK 55+, where `inline` embeds
|
|
557
|
+
// the map in the bundle instead of writing a file.
|
|
558
|
+
if (uploadSourceMaps && sourceMaps !== undefined && sourceMaps !== 'true') {
|
|
559
|
+
core_1.Errors.error(`--upload-source-maps requires --source-maps true, which is the default. Other values may not write a separate source map file to upload. Received --source-maps ${sourceMaps}`, { exit: 1 });
|
|
560
|
+
}
|
|
561
|
+
if (uploadSourceMaps && skipBundler) {
|
|
562
|
+
log_1.default.warn('using --upload-source-maps with --skip-bundler: source maps must already exist in the input directory');
|
|
563
|
+
}
|
|
525
564
|
return {
|
|
526
565
|
auto,
|
|
527
566
|
branchName,
|
|
@@ -531,10 +570,12 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
531
570
|
skipBundler,
|
|
532
571
|
clearCache: flags['clear-cache'] ? true : !!flags['environment'],
|
|
533
572
|
noBytecode: flags['no-bytecode'] ?? false,
|
|
534
|
-
sourceMaps
|
|
573
|
+
sourceMaps,
|
|
574
|
+
uploadSourceMaps,
|
|
535
575
|
platform: flags.platform,
|
|
536
576
|
privateKeyPath: flags['private-key-path'],
|
|
537
577
|
rolloutPercentage: flags['rollout-percentage'],
|
|
578
|
+
forceEndActiveRollout: flags['force-end-active-rollout'],
|
|
538
579
|
nonInteractive,
|
|
539
580
|
emitMetadata,
|
|
540
581
|
json,
|
|
@@ -13,6 +13,7 @@ export default class UpdateRepublish extends EasCommand {
|
|
|
13
13
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<"android" | "ios" | "all" | "web", import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
14
|
'private-key-path': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
15
|
'rollout-percentage': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
'force-end-active-rollout': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
17
|
};
|
|
17
18
|
static contextDefinition: {
|
|
18
19
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
@@ -55,6 +55,10 @@ class UpdateRepublish extends EasCommand_1.default {
|
|
|
55
55
|
min: 0,
|
|
56
56
|
max: 100,
|
|
57
57
|
}),
|
|
58
|
+
'force-end-active-rollout': core_1.Flags.boolean({
|
|
59
|
+
description: 'End an in-progress rollout on the runtime version being republished to, so this update supersedes it.',
|
|
60
|
+
default: false,
|
|
61
|
+
}),
|
|
58
62
|
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
59
63
|
};
|
|
60
64
|
static contextDefinition = {
|
|
@@ -102,6 +106,7 @@ class UpdateRepublish extends EasCommand_1.default {
|
|
|
102
106
|
codeSigningInfo,
|
|
103
107
|
json: flags.json,
|
|
104
108
|
rolloutPercentage: flags.rolloutPercentage,
|
|
109
|
+
activeRollout: { forceEndActiveRollout: flags.forceEndActiveRollout },
|
|
105
110
|
});
|
|
106
111
|
}
|
|
107
112
|
sanitizeFlags(rawFlags) {
|
|
@@ -126,6 +131,7 @@ class UpdateRepublish extends EasCommand_1.default {
|
|
|
126
131
|
updateMessage: rawFlags.message,
|
|
127
132
|
privateKeyPath,
|
|
128
133
|
rolloutPercentage: rawFlags['rollout-percentage'],
|
|
134
|
+
forceEndActiveRollout: rawFlags['force-end-active-rollout'],
|
|
129
135
|
json,
|
|
130
136
|
nonInteractive,
|
|
131
137
|
};
|
|
@@ -10,6 +10,7 @@ export default class UpdateRollBackToEmbedded extends EasCommand {
|
|
|
10
10
|
message: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
11
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<"android" | "ios" | "all", import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
12
|
'private-key-path': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
'force-end-active-rollout': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
};
|
|
14
15
|
static contextDefinition: {
|
|
15
16
|
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
@@ -49,6 +49,10 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
49
49
|
description: `File containing the PEM-encoded private key corresponding to the certificate in expo-updates' configuration. Defaults to a file named "private-key.pem" in the certificate's directory. Only relevant if you are using code signing: https://docs.expo.dev/eas-update/code-signing/`,
|
|
50
50
|
required: false,
|
|
51
51
|
}),
|
|
52
|
+
'force-end-active-rollout': core_1.Flags.boolean({
|
|
53
|
+
description: 'End an in-progress rollout on the runtime version being rolled back, so this roll back supersedes it.',
|
|
54
|
+
default: false,
|
|
55
|
+
}),
|
|
52
56
|
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
53
57
|
};
|
|
54
58
|
static contextDefinition = {
|
|
@@ -59,7 +63,7 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
59
63
|
async runAsync() {
|
|
60
64
|
const { flags: rawFlags } = await this.parse(UpdateRollBackToEmbedded);
|
|
61
65
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(rawFlags);
|
|
62
|
-
const { platform: platformFlag, channelName: channelNameArg, updateMessage: updateMessageArg, runtimeVersion: runtimeVersionArg, privateKeyPath, json: jsonFlag, nonInteractive, branchName: branchNameArg, } = this.sanitizeFlags(rawFlags);
|
|
66
|
+
const { platform: platformFlag, channelName: channelNameArg, updateMessage: updateMessageArg, runtimeVersion: runtimeVersionArg, privateKeyPath, forceEndActiveRollout, json: jsonFlag, nonInteractive, branchName: branchNameArg, } = this.sanitizeFlags(rawFlags);
|
|
63
67
|
const { getDynamicPublicProjectConfigAsync, getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, vcsClient, } = await this.getContextAsync(UpdateRollBackToEmbedded, {
|
|
64
68
|
nonInteractive,
|
|
65
69
|
withServerSideEnvironment: null,
|
|
@@ -124,6 +128,7 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
124
128
|
platforms: realizedPlatforms,
|
|
125
129
|
runtimeVersion: selectedRuntime,
|
|
126
130
|
json: jsonFlag,
|
|
131
|
+
activeRollout: { forceEndActiveRollout },
|
|
127
132
|
});
|
|
128
133
|
}
|
|
129
134
|
sanitizeFlags(flags) {
|
|
@@ -142,6 +147,7 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
142
147
|
runtimeVersion,
|
|
143
148
|
platform: flags.platform,
|
|
144
149
|
privateKeyPath: flags['private-key-path'],
|
|
150
|
+
forceEndActiveRollout: flags['force-end-active-rollout'],
|
|
145
151
|
nonInteractive,
|
|
146
152
|
json,
|
|
147
153
|
};
|
|
@@ -10,6 +10,7 @@ export default class UpdateRollback extends EasCommand {
|
|
|
10
10
|
message: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
11
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<"android" | "ios" | "all", import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
12
|
'private-key-path': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
'force-end-active-rollout': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
};
|
|
14
15
|
static contextDefinition: {
|
|
15
16
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|