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.
Files changed (152) hide show
  1. package/README.md +27 -27
  2. package/build/analytics/common.d.ts +8 -0
  3. package/build/analytics/common.js +19 -0
  4. package/build/analytics/events.d.ts +43 -0
  5. package/build/analytics/events.js +51 -0
  6. package/build/{analytics.d.ts → analytics/rudderstackClient.d.ts} +0 -0
  7. package/build/{analytics.js → analytics/rudderstackClient.js} +2 -2
  8. package/build/api.js +3 -3
  9. package/build/build/build.js +18 -27
  10. package/build/build/context.d.ts +1 -1
  11. package/build/build/context.js +2 -2
  12. package/build/build/ios/UpdatesModule.js +3 -2
  13. package/build/build/ios/credentials.js +3 -3
  14. package/build/build/ios/version.js +7 -3
  15. package/build/build/local.js +18 -27
  16. package/build/build/types.d.ts +0 -1
  17. package/build/build/utils/devClient.d.ts +1 -2
  18. package/build/build/utils/formatBuild.js +1 -9
  19. package/build/build/utils/repository.js +1 -0
  20. package/build/build/utils/url.js +1 -1
  21. package/build/commandUtils/EasCommand.js +4 -4
  22. package/build/commands/branch/publish.js +24 -2
  23. package/build/commands/build/index.js +15 -12
  24. package/build/commands/channel/create.d.ts +6 -0
  25. package/build/commands/channel/create.js +2 -0
  26. package/build/commands/secret/create.js +0 -6
  27. package/build/commands/secret/delete.js +1 -7
  28. package/build/commands/secret/list.js +0 -6
  29. package/build/commands/submit.js +2 -11
  30. package/build/credentials/android/AndroidCredentialsProvider.js +2 -2
  31. package/build/credentials/android/actions/RemoveFcm.js +4 -4
  32. package/build/credentials/android/actions/{SetupBuildCredentials.d.ts → SetUpBuildCredentials.d.ts} +1 -1
  33. package/build/credentials/android/actions/{SetupBuildCredentials.js → SetUpBuildCredentials.js} +3 -3
  34. package/build/credentials/android/actions/{SetupBuildCredentialsFromCredentialsJson.d.ts → SetUpBuildCredentialsFromCredentialsJson.d.ts} +1 -1
  35. package/build/credentials/android/actions/{SetupBuildCredentialsFromCredentialsJson.js → SetUpBuildCredentialsFromCredentialsJson.js} +3 -3
  36. package/build/credentials/android/actions/{SetupGoogleServiceAccountKey.d.ts → SetUpGoogleServiceAccountKey.d.ts} +1 -1
  37. package/build/credentials/android/actions/{SetupGoogleServiceAccountKey.js → SetUpGoogleServiceAccountKey.js} +3 -3
  38. package/build/credentials/android/utils/keystore.js +67 -32
  39. package/build/credentials/errors.d.ts +4 -0
  40. package/build/credentials/errors.js +8 -1
  41. package/build/credentials/ios/IosCredentialsProvider.js +4 -4
  42. package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +17 -1
  43. package/build/credentials/ios/actions/AscApiKeyUtils.js +158 -24
  44. package/build/credentials/ios/actions/AssignAscApiKey.d.ts +9 -0
  45. package/build/credentials/ios/actions/AssignAscApiKey.js +29 -0
  46. package/build/credentials/ios/actions/CreateAscApiKey.d.ts +9 -0
  47. package/build/credentials/ios/actions/CreateAscApiKey.js +21 -0
  48. package/build/credentials/ios/actions/DistributionCertificateUtils.js +1 -1
  49. package/build/credentials/ios/actions/PushKeyUtils.js +1 -1
  50. package/build/credentials/ios/actions/RemoveAscApiKey.d.ts +14 -0
  51. package/build/credentials/ios/actions/RemoveAscApiKey.js +55 -0
  52. package/build/credentials/ios/actions/{SetupAdhocProvisioningProfile.d.ts → SetUpAdhocProvisioningProfile.d.ts} +1 -1
  53. package/build/credentials/ios/actions/{SetupAdhocProvisioningProfile.js → SetUpAdhocProvisioningProfile.js} +5 -5
  54. package/build/credentials/ios/actions/SetUpAscApiKey.d.ts +21 -0
  55. package/build/credentials/ios/actions/SetUpAscApiKey.js +114 -0
  56. package/build/credentials/ios/actions/{SetupBuildCredentials.d.ts → SetUpBuildCredentials.d.ts} +1 -1
  57. package/build/credentials/ios/actions/{SetupBuildCredentials.js → SetUpBuildCredentials.js} +5 -5
  58. package/build/credentials/ios/actions/{SetupBuildCredentialsFromCredentialsJson.d.ts → SetUpBuildCredentialsFromCredentialsJson.d.ts} +1 -1
  59. package/build/credentials/ios/actions/{SetupBuildCredentialsFromCredentialsJson.js → SetUpBuildCredentialsFromCredentialsJson.js} +5 -5
  60. package/build/credentials/ios/actions/{SetupDistributionCertificate.d.ts → SetUpDistributionCertificate.d.ts} +1 -1
  61. package/build/credentials/ios/actions/{SetupDistributionCertificate.js → SetUpDistributionCertificate.js} +3 -3
  62. package/build/credentials/ios/actions/{SetupInternalProvisioningProfile.d.ts → SetUpInternalProvisioningProfile.d.ts} +1 -1
  63. package/build/credentials/ios/actions/{SetupInternalProvisioningProfile.js → SetUpInternalProvisioningProfile.js} +7 -7
  64. package/build/credentials/ios/actions/{SetupProvisioningProfile.d.ts → SetUpProvisioningProfile.d.ts} +1 -1
  65. package/build/credentials/ios/actions/{SetupProvisioningProfile.js → SetUpProvisioningProfile.js} +5 -5
  66. package/build/credentials/ios/actions/{SetupPushKey.d.ts → SetUpPushKey.d.ts} +1 -1
  67. package/build/credentials/ios/actions/{SetupPushKey.js → SetUpPushKey.js} +3 -3
  68. package/build/credentials/ios/actions/SetUpSubmissionCredentials.d.ts +10 -0
  69. package/build/credentials/ios/actions/SetUpSubmissionCredentials.js +53 -0
  70. package/build/credentials/ios/actions/{SetupTargetBuildCredentials.d.ts → SetUpTargetBuildCredentials.d.ts} +1 -1
  71. package/build/credentials/ios/actions/{SetupTargetBuildCredentials.js → SetUpTargetBuildCredentials.js} +10 -10
  72. package/build/credentials/ios/actions/{SetupTargetBuildCredentialsFromCredentialsJson.d.ts → SetUpTargetBuildCredentialsFromCredentialsJson.d.ts} +1 -1
  73. package/build/credentials/ios/actions/{SetupTargetBuildCredentialsFromCredentialsJson.js → SetUpTargetBuildCredentialsFromCredentialsJson.js} +3 -3
  74. package/build/credentials/ios/api/GraphqlClient.d.ts +8 -2
  75. package/build/credentials/ios/api/GraphqlClient.js +74 -2
  76. package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.d.ts +5 -0
  77. package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.js +54 -0
  78. package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.d.ts +1 -0
  79. package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.js +25 -0
  80. package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.d.ts +4 -0
  81. package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.js +33 -0
  82. package/build/credentials/ios/appstore/AppStoreApi.d.ts +1 -1
  83. package/build/credentials/ios/appstore/Credentials.types.d.ts +1 -0
  84. package/build/credentials/ios/appstore/ascApiKey.d.ts +1 -1
  85. package/build/credentials/ios/appstore/ascApiKey.js +11 -1
  86. package/build/credentials/ios/appstore/entitlements.d.ts +2 -2
  87. package/build/credentials/ios/appstore/entitlements.js +28 -21
  88. package/build/credentials/ios/credentials.d.ts +2 -1
  89. package/build/credentials/ios/credentials.js +7 -2
  90. package/build/credentials/ios/utils/printCredentials.js +1 -1
  91. package/build/credentials/ios/validators/validateAscApiKey.d.ts +5 -0
  92. package/build/credentials/ios/validators/validateAscApiKey.js +21 -0
  93. package/build/credentials/manager/Actions.d.ts +20 -15
  94. package/build/credentials/manager/Actions.js +20 -15
  95. package/build/credentials/manager/AndroidActions.js +6 -6
  96. package/build/credentials/manager/IosActions.d.ts +1 -0
  97. package/build/credentials/manager/IosActions.js +40 -5
  98. package/build/credentials/manager/ManageAndroid.js +6 -6
  99. package/build/credentials/manager/ManageIos.js +56 -17
  100. package/build/credentials/utils/promptForCredentials.d.ts +2 -1
  101. package/build/credentials/utils/promptForCredentials.js +3 -2
  102. package/build/graphql/client.js +1 -1
  103. package/build/graphql/generated.d.ts +208 -55
  104. package/build/graphql/mutations/KeystoreGenerationUrlMutation.d.ts +3 -0
  105. package/build/graphql/mutations/KeystoreGenerationUrlMutation.js +23 -0
  106. package/build/graphql/types/Build.js +1 -6
  107. package/build/project/android/applicationId.d.ts +6 -0
  108. package/build/project/android/applicationId.js +39 -29
  109. package/build/project/android/gradle.js +3 -2
  110. package/build/project/android/gradleUtils.d.ts +1 -0
  111. package/build/project/ios/bundleIdentifier.d.ts +6 -1
  112. package/build/project/ios/bundleIdentifier.js +29 -18
  113. package/build/submit/ArchiveSource.js +2 -1
  114. package/build/submit/BaseSubmitter.d.ts +20 -4
  115. package/build/submit/BaseSubmitter.js +34 -1
  116. package/build/submit/android/AndroidSubmitCommand.d.ts +1 -2
  117. package/build/submit/android/AndroidSubmitCommand.js +22 -35
  118. package/build/submit/android/AndroidSubmitter.d.ts +12 -8
  119. package/build/submit/android/AndroidSubmitter.js +30 -21
  120. package/build/submit/android/ServiceAccountSource.d.ts +3 -2
  121. package/build/submit/android/ServiceAccountSource.js +18 -6
  122. package/build/submit/context.d.ts +2 -0
  123. package/build/submit/context.js +14 -0
  124. package/build/submit/ios/AppSpecificPasswordSource.d.ts +9 -6
  125. package/build/submit/ios/AppSpecificPasswordSource.js +42 -20
  126. package/build/submit/ios/AscApiKeySource.d.ts +9 -3
  127. package/build/submit/ios/AscApiKeySource.js +10 -10
  128. package/build/submit/ios/CredentialsServiceSource.d.ts +18 -0
  129. package/build/submit/ios/CredentialsServiceSource.js +63 -0
  130. package/build/submit/ios/IosSubmitCommand.d.ts +2 -2
  131. package/build/submit/ios/IosSubmitCommand.js +56 -56
  132. package/build/submit/ios/IosSubmitter.d.ts +20 -7
  133. package/build/submit/ios/IosSubmitter.js +79 -43
  134. package/build/submit/submit.js +13 -4
  135. package/build/submit/utils/errors.js +2 -0
  136. package/build/user/User.js +1 -1
  137. package/build/{build/ios → utils}/plist.d.ts +1 -1
  138. package/build/{build/ios → utils}/plist.js +8 -2
  139. package/build/utils/profiles.d.ts +9 -4
  140. package/build/utils/profiles.js +14 -7
  141. package/build/vcs/clients/git.d.ts +2 -1
  142. package/build/vcs/clients/git.js +83 -5
  143. package/build/vcs/vcs.d.ts +4 -3
  144. package/build/vcs/vcs.js +3 -3
  145. package/oclif.manifest.json +1 -1
  146. package/package.json +4 -4
  147. package/build/build/utils/analytics.d.ts +0 -22
  148. package/build/build/utils/analytics.js +0 -28
  149. package/build/project/isEasEnabledForProject.d.ts +0 -8
  150. package/build/project/isEasEnabledForProject.js +0 -33
  151. package/build/submit/android/AndroidPackageSource.d.ts +0 -17
  152. package/build/submit/android/AndroidPackageSource.js +0 -27
@@ -3,32 +3,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.generateRandomKeystoreAsync = exports.keytoolCommandExistsAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const spawn_async_1 = (0, tslib_1.__importDefault)(require("@expo/spawn-async"));
6
+ const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
6
7
  const crypto_1 = (0, tslib_1.__importDefault)(require("crypto"));
7
8
  const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
9
+ // (dsokal) We actually want to use node-fetch but the change is in progress.
10
+ // See https://github.com/expo/eas-cli/issues/32 for context.
11
+ // eslint-disable-next-line no-restricted-imports
12
+ const node_fetch_1 = (0, tslib_1.__importDefault)(require("node-fetch"));
8
13
  const path_1 = (0, tslib_1.__importDefault)(require("path"));
9
14
  const uuid_1 = require("uuid");
10
- const analytics_1 = (0, tslib_1.__importStar)(require("../../../build/utils/analytics"));
15
+ const events_1 = require("../../../analytics/events");
11
16
  const generated_1 = require("../../../graphql/generated");
17
+ const KeystoreGenerationUrlMutation_1 = require("../../../graphql/mutations/KeystoreGenerationUrlMutation");
12
18
  const log_1 = (0, tslib_1.__importDefault)(require("../../../log"));
19
+ const ora_1 = require("../../../ora");
13
20
  const paths_1 = require("../../../utils/paths");
14
21
  async function keytoolCommandExistsAsync() {
15
22
  try {
16
23
  await (0, spawn_async_1.default)('keytool');
24
+ return true;
17
25
  }
18
26
  catch (error) {
19
27
  return false;
20
28
  }
21
- return true;
22
29
  }
23
30
  exports.keytoolCommandExistsAsync = keytoolCommandExistsAsync;
24
- async function ensureKeytoolCommandExistsAsync() {
25
- if (!(await keytoolCommandExistsAsync())) {
26
- log_1.default.error('keytool is required to run this command, make sure you have it installed?');
27
- log_1.default.warn('keytool is a part of OpenJDK: https://openjdk.java.net/');
28
- log_1.default.warn('Also make sure that keytool is in your PATH after installation.');
29
- throw new Error('keytool not found');
30
- }
31
- }
32
31
  var KeystoreCreateStep;
33
32
  (function (KeystoreCreateStep) {
34
33
  KeystoreCreateStep["Attempt"] = "attempt";
@@ -44,17 +43,38 @@ async function generateRandomKeystoreAsync(projectId) {
44
43
  return await createKeystoreAsync(keystoreData, projectId);
45
44
  }
46
45
  exports.generateRandomKeystoreAsync = generateRandomKeystoreAsync;
47
- async function createKeystoreAsync(credentials, projectId) {
48
- analytics_1.default.logEvent(analytics_1.Event.ANDROID_KEYSTORE_CREATE, {
46
+ async function createKeystoreAsync(keystoreParams, projectId) {
47
+ events_1.Analytics.logEvent(events_1.BuildEvent.ANDROID_KEYSTORE_CREATE, {
49
48
  project_id: projectId,
50
49
  step: KeystoreCreateStep.Attempt,
51
50
  type: generated_1.AndroidKeystoreType.Jks,
52
51
  });
53
52
  try {
54
- await ensureKeytoolCommandExistsAsync();
53
+ let keystore;
54
+ let localAttempt = false;
55
+ if (await keytoolCommandExistsAsync()) {
56
+ try {
57
+ localAttempt = true;
58
+ keystore = await createKeystoreLocallyAsync(keystoreParams);
59
+ }
60
+ catch {
61
+ log_1.default.error('Failed to generate keystore locally. Falling back to cloud generation.');
62
+ }
63
+ }
64
+ if (!keystore) {
65
+ keystore = await createKeystoreInCloudAsync(keystoreParams, {
66
+ showKeytoolDetectionMsg: !localAttempt,
67
+ });
68
+ }
69
+ events_1.Analytics.logEvent(events_1.BuildEvent.ANDROID_KEYSTORE_CREATE, {
70
+ project_id: projectId,
71
+ step: KeystoreCreateStep.Success,
72
+ type: generated_1.AndroidKeystoreType.Jks,
73
+ });
74
+ return keystore;
55
75
  }
56
76
  catch (error) {
57
- analytics_1.default.logEvent(analytics_1.Event.ANDROID_KEYSTORE_CREATE, {
77
+ events_1.Analytics.logEvent(events_1.BuildEvent.ANDROID_KEYSTORE_CREATE, {
58
78
  project_id: projectId,
59
79
  step: KeystoreCreateStep.Fail,
60
80
  reason: error.message,
@@ -62,6 +82,8 @@ async function createKeystoreAsync(credentials, projectId) {
62
82
  });
63
83
  throw error;
64
84
  }
85
+ }
86
+ async function createKeystoreLocallyAsync(keystoreParams) {
65
87
  await fs_extra_1.default.mkdirp((0, paths_1.getTmpDirectory)());
66
88
  const keystorePath = path_1.default.join((0, paths_1.getTmpDirectory)(), `${(0, uuid_1.v4)()}-keystore.jks`);
67
89
  try {
@@ -71,13 +93,13 @@ async function createKeystoreAsync(credentials, projectId) {
71
93
  '-storetype',
72
94
  'JKS',
73
95
  '-storepass',
74
- credentials.keystorePassword,
96
+ keystoreParams.keystorePassword,
75
97
  '-keypass',
76
- credentials.keyPassword,
98
+ keystoreParams.keyPassword,
77
99
  '-keystore',
78
100
  keystorePath,
79
101
  '-alias',
80
- credentials.keyAlias,
102
+ keystoreParams.keyAlias,
81
103
  '-keyalg',
82
104
  'RSA',
83
105
  '-keysize',
@@ -87,27 +109,40 @@ async function createKeystoreAsync(credentials, projectId) {
87
109
  '-dname',
88
110
  `CN=,OU=,O=,L=,S=,C=US`,
89
111
  ]);
90
- analytics_1.default.logEvent(analytics_1.Event.ANDROID_KEYSTORE_CREATE, {
91
- project_id: projectId,
92
- step: KeystoreCreateStep.Success,
93
- type: generated_1.AndroidKeystoreType.Jks,
94
- });
95
112
  return {
96
- ...credentials,
113
+ ...keystoreParams,
97
114
  keystore: await fs_extra_1.default.readFile(keystorePath, 'base64'),
98
115
  type: generated_1.AndroidKeystoreType.Jks,
99
116
  };
100
117
  }
101
- catch (error) {
102
- analytics_1.default.logEvent(analytics_1.Event.ANDROID_KEYSTORE_CREATE, {
103
- project_id: projectId,
104
- step: KeystoreCreateStep.Fail,
105
- reason: error.message,
106
- type: generated_1.AndroidKeystoreType.Jks,
107
- });
108
- throw error;
109
- }
110
118
  finally {
111
119
  await fs_extra_1.default.remove(keystorePath);
112
120
  }
113
121
  }
122
+ async function createKeystoreInCloudAsync(keystoreParams, { showKeytoolDetectionMsg = true } = {}) {
123
+ if (showKeytoolDetectionMsg) {
124
+ log_1.default.log(`Detected that you do not have ${chalk_1.default.bold('keytool')} installed locally.`);
125
+ }
126
+ const spinner = (0, ora_1.ora)('Generating keystore in the cloud...').start();
127
+ try {
128
+ const url = await KeystoreGenerationUrlMutation_1.KeystoreGenerationUrlMutation.createKeystoreGenerationUrlAsync();
129
+ const response = await (0, node_fetch_1.default)(url, {
130
+ method: 'POST',
131
+ body: JSON.stringify(keystoreParams),
132
+ headers: { 'Content-Type': 'application/json' },
133
+ });
134
+ const result = await response.json();
135
+ spinner.succeed();
136
+ return {
137
+ type: generated_1.AndroidKeystoreType.Jks,
138
+ keystore: result.keystoreBase64,
139
+ keystorePassword: result.keystorePassword,
140
+ keyAlias: result.keyAlias,
141
+ keyPassword: result.keyPassword,
142
+ };
143
+ }
144
+ catch (err) {
145
+ spinner.fail();
146
+ throw err;
147
+ }
148
+ }
@@ -4,3 +4,7 @@ export declare class MissingCredentialsNonInteractiveError extends Error {
4
4
  export declare class MissingCredentialsError extends Error {
5
5
  constructor(message?: string);
6
6
  }
7
+ export declare class UnsupportedCredentialsChoiceError extends Error {
8
+ choice: string;
9
+ constructor(message: string, choice: string);
10
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MissingCredentialsError = exports.MissingCredentialsNonInteractiveError = void 0;
3
+ exports.UnsupportedCredentialsChoiceError = exports.MissingCredentialsError = exports.MissingCredentialsNonInteractiveError = void 0;
4
4
  class MissingCredentialsNonInteractiveError extends Error {
5
5
  constructor(message) {
6
6
  super(message !== null && message !== void 0 ? message : 'Credentials are not set up. Please run this command again in interactive mode.');
@@ -13,3 +13,10 @@ class MissingCredentialsError extends Error {
13
13
  }
14
14
  }
15
15
  exports.MissingCredentialsError = MissingCredentialsError;
16
+ class UnsupportedCredentialsChoiceError extends Error {
17
+ constructor(message, choice) {
18
+ super(message);
19
+ this.choice = choice;
20
+ }
21
+ }
22
+ exports.UnsupportedCredentialsChoiceError = UnsupportedCredentialsChoiceError;
@@ -9,8 +9,8 @@ const prompts_1 = require("../../prompts");
9
9
  const credentialsJsonReader = (0, tslib_1.__importStar)(require("../credentialsJson/read"));
10
10
  const utils_1 = require("../credentialsJson/utils");
11
11
  const BuildCredentialsUtils_1 = require("./actions/BuildCredentialsUtils");
12
- const SetupBuildCredentials_1 = require("./actions/SetupBuildCredentials");
13
- const SetupPushKey_1 = require("./actions/SetupPushKey");
12
+ const SetUpBuildCredentials_1 = require("./actions/SetUpBuildCredentials");
13
+ const SetUpPushKey_1 = require("./actions/SetUpPushKey");
14
14
  const provisioningProfile_1 = require("./utils/provisioningProfile");
15
15
  class IosCredentialsProvider {
16
16
  constructor(ctx, options) {
@@ -39,7 +39,7 @@ class IosCredentialsProvider {
39
39
  return iosCredentials;
40
40
  }
41
41
  async getRemoteAsync() {
42
- return await new SetupBuildCredentials_1.SetupBuildCredentials({
42
+ return await new SetUpBuildCredentials_1.SetUpBuildCredentials({
43
43
  app: this.options.app,
44
44
  targets: this.options.targets,
45
45
  distribution: this.options.distribution,
@@ -58,7 +58,7 @@ class IosCredentialsProvider {
58
58
  bundleIdentifier: applicationTarget.bundleIdentifier,
59
59
  parentBundleIdentifier: applicationTarget.parentBundleIdentifier,
60
60
  };
61
- const setupPushKeyAction = new SetupPushKey_1.SetupPushKey(appLookupParams);
61
+ const setupPushKeyAction = new SetUpPushKey_1.SetUpPushKey(appLookupParams);
62
62
  const isPushKeySetup = await setupPushKeyAction.isPushKeySetupAsync(ctx);
63
63
  if (isPushKeySetup) {
64
64
  log_1.default.succeed(`Push Notifications setup for ${app.projectName}: ${applicationTarget.bundleIdentifier}`);
@@ -1,5 +1,21 @@
1
+ import { AppStoreConnectApiKeyFragment } from '../../../graphql/generated';
2
+ import { Account } from '../../../user/Account';
3
+ import { CredentialsContext } from '../../context';
1
4
  import { AscApiKey } from '../appstore/Credentials.types';
2
5
  import { AscApiKeyPath, MinimalAscApiKey } from '../credentials';
3
- export declare function promptForAscApiKeyAsync(): Promise<AscApiKeyPath>;
6
+ export declare enum AppStoreApiKeyPurpose {
7
+ SUBMISSION_SERVICE = "EAS Submit"
8
+ }
9
+ export declare function promptForAscApiKeyPathAsync(ctx: CredentialsContext): Promise<AscApiKeyPath>;
4
10
  export declare function promptForIssuerIdAsync(): Promise<string>;
5
11
  export declare function getMinimalAscApiKeyAsync(ascApiKey: AscApiKey): Promise<MinimalAscApiKey>;
12
+ export declare function provideOrGenerateAscApiKeyAsync(ctx: CredentialsContext, purpose: AppStoreApiKeyPurpose): Promise<MinimalAscApiKey>;
13
+ export declare function getAscApiKeyName(purpose: AppStoreApiKeyPurpose): string;
14
+ export declare function getAscApiKeysFromAccountAsync(ctx: CredentialsContext, account: Account, { filterDifferentAppleTeam }?: {
15
+ filterDifferentAppleTeam?: boolean;
16
+ }): Promise<AppStoreConnectApiKeyFragment[]>;
17
+ export declare function selectAscApiKeysFromAccountAsync(ctx: CredentialsContext, account: Account, { filterDifferentAppleTeam }?: {
18
+ filterDifferentAppleTeam?: boolean;
19
+ }): Promise<AppStoreConnectApiKeyFragment | null>;
20
+ export declare function sortAscApiKeysByUpdatedAtDesc(keys: AppStoreConnectApiKeyFragment[]): AppStoreConnectApiKeyFragment[];
21
+ export declare function formatAscApiKey(ascApiKey: AppStoreConnectApiKeyFragment): string;
@@ -1,23 +1,104 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMinimalAscApiKeyAsync = exports.promptForIssuerIdAsync = exports.promptForAscApiKeyAsync = void 0;
3
+ exports.formatAscApiKey = exports.sortAscApiKeysByUpdatedAtDesc = exports.selectAscApiKeysFromAccountAsync = exports.getAscApiKeysFromAccountAsync = exports.getAscApiKeyName = exports.provideOrGenerateAscApiKeyAsync = exports.getMinimalAscApiKeyAsync = exports.promptForIssuerIdAsync = exports.promptForAscApiKeyPathAsync = exports.AppStoreApiKeyPurpose = void 0;
4
4
  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
+ const nanoid_1 = require("nanoid");
7
8
  const path_1 = (0, tslib_1.__importDefault)(require("path"));
8
- const uuid = (0, tslib_1.__importStar)(require("uuid"));
9
9
  const log_1 = (0, tslib_1.__importStar)(require("../../../log"));
10
10
  const prompts_1 = require("../../../prompts");
11
+ const date_1 = require("../../../utils/date");
11
12
  const promptForCredentials_1 = require("../../utils/promptForCredentials");
12
13
  const credentials_1 = require("../credentials");
13
- async function promptForAscApiKeyAsync() {
14
+ const validateAscApiKey_1 = require("../validators/validateAscApiKey");
15
+ const AppleTeamUtils_1 = require("./AppleTeamUtils");
16
+ var AppStoreApiKeyPurpose;
17
+ (function (AppStoreApiKeyPurpose) {
18
+ AppStoreApiKeyPurpose["SUBMISSION_SERVICE"] = "EAS Submit";
19
+ })(AppStoreApiKeyPurpose = exports.AppStoreApiKeyPurpose || (exports.AppStoreApiKeyPurpose = {}));
20
+ async function promptForAscApiKeyPathAsync(ctx) {
21
+ const { keyId, keyP8Path } = await promptForKeyP8AndIdAsync();
22
+ const bestEffortIssuerId = await getBestEffortIssuerIdAsync(ctx, keyId);
23
+ if (bestEffortIssuerId) {
24
+ log_1.default.log(`Detected Issuer ID: ${bestEffortIssuerId}`);
25
+ return { keyId, issuerId: bestEffortIssuerId, keyP8Path };
26
+ }
27
+ const issuerId = await promptForIssuerIdAsync();
28
+ return { keyId, issuerId, keyP8Path };
29
+ }
30
+ exports.promptForAscApiKeyPathAsync = promptForAscApiKeyPathAsync;
31
+ async function promptForIssuerIdAsync() {
32
+ log_1.default.log(chalk_1.default.bold('An App Store Connect Issuer ID is required'));
33
+ log_1.default.log(`If you're not sure what this is or how to find yours, ${(0, log_1.learnMore)('https://expo.fyi/asc-issuer-id')}`);
34
+ // Do not perform uuid validation - Apple's issuerIds are not RFC4122 compliant
35
+ const { issuerId } = await (0, promptForCredentials_1.getCredentialsFromUserAsync)(credentials_1.ascApiKeyIssuerIdSchema);
36
+ return issuerId;
37
+ }
38
+ exports.promptForIssuerIdAsync = promptForIssuerIdAsync;
39
+ async function getMinimalAscApiKeyAsync(ascApiKey) {
40
+ var _a;
41
+ return {
42
+ ...ascApiKey,
43
+ issuerId: (_a = ascApiKey.issuerId) !== null && _a !== void 0 ? _a : (await promptForIssuerIdAsync()),
44
+ };
45
+ }
46
+ exports.getMinimalAscApiKeyAsync = getMinimalAscApiKeyAsync;
47
+ async function provideOrGenerateAscApiKeyAsync(ctx, purpose) {
48
+ if (ctx.nonInteractive) {
49
+ throw new Error(`A new App Store Connect API Key cannot be created in non-interactive mode.`);
50
+ }
51
+ const userProvided = await promptForAscApiKeyAsync(ctx);
52
+ if (!userProvided) {
53
+ return await generateAscApiKeyAsync(ctx, purpose);
54
+ }
55
+ if (!ctx.appStore.authCtx) {
56
+ log_1.default.warn('Unable to validate App Store Connect API Key, you are not authenticated with Apple.');
57
+ return userProvided;
58
+ }
59
+ const isValidAndTracked = await (0, validateAscApiKey_1.isAscApiKeyValidAndTrackedAsync)(ctx, userProvided);
60
+ if (isValidAndTracked) {
61
+ return userProvided;
62
+ }
63
+ const useUserProvided = await (0, prompts_1.confirmAsync)({
64
+ message: `App Store Connect API Key with ID ${userProvided.keyId} is not valid on Apple's servers. Proceed anyway?`,
65
+ });
66
+ if (useUserProvided) {
67
+ return userProvided;
68
+ }
69
+ return await provideOrGenerateAscApiKeyAsync(ctx, purpose);
70
+ }
71
+ exports.provideOrGenerateAscApiKeyAsync = provideOrGenerateAscApiKeyAsync;
72
+ async function generateAscApiKeyAsync(ctx, purpose) {
73
+ //console.log('debug');
74
+ await ctx.appStore.ensureAuthenticatedAsync();
75
+ const ascApiKey = await ctx.appStore.createAscApiKeyAsync({
76
+ nickname: getAscApiKeyName(purpose),
77
+ });
78
+ return await getMinimalAscApiKeyAsync(ascApiKey);
79
+ }
80
+ function getAscApiKeyName(purpose) {
81
+ const nameParts = ['[Expo]', purpose, (0, nanoid_1.nanoid)(10)];
82
+ return nameParts.join(' ');
83
+ }
84
+ exports.getAscApiKeyName = getAscApiKeyName;
85
+ async function promptForAscApiKeyAsync(ctx) {
86
+ const shouldAutoGenerateCredentials = await (0, promptForCredentials_1.shouldAutoGenerateCredentialsAsync)(credentials_1.ascApiKeyIdSchema);
87
+ if (shouldAutoGenerateCredentials) {
88
+ return null;
89
+ }
90
+ const ascApiKeyPath = await promptForAscApiKeyPathAsync(ctx);
91
+ const { keyP8Path, keyId, issuerId } = ascApiKeyPath;
92
+ return { keyP8: await fs_extra_1.default.readFile(keyP8Path, 'utf-8'), keyId, issuerId };
93
+ }
94
+ async function promptForKeyP8AndIdAsync() {
14
95
  var _a, _b;
15
96
  log_1.default.log(chalk_1.default.bold('An App Store Connect Api key is required to upload your app to the Apple App Store'));
16
97
  log_1.default.log(`If you're not sure what this is or how to create one, ${(0, log_1.learnMore)('https://expo.fyi/creating-asc-api-key')}`);
17
98
  const { keyP8Path } = await (0, prompts_1.promptAsync)({
18
99
  type: 'text',
19
100
  name: 'keyP8Path',
20
- message: 'Path to App Store Connect Api Key:',
101
+ message: 'Path to App Store Connect API Key:',
21
102
  initial: 'AuthKey_ABCD.p8',
22
103
  // eslint-disable-next-line async-protect/async-suffix
23
104
  validate: async (filePath) => {
@@ -35,29 +116,82 @@ async function promptForAscApiKeyAsync() {
35
116
  });
36
117
  const regex = /^AuthKey_(?<keyId>\w+)\.p8$/; // Common ASC Api file name downloaded from Apple
37
118
  const bestEffortKeyId = (_b = (_a = path_1.default.basename(keyP8Path).match(regex)) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.keyId;
38
- const ascApiKeyMetadata = await (0, promptForCredentials_1.getCredentialsFromUserAsync)(credentials_1.ascApiKeyMetadataSchema, {
119
+ const { keyId } = await (0, promptForCredentials_1.getCredentialsFromUserAsync)(credentials_1.ascApiKeyIdSchema, {
39
120
  keyId: bestEffortKeyId,
40
121
  });
41
- return { ...ascApiKeyMetadata, keyP8Path };
122
+ return { keyId, keyP8Path };
42
123
  }
43
- exports.promptForAscApiKeyAsync = promptForAscApiKeyAsync;
44
- async function promptForIssuerIdAsync() {
45
- log_1.default.log(chalk_1.default.bold('An App Store Connect Issuer ID is required'));
46
- log_1.default.log(`If you're not sure what this is or how to find yours, ${(0, log_1.learnMore)('https://expo.fyi/asc-issuer-id')}`);
47
- const { issuerId } = await (0, prompts_1.promptAsync)({
48
- type: 'text',
49
- name: 'issuerId',
50
- message: 'App Store Connect Issuer ID:',
51
- validate: (input) => uuid.validate(input),
52
- });
53
- return issuerId;
124
+ async function getBestEffortIssuerIdAsync(ctx, ascApiKeyId) {
125
+ var _a;
126
+ if (!ctx.appStore.authCtx) {
127
+ return null;
128
+ }
129
+ const ascApiKeyInfo = await ctx.appStore.getAscApiKeyAsync(ascApiKeyId);
130
+ return (_a = ascApiKeyInfo === null || ascApiKeyInfo === void 0 ? void 0 : ascApiKeyInfo.issuerId) !== null && _a !== void 0 ? _a : null;
54
131
  }
55
- exports.promptForIssuerIdAsync = promptForIssuerIdAsync;
56
- async function getMinimalAscApiKeyAsync(ascApiKey) {
132
+ async function getAscApiKeysFromAccountAsync(ctx, account, { filterDifferentAppleTeam } = {}) {
133
+ const ascApiKeysForAccount = await ctx.ios.getAscApiKeysForAccountAsync(account);
134
+ if (!filterDifferentAppleTeam) {
135
+ return ascApiKeysForAccount;
136
+ }
137
+ else {
138
+ return filterKeysFromDifferentAppleTeam(ctx, ascApiKeysForAccount);
139
+ }
140
+ }
141
+ exports.getAscApiKeysFromAccountAsync = getAscApiKeysFromAccountAsync;
142
+ async function selectAscApiKeysFromAccountAsync(ctx, account, { filterDifferentAppleTeam } = {}) {
57
143
  var _a;
58
- return {
59
- ...ascApiKey,
60
- issuerId: (_a = ascApiKey.issuerId) !== null && _a !== void 0 ? _a : (await promptForIssuerIdAsync()),
61
- };
144
+ const ascApiKeysForAccount = await getAscApiKeysFromAccountAsync(ctx, account, {
145
+ filterDifferentAppleTeam,
146
+ });
147
+ if (ascApiKeysForAccount.length === 0) {
148
+ if (filterDifferentAppleTeam) {
149
+ const maybeAppleTeamId = (_a = ctx.appStore.authCtx) === null || _a === void 0 ? void 0 : _a.team.id;
150
+ log_1.default.warn(`There are no App Store Connect API Keys in your EAS account${maybeAppleTeamId ? ` matching Apple Team ID: ${maybeAppleTeamId}.` : '.'}`);
151
+ }
152
+ else {
153
+ log_1.default.warn(`There are no App Store Connect API Keys available in your EAS account.`);
154
+ }
155
+ return null;
156
+ }
157
+ return selectAscApiKeysAsync(ascApiKeysForAccount);
62
158
  }
63
- exports.getMinimalAscApiKeyAsync = getMinimalAscApiKeyAsync;
159
+ exports.selectAscApiKeysFromAccountAsync = selectAscApiKeysFromAccountAsync;
160
+ async function selectAscApiKeysAsync(ascApiKeys) {
161
+ const sortedAscApiKeys = sortAscApiKeysByUpdatedAtDesc(ascApiKeys);
162
+ const { chosenAscApiKey } = await (0, prompts_1.promptAsync)({
163
+ type: 'select',
164
+ name: 'chosenAscApiKey',
165
+ message: 'Select an API Key from the list:',
166
+ choices: sortedAscApiKeys.map(ascApiKey => ({
167
+ title: formatAscApiKey(ascApiKey),
168
+ value: ascApiKey,
169
+ })),
170
+ });
171
+ return chosenAscApiKey;
172
+ }
173
+ function filterKeysFromDifferentAppleTeam(ctx, keys) {
174
+ if (!ctx.appStore.authCtx) {
175
+ return keys;
176
+ }
177
+ const teamId = ctx.appStore.authCtx.team.id;
178
+ return keys.filter(key => { var _a; return !key.appleTeam || ((_a = key.appleTeam) === null || _a === void 0 ? void 0 : _a.appleTeamIdentifier) === teamId; });
179
+ }
180
+ function sortAscApiKeysByUpdatedAtDesc(keys) {
181
+ return keys.sort((keyA, keyB) => new Date(keyB.updatedAt).getTime() - new Date(keyA.updatedAt).getTime());
182
+ }
183
+ exports.sortAscApiKeysByUpdatedAtDesc = sortAscApiKeysByUpdatedAtDesc;
184
+ function formatAscApiKey(ascApiKey) {
185
+ const { keyIdentifier, appleTeam, name, updatedAt } = ascApiKey;
186
+ let line = '';
187
+ line += `Key ID: ${keyIdentifier}`;
188
+ if (name) {
189
+ line += chalk_1.default.gray(`\n Name: ${name}`);
190
+ }
191
+ if (appleTeam) {
192
+ line += chalk_1.default.gray(`\n ${(0, AppleTeamUtils_1.formatAppleTeam)(appleTeam)}`);
193
+ }
194
+ line += chalk_1.default.gray(`\n Updated: ${(0, date_1.fromNow)(new Date(updatedAt))} ago`);
195
+ return line;
196
+ }
197
+ exports.formatAscApiKey = formatAscApiKey;
@@ -0,0 +1,9 @@
1
+ import { AppStoreConnectApiKeyFragment, CommonIosAppCredentialsFragment } from '../../../graphql/generated';
2
+ import { CredentialsContext } from '../../context';
3
+ import { AppLookupParams } from '../api/GraphqlClient';
4
+ import { AppStoreApiKeyPurpose } from './AscApiKeyUtils';
5
+ export declare class AssignAscApiKey {
6
+ private app;
7
+ constructor(app: AppLookupParams);
8
+ runAsync(ctx: CredentialsContext, ascApiKey: AppStoreConnectApiKeyFragment, purpose: AppStoreApiKeyPurpose): Promise<CommonIosAppCredentialsFragment>;
9
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AssignAscApiKey = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const log_1 = (0, tslib_1.__importDefault)(require("../../../log"));
6
+ const AppleTeamUtils_1 = require("./AppleTeamUtils");
7
+ const AscApiKeyUtils_1 = require("./AscApiKeyUtils");
8
+ class AssignAscApiKey {
9
+ constructor(app) {
10
+ this.app = app;
11
+ }
12
+ async runAsync(ctx, ascApiKey, purpose) {
13
+ var _a, _b;
14
+ const appleTeam = (_b = (_a = (await (0, AppleTeamUtils_1.resolveAppleTeamIfAuthenticatedAsync)(ctx, this.app))) !== null && _a !== void 0 ? _a : ascApiKey.appleTeam) !== null && _b !== void 0 ? _b : null;
15
+ const appCredentials = await ctx.ios.createOrGetIosAppCredentialsWithCommonFieldsAsync(this.app, { appleTeam: appleTeam !== null && appleTeam !== void 0 ? appleTeam : undefined });
16
+ let updatedAppCredentials;
17
+ if (purpose === AscApiKeyUtils_1.AppStoreApiKeyPurpose.SUBMISSION_SERVICE) {
18
+ updatedAppCredentials = await ctx.ios.updateIosAppCredentialsAsync(appCredentials, {
19
+ ascApiKeyIdForSubmissions: ascApiKey.id,
20
+ });
21
+ }
22
+ else {
23
+ throw new Error(`${purpose} is not yet supported.`);
24
+ }
25
+ log_1.default.succeed(`App Store Connect API Key assigned to ${this.app.projectName}: ${this.app.bundleIdentifier} for ${purpose}.`);
26
+ return updatedAppCredentials;
27
+ }
28
+ }
29
+ exports.AssignAscApiKey = AssignAscApiKey;
@@ -0,0 +1,9 @@
1
+ import { AppStoreConnectApiKeyFragment } from '../../../graphql/generated';
2
+ import { Account } from '../../../user/Account';
3
+ import { CredentialsContext } from '../../context';
4
+ import { AppStoreApiKeyPurpose } from './AscApiKeyUtils';
5
+ export declare class CreateAscApiKey {
6
+ private account;
7
+ constructor(account: Account);
8
+ runAsync(ctx: CredentialsContext, purpose: AppStoreApiKeyPurpose): Promise<AppStoreConnectApiKeyFragment>;
9
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateAscApiKey = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const log_1 = (0, tslib_1.__importDefault)(require("../../../log"));
6
+ const AscApiKeyUtils_1 = require("./AscApiKeyUtils");
7
+ class CreateAscApiKey {
8
+ constructor(account) {
9
+ this.account = account;
10
+ }
11
+ async runAsync(ctx, purpose) {
12
+ if (ctx.nonInteractive) {
13
+ throw new Error(`A new App Store Connect API Key cannot be created in non-interactive mode.`);
14
+ }
15
+ const ascApiKey = await (0, AscApiKeyUtils_1.provideOrGenerateAscApiKeyAsync)(ctx, purpose);
16
+ const result = await ctx.ios.createAscApiKeyAsync(this.account, ascApiKey);
17
+ log_1.default.succeed('Created App Store Connect API Key');
18
+ return result;
19
+ }
20
+ }
21
+ exports.CreateAscApiKey = CreateAscApiKey;
@@ -104,7 +104,7 @@ async function provideOrGenerateDistributionCertificateAsync(ctx) {
104
104
  const userProvided = await promptForDistCertAsync(ctx);
105
105
  if (userProvided) {
106
106
  if (!ctx.appStore.authCtx) {
107
- log_1.default.warn('Unable to validate distribution certificate due to insufficient Apple Credentials');
107
+ log_1.default.warn('Unable to validate distribution certificate, you are not authenticated with Apple.');
108
108
  return userProvided;
109
109
  }
110
110
  else {
@@ -17,7 +17,7 @@ async function provideOrGeneratePushKeyAsync(ctx) {
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 {
@@ -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>;