eas-cli 9.0.2 → 9.0.4

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 (225) 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 +204 -32
  65. package/build/commands/secret/delete.js +5 -5
  66. package/build/commands/update/index.js +6 -7
  67. package/build/commands/update/republish.js +1 -2
  68. package/build/commands/update/roll-back-to-embedded.js +4 -5
  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 +18 -2
  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/republish.js +1 -1
  206. package/build/update/utils.js +28 -39
  207. package/build/user/SessionManager.js +5 -8
  208. package/build/user/User.js +2 -2
  209. package/build/user/expoSsoLauncher.js +1 -2
  210. package/build/utils/code-signing.js +4 -7
  211. package/build/utils/expoCli.js +1 -2
  212. package/build/utils/expoUpdatesCli.d.ts +1 -0
  213. package/build/utils/expoUpdatesCli.js +3 -2
  214. package/build/utils/profiles.js +3 -3
  215. package/build/utils/progress.js +2 -2
  216. package/build/utils/relay.js +10 -14
  217. package/build/utils/timer.js +1 -2
  218. package/build/vcs/clients/git.d.ts +1 -1
  219. package/build/vcs/clients/git.js +24 -20
  220. package/build/vcs/git.d.ts +1 -1
  221. package/build/vcs/git.js +4 -2
  222. package/build/vcs/local.js +1 -2
  223. package/build/webhooks/input.js +2 -2
  224. package/oclif.manifest.json +1 -1
  225. package/package.json +5 -5
@@ -16,9 +16,8 @@ const UpdatesModule_1 = require("../update/android/UpdatesModule");
16
16
  const UpdatesModule_2 = require("../update/ios/UpdatesModule");
17
17
  const easCli_1 = require("../utils/easCli");
18
18
  async function collectMetadataAsync(ctx) {
19
- var _a, _b, _c, _d, _e;
20
19
  const channelObject = await resolveChannelAsync(ctx);
21
- const distribution = (_a = ctx.buildProfile.distribution) !== null && _a !== void 0 ? _a : types_1.BuildDistributionType.STORE;
20
+ const distribution = ctx.buildProfile.distribution ?? types_1.BuildDistributionType.STORE;
22
21
  const metadata = {
23
22
  trackingContext: ctx.analyticsEventProperties,
24
23
  ...(await maybeResolveVersionsAsync(ctx)),
@@ -26,13 +25,14 @@ async function collectMetadataAsync(ctx) {
26
25
  workflow: ctx.workflow,
27
26
  credentialsSource: ctx.buildProfile.credentialsSource,
28
27
  sdkVersion: ctx.exp.sdkVersion,
29
- runtimeVersion: (_b = (await (0, resolveRuntimeVersionAsync_1.resolveRuntimeVersionAsync)({
28
+ runtimeVersion: (await (0, resolveRuntimeVersionAsync_1.resolveRuntimeVersionAsync)({
30
29
  exp: ctx.exp,
31
30
  platform: ctx.platform,
32
31
  workflow: ctx.workflow,
33
32
  projectDir: ctx.projectDir,
34
33
  env: ctx.buildProfile.env,
35
- }))) !== null && _b !== void 0 ? _b : undefined,
34
+ cwd: ctx.projectDir,
35
+ })) ?? undefined,
36
36
  reactNativeVersion: await getReactNativeVersionAsync(ctx.projectDir),
37
37
  ...channelObject,
38
38
  distribution,
@@ -40,7 +40,7 @@ async function collectMetadataAsync(ctx) {
40
40
  appIdentifier: resolveAppIdentifier(ctx),
41
41
  buildProfile: ctx.buildProfileName,
42
42
  gitCommitHash: await ctx.vcsClient.getCommitHashAsync(),
43
- gitCommitMessage: truncateGitCommitMessage((_c = (await ctx.vcsClient.getLastCommitMessageAsync())) !== null && _c !== void 0 ? _c : undefined),
43
+ gitCommitMessage: truncateGitCommitMessage((await ctx.vcsClient.getLastCommitMessageAsync()) ?? undefined),
44
44
  isGitWorkingTreeDirty: ctx.localBuildOptions.localBuildMode === local_1.LocalBuildMode.INTERNAL
45
45
  ? false
46
46
  : await ctx.vcsClient.hasUncommittedChangesAsync(),
@@ -51,9 +51,9 @@ async function collectMetadataAsync(ctx) {
51
51
  }),
52
52
  runWithNoWaitFlag: ctx.noWait,
53
53
  runFromCI: ctx.runFromCI,
54
- customWorkflowName: (_d = ctx.customBuildConfigMetadata) === null || _d === void 0 ? void 0 : _d.workflowName,
54
+ customWorkflowName: ctx.customBuildConfigMetadata?.workflowName,
55
55
  developmentClient: ctx.developmentClient,
56
- requiredPackageManager: (_e = ctx.requiredPackageManager) !== null && _e !== void 0 ? _e : undefined,
56
+ requiredPackageManager: ctx.requiredPackageManager ?? undefined,
57
57
  selectedImage: ctx.buildProfile.image,
58
58
  customNodeVersion: ctx.buildProfile.node,
59
59
  simulator: 'simulator' in ctx.buildProfile && ctx.buildProfile.simulator,
@@ -110,13 +110,12 @@ async function resolveChannelAsync(ctx) {
110
110
  return null;
111
111
  }
112
112
  async function getNativeChannelAsync(ctx) {
113
- var _a, _b;
114
113
  switch (ctx.platform) {
115
114
  case eas_build_job_1.Platform.ANDROID: {
116
- return (_a = (await (0, UpdatesModule_1.readChannelSafelyAsync)(ctx.projectDir))) !== null && _a !== void 0 ? _a : undefined;
115
+ return (await (0, UpdatesModule_1.readChannelSafelyAsync)(ctx.projectDir)) ?? undefined;
117
116
  }
118
117
  case eas_build_job_1.Platform.IOS: {
119
- return (_b = (await (0, UpdatesModule_2.readChannelSafelyAsync)(ctx.projectDir))) !== null && _b !== void 0 ? _b : undefined;
118
+ return (await (0, UpdatesModule_2.readChannelSafelyAsync)(ctx.projectDir)) ?? undefined;
120
119
  }
121
120
  }
122
121
  return undefined;
@@ -12,11 +12,10 @@ const json_1 = require("../utils/json");
12
12
  const queries_1 = require("../utils/queries");
13
13
  exports.BUILDS_LIMIT = 50;
14
14
  async function listAndRenderBuildsOnAppAsync(graphqlClient, { projectId, projectDisplayName, filter, paginatedQueryOptions, }) {
15
- var _a, _b;
16
15
  if (paginatedQueryOptions.nonInteractive) {
17
16
  const builds = await BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
18
17
  appId: projectId,
19
- limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.BUILDS_LIMIT,
18
+ limit: paginatedQueryOptions.limit ?? exports.BUILDS_LIMIT,
20
19
  offset: paginatedQueryOptions.offset,
21
20
  filter,
22
21
  });
@@ -24,7 +23,7 @@ async function listAndRenderBuildsOnAppAsync(graphqlClient, { projectId, project
24
23
  }
25
24
  else {
26
25
  await (0, queries_1.paginatedQueryWithConfirmPromptAsync)({
27
- limit: (_b = paginatedQueryOptions.limit) !== null && _b !== void 0 ? _b : exports.BUILDS_LIMIT,
26
+ limit: paginatedQueryOptions.limit ?? exports.BUILDS_LIMIT,
28
27
  offset: paginatedQueryOptions.offset,
29
28
  queryToPerform: (limit, offset) => BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
30
29
  appId: projectId,
@@ -41,13 +40,12 @@ async function listAndRenderBuildsOnAppAsync(graphqlClient, { projectId, project
41
40
  }
42
41
  exports.listAndRenderBuildsOnAppAsync = listAndRenderBuildsOnAppAsync;
43
42
  async function listAndSelectBuildOnAppAsync(graphqlClient, { projectId, title, filter, paginatedQueryOptions, selectPromptDisabledFunction, selectPromptWarningMessage, }) {
44
- var _a;
45
43
  if (paginatedQueryOptions.nonInteractive) {
46
44
  throw new Error('Unable to select a build in non-interactive mode.');
47
45
  }
48
46
  else {
49
47
  const selectedBuild = await (0, queries_1.paginatedQueryWithSelectPromptAsync)({
50
- limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.BUILDS_LIMIT,
48
+ limit: paginatedQueryOptions.limit ?? exports.BUILDS_LIMIT,
51
49
  offset: paginatedQueryOptions.offset,
52
50
  queryToPerform: (limit, offset) => BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
53
51
  appId: projectId,
@@ -62,14 +60,13 @@ async function listAndSelectBuildOnAppAsync(graphqlClient, { projectId, title, f
62
60
  selectPromptWarningMessage,
63
61
  },
64
62
  });
65
- return selectedBuild !== null && selectedBuild !== void 0 ? selectedBuild : null;
63
+ return selectedBuild ?? null;
66
64
  }
67
65
  }
68
66
  exports.listAndSelectBuildOnAppAsync = listAndSelectBuildOnAppAsync;
69
67
  function createBuildToPartialChoiceMaker(selectPromptDisabledFunction) {
70
68
  return (build) => {
71
- var _a;
72
- const splitCommitMessage = (_a = build.gitCommitMessage) === null || _a === void 0 ? void 0 : _a.split('\n');
69
+ const splitCommitMessage = build.gitCommitMessage?.split('\n');
73
70
  const formattedCommitData = build.gitCommitHash && splitCommitMessage && splitCommitMessage.length > 0
74
71
  ? `${build.gitCommitHash.slice(0, 7)} "${chalk_1.default.bold(splitCommitMessage[0] + (splitCommitMessage.length > 1 ? '…' : ''))}"`
75
72
  : null;
@@ -94,7 +91,7 @@ function createBuildToPartialChoiceMaker(selectPromptDisabledFunction) {
94
91
  return {
95
92
  title: `${chalk_1.default.bold(`ID:`)} ${build.id} (${chalk_1.default.bold(`${(0, date_1.fromNow)(new Date(build.completedAt))} ago`)})`,
96
93
  description: filteredDescriptionArray.length > 0 ? filteredDescriptionArray.join('\n') : '',
97
- disabled: selectPromptDisabledFunction === null || selectPromptDisabledFunction === void 0 ? void 0 : selectPromptDisabledFunction(build),
94
+ disabled: selectPromptDisabledFunction?.(build),
98
95
  };
99
96
  };
100
97
  }
@@ -22,4 +22,6 @@ export interface BuildFlags {
22
22
  buildLoggerLevel?: LoggerLevel;
23
23
  freezeCredentials: boolean;
24
24
  }
25
- export declare function runBuildAndSubmitAsync(graphqlClient: ExpoGraphqlClient, analytics: Analytics, vcsClient: Client, projectDir: string, flags: BuildFlags, actor: Actor, getDynamicPrivateProjectConfigAsync: DynamicConfigContextFn): Promise<void>;
25
+ export declare function runBuildAndSubmitAsync(graphqlClient: ExpoGraphqlClient, analytics: Analytics, vcsClient: Client, projectDir: string, flags: BuildFlags, actor: Actor, getDynamicPrivateProjectConfigAsync: DynamicConfigContextFn): Promise<{
26
+ buildIds: string[];
27
+ }>;
@@ -41,7 +41,6 @@ const profiles_1 = require("../utils/profiles");
41
41
  let metroConfigValidated = false;
42
42
  let sdkVersionChecked = false;
43
43
  async function runBuildAndSubmitAsync(graphqlClient, analytics, vcsClient, projectDir, flags, actor, getDynamicPrivateProjectConfigAsync) {
44
- var _a, _b;
45
44
  await vcsClient.ensureRepoExistsAsync();
46
45
  await (0, repository_1.ensureRepoIsCleanAsync)(vcsClient, flags.nonInteractive);
47
46
  await (0, configure_1.ensureProjectConfiguredAsync)({
@@ -50,13 +49,13 @@ async function runBuildAndSubmitAsync(graphqlClient, analytics, vcsClient, proje
50
49
  vcsClient,
51
50
  });
52
51
  const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
53
- const easJsonCliConfig = (_a = (await eas_json_1.EasJsonUtils.getCliConfigAsync(easJsonAccessor))) !== null && _a !== void 0 ? _a : {};
52
+ const easJsonCliConfig = (await eas_json_1.EasJsonUtils.getCliConfigAsync(easJsonAccessor)) ?? {};
54
53
  const platforms = (0, platform_1.toPlatforms)(flags.requestedPlatform);
55
54
  const buildProfiles = await (0, profiles_1.getProfilesAsync)({
56
55
  type: 'build',
57
56
  easJsonAccessor,
58
57
  platforms,
59
- profileName: (_b = flags.profile) !== null && _b !== void 0 ? _b : undefined,
58
+ profileName: flags.profile ?? undefined,
60
59
  projectDir,
61
60
  });
62
61
  log_1.default.log(`Loaded "env" configuration for the "${buildProfiles[0].profileName}" profile: ${buildProfiles[0].profile.env
@@ -121,7 +120,9 @@ async function runBuildAndSubmitAsync(graphqlClient, analytics, vcsClient, proje
121
120
  buildCtxByPlatform[platform] = buildCtx;
122
121
  }
123
122
  if (flags.localBuildOptions.localBuildMode === local_1.LocalBuildMode.LOCAL_BUILD_PLUGIN) {
124
- return;
123
+ return {
124
+ buildIds: startedBuilds.map(({ build }) => build.id),
125
+ };
125
126
  }
126
127
  if (flags.localBuildOptions.localBuildMode === local_1.LocalBuildMode.INTERNAL) {
127
128
  const startedBuild = await BuildQuery_1.BuildQuery.byIdAsync(graphqlClient, (0, nullthrows_1.default)(process.env.EAS_BUILD_ID, 'EAS_BUILD_ID is not defined'));
@@ -162,13 +163,17 @@ async function runBuildAndSubmitAsync(graphqlClient, analytics, vcsClient, proje
162
163
  }
163
164
  }
164
165
  if (flags.localBuildOptions.localBuildMode) {
165
- return;
166
+ return {
167
+ buildIds: startedBuilds.map(({ build }) => build.id),
168
+ };
166
169
  }
167
170
  if (!flags.wait) {
168
171
  if (flags.json) {
169
172
  (0, json_1.printJsonOnlyOutput)(startedBuilds.map(buildInfo => buildInfo.build));
170
173
  }
171
- return;
174
+ return {
175
+ buildIds: startedBuilds.map(({ build }) => build.id),
176
+ };
172
177
  }
173
178
  const { accountName } = Object.values(buildCtxByPlatform)[0];
174
179
  const builds = await (0, build_2.waitForBuildEndAsync)(graphqlClient, {
@@ -178,8 +183,8 @@ async function runBuildAndSubmitAsync(graphqlClient, analytics, vcsClient, proje
178
183
  if (!flags.json) {
179
184
  (0, printBuildInfo_1.printBuildResults)(builds);
180
185
  }
181
- const haveAllBuildsFailedOrCanceled = builds.every(build => (build === null || build === void 0 ? void 0 : build.status) &&
182
- [generated_1.BuildStatus.Errored, generated_1.BuildStatus.Canceled, generated_1.BuildStatus.PendingCancel].includes(build === null || build === void 0 ? void 0 : build.status));
186
+ const haveAllBuildsFailedOrCanceled = builds.every(build => build?.status &&
187
+ [generated_1.BuildStatus.Errored, generated_1.BuildStatus.Canceled, generated_1.BuildStatus.PendingCancel].includes(build?.status));
183
188
  await maybeDownloadAndRunSimulatorBuildsAsync(builds, flags);
184
189
  if (haveAllBuildsFailedOrCanceled || !flags.autoSubmit) {
185
190
  if (flags.json) {
@@ -196,6 +201,9 @@ async function runBuildAndSubmitAsync(graphqlClient, analytics, vcsClient, proje
196
201
  }
197
202
  (0, submit_1.exitWithNonZeroCodeIfSomeSubmissionsDidntFinish)(completedSubmissions);
198
203
  }
204
+ return {
205
+ buildIds: startedBuilds.map(({ build }) => build.id),
206
+ };
199
207
  }
200
208
  exports.runBuildAndSubmitAsync = runBuildAndSubmitAsync;
201
209
  async function prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildProfile, easJsonCliConfig, actor, graphqlClient, analytics, vcsClient, getDynamicPrivateProjectConfigAsync, customBuildConfigMetadata, }) {
@@ -250,7 +258,7 @@ async function prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildP
250
258
  }
251
259
  }
252
260
  await (0, projectUtils_1.validateAppVersionRuntimePolicySupportAsync)(buildCtx.projectDir, buildCtx.exp);
253
- if ((easJsonCliConfig === null || easJsonCliConfig === void 0 ? void 0 : easJsonCliConfig.appVersionSource) === eas_json_1.AppVersionSource.REMOTE) {
261
+ if (easJsonCliConfig?.appVersionSource === eas_json_1.AppVersionSource.REMOTE) {
254
262
  (0, remoteVersionSource_1.validateAppConfigForRemoteVersionSource)(buildCtx.exp, buildProfile.platform);
255
263
  }
256
264
  if (buildCtx.workflow === eas_build_job_1.Workflow.MANAGED) {
@@ -280,7 +288,6 @@ async function startBuildAsync(ctx) {
280
288
  return await sendBuildRequestAsync();
281
289
  }
282
290
  async function prepareAndStartSubmissionAsync({ build, buildCtx, moreBuilds, projectDir, buildProfile, submitProfile, nonInteractive, }) {
283
- var _a, _b, _c;
284
291
  const platform = (0, AppPlatform_1.toPlatform)(build.platform);
285
292
  const submissionCtx = await (0, context_1.createSubmissionContextAsync)({
286
293
  platform,
@@ -290,7 +297,7 @@ async function prepareAndStartSubmissionAsync({ build, buildCtx, moreBuilds, pro
290
297
  nonInteractive,
291
298
  env: buildProfile.env,
292
299
  credentialsCtx: buildCtx.credentialsCtx,
293
- applicationIdentifier: (_b = (_a = buildCtx.android) === null || _a === void 0 ? void 0 : _a.applicationId) !== null && _b !== void 0 ? _b : (_c = buildCtx.ios) === null || _c === void 0 ? void 0 : _c.bundleIdentifier,
300
+ applicationIdentifier: buildCtx.android?.applicationId ?? buildCtx.ios?.bundleIdentifier,
294
301
  actor: buildCtx.user,
295
302
  graphqlClient: buildCtx.graphqlClient,
296
303
  analytics: buildCtx.analytics,
@@ -312,8 +319,7 @@ function exitWithNonZeroCodeIfSomeBuildsFailed(maybeBuilds) {
312
319
  }
313
320
  }
314
321
  async function downloadAndRunAsync(build) {
315
- var _a;
316
- (0, assert_1.default)((_a = build.artifacts) === null || _a === void 0 ? void 0 : _a.applicationArchiveUrl);
322
+ (0, assert_1.default)(build.artifacts?.applicationArchiveUrl);
317
323
  const buildPath = await (0, download_1.downloadAndMaybeExtractAppAsync)(build.artifacts.applicationArchiveUrl, build.platform);
318
324
  await (0, run_1.runAsync)(buildPath, build.platform);
319
325
  }
@@ -6,11 +6,10 @@ const ExpoConfig = tslib_1.__importStar(require("@expo/config"));
6
6
  const json_file_1 = tslib_1.__importDefault(require("@expo/json-file"));
7
7
  const assert_1 = tslib_1.__importDefault(require("assert"));
8
8
  async function updateAppJsonConfigAsync({ projectDir, exp, }, modifyConfig) {
9
- var _a;
10
9
  const paths = ExpoConfig.getConfigFilePaths(projectDir);
11
10
  (0, assert_1.default)(paths.staticConfigPath, "can't update dynamic config");
12
11
  const rawStaticConfig = readAppJson(paths.staticConfigPath);
13
- rawStaticConfig.expo = (_a = rawStaticConfig.expo) !== null && _a !== void 0 ? _a : {};
12
+ rawStaticConfig.expo = rawStaticConfig.expo ?? {};
14
13
  modifyConfig(rawStaticConfig.expo);
15
14
  await json_file_1.default.writeAsync(paths.staticConfigPath, rawStaticConfig, { json5: false });
16
15
  modifyConfig(exp);
@@ -8,7 +8,6 @@ const generated_1 = require("../../graphql/generated");
8
8
  const platform_1 = require("../../platform");
9
9
  const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
10
10
  function formatGraphQLBuild(build) {
11
- var _a, _b;
12
11
  const actor = getActorName(build);
13
12
  const fields = [
14
13
  { label: 'ID', value: build.id },
@@ -44,11 +43,11 @@ function formatGraphQLBuild(build) {
44
43
  },
45
44
  {
46
45
  label: 'Distribution',
47
- value: (_a = build.distribution) === null || _a === void 0 ? void 0 : _a.toLowerCase(),
46
+ value: build.distribution?.toLowerCase(),
48
47
  },
49
48
  {
50
49
  label: 'Enterprise Provisioning',
51
- value: (_b = build.iosEnterpriseProvisioning) === null || _b === void 0 ? void 0 : _b.toLowerCase(),
50
+ value: build.iosEnterpriseProvisioning?.toLowerCase(),
52
51
  },
53
52
  {
54
53
  label: 'Channel',
@@ -81,7 +80,6 @@ function formatGraphQLBuild(build) {
81
80
  {
82
81
  label: 'Artifact',
83
82
  get value() {
84
- var _a;
85
83
  switch (build.status) {
86
84
  case generated_1.BuildStatus.New:
87
85
  case generated_1.BuildStatus.InQueue:
@@ -92,7 +90,7 @@ function formatGraphQLBuild(build) {
92
90
  case generated_1.BuildStatus.Errored:
93
91
  return null;
94
92
  case generated_1.BuildStatus.Finished: {
95
- const url = (_a = build.artifacts) === null || _a === void 0 ? void 0 : _a.buildUrl;
93
+ const url = build.artifacts?.buildUrl;
96
94
  return url ? url : chalk_1.default.red('not found');
97
95
  }
98
96
  default:
@@ -111,13 +109,12 @@ function formatGraphQLBuild(build) {
111
109
  ? '<in progress>'
112
110
  : new Date(build.updatedAt).toLocaleString(),
113
111
  },
114
- { label: 'Started by', value: actor !== null && actor !== void 0 ? actor : 'unknown' },
112
+ { label: 'Started by', value: actor ?? 'unknown' },
115
113
  ];
116
114
  const filteredFields = fields.filter(({ value }) => value !== undefined && value !== null);
117
115
  return (0, formatFields_1.default)(filteredFields);
118
116
  }
119
117
  exports.formatGraphQLBuild = formatGraphQLBuild;
120
118
  const getActorName = (build) => {
121
- var _a;
122
- return ((_a = build.initiatingActor) === null || _a === void 0 ? void 0 : _a.displayName) || 'unknown';
119
+ return build.initiatingActor?.displayName || 'unknown';
123
120
  };
@@ -49,7 +49,6 @@ function printBuildResults(builds) {
49
49
  }
50
50
  exports.printBuildResults = printBuildResults;
51
51
  function printBuildResult(build) {
52
- var _a;
53
52
  if (build.status === generated_1.BuildStatus.Errored) {
54
53
  log_1.default.addNewLineIfNone();
55
54
  const userError = build.error;
@@ -77,7 +76,7 @@ function printBuildResult(build) {
77
76
  else {
78
77
  // TODO: it looks like buildUrl could possibly be undefined, based on the code below.
79
78
  // we should account for this case better if it is possible
80
- const url = (_a = build.artifacts) === null || _a === void 0 ? void 0 : _a.buildUrl;
79
+ const url = build.artifacts?.buildUrl;
81
80
  if (url) {
82
81
  log_1.default.addNewLineIfNone();
83
82
  log_1.default.log(`${platform_1.appPlatformEmojis[build.platform]} ${platform_1.appPlatformDisplayNames[build.platform]} app:`);
@@ -25,7 +25,7 @@ async function resolveBuildResourceClassAsync(profile, platform, resourceClassFl
25
25
  if (profileResourceClass && resourceClassFlag && resourceClassFlag !== profileResourceClass) {
26
26
  log_1.default.warn(`Build profile specifies the "${profileResourceClass}" resource class but you passed "${resourceClassFlag}" to --resource-class.\nUsing "${resourceClassFlag}" as the override.`);
27
27
  }
28
- const selectedResourceClass = resourceClassFlag !== null && resourceClassFlag !== void 0 ? resourceClassFlag : profileResourceClass;
28
+ const selectedResourceClass = resourceClassFlag ?? profileResourceClass;
29
29
  return platform === eas_build_job_1.Platform.IOS
30
30
  ? resolveIosResourceClass(resourceClassFlag, profileResourceClass)
31
31
  : resolveAndroidResourceClass(selectedResourceClass);
@@ -35,12 +35,11 @@ function resolveAndroidResourceClass(selectedResourceClass) {
35
35
  if (selectedResourceClass && eas_json_1.ResourceClass.M1_MEDIUM === selectedResourceClass) {
36
36
  throw new Error(`Resource class ${selectedResourceClass} is only available for iOS builds`);
37
37
  }
38
- const resourceClass = selectedResourceClass !== null && selectedResourceClass !== void 0 ? selectedResourceClass : eas_json_1.ResourceClass.DEFAULT;
38
+ const resourceClass = selectedResourceClass ?? eas_json_1.ResourceClass.DEFAULT;
39
39
  return androidResourceClassToBuildResourceClassMapping[resourceClass];
40
40
  }
41
41
  function resolveIosResourceClass(resourceClassFlag, profileResourceClass) {
42
- var _a;
43
- const resourceClass = (_a = resourceClassFlag !== null && resourceClassFlag !== void 0 ? resourceClassFlag : profileResourceClass) !== null && _a !== void 0 ? _a : eas_json_1.ResourceClass.DEFAULT;
42
+ const resourceClass = resourceClassFlag ?? profileResourceClass ?? eas_json_1.ResourceClass.DEFAULT;
44
43
  if (resourceClassFlag === eas_json_1.ResourceClass.LARGE) {
45
44
  throw new Error(`Experimental "large" resource class for Intel iOS workers is no longer available. Remove the specified resource class to use the default, or learn more about all available resource classes: ${(0, log_1.link)('https://docs.expo.dev/build-reference/eas-json/')}`);
46
45
  }
@@ -22,11 +22,10 @@ function getArtifactUrl(artifactId) {
22
22
  }
23
23
  exports.getArtifactUrl = getArtifactUrl;
24
24
  function getInternalDistributionInstallUrl(build) {
25
- var _a;
26
25
  if (build.platform === generated_1.AppPlatform.Ios) {
27
26
  return `itms-services://?action=download-manifest;url=${(0, api_1.getExpoApiBaseUrl)()}/v2/projects/${build.project.id}/builds/${build.id}/manifest.plist`;
28
27
  }
29
- (0, assert_1.default)((_a = build.artifacts) === null || _a === void 0 ? void 0 : _a.buildUrl, 'buildUrl is missing');
28
+ (0, assert_1.default)(build.artifacts?.buildUrl, 'buildUrl is missing');
30
29
  return build.artifacts.buildUrl;
31
30
  }
32
31
  exports.getInternalDistributionInstallUrl = getInternalDistributionInstallUrl;
@@ -10,19 +10,17 @@ const semver_1 = tslib_1.__importDefault(require("semver"));
10
10
  const log_1 = tslib_1.__importStar(require("../log"));
11
11
  const image_1 = require("../utils/image");
12
12
  function checkNodeEnvVariable(ctx) {
13
- var _a;
14
- if (((_a = ctx.buildProfile.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) === 'production') {
13
+ if (ctx.buildProfile.env?.NODE_ENV === 'production') {
15
14
  log_1.default.warn('You set NODE_ENV=production in the build profile. Remember that it will be available during the entire build process. In particular, it will make yarn/npm install only production packages.');
16
15
  log_1.default.newLine();
17
16
  }
18
17
  }
19
18
  exports.checkNodeEnvVariable = checkNodeEnvVariable;
20
19
  async function checkGoogleServicesFileAsync(ctx) {
21
- var _a, _b, _c;
22
- if (ctx.workflow === eas_build_job_1.Workflow.GENERIC || ((_b = (_a = ctx.buildProfile) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b.GOOGLE_SERVICES_FILE)) {
20
+ if (ctx.workflow === eas_build_job_1.Workflow.GENERIC || ctx.buildProfile?.env?.GOOGLE_SERVICES_FILE) {
23
21
  return;
24
22
  }
25
- const googleServicesFilePath = (_c = ctx.exp[ctx.platform]) === null || _c === void 0 ? void 0 : _c.googleServicesFile;
23
+ const googleServicesFilePath = ctx.exp[ctx.platform]?.googleServicesFile;
26
24
  if (!googleServicesFilePath) {
27
25
  return;
28
26
  }
@@ -62,7 +60,6 @@ async function validatePNGsForManagedProjectAsync(ctx) {
62
60
  }
63
61
  exports.validatePNGsForManagedProjectAsync = validatePNGsForManagedProjectAsync;
64
62
  async function validateAndroidPNGsAsync(ctx) {
65
- var _a, _b, _c, _d, _e, _f, _g;
66
63
  const pngs = [
67
64
  {
68
65
  configPath: 'exp.icon',
@@ -70,23 +67,23 @@ async function validateAndroidPNGsAsync(ctx) {
70
67
  },
71
68
  {
72
69
  configPath: 'exp.android.icon',
73
- pngPath: (_a = ctx.exp.android) === null || _a === void 0 ? void 0 : _a.icon,
70
+ pngPath: ctx.exp.android?.icon,
74
71
  },
75
72
  {
76
73
  configPath: 'exp.android.adaptiveIcon.foregroundImage',
77
- pngPath: (_c = (_b = ctx.exp.android) === null || _b === void 0 ? void 0 : _b.adaptiveIcon) === null || _c === void 0 ? void 0 : _c.foregroundImage,
74
+ pngPath: ctx.exp.android?.adaptiveIcon?.foregroundImage,
78
75
  },
79
76
  {
80
77
  configPath: 'exp.android.adaptiveIcon.backgroundImage',
81
- pngPath: (_e = (_d = ctx.exp.android) === null || _d === void 0 ? void 0 : _d.adaptiveIcon) === null || _e === void 0 ? void 0 : _e.backgroundImage,
78
+ pngPath: ctx.exp.android?.adaptiveIcon?.backgroundImage,
82
79
  },
83
80
  {
84
81
  configPath: 'exp.splash.image',
85
- pngPath: (_f = ctx.exp.splash) === null || _f === void 0 ? void 0 : _f.image,
82
+ pngPath: ctx.exp.splash?.image,
86
83
  },
87
84
  {
88
85
  configPath: 'exp.notification.icon',
89
- pngPath: (_g = ctx.exp.notification) === null || _g === void 0 ? void 0 : _g.icon,
86
+ pngPath: ctx.exp.notification?.icon,
90
87
  },
91
88
  ];
92
89
  await validatePNGsAsync(pngs);
@@ -44,11 +44,10 @@ class SelectChannel {
44
44
  });
45
45
  }
46
46
  async runAsync(ctx) {
47
- var _a, _b;
48
47
  const { nonInteractive } = ctx;
49
48
  const { filterPredicate } = this.options;
50
- const printedType = (_a = this.options.printedType) !== null && _a !== void 0 ? _a : 'channel';
51
- const pageSize = (_b = this.options.pageSize) !== null && _b !== void 0 ? _b : 100;
49
+ const printedType = this.options.printedType ?? 'channel';
50
+ const pageSize = this.options.pageSize ?? 100;
52
51
  if (nonInteractive) {
53
52
  throw new utils_1.NonInteractiveError(`${printedType} selection cannot be run in non-interactive mode.`);
54
53
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ChannelNotFoundError = void 0;
4
4
  class ChannelNotFoundError extends Error {
5
5
  constructor(message) {
6
- super(message !== null && message !== void 0 ? message : 'Channel not found.');
6
+ super(message ?? 'Channel not found.');
7
7
  }
8
8
  }
9
9
  exports.ChannelNotFoundError = ChannelNotFoundError;
@@ -20,12 +20,11 @@ const json_1 = require("../utils/json");
20
20
  const queries_2 = require("../utils/queries");
21
21
  exports.CHANNELS_LIMIT = 25;
22
22
  async function selectChannelOnAppAsync(graphqlClient, { projectId, selectionPromptTitle, paginatedQueryOptions, }) {
23
- var _a;
24
23
  if (paginatedQueryOptions.nonInteractive) {
25
24
  throw new Error('Unable to select a channel in non-interactive mode.');
26
25
  }
27
26
  const updateChannel = await (0, queries_2.paginatedQueryWithSelectPromptAsync)({
28
- limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.CHANNELS_LIMIT,
27
+ limit: paginatedQueryOptions.limit ?? exports.CHANNELS_LIMIT,
29
28
  offset: paginatedQueryOptions.offset,
30
29
  queryToPerform: (limit, offset) => queryChannelsOnAppAsync(graphqlClient, { appId: projectId, limit, offset }),
31
30
  promptOptions: {
@@ -41,18 +40,17 @@ async function selectChannelOnAppAsync(graphqlClient, { projectId, selectionProm
41
40
  }
42
41
  exports.selectChannelOnAppAsync = selectChannelOnAppAsync;
43
42
  async function listAndRenderChannelsOnAppAsync(graphqlClient, { projectId, paginatedQueryOptions, }) {
44
- var _a, _b;
45
43
  if (paginatedQueryOptions.nonInteractive) {
46
44
  const channels = await queryChannelsOnAppAsync(graphqlClient, {
47
45
  appId: projectId,
48
- limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.CHANNELS_LIMIT,
46
+ limit: paginatedQueryOptions.limit ?? exports.CHANNELS_LIMIT,
49
47
  offset: paginatedQueryOptions.offset,
50
48
  });
51
49
  renderPageOfChannels(channels, paginatedQueryOptions);
52
50
  }
53
51
  else {
54
52
  await (0, queries_2.paginatedQueryWithConfirmPromptAsync)({
55
- limit: (_b = paginatedQueryOptions.limit) !== null && _b !== void 0 ? _b : exports.CHANNELS_LIMIT,
53
+ limit: paginatedQueryOptions.limit ?? exports.CHANNELS_LIMIT,
56
54
  offset: paginatedQueryOptions.offset,
57
55
  queryToPerform: (limit, offset) => queryChannelsOnAppAsync(graphqlClient, { limit, offset, appId: projectId }),
58
56
  promptOptions: {
@@ -64,7 +62,6 @@ async function listAndRenderChannelsOnAppAsync(graphqlClient, { projectId, pagin
64
62
  }
65
63
  exports.listAndRenderChannelsOnAppAsync = listAndRenderChannelsOnAppAsync;
66
64
  async function listAndRenderBranchesAndUpdatesOnChannelAsync(graphqlClient, { projectId: appId, channelName, paginatedQueryOptions, }) {
67
- var _a, _b;
68
65
  const channel = await ChannelQuery_1.ChannelQuery.viewUpdateChannelAsync(graphqlClient, { appId, channelName });
69
66
  renderChannelHeaderContent({ channelName: channel.name, channelId: channel.id });
70
67
  if (paginatedQueryOptions.nonInteractive) {
@@ -72,13 +69,13 @@ async function listAndRenderBranchesAndUpdatesOnChannelAsync(graphqlClient, { pr
72
69
  appId,
73
70
  channelName,
74
71
  offset: paginatedQueryOptions.offset,
75
- limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.CHANNELS_LIMIT,
72
+ limit: paginatedQueryOptions.limit ?? exports.CHANNELS_LIMIT,
76
73
  });
77
74
  renderPageOfBranchesOnChannel(channel, branches, paginatedQueryOptions);
78
75
  }
79
76
  else {
80
77
  await (0, queries_2.paginatedQueryWithConfirmPromptAsync)({
81
- limit: (_b = paginatedQueryOptions.limit) !== null && _b !== void 0 ? _b : exports.CHANNELS_LIMIT,
78
+ limit: paginatedQueryOptions.limit ?? exports.CHANNELS_LIMIT,
82
79
  offset: paginatedQueryOptions.offset,
83
80
  queryToPerform: (limit, offset) => queryBranchesAndUpdateGroupsOnChannelAsync(graphqlClient, {
84
81
  channelName,
@@ -166,7 +163,6 @@ async function createChannelOnAppAsync(graphqlClient, { appId, branchId, channel
166
163
  }
167
164
  exports.createChannelOnAppAsync = createChannelOnAppAsync;
168
165
  async function ensureChannelExistsAsync(graphqlClient, { appId, branchId, channelName }) {
169
- var _a;
170
166
  try {
171
167
  await createChannelOnAppAsync(graphqlClient, {
172
168
  appId,
@@ -175,7 +171,7 @@ async function ensureChannelExistsAsync(graphqlClient, { appId, branchId, channe
175
171
  });
176
172
  }
177
173
  catch (e) {
178
- const isIgnorableError = ((_a = e.graphQLErrors) === null || _a === void 0 ? void 0 : _a.length) === 1 &&
174
+ const isIgnorableError = e.graphQLErrors?.length === 1 &&
179
175
  e.graphQLErrors[0].extensions.errorCode === 'CHANNEL_ALREADY_EXISTS';
180
176
  if (!isIgnorableError) {
181
177
  throw e;
@@ -4,7 +4,7 @@ exports.getUpdateBranch = void 0;
4
4
  function getUpdateBranchNullable(channel, branchId) {
5
5
  const updateBranches = channel.updateBranches;
6
6
  const updateBranch = updateBranches.find(branch => branch.id === branchId);
7
- return updateBranch !== null && updateBranch !== void 0 ? updateBranch : null;
7
+ return updateBranch ?? null;
8
8
  }
9
9
  function getUpdateBranch(channel, branchId) {
10
10
  const updateBranch = getUpdateBranchNullable(channel, branchId);
@@ -70,19 +70,20 @@ class EasCommand extends core_1.Command {
70
70
  if (err instanceof errors_1.EasCommandError) {
71
71
  log_1.default.error(err.message);
72
72
  }
73
- else if (err instanceof core_2.CombinedError && (err === null || err === void 0 ? void 0 : err.graphQLErrors)) {
74
- const cleanMessage = err === null || err === void 0 ? void 0 : err.graphQLErrors.map((graphQLError) => {
75
- var _a, _b;
73
+ else if (err instanceof core_2.CombinedError && err?.graphQLErrors) {
74
+ const cleanMessage = err?.graphQLErrors
75
+ .map((graphQLError) => {
76
76
  const messageLine = graphQLError.message.replace('[GraphQL] ', '');
77
- const requestIdLine = ((_a = graphQLError.extensions) === null || _a === void 0 ? void 0 : _a.requestId)
77
+ const requestIdLine = graphQLError.extensions?.requestId
78
78
  ? `\nRequest ID: ${err.graphQLErrors[0].extensions.requestId}`
79
79
  : '';
80
80
  const defaultMsg = `${messageLine}${requestIdLine}`;
81
- if (((_b = graphQLError.extensions) === null || _b === void 0 ? void 0 : _b.errorCode) === 'UNAUTHORIZED_ERROR') {
81
+ if (graphQLError.extensions?.errorCode === 'UNAUTHORIZED_ERROR') {
82
82
  return `${chalk_1.default.bold(`You don't have the required permissions to perform this operation.`)}\n\nThis can sometimes happen if you are logged in as incorrect user.\nRun ${chalk_1.default.bold('eas whoami')} to check the username you are logged in as.\nRun ${chalk_1.default.bold('eas login')} to change the account.\n\nOriginal error message: ${defaultMsg}`;
83
83
  }
84
84
  return defaultMsg;
85
- }).join('\n');
85
+ })
86
+ .join('\n');
86
87
  log_1.default.error(cleanMessage);
87
88
  baseMessage = BASE_GRAPHQL_ERROR_MESSAGE;
88
89
  }
@@ -22,13 +22,13 @@ exports.ensureBuildExistsAsync = ensureBuildExistsAsync;
22
22
  async function fetchBuildsAsync({ graphqlClient, projectId, filters, }) {
23
23
  let builds;
24
24
  const queryFilters = {};
25
- if ((filters === null || filters === void 0 ? void 0 : filters.platform) && filters.platform !== 'all') {
25
+ if (filters?.platform && filters.platform !== 'all') {
26
26
  queryFilters['platform'] = platformToAppPlatform[filters.platform];
27
27
  }
28
- if (filters === null || filters === void 0 ? void 0 : filters.profile) {
28
+ if (filters?.profile) {
29
29
  queryFilters['buildProfile'] = filters.profile;
30
30
  }
31
- if (!(filters === null || filters === void 0 ? void 0 : filters.statuses)) {
31
+ if (!filters?.statuses) {
32
32
  builds = await BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
33
33
  appId: projectId,
34
34
  offset: 0,
@@ -13,7 +13,7 @@ class DynamicPublicProjectConfigContextField extends ContextField_1.default {
13
13
  const expBefore = (0, expoConfig_1.getPublicExpoConfig)(projectDir, options);
14
14
  const projectId = await (0, getProjectIdAsync_1.getProjectIdAsync)(sessionManager, expBefore, {
15
15
  nonInteractive,
16
- env: options === null || options === void 0 ? void 0 : options.env,
16
+ env: options?.env,
17
17
  });
18
18
  const exp = (0, expoConfig_1.getPublicExpoConfig)(projectDir, options);
19
19
  return {
@@ -32,7 +32,7 @@ class DynamicPrivateProjectConfigContextField extends ContextField_1.default {
32
32
  const expBefore = (0, expoConfig_1.getPrivateExpoConfig)(projectDir, options);
33
33
  const projectId = await (0, getProjectIdAsync_1.getProjectIdAsync)(sessionManager, expBefore, {
34
34
  nonInteractive,
35
- env: options === null || options === void 0 ? void 0 : options.env,
35
+ env: options?.env,
36
36
  });
37
37
  const exp = (0, expoConfig_1.getPrivateExpoConfig)(projectDir, options);
38
38
  return {
@@ -7,11 +7,10 @@ const FeatureGateEnvOverrides_1 = tslib_1.__importDefault(require("../gating/Fea
7
7
  const FeatureGating_1 = tslib_1.__importDefault(require("../gating/FeatureGating"));
8
8
  class LoggedInContextField extends ContextField_1.default {
9
9
  async getValueAsync({ nonInteractive, sessionManager }) {
10
- var _a;
11
10
  const { actor, authenticationInfo } = await sessionManager.ensureLoggedInAsync({
12
11
  nonInteractive,
13
12
  });
14
- const featureGateServerValues = (_a = actor === null || actor === void 0 ? void 0 : actor.featureGates) !== null && _a !== void 0 ? _a : {};
13
+ const featureGateServerValues = actor?.featureGates ?? {};
15
14
  const graphqlClient = (0, createGraphqlClient_1.createGraphqlClient)(authenticationInfo);
16
15
  return {
17
16
  actor,