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,4 +7,5 @@ export declare class ExpoUpdatesCLICommandFailedError extends Error {
7
7
  }
8
8
  export declare function expoUpdatesCommandAsync(projectDir: string, args: string[], options: {
9
9
  env: Env | undefined;
10
+ cwd?: string;
10
11
  }): Promise<string>;
@@ -15,11 +15,11 @@ class ExpoUpdatesCLICommandFailedError extends Error {
15
15
  }
16
16
  exports.ExpoUpdatesCLICommandFailedError = ExpoUpdatesCLICommandFailedError;
17
17
  async function expoUpdatesCommandAsync(projectDir, args, options) {
18
- var _a;
19
18
  let expoUpdatesCli;
20
19
  try {
21
20
  expoUpdatesCli =
22
- (_a = (0, resolve_from_1.silent)(projectDir, 'expo-updates/bin/cli')) !== null && _a !== void 0 ? _a : (0, resolve_from_1.default)(projectDir, 'expo-updates/bin/cli.js');
21
+ (0, resolve_from_1.silent)(projectDir, 'expo-updates/bin/cli') ??
22
+ (0, resolve_from_1.default)(projectDir, 'expo-updates/bin/cli.js');
23
23
  }
24
24
  catch (e) {
25
25
  if (e.code === 'MODULE_NOT_FOUND') {
@@ -31,6 +31,7 @@ async function expoUpdatesCommandAsync(projectDir, args, options) {
31
31
  return (await (0, spawn_async_1.default)(expoUpdatesCli, args, {
32
32
  stdio: 'pipe',
33
33
  env: { ...process.env, ...options.env },
34
+ cwd: options.cwd,
34
35
  })).stdout;
35
36
  }
36
37
  catch (e) {
@@ -17,7 +17,7 @@ async function getProfilesAsync({ easJsonAccessor, platforms, profileName, type,
17
17
  });
18
18
  return {
19
19
  profile,
20
- profileName: profileName !== null && profileName !== void 0 ? profileName : 'production',
20
+ profileName: profileName ?? 'production',
21
21
  platform,
22
22
  };
23
23
  });
@@ -25,7 +25,7 @@ async function getProfilesAsync({ easJsonAccessor, platforms, profileName, type,
25
25
  }
26
26
  exports.getProfilesAsync = getProfilesAsync;
27
27
  async function maybeSetNodeVersionFromFileAsync(projectDir, profile) {
28
- if (profile === null || profile === void 0 ? void 0 : profile.node) {
28
+ if (profile?.node) {
29
29
  return;
30
30
  }
31
31
  const nodeVersion = await getNodeVersionFromFileAsync(projectDir);
@@ -71,7 +71,7 @@ async function maybePrintBuildProfileDeprecationWarningsAsync(easJsonAccessor, p
71
71
  if (hasPrintedDeprecationWarnings) {
72
72
  return;
73
73
  }
74
- const deprecationWarnings = await eas_json_1.EasJsonUtils.getBuildProfileDeprecationWarningsAsync(easJsonAccessor, platform, profileName !== null && profileName !== void 0 ? profileName : 'production');
74
+ const deprecationWarnings = await eas_json_1.EasJsonUtils.getBuildProfileDeprecationWarningsAsync(easJsonAccessor, platform, profileName ?? 'production');
75
75
  if (deprecationWarnings.length === 0) {
76
76
  return;
77
77
  }
@@ -7,7 +7,7 @@ const timer_1 = require("./timer");
7
7
  const ora_1 = require("../ora");
8
8
  function createProgressTracker({ total, message, completedMessage, }) {
9
9
  let bar = null;
10
- let calcTotal = total !== null && total !== void 0 ? total : 0;
10
+ let calcTotal = total ?? 0;
11
11
  let transferredSoFar = 0;
12
12
  let current = 0;
13
13
  const timerLabel = String(Date.now());
@@ -21,7 +21,7 @@ function createProgressTracker({ total, message, completedMessage, }) {
21
21
  return ({ progress, isComplete, error }) => {
22
22
  if (progress) {
23
23
  if (!bar && (progress.total !== undefined || total !== undefined)) {
24
- calcTotal = (total !== null && total !== void 0 ? total : progress.total);
24
+ calcTotal = (total ?? progress.total);
25
25
  bar = (0, ora_1.ora)(getMessage(0, calcTotal)).start();
26
26
  (0, timer_1.startTimer)(timerLabel);
27
27
  }
@@ -59,7 +59,6 @@ class FilterPagination {
59
59
  return 'last' in connectionArgs;
60
60
  }
61
61
  static async getFirstItemsAsync({ first, after }, { internalBatchSize, maxNodesFetched, filterPredicate, queryAsync, beforeEachQuery, afterEachQuery, }) {
62
- var _a, _b, _c, _d, _e;
63
62
  const limit = first + 1;
64
63
  const dataset = [];
65
64
  let hasMore = true;
@@ -75,7 +74,7 @@ class FilterPagination {
75
74
  const nodesRemaining = limit - dataset.length;
76
75
  dataset.push(...batch.slice(0, nodesRemaining));
77
76
  hasMore = pageInfo.hasNextPage;
78
- afterInternal = (_a = pageInfo.endCursor) !== null && _a !== void 0 ? _a : undefined;
77
+ afterInternal = pageInfo.endCursor ?? undefined;
79
78
  totalNodesFetched += batchEdges.length;
80
79
  if (afterEachQuery) {
81
80
  afterEachQuery({ first, after }, totalNodesFetched, dataset, hasMore && dataset.length < limit);
@@ -90,13 +89,12 @@ class FilterPagination {
90
89
  pageInfo: {
91
90
  hasNextPage: dataset.length > first,
92
91
  hasPreviousPage: false, // cannot be computed efficiently
93
- startCursor: (_c = (_b = edges[0]) === null || _b === void 0 ? void 0 : _b.cursor) !== null && _c !== void 0 ? _c : null,
94
- endCursor: (_e = (_d = edges[edges.length - 1]) === null || _d === void 0 ? void 0 : _d.cursor) !== null && _e !== void 0 ? _e : null,
92
+ startCursor: edges[0]?.cursor ?? null,
93
+ endCursor: edges[edges.length - 1]?.cursor ?? null,
95
94
  },
96
95
  };
97
96
  }
98
97
  static async getLastItemsAsync({ last, before }, { internalBatchSize, maxNodesFetched, filterPredicate, queryAsync, beforeEachQuery, afterEachQuery, }) {
99
- var _a, _b, _c, _d, _e;
100
98
  const limit = last + 1;
101
99
  const dataset = [];
102
100
  let hasMore = true;
@@ -114,7 +112,7 @@ class FilterPagination {
114
112
  const nodesChosen = batch.reverse().slice(0, nodesRemaining);
115
113
  dataset.push(...nodesChosen);
116
114
  hasMore = pageInfo.hasPreviousPage;
117
- beforeInternal = (_a = pageInfo.startCursor) !== null && _a !== void 0 ? _a : undefined;
115
+ beforeInternal = pageInfo.startCursor ?? undefined;
118
116
  totalNodesFetched += batchEdges.length;
119
117
  if (afterEachQuery) {
120
118
  afterEachQuery({ last, before }, totalNodesFetched, dataset, hasMore && dataset.length < limit);
@@ -130,8 +128,8 @@ class FilterPagination {
130
128
  pageInfo: {
131
129
  hasNextPage: false, // cannot be computed efficiently,
132
130
  hasPreviousPage: dataset.length > last,
133
- startCursor: (_c = (_b = edges[0]) === null || _b === void 0 ? void 0 : _b.cursor) !== null && _c !== void 0 ? _c : null,
134
- endCursor: (_e = (_d = edges[edges.length - 1]) === null || _d === void 0 ? void 0 : _d.cursor) !== null && _e !== void 0 ? _e : null,
131
+ startCursor: edges[0]?.cursor ?? null,
132
+ endCursor: edges[edges.length - 1]?.cursor ?? null,
135
133
  },
136
134
  };
137
135
  }
@@ -155,8 +153,7 @@ exports.NEXT_PAGE_OPTION = {
155
153
  title: '⬇️ Next page',
156
154
  };
157
155
  async function selectPaginatedInternalAsync({ queryAsync, getTitleAsync, printedType, queryParams, }) {
158
- var _a;
159
- const limit = (_a = queryParams.first) !== null && _a !== void 0 ? _a : queryParams.last;
156
+ const limit = queryParams.first ?? queryParams.last;
160
157
  (0, assert_1.default)(limit, 'queryParams must have either first or last');
161
158
  const connection = await queryAsync(queryParams);
162
159
  const { edges, pageInfo } = connection;
@@ -197,7 +194,7 @@ async function selectPaginatedInternalAsync({ queryAsync, getTitleAsync, printed
197
194
  return await selectPaginatedInternalAsync({
198
195
  queryParams: {
199
196
  last: limit,
200
- before: startCursor !== null && startCursor !== void 0 ? startCursor : undefined,
197
+ before: startCursor ?? undefined,
201
198
  },
202
199
  queryAsync,
203
200
  getTitleAsync,
@@ -208,7 +205,7 @@ async function selectPaginatedInternalAsync({ queryAsync, getTitleAsync, printed
208
205
  return await selectPaginatedInternalAsync({
209
206
  queryParams: {
210
207
  first: limit,
211
- after: endCursor !== null && endCursor !== void 0 ? endCursor : undefined,
208
+ after: endCursor ?? undefined,
212
209
  },
213
210
  queryAsync,
214
211
  getTitleAsync,
@@ -221,7 +218,6 @@ async function selectPaginatedInternalAsync({ queryAsync, getTitleAsync, printed
221
218
  }
222
219
  exports.PAGE_SIZE = 20;
223
220
  async function fetchEntireDatasetAsync({ paginatedGetterAsync, progressBarLabel, }) {
224
- var _a;
225
221
  // No way to know the total count of items beforehand
226
222
  let totalEstimatedWork = 10;
227
223
  const queueProgressBar = new cli_progress_1.default.SingleBar({ format: `|{bar}| ${progressBarLabel}` }, cli_progress_1.default.Presets.rect);
@@ -237,7 +233,7 @@ async function fetchEntireDatasetAsync({ paginatedGetterAsync, progressBarLabel,
237
233
  if (!hasNextPage) {
238
234
  break;
239
235
  }
240
- cursor = (_a = connection.pageInfo.endCursor) !== null && _a !== void 0 ? _a : undefined;
236
+ cursor = connection.pageInfo.endCursor ?? undefined;
241
237
  if (!didStartProgressBar) {
242
238
  // only show the progress bar if user has more than 1 page of items
243
239
  queueProgressBar.start(totalEstimatedWork, 0);
@@ -4,8 +4,7 @@ exports.formatMilliseconds = exports.endTimer = exports.startTimer = exports.has
4
4
  const LABEL = 'DEFAULT';
5
5
  const startTimes = {};
6
6
  function hasTimer(label) {
7
- var _a;
8
- return (_a = startTimes[label]) !== null && _a !== void 0 ? _a : null;
7
+ return startTimes[label] ?? null;
9
8
  }
10
9
  exports.hasTimer = hasTimer;
11
10
  function startTimer(label = LABEL) {
@@ -28,4 +28,4 @@ export default class GitClient extends Client {
28
28
  * - boolean - is git case sensitive
29
29
  * - undefined - case sensitivity is not configured and git is using default behavior
30
30
  */
31
- export declare function isGitCaseSensitiveAsync(): Promise<boolean | undefined>;
31
+ export declare function isGitCaseSensitiveAsync(cwd: string | undefined): Promise<boolean | undefined>;
@@ -18,7 +18,6 @@ class GitClient extends vcs_1.Client {
18
18
  this.maybeCwdOverride = maybeCwdOverride;
19
19
  }
20
20
  async ensureRepoExistsAsync() {
21
- var _a, _b, _c;
22
21
  try {
23
22
  if (!(await (0, git_1.isGitInstalledAsync)())) {
24
23
  log_1.default.error(`${chalk_1.default.bold('git')} command not found. Install it before proceeding or set ${chalk_1.default.bold('EAS_NO_VCS=1')} to use EAS CLI without Git (or any other version control system).`);
@@ -27,28 +26,28 @@ class GitClient extends vcs_1.Client {
27
26
  }
28
27
  }
29
28
  catch (error) {
30
- log_1.default.error(`${chalk_1.default.bold('git')} found, but ${chalk_1.default.bold('git --help')} exited with status ${error === null || error === void 0 ? void 0 : error.status}${(error === null || error === void 0 ? void 0 : error.stderr) ? `:` : '.'}`);
31
- if (error === null || error === void 0 ? void 0 : error.stderr) {
32
- log_1.default.error(error === null || error === void 0 ? void 0 : error.stderr);
29
+ log_1.default.error(`${chalk_1.default.bold('git')} found, but ${chalk_1.default.bold('git --help')} exited with status ${error?.status}${error?.stderr ? `:` : '.'}`);
30
+ if (error?.stderr) {
31
+ log_1.default.error(error?.stderr);
33
32
  }
34
33
  log_1.default.error(`Repair your Git installation, or set ${chalk_1.default.bold('EAS_NO_VCS=1')} to use EAS CLI without Git (or any other version control system).`);
35
34
  log_1.default.error((0, log_1.learnMore)('https://expo.fyi/eas-vcs-workflow'));
36
35
  core_1.Errors.exit(1);
37
36
  }
38
- if (await (0, git_1.doesGitRepoExistAsync)()) {
37
+ if (await (0, git_1.doesGitRepoExistAsync)(this.maybeCwdOverride)) {
39
38
  return;
40
39
  }
41
40
  log_1.default.warn("It looks like you haven't initialized the git repository yet.");
42
41
  log_1.default.warn('EAS requires you to use a git repository for your project.');
43
42
  const cwd = process.cwd();
44
- const repoRoot = (_a = PackageManagerUtils.findWorkspaceRoot(cwd)) !== null && _a !== void 0 ? _a : cwd;
43
+ const repoRoot = PackageManagerUtils.findWorkspaceRoot(cwd) ?? cwd;
45
44
  const confirmInit = await (0, prompts_1.confirmAsync)({
46
- message: `Would you like us to run 'git init' in ${(_b = this.maybeCwdOverride) !== null && _b !== void 0 ? _b : repoRoot} for you?`,
45
+ message: `Would you like us to run 'git init' in ${this.maybeCwdOverride ?? repoRoot} for you?`,
47
46
  });
48
47
  if (!confirmInit) {
49
48
  throw new Error('A git repository is required for building your project. Initialize it and run this command again.');
50
49
  }
51
- await (0, spawn_async_1.default)('git', ['init'], { cwd: (_c = this.maybeCwdOverride) !== null && _c !== void 0 ? _c : repoRoot });
50
+ await (0, spawn_async_1.default)('git', ['init'], { cwd: this.maybeCwdOverride ?? repoRoot });
52
51
  log_1.default.log("We're going to make an initial commit for your repository.");
53
52
  const { message } = await (0, prompts_1.promptAsync)({
54
53
  type: 'text',
@@ -75,10 +74,10 @@ class GitClient extends vcs_1.Client {
75
74
  });
76
75
  }
77
76
  catch (err) {
78
- if (err === null || err === void 0 ? void 0 : err.stdout) {
77
+ if (err?.stdout) {
79
78
  log_1.default.error(err.stdout);
80
79
  }
81
- if (err === null || err === void 0 ? void 0 : err.stderr) {
80
+ if (err?.stderr) {
82
81
  log_1.default.error(err.stderr);
83
82
  }
84
83
  throw err;
@@ -120,8 +119,8 @@ class GitClient extends vcs_1.Client {
120
119
  // file:/// so only file:// needs to be prepended
121
120
  gitRepoUri = `file://${await this.getRootPathAsync()}`;
122
121
  }
123
- const isCaseSensitive = await isGitCaseSensitiveAsync();
124
- await setGitCaseSensitivityAsync(true);
122
+ const isCaseSensitive = await isGitCaseSensitiveAsync(this.maybeCwdOverride);
123
+ await setGitCaseSensitivityAsync(true, this.maybeCwdOverride);
125
124
  try {
126
125
  if (await this.hasUncommittedChangesAsync()) {
127
126
  log_1.default.error('Detected inconsistent filename casing between your local filesystem and git.');
@@ -139,7 +138,7 @@ class GitClient extends vcs_1.Client {
139
138
  });
140
139
  }
141
140
  finally {
142
- await setGitCaseSensitivityAsync(isCaseSensitive);
141
+ await setGitCaseSensitivityAsync(isCaseSensitive, this.maybeCwdOverride);
143
142
  }
144
143
  }
145
144
  async getCommitHashAsync() {
@@ -192,10 +191,9 @@ class GitClient extends vcs_1.Client {
192
191
  !trackedFiles.includes(pathWithoutLeadingDot));
193
192
  }
194
193
  async isFileIgnoredAsync(filePath) {
195
- var _a;
196
194
  try {
197
195
  await (0, spawn_async_1.default)('git', ['check-ignore', '-q', filePath], {
198
- cwd: (_a = this.maybeCwdOverride) !== null && _a !== void 0 ? _a : path_1.default.normalize(await this.getRootPathAsync()),
196
+ cwd: this.maybeCwdOverride ?? path_1.default.normalize(await this.getRootPathAsync()),
199
197
  });
200
198
  return true;
201
199
  }
@@ -278,12 +276,14 @@ async function ensureGitConfiguredAsync({ nonInteractive, }) {
278
276
  * - boolean - is git case sensitive
279
277
  * - undefined - case sensitivity is not configured and git is using default behavior
280
278
  */
281
- async function isGitCaseSensitiveAsync() {
279
+ async function isGitCaseSensitiveAsync(cwd) {
282
280
  if (process.platform !== 'darwin') {
283
281
  return undefined;
284
282
  }
285
283
  try {
286
- const result = await (0, spawn_async_1.default)('git', ['config', '--get', 'core.ignorecase']);
284
+ const result = await (0, spawn_async_1.default)('git', ['config', '--get', 'core.ignorecase'], {
285
+ cwd,
286
+ });
287
287
  const isIgnoreCaseEnabled = result.stdout.trim();
288
288
  if (isIgnoreCaseEnabled === '') {
289
289
  return undefined;
@@ -300,16 +300,20 @@ async function isGitCaseSensitiveAsync() {
300
300
  }
301
301
  }
302
302
  exports.isGitCaseSensitiveAsync = isGitCaseSensitiveAsync;
303
- async function setGitCaseSensitivityAsync(enable) {
303
+ async function setGitCaseSensitivityAsync(enable, cwd) {
304
304
  // we are assuming that if someone sets that on non-macos device then
305
305
  // they know what they are doing
306
306
  if (process.platform !== 'darwin') {
307
307
  return;
308
308
  }
309
309
  if (enable === undefined) {
310
- await (0, spawn_async_1.default)('git', ['config', '--unset', 'core.ignorecase']);
310
+ await (0, spawn_async_1.default)('git', ['config', '--unset', 'core.ignorecase'], {
311
+ cwd,
312
+ });
311
313
  }
312
314
  else {
313
- await (0, spawn_async_1.default)('git', ['config', 'core.ignorecase', String(!enable)]);
315
+ await (0, spawn_async_1.default)('git', ['config', 'core.ignorecase', String(!enable)], {
316
+ cwd,
317
+ });
314
318
  }
315
319
  }
@@ -1,5 +1,5 @@
1
1
  export declare function isGitInstalledAsync(): Promise<boolean>;
2
- export declare function doesGitRepoExistAsync(): Promise<boolean>;
2
+ export declare function doesGitRepoExistAsync(cwd: string | undefined): Promise<boolean>;
3
3
  interface GitStatusOptions {
4
4
  showUntracked: boolean;
5
5
  cwd: string | undefined;
package/build/vcs/git.js CHANGED
@@ -16,9 +16,11 @@ async function isGitInstalledAsync() {
16
16
  return true;
17
17
  }
18
18
  exports.isGitInstalledAsync = isGitInstalledAsync;
19
- async function doesGitRepoExistAsync() {
19
+ async function doesGitRepoExistAsync(cwd) {
20
20
  try {
21
- await (0, spawn_async_1.default)('git', ['rev-parse', '--git-dir']);
21
+ await (0, spawn_async_1.default)('git', ['rev-parse', '--git-dir'], {
22
+ cwd,
23
+ });
22
24
  return true;
23
25
  }
24
26
  catch {
@@ -13,8 +13,7 @@ const DEFAULT_IGNORE = `
13
13
  node_modules
14
14
  `;
15
15
  function getRootPath() {
16
- var _a;
17
- const rootPath = (_a = process.env.EAS_PROJECT_ROOT) !== null && _a !== void 0 ? _a : process.cwd();
16
+ const rootPath = process.env.EAS_PROJECT_ROOT ?? process.cwd();
18
17
  if (!path_1.default.isAbsolute(rootPath)) {
19
18
  return path_1.default.resolve(process.cwd(), rootPath);
20
19
  }
@@ -24,7 +24,7 @@ async function prepareInputParamsAsync({ event: maybeEvent, url: maybeUrl, secre
24
24
  name: 'event',
25
25
  message: 'Webhook event type:',
26
26
  choices,
27
- initial: (existingWebhook === null || existingWebhook === void 0 ? void 0 : existingWebhook.event)
27
+ initial: existingWebhook?.event
28
28
  ? choices.findIndex(choice => choice.value === existingWebhook.event)
29
29
  : undefined,
30
30
  }));
@@ -41,7 +41,7 @@ async function prepareInputParamsAsync({ event: maybeEvent, url: maybeUrl, secre
41
41
  type: 'text',
42
42
  name: 'url',
43
43
  message: 'Webhook URL:',
44
- initial: url ? undefined : existingWebhook === null || existingWebhook === void 0 ? void 0 : existingWebhook.url,
44
+ initial: url ? undefined : existingWebhook?.url,
45
45
  validate: (value) => validateURL(value) || urlValidationMessage,
46
46
  }));
47
47
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "9.0.3",
2
+ "version": "9.0.5",
3
3
  "commands": {
4
4
  "analytics": {
5
5
  "id": "analytics",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eas-cli",
3
3
  "description": "EAS command line tool",
4
- "version": "9.0.3",
4
+ "version": "9.0.5",
5
5
  "author": "Expo <support@expo.dev>",
6
6
  "bin": {
7
7
  "eas": "./bin/run"
@@ -14,7 +14,7 @@
14
14
  "@expo/config-plugins": "7.8.4",
15
15
  "@expo/config-types": "50.0.0",
16
16
  "@expo/eas-build-job": "1.0.108",
17
- "@expo/eas-json": "9.0.3",
17
+ "@expo/eas-json": "9.0.4",
18
18
  "@expo/json-file": "8.2.37",
19
19
  "@expo/logger": "1.0.57",
20
20
  "@expo/multipart-body-parser": "1.1.0",
@@ -223,5 +223,5 @@
223
223
  "node": "20.11.0",
224
224
  "yarn": "1.22.21"
225
225
  },
226
- "gitHead": "628a7262cf456b8bb5aed792c9e67cb34202e1cf"
226
+ "gitHead": "15e50b15363bbacb521732207a3ebdaaef204bdc"
227
227
  }