eas-cli 9.0.3 → 9.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
@@ -9,7 +9,6 @@ const client_1 = require("../client");
9
9
  const Build_1 = require("../types/Build");
10
10
  exports.BuildMutation = {
11
11
  async createAndroidBuildAsync(graphqlClient, input) {
12
- var _a;
13
12
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
14
13
  .mutation((0, graphql_tag_1.default) `
15
14
  mutation CreateAndroidBuildMutation(
@@ -39,10 +38,9 @@ exports.BuildMutation = {
39
38
  ${(0, graphql_1.print)(Build_1.BuildFragmentNode)}
40
39
  `, input, { noRetry: true })
41
40
  .toPromise());
42
- return (0, nullthrows_1.default)((_a = data.build) === null || _a === void 0 ? void 0 : _a.createAndroidBuild);
41
+ return (0, nullthrows_1.default)(data.build?.createAndroidBuild);
43
42
  },
44
43
  async createIosBuildAsync(graphqlClient, input) {
45
- var _a;
46
44
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
47
45
  .mutation((0, graphql_tag_1.default) `
48
46
  mutation CreateIosBuildMutation(
@@ -72,10 +70,9 @@ exports.BuildMutation = {
72
70
  ${(0, graphql_1.print)(Build_1.BuildFragmentNode)}
73
71
  `, input, { noRetry: true })
74
72
  .toPromise());
75
- return (0, nullthrows_1.default)((_a = data.build) === null || _a === void 0 ? void 0 : _a.createIosBuild);
73
+ return (0, nullthrows_1.default)(data.build?.createIosBuild);
76
74
  },
77
75
  async updateBuildMetadataAsync(graphqlClient, input) {
78
- var _a;
79
76
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
80
77
  .mutation((0, graphql_tag_1.default) `
81
78
  mutation UpdateBuildMetadataMutation($buildId: ID!, $metadata: BuildMetadataInput!) {
@@ -89,10 +86,9 @@ exports.BuildMutation = {
89
86
  ${(0, graphql_1.print)(Build_1.BuildFragmentNode)}
90
87
  `, input)
91
88
  .toPromise());
92
- return (0, nullthrows_1.default)((_a = data.build) === null || _a === void 0 ? void 0 : _a.updateBuildMetadata);
89
+ return (0, nullthrows_1.default)(data.build?.updateBuildMetadata);
93
90
  },
94
91
  async retryIosBuildAsync(graphqlClient, input) {
95
- var _a;
96
92
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
97
93
  .mutation((0, graphql_tag_1.default) `
98
94
  mutation RetryIosBuildMutation($buildId: ID!, $jobOverrides: IosJobOverridesInput!) {
@@ -106,6 +102,6 @@ exports.BuildMutation = {
106
102
  ${(0, graphql_1.print)(Build_1.BuildFragmentNode)}
107
103
  `, input, { noRetry: true })
108
104
  .toPromise());
109
- return (0, nullthrows_1.default)((_a = data.build) === null || _a === void 0 ? void 0 : _a.retryIosBuild);
105
+ return (0, nullthrows_1.default)(data.build?.retryIosBuild);
110
106
  },
111
107
  };
@@ -7,7 +7,6 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
7
  const client_1 = require("../client");
8
8
  exports.UserPreferencesMutation = {
9
9
  async markCliDoneInOnboardingUserPreferencesAsync(graphqlClient, userPreferencesData) {
10
- var _a, _b;
11
10
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
11
  .mutation((0, graphql_tag_1.default) `
13
12
  mutation MarkCliDoneInOnboardingUserPreferencesMutation(
@@ -32,9 +31,9 @@ exports.UserPreferencesMutation = {
32
31
  },
33
32
  })
34
33
  .toPromise());
35
- const appId = (_a = data.me.setPreferences.onboarding) === null || _a === void 0 ? void 0 : _a.appId;
34
+ const appId = data.me.setPreferences.onboarding?.appId;
36
35
  (0, assert_1.default)(appId, 'App ID must be defined');
37
- const isCLIDone = (_b = data.me.setPreferences.onboarding) === null || _b === void 0 ? void 0 : _b.isCLIDone;
36
+ const isCLIDone = data.me.setPreferences.onboarding?.isCLIDone;
38
37
  (0, assert_1.default)(isCLIDone, 'isCLIDone must be defined and true');
39
38
  return {
40
39
  appId,
@@ -6,7 +6,6 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
6
  const client_1 = require("../client");
7
7
  exports.AppVersionQuery = {
8
8
  async latestVersionAsync(graphqlClient, appId, platform, applicationIdentifier) {
9
- var _a;
10
9
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
11
10
  .query((0, graphql_tag_1.default) `
12
11
  query LatestAppVersion(
@@ -32,6 +31,6 @@ exports.AppVersionQuery = {
32
31
  additionalTypenames: ['App', 'AppVersion'],
33
32
  })
34
33
  .toPromise());
35
- return (_a = data.app.byId.latestAppVersionByPlatformAndApplicationIdentifier) !== null && _a !== void 0 ? _a : null;
34
+ return data.app.byId.latestAppVersionByPlatformAndApplicationIdentifier ?? null;
36
35
  },
37
36
  };
@@ -37,7 +37,6 @@ exports.BranchQuery = {
37
37
  return updateBranchByName;
38
38
  },
39
39
  async listBranchesOnAppAsync(graphqlClient, { appId, limit, offset }) {
40
- var _a, _b;
41
40
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
42
41
  .query((0, graphql_tag_1.default) `
43
42
  query BranchesByAppQuery($appId: String!, $limit: Int!, $offset: Int!) {
@@ -58,7 +57,7 @@ exports.BranchQuery = {
58
57
  offset,
59
58
  }, { additionalTypenames: ['UpdateBranch'] })
60
59
  .toPromise());
61
- return (_b = (_a = data === null || data === void 0 ? void 0 : data.app) === null || _a === void 0 ? void 0 : _a.byId.updateBranches) !== null && _b !== void 0 ? _b : [];
60
+ return data?.app?.byId.updateBranches ?? [];
62
61
  },
63
62
  async listBranchesBasicInfoPaginatedOnAppAsync(graphqlClient, { appId, first, after, last, before }) {
64
63
  const response = await (0, client_1.withErrorHandlingAsync)(graphqlClient
@@ -46,7 +46,6 @@ exports.BuildQuery = {
46
46
  return data.builds.byId;
47
47
  },
48
48
  async viewBuildsOnAppAsync(graphqlClient, { appId, limit, offset, filter }) {
49
- var _a, _b;
50
49
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
51
50
  .query(
52
51
  // TODO: Change $appId: String! to ID! when fixed server-side schema
@@ -72,6 +71,6 @@ exports.BuildQuery = {
72
71
  additionalTypenames: ['Build'],
73
72
  })
74
73
  .toPromise());
75
- return (_b = (_a = data.app) === null || _a === void 0 ? void 0 : _a.byId.builds) !== null && _b !== void 0 ? _b : [];
74
+ return data.app?.byId.builds ?? [];
76
75
  },
77
76
  };
@@ -13,7 +13,6 @@ var EnvironmentSecretScope;
13
13
  })(EnvironmentSecretScope || (exports.EnvironmentSecretScope = EnvironmentSecretScope = {}));
14
14
  exports.EnvironmentSecretsQuery = {
15
15
  async byAppIdAsync(graphqlClient, appId) {
16
- var _a, _b, _c, _d;
17
16
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
18
17
  .query((0, graphql_tag_1.default) `
19
18
  query EnvironmentSecretsByAppId($appId: String!) {
@@ -38,8 +37,8 @@ exports.EnvironmentSecretsQuery = {
38
37
  `, { appId }, { additionalTypenames: ['EnvironmentSecret'] })
39
38
  .toPromise());
40
39
  return {
41
- accountSecrets: (_b = (_a = data.app) === null || _a === void 0 ? void 0 : _a.byId.ownerAccount.environmentSecrets) !== null && _b !== void 0 ? _b : [],
42
- appSecrets: (_d = (_c = data.app) === null || _c === void 0 ? void 0 : _c.byId.environmentSecrets) !== null && _d !== void 0 ? _d : [],
40
+ accountSecrets: data.app?.byId.ownerAccount.environmentSecrets ?? [],
41
+ appSecrets: data.app?.byId.environmentSecrets ?? [],
43
42
  };
44
43
  },
45
44
  async allAsync(graphqlClient, projectId) {
@@ -27,7 +27,6 @@ exports.SubmissionQuery = {
27
27
  return data.submissions.byId;
28
28
  },
29
29
  async allForAppAsync(graphqlClient, appId, { limit = 10, offset = 0, status, platform }) {
30
- var _a, _b;
31
30
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
32
31
  .query((0, graphql_tag_1.default) `
33
32
  query GetAllSubmissionsForApp(
@@ -54,6 +53,6 @@ exports.SubmissionQuery = {
54
53
  ${(0, graphql_1.print)(Submission_1.SubmissionFragmentNode)}
55
54
  `, { appId, offset, limit, status, platform }, { additionalTypenames: ['Submission'] })
56
55
  .toPromise());
57
- return (_b = (_a = data.app) === null || _a === void 0 ? void 0 : _a.byId.submissions) !== null && _b !== void 0 ? _b : [];
56
+ return data.app?.byId.submissions ?? [];
58
57
  },
59
58
  };
@@ -8,7 +8,6 @@ const client_1 = require("../client");
8
8
  const Webhook_1 = require("../types/Webhook");
9
9
  exports.WebhookQuery = {
10
10
  async byAppIdAsync(graphqlClient, appId, webhookFilter) {
11
- var _a, _b;
12
11
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
13
12
  .query((0, graphql_tag_1.default) `
14
13
  query WebhooksByAppId($appId: String!, $webhookFilter: WebhookFilter) {
@@ -27,7 +26,7 @@ exports.WebhookQuery = {
27
26
  additionalTypenames: ['Webhook'],
28
27
  })
29
28
  .toPromise());
30
- return (_b = (_a = data.app) === null || _a === void 0 ? void 0 : _a.byId.webhooks) !== null && _b !== void 0 ? _b : [];
29
+ return data.app?.byId.webhooks ?? [];
31
30
  },
32
31
  async byIdAsync(graphqlClient, webhookId) {
33
32
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
@@ -7,6 +7,7 @@ const Account_1 = require("./Account");
7
7
  exports.AppFragmentNode = (0, graphql_tag_1.default) `
8
8
  fragment AppFragment on App {
9
9
  id
10
+ name
10
11
  fullName
11
12
  slug
12
13
  ownerAccount {
package/build/log.js CHANGED
@@ -83,7 +83,7 @@ exports.default = Log;
83
83
  function link(url, { text = url, fallback, dim = true } = {}) {
84
84
  // Links can be disabled via env variables https://github.com/jamestalmage/supports-hyperlinks/blob/master/index.js
85
85
  const output = (0, terminal_link_1.default)(text, url, {
86
- fallback: () => fallback !== null && fallback !== void 0 ? fallback : (text === url ? chalk_1.default.underline(url) : `${text}: ${chalk_1.default.underline(url)}`),
86
+ fallback: () => fallback ?? (text === url ? chalk_1.default.underline(url) : `${text}: ${chalk_1.default.underline(url)}`),
87
87
  });
88
88
  return dim ? chalk_1.default.dim(output) : output;
89
89
  }
@@ -95,6 +95,6 @@ exports.link = link;
95
95
  * @example Learn more: https://expo.dev
96
96
  */
97
97
  function learnMore(url, { learnMoreMessage: maybeLearnMoreMessage, dim = true, } = {}) {
98
- return link(url, { text: maybeLearnMoreMessage !== null && maybeLearnMoreMessage !== void 0 ? maybeLearnMoreMessage : 'Learn more', dim });
98
+ return link(url, { text: maybeLearnMoreMessage ?? 'Learn more', dim });
99
99
  }
100
100
  exports.learnMore = learnMore;
@@ -16,28 +16,27 @@ class AppleConfigReader {
16
16
  this.schema = schema;
17
17
  }
18
18
  getAgeRating() {
19
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
20
19
  const attributes = this.schema.advisory;
21
20
  if (!attributes) {
22
21
  return null;
23
22
  }
24
23
  return {
25
- alcoholTobaccoOrDrugUseOrReferences: (_a = attributes.alcoholTobaccoOrDrugUseOrReferences) !== null && _a !== void 0 ? _a : apple_utils_1.Rating.NONE,
26
- contests: (_b = attributes.contests) !== null && _b !== void 0 ? _b : apple_utils_1.Rating.NONE,
27
- gamblingSimulated: (_c = attributes.gamblingSimulated) !== null && _c !== void 0 ? _c : apple_utils_1.Rating.NONE,
28
- horrorOrFearThemes: (_d = attributes.horrorOrFearThemes) !== null && _d !== void 0 ? _d : apple_utils_1.Rating.NONE,
29
- matureOrSuggestiveThemes: (_e = attributes.matureOrSuggestiveThemes) !== null && _e !== void 0 ? _e : apple_utils_1.Rating.NONE,
30
- medicalOrTreatmentInformation: (_f = attributes.medicalOrTreatmentInformation) !== null && _f !== void 0 ? _f : apple_utils_1.Rating.NONE,
31
- profanityOrCrudeHumor: (_g = attributes.profanityOrCrudeHumor) !== null && _g !== void 0 ? _g : apple_utils_1.Rating.NONE,
32
- sexualContentGraphicAndNudity: (_h = attributes.sexualContentGraphicAndNudity) !== null && _h !== void 0 ? _h : apple_utils_1.Rating.NONE,
33
- sexualContentOrNudity: (_j = attributes.sexualContentOrNudity) !== null && _j !== void 0 ? _j : apple_utils_1.Rating.NONE,
34
- violenceCartoonOrFantasy: (_k = attributes.violenceCartoonOrFantasy) !== null && _k !== void 0 ? _k : apple_utils_1.Rating.NONE,
35
- violenceRealistic: (_l = attributes.violenceRealistic) !== null && _l !== void 0 ? _l : apple_utils_1.Rating.NONE,
36
- violenceRealisticProlongedGraphicOrSadistic: (_m = attributes.violenceRealisticProlongedGraphicOrSadistic) !== null && _m !== void 0 ? _m : apple_utils_1.Rating.NONE,
37
- gambling: (_o = attributes.gambling) !== null && _o !== void 0 ? _o : false,
38
- unrestrictedWebAccess: (_p = attributes.unrestrictedWebAccess) !== null && _p !== void 0 ? _p : false,
39
- kidsAgeBand: (_q = attributes.kidsAgeBand) !== null && _q !== void 0 ? _q : null,
40
- seventeenPlus: (_r = attributes.seventeenPlus) !== null && _r !== void 0 ? _r : false,
24
+ alcoholTobaccoOrDrugUseOrReferences: attributes.alcoholTobaccoOrDrugUseOrReferences ?? apple_utils_1.Rating.NONE,
25
+ contests: attributes.contests ?? apple_utils_1.Rating.NONE,
26
+ gamblingSimulated: attributes.gamblingSimulated ?? apple_utils_1.Rating.NONE,
27
+ horrorOrFearThemes: attributes.horrorOrFearThemes ?? apple_utils_1.Rating.NONE,
28
+ matureOrSuggestiveThemes: attributes.matureOrSuggestiveThemes ?? apple_utils_1.Rating.NONE,
29
+ medicalOrTreatmentInformation: attributes.medicalOrTreatmentInformation ?? apple_utils_1.Rating.NONE,
30
+ profanityOrCrudeHumor: attributes.profanityOrCrudeHumor ?? apple_utils_1.Rating.NONE,
31
+ sexualContentGraphicAndNudity: attributes.sexualContentGraphicAndNudity ?? apple_utils_1.Rating.NONE,
32
+ sexualContentOrNudity: attributes.sexualContentOrNudity ?? apple_utils_1.Rating.NONE,
33
+ violenceCartoonOrFantasy: attributes.violenceCartoonOrFantasy ?? apple_utils_1.Rating.NONE,
34
+ violenceRealistic: attributes.violenceRealistic ?? apple_utils_1.Rating.NONE,
35
+ violenceRealisticProlongedGraphicOrSadistic: attributes.violenceRealisticProlongedGraphicOrSadistic ?? apple_utils_1.Rating.NONE,
36
+ gambling: attributes.gambling ?? false,
37
+ unrestrictedWebAccess: attributes.unrestrictedWebAccess ?? false,
38
+ kidsAgeBand: attributes.kidsAgeBand ?? null,
39
+ seventeenPlus: attributes.seventeenPlus ?? false,
41
40
  };
42
41
  }
43
42
  getLocales() {
@@ -45,8 +44,7 @@ class AppleConfigReader {
45
44
  return (0, uniq_1.default)(Object.keys(this.schema.info || {}));
46
45
  }
47
46
  getInfoLocale(locale) {
48
- var _a;
49
- const info = (_a = this.schema.info) === null || _a === void 0 ? void 0 : _a[locale];
47
+ const info = this.schema.info?.[locale];
50
48
  if (!info) {
51
49
  return null;
52
50
  }
@@ -88,31 +86,29 @@ class AppleConfigReader {
88
86
  }
89
87
  /** Get the `AppStoreVersion` object. */
90
88
  getVersion() {
91
- var _a, _b;
92
89
  const attributes = {
93
- versionString: (_a = this.schema.version) !== null && _a !== void 0 ? _a : '',
94
- copyright: (_b = this.schema.copyright) !== null && _b !== void 0 ? _b : null,
90
+ versionString: this.schema.version ?? '',
91
+ copyright: this.schema.copyright ?? null,
95
92
  };
96
93
  const hasValues = Object.values(attributes).some(Boolean);
97
94
  return hasValues ? attributes : null;
98
95
  }
99
96
  getVersionReleaseType() {
100
- var _a, _b;
101
97
  const { release } = this.schema;
102
- if (typeof (release === null || release === void 0 ? void 0 : release.automaticRelease) === 'string') {
98
+ if (typeof release?.automaticRelease === 'string') {
103
99
  return {
104
100
  releaseType: apple_utils_1.ReleaseType.SCHEDULED,
105
101
  // Convert time format to 2020-06-17T12:00:00-07:00, if that fails, try the date anyways.
106
- earliestReleaseDate: (_b = (_a = (0, date_1.removeDatePrecision)(release.automaticRelease)) === null || _a === void 0 ? void 0 : _a.toISOString()) !== null && _b !== void 0 ? _b : release.automaticRelease,
102
+ earliestReleaseDate: (0, date_1.removeDatePrecision)(release.automaticRelease)?.toISOString() ?? release.automaticRelease,
107
103
  };
108
104
  }
109
- if ((release === null || release === void 0 ? void 0 : release.automaticRelease) === true) {
105
+ if (release?.automaticRelease === true) {
110
106
  return {
111
107
  releaseType: apple_utils_1.ReleaseType.AFTER_APPROVAL,
112
108
  earliestReleaseDate: null,
113
109
  };
114
110
  }
115
- if ((release === null || release === void 0 ? void 0 : release.automaticRelease) === false) {
111
+ if (release?.automaticRelease === false) {
116
112
  return {
117
113
  releaseType: apple_utils_1.ReleaseType.MANUAL,
118
114
  earliestReleaseDate: null,
@@ -121,8 +117,7 @@ class AppleConfigReader {
121
117
  return null;
122
118
  }
123
119
  getVersionReleasePhased() {
124
- var _a;
125
- if (((_a = this.schema.release) === null || _a === void 0 ? void 0 : _a.phasedRelease) === true) {
120
+ if (this.schema.release?.phasedRelease === true) {
126
121
  return {
127
122
  phasedReleaseState: apple_utils_1.PhasedReleaseState.ACTIVE,
128
123
  };
@@ -132,15 +127,14 @@ class AppleConfigReader {
132
127
  return null;
133
128
  }
134
129
  getVersionLocale(locale, context) {
135
- var _a, _b;
136
- const info = (_a = this.schema.info) === null || _a === void 0 ? void 0 : _a[locale];
130
+ const info = this.schema.info?.[locale];
137
131
  if (!info) {
138
132
  return null;
139
133
  }
140
134
  return {
141
135
  locale,
142
136
  description: info.description,
143
- keywords: (_b = info.keywords) === null || _b === void 0 ? void 0 : _b.join(','),
137
+ keywords: info.keywords?.join(','),
144
138
  // TODO: maybe move this to task logic, it's more an exception than data handling
145
139
  whatsNew: context.versionIsFirst ? undefined : info.releaseNotes || exports.DEFAULT_WHATSNEW,
146
140
  marketingUrl: info.marketingUrl,
@@ -18,33 +18,31 @@ class AppleConfigWriter {
18
18
  };
19
19
  }
20
20
  setAgeRating(attributes) {
21
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
22
21
  this.schema.advisory = {
23
- alcoholTobaccoOrDrugUseOrReferences: (_a = attributes.alcoholTobaccoOrDrugUseOrReferences) !== null && _a !== void 0 ? _a : apple_utils_1.Rating.NONE,
24
- contests: (_b = attributes.contests) !== null && _b !== void 0 ? _b : apple_utils_1.Rating.NONE,
25
- gamblingSimulated: (_c = attributes.gamblingSimulated) !== null && _c !== void 0 ? _c : apple_utils_1.Rating.NONE,
26
- horrorOrFearThemes: (_d = attributes.horrorOrFearThemes) !== null && _d !== void 0 ? _d : apple_utils_1.Rating.NONE,
27
- matureOrSuggestiveThemes: (_e = attributes.matureOrSuggestiveThemes) !== null && _e !== void 0 ? _e : apple_utils_1.Rating.NONE,
28
- medicalOrTreatmentInformation: (_f = attributes.medicalOrTreatmentInformation) !== null && _f !== void 0 ? _f : apple_utils_1.Rating.NONE,
29
- profanityOrCrudeHumor: (_g = attributes.profanityOrCrudeHumor) !== null && _g !== void 0 ? _g : apple_utils_1.Rating.NONE,
30
- sexualContentGraphicAndNudity: (_h = attributes.sexualContentGraphicAndNudity) !== null && _h !== void 0 ? _h : apple_utils_1.Rating.NONE,
31
- sexualContentOrNudity: (_j = attributes.sexualContentOrNudity) !== null && _j !== void 0 ? _j : apple_utils_1.Rating.NONE,
32
- violenceCartoonOrFantasy: (_k = attributes.violenceCartoonOrFantasy) !== null && _k !== void 0 ? _k : apple_utils_1.Rating.NONE,
33
- violenceRealistic: (_l = attributes.violenceRealistic) !== null && _l !== void 0 ? _l : apple_utils_1.Rating.NONE,
34
- violenceRealisticProlongedGraphicOrSadistic: (_m = attributes.violenceRealisticProlongedGraphicOrSadistic) !== null && _m !== void 0 ? _m : apple_utils_1.Rating.NONE,
35
- gambling: (_o = attributes.gambling) !== null && _o !== void 0 ? _o : false,
36
- unrestrictedWebAccess: (_p = attributes.unrestrictedWebAccess) !== null && _p !== void 0 ? _p : false,
37
- kidsAgeBand: (_q = attributes.kidsAgeBand) !== null && _q !== void 0 ? _q : null,
38
- seventeenPlus: (_r = attributes.seventeenPlus) !== null && _r !== void 0 ? _r : false,
22
+ alcoholTobaccoOrDrugUseOrReferences: attributes.alcoholTobaccoOrDrugUseOrReferences ?? apple_utils_1.Rating.NONE,
23
+ contests: attributes.contests ?? apple_utils_1.Rating.NONE,
24
+ gamblingSimulated: attributes.gamblingSimulated ?? apple_utils_1.Rating.NONE,
25
+ horrorOrFearThemes: attributes.horrorOrFearThemes ?? apple_utils_1.Rating.NONE,
26
+ matureOrSuggestiveThemes: attributes.matureOrSuggestiveThemes ?? apple_utils_1.Rating.NONE,
27
+ medicalOrTreatmentInformation: attributes.medicalOrTreatmentInformation ?? apple_utils_1.Rating.NONE,
28
+ profanityOrCrudeHumor: attributes.profanityOrCrudeHumor ?? apple_utils_1.Rating.NONE,
29
+ sexualContentGraphicAndNudity: attributes.sexualContentGraphicAndNudity ?? apple_utils_1.Rating.NONE,
30
+ sexualContentOrNudity: attributes.sexualContentOrNudity ?? apple_utils_1.Rating.NONE,
31
+ violenceCartoonOrFantasy: attributes.violenceCartoonOrFantasy ?? apple_utils_1.Rating.NONE,
32
+ violenceRealistic: attributes.violenceRealistic ?? apple_utils_1.Rating.NONE,
33
+ violenceRealisticProlongedGraphicOrSadistic: attributes.violenceRealisticProlongedGraphicOrSadistic ?? apple_utils_1.Rating.NONE,
34
+ gambling: attributes.gambling ?? false,
35
+ unrestrictedWebAccess: attributes.unrestrictedWebAccess ?? false,
36
+ kidsAgeBand: attributes.kidsAgeBand ?? null,
37
+ seventeenPlus: attributes.seventeenPlus ?? false,
39
38
  };
40
39
  }
41
40
  setInfoLocale(attributes) {
42
- var _a, _b, _c;
43
- this.schema.info = (_a = this.schema.info) !== null && _a !== void 0 ? _a : {};
44
- const existing = (_b = this.schema.info[attributes.locale]) !== null && _b !== void 0 ? _b : {};
41
+ this.schema.info = this.schema.info ?? {};
42
+ const existing = this.schema.info[attributes.locale] ?? {};
45
43
  this.schema.info[attributes.locale] = {
46
44
  ...existing,
47
- title: (_c = attributes.name) !== null && _c !== void 0 ? _c : '',
45
+ title: attributes.name ?? '',
48
46
  subtitle: optional(attributes.subtitle),
49
47
  privacyPolicyUrl: optional(attributes.privacyPolicyUrl),
50
48
  privacyPolicyText: optional(attributes.privacyPolicyText),
@@ -52,7 +50,6 @@ class AppleConfigWriter {
52
50
  };
53
51
  }
54
52
  setCategories(attributes) {
55
- var _a, _b, _c, _d, _e, _f;
56
53
  this.schema.categories = undefined;
57
54
  if (!attributes.primaryCategory && !attributes.secondaryCategory) {
58
55
  return;
@@ -61,20 +58,20 @@ class AppleConfigWriter {
61
58
  if (attributes.primaryCategory && attributes.primarySubcategoryOne) {
62
59
  this.schema.categories[0] = [
63
60
  attributes.primaryCategory.id,
64
- (_a = attributes.primarySubcategoryOne) === null || _a === void 0 ? void 0 : _a.id,
65
- (_b = attributes.primarySubcategoryTwo) === null || _b === void 0 ? void 0 : _b.id,
61
+ attributes.primarySubcategoryOne?.id,
62
+ attributes.primarySubcategoryTwo?.id,
66
63
  ].filter(Boolean);
67
64
  }
68
65
  else {
69
66
  // If only the secondaryCategory was provided,
70
67
  // autofill with an empty string and cause a store config error.
71
- this.schema.categories[0] = (_d = (_c = attributes.primaryCategory) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : '';
68
+ this.schema.categories[0] = attributes.primaryCategory?.id ?? '';
72
69
  }
73
70
  if (attributes.secondaryCategory && attributes.secondarySubcategoryOne) {
74
71
  this.schema.categories[1] = [
75
72
  attributes.secondaryCategory.id,
76
- (_e = attributes.secondarySubcategoryOne) === null || _e === void 0 ? void 0 : _e.id,
77
- (_f = attributes.secondarySubcategoryTwo) === null || _f === void 0 ? void 0 : _f.id,
73
+ attributes.secondarySubcategoryOne?.id,
74
+ attributes.secondarySubcategoryTwo?.id,
78
75
  ].filter(Boolean);
79
76
  }
80
77
  else if (attributes.secondaryCategory) {
@@ -106,9 +103,8 @@ class AppleConfigWriter {
106
103
  }
107
104
  }
108
105
  setVersionReleasePhased(attributes) {
109
- var _a;
110
106
  if (!attributes) {
111
- (_a = this.schema.release) === null || _a === void 0 ? true : delete _a.phasedRelease;
107
+ delete this.schema.release?.phasedRelease;
112
108
  }
113
109
  else {
114
110
  this.schema.release = {
@@ -118,13 +114,14 @@ class AppleConfigWriter {
118
114
  }
119
115
  }
120
116
  setVersionLocale(attributes) {
121
- var _a, _b, _c;
122
- this.schema.info = (_a = this.schema.info) !== null && _a !== void 0 ? _a : {};
123
- const existing = (_b = this.schema.info[attributes.locale]) !== null && _b !== void 0 ? _b : {};
117
+ this.schema.info = this.schema.info ?? {};
118
+ const existing = this.schema.info[attributes.locale] ?? {};
124
119
  this.schema.info[attributes.locale] = {
125
120
  ...existing,
126
121
  description: optional(attributes.description),
127
- keywords: (_c = optional(attributes.keywords)) === null || _c === void 0 ? void 0 : _c.split(',').map(keyword => keyword.trim()),
122
+ keywords: optional(attributes.keywords)
123
+ ?.split(',')
124
+ .map(keyword => keyword.trim()),
128
125
  releaseNotes: optional(attributes.whatsNew),
129
126
  marketingUrl: optional(attributes.marketingUrl),
130
127
  promoText: optional(attributes.promotionalText),
@@ -132,12 +129,11 @@ class AppleConfigWriter {
132
129
  };
133
130
  }
134
131
  setReviewDetails(attributes) {
135
- var _a, _b, _c, _d;
136
132
  this.schema.review = {
137
- firstName: (_a = attributes.contactFirstName) !== null && _a !== void 0 ? _a : '',
138
- lastName: (_b = attributes.contactLastName) !== null && _b !== void 0 ? _b : '',
139
- email: (_c = attributes.contactEmail) !== null && _c !== void 0 ? _c : '',
140
- phone: (_d = attributes.contactPhone) !== null && _d !== void 0 ? _d : '',
133
+ firstName: attributes.contactFirstName ?? '',
134
+ lastName: attributes.contactLastName ?? '',
135
+ email: attributes.contactEmail ?? '',
136
+ phone: attributes.contactPhone ?? '',
141
137
  demoUsername: optional(attributes.demoAccountName),
142
138
  demoPassword: optional(attributes.demoAccountPassword),
143
139
  demoRequired: optional(attributes.demoAccountRequired),
@@ -149,5 +145,5 @@ class AppleConfigWriter {
149
145
  exports.AppleConfigWriter = AppleConfigWriter;
150
146
  /** Helper function to convert `T | null` to `T | undefined`, required for the entity properties */
151
147
  function optional(value) {
152
- return value !== null && value !== void 0 ? value : undefined;
148
+ return value ?? undefined;
153
149
  }
@@ -11,14 +11,12 @@ exports.infoKeywordLength = {
11
11
  id: 'apple.info.keyword.length',
12
12
  severity: 2,
13
13
  validate(config) {
14
- var _a;
15
- if (!((_a = config.apple) === null || _a === void 0 ? void 0 : _a.info) || Object.keys(config.apple.info).length === 0) {
14
+ if (!config.apple?.info || Object.keys(config.apple.info).length === 0) {
16
15
  return null;
17
16
  }
18
17
  return Object.keys(config.apple.info)
19
18
  .map(locale => {
20
- var _a, _b, _c;
21
- const keywords = (_c = (_b = (_a = config.apple) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b[locale].keywords) !== null && _c !== void 0 ? _c : [];
19
+ const keywords = config.apple?.info?.[locale].keywords ?? [];
22
20
  const length = keywords.join(',').length;
23
21
  if (length > KEYWORD_CHARACTER_LIMIT) {
24
22
  return {
@@ -14,14 +14,12 @@ exports.infoRestrictedWords = {
14
14
  id: 'apple.info.restrictedWords',
15
15
  severity: 1,
16
16
  validate(config) {
17
- var _a;
18
- if (!((_a = config.apple) === null || _a === void 0 ? void 0 : _a.info) || Object.keys(config.apple.info).length === 0) {
17
+ if (!config.apple?.info || Object.keys(config.apple.info).length === 0) {
19
18
  return null;
20
19
  }
21
20
  return Object.keys(config.apple.info)
22
21
  .map(locale => RESTRICTED_PROPERTIES.map(property => {
23
- var _a, _b;
24
- const value = getStringValue((_b = (_a = config.apple) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b[locale][property]);
22
+ const value = getStringValue(config.apple?.info?.[locale][property]);
25
23
  const issueDescription = getDescriptionForFirstMatch(value);
26
24
  if (issueDescription) {
27
25
  return {
@@ -14,9 +14,8 @@ class AppReviewDetailTask extends task_1.AppleTask {
14
14
  this.name = () => 'app review detail';
15
15
  }
16
16
  async prepareAsync({ context }) {
17
- var _a;
18
17
  (0, assert_1.default)(context.version, `App version not initialized, can't download store review details`);
19
- context.reviewDetail = (_a = (await context.version.getAppStoreReviewDetailAsync())) !== null && _a !== void 0 ? _a : undefined;
18
+ context.reviewDetail = (await context.version.getAppStoreReviewDetailAsync()) ?? undefined;
20
19
  }
21
20
  async downloadAsync({ config, context }) {
22
21
  if (context.reviewDetail) {
@@ -11,13 +11,12 @@ const retry_1 = require("../../utils/retry");
11
11
  const task_1 = require("../task");
12
12
  class AppVersionTask extends task_1.AppleTask {
13
13
  constructor(options = {}) {
14
- var _a, _b, _c;
15
14
  super();
16
15
  this.name = () => (this.options.editLive ? 'live app version' : 'editable app version');
17
16
  this.options = {
18
- platform: (_a = options.platform) !== null && _a !== void 0 ? _a : apple_utils_1.Platform.IOS,
19
- editLive: (_b = options.editLive) !== null && _b !== void 0 ? _b : false,
20
- version: (_c = options.version) !== null && _c !== void 0 ? _c : null,
17
+ platform: options.platform ?? apple_utils_1.Platform.IOS,
18
+ editLive: options.editLive ?? false,
19
+ version: options.version ?? null,
21
20
  };
22
21
  }
23
22
  async prepareAsync({ context }) {
@@ -30,18 +29,17 @@ class AppVersionTask extends task_1.AppleTask {
30
29
  context.versionPhasedRelease = await version.getPhasedReleaseAsync();
31
30
  }
32
31
  async downloadAsync({ config, context }) {
33
- var _a;
34
32
  (0, assert_1.default)(context.version, `App version not initialized, can't download version`);
35
33
  config.setVersion(context.version.attributes);
36
34
  config.setVersionReleaseType(context.version.attributes);
37
- config.setVersionReleasePhased((_a = context.versionPhasedRelease) === null || _a === void 0 ? void 0 : _a.attributes);
35
+ config.setVersionReleasePhased(context.versionPhasedRelease?.attributes);
38
36
  for (const locale of context.versionLocales) {
39
37
  config.setVersionLocale(locale.attributes);
40
38
  }
41
39
  }
42
40
  async uploadAsync({ config, context }) {
43
41
  const version = config.getVersion();
44
- if (!context.version && (version === null || version === void 0 ? void 0 : version.versionString)) {
42
+ if (!context.version && version?.versionString) {
45
43
  context.version = await (0, log_2.logAsync)(() => {
46
44
  return context.app.createVersionAsync({
47
45
  versionString: version.versionString,
@@ -128,7 +126,7 @@ async function resolveVersionAsync(app, { editLive, platform, version: versionSt
128
126
  version: versionString,
129
127
  });
130
128
  }
131
- versionIsLive = (version === null || version === void 0 ? void 0 : version.attributes.appStoreState) === apple_utils_1.AppStoreState.READY_FOR_SALE;
129
+ versionIsLive = version?.attributes.appStoreState === apple_utils_1.AppStoreState.READY_FOR_SALE;
132
130
  }
133
131
  if (!version && editLive) {
134
132
  version = await app.getLiveAppStoreVersionAsync({ platform });
@@ -11,9 +11,8 @@ const bundleIdentifier_1 = require("../project/ios/bundleIdentifier");
11
11
  * This bundle identifier is used as target for the metadata submission.
12
12
  */
13
13
  async function resolveAppStoreBundleIdentifierAsync(projectDir, profile, exp, vcsClient) {
14
- var _a;
15
14
  if ('bundleIdentifier' in profile) {
16
- return (_a = profile.bundleIdentifier) !== null && _a !== void 0 ? _a : (await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, vcsClient));
15
+ return profile.bundleIdentifier ?? (await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, vcsClient));
17
16
  }
18
17
  return await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, vcsClient);
19
18
  }
@@ -14,7 +14,7 @@ const errors_1 = require("../errors");
14
14
  * It supports methods, async methods, or objects (json).
15
15
  */
16
16
  async function resolveDynamicConfigAsync(configFile) {
17
- const userConfigOrFunction = await Promise.resolve(`${configFile}`).then(s => tslib_1.__importStar(require(s))).then(file => { var _a; return (_a = file.default) !== null && _a !== void 0 ? _a : file; });
17
+ const userConfigOrFunction = await Promise.resolve(`${configFile}`).then(s => tslib_1.__importStar(require(s))).then(file => file.default ?? file);
18
18
  return typeof userConfigOrFunction === 'function'
19
19
  ? await userConfigOrFunction()
20
20
  : userConfigOrFunction;
@@ -24,9 +24,8 @@ async function resolveDynamicConfigAsync(configFile) {
24
24
  * This is relative to the project directory, and uses `store.config.json` by default.
25
25
  */
26
26
  function resolveConfigFilePath(profile) {
27
- var _a;
28
27
  if ('metadataPath' in profile) {
29
- return (_a = profile.metadataPath) !== null && _a !== void 0 ? _a : 'store.config.json';
28
+ return profile.metadataPath ?? 'store.config.json';
30
29
  }
31
30
  return 'store.config.json';
32
31
  }
@@ -7,13 +7,11 @@ const ajv_1 = require("../utils/ajv");
7
7
  const metadataSchema = require('../../../schema/metadata-0.json');
8
8
  /** Validate the user-provided validation for issues */
9
9
  function validateConfig(config) {
10
- var _a;
11
10
  const validator = (0, ajv_1.createValidator)().compile(metadataSchema);
12
11
  validator(config);
13
- const issues = (0, ajv_1.getReadableErrors)((_a = validator.errors) !== null && _a !== void 0 ? _a : []).map(error => {
14
- var _a, _b;
12
+ const issues = (0, ajv_1.getReadableErrors)(validator.errors ?? []).map(error => {
15
13
  const path = error.path === '$' ? [] : error.path.substring(2).split('.');
16
- const id = (_b = (_a = error.original) === null || _a === void 0 ? void 0 : _a.keyword) !== null && _b !== void 0 ? _b : 'unknown';
14
+ const id = error.original?.keyword ?? 'unknown';
17
15
  return {
18
16
  id: `json-schema.${id}`,
19
17
  path,