eas-cli 0.33.0 → 0.35.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.js +3 -9
- package/build/api.js +3 -3
- package/build/build/android/UpdatesModule.js +4 -15
- 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 +2 -2
- package/build/build/configure.js +14 -7
- package/build/build/ios/UpdatesModule.js +6 -18
- package/build/build/ios/graphql.js +2 -23
- package/build/build/ios/prepareJob.js +4 -6
- package/build/build/metadata.js +5 -10
- 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 +21 -0
- 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 +20 -48
- package/build/commands/branch/view.js +1 -1
- package/build/commands/build/index.js +43 -24
- 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/{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/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 +156 -23
- 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 +22 -12
- package/build/credentials/ios/credentials.d.ts +2 -1
- package/build/credentials/ios/credentials.js +8 -3
- 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 +78 -166
- 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 +170 -33
- package/build/graphql/generated.js +23 -1
- 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 +6 -5
- package/build/submit/android/ServiceAccountSource.js +2 -2
- package/build/submit/ios/AppSpecificPasswordSource.d.ts +2 -6
- package/build/submit/ios/AppSpecificPasswordSource.js +0 -18
- package/build/submit/ios/AscApiKeySource.d.ts +9 -3
- package/build/submit/ios/AscApiKeySource.js +10 -10
- package/build/submit/ios/CredentialsServiceSource.d.ts +14 -0
- package/build/submit/ios/CredentialsServiceSource.js +46 -0
- package/build/submit/ios/IosSubmitCommand.js +22 -14
- package/build/submit/ios/IosSubmitter.d.ts +3 -0
- package/build/submit/ios/IosSubmitter.js +30 -20
- package/build/submit/utils/errors.js +2 -0
- package/build/user/User.js +1 -0
- 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 +10 -10
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppStoreConnectApiKeyFragmentNode = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_1 = require("graphql");
|
|
6
|
+
const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
|
|
7
|
+
const AppleTeam_1 = require("./AppleTeam");
|
|
8
|
+
exports.AppStoreConnectApiKeyFragmentNode = (0, graphql_tag_1.default) `
|
|
9
|
+
fragment AppStoreConnectApiKeyFragment on AppStoreConnectApiKey {
|
|
10
|
+
id
|
|
11
|
+
appleTeam {
|
|
12
|
+
id
|
|
13
|
+
...AppleTeamFragment
|
|
14
|
+
}
|
|
15
|
+
issuerIdentifier
|
|
16
|
+
keyIdentifier
|
|
17
|
+
name
|
|
18
|
+
roles
|
|
19
|
+
createdAt
|
|
20
|
+
updatedAt
|
|
21
|
+
}
|
|
22
|
+
${(0, graphql_1.print)(AppleTeam_1.AppleTeamFragmentNode)}
|
|
23
|
+
`;
|
|
@@ -4,6 +4,7 @@ exports.CommonIosAppCredentialsFragmentNode = exports.CommonIosAppCredentialsWit
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
|
|
6
6
|
const App_1 = require("../App");
|
|
7
|
+
const AppStoreConnectApiKey_1 = require("./AppStoreConnectApiKey");
|
|
7
8
|
const AppleAppIdentifier_1 = require("./AppleAppIdentifier");
|
|
8
9
|
const ApplePushKey_1 = require("./ApplePushKey");
|
|
9
10
|
const AppleTeam_1 = require("./AppleTeam");
|
|
@@ -27,11 +28,16 @@ exports.CommonIosAppCredentialsWithoutBuildCredentialsFragmentNode = (0, graphql
|
|
|
27
28
|
id
|
|
28
29
|
...ApplePushKeyFragment
|
|
29
30
|
}
|
|
31
|
+
appStoreConnectApiKeyForSubmissions {
|
|
32
|
+
id
|
|
33
|
+
...AppStoreConnectApiKeyFragment
|
|
34
|
+
}
|
|
30
35
|
}
|
|
31
36
|
${App_1.AppFragmentNode}
|
|
32
37
|
${AppleTeam_1.AppleTeamFragmentNode}
|
|
33
38
|
${AppleAppIdentifier_1.AppleAppIdentifierFragmentNode}
|
|
34
39
|
${ApplePushKey_1.ApplePushKeyFragmentNode}
|
|
40
|
+
${AppStoreConnectApiKey_1.AppStoreConnectApiKeyFragmentNode}
|
|
35
41
|
`;
|
|
36
42
|
exports.CommonIosAppCredentialsFragmentNode = (0, graphql_tag_1.default) `
|
|
37
43
|
fragment CommonIosAppCredentialsFragment on IosAppCredentials {
|
package/build/log.d.ts
CHANGED
|
@@ -11,8 +11,6 @@ export default class Log {
|
|
|
11
11
|
static succeed(message: string): void;
|
|
12
12
|
static withTick(...args: any[]): void;
|
|
13
13
|
private static consoleLog;
|
|
14
|
-
private static consoleWarn;
|
|
15
|
-
private static consoleError;
|
|
16
14
|
private static withTextColor;
|
|
17
15
|
private static isLastLineNewLine;
|
|
18
16
|
private static updateIsLastLineNewLine;
|
package/build/log.js
CHANGED
|
@@ -20,10 +20,10 @@ class Log {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
static error(...args) {
|
|
23
|
-
Log.
|
|
23
|
+
Log.consoleLog(...Log.withTextColor(args, chalk_1.default.red));
|
|
24
24
|
}
|
|
25
25
|
static warn(...args) {
|
|
26
|
-
Log.
|
|
26
|
+
Log.consoleLog(...Log.withTextColor(args, chalk_1.default.yellow));
|
|
27
27
|
}
|
|
28
28
|
static debug(...args) {
|
|
29
29
|
if (Log.isDebug) {
|
|
@@ -47,16 +47,6 @@ class Log {
|
|
|
47
47
|
// eslint-disable-next-line no-console
|
|
48
48
|
console.log(...args);
|
|
49
49
|
}
|
|
50
|
-
static consoleWarn(...args) {
|
|
51
|
-
Log.updateIsLastLineNewLine(args);
|
|
52
|
-
// eslint-disable-next-line no-console
|
|
53
|
-
console.warn(...args);
|
|
54
|
-
}
|
|
55
|
-
static consoleError(...args) {
|
|
56
|
-
Log.updateIsLastLineNewLine(args);
|
|
57
|
-
// eslint-disable-next-line no-console
|
|
58
|
-
console.error(...args);
|
|
59
|
-
}
|
|
60
50
|
static withTextColor(args, chalkColor) {
|
|
61
51
|
return args.map(arg => chalkColor(arg));
|
|
62
52
|
}
|
package/build/project/publish.js
CHANGED
|
@@ -13,7 +13,7 @@ const PublishMutation_1 = require("../graphql/mutations/PublishMutation");
|
|
|
13
13
|
const PublishQuery_1 = require("../graphql/queries/PublishQuery");
|
|
14
14
|
const log_1 = (0, tslib_1.__importDefault)(require("../log"));
|
|
15
15
|
const uploads_1 = require("../uploads");
|
|
16
|
-
const
|
|
16
|
+
const expoCli_1 = require("../utils/expoCli");
|
|
17
17
|
const uniqBy_1 = (0, tslib_1.__importDefault)(require("../utils/expodash/uniqBy"));
|
|
18
18
|
exports.TIMEOUT_LIMIT = 60000; // 1 minute
|
|
19
19
|
const fileMetadataJoi = joi_1.default.object({
|
|
@@ -108,7 +108,7 @@ async function buildBundlesAsync({ projectDir, inputDir, }) {
|
|
|
108
108
|
throw new Error('Could not locate package.json');
|
|
109
109
|
}
|
|
110
110
|
log_1.default.withTick(`Building bundle with expo-cli...`);
|
|
111
|
-
await (0,
|
|
111
|
+
await (0, expoCli_1.expoCommandAsync)(projectDir, ['export', '--output-dir', inputDir, '--experimental-bundle']);
|
|
112
112
|
}
|
|
113
113
|
exports.buildBundlesAsync = buildBundlesAsync;
|
|
114
114
|
async function resolveInputDirectoryAsync(customInputDirectory) {
|
|
@@ -6,7 +6,7 @@ const config_plugins_1 = require("@expo/config-plugins");
|
|
|
6
6
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
7
7
|
const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
|
|
8
8
|
const path_1 = (0, tslib_1.__importDefault)(require("path"));
|
|
9
|
-
const vcs_1 =
|
|
9
|
+
const vcs_1 = require("../vcs");
|
|
10
10
|
async function resolveWorkflowAsync(projectDir, platform) {
|
|
11
11
|
let platformWorkflowMarker;
|
|
12
12
|
try {
|
|
@@ -19,7 +19,7 @@ async function resolveWorkflowAsync(projectDir, platform) {
|
|
|
19
19
|
return eas_build_job_1.Workflow.MANAGED;
|
|
20
20
|
}
|
|
21
21
|
if (await fs_extra_1.default.pathExists(platformWorkflowMarker)) {
|
|
22
|
-
return (await vcs_1.
|
|
22
|
+
return (await (0, vcs_1.getVcsClient)().isFileIgnoredAsync(path_1.default.relative(projectDir, platformWorkflowMarker)))
|
|
23
23
|
? eas_build_job_1.Workflow.MANAGED
|
|
24
24
|
: eas_build_job_1.Workflow.GENERIC;
|
|
25
25
|
}
|
|
@@ -188,7 +188,7 @@ async function handleBuildListSourceAsync(source) {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
function formatBuildChoice(build, expiryDate) {
|
|
191
|
-
const { id, platform, updatedAt, appVersion, sdkVersion, runtimeVersion, buildProfile, appBuildVersion, releaseChannel, } = build;
|
|
191
|
+
const { id, platform, updatedAt, appVersion, sdkVersion, runtimeVersion, buildProfile, appBuildVersion, releaseChannel, initiatingActor, } = build;
|
|
192
192
|
const formatValue = (field) => field ? chalk_1.default.bold(field) : chalk_1.default.dim('Unknown');
|
|
193
193
|
const buildDate = new Date(updatedAt);
|
|
194
194
|
const maybeRuntimeVersion = runtimeVersion ? `Runtime: ${formatValue(runtimeVersion)}` : null;
|
|
@@ -204,6 +204,7 @@ function formatBuildChoice(build, expiryDate) {
|
|
|
204
204
|
.filter(it => it != null)
|
|
205
205
|
.join(', '),
|
|
206
206
|
`\tProfile: ${formatValue(buildProfile)}, Release channel: ${formatValue(releaseChannel)}`,
|
|
207
|
+
`\tAuthored by: ${formatValue(initiatingActor === null || initiatingActor === void 0 ? void 0 : initiatingActor.displayName)}`,
|
|
207
208
|
].join('\n');
|
|
208
209
|
return {
|
|
209
210
|
title,
|
|
@@ -218,16 +219,16 @@ async function handlePromptSourceAsync(source) {
|
|
|
218
219
|
message: 'What would you like to submit?',
|
|
219
220
|
choices: [
|
|
220
221
|
{
|
|
221
|
-
title: '
|
|
222
|
+
title: 'Select a build from EAS',
|
|
222
223
|
value: ArchiveSourceType.buildList,
|
|
223
224
|
},
|
|
224
|
-
{ title: '
|
|
225
|
+
{ title: 'Provide a URL to the app archive', value: ArchiveSourceType.url },
|
|
225
226
|
{
|
|
226
|
-
title: '
|
|
227
|
+
title: 'Provide a path to a local app binary file',
|
|
227
228
|
value: ArchiveSourceType.path,
|
|
228
229
|
},
|
|
229
230
|
{
|
|
230
|
-
title: '
|
|
231
|
+
title: 'Provide a build ID to identify a build on EAS',
|
|
231
232
|
value: ArchiveSourceType.buildId,
|
|
232
233
|
},
|
|
233
234
|
],
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
6
6
|
const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
|
|
7
7
|
const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
|
|
8
|
-
const
|
|
8
|
+
const SetUpGoogleServiceAccountKey_1 = require("../../credentials/android/actions/SetUpGoogleServiceAccountKey");
|
|
9
9
|
const googleServiceAccountKey_1 = require("../../credentials/android/utils/googleServiceAccountKey");
|
|
10
10
|
const log_1 = (0, tslib_1.__importStar)(require("../../log"));
|
|
11
11
|
const prompts_1 = require("../../prompts");
|
|
@@ -56,7 +56,7 @@ async function getServiceAccountFromCredentialsServiceAsync(ctx, androidApplicat
|
|
|
56
56
|
projectName: ctx.projectName,
|
|
57
57
|
androidApplicationIdentifier,
|
|
58
58
|
};
|
|
59
|
-
const setupGoogleServiceAccountKeyAction = new
|
|
59
|
+
const setupGoogleServiceAccountKeyAction = new SetUpGoogleServiceAccountKey_1.SetUpGoogleServiceAccountKey(appLookupParams);
|
|
60
60
|
const androidAppCredentials = await setupGoogleServiceAccountKeyAction.runAsync(ctx.credentialsCtx);
|
|
61
61
|
const googleServiceAccountKey = (0, nullthrows_1.default)(androidAppCredentials.googleServiceAccountKeyForSubmissions, 'Credentials Service must provide a valid GoogleServiceAccountKey');
|
|
62
62
|
return {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare enum AppSpecificPasswordSourceType {
|
|
2
|
-
userDefined = 0
|
|
3
|
-
prompt = 1
|
|
2
|
+
userDefined = 0
|
|
4
3
|
}
|
|
5
4
|
interface AppSpecificPasswordSourceBase {
|
|
6
5
|
sourceType: AppSpecificPasswordSourceType;
|
|
@@ -9,9 +8,6 @@ interface AppSpecificPasswordUserDefinedSource extends AppSpecificPasswordSource
|
|
|
9
8
|
sourceType: AppSpecificPasswordSourceType.userDefined;
|
|
10
9
|
appSpecificPassword: string;
|
|
11
10
|
}
|
|
12
|
-
|
|
13
|
-
sourceType: AppSpecificPasswordSourceType.prompt;
|
|
14
|
-
}
|
|
15
|
-
export declare type AppSpecificPasswordSource = AppSpecificPasswordUserDefinedSource | AppSpecificPasswordPromptSource;
|
|
11
|
+
export declare type AppSpecificPasswordSource = AppSpecificPasswordUserDefinedSource;
|
|
16
12
|
export declare function getAppSpecificPasswordAsync(source: AppSpecificPasswordSource): Promise<string>;
|
|
17
13
|
export {};
|
|
@@ -1,33 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAppSpecificPasswordAsync = exports.AppSpecificPasswordSourceType = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
6
|
-
const wrap_ansi_1 = (0, tslib_1.__importDefault)(require("wrap-ansi"));
|
|
7
|
-
const log_1 = (0, tslib_1.__importStar)(require("../../log"));
|
|
8
|
-
const prompts_1 = require("../../prompts");
|
|
9
4
|
var AppSpecificPasswordSourceType;
|
|
10
5
|
(function (AppSpecificPasswordSourceType) {
|
|
11
6
|
AppSpecificPasswordSourceType[AppSpecificPasswordSourceType["userDefined"] = 0] = "userDefined";
|
|
12
|
-
AppSpecificPasswordSourceType[AppSpecificPasswordSourceType["prompt"] = 1] = "prompt";
|
|
13
7
|
})(AppSpecificPasswordSourceType = exports.AppSpecificPasswordSourceType || (exports.AppSpecificPasswordSourceType = {}));
|
|
14
8
|
async function getAppSpecificPasswordAsync(source) {
|
|
15
9
|
var _a;
|
|
16
10
|
if (source.sourceType === AppSpecificPasswordSourceType.userDefined) {
|
|
17
11
|
return source.appSpecificPassword;
|
|
18
12
|
}
|
|
19
|
-
else if (source.sourceType === AppSpecificPasswordSourceType.prompt) {
|
|
20
|
-
log_1.default.addNewLineIfNone();
|
|
21
|
-
log_1.default.log((0, wrap_ansi_1.default)(`Please enter your Apple app-specific password. You can also provide it by using the ${chalk_1.default.bold('EXPO_APPLE_APP_SPECIFIC_PASSWORD')} environment variable.`, process.stdout.columns || 80));
|
|
22
|
-
log_1.default.log((0, log_1.learnMore)('https://expo.fyi/apple-app-specific-password'));
|
|
23
|
-
const { appSpecificPassword } = await (0, prompts_1.promptAsync)({
|
|
24
|
-
name: 'appSpecificPassword',
|
|
25
|
-
message: 'Your Apple app-specific password:',
|
|
26
|
-
type: 'password',
|
|
27
|
-
validate: (val) => val !== '' || 'Apple app-specific password cannot be empty!',
|
|
28
|
-
});
|
|
29
|
-
return appSpecificPassword;
|
|
30
|
-
}
|
|
31
13
|
else {
|
|
32
14
|
// exhaustive -- should never happen
|
|
33
15
|
throw new Error(`Unknown app specific password source type "${(_a = source) === null || _a === void 0 ? void 0 : _a.sourceType}"`);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { Platform } from '@expo/eas-build-job';
|
|
1
2
|
import { AscApiKeyPath, MinimalAscApiKey } from '../../credentials/ios/credentials';
|
|
3
|
+
import { SubmissionContext } from '../context';
|
|
2
4
|
export declare enum AscApiKeySourceType {
|
|
3
5
|
path = 0,
|
|
4
6
|
prompt = 1
|
|
@@ -18,11 +20,15 @@ declare type AscApiKeySummary = {
|
|
|
18
20
|
source: 'local' | 'EAS servers';
|
|
19
21
|
path?: string;
|
|
20
22
|
keyId: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
};
|
|
25
|
+
export declare type AscApiKeyFromExpoServers = {
|
|
26
|
+
ascApiKeyId: string;
|
|
21
27
|
};
|
|
22
28
|
export declare type AscApiKeyResult = {
|
|
23
|
-
result: MinimalAscApiKey;
|
|
29
|
+
result: MinimalAscApiKey | AscApiKeyFromExpoServers;
|
|
24
30
|
summary: AscApiKeySummary;
|
|
25
31
|
};
|
|
26
|
-
export declare function getAscApiKeyLocallyAsync(source: AscApiKeySource): Promise<AscApiKeyResult>;
|
|
27
|
-
export declare function getAscApiKeyPathAsync(source: AscApiKeySource): Promise<AscApiKeyPath>;
|
|
32
|
+
export declare function getAscApiKeyLocallyAsync(ctx: SubmissionContext<Platform.IOS>, source: AscApiKeySource): Promise<AscApiKeyResult>;
|
|
33
|
+
export declare function getAscApiKeyPathAsync(ctx: SubmissionContext<Platform.IOS>, source: AscApiKeySource): Promise<AscApiKeyPath>;
|
|
28
34
|
export {};
|
|
@@ -11,8 +11,8 @@ var AscApiKeySourceType;
|
|
|
11
11
|
AscApiKeySourceType[AscApiKeySourceType["path"] = 0] = "path";
|
|
12
12
|
AscApiKeySourceType[AscApiKeySourceType["prompt"] = 1] = "prompt";
|
|
13
13
|
})(AscApiKeySourceType = exports.AscApiKeySourceType || (exports.AscApiKeySourceType = {}));
|
|
14
|
-
async function getAscApiKeyLocallyAsync(source) {
|
|
15
|
-
const ascApiKeyPath = await getAscApiKeyPathAsync(source);
|
|
14
|
+
async function getAscApiKeyLocallyAsync(ctx, source) {
|
|
15
|
+
const ascApiKeyPath = await getAscApiKeyPathAsync(ctx, source);
|
|
16
16
|
const { keyP8Path, keyId, issuerId } = ascApiKeyPath;
|
|
17
17
|
const keyP8 = await fs_extra_1.default.readFile(keyP8Path, 'utf-8');
|
|
18
18
|
return {
|
|
@@ -25,26 +25,26 @@ async function getAscApiKeyLocallyAsync(source) {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
exports.getAscApiKeyLocallyAsync = getAscApiKeyLocallyAsync;
|
|
28
|
-
async function getAscApiKeyPathAsync(source) {
|
|
28
|
+
async function getAscApiKeyPathAsync(ctx, source) {
|
|
29
29
|
switch (source.sourceType) {
|
|
30
30
|
case AscApiKeySourceType.path:
|
|
31
|
-
return await handlePathSourceAsync(source);
|
|
31
|
+
return await handlePathSourceAsync(ctx, source);
|
|
32
32
|
case AscApiKeySourceType.prompt:
|
|
33
|
-
return await handlePromptSourceAsync(source);
|
|
33
|
+
return await handlePromptSourceAsync(ctx, source);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
exports.getAscApiKeyPathAsync = getAscApiKeyPathAsync;
|
|
37
|
-
async function handlePathSourceAsync(source) {
|
|
37
|
+
async function handlePathSourceAsync(ctx, source) {
|
|
38
38
|
const { keyP8Path } = source.path;
|
|
39
39
|
if (!(await (0, files_1.isExistingFileAsync)(keyP8Path))) {
|
|
40
40
|
log_1.default.warn(`File ${keyP8Path} doesn't exist.`);
|
|
41
|
-
return await getAscApiKeyPathAsync({ sourceType: AscApiKeySourceType.prompt });
|
|
41
|
+
return await getAscApiKeyPathAsync(ctx, { sourceType: AscApiKeySourceType.prompt });
|
|
42
42
|
}
|
|
43
43
|
return source.path;
|
|
44
44
|
}
|
|
45
|
-
async function handlePromptSourceAsync(_source) {
|
|
46
|
-
const ascApiKeyPath = await (0, AscApiKeyUtils_1.
|
|
47
|
-
return await getAscApiKeyPathAsync({
|
|
45
|
+
async function handlePromptSourceAsync(ctx, _source) {
|
|
46
|
+
const ascApiKeyPath = await (0, AscApiKeyUtils_1.promptForAscApiKeyPathAsync)(ctx.credentialsCtx);
|
|
47
|
+
return await getAscApiKeyPathAsync(ctx, {
|
|
48
48
|
sourceType: AscApiKeySourceType.path,
|
|
49
49
|
path: ascApiKeyPath,
|
|
50
50
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Platform } from '@expo/eas-build-job';
|
|
2
|
+
import { SubmissionContext } from '../context';
|
|
3
|
+
import { AscApiKeyResult } from './AscApiKeySource';
|
|
4
|
+
/**
|
|
5
|
+
* The Credentials Service will either return an ASC Api Key or an App Specific Password
|
|
6
|
+
* When we no longer support the App Specific Password user prompt, refactor this into the AscApiKeySource
|
|
7
|
+
*/
|
|
8
|
+
export declare const CREDENTIALS_SERVICE_SOURCE = "CREDENTIALS_SERVICE_SOURCE";
|
|
9
|
+
export declare type CredentialsServiceSource = typeof CREDENTIALS_SERVICE_SOURCE;
|
|
10
|
+
export declare function getFromCredentialsServiceAsync(ctx: SubmissionContext<Platform.IOS>): Promise<{
|
|
11
|
+
appSpecificPassword: string;
|
|
12
|
+
} | {
|
|
13
|
+
ascApiKeyResult: AscApiKeyResult;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFromCredentialsServiceAsync = exports.CREDENTIALS_SERVICE_SOURCE = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
|
|
6
|
+
const SetUpSubmissionCredentials_1 = require("../../credentials/ios/actions/SetUpSubmissionCredentials");
|
|
7
|
+
const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
|
|
8
|
+
const bundleIdentifier_1 = require("../../project/ios/bundleIdentifier");
|
|
9
|
+
const Account_1 = require("../../user/Account");
|
|
10
|
+
/**
|
|
11
|
+
* The Credentials Service will either return an ASC Api Key or an App Specific Password
|
|
12
|
+
* When we no longer support the App Specific Password user prompt, refactor this into the AscApiKeySource
|
|
13
|
+
*/
|
|
14
|
+
exports.CREDENTIALS_SERVICE_SOURCE = 'CREDENTIALS_SERVICE_SOURCE';
|
|
15
|
+
async function getFromCredentialsServiceAsync(ctx) {
|
|
16
|
+
const bundleIdentifier = await (0, bundleIdentifier_1.getBundleIdentifierAsync)(ctx.projectDir, ctx.exp);
|
|
17
|
+
log_1.default.log(`Looking up credentials configuration for ${bundleIdentifier}...`);
|
|
18
|
+
const appLookupParams = {
|
|
19
|
+
account: (0, nullthrows_1.default)((0, Account_1.findAccountByName)(ctx.user.accounts, ctx.accountName), `You do not have access to account: ${ctx.accountName}`),
|
|
20
|
+
projectName: ctx.projectName,
|
|
21
|
+
bundleIdentifier,
|
|
22
|
+
};
|
|
23
|
+
const setupSubmissionCredentialsAction = new SetUpSubmissionCredentials_1.SetUpSubmissionCredentials(appLookupParams);
|
|
24
|
+
const ascOrAsp = await setupSubmissionCredentialsAction.runAsync(ctx.credentialsCtx);
|
|
25
|
+
const isAppSpecificPassword = typeof ascOrAsp === 'string';
|
|
26
|
+
if (isAppSpecificPassword) {
|
|
27
|
+
return { appSpecificPassword: ascOrAsp };
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
const ascKeyForSubmissions = (0, nullthrows_1.default)(ascOrAsp.appStoreConnectApiKeyForSubmissions, `An EAS Submit ASC Api Key could not be found for ${ascOrAsp.appleAppIdentifier.bundleIdentifier}`);
|
|
31
|
+
const { id, keyIdentifier, name } = ascKeyForSubmissions;
|
|
32
|
+
return {
|
|
33
|
+
ascApiKeyResult: {
|
|
34
|
+
result: {
|
|
35
|
+
ascApiKeyId: id,
|
|
36
|
+
},
|
|
37
|
+
summary: {
|
|
38
|
+
source: 'EAS servers',
|
|
39
|
+
keyId: keyIdentifier,
|
|
40
|
+
name: name !== null && name !== void 0 ? name : undefined,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.getFromCredentialsServiceAsync = getFromCredentialsServiceAsync;
|
|
@@ -14,6 +14,7 @@ const commons_1 = require("../commons");
|
|
|
14
14
|
const AppProduce_1 = require("./AppProduce");
|
|
15
15
|
const AppSpecificPasswordSource_1 = require("./AppSpecificPasswordSource");
|
|
16
16
|
const AscApiKeySource_1 = require("./AscApiKeySource");
|
|
17
|
+
const CredentialsServiceSource_1 = require("./CredentialsServiceSource");
|
|
17
18
|
const IosSubmitter_1 = (0, tslib_1.__importDefault)(require("./IosSubmitter"));
|
|
18
19
|
class IosSubmitCommand {
|
|
19
20
|
constructor(ctx) {
|
|
@@ -26,15 +27,20 @@ class IosSubmitCommand {
|
|
|
26
27
|
return await submitter.submitAsync();
|
|
27
28
|
}
|
|
28
29
|
async resolveCredentialSubmissionOptionsAsync() {
|
|
29
|
-
// Fall back to app specific password if no ascApiKey defined
|
|
30
30
|
const ascApiKeySource = this.resolveAscApiKeySource();
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
return { appSpecificPasswordSource: this.resolveAppSpecificPasswordSource() };
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
31
|
+
const shouldSkipAscApiKeySource = !ascApiKeySource.ok && ascApiKeySource.enforceError() instanceof errors_1.MissingCredentialsError;
|
|
32
|
+
if (!shouldSkipAscApiKeySource) {
|
|
36
33
|
return { ascApiKeySource };
|
|
37
34
|
}
|
|
35
|
+
const appSpecificPasswordSource = this.resolveAppSpecificPasswordSource();
|
|
36
|
+
const shouldSkipAppSpecificPasswordSource = !appSpecificPasswordSource.ok &&
|
|
37
|
+
appSpecificPasswordSource.enforceError() instanceof errors_1.MissingCredentialsError;
|
|
38
|
+
if (!shouldSkipAppSpecificPasswordSource) {
|
|
39
|
+
return { appSpecificPasswordSource: this.resolveAppSpecificPasswordSource() };
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
credentialsServiceSource: (0, results_1.result)(CredentialsServiceSource_1.CREDENTIALS_SERVICE_SOURCE),
|
|
43
|
+
};
|
|
38
44
|
}
|
|
39
45
|
async resolveSubmissionOptionsAsync() {
|
|
40
46
|
const archiveSource = this.resolveArchiveSource();
|
|
@@ -43,12 +49,16 @@ class IosSubmitCommand {
|
|
|
43
49
|
? credentialsSource.appSpecificPasswordSource
|
|
44
50
|
: null;
|
|
45
51
|
const maybeAscApiKeySource = 'ascApiKeySource' in credentialsSource ? credentialsSource.ascApiKeySource : null;
|
|
52
|
+
const maybeCredentialsServiceSource = 'credentialsServiceSource' in credentialsSource
|
|
53
|
+
? credentialsSource.credentialsServiceSource
|
|
54
|
+
: null;
|
|
46
55
|
const ascAppIdentifier = await this.resolveAscAppIdentifierAsync();
|
|
47
56
|
const appleIdUsername = await this.resolveAppleIdUsernameAsync();
|
|
48
57
|
const errored = [
|
|
49
58
|
archiveSource,
|
|
50
59
|
...(maybeAppSpecificPasswordSource ? [maybeAppSpecificPasswordSource] : []),
|
|
51
60
|
...(maybeAscApiKeySource ? [maybeAscApiKeySource] : []),
|
|
61
|
+
...(maybeCredentialsServiceSource ? [maybeCredentialsServiceSource] : []),
|
|
52
62
|
ascAppIdentifier,
|
|
53
63
|
appleIdUsername,
|
|
54
64
|
].filter(r => !r.ok);
|
|
@@ -72,6 +82,11 @@ class IosSubmitCommand {
|
|
|
72
82
|
ascApiKeySource: maybeAscApiKeySource.enforceValue(),
|
|
73
83
|
}
|
|
74
84
|
: null),
|
|
85
|
+
...(maybeCredentialsServiceSource
|
|
86
|
+
? {
|
|
87
|
+
credentialsServiceSource: maybeCredentialsServiceSource.enforceValue(),
|
|
88
|
+
}
|
|
89
|
+
: null),
|
|
75
90
|
};
|
|
76
91
|
}
|
|
77
92
|
resolveAppSpecificPasswordSource() {
|
|
@@ -82,14 +97,7 @@ class IosSubmitCommand {
|
|
|
82
97
|
appSpecificPassword: envAppSpecificPassword,
|
|
83
98
|
});
|
|
84
99
|
}
|
|
85
|
-
|
|
86
|
-
return (0, results_1.result)(new Error('Set the EXPO_APPLE_APP_SPECIFIC_PASSWORD environment variable.'));
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
return (0, results_1.result)({
|
|
90
|
-
sourceType: AppSpecificPasswordSource_1.AppSpecificPasswordSourceType.prompt,
|
|
91
|
-
});
|
|
92
|
-
}
|
|
100
|
+
return (0, results_1.result)(new errors_1.MissingCredentialsError('The EXPO_APPLE_APP_SPECIFIC_PASSWORD environment variable must be set.'));
|
|
93
101
|
}
|
|
94
102
|
resolveAscApiKeySource() {
|
|
95
103
|
const { ascApiKeyPath, ascApiKeyIssuerId, ascApiKeyId } = this.ctx.profile;
|
|
@@ -4,16 +4,19 @@ import { ArchiveSource } from '../ArchiveSource';
|
|
|
4
4
|
import BaseSubmitter, { SubmissionInput } from '../BaseSubmitter';
|
|
5
5
|
import { AppSpecificPasswordSource } from './AppSpecificPasswordSource';
|
|
6
6
|
import { AscApiKeySource } from './AscApiKeySource';
|
|
7
|
+
import { CredentialsServiceSource } from './CredentialsServiceSource';
|
|
7
8
|
export interface IosSubmissionOptions extends Pick<IosSubmissionConfigInput, 'appleIdUsername' | 'ascAppIdentifier'> {
|
|
8
9
|
projectId: string;
|
|
9
10
|
archiveSource: ArchiveSource;
|
|
10
11
|
appSpecificPasswordSource?: AppSpecificPasswordSource;
|
|
11
12
|
ascApiKeySource?: AscApiKeySource;
|
|
13
|
+
credentialsServiceSource?: CredentialsServiceSource;
|
|
12
14
|
}
|
|
13
15
|
export default class IosSubmitter extends BaseSubmitter<Platform.IOS, IosSubmissionOptions> {
|
|
14
16
|
submitAsync(): Promise<SubmissionFragment>;
|
|
15
17
|
protected createPlatformSubmissionAsync({ projectId, submissionConfig, buildId, }: SubmissionInput<Platform.IOS>): Promise<SubmissionFragment>;
|
|
16
18
|
private resolveSourceOptionsAsync;
|
|
17
19
|
private formatSubmissionConfigAsync;
|
|
20
|
+
private formatAscApiKeyResult;
|
|
18
21
|
private prepareSummaryData;
|
|
19
22
|
}
|
|
@@ -9,6 +9,7 @@ const BaseSubmitter_1 = (0, tslib_1.__importDefault)(require("../BaseSubmitter")
|
|
|
9
9
|
const summary_1 = require("../utils/summary");
|
|
10
10
|
const AppSpecificPasswordSource_1 = require("./AppSpecificPasswordSource");
|
|
11
11
|
const AscApiKeySource_1 = require("./AscApiKeySource");
|
|
12
|
+
const CredentialsServiceSource_1 = require("./CredentialsServiceSource");
|
|
12
13
|
class IosSubmitter extends BaseSubmitter_1.default {
|
|
13
14
|
async submitAsync() {
|
|
14
15
|
var _a;
|
|
@@ -34,12 +35,16 @@ class IosSubmitter extends BaseSubmitter_1.default {
|
|
|
34
35
|
? await (0, AppSpecificPasswordSource_1.getAppSpecificPasswordAsync)(this.options.appSpecificPasswordSource)
|
|
35
36
|
: null;
|
|
36
37
|
const maybeAppStoreConnectApiKey = this.options.ascApiKeySource
|
|
37
|
-
? await (0, AscApiKeySource_1.getAscApiKeyLocallyAsync)(this.options.ascApiKeySource)
|
|
38
|
+
? await (0, AscApiKeySource_1.getAscApiKeyLocallyAsync)(this.ctx, this.options.ascApiKeySource)
|
|
39
|
+
: null;
|
|
40
|
+
const maybeAscOrAspFromCredentialsService = this.options.credentialsServiceSource
|
|
41
|
+
? await (0, CredentialsServiceSource_1.getFromCredentialsServiceAsync)(this.ctx)
|
|
38
42
|
: null;
|
|
39
43
|
return {
|
|
40
44
|
archive,
|
|
41
45
|
...(maybeAppSpecificPassword ? { appSpecificPassword: maybeAppSpecificPassword } : null),
|
|
42
46
|
...(maybeAppStoreConnectApiKey ? { ascApiKeyResult: maybeAppStoreConnectApiKey } : null),
|
|
47
|
+
...(maybeAscOrAspFromCredentialsService ? maybeAscOrAspFromCredentialsService : null),
|
|
43
48
|
};
|
|
44
49
|
}
|
|
45
50
|
async formatSubmissionConfigAsync(options, { archive, appSpecificPassword, ascApiKeyResult }) {
|
|
@@ -49,27 +54,28 @@ class IosSubmitter extends BaseSubmitter_1.default {
|
|
|
49
54
|
appleIdUsername,
|
|
50
55
|
archiveUrl: archive.url,
|
|
51
56
|
appleAppSpecificPassword: appSpecificPassword,
|
|
52
|
-
...((ascApiKeyResult === null || ascApiKeyResult === void 0 ? void 0 : ascApiKeyResult.result)
|
|
53
|
-
? {
|
|
54
|
-
ascApiKey: {
|
|
55
|
-
keyP8: ascApiKeyResult === null || ascApiKeyResult === void 0 ? void 0 : ascApiKeyResult.result.keyP8,
|
|
56
|
-
keyIdentifier: ascApiKeyResult === null || ascApiKeyResult === void 0 ? void 0 : ascApiKeyResult.result.keyId,
|
|
57
|
-
issuerIdentifier: ascApiKeyResult === null || ascApiKeyResult === void 0 ? void 0 : ascApiKeyResult.result.issuerId,
|
|
58
|
-
},
|
|
59
|
-
}
|
|
60
|
-
: null),
|
|
57
|
+
...((ascApiKeyResult === null || ascApiKeyResult === void 0 ? void 0 : ascApiKeyResult.result) ? this.formatAscApiKeyResult(ascApiKeyResult.result) : null),
|
|
61
58
|
};
|
|
62
59
|
}
|
|
60
|
+
formatAscApiKeyResult(result) {
|
|
61
|
+
return 'ascApiKeyId' in result
|
|
62
|
+
? { ascApiKeyId: result.ascApiKeyId }
|
|
63
|
+
: {
|
|
64
|
+
ascApiKey: {
|
|
65
|
+
keyP8: result.keyP8,
|
|
66
|
+
keyIdentifier: result.keyId,
|
|
67
|
+
issuerIdentifier: result.issuerId,
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
}
|
|
63
71
|
prepareSummaryData(options, { archive, ascApiKeyResult }) {
|
|
64
72
|
const { appleIdUsername, ascAppIdentifier, projectId } = options;
|
|
65
73
|
// structuring order affects table rows order
|
|
66
74
|
return {
|
|
67
75
|
ascAppIdentifier,
|
|
68
|
-
appleIdUsername,
|
|
76
|
+
appleIdUsername: appleIdUsername !== null && appleIdUsername !== void 0 ? appleIdUsername : undefined,
|
|
69
77
|
projectId,
|
|
70
|
-
...(ascApiKeyResult
|
|
71
|
-
? { formattedAscApiKey: formatServiceAccountSummary(ascApiKeyResult) }
|
|
72
|
-
: null),
|
|
78
|
+
...(ascApiKeyResult ? { formattedAscApiKey: formatAscApiKeySummary(ascApiKeyResult) } : null),
|
|
73
79
|
...(0, summary_1.formatArchiveSourceSummary)(archive),
|
|
74
80
|
};
|
|
75
81
|
}
|
|
@@ -84,9 +90,17 @@ const SummaryHumanReadableKeys = {
|
|
|
84
90
|
formattedBuild: 'Build',
|
|
85
91
|
formattedAscApiKey: 'App Store Connect Api Key',
|
|
86
92
|
};
|
|
87
|
-
function
|
|
88
|
-
const { source, path, keyId } = summary;
|
|
93
|
+
function formatAscApiKeySummary({ summary }) {
|
|
94
|
+
const { source, path, keyId, name } = summary;
|
|
89
95
|
const fields = [
|
|
96
|
+
{
|
|
97
|
+
label: 'Key Name',
|
|
98
|
+
value: name,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: 'Key ID',
|
|
102
|
+
value: keyId,
|
|
103
|
+
},
|
|
90
104
|
{
|
|
91
105
|
label: 'Key Source',
|
|
92
106
|
value: source,
|
|
@@ -95,10 +109,6 @@ function formatServiceAccountSummary({ summary }) {
|
|
|
95
109
|
label: 'Key Path',
|
|
96
110
|
value: path,
|
|
97
111
|
},
|
|
98
|
-
{
|
|
99
|
-
label: 'Key ID',
|
|
100
|
-
value: keyId,
|
|
101
|
-
},
|
|
102
112
|
];
|
|
103
113
|
const filteredFields = fields.filter(({ value }) => value !== undefined && value !== null);
|
|
104
114
|
return ('\n' +
|
|
@@ -19,6 +19,7 @@ var SubmissionErrorCode;
|
|
|
19
19
|
SubmissionErrorCode["IOS_INVALID_SIGNATURE"] = "SUBMISSION_SERVICE_IOS_INVALID_SIGNATURE";
|
|
20
20
|
SubmissionErrorCode["IOS_INCORRECT_CREDENTIALS"] = "SUBMISSION_SERVICE_IOS_INVALID_CREDENTIALS";
|
|
21
21
|
SubmissionErrorCode["IOS_IPAD_INVALID_ORIENTATION"] = "SUBMISSION_SERVICE_IOS_IPAD_INVALID_ORIENTATION";
|
|
22
|
+
SubmissionErrorCode["IOS_APPLE_MAINTENANCE"] = "SUBMISSION_SERVICE_IOS_APPLE_MAINTENANCE";
|
|
22
23
|
})(SubmissionErrorCode || (SubmissionErrorCode = {}));
|
|
23
24
|
const SubmissionErrorMessages = {
|
|
24
25
|
[SubmissionErrorCode.ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR]: "Failed to download the archive file (Response code: 404 Not Found). Please make sure the URL you've provided is correct.",
|
|
@@ -50,6 +51,7 @@ const SubmissionErrorMessages = {
|
|
|
50
51
|
[SubmissionErrorCode.IOS_IPAD_INVALID_ORIENTATION]: "Your app doesn't support iPad multitasking and has to require full screen.\n" +
|
|
51
52
|
"If you're submitting a managed Expo project, set the `expo.ios.requireFullScreen` to true in app.json and build the project again.\n" +
|
|
52
53
|
`${(0, log_1.learnMore)('https://expo.fyi/ipad-requires-fullscreen')}`,
|
|
54
|
+
[SubmissionErrorCode.IOS_APPLE_MAINTENANCE]: 'It looks like Apple servers are undergoing an unscheduled maintenance. Please try again later.',
|
|
53
55
|
};
|
|
54
56
|
function printSubmissionError(error) {
|
|
55
57
|
if (error.errorCode &&
|
package/build/user/User.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const easCliVersion: string;
|
|
File without changes
|
|
File without changes
|