eas-cli 9.0.3 → 9.0.5

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 (224) hide show
  1. package/README.md +59 -59
  2. package/build/analytics/AnalyticsManager.js +4 -5
  3. package/build/api.js +1 -2
  4. package/build/branch/actions/SelectBranch.js +2 -3
  5. package/build/branch/queries.js +3 -5
  6. package/build/branch/utils.js +1 -1
  7. package/build/build/android/build.js +3 -5
  8. package/build/build/android/graphql.js +1 -2
  9. package/build/build/android/prepareJob.js +1 -2
  10. package/build/build/android/syncProjectConfiguration.js +1 -1
  11. package/build/build/android/version.js +14 -16
  12. package/build/build/build.js +8 -10
  13. package/build/build/createContext.js +7 -8
  14. package/build/build/ios/build.js +2 -4
  15. package/build/build/ios/credentials.js +1 -2
  16. package/build/build/ios/graphql.js +4 -6
  17. package/build/build/ios/prepareJob.js +5 -6
  18. package/build/build/ios/syncProjectConfiguration.js +1 -1
  19. package/build/build/ios/version.js +17 -20
  20. package/build/build/local.js +2 -3
  21. package/build/build/metadata.js +9 -10
  22. package/build/build/queries.js +6 -9
  23. package/build/build/runBuildAndSubmit.d.ts +3 -1
  24. package/build/build/runBuildAndSubmit.js +19 -13
  25. package/build/build/utils/appJson.js +1 -2
  26. package/build/build/utils/formatBuild.js +5 -8
  27. package/build/build/utils/printBuildInfo.js +1 -2
  28. package/build/build/utils/resourceClass.js +3 -4
  29. package/build/build/utils/url.js +1 -2
  30. package/build/build/validate.js +8 -11
  31. package/build/channel/actions/SelectChannel.js +2 -3
  32. package/build/channel/errors.js +1 -1
  33. package/build/channel/queries.js +6 -10
  34. package/build/channel/utils.js +1 -1
  35. package/build/commandUtils/EasCommand.js +7 -6
  36. package/build/commandUtils/builds.js +3 -3
  37. package/build/commandUtils/context/DynamicProjectConfigContextField.js +2 -2
  38. package/build/commandUtils/context/LoggedInContextField.js +1 -2
  39. package/build/commandUtils/context/MaybeLoggedInContextField.js +2 -3
  40. package/build/commandUtils/context/VcsClientContextField.js +1 -1
  41. package/build/commandUtils/context/contextUtils/createGraphqlClient.js +1 -1
  42. package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +4 -6
  43. package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +2 -4
  44. package/build/commandUtils/gating/FeatureGateEnvOverrides.js +1 -2
  45. package/build/commandUtils/pagination.js +3 -4
  46. package/build/commands/account/view.js +1 -2
  47. package/build/commands/branch/delete.js +1 -2
  48. package/build/commands/build/configure.js +1 -2
  49. package/build/commands/build/index.js +1 -2
  50. package/build/commands/build/internal.js +1 -2
  51. package/build/commands/build/resign.js +7 -7
  52. package/build/commands/build/run.js +2 -3
  53. package/build/commands/build/version/get.js +3 -4
  54. package/build/commands/build/version/set.js +5 -6
  55. package/build/commands/build/version/sync.js +5 -7
  56. package/build/commands/channel/rollout.js +1 -2
  57. package/build/commands/config.js +16 -14
  58. package/build/commands/credentials/configure-build.js +3 -3
  59. package/build/commands/credentials/index.js +1 -1
  60. package/build/commands/device/create.js +1 -1
  61. package/build/commands/device/rename.js +1 -1
  62. package/build/commands/diagnostics.js +6 -2
  63. package/build/commands/project/init.js +11 -9
  64. package/build/commands/project/onboarding.js +192 -20
  65. package/build/commands/secret/delete.js +5 -5
  66. package/build/commands/update/index.js +5 -6
  67. package/build/commands/update/republish.js +1 -2
  68. package/build/commands/update/roll-back-to-embedded.js +3 -4
  69. package/build/credentials/android/AndroidCredentialsProvider.js +4 -5
  70. package/build/credentials/android/actions/BuildCredentialsUtils.js +2 -3
  71. package/build/credentials/android/actions/DownloadKeystore.js +2 -3
  72. package/build/credentials/android/actions/RemoveFcm.js +1 -1
  73. package/build/credentials/android/actions/SetUpBuildCredentials.js +3 -5
  74. package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForFcmV1.js +3 -3
  75. package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForSubmissions.js +3 -3
  76. package/build/credentials/android/api/GraphqlClient.js +4 -8
  77. package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.js +1 -2
  78. package/build/credentials/android/utils/printCredentials.js +4 -4
  79. package/build/credentials/context.js +2 -3
  80. package/build/credentials/credentialsJson/update.js +14 -16
  81. package/build/credentials/errors.js +7 -5
  82. package/build/credentials/ios/IosCredentialsProvider.js +3 -4
  83. package/build/credentials/ios/actions/AscApiKeyUtils.js +5 -9
  84. package/build/credentials/ios/actions/AssignAscApiKey.js +2 -3
  85. package/build/credentials/ios/actions/AssignPushKey.js +2 -3
  86. package/build/credentials/ios/actions/BuildCredentialsUtils.js +3 -5
  87. package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +1 -1
  88. package/build/credentials/ios/actions/CreateProvisioningProfile.js +2 -3
  89. package/build/credentials/ios/actions/DistributionCertificateUtils.js +3 -4
  90. package/build/credentials/ios/actions/ProvisioningProfileUtils.js +2 -3
  91. package/build/credentials/ios/actions/PushKeyUtils.js +5 -5
  92. package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +3 -4
  93. package/build/credentials/ios/actions/SetUpAscApiKey.js +1 -1
  94. package/build/credentials/ios/actions/SetUpBuildCredentials.js +3 -4
  95. package/build/credentials/ios/actions/SetUpDistributionCertificate.js +1 -2
  96. package/build/credentials/ios/actions/SetUpProvisioningProfile.js +2 -3
  97. package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.js +2 -3
  98. package/build/credentials/ios/api/GraphqlClient.js +11 -15
  99. package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +2 -2
  100. package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +2 -2
  101. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +2 -4
  102. package/build/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.js +1 -2
  103. package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.js +2 -4
  104. package/build/credentials/ios/appstore/AppStoreApi.js +1 -2
  105. package/build/credentials/ios/appstore/ascApiKey.js +6 -8
  106. package/build/credentials/ios/appstore/authenticate.js +2 -4
  107. package/build/credentials/ios/appstore/bundleIdCapabilities.js +1 -1
  108. package/build/credentials/ios/appstore/contractMessages.js +3 -5
  109. package/build/credentials/ios/appstore/distributionCertificate.js +2 -3
  110. package/build/credentials/ios/appstore/ensureAppExists.js +1 -2
  111. package/build/credentials/ios/appstore/provisioningProfileAdhoc.js +5 -7
  112. package/build/credentials/ios/appstore/pushKey.js +2 -3
  113. package/build/credentials/ios/appstore/resolveCredentials.js +8 -9
  114. package/build/credentials/ios/errors.js +1 -1
  115. package/build/credentials/ios/utils/p12Certificate.js +1 -2
  116. package/build/credentials/ios/utils/provisioningProfile.js +1 -2
  117. package/build/credentials/ios/validators/validateProvisioningProfile.js +5 -7
  118. package/build/credentials/manager/ManageAndroid.js +2 -2
  119. package/build/credentials/manager/ManageIos.js +3 -4
  120. package/build/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.js +1 -2
  121. package/build/credentials/manager/SetDefaultAndroidKeystore.js +1 -1
  122. package/build/credentials/manager/SetUpAndroidBuildCredentials.js +2 -2
  123. package/build/credentials/manager/SetUpIosBuildCredentials.js +2 -2
  124. package/build/credentials/utils/promptForCredentials.js +2 -3
  125. package/build/devices/actions/create/currentMachineMethod.js +4 -5
  126. package/build/devices/actions/create/developerPortalMethod.js +1 -2
  127. package/build/devices/actions/create/inputMethod.js +1 -1
  128. package/build/devices/context.js +1 -1
  129. package/build/devices/queries.js +3 -6
  130. package/build/devices/utils/errors.js +2 -2
  131. package/build/devices/utils/formatDevice.js +4 -6
  132. package/build/graphql/client.js +5 -8
  133. package/build/graphql/generated.d.ts +42 -0
  134. package/build/graphql/mutations/AppMutation.js +1 -2
  135. package/build/graphql/mutations/AppVersionMutation.js +1 -2
  136. package/build/graphql/mutations/BuildMutation.js +4 -8
  137. package/build/graphql/mutations/UserPreferencesMutation.js +2 -3
  138. package/build/graphql/queries/AppVersionQuery.js +1 -2
  139. package/build/graphql/queries/BranchQuery.js +1 -2
  140. package/build/graphql/queries/BuildQuery.js +1 -2
  141. package/build/graphql/queries/EnvironmentSecretsQuery.js +2 -3
  142. package/build/graphql/queries/SubmissionQuery.js +1 -2
  143. package/build/graphql/queries/WebhookQuery.js +1 -2
  144. package/build/graphql/types/App.js +1 -0
  145. package/build/log.js +2 -2
  146. package/build/metadata/apple/config/reader.js +26 -32
  147. package/build/metadata/apple/config/writer.js +35 -39
  148. package/build/metadata/apple/rules/infoKeywordLength.js +2 -4
  149. package/build/metadata/apple/rules/infoRestrictedWords.js +2 -4
  150. package/build/metadata/apple/tasks/app-review-detail.js +1 -2
  151. package/build/metadata/apple/tasks/app-version.js +6 -8
  152. package/build/metadata/auth.js +1 -2
  153. package/build/metadata/config/resolve.js +2 -3
  154. package/build/metadata/config/validate.js +2 -4
  155. package/build/metadata/errors.js +3 -5
  156. package/build/metadata/upload.js +1 -2
  157. package/build/metadata/utils/retry.js +1 -2
  158. package/build/metadata/utils/telemetry.js +8 -11
  159. package/build/onboarding/runCommand.js +2 -2
  160. package/build/ora.js +1 -1
  161. package/build/project/android/applicationId.js +3 -4
  162. package/build/project/android/gradle.js +3 -4
  163. package/build/project/android/gradleUtils.js +4 -5
  164. package/build/project/expoConfig.js +3 -4
  165. package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +3 -5
  166. package/build/project/ios/bundleIdentifier.js +7 -8
  167. package/build/project/ios/entitlements.js +1 -2
  168. package/build/project/ios/scheme.js +7 -6
  169. package/build/project/ios/target.js +17 -23
  170. package/build/project/metroConfig.js +1 -2
  171. package/build/project/projectUtils.js +5 -7
  172. package/build/project/publish.js +18 -27
  173. package/build/project/remoteVersionSource.js +6 -7
  174. package/build/project/resolveRuntimeVersionAsync.d.ts +2 -1
  175. package/build/project/resolveRuntimeVersionAsync.js +3 -4
  176. package/build/prompts.js +5 -7
  177. package/build/rollout/actions/CreateRollout.js +4 -5
  178. package/build/rollout/actions/EditRollout.js +1 -2
  179. package/build/rollout/actions/EndRollout.js +2 -4
  180. package/build/rollout/actions/ManageRollout.js +1 -2
  181. package/build/rollout/actions/NonInteractiveRollout.js +1 -2
  182. package/build/rollout/actions/SelectRuntime.js +2 -4
  183. package/build/rollout/utils.js +4 -5
  184. package/build/run/android/adb.js +4 -7
  185. package/build/run/ios/xcode.js +1 -2
  186. package/build/run/ios/xcrun.js +1 -2
  187. package/build/run/utils.js +2 -4
  188. package/build/submit/ArchiveSource.js +1 -1
  189. package/build/submit/android/AndroidSubmitCommand.js +3 -5
  190. package/build/submit/android/AndroidSubmitter.js +3 -3
  191. package/build/submit/android/ServiceAccountSource.js +1 -2
  192. package/build/submit/ios/AppProduce.js +5 -4
  193. package/build/submit/ios/AppSpecificPasswordSource.js +2 -2
  194. package/build/submit/ios/AscApiKeySource.js +5 -3
  195. package/build/submit/ios/IosSubmitCommand.js +2 -3
  196. package/build/submit/ios/IosSubmitter.js +1 -1
  197. package/build/submit/ios/utils/language.js +3 -4
  198. package/build/submit/submit.js +2 -3
  199. package/build/submit/utils/errors.js +1 -2
  200. package/build/submit/utils/wait.js +1 -1
  201. package/build/update/android/UpdatesModule.js +1 -2
  202. package/build/update/configure.js +11 -14
  203. package/build/update/ios/UpdatesModule.js +2 -4
  204. package/build/update/queries.js +6 -10
  205. package/build/update/utils.js +28 -39
  206. package/build/user/SessionManager.js +5 -8
  207. package/build/user/User.js +2 -2
  208. package/build/user/expoSsoLauncher.js +1 -2
  209. package/build/utils/code-signing.js +4 -7
  210. package/build/utils/expoCli.js +1 -2
  211. package/build/utils/expoUpdatesCli.d.ts +1 -0
  212. package/build/utils/expoUpdatesCli.js +3 -2
  213. package/build/utils/profiles.js +3 -3
  214. package/build/utils/progress.js +2 -2
  215. package/build/utils/relay.js +10 -14
  216. package/build/utils/timer.js +1 -2
  217. package/build/vcs/clients/git.d.ts +1 -1
  218. package/build/vcs/clients/git.js +24 -20
  219. package/build/vcs/git.d.ts +1 -1
  220. package/build/vcs/git.js +4 -2
  221. package/build/vcs/local.js +1 -2
  222. package/build/webhooks/input.js +2 -2
  223. package/oclif.manifest.json +1 -1
  224. package/package.json +3 -3
@@ -7,16 +7,15 @@ const FeatureGateEnvOverrides_1 = tslib_1.__importDefault(require("../gating/Fea
7
7
  const FeatureGating_1 = tslib_1.__importDefault(require("../gating/FeatureGating"));
8
8
  class MaybeLoggedInContextField extends ContextField_1.default {
9
9
  async getValueAsync({ sessionManager }) {
10
- var _a;
11
10
  const authenticationInfo = {
12
11
  accessToken: sessionManager.getAccessToken(),
13
12
  sessionSecret: sessionManager.getSessionSecret(),
14
13
  };
15
14
  const graphqlClient = (0, createGraphqlClient_1.createGraphqlClient)(authenticationInfo);
16
15
  const actor = await sessionManager.getUserAsync();
17
- const featureGateServerValues = (_a = actor === null || actor === void 0 ? void 0 : actor.featureGates) !== null && _a !== void 0 ? _a : {};
16
+ const featureGateServerValues = actor?.featureGates ?? {};
18
17
  return {
19
- actor: actor !== null && actor !== void 0 ? actor : null,
18
+ actor: actor ?? null,
20
19
  featureGating: new FeatureGating_1.default(featureGateServerValues, new FeatureGateEnvOverrides_1.default()),
21
20
  graphqlClient,
22
21
  };
@@ -13,7 +13,7 @@ class VcsClientContextField extends ContextField_1.default {
13
13
  const projectDir = await (0, findProjectDirAndVerifyProjectSetupAsync_1.findProjectDirAndVerifyProjectSetupAsync)();
14
14
  const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
15
15
  const config = await eas_json_1.EasJsonUtils.getCliConfigAsync(easJsonAccessor);
16
- return (0, vcs_1.resolveVcsClient)(config === null || config === void 0 ? void 0 : config.requireCommit);
16
+ return (0, vcs_1.resolveVcsClient)(config?.requireCommit);
17
17
  }
18
18
  }
19
19
  exports.default = VcsClientContextField;
@@ -17,7 +17,7 @@ function createGraphqlClient(authInfo) {
17
17
  retryIf: (err, operation) => {
18
18
  return !!(err &&
19
19
  !operation.context.noRetry &&
20
- (err.networkError || err.graphQLErrors.some(e => { var _a; return (_a = e === null || e === void 0 ? void 0 : e.extensions) === null || _a === void 0 ? void 0 : _a.isTransient; })));
20
+ (err.networkError || err.graphQLErrors.some(e => e?.extensions?.isTransient)));
21
21
  },
22
22
  }),
23
23
  core_1.fetchExchange,
@@ -15,12 +15,11 @@ const vcs_1 = require("../../../vcs");
15
15
  async function applyCliConfigAsync(projectDir) {
16
16
  const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
17
17
  const config = await eas_json_1.EasJsonUtils.getCliConfigAsync(easJsonAccessor);
18
- if ((config === null || config === void 0 ? void 0 : config.version) && !semver_1.default.satisfies(easCli_1.easCliVersion, config.version)) {
18
+ if (config?.version && !semver_1.default.satisfies(easCli_1.easCliVersion, config.version)) {
19
19
  throw new Error(`You are on eas-cli@${easCli_1.easCliVersion} which does not satisfy the CLI version constraint defined in eas.json (${config.version}).\n\nThis error probably means that you need update your eas-cli to a newer version.\nRun ${chalk_1.default.bold('npm install -g eas-cli')} to update the eas-cli to the latest version.`);
20
20
  }
21
21
  }
22
22
  async function ensureEasCliIsNotInDependenciesAsync(projectDir) {
23
- var _a;
24
23
  let printCliVersionWarning = false;
25
24
  const consoleWarn = (msg) => {
26
25
  if (msg) {
@@ -36,7 +35,7 @@ async function ensureEasCliIsNotInDependenciesAsync(projectDir) {
36
35
  printCliVersionWarning = true;
37
36
  consoleWarn(`Found ${chalk_1.default.bold('eas-cli')} in your project dependencies.`);
38
37
  }
39
- const maybeRepoRoot = (_a = PackageManagerUtils.findWorkspaceRoot(projectDir)) !== null && _a !== void 0 ? _a : projectDir;
38
+ const maybeRepoRoot = PackageManagerUtils.findWorkspaceRoot(projectDir) ?? projectDir;
40
39
  if (maybeRepoRoot !== projectDir && (await isEasCliInDependenciesAsync(maybeRepoRoot))) {
41
40
  printCliVersionWarning = true;
42
41
  consoleWarn(`Found ${chalk_1.default.bold('eas-cli')} in your monorepo dependencies.`);
@@ -48,11 +47,10 @@ async function ensureEasCliIsNotInDependenciesAsync(projectDir) {
48
47
  }
49
48
  }
50
49
  async function isEasCliInDependenciesAsync(dir) {
51
- var _a, _b;
52
50
  const packageJsonPath = path_1.default.join(dir, 'package.json');
53
51
  const packageJson = JSON.parse(await fs_extra_1.default.readFile(packageJsonPath, 'utf8'));
54
- return (((_a = packageJson === null || packageJson === void 0 ? void 0 : packageJson.dependencies) === null || _a === void 0 ? void 0 : _a['eas-cli']) !== undefined ||
55
- ((_b = packageJson === null || packageJson === void 0 ? void 0 : packageJson.devDependencies) === null || _b === void 0 ? void 0 : _b['eas-cli']) !== undefined);
52
+ return (packageJson?.dependencies?.['eas-cli'] !== undefined ||
53
+ packageJson?.devDependencies?.['eas-cli'] !== undefined);
56
54
  }
57
55
  /**
58
56
  * @returns the project root directory.
@@ -19,10 +19,9 @@ const User_1 = require("../../../user/User");
19
19
  * @deprecated Should not be used outside of context functions except in the init command.
20
20
  */
21
21
  async function saveProjectIdToAppConfigAsync(projectDir, projectId, options = {}) {
22
- var _a;
23
22
  const exp = (0, expoConfig_1.getPrivateExpoConfig)(projectDir, options);
24
23
  const result = await (0, expoConfig_1.createOrModifyExpoConfigAsync)(projectDir, {
25
- extra: { ...exp.extra, eas: { ...(_a = exp.extra) === null || _a === void 0 ? void 0 : _a.eas, projectId } },
24
+ extra: { ...exp.extra, eas: { ...exp.extra?.eas, projectId } },
26
25
  }, { skipSDKVersionRequirement: true });
27
26
  switch (result.type) {
28
27
  case 'success':
@@ -68,8 +67,7 @@ async function getProjectIdAsync(sessionManager, exp, options) {
68
67
  }
69
68
  exports.getProjectIdAsync = getProjectIdAsync;
70
69
  async function validateOrSetProjectIdAsync({ exp, graphqlClient, actor, options, }) {
71
- var _a, _b;
72
- const localProjectId = (_b = (_a = exp.extra) === null || _a === void 0 ? void 0 : _a.eas) === null || _b === void 0 ? void 0 : _b.projectId;
70
+ const localProjectId = exp.extra?.eas?.projectId;
73
71
  if (localProjectId) {
74
72
  if (typeof localProjectId !== 'string') {
75
73
  throw new Error(`Project config: "extra.eas.projectId" must be a string, found ${typeof localProjectId}. If you're not sure how to set it up on your own, remove the property entirely and it will be automatically configured on the next EAS CLI run.`);
@@ -25,8 +25,7 @@ class FeatureGateEnvOverrides {
25
25
  }
26
26
  }
27
27
  isOverridden(key) {
28
- var _a;
29
- return (_a = this.map.has(key)) !== null && _a !== void 0 ? _a : false;
28
+ return this.map.has(key) ?? false;
30
29
  }
31
30
  getOverride(key) {
32
31
  return (0, nullthrows_1.default)(this.map.get(key));
@@ -3,12 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EasPaginatedQueryFlags = exports.getLimitFlagWithCustomValues = exports.getPaginatedQueryOptions = void 0;
4
4
  const core_1 = require("@oclif/core");
5
5
  const getPaginatedQueryOptions = (flags) => {
6
- var _a, _b, _c;
7
6
  return {
8
7
  ...('limit' in flags && { limit: flags.limit }),
9
- offset: (_a = flags.offset) !== null && _a !== void 0 ? _a : 0,
10
- nonInteractive: (_b = flags['non-interactive']) !== null && _b !== void 0 ? _b : false,
11
- json: (_c = flags.json) !== null && _c !== void 0 ? _c : false,
8
+ offset: flags.offset ?? 0,
9
+ nonInteractive: flags['non-interactive'] ?? false,
10
+ json: flags.json ?? false,
12
11
  };
13
12
  };
14
13
  exports.getPaginatedQueryOptions = getPaginatedQueryOptions;
@@ -31,11 +31,10 @@ class AccountView extends EasCommand_1.default {
31
31
  }
32
32
  }
33
33
  static getRoleOnAccount(actor, account) {
34
- var _b;
35
34
  if ('username' in actor && account.name === actor.username) {
36
35
  return generated_1.Role.Owner;
37
36
  }
38
- return (0, nullthrows_1.default)((_b = account.users.find(user => user.actor.id === actor.id)) === null || _b === void 0 ? void 0 : _b.role);
37
+ return (0, nullthrows_1.default)(account.users.find(user => user.actor.id === actor.id)?.role);
39
38
  }
40
39
  static getLabelForRole(role) {
41
40
  switch (role) {
@@ -52,7 +52,6 @@ async function deleteBranchOnAppAsync(graphqlClient, { branchId }) {
52
52
  }
53
53
  class BranchDelete extends EasCommand_1.default {
54
54
  async runAsync() {
55
- var _b, _c;
56
55
  let { args: { name: branchName }, flags, } = await this.parse(_a);
57
56
  const { json: jsonFlag, 'non-interactive': nonInteractive } = flags;
58
57
  const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
@@ -74,7 +73,7 @@ class BranchDelete extends EasCommand_1.default {
74
73
  }));
75
74
  }
76
75
  const data = await getBranchInfoAsync(graphqlClient, { appId: projectId, name: branchName });
77
- const branchId = (_c = (_b = data.app) === null || _b === void 0 ? void 0 : _b.byId.updateBranchByName) === null || _c === void 0 ? void 0 : _c.id;
76
+ const branchId = data.app?.byId.updateBranchByName?.id;
78
77
  if (!branchId) {
79
78
  throw new Error(`Could not find branch ${branchName} on ${projectDisplayName}`);
80
79
  }
@@ -18,7 +18,6 @@ const configure_2 = require("../../update/configure");
18
18
  const UpdatesModule_2 = require("../../update/ios/UpdatesModule");
19
19
  class BuildConfigure extends EasCommand_1.default {
20
20
  async runAsync() {
21
- var _b;
22
21
  const { flags } = await this.parse(_a);
23
22
  const { privateProjectConfig: { exp, projectId, projectDir }, vcsClient, } = await this.getContextAsync(_a, {
24
23
  nonInteractive: false,
@@ -27,7 +26,7 @@ class BuildConfigure extends EasCommand_1.default {
27
26
  // BuildConfigure.ContextOptions.Vcs.client.getValueAsync()
28
27
  await vcsClient.ensureRepoExistsAsync();
29
28
  const expoUpdatesIsInstalled = (0, projectUtils_1.isExpoUpdatesInstalled)(projectDir);
30
- const platform = (_b = flags.platform) !== null && _b !== void 0 ? _b : (await promptForPlatformAsync());
29
+ const platform = flags.platform ?? (await promptForPlatformAsync());
31
30
  // clean up old Android configuration
32
31
  if ([platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.All].includes(platform)) {
33
32
  await (0, syncProjectConfiguration_1.cleanUpOldEasBuildGradleScriptAsync)(projectDir);
@@ -42,7 +42,6 @@ class Build extends EasCommand_1.default {
42
42
  await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(graphqlClient, analytics, vcsClient, projectDir, flagsWithPlatform, actor, getDynamicPrivateProjectConfigAsync);
43
43
  }
44
44
  sanitizeFlags(flags) {
45
- var _b;
46
45
  const nonInteractive = flags['non-interactive'];
47
46
  if (!flags.local && flags.output) {
48
47
  core_1.Errors.error('--output is allowed only for local builds', { exit: 1 });
@@ -85,7 +84,7 @@ class Build extends EasCommand_1.default {
85
84
  clearCache: flags['clear-cache'],
86
85
  json: flags['json'],
87
86
  autoSubmit: flags['auto-submit'] || flags['auto-submit-with-profile'] !== undefined,
88
- submitProfile: (_b = flags['auto-submit-with-profile']) !== null && _b !== void 0 ? _b : profile,
87
+ submitProfile: flags['auto-submit-with-profile'] ?? profile,
89
88
  resourceClass: flags['resource-class'],
90
89
  message,
91
90
  buildLoggerLevel: flags['build-logger-level'],
@@ -17,7 +17,6 @@ const gitNoCommit_1 = tslib_1.__importDefault(require("../../vcs/clients/gitNoCo
17
17
  */
18
18
  class BuildInternal extends EasCommand_1.default {
19
19
  async runAsync() {
20
- var _b;
21
20
  const { flags } = await this.parse(_a);
22
21
  // This command is always run with implicit --non-interactive and --json options
23
22
  (0, json_1.enableJsonOutput)();
@@ -38,7 +37,7 @@ class BuildInternal extends EasCommand_1.default {
38
37
  localBuildOptions: {
39
38
  localBuildMode: local_1.LocalBuildMode.INTERNAL,
40
39
  },
41
- submitProfile: (_b = flags['auto-submit-with-profile']) !== null && _b !== void 0 ? _b : flags.profile,
40
+ submitProfile: flags['auto-submit-with-profile'] ?? flags.profile,
42
41
  }, actor, getDynamicPrivateProjectConfigAsync);
43
42
  }
44
43
  }
@@ -30,7 +30,6 @@ const json_1 = require("../../utils/json");
30
30
  const statuspageService_1 = require("../../utils/statuspageService");
31
31
  class BuildResign extends EasCommand_1.default {
32
32
  async runAsync() {
33
- var _b, _c, _d, _e, _f;
34
33
  const { flags: rawFlags } = await this.parse(_a);
35
34
  if (rawFlags.json) {
36
35
  (0, json_1.enableJsonOutput)();
@@ -43,15 +42,16 @@ class BuildResign extends EasCommand_1.default {
43
42
  const maybeBuild = flags.maybeBuildId
44
43
  ? await this.maybeGetBuildAsync(graphqlClient, flags.maybeBuildId)
45
44
  : undefined;
46
- const platform = (_b = maybeBuild === null || maybeBuild === void 0 ? void 0 : maybeBuild.platform.toLowerCase()) !== null && _b !== void 0 ? _b : (await (0, platform_1.selectPlatformAsync)(flags.platform));
45
+ const platform = maybeBuild?.platform.toLowerCase() ??
46
+ (await (0, platform_1.selectPlatformAsync)(flags.platform));
47
47
  if (platform === eas_build_job_1.Platform.ANDROID) {
48
48
  throw new Error('Re-signing archives is not supported on Android yet.');
49
49
  }
50
50
  await (0, _1.handleDeprecatedEasJsonAsync)(projectDir, flags.nonInteractive);
51
51
  await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)(graphqlClient, [generated_1.StatuspageServiceName.EasBuild]);
52
52
  const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
53
- const easJsonCliConfig = (_c = (await eas_json_1.EasJsonUtils.getCliConfigAsync(easJsonAccessor))) !== null && _c !== void 0 ? _c : {};
54
- const buildProfile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, (_d = flags.profile) !== null && _d !== void 0 ? _d : 'production');
53
+ const easJsonCliConfig = (await eas_json_1.EasJsonUtils.getCliConfigAsync(easJsonAccessor)) ?? {};
54
+ const buildProfile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, flags.profile ?? 'production');
55
55
  const { exp, projectId } = await getDynamicPrivateProjectConfigAsync({ env: buildProfile.env });
56
56
  const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
57
57
  const build = await this.ensureBuildSelectedAsync({ graphqlClient, projectId, platform, nonInteractive, limit, offset }, maybeBuild);
@@ -83,14 +83,14 @@ class BuildResign extends EasCommand_1.default {
83
83
  vcsClient,
84
84
  });
85
85
  const credentialsResult = await (0, credentials_1.ensureIosCredentialsForBuildResignAsync)(credentialsCtx, targets, buildProfile);
86
- (0, assert_1.default)((_e = build.artifacts) === null || _e === void 0 ? void 0 : _e.applicationArchiveUrl, 'Missing application archive.');
86
+ (0, assert_1.default)(build.artifacts?.applicationArchiveUrl, 'Missing application archive.');
87
87
  const jobOverrides = {
88
88
  mode: generated_1.BuildMode.Resign,
89
89
  type: generated_1.BuildWorkflow.Unknown,
90
90
  resign: {
91
91
  applicationArchiveSource: {
92
92
  type: generated_1.ProjectArchiveSourceType.Url,
93
- url: (_f = build.artifacts) === null || _f === void 0 ? void 0 : _f.applicationArchiveUrl,
93
+ url: build.artifacts?.applicationArchiveUrl,
94
94
  },
95
95
  },
96
96
  secrets: (0, prepareJob_1.prepareCredentialsToResign)(credentialsResult.credentials),
@@ -146,7 +146,7 @@ class BuildResign extends EasCommand_1.default {
146
146
  title: 'Which build would you like to re-sign with new credentials?',
147
147
  paginatedQueryOptions: {
148
148
  limit,
149
- offset: offset !== null && offset !== void 0 ? offset : 0,
149
+ offset: offset ?? 0,
150
150
  nonInteractive,
151
151
  json: false,
152
152
  },
@@ -174,7 +174,6 @@ function getEasBuildRunCachedAppPath(projectId, buildId, platform) {
174
174
  return path_1.default.join((0, paths_1.getEasBuildRunCacheDirectoryPath)(), `${projectId}_${buildId}.${platform === generated_1.AppPlatform.Ios ? 'app' : 'apk'}`);
175
175
  }
176
176
  async function getPathToSimulatorBuildAppAsync(graphqlClient, projectId, flags, queryOptions) {
177
- var _b, _c;
178
177
  const maybeBuild = await maybeGetBuildAsync(graphqlClient, flags, projectId, queryOptions);
179
178
  if (maybeBuild) {
180
179
  const cachedAppPath = getEasBuildRunCachedAppPath(projectId, maybeBuild.id, flags.selectedPlatform);
@@ -183,7 +182,7 @@ async function getPathToSimulatorBuildAppAsync(graphqlClient, projectId, flags,
183
182
  log_1.default.log(`Using cached app...`);
184
183
  return cachedAppPath;
185
184
  }
186
- if (!((_b = maybeBuild.artifacts) === null || _b === void 0 ? void 0 : _b.applicationArchiveUrl)) {
185
+ if (!maybeBuild.artifacts?.applicationArchiveUrl) {
187
186
  throw new Error('Build does not have an application archive url');
188
187
  }
189
188
  return await (0, download_1.downloadAndMaybeExtractAppAsync)(maybeBuild.artifacts.applicationArchiveUrl, flags.selectedPlatform, cachedAppPath);
@@ -191,7 +190,7 @@ async function getPathToSimulatorBuildAppAsync(graphqlClient, projectId, flags,
191
190
  if (flags.runArchiveFlags.url) {
192
191
  return await (0, download_1.downloadAndMaybeExtractAppAsync)(flags.runArchiveFlags.url, flags.selectedPlatform);
193
192
  }
194
- if ((_c = flags.runArchiveFlags.path) === null || _c === void 0 ? void 0 : _c.endsWith('.tar.gz')) {
193
+ if (flags.runArchiveFlags.path?.endsWith('.tar.gz')) {
195
194
  return await (0, download_1.extractAppFromLocalArchiveAsync)(flags.runArchiveFlags.path, flags.selectedPlatform);
196
195
  }
197
196
  // this should never fail, due to the validation in sanitizeFlagsAsync
@@ -17,7 +17,6 @@ const json_1 = require("../../../utils/json");
17
17
  const profiles_1 = require("../../../utils/profiles");
18
18
  class BuildVersionGetView extends EasCommand_1.default {
19
19
  async runAsync() {
20
- var _b;
21
20
  const { flags } = await this.parse(_a);
22
21
  if (flags.json) {
23
22
  (0, json_1.enableJsonOutput)();
@@ -38,7 +37,7 @@ class BuildVersionGetView extends EasCommand_1.default {
38
37
  type: 'build',
39
38
  easJsonAccessor,
40
39
  platforms,
41
- profileName: (_b = flags.profile) !== null && _b !== void 0 ? _b : undefined,
40
+ profileName: flags.profile ?? undefined,
42
41
  projectDir,
43
42
  });
44
43
  const results = {};
@@ -58,8 +57,8 @@ class BuildVersionGetView extends EasCommand_1.default {
58
57
  nonInteractive: flags['non-interactive'],
59
58
  });
60
59
  const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(graphqlClient, projectId, (0, AppPlatform_1.toAppPlatform)(platform), applicationIdentifier);
61
- if (remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion) {
62
- results[platform] = remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion;
60
+ if (remoteVersions?.buildVersion) {
61
+ results[platform] = remoteVersions?.buildVersion;
63
62
  }
64
63
  }
65
64
  if (flags.json) {
@@ -21,7 +21,6 @@ const remoteVersionSource_1 = require("../../../project/remoteVersionSource");
21
21
  const prompts_1 = require("../../../prompts");
22
22
  class BuildVersionSetView extends EasCommand_1.default {
23
23
  async runAsync() {
24
- var _b, _c, _d;
25
24
  const { flags } = await this.parse(_a);
26
25
  const { loggedIn: { graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, vcsClient, } = await this.getContextAsync(_a, {
27
26
  nonInteractive: false,
@@ -29,7 +28,7 @@ class BuildVersionSetView extends EasCommand_1.default {
29
28
  const platform = await (0, platform_1.selectPlatformAsync)(flags.platform);
30
29
  const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
31
30
  await (0, remoteVersionSource_1.ensureVersionSourceIsRemoteAsync)(easJsonAccessor, { nonInteractive: false });
32
- const profile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, (_b = flags.profile) !== null && _b !== void 0 ? _b : undefined);
31
+ const profile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, flags.profile ?? undefined);
33
32
  const { exp, projectId } = await getDynamicPrivateProjectConfigAsync({ env: profile.env });
34
33
  const displayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId);
35
34
  (0, remoteVersionSource_1.validateAppConfigForRemoteVersionSource)(exp, platform);
@@ -44,10 +43,10 @@ class BuildVersionSetView extends EasCommand_1.default {
44
43
  nonInteractive: false,
45
44
  });
46
45
  const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(graphqlClient, projectId, (0, AppPlatform_1.toAppPlatform)(platform), applicationIdentifier);
47
- const currentStateMessage = (remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)
46
+ const currentStateMessage = remoteVersions?.buildVersion
48
47
  ? `Project ${chalk_1.default.bold(displayName)} with ${getApplicationIdentifierName(platform)} "${applicationIdentifier}" is configured with ${(0, remoteVersionSource_1.getBuildVersionName)(platform)} ${remoteVersions.buildVersion}.`
49
48
  : `Project ${chalk_1.default.bold(displayName)} with ${getApplicationIdentifierName(platform)} "${applicationIdentifier}" does not have any ${(0, remoteVersionSource_1.getBuildVersionName)(platform)} configured.`;
50
- const versionPromptMessage = (remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)
49
+ const versionPromptMessage = remoteVersions?.buildVersion
51
50
  ? `What version would you like to set?`
52
51
  : `What version would you like to initialize it with?`;
53
52
  log_1.default.log(currentStateMessage);
@@ -63,9 +62,9 @@ class BuildVersionSetView extends EasCommand_1.default {
63
62
  appId: projectId,
64
63
  platform: (0, AppPlatform_1.toAppPlatform)(platform),
65
64
  applicationIdentifier,
66
- storeVersion: (_c = exp.version) !== null && _c !== void 0 ? _c : '1.0.0',
65
+ storeVersion: exp.version ?? '1.0.0',
67
66
  buildVersion: String(version),
68
- runtimeVersion: (_d = (await (0, Updates_1.getRuntimeVersionNullableAsync)(projectDir, exp, platform))) !== null && _d !== void 0 ? _d : undefined,
67
+ runtimeVersion: (await (0, Updates_1.getRuntimeVersionNullableAsync)(projectDir, exp, platform)) ?? undefined,
69
68
  });
70
69
  }
71
70
  }
@@ -24,7 +24,6 @@ const workflow_1 = require("../../../project/workflow");
24
24
  const profiles_1 = require("../../../utils/profiles");
25
25
  class BuildVersionSyncView extends EasCommand_1.default {
26
26
  async runAsync() {
27
- var _b;
28
27
  const { flags } = await this.parse(_a);
29
28
  const { loggedIn: { graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, vcsClient, } = await this.getContextAsync(_a, {
30
29
  nonInteractive: true,
@@ -37,7 +36,7 @@ class BuildVersionSyncView extends EasCommand_1.default {
37
36
  type: 'build',
38
37
  easJsonAccessor,
39
38
  platforms,
40
- profileName: (_b = flags.profile) !== null && _b !== void 0 ? _b : undefined,
39
+ profileName: flags.profile ?? undefined,
41
40
  projectDir,
42
41
  });
43
42
  for (const profileInfo of buildProfiles) {
@@ -58,12 +57,12 @@ class BuildVersionSyncView extends EasCommand_1.default {
58
57
  });
59
58
  const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(graphqlClient, projectId, (0, AppPlatform_1.toAppPlatform)(profileInfo.platform), applicationIdentifier);
60
59
  const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, profileInfo.platform, vcsClient);
61
- if (!(remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)) {
60
+ if (!remoteVersions?.buildVersion) {
62
61
  log_1.default.warn(`Skipping versions sync for ${platformDisplayName}. There are no versions configured on Expo servers, use "eas build:version:set" or run a build to initialize it.`);
63
62
  continue;
64
63
  }
65
64
  if (workflow === eas_build_job_1.Workflow.MANAGED) {
66
- log_1.default.warn(`The remote value for the ${platformDisplayName} ${(0, remoteVersionSource_1.getBuildVersionName)(profileInfo.platform)} is ${chalk_1.default.bold(remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)}, but it was not synced to the local project. This command has no effect on projects using managed workflow.`);
65
+ log_1.default.warn(`The remote value for the ${platformDisplayName} ${(0, remoteVersionSource_1.getBuildVersionName)(profileInfo.platform)} is ${chalk_1.default.bold(remoteVersions?.buildVersion)}, but it was not synced to the local project. This command has no effect on projects using managed workflow.`);
67
66
  continue;
68
67
  }
69
68
  if (profileInfo.platform === eas_build_job_1.Platform.ANDROID) {
@@ -86,7 +85,7 @@ class BuildVersionSyncView extends EasCommand_1.default {
86
85
  vcsClient,
87
86
  });
88
87
  }
89
- log_1.default.withTick(`Successfully updated the ${platformDisplayName} ${(0, remoteVersionSource_1.getBuildVersionName)(profileInfo.platform)} in native code to ${chalk_1.default.bold(remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)}.`);
88
+ log_1.default.withTick(`Successfully updated the ${platformDisplayName} ${(0, remoteVersionSource_1.getBuildVersionName)(profileInfo.platform)} in native code to ${chalk_1.default.bold(remoteVersions?.buildVersion)}.`);
90
89
  }
91
90
  }
92
91
  async syncIosAsync({ workflow, projectDir, exp, profile, buildVersion, vcsClient, }) {
@@ -110,13 +109,12 @@ class BuildVersionSyncView extends EasCommand_1.default {
110
109
  }
111
110
  }
112
111
  async syncAndroidAsync({ projectDir, workflow, buildVersion, }) {
113
- var _b, _c;
114
112
  if (!(0, versions_1.isValidVersionCode)(buildVersion)) {
115
113
  throw new Error(`Invalid versionCode (${buildVersion}), ${versions_1.VERSION_CODE_REQUIREMENTS}.`);
116
114
  }
117
115
  if (workflow === eas_build_job_1.Workflow.GENERIC) {
118
116
  const buildGradle = await (0, gradleUtils_1.getAppBuildGradleAsync)(projectDir);
119
- const isMultiFlavor = ((_b = buildGradle.android) === null || _b === void 0 ? void 0 : _b.productFlavors) || ((_c = buildGradle.android) === null || _c === void 0 ? void 0 : _c.flavorDimensions);
117
+ const isMultiFlavor = buildGradle.android?.productFlavors || buildGradle.android?.flavorDimensions;
120
118
  if (isMultiFlavor) {
121
119
  throw new Error("Versions in native code can't be automatically synced in multi-flavor Android projects. If you are using EAS Build with app version source set to remote, the correct values will be injected at the build time.");
122
120
  }
@@ -54,7 +54,6 @@ class ChannelRollout extends EasCommand_1.default {
54
54
  }
55
55
  }
56
56
  sanitizeArgsAndFlags(rawFlags) {
57
- var _b;
58
57
  const action = rawFlags.action;
59
58
  return {
60
59
  channelName: rawFlags.channel,
@@ -62,7 +61,7 @@ class ChannelRollout extends EasCommand_1.default {
62
61
  outcome: rawFlags.outcome,
63
62
  branchNameToRollout: rawFlags.branch,
64
63
  runtimeVersion: rawFlags['runtime-version'],
65
- privateKeyPath: (_b = rawFlags['private-key-path']) !== null && _b !== void 0 ? _b : null,
64
+ privateKeyPath: rawFlags['private-key-path'] ?? null,
66
65
  action: action ? this.getAction(action) : undefined,
67
66
  nonInteractive: rawFlags['non-interactive'],
68
67
  json: rawFlags.json,
@@ -25,20 +25,22 @@ class Config extends EasCommand_1.default {
25
25
  nonInteractive: false,
26
26
  });
27
27
  const accessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
28
- const profileName = maybeProfile !== null && maybeProfile !== void 0 ? maybeProfile : (await (0, prompts_1.selectAsync)('Select build profile', (await eas_json_1.EasJsonUtils.getBuildProfileNamesAsync(accessor)).map(profileName => ({
29
- title: profileName,
30
- value: profileName,
31
- }))));
32
- const platform = maybePlatform !== null && maybePlatform !== void 0 ? maybePlatform : (await (0, prompts_1.selectAsync)('Select platform', [
33
- {
34
- title: 'Android',
35
- value: eas_build_job_1.Platform.ANDROID,
36
- },
37
- {
38
- title: 'iOS',
39
- value: eas_build_job_1.Platform.IOS,
40
- },
41
- ]));
28
+ const profileName = maybeProfile ??
29
+ (await (0, prompts_1.selectAsync)('Select build profile', (await eas_json_1.EasJsonUtils.getBuildProfileNamesAsync(accessor)).map(profileName => ({
30
+ title: profileName,
31
+ value: profileName,
32
+ }))));
33
+ const platform = maybePlatform ??
34
+ (await (0, prompts_1.selectAsync)('Select platform', [
35
+ {
36
+ title: 'Android',
37
+ value: eas_build_job_1.Platform.ANDROID,
38
+ },
39
+ {
40
+ title: 'iOS',
41
+ value: eas_build_job_1.Platform.IOS,
42
+ },
43
+ ]));
42
44
  const profile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(accessor, platform, profileName);
43
45
  if (flags['eas-json-only']) {
44
46
  if (flags.json) {
@@ -10,14 +10,14 @@ const SetUpBuildCredentialsCommandAction_1 = require("../../credentials/manager/
10
10
  const platform_1 = require("../../platform");
11
11
  class InitializeBuildCredentials extends EasCommand_1.default {
12
12
  async runAsync() {
13
- var _b;
14
13
  const { flags } = await this.parse(_a);
15
14
  const { loggedIn: { actor, graphqlClient }, privateProjectConfig, getDynamicPrivateProjectConfigAsync, analytics, vcsClient, } = await this.getContextAsync(_a, {
16
15
  nonInteractive: false,
17
16
  });
18
17
  const platform = await (0, platform_1.selectPlatformAsync)(flags.platform);
19
- const buildProfile = (_b = flags.profile) !== null && _b !== void 0 ? _b : (await new SelectBuildProfileFromEasJson_1.SelectBuildProfileFromEasJson(privateProjectConfig.projectDir, eas_build_job_1.Platform.IOS).getProfileNameFromEasConfigAsync());
20
- await new SetUpBuildCredentialsCommandAction_1.SetUpBuildCredentialsCommandAction(actor, graphqlClient, vcsClient, analytics, privateProjectConfig !== null && privateProjectConfig !== void 0 ? privateProjectConfig : null, getDynamicPrivateProjectConfigAsync, platform, buildProfile, process.cwd()).runAsync();
18
+ const buildProfile = flags.profile ??
19
+ (await new SelectBuildProfileFromEasJson_1.SelectBuildProfileFromEasJson(privateProjectConfig.projectDir, eas_build_job_1.Platform.IOS).getProfileNameFromEasConfigAsync());
20
+ await new SetUpBuildCredentialsCommandAction_1.SetUpBuildCredentialsCommandAction(actor, graphqlClient, vcsClient, analytics, privateProjectConfig ?? null, getDynamicPrivateProjectConfigAsync, platform, buildProfile, process.cwd()).runAsync();
21
21
  }
22
22
  }
23
23
  _a = InitializeBuildCredentials;
@@ -11,7 +11,7 @@ class Credentials extends EasCommand_1.default {
11
11
  const { loggedIn: { actor, graphqlClient }, privateProjectConfig, getDynamicPrivateProjectConfigAsync, analytics, vcsClient, } = await this.getContextAsync(_a, {
12
12
  nonInteractive: false,
13
13
  });
14
- await new SelectPlatform_1.SelectPlatform(actor, graphqlClient, vcsClient, analytics, privateProjectConfig !== null && privateProjectConfig !== void 0 ? privateProjectConfig : null, getDynamicPrivateProjectConfigAsync, flags.platform).runAsync();
14
+ await new SelectPlatform_1.SelectPlatform(actor, graphqlClient, vcsClient, analytics, privateProjectConfig ?? null, getDynamicPrivateProjectConfigAsync, flags.platform).runAsync();
15
15
  }
16
16
  }
17
17
  _a = Credentials;
@@ -16,7 +16,7 @@ class DeviceCreate extends EasCommand_1.default {
16
16
  appStore: new AppStoreApi_1.default(),
17
17
  user: actor,
18
18
  graphqlClient,
19
- projectId: privateProjectConfig === null || privateProjectConfig === void 0 ? void 0 : privateProjectConfig.projectId,
19
+ projectId: privateProjectConfig?.projectId,
20
20
  });
21
21
  const manager = new manager_1.default(ctx);
22
22
  await manager.createAsync();
@@ -60,7 +60,7 @@ class DeviceRename extends EasCommand_1.default {
60
60
  type: 'text',
61
61
  name: 'name',
62
62
  message: 'New device name:',
63
- initial: initial !== null && initial !== void 0 ? initial : undefined,
63
+ initial: initial ?? undefined,
64
64
  });
65
65
  return name;
66
66
  }
@@ -3,9 +3,11 @@ var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const tslib_1 = require("tslib");
5
5
  const eas_build_job_1 = require("@expo/eas-build-job");
6
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
7
  const envinfo_1 = tslib_1.__importDefault(require("envinfo"));
7
8
  const EasCommand_1 = tslib_1.__importDefault(require("../commandUtils/EasCommand"));
8
9
  const log_1 = tslib_1.__importDefault(require("../log"));
10
+ const ora_1 = require("../ora");
9
11
  const workflow_1 = require("../project/workflow");
10
12
  const easCli_1 = require("../utils/easCli");
11
13
  class Diagnostics extends EasCommand_1.default {
@@ -13,6 +15,7 @@ class Diagnostics extends EasCommand_1.default {
13
15
  const { projectDir, vcsClient } = await this.getContextAsync(_a, {
14
16
  nonInteractive: true,
15
17
  });
18
+ const spinner = (0, ora_1.ora)().start(`Gathering diagnostic information...`);
16
19
  const info = await envinfo_1.default.run({
17
20
  System: ['OS', 'Shell'],
18
21
  Binaries: ['Node', 'Yarn', 'npm'],
@@ -31,8 +34,9 @@ class Diagnostics extends EasCommand_1.default {
31
34
  ],
32
35
  npmGlobalPackages: ['eas-cli', 'expo-cli'],
33
36
  }, {
34
- title: `EAS CLI ${easCli_1.easCliVersion} environment info`,
37
+ title: chalk_1.default.bold(`EAS CLI ${easCli_1.easCliVersion} environment info`),
35
38
  });
39
+ spinner.succeed('All needed information gathered!');
36
40
  log_1.default.log(info.trimEnd());
37
41
  await this.printWorkflowAsync(projectDir, vcsClient);
38
42
  log_1.default.newLine();
@@ -44,7 +48,7 @@ class Diagnostics extends EasCommand_1.default {
44
48
  log_1.default.log(` Project workflow: ${androidWorkflow}`);
45
49
  }
46
50
  else {
47
- log_1.default.log(` Project Workflow:`);
51
+ log_1.default.log(` Project workflow:`);
48
52
  log_1.default.log(` Android: ${androidWorkflow}`);
49
53
  log_1.default.log(` iOS: ${iosWorkflow}`);
50
54
  }