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
|
@@ -7,8 +7,8 @@ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasComm
|
|
|
7
7
|
const client_1 = require("../../graphql/client");
|
|
8
8
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
9
9
|
const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
|
|
10
|
-
async function projectInfoByIdAsync(appId) {
|
|
11
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
10
|
+
async function projectInfoByIdAsync(graphqlClient, appId) {
|
|
11
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
12
12
|
.query((0, graphql_tag_1.default) `
|
|
13
13
|
query AppInfo($appId: String!) {
|
|
14
14
|
app {
|
|
@@ -24,10 +24,10 @@ async function projectInfoByIdAsync(appId) {
|
|
|
24
24
|
}
|
|
25
25
|
class ProjectInfo extends EasCommand_1.default {
|
|
26
26
|
async runAsync() {
|
|
27
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(ProjectInfo, {
|
|
27
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(ProjectInfo, {
|
|
28
28
|
nonInteractive: true,
|
|
29
29
|
});
|
|
30
|
-
const { app } = await projectInfoByIdAsync(projectId);
|
|
30
|
+
const { app } = await projectInfoByIdAsync(graphqlClient, projectId);
|
|
31
31
|
if (!app) {
|
|
32
32
|
throw new Error(`Could not find project with id: ${projectId}`);
|
|
33
33
|
}
|
|
@@ -43,4 +43,5 @@ _a = ProjectInfo;
|
|
|
43
43
|
ProjectInfo.description = 'information about the current project';
|
|
44
44
|
ProjectInfo.contextDefinition = {
|
|
45
45
|
..._a.ContextOptions.ProjectConfig,
|
|
46
|
+
..._a.ContextOptions.LoggedIn,
|
|
46
47
|
};
|
|
@@ -9,7 +9,7 @@ export default class ProjectInit extends EasCommand {
|
|
|
9
9
|
};
|
|
10
10
|
static contextDefinition: {
|
|
11
11
|
projectDir: import("../../commandUtils/context/ProjectDirContextField").default;
|
|
12
|
-
|
|
12
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
13
13
|
};
|
|
14
14
|
private static saveProjectIdAndLogSuccessAsync;
|
|
15
15
|
private static initializeWithExplicitIDAsync;
|
|
@@ -52,7 +52,7 @@ class ProjectInit extends EasCommand_1.default {
|
|
|
52
52
|
await ProjectInit.saveProjectIdAndLogSuccessAsync(projectDir, projectId);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
static async initializeWithInteractiveSelectionAsync(actor, projectDir) {
|
|
55
|
+
static async initializeWithInteractiveSelectionAsync(graphqlClient, actor, projectDir) {
|
|
56
56
|
var _c, _d, _e;
|
|
57
57
|
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
58
58
|
const existingProjectId = (_d = (_c = exp.extra) === null || _c === void 0 ? void 0 : _c.eas) === null || _d === void 0 ? void 0 : _d.projectId;
|
|
@@ -95,7 +95,7 @@ class ProjectInit extends EasCommand_1.default {
|
|
|
95
95
|
}
|
|
96
96
|
const projectName = exp.slug;
|
|
97
97
|
const projectFullName = `@${accountName}/${projectName}`;
|
|
98
|
-
const existingProjectIdOnServer = await (0, fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync_1.findProjectIdByAccountNameAndSlugNullableAsync)(accountName, projectName);
|
|
98
|
+
const existingProjectIdOnServer = await (0, fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync_1.findProjectIdByAccountNameAndSlugNullableAsync)(graphqlClient, accountName, projectName);
|
|
99
99
|
if (existingProjectIdOnServer) {
|
|
100
100
|
const affirmedLink = await (0, prompts_1.confirmAsync)({
|
|
101
101
|
message: `Existing project found: ${projectFullName} (ID: ${existingProjectIdOnServer}). Link this project?`,
|
|
@@ -124,7 +124,7 @@ class ProjectInit extends EasCommand_1.default {
|
|
|
124
124
|
const spinner = (0, ora_1.ora)(`Creating ${chalk_1.default.bold(projectFullName)}`).start();
|
|
125
125
|
let createdProjectId;
|
|
126
126
|
try {
|
|
127
|
-
createdProjectId = await AppMutation_1.AppMutation.createAppAsync({
|
|
127
|
+
createdProjectId = await AppMutation_1.AppMutation.createAppAsync(graphqlClient, {
|
|
128
128
|
accountId: account.id,
|
|
129
129
|
projectName,
|
|
130
130
|
privacy: (_e = (0, projectUtils_1.toAppPrivacy)(exp.privacy)) !== null && _e !== void 0 ? _e : generated_1.AppPrivacy.Public,
|
|
@@ -139,12 +139,12 @@ class ProjectInit extends EasCommand_1.default {
|
|
|
139
139
|
}
|
|
140
140
|
async runAsync() {
|
|
141
141
|
const { flags: { id, force, 'non-interactive': nonInteractive }, } = await this.parse(ProjectInit);
|
|
142
|
-
const { actor, projectDir } = await this.getContextAsync(ProjectInit, { nonInteractive });
|
|
142
|
+
const { loggedIn: { actor, graphqlClient }, projectDir, } = await this.getContextAsync(ProjectInit, { nonInteractive });
|
|
143
143
|
if (id) {
|
|
144
144
|
await ProjectInit.initializeWithExplicitIDAsync(id, projectDir, { force, nonInteractive });
|
|
145
145
|
}
|
|
146
146
|
else {
|
|
147
|
-
await ProjectInit.initializeWithInteractiveSelectionAsync(actor, projectDir);
|
|
147
|
+
await ProjectInit.initializeWithInteractiveSelectionAsync(graphqlClient, actor, projectDir);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
@@ -12,6 +12,7 @@ export default class EnvironmentSecretCreate extends EasCommand {
|
|
|
12
12
|
force: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
13
|
};
|
|
14
14
|
static contextDefinition: {
|
|
15
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
15
16
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
16
17
|
};
|
|
17
18
|
runAsync(): Promise<void>;
|
|
@@ -18,11 +18,11 @@ const prompts_1 = require("../../prompts");
|
|
|
18
18
|
class EnvironmentSecretCreate extends EasCommand_1.default {
|
|
19
19
|
async runAsync() {
|
|
20
20
|
let { flags: { name, value: secretValue, scope, force, type: secretType, 'non-interactive': nonInteractive, }, } = await this.parse(EnvironmentSecretCreate);
|
|
21
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(EnvironmentSecretCreate, {
|
|
21
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(EnvironmentSecretCreate, {
|
|
22
22
|
nonInteractive,
|
|
23
23
|
});
|
|
24
|
-
const projectDisplayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(projectId);
|
|
25
|
-
const ownerAccount = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId);
|
|
24
|
+
const projectDisplayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId);
|
|
25
|
+
const ownerAccount = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
|
|
26
26
|
if (!scope) {
|
|
27
27
|
const validationMessage = 'Secret scope may not be empty.';
|
|
28
28
|
if (nonInteractive) {
|
|
@@ -114,14 +114,14 @@ class EnvironmentSecretCreate extends EasCommand_1.default {
|
|
|
114
114
|
}
|
|
115
115
|
if (scope === EnvironmentSecretsQuery_1.EnvironmentSecretScope.PROJECT) {
|
|
116
116
|
if (force) {
|
|
117
|
-
const { appSecrets: existingSecrets } = await EnvironmentSecretsQuery_1.EnvironmentSecretsQuery.byAppIdAsync(projectId);
|
|
117
|
+
const { appSecrets: existingSecrets } = await EnvironmentSecretsQuery_1.EnvironmentSecretsQuery.byAppIdAsync(graphqlClient, projectId);
|
|
118
118
|
const existingSecret = existingSecrets.find(secret => secret.name === name);
|
|
119
119
|
if (existingSecret) {
|
|
120
|
-
await EnvironmentSecretMutation_1.EnvironmentSecretMutation.deleteAsync(existingSecret.id);
|
|
120
|
+
await EnvironmentSecretMutation_1.EnvironmentSecretMutation.deleteAsync(graphqlClient, existingSecret.id);
|
|
121
121
|
log_1.default.withTick(`Deleting existing secret ${chalk_1.default.bold(name)} on project ${chalk_1.default.bold(projectDisplayName)}.`);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
const secret = await EnvironmentSecretMutation_1.EnvironmentSecretMutation.createForAppAsync({ name, value: secretValue, type: EnvironmentSecret_1.SecretTypeToEnvironmentSecretType[secretType] }, projectId);
|
|
124
|
+
const secret = await EnvironmentSecretMutation_1.EnvironmentSecretMutation.createForAppAsync(graphqlClient, { name, value: secretValue, type: EnvironmentSecret_1.SecretTypeToEnvironmentSecretType[secretType] }, projectId);
|
|
125
125
|
if (!secret) {
|
|
126
126
|
throw new Error(`Could not create secret with name ${name} on project with id ${projectId}`);
|
|
127
127
|
}
|
|
@@ -134,14 +134,14 @@ class EnvironmentSecretCreate extends EasCommand_1.default {
|
|
|
134
134
|
}
|
|
135
135
|
else if (scope === EnvironmentSecretsQuery_1.EnvironmentSecretScope.ACCOUNT) {
|
|
136
136
|
if (force) {
|
|
137
|
-
const { accountSecrets: existingSecrets } = await EnvironmentSecretsQuery_1.EnvironmentSecretsQuery.byAppIdAsync(projectId);
|
|
137
|
+
const { accountSecrets: existingSecrets } = await EnvironmentSecretsQuery_1.EnvironmentSecretsQuery.byAppIdAsync(graphqlClient, projectId);
|
|
138
138
|
const existingSecret = existingSecrets.find(secret => secret.name === name);
|
|
139
139
|
if (existingSecret) {
|
|
140
|
-
await EnvironmentSecretMutation_1.EnvironmentSecretMutation.deleteAsync(existingSecret.id);
|
|
140
|
+
await EnvironmentSecretMutation_1.EnvironmentSecretMutation.deleteAsync(graphqlClient, existingSecret.id);
|
|
141
141
|
log_1.default.withTick(`Deleting existing secret ${chalk_1.default.bold(name)} on account ${chalk_1.default.bold(ownerAccount.name)}.`);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const secret = await EnvironmentSecretMutation_1.EnvironmentSecretMutation.createForAccountAsync({ name, value: secretValue, type: EnvironmentSecret_1.SecretTypeToEnvironmentSecretType[secretType] }, ownerAccount.id);
|
|
144
|
+
const secret = await EnvironmentSecretMutation_1.EnvironmentSecretMutation.createForAccountAsync(graphqlClient, { name, value: secretValue, type: EnvironmentSecret_1.SecretTypeToEnvironmentSecretType[secretType] }, ownerAccount.id);
|
|
145
145
|
if (!secret) {
|
|
146
146
|
throw new Error(`Could not create secret with name ${name} on account with id ${ownerAccount.id}`);
|
|
147
147
|
}
|
|
@@ -181,4 +181,5 @@ EnvironmentSecretCreate.flags = {
|
|
|
181
181
|
};
|
|
182
182
|
EnvironmentSecretCreate.contextDefinition = {
|
|
183
183
|
..._a.ContextOptions.ProjectConfig,
|
|
184
|
+
..._a.ContextOptions.LoggedIn,
|
|
184
185
|
};
|
|
@@ -6,6 +6,7 @@ export default class EnvironmentSecretDelete extends EasCommand {
|
|
|
6
6
|
id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
7
|
};
|
|
8
8
|
static contextDefinition: {
|
|
9
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
9
10
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
10
11
|
};
|
|
11
12
|
runAsync(): Promise<void>;
|
|
@@ -12,7 +12,7 @@ const prompts_1 = require("../../prompts");
|
|
|
12
12
|
class EnvironmentSecretDelete extends EasCommand_1.default {
|
|
13
13
|
async runAsync() {
|
|
14
14
|
let { flags: { id, 'non-interactive': nonInteractive }, } = await this.parse(EnvironmentSecretDelete);
|
|
15
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(EnvironmentSecretDelete, {
|
|
15
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(EnvironmentSecretDelete, {
|
|
16
16
|
nonInteractive,
|
|
17
17
|
});
|
|
18
18
|
let secret;
|
|
@@ -21,7 +21,7 @@ class EnvironmentSecretDelete extends EasCommand_1.default {
|
|
|
21
21
|
if (nonInteractive) {
|
|
22
22
|
throw new Error(validationMessage);
|
|
23
23
|
}
|
|
24
|
-
const secrets = await EnvironmentSecretsQuery_1.EnvironmentSecretsQuery.allAsync(projectId);
|
|
24
|
+
const secrets = await EnvironmentSecretsQuery_1.EnvironmentSecretsQuery.allAsync(graphqlClient, projectId);
|
|
25
25
|
({ secret } = await (0, prompts_1.promptAsync)({
|
|
26
26
|
type: 'autocomplete',
|
|
27
27
|
name: 'secret',
|
|
@@ -50,7 +50,7 @@ class EnvironmentSecretDelete extends EasCommand_1.default {
|
|
|
50
50
|
process.exit(1);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
await EnvironmentSecretMutation_1.EnvironmentSecretMutation.deleteAsync(id);
|
|
53
|
+
await EnvironmentSecretMutation_1.EnvironmentSecretMutation.deleteAsync(graphqlClient, id);
|
|
54
54
|
log_1.default.withTick(`️Deleted secret${(secret === null || secret === void 0 ? void 0 : secret.name) ? ` "${secret === null || secret === void 0 ? void 0 : secret.name}"` : ''} with id "${id}".`);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -65,4 +65,5 @@ EnvironmentSecretDelete.flags = {
|
|
|
65
65
|
};
|
|
66
66
|
EnvironmentSecretDelete.contextDefinition = {
|
|
67
67
|
..._a.ContextOptions.ProjectConfig,
|
|
68
|
+
..._a.ContextOptions.LoggedIn,
|
|
68
69
|
};
|
|
@@ -2,6 +2,7 @@ import EasCommand from '../../commandUtils/EasCommand';
|
|
|
2
2
|
export default class EnvironmentSecretList extends EasCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static contextDefinition: {
|
|
5
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
5
6
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
6
7
|
};
|
|
7
8
|
runAsync(): Promise<void>;
|
|
@@ -11,10 +11,10 @@ const EnvironmentSecret_1 = require("../../graphql/types/EnvironmentSecret");
|
|
|
11
11
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
12
12
|
class EnvironmentSecretList extends EasCommand_1.default {
|
|
13
13
|
async runAsync() {
|
|
14
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(EnvironmentSecretList, {
|
|
14
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(EnvironmentSecretList, {
|
|
15
15
|
nonInteractive: true,
|
|
16
16
|
});
|
|
17
|
-
const secrets = await EnvironmentSecretsQuery_1.EnvironmentSecretsQuery.allAsync(projectId);
|
|
17
|
+
const secrets = await EnvironmentSecretsQuery_1.EnvironmentSecretsQuery.allAsync(graphqlClient, projectId);
|
|
18
18
|
const table = new cli_table3_1.default({
|
|
19
19
|
head: ['Name', 'Type', 'Scope', 'ID', 'Updated at'],
|
|
20
20
|
wordWrap: true,
|
|
@@ -38,4 +38,5 @@ _a = EnvironmentSecretList;
|
|
|
38
38
|
EnvironmentSecretList.description = 'list environment secrets available for your current app';
|
|
39
39
|
EnvironmentSecretList.contextDefinition = {
|
|
40
40
|
..._a.ContextOptions.ProjectConfig,
|
|
41
|
+
..._a.ContextOptions.LoggedIn,
|
|
41
42
|
};
|
|
@@ -16,7 +16,7 @@ export default class Submit extends EasCommand {
|
|
|
16
16
|
static contextDefinition: {
|
|
17
17
|
projectDir: import("../commandUtils/context/ProjectDirContextField").default;
|
|
18
18
|
projectConfig: import("../commandUtils/context/ProjectConfigContextField").default;
|
|
19
|
-
|
|
19
|
+
loggedIn: import("../commandUtils/context/LoggedInContextField").default;
|
|
20
20
|
};
|
|
21
21
|
runAsync(): Promise<void>;
|
|
22
22
|
private sanitizeFlags;
|
package/build/commands/submit.js
CHANGED
|
@@ -18,11 +18,11 @@ const statuspageService_1 = require("../utils/statuspageService");
|
|
|
18
18
|
class Submit extends EasCommand_1.default {
|
|
19
19
|
async runAsync() {
|
|
20
20
|
const { flags: rawFlags } = await this.parse(Submit);
|
|
21
|
-
const { actor, projectConfig: { exp, projectId, projectDir }, } = await this.getContextAsync(Submit, {
|
|
21
|
+
const { loggedIn: { actor, graphqlClient }, projectConfig: { exp, projectId, projectDir }, } = await this.getContextAsync(Submit, {
|
|
22
22
|
nonInteractive: false,
|
|
23
23
|
});
|
|
24
24
|
const flags = this.sanitizeFlags(rawFlags);
|
|
25
|
-
await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)([generated_1.StatuspageServiceName.EasSubmit]);
|
|
25
|
+
await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)(graphqlClient, [generated_1.StatuspageServiceName.EasSubmit]);
|
|
26
26
|
const flagsWithPlatform = await this.ensurePlatformSelectedAsync(flags);
|
|
27
27
|
const platforms = (0, platform_1.toPlatforms)(flagsWithPlatform.requestedPlatform);
|
|
28
28
|
const submissionProfiles = await (0, profiles_1.getProfilesAsync)({
|
|
@@ -41,6 +41,7 @@ class Submit extends EasCommand_1.default {
|
|
|
41
41
|
archiveFlags: flagsWithPlatform.archiveFlags,
|
|
42
42
|
nonInteractive: flagsWithPlatform.nonInteractive,
|
|
43
43
|
actor,
|
|
44
|
+
graphqlClient,
|
|
44
45
|
exp,
|
|
45
46
|
projectId,
|
|
46
47
|
});
|
|
@@ -55,7 +56,7 @@ class Submit extends EasCommand_1.default {
|
|
|
55
56
|
log_1.default.newLine();
|
|
56
57
|
(0, urls_1.printSubmissionDetailsUrls)(submissions);
|
|
57
58
|
if (flagsWithPlatform.wait) {
|
|
58
|
-
const completedSubmissions = await (0, submit_1.waitToCompleteAsync)(submissions, {
|
|
59
|
+
const completedSubmissions = await (0, submit_1.waitToCompleteAsync)(graphqlClient, submissions, {
|
|
59
60
|
verbose: flagsWithPlatform.verbose,
|
|
60
61
|
});
|
|
61
62
|
(0, submit_1.exitWithNonZeroCodeIfSomeSubmissionsDidntFinish)(completedSubmissions);
|
|
@@ -5,6 +5,7 @@ export default class UpdateConfigure 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>;
|
|
@@ -22,7 +22,7 @@ class UpdateConfigure extends EasCommand_1.default {
|
|
|
22
22
|
async runAsync() {
|
|
23
23
|
log_1.default.log('💡 The following process will configure your project to run EAS Update. These changes only apply to your local project files and you can safely revert them at any time.');
|
|
24
24
|
const { flags } = await this.parse(UpdateConfigure);
|
|
25
|
-
const { projectConfig: { projectId, exp, projectDir }, } = await this.getContextAsync(UpdateConfigure, {
|
|
25
|
+
const { projectConfig: { projectId, exp, projectDir }, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdateConfigure, {
|
|
26
26
|
nonInteractive: true,
|
|
27
27
|
});
|
|
28
28
|
const platform = flags.platform;
|
|
@@ -47,12 +47,12 @@ class UpdateConfigure extends EasCommand_1.default {
|
|
|
47
47
|
// configure native files for EAS Update
|
|
48
48
|
if ([platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.All].includes(platform) &&
|
|
49
49
|
androidWorkflow === eas_build_job_1.Workflow.GENERIC) {
|
|
50
|
-
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, updatedExp, projectId);
|
|
50
|
+
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(graphqlClient, projectDir, updatedExp, projectId);
|
|
51
51
|
log_1.default.withTick(`Configured ${chalk_1.default.bold('AndroidManifest.xml')} for EAS Update`);
|
|
52
52
|
}
|
|
53
53
|
if ([platform_1.RequestedPlatform.Ios, platform_1.RequestedPlatform.All].includes(platform) &&
|
|
54
54
|
iosWorkflow === eas_build_job_1.Workflow.GENERIC) {
|
|
55
|
-
await (0, UpdatesModule_2.syncUpdatesConfigurationAsync)(projectDir, updatedExp, projectId);
|
|
55
|
+
await (0, UpdatesModule_2.syncUpdatesConfigurationAsync)(graphqlClient, projectDir, updatedExp, projectId);
|
|
56
56
|
log_1.default.withTick(`Configured ${chalk_1.default.bold('Expo.plist')} for EAS Update`);
|
|
57
57
|
}
|
|
58
58
|
log_1.default.addNewLineIfNone();
|
|
@@ -72,6 +72,7 @@ UpdateConfigure.flags = {
|
|
|
72
72
|
};
|
|
73
73
|
UpdateConfigure.contextDefinition = {
|
|
74
74
|
..._a.ContextOptions.ProjectConfig,
|
|
75
|
+
..._a.ContextOptions.LoggedIn,
|
|
75
76
|
};
|
|
76
77
|
async function configureAppJSONForEASUpdateAsync({ projectDir, exp, platform, workflows, projectId, }) {
|
|
77
78
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
@@ -10,5 +10,8 @@ export default class UpdateDelete extends EasCommand {
|
|
|
10
10
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
12
|
};
|
|
13
|
+
static contextDefinition: {
|
|
14
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
15
|
+
};
|
|
13
16
|
runAsync(): Promise<void>;
|
|
14
17
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
@@ -9,8 +10,8 @@ const client_1 = require("../../graphql/client");
|
|
|
9
10
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
10
11
|
const prompts_1 = require("../../prompts");
|
|
11
12
|
const json_1 = require("../../utils/json");
|
|
12
|
-
async function deleteUpdateGroupAsync({ group, }) {
|
|
13
|
-
return await (0, client_1.withErrorHandlingAsync)(
|
|
13
|
+
async function deleteUpdateGroupAsync(graphqlClient, { group, }) {
|
|
14
|
+
return await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
14
15
|
.mutation((0, graphql_tag_1.default) `
|
|
15
16
|
mutation DeleteUpdateGroup($group: ID!) {
|
|
16
17
|
update {
|
|
@@ -25,6 +26,7 @@ async function deleteUpdateGroupAsync({ group, }) {
|
|
|
25
26
|
class UpdateDelete extends EasCommand_1.default {
|
|
26
27
|
async runAsync() {
|
|
27
28
|
const { args: { groupId: group }, flags: { json: jsonFlag, 'non-interactive': nonInteractive }, } = await this.parse(UpdateDelete);
|
|
29
|
+
const { loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdateDelete, { nonInteractive });
|
|
28
30
|
if (jsonFlag) {
|
|
29
31
|
(0, json_1.enableJsonOutput)();
|
|
30
32
|
}
|
|
@@ -41,7 +43,7 @@ class UpdateDelete extends EasCommand_1.default {
|
|
|
41
43
|
return;
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
|
-
await deleteUpdateGroupAsync({ group });
|
|
46
|
+
await deleteUpdateGroupAsync(graphqlClient, { group });
|
|
45
47
|
if (jsonFlag) {
|
|
46
48
|
(0, json_1.printJsonOnlyOutput)({ group });
|
|
47
49
|
}
|
|
@@ -51,6 +53,7 @@ class UpdateDelete extends EasCommand_1.default {
|
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
exports.default = UpdateDelete;
|
|
56
|
+
_a = UpdateDelete;
|
|
54
57
|
UpdateDelete.description = 'delete all the updates in an update group';
|
|
55
58
|
UpdateDelete.args = [
|
|
56
59
|
{
|
|
@@ -62,3 +65,6 @@ UpdateDelete.args = [
|
|
|
62
65
|
UpdateDelete.flags = {
|
|
63
66
|
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
64
67
|
};
|
|
68
|
+
UpdateDelete.contextDefinition = {
|
|
69
|
+
..._a.ContextOptions.LoggedIn,
|
|
70
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
3
|
import { ViewBranchQueryVariables } from '../../graphql/generated';
|
|
3
4
|
import { PublishPlatform } from '../../project/publish';
|
|
4
5
|
export declare const defaultPublishPlatforms: PublishPlatform[];
|
|
5
6
|
export declare type PublishPlatformFlag = PublishPlatform | 'all';
|
|
6
|
-
export declare function ensureBranchExistsAsync({ appId, name: branchName
|
|
7
|
+
export declare function ensureBranchExistsAsync(graphqlClient: ExpoGraphqlClient, { appId, name: branchName }: ViewBranchQueryVariables): Promise<{
|
|
7
8
|
branchId: string;
|
|
8
9
|
}>;
|
|
9
10
|
export default class UpdatePublish extends EasCommand {
|
|
@@ -22,6 +23,7 @@ export default class UpdatePublish extends EasCommand {
|
|
|
22
23
|
'private-key-path': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
23
24
|
};
|
|
24
25
|
static contextDefinition: {
|
|
26
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
25
27
|
getDynamicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicProjectConfigContextField;
|
|
26
28
|
};
|
|
27
29
|
runAsync(): Promise<void>;
|
|
@@ -37,10 +37,10 @@ const vcs_1 = require("../../vcs");
|
|
|
37
37
|
const create_1 = require("../branch/create");
|
|
38
38
|
const create_2 = require("../channel/create");
|
|
39
39
|
exports.defaultPublishPlatforms = ['android', 'ios'];
|
|
40
|
-
async function ensureChannelExistsAsync({ appId, branchId, channelName, }) {
|
|
40
|
+
async function ensureChannelExistsAsync(graphqlClient, { appId, branchId, channelName, }) {
|
|
41
41
|
var _b;
|
|
42
42
|
try {
|
|
43
|
-
await (0, create_2.createUpdateChannelOnAppAsync)({
|
|
43
|
+
await (0, create_2.createUpdateChannelOnAppAsync)(graphqlClient, {
|
|
44
44
|
appId,
|
|
45
45
|
channelName,
|
|
46
46
|
branchId,
|
|
@@ -55,21 +55,24 @@ async function ensureChannelExistsAsync({ appId, branchId, channelName, }) {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
async function ensureBranchExistsAsync({ appId, name: branchName
|
|
58
|
+
async function ensureBranchExistsAsync(graphqlClient, { appId, name: branchName }) {
|
|
59
59
|
try {
|
|
60
|
-
const updateBranch = await BranchQuery_1.BranchQuery.getBranchByNameAsync({
|
|
60
|
+
const updateBranch = await BranchQuery_1.BranchQuery.getBranchByNameAsync(graphqlClient, {
|
|
61
61
|
appId,
|
|
62
62
|
name: branchName,
|
|
63
63
|
});
|
|
64
64
|
const { id } = updateBranch;
|
|
65
|
-
await ensureChannelExistsAsync({ appId, branchId: id, channelName: branchName });
|
|
65
|
+
await ensureChannelExistsAsync(graphqlClient, { appId, branchId: id, channelName: branchName });
|
|
66
66
|
return { branchId: id };
|
|
67
67
|
}
|
|
68
68
|
catch (error) {
|
|
69
69
|
if (error instanceof utils_1.BranchNotFoundError) {
|
|
70
|
-
const newUpdateBranch = await (0, create_1.createUpdateBranchOnAppAsync)(
|
|
70
|
+
const newUpdateBranch = await (0, create_1.createUpdateBranchOnAppAsync)(graphqlClient, {
|
|
71
|
+
appId,
|
|
72
|
+
name: branchName,
|
|
73
|
+
});
|
|
71
74
|
log_1.default.withTick(`Created branch: ${chalk_1.default.bold(branchName)}`);
|
|
72
|
-
await ensureChannelExistsAsync({
|
|
75
|
+
await ensureChannelExistsAsync(graphqlClient, {
|
|
73
76
|
appId,
|
|
74
77
|
branchId: newUpdateBranch.id,
|
|
75
78
|
channelName: branchName,
|
|
@@ -88,7 +91,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
88
91
|
const { flags } = await this.parse(UpdatePublish);
|
|
89
92
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
|
|
90
93
|
let { branch: branchName, auto: autoFlag, message, republish, group, 'input-dir': inputDir, 'skip-bundler': skipBundler, platform, 'private-key-path': privateKeyPath, 'non-interactive': nonInteractive, json: jsonFlag, } = flags;
|
|
91
|
-
const { getDynamicProjectConfigAsync } = await this.getContextAsync(UpdatePublish, {
|
|
94
|
+
const { getDynamicProjectConfigAsync, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdatePublish, {
|
|
92
95
|
nonInteractive,
|
|
93
96
|
});
|
|
94
97
|
if (jsonFlag) {
|
|
@@ -103,7 +106,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
103
106
|
const { exp: expPrivate } = await getDynamicProjectConfigAsync({
|
|
104
107
|
isPublicConfig: false,
|
|
105
108
|
});
|
|
106
|
-
await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)([generated_1.StatuspageServiceName.EasUpdate]);
|
|
109
|
+
await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)(graphqlClient, [generated_1.StatuspageServiceName.EasUpdate]);
|
|
107
110
|
const codeSigningInfo = await (0, code_signing_1.getCodeSigningInfoAsync)(expPrivate, privateKeyPath);
|
|
108
111
|
const hasExpoUpdates = (0, projectUtils_1.isExpoUpdatesInstalledOrAvailable)(projectDir, exp.sdkVersion);
|
|
109
112
|
if (!hasExpoUpdates && nonInteractive) {
|
|
@@ -134,7 +137,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
134
137
|
}
|
|
135
138
|
else {
|
|
136
139
|
try {
|
|
137
|
-
const branch = await (0, queries_1.selectBranchOnAppAsync)({
|
|
140
|
+
const branch = await (0, queries_1.selectBranchOnAppAsync)(graphqlClient, {
|
|
138
141
|
projectId,
|
|
139
142
|
promptTitle: `Which branch would you like to ${republish ? 'republish' : 'publish'} on?`,
|
|
140
143
|
displayTextForListItem: updateBranch => `${updateBranch.name} ${chalk_1.default.grey(`- current update: ${(0, utils_2.formatUpdateMessage)(updateBranch.updates[0])}`)}`,
|
|
@@ -164,14 +167,16 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
164
167
|
// Instead we get the `updateInfoGroup` from the update we wish to republish.
|
|
165
168
|
let updatesToRepublish;
|
|
166
169
|
if (group) {
|
|
167
|
-
const updatesByGroup = await UpdateQuery_1.UpdateQuery.viewUpdateGroupAsync({
|
|
170
|
+
const updatesByGroup = await UpdateQuery_1.UpdateQuery.viewUpdateGroupAsync(graphqlClient, {
|
|
171
|
+
groupId: group,
|
|
172
|
+
});
|
|
168
173
|
updatesToRepublish = updatesByGroup;
|
|
169
174
|
}
|
|
170
175
|
else {
|
|
171
176
|
if (nonInteractive) {
|
|
172
177
|
throw new Error('Must supply --group when in non-interactive mode');
|
|
173
178
|
}
|
|
174
|
-
updatesToRepublish = await (0, queries_2.selectUpdateGroupOnBranchAsync)({
|
|
179
|
+
updatesToRepublish = await (0, queries_2.selectUpdateGroupOnBranchAsync)(graphqlClient, {
|
|
175
180
|
projectId,
|
|
176
181
|
branchName,
|
|
177
182
|
paginatedQueryOptions,
|
|
@@ -258,7 +263,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
258
263
|
try {
|
|
259
264
|
const platforms = platformFlag === 'all' ? exports.defaultPublishPlatforms : [platformFlag];
|
|
260
265
|
const assets = await (0, publish_1.collectAssetsAsync)({ inputDir: inputDir, platforms });
|
|
261
|
-
const uploadResults = await (0, publish_1.uploadAssetsAsync)(assets, projectId, (totalAssets, missingAssets) => {
|
|
266
|
+
const uploadResults = await (0, publish_1.uploadAssetsAsync)(graphqlClient, assets, projectId, (totalAssets, missingAssets) => {
|
|
262
267
|
assetSpinner.text = `Uploading assets. Finished (${totalAssets - missingAssets}/${totalAssets})`;
|
|
263
268
|
});
|
|
264
269
|
uploadedAssetCount = uploadResults.uniqueUploadedAssetCount;
|
|
@@ -281,7 +286,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
281
286
|
.filter(pair => pair[1] === runtime)
|
|
282
287
|
.map(pair => pair[0]);
|
|
283
288
|
}
|
|
284
|
-
const { branchId } = await ensureBranchExistsAsync({
|
|
289
|
+
const { branchId } = await ensureBranchExistsAsync(graphqlClient, {
|
|
285
290
|
appId: projectId,
|
|
286
291
|
name: branchName,
|
|
287
292
|
});
|
|
@@ -305,7 +310,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
305
310
|
let newUpdates;
|
|
306
311
|
const publishSpinner = (0, ora_1.ora)('Publishing...').start();
|
|
307
312
|
try {
|
|
308
|
-
newUpdates = await PublishMutation_1.PublishMutation.publishUpdateGroupAsync(updateGroups);
|
|
313
|
+
newUpdates = await PublishMutation_1.PublishMutation.publishUpdateGroupAsync(graphqlClient, updateGroups);
|
|
309
314
|
if (codeSigningInfo) {
|
|
310
315
|
log_1.default.log('🔒 Signing updates');
|
|
311
316
|
const updatesTemp = [...newUpdates];
|
|
@@ -325,7 +330,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
325
330
|
const manifestBody = (0, nullthrows_1.default)(await (0, code_signing_1.getManifestBodyAsync)(response));
|
|
326
331
|
(0, code_signing_1.checkManifestBodyAgainstUpdateInfoGroup)(manifestBody, (0, nullthrows_1.default)(updateGroup.updateInfoGroup[newUpdate.platform]));
|
|
327
332
|
const manifestSignature = (0, code_signing_1.signManifestBody)(manifestBody, codeSigningInfo);
|
|
328
|
-
await PublishMutation_1.PublishMutation.setCodeSigningInfoAsync(newUpdate.id, {
|
|
333
|
+
await PublishMutation_1.PublishMutation.setCodeSigningInfoAsync(graphqlClient, newUpdate.id, {
|
|
329
334
|
alg: codeSigningInfo.codeSigningMetadata.alg,
|
|
330
335
|
keyid: codeSigningInfo.codeSigningMetadata.keyid,
|
|
331
336
|
sig: manifestSignature,
|
|
@@ -358,7 +363,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
358
363
|
const newIosUpdate = newUpdatesForRuntimeVersion.find(update => update.platform === 'ios');
|
|
359
364
|
const updateGroupId = newUpdatesForRuntimeVersion[0].group;
|
|
360
365
|
const projectName = exp.slug;
|
|
361
|
-
const accountName = (await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId)).name;
|
|
366
|
+
const accountName = (await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId)).name;
|
|
362
367
|
const updateGroupUrl = (0, url_1.getUpdateGroupUrl)(accountName, projectName, updateGroupId);
|
|
363
368
|
const updateGroupLink = (0, log_1.link)(updateGroupUrl, { dim: false });
|
|
364
369
|
log_1.default.log((0, formatFields_1.default)([
|
|
@@ -433,6 +438,7 @@ UpdatePublish.flags = {
|
|
|
433
438
|
};
|
|
434
439
|
UpdatePublish.contextDefinition = {
|
|
435
440
|
..._a.ContextOptions.DynamicProjectConfig,
|
|
441
|
+
..._a.ContextOptions.LoggedIn,
|
|
436
442
|
};
|
|
437
443
|
async function getRuntimeVersionObjectAsync(exp, platformFlag, projectDir) {
|
|
438
444
|
var _b, _c;
|
|
@@ -10,6 +10,7 @@ export default class UpdateList extends EasCommand {
|
|
|
10
10
|
all: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
};
|
|
12
12
|
static contextDefinition: {
|
|
13
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
13
14
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
14
15
|
};
|
|
15
16
|
runAsync(): Promise<void>;
|
|
@@ -13,7 +13,7 @@ class UpdateList extends EasCommand_1.default {
|
|
|
13
13
|
async runAsync() {
|
|
14
14
|
const { flags } = await this.parse(UpdateList);
|
|
15
15
|
const { branch: branchFlag, all, json: jsonFlag, 'non-interactive': nonInteractive } = flags;
|
|
16
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(UpdateList, {
|
|
16
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdateList, {
|
|
17
17
|
nonInteractive,
|
|
18
18
|
});
|
|
19
19
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
|
|
@@ -21,11 +21,11 @@ class UpdateList extends EasCommand_1.default {
|
|
|
21
21
|
(0, json_1.enableJsonOutput)();
|
|
22
22
|
}
|
|
23
23
|
if (all) {
|
|
24
|
-
(0, queries_2.listAndRenderUpdateGroupsOnAppAsync)({ projectId, paginatedQueryOptions });
|
|
24
|
+
(0, queries_2.listAndRenderUpdateGroupsOnAppAsync)(graphqlClient, { projectId, paginatedQueryOptions });
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
27
|
if (branchFlag) {
|
|
28
|
-
(0, queries_2.listAndRenderUpdateGroupsOnBranchAsync)({
|
|
28
|
+
(0, queries_2.listAndRenderUpdateGroupsOnBranchAsync)(graphqlClient, {
|
|
29
29
|
projectId,
|
|
30
30
|
branchName: branchFlag,
|
|
31
31
|
paginatedQueryOptions,
|
|
@@ -36,7 +36,7 @@ class UpdateList extends EasCommand_1.default {
|
|
|
36
36
|
if (nonInteractive) {
|
|
37
37
|
throw new Error(validationMessage);
|
|
38
38
|
}
|
|
39
|
-
const selectedBranch = await (0, queries_1.selectBranchOnAppAsync)({
|
|
39
|
+
const selectedBranch = await (0, queries_1.selectBranchOnAppAsync)(graphqlClient, {
|
|
40
40
|
projectId,
|
|
41
41
|
promptTitle: 'Which branch would you like to view?',
|
|
42
42
|
displayTextForListItem: updateBranch => updateBranch.name,
|
|
@@ -48,7 +48,7 @@ class UpdateList extends EasCommand_1.default {
|
|
|
48
48
|
offset: 0,
|
|
49
49
|
},
|
|
50
50
|
});
|
|
51
|
-
(0, queries_2.listAndRenderUpdateGroupsOnBranchAsync)({
|
|
51
|
+
(0, queries_2.listAndRenderUpdateGroupsOnBranchAsync)(graphqlClient, {
|
|
52
52
|
projectId,
|
|
53
53
|
branchName: selectedBranch.name,
|
|
54
54
|
paginatedQueryOptions,
|
|
@@ -76,4 +76,5 @@ UpdateList.flags = {
|
|
|
76
76
|
};
|
|
77
77
|
UpdateList.contextDefinition = {
|
|
78
78
|
..._a.ContextOptions.ProjectConfig,
|
|
79
|
+
..._a.ContextOptions.LoggedIn,
|
|
79
80
|
};
|
|
@@ -9,5 +9,8 @@ export default class UpdateView extends EasCommand {
|
|
|
9
9
|
static flags: {
|
|
10
10
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
};
|
|
12
|
+
static contextDefinition: {
|
|
13
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
14
|
+
};
|
|
12
15
|
runAsync(): Promise<void>;
|
|
13
16
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
@@ -13,10 +14,11 @@ const json_1 = require("../../utils/json");
|
|
|
13
14
|
class UpdateView extends EasCommand_1.default {
|
|
14
15
|
async runAsync() {
|
|
15
16
|
const { args: { groupId }, flags: { json: jsonFlag }, } = await this.parse(UpdateView);
|
|
17
|
+
const { loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdateView, { nonInteractive: true });
|
|
16
18
|
if (jsonFlag) {
|
|
17
19
|
(0, json_1.enableJsonOutput)();
|
|
18
20
|
}
|
|
19
|
-
const updatesByGroup = await UpdateQuery_1.UpdateQuery.viewUpdateGroupAsync({ groupId });
|
|
21
|
+
const updatesByGroup = await UpdateQuery_1.UpdateQuery.viewUpdateGroupAsync(graphqlClient, { groupId });
|
|
20
22
|
const [updateGroupDescription] = (0, utils_1.getUpdateGroupDescriptions)([updatesByGroup]);
|
|
21
23
|
if (jsonFlag) {
|
|
22
24
|
(0, json_1.printJsonOnlyOutput)(updateGroupDescription);
|
|
@@ -39,6 +41,7 @@ class UpdateView extends EasCommand_1.default {
|
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
exports.default = UpdateView;
|
|
44
|
+
_a = UpdateView;
|
|
42
45
|
UpdateView.description = 'update group details';
|
|
43
46
|
UpdateView.args = [
|
|
44
47
|
{
|
|
@@ -50,3 +53,6 @@ UpdateView.args = [
|
|
|
50
53
|
UpdateView.flags = {
|
|
51
54
|
...flags_1.EasJsonOnlyFlag,
|
|
52
55
|
};
|
|
56
|
+
UpdateView.contextDefinition = {
|
|
57
|
+
..._a.ContextOptions.LoggedIn,
|
|
58
|
+
};
|
|
@@ -9,6 +9,7 @@ export default class WebhookCreate extends EasCommand {
|
|
|
9
9
|
secret: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
10
10
|
};
|
|
11
11
|
static contextDefinition: {
|
|
12
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
12
13
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
13
14
|
};
|
|
14
15
|
runAsync(): Promise<void>;
|