eas-cli 16.27.0 → 16.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/README.md +97 -94
  2. package/build/analytics/AnalyticsManager.js +4 -4
  3. package/build/analytics/common.js +1 -2
  4. package/build/api.js +5 -5
  5. package/build/branch/delete.d.ts +5 -0
  6. package/build/branch/delete.js +23 -0
  7. package/build/branch/queries.js +5 -5
  8. package/build/branch/utils.js +2 -2
  9. package/build/build/android/build.js +3 -4
  10. package/build/build/android/graphql.js +1 -2
  11. package/build/build/android/prepareJob.js +1 -2
  12. package/build/build/android/syncProjectConfiguration.js +2 -3
  13. package/build/build/android/version.js +6 -6
  14. package/build/build/build.js +3 -4
  15. package/build/build/configure.js +4 -5
  16. package/build/build/context.d.ts +1 -0
  17. package/build/build/createContext.js +2 -2
  18. package/build/build/evaluateConfigWithEnvVarsAsync.js +1 -2
  19. package/build/build/graphql.js +7 -7
  20. package/build/build/ios/build.js +2 -3
  21. package/build/build/ios/credentials.js +2 -3
  22. package/build/build/ios/graphql.js +2 -3
  23. package/build/build/ios/prepareJob.js +2 -3
  24. package/build/build/ios/syncProjectConfiguration.js +1 -2
  25. package/build/build/ios/version.js +10 -10
  26. package/build/build/local.js +2 -2
  27. package/build/build/metadata.js +3 -4
  28. package/build/build/queries.js +4 -4
  29. package/build/build/runBuildAndSubmit.js +12 -3
  30. package/build/build/utils/appJson.js +2 -3
  31. package/build/build/utils/credentials.js +1 -2
  32. package/build/build/utils/devClient.js +1 -2
  33. package/build/build/utils/formatBuild.js +2 -3
  34. package/build/build/utils/printBuildInfo.js +4 -5
  35. package/build/build/utils/repository.js +8 -9
  36. package/build/build/utils/resourceClass.js +1 -2
  37. package/build/build/utils/url.js +8 -9
  38. package/build/build/utils/version.js +2 -3
  39. package/build/build/validate.js +3 -4
  40. package/build/channel/branch-mapping.js +24 -24
  41. package/build/channel/delete.d.ts +5 -0
  42. package/build/channel/delete.js +23 -0
  43. package/build/channel/print-utils.js +2 -3
  44. package/build/channel/queries.js +8 -8
  45. package/build/channel/utils.js +1 -2
  46. package/build/commandUtils/builds.js +3 -4
  47. package/build/commandUtils/context/contextUtils/createGraphqlClient.js +1 -2
  48. package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +2 -3
  49. package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +3 -4
  50. package/build/commandUtils/context/contextUtils/loadServerSideEnvironmentVariablesAsync.js +1 -2
  51. package/build/commandUtils/experienceParser.d.ts +6 -0
  52. package/build/commandUtils/experienceParser.js +42 -0
  53. package/build/commandUtils/new/commands.js +3 -4
  54. package/build/commandUtils/new/configs.js +11 -9
  55. package/build/commandUtils/new/projectFiles.js +6 -7
  56. package/build/commandUtils/new/utils.js +1 -2
  57. package/build/commandUtils/projectNameValidation.d.ts +8 -0
  58. package/build/commandUtils/projectNameValidation.js +30 -0
  59. package/build/commandUtils/workflow/buildProfileUtils.js +12 -13
  60. package/build/commandUtils/workflow/creation.js +5 -5
  61. package/build/commandUtils/workflow/fetchLogs.js +2 -3
  62. package/build/commandUtils/workflow/inputs.js +5 -5
  63. package/build/commandUtils/workflow/stateMachine.js +7 -7
  64. package/build/commandUtils/workflow/utils.js +12 -12
  65. package/build/commandUtils/workflow/validation.js +4 -5
  66. package/build/commands/branch/delete.js +6 -20
  67. package/build/commands/build/cancel.js +1 -2
  68. package/build/commands/build/delete.js +1 -2
  69. package/build/commands/build/index.js +1 -10
  70. package/build/commands/channel/delete.js +7 -23
  71. package/build/commands/channel/edit.js +1 -2
  72. package/build/commands/channel/pause.js +1 -2
  73. package/build/commands/channel/resume.js +1 -2
  74. package/build/commands/deploy/index.js +1 -1
  75. package/build/commands/project/init.js +3 -1
  76. package/build/commands/project/new.js +3 -4
  77. package/build/commands/update/index.d.ts +8 -0
  78. package/build/commands/update/index.js +39 -2
  79. package/build/commands/update/list.d.ts +3 -0
  80. package/build/commands/update/list.js +30 -1
  81. package/build/commands/update/revert-update-rollout.js +1 -2
  82. package/build/credentials/android/actions/BuildCredentialsUtils.js +6 -7
  83. package/build/credentials/android/api/GraphqlClient.js +21 -21
  84. package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.d.ts +2 -2
  85. package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.d.ts +5 -5
  86. package/build/credentials/android/utils/googleServiceAccountKey.js +4 -4
  87. package/build/credentials/android/utils/keystore.js +2 -3
  88. package/build/credentials/android/utils/keystoreNew.js +3 -4
  89. package/build/credentials/android/utils/printCredentials.js +3 -4
  90. package/build/credentials/credentialsJson/read.js +3 -4
  91. package/build/credentials/credentialsJson/update.js +2 -3
  92. package/build/credentials/credentialsJson/utils.js +2 -3
  93. package/build/credentials/ios/actions/AppleTeamFormatting.js +1 -2
  94. package/build/credentials/ios/actions/AppleTeamUtils.js +1 -2
  95. package/build/credentials/ios/actions/AscApiKeyUtils.js +10 -10
  96. package/build/credentials/ios/actions/BuildCredentialsUtils.js +7 -8
  97. package/build/credentials/ios/actions/DeviceUtils.js +2 -3
  98. package/build/credentials/ios/actions/DistributionCertificateUtils.js +4 -5
  99. package/build/credentials/ios/actions/ProvisioningProfileUtils.js +2 -3
  100. package/build/credentials/ios/actions/PushKeyUtils.js +5 -6
  101. package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +2 -2
  102. package/build/credentials/ios/actions/SetUpTargetBuildCredentials.js +6 -2
  103. package/build/credentials/ios/api/GraphqlClient.js +24 -25
  104. package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.d.ts +5 -5
  105. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.d.ts +8 -8
  106. package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.d.ts +5 -5
  107. package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.d.ts +5 -5
  108. package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.d.ts +1 -1
  109. package/build/credentials/ios/appstore/AppStoreApi.d.ts +0 -2
  110. package/build/credentials/ios/appstore/Credentials.js +4 -5
  111. package/build/credentials/ios/appstore/Credentials.types.d.ts +0 -1
  112. package/build/credentials/ios/appstore/CredentialsUtils.js +6 -7
  113. package/build/credentials/ios/appstore/ascApiKey.d.ts +0 -1
  114. package/build/credentials/ios/appstore/ascApiKey.js +6 -7
  115. package/build/credentials/ios/appstore/authenticate.d.ts +0 -1
  116. package/build/credentials/ios/appstore/authenticate.js +4 -5
  117. package/build/credentials/ios/appstore/authenticateTypes.d.ts +0 -1
  118. package/build/credentials/ios/appstore/bundleId.d.ts +0 -1
  119. package/build/credentials/ios/appstore/bundleId.js +2 -3
  120. package/build/credentials/ios/appstore/bundleIdCapabilities.d.ts +0 -1
  121. package/build/credentials/ios/appstore/bundleIdCapabilities.js +3 -3
  122. package/build/credentials/ios/appstore/capabilityIdentifiers.d.ts +0 -1
  123. package/build/credentials/ios/appstore/capabilityIdentifiers.js +1 -2
  124. package/build/credentials/ios/appstore/capabilityList.d.ts +0 -1
  125. package/build/credentials/ios/appstore/contractMessages.d.ts +0 -1
  126. package/build/credentials/ios/appstore/contractMessages.js +2 -3
  127. package/build/credentials/ios/appstore/distributionCertificate.d.ts +0 -1
  128. package/build/credentials/ios/appstore/distributionCertificate.js +7 -7
  129. package/build/credentials/ios/appstore/ensureAppExists.d.ts +6 -1
  130. package/build/credentials/ios/appstore/ensureAppExists.js +55 -18
  131. package/build/credentials/ios/appstore/ensureTestFlightGroup.d.ts +0 -1
  132. package/build/credentials/ios/appstore/ensureTestFlightGroup.js +1 -2
  133. package/build/credentials/ios/appstore/keychain.js +4 -4
  134. package/build/credentials/ios/appstore/provisioningProfile.d.ts +0 -1
  135. package/build/credentials/ios/appstore/provisioningProfile.js +5 -5
  136. package/build/credentials/ios/appstore/provisioningProfileAdhoc.d.ts +0 -1
  137. package/build/credentials/ios/appstore/provisioningProfileAdhoc.js +1 -2
  138. package/build/credentials/ios/appstore/pushKey.js +4 -4
  139. package/build/credentials/ios/appstore/resolveCredentials.d.ts +0 -1
  140. package/build/credentials/ios/appstore/resolveCredentials.js +6 -7
  141. package/build/credentials/ios/credentials.d.ts +0 -1
  142. package/build/credentials/ios/credentials.js +2 -2
  143. package/build/credentials/ios/utils/authType.d.ts +0 -1
  144. package/build/credentials/ios/utils/authType.js +1 -2
  145. package/build/credentials/ios/utils/convertHTMLToASCII.js +1 -2
  146. package/build/credentials/ios/utils/p12Certificate.d.ts +0 -1
  147. package/build/credentials/ios/utils/p12Certificate.js +3 -4
  148. package/build/credentials/ios/utils/printCredentials.js +3 -4
  149. package/build/credentials/ios/utils/provisioningProfile.js +5 -6
  150. package/build/credentials/ios/validators/validateAscApiKey.js +2 -3
  151. package/build/credentials/ios/validators/validateDistributionCertificate.js +1 -2
  152. package/build/credentials/ios/validators/validateProvisioningProfile.js +1 -2
  153. package/build/credentials/ios/validators/validatePushKey.js +1 -2
  154. package/build/credentials/manager/IosActions.js +4 -4
  155. package/build/credentials/manager/SelectPlatform.js +1 -1
  156. package/build/credentials/utils/promptForCredentials.js +3 -4
  157. package/build/devices/actions/create/currentMachineMethod.js +1 -2
  158. package/build/devices/actions/create/developerPortalMethod.d.ts +0 -1
  159. package/build/devices/actions/create/developerPortalMethod.js +2 -3
  160. package/build/devices/actions/create/inputMethod.js +1 -2
  161. package/build/devices/actions/create/registrationUrlMethod.js +1 -2
  162. package/build/devices/actions/create/utils.js +4 -5
  163. package/build/devices/context.js +1 -2
  164. package/build/devices/queries.js +4 -4
  165. package/build/devices/udids.js +2 -3
  166. package/build/devices/utils/formatDevice.js +2 -3
  167. package/build/fetch.d.ts +0 -1
  168. package/build/fetch.js +1 -1
  169. package/build/fingerprint/cli.js +3 -4
  170. package/build/fingerprint/diff.js +1 -2
  171. package/build/fingerprint/types.d.ts +0 -1
  172. package/build/fingerprint/utils.js +4 -5
  173. package/build/graphql/client.js +2 -2
  174. package/build/graphql/generated.d.ts +331 -103
  175. package/build/graphql/generated.js +45 -3
  176. package/build/graphql/mutations/PublishMutation.d.ts +2 -2
  177. package/build/graphql/queries/AccountUsageQuery.d.ts +1 -1
  178. package/build/graphql/queries/AppVersionQuery.d.ts +1 -1
  179. package/build/graphql/queries/BackgroundJobReceiptQuery.d.ts +1 -1
  180. package/build/graphql/queries/BranchQuery.d.ts +3 -3
  181. package/build/graphql/queries/BuildQuery.d.ts +3 -3
  182. package/build/graphql/queries/ChannelQuery.d.ts +2 -2
  183. package/build/graphql/queries/ChannelQuery.js +2 -2
  184. package/build/graphql/queries/EnvironmentVariablesQuery.d.ts +12 -12
  185. package/build/graphql/queries/FingerprintQuery.d.ts +6 -6
  186. package/build/graphql/queries/PublishQuery.d.ts +1 -1
  187. package/build/graphql/queries/SubmissionQuery.d.ts +1 -1
  188. package/build/graphql/queries/UserQuery.d.ts +1 -1
  189. package/build/graphql/queries/WorkflowJobQuery.d.ts +2 -2
  190. package/build/graphql/queries/WorkflowRunQuery.d.ts +4 -4
  191. package/build/graphql/types/AppPlatform.js +2 -3
  192. package/build/log.js +2 -3
  193. package/build/metadata/apple/config/reader.d.ts +0 -1
  194. package/build/metadata/apple/config/writer.d.ts +0 -1
  195. package/build/metadata/apple/data.d.ts +0 -1
  196. package/build/metadata/apple/tasks/age-rating.d.ts +0 -1
  197. package/build/metadata/apple/tasks/age-rating.js +0 -1
  198. package/build/metadata/apple/tasks/app-info.d.ts +0 -1
  199. package/build/metadata/apple/tasks/app-info.js +15 -4
  200. package/build/metadata/apple/tasks/app-review-detail.d.ts +0 -1
  201. package/build/metadata/apple/tasks/app-review-detail.js +0 -1
  202. package/build/metadata/apple/tasks/app-version.d.ts +0 -1
  203. package/build/metadata/apple/tasks/app-version.js +15 -3
  204. package/build/metadata/apple/tasks/index.js +1 -2
  205. package/build/metadata/apple/types.d.ts +0 -1
  206. package/build/metadata/auth.d.ts +0 -1
  207. package/build/metadata/auth.js +1 -2
  208. package/build/metadata/config/resolve.js +4 -5
  209. package/build/metadata/config/validate.js +1 -2
  210. package/build/metadata/download.js +1 -2
  211. package/build/metadata/errors.js +3 -3
  212. package/build/metadata/upload.js +1 -2
  213. package/build/metadata/utils/ajv.js +2 -3
  214. package/build/metadata/utils/asc.d.ts +0 -1
  215. package/build/metadata/utils/date.js +1 -2
  216. package/build/metadata/utils/log.js +1 -2
  217. package/build/metadata/utils/retry.js +2 -3
  218. package/build/metadata/utils/telemetry.d.ts +0 -1
  219. package/build/metadata/utils/telemetry.js +2 -3
  220. package/build/onboarding/git.js +3 -4
  221. package/build/onboarding/installDependencies.js +3 -3
  222. package/build/onboarding/runCommand.js +1 -2
  223. package/build/ora.js +1 -2
  224. package/build/platform.d.ts +1 -0
  225. package/build/platform.js +28 -10
  226. package/build/project/android/applicationId.js +6 -6
  227. package/build/project/android/gradle.js +1 -2
  228. package/build/project/android/gradleUtils.js +4 -4
  229. package/build/project/android/versions.js +3 -3
  230. package/build/project/applicationIdentifier.js +1 -2
  231. package/build/project/customBuildConfig.js +3 -4
  232. package/build/project/expoConfig.js +5 -6
  233. package/build/project/expoSdk.js +1 -2
  234. package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +2 -3
  235. package/build/project/ios/bundleIdentifier.js +6 -6
  236. package/build/project/ios/entitlements.js +2 -3
  237. package/build/project/ios/exemptEncryption.js +1 -2
  238. package/build/project/ios/scheme.js +2 -3
  239. package/build/project/ios/target.d.ts +0 -1
  240. package/build/project/ios/target.js +8 -9
  241. package/build/project/ios/versions.js +3 -3
  242. package/build/project/maybeUploadAssetMapAsync.js +1 -2
  243. package/build/project/maybeUploadFingerprintAsync.js +1 -2
  244. package/build/project/metroConfig.js +1 -2
  245. package/build/project/projectUtils.js +15 -16
  246. package/build/project/publish.d.ts +15 -2
  247. package/build/project/publish.js +56 -29
  248. package/build/project/remoteVersionSource.js +6 -6
  249. package/build/project/resolveRuntimeVersionAsync.js +2 -3
  250. package/build/project/uploadAccountScopedFileAsync.js +1 -2
  251. package/build/project/uploadAccountScopedProjectSourceAsync.js +1 -2
  252. package/build/project/workflow.js +3 -4
  253. package/build/prompts.js +5 -6
  254. package/build/rollout/branch-mapping.js +14 -15
  255. package/build/rollout/utils.js +5 -6
  256. package/build/run/android/aapt.js +2 -3
  257. package/build/run/android/adb.js +8 -9
  258. package/build/run/android/emulator.js +6 -6
  259. package/build/run/android/run.js +1 -2
  260. package/build/run/android/sdk.d.ts +0 -1
  261. package/build/run/android/sdk.js +2 -2
  262. package/build/run/android/systemRequirements.js +1 -2
  263. package/build/run/ios/run.js +1 -2
  264. package/build/run/ios/simctl.js +1 -2
  265. package/build/run/ios/simulator.js +9 -10
  266. package/build/run/ios/systemRequirements.js +1 -2
  267. package/build/run/ios/xcode.js +5 -5
  268. package/build/run/ios/xcrun.js +3 -4
  269. package/build/run/run.js +2 -3
  270. package/build/run/utils.js +1 -2
  271. package/build/submit/ArchiveSource.js +3 -3
  272. package/build/submit/android/ServiceAccountSource.js +4 -4
  273. package/build/submit/commons.js +2 -3
  274. package/build/submit/context.js +1 -2
  275. package/build/submit/ios/AppProduce.js +1 -2
  276. package/build/submit/ios/AppSpecificPasswordSource.js +3 -3
  277. package/build/submit/ios/AscApiKeySource.js +4 -4
  278. package/build/submit/ios/utils/language.js +1 -2
  279. package/build/submit/submit.js +3 -4
  280. package/build/submit/utils/builds.js +1 -2
  281. package/build/submit/utils/errors.js +1 -2
  282. package/build/submit/utils/files.js +2 -3
  283. package/build/submit/utils/logs.js +1 -2
  284. package/build/submit/utils/summary.js +2 -3
  285. package/build/submit/utils/urls.js +2 -3
  286. package/build/submit/utils/wait.js +2 -3
  287. package/build/update/android/UpdatesModule.js +2 -3
  288. package/build/update/configure.js +4 -4
  289. package/build/update/delete.js +1 -2
  290. package/build/update/getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync.js +1 -2
  291. package/build/update/ios/UpdatesModule.js +2 -3
  292. package/build/update/queries.d.ts +5 -3
  293. package/build/update/queries.js +12 -9
  294. package/build/update/republish.js +5 -6
  295. package/build/update/roll-back-to-embedded.js +1 -2
  296. package/build/update/utils.js +15 -15
  297. package/build/uploads.js +3 -4
  298. package/build/user/User.js +2 -3
  299. package/build/user/actions.js +1 -2
  300. package/build/user/expoSsoLauncher.js +1 -2
  301. package/build/user/fetchSessionSecretAndSsoUser.js +1 -2
  302. package/build/user/fetchSessionSecretAndUser.js +1 -2
  303. package/build/user/fetchUser.js +1 -2
  304. package/build/utils/code-signing.d.ts +0 -1
  305. package/build/utils/code-signing.js +7 -8
  306. package/build/utils/date.js +1 -2
  307. package/build/utils/download.js +2 -3
  308. package/build/utils/expoCli.js +4 -4
  309. package/build/utils/expoUpdatesCli.js +2 -2
  310. package/build/utils/expodash/areSetsEqual.js +1 -1
  311. package/build/utils/expodash/capitalize.js +1 -1
  312. package/build/utils/expodash/chunk.js +1 -1
  313. package/build/utils/expodash/differenceBy.js +1 -1
  314. package/build/utils/expodash/filter.js +1 -2
  315. package/build/utils/expodash/groupBy.js +1 -1
  316. package/build/utils/expodash/intersection.js +1 -1
  317. package/build/utils/expodash/mapMapAsync.js +1 -1
  318. package/build/utils/expodash/memoize.js +1 -2
  319. package/build/utils/expodash/pick.js +1 -1
  320. package/build/utils/expodash/sortBy.js +1 -1
  321. package/build/utils/expodash/uniq.js +1 -1
  322. package/build/utils/expodash/uniqBy.js +1 -1
  323. package/build/utils/expodash/zipObject.js +1 -1
  324. package/build/utils/files.js +2 -3
  325. package/build/utils/formatFields.js +1 -1
  326. package/build/utils/image.js +3 -3
  327. package/build/utils/json.js +2 -3
  328. package/build/utils/plist.d.ts +0 -1
  329. package/build/utils/plist.js +3 -4
  330. package/build/utils/pollForBackgroundJobReceiptAsync.js +2 -2
  331. package/build/utils/profiles.js +3 -4
  332. package/build/utils/progress.js +1 -2
  333. package/build/utils/promise.js +1 -2
  334. package/build/utils/prompts.js +8 -9
  335. package/build/utils/queries.js +2 -3
  336. package/build/utils/relay.js +4 -4
  337. package/build/utils/statuspageService.js +1 -2
  338. package/build/utils/timer.js +4 -5
  339. package/build/utils/usage/checkForOverages.js +4 -6
  340. package/build/utils/variableUtils.js +4 -5
  341. package/build/vcs/clients/git.js +1 -2
  342. package/build/vcs/git.js +5 -6
  343. package/build/vcs/index.js +1 -2
  344. package/build/vcs/local.js +2 -2
  345. package/build/webhooks/formatWebhook.js +1 -2
  346. package/build/webhooks/input.js +3 -4
  347. package/build/worker/assets.d.ts +0 -1
  348. package/build/worker/assets.js +6 -7
  349. package/build/worker/deployment.js +8 -9
  350. package/build/worker/mutations.d.ts +1 -1
  351. package/build/worker/queries.d.ts +4 -4
  352. package/build/worker/upload.d.ts +0 -2
  353. package/build/worker/upload.js +5 -6
  354. package/build/worker/utils/logs.js +5 -5
  355. package/build/worker/utils/multipart.js +3 -3
  356. package/oclif.manifest.json +35 -1
  357. package/package.json +13 -11
@@ -9,6 +9,7 @@ const url_1 = require("../../build/utils/url");
9
9
  const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
10
10
  const getProjectIdAsync_1 = require("../../commandUtils/context/contextUtils/getProjectIdAsync");
11
11
  const flags_1 = require("../../commandUtils/flags");
12
+ const projectNameValidation_1 = require("../../commandUtils/projectNameValidation");
12
13
  const generated_1 = require("../../graphql/generated");
13
14
  const AppMutation_1 = require("../../graphql/mutations/AppMutation");
14
15
  const AppQuery_1 = require("../../graphql/queries/AppQuery");
@@ -192,8 +193,9 @@ class ProjectInit extends EasCommand_1.default {
192
193
  if (!accountName) {
193
194
  throw new Error('No account selected for project. Canceling.');
194
195
  }
195
- const projectName = exp.slug;
196
+ const projectName = (0, projectNameValidation_1.validSlugName)(exp.slug); // This filters out invalid characters
196
197
  const projectFullName = `@${accountName}/${projectName}`;
198
+ (0, projectNameValidation_1.validateFullNameAndSlug)(projectFullName, projectName);
197
199
  const existingProjectIdOnServer = await (0, fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync_1.findProjectIdByAccountNameAndSlugNullableAsync)(graphqlClient, accountName, projectName);
198
200
  if (existingProjectIdOnServer) {
199
201
  if (!force) {
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateProjectFilesAsync = exports.createProjectAsync = exports.generateConfigsAsync = void 0;
3
+ exports.generateConfigsAsync = generateConfigsAsync;
4
+ exports.createProjectAsync = createProjectAsync;
5
+ exports.generateProjectFilesAsync = generateProjectFilesAsync;
4
6
  const tslib_1 = require("tslib");
5
7
  const core_1 = require("@oclif/core");
6
8
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
@@ -29,7 +31,6 @@ async function generateConfigsAsync(args, actor, graphqlClient) {
29
31
  projectName,
30
32
  };
31
33
  }
32
- exports.generateConfigsAsync = generateConfigsAsync;
33
34
  async function createProjectAsync({ graphqlClient, actor, projectDirectory, projectAccount, projectName, }) {
34
35
  const projectFullName = `@${projectAccount}/${projectName}`;
35
36
  const projectDashboardUrl = (0, url_1.getProjectDashboardUrl)(projectAccount, projectName);
@@ -55,7 +56,6 @@ async function createProjectAsync({ graphqlClient, actor, projectDirectory, proj
55
56
  log_1.default.withInfo(`Project successfully linked (ID: ${chalk_1.default.bold(projectId)})`);
56
57
  return projectId;
57
58
  }
58
- exports.createProjectAsync = createProjectAsync;
59
59
  async function generateProjectFilesAsync(projectDir, app, packageManager) {
60
60
  const spinner = (0, ora_1.ora)(`Generating project files`).start();
61
61
  await (0, projectFiles_1.generateAppConfigAsync)(projectDir, app);
@@ -67,7 +67,6 @@ async function generateProjectFilesAsync(projectDir, app, packageManager) {
67
67
  log_1.default.withInfo(`Generated ${chalk_1.default.bold('app.json')}. ${(0, log_1.learnMore)('https://docs.expo.dev/versions/latest/config/app/')}`);
68
68
  log_1.default.withInfo(`Generated ${chalk_1.default.bold('eas.json')}. ${(0, log_1.learnMore)('https://docs.expo.dev/build-reference/eas-json/')}`);
69
69
  }
70
- exports.generateProjectFilesAsync = generateProjectFilesAsync;
71
70
  class New extends EasCommand_1.default {
72
71
  static aliases = ['new'];
73
72
  static description = 'Create a new project configured with Expo Application Services (EAS)';
@@ -1,5 +1,11 @@
1
1
  import EasCommand from '../../commandUtils/EasCommand';
2
2
  import { RequestedPlatform } from '../../platform';
3
+ /**
4
+ * Preprocess argv to handle --source-maps with optional value.
5
+ * If --source-maps is followed by another flag (starts with -) or end of args,
6
+ * insert 'true' as the default value.
7
+ */
8
+ export declare function preprocessSourceMapsArg(argv: string[]): string[];
3
9
  export default class UpdatePublish extends EasCommand {
4
10
  static description: string;
5
11
  static flags: {
@@ -12,6 +18,8 @@ export default class UpdatePublish extends EasCommand {
12
18
  'input-dir': import("@oclif/core/lib/interfaces").OptionFlag<string>;
13
19
  'skip-bundler': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
20
  'clear-cache': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
21
+ 'no-bytecode': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
22
+ 'source-maps': import("@oclif/core/lib/interfaces").OptionFlag<string>;
15
23
  'emit-metadata': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
24
  'rollout-percentage': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
17
25
  platform: import("@oclif/core/lib/interfaces").OptionFlag<RequestedPlatform>;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.preprocessSourceMapsArg = preprocessSourceMapsArg;
3
4
  const tslib_1 = require("tslib");
4
5
  const eas_build_job_1 = require("@expo/eas-build-job");
5
6
  const eas_json_1 = require("@expo/eas-json");
@@ -33,6 +34,26 @@ const uniqBy_1 = tslib_1.__importDefault(require("../../utils/expodash/uniqBy"))
33
34
  const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
34
35
  const json_1 = require("../../utils/json");
35
36
  const statuspageService_1 = require("../../utils/statuspageService");
37
+ /**
38
+ * Preprocess argv to handle --source-maps with optional value.
39
+ * If --source-maps is followed by another flag (starts with -) or end of args,
40
+ * insert 'true' as the default value.
41
+ */
42
+ function preprocessSourceMapsArg(argv) {
43
+ const result = [];
44
+ for (let i = 0; i < argv.length; i++) {
45
+ const arg = argv[i];
46
+ result.push(arg);
47
+ if (arg === '--source-maps') {
48
+ const nextArg = argv[i + 1];
49
+ // If no next arg or next arg is a flag, insert 'true' as the value
50
+ if (nextArg === undefined || nextArg.startsWith('-')) {
51
+ result.push('true');
52
+ }
53
+ }
54
+ }
55
+ return result;
56
+ }
36
57
  class UpdatePublish extends EasCommand_1.default {
37
58
  static description = 'publish an update group';
38
59
  static flags = {
@@ -62,6 +83,16 @@ class UpdatePublish extends EasCommand_1.default {
62
83
  description: `Clear the bundler cache before publishing`,
63
84
  default: false,
64
85
  }),
86
+ 'no-bytecode': core_1.Flags.boolean({
87
+ description: `Skip generating Hermes bytecode (output plain JavaScript instead)`,
88
+ default: false,
89
+ hidden: true,
90
+ }),
91
+ 'source-maps': core_1.Flags.string({
92
+ description: `Emit source maps. Options: true (default), inline, false`,
93
+ default: 'true',
94
+ hidden: true,
95
+ }),
65
96
  'emit-metadata': core_1.Flags.boolean({
66
97
  description: `Emit "eas-update-metadata.json" in the bundle folder with detailed information about the generated updates`,
67
98
  default: false,
@@ -96,9 +127,11 @@ class UpdatePublish extends EasCommand_1.default {
96
127
  ...this.ContextOptions.ServerSideEnvironmentVariables,
97
128
  };
98
129
  async runAsync() {
99
- const { flags: rawFlags } = await this.parse(UpdatePublish);
130
+ // Preprocess argv to handle --source-maps with optional value
131
+ const preprocessedArgv = preprocessSourceMapsArg(this.argv);
132
+ const { flags: rawFlags } = await this.parse(UpdatePublish, preprocessedArgv);
100
133
  const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(rawFlags);
101
- const { auto: autoFlag, platform: requestedPlatform, channelName: channelNameArg, updateMessage: updateMessageArg, inputDir, skipBundler, clearCache, privateKeyPath, json: jsonFlag, nonInteractive, branchName: branchNameArg, emitMetadata, rolloutPercentage, environment, } = this.sanitizeFlags(rawFlags);
134
+ const { auto: autoFlag, platform: requestedPlatform, channelName: channelNameArg, updateMessage: updateMessageArg, inputDir, skipBundler, clearCache, noBytecode, sourceMaps, privateKeyPath, json: jsonFlag, nonInteractive, branchName: branchNameArg, emitMetadata, rolloutPercentage, environment, } = this.sanitizeFlags(rawFlags);
102
135
  const { getDynamicPublicProjectConfigAsync, getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, vcsClient, getServerSideEnvironmentVariablesAsync, } = await this.getContextAsync(UpdatePublish, {
103
136
  nonInteractive,
104
137
  withServerSideEnvironment: environment ?? null,
@@ -153,6 +186,8 @@ class UpdatePublish extends EasCommand_1.default {
153
186
  exp,
154
187
  platformFlag: requestedPlatform,
155
188
  clearCache,
189
+ noBytecode,
190
+ sourceMaps,
156
191
  extraEnv: maybeServerEnv,
157
192
  });
158
193
  bundleSpinner.succeed('Exported bundle(s)');
@@ -528,6 +563,8 @@ class UpdatePublish extends EasCommand_1.default {
528
563
  inputDir: flags['input-dir'],
529
564
  skipBundler,
530
565
  clearCache: flags['clear-cache'] ? true : !!flags['environment'],
566
+ noBytecode: flags['no-bytecode'] ?? false,
567
+ sourceMaps: flags['source-maps'],
531
568
  platform: flags.platform,
532
569
  privateKeyPath: flags['private-key-path'],
533
570
  rolloutPercentage: flags['rollout-percentage'],
@@ -1,4 +1,5 @@
1
1
  import EasCommand from '../../commandUtils/EasCommand';
2
+ import { RequestedPlatform } from '../../platform';
2
3
  export default class UpdateList extends EasCommand {
3
4
  static description: string;
4
5
  static flags: {
@@ -8,6 +9,8 @@ export default class UpdateList extends EasCommand {
8
9
  offset: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
9
10
  branch: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
10
11
  all: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ platform: import("@oclif/core/lib/interfaces").OptionFlag<RequestedPlatform | undefined>;
13
+ 'runtime-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
11
14
  };
12
15
  static contextDefinition: {
13
16
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
@@ -6,6 +6,8 @@ const queries_1 = require("../../branch/queries");
6
6
  const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
7
7
  const flags_1 = require("../../commandUtils/flags");
8
8
  const pagination_1 = require("../../commandUtils/pagination");
9
+ const generated_1 = require("../../graphql/generated");
10
+ const platform_1 = require("../../platform");
9
11
  const queries_2 = require("../../update/queries");
10
12
  const json_1 = require("../../utils/json");
11
13
  class UpdateList extends EasCommand_1.default {
@@ -20,6 +22,14 @@ class UpdateList extends EasCommand_1.default {
20
22
  exclusive: ['branch'],
21
23
  default: false,
22
24
  }),
25
+ platform: core_1.Flags.enum({
26
+ options: Object.values(platform_1.RequestedPlatform),
27
+ char: 'p',
28
+ description: 'Filter updates by platform',
29
+ }),
30
+ 'runtime-version': core_1.Flags.string({
31
+ description: 'Filter updates by runtime version',
32
+ }),
23
33
  ...pagination_1.EasPaginatedQueryFlags,
24
34
  limit: (0, pagination_1.getLimitFlagWithCustomValues)({ defaultTo: 25, limit: 50 }),
25
35
  ...flags_1.EasNonInteractiveAndJsonFlags,
@@ -30,7 +40,7 @@ class UpdateList extends EasCommand_1.default {
30
40
  };
31
41
  async runAsync() {
32
42
  const { flags } = await this.parse(UpdateList);
33
- const { branch: branchFlag, all, json: jsonFlag, 'non-interactive': nonInteractive } = flags;
43
+ const { branch: branchFlag, all, json: jsonFlag, 'non-interactive': nonInteractive, platform: requestedPlatform, } = flags;
34
44
  const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdateList, {
35
45
  nonInteractive,
36
46
  });
@@ -38,9 +48,15 @@ class UpdateList extends EasCommand_1.default {
38
48
  if (jsonFlag) {
39
49
  (0, json_1.enableJsonOutput)();
40
50
  }
51
+ // Build filter object
52
+ const filter = {
53
+ platform: toAppPlatform(requestedPlatform),
54
+ runtimeVersions: flags['runtime-version'] ? [flags['runtime-version']] : undefined,
55
+ };
41
56
  if (all) {
42
57
  await (0, queries_2.listAndRenderUpdateGroupsOnAppAsync)(graphqlClient, {
43
58
  projectId,
59
+ filter,
44
60
  paginatedQueryOptions,
45
61
  });
46
62
  }
@@ -49,6 +65,7 @@ class UpdateList extends EasCommand_1.default {
49
65
  await (0, queries_2.listAndRenderUpdateGroupsOnBranchAsync)(graphqlClient, {
50
66
  projectId,
51
67
  branchName: branchFlag,
68
+ filter,
52
69
  paginatedQueryOptions,
53
70
  });
54
71
  }
@@ -74,6 +91,7 @@ class UpdateList extends EasCommand_1.default {
74
91
  await (0, queries_2.listAndRenderUpdateGroupsOnBranchAsync)(graphqlClient, {
75
92
  projectId,
76
93
  branchName: selectedBranch.name,
94
+ filter,
77
95
  paginatedQueryOptions,
78
96
  });
79
97
  }
@@ -81,3 +99,14 @@ class UpdateList extends EasCommand_1.default {
81
99
  }
82
100
  }
83
101
  exports.default = UpdateList;
102
+ const toAppPlatform = (requestedPlatform) => {
103
+ if (!requestedPlatform || requestedPlatform === platform_1.RequestedPlatform.All) {
104
+ return undefined;
105
+ }
106
+ else if (requestedPlatform === platform_1.RequestedPlatform.Android) {
107
+ return generated_1.AppPlatform.Android;
108
+ }
109
+ else {
110
+ return generated_1.AppPlatform.Ios;
111
+ }
112
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nonNullish = void 0;
3
+ exports.nonNullish = nonNullish;
4
4
  const tslib_1 = require("tslib");
5
5
  const core_1 = require("@oclif/core");
6
6
  const assert_1 = tslib_1.__importDefault(require("assert"));
@@ -19,7 +19,6 @@ const pollForBackgroundJobReceiptAsync_1 = require("../../utils/pollForBackgroun
19
19
  function nonNullish(value) {
20
20
  return value !== null && value !== undefined;
21
21
  }
22
- exports.nonNullish = nonNullish;
23
22
  class UpdateRevertUpdateRollout extends EasCommand_1.default {
24
23
  static description = 'revert a rollout update for a project';
25
24
  static flags = {
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sortBuildCredentials = exports.promptForNameAsync = exports.createOrUpdateDefaultAndroidAppBuildCredentialsAsync = exports.getAppLookupParamsFromContextAsync = exports.promptUserAndCopyLegacyCredentialsAsync = exports.canCopyLegacyCredentialsAsync = void 0;
3
+ exports.canCopyLegacyCredentialsAsync = canCopyLegacyCredentialsAsync;
4
+ exports.promptUserAndCopyLegacyCredentialsAsync = promptUserAndCopyLegacyCredentialsAsync;
5
+ exports.getAppLookupParamsFromContextAsync = getAppLookupParamsFromContextAsync;
6
+ exports.createOrUpdateDefaultAndroidAppBuildCredentialsAsync = createOrUpdateDefaultAndroidAppBuildCredentialsAsync;
7
+ exports.promptForNameAsync = promptForNameAsync;
8
+ exports.sortBuildCredentials = sortBuildCredentials;
4
9
  const tslib_1 = require("tslib");
5
10
  const assert_1 = tslib_1.__importDefault(require("assert"));
6
11
  const nanoid_1 = require("nanoid");
@@ -21,7 +26,6 @@ async function canCopyLegacyCredentialsAsync(ctx, app) {
21
26
  const legacyAppCredentials = await ctx.android.getLegacyAndroidAppCredentialsWithCommonFieldsAsync(ctx.graphqlClient, app);
22
27
  return !!legacyAppCredentials; // user has some legacy credentials
23
28
  }
24
- exports.canCopyLegacyCredentialsAsync = canCopyLegacyCredentialsAsync;
25
29
  async function promptUserAndCopyLegacyCredentialsAsync(ctx, app) {
26
30
  (0, assert_1.default)(await canCopyLegacyCredentialsAsync(ctx, app), 'User not eligible to copy classic build credentials to EAS');
27
31
  const spinner = (0, ora_1.ora)('Classic credentials detected, copying to EAS...').start();
@@ -59,7 +63,6 @@ async function promptUserAndCopyLegacyCredentialsAsync(ctx, app) {
59
63
  }
60
64
  spinner.succeed('Credentials copied to EAS.');
61
65
  }
62
- exports.promptUserAndCopyLegacyCredentialsAsync = promptUserAndCopyLegacyCredentialsAsync;
63
66
  async function getAppLookupParamsFromContextAsync(ctx, gradleContext) {
64
67
  const exp = await ctx.getExpoConfigAsync();
65
68
  const projectName = exp.slug;
@@ -71,7 +74,6 @@ async function getAppLookupParamsFromContextAsync(ctx, gradleContext) {
71
74
  }
72
75
  return { account, projectName, androidApplicationIdentifier };
73
76
  }
74
- exports.getAppLookupParamsFromContextAsync = getAppLookupParamsFromContextAsync;
75
77
  async function createOrUpdateDefaultAndroidAppBuildCredentialsAsync(ctx, appLookupParams, { androidKeystoreId, }) {
76
78
  (0, assert_1.default)(!ctx.nonInteractive, 'createOrUpdateDefaultAndroidAppBuildCredentialsAsync must be run in interactive mode');
77
79
  const existingDefaultBuildCredentials = await ctx.android.getDefaultAndroidAppBuildCredentialsAsync(ctx.graphqlClient, appLookupParams);
@@ -84,7 +86,6 @@ async function createOrUpdateDefaultAndroidAppBuildCredentialsAsync(ctx, appLook
84
86
  androidKeystoreId,
85
87
  });
86
88
  }
87
- exports.createOrUpdateDefaultAndroidAppBuildCredentialsAsync = createOrUpdateDefaultAndroidAppBuildCredentialsAsync;
88
89
  async function promptForNameAsync() {
89
90
  const { providedName } = await (0, prompts_1.promptAsync)({
90
91
  type: 'text',
@@ -95,7 +96,6 @@ async function promptForNameAsync() {
95
96
  });
96
97
  return providedName;
97
98
  }
98
- exports.promptForNameAsync = promptForNameAsync;
99
99
  /**
100
100
  * sort a build credentials array in descending order of preference
101
101
  * prefer default credentials, then prefer names that come first lexicographically
@@ -111,7 +111,6 @@ function sortBuildCredentials(androidAppBuildCredentialsList) {
111
111
  return buildCredentialsA.name.localeCompare(buildCredentialsB.name);
112
112
  });
113
113
  }
114
- exports.sortBuildCredentials = sortBuildCredentials;
115
114
  function generateRandomName() {
116
115
  return `Build Credentials ${(0, nanoid_1.nanoid)(10)}`;
117
116
  }
@@ -1,6 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatProjectFullName = exports.getGoogleServiceAccountKeysForAccountAsync = exports.deleteGoogleServiceAccountKeyAsync = exports.createGoogleServiceAccountKeyAsync = exports.deleteFcmAsync = exports.createFcmAsync = exports.deleteKeystoreAsync = exports.createKeystoreAsync = exports.createOrUpdateDefaultIosAppBuildCredentialsAsync = exports.createOrUpdateAndroidAppBuildCredentialsByNameAsync = exports.getAndroidAppBuildCredentialsByNameAsync = exports.getDefaultAndroidAppBuildCredentialsAsync = exports.createAndroidAppBuildCredentialsAsync = exports.setDefaultAndroidAppBuildCredentialsAsync = exports.updateAndroidAppBuildCredentialsAsync = exports.updateAndroidAppCredentialsAsync = exports.createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync = exports.getLegacyAndroidAppBuildCredentialsAsync = exports.getLegacyAndroidAppCredentialsWithCommonFieldsAsync = exports.getAndroidAppBuildCredentialsListAsync = exports.getAndroidAppCredentialsWithCommonFieldsAsync = void 0;
3
+ exports.formatProjectFullName = void 0;
4
+ exports.getAndroidAppCredentialsWithCommonFieldsAsync = getAndroidAppCredentialsWithCommonFieldsAsync;
5
+ exports.getAndroidAppBuildCredentialsListAsync = getAndroidAppBuildCredentialsListAsync;
6
+ exports.getLegacyAndroidAppCredentialsWithCommonFieldsAsync = getLegacyAndroidAppCredentialsWithCommonFieldsAsync;
7
+ exports.getLegacyAndroidAppBuildCredentialsAsync = getLegacyAndroidAppBuildCredentialsAsync;
8
+ exports.createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync = createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync;
9
+ exports.updateAndroidAppCredentialsAsync = updateAndroidAppCredentialsAsync;
10
+ exports.updateAndroidAppBuildCredentialsAsync = updateAndroidAppBuildCredentialsAsync;
11
+ exports.setDefaultAndroidAppBuildCredentialsAsync = setDefaultAndroidAppBuildCredentialsAsync;
12
+ exports.createAndroidAppBuildCredentialsAsync = createAndroidAppBuildCredentialsAsync;
13
+ exports.getDefaultAndroidAppBuildCredentialsAsync = getDefaultAndroidAppBuildCredentialsAsync;
14
+ exports.getAndroidAppBuildCredentialsByNameAsync = getAndroidAppBuildCredentialsByNameAsync;
15
+ exports.createOrUpdateAndroidAppBuildCredentialsByNameAsync = createOrUpdateAndroidAppBuildCredentialsByNameAsync;
16
+ exports.createOrUpdateDefaultIosAppBuildCredentialsAsync = createOrUpdateDefaultIosAppBuildCredentialsAsync;
17
+ exports.createKeystoreAsync = createKeystoreAsync;
18
+ exports.deleteKeystoreAsync = deleteKeystoreAsync;
19
+ exports.createFcmAsync = createFcmAsync;
20
+ exports.deleteFcmAsync = deleteFcmAsync;
21
+ exports.createGoogleServiceAccountKeyAsync = createGoogleServiceAccountKeyAsync;
22
+ exports.deleteGoogleServiceAccountKeyAsync = deleteGoogleServiceAccountKeyAsync;
23
+ exports.getGoogleServiceAccountKeysForAccountAsync = getGoogleServiceAccountKeysForAccountAsync;
4
24
  const AndroidAppBuildCredentialsMutation_1 = require("./graphql/mutations/AndroidAppBuildCredentialsMutation");
5
25
  const AndroidAppCredentialsMutation_1 = require("./graphql/mutations/AndroidAppCredentialsMutation");
6
26
  const AndroidFcmMutation_1 = require("./graphql/mutations/AndroidFcmMutation");
@@ -17,12 +37,10 @@ async function getAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appL
17
37
  legacyOnly: false,
18
38
  });
19
39
  }
20
- exports.getAndroidAppCredentialsWithCommonFieldsAsync = getAndroidAppCredentialsWithCommonFieldsAsync;
21
40
  async function getAndroidAppBuildCredentialsListAsync(graphqlClient, appLookupParams) {
22
41
  const appCredentials = await getAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams);
23
42
  return appCredentials?.androidAppBuildCredentialsList ?? [];
24
43
  }
25
- exports.getAndroidAppBuildCredentialsListAsync = getAndroidAppBuildCredentialsListAsync;
26
44
  /* There is at most one set of legacy android app credentials associated with an Expo App */
27
45
  async function getLegacyAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams) {
28
46
  const projectFullName = (0, exports.formatProjectFullName)(appLookupParams);
@@ -30,13 +48,11 @@ async function getLegacyAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient
30
48
  legacyOnly: true,
31
49
  });
32
50
  }
33
- exports.getLegacyAndroidAppCredentialsWithCommonFieldsAsync = getLegacyAndroidAppCredentialsWithCommonFieldsAsync;
34
51
  /* There is at most one set of legacy android app build credentials associated with an Expo App */
35
52
  async function getLegacyAndroidAppBuildCredentialsAsync(graphqlClient, appLookupParams) {
36
53
  const legacyAppCredentials = await getLegacyAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams);
37
54
  return legacyAppCredentials?.androidAppBuildCredentialsList[0] ?? null;
38
55
  }
39
- exports.getLegacyAndroidAppBuildCredentialsAsync = getLegacyAndroidAppBuildCredentialsAsync;
40
56
  async function createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync(graphqlClient, appLookupParams) {
41
57
  const maybeAndroidAppCredentials = await getAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams);
42
58
  if (maybeAndroidAppCredentials) {
@@ -47,7 +63,6 @@ async function createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync
47
63
  return await AndroidAppCredentialsMutation_1.AndroidAppCredentialsMutation.createAndroidAppCredentialsAsync(graphqlClient, {}, app.id, appLookupParams.androidApplicationIdentifier);
48
64
  }
49
65
  }
50
- exports.createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync = createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync;
51
66
  async function updateAndroidAppCredentialsAsync(graphqlClient, appCredentials, { androidFcmId, googleServiceAccountKeyForSubmissionsId, googleServiceAccountKeyForFcmV1Id, }) {
52
67
  let updatedAppCredentials = appCredentials;
53
68
  if (androidFcmId) {
@@ -63,15 +78,12 @@ async function updateAndroidAppCredentialsAsync(graphqlClient, appCredentials, {
63
78
  }
64
79
  return updatedAppCredentials;
65
80
  }
66
- exports.updateAndroidAppCredentialsAsync = updateAndroidAppCredentialsAsync;
67
81
  async function updateAndroidAppBuildCredentialsAsync(graphqlClient, buildCredentials, { androidKeystoreId, }) {
68
82
  return await AndroidAppBuildCredentialsMutation_1.AndroidAppBuildCredentialsMutation.setKeystoreAsync(graphqlClient, buildCredentials.id, androidKeystoreId);
69
83
  }
70
- exports.updateAndroidAppBuildCredentialsAsync = updateAndroidAppBuildCredentialsAsync;
71
84
  async function setDefaultAndroidAppBuildCredentialsAsync(graphqlClient, buildCredentials) {
72
85
  return await AndroidAppBuildCredentialsMutation_1.AndroidAppBuildCredentialsMutation.setDefaultAndroidAppBuildCredentialsAsync(graphqlClient, buildCredentials.id);
73
86
  }
74
- exports.setDefaultAndroidAppBuildCredentialsAsync = setDefaultAndroidAppBuildCredentialsAsync;
75
87
  async function createAndroidAppBuildCredentialsAsync(graphqlClient, appLookupParams, { name, isDefault, androidKeystoreId, }) {
76
88
  const androidAppCredentials = await createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync(graphqlClient, appLookupParams);
77
89
  return await AndroidAppBuildCredentialsMutation_1.AndroidAppBuildCredentialsMutation.createAndroidAppBuildCredentialsAsync(graphqlClient, {
@@ -80,17 +92,14 @@ async function createAndroidAppBuildCredentialsAsync(graphqlClient, appLookupPar
80
92
  keystoreId: androidKeystoreId,
81
93
  }, androidAppCredentials.id);
82
94
  }
83
- exports.createAndroidAppBuildCredentialsAsync = createAndroidAppBuildCredentialsAsync;
84
95
  async function getDefaultAndroidAppBuildCredentialsAsync(graphqlClient, appLookupParams) {
85
96
  const buildCredentialsList = await getAndroidAppBuildCredentialsListAsync(graphqlClient, appLookupParams);
86
97
  return buildCredentialsList.find(buildCredentials => buildCredentials.isDefault) ?? null;
87
98
  }
88
- exports.getDefaultAndroidAppBuildCredentialsAsync = getDefaultAndroidAppBuildCredentialsAsync;
89
99
  async function getAndroidAppBuildCredentialsByNameAsync(graphqlClient, appLookupParams, name) {
90
100
  const buildCredentialsList = await getAndroidAppBuildCredentialsListAsync(graphqlClient, appLookupParams);
91
101
  return buildCredentialsList.find(buildCredentials => buildCredentials.name === name) ?? null;
92
102
  }
93
- exports.getAndroidAppBuildCredentialsByNameAsync = getAndroidAppBuildCredentialsByNameAsync;
94
103
  async function createOrUpdateAndroidAppBuildCredentialsByNameAsync(graphqlClient, appLookupParams, name, { androidKeystoreId, }) {
95
104
  const existingBuildCredentialsWithName = await getAndroidAppBuildCredentialsByNameAsync(graphqlClient, appLookupParams, name);
96
105
  if (existingBuildCredentialsWithName) {
@@ -105,11 +114,9 @@ async function createOrUpdateAndroidAppBuildCredentialsByNameAsync(graphqlClient
105
114
  androidKeystoreId,
106
115
  });
107
116
  }
108
- exports.createOrUpdateAndroidAppBuildCredentialsByNameAsync = createOrUpdateAndroidAppBuildCredentialsByNameAsync;
109
117
  async function createOrUpdateDefaultIosAppBuildCredentialsAsync() {
110
118
  throw new Error('This requires user prompting. Look for me in BuildCredentialsUtils');
111
119
  }
112
- exports.createOrUpdateDefaultIosAppBuildCredentialsAsync = createOrUpdateDefaultIosAppBuildCredentialsAsync;
113
120
  async function createKeystoreAsync(graphqlClient, account, keystore) {
114
121
  return await AndroidKeystoreMutation_1.AndroidKeystoreMutation.createAndroidKeystoreAsync(graphqlClient, {
115
122
  base64EncodedKeystore: keystore.keystore,
@@ -118,31 +125,24 @@ async function createKeystoreAsync(graphqlClient, account, keystore) {
118
125
  keyPassword: keystore.keyPassword,
119
126
  }, account.id);
120
127
  }
121
- exports.createKeystoreAsync = createKeystoreAsync;
122
128
  async function deleteKeystoreAsync(graphqlClient, keystore) {
123
129
  await AndroidKeystoreMutation_1.AndroidKeystoreMutation.deleteAndroidKeystoreAsync(graphqlClient, keystore.id);
124
130
  }
125
- exports.deleteKeystoreAsync = deleteKeystoreAsync;
126
131
  async function createFcmAsync(graphqlClient, account, fcmApiKey, version) {
127
132
  return await AndroidFcmMutation_1.AndroidFcmMutation.createAndroidFcmAsync(graphqlClient, { credential: fcmApiKey, version }, account.id);
128
133
  }
129
- exports.createFcmAsync = createFcmAsync;
130
134
  async function deleteFcmAsync(graphqlClient, fcm) {
131
135
  await AndroidFcmMutation_1.AndroidFcmMutation.deleteAndroidFcmAsync(graphqlClient, fcm.id);
132
136
  }
133
- exports.deleteFcmAsync = deleteFcmAsync;
134
137
  async function createGoogleServiceAccountKeyAsync(graphqlClient, account, jsonKey) {
135
138
  return await GoogleServiceAccountKeyMutation_1.GoogleServiceAccountKeyMutation.createGoogleServiceAccountKeyAsync(graphqlClient, { jsonKey }, account.id);
136
139
  }
137
- exports.createGoogleServiceAccountKeyAsync = createGoogleServiceAccountKeyAsync;
138
140
  async function deleteGoogleServiceAccountKeyAsync(graphqlClient, googleServiceAccountKey) {
139
141
  await GoogleServiceAccountKeyMutation_1.GoogleServiceAccountKeyMutation.deleteGoogleServiceAccountKeyAsync(graphqlClient, googleServiceAccountKey.id);
140
142
  }
141
- exports.deleteGoogleServiceAccountKeyAsync = deleteGoogleServiceAccountKeyAsync;
142
143
  async function getGoogleServiceAccountKeysForAccountAsync(graphqlClient, account) {
143
144
  return await GoogleServiceAccountKeyQuery_1.GoogleServiceAccountKeyQuery.getAllForAccountAsync(graphqlClient, account.name);
144
145
  }
145
- exports.getGoogleServiceAccountKeysForAccountAsync = getGoogleServiceAccountKeysForAccountAsync;
146
146
  async function getAppAsync(graphqlClient, appLookupParams) {
147
147
  const projectFullName = (0, exports.formatProjectFullName)(appLookupParams);
148
148
  return await AppQuery_1.AppQuery.byFullNameAsync(graphqlClient, projectFullName);
@@ -2,7 +2,7 @@ import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUt
2
2
  import { CommonAndroidAppCredentialsFragment } from '../../../../../graphql/generated';
3
3
  export declare const AndroidAppCredentialsQuery: {
4
4
  withCommonFieldsByApplicationIdentifierAsync(graphqlClient: ExpoGraphqlClient, projectFullName: string, { androidApplicationIdentifier, legacyOnly, }: {
5
- androidApplicationIdentifier?: string | undefined;
6
- legacyOnly?: boolean | undefined;
5
+ androidApplicationIdentifier?: string;
6
+ legacyOnly?: boolean;
7
7
  }): Promise<CommonAndroidAppCredentialsFragment | null>;
8
8
  };
@@ -3,9 +3,9 @@ import { GoogleServiceAccountKeyFragment, GoogleServiceAccountKeysPaginatedByAcc
3
3
  export declare const GoogleServiceAccountKeyQuery: {
4
4
  getAllForAccountAsync(graphqlClient: ExpoGraphqlClient, accountName: string): Promise<GoogleServiceAccountKeyFragment[]>;
5
5
  getAllForAccountPaginatedAsync(graphqlClient: ExpoGraphqlClient, accountName: string, { after, first, before, last, }: {
6
- after?: string | undefined;
7
- first?: number | undefined;
8
- before?: string | undefined;
9
- last?: number | undefined;
10
- }): Promise<GoogleServiceAccountKeysPaginatedByAccountQuery['account']['byName']['googleServiceAccountKeysPaginated']>;
6
+ after?: string;
7
+ first?: number;
8
+ before?: string;
9
+ last?: number;
10
+ }): Promise<GoogleServiceAccountKeysPaginatedByAccountQuery["account"]["byName"]["googleServiceAccountKeysPaginated"]>;
11
11
  };
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.detectGoogleServiceAccountKeyPathAsync = exports.selectGoogleServiceAccountKeyAsync = exports.readAndValidateServiceAccountKey = exports.MinimalGoogleServiceAccountKeySchema = void 0;
3
+ exports.MinimalGoogleServiceAccountKeySchema = void 0;
4
+ exports.readAndValidateServiceAccountKey = readAndValidateServiceAccountKey;
5
+ exports.selectGoogleServiceAccountKeyAsync = selectGoogleServiceAccountKeyAsync;
6
+ exports.detectGoogleServiceAccountKeyPathAsync = detectGoogleServiceAccountKeyPathAsync;
4
7
  const tslib_1 = require("tslib");
5
8
  const json_file_1 = tslib_1.__importDefault(require("@expo/json-file"));
6
9
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
@@ -47,7 +50,6 @@ function readAndValidateServiceAccountKey(keyJsonPath) {
47
50
  throw err;
48
51
  }
49
52
  }
50
- exports.readAndValidateServiceAccountKey = readAndValidateServiceAccountKey;
51
53
  async function selectGoogleServiceAccountKeyAsync(keys) {
52
54
  const sortedKeys = sortGoogleServiceAccountKeysByUpdatedAtDesc(keys);
53
55
  const { chosenKey } = await (0, prompts_1.promptAsync)({
@@ -61,7 +63,6 @@ async function selectGoogleServiceAccountKeyAsync(keys) {
61
63
  });
62
64
  return chosenKey;
63
65
  }
64
- exports.selectGoogleServiceAccountKeyAsync = selectGoogleServiceAccountKeyAsync;
65
66
  function sortGoogleServiceAccountKeysByUpdatedAtDesc(keys) {
66
67
  return keys.sort((keyA, keyB) => new Date(keyB.updatedAt).getTime() - new Date(keyA.updatedAt).getTime());
67
68
  }
@@ -93,7 +94,6 @@ async function detectGoogleServiceAccountKeyPathAsync(projectDir) {
93
94
  }
94
95
  return null;
95
96
  }
96
- exports.detectGoogleServiceAccountKeyPathAsync = detectGoogleServiceAccountKeyPathAsync;
97
97
  async function displayPathChooserAsync(paths, projectDir) {
98
98
  const choices = paths.map(f => ({
99
99
  value: f,
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateRandomKeystoreAsync = exports.keytoolCommandExistsAsync = void 0;
3
+ exports.keytoolCommandExistsAsync = keytoolCommandExistsAsync;
4
+ exports.generateRandomKeystoreAsync = generateRandomKeystoreAsync;
4
5
  const tslib_1 = require("tslib");
5
6
  const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
6
7
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
@@ -24,7 +25,6 @@ async function keytoolCommandExistsAsync() {
24
25
  return false;
25
26
  }
26
27
  }
27
- exports.keytoolCommandExistsAsync = keytoolCommandExistsAsync;
28
28
  var KeystoreCreateStep;
29
29
  (function (KeystoreCreateStep) {
30
30
  KeystoreCreateStep["Attempt"] = "attempt";
@@ -39,7 +39,6 @@ async function generateRandomKeystoreAsync(graphqlClient, analytics, projectId)
39
39
  };
40
40
  return await createKeystoreAsync(graphqlClient, analytics, keystoreData, projectId);
41
41
  }
42
- exports.generateRandomKeystoreAsync = generateRandomKeystoreAsync;
43
42
  async function createKeystoreAsync(graphqlClient, analytics, keystoreParams, projectId) {
44
43
  analytics.logEvent(AnalyticsManager_1.BuildEvent.ANDROID_KEYSTORE_CREATE, {
45
44
  project_id: projectId,
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateKeystore = exports.getKeystoreType = exports.getKeystoreWithType = void 0;
3
+ exports.getKeystoreWithType = getKeystoreWithType;
4
+ exports.getKeystoreType = getKeystoreType;
5
+ exports.validateKeystore = validateKeystore;
4
6
  const tslib_1 = require("tslib");
5
7
  const pkcs12_1 = require("@expo/pkcs12");
6
8
  const jks_js_1 = tslib_1.__importDefault(require("jks-js"));
@@ -10,7 +12,6 @@ function getKeystoreWithType(keystore) {
10
12
  const type = getKeystoreType(keystore);
11
13
  return { ...keystore, type };
12
14
  }
13
- exports.getKeystoreWithType = getKeystoreWithType;
14
15
  function getKeystoreType(keystore) {
15
16
  if (isPKCSKeystore(keystore)) {
16
17
  return generated_1.AndroidKeystoreType.Pkcs12;
@@ -20,7 +21,6 @@ function getKeystoreType(keystore) {
20
21
  }
21
22
  return generated_1.AndroidKeystoreType.Unknown;
22
23
  }
23
- exports.getKeystoreType = getKeystoreType;
24
24
  function isPKCSKeystore(keystore) {
25
25
  try {
26
26
  (0, pkcs12_1.parsePKCS12)(keystore.keystore, keystore.keystorePassword);
@@ -53,7 +53,6 @@ function validateKeystore(keystore) {
53
53
  log_1.default.warn(`Unsupported keystore type: ${keystore.type}, skipping validation.`);
54
54
  }
55
55
  }
56
- exports.validateKeystore = validateKeystore;
57
56
  function getPemFromJksKeystore(keystore) {
58
57
  const keystoreEntries = jks_js_1.default.parseJks(Buffer.from(keystore.keystore, 'base64'), keystore.keystorePassword);
59
58
  // keystore entries are case insensitive in both keytool and jks-js implementations
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.displayAndroidAppCredentials = exports.displayAndroidKeystore = exports.displayEmptyAndroidCredentials = void 0;
3
+ exports.displayEmptyAndroidCredentials = displayEmptyAndroidCredentials;
4
+ exports.displayAndroidKeystore = displayAndroidKeystore;
5
+ exports.displayAndroidAppCredentials = displayAndroidAppCredentials;
4
6
  const tslib_1 = require("tslib");
5
7
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
8
  const generated_1 = require("../../../graphql/generated");
@@ -19,7 +21,6 @@ function displayEmptyAndroidCredentials(appLookupParams) {
19
21
  log_1.default.log((0, formatFields_1.default)([{ label: 'No credentials set up yet!', value: '' }]));
20
22
  log_1.default.newLine();
21
23
  }
22
- exports.displayEmptyAndroidCredentials = displayEmptyAndroidCredentials;
23
24
  function displayAndroidFcmCredentials(appCredentials) {
24
25
  const maybeFcm = appCredentials.androidFcm;
25
26
  log_1.default.log((0, formatFields_1.default)([{ label: 'Push Notifications (FCM Legacy)', value: '' }], {
@@ -144,7 +145,6 @@ function displayAndroidKeystore(keystore) {
144
145
  ];
145
146
  log_1.default.log((0, formatFields_1.default)(fields, { labelFormat: chalk_1.default.cyan.bold }));
146
147
  }
147
- exports.displayAndroidKeystore = displayAndroidKeystore;
148
148
  function displayAndroidAppCredentials({ appLookupParams, appCredentials, }) {
149
149
  const { projectName, androidApplicationIdentifier } = appLookupParams;
150
150
  const fields = [
@@ -158,4 +158,3 @@ function displayAndroidAppCredentials({ appLookupParams, appCredentials, }) {
158
158
  displayEASAndroidAppCredentials(appCredentials);
159
159
  }
160
160
  }
161
- exports.displayAndroidAppCredentials = displayAndroidAppCredentials;