eas-cli 2.3.0 → 2.4.1
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.
- package/README.md +47 -47
- package/build/ApiV2Error.d.ts +15 -0
- package/build/ApiV2Error.js +14 -0
- package/build/api.d.ts +10 -16
- package/build/api.js +52 -59
- package/build/branch/queries.d.ts +3 -2
- package/build/branch/queries.js +7 -7
- package/build/build/android/build.js +3 -3
- package/build/build/android/syncProjectConfiguration.d.ts +2 -1
- package/build/build/android/syncProjectConfiguration.js +2 -2
- package/build/build/android/version.d.ts +2 -1
- package/build/build/android/version.js +4 -4
- package/build/build/build.d.ts +2 -1
- package/build/build/build.js +5 -5
- package/build/build/context.d.ts +2 -0
- package/build/build/createContext.d.ts +3 -1
- package/build/build/createContext.js +4 -2
- package/build/build/ios/build.js +3 -3
- package/build/build/ios/syncProjectConfiguration.d.ts +2 -1
- package/build/build/ios/syncProjectConfiguration.js +2 -2
- package/build/build/ios/version.d.ts +2 -1
- package/build/build/ios/version.js +4 -4
- package/build/build/local.js +1 -1
- package/build/build/queries.d.ts +2 -1
- package/build/build/queries.js +3 -3
- package/build/build/runBuildAndSubmit.d.ts +2 -1
- package/build/build/runBuildAndSubmit.js +9 -6
- package/build/channel/queries.d.ts +4 -3
- package/build/channel/queries.js +13 -13
- package/build/commandUtils/EasCommand.d.ts +24 -3
- package/build/commandUtils/EasCommand.js +36 -6
- package/build/commandUtils/context/ContextField.d.ts +2 -0
- package/build/commandUtils/context/DynamicProjectConfigContextField.d.ts +1 -1
- package/build/commandUtils/context/DynamicProjectConfigContextField.js +2 -2
- package/build/commandUtils/context/LoggedInContextField.d.ts +12 -0
- package/build/commandUtils/context/LoggedInContextField.js +15 -0
- package/build/commandUtils/context/MaybeLoggedInContextField.d.ts +12 -0
- package/build/commandUtils/context/MaybeLoggedInContextField.js +17 -0
- package/build/commandUtils/context/OptionalProjectConfigContextField.d.ts +1 -1
- package/build/commandUtils/context/OptionalProjectConfigContextField.js +2 -2
- package/build/commandUtils/context/ProjectConfigContextField.d.ts +1 -1
- package/build/commandUtils/context/ProjectConfigContextField.js +2 -2
- package/build/commandUtils/context/SessionManagementContextField.d.ts +5 -0
- package/build/commandUtils/context/SessionManagementContextField.js +10 -0
- package/build/commandUtils/context/contextUtils/createGraphqlClient.d.ts +11 -0
- package/build/commandUtils/context/contextUtils/createGraphqlClient.js +43 -0
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.d.ts +2 -1
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +11 -7
- package/build/commands/account/login.d.ts +3 -0
- package/build/commands/account/login.js +7 -2
- package/build/commands/account/logout.d.ts +3 -0
- package/build/commands/account/logout.js +7 -2
- package/build/commands/account/view.d.ts +3 -0
- package/build/commands/account/view.js +8 -3
- package/build/commands/branch/create.d.ts +3 -1
- package/build/commands/branch/create.js +6 -5
- package/build/commands/branch/delete.d.ts +1 -0
- package/build/commands/branch/delete.js +10 -9
- package/build/commands/branch/list.d.ts +1 -0
- package/build/commands/branch/list.js +3 -2
- package/build/commands/branch/rename.d.ts +1 -0
- package/build/commands/branch/rename.js +6 -5
- package/build/commands/branch/view.d.ts +1 -0
- package/build/commands/branch/view.js +4 -3
- package/build/commands/build/cancel.d.ts +3 -1
- package/build/commands/build/cancel.js +14 -13
- package/build/commands/build/configure.d.ts +1 -0
- package/build/commands/build/configure.js +4 -3
- package/build/commands/build/index.d.ts +1 -1
- package/build/commands/build/index.js +3 -3
- package/build/commands/build/inspect.d.ts +1 -1
- package/build/commands/build/inspect.js +2 -2
- package/build/commands/build/list.d.ts +1 -0
- package/build/commands/build/list.js +4 -3
- package/build/commands/build/version/set.d.ts +1 -1
- package/build/commands/build/version/set.js +4 -4
- package/build/commands/build/version/sync.d.ts +1 -1
- package/build/commands/build/version/sync.js +2 -2
- package/build/commands/build/view.d.ts +1 -0
- package/build/commands/build/view.js +5 -4
- package/build/commands/channel/create.d.ts +3 -1
- package/build/commands/channel/create.js +8 -7
- package/build/commands/channel/delete.d.ts +1 -0
- package/build/commands/channel/delete.js +7 -6
- package/build/commands/channel/edit.d.ts +3 -1
- package/build/commands/channel/edit.js +12 -8
- package/build/commands/channel/list.d.ts +1 -0
- package/build/commands/channel/list.js +3 -2
- package/build/commands/channel/rollout.d.ts +1 -0
- package/build/commands/channel/rollout.js +15 -14
- package/build/commands/channel/view.d.ts +1 -0
- package/build/commands/channel/view.js +4 -3
- package/build/commands/credentials.d.ts +1 -1
- package/build/commands/credentials.js +2 -2
- package/build/commands/device/create.d.ts +1 -1
- package/build/commands/device/create.js +2 -1
- package/build/commands/device/delete.d.ts +3 -1
- package/build/commands/device/delete.js +9 -8
- package/build/commands/device/list.d.ts +1 -0
- package/build/commands/device/list.js +5 -4
- package/build/commands/device/view.d.ts +1 -0
- package/build/commands/device/view.js +4 -3
- package/build/commands/metadata/pull.d.ts +1 -1
- package/build/commands/metadata/pull.js +2 -1
- package/build/commands/metadata/push.d.ts +1 -1
- package/build/commands/metadata/push.js +2 -1
- package/build/commands/open.d.ts +1 -0
- package/build/commands/open.js +3 -2
- package/build/commands/project/info.d.ts +1 -0
- package/build/commands/project/info.js +5 -4
- package/build/commands/project/init.d.ts +1 -1
- package/build/commands/project/init.js +5 -5
- package/build/commands/secret/create.d.ts +1 -0
- package/build/commands/secret/create.js +10 -9
- package/build/commands/secret/delete.d.ts +1 -0
- package/build/commands/secret/delete.js +4 -3
- package/build/commands/secret/list.d.ts +1 -0
- package/build/commands/secret/list.js +3 -2
- package/build/commands/submit.d.ts +1 -1
- package/build/commands/submit.js +4 -3
- package/build/commands/update/configure.d.ts +1 -0
- package/build/commands/update/configure.js +4 -3
- package/build/commands/update/delete.d.ts +3 -0
- package/build/commands/update/delete.js +9 -3
- package/build/commands/update/index.d.ts +3 -1
- package/build/commands/update/index.js +23 -17
- package/build/commands/update/list.d.ts +1 -0
- package/build/commands/update/list.js +6 -5
- package/build/commands/update/view.d.ts +3 -0
- package/build/commands/update/view.js +7 -1
- package/build/commands/webhook/create.d.ts +1 -0
- package/build/commands/webhook/create.js +3 -2
- package/build/commands/webhook/delete.d.ts +1 -0
- package/build/commands/webhook/delete.js +7 -6
- package/build/commands/webhook/list.d.ts +1 -0
- package/build/commands/webhook/list.js +4 -3
- package/build/commands/webhook/update.d.ts +3 -0
- package/build/commands/webhook/update.js +8 -2
- package/build/commands/webhook/view.d.ts +3 -0
- package/build/commands/webhook/view.js +7 -1
- package/build/credentials/android/actions/AssignFcm.js +2 -2
- package/build/credentials/android/actions/AssignGoogleServiceAccountKey.js +2 -2
- package/build/credentials/android/actions/BuildCredentialsUtils.js +12 -12
- package/build/credentials/android/actions/CreateFcm.js +1 -1
- package/build/credentials/android/actions/CreateGoogleServiceAccountKey.js +1 -1
- package/build/credentials/android/actions/CreateKeystore.js +4 -4
- package/build/credentials/android/actions/RemoveFcm.js +2 -2
- package/build/credentials/android/actions/RemoveGoogleServiceAccountKey.js +2 -2
- package/build/credentials/android/actions/RemoveKeystore.js +1 -1
- package/build/credentials/android/actions/SetUpBuildCredentials.js +3 -3
- package/build/credentials/android/actions/SetUpBuildCredentialsFromCredentialsJson.js +3 -3
- package/build/credentials/android/actions/SetUpGoogleServiceAccountKey.js +3 -3
- package/build/credentials/android/actions/UseExistingGoogleServiceAccountKey.js +1 -1
- package/build/credentials/android/api/GraphqlClient.d.ts +19 -18
- package/build/credentials/android/api/GraphqlClient.js +45 -45
- package/build/credentials/android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.d.ts +3 -2
- package/build/credentials/android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.js +4 -4
- package/build/credentials/android/api/graphql/mutations/AndroidAppCredentialsMutation.d.ts +4 -3
- package/build/credentials/android/api/graphql/mutations/AndroidAppCredentialsMutation.js +6 -6
- package/build/credentials/android/api/graphql/mutations/AndroidFcmMutation.d.ts +3 -2
- package/build/credentials/android/api/graphql/mutations/AndroidFcmMutation.js +4 -4
- package/build/credentials/android/api/graphql/mutations/AndroidKeystoreMutation.d.ts +3 -2
- package/build/credentials/android/api/graphql/mutations/AndroidKeystoreMutation.js +4 -4
- package/build/credentials/android/api/graphql/mutations/GoogleServiceAccountKeyMutation.d.ts +3 -2
- package/build/credentials/android/api/graphql/mutations/GoogleServiceAccountKeyMutation.js +4 -4
- package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.d.ts +2 -1
- package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.js +2 -2
- package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.d.ts +2 -1
- package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.js +2 -2
- package/build/credentials/android/utils/keystore.d.ts +2 -1
- package/build/credentials/android/utils/keystore.js +6 -6
- package/build/credentials/context.d.ts +3 -0
- package/build/credentials/context.js +1 -0
- package/build/credentials/credentialsJson/update.js +1 -1
- package/build/credentials/ios/actions/AppleTeamUtils.js +1 -1
- package/build/credentials/ios/actions/AscApiKeyUtils.js +1 -1
- package/build/credentials/ios/actions/AssignAscApiKey.js +2 -2
- package/build/credentials/ios/actions/AssignPushKey.js +2 -2
- package/build/credentials/ios/actions/BuildCredentialsUtils.js +5 -5
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +1 -1
- package/build/credentials/ios/actions/CreateAscApiKey.js +1 -1
- package/build/credentials/ios/actions/CreateDistributionCertificate.js +1 -1
- package/build/credentials/ios/actions/CreateProvisioningProfile.js +2 -2
- package/build/credentials/ios/actions/CreatePushKey.js +1 -1
- package/build/credentials/ios/actions/DistributionCertificateUtils.js +2 -2
- package/build/credentials/ios/actions/PushKeyUtils.js +1 -1
- package/build/credentials/ios/actions/RemoveAscApiKey.js +1 -1
- package/build/credentials/ios/actions/RemoveDistributionCertificate.js +1 -1
- package/build/credentials/ios/actions/RemoveProvisioningProfile.js +1 -1
- package/build/credentials/ios/actions/RemovePushKey.js +1 -1
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +8 -8
- package/build/credentials/ios/actions/SetUpAscApiKey.js +2 -2
- package/build/credentials/ios/actions/SetUpDistributionCertificate.js +2 -2
- package/build/credentials/ios/actions/SetUpProvisioningProfile.js +1 -1
- package/build/credentials/ios/actions/SetUpPushKey.js +4 -4
- package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.js +5 -5
- package/build/credentials/ios/api/GraphqlClient.d.ts +25 -24
- package/build/credentials/ios/api/GraphqlClient.js +73 -73
- package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.d.ts +3 -2
- package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.js +4 -4
- package/build/credentials/ios/api/graphql/mutations/AppleAppIdentifierMutation.d.ts +2 -1
- package/build/credentials/ios/api/graphql/mutations/AppleAppIdentifierMutation.js +2 -2
- package/build/credentials/ios/api/graphql/mutations/AppleDeviceMutation.d.ts +3 -2
- package/build/credentials/ios/api/graphql/mutations/AppleDeviceMutation.js +4 -4
- package/build/credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation.d.ts +2 -1
- package/build/credentials/ios/api/graphql/mutations/AppleDeviceRegistrationRequestMutation.js +2 -2
- package/build/credentials/ios/api/graphql/mutations/AppleDistributionCertificateMutation.d.ts +3 -2
- package/build/credentials/ios/api/graphql/mutations/AppleDistributionCertificateMutation.js +4 -4
- package/build/credentials/ios/api/graphql/mutations/AppleProvisioningProfileMutation.d.ts +4 -3
- package/build/credentials/ios/api/graphql/mutations/AppleProvisioningProfileMutation.js +6 -6
- package/build/credentials/ios/api/graphql/mutations/ApplePushKeyMutation.d.ts +3 -2
- package/build/credentials/ios/api/graphql/mutations/ApplePushKeyMutation.js +4 -4
- package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.d.ts +2 -1
- package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.js +2 -2
- package/build/credentials/ios/api/graphql/mutations/IosAppBuildCredentialsMutation.d.ts +4 -3
- package/build/credentials/ios/api/graphql/mutations/IosAppBuildCredentialsMutation.js +6 -6
- package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.d.ts +4 -3
- package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.js +6 -6
- package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.d.ts +2 -1
- package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleAppIdentifierQuery.d.ts +2 -1
- package/build/credentials/ios/api/graphql/queries/AppleAppIdentifierQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.d.ts +4 -3
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +6 -6
- package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.d.ts +3 -2
- package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +4 -4
- package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.d.ts +2 -1
- package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.d.ts +2 -1
- package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.d.ts +3 -2
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +4 -4
- package/build/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.d.ts +2 -1
- package/build/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.d.ts +3 -2
- package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.js +4 -4
- package/build/credentials/manager/HelperActions.d.ts +2 -0
- package/build/credentials/manager/ManageAndroid.js +4 -3
- package/build/credentials/manager/ManageIos.js +4 -3
- package/build/credentials/manager/SelectAndroidBuildCredentials.js +2 -2
- package/build/credentials/manager/SelectPlatform.d.ts +3 -1
- package/build/credentials/manager/SelectPlatform.js +2 -1
- package/build/devices/actions/create/action.d.ts +3 -1
- package/build/devices/actions/create/action.js +5 -4
- package/build/devices/actions/create/developerPortalMethod.d.ts +2 -1
- package/build/devices/actions/create/developerPortalMethod.js +9 -9
- package/build/devices/actions/create/inputMethod.d.ts +2 -1
- package/build/devices/actions/create/inputMethod.js +4 -4
- package/build/devices/actions/create/registrationUrlMethod.d.ts +2 -1
- package/build/devices/actions/create/registrationUrlMethod.js +4 -4
- package/build/devices/context.d.ts +4 -1
- package/build/devices/context.js +2 -1
- package/build/devices/manager.d.ts +3 -1
- package/build/devices/manager.js +9 -8
- package/build/devices/queries.d.ts +4 -3
- package/build/devices/queries.js +7 -7
- package/build/graphql/client.d.ts +1 -8
- package/build/graphql/client.js +1 -39
- package/build/graphql/mutations/AppMutation.d.ts +2 -1
- package/build/graphql/mutations/AppMutation.js +2 -2
- package/build/graphql/mutations/AppVersionMutation.d.ts +2 -1
- package/build/graphql/mutations/AppVersionMutation.js +2 -2
- package/build/graphql/mutations/BuildMutation.d.ts +3 -2
- package/build/graphql/mutations/BuildMutation.js +4 -4
- package/build/graphql/mutations/EnvironmentSecretMutation.d.ts +4 -3
- package/build/graphql/mutations/EnvironmentSecretMutation.js +6 -6
- package/build/graphql/mutations/KeystoreGenerationUrlMutation.d.ts +2 -1
- package/build/graphql/mutations/KeystoreGenerationUrlMutation.js +2 -2
- package/build/graphql/mutations/PublishMutation.d.ts +4 -3
- package/build/graphql/mutations/PublishMutation.js +6 -6
- package/build/graphql/mutations/SubmissionMutation.d.ts +3 -2
- package/build/graphql/mutations/SubmissionMutation.js +4 -4
- package/build/graphql/mutations/UploadSessionMutation.d.ts +2 -1
- package/build/graphql/mutations/UploadSessionMutation.js +2 -2
- package/build/graphql/mutations/WebhookMutation.d.ts +4 -3
- package/build/graphql/mutations/WebhookMutation.js +6 -6
- package/build/graphql/queries/AppQuery.d.ts +3 -2
- package/build/graphql/queries/AppQuery.js +4 -4
- package/build/graphql/queries/AppVersionQuery.d.ts +2 -1
- package/build/graphql/queries/AppVersionQuery.js +2 -2
- package/build/graphql/queries/BranchQuery.d.ts +4 -3
- package/build/graphql/queries/BranchQuery.js +6 -6
- package/build/graphql/queries/BuildQuery.d.ts +4 -3
- package/build/graphql/queries/BuildQuery.js +6 -6
- package/build/graphql/queries/ChannelQuery.d.ts +3 -2
- package/build/graphql/queries/ChannelQuery.js +4 -4
- package/build/graphql/queries/EnvironmentSecretsQuery.d.ts +3 -2
- package/build/graphql/queries/EnvironmentSecretsQuery.js +4 -4
- package/build/graphql/queries/PublishQuery.d.ts +3 -2
- package/build/graphql/queries/PublishQuery.js +4 -4
- package/build/graphql/queries/StatuspageServiceQuery.d.ts +2 -1
- package/build/graphql/queries/StatuspageServiceQuery.js +2 -2
- package/build/graphql/queries/SubmissionQuery.d.ts +3 -2
- package/build/graphql/queries/SubmissionQuery.js +4 -4
- package/build/graphql/queries/UpdateQuery.d.ts +4 -3
- package/build/graphql/queries/UpdateQuery.js +6 -6
- package/build/graphql/queries/UserQuery.d.ts +2 -1
- package/build/graphql/queries/UserQuery.js +2 -2
- package/build/graphql/queries/WebhookQuery.d.ts +3 -2
- package/build/graphql/queries/WebhookQuery.js +4 -4
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.d.ts +3 -2
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +5 -5
- package/build/project/projectUtils.d.ts +3 -2
- package/build/project/projectUtils.js +4 -4
- package/build/project/publish.d.ts +3 -2
- package/build/project/publish.js +7 -7
- package/build/submit/ArchiveSource.d.ts +2 -1
- package/build/submit/ArchiveSource.js +30 -30
- package/build/submit/android/AndroidSubmitter.js +2 -2
- package/build/submit/context.d.ts +3 -0
- package/build/submit/context.js +3 -2
- package/build/submit/ios/IosSubmitter.js +2 -2
- package/build/submit/submit.d.ts +2 -1
- package/build/submit/submit.js +2 -2
- package/build/submit/utils/builds.d.ts +2 -1
- package/build/submit/utils/builds.js +2 -2
- package/build/submit/utils/errors.d.ts +3 -0
- package/build/submit/utils/errors.js +15 -67
- package/build/submit/utils/files.d.ts +2 -1
- package/build/submit/utils/files.js +2 -2
- package/build/submit/utils/wait.d.ts +2 -1
- package/build/submit/utils/wait.js +2 -2
- package/build/update/android/UpdatesModule.d.ts +2 -1
- package/build/update/android/UpdatesModule.js +2 -2
- package/build/update/ios/UpdatesModule.d.ts +2 -1
- package/build/update/ios/UpdatesModule.js +2 -2
- package/build/update/queries.d.ts +4 -3
- package/build/update/queries.js +22 -12
- package/build/uploads.d.ts +2 -1
- package/build/uploads.js +2 -2
- package/build/user/SessionManager.d.ts +70 -0
- package/build/user/SessionManager.js +258 -0
- package/build/user/User.d.ts +0 -9
- package/build/user/User.js +1 -60
- package/build/user/fetchSessionSecretAndUser.d.ts +9 -0
- package/build/user/fetchSessionSecretAndUser.js +43 -0
- package/build/utils/statuspageService.d.ts +2 -1
- package/build/utils/statuspageService.js +4 -4
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
- package/build/commandUtils/context/ActorContextField.d.ts +0 -5
- package/build/commandUtils/context/ActorContextField.js +0 -11
- package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.d.ts +0 -21
- package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.js +0 -75
- package/build/user/otp.d.ts +0 -29
- package/build/user/otp.js +0 -119
- package/build/user/sessionStorage.d.ts +0 -11
- package/build/user/sessionStorage.js +0 -36
package/build/branch/queries.js
CHANGED
|
@@ -10,7 +10,7 @@ const utils_1 = require("../update/utils");
|
|
|
10
10
|
const json_1 = require("../utils/json");
|
|
11
11
|
const queries_1 = require("../utils/queries");
|
|
12
12
|
exports.BRANCHES_LIMIT = 50;
|
|
13
|
-
async function selectBranchOnAppAsync({ projectId, promptTitle, displayTextForListItem, paginatedQueryOptions, }) {
|
|
13
|
+
async function selectBranchOnAppAsync(graphqlClient, { projectId, promptTitle, displayTextForListItem, paginatedQueryOptions, }) {
|
|
14
14
|
var _a;
|
|
15
15
|
if (paginatedQueryOptions.nonInteractive) {
|
|
16
16
|
throw new Error('Unable to select a branch in non-interactive mode.');
|
|
@@ -18,7 +18,7 @@ async function selectBranchOnAppAsync({ projectId, promptTitle, displayTextForLi
|
|
|
18
18
|
const selectedBranch = await (0, queries_1.paginatedQueryWithSelectPromptAsync)({
|
|
19
19
|
limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.BRANCHES_LIMIT,
|
|
20
20
|
offset: paginatedQueryOptions.offset,
|
|
21
|
-
queryToPerform: (limit, offset) => queryBranchesOnProjectAsync(limit, offset, projectId),
|
|
21
|
+
queryToPerform: (limit, offset) => queryBranchesOnProjectAsync(graphqlClient, limit, offset, projectId),
|
|
22
22
|
promptOptions: {
|
|
23
23
|
title: promptTitle,
|
|
24
24
|
getIdentifierForQueryItem: updateBranchFragment => updateBranchFragment.id,
|
|
@@ -31,17 +31,17 @@ async function selectBranchOnAppAsync({ projectId, promptTitle, displayTextForLi
|
|
|
31
31
|
return selectedBranch;
|
|
32
32
|
}
|
|
33
33
|
exports.selectBranchOnAppAsync = selectBranchOnAppAsync;
|
|
34
|
-
async function listAndRenderBranchesOnAppAsync({ projectId, paginatedQueryOptions, }) {
|
|
34
|
+
async function listAndRenderBranchesOnAppAsync(graphqlClient, { projectId, paginatedQueryOptions, }) {
|
|
35
35
|
var _a, _b;
|
|
36
36
|
if (paginatedQueryOptions.nonInteractive) {
|
|
37
|
-
const branches = await queryBranchesOnProjectAsync((_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.BRANCHES_LIMIT, paginatedQueryOptions.offset, projectId);
|
|
37
|
+
const branches = await queryBranchesOnProjectAsync(graphqlClient, (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.BRANCHES_LIMIT, paginatedQueryOptions.offset, projectId);
|
|
38
38
|
renderPageOfBranches(branches, paginatedQueryOptions);
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
41
|
await (0, queries_1.paginatedQueryWithConfirmPromptAsync)({
|
|
42
42
|
limit: (_b = paginatedQueryOptions.limit) !== null && _b !== void 0 ? _b : exports.BRANCHES_LIMIT,
|
|
43
43
|
offset: paginatedQueryOptions.offset,
|
|
44
|
-
queryToPerform: (limit, offset) => queryBranchesOnProjectAsync(limit, offset, projectId),
|
|
44
|
+
queryToPerform: (limit, offset) => queryBranchesOnProjectAsync(graphqlClient, limit, offset, projectId),
|
|
45
45
|
promptOptions: {
|
|
46
46
|
title: 'Load more branches?',
|
|
47
47
|
renderListItems: branches => renderPageOfBranches(branches, paginatedQueryOptions),
|
|
@@ -50,8 +50,8 @@ async function listAndRenderBranchesOnAppAsync({ projectId, paginatedQueryOption
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
exports.listAndRenderBranchesOnAppAsync = listAndRenderBranchesOnAppAsync;
|
|
53
|
-
async function queryBranchesOnProjectAsync(limit, offset, projectId) {
|
|
54
|
-
return await BranchQuery_1.BranchQuery.listBranchesOnAppAsync({
|
|
53
|
+
async function queryBranchesOnProjectAsync(graphqlClient, limit, offset, projectId) {
|
|
54
|
+
return await BranchQuery_1.BranchQuery.listBranchesOnAppAsync(graphqlClient, {
|
|
55
55
|
appId: projectId,
|
|
56
56
|
limit,
|
|
57
57
|
offset,
|
|
@@ -42,7 +42,7 @@ This means that it will most likely produce an AAB and you will not be able to i
|
|
|
42
42
|
}
|
|
43
43
|
const applicationId = await (0, applicationId_1.getApplicationIdAsync)(ctx.projectDir, ctx.exp, gradleContext);
|
|
44
44
|
const versionCodeOverride = ((_b = ctx.easJsonCliConfig) === null || _b === void 0 ? void 0 : _b.appVersionSource) === eas_json_1.AppVersionSource.REMOTE
|
|
45
|
-
? await (0, version_1.resolveRemoteVersionCodeAsync)({
|
|
45
|
+
? await (0, version_1.resolveRemoteVersionCodeAsync)(ctx.graphqlClient, {
|
|
46
46
|
projectDir: ctx.projectDir,
|
|
47
47
|
projectId: ctx.projectId,
|
|
48
48
|
exp: ctx.exp,
|
|
@@ -61,7 +61,7 @@ async function prepareAndroidBuildAsync(ctx) {
|
|
|
61
61
|
},
|
|
62
62
|
syncProjectConfigurationAsync: async () => {
|
|
63
63
|
var _a;
|
|
64
|
-
await (0, syncProjectConfiguration_1.syncProjectConfigurationAsync)({
|
|
64
|
+
await (0, syncProjectConfiguration_1.syncProjectConfigurationAsync)(ctx.graphqlClient, {
|
|
65
65
|
projectDir: ctx.projectDir,
|
|
66
66
|
exp: ctx.exp,
|
|
67
67
|
localAutoIncrement: ((_a = ctx.easJsonCliConfig) === null || _a === void 0 ? void 0 : _a.appVersionSource) === eas_json_1.AppVersionSource.REMOTE
|
|
@@ -76,7 +76,7 @@ async function prepareAndroidBuildAsync(ctx) {
|
|
|
76
76
|
sendBuildRequestAsync: async (appId, job, metadata, buildParams) => {
|
|
77
77
|
const graphqlMetadata = (0, graphql_1.transformMetadata)(metadata);
|
|
78
78
|
const graphqlJob = (0, graphql_2.transformJob)(job);
|
|
79
|
-
return await BuildMutation_1.BuildMutation.createAndroidBuildAsync({
|
|
79
|
+
return await BuildMutation_1.BuildMutation.createAndroidBuildAsync(ctx.graphqlClient, {
|
|
80
80
|
appId,
|
|
81
81
|
job: graphqlJob,
|
|
82
82
|
metadata: graphqlMetadata,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
2
|
import { AndroidVersionAutoIncrement } from '@expo/eas-json';
|
|
3
|
-
|
|
3
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
4
|
+
export declare function syncProjectConfigurationAsync(graphqlClient: ExpoGraphqlClient, { projectDir, exp, localAutoIncrement, projectId, }: {
|
|
4
5
|
projectDir: string;
|
|
5
6
|
exp: ExpoConfig;
|
|
6
7
|
localAutoIncrement?: AndroidVersionAutoIncrement;
|
|
@@ -12,13 +12,13 @@ const projectUtils_1 = require("../../project/projectUtils");
|
|
|
12
12
|
const workflow_1 = require("../../project/workflow");
|
|
13
13
|
const UpdatesModule_1 = require("../../update/android/UpdatesModule");
|
|
14
14
|
const version_1 = require("./version");
|
|
15
|
-
async function syncProjectConfigurationAsync({ projectDir, exp, localAutoIncrement, projectId, }) {
|
|
15
|
+
async function syncProjectConfigurationAsync(graphqlClient, { projectDir, exp, localAutoIncrement, projectId, }) {
|
|
16
16
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
17
17
|
const versionBumpStrategy = resolveVersionBumpStrategy(localAutoIncrement !== null && localAutoIncrement !== void 0 ? localAutoIncrement : false);
|
|
18
18
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
19
19
|
await cleanUpOldEasBuildGradleScriptAsync(projectDir);
|
|
20
20
|
if ((0, projectUtils_1.isExpoUpdatesInstalled)(projectDir)) {
|
|
21
|
-
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp, projectId);
|
|
21
|
+
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(graphqlClient, projectDir, exp, projectId);
|
|
22
22
|
}
|
|
23
23
|
await (0, version_1.bumpVersionAsync)({ projectDir, exp, bumpStrategy: versionBumpStrategy });
|
|
24
24
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
2
|
import { Platform } from '@expo/eas-build-job';
|
|
3
3
|
import { BuildProfile } from '@expo/eas-json';
|
|
4
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
4
5
|
export declare enum BumpStrategy {
|
|
5
6
|
APP_VERSION = 0,
|
|
6
7
|
VERSION_CODE = 1,
|
|
@@ -29,7 +30,7 @@ export declare function updateNativeVersionsAsync({ projectDir, version, version
|
|
|
29
30
|
* Returns buildNumber that will be used for the next build. If current build profile
|
|
30
31
|
* has an 'autoIncrement' option set, it increments the version on server.
|
|
31
32
|
*/
|
|
32
|
-
export declare function resolveRemoteVersionCodeAsync({ projectDir, projectId, exp, applicationId, buildProfile, }: {
|
|
33
|
+
export declare function resolveRemoteVersionCodeAsync(graphqlClient: ExpoGraphqlClient, { projectDir, projectId, exp, applicationId, buildProfile, }: {
|
|
33
34
|
projectDir: string;
|
|
34
35
|
projectId: string;
|
|
35
36
|
exp: ExpoConfig;
|
|
@@ -120,9 +120,9 @@ async function writeBuildGradleAsync({ projectDir, buildGradle, }) {
|
|
|
120
120
|
* Returns buildNumber that will be used for the next build. If current build profile
|
|
121
121
|
* has an 'autoIncrement' option set, it increments the version on server.
|
|
122
122
|
*/
|
|
123
|
-
async function resolveRemoteVersionCodeAsync({ projectDir, projectId, exp, applicationId, buildProfile, }) {
|
|
123
|
+
async function resolveRemoteVersionCodeAsync(graphqlClient, { projectDir, projectId, exp, applicationId, buildProfile, }) {
|
|
124
124
|
var _a, _b, _c, _d, _e, _f;
|
|
125
|
-
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(projectId, generated_1.AppPlatform.Android, applicationId);
|
|
125
|
+
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(graphqlClient, projectId, generated_1.AppPlatform.Android, applicationId);
|
|
126
126
|
const localVersions = await maybeResolveVersionsAsync(projectDir, exp, buildProfile);
|
|
127
127
|
let currentBuildVersion;
|
|
128
128
|
if (remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion) {
|
|
@@ -144,7 +144,7 @@ async function resolveRemoteVersionCodeAsync({ projectDir, projectId, exp, appli
|
|
|
144
144
|
else if (!buildProfile.autoIncrement && !(remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)) {
|
|
145
145
|
const spinner = (0, ora_1.ora)(`Initializing versionCode with ${chalk_1.default.bold(currentBuildVersion)}.`).start();
|
|
146
146
|
try {
|
|
147
|
-
await AppVersionMutation_1.AppVersionMutation.createAppVersionAsync({
|
|
147
|
+
await AppVersionMutation_1.AppVersionMutation.createAppVersionAsync(graphqlClient, {
|
|
148
148
|
appId: projectId,
|
|
149
149
|
platform: generated_1.AppPlatform.Android,
|
|
150
150
|
applicationIdentifier: applicationId,
|
|
@@ -164,7 +164,7 @@ async function resolveRemoteVersionCodeAsync({ projectDir, projectId, exp, appli
|
|
|
164
164
|
const nextBuildVersion = (0, versions_1.getNextVersionCode)(currentBuildVersion);
|
|
165
165
|
const spinner = (0, ora_1.ora)(`Incrementing versionCode from ${chalk_1.default.bold(currentBuildVersion)} to ${chalk_1.default.bold(nextBuildVersion)}.`).start();
|
|
166
166
|
try {
|
|
167
|
-
await AppVersionMutation_1.AppVersionMutation.createAppVersionAsync({
|
|
167
|
+
await AppVersionMutation_1.AppVersionMutation.createAppVersionAsync(graphqlClient, {
|
|
168
168
|
appId: projectId,
|
|
169
169
|
platform: generated_1.AppPlatform.Android,
|
|
170
170
|
applicationIdentifier: applicationId,
|
package/build/build/build.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ArchiveSource, Job, Metadata, Platform } from '@expo/eas-build-job';
|
|
2
2
|
import { CredentialsSource } from '@expo/eas-json';
|
|
3
|
+
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
3
4
|
import { BuildFragment, BuildParamsInput } from '../graphql/generated';
|
|
4
5
|
import { BuildResult } from '../graphql/mutations/BuildMutation';
|
|
5
6
|
import { BuildContext } from './context';
|
|
@@ -21,7 +22,7 @@ interface Builder<TPlatform extends Platform, Credentials, TJob extends Job> {
|
|
|
21
22
|
export declare type BuildRequestSender = () => Promise<BuildFragment | undefined>;
|
|
22
23
|
export declare function prepareBuildRequestForPlatformAsync<TPlatform extends Platform, Credentials, TJob extends Job>(builder: Builder<TPlatform, Credentials, TJob>): Promise<BuildRequestSender>;
|
|
23
24
|
declare type MaybeBuildFragment = BuildFragment | null;
|
|
24
|
-
export declare function waitForBuildEndAsync({ buildIds, accountName }: {
|
|
25
|
+
export declare function waitForBuildEndAsync(graphqlClient: ExpoGraphqlClient, { buildIds, accountName }: {
|
|
25
26
|
buildIds: string[];
|
|
26
27
|
accountName: string;
|
|
27
28
|
}, { intervalSec }?: {
|
package/build/build/build.js
CHANGED
|
@@ -120,7 +120,7 @@ async function uploadProjectAsync(ctx) {
|
|
|
120
120
|
log_1.default.warn(`Your project archive is ${(0, files_1.formatBytes)(projectTarball.size)}. You can reduce its size and the time it takes to upload by excluding files that are unnecessary for the build process in ${chalk_1.default.bold('.easignore')} file. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-archive')}`);
|
|
121
121
|
}
|
|
122
122
|
projectTarballPath = projectTarball.path;
|
|
123
|
-
const { bucketKey } = await (0, uploads_1.uploadFileAtPathToS3Async)(generated_1.UploadSessionType.EasBuildProjectSources, projectTarball.path, (0, progress_1.createProgressTracker)({
|
|
123
|
+
const { bucketKey } = await (0, uploads_1.uploadFileAtPathToS3Async)(ctx.graphqlClient, generated_1.UploadSessionType.EasBuildProjectSources, projectTarball.path, (0, progress_1.createProgressTracker)({
|
|
124
124
|
total: projectTarball.size,
|
|
125
125
|
message: ratio => `Uploading to EAS Build (${(0, files_1.formatBytes)(projectTarball.size * ratio)} / ${(0, files_1.formatBytes)(projectTarball.size)})`,
|
|
126
126
|
completedMessage: (duration) => `Uploaded to EAS ${chalk_1.default.dim(duration)}`,
|
|
@@ -155,7 +155,7 @@ async function sendBuildRequestAsync(builder, job, metadata, buildParams) {
|
|
|
155
155
|
trackingCtx: ctx.trackingCtx,
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
-
async function waitForBuildEndAsync({ buildIds, accountName }, { intervalSec = 10 } = {}) {
|
|
158
|
+
async function waitForBuildEndAsync(graphqlClient, { buildIds, accountName }, { intervalSec = 10 } = {}) {
|
|
159
159
|
let spinner;
|
|
160
160
|
let originalSpinnerText;
|
|
161
161
|
if (buildIds.length === 1) {
|
|
@@ -168,7 +168,7 @@ async function waitForBuildEndAsync({ buildIds, accountName }, { intervalSec = 1
|
|
|
168
168
|
spinner = (0, ora_1.ora)('Waiting for builds to complete. You can press Ctrl+C to exit.').start();
|
|
169
169
|
}
|
|
170
170
|
while (true) {
|
|
171
|
-
const builds = await getBuildsSafelyAsync(buildIds);
|
|
171
|
+
const builds = await getBuildsSafelyAsync(graphqlClient, buildIds);
|
|
172
172
|
const { refetch } = builds.length === 1
|
|
173
173
|
? await handleSingleBuildProgressAsync({ build: builds[0], accountName }, { spinner })
|
|
174
174
|
: await handleMultipleBuildsProgressAsync({ builds }, { spinner, originalSpinnerText });
|
|
@@ -179,10 +179,10 @@ async function waitForBuildEndAsync({ buildIds, accountName }, { intervalSec = 1
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
exports.waitForBuildEndAsync = waitForBuildEndAsync;
|
|
182
|
-
async function getBuildsSafelyAsync(buildIds) {
|
|
182
|
+
async function getBuildsSafelyAsync(graphqlClient, buildIds) {
|
|
183
183
|
const promises = buildIds.map(async (buildId) => {
|
|
184
184
|
try {
|
|
185
|
-
return await BuildQuery_1.BuildQuery.byIdAsync(buildId, { useCache: false });
|
|
185
|
+
return await BuildQuery_1.BuildQuery.byIdAsync(graphqlClient, buildId, { useCache: false });
|
|
186
186
|
}
|
|
187
187
|
catch (err) {
|
|
188
188
|
log_1.default.debug('Failed to fetch the build status', err);
|
package/build/build/context.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ExpoConfig } from '@expo/config';
|
|
|
2
2
|
import { Platform, Workflow } from '@expo/eas-build-job';
|
|
3
3
|
import { BuildProfile, EasJson } from '@expo/eas-json';
|
|
4
4
|
import { TrackingContext } from '../analytics/common';
|
|
5
|
+
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
5
6
|
import { CredentialsContext } from '../credentials/context';
|
|
6
7
|
import { Target } from '../credentials/ios/types';
|
|
7
8
|
import { BuildResourceClass } from '../graphql/generated';
|
|
@@ -42,6 +43,7 @@ export interface BuildContext<T extends Platform> {
|
|
|
42
43
|
message?: string;
|
|
43
44
|
trackingCtx: TrackingContext;
|
|
44
45
|
user: Actor;
|
|
46
|
+
graphqlClient: ExpoGraphqlClient;
|
|
45
47
|
workflow: Workflow;
|
|
46
48
|
android: T extends Platform.ANDROID ? AndroidBuildContext : undefined;
|
|
47
49
|
ios: T extends Platform.IOS ? IosBuildContext : undefined;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Platform } from '@expo/eas-build-job';
|
|
2
2
|
import { BuildProfile, EasJson } from '@expo/eas-json';
|
|
3
3
|
import { DynamicConfigContextFn } from '../commandUtils/context/DynamicProjectConfigContextField';
|
|
4
|
+
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
4
5
|
import { BuildResourceClass } from '../graphql/generated';
|
|
5
6
|
import { Actor } from '../user/User';
|
|
6
7
|
import { BuildContext } from './context';
|
|
7
8
|
import { LocalBuildOptions } from './local';
|
|
8
|
-
export declare function createBuildContextAsync<T extends Platform>({ buildProfileName, buildProfile, easJsonCliConfig, clearCache, localBuildOptions, nonInteractive, noWait, platform, projectDir, resourceClass, message, actor, getDynamicProjectConfigAsync, }: {
|
|
9
|
+
export declare function createBuildContextAsync<T extends Platform>({ buildProfileName, buildProfile, easJsonCliConfig, clearCache, localBuildOptions, nonInteractive, noWait, platform, projectDir, resourceClass, message, actor, graphqlClient, getDynamicProjectConfigAsync, }: {
|
|
9
10
|
buildProfileName: string;
|
|
10
11
|
buildProfile: BuildProfile<T>;
|
|
11
12
|
easJsonCliConfig: EasJson['cli'];
|
|
@@ -18,5 +19,6 @@ export declare function createBuildContextAsync<T extends Platform>({ buildProfi
|
|
|
18
19
|
resourceClass: BuildResourceClass;
|
|
19
20
|
message?: string;
|
|
20
21
|
actor: Actor;
|
|
22
|
+
graphqlClient: ExpoGraphqlClient;
|
|
21
23
|
getDynamicProjectConfigAsync: DynamicConfigContextFn;
|
|
22
24
|
}): Promise<BuildContext<T>>;
|
|
@@ -13,10 +13,10 @@ const projectUtils_1 = require("../project/projectUtils");
|
|
|
13
13
|
const workflow_1 = require("../project/workflow");
|
|
14
14
|
const build_1 = require("./android/build");
|
|
15
15
|
const build_2 = require("./ios/build");
|
|
16
|
-
async function createBuildContextAsync({ buildProfileName, buildProfile, easJsonCliConfig, clearCache = false, localBuildOptions, nonInteractive, noWait, platform, projectDir, resourceClass, message, actor, getDynamicProjectConfigAsync, }) {
|
|
16
|
+
async function createBuildContextAsync({ buildProfileName, buildProfile, easJsonCliConfig, clearCache = false, localBuildOptions, nonInteractive, noWait, platform, projectDir, resourceClass, message, actor, graphqlClient, getDynamicProjectConfigAsync, }) {
|
|
17
17
|
const { exp, projectId } = await getDynamicProjectConfigAsync({ env: buildProfile.env });
|
|
18
18
|
const projectName = exp.slug;
|
|
19
|
-
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId);
|
|
19
|
+
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
|
|
20
20
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, platform);
|
|
21
21
|
const accountId = account.id;
|
|
22
22
|
const runFromCI = getenv_1.default.boolish('CI', false);
|
|
@@ -25,6 +25,7 @@ async function createBuildContextAsync({ buildProfileName, buildProfile, easJson
|
|
|
25
25
|
nonInteractive,
|
|
26
26
|
projectDir,
|
|
27
27
|
user: actor,
|
|
28
|
+
graphqlClient,
|
|
28
29
|
env: buildProfile.env,
|
|
29
30
|
easJsonCliConfig,
|
|
30
31
|
});
|
|
@@ -62,6 +63,7 @@ async function createBuildContextAsync({ buildProfileName, buildProfile, easJson
|
|
|
62
63
|
projectName,
|
|
63
64
|
trackingCtx,
|
|
64
65
|
user: actor,
|
|
66
|
+
graphqlClient,
|
|
65
67
|
workflow,
|
|
66
68
|
message,
|
|
67
69
|
runFromCI,
|
package/build/build/ios/build.js
CHANGED
|
@@ -36,7 +36,7 @@ async function createIosContextAsync(ctx) {
|
|
|
36
36
|
});
|
|
37
37
|
const applicationTarget = (0, target_1.findApplicationTarget)(targets);
|
|
38
38
|
const buildNumberOverride = ((_a = ctx.easJsonCliConfig) === null || _a === void 0 ? void 0 : _a.appVersionSource) === eas_json_1.AppVersionSource.REMOTE
|
|
39
|
-
? await (0, version_1.resolveRemoteBuildNumberAsync)({
|
|
39
|
+
? await (0, version_1.resolveRemoteBuildNumberAsync)(ctx.graphqlClient, {
|
|
40
40
|
projectDir: ctx.projectDir,
|
|
41
41
|
projectId: ctx.projectId,
|
|
42
42
|
exp: ctx.exp,
|
|
@@ -61,7 +61,7 @@ async function prepareIosBuildAsync(ctx) {
|
|
|
61
61
|
},
|
|
62
62
|
syncProjectConfigurationAsync: async () => {
|
|
63
63
|
var _a;
|
|
64
|
-
await (0, syncProjectConfiguration_1.syncProjectConfigurationAsync)({
|
|
64
|
+
await (0, syncProjectConfiguration_1.syncProjectConfigurationAsync)(ctx.graphqlClient, {
|
|
65
65
|
projectDir: ctx.projectDir,
|
|
66
66
|
exp: ctx.exp,
|
|
67
67
|
targets: ctx.ios.targets,
|
|
@@ -80,7 +80,7 @@ async function prepareIosBuildAsync(ctx) {
|
|
|
80
80
|
sendBuildRequestAsync: async (appId, job, metadata, buildParams) => {
|
|
81
81
|
const graphqlMetadata = (0, graphql_1.transformMetadata)(metadata);
|
|
82
82
|
const graphqlJob = (0, graphql_2.transformJob)(job);
|
|
83
|
-
return await BuildMutation_1.BuildMutation.createIosBuildAsync({
|
|
83
|
+
return await BuildMutation_1.BuildMutation.createIosBuildAsync(ctx.graphqlClient, {
|
|
84
84
|
appId,
|
|
85
85
|
job: graphqlJob,
|
|
86
86
|
metadata: graphqlMetadata,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
2
|
import { IosVersionAutoIncrement } from '@expo/eas-json';
|
|
3
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
3
4
|
import { Target } from '../../credentials/ios/types';
|
|
4
|
-
export declare function syncProjectConfigurationAsync({ projectDir, exp, targets, localAutoIncrement, projectId, }: {
|
|
5
|
+
export declare function syncProjectConfigurationAsync(graphqlClient: ExpoGraphqlClient, { projectDir, exp, targets, localAutoIncrement, projectId, }: {
|
|
5
6
|
projectDir: string;
|
|
6
7
|
exp: ExpoConfig;
|
|
7
8
|
targets: Target[];
|
|
@@ -6,12 +6,12 @@ const projectUtils_1 = require("../../project/projectUtils");
|
|
|
6
6
|
const workflow_1 = require("../../project/workflow");
|
|
7
7
|
const UpdatesModule_1 = require("../../update/ios/UpdatesModule");
|
|
8
8
|
const version_1 = require("./version");
|
|
9
|
-
async function syncProjectConfigurationAsync({ projectDir, exp, targets, localAutoIncrement, projectId, }) {
|
|
9
|
+
async function syncProjectConfigurationAsync(graphqlClient, { projectDir, exp, targets, localAutoIncrement, projectId, }) {
|
|
10
10
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
|
|
11
11
|
const versionBumpStrategy = resolveVersionBumpStrategy(localAutoIncrement !== null && localAutoIncrement !== void 0 ? localAutoIncrement : false);
|
|
12
12
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
13
13
|
if ((0, projectUtils_1.isExpoUpdatesInstalled)(projectDir)) {
|
|
14
|
-
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp, projectId);
|
|
14
|
+
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(graphqlClient, projectDir, exp, projectId);
|
|
15
15
|
}
|
|
16
16
|
await (0, version_1.bumpVersionAsync)({ projectDir, exp, bumpStrategy: versionBumpStrategy, targets });
|
|
17
17
|
}
|
|
@@ -2,6 +2,7 @@ import { ExpoConfig } from '@expo/config';
|
|
|
2
2
|
import { Platform } from '@expo/eas-build-job';
|
|
3
3
|
import { BuildProfile } from '@expo/eas-json';
|
|
4
4
|
import type { XCBuildConfiguration } from 'xcode';
|
|
5
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
5
6
|
import { Target } from '../../credentials/ios/types';
|
|
6
7
|
export declare enum BumpStrategy {
|
|
7
8
|
APP_VERSION = 0,
|
|
@@ -37,7 +38,7 @@ export declare function evaluateTemplateString(s: string, buildSettings: XCBuild
|
|
|
37
38
|
* Returns buildNumber that will be used for the next build. If current build profile
|
|
38
39
|
* has an 'autoIncrement' option set, it increments the version on server.
|
|
39
40
|
*/
|
|
40
|
-
export declare function resolveRemoteBuildNumberAsync({ projectDir, projectId, exp, applicationTarget, buildProfile, }: {
|
|
41
|
+
export declare function resolveRemoteBuildNumberAsync(graphqlClient: ExpoGraphqlClient, { projectDir, projectId, exp, applicationTarget, buildProfile, }: {
|
|
41
42
|
projectDir: string;
|
|
42
43
|
projectId: string;
|
|
43
44
|
exp: ExpoConfig;
|
|
@@ -194,9 +194,9 @@ exports.evaluateTemplateString = evaluateTemplateString;
|
|
|
194
194
|
* Returns buildNumber that will be used for the next build. If current build profile
|
|
195
195
|
* has an 'autoIncrement' option set, it increments the version on server.
|
|
196
196
|
*/
|
|
197
|
-
async function resolveRemoteBuildNumberAsync({ projectDir, projectId, exp, applicationTarget, buildProfile, }) {
|
|
197
|
+
async function resolveRemoteBuildNumberAsync(graphqlClient, { projectDir, projectId, exp, applicationTarget, buildProfile, }) {
|
|
198
198
|
var _a, _b, _c, _d;
|
|
199
|
-
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(projectId, generated_1.AppPlatform.Ios, applicationTarget.bundleIdentifier);
|
|
199
|
+
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(graphqlClient, projectId, generated_1.AppPlatform.Ios, applicationTarget.bundleIdentifier);
|
|
200
200
|
const localBuildNumber = await readBuildNumberAsync(projectDir, exp, (_a = applicationTarget.buildSettings) !== null && _a !== void 0 ? _a : {});
|
|
201
201
|
const localShortVersion = await readShortVersionAsync(projectDir, exp, (_b = applicationTarget.buildSettings) !== null && _b !== void 0 ? _b : {});
|
|
202
202
|
let currentBuildVersion;
|
|
@@ -219,7 +219,7 @@ async function resolveRemoteBuildNumberAsync({ projectDir, projectId, exp, appli
|
|
|
219
219
|
else if (!buildProfile.autoIncrement && !(remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)) {
|
|
220
220
|
const spinner = (0, ora_1.ora)(`Initializing buildNumber with ${chalk_1.default.bold(currentBuildVersion)}.`).start();
|
|
221
221
|
try {
|
|
222
|
-
await AppVersionMutation_1.AppVersionMutation.createAppVersionAsync({
|
|
222
|
+
await AppVersionMutation_1.AppVersionMutation.createAppVersionAsync(graphqlClient, {
|
|
223
223
|
appId: projectId,
|
|
224
224
|
platform: generated_1.AppPlatform.Ios,
|
|
225
225
|
applicationIdentifier: applicationTarget.bundleIdentifier,
|
|
@@ -239,7 +239,7 @@ async function resolveRemoteBuildNumberAsync({ projectDir, projectId, exp, appli
|
|
|
239
239
|
const nextBuildVersion = (0, versions_1.getNextBuildNumber)(currentBuildVersion);
|
|
240
240
|
const spinner = (0, ora_1.ora)(`Incrementing buildNumber from ${chalk_1.default.bold(currentBuildVersion)} to ${chalk_1.default.bold(nextBuildVersion)}.`).start();
|
|
241
241
|
try {
|
|
242
|
-
await AppVersionMutation_1.AppVersionMutation.createAppVersionAsync({
|
|
242
|
+
await AppVersionMutation_1.AppVersionMutation.createAppVersionAsync(graphqlClient, {
|
|
243
243
|
appId: projectId,
|
|
244
244
|
platform: generated_1.AppPlatform.Ios,
|
|
245
245
|
applicationIdentifier: applicationTarget.bundleIdentifier,
|
package/build/build/local.js
CHANGED
|
@@ -6,7 +6,7 @@ const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
|
|
|
6
6
|
const semver_1 = tslib_1.__importDefault(require("semver"));
|
|
7
7
|
const ora_1 = require("../ora");
|
|
8
8
|
const PLUGIN_PACKAGE_NAME = 'eas-cli-local-build-plugin';
|
|
9
|
-
const PLUGIN_PACKAGE_VERSION = '0.0.
|
|
9
|
+
const PLUGIN_PACKAGE_VERSION = '0.0.114';
|
|
10
10
|
async function runLocalBuildAsync(job, metadata, options) {
|
|
11
11
|
var _a;
|
|
12
12
|
const { command, args } = await getCommandAndArgsAsync(job, metadata);
|
package/build/build/queries.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
1
2
|
import { PaginatedQueryOptions } from '../commandUtils/pagination';
|
|
2
3
|
import { BuildFilter } from '../graphql/generated';
|
|
3
4
|
export declare const BUILDS_LIMIT = 50;
|
|
4
|
-
export declare function listAndRenderBuildsOnAppAsync({ projectId, projectDisplayName, filter, paginatedQueryOptions, }: {
|
|
5
|
+
export declare function listAndRenderBuildsOnAppAsync(graphqlClient: ExpoGraphqlClient, { projectId, projectDisplayName, filter, paginatedQueryOptions, }: {
|
|
5
6
|
projectId: string;
|
|
6
7
|
projectDisplayName: string;
|
|
7
8
|
filter?: BuildFilter;
|
package/build/build/queries.js
CHANGED
|
@@ -9,10 +9,10 @@ const json_1 = require("../utils/json");
|
|
|
9
9
|
const queries_1 = require("../utils/queries");
|
|
10
10
|
const formatBuild_1 = require("./utils/formatBuild");
|
|
11
11
|
exports.BUILDS_LIMIT = 50;
|
|
12
|
-
async function listAndRenderBuildsOnAppAsync({ projectId, projectDisplayName, filter, paginatedQueryOptions, }) {
|
|
12
|
+
async function listAndRenderBuildsOnAppAsync(graphqlClient, { projectId, projectDisplayName, filter, paginatedQueryOptions, }) {
|
|
13
13
|
var _a, _b;
|
|
14
14
|
if (paginatedQueryOptions.nonInteractive) {
|
|
15
|
-
const builds = await BuildQuery_1.BuildQuery.viewBuildsOnAppAsync({
|
|
15
|
+
const builds = await BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
|
|
16
16
|
appId: projectId,
|
|
17
17
|
limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.BUILDS_LIMIT,
|
|
18
18
|
offset: paginatedQueryOptions.offset,
|
|
@@ -24,7 +24,7 @@ async function listAndRenderBuildsOnAppAsync({ projectId, projectDisplayName, fi
|
|
|
24
24
|
await (0, queries_1.paginatedQueryWithConfirmPromptAsync)({
|
|
25
25
|
limit: (_b = paginatedQueryOptions.limit) !== null && _b !== void 0 ? _b : exports.BUILDS_LIMIT,
|
|
26
26
|
offset: paginatedQueryOptions.offset,
|
|
27
|
-
queryToPerform: (limit, offset) => BuildQuery_1.BuildQuery.viewBuildsOnAppAsync({
|
|
27
|
+
queryToPerform: (limit, offset) => BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
|
|
28
28
|
appId: projectId,
|
|
29
29
|
limit,
|
|
30
30
|
offset,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DynamicConfigContextFn } from '../commandUtils/context/DynamicProjectConfigContextField';
|
|
2
|
+
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
3
|
import { RequestedPlatform } from '../platform';
|
|
3
4
|
import { Actor } from '../user/User';
|
|
4
5
|
import { LocalBuildOptions } from './local';
|
|
@@ -16,4 +17,4 @@ export interface BuildFlags {
|
|
|
16
17
|
userInputResourceClass?: UserInputResourceClass;
|
|
17
18
|
message?: string;
|
|
18
19
|
}
|
|
19
|
-
export declare function runBuildAndSubmitAsync(projectDir: string, flags: BuildFlags, actor: Actor, getDynamicProjectConfigAsync: DynamicConfigContextFn): Promise<void>;
|
|
20
|
+
export declare function runBuildAndSubmitAsync(graphqlClient: ExpoGraphqlClient, projectDir: string, flags: BuildFlags, actor: Actor, getDynamicProjectConfigAsync: DynamicConfigContextFn): Promise<void>;
|
|
@@ -50,7 +50,7 @@ function resolveResourceClass(platform, resourceClassInput) {
|
|
|
50
50
|
? androidUserInputResourceClassToBuildResourceClassMapping[resourceClassInput]
|
|
51
51
|
: iosUserInputResourceClassToBuildResourceClassMapping[resourceClassInput];
|
|
52
52
|
}
|
|
53
|
-
async function runBuildAndSubmitAsync(projectDir, flags, actor, getDynamicProjectConfigAsync) {
|
|
53
|
+
async function runBuildAndSubmitAsync(graphqlClient, projectDir, flags, actor, getDynamicProjectConfigAsync) {
|
|
54
54
|
var _a, _b, _c;
|
|
55
55
|
await (0, vcs_1.getVcsClient)().ensureRepoExistsAsync();
|
|
56
56
|
await (0, repository_1.ensureRepoIsCleanAsync)(flags.nonInteractive);
|
|
@@ -86,6 +86,7 @@ async function runBuildAndSubmitAsync(projectDir, flags, actor, getDynamicProjec
|
|
|
86
86
|
resourceClass: resolveResourceClass(buildProfile.platform, (_c = flags.userInputResourceClass) !== null && _c !== void 0 ? _c : types_1.UserInputResourceClass.DEFAULT),
|
|
87
87
|
easJsonCliConfig,
|
|
88
88
|
actor,
|
|
89
|
+
graphqlClient,
|
|
89
90
|
getDynamicProjectConfigAsync,
|
|
90
91
|
});
|
|
91
92
|
if (maybeBuild) {
|
|
@@ -118,7 +119,7 @@ async function runBuildAndSubmitAsync(projectDir, flags, actor, getDynamicProjec
|
|
|
118
119
|
submitProfile,
|
|
119
120
|
nonInteractive: flags.nonInteractive,
|
|
120
121
|
});
|
|
121
|
-
startedBuild.build = await BuildQuery_1.BuildQuery.withSubmissionsByIdAsync(startedBuild.build.id);
|
|
122
|
+
startedBuild.build = await BuildQuery_1.BuildQuery.withSubmissionsByIdAsync(graphqlClient, startedBuild.build.id);
|
|
122
123
|
submissions.push(submission);
|
|
123
124
|
}
|
|
124
125
|
log_1.default.newLine();
|
|
@@ -132,7 +133,7 @@ async function runBuildAndSubmitAsync(projectDir, flags, actor, getDynamicProjec
|
|
|
132
133
|
return;
|
|
133
134
|
}
|
|
134
135
|
const { accountName } = Object.values(buildCtxByPlatform)[0];
|
|
135
|
-
const builds = await (0, build_2.waitForBuildEndAsync)({
|
|
136
|
+
const builds = await (0, build_2.waitForBuildEndAsync)(graphqlClient, {
|
|
136
137
|
buildIds: startedBuilds.map(({ build }) => build.id),
|
|
137
138
|
accountName,
|
|
138
139
|
});
|
|
@@ -147,17 +148,17 @@ async function runBuildAndSubmitAsync(projectDir, flags, actor, getDynamicProjec
|
|
|
147
148
|
exitWithNonZeroCodeIfSomeBuildsFailed(builds);
|
|
148
149
|
}
|
|
149
150
|
else {
|
|
150
|
-
const completedSubmissions = await (0, submit_1.waitToCompleteAsync)(submissions);
|
|
151
|
+
const completedSubmissions = await (0, submit_1.waitToCompleteAsync)(graphqlClient, submissions);
|
|
151
152
|
if (flags.json) {
|
|
152
153
|
(0, json_1.printJsonOnlyOutput)(await Promise.all(builds
|
|
153
154
|
.filter((i) => !!i)
|
|
154
|
-
.map(build => BuildQuery_1.BuildQuery.withSubmissionsByIdAsync(build.id))));
|
|
155
|
+
.map(build => BuildQuery_1.BuildQuery.withSubmissionsByIdAsync(graphqlClient, build.id))));
|
|
155
156
|
}
|
|
156
157
|
(0, submit_1.exitWithNonZeroCodeIfSomeSubmissionsDidntFinish)(completedSubmissions);
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
160
|
exports.runBuildAndSubmitAsync = runBuildAndSubmitAsync;
|
|
160
|
-
async function prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildProfile, resourceClass, easJsonCliConfig, actor, getDynamicProjectConfigAsync, }) {
|
|
161
|
+
async function prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildProfile, resourceClass, easJsonCliConfig, actor, graphqlClient, getDynamicProjectConfigAsync, }) {
|
|
161
162
|
const buildCtx = await (0, createContext_1.createBuildContextAsync)({
|
|
162
163
|
buildProfileName: buildProfile.profileName,
|
|
163
164
|
resourceClass,
|
|
@@ -171,6 +172,7 @@ async function prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildP
|
|
|
171
172
|
easJsonCliConfig,
|
|
172
173
|
message: flags.message,
|
|
173
174
|
actor,
|
|
175
|
+
graphqlClient,
|
|
174
176
|
getDynamicProjectConfigAsync,
|
|
175
177
|
});
|
|
176
178
|
if (moreBuilds) {
|
|
@@ -222,6 +224,7 @@ async function prepareAndStartSubmissionAsync({ build, buildCtx, moreBuilds, pro
|
|
|
222
224
|
credentialsCtx: buildCtx.credentialsCtx,
|
|
223
225
|
applicationIdentifier: (_b = (_a = buildCtx.android) === null || _a === void 0 ? void 0 : _a.applicationId) !== null && _b !== void 0 ? _b : (_c = buildCtx.ios) === null || _c === void 0 ? void 0 : _c.bundleIdentifier,
|
|
224
226
|
actor: buildCtx.user,
|
|
227
|
+
graphqlClient: buildCtx.graphqlClient,
|
|
225
228
|
projectId: buildCtx.projectId,
|
|
226
229
|
exp: buildCtx.exp,
|
|
227
230
|
});
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
1
2
|
import { PaginatedQueryOptions } from '../commandUtils/pagination';
|
|
2
3
|
import { UpdateChannelObject } from '../graphql/queries/ChannelQuery';
|
|
3
4
|
export declare const CHANNELS_LIMIT = 25;
|
|
4
|
-
export declare function selectChannelOnAppAsync({ projectId, selectionPromptTitle, paginatedQueryOptions, }: {
|
|
5
|
+
export declare function selectChannelOnAppAsync(graphqlClient: ExpoGraphqlClient, { projectId, selectionPromptTitle, paginatedQueryOptions, }: {
|
|
5
6
|
projectId: string;
|
|
6
7
|
selectionPromptTitle: string;
|
|
7
8
|
paginatedQueryOptions: PaginatedQueryOptions;
|
|
8
9
|
}): Promise<UpdateChannelObject>;
|
|
9
|
-
export declare function listAndRenderChannelsOnAppAsync({ projectId, paginatedQueryOptions, }: {
|
|
10
|
+
export declare function listAndRenderChannelsOnAppAsync(graphqlClient: ExpoGraphqlClient, { projectId, paginatedQueryOptions, }: {
|
|
10
11
|
projectId: string;
|
|
11
12
|
paginatedQueryOptions: PaginatedQueryOptions;
|
|
12
13
|
}): Promise<void>;
|
|
13
|
-
export declare function listAndRenderBranchesAndUpdatesOnChannelAsync({ projectId: appId, channelName, paginatedQueryOptions, }: {
|
|
14
|
+
export declare function listAndRenderBranchesAndUpdatesOnChannelAsync(graphqlClient: ExpoGraphqlClient, { projectId: appId, channelName, paginatedQueryOptions, }: {
|
|
14
15
|
projectId: string;
|
|
15
16
|
channelName: string;
|
|
16
17
|
paginatedQueryOptions: PaginatedQueryOptions;
|
package/build/channel/queries.js
CHANGED
|
@@ -11,7 +11,7 @@ const json_1 = require("../utils/json");
|
|
|
11
11
|
const queries_1 = require("../utils/queries");
|
|
12
12
|
const utils_1 = require("./utils");
|
|
13
13
|
exports.CHANNELS_LIMIT = 25;
|
|
14
|
-
async function selectChannelOnAppAsync({ projectId, selectionPromptTitle, paginatedQueryOptions, }) {
|
|
14
|
+
async function selectChannelOnAppAsync(graphqlClient, { projectId, selectionPromptTitle, paginatedQueryOptions, }) {
|
|
15
15
|
var _a;
|
|
16
16
|
if (paginatedQueryOptions.nonInteractive) {
|
|
17
17
|
throw new Error('Unable to select a channel in non-interactive mode.');
|
|
@@ -19,7 +19,7 @@ async function selectChannelOnAppAsync({ projectId, selectionPromptTitle, pagina
|
|
|
19
19
|
const updateChannel = await (0, queries_1.paginatedQueryWithSelectPromptAsync)({
|
|
20
20
|
limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.CHANNELS_LIMIT,
|
|
21
21
|
offset: paginatedQueryOptions.offset,
|
|
22
|
-
queryToPerform: (limit, offset) => queryChannelsOnAppAsync({ appId: projectId, limit, offset }),
|
|
22
|
+
queryToPerform: (limit, offset) => queryChannelsOnAppAsync(graphqlClient, { appId: projectId, limit, offset }),
|
|
23
23
|
promptOptions: {
|
|
24
24
|
title: selectionPromptTitle,
|
|
25
25
|
createDisplayTextForSelectionPromptListItem: updateChannel => updateChannel.name,
|
|
@@ -32,10 +32,10 @@ async function selectChannelOnAppAsync({ projectId, selectionPromptTitle, pagina
|
|
|
32
32
|
return updateChannel;
|
|
33
33
|
}
|
|
34
34
|
exports.selectChannelOnAppAsync = selectChannelOnAppAsync;
|
|
35
|
-
async function listAndRenderChannelsOnAppAsync({ projectId, paginatedQueryOptions, }) {
|
|
35
|
+
async function listAndRenderChannelsOnAppAsync(graphqlClient, { projectId, paginatedQueryOptions, }) {
|
|
36
36
|
var _a, _b;
|
|
37
37
|
if (paginatedQueryOptions.nonInteractive) {
|
|
38
|
-
const channels = await queryChannelsOnAppAsync({
|
|
38
|
+
const channels = await queryChannelsOnAppAsync(graphqlClient, {
|
|
39
39
|
appId: projectId,
|
|
40
40
|
limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.CHANNELS_LIMIT,
|
|
41
41
|
offset: paginatedQueryOptions.offset,
|
|
@@ -46,7 +46,7 @@ async function listAndRenderChannelsOnAppAsync({ projectId, paginatedQueryOption
|
|
|
46
46
|
await (0, queries_1.paginatedQueryWithConfirmPromptAsync)({
|
|
47
47
|
limit: (_b = paginatedQueryOptions.limit) !== null && _b !== void 0 ? _b : exports.CHANNELS_LIMIT,
|
|
48
48
|
offset: paginatedQueryOptions.offset,
|
|
49
|
-
queryToPerform: (limit, offset) => queryChannelsOnAppAsync({ limit, offset, appId: projectId }),
|
|
49
|
+
queryToPerform: (limit, offset) => queryChannelsOnAppAsync(graphqlClient, { limit, offset, appId: projectId }),
|
|
50
50
|
promptOptions: {
|
|
51
51
|
title: 'Load more channels?',
|
|
52
52
|
renderListItems: channels => renderPageOfChannels(channels, paginatedQueryOptions),
|
|
@@ -55,12 +55,12 @@ async function listAndRenderChannelsOnAppAsync({ projectId, paginatedQueryOption
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
exports.listAndRenderChannelsOnAppAsync = listAndRenderChannelsOnAppAsync;
|
|
58
|
-
async function listAndRenderBranchesAndUpdatesOnChannelAsync({ projectId: appId, channelName, paginatedQueryOptions, }) {
|
|
58
|
+
async function listAndRenderBranchesAndUpdatesOnChannelAsync(graphqlClient, { projectId: appId, channelName, paginatedQueryOptions, }) {
|
|
59
59
|
var _a, _b;
|
|
60
|
-
const channel = await ChannelQuery_1.ChannelQuery.viewUpdateChannelAsync({ appId, channelName });
|
|
60
|
+
const channel = await ChannelQuery_1.ChannelQuery.viewUpdateChannelAsync(graphqlClient, { appId, channelName });
|
|
61
61
|
renderChannelHeaderContent({ channelName: channel.name, channelId: channel.id });
|
|
62
62
|
if (paginatedQueryOptions.nonInteractive) {
|
|
63
|
-
const branches = await queryBranchesAndUpdateGroupsOnChannelAsync({
|
|
63
|
+
const branches = await queryBranchesAndUpdateGroupsOnChannelAsync(graphqlClient, {
|
|
64
64
|
appId,
|
|
65
65
|
channelName,
|
|
66
66
|
offset: paginatedQueryOptions.offset,
|
|
@@ -72,7 +72,7 @@ async function listAndRenderBranchesAndUpdatesOnChannelAsync({ projectId: appId,
|
|
|
72
72
|
await (0, queries_1.paginatedQueryWithConfirmPromptAsync)({
|
|
73
73
|
limit: (_b = paginatedQueryOptions.limit) !== null && _b !== void 0 ? _b : exports.CHANNELS_LIMIT,
|
|
74
74
|
offset: paginatedQueryOptions.offset,
|
|
75
|
-
queryToPerform: (limit, offset) => queryBranchesAndUpdateGroupsOnChannelAsync({
|
|
75
|
+
queryToPerform: (limit, offset) => queryBranchesAndUpdateGroupsOnChannelAsync(graphqlClient, {
|
|
76
76
|
channelName,
|
|
77
77
|
appId,
|
|
78
78
|
offset,
|
|
@@ -86,15 +86,15 @@ async function listAndRenderBranchesAndUpdatesOnChannelAsync({ projectId: appId,
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
exports.listAndRenderBranchesAndUpdatesOnChannelAsync = listAndRenderBranchesAndUpdatesOnChannelAsync;
|
|
89
|
-
async function queryChannelsOnAppAsync({ appId, offset, limit
|
|
90
|
-
return await ChannelQuery_1.ChannelQuery.viewUpdateChannelsOnAppAsync({
|
|
89
|
+
async function queryChannelsOnAppAsync(graphqlClient, { appId, offset, limit }) {
|
|
90
|
+
return await ChannelQuery_1.ChannelQuery.viewUpdateChannelsOnAppAsync(graphqlClient, {
|
|
91
91
|
appId,
|
|
92
92
|
offset,
|
|
93
93
|
limit,
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
-
async function queryBranchesAndUpdateGroupsOnChannelAsync(args) {
|
|
97
|
-
return await BranchQuery_1.BranchQuery.listBranchesOnChannelAsync(args);
|
|
96
|
+
async function queryBranchesAndUpdateGroupsOnChannelAsync(graphqlClient, args) {
|
|
97
|
+
return await BranchQuery_1.BranchQuery.listBranchesOnChannelAsync(graphqlClient, args);
|
|
98
98
|
}
|
|
99
99
|
function renderPageOfChannels(currentPage, { json }) {
|
|
100
100
|
if (json) {
|