eas-cli 13.4.2 → 14.0.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 +73 -73
- package/build/ApiV2Error.js +5 -1
- package/build/analytics/AnalyticsManager.js +5 -4
- package/build/api.js +1 -0
- package/build/branch/actions/SelectBranch.js +1 -0
- package/build/branch/queries.d.ts +3 -3
- package/build/branch/queries.js +7 -5
- package/build/build/validate.js +6 -3
- package/build/channel/actions/SelectChannel.js +1 -0
- package/build/channel/queries.d.ts +0 -1
- package/build/channel/queries.js +11 -16
- package/build/commandUtils/EasCommand.js +100 -90
- package/build/commandUtils/builds.d.ts +1 -0
- package/build/commandUtils/builds.js +3 -0
- package/build/commandUtils/gating/FeatureGateEnvOverrides.js +1 -1
- package/build/commandUtils/gating/FeatureGating.js +2 -0
- package/build/commands/account/login.js +16 -18
- package/build/commands/account/logout.js +6 -8
- package/build/commands/account/view.js +8 -10
- package/build/commands/analytics.js +2 -2
- package/build/commands/branch/create.js +18 -20
- package/build/commands/branch/delete.js +17 -19
- package/build/commands/branch/list.js +11 -13
- package/build/commands/branch/publish.js +2 -2
- package/build/commands/branch/rename.js +18 -20
- package/build/commands/branch/view.js +19 -21
- package/build/commands/build/cancel.js +22 -24
- package/build/commands/build/configure.js +15 -17
- package/build/commands/build/delete.js +22 -24
- package/build/commands/build/index.js +81 -83
- package/build/commands/build/inspect.js +42 -44
- package/build/commands/build/internal.js +32 -34
- package/build/commands/build/list.js +58 -60
- package/build/commands/build/resign.js +36 -38
- package/build/commands/build/run.js +36 -38
- package/build/commands/build/version/get.js +21 -23
- package/build/commands/build/version/set.js +20 -22
- package/build/commands/build/version/sync.js +20 -22
- package/build/commands/build/view.js +12 -14
- package/build/commands/channel/create.js +17 -19
- package/build/commands/channel/delete.js +18 -20
- package/build/commands/channel/edit.js +20 -22
- package/build/commands/channel/list.js +12 -14
- package/build/commands/channel/pause.js +20 -22
- package/build/commands/channel/resume.js +20 -22
- package/build/commands/channel/rollout.js +74 -76
- package/build/commands/channel/view.js +18 -20
- package/build/commands/config.js +21 -23
- package/build/commands/credentials/configure-build.js +21 -23
- package/build/commands/credentials/index.js +13 -15
- package/build/commands/device/create.js +6 -8
- package/build/commands/device/delete.js +12 -14
- package/build/commands/device/list.js +12 -14
- package/build/commands/device/rename.js +13 -15
- package/build/commands/device/view.js +8 -10
- package/build/commands/diagnostics.js +6 -8
- package/build/commands/env/create.js +39 -41
- package/build/commands/env/delete.js +25 -27
- package/build/commands/env/exec.js +22 -24
- package/build/commands/env/get.js +26 -28
- package/build/commands/env/link.js +27 -29
- package/build/commands/env/list.js +27 -29
- package/build/commands/env/pull.js +23 -25
- package/build/commands/env/push.js +21 -23
- package/build/commands/env/unlink.js +23 -25
- package/build/commands/env/update.js +38 -40
- package/build/commands/fingerprint/compare.d.ts +28 -0
- package/build/commands/fingerprint/compare.js +324 -0
- package/build/commands/metadata/lint.js +18 -20
- package/build/commands/metadata/pull.js +15 -17
- package/build/commands/metadata/push.js +15 -17
- package/build/commands/open.js +6 -8
- package/build/commands/project/info.js +6 -8
- package/build/commands/project/init.js +26 -28
- package/build/commands/project/onboarding.js +10 -12
- package/build/commands/secret/create.js +30 -32
- package/build/commands/secret/delete.js +14 -16
- package/build/commands/secret/list.js +7 -9
- package/build/commands/secret/push.js +23 -25
- package/build/commands/submit/internal.js +23 -25
- package/build/commands/submit.js +54 -56
- package/build/commands/update/configure.js +18 -20
- package/build/commands/update/delete.js +16 -18
- package/build/commands/update/edit.js +25 -27
- package/build/commands/update/index.js +65 -67
- package/build/commands/update/list.js +21 -23
- package/build/commands/update/republish.js +45 -47
- package/build/commands/update/roll-back-to-embedded.d.ts +2 -1
- package/build/commands/update/roll-back-to-embedded.js +92 -84
- package/build/commands/update/rollback.js +7 -7
- package/build/commands/update/view.js +16 -18
- package/build/commands/webhook/create.js +20 -22
- package/build/commands/webhook/delete.js +17 -19
- package/build/commands/webhook/list.js +14 -16
- package/build/commands/webhook/update.js +23 -25
- package/build/commands/webhook/view.js +13 -15
- package/build/commands/worker/alias.js +30 -32
- package/build/commands/worker/deploy.js +38 -40
- package/build/commands/workflow/create.js +16 -18
- package/build/commands/workflow/run.js +13 -15
- package/build/commands/workflow/validate.js +18 -20
- package/build/credentials/android/AndroidCredentialsProvider.js +3 -1
- package/build/credentials/android/actions/AssignFcm.js +1 -0
- package/build/credentials/android/actions/AssignGoogleServiceAccountKeyForFcmV1.js +1 -0
- package/build/credentials/android/actions/AssignGoogleServiceAccountKeyForSubmissions.js +1 -0
- package/build/credentials/android/actions/CreateFcm.js +1 -0
- package/build/credentials/android/actions/CreateGoogleServiceAccountKey.js +1 -0
- package/build/credentials/android/actions/CreateKeystore.js +1 -0
- package/build/credentials/android/actions/DownloadKeystore.js +2 -0
- package/build/credentials/android/actions/RemoveFcm.js +1 -0
- package/build/credentials/android/actions/RemoveGoogleServiceAccountKey.js +2 -0
- package/build/credentials/android/actions/RemoveKeystore.js +1 -0
- package/build/credentials/android/actions/SetUpBuildCredentials.js +1 -0
- package/build/credentials/android/actions/SetUpBuildCredentialsFromCredentialsJson.js +1 -0
- package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForFcmV1.js +1 -0
- package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForSubmissions.js +1 -0
- package/build/credentials/android/actions/UseExistingGoogleServiceAccountKey.js +1 -0
- package/build/credentials/context.js +14 -5
- package/build/credentials/errors.js +1 -0
- package/build/credentials/ios/IosCredentialsProvider.js +3 -1
- package/build/credentials/ios/actions/AssignAscApiKey.js +1 -0
- package/build/credentials/ios/actions/AssignPushKey.js +1 -0
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +4 -0
- package/build/credentials/ios/actions/CreateAscApiKey.js +1 -0
- package/build/credentials/ios/actions/CreateDistributionCertificate.js +1 -0
- package/build/credentials/ios/actions/CreateProvisioningProfile.js +3 -0
- package/build/credentials/ios/actions/CreatePushKey.js +1 -0
- package/build/credentials/ios/actions/RemoveAscApiKey.js +2 -0
- package/build/credentials/ios/actions/RemoveDistributionCertificate.js +3 -0
- package/build/credentials/ios/actions/RemoveProvisioningProfile.js +2 -0
- package/build/credentials/ios/actions/RemovePushKey.js +2 -0
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +1 -0
- package/build/credentials/ios/actions/SetUpAscApiKey.js +9 -7
- package/build/credentials/ios/actions/SetUpBuildCredentials.js +1 -0
- package/build/credentials/ios/actions/SetUpBuildCredentialsFromCredentialsJson.js +3 -0
- package/build/credentials/ios/actions/SetUpDistributionCertificate.js +3 -0
- package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.js +1 -0
- package/build/credentials/ios/actions/SetUpProvisioningProfile.js +3 -0
- package/build/credentials/ios/actions/SetUpPushKey.js +1 -0
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.js +1 -0
- package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.js +3 -0
- package/build/credentials/ios/actions/UpdateCredentialsJson.js +3 -0
- package/build/credentials/ios/appstore/AppStoreApi.js +2 -0
- package/build/credentials/manager/CheckBuildProfileFlagAgainstEasJson.js +3 -0
- package/build/credentials/manager/CreateAndroidBuildCredentials.js +1 -0
- package/build/credentials/manager/ManageAndroid.js +2 -0
- package/build/credentials/manager/ManageIos.js +2 -0
- package/build/credentials/manager/SelectAndroidBuildCredentials.js +2 -0
- package/build/credentials/manager/SelectBuildProfileFromEasJson.js +2 -0
- package/build/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.js +1 -0
- package/build/credentials/manager/SelectPlatform.js +7 -0
- package/build/credentials/manager/SetDefaultAndroidKeystore.js +1 -0
- package/build/credentials/manager/SetUpAndroidBuildCredentials.js +1 -0
- package/build/credentials/manager/SetUpBuildCredentialsCommandAction.js +9 -0
- package/build/credentials/manager/SetUpIosBuildCredentials.js +1 -0
- package/build/devices/actions/create/action.js +4 -0
- package/build/devices/manager.js +4 -0
- package/build/fetch.js +1 -0
- package/build/graphql/generated.d.ts +175 -0
- package/build/graphql/generated.js +8 -3
- package/build/graphql/queries/BuildQuery.d.ts +4 -1
- package/build/graphql/queries/BuildQuery.js +19 -0
- package/build/graphql/types/Build.d.ts +1 -0
- package/build/graphql/types/Build.js +15 -1
- package/build/graphql/types/Fingerprint.d.ts +1 -0
- package/build/graphql/types/Fingerprint.js +12 -0
- package/build/log.js +2 -2
- package/build/metadata/apple/config/reader.js +1 -0
- package/build/metadata/apple/config/writer.js +1 -0
- package/build/metadata/apple/tasks/age-rating.js +1 -4
- package/build/metadata/apple/tasks/app-info.js +1 -4
- package/build/metadata/apple/tasks/app-review-detail.js +1 -4
- package/build/metadata/apple/tasks/app-version.js +2 -1
- package/build/metadata/errors.js +5 -0
- package/build/rollout/actions/CreateRollout.d.ts +9 -10
- package/build/rollout/actions/CreateRollout.js +2 -0
- package/build/rollout/actions/EditRollout.d.ts +2 -3
- package/build/rollout/actions/EditRollout.js +2 -0
- package/build/rollout/actions/EndRollout.d.ts +4 -6
- package/build/rollout/actions/EndRollout.js +2 -0
- package/build/rollout/actions/ManageRollout.d.ts +2 -3
- package/build/rollout/actions/ManageRollout.js +2 -0
- package/build/rollout/actions/NonInteractiveRollout.d.ts +6 -27
- package/build/rollout/actions/NonInteractiveRollout.js +1 -0
- package/build/rollout/actions/RolloutMainMenu.d.ts +6 -7
- package/build/rollout/actions/RolloutMainMenu.js +1 -0
- package/build/rollout/actions/SelectRuntime.d.ts +6 -20
- package/build/rollout/actions/SelectRuntime.js +3 -0
- package/build/submit/BaseSubmitter.js +4 -0
- package/build/submit/android/AndroidSubmitCommand.js +1 -0
- package/build/submit/ios/IosSubmitCommand.js +1 -0
- package/build/update/getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync.js +3 -3
- package/build/user/SessionManager.js +2 -0
- package/build/utils/fingerprint.d.ts +97 -0
- package/build/utils/fingerprint.js +5 -0
- package/build/utils/fingerprintCli.d.ts +5 -7
- package/build/utils/fingerprintCli.js +11 -1
- package/build/utils/fingerprintDiff.d.ts +33 -0
- package/build/utils/fingerprintDiff.js +122 -0
- package/build/vcs/clients/git.js +1 -0
- package/build/vcs/local.js +2 -1
- package/oclif.manifest.json +51 -7
- package/package.json +9 -7
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var _a;
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
4
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
@@ -32,11 +31,72 @@ const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields
|
|
|
32
31
|
const json_1 = require("../../utils/json");
|
|
33
32
|
const statuspageService_1 = require("../../utils/statuspageService");
|
|
34
33
|
class UpdatePublish extends EasCommand_1.default {
|
|
34
|
+
static description = 'publish an update group';
|
|
35
|
+
static flags = {
|
|
36
|
+
branch: core_1.Flags.string({
|
|
37
|
+
description: 'Branch to publish the update group on',
|
|
38
|
+
required: false,
|
|
39
|
+
}),
|
|
40
|
+
channel: core_1.Flags.string({
|
|
41
|
+
description: 'Channel that the published update should affect',
|
|
42
|
+
required: false,
|
|
43
|
+
}),
|
|
44
|
+
message: core_1.Flags.string({
|
|
45
|
+
char: 'm',
|
|
46
|
+
description: 'A short message describing the update',
|
|
47
|
+
required: false,
|
|
48
|
+
}),
|
|
49
|
+
'input-dir': core_1.Flags.string({
|
|
50
|
+
description: 'Location of the bundle',
|
|
51
|
+
default: 'dist',
|
|
52
|
+
required: false,
|
|
53
|
+
}),
|
|
54
|
+
'skip-bundler': core_1.Flags.boolean({
|
|
55
|
+
description: `Skip running Expo CLI to bundle the app before publishing`,
|
|
56
|
+
default: false,
|
|
57
|
+
}),
|
|
58
|
+
'clear-cache': core_1.Flags.boolean({
|
|
59
|
+
description: `Clear the bundler cache before publishing`,
|
|
60
|
+
default: false,
|
|
61
|
+
}),
|
|
62
|
+
'emit-metadata': core_1.Flags.boolean({
|
|
63
|
+
description: `Emit "eas-update-metadata.json" in the bundle folder with detailed information about the generated updates`,
|
|
64
|
+
default: false,
|
|
65
|
+
}),
|
|
66
|
+
'rollout-percentage': core_1.Flags.integer({
|
|
67
|
+
description: `Percentage of users this update should be immediately available to. Users not in the rollout will be served the previous latest update on the branch, even if that update is itself being rolled out. The specified number must be an integer between 1 and 100. When not specified, this defaults to 100.`,
|
|
68
|
+
required: false,
|
|
69
|
+
min: 0,
|
|
70
|
+
max: 100,
|
|
71
|
+
}),
|
|
72
|
+
platform: core_1.Flags.enum({
|
|
73
|
+
char: 'p',
|
|
74
|
+
options: Object.values(platform_1.RequestedPlatform), // TODO: Add web when it's fully supported
|
|
75
|
+
default: platform_1.RequestedPlatform.All,
|
|
76
|
+
required: false,
|
|
77
|
+
}),
|
|
78
|
+
auto: core_1.Flags.boolean({
|
|
79
|
+
description: 'Use the current git branch and commit message for the EAS branch and update message',
|
|
80
|
+
default: false,
|
|
81
|
+
}),
|
|
82
|
+
'private-key-path': core_1.Flags.string({
|
|
83
|
+
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/`,
|
|
84
|
+
required: false,
|
|
85
|
+
}),
|
|
86
|
+
...flags_1.EasUpdateEnvironmentFlag,
|
|
87
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
88
|
+
};
|
|
89
|
+
static contextDefinition = {
|
|
90
|
+
...this.ContextOptions.DynamicProjectConfig,
|
|
91
|
+
...this.ContextOptions.LoggedIn,
|
|
92
|
+
...this.ContextOptions.Vcs,
|
|
93
|
+
...this.ContextOptions.ServerSideEnvironmentVariables,
|
|
94
|
+
};
|
|
35
95
|
async runAsync() {
|
|
36
|
-
const { flags: rawFlags } = await this.parse(
|
|
96
|
+
const { flags: rawFlags } = await this.parse(UpdatePublish);
|
|
37
97
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(rawFlags);
|
|
38
98
|
const { auto: autoFlag, platform: requestedPlatform, channelName: channelNameArg, updateMessage: updateMessageArg, inputDir, skipBundler, clearCache, privateKeyPath, json: jsonFlag, nonInteractive, branchName: branchNameArg, emitMetadata, rolloutPercentage, environment, } = this.sanitizeFlags(rawFlags);
|
|
39
|
-
const { getDynamicPublicProjectConfigAsync, getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, vcsClient, getServerSideEnvironmentVariablesAsync, } = await this.getContextAsync(
|
|
99
|
+
const { getDynamicPublicProjectConfigAsync, getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, vcsClient, getServerSideEnvironmentVariablesAsync, } = await this.getContextAsync(UpdatePublish, {
|
|
40
100
|
nonInteractive,
|
|
41
101
|
withServerSideEnvironment: environment,
|
|
42
102
|
});
|
|
@@ -202,7 +262,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
202
262
|
env: undefined,
|
|
203
263
|
});
|
|
204
264
|
const runtimeToPlatformsAndFingerprintInfoMapping = (0, publish_1.getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObjects)(runtimeVersionInfoObjects);
|
|
205
|
-
const {
|
|
265
|
+
const { branch } = await (0, queries_1.ensureBranchExistsAsync)(graphqlClient, {
|
|
206
266
|
appId: projectId,
|
|
207
267
|
branchName,
|
|
208
268
|
});
|
|
@@ -260,7 +320,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
260
320
|
};
|
|
261
321
|
}, {});
|
|
262
322
|
return {
|
|
263
|
-
branchId,
|
|
323
|
+
branchId: branch.id,
|
|
264
324
|
updateInfoGroup: localUpdateInfoGroup,
|
|
265
325
|
rolloutInfoGroup: localRolloutInfoGroup,
|
|
266
326
|
runtimeFingerprintSource: fingerprintSource
|
|
@@ -415,66 +475,4 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
415
475
|
};
|
|
416
476
|
}
|
|
417
477
|
}
|
|
418
|
-
_a = UpdatePublish;
|
|
419
|
-
UpdatePublish.description = 'publish an update group';
|
|
420
|
-
UpdatePublish.flags = {
|
|
421
|
-
branch: core_1.Flags.string({
|
|
422
|
-
description: 'Branch to publish the update group on',
|
|
423
|
-
required: false,
|
|
424
|
-
}),
|
|
425
|
-
channel: core_1.Flags.string({
|
|
426
|
-
description: 'Channel that the published update should affect',
|
|
427
|
-
required: false,
|
|
428
|
-
}),
|
|
429
|
-
message: core_1.Flags.string({
|
|
430
|
-
char: 'm',
|
|
431
|
-
description: 'A short message describing the update',
|
|
432
|
-
required: false,
|
|
433
|
-
}),
|
|
434
|
-
'input-dir': core_1.Flags.string({
|
|
435
|
-
description: 'Location of the bundle',
|
|
436
|
-
default: 'dist',
|
|
437
|
-
required: false,
|
|
438
|
-
}),
|
|
439
|
-
'skip-bundler': core_1.Flags.boolean({
|
|
440
|
-
description: `Skip running Expo CLI to bundle the app before publishing`,
|
|
441
|
-
default: false,
|
|
442
|
-
}),
|
|
443
|
-
'clear-cache': core_1.Flags.boolean({
|
|
444
|
-
description: `Clear the bundler cache before publishing`,
|
|
445
|
-
default: false,
|
|
446
|
-
}),
|
|
447
|
-
'emit-metadata': core_1.Flags.boolean({
|
|
448
|
-
description: `Emit "eas-update-metadata.json" in the bundle folder with detailed information about the generated updates`,
|
|
449
|
-
default: false,
|
|
450
|
-
}),
|
|
451
|
-
'rollout-percentage': core_1.Flags.integer({
|
|
452
|
-
description: `Percentage of users this update should be immediately available to. Users not in the rollout will be served the previous latest update on the branch, even if that update is itself being rolled out. The specified number must be an integer between 1 and 100. When not specified, this defaults to 100.`,
|
|
453
|
-
required: false,
|
|
454
|
-
min: 0,
|
|
455
|
-
max: 100,
|
|
456
|
-
}),
|
|
457
|
-
platform: core_1.Flags.enum({
|
|
458
|
-
char: 'p',
|
|
459
|
-
options: Object.values(platform_1.RequestedPlatform), // TODO: Add web when it's fully supported
|
|
460
|
-
default: platform_1.RequestedPlatform.All,
|
|
461
|
-
required: false,
|
|
462
|
-
}),
|
|
463
|
-
auto: core_1.Flags.boolean({
|
|
464
|
-
description: 'Use the current git branch and commit message for the EAS branch and update message',
|
|
465
|
-
default: false,
|
|
466
|
-
}),
|
|
467
|
-
'private-key-path': core_1.Flags.string({
|
|
468
|
-
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/`,
|
|
469
|
-
required: false,
|
|
470
|
-
}),
|
|
471
|
-
...flags_1.EasUpdateEnvironmentFlag,
|
|
472
|
-
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
473
|
-
};
|
|
474
|
-
UpdatePublish.contextDefinition = {
|
|
475
|
-
..._a.ContextOptions.DynamicProjectConfig,
|
|
476
|
-
..._a.ContextOptions.LoggedIn,
|
|
477
|
-
..._a.ContextOptions.Vcs,
|
|
478
|
-
..._a.ContextOptions.ServerSideEnvironmentVariables,
|
|
479
|
-
};
|
|
480
478
|
exports.default = UpdatePublish;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var _a;
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
4
|
const core_1 = require("@oclif/core");
|
|
@@ -10,10 +9,29 @@ const pagination_1 = require("../../commandUtils/pagination");
|
|
|
10
9
|
const queries_2 = require("../../update/queries");
|
|
11
10
|
const json_1 = require("../../utils/json");
|
|
12
11
|
class UpdateList extends EasCommand_1.default {
|
|
12
|
+
static description = 'view the recent updates';
|
|
13
|
+
static flags = {
|
|
14
|
+
branch: core_1.Flags.string({
|
|
15
|
+
description: 'List updates only on this branch',
|
|
16
|
+
exclusive: ['all'],
|
|
17
|
+
}),
|
|
18
|
+
all: core_1.Flags.boolean({
|
|
19
|
+
description: 'List updates on all branches',
|
|
20
|
+
exclusive: ['branch'],
|
|
21
|
+
default: false,
|
|
22
|
+
}),
|
|
23
|
+
...pagination_1.EasPaginatedQueryFlags,
|
|
24
|
+
limit: (0, pagination_1.getLimitFlagWithCustomValues)({ defaultTo: 25, limit: 50 }),
|
|
25
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
26
|
+
};
|
|
27
|
+
static contextDefinition = {
|
|
28
|
+
...this.ContextOptions.ProjectId,
|
|
29
|
+
...this.ContextOptions.LoggedIn,
|
|
30
|
+
};
|
|
13
31
|
async runAsync() {
|
|
14
|
-
const { flags } = await this.parse(
|
|
32
|
+
const { flags } = await this.parse(UpdateList);
|
|
15
33
|
const { branch: branchFlag, all, json: jsonFlag, 'non-interactive': nonInteractive } = flags;
|
|
16
|
-
const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(
|
|
34
|
+
const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdateList, {
|
|
17
35
|
nonInteractive,
|
|
18
36
|
});
|
|
19
37
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
|
|
@@ -62,24 +80,4 @@ class UpdateList extends EasCommand_1.default {
|
|
|
62
80
|
}
|
|
63
81
|
}
|
|
64
82
|
}
|
|
65
|
-
_a = UpdateList;
|
|
66
|
-
UpdateList.description = 'view the recent updates';
|
|
67
|
-
UpdateList.flags = {
|
|
68
|
-
branch: core_1.Flags.string({
|
|
69
|
-
description: 'List updates only on this branch',
|
|
70
|
-
exclusive: ['all'],
|
|
71
|
-
}),
|
|
72
|
-
all: core_1.Flags.boolean({
|
|
73
|
-
description: 'List updates on all branches',
|
|
74
|
-
exclusive: ['branch'],
|
|
75
|
-
default: false,
|
|
76
|
-
}),
|
|
77
|
-
...pagination_1.EasPaginatedQueryFlags,
|
|
78
|
-
limit: (0, pagination_1.getLimitFlagWithCustomValues)({ defaultTo: 25, limit: 50 }),
|
|
79
|
-
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
80
|
-
};
|
|
81
|
-
UpdateList.contextDefinition = {
|
|
82
|
-
..._a.ContextOptions.ProjectId,
|
|
83
|
-
..._a.ContextOptions.LoggedIn,
|
|
84
|
-
};
|
|
85
83
|
exports.default = UpdateList;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var _a;
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
4
|
const core_1 = require("@oclif/core");
|
|
@@ -20,10 +19,53 @@ const code_signing_1 = require("../../utils/code-signing");
|
|
|
20
19
|
const json_1 = require("../../utils/json");
|
|
21
20
|
const defaultRepublishPlatforms = ['android', 'ios'];
|
|
22
21
|
class UpdateRepublish extends EasCommand_1.default {
|
|
22
|
+
static description = 'roll back to an existing update';
|
|
23
|
+
static flags = {
|
|
24
|
+
channel: core_1.Flags.string({
|
|
25
|
+
description: 'Channel name to select an update group to republish from',
|
|
26
|
+
exclusive: ['branch', 'group'],
|
|
27
|
+
}),
|
|
28
|
+
branch: core_1.Flags.string({
|
|
29
|
+
description: 'Branch name to select an update group to republish from',
|
|
30
|
+
exclusive: ['channel', 'group'],
|
|
31
|
+
}),
|
|
32
|
+
group: core_1.Flags.string({
|
|
33
|
+
description: 'Update group ID to republish',
|
|
34
|
+
exclusive: ['branch', 'channel'],
|
|
35
|
+
}),
|
|
36
|
+
'destination-channel': core_1.Flags.string({
|
|
37
|
+
description: 'Channel name to select a branch to republish to if republishing to a different branch',
|
|
38
|
+
exclusive: ['destination-branch'],
|
|
39
|
+
}),
|
|
40
|
+
'destination-branch': core_1.Flags.string({
|
|
41
|
+
description: 'Branch name to republish to if republishing to a different branch',
|
|
42
|
+
exclusive: ['destination-channel'],
|
|
43
|
+
}),
|
|
44
|
+
message: core_1.Flags.string({
|
|
45
|
+
char: 'm',
|
|
46
|
+
description: 'Short message describing the republished update group',
|
|
47
|
+
required: false,
|
|
48
|
+
}),
|
|
49
|
+
platform: core_1.Flags.enum({
|
|
50
|
+
char: 'p',
|
|
51
|
+
options: [...defaultRepublishPlatforms, 'all'],
|
|
52
|
+
default: 'all',
|
|
53
|
+
required: false,
|
|
54
|
+
}),
|
|
55
|
+
'private-key-path': core_1.Flags.string({
|
|
56
|
+
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/`,
|
|
57
|
+
required: false,
|
|
58
|
+
}),
|
|
59
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
60
|
+
};
|
|
61
|
+
static contextDefinition = {
|
|
62
|
+
...this.ContextOptions.ProjectConfig,
|
|
63
|
+
...this.ContextOptions.LoggedIn,
|
|
64
|
+
};
|
|
23
65
|
async runAsync() {
|
|
24
|
-
const { flags: rawFlags } = await this.parse(
|
|
66
|
+
const { flags: rawFlags } = await this.parse(UpdateRepublish);
|
|
25
67
|
const flags = this.sanitizeFlags(rawFlags);
|
|
26
|
-
const { privateProjectConfig: { exp, projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(
|
|
68
|
+
const { privateProjectConfig: { exp, projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdateRepublish, {
|
|
27
69
|
nonInteractive: flags.nonInteractive,
|
|
28
70
|
withServerSideEnvironment: null,
|
|
29
71
|
});
|
|
@@ -88,50 +130,6 @@ class UpdateRepublish extends EasCommand_1.default {
|
|
|
88
130
|
};
|
|
89
131
|
}
|
|
90
132
|
}
|
|
91
|
-
_a = UpdateRepublish;
|
|
92
|
-
UpdateRepublish.description = 'roll back to an existing update';
|
|
93
|
-
UpdateRepublish.flags = {
|
|
94
|
-
channel: core_1.Flags.string({
|
|
95
|
-
description: 'Channel name to select an update group to republish from',
|
|
96
|
-
exclusive: ['branch', 'group'],
|
|
97
|
-
}),
|
|
98
|
-
branch: core_1.Flags.string({
|
|
99
|
-
description: 'Branch name to select an update group to republish from',
|
|
100
|
-
exclusive: ['channel', 'group'],
|
|
101
|
-
}),
|
|
102
|
-
group: core_1.Flags.string({
|
|
103
|
-
description: 'Update group ID to republish',
|
|
104
|
-
exclusive: ['branch', 'channel'],
|
|
105
|
-
}),
|
|
106
|
-
'destination-channel': core_1.Flags.string({
|
|
107
|
-
description: 'Channel name to select a branch to republish to if republishing to a different branch',
|
|
108
|
-
exclusive: ['destination-branch'],
|
|
109
|
-
}),
|
|
110
|
-
'destination-branch': core_1.Flags.string({
|
|
111
|
-
description: 'Branch name to republish to if republishing to a different branch',
|
|
112
|
-
exclusive: ['destination-channel'],
|
|
113
|
-
}),
|
|
114
|
-
message: core_1.Flags.string({
|
|
115
|
-
char: 'm',
|
|
116
|
-
description: 'Short message describing the republished update group',
|
|
117
|
-
required: false,
|
|
118
|
-
}),
|
|
119
|
-
platform: core_1.Flags.enum({
|
|
120
|
-
char: 'p',
|
|
121
|
-
options: [...defaultRepublishPlatforms, 'all'],
|
|
122
|
-
default: 'all',
|
|
123
|
-
required: false,
|
|
124
|
-
}),
|
|
125
|
-
'private-key-path': core_1.Flags.string({
|
|
126
|
-
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/`,
|
|
127
|
-
required: false,
|
|
128
|
-
}),
|
|
129
|
-
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
130
|
-
};
|
|
131
|
-
UpdateRepublish.contextDefinition = {
|
|
132
|
-
..._a.ContextOptions.ProjectConfig,
|
|
133
|
-
..._a.ContextOptions.LoggedIn,
|
|
134
|
-
};
|
|
135
133
|
exports.default = UpdateRepublish;
|
|
136
134
|
async function getOrAskTargetBranchAsync(graphqlClient, projectId, flags, arbitraryUpdate) {
|
|
137
135
|
// if branch name supplied, use that
|
|
@@ -6,9 +6,9 @@ export default class UpdateRollBackToEmbedded extends EasCommand {
|
|
|
6
6
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
branch: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
8
|
channel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
|
+
'runtime-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
10
|
message: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
10
11
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
11
|
-
auto: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
12
|
'private-key-path': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
13
13
|
};
|
|
14
14
|
static contextDefinition: {
|
|
@@ -19,5 +19,6 @@ export default class UpdateRollBackToEmbedded extends EasCommand {
|
|
|
19
19
|
};
|
|
20
20
|
runAsync(): Promise<void>;
|
|
21
21
|
private publishRollbacksAsync;
|
|
22
|
+
private static selectRuntimeAsync;
|
|
22
23
|
private sanitizeFlags;
|
|
23
24
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var _a;
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
|
-
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
6
4
|
const core_1 = require("@oclif/core");
|
|
7
5
|
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
8
6
|
const queries_1 = require("../../branch/queries");
|
|
@@ -13,24 +11,64 @@ const pagination_1 = require("../../commandUtils/pagination");
|
|
|
13
11
|
const fetch_1 = tslib_1.__importDefault(require("../../fetch"));
|
|
14
12
|
const generated_1 = require("../../graphql/generated");
|
|
15
13
|
const PublishMutation_1 = require("../../graphql/mutations/PublishMutation");
|
|
14
|
+
const RuntimeQuery_1 = require("../../graphql/queries/RuntimeQuery");
|
|
16
15
|
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
17
16
|
const ora_1 = require("../../ora");
|
|
18
17
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
19
18
|
const publish_1 = require("../../project/publish");
|
|
20
|
-
const workflow_1 = require("../../project/workflow");
|
|
21
19
|
const configure_1 = require("../../update/configure");
|
|
22
20
|
const utils_1 = require("../../update/utils");
|
|
23
21
|
const code_signing_1 = require("../../utils/code-signing");
|
|
24
22
|
const uniqBy_1 = tslib_1.__importDefault(require("../../utils/expodash/uniqBy"));
|
|
25
23
|
const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
|
|
26
24
|
const json_1 = require("../../utils/json");
|
|
25
|
+
const relay_1 = require("../../utils/relay");
|
|
27
26
|
const statuspageService_1 = require("../../utils/statuspageService");
|
|
28
27
|
class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
28
|
+
static description = 'roll back to the embedded update';
|
|
29
|
+
static flags = {
|
|
30
|
+
branch: core_1.Flags.string({
|
|
31
|
+
description: 'Branch to publish the rollback to embedded update group on',
|
|
32
|
+
required: false,
|
|
33
|
+
}),
|
|
34
|
+
channel: core_1.Flags.string({
|
|
35
|
+
description: 'Channel that the published rollback to embedded update should affect',
|
|
36
|
+
required: false,
|
|
37
|
+
}),
|
|
38
|
+
'runtime-version': core_1.Flags.string({
|
|
39
|
+
description: 'Runtime version that the rollback to embedded update should target',
|
|
40
|
+
required: false,
|
|
41
|
+
}),
|
|
42
|
+
message: core_1.Flags.string({
|
|
43
|
+
description: 'A short message describing the rollback to embedded update',
|
|
44
|
+
required: false,
|
|
45
|
+
}),
|
|
46
|
+
platform: core_1.Flags.enum({
|
|
47
|
+
char: 'p',
|
|
48
|
+
options: [
|
|
49
|
+
// TODO: Add web when it's fully supported
|
|
50
|
+
...publish_1.defaultPublishPlatforms,
|
|
51
|
+
'all',
|
|
52
|
+
],
|
|
53
|
+
default: 'all',
|
|
54
|
+
required: false,
|
|
55
|
+
}),
|
|
56
|
+
'private-key-path': core_1.Flags.string({
|
|
57
|
+
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/`,
|
|
58
|
+
required: false,
|
|
59
|
+
}),
|
|
60
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
61
|
+
};
|
|
62
|
+
static contextDefinition = {
|
|
63
|
+
...this.ContextOptions.DynamicProjectConfig,
|
|
64
|
+
...this.ContextOptions.LoggedIn,
|
|
65
|
+
...this.ContextOptions.Vcs,
|
|
66
|
+
};
|
|
29
67
|
async runAsync() {
|
|
30
|
-
const { flags: rawFlags } = await this.parse(
|
|
68
|
+
const { flags: rawFlags } = await this.parse(UpdateRollBackToEmbedded);
|
|
31
69
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(rawFlags);
|
|
32
|
-
const {
|
|
33
|
-
const { getDynamicPublicProjectConfigAsync, getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, vcsClient, } = await this.getContextAsync(
|
|
70
|
+
const { platform: platformFlag, channelName: channelNameArg, updateMessage: updateMessageArg, runtimeVersion: runtimeVersionArg, privateKeyPath, json: jsonFlag, nonInteractive, branchName: branchNameArg, } = this.sanitizeFlags(rawFlags);
|
|
71
|
+
const { getDynamicPublicProjectConfigAsync, getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, vcsClient, } = await this.getContextAsync(UpdateRollBackToEmbedded, {
|
|
34
72
|
nonInteractive,
|
|
35
73
|
withServerSideEnvironment: null,
|
|
36
74
|
});
|
|
@@ -58,44 +96,44 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
58
96
|
projectId,
|
|
59
97
|
channelNameArg,
|
|
60
98
|
branchNameArg,
|
|
61
|
-
autoFlag,
|
|
99
|
+
autoFlag: false,
|
|
62
100
|
nonInteractive,
|
|
63
101
|
paginatedQueryOptions,
|
|
64
102
|
});
|
|
65
103
|
const updateMessage = await (0, publish_1.getUpdateMessageForCommandAsync)(vcsClient, {
|
|
66
104
|
updateMessageArg,
|
|
67
|
-
autoFlag,
|
|
105
|
+
autoFlag: false,
|
|
68
106
|
nonInteractive,
|
|
69
107
|
jsonFlag,
|
|
70
108
|
});
|
|
71
109
|
const realizedPlatforms = platformFlag === 'all' ? publish_1.defaultPublishPlatforms : [platformFlag];
|
|
72
|
-
const {
|
|
110
|
+
const { branch } = await (0, queries_1.ensureBranchExistsAsync)(graphqlClient, {
|
|
73
111
|
appId: projectId,
|
|
74
112
|
branchName,
|
|
75
113
|
});
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
114
|
+
const selectedRuntime = runtimeVersionArg ??
|
|
115
|
+
(await UpdateRollBackToEmbedded.selectRuntimeAsync(graphqlClient, {
|
|
116
|
+
appId: projectId,
|
|
117
|
+
branchName,
|
|
118
|
+
}))?.version;
|
|
119
|
+
if (!selectedRuntime) {
|
|
120
|
+
core_1.Errors.error('Must select a runtime or provide the --runtimeVersion flag', { exit: 1 });
|
|
121
|
+
}
|
|
122
|
+
const runtimeToPlatformsAndFingerprintInfoMapping = (0, publish_1.getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObjects)(realizedPlatforms.map(platform => ({
|
|
123
|
+
platform,
|
|
124
|
+
runtimeVersionInfo: {
|
|
125
|
+
runtimeVersion: selectedRuntime,
|
|
126
|
+
fingerprint: null,
|
|
127
|
+
fingerprintHash: null,
|
|
86
128
|
},
|
|
87
|
-
|
|
88
|
-
});
|
|
89
|
-
const runtimeToPlatformsAndFingerprintInfoMapping = (0, publish_1.getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObjects)(runtimeVersionInfoObjects);
|
|
129
|
+
})));
|
|
90
130
|
let newUpdates;
|
|
91
131
|
const publishSpinner = (0, ora_1.ora)('Publishing...').start();
|
|
92
132
|
try {
|
|
93
133
|
newUpdates = await this.publishRollbacksAsync({
|
|
94
134
|
graphqlClient,
|
|
95
|
-
isGitWorkingTreeDirty,
|
|
96
|
-
gitCommitHash,
|
|
97
135
|
updateMessage,
|
|
98
|
-
branchId,
|
|
136
|
+
branchId: branch.id,
|
|
99
137
|
codeSigningInfo,
|
|
100
138
|
runtimeToPlatformsAndFingerprintInfoMapping,
|
|
101
139
|
realizedPlatforms,
|
|
@@ -110,10 +148,6 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
110
148
|
(0, json_1.printJsonOnlyOutput)((0, utils_1.getUpdateJsonInfosForUpdates)(newUpdates));
|
|
111
149
|
}
|
|
112
150
|
else {
|
|
113
|
-
if (new Set(newUpdates.map(update => update.group)).size > 1) {
|
|
114
|
-
log_1.default.addNewLineIfNone();
|
|
115
|
-
log_1.default.log('👉 Since multiple runtime versions are defined, multiple update groups have been published.');
|
|
116
|
-
}
|
|
117
151
|
log_1.default.addNewLineIfNone();
|
|
118
152
|
for (const runtime of (0, uniqBy_1.default)(runtimeToPlatformsAndFingerprintInfoMapping, version => version.runtimeVersion)) {
|
|
119
153
|
const newUpdatesForRuntimeVersion = newUpdates.filter(update => update.runtimeVersion === runtime.runtimeVersion);
|
|
@@ -138,21 +172,13 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
138
172
|
: []),
|
|
139
173
|
...(newIosUpdate ? [{ label: 'iOS update ID', value: newIosUpdate.id }] : []),
|
|
140
174
|
{ label: 'Message', value: updateMessage ?? '' },
|
|
141
|
-
...(gitCommitHash
|
|
142
|
-
? [
|
|
143
|
-
{
|
|
144
|
-
label: 'Commit',
|
|
145
|
-
value: `${gitCommitHash}${isGitWorkingTreeDirty ? '*' : ''}`,
|
|
146
|
-
},
|
|
147
|
-
]
|
|
148
|
-
: []),
|
|
149
175
|
{ label: 'EAS Dashboard', value: updateGroupLink },
|
|
150
176
|
]));
|
|
151
177
|
log_1.default.addNewLineIfNone();
|
|
152
178
|
}
|
|
153
179
|
}
|
|
154
180
|
}
|
|
155
|
-
async publishRollbacksAsync({ graphqlClient,
|
|
181
|
+
async publishRollbacksAsync({ graphqlClient, updateMessage, branchId, codeSigningInfo, runtimeToPlatformsAndFingerprintInfoMapping, realizedPlatforms, }) {
|
|
156
182
|
const rollbackInfoGroups = Object.fromEntries(realizedPlatforms.map(platform => [platform, true]));
|
|
157
183
|
// Sort the updates into different groups based on their platform specific runtime versions
|
|
158
184
|
const updateGroups = runtimeToPlatformsAndFingerprintInfoMapping.map(({ runtimeVersion, platforms }) => {
|
|
@@ -162,8 +188,6 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
162
188
|
rollBackToEmbeddedInfoGroup: localRollbackInfoGroup,
|
|
163
189
|
runtimeVersion,
|
|
164
190
|
message: updateMessage,
|
|
165
|
-
gitCommitHash,
|
|
166
|
-
isGitWorkingTreeDirty,
|
|
167
191
|
awaitingCodeSigningInfo: !!codeSigningInfo,
|
|
168
192
|
};
|
|
169
193
|
});
|
|
@@ -197,17 +221,41 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
197
221
|
}
|
|
198
222
|
return newUpdates;
|
|
199
223
|
}
|
|
224
|
+
static async selectRuntimeAsync(graphqlClient, { appId, branchName, batchSize = 5, }) {
|
|
225
|
+
const queryAsync = async (queryParams) => {
|
|
226
|
+
return await RuntimeQuery_1.RuntimeQuery.getRuntimesOnBranchAsync(graphqlClient, {
|
|
227
|
+
appId,
|
|
228
|
+
name: branchName,
|
|
229
|
+
first: queryParams.first,
|
|
230
|
+
after: queryParams.after,
|
|
231
|
+
last: queryParams.last,
|
|
232
|
+
before: queryParams.before,
|
|
233
|
+
});
|
|
234
|
+
};
|
|
235
|
+
const getTitleAsync = async (runtime) => {
|
|
236
|
+
return runtime.version;
|
|
237
|
+
};
|
|
238
|
+
return await (0, relay_1.selectPaginatedAsync)({
|
|
239
|
+
queryAsync,
|
|
240
|
+
getTitleAsync,
|
|
241
|
+
printedType: 'target runtime',
|
|
242
|
+
pageSize: batchSize,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
200
245
|
sanitizeFlags(flags) {
|
|
201
246
|
const nonInteractive = flags['non-interactive'] ?? false;
|
|
202
|
-
const {
|
|
203
|
-
if (nonInteractive && !
|
|
204
|
-
core_1.Errors.error('--branch and --message, or --channel and --message are required
|
|
247
|
+
const { branch: branchName, channel: channelName, message: updateMessage, 'runtime-version': runtimeVersion, } = flags;
|
|
248
|
+
if (nonInteractive && !(updateMessage && (branchName || channelName))) {
|
|
249
|
+
core_1.Errors.error('--branch and --message, or --channel and --message are required in non-interactive mode', { exit: 1 });
|
|
250
|
+
}
|
|
251
|
+
if (nonInteractive && !runtimeVersion) {
|
|
252
|
+
core_1.Errors.error('--runtimeVersion is required in non-interactive mode', { exit: 1 });
|
|
205
253
|
}
|
|
206
254
|
return {
|
|
207
|
-
auto,
|
|
208
255
|
branchName,
|
|
209
256
|
channelName,
|
|
210
257
|
updateMessage,
|
|
258
|
+
runtimeVersion,
|
|
211
259
|
platform: flags.platform,
|
|
212
260
|
privateKeyPath: flags['private-key-path'],
|
|
213
261
|
nonInteractive,
|
|
@@ -215,44 +263,4 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
215
263
|
};
|
|
216
264
|
}
|
|
217
265
|
}
|
|
218
|
-
_a = UpdateRollBackToEmbedded;
|
|
219
|
-
UpdateRollBackToEmbedded.description = 'roll back to the embedded update';
|
|
220
|
-
UpdateRollBackToEmbedded.flags = {
|
|
221
|
-
branch: core_1.Flags.string({
|
|
222
|
-
description: 'Branch to publish the rollback to embedded update group on',
|
|
223
|
-
required: false,
|
|
224
|
-
}),
|
|
225
|
-
channel: core_1.Flags.string({
|
|
226
|
-
description: 'Channel that the published rollback to embedded update should affect',
|
|
227
|
-
required: false,
|
|
228
|
-
}),
|
|
229
|
-
message: core_1.Flags.string({
|
|
230
|
-
description: 'A short message describing the rollback to embedded update',
|
|
231
|
-
required: false,
|
|
232
|
-
}),
|
|
233
|
-
platform: core_1.Flags.enum({
|
|
234
|
-
char: 'p',
|
|
235
|
-
options: [
|
|
236
|
-
// TODO: Add web when it's fully supported
|
|
237
|
-
...publish_1.defaultPublishPlatforms,
|
|
238
|
-
'all',
|
|
239
|
-
],
|
|
240
|
-
default: 'all',
|
|
241
|
-
required: false,
|
|
242
|
-
}),
|
|
243
|
-
auto: core_1.Flags.boolean({
|
|
244
|
-
description: 'Use the current git branch and commit message for the EAS branch and update message',
|
|
245
|
-
default: false,
|
|
246
|
-
}),
|
|
247
|
-
'private-key-path': core_1.Flags.string({
|
|
248
|
-
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/`,
|
|
249
|
-
required: false,
|
|
250
|
-
}),
|
|
251
|
-
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
252
|
-
};
|
|
253
|
-
UpdateRollBackToEmbedded.contextDefinition = {
|
|
254
|
-
..._a.ContextOptions.DynamicProjectConfig,
|
|
255
|
-
..._a.ContextOptions.LoggedIn,
|
|
256
|
-
..._a.ContextOptions.Vcs,
|
|
257
|
-
};
|
|
258
266
|
exports.default = UpdateRollBackToEmbedded;
|
|
@@ -7,6 +7,13 @@ const roll_back_to_embedded_1 = tslib_1.__importDefault(require("./roll-back-to-
|
|
|
7
7
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
8
8
|
const prompts_1 = require("../../prompts");
|
|
9
9
|
class UpdateRollback extends EasCommand_1.default {
|
|
10
|
+
static description = 'roll back to an embedded update or an existing update';
|
|
11
|
+
static flags = {
|
|
12
|
+
'private-key-path': core_1.Flags.string({
|
|
13
|
+
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/`,
|
|
14
|
+
required: false,
|
|
15
|
+
}),
|
|
16
|
+
};
|
|
10
17
|
async runAsync() {
|
|
11
18
|
const { flags } = await this.parse(UpdateRollback);
|
|
12
19
|
const { choice } = await (0, prompts_1.promptAsync)({
|
|
@@ -29,11 +36,4 @@ class UpdateRollback extends EasCommand_1.default {
|
|
|
29
36
|
}
|
|
30
37
|
}
|
|
31
38
|
}
|
|
32
|
-
UpdateRollback.description = 'roll back to an embedded update or an existing update';
|
|
33
|
-
UpdateRollback.flags = {
|
|
34
|
-
'private-key-path': core_1.Flags.string({
|
|
35
|
-
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/`,
|
|
36
|
-
required: false,
|
|
37
|
-
}),
|
|
38
|
-
};
|
|
39
39
|
exports.default = UpdateRollback;
|