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
|
@@ -12,6 +12,7 @@ export default class ChannelDelete extends EasCommand {
|
|
|
12
12
|
'non-interactive': 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>;
|
|
@@ -14,7 +14,7 @@ const json_1 = require("../../utils/json");
|
|
|
14
14
|
class ChannelDelete extends EasCommand_1.default {
|
|
15
15
|
async runAsync() {
|
|
16
16
|
const { args: { name: nameArg }, flags: { json: jsonFlag, 'non-interactive': nonInteractive }, } = await this.parse(ChannelDelete);
|
|
17
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(ChannelDelete, {
|
|
17
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(ChannelDelete, {
|
|
18
18
|
nonInteractive,
|
|
19
19
|
});
|
|
20
20
|
if (jsonFlag) {
|
|
@@ -22,7 +22,7 @@ class ChannelDelete extends EasCommand_1.default {
|
|
|
22
22
|
}
|
|
23
23
|
let channelId, channelName;
|
|
24
24
|
if (nameArg) {
|
|
25
|
-
const { id, name } = await ChannelQuery_1.ChannelQuery.viewUpdateChannelAsync({
|
|
25
|
+
const { id, name } = await ChannelQuery_1.ChannelQuery.viewUpdateChannelAsync(graphqlClient, {
|
|
26
26
|
appId: projectId,
|
|
27
27
|
channelName: nameArg,
|
|
28
28
|
});
|
|
@@ -33,7 +33,7 @@ class ChannelDelete extends EasCommand_1.default {
|
|
|
33
33
|
if (nonInteractive) {
|
|
34
34
|
throw new Error('Channel name must be set when running in non-interactive mode');
|
|
35
35
|
}
|
|
36
|
-
const { id, name } = await (0, queries_1.selectChannelOnAppAsync)({
|
|
36
|
+
const { id, name } = await (0, queries_1.selectChannelOnAppAsync)(graphqlClient, {
|
|
37
37
|
projectId,
|
|
38
38
|
selectionPromptTitle: 'Select a channel to delete',
|
|
39
39
|
paginatedQueryOptions: {
|
|
@@ -55,7 +55,7 @@ class ChannelDelete extends EasCommand_1.default {
|
|
|
55
55
|
process.exit(1);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
const deletionResult = await deleteChannelOnAppAsync({
|
|
58
|
+
const deletionResult = await deleteChannelOnAppAsync(graphqlClient, {
|
|
59
59
|
channelId,
|
|
60
60
|
});
|
|
61
61
|
if (jsonFlag) {
|
|
@@ -82,9 +82,10 @@ ChannelDelete.flags = {
|
|
|
82
82
|
};
|
|
83
83
|
ChannelDelete.contextDefinition = {
|
|
84
84
|
..._a.ContextOptions.ProjectConfig,
|
|
85
|
+
..._a.ContextOptions.LoggedIn,
|
|
85
86
|
};
|
|
86
|
-
async function deleteChannelOnAppAsync({ channelId
|
|
87
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
87
|
+
async function deleteChannelOnAppAsync(graphqlClient, { channelId }) {
|
|
88
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
88
89
|
.mutation((0, graphql_tag_1.default) `
|
|
89
90
|
mutation DeleteUpdateChannel($channelId: ID!) {
|
|
90
91
|
updateChannel {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
3
|
import { UpdateChannelBranchMappingMutation, UpdateChannelBranchMappingMutationVariables } from '../../graphql/generated';
|
|
3
|
-
export declare function updateChannelBranchMappingAsync({ channelId, branchMapping
|
|
4
|
+
export declare function updateChannelBranchMappingAsync(graphqlClient: ExpoGraphqlClient, { channelId, branchMapping }: UpdateChannelBranchMappingMutationVariables): Promise<UpdateChannelBranchMappingMutation['updateChannel']['editUpdateChannel']>;
|
|
4
5
|
export default class ChannelEdit extends EasCommand {
|
|
5
6
|
static description: string;
|
|
6
7
|
static args: {
|
|
@@ -14,6 +15,7 @@ export default class ChannelEdit extends EasCommand {
|
|
|
14
15
|
branch: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
15
16
|
};
|
|
16
17
|
static contextDefinition: {
|
|
18
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
17
19
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
18
20
|
};
|
|
19
21
|
runAsync(): Promise<void>;
|
|
@@ -15,8 +15,8 @@ const BranchQuery_1 = require("../../graphql/queries/BranchQuery");
|
|
|
15
15
|
const ChannelQuery_1 = require("../../graphql/queries/ChannelQuery");
|
|
16
16
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
17
17
|
const json_1 = require("../../utils/json");
|
|
18
|
-
async function updateChannelBranchMappingAsync({ channelId, branchMapping
|
|
19
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
18
|
+
async function updateChannelBranchMappingAsync(graphqlClient, { channelId, branchMapping }) {
|
|
19
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
20
20
|
.mutation((0, graphql_tag_1.default) `
|
|
21
21
|
mutation UpdateChannelBranchMapping($channelId: ID!, $branchMapping: String!) {
|
|
22
22
|
updateChannel {
|
|
@@ -39,15 +39,18 @@ exports.updateChannelBranchMappingAsync = updateChannelBranchMappingAsync;
|
|
|
39
39
|
class ChannelEdit extends EasCommand_1.default {
|
|
40
40
|
async runAsync() {
|
|
41
41
|
const { args, flags: { branch: branchFlag, json, 'non-interactive': nonInteractive }, } = await this.parse(ChannelEdit);
|
|
42
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(ChannelEdit, {
|
|
42
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(ChannelEdit, {
|
|
43
43
|
nonInteractive,
|
|
44
44
|
});
|
|
45
45
|
if (json) {
|
|
46
46
|
(0, json_1.enableJsonOutput)();
|
|
47
47
|
}
|
|
48
48
|
const existingChannel = args.name
|
|
49
|
-
? await ChannelQuery_1.ChannelQuery.viewUpdateChannelAsync(
|
|
50
|
-
|
|
49
|
+
? await ChannelQuery_1.ChannelQuery.viewUpdateChannelAsync(graphqlClient, {
|
|
50
|
+
appId: projectId,
|
|
51
|
+
channelName: args.name,
|
|
52
|
+
})
|
|
53
|
+
: await (0, queries_2.selectChannelOnAppAsync)(graphqlClient, {
|
|
51
54
|
projectId,
|
|
52
55
|
selectionPromptTitle: 'Select a channel to edit',
|
|
53
56
|
paginatedQueryOptions: { json, nonInteractive, offset: 0 },
|
|
@@ -56,11 +59,11 @@ class ChannelEdit extends EasCommand_1.default {
|
|
|
56
59
|
throw new Error('There is a rollout in progress. Manage it with "channel:rollout" instead.');
|
|
57
60
|
}
|
|
58
61
|
const branch = branchFlag
|
|
59
|
-
? await BranchQuery_1.BranchQuery.getBranchByNameAsync({
|
|
62
|
+
? await BranchQuery_1.BranchQuery.getBranchByNameAsync(graphqlClient, {
|
|
60
63
|
appId: projectId,
|
|
61
64
|
name: branchFlag,
|
|
62
65
|
})
|
|
63
|
-
: await (0, queries_1.selectBranchOnAppAsync)({
|
|
66
|
+
: await (0, queries_1.selectBranchOnAppAsync)(graphqlClient, {
|
|
64
67
|
projectId,
|
|
65
68
|
promptTitle: `Which branch would you like ${existingChannel.name} to point at?`,
|
|
66
69
|
displayTextForListItem: updateBranch => updateBranch.name,
|
|
@@ -70,7 +73,7 @@ class ChannelEdit extends EasCommand_1.default {
|
|
|
70
73
|
offset: 0,
|
|
71
74
|
},
|
|
72
75
|
});
|
|
73
|
-
const channel = await updateChannelBranchMappingAsync({
|
|
76
|
+
const channel = await updateChannelBranchMappingAsync(graphqlClient, {
|
|
74
77
|
channelId: existingChannel.id,
|
|
75
78
|
// todo: move branch mapping logic to utility
|
|
76
79
|
branchMapping: JSON.stringify({
|
|
@@ -106,4 +109,5 @@ ChannelEdit.flags = {
|
|
|
106
109
|
};
|
|
107
110
|
ChannelEdit.contextDefinition = {
|
|
108
111
|
..._a.ContextOptions.ProjectConfig,
|
|
112
|
+
..._a.ContextOptions.LoggedIn,
|
|
109
113
|
};
|
|
@@ -8,6 +8,7 @@ export default class ChannelList extends EasCommand {
|
|
|
8
8
|
offset: import("@oclif/core/lib/interfaces").OptionFlag<number | 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,13 +12,13 @@ class ChannelList extends EasCommand_1.default {
|
|
|
12
12
|
const { flags } = await this.parse(ChannelList);
|
|
13
13
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
|
|
14
14
|
const { json: jsonFlag, 'non-interactive': nonInteractive } = flags;
|
|
15
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(ChannelList, {
|
|
15
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(ChannelList, {
|
|
16
16
|
nonInteractive,
|
|
17
17
|
});
|
|
18
18
|
if (jsonFlag) {
|
|
19
19
|
(0, json_1.enableJsonOutput)();
|
|
20
20
|
}
|
|
21
|
-
await (0, queries_1.listAndRenderChannelsOnAppAsync)({
|
|
21
|
+
await (0, queries_1.listAndRenderChannelsOnAppAsync)(graphqlClient, {
|
|
22
22
|
projectId,
|
|
23
23
|
paginatedQueryOptions,
|
|
24
24
|
});
|
|
@@ -34,4 +34,5 @@ ChannelList.flags = {
|
|
|
34
34
|
};
|
|
35
35
|
ChannelList.contextDefinition = {
|
|
36
36
|
..._a.ContextOptions.ProjectConfig,
|
|
37
|
+
..._a.ContextOptions.LoggedIn,
|
|
37
38
|
};
|
|
@@ -15,6 +15,7 @@ export default class ChannelRollout extends EasCommand {
|
|
|
15
15
|
end: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
16
|
};
|
|
17
17
|
static contextDefinition: {
|
|
18
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
18
19
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
19
20
|
};
|
|
20
21
|
runAsync(): Promise<void>;
|
|
@@ -43,8 +43,8 @@ function getRolloutInfo(channel) {
|
|
|
43
43
|
const currentPercent = 100 * branchMapping.data[0].branchMappingLogic.operand;
|
|
44
44
|
return { newBranch, oldBranch, currentPercent };
|
|
45
45
|
}
|
|
46
|
-
async function startRolloutAsync({ channelName, branchName, percent, projectId, displayName, currentBranchMapping, channel, nonInteractive, }) {
|
|
47
|
-
const branch = await BranchQuery_1.BranchQuery.getBranchByNameAsync({
|
|
46
|
+
async function startRolloutAsync(graphqlClient, { channelName, branchName, percent, projectId, displayName, currentBranchMapping, channel, nonInteractive, }) {
|
|
47
|
+
const branch = await BranchQuery_1.BranchQuery.getBranchByNameAsync(graphqlClient, {
|
|
48
48
|
appId: projectId,
|
|
49
49
|
name: branchName,
|
|
50
50
|
});
|
|
@@ -73,7 +73,7 @@ async function startRolloutAsync({ channelName, branchName, percent, projectId,
|
|
|
73
73
|
currentBranchMapping.data[0],
|
|
74
74
|
],
|
|
75
75
|
};
|
|
76
|
-
const newChannelInfo = await (0, edit_1.updateChannelBranchMappingAsync)({
|
|
76
|
+
const newChannelInfo = await (0, edit_1.updateChannelBranchMappingAsync)(graphqlClient, {
|
|
77
77
|
channelId: channel.id,
|
|
78
78
|
branchMapping: JSON.stringify(newBranchMapping),
|
|
79
79
|
});
|
|
@@ -84,7 +84,7 @@ async function startRolloutAsync({ channelName, branchName, percent, projectId,
|
|
|
84
84
|
const logMessage = `️Started a rollout of branch ${chalk_1.default.bold(branchName)} onto channel ${chalk_1.default.bold(channelName)}! ${chalk_1.default.bold(percent)}% of users will be directed to branch ${chalk_1.default.bold(branchName)}, ${chalk_1.default.bold(100 - percent)}% to branch ${chalk_1.default.bold(oldBranch.name)}.`;
|
|
85
85
|
return { newChannelInfo, logMessage };
|
|
86
86
|
}
|
|
87
|
-
async function editRolloutAsync({ channelName, percent, nonInteractive, currentBranchMapping, channel, }) {
|
|
87
|
+
async function editRolloutAsync(graphqlClient, { channelName, percent, nonInteractive, currentBranchMapping, channel, }) {
|
|
88
88
|
const { newBranch, oldBranch, currentPercent } = getRolloutInfo(channel);
|
|
89
89
|
if (percent == null) {
|
|
90
90
|
if (nonInteractive) {
|
|
@@ -95,19 +95,19 @@ async function editRolloutAsync({ channelName, percent, nonInteractive, currentB
|
|
|
95
95
|
}
|
|
96
96
|
const newBranchMapping = { ...currentBranchMapping };
|
|
97
97
|
newBranchMapping.data[0].branchMappingLogic.operand = percent / 100;
|
|
98
|
-
const newChannelInfo = await (0, edit_1.updateChannelBranchMappingAsync)({
|
|
98
|
+
const newChannelInfo = await (0, edit_1.updateChannelBranchMappingAsync)(graphqlClient, {
|
|
99
99
|
channelId: channel.id,
|
|
100
100
|
branchMapping: JSON.stringify(newBranchMapping),
|
|
101
101
|
});
|
|
102
102
|
const logMessage = `️Rollout of branch ${chalk_1.default.bold(newBranch.name)} onto channel ${chalk_1.default.bold(channelName)} updated from ${chalk_1.default.bold(currentPercent)}% to ${chalk_1.default.bold(percent)}%. ${chalk_1.default.bold(percent)}% of users will be directed to branch ${chalk_1.default.bold(newBranch.name)}, ${chalk_1.default.bold(100 - percent)}% to branch ${chalk_1.default.bold(oldBranch.name)}.`;
|
|
103
103
|
return { newChannelInfo, logMessage };
|
|
104
104
|
}
|
|
105
|
-
async function endRolloutAsync({ channelName, branchName, nonInteractive, projectId, channel, }) {
|
|
105
|
+
async function endRolloutAsync(graphqlClient, { channelName, branchName, nonInteractive, projectId, channel, }) {
|
|
106
106
|
// end rollout
|
|
107
107
|
const { newBranch, oldBranch, currentPercent } = getRolloutInfo(channel);
|
|
108
108
|
let endOnNewBranch;
|
|
109
109
|
if (branchName) {
|
|
110
|
-
const branch = await BranchQuery_1.BranchQuery.getBranchByNameAsync({
|
|
110
|
+
const branch = await BranchQuery_1.BranchQuery.getBranchByNameAsync(graphqlClient, {
|
|
111
111
|
appId: projectId,
|
|
112
112
|
name: branchName,
|
|
113
113
|
});
|
|
@@ -149,7 +149,7 @@ async function endRolloutAsync({ channelName, branchName, nonInteractive, projec
|
|
|
149
149
|
},
|
|
150
150
|
],
|
|
151
151
|
};
|
|
152
|
-
const newChannelInfo = await (0, edit_1.updateChannelBranchMappingAsync)({
|
|
152
|
+
const newChannelInfo = await (0, edit_1.updateChannelBranchMappingAsync)(graphqlClient, {
|
|
153
153
|
channelId: channel.id,
|
|
154
154
|
branchMapping: JSON.stringify(newBranchMapping),
|
|
155
155
|
});
|
|
@@ -159,14 +159,14 @@ async function endRolloutAsync({ channelName, branchName, nonInteractive, projec
|
|
|
159
159
|
class ChannelRollout extends EasCommand_1.default {
|
|
160
160
|
async runAsync() {
|
|
161
161
|
const { args: { channel: channelName }, flags: { json: jsonFlag, end: endFlag, branch: branchName, percent, 'non-interactive': nonInteractive, }, } = await this.parse(ChannelRollout);
|
|
162
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(ChannelRollout, {
|
|
162
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(ChannelRollout, {
|
|
163
163
|
nonInteractive,
|
|
164
164
|
});
|
|
165
165
|
if (jsonFlag) {
|
|
166
166
|
(0, json_1.enableJsonOutput)();
|
|
167
167
|
}
|
|
168
|
-
const projectDisplayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(projectId);
|
|
169
|
-
const channel = await ChannelQuery_1.ChannelQuery.viewUpdateChannelAsync({
|
|
168
|
+
const projectDisplayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId);
|
|
169
|
+
const channel = await ChannelQuery_1.ChannelQuery.viewUpdateChannelAsync(graphqlClient, {
|
|
170
170
|
appId: projectId,
|
|
171
171
|
channelName: channelName,
|
|
172
172
|
});
|
|
@@ -193,7 +193,7 @@ class ChannelRollout extends EasCommand_1.default {
|
|
|
193
193
|
*/
|
|
194
194
|
let rolloutMutationResult;
|
|
195
195
|
if (!isRollout) {
|
|
196
|
-
rolloutMutationResult = await startRolloutAsync({
|
|
196
|
+
rolloutMutationResult = await startRolloutAsync(graphqlClient, {
|
|
197
197
|
channelName,
|
|
198
198
|
branchName: branchName !== null && branchName !== void 0 ? branchName : (await promptForBranchNameAsync(channelName, nonInteractive)),
|
|
199
199
|
percent,
|
|
@@ -205,7 +205,7 @@ class ChannelRollout extends EasCommand_1.default {
|
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
else if (endFlag) {
|
|
208
|
-
rolloutMutationResult = await endRolloutAsync({
|
|
208
|
+
rolloutMutationResult = await endRolloutAsync(graphqlClient, {
|
|
209
209
|
channelName,
|
|
210
210
|
branchName,
|
|
211
211
|
nonInteractive,
|
|
@@ -214,7 +214,7 @@ class ChannelRollout extends EasCommand_1.default {
|
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
else {
|
|
217
|
-
rolloutMutationResult = await editRolloutAsync({
|
|
217
|
+
rolloutMutationResult = await editRolloutAsync(graphqlClient, {
|
|
218
218
|
channelName,
|
|
219
219
|
percent,
|
|
220
220
|
nonInteractive,
|
|
@@ -262,6 +262,7 @@ ChannelRollout.flags = {
|
|
|
262
262
|
};
|
|
263
263
|
ChannelRollout.contextDefinition = {
|
|
264
264
|
..._a.ContextOptions.ProjectConfig,
|
|
265
|
+
..._a.ContextOptions.LoggedIn,
|
|
265
266
|
};
|
|
266
267
|
async function promptForBranchNameAsync(channelName, nonInteractive) {
|
|
267
268
|
if (nonInteractive) {
|
|
@@ -13,6 +13,7 @@ export default class ChannelView extends EasCommand {
|
|
|
13
13
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
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>;
|
|
@@ -13,7 +13,7 @@ class ChannelView extends EasCommand_1.default {
|
|
|
13
13
|
let { args: { name: channelName }, flags, } = await this.parse(ChannelView);
|
|
14
14
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
|
|
15
15
|
const { json: jsonFlag, 'non-interactive': nonInteractive } = flags;
|
|
16
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(ChannelView, {
|
|
16
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(ChannelView, {
|
|
17
17
|
nonInteractive,
|
|
18
18
|
});
|
|
19
19
|
if (jsonFlag) {
|
|
@@ -24,7 +24,7 @@ class ChannelView extends EasCommand_1.default {
|
|
|
24
24
|
if (nonInteractive) {
|
|
25
25
|
throw new Error(validationMessage);
|
|
26
26
|
}
|
|
27
|
-
const selectedUpdateChannel = await (0, queries_1.selectChannelOnAppAsync)({
|
|
27
|
+
const selectedUpdateChannel = await (0, queries_1.selectChannelOnAppAsync)(graphqlClient, {
|
|
28
28
|
projectId,
|
|
29
29
|
selectionPromptTitle: 'Select a channel to view',
|
|
30
30
|
paginatedQueryOptions: {
|
|
@@ -36,7 +36,7 @@ class ChannelView extends EasCommand_1.default {
|
|
|
36
36
|
channelName = selectedUpdateChannel.name;
|
|
37
37
|
(0, assert_1.default)(channelName, `A channel must be selected.`);
|
|
38
38
|
}
|
|
39
|
-
await (0, queries_1.listAndRenderBranchesAndUpdatesOnChannelAsync)({
|
|
39
|
+
await (0, queries_1.listAndRenderBranchesAndUpdatesOnChannelAsync)(graphqlClient, {
|
|
40
40
|
projectId,
|
|
41
41
|
channelName,
|
|
42
42
|
paginatedQueryOptions,
|
|
@@ -59,4 +59,5 @@ ChannelView.flags = {
|
|
|
59
59
|
};
|
|
60
60
|
ChannelView.contextDefinition = {
|
|
61
61
|
..._a.ContextOptions.ProjectConfig,
|
|
62
|
+
..._a.ContextOptions.LoggedIn,
|
|
62
63
|
};
|
|
@@ -6,7 +6,7 @@ export default class Credentials extends EasCommand {
|
|
|
6
6
|
};
|
|
7
7
|
static contextDefinition: {
|
|
8
8
|
projectConfig: import("../commandUtils/context/OptionalProjectConfigContextField").OptionalProjectConfigContextField;
|
|
9
|
-
|
|
9
|
+
loggedIn: import("../commandUtils/context/LoggedInContextField").default;
|
|
10
10
|
};
|
|
11
11
|
runAsync(): Promise<void>;
|
|
12
12
|
}
|
|
@@ -8,10 +8,10 @@ const SelectPlatform_1 = require("../credentials/manager/SelectPlatform");
|
|
|
8
8
|
class Credentials extends EasCommand_1.default {
|
|
9
9
|
async runAsync() {
|
|
10
10
|
const { flags } = await this.parse(Credentials);
|
|
11
|
-
const { actor, projectConfig } = await this.getContextAsync(Credentials, {
|
|
11
|
+
const { loggedIn: { actor, graphqlClient }, projectConfig, } = await this.getContextAsync(Credentials, {
|
|
12
12
|
nonInteractive: false,
|
|
13
13
|
});
|
|
14
|
-
await new SelectPlatform_1.SelectPlatform(actor, projectConfig !== null && projectConfig !== void 0 ? projectConfig : null, flags.platform).runAsync();
|
|
14
|
+
await new SelectPlatform_1.SelectPlatform(actor, graphqlClient, projectConfig !== null && projectConfig !== void 0 ? projectConfig : null, flags.platform).runAsync();
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
exports.default = Credentials;
|
|
@@ -3,7 +3,7 @@ export default class DeviceCreate extends EasCommand {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static contextDefinition: {
|
|
5
5
|
projectConfig: import("../../commandUtils/context/OptionalProjectConfigContextField").OptionalProjectConfigContextField;
|
|
6
|
-
|
|
6
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
7
7
|
};
|
|
8
8
|
runAsync(): Promise<void>;
|
|
9
9
|
}
|
|
@@ -9,12 +9,13 @@ const manager_1 = tslib_1.__importDefault(require("../../devices/manager"));
|
|
|
9
9
|
class DeviceCreate extends EasCommand_1.default {
|
|
10
10
|
async runAsync() {
|
|
11
11
|
// this command is interactive by design
|
|
12
|
-
const { actor, projectConfig } = await this.getContextAsync(DeviceCreate, {
|
|
12
|
+
const { loggedIn: { actor, graphqlClient }, projectConfig, } = await this.getContextAsync(DeviceCreate, {
|
|
13
13
|
nonInteractive: false,
|
|
14
14
|
});
|
|
15
15
|
const ctx = await (0, context_1.createContextAsync)({
|
|
16
16
|
appStore: new AppStoreApi_1.default(),
|
|
17
17
|
user: actor,
|
|
18
|
+
graphqlClient,
|
|
18
19
|
projectId: projectConfig === null || projectConfig === void 0 ? void 0 : projectConfig.projectId,
|
|
19
20
|
});
|
|
20
21
|
const manager = new manager_1.default(ctx);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
3
|
import { PaginatedQueryOptions } from '../../commandUtils/pagination';
|
|
3
4
|
import { AppleDeviceQueryResult } from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery';
|
|
4
5
|
import { AppleDevice, Maybe } from '../../graphql/generated';
|
|
@@ -11,12 +12,13 @@ export default class DeviceDelete extends EasCommand {
|
|
|
11
12
|
udid: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
13
|
};
|
|
13
14
|
static contextDefinition: {
|
|
15
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
14
16
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
15
17
|
};
|
|
16
18
|
runAsync(): Promise<void>;
|
|
17
19
|
shouldDisableDeviceOnAppleAsync({ nonInteractive, }: PaginatedQueryOptions): Promise<boolean>;
|
|
18
20
|
disableDeviceOnAppleAsync(device: AppleDevice | AppleDeviceQueryResult, appleTeamIdentifier: string): Promise<void>;
|
|
19
21
|
shouldRemoveDeviceFromExpoAsync({ nonInteractive, }: PaginatedQueryOptions): Promise<boolean>;
|
|
20
|
-
removeDeviceFromExpoAsync(chosenDevice: AppleDevice | AppleDeviceQueryResult): Promise<void>;
|
|
22
|
+
removeDeviceFromExpoAsync(graphqlClient: ExpoGraphqlClient, chosenDevice: AppleDevice | AppleDeviceQueryResult): Promise<void>;
|
|
21
23
|
logChosenDevice(device: AppleDevice | AppleDeviceQueryResult, appleTeamName: Maybe<string> | undefined, appleTeamIdentifier: string, { json }: PaginatedQueryOptions): void;
|
|
22
24
|
}
|
|
@@ -23,16 +23,16 @@ class DeviceDelete extends EasCommand_1.default {
|
|
|
23
23
|
const { flags } = await this.parse(DeviceDelete);
|
|
24
24
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
|
|
25
25
|
let { 'apple-team-id': appleTeamIdentifier, udid } = flags;
|
|
26
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(DeviceDelete, {
|
|
26
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(DeviceDelete, {
|
|
27
27
|
nonInteractive: paginatedQueryOptions.nonInteractive,
|
|
28
28
|
});
|
|
29
|
-
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId);
|
|
29
|
+
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
|
|
30
30
|
let appleTeamName;
|
|
31
31
|
if (paginatedQueryOptions.json) {
|
|
32
32
|
(0, json_1.enableJsonOutput)();
|
|
33
33
|
}
|
|
34
34
|
if (!appleTeamIdentifier) {
|
|
35
|
-
const appleTeam = await (0, queries_1.selectAppleTeamOnAccountAsync)({
|
|
35
|
+
const appleTeam = await (0, queries_1.selectAppleTeamOnAccountAsync)(graphqlClient, {
|
|
36
36
|
accountName: account.name,
|
|
37
37
|
selectionPromptTitle: `What Apple team would you like to list devices for?`,
|
|
38
38
|
paginatedQueryOptions,
|
|
@@ -42,8 +42,8 @@ class DeviceDelete extends EasCommand_1.default {
|
|
|
42
42
|
}
|
|
43
43
|
(0, assert_1.default)(appleTeamIdentifier, 'No team identifier is specified');
|
|
44
44
|
const chosenDevice = udid
|
|
45
|
-
? await AppleDeviceQuery_1.AppleDeviceQuery.getByDeviceIdentifierAsync(account.name, udid)
|
|
46
|
-
: await (0, queries_1.selectAppleDeviceOnAppleTeamAsync)({
|
|
45
|
+
? await AppleDeviceQuery_1.AppleDeviceQuery.getByDeviceIdentifierAsync(graphqlClient, account.name, udid)
|
|
46
|
+
: await (0, queries_1.selectAppleDeviceOnAppleTeamAsync)(graphqlClient, {
|
|
47
47
|
accountName: account.name,
|
|
48
48
|
appleTeamIdentifier,
|
|
49
49
|
selectionPromptTitle: `Which device would you like to disable?`,
|
|
@@ -53,7 +53,7 @@ class DeviceDelete extends EasCommand_1.default {
|
|
|
53
53
|
if (!(await this.shouldRemoveDeviceFromExpoAsync(paginatedQueryOptions))) {
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
-
await this.removeDeviceFromExpoAsync(chosenDevice);
|
|
56
|
+
await this.removeDeviceFromExpoAsync(graphqlClient, chosenDevice);
|
|
57
57
|
if (await this.shouldDisableDeviceOnAppleAsync(paginatedQueryOptions)) {
|
|
58
58
|
await this.disableDeviceOnAppleAsync(chosenDevice, appleTeamIdentifier);
|
|
59
59
|
}
|
|
@@ -95,10 +95,10 @@ class DeviceDelete extends EasCommand_1.default {
|
|
|
95
95
|
}
|
|
96
96
|
return true;
|
|
97
97
|
}
|
|
98
|
-
async removeDeviceFromExpoAsync(chosenDevice) {
|
|
98
|
+
async removeDeviceFromExpoAsync(graphqlClient, chosenDevice) {
|
|
99
99
|
const removalSpinner = (0, ora_1.ora)(`Removing Apple device on Expo`).start();
|
|
100
100
|
try {
|
|
101
|
-
await AppleDeviceMutation_1.AppleDeviceMutation.deleteAppleDeviceAsync(chosenDevice.id);
|
|
101
|
+
await AppleDeviceMutation_1.AppleDeviceMutation.deleteAppleDeviceAsync(graphqlClient, chosenDevice.id);
|
|
102
102
|
removalSpinner.succeed('Removed Apple device from Expo');
|
|
103
103
|
}
|
|
104
104
|
catch (err) {
|
|
@@ -130,4 +130,5 @@ DeviceDelete.flags = {
|
|
|
130
130
|
};
|
|
131
131
|
DeviceDelete.contextDefinition = {
|
|
132
132
|
..._a.ContextOptions.ProjectConfig,
|
|
133
|
+
..._a.ContextOptions.LoggedIn,
|
|
133
134
|
};
|
|
@@ -9,6 +9,7 @@ export default class BuildList extends EasCommand {
|
|
|
9
9
|
'apple-team-id': 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>;
|
|
@@ -14,7 +14,7 @@ class BuildList extends EasCommand_1.default {
|
|
|
14
14
|
async runAsync() {
|
|
15
15
|
const { flags } = await this.parse(BuildList);
|
|
16
16
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
|
|
17
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(BuildList, {
|
|
17
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(BuildList, {
|
|
18
18
|
nonInteractive: paginatedQueryOptions.nonInteractive,
|
|
19
19
|
});
|
|
20
20
|
let appleTeamIdentifier = flags['apple-team-id'];
|
|
@@ -22,10 +22,10 @@ class BuildList extends EasCommand_1.default {
|
|
|
22
22
|
if (paginatedQueryOptions.json) {
|
|
23
23
|
(0, json_1.enableJsonOutput)();
|
|
24
24
|
}
|
|
25
|
-
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId);
|
|
25
|
+
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
|
|
26
26
|
// if they don't provide a team id, fetch devices on their account
|
|
27
27
|
if (!appleTeamIdentifier) {
|
|
28
|
-
const selectedAppleTeam = await (0, queries_1.selectAppleTeamOnAccountAsync)({
|
|
28
|
+
const selectedAppleTeam = await (0, queries_1.selectAppleTeamOnAccountAsync)(graphqlClient, {
|
|
29
29
|
accountName: account.name,
|
|
30
30
|
paginatedQueryOptions: {
|
|
31
31
|
...paginatedQueryOptions,
|
|
@@ -38,7 +38,7 @@ class BuildList extends EasCommand_1.default {
|
|
|
38
38
|
appleTeamName = selectedAppleTeam.appleTeamName;
|
|
39
39
|
}
|
|
40
40
|
(0, assert_1.default)(appleTeamIdentifier, 'No team identifier is specified');
|
|
41
|
-
await (0, queries_1.listAndRenderAppleDevicesOnAppleTeamAsync)({
|
|
41
|
+
await (0, queries_1.listAndRenderAppleDevicesOnAppleTeamAsync)(graphqlClient, {
|
|
42
42
|
accountName: account.name,
|
|
43
43
|
appleTeam: {
|
|
44
44
|
appleTeamIdentifier,
|
|
@@ -58,4 +58,5 @@ BuildList.flags = {
|
|
|
58
58
|
};
|
|
59
59
|
BuildList.contextDefinition = {
|
|
60
60
|
..._a.ContextOptions.ProjectConfig,
|
|
61
|
+
..._a.ContextOptions.LoggedIn,
|
|
61
62
|
};
|
|
@@ -5,6 +5,7 @@ export default class DeviceView extends EasCommand {
|
|
|
5
5
|
name: 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,13 +22,13 @@ If you are not sure what is the UDID of the device you are looking for, run:
|
|
|
22
22
|
`);
|
|
23
23
|
throw new Error('Device UDID is missing');
|
|
24
24
|
}
|
|
25
|
-
const { projectConfig: { projectId }, } = await this.getContextAsync(DeviceView, {
|
|
25
|
+
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(DeviceView, {
|
|
26
26
|
nonInteractive: true,
|
|
27
27
|
});
|
|
28
|
-
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId);
|
|
28
|
+
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
|
|
29
29
|
const spinner = (0, ora_1.ora)().start(`Fetching device details for ${UDID}…`);
|
|
30
30
|
try {
|
|
31
|
-
const device = await AppleDeviceQuery_1.AppleDeviceQuery.getByDeviceIdentifierAsync(account.name, UDID);
|
|
31
|
+
const device = await AppleDeviceQuery_1.AppleDeviceQuery.getByDeviceIdentifierAsync(graphqlClient, account.name, UDID);
|
|
32
32
|
if (device) {
|
|
33
33
|
spinner.succeed('Fetched device details');
|
|
34
34
|
log_1.default.log(`\n${(0, formatDevice_1.default)(device, device.appleTeam)}`);
|
|
@@ -49,4 +49,5 @@ DeviceView.description = 'view a device for your project';
|
|
|
49
49
|
DeviceView.args = [{ name: 'UDID' }];
|
|
50
50
|
DeviceView.contextDefinition = {
|
|
51
51
|
..._a.ContextOptions.ProjectConfig,
|
|
52
|
+
..._a.ContextOptions.LoggedIn,
|
|
52
53
|
};
|
|
@@ -5,7 +5,7 @@ export default class MetadataPull extends EasCommand {
|
|
|
5
5
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
6
|
};
|
|
7
7
|
static contextDefinition: {
|
|
8
|
-
|
|
8
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
9
9
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
10
10
|
};
|
|
11
11
|
runAsync(): Promise<void>;
|
|
@@ -16,7 +16,7 @@ class MetadataPull extends EasCommand_1.default {
|
|
|
16
16
|
async runAsync() {
|
|
17
17
|
log_1.default.warn('EAS Metadata is in beta and subject to breaking changes.');
|
|
18
18
|
const { flags } = await this.parse(MetadataPull);
|
|
19
|
-
const { actor, projectConfig: { exp, projectId, projectDir }, } = await this.getContextAsync(MetadataPull, {
|
|
19
|
+
const { loggedIn: { actor, graphqlClient }, projectConfig: { exp, projectId, projectDir }, } = await this.getContextAsync(MetadataPull, {
|
|
20
20
|
nonInteractive: false,
|
|
21
21
|
});
|
|
22
22
|
// this command is interactive (all nonInteractive flags passed to utility functions are false)
|
|
@@ -25,6 +25,7 @@ class MetadataPull extends EasCommand_1.default {
|
|
|
25
25
|
projectInfo: { exp, projectId },
|
|
26
26
|
projectDir,
|
|
27
27
|
user: actor,
|
|
28
|
+
graphqlClient,
|
|
28
29
|
nonInteractive: false,
|
|
29
30
|
});
|
|
30
31
|
const metadataCtx = await (0, context_2.createMetadataContextAsync)({
|
|
@@ -5,7 +5,7 @@ export default class MetadataPush extends EasCommand {
|
|
|
5
5
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
6
|
};
|
|
7
7
|
static contextDefinition: {
|
|
8
|
-
|
|
8
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
9
9
|
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
10
10
|
};
|
|
11
11
|
runAsync(): Promise<void>;
|
|
@@ -14,7 +14,7 @@ class MetadataPush extends EasCommand_1.default {
|
|
|
14
14
|
async runAsync() {
|
|
15
15
|
log_1.default.warn('EAS Metadata is in beta and subject to breaking changes.');
|
|
16
16
|
const { flags } = await this.parse(MetadataPush);
|
|
17
|
-
const { actor, projectConfig: { exp, projectId, projectDir }, } = await this.getContextAsync(MetadataPush, {
|
|
17
|
+
const { loggedIn: { actor, graphqlClient }, projectConfig: { exp, projectId, projectDir }, } = await this.getContextAsync(MetadataPush, {
|
|
18
18
|
nonInteractive: false,
|
|
19
19
|
});
|
|
20
20
|
// this command is interactive (all nonInteractive flags passed to utility functions are false)
|
|
@@ -23,6 +23,7 @@ class MetadataPush extends EasCommand_1.default {
|
|
|
23
23
|
projectInfo: { exp, projectId },
|
|
24
24
|
projectDir,
|
|
25
25
|
user: actor,
|
|
26
|
+
graphqlClient,
|
|
26
27
|
nonInteractive: false,
|
|
27
28
|
});
|
|
28
29
|
const metadataCtx = await (0, context_2.createMetadataContextAsync)({
|
package/build/commands/open.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import EasCommand from '../commandUtils/EasCommand';
|
|
|
2
2
|
export default class Open 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>;
|
package/build/commands/open.js
CHANGED
|
@@ -10,10 +10,10 @@ const projectUtils_1 = require("../project/projectUtils");
|
|
|
10
10
|
class Open extends EasCommand_1.default {
|
|
11
11
|
async runAsync() {
|
|
12
12
|
// this command is interactive by nature (only really run by humans in a terminal)
|
|
13
|
-
const { projectConfig: { projectId, exp }, } = await this.getContextAsync(Open, {
|
|
13
|
+
const { projectConfig: { projectId, exp }, loggedIn: { graphqlClient }, } = await this.getContextAsync(Open, {
|
|
14
14
|
nonInteractive: false,
|
|
15
15
|
});
|
|
16
|
-
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId);
|
|
16
|
+
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
|
|
17
17
|
const projectName = exp.slug;
|
|
18
18
|
const projectDashboardUrl = (0, url_1.getProjectDashboardUrl)(account.name, projectName);
|
|
19
19
|
const failedMessage = `Unable to open a web browser. Project page is available at: ${projectDashboardUrl}`;
|
|
@@ -39,4 +39,5 @@ _a = Open;
|
|
|
39
39
|
Open.description = 'open the project page in a web browser';
|
|
40
40
|
Open.contextDefinition = {
|
|
41
41
|
..._a.ContextOptions.ProjectConfig,
|
|
42
|
+
..._a.ContextOptions.LoggedIn,
|
|
42
43
|
};
|
|
@@ -2,6 +2,7 @@ import EasCommand from '../../commandUtils/EasCommand';
|
|
|
2
2
|
export default class ProjectInfo 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>;
|