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.
Files changed (170) hide show
  1. package/README.md +27 -27
  2. package/build/analytics.js +3 -9
  3. package/build/api.js +3 -3
  4. package/build/build/android/UpdatesModule.js +4 -15
  5. package/build/build/android/configure.js +2 -2
  6. package/build/build/android/graphql.js +2 -4
  7. package/build/build/android/prepareJob.js +4 -3
  8. package/build/build/build.js +2 -2
  9. package/build/build/configure.js +14 -7
  10. package/build/build/ios/UpdatesModule.js +6 -18
  11. package/build/build/ios/graphql.js +2 -23
  12. package/build/build/ios/prepareJob.js +4 -6
  13. package/build/build/metadata.js +5 -10
  14. package/build/build/utils/devClient.js +8 -5
  15. package/build/build/utils/formatBuild.js +1 -9
  16. package/build/build/utils/repository.js +10 -7
  17. package/build/build/utils/url.js +1 -1
  18. package/build/build/validate.js +4 -4
  19. package/build/commandUtils/EasCommand.d.ts +1 -0
  20. package/build/commandUtils/EasCommand.js +21 -0
  21. package/build/commands/branch/create.js +3 -2
  22. package/build/commands/branch/delete.js +1 -1
  23. package/build/commands/branch/list.js +1 -1
  24. package/build/commands/branch/publish.js +20 -48
  25. package/build/commands/branch/view.js +1 -1
  26. package/build/commands/build/index.js +43 -24
  27. package/build/commands/channel/edit.js +1 -1
  28. package/build/commands/channel/list.js +1 -1
  29. package/build/commands/channel/view.js +1 -1
  30. package/build/commands/diagnostics.js +2 -2
  31. package/build/commands/project/info.js +1 -1
  32. package/build/commands/secret/delete.js +1 -1
  33. package/build/commands/update/view.js +1 -1
  34. package/build/credentials/android/AndroidCredentialsProvider.js +2 -2
  35. package/build/credentials/android/actions/{SetupBuildCredentials.d.ts → SetUpBuildCredentials.d.ts} +1 -1
  36. package/build/credentials/android/actions/{SetupBuildCredentials.js → SetUpBuildCredentials.js} +3 -3
  37. package/build/credentials/android/actions/{SetupBuildCredentialsFromCredentialsJson.d.ts → SetUpBuildCredentialsFromCredentialsJson.d.ts} +1 -1
  38. package/build/credentials/android/actions/{SetupBuildCredentialsFromCredentialsJson.js → SetUpBuildCredentialsFromCredentialsJson.js} +3 -3
  39. package/build/credentials/android/actions/{SetupGoogleServiceAccountKey.d.ts → SetUpGoogleServiceAccountKey.d.ts} +1 -1
  40. package/build/credentials/android/actions/{SetupGoogleServiceAccountKey.js → SetUpGoogleServiceAccountKey.js} +3 -3
  41. package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.js +2 -0
  42. package/build/credentials/credentialsJson/update.js +5 -4
  43. package/build/credentials/errors.d.ts +4 -0
  44. package/build/credentials/errors.js +8 -1
  45. package/build/credentials/ios/IosCredentialsProvider.js +4 -4
  46. package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +17 -1
  47. package/build/credentials/ios/actions/AscApiKeyUtils.js +156 -23
  48. package/build/credentials/ios/actions/AssignAscApiKey.d.ts +9 -0
  49. package/build/credentials/ios/actions/AssignAscApiKey.js +29 -0
  50. package/build/credentials/ios/actions/CreateAscApiKey.d.ts +9 -0
  51. package/build/credentials/ios/actions/CreateAscApiKey.js +21 -0
  52. package/build/credentials/ios/actions/CreateDistributionCertificate.js +1 -1
  53. package/build/credentials/ios/actions/CreatePushKey.js +1 -1
  54. package/build/credentials/ios/actions/DistributionCertificateUtils.d.ts +1 -1
  55. package/build/credentials/ios/actions/DistributionCertificateUtils.js +6 -8
  56. package/build/credentials/ios/actions/PushKeyUtils.d.ts +1 -1
  57. package/build/credentials/ios/actions/PushKeyUtils.js +6 -6
  58. package/build/credentials/ios/actions/RemoveAscApiKey.d.ts +14 -0
  59. package/build/credentials/ios/actions/RemoveAscApiKey.js +55 -0
  60. package/build/credentials/ios/actions/{SetupAdhocProvisioningProfile.d.ts → SetUpAdhocProvisioningProfile.d.ts} +1 -1
  61. package/build/credentials/ios/actions/{SetupAdhocProvisioningProfile.js → SetUpAdhocProvisioningProfile.js} +5 -5
  62. package/build/credentials/ios/actions/SetUpAscApiKey.d.ts +21 -0
  63. package/build/credentials/ios/actions/SetUpAscApiKey.js +114 -0
  64. package/build/credentials/ios/actions/{SetupBuildCredentials.d.ts → SetUpBuildCredentials.d.ts} +1 -1
  65. package/build/credentials/ios/actions/{SetupBuildCredentials.js → SetUpBuildCredentials.js} +5 -5
  66. package/build/credentials/ios/actions/{SetupBuildCredentialsFromCredentialsJson.d.ts → SetUpBuildCredentialsFromCredentialsJson.d.ts} +1 -1
  67. package/build/credentials/ios/actions/{SetupBuildCredentialsFromCredentialsJson.js → SetUpBuildCredentialsFromCredentialsJson.js} +5 -5
  68. package/build/credentials/ios/actions/{SetupDistributionCertificate.d.ts → SetUpDistributionCertificate.d.ts} +1 -1
  69. package/build/credentials/ios/actions/{SetupDistributionCertificate.js → SetUpDistributionCertificate.js} +3 -3
  70. package/build/credentials/ios/actions/{SetupInternalProvisioningProfile.d.ts → SetUpInternalProvisioningProfile.d.ts} +1 -1
  71. package/build/credentials/ios/actions/{SetupInternalProvisioningProfile.js → SetUpInternalProvisioningProfile.js} +7 -7
  72. package/build/credentials/ios/actions/{SetupProvisioningProfile.d.ts → SetUpProvisioningProfile.d.ts} +1 -1
  73. package/build/credentials/ios/actions/{SetupProvisioningProfile.js → SetUpProvisioningProfile.js} +5 -5
  74. package/build/credentials/ios/actions/{SetupPushKey.d.ts → SetUpPushKey.d.ts} +1 -1
  75. package/build/credentials/ios/actions/{SetupPushKey.js → SetUpPushKey.js} +3 -3
  76. package/build/credentials/ios/actions/SetUpSubmissionCredentials.d.ts +10 -0
  77. package/build/credentials/ios/actions/SetUpSubmissionCredentials.js +53 -0
  78. package/build/credentials/ios/actions/{SetupTargetBuildCredentials.d.ts → SetUpTargetBuildCredentials.d.ts} +1 -1
  79. package/build/credentials/ios/actions/{SetupTargetBuildCredentials.js → SetUpTargetBuildCredentials.js} +10 -10
  80. package/build/credentials/ios/actions/{SetupTargetBuildCredentialsFromCredentialsJson.d.ts → SetUpTargetBuildCredentialsFromCredentialsJson.d.ts} +1 -1
  81. package/build/credentials/ios/actions/{SetupTargetBuildCredentialsFromCredentialsJson.js → SetUpTargetBuildCredentialsFromCredentialsJson.js} +3 -3
  82. package/build/credentials/ios/api/GraphqlClient.d.ts +8 -2
  83. package/build/credentials/ios/api/GraphqlClient.js +74 -2
  84. package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.d.ts +5 -0
  85. package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.js +54 -0
  86. package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.d.ts +1 -0
  87. package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.js +25 -0
  88. package/build/credentials/ios/api/graphql/queries/AppQuery.js +3 -1
  89. package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.d.ts +4 -0
  90. package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.js +33 -0
  91. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +6 -2
  92. package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +7 -1
  93. package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +5 -1
  94. package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.js +2 -0
  95. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +5 -1
  96. package/build/credentials/ios/appstore/AppStoreApi.d.ts +1 -1
  97. package/build/credentials/ios/appstore/Credentials.types.d.ts +1 -0
  98. package/build/credentials/ios/appstore/ascApiKey.d.ts +1 -1
  99. package/build/credentials/ios/appstore/ascApiKey.js +22 -12
  100. package/build/credentials/ios/credentials.d.ts +2 -1
  101. package/build/credentials/ios/credentials.js +8 -3
  102. package/build/credentials/ios/utils/printCredentials.js +30 -1
  103. package/build/credentials/ios/validators/validateAscApiKey.d.ts +5 -0
  104. package/build/credentials/ios/validators/validateAscApiKey.js +21 -0
  105. package/build/credentials/manager/Actions.d.ts +52 -0
  106. package/build/credentials/manager/Actions.js +53 -0
  107. package/build/credentials/manager/AndroidActions.d.ts +6 -0
  108. package/build/credentials/manager/AndroidActions.js +114 -0
  109. package/build/credentials/manager/IosActions.d.ts +7 -0
  110. package/build/credentials/manager/IosActions.js +145 -0
  111. package/build/credentials/manager/ManageAndroid.d.ts +1 -29
  112. package/build/credentials/manager/ManageAndroid.js +30 -163
  113. package/build/credentials/manager/ManageIos.d.ts +1 -29
  114. package/build/credentials/manager/ManageIos.js +78 -166
  115. package/build/credentials/utils/promptForCredentials.d.ts +2 -1
  116. package/build/credentials/utils/promptForCredentials.js +3 -2
  117. package/build/graphql/client.d.ts +8 -2
  118. package/build/graphql/client.js +1 -1
  119. package/build/graphql/generated.d.ts +170 -33
  120. package/build/graphql/generated.js +23 -1
  121. package/build/graphql/queries/BuildQuery.js +4 -1
  122. package/build/graphql/queries/EnvironmentSecretsQuery.js +4 -2
  123. package/build/graphql/queries/ProjectQuery.js +3 -1
  124. package/build/graphql/queries/PublishQuery.js +4 -1
  125. package/build/graphql/queries/SubmissionQuery.js +5 -2
  126. package/build/graphql/queries/UserQuery.js +4 -1
  127. package/build/graphql/queries/WebhookQuery.js +6 -2
  128. package/build/graphql/types/Build.js +1 -6
  129. package/build/graphql/types/credentials/AppStoreConnectApiKey.d.ts +1 -0
  130. package/build/graphql/types/credentials/AppStoreConnectApiKey.js +23 -0
  131. package/build/graphql/types/credentials/IosAppCredentials.js +6 -0
  132. package/build/log.d.ts +0 -2
  133. package/build/log.js +2 -12
  134. package/build/project/projectUtils.js +1 -1
  135. package/build/project/publish.js +2 -2
  136. package/build/project/workflow.js +2 -2
  137. package/build/submit/ArchiveSource.js +6 -5
  138. package/build/submit/android/ServiceAccountSource.js +2 -2
  139. package/build/submit/ios/AppSpecificPasswordSource.d.ts +2 -6
  140. package/build/submit/ios/AppSpecificPasswordSource.js +0 -18
  141. package/build/submit/ios/AscApiKeySource.d.ts +9 -3
  142. package/build/submit/ios/AscApiKeySource.js +10 -10
  143. package/build/submit/ios/CredentialsServiceSource.d.ts +14 -0
  144. package/build/submit/ios/CredentialsServiceSource.js +46 -0
  145. package/build/submit/ios/IosSubmitCommand.js +22 -14
  146. package/build/submit/ios/IosSubmitter.d.ts +3 -0
  147. package/build/submit/ios/IosSubmitter.js +30 -20
  148. package/build/submit/utils/errors.js +2 -0
  149. package/build/user/User.js +1 -0
  150. package/build/utils/easCli.d.ts +1 -0
  151. package/build/utils/easCli.js +5 -0
  152. package/build/utils/{expoCommand.d.ts → expoCli.d.ts} +0 -0
  153. package/build/utils/{expoCommand.js → expoCli.js} +0 -0
  154. package/build/utils/profiles.js +9 -2
  155. package/build/vcs/clients/git.d.ts +26 -0
  156. package/build/vcs/clients/git.js +184 -0
  157. package/build/vcs/clients/gitNoCommit.d.ts +7 -0
  158. package/build/vcs/clients/gitNoCommit.js +27 -0
  159. package/build/vcs/clients/noVcs.d.ts +6 -0
  160. package/build/vcs/clients/noVcs.js +19 -0
  161. package/build/vcs/git.d.ts +10 -17
  162. package/build/vcs/git.js +7 -175
  163. package/build/vcs/index.d.ts +2 -2
  164. package/build/vcs/index.js +15 -6
  165. package/build/vcs/local.d.ts +18 -5
  166. package/build/vcs/local.js +61 -32
  167. package/build/vcs/vcs.d.ts +2 -1
  168. package/build/vcs/vcs.js +8 -4
  169. package/oclif.manifest.json +1 -1
  170. package/package.json +10 -10
@@ -12,12 +12,12 @@ const pushKey_1 = require("../appstore/pushKey");
12
12
  const credentials_1 = require("../credentials");
13
13
  const validatePushKey_1 = require("../validators/validatePushKey");
14
14
  const AppleTeamUtils_1 = require("./AppleTeamUtils");
15
- async function provideOrGeneratePushKeyAsync(ctx, accountName) {
15
+ async function provideOrGeneratePushKeyAsync(ctx) {
16
16
  if (!ctx.nonInteractive) {
17
17
  const userProvided = await promptForPushKeyAsync(ctx);
18
18
  if (userProvided) {
19
19
  if (!ctx.appStore.authCtx) {
20
- log_1.default.warn('Unable to validate push key due to insufficient Apple Credentials');
20
+ log_1.default.warn('Unable to validate push key, you are not authenticated with Apple.');
21
21
  return userProvided;
22
22
  }
23
23
  else {
@@ -32,11 +32,11 @@ async function provideOrGeneratePushKeyAsync(ctx, accountName) {
32
32
  if (useUserProvided) {
33
33
  return userProvided;
34
34
  }
35
- return await provideOrGeneratePushKeyAsync(ctx, accountName);
35
+ return await provideOrGeneratePushKeyAsync(ctx);
36
36
  }
37
37
  }
38
38
  }
39
- return await generatePushKeyAsync(ctx, accountName);
39
+ return await generatePushKeyAsync(ctx);
40
40
  }
41
41
  exports.provideOrGeneratePushKeyAsync = provideOrGeneratePushKeyAsync;
42
42
  async function promptForPushKeyAsync(ctx) {
@@ -58,7 +58,7 @@ async function promptForPushKeyAsync(ctx) {
58
58
  }
59
59
  return userProvided;
60
60
  }
61
- async function generatePushKeyAsync(ctx, accountName) {
61
+ async function generatePushKeyAsync(ctx) {
62
62
  await ctx.appStore.ensureAuthenticatedAsync();
63
63
  try {
64
64
  return await ctx.appStore.createPushKeyAsync();
@@ -94,7 +94,7 @@ async function generatePushKeyAsync(ctx, accountName) {
94
94
  throw e;
95
95
  }
96
96
  }
97
- return await generatePushKeyAsync(ctx, accountName);
97
+ return await generatePushKeyAsync(ctx);
98
98
  }
99
99
  function formatPushKeyFromApple(pushKey) {
100
100
  const { name, id } = pushKey;
@@ -0,0 +1,14 @@
1
+ import { AppStoreConnectApiKeyFragment } from '../../../graphql/generated';
2
+ import { Account } from '../../../user/Account';
3
+ import { CredentialsContext } from '../../context';
4
+ export declare class SelectAndRemoveAscApiKey {
5
+ private account;
6
+ constructor(account: Account);
7
+ runAsync(ctx: CredentialsContext): Promise<void>;
8
+ }
9
+ export declare class RemoveAscApiKey {
10
+ private account;
11
+ private ascApiKey;
12
+ constructor(account: Account, ascApiKey: AppStoreConnectApiKeyFragment);
13
+ runAsync(ctx: CredentialsContext): Promise<void>;
14
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RemoveAscApiKey = exports.SelectAndRemoveAscApiKey = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const log_1 = (0, tslib_1.__importDefault)(require("../../../log"));
6
+ const prompts_1 = require("../../../prompts");
7
+ const AscApiKeyUtils_1 = require("./AscApiKeyUtils");
8
+ class SelectAndRemoveAscApiKey {
9
+ constructor(account) {
10
+ this.account = account;
11
+ }
12
+ async runAsync(ctx) {
13
+ const selected = await (0, AscApiKeyUtils_1.selectAscApiKeysFromAccountAsync)(ctx, this.account);
14
+ if (selected) {
15
+ await new RemoveAscApiKey(this.account, selected).runAsync(ctx);
16
+ log_1.default.succeed('Removed App Store Connect Api Key');
17
+ log_1.default.newLine();
18
+ }
19
+ }
20
+ }
21
+ exports.SelectAndRemoveAscApiKey = SelectAndRemoveAscApiKey;
22
+ class RemoveAscApiKey {
23
+ constructor(account, ascApiKey) {
24
+ this.account = account;
25
+ this.ascApiKey = ascApiKey;
26
+ }
27
+ async runAsync(ctx) {
28
+ if (ctx.nonInteractive) {
29
+ throw new Error(`Cannot remove App Store Connect Api Keys in non-interactive mode.`);
30
+ }
31
+ // TODO(quin): add an extra edge on AppStoreConnectApiKey to find the apps using it
32
+ const confirm = await (0, prompts_1.confirmAsync)({
33
+ message: `Deleting this Api Key may affect your projects that rely on it. Do you want to continue?`,
34
+ });
35
+ if (!confirm) {
36
+ log_1.default.log('Aborting');
37
+ return;
38
+ }
39
+ log_1.default.log('Removing Api Key');
40
+ await ctx.ios.deleteAscApiKeyAsync(this.ascApiKey.id);
41
+ let shouldRevoke = false;
42
+ if (!ctx.nonInteractive) {
43
+ shouldRevoke = await (0, prompts_1.confirmAsync)({
44
+ message: `Do you also want to revoke this Api Key on the Apple Developer Portal?`,
45
+ });
46
+ }
47
+ else if (ctx.nonInteractive) {
48
+ log_1.default.log('Skipping Api Key revocation on the Apple Developer Portal.');
49
+ }
50
+ if (shouldRevoke) {
51
+ await ctx.appStore.revokeAscApiKeyAsync(this.ascApiKey.keyIdentifier);
52
+ }
53
+ }
54
+ }
55
+ exports.RemoveAscApiKey = RemoveAscApiKey;
@@ -1,7 +1,7 @@
1
1
  import { AppleDistributionCertificateFragment, IosAppBuildCredentialsFragment } from '../../../graphql/generated';
2
2
  import { CredentialsContext } from '../../context';
3
3
  import { AppLookupParams } from '../api/GraphqlClient';
4
- export declare class SetupAdhocProvisioningProfile {
4
+ export declare class SetUpAdhocProvisioningProfile {
5
5
  private app;
6
6
  constructor(app: AppLookupParams);
7
7
  runAsync(ctx: CredentialsContext): Promise<IosAppBuildCredentialsFragment>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.doUDIDsMatch = exports.SetupAdhocProvisioningProfile = void 0;
3
+ exports.doUDIDsMatch = exports.SetUpAdhocProvisioningProfile = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
6
6
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
@@ -15,19 +15,19 @@ const validateProvisioningProfile_1 = require("../validators/validateProvisionin
15
15
  const AppleTeamUtils_1 = require("./AppleTeamUtils");
16
16
  const BuildCredentialsUtils_1 = require("./BuildCredentialsUtils");
17
17
  const DeviceUtils_1 = require("./DeviceUtils");
18
- const SetupDistributionCertificate_1 = require("./SetupDistributionCertificate");
18
+ const SetUpDistributionCertificate_1 = require("./SetUpDistributionCertificate");
19
19
  var ReuseAction;
20
20
  (function (ReuseAction) {
21
21
  ReuseAction[ReuseAction["Yes"] = 0] = "Yes";
22
22
  ReuseAction[ReuseAction["ShowDevices"] = 1] = "ShowDevices";
23
23
  ReuseAction[ReuseAction["No"] = 2] = "No";
24
24
  })(ReuseAction || (ReuseAction = {}));
25
- class SetupAdhocProvisioningProfile {
25
+ class SetUpAdhocProvisioningProfile {
26
26
  constructor(app) {
27
27
  this.app = app;
28
28
  }
29
29
  async runAsync(ctx) {
30
- const distCert = await new SetupDistributionCertificate_1.SetupDistributionCertificate(this.app, generated_1.IosDistributionType.AdHoc).runAsync(ctx);
30
+ const distCert = await new SetUpDistributionCertificate_1.SetUpDistributionCertificate(this.app, generated_1.IosDistributionType.AdHoc).runAsync(ctx);
31
31
  const areBuildCredentialsSetup = await this.areBuildCredentialsSetupAsync(ctx);
32
32
  if (ctx.nonInteractive) {
33
33
  if (areBuildCredentialsSetup) {
@@ -195,7 +195,7 @@ class SetupAdhocProvisioningProfile {
195
195
  }
196
196
  }
197
197
  }
198
- exports.SetupAdhocProvisioningProfile = SetupAdhocProvisioningProfile;
198
+ exports.SetUpAdhocProvisioningProfile = SetUpAdhocProvisioningProfile;
199
199
  function doUDIDsMatch(udidsA, udidsB) {
200
200
  const setA = new Set(udidsA);
201
201
  const setB = new Set(udidsB);
@@ -0,0 +1,21 @@
1
+ import { CommonIosAppCredentialsFragment } from '../../../graphql/generated';
2
+ import { CredentialsContext } from '../../context';
3
+ import { AppLookupParams } from '../api/GraphqlClient';
4
+ import { AppStoreApiKeyPurpose } from './AscApiKeyUtils';
5
+ export declare enum SetupAscApiKeyChoice {
6
+ GENERATE = "GENERATE",
7
+ USE_EXISTING = "USE_EXISTING"
8
+ }
9
+ export declare class SetUpAscApiKey {
10
+ private app;
11
+ private purpose;
12
+ choices: {
13
+ title: string;
14
+ value: string;
15
+ }[];
16
+ constructor(app: AppLookupParams, purpose: AppStoreApiKeyPurpose);
17
+ runAsync(ctx: CredentialsContext): Promise<CommonIosAppCredentialsFragment>;
18
+ private doBestEffortAutoselectAsync;
19
+ private isAscApiKeySetupAsync;
20
+ private processChoicesAsync;
21
+ }
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SetUpAscApiKey = exports.SetupAscApiKeyChoice = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
6
+ const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
7
+ const log_1 = (0, tslib_1.__importDefault)(require("../../../log"));
8
+ const prompts_1 = require("../../../prompts");
9
+ const errors_1 = require("../../errors");
10
+ const validateAscApiKey_1 = require("../validators/validateAscApiKey");
11
+ const AscApiKeyUtils_1 = require("./AscApiKeyUtils");
12
+ const AssignAscApiKey_1 = require("./AssignAscApiKey");
13
+ const CreateAscApiKey_1 = require("./CreateAscApiKey");
14
+ var SetupAscApiKeyChoice;
15
+ (function (SetupAscApiKeyChoice) {
16
+ SetupAscApiKeyChoice["GENERATE"] = "GENERATE";
17
+ SetupAscApiKeyChoice["USE_EXISTING"] = "USE_EXISTING";
18
+ })(SetupAscApiKeyChoice = exports.SetupAscApiKeyChoice || (exports.SetupAscApiKeyChoice = {}));
19
+ class SetUpAscApiKey {
20
+ constructor(app, purpose) {
21
+ this.app = app;
22
+ this.purpose = purpose;
23
+ this.choices = [
24
+ {
25
+ title: '[Choose an existing ASC Api Key]',
26
+ value: SetupAscApiKeyChoice.USE_EXISTING,
27
+ },
28
+ { title: '[Add a new ASC Api Key]', value: SetupAscApiKeyChoice.GENERATE },
29
+ ];
30
+ }
31
+ async runAsync(ctx) {
32
+ const isKeySetup = await this.isAscApiKeySetupAsync(ctx, this.purpose);
33
+ if (isKeySetup) {
34
+ log_1.default.succeed('App Store Connect Api Key already set up.');
35
+ return (0, nullthrows_1.default)(await ctx.ios.getIosAppCredentialsWithCommonFieldsAsync(this.app), 'iosAppCredentials cannot be null if App Store Connect Api Key is already set up');
36
+ }
37
+ if (ctx.nonInteractive) {
38
+ throw new errors_1.MissingCredentialsNonInteractiveError('App Store Connect Api Keys cannot be set up in --non-interactive mode.');
39
+ }
40
+ const keysForAccount = await (0, AscApiKeyUtils_1.getAscApiKeysFromAccountAsync)(ctx, this.app.account, {
41
+ filterDifferentAppleTeam: true,
42
+ });
43
+ const maybeAutoselectedKey = await this.doBestEffortAutoselectAsync(ctx, keysForAccount);
44
+ if (maybeAutoselectedKey) {
45
+ return await new AssignAscApiKey_1.AssignAscApiKey(this.app).runAsync(ctx, maybeAutoselectedKey, this.purpose);
46
+ }
47
+ const availableChoices = keysForAccount.length === 0
48
+ ? this.choices.filter(choice => choice.value !== SetupAscApiKeyChoice.USE_EXISTING)
49
+ : this.choices;
50
+ const ascApiKey = await this.processChoicesAsync(ctx, this.purpose, availableChoices);
51
+ return await new AssignAscApiKey_1.AssignAscApiKey(this.app).runAsync(ctx, ascApiKey, this.purpose);
52
+ }
53
+ async doBestEffortAutoselectAsync(ctx, keysForAccount) {
54
+ if (!ctx.appStore.authCtx) {
55
+ return null;
56
+ }
57
+ if (keysForAccount.length === 0) {
58
+ return null;
59
+ }
60
+ // only provide autoselect if we can find a key that is certainly valid
61
+ const validKeys = await (0, validateAscApiKey_1.getValidAndTrackedAscApiKeysAsync)(ctx, keysForAccount);
62
+ if (validKeys.length === 0) {
63
+ return null;
64
+ }
65
+ const [autoselectedKey] = (0, AscApiKeyUtils_1.sortAscApiKeysByUpdatedAtDesc)(validKeys);
66
+ const useAutoselected = await (0, prompts_1.confirmAsync)({
67
+ message: `Reuse this App Store Connect Api Key?\n${(0, AscApiKeyUtils_1.formatAscApiKey)(autoselectedKey)}`,
68
+ });
69
+ if (useAutoselected) {
70
+ log_1.default.log(`Using App Store Connect Api Key with ID ${autoselectedKey.keyIdentifier}`);
71
+ return autoselectedKey;
72
+ }
73
+ else {
74
+ return null;
75
+ }
76
+ }
77
+ async isAscApiKeySetupAsync(ctx, purpose) {
78
+ const appCredentials = await ctx.ios.getIosAppCredentialsWithCommonFieldsAsync(this.app);
79
+ if (purpose !== AscApiKeyUtils_1.AppStoreApiKeyPurpose.SUBMISSION_SERVICE) {
80
+ throw new Error(`App Store Connect Api Key setup is not yet supported for ${purpose}.`);
81
+ }
82
+ return !!(appCredentials === null || appCredentials === void 0 ? void 0 : appCredentials.appStoreConnectApiKeyForSubmissions);
83
+ }
84
+ async processChoicesAsync(ctx, purpose, choices) {
85
+ (0, assert_1.default)(choices.length > 0, 'SetupAscApiKey: There must be at least one choice');
86
+ let choice;
87
+ if (choices.length === 1) {
88
+ choice = choices[0].value;
89
+ }
90
+ else {
91
+ const result = await (0, prompts_1.promptAsync)({
92
+ type: 'select',
93
+ name: 'choice',
94
+ message: 'Select what to use for your project:',
95
+ choices,
96
+ });
97
+ choice = result.choice;
98
+ }
99
+ if (choice === SetupAscApiKeyChoice.GENERATE) {
100
+ return await new CreateAscApiKey_1.CreateAscApiKey(this.app.account).runAsync(ctx, purpose);
101
+ }
102
+ else if (choice === SetupAscApiKeyChoice.USE_EXISTING) {
103
+ const selectedAscApiKey = await (0, AscApiKeyUtils_1.selectAscApiKeysFromAccountAsync)(ctx, this.app.account, {
104
+ filterDifferentAppleTeam: true,
105
+ });
106
+ if (!selectedAscApiKey) {
107
+ return await this.processChoicesAsync(ctx, purpose, choices);
108
+ }
109
+ return selectedAscApiKey;
110
+ }
111
+ throw new errors_1.UnsupportedCredentialsChoiceError(`AscApiKey Setup does not support choice:${choice}`, choice);
112
+ }
113
+ }
114
+ exports.SetUpAscApiKey = SetUpAscApiKey;
@@ -9,7 +9,7 @@ interface Options {
9
9
  enterpriseProvisioning?: IosEnterpriseProvisioning;
10
10
  iosCapabilitiesOptions?: IosCapabilitiesOptions;
11
11
  }
12
- export declare class SetupBuildCredentials {
12
+ export declare class SetUpBuildCredentials {
13
13
  private options;
14
14
  constructor(options: Options);
15
15
  runAsync(ctx: CredentialsContext): Promise<IosCredentials>;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SetupBuildCredentials = void 0;
3
+ exports.SetUpBuildCredentials = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
6
6
  const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
7
7
  const log_1 = (0, tslib_1.__importDefault)(require("../../../log"));
8
8
  const printCredentials_1 = require("../utils/printCredentials");
9
- const SetupTargetBuildCredentials_1 = require("./SetupTargetBuildCredentials");
10
- class SetupBuildCredentials {
9
+ const SetUpTargetBuildCredentials_1 = require("./SetUpTargetBuildCredentials");
10
+ class SetUpBuildCredentials {
11
11
  constructor(options) {
12
12
  this.options = options;
13
13
  }
@@ -35,7 +35,7 @@ class SetupBuildCredentials {
35
35
  else {
36
36
  log_1.default.newLine();
37
37
  }
38
- const action = new SetupTargetBuildCredentials_1.SetupTargetBuildCredentials({
38
+ const action = new SetUpTargetBuildCredentials_1.SetUpTargetBuildCredentials({
39
39
  ...this.options,
40
40
  app: {
41
41
  ...this.options.app,
@@ -53,7 +53,7 @@ class SetupBuildCredentials {
53
53
  return toIosCredentials(iosAppBuildCredentialsMap);
54
54
  }
55
55
  }
56
- exports.SetupBuildCredentials = SetupBuildCredentials;
56
+ exports.SetUpBuildCredentials = SetUpBuildCredentials;
57
57
  function toIosCredentials(appBuildCredentialsMap) {
58
58
  return Object.entries(appBuildCredentialsMap).reduce((acc, [targetName, appBuildCredentials]) => {
59
59
  var _a, _b, _c;
@@ -1,7 +1,7 @@
1
1
  import { IosDistributionType } from '../../../graphql/generated';
2
2
  import { CredentialsContext } from '../../context';
3
3
  import { App, Target } from '../types';
4
- export declare class SetupBuildCredentialsFromCredentialsJson {
4
+ export declare class SetUpBuildCredentialsFromCredentialsJson {
5
5
  private app;
6
6
  private targets;
7
7
  private distributionType;
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SetupBuildCredentialsFromCredentialsJson = void 0;
3
+ exports.SetUpBuildCredentialsFromCredentialsJson = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
6
6
  const log_1 = (0, tslib_1.__importDefault)(require("../../../log"));
7
7
  const target_1 = require("../../../project/ios/target");
8
8
  const read_1 = require("../../credentialsJson/read");
9
9
  const utils_1 = require("../../credentialsJson/utils");
10
- const SetupTargetBuildCredentialsFromCredentialsJson_1 = require("./SetupTargetBuildCredentialsFromCredentialsJson");
11
- class SetupBuildCredentialsFromCredentialsJson {
10
+ const SetUpTargetBuildCredentialsFromCredentialsJson_1 = require("./SetUpTargetBuildCredentialsFromCredentialsJson");
11
+ class SetUpBuildCredentialsFromCredentialsJson {
12
12
  constructor(app, targets, distributionType) {
13
13
  this.app = app;
14
14
  this.targets = targets;
@@ -24,7 +24,7 @@ class SetupBuildCredentialsFromCredentialsJson {
24
24
  log_1.default.log(`Setting up credentials for target ${chalk_1.default.bold(target.targetName)} (${target.bundleIdentifier})`);
25
25
  log_1.default.newLine();
26
26
  }
27
- await new SetupTargetBuildCredentialsFromCredentialsJson_1.SetupTargetBuildCredentialsFromCredentialsJson({
27
+ await new SetUpTargetBuildCredentialsFromCredentialsJson_1.SetUpTargetBuildCredentialsFromCredentialsJson({
28
28
  account: this.app.account,
29
29
  projectName: this.app.projectName,
30
30
  bundleIdentifier: target.bundleIdentifier,
@@ -43,4 +43,4 @@ class SetupBuildCredentialsFromCredentialsJson {
43
43
  }
44
44
  }
45
45
  }
46
- exports.SetupBuildCredentialsFromCredentialsJson = SetupBuildCredentialsFromCredentialsJson;
46
+ exports.SetUpBuildCredentialsFromCredentialsJson = SetUpBuildCredentialsFromCredentialsJson;
@@ -1,7 +1,7 @@
1
1
  import { AppleDistributionCertificate, AppleDistributionCertificateFragment, IosDistributionType } from '../../../graphql/generated';
2
2
  import { CredentialsContext } from '../../context';
3
3
  import { AppLookupParams } from '../api/GraphqlClient';
4
- export declare class SetupDistributionCertificate {
4
+ export declare class SetUpDistributionCertificate {
5
5
  private app;
6
6
  private distributionType;
7
7
  private validDistCerts?;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SetupDistributionCertificate = void 0;
3
+ exports.SetUpDistributionCertificate = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
6
6
  const log_1 = (0, tslib_1.__importDefault)(require("../../../log"));
@@ -12,7 +12,7 @@ const errors_2 = require("../errors");
12
12
  const AppleTeamUtils_1 = require("./AppleTeamUtils");
13
13
  const CreateDistributionCertificate_1 = require("./CreateDistributionCertificate");
14
14
  const DistributionCertificateUtils_1 = require("./DistributionCertificateUtils");
15
- class SetupDistributionCertificate {
15
+ class SetUpDistributionCertificate {
16
16
  constructor(app, distributionType) {
17
17
  this.app = app;
18
18
  this.distributionType = distributionType;
@@ -138,4 +138,4 @@ class SetupDistributionCertificate {
138
138
  return this.validDistCerts;
139
139
  }
140
140
  }
141
- exports.SetupDistributionCertificate = SetupDistributionCertificate;
141
+ exports.SetUpDistributionCertificate = SetUpDistributionCertificate;
@@ -8,7 +8,7 @@ import { AppLookupParams } from '../api/GraphqlClient';
8
8
  * to choose if they want to set up an adhoc or universal distribution provisioning profile. Otherwise, always
9
9
  * set up an adhoc provisioning profile.
10
10
  */
11
- export declare class SetupInternalProvisioningProfile {
11
+ export declare class SetUpInternalProvisioningProfile {
12
12
  private app;
13
13
  constructor(app: AppLookupParams);
14
14
  runAsync(ctx: CredentialsContext): Promise<IosAppBuildCredentialsFragment>;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SetupInternalProvisioningProfile = void 0;
3
+ exports.SetUpInternalProvisioningProfile = 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"));
7
7
  const prompts_1 = require("../../../prompts");
8
8
  const BuildCredentialsUtils_1 = require("./BuildCredentialsUtils");
9
- const SetupAdhocProvisioningProfile_1 = require("./SetupAdhocProvisioningProfile");
10
- const SetupProvisioningProfile_1 = require("./SetupProvisioningProfile");
9
+ const SetUpAdhocProvisioningProfile_1 = require("./SetUpAdhocProvisioningProfile");
10
+ const SetUpProvisioningProfile_1 = require("./SetUpProvisioningProfile");
11
11
  /**
12
12
  * It's used when setting up credentials for internal distribution but `enterpriseProvisioning` is not set.
13
13
  *
@@ -15,7 +15,7 @@ const SetupProvisioningProfile_1 = require("./SetupProvisioningProfile");
15
15
  * to choose if they want to set up an adhoc or universal distribution provisioning profile. Otherwise, always
16
16
  * set up an adhoc provisioning profile.
17
17
  */
18
- class SetupInternalProvisioningProfile {
18
+ class SetUpInternalProvisioningProfile {
19
19
  constructor(app) {
20
20
  this.app = app;
21
21
  }
@@ -70,10 +70,10 @@ class SetupInternalProvisioningProfile {
70
70
  }
71
71
  }
72
72
  async setupAdhocProvisioningProfileAsync(ctx) {
73
- return await new SetupAdhocProvisioningProfile_1.SetupAdhocProvisioningProfile(this.app).runAsync(ctx);
73
+ return await new SetUpAdhocProvisioningProfile_1.SetUpAdhocProvisioningProfile(this.app).runAsync(ctx);
74
74
  }
75
75
  async setupUniversalProvisioningProfileAsync(ctx) {
76
- return await new SetupProvisioningProfile_1.SetupProvisioningProfile(this.app, generated_1.IosDistributionType.Enterprise).runAsync(ctx);
76
+ return await new SetUpProvisioningProfile_1.SetUpProvisioningProfile(this.app, generated_1.IosDistributionType.Enterprise).runAsync(ctx);
77
77
  }
78
78
  async askForDistributionTypeAndSetupAsync(ctx, message) {
79
79
  const { distributionType } = await (0, prompts_1.promptAsync)({
@@ -93,4 +93,4 @@ class SetupInternalProvisioningProfile {
93
93
  }
94
94
  }
95
95
  }
96
- exports.SetupInternalProvisioningProfile = SetupInternalProvisioningProfile;
96
+ exports.SetUpInternalProvisioningProfile = SetUpInternalProvisioningProfile;
@@ -4,7 +4,7 @@ import { AppLookupParams } from '../api/GraphqlClient';
4
4
  /**
5
5
  * Sets up either APP_STORE or ENTERPRISE provisioning profiles
6
6
  */
7
- export declare class SetupProvisioningProfile {
7
+ export declare class SetUpProvisioningProfile {
8
8
  private app;
9
9
  private distributionType;
10
10
  constructor(app: AppLookupParams, distributionType: IosDistributionType);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SetupProvisioningProfile = void 0;
3
+ exports.SetUpProvisioningProfile = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
6
6
  const prompts_1 = require("../../../prompts");
@@ -10,11 +10,11 @@ const BuildCredentialsUtils_1 = require("./BuildCredentialsUtils");
10
10
  const ConfigureProvisioningProfile_1 = require("./ConfigureProvisioningProfile");
11
11
  const CreateProvisioningProfile_1 = require("./CreateProvisioningProfile");
12
12
  const ProvisioningProfileUtils_1 = require("./ProvisioningProfileUtils");
13
- const SetupDistributionCertificate_1 = require("./SetupDistributionCertificate");
13
+ const SetUpDistributionCertificate_1 = require("./SetUpDistributionCertificate");
14
14
  /**
15
15
  * Sets up either APP_STORE or ENTERPRISE provisioning profiles
16
16
  */
17
- class SetupProvisioningProfile {
17
+ class SetUpProvisioningProfile {
18
18
  constructor(app, distributionType) {
19
19
  this.app = app;
20
20
  this.distributionType = distributionType;
@@ -42,7 +42,7 @@ class SetupProvisioningProfile {
42
42
  return await (0, BuildCredentialsUtils_1.assignBuildCredentialsAsync)(ctx, this.app, this.distributionType, distCert, updatedProvisioningProfile);
43
43
  }
44
44
  async runAsync(ctx) {
45
- const distCert = await new SetupDistributionCertificate_1.SetupDistributionCertificate(this.app, this.distributionType).runAsync(ctx);
45
+ const distCert = await new SetUpDistributionCertificate_1.SetUpDistributionCertificate(this.app, this.distributionType).runAsync(ctx);
46
46
  const areBuildCredentialsSetup = await this.areBuildCredentialsSetupAsync(ctx);
47
47
  if (areBuildCredentialsSetup) {
48
48
  return (0, nullthrows_1.default)(await (0, BuildCredentialsUtils_1.getBuildCredentialsAsync)(ctx, this.app, this.distributionType));
@@ -82,4 +82,4 @@ class SetupProvisioningProfile {
82
82
  : currentProfile.provisioningProfile === profile.provisioningProfile)) !== null && _a !== void 0 ? _a : null);
83
83
  }
84
84
  }
85
- exports.SetupProvisioningProfile = SetupProvisioningProfile;
85
+ exports.SetUpProvisioningProfile = SetUpProvisioningProfile;
@@ -1,7 +1,7 @@
1
1
  import { CommonIosAppCredentialsFragment } from '../../../graphql/generated';
2
2
  import { CredentialsContext } from '../../context';
3
3
  import { AppLookupParams } from '../api/GraphqlClient';
4
- export declare class SetupPushKey {
4
+ export declare class SetUpPushKey {
5
5
  private app;
6
6
  constructor(app: AppLookupParams);
7
7
  isPushKeySetupAsync(ctx: CredentialsContext): Promise<boolean>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SetupPushKey = void 0;
3
+ exports.SetUpPushKey = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
6
6
  const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
@@ -9,7 +9,7 @@ const prompts_1 = require("../../../prompts");
9
9
  const AssignPushKey_1 = require("./AssignPushKey");
10
10
  const CreatePushKey_1 = require("./CreatePushKey");
11
11
  const PushKeyUtils_1 = require("./PushKeyUtils");
12
- class SetupPushKey {
12
+ class SetUpPushKey {
13
13
  constructor(app) {
14
14
  this.app = app;
15
15
  }
@@ -74,4 +74,4 @@ class SetupPushKey {
74
74
  }
75
75
  }
76
76
  }
77
- exports.SetupPushKey = SetupPushKey;
77
+ exports.SetUpPushKey = SetUpPushKey;
@@ -0,0 +1,10 @@
1
+ import { CommonIosAppCredentialsFragment } from '../../../graphql/generated';
2
+ import { CredentialsContext } from '../../context';
3
+ import { AppLookupParams } from '../api/GraphqlClient';
4
+ export declare const PROMPT_FOR_APP_SPECIFIC_PASSWORD = "PROMPT_FOR_APP_SPECIFIC_PASSWORD";
5
+ export declare class SetUpSubmissionCredentials {
6
+ private setupAscApiKeyAction;
7
+ constructor(app: AppLookupParams);
8
+ runAsync(ctx: CredentialsContext): Promise<CommonIosAppCredentialsFragment | string>;
9
+ promptForAppSpecificPasswordAsync(): Promise<string>;
10
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SetUpSubmissionCredentials = exports.PROMPT_FOR_APP_SPECIFIC_PASSWORD = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
6
+ const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
7
+ const wrap_ansi_1 = (0, tslib_1.__importDefault)(require("wrap-ansi"));
8
+ const log_1 = (0, tslib_1.__importStar)(require("../../../log"));
9
+ const prompts_1 = require("../../../prompts");
10
+ const errors_1 = require("../../errors");
11
+ const AscApiKeyUtils_1 = require("./AscApiKeyUtils");
12
+ const SetUpAscApiKey_1 = require("./SetUpAscApiKey");
13
+ exports.PROMPT_FOR_APP_SPECIFIC_PASSWORD = 'PROMPT_FOR_APP_SPECIFIC_PASSWORD';
14
+ class SetUpSubmissionCredentials {
15
+ constructor(app) {
16
+ this.setupAscApiKeyAction = new SetUpAscApiKey_1.SetUpAscApiKey(app, AscApiKeyUtils_1.AppStoreApiKeyPurpose.SUBMISSION_SERVICE);
17
+ // Add this unrelated choice to ASC Api Key setup for legacy purposes -- we will deprecate it soon
18
+ this.setupAscApiKeyAction.choices = this.setupAscApiKeyAction.choices.concat({
19
+ title: '[Enter an App Specific Password]',
20
+ value: exports.PROMPT_FOR_APP_SPECIFIC_PASSWORD,
21
+ });
22
+ }
23
+ async runAsync(ctx) {
24
+ try {
25
+ const iosAppCredentials = await this.setupAscApiKeyAction.runAsync(ctx);
26
+ const { keyIdentifier, name } = (0, nullthrows_1.default)(iosAppCredentials.appStoreConnectApiKeyForSubmissions, 'ASC Api Key must be defined for EAS Submit');
27
+ log_1.default.log(`Using Api Key ID: ${keyIdentifier}${name ? ` (${name})` : ''}`);
28
+ return iosAppCredentials;
29
+ }
30
+ catch (e) {
31
+ if (e instanceof errors_1.UnsupportedCredentialsChoiceError) {
32
+ if (e.choice === exports.PROMPT_FOR_APP_SPECIFIC_PASSWORD) {
33
+ return await this.promptForAppSpecificPasswordAsync();
34
+ }
35
+ }
36
+ throw e;
37
+ }
38
+ }
39
+ async promptForAppSpecificPasswordAsync() {
40
+ log_1.default.addNewLineIfNone();
41
+ log_1.default.log(`Please enter your Apple app-specific password.`);
42
+ log_1.default.log((0, log_1.learnMore)('https://expo.fyi/apple-app-specific-password'));
43
+ log_1.default.warn((0, wrap_ansi_1.default)(`This option will be deprecated soon. You will still be able to provide your password with the ${chalk_1.default.bold('EXPO_APPLE_APP_SPECIFIC_PASSWORD')} environment variable.`, process.stdout.columns || 80));
44
+ const { appSpecificPassword } = await (0, prompts_1.promptAsync)({
45
+ name: 'appSpecificPassword',
46
+ message: 'Your Apple app-specific password:',
47
+ type: 'password',
48
+ validate: (val) => val !== '' || 'Apple app-specific password cannot be empty!',
49
+ });
50
+ return appSpecificPassword;
51
+ }
52
+ }
53
+ exports.SetUpSubmissionCredentials = SetUpSubmissionCredentials;
@@ -9,7 +9,7 @@ interface Options {
9
9
  enterpriseProvisioning?: IosEnterpriseProvisioning;
10
10
  iosCapabilitiesOptions?: IosCapabilitiesOptions;
11
11
  }
12
- export declare class SetupTargetBuildCredentials {
12
+ export declare class SetUpTargetBuildCredentials {
13
13
  private options;
14
14
  constructor(options: Options);
15
15
  runAsync(ctx: CredentialsContext): Promise<IosAppBuildCredentialsFragment>;