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
|
@@ -13,8 +13,8 @@ const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
|
13
13
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
14
14
|
const prompts_1 = require("../../prompts");
|
|
15
15
|
const json_1 = require("../../utils/json");
|
|
16
|
-
async function getBranchInfoAsync({ appId, name
|
|
17
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
16
|
+
async function getBranchInfoAsync(graphqlClient, { appId, name }) {
|
|
17
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
18
18
|
.query((0, graphql_tag_1.default) `
|
|
19
19
|
query GetBranchInfo($appId: String!, $name: String!) {
|
|
20
20
|
app {
|
|
@@ -34,8 +34,8 @@ async function getBranchInfoAsync({ appId, name, }) {
|
|
|
34
34
|
.toPromise());
|
|
35
35
|
return data;
|
|
36
36
|
}
|
|
37
|
-
async function deleteBranchOnAppAsync({ branchId
|
|
38
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
37
|
+
async function deleteBranchOnAppAsync(graphqlClient, { branchId }) {
|
|
38
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
39
39
|
.mutation((0, graphql_tag_1.default) `
|
|
40
40
|
mutation DeleteUpdateBranch($branchId: ID!) {
|
|
41
41
|
updateBranch {
|
|
@@ -59,21 +59,21 @@ class BranchDelete extends EasCommand_1.default {
|
|
|
59
59
|
if (jsonFlag) {
|
|
60
60
|
(0, json_1.enableJsonOutput)();
|
|
61
61
|
}
|
|
62
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(BranchDelete, { nonInteractive });
|
|
63
|
-
const projectDisplayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(projectId);
|
|
62
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(BranchDelete, { nonInteractive });
|
|
63
|
+
const projectDisplayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId);
|
|
64
64
|
if (!branchName) {
|
|
65
65
|
const validationMessage = 'branch name may not be empty.';
|
|
66
66
|
if (nonInteractive) {
|
|
67
67
|
throw new Error(validationMessage);
|
|
68
68
|
}
|
|
69
|
-
({ name: branchName } = await (0, queries_1.selectBranchOnAppAsync)({
|
|
69
|
+
({ name: branchName } = await (0, queries_1.selectBranchOnAppAsync)(graphqlClient, {
|
|
70
70
|
projectId,
|
|
71
71
|
displayTextForListItem: updateBranch => updateBranch.name,
|
|
72
72
|
promptTitle: 'Which branch would you like to delete?',
|
|
73
73
|
paginatedQueryOptions,
|
|
74
74
|
}));
|
|
75
75
|
}
|
|
76
|
-
const data = await getBranchInfoAsync({ appId: projectId, name: branchName });
|
|
76
|
+
const data = await getBranchInfoAsync(graphqlClient, { appId: projectId, name: branchName });
|
|
77
77
|
const branchId = (_c = (_b = data.app) === null || _b === void 0 ? void 0 : _b.byId.updateBranchByName) === null || _c === void 0 ? void 0 : _c.id;
|
|
78
78
|
if (!branchId) {
|
|
79
79
|
throw new Error(`Could not find branch ${branchName} on ${projectDisplayName}`);
|
|
@@ -89,7 +89,7 @@ class BranchDelete extends EasCommand_1.default {
|
|
|
89
89
|
process.exit(1);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
const deletionResult = await deleteBranchOnAppAsync({
|
|
92
|
+
const deletionResult = await deleteBranchOnAppAsync(graphqlClient, {
|
|
93
93
|
branchId,
|
|
94
94
|
});
|
|
95
95
|
if (jsonFlag) {
|
|
@@ -105,6 +105,7 @@ _a = BranchDelete;
|
|
|
105
105
|
BranchDelete.description = 'delete a branch';
|
|
106
106
|
BranchDelete.contextDefinition = {
|
|
107
107
|
..._a.ContextOptions.ProjectConfig,
|
|
108
|
+
..._a.ContextOptions.LoggedIn,
|
|
108
109
|
};
|
|
109
110
|
BranchDelete.args = [
|
|
110
111
|
{
|
|
@@ -8,6 +8,7 @@ export default class BranchList extends EasCommand {
|
|
|
8
8
|
limit: any;
|
|
9
9
|
};
|
|
10
10
|
static contextDefinition: {
|
|
11
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
11
12
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
12
13
|
};
|
|
13
14
|
runAsync(): Promise<void>;
|
|
@@ -10,14 +10,14 @@ const json_1 = require("../../utils/json");
|
|
|
10
10
|
class BranchList extends EasCommand_1.default {
|
|
11
11
|
async runAsync() {
|
|
12
12
|
const { flags } = await this.parse(BranchList);
|
|
13
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(BranchList, {
|
|
13
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(BranchList, {
|
|
14
14
|
nonInteractive: flags['non-interactive'],
|
|
15
15
|
});
|
|
16
16
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
|
|
17
17
|
if (paginatedQueryOptions.json) {
|
|
18
18
|
(0, json_1.enableJsonOutput)();
|
|
19
19
|
}
|
|
20
|
-
await (0, queries_1.listAndRenderBranchesOnAppAsync)({ projectId, paginatedQueryOptions });
|
|
20
|
+
await (0, queries_1.listAndRenderBranchesOnAppAsync)(graphqlClient, { projectId, paginatedQueryOptions });
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
exports.default = BranchList;
|
|
@@ -29,4 +29,5 @@ BranchList.flags = {
|
|
|
29
29
|
};
|
|
30
30
|
BranchList.contextDefinition = {
|
|
31
31
|
..._a.ContextOptions.ProjectConfig,
|
|
32
|
+
..._a.ContextOptions.LoggedIn,
|
|
32
33
|
};
|
|
@@ -8,6 +8,7 @@ export default class BranchRename extends EasCommand {
|
|
|
8
8
|
to: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
9
|
};
|
|
10
10
|
static contextDefinition: {
|
|
11
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
11
12
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
12
13
|
};
|
|
13
14
|
runAsync(): Promise<void>;
|
|
@@ -12,8 +12,8 @@ const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
|
12
12
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
13
13
|
const prompts_1 = require("../../prompts");
|
|
14
14
|
const json_1 = require("../../utils/json");
|
|
15
|
-
async function renameUpdateBranchOnAppAsync({ appId, name, newName
|
|
16
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
15
|
+
async function renameUpdateBranchOnAppAsync(graphqlClient, { appId, name, newName }) {
|
|
16
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
17
17
|
.mutation((0, graphql_tag_1.default) `
|
|
18
18
|
mutation EditUpdateBranch($input: EditUpdateBranchInput!) {
|
|
19
19
|
updateBranch {
|
|
@@ -36,13 +36,13 @@ async function renameUpdateBranchOnAppAsync({ appId, name, newName, }) {
|
|
|
36
36
|
class BranchRename extends EasCommand_1.default {
|
|
37
37
|
async runAsync() {
|
|
38
38
|
let { flags: { json: jsonFlag, from: currentName, to: newName, 'non-interactive': nonInteractive }, } = await this.parse(BranchRename);
|
|
39
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(BranchRename, {
|
|
39
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(BranchRename, {
|
|
40
40
|
nonInteractive,
|
|
41
41
|
});
|
|
42
42
|
if (jsonFlag) {
|
|
43
43
|
(0, json_1.enableJsonOutput)();
|
|
44
44
|
}
|
|
45
|
-
const projectDisplayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(projectId);
|
|
45
|
+
const projectDisplayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId);
|
|
46
46
|
if (!currentName) {
|
|
47
47
|
const validationMessage = 'current name may not be empty.';
|
|
48
48
|
if (nonInteractive) {
|
|
@@ -67,7 +67,7 @@ class BranchRename extends EasCommand_1.default {
|
|
|
67
67
|
validate: value => (value ? true : validationMessage),
|
|
68
68
|
}));
|
|
69
69
|
}
|
|
70
|
-
const editedBranch = await renameUpdateBranchOnAppAsync({
|
|
70
|
+
const editedBranch = await renameUpdateBranchOnAppAsync(graphqlClient, {
|
|
71
71
|
appId: projectId,
|
|
72
72
|
name: currentName,
|
|
73
73
|
newName: newName,
|
|
@@ -96,4 +96,5 @@ BranchRename.flags = {
|
|
|
96
96
|
};
|
|
97
97
|
BranchRename.contextDefinition = {
|
|
98
98
|
..._a.ContextOptions.ProjectConfig,
|
|
99
|
+
..._a.ContextOptions.LoggedIn,
|
|
99
100
|
};
|
|
@@ -13,6 +13,7 @@ export default class BranchView extends EasCommand {
|
|
|
13
13
|
offset: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
14
14
|
};
|
|
15
15
|
static contextDefinition: {
|
|
16
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
16
17
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
17
18
|
};
|
|
18
19
|
runAsync(): Promise<void>;
|
|
@@ -12,7 +12,7 @@ class BranchView extends EasCommand_1.default {
|
|
|
12
12
|
async runAsync() {
|
|
13
13
|
let { args: { name: branchName }, flags, } = await this.parse(BranchView);
|
|
14
14
|
const { 'non-interactive': nonInteractive } = flags;
|
|
15
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(BranchView, {
|
|
15
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(BranchView, {
|
|
16
16
|
nonInteractive,
|
|
17
17
|
});
|
|
18
18
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
|
|
@@ -23,7 +23,7 @@ class BranchView extends EasCommand_1.default {
|
|
|
23
23
|
if (nonInteractive) {
|
|
24
24
|
throw new Error('Branch name may not be empty.');
|
|
25
25
|
}
|
|
26
|
-
({ name: branchName } = await (0, queries_1.selectBranchOnAppAsync)({
|
|
26
|
+
({ name: branchName } = await (0, queries_1.selectBranchOnAppAsync)(graphqlClient, {
|
|
27
27
|
projectId,
|
|
28
28
|
promptTitle: 'Which branch would you like to view?',
|
|
29
29
|
displayTextForListItem: updateBranch => updateBranch.name,
|
|
@@ -35,7 +35,7 @@ class BranchView extends EasCommand_1.default {
|
|
|
35
35
|
},
|
|
36
36
|
}));
|
|
37
37
|
}
|
|
38
|
-
await (0, queries_2.listAndRenderUpdateGroupsOnBranchAsync)({
|
|
38
|
+
await (0, queries_2.listAndRenderUpdateGroupsOnBranchAsync)(graphqlClient, {
|
|
39
39
|
projectId,
|
|
40
40
|
branchName,
|
|
41
41
|
paginatedQueryOptions,
|
|
@@ -59,4 +59,5 @@ BranchView.flags = {
|
|
|
59
59
|
};
|
|
60
60
|
BranchView.contextDefinition = {
|
|
61
61
|
..._a.ContextOptions.ProjectConfig,
|
|
62
|
+
..._a.ContextOptions.LoggedIn,
|
|
62
63
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
-
|
|
2
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
3
|
+
export declare function selectBuildToCancelAsync(graphqlClient: ExpoGraphqlClient, projectId: string, projectDisplayName: string): Promise<string | null>;
|
|
3
4
|
export default class BuildCancel extends EasCommand {
|
|
4
5
|
static description: string;
|
|
5
6
|
static args: {
|
|
@@ -9,6 +10,7 @@ export default class BuildCancel extends EasCommand {
|
|
|
9
10
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
11
|
};
|
|
11
12
|
static contextDefinition: {
|
|
13
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
12
14
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
13
15
|
};
|
|
14
16
|
runAsync(): Promise<void>;
|
|
@@ -15,8 +15,8 @@ const ora_1 = require("../../ora");
|
|
|
15
15
|
const platform_1 = require("../../platform");
|
|
16
16
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
17
17
|
const prompts_1 = require("../../prompts");
|
|
18
|
-
async function cancelBuildAsync(buildId) {
|
|
19
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
18
|
+
async function cancelBuildAsync(graphqlClient, buildId) {
|
|
19
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
20
20
|
.mutation((0, graphql_tag_1.default) `
|
|
21
21
|
mutation CancelBuildMutation($buildId: ID!) {
|
|
22
22
|
build(buildId: $buildId) {
|
|
@@ -46,24 +46,24 @@ function formatUnfinishedBuild(build) {
|
|
|
46
46
|
const status = chalk_1.default.blue(statusText);
|
|
47
47
|
return `${platform} Started at: ${startTime}, Status: ${status}, Id: ${build.id}`;
|
|
48
48
|
}
|
|
49
|
-
async function selectBuildToCancelAsync(projectId, projectDisplayName) {
|
|
49
|
+
async function selectBuildToCancelAsync(graphqlClient, projectId, projectDisplayName) {
|
|
50
50
|
const spinner = (0, ora_1.ora)().start('Fetching the uncompleted builds…');
|
|
51
51
|
let builds;
|
|
52
52
|
try {
|
|
53
53
|
const [newBuilds, inQueueBuilds, inProgressBuilds] = await Promise.all([
|
|
54
|
-
BuildQuery_1.BuildQuery.viewBuildsOnAppAsync({
|
|
54
|
+
BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
|
|
55
55
|
appId: projectId,
|
|
56
56
|
offset: 0,
|
|
57
57
|
limit: 10,
|
|
58
58
|
filter: { status: generated_1.BuildStatus.New },
|
|
59
59
|
}),
|
|
60
|
-
BuildQuery_1.BuildQuery.viewBuildsOnAppAsync({
|
|
60
|
+
BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
|
|
61
61
|
appId: projectId,
|
|
62
62
|
offset: 0,
|
|
63
63
|
limit: 10,
|
|
64
64
|
filter: { status: generated_1.BuildStatus.InQueue },
|
|
65
65
|
}),
|
|
66
|
-
BuildQuery_1.BuildQuery.viewBuildsOnAppAsync({
|
|
66
|
+
BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
|
|
67
67
|
appId: projectId,
|
|
68
68
|
offset: 0,
|
|
69
69
|
limit: 10,
|
|
@@ -94,9 +94,9 @@ async function selectBuildToCancelAsync(projectId, projectDisplayName) {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
exports.selectBuildToCancelAsync = selectBuildToCancelAsync;
|
|
97
|
-
async function ensureBuildExistsAsync(buildId) {
|
|
97
|
+
async function ensureBuildExistsAsync(graphqlClient, buildId) {
|
|
98
98
|
try {
|
|
99
|
-
await BuildQuery_1.BuildQuery.byIdAsync(buildId);
|
|
99
|
+
await BuildQuery_1.BuildQuery.byIdAsync(graphqlClient, buildId);
|
|
100
100
|
}
|
|
101
101
|
catch {
|
|
102
102
|
throw new Error(`Couldn't find a build matching the id ${buildId}`);
|
|
@@ -105,26 +105,26 @@ async function ensureBuildExistsAsync(buildId) {
|
|
|
105
105
|
class BuildCancel extends EasCommand_1.default {
|
|
106
106
|
async runAsync() {
|
|
107
107
|
const { args: { BUILD_ID: buildIdFromArg }, flags: { 'non-interactive': nonInteractive }, } = await this.parse(BuildCancel);
|
|
108
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(BuildCancel, {
|
|
108
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(BuildCancel, {
|
|
109
109
|
nonInteractive,
|
|
110
110
|
});
|
|
111
|
-
const displayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(projectId);
|
|
111
|
+
const displayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId);
|
|
112
112
|
if (buildIdFromArg) {
|
|
113
|
-
await ensureBuildExistsAsync(buildIdFromArg);
|
|
113
|
+
await ensureBuildExistsAsync(graphqlClient, buildIdFromArg);
|
|
114
114
|
}
|
|
115
115
|
let buildId = buildIdFromArg;
|
|
116
116
|
if (!buildId) {
|
|
117
117
|
if (nonInteractive) {
|
|
118
118
|
throw new Error('BUILD_ID must not be empty in non-interactive mode');
|
|
119
119
|
}
|
|
120
|
-
buildId = await selectBuildToCancelAsync(projectId, displayName);
|
|
120
|
+
buildId = await selectBuildToCancelAsync(graphqlClient, projectId, displayName);
|
|
121
121
|
if (!buildId) {
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
const spinner = (0, ora_1.ora)().start('Canceling the build…');
|
|
126
126
|
try {
|
|
127
|
-
const { status } = await cancelBuildAsync(buildId);
|
|
127
|
+
const { status } = await cancelBuildAsync(graphqlClient, buildId);
|
|
128
128
|
if (status === generated_1.BuildStatus.Canceled) {
|
|
129
129
|
spinner.succeed('Build canceled');
|
|
130
130
|
}
|
|
@@ -148,4 +148,5 @@ BuildCancel.flags = {
|
|
|
148
148
|
};
|
|
149
149
|
BuildCancel.contextDefinition = {
|
|
150
150
|
..._a.ContextOptions.ProjectConfig,
|
|
151
|
+
..._a.ContextOptions.LoggedIn,
|
|
151
152
|
};
|
|
@@ -5,6 +5,7 @@ export default class BuildConfigure extends EasCommand {
|
|
|
5
5
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
6
|
};
|
|
7
7
|
static contextDefinition: {
|
|
8
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
8
9
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
9
10
|
};
|
|
10
11
|
runAsync(): Promise<void>;
|
|
@@ -20,7 +20,7 @@ class BuildConfigure extends EasCommand_1.default {
|
|
|
20
20
|
async runAsync() {
|
|
21
21
|
var _b;
|
|
22
22
|
const { flags } = await this.parse(BuildConfigure);
|
|
23
|
-
const { projectConfig: { exp, projectId, projectDir }, } = await this.getContextAsync(BuildConfigure, {
|
|
23
|
+
const { projectConfig: { exp, projectId, projectDir }, loggedIn: { graphqlClient }, } = await this.getContextAsync(BuildConfigure, {
|
|
24
24
|
nonInteractive: false,
|
|
25
25
|
});
|
|
26
26
|
log_1.default.log('💡 The following process will configure your iOS and/or Android project to be compatible with EAS Build. These changes only apply to your local project files and you can safely revert them at any time.');
|
|
@@ -42,13 +42,13 @@ class BuildConfigure extends EasCommand_1.default {
|
|
|
42
42
|
if ([platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.All].includes(platform)) {
|
|
43
43
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
44
44
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
45
|
-
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp, projectId);
|
|
45
|
+
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(graphqlClient, projectDir, exp, projectId);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
if ([platform_1.RequestedPlatform.Ios, platform_1.RequestedPlatform.All].includes(platform)) {
|
|
49
49
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
|
|
50
50
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
51
|
-
await (0, UpdatesModule_2.syncUpdatesConfigurationAsync)(projectDir, exp, projectId);
|
|
51
|
+
await (0, UpdatesModule_2.syncUpdatesConfigurationAsync)(graphqlClient, projectDir, exp, projectId);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -74,6 +74,7 @@ BuildConfigure.flags = {
|
|
|
74
74
|
};
|
|
75
75
|
BuildConfigure.contextDefinition = {
|
|
76
76
|
..._a.ContextOptions.ProjectConfig,
|
|
77
|
+
..._a.ContextOptions.LoggedIn,
|
|
77
78
|
};
|
|
78
79
|
async function promptForPlatformAsync() {
|
|
79
80
|
log_1.default.addNewLineIfNone();
|
|
@@ -21,7 +21,7 @@ export default class Build extends EasCommand {
|
|
|
21
21
|
static contextDefinition: {
|
|
22
22
|
projectDir: import("../../commandUtils/context/ProjectDirContextField").default;
|
|
23
23
|
getDynamicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicProjectConfigContextField;
|
|
24
|
-
|
|
24
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
25
25
|
};
|
|
26
26
|
runAsync(): Promise<void>;
|
|
27
27
|
private sanitizeFlags;
|
|
@@ -27,17 +27,17 @@ class Build extends EasCommand_1.default {
|
|
|
27
27
|
(0, json_1.enableJsonOutput)();
|
|
28
28
|
}
|
|
29
29
|
const flags = this.sanitizeFlags(rawFlags);
|
|
30
|
-
const { actor, getDynamicProjectConfigAsync, projectDir } = await this.getContextAsync(Build, {
|
|
30
|
+
const { loggedIn: { actor, graphqlClient }, getDynamicProjectConfigAsync, projectDir, } = await this.getContextAsync(Build, {
|
|
31
31
|
nonInteractive: flags.nonInteractive,
|
|
32
32
|
});
|
|
33
33
|
await handleDeprecatedEasJsonAsync(projectDir, flags.nonInteractive);
|
|
34
34
|
if (!flags.localBuildOptions.enable) {
|
|
35
|
-
await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)(flags.autoSubmit
|
|
35
|
+
await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)(graphqlClient, flags.autoSubmit
|
|
36
36
|
? [generated_1.StatuspageServiceName.EasBuild, generated_1.StatuspageServiceName.EasSubmit]
|
|
37
37
|
: [generated_1.StatuspageServiceName.EasBuild]);
|
|
38
38
|
}
|
|
39
39
|
const flagsWithPlatform = await this.ensurePlatformSelectedAsync(flags);
|
|
40
|
-
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(projectDir, flagsWithPlatform, actor, getDynamicProjectConfigAsync);
|
|
40
|
+
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(graphqlClient, projectDir, flagsWithPlatform, actor, getDynamicProjectConfigAsync);
|
|
41
41
|
}
|
|
42
42
|
sanitizeFlags(flags) {
|
|
43
43
|
var _b, _c;
|
|
@@ -18,7 +18,7 @@ export default class BuildInspect extends EasCommand {
|
|
|
18
18
|
static contextDefinition: {
|
|
19
19
|
projectDir: import("../../commandUtils/context/ProjectDirContextField").default;
|
|
20
20
|
getDynamicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicProjectConfigContextField;
|
|
21
|
-
|
|
21
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
22
22
|
};
|
|
23
23
|
runAsync(): Promise<void>;
|
|
24
24
|
private prepareOutputDirAsync;
|
|
@@ -27,7 +27,7 @@ const STAGE_DESCRIPTION = `Stage of the build you want to inspect.
|
|
|
27
27
|
class BuildInspect extends EasCommand_1.default {
|
|
28
28
|
async runAsync() {
|
|
29
29
|
const { flags } = await this.parse(BuildInspect);
|
|
30
|
-
const { actor, getDynamicProjectConfigAsync, projectDir } = await this.getContextAsync(BuildInspect, {
|
|
30
|
+
const { loggedIn: { actor, graphqlClient }, getDynamicProjectConfigAsync, projectDir, } = await this.getContextAsync(BuildInspect, {
|
|
31
31
|
nonInteractive: false,
|
|
32
32
|
});
|
|
33
33
|
const outputDirectory = path_1.default.resolve(process.cwd(), flags.output);
|
|
@@ -44,7 +44,7 @@ class BuildInspect extends EasCommand_1.default {
|
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
try {
|
|
47
|
-
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(projectDir, {
|
|
47
|
+
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(graphqlClient, projectDir, {
|
|
48
48
|
nonInteractive: false,
|
|
49
49
|
wait: true,
|
|
50
50
|
clearCache: false,
|
|
@@ -21,6 +21,7 @@ export default class BuildList extends EasCommand {
|
|
|
21
21
|
gitCommitHash: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
22
22
|
};
|
|
23
23
|
static contextDefinition: {
|
|
24
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
24
25
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
25
26
|
};
|
|
26
27
|
runAsync(): Promise<void>;
|
|
@@ -17,7 +17,7 @@ class BuildList extends EasCommand_1.default {
|
|
|
17
17
|
const { flags } = await this.parse(BuildList);
|
|
18
18
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
|
|
19
19
|
const { json: jsonFlag, platform: requestedPlatform, status: buildStatus, distribution: buildDistribution, 'non-interactive': nonInteractive, } = flags;
|
|
20
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(BuildList, {
|
|
20
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(BuildList, {
|
|
21
21
|
nonInteractive,
|
|
22
22
|
});
|
|
23
23
|
if (jsonFlag) {
|
|
@@ -26,8 +26,8 @@ class BuildList extends EasCommand_1.default {
|
|
|
26
26
|
const platform = toAppPlatform(requestedPlatform);
|
|
27
27
|
const graphqlBuildStatus = toGraphQLBuildStatus(buildStatus);
|
|
28
28
|
const graphqlBuildDistribution = toGraphQLBuildDistribution(buildDistribution);
|
|
29
|
-
const displayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(projectId);
|
|
30
|
-
await (0, queries_1.listAndRenderBuildsOnAppAsync)({
|
|
29
|
+
const displayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId);
|
|
30
|
+
await (0, queries_1.listAndRenderBuildsOnAppAsync)(graphqlClient, {
|
|
31
31
|
projectId,
|
|
32
32
|
projectDisplayName: displayName,
|
|
33
33
|
filter: {
|
|
@@ -85,6 +85,7 @@ BuildList.flags = {
|
|
|
85
85
|
};
|
|
86
86
|
BuildList.contextDefinition = {
|
|
87
87
|
..._a.ContextOptions.ProjectConfig,
|
|
88
|
+
..._a.ContextOptions.LoggedIn,
|
|
88
89
|
};
|
|
89
90
|
const toAppPlatform = (requestedPlatform) => {
|
|
90
91
|
if (!requestedPlatform || requestedPlatform === platform_1.RequestedPlatform.All) {
|
|
@@ -8,7 +8,7 @@ export default class BuildVersionSetView extends EasCommand {
|
|
|
8
8
|
static contextDefinition: {
|
|
9
9
|
projectDir: import("../../../commandUtils/context/ProjectDirContextField").default;
|
|
10
10
|
getDynamicProjectConfigAsync: import("../../../commandUtils/context/DynamicProjectConfigContextField").DynamicProjectConfigContextField;
|
|
11
|
-
|
|
11
|
+
loggedIn: import("../../../commandUtils/context/LoggedInContextField").default;
|
|
12
12
|
};
|
|
13
13
|
runAsync(): Promise<void>;
|
|
14
14
|
}
|
|
@@ -23,7 +23,7 @@ class BuildVersionSetView extends EasCommand_1.default {
|
|
|
23
23
|
async runAsync() {
|
|
24
24
|
var _b, _c, _d;
|
|
25
25
|
const { flags } = await this.parse(BuildVersionSetView);
|
|
26
|
-
const { actor, getDynamicProjectConfigAsync, projectDir } = await this.getContextAsync(BuildVersionSetView, {
|
|
26
|
+
const { loggedIn: { actor, graphqlClient }, getDynamicProjectConfigAsync, projectDir, } = await this.getContextAsync(BuildVersionSetView, {
|
|
27
27
|
nonInteractive: false,
|
|
28
28
|
});
|
|
29
29
|
const platform = await (0, platform_1.selectPlatformAsync)(flags.platform);
|
|
@@ -31,10 +31,10 @@ class BuildVersionSetView extends EasCommand_1.default {
|
|
|
31
31
|
await (0, remoteVersionSource_1.ensureVersionSourceIsRemoteAsync)(easJsonAccessor);
|
|
32
32
|
const profile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, (_b = flags.profile) !== null && _b !== void 0 ? _b : undefined);
|
|
33
33
|
const { exp, projectId } = await getDynamicProjectConfigAsync({ env: profile.env });
|
|
34
|
-
const displayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(projectId);
|
|
34
|
+
const displayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId);
|
|
35
35
|
(0, remoteVersionSource_1.validateAppConfigForRemoteVersionSource)(exp, platform);
|
|
36
36
|
const applicationIdentifier = await (0, applicationIdentifier_1.getApplicationIdentifierAsync)(projectDir, exp, profile, platform, actor);
|
|
37
|
-
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(projectId, (0, AppPlatform_1.toAppPlatform)(platform), applicationIdentifier);
|
|
37
|
+
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(graphqlClient, projectId, (0, AppPlatform_1.toAppPlatform)(platform), applicationIdentifier);
|
|
38
38
|
const currentStateMessage = (remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)
|
|
39
39
|
? `Project ${chalk_1.default.bold(displayName)} with ${getApplicationIdentifierName(platform)} "${applicationIdentifier}" is configured with ${(0, remoteVersionSource_1.getBuildVersionName)(platform)} ${remoteVersions.buildVersion}.`
|
|
40
40
|
: `Project ${chalk_1.default.bold(displayName)} with ${getApplicationIdentifierName(platform)} "${applicationIdentifier}" does not have any ${(0, remoteVersionSource_1.getBuildVersionName)(platform)} configured.`;
|
|
@@ -50,7 +50,7 @@ class BuildVersionSetView extends EasCommand_1.default {
|
|
|
50
50
|
? value => (0, versions_1.isValidVersionCode)(value) || `Invalid value: ${versions_1.VERSION_CODE_REQUIREMENTS}.`
|
|
51
51
|
: value => (0, versions_2.isValidBuildNumber)(value) || `Invalid value: ${versions_2.BUILD_NUMBER_REQUIREMENTS}.`,
|
|
52
52
|
});
|
|
53
|
-
await AppVersionMutation_1.AppVersionMutation.createAppVersionAsync({
|
|
53
|
+
await AppVersionMutation_1.AppVersionMutation.createAppVersionAsync(graphqlClient, {
|
|
54
54
|
appId: projectId,
|
|
55
55
|
platform: (0, AppPlatform_1.toAppPlatform)(platform),
|
|
56
56
|
applicationIdentifier,
|
|
@@ -8,7 +8,7 @@ export default class BuildVersionSyncView extends EasCommand {
|
|
|
8
8
|
static contextDefinition: {
|
|
9
9
|
projectDir: import("../../../commandUtils/context/ProjectDirContextField").default;
|
|
10
10
|
getDynamicProjectConfigAsync: import("../../../commandUtils/context/DynamicProjectConfigContextField").DynamicProjectConfigContextField;
|
|
11
|
-
|
|
11
|
+
loggedIn: import("../../../commandUtils/context/LoggedInContextField").default;
|
|
12
12
|
};
|
|
13
13
|
runAsync(): Promise<void>;
|
|
14
14
|
private syncIosAsync;
|
|
@@ -26,7 +26,7 @@ class BuildVersionSyncView extends EasCommand_1.default {
|
|
|
26
26
|
async runAsync() {
|
|
27
27
|
var _b;
|
|
28
28
|
const { flags } = await this.parse(BuildVersionSyncView);
|
|
29
|
-
const { actor, getDynamicProjectConfigAsync, projectDir } = await this.getContextAsync(BuildVersionSyncView, {
|
|
29
|
+
const { loggedIn: { actor, graphqlClient }, getDynamicProjectConfigAsync, projectDir, } = await this.getContextAsync(BuildVersionSyncView, {
|
|
30
30
|
nonInteractive: true,
|
|
31
31
|
});
|
|
32
32
|
const requestedPlatform = await (0, platform_1.selectRequestedPlatformAsync)(flags.platform);
|
|
@@ -46,7 +46,7 @@ class BuildVersionSyncView extends EasCommand_1.default {
|
|
|
46
46
|
(0, remoteVersionSource_1.validateAppConfigForRemoteVersionSource)(exp, profileInfo.platform);
|
|
47
47
|
const platformDisplayName = platform_1.appPlatformDisplayNames[(0, AppPlatform_1.toAppPlatform)(profileInfo.platform)];
|
|
48
48
|
const applicationIdentifier = await (0, applicationIdentifier_1.getApplicationIdentifierAsync)(projectDir, exp, profileInfo.profile, profileInfo.platform, actor);
|
|
49
|
-
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(projectId, (0, AppPlatform_1.toAppPlatform)(profileInfo.platform), applicationIdentifier);
|
|
49
|
+
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(graphqlClient, projectId, (0, AppPlatform_1.toAppPlatform)(profileInfo.platform), applicationIdentifier);
|
|
50
50
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, profileInfo.platform);
|
|
51
51
|
if (!(remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)) {
|
|
52
52
|
log_1.default.warn(`Skipping versions sync for ${platformDisplayName}. There are no versions configured on Expo servers, use "eas build:version:set" or run a build to initialize it.`);
|
|
@@ -8,6 +8,7 @@ export default class BuildView extends EasCommand {
|
|
|
8
8
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
9
|
};
|
|
10
10
|
static contextDefinition: {
|
|
11
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
11
12
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
12
13
|
};
|
|
13
14
|
runAsync(): Promise<void>;
|
|
@@ -13,21 +13,21 @@ const json_1 = require("../../utils/json");
|
|
|
13
13
|
class BuildView extends EasCommand_1.default {
|
|
14
14
|
async runAsync() {
|
|
15
15
|
const { args: { BUILD_ID: buildId }, flags, } = await this.parse(BuildView);
|
|
16
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(BuildView, {
|
|
16
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(BuildView, {
|
|
17
17
|
nonInteractive: true,
|
|
18
18
|
});
|
|
19
19
|
if (flags.json) {
|
|
20
20
|
(0, json_1.enableJsonOutput)();
|
|
21
21
|
}
|
|
22
|
-
const displayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(projectId);
|
|
22
|
+
const displayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId);
|
|
23
23
|
const spinner = (0, ora_1.ora)().start('Fetching the build…');
|
|
24
24
|
try {
|
|
25
25
|
let build;
|
|
26
26
|
if (buildId) {
|
|
27
|
-
build = await BuildQuery_1.BuildQuery.byIdAsync(buildId);
|
|
27
|
+
build = await BuildQuery_1.BuildQuery.byIdAsync(graphqlClient, buildId);
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
const builds = await BuildQuery_1.BuildQuery.viewBuildsOnAppAsync({
|
|
30
|
+
const builds = await BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
|
|
31
31
|
appId: projectId,
|
|
32
32
|
offset: 0,
|
|
33
33
|
limit: 1,
|
|
@@ -71,4 +71,5 @@ BuildView.flags = {
|
|
|
71
71
|
};
|
|
72
72
|
BuildView.contextDefinition = {
|
|
73
73
|
..._a.ContextOptions.ProjectConfig,
|
|
74
|
+
..._a.ContextOptions.LoggedIn,
|
|
74
75
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
3
|
import { CreateUpdateChannelOnAppMutation } from '../../graphql/generated';
|
|
3
|
-
export declare function createUpdateChannelOnAppAsync({ appId, channelName, branchId, }: {
|
|
4
|
+
export declare function createUpdateChannelOnAppAsync(graphqlClient: ExpoGraphqlClient, { appId, channelName, branchId, }: {
|
|
4
5
|
appId: string;
|
|
5
6
|
channelName: string;
|
|
6
7
|
branchId: string;
|
|
@@ -17,6 +18,7 @@ export default class ChannelCreate extends EasCommand {
|
|
|
17
18
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
19
|
};
|
|
19
20
|
static contextDefinition: {
|
|
21
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
20
22
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
21
23
|
};
|
|
22
24
|
runAsync(): Promise<void>;
|
|
@@ -16,13 +16,13 @@ const prompts_1 = require("../../prompts");
|
|
|
16
16
|
const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
|
|
17
17
|
const json_1 = require("../../utils/json");
|
|
18
18
|
const create_1 = require("../branch/create");
|
|
19
|
-
async function createUpdateChannelOnAppAsync({ appId, channelName, branchId, }) {
|
|
19
|
+
async function createUpdateChannelOnAppAsync(graphqlClient, { appId, channelName, branchId, }) {
|
|
20
20
|
// Point the new channel at a branch with its same name.
|
|
21
21
|
const branchMapping = JSON.stringify({
|
|
22
22
|
data: [{ branchId, branchMappingLogic: 'true' }],
|
|
23
23
|
version: 0,
|
|
24
24
|
});
|
|
25
|
-
return await (0, client_1.withErrorHandlingAsync)(
|
|
25
|
+
return await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
26
26
|
.mutation((0, graphql_tag_1.default) `
|
|
27
27
|
mutation CreateUpdateChannelOnApp($appId: ID!, $name: String!, $branchMapping: String!) {
|
|
28
28
|
updateChannel {
|
|
@@ -44,7 +44,7 @@ exports.createUpdateChannelOnAppAsync = createUpdateChannelOnAppAsync;
|
|
|
44
44
|
class ChannelCreate extends EasCommand_1.default {
|
|
45
45
|
async runAsync() {
|
|
46
46
|
let { args: { name: channelName }, flags: { json: jsonFlag, 'non-interactive': nonInteractive }, } = await this.parse(ChannelCreate);
|
|
47
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(ChannelCreate, {
|
|
47
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(ChannelCreate, {
|
|
48
48
|
nonInteractive,
|
|
49
49
|
});
|
|
50
50
|
if (jsonFlag) {
|
|
@@ -65,7 +65,7 @@ class ChannelCreate extends EasCommand_1.default {
|
|
|
65
65
|
let branchId;
|
|
66
66
|
let branchMessage;
|
|
67
67
|
try {
|
|
68
|
-
const branch = await BranchQuery_1.BranchQuery.getBranchByNameAsync({
|
|
68
|
+
const branch = await BranchQuery_1.BranchQuery.getBranchByNameAsync(graphqlClient, {
|
|
69
69
|
appId: projectId,
|
|
70
70
|
name: channelName,
|
|
71
71
|
});
|
|
@@ -74,7 +74,7 @@ class ChannelCreate extends EasCommand_1.default {
|
|
|
74
74
|
}
|
|
75
75
|
catch (error) {
|
|
76
76
|
if (error instanceof utils_1.BranchNotFoundError) {
|
|
77
|
-
const newBranch = await (0, create_1.createUpdateBranchOnAppAsync)({
|
|
77
|
+
const newBranch = await (0, create_1.createUpdateBranchOnAppAsync)(graphqlClient, {
|
|
78
78
|
appId: projectId,
|
|
79
79
|
name: channelName,
|
|
80
80
|
});
|
|
@@ -85,7 +85,7 @@ class ChannelCreate extends EasCommand_1.default {
|
|
|
85
85
|
throw error;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
const { updateChannel: { createUpdateChannelForApp: newChannel }, } = await createUpdateChannelOnAppAsync({
|
|
88
|
+
const { updateChannel: { createUpdateChannelForApp: newChannel }, } = await createUpdateChannelOnAppAsync(graphqlClient, {
|
|
89
89
|
appId: projectId,
|
|
90
90
|
channelName,
|
|
91
91
|
branchId,
|
|
@@ -98,7 +98,7 @@ class ChannelCreate extends EasCommand_1.default {
|
|
|
98
98
|
}
|
|
99
99
|
else {
|
|
100
100
|
log_1.default.addNewLineIfNone();
|
|
101
|
-
log_1.default.withTick(`Created a new channel on project ${chalk_1.default.bold(await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(projectId))}`);
|
|
101
|
+
log_1.default.withTick(`Created a new channel on project ${chalk_1.default.bold(await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId))}`);
|
|
102
102
|
log_1.default.log((0, formatFields_1.default)([
|
|
103
103
|
{ label: 'Name', value: newChannel.name },
|
|
104
104
|
{ label: 'ID', value: newChannel.id },
|
|
@@ -129,4 +129,5 @@ ChannelCreate.flags = {
|
|
|
129
129
|
};
|
|
130
130
|
ChannelCreate.contextDefinition = {
|
|
131
131
|
..._a.ContextOptions.ProjectConfig,
|
|
132
|
+
..._a.ContextOptions.LoggedIn,
|
|
132
133
|
};
|