eas-cli 0.34.1 → 0.37.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} +2 -2
- package/build/api.js +3 -3
- package/build/build/build.js +18 -27
- package/build/build/context.d.ts +1 -1
- package/build/build/context.js +2 -2
- package/build/build/ios/UpdatesModule.js +3 -2
- package/build/build/ios/credentials.js +3 -3
- package/build/build/ios/version.js +7 -3
- package/build/build/local.js +18 -27
- package/build/build/types.d.ts +0 -1
- package/build/build/utils/devClient.d.ts +1 -2
- package/build/build/utils/formatBuild.js +1 -9
- package/build/build/utils/repository.js +1 -0
- package/build/build/utils/url.js +1 -1
- package/build/commandUtils/EasCommand.js +4 -4
- package/build/commands/branch/publish.js +24 -2
- package/build/commands/build/index.js +15 -12
- package/build/commands/channel/create.d.ts +6 -0
- package/build/commands/channel/create.js +2 -0
- package/build/commands/secret/create.js +0 -6
- package/build/commands/secret/delete.js +1 -7
- package/build/commands/secret/list.js +0 -6
- package/build/commands/submit.js +2 -11
- 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/utils/keystore.js +67 -32
- 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/DistributionCertificateUtils.js +1 -1
- package/build/credentials/ios/actions/PushKeyUtils.js +1 -1
- 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/AppStoreConnectApiKeyQuery.d.ts +4 -0
- package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.js +33 -0
- 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 +28 -21
- package/build/credentials/ios/credentials.d.ts +2 -1
- package/build/credentials/ios/credentials.js +7 -2
- package/build/credentials/ios/utils/printCredentials.js +1 -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 +20 -15
- package/build/credentials/manager/Actions.js +20 -15
- package/build/credentials/manager/AndroidActions.js +6 -6
- package/build/credentials/manager/IosActions.d.ts +1 -0
- package/build/credentials/manager/IosActions.js +40 -5
- package/build/credentials/manager/ManageAndroid.js +6 -6
- package/build/credentials/manager/ManageIos.js +56 -17
- package/build/credentials/utils/promptForCredentials.d.ts +2 -1
- package/build/credentials/utils/promptForCredentials.js +3 -2
- package/build/graphql/client.js +1 -1
- package/build/graphql/generated.d.ts +208 -55
- package/build/graphql/mutations/KeystoreGenerationUrlMutation.d.ts +3 -0
- package/build/graphql/mutations/KeystoreGenerationUrlMutation.js +23 -0
- package/build/graphql/types/Build.js +1 -6
- package/build/project/android/applicationId.d.ts +6 -0
- package/build/project/android/applicationId.js +39 -29
- package/build/project/android/gradle.js +3 -2
- package/build/project/android/gradleUtils.d.ts +1 -0
- package/build/project/ios/bundleIdentifier.d.ts +6 -1
- package/build/project/ios/bundleIdentifier.js +29 -18
- 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/AndroidSubmitCommand.d.ts +1 -2
- package/build/submit/android/AndroidSubmitCommand.js +22 -35
- package/build/submit/android/AndroidSubmitter.d.ts +12 -8
- package/build/submit/android/AndroidSubmitter.js +30 -21
- package/build/submit/android/ServiceAccountSource.d.ts +3 -2
- package/build/submit/android/ServiceAccountSource.js +18 -6
- 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 +18 -0
- package/build/submit/ios/CredentialsServiceSource.js +63 -0
- package/build/submit/ios/IosSubmitCommand.d.ts +2 -2
- package/build/submit/ios/IosSubmitCommand.js +56 -56
- 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 +1 -1
- package/build/{build/ios → utils}/plist.d.ts +1 -1
- package/build/{build/ios → utils}/plist.js +8 -2
- package/build/utils/profiles.d.ts +9 -4
- package/build/utils/profiles.js +14 -7
- package/build/vcs/clients/git.d.ts +2 -1
- package/build/vcs/clients/git.js +83 -5
- package/build/vcs/vcs.d.ts +4 -3
- package/build/vcs/vcs.js +3 -3
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
- package/build/build/utils/analytics.d.ts +0 -22
- package/build/build/utils/analytics.js +0 -28
- package/build/project/isEasEnabledForProject.d.ts +0 -8
- package/build/project/isEasEnabledForProject.js +0 -33
- package/build/submit/android/AndroidPackageSource.d.ts +0 -17
- package/build/submit/android/AndroidPackageSource.js +0 -27
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBuildCredentialsActions = exports.getPushKeyActions = exports.credentialsJsonActions = exports.highLevelActions = void 0;
|
|
3
|
+
exports.getBuildCredentialsActions = exports.getAscApiKeyActions = exports.getPushKeyActions = exports.credentialsJsonActions = exports.highLevelActions = void 0;
|
|
4
4
|
const Actions_1 = require("./Actions");
|
|
5
5
|
exports.highLevelActions = [
|
|
6
6
|
{
|
|
@@ -13,6 +13,11 @@ exports.highLevelActions = [
|
|
|
13
13
|
title: 'Push Notifications: Manage your Apple Push Notifications Key',
|
|
14
14
|
scope: Actions_1.Scope.Manager,
|
|
15
15
|
},
|
|
16
|
+
{
|
|
17
|
+
value: Actions_1.IosActionType.ManageAscApiKey,
|
|
18
|
+
title: 'App Store Connect: Manage your API Key',
|
|
19
|
+
scope: Actions_1.Scope.Manager,
|
|
20
|
+
},
|
|
16
21
|
{
|
|
17
22
|
value: Actions_1.IosActionType.ManageCredentialsJson,
|
|
18
23
|
title: 'credentials.json: Upload/Download credentials between EAS servers and your local json ',
|
|
@@ -31,7 +36,7 @@ exports.credentialsJsonActions = [
|
|
|
31
36
|
scope: Actions_1.Scope.Project,
|
|
32
37
|
},
|
|
33
38
|
{
|
|
34
|
-
value: Actions_1.IosActionType.
|
|
39
|
+
value: Actions_1.IosActionType.SetUpBuildCredentialsFromCredentialsJson,
|
|
35
40
|
title: 'Upload credentials from credentials.json to EAS',
|
|
36
41
|
scope: Actions_1.Scope.Project,
|
|
37
42
|
},
|
|
@@ -44,8 +49,8 @@ exports.credentialsJsonActions = [
|
|
|
44
49
|
function getPushKeyActions(ctx) {
|
|
45
50
|
return [
|
|
46
51
|
{
|
|
47
|
-
value: Actions_1.IosActionType.
|
|
48
|
-
title: '
|
|
52
|
+
value: Actions_1.IosActionType.SetUpPushKey,
|
|
53
|
+
title: 'Set up your project to use Push Notifications',
|
|
49
54
|
scope: Actions_1.Scope.Project,
|
|
50
55
|
},
|
|
51
56
|
{
|
|
@@ -71,12 +76,42 @@ function getPushKeyActions(ctx) {
|
|
|
71
76
|
];
|
|
72
77
|
}
|
|
73
78
|
exports.getPushKeyActions = getPushKeyActions;
|
|
79
|
+
function getAscApiKeyActions(ctx) {
|
|
80
|
+
return [
|
|
81
|
+
{
|
|
82
|
+
value: Actions_1.IosActionType.SetUpAscApiKeyForSubmissions,
|
|
83
|
+
title: 'Set up your project to use an API Key for EAS Submit',
|
|
84
|
+
scope: Actions_1.Scope.Project,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
value: Actions_1.IosActionType.UseExistingAscApiKeyForSubmissions,
|
|
88
|
+
title: 'Use an existing API Key for EAS Submit',
|
|
89
|
+
scope: Actions_1.Scope.Project,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
value: Actions_1.IosActionType.CreateAscApiKeyForSubmissions,
|
|
93
|
+
title: 'Add a new API Key For EAS Submit',
|
|
94
|
+
scope: ctx.hasProjectContext ? Actions_1.Scope.Project : Actions_1.Scope.Account,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
value: Actions_1.IosActionType.RemoveAscApiKey,
|
|
98
|
+
title: 'Delete an API Key',
|
|
99
|
+
scope: Actions_1.Scope.Account,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
value: Actions_1.IosActionType.GoBackToHighLevelActions,
|
|
103
|
+
title: 'Go back',
|
|
104
|
+
scope: Actions_1.Scope.Manager,
|
|
105
|
+
},
|
|
106
|
+
];
|
|
107
|
+
}
|
|
108
|
+
exports.getAscApiKeyActions = getAscApiKeyActions;
|
|
74
109
|
function getBuildCredentialsActions(ctx) {
|
|
75
110
|
return [
|
|
76
111
|
{
|
|
77
112
|
// This command will be triggered during build to ensure all credentials are ready
|
|
78
113
|
// I'm leaving it here for now to simplify testing
|
|
79
|
-
value: Actions_1.IosActionType.
|
|
114
|
+
value: Actions_1.IosActionType.SetUpBuildCredentials,
|
|
80
115
|
title: 'All: Set up all the required credentials to build your project',
|
|
81
116
|
scope: Actions_1.Scope.Project,
|
|
82
117
|
},
|
|
@@ -20,8 +20,8 @@ const DownloadKeystore_1 = require("../android/actions/DownloadKeystore");
|
|
|
20
20
|
const RemoveFcm_1 = require("../android/actions/RemoveFcm");
|
|
21
21
|
const RemoveGoogleServiceAccountKey_1 = require("../android/actions/RemoveGoogleServiceAccountKey");
|
|
22
22
|
const RemoveKeystore_1 = require("../android/actions/RemoveKeystore");
|
|
23
|
-
const
|
|
24
|
-
const
|
|
23
|
+
const SetUpBuildCredentialsFromCredentialsJson_1 = require("../android/actions/SetUpBuildCredentialsFromCredentialsJson");
|
|
24
|
+
const SetUpGoogleServiceAccountKey_1 = require("../android/actions/SetUpGoogleServiceAccountKey");
|
|
25
25
|
const UpdateCredentialsJson_1 = require("../android/actions/UpdateCredentialsJson");
|
|
26
26
|
const UseExistingGoogleServiceAccountKey_1 = require("../android/actions/UseExistingGoogleServiceAccountKey");
|
|
27
27
|
const printCredentials_1 = require("../android/utils/printCredentials");
|
|
@@ -180,8 +180,8 @@ class ManageAndroid {
|
|
|
180
180
|
else if (action === Actions_1.AndroidActionType.RemoveGsaKey) {
|
|
181
181
|
await new RemoveGoogleServiceAccountKey_1.SelectAndRemoveGoogleServiceAccountKey(appLookupParams.account).runAsync(ctx);
|
|
182
182
|
}
|
|
183
|
-
else if (action === Actions_1.AndroidActionType.
|
|
184
|
-
await new
|
|
183
|
+
else if (action === Actions_1.AndroidActionType.SetUpGsaKey) {
|
|
184
|
+
await new SetUpGoogleServiceAccountKey_1.SetUpGoogleServiceAccountKey(appLookupParams).runAsync(ctx);
|
|
185
185
|
}
|
|
186
186
|
else if (action === Actions_1.AndroidActionType.UpdateCredentialsJson) {
|
|
187
187
|
const buildCredentials = await new SelectAndroidBuildCredentials_1.SelectExistingAndroidBuildCredentials(appLookupParams).runAsync(ctx);
|
|
@@ -189,8 +189,8 @@ class ManageAndroid {
|
|
|
189
189
|
await new UpdateCredentialsJson_1.UpdateCredentialsJson().runAsync(ctx, buildCredentials);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
else if (action === Actions_1.AndroidActionType.
|
|
193
|
-
await new
|
|
192
|
+
else if (action === Actions_1.AndroidActionType.SetUpBuildCredentialsFromCredentialsJson) {
|
|
193
|
+
await new SetUpBuildCredentialsFromCredentialsJson_1.SetUpBuildCredentialsFromCredentialsJson(appLookupParams).runAsync(ctx);
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
}
|
|
@@ -13,20 +13,25 @@ const projectUtils_1 = require("../../project/projectUtils");
|
|
|
13
13
|
const prompts_1 = require("../../prompts");
|
|
14
14
|
const Account_1 = require("../../user/Account");
|
|
15
15
|
const actions_1 = require("../../user/actions");
|
|
16
|
+
const AscApiKeyUtils_1 = require("../ios/actions/AscApiKeyUtils");
|
|
17
|
+
const AssignAscApiKey_1 = require("../ios/actions/AssignAscApiKey");
|
|
16
18
|
const AssignPushKey_1 = require("../ios/actions/AssignPushKey");
|
|
17
19
|
const BuildCredentialsUtils_1 = require("../ios/actions/BuildCredentialsUtils");
|
|
20
|
+
const CreateAscApiKey_1 = require("../ios/actions/CreateAscApiKey");
|
|
18
21
|
const CreateDistributionCertificate_1 = require("../ios/actions/CreateDistributionCertificate");
|
|
19
22
|
const CreatePushKey_1 = require("../ios/actions/CreatePushKey");
|
|
20
23
|
const DistributionCertificateUtils_1 = require("../ios/actions/DistributionCertificateUtils");
|
|
21
24
|
const PushKeyUtils_1 = require("../ios/actions/PushKeyUtils");
|
|
25
|
+
const RemoveAscApiKey_1 = require("../ios/actions/RemoveAscApiKey");
|
|
22
26
|
const RemoveDistributionCertificate_1 = require("../ios/actions/RemoveDistributionCertificate");
|
|
23
27
|
const RemoveProvisioningProfile_1 = require("../ios/actions/RemoveProvisioningProfile");
|
|
24
28
|
const RemovePushKey_1 = require("../ios/actions/RemovePushKey");
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
29
|
+
const SetUpAdhocProvisioningProfile_1 = require("../ios/actions/SetUpAdhocProvisioningProfile");
|
|
30
|
+
const SetUpAscApiKey_1 = require("../ios/actions/SetUpAscApiKey");
|
|
31
|
+
const SetUpBuildCredentials_1 = require("../ios/actions/SetUpBuildCredentials");
|
|
32
|
+
const SetUpBuildCredentialsFromCredentialsJson_1 = require("../ios/actions/SetUpBuildCredentialsFromCredentialsJson");
|
|
33
|
+
const SetUpProvisioningProfile_1 = require("../ios/actions/SetUpProvisioningProfile");
|
|
34
|
+
const SetUpPushKey_1 = require("../ios/actions/SetUpPushKey");
|
|
30
35
|
const UpdateCredentialsJson_1 = require("../ios/actions/UpdateCredentialsJson");
|
|
31
36
|
const entitlements_1 = require("../ios/appstore/entitlements");
|
|
32
37
|
const printCredentials_1 = require("../ios/utils/printCredentials");
|
|
@@ -42,6 +47,7 @@ class ManageIos {
|
|
|
42
47
|
async runAsync(ctx, currentActions = IosActions_1.highLevelActions) {
|
|
43
48
|
const buildCredentialsActions = (0, IosActions_1.getBuildCredentialsActions)(ctx);
|
|
44
49
|
const pushKeyActions = (0, IosActions_1.getPushKeyActions)(ctx);
|
|
50
|
+
const ascApiKeyActions = (0, IosActions_1.getAscApiKeyActions)(ctx);
|
|
45
51
|
await ctx.bestEffortAppStoreAuthenticateAsync();
|
|
46
52
|
const accountName = ctx.hasProjectContext
|
|
47
53
|
? (0, projectUtils_1.getProjectAccountName)(ctx.exp, ctx.user)
|
|
@@ -89,6 +95,10 @@ class ManageIos {
|
|
|
89
95
|
currentActions = pushKeyActions;
|
|
90
96
|
continue;
|
|
91
97
|
}
|
|
98
|
+
else if (chosenAction === Actions_1.IosActionType.ManageAscApiKey) {
|
|
99
|
+
currentActions = ascApiKeyActions;
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
92
102
|
else if (chosenAction === Actions_1.IosActionType.GoBackToHighLevelActions) {
|
|
93
103
|
currentActions = IosActions_1.highLevelActions;
|
|
94
104
|
continue;
|
|
@@ -154,27 +164,33 @@ class ManageIos {
|
|
|
154
164
|
else if (action === Actions_1.IosActionType.CreatePushKey) {
|
|
155
165
|
await new CreatePushKey_1.CreatePushKey(account).runAsync(ctx);
|
|
156
166
|
}
|
|
167
|
+
else if (action === Actions_1.IosActionType.CreateAscApiKeyForSubmissions) {
|
|
168
|
+
await new CreateAscApiKey_1.CreateAscApiKey(account).runAsync(ctx, AscApiKeyUtils_1.AppStoreApiKeyPurpose.SUBMISSION_SERVICE);
|
|
169
|
+
}
|
|
157
170
|
else if (action === Actions_1.IosActionType.RemovePushKey) {
|
|
158
171
|
await new RemovePushKey_1.SelectAndRemovePushKey(account).runAsync(ctx);
|
|
159
172
|
}
|
|
173
|
+
else if (action === Actions_1.IosActionType.RemoveAscApiKey) {
|
|
174
|
+
await new RemoveAscApiKey_1.SelectAndRemoveAscApiKey(account).runAsync(ctx);
|
|
175
|
+
}
|
|
160
176
|
}
|
|
161
177
|
async runProjectSpecificActionAsync(ctx, app, targets, buildProfile, action) {
|
|
162
|
-
var _a;
|
|
163
|
-
if (action === Actions_1.IosActionType.
|
|
164
|
-
await new
|
|
178
|
+
var _a, _b;
|
|
179
|
+
if (action === Actions_1.IosActionType.SetUpBuildCredentials) {
|
|
180
|
+
await new SetUpBuildCredentials_1.SetUpBuildCredentials({
|
|
165
181
|
app,
|
|
166
182
|
targets,
|
|
167
183
|
distribution: buildProfile.distribution,
|
|
168
184
|
enterpriseProvisioning: buildProfile.enterpriseProvisioning,
|
|
169
185
|
iosCapabilitiesOptions: {
|
|
170
|
-
entitlements: await (0, entitlements_1.getManagedEntitlementsJsonAsync)(ctx.projectDir),
|
|
186
|
+
entitlements: await (0, entitlements_1.getManagedEntitlementsJsonAsync)(ctx.projectDir, (_a = buildProfile.env) !== null && _a !== void 0 ? _a : {}),
|
|
171
187
|
},
|
|
172
188
|
}).runAsync(ctx);
|
|
173
189
|
return;
|
|
174
190
|
}
|
|
175
191
|
const distributionType = await new SelectIosDistributionTypeGraphqlFromBuildProfile_1.SelectIosDistributionTypeGraphqlFromBuildProfile(buildProfile).runAsync(ctx);
|
|
176
|
-
if (action === Actions_1.IosActionType.
|
|
177
|
-
await new
|
|
192
|
+
if (action === Actions_1.IosActionType.SetUpBuildCredentialsFromCredentialsJson) {
|
|
193
|
+
await new SetUpBuildCredentialsFromCredentialsJson_1.SetUpBuildCredentialsFromCredentialsJson(app, targets, distributionType).runAsync(ctx);
|
|
178
194
|
return;
|
|
179
195
|
}
|
|
180
196
|
else if (action === Actions_1.IosActionType.UpdateCredentialsJson) {
|
|
@@ -204,7 +220,7 @@ class ManageIos {
|
|
|
204
220
|
}
|
|
205
221
|
case Actions_1.IosActionType.RemoveProvisioningProfile: {
|
|
206
222
|
const iosAppCredentials = await ctx.ios.getIosAppCredentialsWithCommonFieldsAsync(appLookupParams);
|
|
207
|
-
const provisioningProfile = (
|
|
223
|
+
const provisioningProfile = (_b = iosAppCredentials === null || iosAppCredentials === void 0 ? void 0 : iosAppCredentials.iosAppBuildCredentialsList.find(buildCredentials => buildCredentials.iosDistributionType === distributionType)) === null || _b === void 0 ? void 0 : _b.provisioningProfile;
|
|
208
224
|
if (!provisioningProfile) {
|
|
209
225
|
log_1.default.log(`No provisioning profile associated with the ${distributionType} configuration of ${appLookupParams.projectName}`);
|
|
210
226
|
return;
|
|
@@ -217,14 +233,14 @@ class ManageIos {
|
|
|
217
233
|
}
|
|
218
234
|
return;
|
|
219
235
|
}
|
|
220
|
-
case Actions_1.IosActionType.
|
|
221
|
-
const setupPushKeyAction = await new
|
|
236
|
+
case Actions_1.IosActionType.SetUpPushKey: {
|
|
237
|
+
const setupPushKeyAction = await new SetUpPushKey_1.SetUpPushKey(appLookupParams);
|
|
222
238
|
const isPushKeySetup = await setupPushKeyAction.isPushKeySetupAsync(ctx);
|
|
223
239
|
if (isPushKeySetup) {
|
|
224
240
|
log_1.default.log(`Push Key is already set up for ${appLookupParams.projectName} ${appLookupParams.bundleIdentifier}`);
|
|
225
241
|
}
|
|
226
242
|
else {
|
|
227
|
-
await new
|
|
243
|
+
await new SetUpPushKey_1.SetUpPushKey(appLookupParams).runAsync(ctx);
|
|
228
244
|
}
|
|
229
245
|
return;
|
|
230
246
|
}
|
|
@@ -245,6 +261,29 @@ class ManageIos {
|
|
|
245
261
|
}
|
|
246
262
|
return;
|
|
247
263
|
}
|
|
264
|
+
case Actions_1.IosActionType.SetUpAscApiKeyForSubmissions: {
|
|
265
|
+
await new SetUpAscApiKey_1.SetUpAscApiKey(appLookupParams, AscApiKeyUtils_1.AppStoreApiKeyPurpose.SUBMISSION_SERVICE).runAsync(ctx);
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
case Actions_1.IosActionType.UseExistingAscApiKeyForSubmissions: {
|
|
269
|
+
const ascApiKey = await (0, AscApiKeyUtils_1.selectAscApiKeysFromAccountAsync)(ctx, appLookupParams.account, {
|
|
270
|
+
filterDifferentAppleTeam: true,
|
|
271
|
+
});
|
|
272
|
+
if (ascApiKey) {
|
|
273
|
+
await new AssignAscApiKey_1.AssignAscApiKey(appLookupParams).runAsync(ctx, ascApiKey, AscApiKeyUtils_1.AppStoreApiKeyPurpose.SUBMISSION_SERVICE);
|
|
274
|
+
}
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
case Actions_1.IosActionType.CreateAscApiKeyForSubmissions: {
|
|
278
|
+
const ascApiKey = await new CreateAscApiKey_1.CreateAscApiKey(appLookupParams.account).runAsync(ctx, AscApiKeyUtils_1.AppStoreApiKeyPurpose.SUBMISSION_SERVICE);
|
|
279
|
+
const confirm = await (0, prompts_1.confirmAsync)({
|
|
280
|
+
message: `Do you want ${appLookupParams.projectName} to use the new API Key?`,
|
|
281
|
+
});
|
|
282
|
+
if (confirm) {
|
|
283
|
+
await new AssignAscApiKey_1.AssignAscApiKey(appLookupParams).runAsync(ctx, ascApiKey, AscApiKeyUtils_1.AppStoreApiKeyPurpose.SUBMISSION_SERVICE);
|
|
284
|
+
}
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
248
287
|
default:
|
|
249
288
|
throw new Error('Unknown action selected');
|
|
250
289
|
}
|
|
@@ -253,10 +292,10 @@ class ManageIos {
|
|
|
253
292
|
log_1.default.log(`Setting up ${appLookupParams.projectName} to use Distribution Certificate`);
|
|
254
293
|
log_1.default.log(`Creating provisioning profile...`);
|
|
255
294
|
if (distributionType === generated_1.IosDistributionType.AdHoc) {
|
|
256
|
-
return await new
|
|
295
|
+
return await new SetUpAdhocProvisioningProfile_1.SetUpAdhocProvisioningProfile(appLookupParams).runWithDistributionCertificateAsync(ctx, distCert);
|
|
257
296
|
}
|
|
258
297
|
else {
|
|
259
|
-
return await new
|
|
298
|
+
return await new SetUpProvisioningProfile_1.SetUpProvisioningProfile(appLookupParams, distributionType).createAndAssignProfileAsync(ctx, distCert);
|
|
260
299
|
}
|
|
261
300
|
}
|
|
262
301
|
async selectTargetAsync(targets) {
|
|
@@ -13,4 +13,5 @@ export declare type CredentialSchema<T> = {
|
|
|
13
13
|
transformResultAsync?: (answers: Partial<T>) => Promise<T>;
|
|
14
14
|
};
|
|
15
15
|
export declare function askForUserProvidedAsync<T>(schema: CredentialSchema<T>, initialValues?: Partial<T>): Promise<T | null>;
|
|
16
|
-
export declare function getCredentialsFromUserAsync<T>(credentialsSchema: CredentialSchema<T>, initialValues
|
|
16
|
+
export declare function getCredentialsFromUserAsync<T>(credentialsSchema: CredentialSchema<T>, initialValues?: Partial<T>): Promise<T>;
|
|
17
|
+
export declare function shouldAutoGenerateCredentialsAsync<T>(schema: CredentialSchema<T>): Promise<boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCredentialsFromUserAsync = exports.askForUserProvidedAsync = void 0;
|
|
3
|
+
exports.shouldAutoGenerateCredentialsAsync = exports.getCredentialsFromUserAsync = exports.askForUserProvidedAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
|
|
6
6
|
const path_1 = (0, tslib_1.__importDefault)(require("path"));
|
|
@@ -29,7 +29,7 @@ async function askForUserProvidedAsync(schema, initialValues = {}) {
|
|
|
29
29
|
return await getCredentialsFromUserAsync(schema, initialValues);
|
|
30
30
|
}
|
|
31
31
|
exports.askForUserProvidedAsync = askForUserProvidedAsync;
|
|
32
|
-
async function getCredentialsFromUserAsync(credentialsSchema, initialValues) {
|
|
32
|
+
async function getCredentialsFromUserAsync(credentialsSchema, initialValues = {}) {
|
|
33
33
|
var _a;
|
|
34
34
|
const results = {};
|
|
35
35
|
for (const question of credentialsSchema.questions) {
|
|
@@ -48,6 +48,7 @@ async function shouldAutoGenerateCredentialsAsync(schema) {
|
|
|
48
48
|
});
|
|
49
49
|
return answer;
|
|
50
50
|
}
|
|
51
|
+
exports.shouldAutoGenerateCredentialsAsync = shouldAutoGenerateCredentialsAsync;
|
|
51
52
|
async function askQuestionAndProcessAnswerAsync(definition, initialValue) {
|
|
52
53
|
const questionObject = buildQuestionObject(definition, initialValue);
|
|
53
54
|
const { input } = await (0, prompts_1.promptAsync)(questionObject);
|
package/build/graphql/client.js
CHANGED
|
@@ -13,7 +13,7 @@ const api_1 = require("../api");
|
|
|
13
13
|
const log_1 = (0, tslib_1.__importDefault)(require("../log"));
|
|
14
14
|
const sessionStorage_1 = require("../user/sessionStorage");
|
|
15
15
|
exports.graphqlClient = (0, core_1.createClient)({
|
|
16
|
-
url: (0, api_1.getExpoApiBaseUrl)() + '
|
|
16
|
+
url: (0, api_1.getExpoApiBaseUrl)() + '/graphql',
|
|
17
17
|
exchanges: [
|
|
18
18
|
core_1.dedupExchange,
|
|
19
19
|
core_1.cacheExchange,
|