eas-cli 1.0.0 → 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 (84) hide show
  1. package/README.md +72 -47
  2. package/build/analytics/events.d.ts +4 -1
  3. package/build/analytics/events.js +3 -0
  4. package/build/build/android/build.js +1 -1
  5. package/build/build/build.js +4 -4
  6. package/build/build/createContext.js +1 -0
  7. package/build/build/ios/graphql.js +0 -1
  8. package/build/build/utils/printBuildInfo.js +2 -2
  9. package/build/build/utils/repository.js +4 -4
  10. package/build/commandUtils/EasCommand.d.ts +2 -0
  11. package/build/commandUtils/EasCommand.js +44 -3
  12. package/build/commands/branch/create.js +1 -1
  13. package/build/commands/branch/delete.js +1 -1
  14. package/build/commands/branch/rename.js +2 -2
  15. package/build/commands/build/index.d.ts +2 -1
  16. package/build/commands/build/index.js +36 -18
  17. package/build/commands/channel/create.js +1 -1
  18. package/build/commands/channel/delete.js +1 -1
  19. package/build/commands/channel/edit.js +3 -3
  20. package/build/commands/channel/rollout.js +3 -3
  21. package/build/commands/channel/view.js +1 -1
  22. package/build/commands/credentials.d.ts +3 -0
  23. package/build/commands/credentials.js +6 -1
  24. package/build/commands/project/init.js +3 -1
  25. package/build/commands/secret/list.js +1 -1
  26. package/build/commands/submit.d.ts +2 -1
  27. package/build/commands/submit.js +28 -14
  28. package/build/commands/update/index.js +7 -4
  29. package/build/commands/update/list.js +1 -1
  30. package/build/credentials/android/actions/RemoveKeystore.js +1 -1
  31. package/build/credentials/android/api/GraphqlClient.js +1 -1
  32. package/build/credentials/context.d.ts +3 -0
  33. package/build/credentials/context.js +1 -0
  34. package/build/credentials/errors.js +1 -1
  35. package/build/credentials/ios/IosCredentialsProvider.d.ts +1 -0
  36. package/build/credentials/ios/IosCredentialsProvider.js +33 -5
  37. package/build/credentials/ios/actions/DistributionCertificateUtils.js +2 -2
  38. package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +1 -1
  39. package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.js +2 -2
  40. package/build/credentials/ios/actions/SetUpProvisioningProfile.js +1 -1
  41. package/build/credentials/ios/actions/SetUpSubmissionCredentials.js +1 -1
  42. package/build/credentials/ios/api/GraphqlClient.js +1 -1
  43. package/build/credentials/ios/appstore/ascApiKey.d.ts +11 -0
  44. package/build/credentials/ios/appstore/ascApiKey.js +53 -3
  45. package/build/credentials/ios/appstore/bundleIdCapabilities.js +176 -15
  46. package/build/credentials/ios/appstore/contractMessages.js +1 -1
  47. package/build/credentials/ios/appstore/ensureAppExists.js +3 -3
  48. package/build/credentials/ios/appstore/pushKey.js +2 -2
  49. package/build/credentials/manager/ManageAndroid.js +2 -8
  50. package/build/credentials/manager/ManageIos.js +2 -4
  51. package/build/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.js +1 -1
  52. package/build/credentials/manager/SelectPlatform.d.ts +2 -0
  53. package/build/credentials/manager/SelectPlatform.js +7 -12
  54. package/build/credentials/utils/promptForCredentials.js +1 -1
  55. package/build/devices/manager.js +1 -1
  56. package/build/graphql/client.js +1 -1
  57. package/build/graphql/generated.d.ts +191 -39
  58. package/build/graphql/generated.js +39 -1
  59. package/build/{credentials/ios/api/graphql → graphql}/queries/AppQuery.d.ts +1 -1
  60. package/build/{credentials/ios/api/graphql → graphql}/queries/AppQuery.js +2 -2
  61. package/build/graphql/queries/EnvironmentSecretsQuery.d.ts +1 -1
  62. package/build/graphql/queries/EnvironmentSecretsQuery.js +2 -2
  63. package/build/graphql/queries/StatuspageServiceQuery.d.ts +4 -0
  64. package/build/graphql/queries/StatuspageServiceQuery.js +28 -0
  65. package/build/graphql/types/StatuspageService.d.ts +1 -0
  66. package/build/graphql/types/StatuspageService.js +19 -0
  67. package/build/metadata/errors.js +2 -2
  68. package/build/project/ensureProjectExists.d.ts +0 -7
  69. package/build/project/ensureProjectExists.js +4 -14
  70. package/build/project/metroConfig.js +1 -1
  71. package/build/project/projectUtils.d.ts +16 -3
  72. package/build/project/projectUtils.js +47 -50
  73. package/build/submit/android/AndroidSubmitter.js +1 -1
  74. package/build/submit/submit.js +2 -2
  75. package/build/submit/utils/errors.js +11 -9
  76. package/build/update/utils.js +1 -1
  77. package/build/utils/statuspageService.d.ts +2 -0
  78. package/build/utils/statuspageService.js +41 -0
  79. package/build/vcs/local.d.ts +1 -0
  80. package/build/vcs/local.js +11 -2
  81. package/oclif.manifest.json +1 -1
  82. package/package.json +4 -7
  83. package/build/graphql/queries/ProjectQuery.d.ts +0 -6
  84. package/build/graphql/queries/ProjectQuery.js +0 -24
@@ -48,7 +48,7 @@ class SetUpProvisioningProfile {
48
48
  return (0, nullthrows_1.default)(await (0, BuildCredentialsUtils_1.getBuildCredentialsAsync)(ctx, this.app, this.distributionType));
49
49
  }
50
50
  if (ctx.nonInteractive) {
51
- throw new errors_1.MissingCredentialsNonInteractiveError('Provisioning profile is not configured correctly. Please run this command again in interactive mode.');
51
+ throw new errors_1.MissingCredentialsNonInteractiveError('Provisioning profile is not configured correctly. Run this command again in interactive mode.');
52
52
  }
53
53
  const currentProfile = await (0, BuildCredentialsUtils_1.getProvisioningProfileAsync)(ctx, this.app, this.distributionType);
54
54
  if (!currentProfile) {
@@ -38,7 +38,7 @@ class SetUpSubmissionCredentials {
38
38
  }
39
39
  async promptForAppSpecificPasswordAsync() {
40
40
  log_1.default.addNewLineIfNone();
41
- log_1.default.log(`Please enter your Apple app-specific password.`);
41
+ log_1.default.log(`Enter your Apple app-specific password.`);
42
42
  log_1.default.log((0, log_1.learnMore)('https://expo.fyi/apple-app-specific-password'));
43
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
44
  const { appSpecificPassword } = await (0, prompts_1.promptAsync)({
@@ -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");
@@ -12,6 +12,17 @@ export declare function listAscApiKeysAsync(userAuthCtx: UserAuthCtx): Promise<A
12
12
  * **Does not support App Store Connect API (CI).**
13
13
  */
14
14
  export declare function getAscApiKeyAsync(userAuthCtx: UserAuthCtx, keyId: string): Promise<AscApiKeyInfo | null>;
15
+ /**
16
+ * There is a bug in Apple's infrastructure that does not propagate newly created objects for a
17
+ * while. If the key has not propagated and you try to download it, Apple will error saying that
18
+ * the resource does not exist. We retry with exponential backoff until the key propagates and
19
+ * is available for download.
20
+ * */
21
+ export declare function downloadWithRetryAsync(key: ApiKey, { minTimeout, retries, factor, }?: {
22
+ minTimeout?: number;
23
+ retries?: number;
24
+ factor?: number;
25
+ }): Promise<string | null>;
15
26
  /**
16
27
  * Create an App Store Connect API Key.
17
28
  * **Does not support App Store Connect API (CI).**
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAscApiKeyInfo = exports.revokeAscApiKeyAsync = exports.createAscApiKeyAsync = exports.getAscApiKeyAsync = exports.listAscApiKeysAsync = void 0;
3
+ exports.getAscApiKeyInfo = exports.revokeAscApiKeyAsync = exports.createAscApiKeyAsync = exports.downloadWithRetryAsync = exports.getAscApiKeyAsync = exports.listAscApiKeysAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const apple_utils_1 = require("@expo/apple-utils");
6
- const log_1 = tslib_1.__importDefault(require("../../../log"));
6
+ const promise_retry_1 = tslib_1.__importDefault(require("promise-retry"));
7
+ const events_1 = require("../../../analytics/events");
8
+ const log_1 = tslib_1.__importStar(require("../../../log"));
7
9
  const ora_1 = require("../../../ora");
8
10
  const authenticate_1 = require("./authenticate");
9
11
  /**
@@ -49,6 +51,54 @@ async function getAscApiKeyAsync(userAuthCtx, keyId) {
49
51
  }
50
52
  }
51
53
  exports.getAscApiKeyAsync = getAscApiKeyAsync;
54
+ /**
55
+ * There is a bug in Apple's infrastructure that does not propagate newly created objects for a
56
+ * while. If the key has not propagated and you try to download it, Apple will error saying that
57
+ * the resource does not exist. We retry with exponential backoff until the key propagates and
58
+ * is available for download.
59
+ * */
60
+ async function downloadWithRetryAsync(key, { minTimeout = 1000, retries = 6, factor = 2, } = {}) {
61
+ const RESOURCE_DOES_NOT_EXIST_MESSAGE = 'The specified resource does not exist - There is no resource of type';
62
+ try {
63
+ const keyP8 = await (0, promise_retry_1.default)(async (retry, number) => {
64
+ try {
65
+ return await key.downloadAsync();
66
+ }
67
+ catch (e) {
68
+ if (e.name === 'UnexpectedAppleResponse' &&
69
+ e.message.includes(RESOURCE_DOES_NOT_EXIST_MESSAGE)) {
70
+ const secondsToRetry = Math.pow(factor, number);
71
+ log_1.default.log(`Received an unexpected response from Apple, retrying in ${secondsToRetry} seconds...`);
72
+ events_1.Analytics.logEvent(events_1.SubmissionEvent.API_KEY_DOWNLOAD_RETRY, {
73
+ errorName: e.name,
74
+ reason: e.message,
75
+ retry: number,
76
+ });
77
+ return retry(e);
78
+ }
79
+ throw e;
80
+ }
81
+ }, {
82
+ retries,
83
+ factor,
84
+ minTimeout,
85
+ });
86
+ events_1.Analytics.logEvent(events_1.SubmissionEvent.API_KEY_DOWNLOAD_SUCCESS, {});
87
+ return keyP8;
88
+ }
89
+ catch (e) {
90
+ if (e.name === 'UnexpectedAppleResponse' &&
91
+ e.message.includes(RESOURCE_DOES_NOT_EXIST_MESSAGE)) {
92
+ log_1.default.warn(`Unable to download Api Key from Apple at this time. Create and upload your key manually by running 'eas credentials' ${(0, log_1.learnMore)('https://expo.fyi/creating-asc-api-key')}`);
93
+ }
94
+ events_1.Analytics.logEvent(events_1.SubmissionEvent.API_KEY_DOWNLOAD_FAIL, {
95
+ errorName: e.name,
96
+ reason: e.message,
97
+ });
98
+ throw e;
99
+ }
100
+ }
101
+ exports.downloadWithRetryAsync = downloadWithRetryAsync;
52
102
  /**
53
103
  * Create an App Store Connect API Key.
54
104
  * **Does not support App Store Connect API (CI).**
@@ -63,7 +113,7 @@ async function createAscApiKeyAsync(userAuthCtx, { nickname, allAppsVisible, rol
63
113
  roles: roles !== null && roles !== void 0 ? roles : [apple_utils_1.UserRole.ADMIN],
64
114
  keyType: keyType !== null && keyType !== void 0 ? keyType : apple_utils_1.ApiKeyType.PUBLIC_API,
65
115
  });
66
- const keyP8 = await key.downloadAsync();
116
+ const keyP8 = await downloadWithRetryAsync(key);
67
117
  if (!keyP8) {
68
118
  const { nickname, roles } = key.attributes;
69
119
  const humanReadableKey = `App Store Connect Key '${nickname}' (${key.id}) with roles {${roles.join(',')}}`;
@@ -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,
@@ -59,7 +59,7 @@ async function getRequiredContractMessagesAsync(context) {
59
59
  // There is a small chance that this could result in a false positive if the messages are extraneous, so we'll also
60
60
  // prompt the user to open an issue so we can address the new contract state if it ever appears.
61
61
  // TODO: Maybe a silent analytic would be better
62
- log_1.default.error(`\nUnexpected Apple developer contract status "${status}". Please open an issue on https://github.com/expo/eas-cli`);
62
+ log_1.default.error(`\nUnexpected Apple developer contract status "${status}". Open an issue on https://github.com/expo/eas-cli`);
63
63
  log_1.default.newLine();
64
64
  return { messages: (_b = (await getContractMessagesAsync(context))) !== null && _b !== void 0 ? _b : [], isFatal: false };
65
65
  }
@@ -36,7 +36,7 @@ async function ensureBundleIdExistsWithNameAsync(authCtx, { name, bundleIdentifi
36
36
  }
37
37
  catch (err) {
38
38
  if (err.message.match(/An App ID with Identifier '(.*)' is not available/)) {
39
- spinner.fail(`The bundle identifier ${chalk_1.default.bold(bundleIdentifier)} is not available to team "${authCtx.team.name}" (${authCtx.team.id}), please change it in your app config and try again.`);
39
+ spinner.fail(`The bundle identifier ${chalk_1.default.bold(bundleIdentifier)} is not available to team "${authCtx.team.name}" (${authCtx.team.id}), change it in your app config and try again.`);
40
40
  }
41
41
  else {
42
42
  spinner.fail(`Failed to register bundle identifier ${chalk_1.default.dim(bundleIdentifier)}`);
@@ -123,11 +123,11 @@ async function ensureAppExistsAsync(userAuthCtx, { name, language, companyName,
123
123
  }
124
124
  catch (error) {
125
125
  if (error.message.match(/An App ID with Identifier '(.*)' is not available/)) {
126
- throw new Error(`\nThe bundle identifier "${bundleIdentifier}" is not available to provider "${(_a = userAuthCtx.authState) === null || _a === void 0 ? void 0 : _a.session.provider.name}. Please change it in your app config and try again.\n`);
126
+ throw new Error(`\nThe bundle identifier "${bundleIdentifier}" is not available to provider "${(_a = userAuthCtx.authState) === null || _a === void 0 ? void 0 : _a.session.provider.name}. Change it in your app config and try again.\n`);
127
127
  }
128
128
  spinner.fail(`Failed to create App Store app ${chalk_1.default.dim(name)}`);
129
129
  error.message +=
130
- '\nPlease visit https://appstoreconnect.apple.com and resolve any warnings, then try again.';
130
+ '\nVisit https://appstoreconnect.apple.com and resolve any warnings, then try again.';
131
131
  throw error;
132
132
  }
133
133
  }
@@ -11,8 +11,8 @@ const authenticate_1 = require("./authenticate");
11
11
  const { MaxKeysCreatedError } = apple_utils_1.Keys;
12
12
  exports.APPLE_KEYS_TOO_MANY_GENERATED_ERROR = `
13
13
  You can have only ${chalk_1.default.underline('two')} Apple Keys generated on your Apple Developer account.
14
- Please revoke the old ones or reuse existing from your other apps.
15
- Please remember that Apple Keys are not application specific!
14
+ Revoke the old ones or reuse existing from your other apps.
15
+ Remember that Apple Keys are not application specific!
16
16
  `;
17
17
  /**
18
18
  * List all existing push keys on Apple servers.
@@ -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,
@@ -39,7 +39,7 @@ class SelectIosDistributionTypeGraphqlFromBuildProfile {
39
39
  return generated_1.IosDistributionType.AdHoc;
40
40
  }
41
41
  if (ctx.nonInteractive) {
42
- throw new Error('Unable to determine type of internal distribution. Please run this command in interactive mode.');
42
+ throw new Error('Unable to determine type of internal distribution. Run this command in interactive mode.');
43
43
  }
44
44
  // ask the user as a last resort
45
45
  const { iosDistributionTypeGraphql } = await (0, prompts_1.promptAsync)({
@@ -1,3 +1,5 @@
1
1
  export declare class SelectPlatform {
2
+ private readonly flagPlatform?;
3
+ constructor(flagPlatform?: string | undefined);
2
4
  runAsync(): Promise<void>;
3
5
  }
@@ -1,24 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SelectPlatform = void 0;
4
- const prompts_1 = require("../../prompts");
4
+ const platform_1 = require("../../platform");
5
5
  const ManageAndroid_1 = require("./ManageAndroid");
6
6
  const ManageIos_1 = require("./ManageIos");
7
7
  class SelectPlatform {
8
+ constructor(flagPlatform) {
9
+ this.flagPlatform = flagPlatform;
10
+ }
8
11
  async runAsync() {
9
- const { platform } = await (0, prompts_1.promptAsync)({
10
- type: 'select',
11
- name: 'platform',
12
- message: 'Select platform',
13
- choices: [
14
- { value: 'android', title: 'Android' },
15
- { value: 'ios', title: 'iOS' },
16
- ],
17
- });
12
+ const platform = await (0, platform_1.selectPlatformAsync)(this.flagPlatform);
18
13
  if (platform === 'ios') {
19
- return await new ManageIos_1.ManageIos(new SelectPlatform(), process.cwd()).runAsync();
14
+ return await new ManageIos_1.ManageIos(new SelectPlatform(platform), process.cwd()).runAsync();
20
15
  }
21
- return await new ManageAndroid_1.ManageAndroid(new SelectPlatform(), process.cwd()).runAsync();
16
+ return await new ManageAndroid_1.ManageAndroid(new SelectPlatform(platform), process.cwd()).runAsync();
22
17
  }
23
18
  }
24
19
  exports.SelectPlatform = SelectPlatform;
@@ -14,7 +14,7 @@ const EXPERT_PROMPT = () => {
14
14
  }
15
15
  log_1.default.warn(`
16
16
  In this mode, we won't be able to make sure that your credentials are valid.
17
- Please double check that you're uploading valid files for your app otherwise you may encounter strange errors!
17
+ Double check that you're uploading valid files for your app otherwise you may encounter strange errors!
18
18
  When building for IOS make sure you've created your App ID on the Apple Developer Portal, that your App ID
19
19
  is in app.json as \`bundleIdentifier\`, and that the provisioning profile you
20
20
  upload matches that Team ID and App ID.
@@ -17,7 +17,7 @@ Internal distribution means that you won't need upload your app archive to App S
17
17
  Your app archive (.ipa) will be installable on your equipment as long as you sign your application with an adhoc provisiong profile.
18
18
  The provisioning profile needs to contain the UDIDs (unique identifiers) of your iPhones and iPads.
19
19
 
20
- First of all, please choose the Expo account under which you want to register your devices.
20
+ First of all, choose the Expo account under which you want to register your devices.
21
21
  Later, authenticate with Apple and choose your desired Apple Team (if your Apple ID has access to multiple teams).`;
22
22
  class DeviceManager {
23
23
  constructor(ctx) {
@@ -47,7 +47,7 @@ async function withErrorHandlingAsync(promise) {
47
47
  const { data, error } = await promise;
48
48
  if (error) {
49
49
  if (error.graphQLErrors.some(e => { var _a; return (_a = e === null || e === void 0 ? void 0 : e.extensions) === null || _a === void 0 ? void 0 : _a.isTransient; })) {
50
- log_1.default.error(`We've encountered a transient error, please try again shortly.`);
50
+ log_1.default.error(`We've encountered a transient error. Try again shortly.`);
51
51
  }
52
52
  throw error;
53
53
  }