eas-cli 1.1.1 → 1.2.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 (42) hide show
  1. package/README.md +68 -76
  2. package/build/build/createContext.js +1 -0
  3. package/build/build/ios/graphql.js +0 -1
  4. package/build/commandUtils/EasCommand.d.ts +2 -0
  5. package/build/commandUtils/EasCommand.js +44 -3
  6. package/build/commands/build/index.d.ts +2 -1
  7. package/build/commands/build/index.js +36 -18
  8. package/build/commands/submit.d.ts +2 -1
  9. package/build/commands/submit.js +28 -14
  10. package/build/commands/update/index.js +3 -0
  11. package/build/credentials/android/api/GraphqlClient.js +1 -1
  12. package/build/credentials/context.d.ts +3 -0
  13. package/build/credentials/context.js +1 -0
  14. package/build/credentials/ios/IosCredentialsProvider.d.ts +1 -0
  15. package/build/credentials/ios/IosCredentialsProvider.js +33 -5
  16. package/build/credentials/ios/api/GraphqlClient.js +1 -1
  17. package/build/credentials/ios/appstore/bundleIdCapabilities.js +176 -15
  18. package/build/credentials/manager/ManageAndroid.js +2 -8
  19. package/build/credentials/manager/ManageIos.js +2 -4
  20. package/build/graphql/generated.d.ts +191 -39
  21. package/build/graphql/generated.js +39 -1
  22. package/build/{credentials/ios/api/graphql → graphql}/queries/AppQuery.d.ts +1 -1
  23. package/build/{credentials/ios/api/graphql → graphql}/queries/AppQuery.js +2 -2
  24. package/build/graphql/queries/EnvironmentSecretsQuery.d.ts +1 -1
  25. package/build/graphql/queries/EnvironmentSecretsQuery.js +2 -2
  26. package/build/graphql/queries/StatuspageServiceQuery.d.ts +4 -0
  27. package/build/graphql/queries/StatuspageServiceQuery.js +28 -0
  28. package/build/graphql/types/StatuspageService.d.ts +1 -0
  29. package/build/graphql/types/StatuspageService.js +19 -0
  30. package/build/project/ensureProjectExists.d.ts +0 -7
  31. package/build/project/ensureProjectExists.js +4 -14
  32. package/build/project/projectUtils.d.ts +0 -1
  33. package/build/project/projectUtils.js +9 -29
  34. package/build/submit/android/AndroidSubmitter.js +1 -1
  35. package/build/submit/submit.js +2 -2
  36. package/build/submit/utils/errors.js +2 -0
  37. package/build/utils/statuspageService.d.ts +2 -0
  38. package/build/utils/statuspageService.js +41 -0
  39. package/oclif.manifest.json +1 -1
  40. package/package.json +4 -4
  41. package/build/graphql/queries/ProjectQuery.d.ts +0 -6
  42. package/build/graphql/queries/ProjectQuery.js +0 -24
@@ -6,21 +6,29 @@ const path_1 = tslib_1.__importDefault(require("path"));
6
6
  const runBuildAndSubmit_1 = require("../../build/runBuildAndSubmit");
7
7
  const types_1 = require("../../build/types");
8
8
  const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
9
+ const generated_1 = require("../../graphql/generated");
9
10
  const log_1 = tslib_1.__importDefault(require("../../log"));
10
11
  const platform_1 = require("../../platform");
11
12
  const projectUtils_1 = require("../../project/projectUtils");
12
13
  const json_1 = require("../../utils/json");
14
+ const statuspageService_1 = require("../../utils/statuspageService");
13
15
  class Build extends EasCommand_1.default {
14
16
  async runAsync() {
15
17
  const { flags: rawFlags } = await this.parse(Build);
16
18
  if (rawFlags.json) {
17
19
  (0, json_1.enableJsonOutput)();
18
20
  }
19
- const flags = await this.sanitizeFlagsAsync(rawFlags);
21
+ const flags = this.sanitizeFlags(rawFlags);
20
22
  const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
21
- await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(projectDir, flags);
23
+ if (!flags.localBuildOptions.enable) {
24
+ await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)(flags.autoSubmit
25
+ ? [generated_1.StatuspageServiceName.EasBuild, generated_1.StatuspageServiceName.EasSubmit]
26
+ : [generated_1.StatuspageServiceName.EasBuild]);
27
+ }
28
+ const flagsWithPlatform = await this.ensurePlatformSelectedAsync(flags);
29
+ await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(projectDir, flagsWithPlatform);
22
30
  }
23
- async sanitizeFlagsAsync(flags) {
31
+ sanitizeFlags(flags) {
24
32
  var _a, _b;
25
33
  const nonInteractive = flags['non-interactive'];
26
34
  if (!flags.local && flags.output) {
@@ -32,21 +40,10 @@ class Build extends EasCommand_1.default {
32
40
  if (flags.json && !nonInteractive) {
33
41
  core_1.Errors.error('--json is allowed only when building in non-interactive mode', { exit: 1 });
34
42
  }
35
- const requestedPlatform = await (0, platform_1.selectRequestedPlatformAsync)(flags.platform);
36
- if (flags.local) {
37
- if (flags['auto-submit'] || flags['auto-submit-with-profile'] !== undefined) {
38
- // TODO: implement this
39
- core_1.Errors.error('Auto-submits are not yet supported when building locally', { exit: 1 });
40
- }
41
- if (requestedPlatform === platform_1.RequestedPlatform.All) {
42
- core_1.Errors.error('Builds for multiple platforms are not supported with flag --local', {
43
- exit: 1,
44
- });
45
- }
46
- else if (process.platform !== 'darwin' && requestedPlatform === platform_1.RequestedPlatform.Ios) {
47
- core_1.Errors.error('Unsupported platform, macOS is required to build apps for iOS', { exit: 1 });
48
- }
49
- }
43
+ const requestedPlatform = flags.platform &&
44
+ Object.values(platform_1.RequestedPlatform).includes(flags.platform.toLowerCase())
45
+ ? flags.platform.toLowerCase()
46
+ : undefined;
50
47
  if (flags['skip-credentials-check']) {
51
48
  log_1.default.warnDeprecatedFlag('skip-credentials-check', 'Build credentials validation is always skipped with the --non-interactive flag. You can also skip interactively.');
52
49
  log_1.default.newLine();
@@ -82,6 +79,27 @@ class Build extends EasCommand_1.default {
82
79
  message,
83
80
  };
84
81
  }
82
+ async ensurePlatformSelectedAsync(flags) {
83
+ const requestedPlatform = await (0, platform_1.selectRequestedPlatformAsync)(flags.requestedPlatform);
84
+ if (flags.localBuildOptions.enable) {
85
+ if (flags.autoSubmit) {
86
+ // TODO: implement this
87
+ core_1.Errors.error('Auto-submits are not yet supported when building locally', { exit: 1 });
88
+ }
89
+ if (requestedPlatform === platform_1.RequestedPlatform.All) {
90
+ core_1.Errors.error('Builds for multiple platforms are not supported with flag --local', {
91
+ exit: 1,
92
+ });
93
+ }
94
+ else if (process.platform !== 'darwin' && requestedPlatform === platform_1.RequestedPlatform.Ios) {
95
+ core_1.Errors.error('Unsupported platform, macOS is required to build apps for iOS', { exit: 1 });
96
+ }
97
+ }
98
+ return {
99
+ ...flags,
100
+ requestedPlatform,
101
+ };
102
+ }
85
103
  }
86
104
  exports.default = Build;
87
105
  Build.description = 'start a build';
@@ -14,5 +14,6 @@ export default class Submit extends EasCommand {
14
14
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
15
  };
16
16
  runAsync(): Promise<void>;
17
- private sanitizeFlagsAsync;
17
+ private sanitizeFlags;
18
+ private ensurePlatformSelectedAsync;
18
19
  }
@@ -5,6 +5,7 @@ const eas_json_1 = require("@expo/eas-json");
5
5
  const core_1 = require("@oclif/core");
6
6
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
7
7
  const EasCommand_1 = tslib_1.__importDefault(require("../commandUtils/EasCommand"));
8
+ const generated_1 = require("../graphql/generated");
8
9
  const AppPlatform_1 = require("../graphql/types/AppPlatform");
9
10
  const log_1 = tslib_1.__importDefault(require("../log"));
10
11
  const platform_1 = require("../platform");
@@ -14,19 +15,22 @@ const context_1 = require("../submit/context");
14
15
  const submit_1 = require("../submit/submit");
15
16
  const urls_1 = require("../submit/utils/urls");
16
17
  const profiles_1 = require("../utils/profiles");
18
+ const statuspageService_1 = require("../utils/statuspageService");
17
19
  class Submit extends EasCommand_1.default {
18
20
  async runAsync() {
19
21
  const { flags: rawFlags } = await this.parse(Submit);
20
- const flags = await this.sanitizeFlagsAsync(rawFlags);
22
+ const flags = this.sanitizeFlags(rawFlags);
21
23
  const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
22
24
  const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
23
25
  const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
24
- const platforms = (0, platform_1.toPlatforms)(flags.requestedPlatform);
26
+ await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)([generated_1.StatuspageServiceName.EasSubmit]);
27
+ const flagsWithPlatform = await this.ensurePlatformSelectedAsync(flags);
28
+ const platforms = (0, platform_1.toPlatforms)(flagsWithPlatform.requestedPlatform);
25
29
  const submissionProfiles = await (0, profiles_1.getProfilesAsync)({
26
30
  type: 'submit',
27
31
  easJsonReader: new eas_json_1.EasJsonReader(projectDir),
28
32
  platforms,
29
- profileName: flags.profile,
33
+ profileName: flagsWithPlatform.profile,
30
34
  });
31
35
  const submissions = [];
32
36
  for (const submissionProfile of submissionProfiles) {
@@ -35,8 +39,8 @@ class Submit extends EasCommand_1.default {
35
39
  projectDir,
36
40
  projectId,
37
41
  profile: submissionProfile.profile,
38
- archiveFlags: flags.archiveFlags,
39
- nonInteractive: flags.nonInteractive,
42
+ archiveFlags: flagsWithPlatform.archiveFlags,
43
+ nonInteractive: flagsWithPlatform.nonInteractive,
40
44
  });
41
45
  if (submissionProfiles.length > 1) {
42
46
  log_1.default.newLine();
@@ -48,24 +52,22 @@ class Submit extends EasCommand_1.default {
48
52
  }
49
53
  log_1.default.newLine();
50
54
  (0, urls_1.printSubmissionDetailsUrls)(submissions);
51
- if (flags.wait) {
55
+ if (flagsWithPlatform.wait) {
52
56
  const completedSubmissions = await (0, submit_1.waitToCompleteAsync)(submissions, {
53
- verbose: flags.verbose,
57
+ verbose: flagsWithPlatform.verbose,
54
58
  });
55
59
  (0, submit_1.exitWithNonZeroCodeIfSomeSubmissionsDidntFinish)(completedSubmissions);
56
60
  }
57
61
  }
58
- async sanitizeFlagsAsync(flags) {
62
+ sanitizeFlags(flags) {
59
63
  const { platform, verbose, wait, profile, 'non-interactive': nonInteractive, ...archiveFlags } = flags;
60
64
  if (!flags.platform && nonInteractive) {
61
65
  core_1.Errors.error('--platform is required when building in non-interactive mode', { exit: 1 });
62
66
  }
63
- const requestedPlatform = await (0, platform_1.selectRequestedPlatformAsync)(flags.platform);
64
- if (requestedPlatform === platform_1.RequestedPlatform.All) {
65
- if (archiveFlags.id || archiveFlags.path || archiveFlags.url) {
66
- core_1.Errors.error('--id, --path, and --url params are only supported when performing a single-platform submit', { exit: 1 });
67
- }
68
- }
67
+ const requestedPlatform = flags.platform &&
68
+ Object.values(platform_1.RequestedPlatform).includes(flags.platform.toLowerCase())
69
+ ? flags.platform.toLowerCase()
70
+ : undefined;
69
71
  return {
70
72
  archiveFlags,
71
73
  requestedPlatform,
@@ -75,6 +77,18 @@ class Submit extends EasCommand_1.default {
75
77
  nonInteractive,
76
78
  };
77
79
  }
80
+ async ensurePlatformSelectedAsync(flags) {
81
+ const requestedPlatform = await (0, platform_1.selectRequestedPlatformAsync)(flags.requestedPlatform);
82
+ if (requestedPlatform === platform_1.RequestedPlatform.All) {
83
+ if (flags.archiveFlags.id || flags.archiveFlags.path || flags.archiveFlags.url) {
84
+ core_1.Errors.error('--id, --path, and --url params are only supported when performing a single-platform submit', { exit: 1 });
85
+ }
86
+ }
87
+ return {
88
+ ...flags,
89
+ requestedPlatform,
90
+ };
91
+ }
78
92
  }
79
93
  exports.default = Submit;
80
94
  Submit.description = 'submit app binary to App Store and/or Play Store';
@@ -16,6 +16,7 @@ const url_1 = require("../../build/utils/url");
16
16
  const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
17
17
  const fetch_1 = tslib_1.__importDefault(require("../../fetch"));
18
18
  const client_1 = require("../../graphql/client");
19
+ const generated_1 = require("../../graphql/generated");
19
20
  const PublishMutation_1 = require("../../graphql/mutations/PublishMutation");
20
21
  const BranchQuery_1 = require("../../graphql/queries/BranchQuery");
21
22
  const UpdateQuery_1 = require("../../graphql/queries/UpdateQuery");
@@ -32,6 +33,7 @@ const code_signing_1 = require("../../utils/code-signing");
32
33
  const uniqBy_1 = tslib_1.__importDefault(require("../../utils/expodash/uniqBy"));
33
34
  const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
34
35
  const json_1 = require("../../utils/json");
36
+ const statuspageService_1 = require("../../utils/statuspageService");
35
37
  const vcs_1 = require("../../vcs");
36
38
  const create_1 = require("../branch/create");
37
39
  const create_2 = require("../channel/create");
@@ -109,6 +111,7 @@ class UpdatePublish extends EasCommand_1.default {
109
111
  const expPrivate = (0, expoConfig_1.getExpoConfig)(projectDir, {
110
112
  isPublicConfig: false,
111
113
  });
114
+ await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)([generated_1.StatuspageServiceName.EasUpdate]);
112
115
  const codeSigningInfo = await (0, code_signing_1.getCodeSigningInfoAsync)(expPrivate, privateKeyPath);
113
116
  const hasExpoUpdates = (0, projectUtils_1.isExpoUpdatesInstalledOrAvailable)(projectDir, exp.sdkVersion);
114
117
  if (!hasExpoUpdates && nonInteractive) {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.formatProjectFullName = exports.getGoogleServiceAccountKeysForAccountAsync = exports.deleteGoogleServiceAccountKeyAsync = exports.createGoogleServiceAccountKeyAsync = exports.deleteFcmAsync = exports.createFcmAsync = exports.deleteKeystoreAsync = exports.createKeystoreAsync = exports.createOrUpdateDefaultIosAppBuildCredentialsAsync = exports.createOrUpdateAndroidAppBuildCredentialsByNameAsync = exports.getAndroidAppBuildCredentialsByNameAsync = exports.getDefaultAndroidAppBuildCredentialsAsync = exports.createAndroidAppBuildCredentialsAsync = exports.updateAndroidAppBuildCredentialsAsync = exports.updateAndroidAppCredentialsAsync = exports.createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync = exports.getLegacyAndroidAppBuildCredentialsAsync = exports.getLegacyAndroidAppCredentialsWithCommonFieldsAsync = exports.getAndroidAppBuildCredentialsListAsync = exports.getAndroidAppCredentialsWithCommonFieldsAsync = void 0;
4
- const AppQuery_1 = require("../../ios/api/graphql/queries/AppQuery");
4
+ const AppQuery_1 = require("../../../graphql/queries/AppQuery");
5
5
  const AndroidAppBuildCredentialsMutation_1 = require("./graphql/mutations/AndroidAppBuildCredentialsMutation");
6
6
  const AndroidAppCredentialsMutation_1 = require("./graphql/mutations/AndroidAppCredentialsMutation");
7
7
  const AndroidFcmMutation_1 = require("./graphql/mutations/AndroidFcmMutation");
@@ -1,5 +1,6 @@
1
1
  import { ExpoConfig } from '@expo/config';
2
2
  import { Env } from '@expo/eas-build-job';
3
+ import { EasJson } from '@expo/eas-json';
3
4
  import { Actor } from '../user/User';
4
5
  import * as AndroidGraphqlClient from './android/api/GraphqlClient';
5
6
  import * as IosGraphqlClient from './ios/api/GraphqlClient';
@@ -12,10 +13,12 @@ export declare class CredentialsContext {
12
13
  readonly nonInteractive: boolean;
13
14
  readonly projectDir: string;
14
15
  readonly user: Actor;
16
+ readonly easJsonCliConfig?: EasJson['cli'];
15
17
  private shouldAskAuthenticateAppStore;
16
18
  private resolvedExp?;
17
19
  constructor(options: {
18
20
  exp?: ExpoConfig;
21
+ easJsonCliConfig?: EasJson['cli'];
19
22
  nonInteractive?: boolean;
20
23
  projectDir: string;
21
24
  user: Actor;
@@ -20,6 +20,7 @@ class CredentialsContext {
20
20
  this.appStore = new AppStoreApi_1.default();
21
21
  this.ios = IosGraphqlClient;
22
22
  this.shouldAskAuthenticateAppStore = true;
23
+ this.easJsonCliConfig = options.easJsonCliConfig;
23
24
  this.projectDir = options.projectDir;
24
25
  this.user = options.user;
25
26
  this.nonInteractive = (_a = options.nonInteractive) !== null && _a !== void 0 ? _a : false;
@@ -17,6 +17,7 @@ export default class IosCredentialsProvider {
17
17
  private getLocalAsync;
18
18
  private getRemoteAsync;
19
19
  private getPushKeyAsync;
20
+ private disablePushNotificationsSetupInEasJsonAsync;
20
21
  private assertProvisioningProfileType;
21
22
  }
22
23
  export {};
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const eas_build_job_1 = require("@expo/eas-build-job");
5
5
  const eas_json_1 = require("@expo/eas-json");
6
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
6
7
  const log_1 = tslib_1.__importDefault(require("../../log"));
7
8
  const target_1 = require("../../project/ios/target");
8
9
  const prompts_1 = require("../../prompts");
@@ -12,6 +13,12 @@ const BuildCredentialsUtils_1 = require("./actions/BuildCredentialsUtils");
12
13
  const SetUpBuildCredentials_1 = require("./actions/SetUpBuildCredentials");
13
14
  const SetUpPushKey_1 = require("./actions/SetUpPushKey");
14
15
  const provisioningProfile_1 = require("./utils/provisioningProfile");
16
+ var PushNotificationSetupOption;
17
+ (function (PushNotificationSetupOption) {
18
+ PushNotificationSetupOption[PushNotificationSetupOption["YES"] = 0] = "YES";
19
+ PushNotificationSetupOption[PushNotificationSetupOption["NO"] = 1] = "NO";
20
+ PushNotificationSetupOption[PushNotificationSetupOption["NO_DONT_ASK_AGAIN"] = 2] = "NO_DONT_ASK_AGAIN";
21
+ })(PushNotificationSetupOption || (PushNotificationSetupOption = {}));
15
22
  class IosCredentialsProvider {
16
23
  constructor(ctx, options) {
17
24
  this.ctx = ctx;
@@ -47,6 +54,7 @@ class IosCredentialsProvider {
47
54
  }).runAsync(this.ctx);
48
55
  }
49
56
  async getPushKeyAsync(ctx, targets) {
57
+ var _a;
50
58
  if (ctx.nonInteractive) {
51
59
  return null;
52
60
  }
@@ -63,13 +71,33 @@ class IosCredentialsProvider {
63
71
  log_1.default.succeed(`Push Notifications setup for ${app.projectName}: ${applicationTarget.bundleIdentifier}`);
64
72
  return null;
65
73
  }
66
- const confirmSetup = await (0, prompts_1.confirmAsync)({
67
- message: `Would you like to set up Push Notifications for your project?`,
68
- });
69
- if (!confirmSetup) {
74
+ if (((_a = ctx.easJsonCliConfig) === null || _a === void 0 ? void 0 : _a.promptToConfigurePushNotfications) === false) {
70
75
  return null;
71
76
  }
72
- return await setupPushKeyAction.runAsync(ctx);
77
+ const setupOption = await (0, prompts_1.selectAsync)(`Would you like to set up Push Notifications for your project?`, [
78
+ { title: 'Yes', value: PushNotificationSetupOption.YES },
79
+ { title: 'No', value: PushNotificationSetupOption.NO },
80
+ {
81
+ title: `No, don't ask again (preference will be saved to eas.json)`,
82
+ value: PushNotificationSetupOption.NO_DONT_ASK_AGAIN,
83
+ },
84
+ ]);
85
+ if (setupOption === PushNotificationSetupOption.YES) {
86
+ return await setupPushKeyAction.runAsync(ctx);
87
+ }
88
+ else {
89
+ if (setupOption === PushNotificationSetupOption.NO_DONT_ASK_AGAIN) {
90
+ await this.disablePushNotificationsSetupInEasJsonAsync(ctx);
91
+ }
92
+ return null;
93
+ }
94
+ }
95
+ async disablePushNotificationsSetupInEasJsonAsync(ctx) {
96
+ const easJsonPath = eas_json_1.EasJsonReader.formatEasJsonPath(ctx.projectDir);
97
+ const easJson = await fs_extra_1.default.readJSON(easJsonPath);
98
+ easJson.cli = { ...easJson === null || easJson === void 0 ? void 0 : easJson.cli, promptToConfigurePushNotfications: false };
99
+ await fs_extra_1.default.writeFile(easJsonPath, `${JSON.stringify(easJson, null, 2)}\n`);
100
+ log_1.default.withTick('Updated eas.json');
73
101
  }
74
102
  assertProvisioningProfileType(provisioningProfile, targetName) {
75
103
  const isAdHoc = (0, provisioningProfile_1.isAdHocProfile)(provisioningProfile);
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const apple_utils_1 = require("@expo/apple-utils");
6
6
  const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
7
7
  const generated_1 = require("../../../graphql/generated");
8
+ const AppQuery_1 = require("../../../graphql/queries/AppQuery");
8
9
  const bundleIdentifier_1 = require("../../../project/ios/bundleIdentifier");
9
10
  const errors_1 = require("../errors");
10
11
  const AppStoreConnectApiKeyMutation_1 = require("./graphql/mutations/AppStoreConnectApiKeyMutation");
@@ -15,7 +16,6 @@ const ApplePushKeyMutation_1 = require("./graphql/mutations/ApplePushKeyMutation
15
16
  const AppleTeamMutation_1 = require("./graphql/mutations/AppleTeamMutation");
16
17
  const IosAppBuildCredentialsMutation_1 = require("./graphql/mutations/IosAppBuildCredentialsMutation");
17
18
  const IosAppCredentialsMutation_1 = require("./graphql/mutations/IosAppCredentialsMutation");
18
- const AppQuery_1 = require("./graphql/queries/AppQuery");
19
19
  const AppStoreConnectApiKeyQuery_1 = require("./graphql/queries/AppStoreConnectApiKeyQuery");
20
20
  const AppleAppIdentifierQuery_1 = require("./graphql/queries/AppleAppIdentifierQuery");
21
21
  const AppleDeviceQuery_1 = require("./graphql/queries/AppleDeviceQuery");
@@ -372,6 +372,7 @@ exports.CapabilityMapping = [
372
372
  {
373
373
  // https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_networking_vpn_api
374
374
  name: 'Push Notifications',
375
+ // com.apple.developer.aps-environment
375
376
  entitlement: 'aps-environment',
376
377
  capability: apple_utils_1.CapabilityType.PUSH_NOTIFICATIONS,
377
378
  validateOptions: validateDevProdString,
@@ -410,6 +411,181 @@ exports.CapabilityMapping = [
410
411
  validateOptions: validateDevProdString,
411
412
  getOptions: getDefinedOptions,
412
413
  },
414
+ {
415
+ entitlement: 'com.apple.developer.coremedia.hls.low-latency',
416
+ name: 'Low Latency HLS',
417
+ capability: apple_utils_1.CapabilityType.HLS_LOW_LATENCY,
418
+ validateOptions: validateBooleanOptions,
419
+ getOptions: getBooleanOptions,
420
+ },
421
+ {
422
+ entitlement: 'com.apple.developer.associated-domains.mdm-managed',
423
+ name: 'MDM Managed Associated Domains',
424
+ capability: apple_utils_1.CapabilityType.MDM_MANAGED_ASSOCIATED_DOMAINS,
425
+ validateOptions: validateBooleanOptions,
426
+ getOptions: getBooleanOptions,
427
+ },
428
+ {
429
+ entitlement: 'com.apple.developer.fileprovider.testing-mode',
430
+ name: 'FileProvider TestingMode',
431
+ capability: apple_utils_1.CapabilityType.FILE_PROVIDER_TESTING_MODE,
432
+ validateOptions: validateBooleanOptions,
433
+ getOptions: getBooleanOptions,
434
+ },
435
+ {
436
+ entitlement: 'com.apple.developer.healthkit.recalibrate-estimates',
437
+ name: 'Recalibrate Estimates',
438
+ capability: apple_utils_1.CapabilityType.HEALTH_KIT_RECALIBRATE_ESTIMATES,
439
+ validateOptions: validateBooleanOptions,
440
+ getOptions: getBooleanOptions,
441
+ },
442
+ {
443
+ entitlement: 'com.apple.developer.maps',
444
+ name: 'Maps',
445
+ capability: apple_utils_1.CapabilityType.MAPS,
446
+ validateOptions: validateBooleanOptions,
447
+ getOptions: getBooleanOptions,
448
+ },
449
+ {
450
+ entitlement: 'com.apple.developer.user-management',
451
+ name: 'TV Services',
452
+ capability: apple_utils_1.CapabilityType.USER_MANAGEMENT,
453
+ validateOptions: validateBooleanOptions,
454
+ getOptions: getBooleanOptions,
455
+ },
456
+ {
457
+ entitlement: 'com.apple.developer.networking.custom-protocol',
458
+ name: 'Custom Network Protocol',
459
+ capability: apple_utils_1.CapabilityType.NETWORK_CUSTOM_PROTOCOL,
460
+ validateOptions: validateBooleanOptions,
461
+ getOptions: getBooleanOptions,
462
+ },
463
+ {
464
+ entitlement: 'com.apple.developer.system-extension.install',
465
+ name: 'System Extension',
466
+ capability: apple_utils_1.CapabilityType.SYSTEM_EXTENSION_INSTALL,
467
+ validateOptions: validateBooleanOptions,
468
+ getOptions: getBooleanOptions,
469
+ },
470
+ {
471
+ entitlement: 'com.apple.developer.push-to-talk',
472
+ name: 'Push to Talk',
473
+ capability: apple_utils_1.CapabilityType.PUSH_TO_TALK,
474
+ validateOptions: validateBooleanOptions,
475
+ getOptions: getBooleanOptions,
476
+ },
477
+ {
478
+ entitlement: 'com.apple.developer.driverkit.transport.usb',
479
+ name: 'DriverKit USB Transport (development)',
480
+ capability: apple_utils_1.CapabilityType.DRIVER_KIT_USB_TRANSPORT_PUB,
481
+ validateOptions: validateBooleanOptions,
482
+ getOptions: getBooleanOptions,
483
+ },
484
+ {
485
+ entitlement: 'com.apple.developer.kernel.increased-memory-limit',
486
+ name: 'Increased Memory Limit',
487
+ capability: apple_utils_1.CapabilityType.INCREASED_MEMORY_LIMIT,
488
+ validateOptions: validateBooleanOptions,
489
+ getOptions: getBooleanOptions,
490
+ },
491
+ {
492
+ entitlement: 'com.apple.developer.driverkit.communicates-with-drivers',
493
+ name: 'Communicates with Drivers',
494
+ capability: apple_utils_1.CapabilityType.DRIVER_KIT_COMMUNICATES_WITH_DRIVERS,
495
+ validateOptions: validateBooleanOptions,
496
+ getOptions: getBooleanOptions,
497
+ },
498
+ {
499
+ entitlement: 'com.apple.developer.media-device-discovery-extension',
500
+ name: 'Media Device Discovery',
501
+ capability: apple_utils_1.CapabilityType.MEDIA_DEVICE_DISCOVERY,
502
+ validateOptions: validateBooleanOptions,
503
+ getOptions: getBooleanOptions,
504
+ },
505
+ {
506
+ entitlement: 'com.apple.developer.driverkit.allow-third-party-userclients',
507
+ name: 'DriverKit Allow Third Party UserClients',
508
+ capability: apple_utils_1.CapabilityType.DRIVER_KIT_ALLOW_THIRD_PARTY_USER_CLIENTS,
509
+ validateOptions: validateBooleanOptions,
510
+ getOptions: getBooleanOptions,
511
+ },
512
+ {
513
+ entitlement: 'com.apple.developer.weatherkit',
514
+ name: 'WeatherKit',
515
+ capability: apple_utils_1.CapabilityType.WEATHER_KIT,
516
+ validateOptions: validateBooleanOptions,
517
+ getOptions: getBooleanOptions,
518
+ },
519
+ {
520
+ entitlement: 'com.apple.developer.on-demand-install-capable',
521
+ name: 'On Demand Install Capable for App Clip Extensions',
522
+ capability: apple_utils_1.CapabilityType.ON_DEMAND_INSTALL_EXTENSIONS,
523
+ validateOptions: validateBooleanOptions,
524
+ getOptions: getBooleanOptions,
525
+ },
526
+ {
527
+ entitlement: 'com.apple.developer.driverkit.family.scsicontroller',
528
+ name: 'DriverKit Family SCSIController (development)',
529
+ capability: apple_utils_1.CapabilityType.DRIVER_KIT_FAMILY_SCSI_CONTROLLER_PUB,
530
+ validateOptions: validateBooleanOptions,
531
+ getOptions: getBooleanOptions,
532
+ },
533
+ {
534
+ entitlement: 'com.apple.developer.driverkit.family.serial',
535
+ name: 'DriverKit Family Serial (development)',
536
+ capability: apple_utils_1.CapabilityType.DRIVER_KIT_FAMILY_SERIAL_PUB,
537
+ validateOptions: validateBooleanOptions,
538
+ getOptions: getBooleanOptions,
539
+ },
540
+ {
541
+ entitlement: 'com.apple.developer.driverkit.family.networking',
542
+ name: 'DriverKit Family Networking (development)',
543
+ capability: apple_utils_1.CapabilityType.DRIVER_KIT_FAMILY_NETWORKING_PUB,
544
+ validateOptions: validateBooleanOptions,
545
+ getOptions: getBooleanOptions,
546
+ },
547
+ {
548
+ entitlement: 'com.apple.developer.driverkit.family.hid.eventservice',
549
+ name: 'DriverKit Family HID EventService (development)',
550
+ capability: apple_utils_1.CapabilityType.DRIVER_KIT_FAMILY_HID_EVENT_SERVICE_PUB,
551
+ validateOptions: validateBooleanOptions,
552
+ getOptions: getBooleanOptions,
553
+ },
554
+ {
555
+ entitlement: 'com.apple.developer.driverkit.family.hid.device',
556
+ name: 'DriverKit Family HID Device (development)',
557
+ capability: apple_utils_1.CapabilityType.DRIVER_KIT_FAMILY_HID_DEVICE_PUB,
558
+ validateOptions: validateBooleanOptions,
559
+ getOptions: getBooleanOptions,
560
+ },
561
+ {
562
+ entitlement: 'com.apple.developer.driverkit',
563
+ name: 'DriverKit for Development',
564
+ capability: apple_utils_1.CapabilityType.DRIVER_KIT_PUBLIC,
565
+ validateOptions: validateBooleanOptions,
566
+ getOptions: getBooleanOptions,
567
+ },
568
+ {
569
+ entitlement: 'com.apple.developer.driverkit.transport.hid',
570
+ name: 'DriverKit Transport HID (development)',
571
+ capability: apple_utils_1.CapabilityType.DRIVER_KIT_TRANSPORT_HID_PUB,
572
+ validateOptions: validateBooleanOptions,
573
+ getOptions: getBooleanOptions,
574
+ },
575
+ {
576
+ entitlement: 'com.apple.developer.driverkit.family.audio',
577
+ name: 'DriverKit Family Audio (development)',
578
+ capability: apple_utils_1.CapabilityType.DRIVER_KIT_FAMILY_AUDIO_PUB,
579
+ validateOptions: validateBooleanOptions,
580
+ getOptions: getBooleanOptions,
581
+ },
582
+ {
583
+ entitlement: 'com.apple.developer.shared-with-you',
584
+ name: 'Shared with You',
585
+ capability: apple_utils_1.CapabilityType.SHARED_WITH_YOU,
586
+ validateOptions: validateBooleanOptions,
587
+ getOptions: getBooleanOptions,
588
+ },
413
589
  // These don't appear to have entitlements, so it's unclear how we can automatically enable / disable them at this time.
414
590
  // TODO: Maybe add a warning about manually enabling features?
415
591
  // ?? -- links `StoreKit.framework`
@@ -421,24 +597,9 @@ exports.CapabilityMapping = [
421
597
  // },
422
598
  // {
423
599
  // entitlement: '',
424
- // name: 'FileProvider TestingMode',
425
- // capability: 'FILEPROVIDER_TESTINGMODE',
426
- // },
427
- // {
428
- // entitlement: '',
429
600
  // name: 'HLS Interstitial Previews',
430
601
  // capability: 'HLS_INTERSTITIAL_PREVIEW',
431
602
  // },
432
- // {
433
- // entitlement: '',
434
- // name: 'Low Latency HLS',
435
- // capability: 'COREMEDIA_HLS_LOW_LATENCY',
436
- // },
437
- // {
438
- // entitlement: '',
439
- // name: 'MDM Managed Associated Domains',
440
- // capability: 'MDM_MANAGED_ASSOCIATED_DOMAINS',
441
- // },
442
603
  // "Game Controllers" doesn't appear in Dev Portal but it does show up in Xcode,
443
604
  // toggling in Xcode causes no network request to be sent.
444
605
  // Therefore it seems that it's a mistake in Xcode,
@@ -61,10 +61,6 @@ class ManageAndroid {
61
61
  while (true) {
62
62
  try {
63
63
  if (ctx.hasProjectContext) {
64
- const maybeProjectId = await (0, projectUtils_1.promptToCreateProjectIfNotExistsAsync)(ctx.exp);
65
- if (!maybeProjectId) {
66
- throw new Error('Your project must be registered with EAS in order to use the credentials manager.');
67
- }
68
64
  const appLookupParams = await (0, BuildCredentialsUtils_1.getAppLookupParamsFromContextAsync)(ctx, gradleContext);
69
65
  const appCredentials = await ctx.android.getAndroidAppCredentialsWithCommonFieldsAsync(appLookupParams);
70
66
  if (!appCredentials) {
@@ -131,10 +127,8 @@ class ManageAndroid {
131
127
  }
132
128
  async createProjectContextAsync(ctx, buildProfile) {
133
129
  (0, assert_1.default)(ctx.hasProjectContext, 'createProjectContextAsync: must have project context.');
134
- const maybeProjectId = await (0, projectUtils_1.promptToCreateProjectIfNotExistsAsync)(ctx.exp);
135
- if (!maybeProjectId) {
136
- throw new Error('Your project must be registered with EAS in order to use the credentials manager.');
137
- }
130
+ // ensure the project exists on the EAS server
131
+ await (0, projectUtils_1.getProjectIdAsync)(ctx.exp);
138
132
  return await (0, gradle_1.resolveGradleBuildContextAsync)(ctx.projectDir, buildProfile);
139
133
  }
140
134
  async runProjectSpecificActionAsync(ctx, action, gradleContext) {
@@ -147,10 +147,8 @@ class ManageIos {
147
147
  }
148
148
  async createProjectContextAsync(ctx, account, buildProfile) {
149
149
  (0, assert_1.default)(ctx.hasProjectContext, 'createProjectContextAsync: must have project context.');
150
- const maybeProjectId = await (0, projectUtils_1.promptToCreateProjectIfNotExistsAsync)(ctx.exp);
151
- if (!maybeProjectId) {
152
- throw new Error('Your project must be registered with EAS in order to use the credentials manager.');
153
- }
150
+ // ensure the project exists on the EAS server
151
+ await (0, projectUtils_1.getProjectIdAsync)(ctx.exp);
154
152
  const app = { account, projectName: ctx.exp.slug };
155
153
  const xcodeBuildContext = await (0, scheme_1.resolveXcodeBuildContextAsync)({
156
154
  projectDir: ctx.projectDir,