eas-cli 0.33.1 → 0.36.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 +27 -27
- package/build/analytics/common.d.ts +8 -0
- package/build/analytics/common.js +19 -0
- package/build/analytics/events.d.ts +43 -0
- package/build/analytics/events.js +51 -0
- package/build/{analytics.d.ts → analytics/rudderstackClient.d.ts} +0 -0
- package/build/{analytics.js → analytics/rudderstackClient.js} +4 -10
- package/build/api.js +3 -3
- package/build/build/android/configure.js +2 -2
- package/build/build/android/graphql.js +2 -4
- package/build/build/android/prepareJob.js +4 -3
- package/build/build/build.js +20 -29
- package/build/build/configure.js +14 -7
- package/build/build/context.d.ts +1 -1
- package/build/build/context.js +2 -2
- package/build/build/ios/UpdatesModule.js +2 -2
- package/build/build/ios/credentials.js +3 -3
- package/build/build/ios/graphql.js +2 -23
- package/build/build/ios/prepareJob.js +4 -6
- package/build/build/local.js +18 -27
- package/build/build/metadata.js +5 -10
- package/build/build/types.d.ts +0 -1
- package/build/build/utils/devClient.js +8 -5
- package/build/build/utils/formatBuild.js +1 -9
- package/build/build/utils/repository.js +10 -7
- package/build/build/utils/url.js +1 -1
- package/build/build/validate.js +4 -4
- package/build/commandUtils/EasCommand.d.ts +1 -0
- package/build/commandUtils/EasCommand.js +25 -4
- package/build/commands/branch/create.js +3 -2
- package/build/commands/branch/delete.js +1 -1
- package/build/commands/branch/list.js +1 -1
- package/build/commands/branch/publish.js +6 -5
- package/build/commands/branch/view.js +1 -1
- package/build/commands/build/index.js +44 -25
- package/build/commands/channel/edit.js +1 -1
- package/build/commands/channel/list.js +1 -1
- package/build/commands/channel/view.js +1 -1
- package/build/commands/diagnostics.js +2 -2
- package/build/commands/project/info.js +1 -1
- package/build/commands/secret/delete.js +1 -1
- package/build/commands/update/view.js +1 -1
- package/build/credentials/android/AndroidCredentialsProvider.js +2 -2
- package/build/credentials/android/actions/RemoveFcm.js +4 -4
- package/build/credentials/android/actions/{SetupBuildCredentials.d.ts → SetUpBuildCredentials.d.ts} +1 -1
- package/build/credentials/android/actions/{SetupBuildCredentials.js → SetUpBuildCredentials.js} +3 -3
- package/build/credentials/android/actions/{SetupBuildCredentialsFromCredentialsJson.d.ts → SetUpBuildCredentialsFromCredentialsJson.d.ts} +1 -1
- package/build/credentials/android/actions/{SetupBuildCredentialsFromCredentialsJson.js → SetUpBuildCredentialsFromCredentialsJson.js} +3 -3
- package/build/credentials/android/actions/{SetupGoogleServiceAccountKey.d.ts → SetUpGoogleServiceAccountKey.d.ts} +1 -1
- package/build/credentials/android/actions/{SetupGoogleServiceAccountKey.js → SetUpGoogleServiceAccountKey.js} +3 -3
- package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.js +2 -0
- package/build/credentials/android/utils/keystore.js +67 -32
- package/build/credentials/credentialsJson/update.js +5 -4
- package/build/credentials/errors.d.ts +4 -0
- package/build/credentials/errors.js +8 -1
- package/build/credentials/ios/IosCredentialsProvider.js +4 -4
- package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +17 -1
- package/build/credentials/ios/actions/AscApiKeyUtils.js +158 -24
- package/build/credentials/ios/actions/AssignAscApiKey.d.ts +9 -0
- package/build/credentials/ios/actions/AssignAscApiKey.js +29 -0
- package/build/credentials/ios/actions/CreateAscApiKey.d.ts +9 -0
- package/build/credentials/ios/actions/CreateAscApiKey.js +21 -0
- package/build/credentials/ios/actions/CreateDistributionCertificate.js +1 -1
- package/build/credentials/ios/actions/CreatePushKey.js +1 -1
- package/build/credentials/ios/actions/DistributionCertificateUtils.d.ts +1 -1
- package/build/credentials/ios/actions/DistributionCertificateUtils.js +6 -8
- package/build/credentials/ios/actions/PushKeyUtils.d.ts +1 -1
- package/build/credentials/ios/actions/PushKeyUtils.js +6 -6
- package/build/credentials/ios/actions/RemoveAscApiKey.d.ts +14 -0
- package/build/credentials/ios/actions/RemoveAscApiKey.js +55 -0
- package/build/credentials/ios/actions/{SetupAdhocProvisioningProfile.d.ts → SetUpAdhocProvisioningProfile.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupAdhocProvisioningProfile.js → SetUpAdhocProvisioningProfile.js} +5 -5
- package/build/credentials/ios/actions/SetUpAscApiKey.d.ts +21 -0
- package/build/credentials/ios/actions/SetUpAscApiKey.js +114 -0
- package/build/credentials/ios/actions/{SetupBuildCredentials.d.ts → SetUpBuildCredentials.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupBuildCredentials.js → SetUpBuildCredentials.js} +5 -5
- package/build/credentials/ios/actions/{SetupBuildCredentialsFromCredentialsJson.d.ts → SetUpBuildCredentialsFromCredentialsJson.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupBuildCredentialsFromCredentialsJson.js → SetUpBuildCredentialsFromCredentialsJson.js} +5 -5
- package/build/credentials/ios/actions/{SetupDistributionCertificate.d.ts → SetUpDistributionCertificate.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupDistributionCertificate.js → SetUpDistributionCertificate.js} +3 -3
- package/build/credentials/ios/actions/{SetupInternalProvisioningProfile.d.ts → SetUpInternalProvisioningProfile.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupInternalProvisioningProfile.js → SetUpInternalProvisioningProfile.js} +7 -7
- package/build/credentials/ios/actions/{SetupProvisioningProfile.d.ts → SetUpProvisioningProfile.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupProvisioningProfile.js → SetUpProvisioningProfile.js} +5 -5
- package/build/credentials/ios/actions/{SetupPushKey.d.ts → SetUpPushKey.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupPushKey.js → SetUpPushKey.js} +3 -3
- package/build/credentials/ios/actions/SetUpSubmissionCredentials.d.ts +10 -0
- package/build/credentials/ios/actions/SetUpSubmissionCredentials.js +53 -0
- package/build/credentials/ios/actions/{SetupTargetBuildCredentials.d.ts → SetUpTargetBuildCredentials.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupTargetBuildCredentials.js → SetUpTargetBuildCredentials.js} +10 -10
- package/build/credentials/ios/actions/{SetupTargetBuildCredentialsFromCredentialsJson.d.ts → SetUpTargetBuildCredentialsFromCredentialsJson.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupTargetBuildCredentialsFromCredentialsJson.js → SetUpTargetBuildCredentialsFromCredentialsJson.js} +3 -3
- package/build/credentials/ios/api/GraphqlClient.d.ts +8 -2
- package/build/credentials/ios/api/GraphqlClient.js +74 -2
- package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.d.ts +5 -0
- package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.js +54 -0
- package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.d.ts +1 -0
- package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.js +25 -0
- package/build/credentials/ios/api/graphql/queries/AppQuery.js +3 -1
- package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.d.ts +4 -0
- package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.js +33 -0
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +6 -2
- package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +7 -1
- package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +5 -1
- package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.js +2 -0
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +5 -1
- package/build/credentials/ios/appstore/AppStoreApi.d.ts +1 -1
- package/build/credentials/ios/appstore/Credentials.types.d.ts +1 -0
- package/build/credentials/ios/appstore/ascApiKey.d.ts +1 -1
- package/build/credentials/ios/appstore/ascApiKey.js +11 -1
- package/build/credentials/ios/appstore/entitlements.d.ts +2 -2
- package/build/credentials/ios/appstore/entitlements.js +20 -10
- package/build/credentials/ios/credentials.d.ts +2 -1
- package/build/credentials/ios/credentials.js +7 -2
- package/build/credentials/ios/utils/printCredentials.js +30 -1
- package/build/credentials/ios/validators/validateAscApiKey.d.ts +5 -0
- package/build/credentials/ios/validators/validateAscApiKey.js +21 -0
- package/build/credentials/manager/Actions.d.ts +52 -0
- package/build/credentials/manager/Actions.js +53 -0
- package/build/credentials/manager/AndroidActions.d.ts +6 -0
- package/build/credentials/manager/AndroidActions.js +114 -0
- package/build/credentials/manager/IosActions.d.ts +7 -0
- package/build/credentials/manager/IosActions.js +145 -0
- package/build/credentials/manager/ManageAndroid.d.ts +1 -29
- package/build/credentials/manager/ManageAndroid.js +30 -163
- package/build/credentials/manager/ManageIos.d.ts +1 -29
- package/build/credentials/manager/ManageIos.js +81 -169
- package/build/credentials/utils/promptForCredentials.d.ts +2 -1
- package/build/credentials/utils/promptForCredentials.js +3 -2
- package/build/graphql/client.d.ts +8 -2
- package/build/graphql/client.js +1 -1
- package/build/graphql/generated.d.ts +313 -85
- package/build/graphql/generated.js +23 -1
- package/build/graphql/mutations/KeystoreGenerationUrlMutation.d.ts +3 -0
- package/build/graphql/mutations/KeystoreGenerationUrlMutation.js +23 -0
- package/build/graphql/queries/BuildQuery.js +4 -1
- package/build/graphql/queries/EnvironmentSecretsQuery.js +4 -2
- package/build/graphql/queries/ProjectQuery.js +3 -1
- package/build/graphql/queries/PublishQuery.js +4 -1
- package/build/graphql/queries/SubmissionQuery.js +5 -2
- package/build/graphql/queries/UserQuery.js +4 -1
- package/build/graphql/queries/WebhookQuery.js +6 -2
- package/build/graphql/types/Build.js +1 -6
- package/build/graphql/types/credentials/AppStoreConnectApiKey.d.ts +1 -0
- package/build/graphql/types/credentials/AppStoreConnectApiKey.js +23 -0
- package/build/graphql/types/credentials/IosAppCredentials.js +6 -0
- package/build/log.d.ts +0 -2
- package/build/log.js +2 -12
- package/build/project/projectUtils.js +1 -1
- package/build/project/publish.js +2 -2
- package/build/project/workflow.js +2 -2
- package/build/submit/ArchiveSource.js +2 -1
- package/build/submit/BaseSubmitter.d.ts +20 -4
- package/build/submit/BaseSubmitter.js +34 -1
- package/build/submit/android/AndroidSubmitter.d.ts +12 -6
- package/build/submit/android/AndroidSubmitter.js +31 -20
- package/build/submit/android/ServiceAccountSource.js +2 -2
- package/build/submit/context.d.ts +2 -0
- package/build/submit/context.js +14 -0
- package/build/submit/ios/AppSpecificPasswordSource.d.ts +9 -6
- package/build/submit/ios/AppSpecificPasswordSource.js +42 -20
- package/build/submit/ios/AscApiKeySource.d.ts +9 -3
- package/build/submit/ios/AscApiKeySource.js +10 -10
- package/build/submit/ios/CredentialsServiceSource.d.ts +15 -0
- package/build/submit/ios/CredentialsServiceSource.js +52 -0
- package/build/submit/ios/IosSubmitCommand.d.ts +1 -2
- package/build/submit/ios/IosSubmitCommand.js +24 -53
- package/build/submit/ios/IosSubmitter.d.ts +20 -7
- package/build/submit/ios/IosSubmitter.js +79 -43
- package/build/submit/submit.js +13 -4
- package/build/submit/utils/errors.js +2 -0
- package/build/user/User.js +2 -1
- package/build/utils/easCli.d.ts +1 -0
- package/build/utils/easCli.js +5 -0
- package/build/utils/{expoCommand.d.ts → expoCli.d.ts} +0 -0
- package/build/utils/{expoCommand.js → expoCli.js} +0 -0
- package/build/utils/profiles.js +9 -2
- package/build/vcs/clients/git.d.ts +26 -0
- package/build/vcs/clients/git.js +184 -0
- package/build/vcs/clients/gitNoCommit.d.ts +7 -0
- package/build/vcs/clients/gitNoCommit.js +27 -0
- package/build/vcs/clients/noVcs.d.ts +6 -0
- package/build/vcs/clients/noVcs.js +19 -0
- package/build/vcs/git.d.ts +10 -17
- package/build/vcs/git.js +7 -175
- package/build/vcs/index.d.ts +2 -2
- package/build/vcs/index.js +15 -6
- package/build/vcs/local.d.ts +18 -5
- package/build/vcs/local.js +61 -32
- package/build/vcs/vcs.d.ts +2 -1
- package/build/vcs/vcs.js +8 -4
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
- package/build/build/utils/analytics.d.ts +0 -22
- package/build/build/utils/analytics.js +0 -28
|
@@ -22,7 +22,7 @@ const prompts_1 = require("../../prompts");
|
|
|
22
22
|
const utils_1 = require("../../update/utils");
|
|
23
23
|
const uniqBy_1 = (0, tslib_1.__importDefault)(require("../../utils/expodash/uniqBy"));
|
|
24
24
|
const formatFields_1 = (0, tslib_1.__importDefault)(require("../../utils/formatFields"));
|
|
25
|
-
const vcs_1 =
|
|
25
|
+
const vcs_1 = require("../../vcs");
|
|
26
26
|
const create_1 = require("./create");
|
|
27
27
|
const list_1 = require("./list");
|
|
28
28
|
const view_1 = require("./view");
|
|
@@ -42,7 +42,7 @@ async function getUpdateGroupAsync({ group, }) {
|
|
|
42
42
|
}
|
|
43
43
|
`, {
|
|
44
44
|
group,
|
|
45
|
-
})
|
|
45
|
+
}, { additionalTypenames: ['Update'] })
|
|
46
46
|
.toPromise());
|
|
47
47
|
return updatesByGroup;
|
|
48
48
|
}
|
|
@@ -75,7 +75,8 @@ class BranchPublish extends EasCommand_1.default {
|
|
|
75
75
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
76
76
|
if (!branchName && autoFlag) {
|
|
77
77
|
branchName =
|
|
78
|
-
(await vcs_1.
|
|
78
|
+
(await (0, vcs_1.getVcsClient)().getBranchNameAsync()) ||
|
|
79
|
+
`branch-${Math.random().toString(36).substr(2, 4)}`;
|
|
79
80
|
}
|
|
80
81
|
if (!branchName) {
|
|
81
82
|
const validationMessage = 'branch name may not be empty.';
|
|
@@ -172,7 +173,7 @@ class BranchPublish extends EasCommand_1.default {
|
|
|
172
173
|
}
|
|
173
174
|
}
|
|
174
175
|
if (!message && autoFlag) {
|
|
175
|
-
message = (_b = (await vcs_1.
|
|
176
|
+
message = (_b = (await (0, vcs_1.getVcsClient)().getLastCommitMessageAsync())) === null || _b === void 0 ? void 0 : _b.trim();
|
|
176
177
|
}
|
|
177
178
|
if (!message) {
|
|
178
179
|
const validationMessage = 'publish message may not be empty.';
|
|
@@ -185,7 +186,7 @@ class BranchPublish extends EasCommand_1.default {
|
|
|
185
186
|
message: `Please enter a publication message.`,
|
|
186
187
|
initial: republish
|
|
187
188
|
? `Republish "${oldMessage}" - group: ${group}`
|
|
188
|
-
: (_c = (await vcs_1.
|
|
189
|
+
: (_c = (await (0, vcs_1.getVcsClient)().getLastCommitMessageAsync())) === null || _c === void 0 ? void 0 : _c.trim(),
|
|
189
190
|
validate: value => (value ? true : validationMessage),
|
|
190
191
|
}));
|
|
191
192
|
}
|
|
@@ -7,6 +7,8 @@ const eas_json_1 = require("@expo/eas-json");
|
|
|
7
7
|
const command_1 = require("@oclif/command");
|
|
8
8
|
const errors_1 = require("@oclif/errors");
|
|
9
9
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
10
|
+
const figures_1 = (0, tslib_1.__importDefault)(require("figures"));
|
|
11
|
+
const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
|
|
10
12
|
const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
|
|
11
13
|
const build_1 = require("../../build/android/build");
|
|
12
14
|
const build_2 = require("../../build/build");
|
|
@@ -19,7 +21,7 @@ const repository_1 = require("../../build/utils/repository");
|
|
|
19
21
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
20
22
|
const generated_1 = require("../../graphql/generated");
|
|
21
23
|
const AppPlatform_1 = require("../../graphql/types/AppPlatform");
|
|
22
|
-
const log_1 = (0, tslib_1.
|
|
24
|
+
const log_1 = (0, tslib_1.__importStar)(require("../../log"));
|
|
23
25
|
const platform_1 = require("../../platform");
|
|
24
26
|
const isEasEnabledForProject_1 = require("../../project/isEasEnabledForProject");
|
|
25
27
|
const metroConfig_1 = require("../../project/metroConfig");
|
|
@@ -28,9 +30,11 @@ const prompts_1 = require("../../prompts");
|
|
|
28
30
|
const context_2 = require("../../submit/context");
|
|
29
31
|
const submit_1 = require("../../submit/submit");
|
|
30
32
|
const urls_1 = require("../../submit/utils/urls");
|
|
33
|
+
const easCli_1 = require("../../utils/easCli");
|
|
31
34
|
const json_1 = require("../../utils/json");
|
|
32
35
|
const profiles_1 = require("../../utils/profiles");
|
|
33
|
-
const vcs_1 =
|
|
36
|
+
const vcs_1 = require("../../vcs");
|
|
37
|
+
const git_1 = (0, tslib_1.__importDefault)(require("../../vcs/clients/git"));
|
|
34
38
|
class Build extends EasCommand_1.default {
|
|
35
39
|
constructor() {
|
|
36
40
|
super(...arguments);
|
|
@@ -46,7 +50,7 @@ class Build extends EasCommand_1.default {
|
|
|
46
50
|
const { requestedPlatform } = flags;
|
|
47
51
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
48
52
|
await handleDeprecatedEasJsonAsync(projectDir, flags.nonInteractive);
|
|
49
|
-
await vcs_1.
|
|
53
|
+
await (0, vcs_1.getVcsClient)().ensureRepoExistsAsync();
|
|
50
54
|
await (0, repository_1.ensureRepoIsCleanAsync)(flags.nonInteractive);
|
|
51
55
|
await (0, configure_1.ensureProjectConfiguredAsync)(projectDir, requestedPlatform);
|
|
52
56
|
const platforms = (0, platform_1.toPlatforms)(requestedPlatform);
|
|
@@ -150,7 +154,7 @@ class Build extends EasCommand_1.default {
|
|
|
150
154
|
wait: flags['wait'],
|
|
151
155
|
clearCache: flags['clear-cache'],
|
|
152
156
|
json: flags['json'],
|
|
153
|
-
autoSubmit: flags['auto-submit'],
|
|
157
|
+
autoSubmit: flags['auto-submit'] || flags['auto-submit-with-profile'] !== undefined,
|
|
154
158
|
submitProfile: (_a = flags['auto-submit-with-profile']) !== null && _a !== void 0 ? _a : profile,
|
|
155
159
|
};
|
|
156
160
|
}
|
|
@@ -272,28 +276,43 @@ Build.flags = {
|
|
|
272
276
|
}),
|
|
273
277
|
};
|
|
274
278
|
async function handleDeprecatedEasJsonAsync(projectDir, nonInteractive) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
279
|
+
const easJsonPath = eas_json_1.EasJsonReader.formatEasJsonPath(projectDir);
|
|
280
|
+
if (!(await fs_extra_1.default.pathExists(easJsonPath))) {
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
const easJsonReader = new eas_json_1.EasJsonReader(projectDir);
|
|
284
|
+
const rawEasJson = await easJsonReader.readRawAsync();
|
|
285
|
+
if (rawEasJson === null || rawEasJson === void 0 ? void 0 : rawEasJson.cli) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
if (nonInteractive) {
|
|
289
|
+
log_1.default.warn(`${figures_1.default.warning} Action required: the default behavior of EAS CLI has changed and your eas.json must be updated to remove ambiguity around which Git integration workflow to use. Refer to ${(0, log_1.link)('https://expo.fyi/eas-vcs-workflow')} for more information.`);
|
|
290
|
+
log_1.default.warn('This warning will become an error in an upcoming EAS CLI release. For now, we will proceed with the old default behavior to avoid disruption of your builds.');
|
|
291
|
+
(0, vcs_1.setVcsClient)(new git_1.default());
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
log_1.default.log(`${chalk_1.default.bold('eas-cli@>=0.34.0 no longer requires that you commit changes to Git before starting a build.')} ${(0, log_1.learnMore)('https://expo.fyi/eas-vcs-workflow')}`);
|
|
295
|
+
log_1.default.log(`If you want to continue using the Git integration, you can opt in with ${chalk_1.default.bold('cli.requireCommit')} in ${chalk_1.default.bold('eas.json')} or with the following prompt.`);
|
|
296
|
+
log_1.default.newLine();
|
|
297
|
+
const mode = await (0, prompts_1.selectAsync)('Select your preferred Git integration', [
|
|
298
|
+
{ title: 'Require changes to be committed in Git (old default)', value: 'requireCommit' },
|
|
299
|
+
{ title: 'Allow builds with dirty Git working tree (new default)', value: 'noCommit' },
|
|
300
|
+
]);
|
|
301
|
+
if (mode === 'requireCommit') {
|
|
302
|
+
(0, vcs_1.setVcsClient)(new git_1.default());
|
|
303
|
+
await (0, repository_1.ensureRepoIsCleanAsync)(nonInteractive);
|
|
304
|
+
}
|
|
305
|
+
rawEasJson.cli =
|
|
306
|
+
mode === 'requireCommit'
|
|
307
|
+
? { version: `>= ${easCli_1.easCliVersion}`, requireCommit: true }
|
|
308
|
+
: { version: `>= ${easCli_1.easCliVersion}` };
|
|
309
|
+
await fs_extra_1.default.writeJSON(easJsonPath, rawEasJson, { spaces: 2 });
|
|
310
|
+
log_1.default.withTick('Updated eas.json');
|
|
311
|
+
if (mode === 'requireCommit') {
|
|
312
|
+
await (0, vcs_1.getVcsClient)().trackFileAsync(easJsonPath);
|
|
313
|
+
await (0, repository_1.reviewAndCommitChangesAsync)('Set cli.requireCommit to true in eas.json', {
|
|
314
|
+
nonInteractive,
|
|
284
315
|
});
|
|
285
|
-
if (confirm) {
|
|
286
|
-
await (0, eas_json_1.migrateAsync)(projectDir);
|
|
287
|
-
if (hasMismatchedExtendsKeys) {
|
|
288
|
-
log_1.default.warn('"extends" keyword can only be migrated automatically to the new format if both Android and iOS profiles extend base profiles with the same names for both platforms');
|
|
289
|
-
log_1.default.warn('Migration was successful, but you need to manually adjust the extend rules for your profiles');
|
|
290
|
-
(0, errors_1.error)('Fix eas.json manually', { exit: 1 });
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
else {
|
|
294
|
-
log_1.default.error("Aborting, update your eas.json according to https://docs.expo.dev/build/eas-json and run 'eas build' again");
|
|
295
|
-
(0, errors_1.error)('Unsupported eas.json format', { exit: 1 });
|
|
296
|
-
}
|
|
297
316
|
}
|
|
298
317
|
}
|
|
299
318
|
exports.handleDeprecatedEasJsonAsync = handleDeprecatedEasJsonAsync;
|
|
@@ -30,7 +30,7 @@ async function getChannelByNameForAppAsync({ appId, channelName, }) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
`, { appId, channelName })
|
|
33
|
+
`, { appId, channelName }, { additionalTypenames: ['UpdateChannel', 'UpdateBranch'] })
|
|
34
34
|
.toPromise());
|
|
35
35
|
const updateChannelByNameResult = (_a = data.app) === null || _a === void 0 ? void 0 : _a.byId.updateChannelByName;
|
|
36
36
|
if (!updateChannelByNameResult) {
|
|
@@ -47,7 +47,7 @@ async function getAllUpdateChannelForAppAsync({ appId, }) {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
`, { appId, offset: 0, limit: CHANNEL_LIMIT })
|
|
50
|
+
`, { appId, offset: 0, limit: CHANNEL_LIMIT }, { additionalTypenames: ['UpdateChannel', 'UpdateBranch', 'Update'] })
|
|
51
51
|
.toPromise());
|
|
52
52
|
}
|
|
53
53
|
class ChannelList extends EasCommand_1.default {
|
|
@@ -101,7 +101,7 @@ async function getUpdateChannelByNameForAppAsync({ appId, channelName, }) {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
`, { appId, channelName })
|
|
104
|
+
`, { appId, channelName }, { additionalTypenames: ['UpdateChannel', 'UpdateBranch', 'Update'] })
|
|
105
105
|
.toPromise());
|
|
106
106
|
}
|
|
107
107
|
exports.getUpdateChannelByNameForAppAsync = getUpdateChannelByNameForAppAsync;
|
|
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const envinfo_1 = (0, tslib_1.__importDefault)(require("envinfo"));
|
|
5
5
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../commandUtils/EasCommand"));
|
|
6
6
|
const log_1 = (0, tslib_1.__importDefault)(require("../log"));
|
|
7
|
-
const
|
|
7
|
+
const easCli_1 = require("../utils/easCli");
|
|
8
8
|
class Diagnostics extends EasCommand_1.default {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
@@ -28,7 +28,7 @@ class Diagnostics extends EasCommand_1.default {
|
|
|
28
28
|
],
|
|
29
29
|
npmGlobalPackages: ['eas-cli', 'expo-cli'],
|
|
30
30
|
}, {
|
|
31
|
-
title: `EAS CLI ${
|
|
31
|
+
title: `EAS CLI ${easCli_1.easCliVersion} environment info`,
|
|
32
32
|
});
|
|
33
33
|
log_1.default.log(info);
|
|
34
34
|
}
|
|
@@ -59,7 +59,7 @@ class EnvironmentSecretDelete extends EasCommand_1.default {
|
|
|
59
59
|
}
|
|
60
60
|
exports.default = EnvironmentSecretDelete;
|
|
61
61
|
EnvironmentSecretDelete.description = `Delete an environment secret by ID.
|
|
62
|
-
Unsure where to find the secret's ID? Run ${chalk_1.default.bold('eas
|
|
62
|
+
Unsure where to find the secret's ID? Run ${chalk_1.default.bold('eas secret:list')}`;
|
|
63
63
|
EnvironmentSecretDelete.flags = {
|
|
64
64
|
id: command_1.flags.string({
|
|
65
65
|
description: 'ID of the secret to delete',
|
|
@@ -5,7 +5,7 @@ const eas_build_job_1 = require("@expo/eas-build-job");
|
|
|
5
5
|
const eas_json_1 = require("@expo/eas-json");
|
|
6
6
|
const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
|
|
7
7
|
const credentialsJsonReader = (0, tslib_1.__importStar)(require("../credentialsJson/read"));
|
|
8
|
-
const
|
|
8
|
+
const SetUpBuildCredentials_1 = require("./actions/SetUpBuildCredentials");
|
|
9
9
|
class AndroidCredentialsProvider {
|
|
10
10
|
constructor(ctx, options) {
|
|
11
11
|
this.ctx = ctx;
|
|
@@ -21,7 +21,7 @@ class AndroidCredentialsProvider {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
async getRemoteAsync() {
|
|
24
|
-
const setupBuildCredentialsAction = new
|
|
24
|
+
const setupBuildCredentialsAction = new SetUpBuildCredentials_1.SetUpBuildCredentials({ app: this.options.app });
|
|
25
25
|
const buildCredentials = await setupBuildCredentialsAction.runAsync(this.ctx);
|
|
26
26
|
return this.toAndroidCredentials(buildCredentials);
|
|
27
27
|
}
|
|
@@ -11,23 +11,23 @@ class RemoveFcm {
|
|
|
11
11
|
}
|
|
12
12
|
async runAsync(ctx) {
|
|
13
13
|
if (ctx.nonInteractive) {
|
|
14
|
-
throw new Error("Deleting an FCM
|
|
14
|
+
throw new Error("Deleting an FCM API Key is a destructive operation. Start the CLI without the '--non-interactive' flag to delete the credentials.");
|
|
15
15
|
}
|
|
16
16
|
const appCredentials = await ctx.android.getAndroidAppCredentialsWithCommonFieldsAsync(this.app);
|
|
17
17
|
const fcm = appCredentials === null || appCredentials === void 0 ? void 0 : appCredentials.androidFcm;
|
|
18
18
|
if (!fcm) {
|
|
19
|
-
log_1.default.warn(`There is no valid FCM
|
|
19
|
+
log_1.default.warn(`There is no valid FCM API Key defined for ${(0, GraphqlClient_1.formatProjectFullName)(this.app)}, ${this.app.androidApplicationIdentifier}`);
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
const confirm = await (0, prompts_1.confirmAsync)({
|
|
23
|
-
message: 'Permanently delete the FCM
|
|
23
|
+
message: 'Permanently delete the FCM API Key from Expo servers?',
|
|
24
24
|
initial: false,
|
|
25
25
|
});
|
|
26
26
|
if (!confirm) {
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
await ctx.android.deleteFcmAsync(fcm);
|
|
30
|
-
log_1.default.succeed('FCM
|
|
30
|
+
log_1.default.succeed('FCM API Key removed');
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
exports.RemoveFcm = RemoveFcm;
|
package/build/credentials/android/actions/{SetupBuildCredentials.d.ts → SetUpBuildCredentials.d.ts}
RENAMED
|
@@ -9,7 +9,7 @@ interface Options {
|
|
|
9
9
|
* Sets up Build Credentials for Android
|
|
10
10
|
* @name: sets up build credentials for the specified configuration. If no name is specified, the default configuration is setup
|
|
11
11
|
*/
|
|
12
|
-
export declare class
|
|
12
|
+
export declare class SetUpBuildCredentials {
|
|
13
13
|
private options;
|
|
14
14
|
constructor(options: Options);
|
|
15
15
|
runAsync(ctx: CredentialsContext): Promise<AndroidAppBuildCredentialsFragment>;
|
package/build/credentials/android/actions/{SetupBuildCredentials.js → SetUpBuildCredentials.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SetUpBuildCredentials = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
|
|
6
6
|
const log_1 = (0, tslib_1.__importDefault)(require("../../../log"));
|
|
@@ -12,7 +12,7 @@ const CreateKeystore_1 = require("./CreateKeystore");
|
|
|
12
12
|
* Sets up Build Credentials for Android
|
|
13
13
|
* @name: sets up build credentials for the specified configuration. If no name is specified, the default configuration is setup
|
|
14
14
|
*/
|
|
15
|
-
class
|
|
15
|
+
class SetUpBuildCredentials {
|
|
16
16
|
constructor(options) {
|
|
17
17
|
this.options = options;
|
|
18
18
|
}
|
|
@@ -74,4 +74,4 @@ class SetupBuildCredentials {
|
|
|
74
74
|
return null;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
exports.
|
|
77
|
+
exports.SetUpBuildCredentials = SetUpBuildCredentials;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AndroidAppBuildCredentialsFragment } from '../../../graphql/generated';
|
|
2
2
|
import { CredentialsContext } from '../../context';
|
|
3
3
|
import { AppLookupParams } from '../api/GraphqlClient';
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class SetUpBuildCredentialsFromCredentialsJson {
|
|
5
5
|
private app;
|
|
6
6
|
constructor(app: AppLookupParams);
|
|
7
7
|
runAsync(ctx: CredentialsContext): Promise<AndroidAppBuildCredentialsFragment | null>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SetUpBuildCredentialsFromCredentialsJson = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const generated_1 = require("../../../graphql/generated");
|
|
6
6
|
const log_1 = (0, tslib_1.__importDefault)(require("../../../log"));
|
|
@@ -9,7 +9,7 @@ const read_1 = require("../../credentialsJson/read");
|
|
|
9
9
|
const SelectAndroidBuildCredentials_1 = require("../../manager/SelectAndroidBuildCredentials");
|
|
10
10
|
const keystoreNew_1 = require("../utils/keystoreNew");
|
|
11
11
|
const DownloadKeystore_1 = require("./DownloadKeystore");
|
|
12
|
-
class
|
|
12
|
+
class SetUpBuildCredentialsFromCredentialsJson {
|
|
13
13
|
constructor(app) {
|
|
14
14
|
this.app = app;
|
|
15
15
|
}
|
|
@@ -65,4 +65,4 @@ class SetupBuildCredentialsFromCredentialsJson {
|
|
|
65
65
|
return buildCredentials;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
exports.
|
|
68
|
+
exports.SetUpBuildCredentialsFromCredentialsJson = SetUpBuildCredentialsFromCredentialsJson;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CommonAndroidAppCredentialsFragment } from '../../../graphql/generated';
|
|
2
2
|
import { CredentialsContext } from '../../context';
|
|
3
3
|
import { AppLookupParams } from '../api/GraphqlClient';
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class SetUpGoogleServiceAccountKey {
|
|
5
5
|
private app;
|
|
6
6
|
constructor(app: AppLookupParams);
|
|
7
7
|
runAsync(ctx: CredentialsContext): Promise<CommonAndroidAppCredentialsFragment>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SetUpGoogleServiceAccountKey = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
|
|
6
6
|
const log_1 = (0, tslib_1.__importDefault)(require("../../../log"));
|
|
@@ -9,7 +9,7 @@ const errors_1 = require("../../errors");
|
|
|
9
9
|
const AssignGoogleServiceAccountKey_1 = require("./AssignGoogleServiceAccountKey");
|
|
10
10
|
const CreateGoogleServiceAccountKey_1 = require("./CreateGoogleServiceAccountKey");
|
|
11
11
|
const UseExistingGoogleServiceAccountKey_1 = require("./UseExistingGoogleServiceAccountKey");
|
|
12
|
-
class
|
|
12
|
+
class SetUpGoogleServiceAccountKey {
|
|
13
13
|
constructor(app) {
|
|
14
14
|
this.app = app;
|
|
15
15
|
}
|
|
@@ -56,4 +56,4 @@ class SetupGoogleServiceAccountKey {
|
|
|
56
56
|
return ((_a = (await new UseExistingGoogleServiceAccountKey_1.UseExistingGoogleServiceAccountKey(this.app.account).runAsync(ctx))) !== null && _a !== void 0 ? _a : (await this.createOrUseExistingKeyAsync(ctx)));
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
exports.
|
|
59
|
+
exports.SetUpGoogleServiceAccountKey = SetUpGoogleServiceAccountKey;
|
|
@@ -24,6 +24,8 @@ exports.GoogleServiceAccountKeyQuery = {
|
|
|
24
24
|
${(0, graphql_1.print)(GoogleServiceAccountKey_1.GoogleServiceAccountKeyFragmentNode)}
|
|
25
25
|
`, {
|
|
26
26
|
accountName,
|
|
27
|
+
}, {
|
|
28
|
+
additionalTypenames: ['GoogleServiceAccountKey'],
|
|
27
29
|
})
|
|
28
30
|
.toPromise());
|
|
29
31
|
return data.account.byName.googleServiceAccountKeys;
|
|
@@ -3,32 +3,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.generateRandomKeystoreAsync = exports.keytoolCommandExistsAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const spawn_async_1 = (0, tslib_1.__importDefault)(require("@expo/spawn-async"));
|
|
6
|
+
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
6
7
|
const crypto_1 = (0, tslib_1.__importDefault)(require("crypto"));
|
|
7
8
|
const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
|
|
9
|
+
// (dsokal) We actually want to use node-fetch but the change is in progress.
|
|
10
|
+
// See https://github.com/expo/eas-cli/issues/32 for context.
|
|
11
|
+
// eslint-disable-next-line no-restricted-imports
|
|
12
|
+
const node_fetch_1 = (0, tslib_1.__importDefault)(require("node-fetch"));
|
|
8
13
|
const path_1 = (0, tslib_1.__importDefault)(require("path"));
|
|
9
14
|
const uuid_1 = require("uuid");
|
|
10
|
-
const
|
|
15
|
+
const events_1 = require("../../../analytics/events");
|
|
11
16
|
const generated_1 = require("../../../graphql/generated");
|
|
17
|
+
const KeystoreGenerationUrlMutation_1 = require("../../../graphql/mutations/KeystoreGenerationUrlMutation");
|
|
12
18
|
const log_1 = (0, tslib_1.__importDefault)(require("../../../log"));
|
|
19
|
+
const ora_1 = require("../../../ora");
|
|
13
20
|
const paths_1 = require("../../../utils/paths");
|
|
14
21
|
async function keytoolCommandExistsAsync() {
|
|
15
22
|
try {
|
|
16
23
|
await (0, spawn_async_1.default)('keytool');
|
|
24
|
+
return true;
|
|
17
25
|
}
|
|
18
26
|
catch (error) {
|
|
19
27
|
return false;
|
|
20
28
|
}
|
|
21
|
-
return true;
|
|
22
29
|
}
|
|
23
30
|
exports.keytoolCommandExistsAsync = keytoolCommandExistsAsync;
|
|
24
|
-
async function ensureKeytoolCommandExistsAsync() {
|
|
25
|
-
if (!(await keytoolCommandExistsAsync())) {
|
|
26
|
-
log_1.default.error('keytool is required to run this command, make sure you have it installed?');
|
|
27
|
-
log_1.default.warn('keytool is a part of OpenJDK: https://openjdk.java.net/');
|
|
28
|
-
log_1.default.warn('Also make sure that keytool is in your PATH after installation.');
|
|
29
|
-
throw new Error('keytool not found');
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
31
|
var KeystoreCreateStep;
|
|
33
32
|
(function (KeystoreCreateStep) {
|
|
34
33
|
KeystoreCreateStep["Attempt"] = "attempt";
|
|
@@ -44,17 +43,38 @@ async function generateRandomKeystoreAsync(projectId) {
|
|
|
44
43
|
return await createKeystoreAsync(keystoreData, projectId);
|
|
45
44
|
}
|
|
46
45
|
exports.generateRandomKeystoreAsync = generateRandomKeystoreAsync;
|
|
47
|
-
async function createKeystoreAsync(
|
|
48
|
-
|
|
46
|
+
async function createKeystoreAsync(keystoreParams, projectId) {
|
|
47
|
+
events_1.Analytics.logEvent(events_1.BuildEvent.ANDROID_KEYSTORE_CREATE, {
|
|
49
48
|
project_id: projectId,
|
|
50
49
|
step: KeystoreCreateStep.Attempt,
|
|
51
50
|
type: generated_1.AndroidKeystoreType.Jks,
|
|
52
51
|
});
|
|
53
52
|
try {
|
|
54
|
-
|
|
53
|
+
let keystore;
|
|
54
|
+
let localAttempt = false;
|
|
55
|
+
if (await keytoolCommandExistsAsync()) {
|
|
56
|
+
try {
|
|
57
|
+
localAttempt = true;
|
|
58
|
+
keystore = await createKeystoreLocallyAsync(keystoreParams);
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
log_1.default.error('Failed to generate keystore locally. Falling back to cloud generation.');
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (!keystore) {
|
|
65
|
+
keystore = await createKeystoreInCloudAsync(keystoreParams, {
|
|
66
|
+
showKeytoolDetectionMsg: !localAttempt,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
events_1.Analytics.logEvent(events_1.BuildEvent.ANDROID_KEYSTORE_CREATE, {
|
|
70
|
+
project_id: projectId,
|
|
71
|
+
step: KeystoreCreateStep.Success,
|
|
72
|
+
type: generated_1.AndroidKeystoreType.Jks,
|
|
73
|
+
});
|
|
74
|
+
return keystore;
|
|
55
75
|
}
|
|
56
76
|
catch (error) {
|
|
57
|
-
|
|
77
|
+
events_1.Analytics.logEvent(events_1.BuildEvent.ANDROID_KEYSTORE_CREATE, {
|
|
58
78
|
project_id: projectId,
|
|
59
79
|
step: KeystoreCreateStep.Fail,
|
|
60
80
|
reason: error.message,
|
|
@@ -62,6 +82,8 @@ async function createKeystoreAsync(credentials, projectId) {
|
|
|
62
82
|
});
|
|
63
83
|
throw error;
|
|
64
84
|
}
|
|
85
|
+
}
|
|
86
|
+
async function createKeystoreLocallyAsync(keystoreParams) {
|
|
65
87
|
await fs_extra_1.default.mkdirp((0, paths_1.getTmpDirectory)());
|
|
66
88
|
const keystorePath = path_1.default.join((0, paths_1.getTmpDirectory)(), `${(0, uuid_1.v4)()}-keystore.jks`);
|
|
67
89
|
try {
|
|
@@ -71,13 +93,13 @@ async function createKeystoreAsync(credentials, projectId) {
|
|
|
71
93
|
'-storetype',
|
|
72
94
|
'JKS',
|
|
73
95
|
'-storepass',
|
|
74
|
-
|
|
96
|
+
keystoreParams.keystorePassword,
|
|
75
97
|
'-keypass',
|
|
76
|
-
|
|
98
|
+
keystoreParams.keyPassword,
|
|
77
99
|
'-keystore',
|
|
78
100
|
keystorePath,
|
|
79
101
|
'-alias',
|
|
80
|
-
|
|
102
|
+
keystoreParams.keyAlias,
|
|
81
103
|
'-keyalg',
|
|
82
104
|
'RSA',
|
|
83
105
|
'-keysize',
|
|
@@ -87,27 +109,40 @@ async function createKeystoreAsync(credentials, projectId) {
|
|
|
87
109
|
'-dname',
|
|
88
110
|
`CN=,OU=,O=,L=,S=,C=US`,
|
|
89
111
|
]);
|
|
90
|
-
analytics_1.default.logEvent(analytics_1.Event.ANDROID_KEYSTORE_CREATE, {
|
|
91
|
-
project_id: projectId,
|
|
92
|
-
step: KeystoreCreateStep.Success,
|
|
93
|
-
type: generated_1.AndroidKeystoreType.Jks,
|
|
94
|
-
});
|
|
95
112
|
return {
|
|
96
|
-
...
|
|
113
|
+
...keystoreParams,
|
|
97
114
|
keystore: await fs_extra_1.default.readFile(keystorePath, 'base64'),
|
|
98
115
|
type: generated_1.AndroidKeystoreType.Jks,
|
|
99
116
|
};
|
|
100
117
|
}
|
|
101
|
-
catch (error) {
|
|
102
|
-
analytics_1.default.logEvent(analytics_1.Event.ANDROID_KEYSTORE_CREATE, {
|
|
103
|
-
project_id: projectId,
|
|
104
|
-
step: KeystoreCreateStep.Fail,
|
|
105
|
-
reason: error.message,
|
|
106
|
-
type: generated_1.AndroidKeystoreType.Jks,
|
|
107
|
-
});
|
|
108
|
-
throw error;
|
|
109
|
-
}
|
|
110
118
|
finally {
|
|
111
119
|
await fs_extra_1.default.remove(keystorePath);
|
|
112
120
|
}
|
|
113
121
|
}
|
|
122
|
+
async function createKeystoreInCloudAsync(keystoreParams, { showKeytoolDetectionMsg = true } = {}) {
|
|
123
|
+
if (showKeytoolDetectionMsg) {
|
|
124
|
+
log_1.default.log(`Detected that you do not have ${chalk_1.default.bold('keytool')} installed locally.`);
|
|
125
|
+
}
|
|
126
|
+
const spinner = (0, ora_1.ora)('Generating keystore in the cloud...').start();
|
|
127
|
+
try {
|
|
128
|
+
const url = await KeystoreGenerationUrlMutation_1.KeystoreGenerationUrlMutation.createKeystoreGenerationUrlAsync();
|
|
129
|
+
const response = await (0, node_fetch_1.default)(url, {
|
|
130
|
+
method: 'POST',
|
|
131
|
+
body: JSON.stringify(keystoreParams),
|
|
132
|
+
headers: { 'Content-Type': 'application/json' },
|
|
133
|
+
});
|
|
134
|
+
const result = await response.json();
|
|
135
|
+
spinner.succeed();
|
|
136
|
+
return {
|
|
137
|
+
type: generated_1.AndroidKeystoreType.Jks,
|
|
138
|
+
keystore: result.keystoreBase64,
|
|
139
|
+
keystorePassword: result.keystorePassword,
|
|
140
|
+
keyAlias: result.keyAlias,
|
|
141
|
+
keyPassword: result.keyPassword,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
catch (err) {
|
|
145
|
+
spinner.fail();
|
|
146
|
+
throw err;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -8,8 +8,8 @@ const path_1 = (0, tslib_1.__importDefault)(require("path"));
|
|
|
8
8
|
const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
|
|
9
9
|
const target_1 = require("../../project/ios/target");
|
|
10
10
|
const zipObject_1 = (0, tslib_1.__importDefault)(require("../../utils/expodash/zipObject"));
|
|
11
|
-
const vcs_1 =
|
|
12
|
-
const git_1 = (0, tslib_1.__importDefault)(require("../../vcs/git"));
|
|
11
|
+
const vcs_1 = require("../../vcs");
|
|
12
|
+
const git_1 = (0, tslib_1.__importDefault)(require("../../vcs/clients/git"));
|
|
13
13
|
const read_1 = require("./read");
|
|
14
14
|
const utils_1 = require("./utils");
|
|
15
15
|
/**
|
|
@@ -197,8 +197,9 @@ async function updateFileAsync(projectDir, filePath, base64Data) {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
async function isFileUntrackedAsync(path) {
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
const vcsClient = (0, vcs_1.getVcsClient)();
|
|
201
|
+
if (vcsClient instanceof git_1.default) {
|
|
202
|
+
return await vcsClient.isFileUntrackedAsync(path);
|
|
202
203
|
}
|
|
203
204
|
return false;
|
|
204
205
|
}
|
|
@@ -4,3 +4,7 @@ export declare class MissingCredentialsNonInteractiveError extends Error {
|
|
|
4
4
|
export declare class MissingCredentialsError extends Error {
|
|
5
5
|
constructor(message?: string);
|
|
6
6
|
}
|
|
7
|
+
export declare class UnsupportedCredentialsChoiceError extends Error {
|
|
8
|
+
choice: string;
|
|
9
|
+
constructor(message: string, choice: string);
|
|
10
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MissingCredentialsError = exports.MissingCredentialsNonInteractiveError = void 0;
|
|
3
|
+
exports.UnsupportedCredentialsChoiceError = exports.MissingCredentialsError = exports.MissingCredentialsNonInteractiveError = void 0;
|
|
4
4
|
class MissingCredentialsNonInteractiveError extends Error {
|
|
5
5
|
constructor(message) {
|
|
6
6
|
super(message !== null && message !== void 0 ? message : 'Credentials are not set up. Please run this command again in interactive mode.');
|
|
@@ -13,3 +13,10 @@ class MissingCredentialsError extends Error {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
exports.MissingCredentialsError = MissingCredentialsError;
|
|
16
|
+
class UnsupportedCredentialsChoiceError extends Error {
|
|
17
|
+
constructor(message, choice) {
|
|
18
|
+
super(message);
|
|
19
|
+
this.choice = choice;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.UnsupportedCredentialsChoiceError = UnsupportedCredentialsChoiceError;
|