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
|
@@ -9,99 +9,99 @@ const AndroidKeystoreMutation_1 = require("./graphql/mutations/AndroidKeystoreMu
|
|
|
9
9
|
const GoogleServiceAccountKeyMutation_1 = require("./graphql/mutations/GoogleServiceAccountKeyMutation");
|
|
10
10
|
const AndroidAppCredentialsQuery_1 = require("./graphql/queries/AndroidAppCredentialsQuery");
|
|
11
11
|
const GoogleServiceAccountKeyQuery_1 = require("./graphql/queries/GoogleServiceAccountKeyQuery");
|
|
12
|
-
async function getAndroidAppCredentialsWithCommonFieldsAsync(appLookupParams) {
|
|
12
|
+
async function getAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams) {
|
|
13
13
|
const { androidApplicationIdentifier } = appLookupParams;
|
|
14
14
|
const projectFullName = (0, exports.formatProjectFullName)(appLookupParams);
|
|
15
|
-
return await AndroidAppCredentialsQuery_1.AndroidAppCredentialsQuery.withCommonFieldsByApplicationIdentifierAsync(projectFullName, {
|
|
15
|
+
return await AndroidAppCredentialsQuery_1.AndroidAppCredentialsQuery.withCommonFieldsByApplicationIdentifierAsync(graphqlClient, projectFullName, {
|
|
16
16
|
androidApplicationIdentifier,
|
|
17
17
|
legacyOnly: false,
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
exports.getAndroidAppCredentialsWithCommonFieldsAsync = getAndroidAppCredentialsWithCommonFieldsAsync;
|
|
21
|
-
async function getAndroidAppBuildCredentialsListAsync(appLookupParams) {
|
|
21
|
+
async function getAndroidAppBuildCredentialsListAsync(graphqlClient, appLookupParams) {
|
|
22
22
|
var _a;
|
|
23
|
-
const appCredentials = await getAndroidAppCredentialsWithCommonFieldsAsync(appLookupParams);
|
|
23
|
+
const appCredentials = await getAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams);
|
|
24
24
|
return (_a = appCredentials === null || appCredentials === void 0 ? void 0 : appCredentials.androidAppBuildCredentialsList) !== null && _a !== void 0 ? _a : [];
|
|
25
25
|
}
|
|
26
26
|
exports.getAndroidAppBuildCredentialsListAsync = getAndroidAppBuildCredentialsListAsync;
|
|
27
27
|
/* There is at most one set of legacy android app credentials associated with an Expo App */
|
|
28
|
-
async function getLegacyAndroidAppCredentialsWithCommonFieldsAsync(appLookupParams) {
|
|
28
|
+
async function getLegacyAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams) {
|
|
29
29
|
const projectFullName = (0, exports.formatProjectFullName)(appLookupParams);
|
|
30
|
-
return await AndroidAppCredentialsQuery_1.AndroidAppCredentialsQuery.withCommonFieldsByApplicationIdentifierAsync(projectFullName, {
|
|
30
|
+
return await AndroidAppCredentialsQuery_1.AndroidAppCredentialsQuery.withCommonFieldsByApplicationIdentifierAsync(graphqlClient, projectFullName, {
|
|
31
31
|
legacyOnly: true,
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
exports.getLegacyAndroidAppCredentialsWithCommonFieldsAsync = getLegacyAndroidAppCredentialsWithCommonFieldsAsync;
|
|
35
35
|
/* There is at most one set of legacy android app build credentials associated with an Expo App */
|
|
36
|
-
async function getLegacyAndroidAppBuildCredentialsAsync(appLookupParams) {
|
|
36
|
+
async function getLegacyAndroidAppBuildCredentialsAsync(graphqlClient, appLookupParams) {
|
|
37
37
|
var _a;
|
|
38
|
-
const legacyAppCredentials = await getLegacyAndroidAppCredentialsWithCommonFieldsAsync(appLookupParams);
|
|
38
|
+
const legacyAppCredentials = await getLegacyAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams);
|
|
39
39
|
return (_a = legacyAppCredentials === null || legacyAppCredentials === void 0 ? void 0 : legacyAppCredentials.androidAppBuildCredentialsList[0]) !== null && _a !== void 0 ? _a : null;
|
|
40
40
|
}
|
|
41
41
|
exports.getLegacyAndroidAppBuildCredentialsAsync = getLegacyAndroidAppBuildCredentialsAsync;
|
|
42
|
-
async function createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync(appLookupParams) {
|
|
43
|
-
const maybeAndroidAppCredentials = await getAndroidAppCredentialsWithCommonFieldsAsync(appLookupParams);
|
|
42
|
+
async function createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync(graphqlClient, appLookupParams) {
|
|
43
|
+
const maybeAndroidAppCredentials = await getAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams);
|
|
44
44
|
if (maybeAndroidAppCredentials) {
|
|
45
45
|
return maybeAndroidAppCredentials;
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
-
const app = await getAppAsync(appLookupParams);
|
|
49
|
-
return await AndroidAppCredentialsMutation_1.AndroidAppCredentialsMutation.createAndroidAppCredentialsAsync({}, app.id, appLookupParams.androidApplicationIdentifier);
|
|
48
|
+
const app = await getAppAsync(graphqlClient, appLookupParams);
|
|
49
|
+
return await AndroidAppCredentialsMutation_1.AndroidAppCredentialsMutation.createAndroidAppCredentialsAsync(graphqlClient, {}, app.id, appLookupParams.androidApplicationIdentifier);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
exports.createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync = createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync;
|
|
53
|
-
async function updateAndroidAppCredentialsAsync(appCredentials, { androidFcmId, googleServiceAccountKeyForSubmissionsId, }) {
|
|
53
|
+
async function updateAndroidAppCredentialsAsync(graphqlClient, appCredentials, { androidFcmId, googleServiceAccountKeyForSubmissionsId, }) {
|
|
54
54
|
let updatedAppCredentials = appCredentials;
|
|
55
55
|
if (androidFcmId) {
|
|
56
|
-
updatedAppCredentials = await AndroidAppCredentialsMutation_1.AndroidAppCredentialsMutation.setFcmKeyAsync(appCredentials.id, androidFcmId);
|
|
56
|
+
updatedAppCredentials = await AndroidAppCredentialsMutation_1.AndroidAppCredentialsMutation.setFcmKeyAsync(graphqlClient, appCredentials.id, androidFcmId);
|
|
57
57
|
}
|
|
58
58
|
if (googleServiceAccountKeyForSubmissionsId) {
|
|
59
59
|
updatedAppCredentials =
|
|
60
|
-
await AndroidAppCredentialsMutation_1.AndroidAppCredentialsMutation.setGoogleServiceAccountKeyForSubmissionsAsync(appCredentials.id, googleServiceAccountKeyForSubmissionsId);
|
|
60
|
+
await AndroidAppCredentialsMutation_1.AndroidAppCredentialsMutation.setGoogleServiceAccountKeyForSubmissionsAsync(graphqlClient, appCredentials.id, googleServiceAccountKeyForSubmissionsId);
|
|
61
61
|
}
|
|
62
62
|
return updatedAppCredentials;
|
|
63
63
|
}
|
|
64
64
|
exports.updateAndroidAppCredentialsAsync = updateAndroidAppCredentialsAsync;
|
|
65
|
-
async function updateAndroidAppBuildCredentialsAsync(buildCredentials, { androidKeystoreId, }) {
|
|
66
|
-
return await AndroidAppBuildCredentialsMutation_1.AndroidAppBuildCredentialsMutation.setKeystoreAsync(buildCredentials.id, androidKeystoreId);
|
|
65
|
+
async function updateAndroidAppBuildCredentialsAsync(graphqlClient, buildCredentials, { androidKeystoreId, }) {
|
|
66
|
+
return await AndroidAppBuildCredentialsMutation_1.AndroidAppBuildCredentialsMutation.setKeystoreAsync(graphqlClient, buildCredentials.id, androidKeystoreId);
|
|
67
67
|
}
|
|
68
68
|
exports.updateAndroidAppBuildCredentialsAsync = updateAndroidAppBuildCredentialsAsync;
|
|
69
|
-
async function createAndroidAppBuildCredentialsAsync(appLookupParams, { name, isDefault, androidKeystoreId, }) {
|
|
69
|
+
async function createAndroidAppBuildCredentialsAsync(graphqlClient, appLookupParams, { name, isDefault, androidKeystoreId, }) {
|
|
70
70
|
var _a;
|
|
71
|
-
const androidAppCredentials = await createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync(appLookupParams);
|
|
71
|
+
const androidAppCredentials = await createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync(graphqlClient, appLookupParams);
|
|
72
72
|
const buildCredentialsList = androidAppCredentials.androidAppBuildCredentialsList;
|
|
73
73
|
const existingDefaultBuildCredentials = (_a = buildCredentialsList.find(buildCredentials => buildCredentials.isDefault)) !== null && _a !== void 0 ? _a : null;
|
|
74
74
|
if (existingDefaultBuildCredentials && isDefault) {
|
|
75
75
|
throw new Error('Cannot create new default Android Build Credentials. A set of default credentials exists already.');
|
|
76
76
|
}
|
|
77
|
-
return await AndroidAppBuildCredentialsMutation_1.AndroidAppBuildCredentialsMutation.createAndroidAppBuildCredentialsAsync({
|
|
77
|
+
return await AndroidAppBuildCredentialsMutation_1.AndroidAppBuildCredentialsMutation.createAndroidAppBuildCredentialsAsync(graphqlClient, {
|
|
78
78
|
name,
|
|
79
79
|
isDefault,
|
|
80
80
|
keystoreId: androidKeystoreId,
|
|
81
81
|
}, androidAppCredentials.id);
|
|
82
82
|
}
|
|
83
83
|
exports.createAndroidAppBuildCredentialsAsync = createAndroidAppBuildCredentialsAsync;
|
|
84
|
-
async function getDefaultAndroidAppBuildCredentialsAsync(appLookupParams) {
|
|
84
|
+
async function getDefaultAndroidAppBuildCredentialsAsync(graphqlClient, appLookupParams) {
|
|
85
85
|
var _a;
|
|
86
|
-
const buildCredentialsList = await getAndroidAppBuildCredentialsListAsync(appLookupParams);
|
|
86
|
+
const buildCredentialsList = await getAndroidAppBuildCredentialsListAsync(graphqlClient, appLookupParams);
|
|
87
87
|
return (_a = buildCredentialsList.find(buildCredentials => buildCredentials.isDefault)) !== null && _a !== void 0 ? _a : null;
|
|
88
88
|
}
|
|
89
89
|
exports.getDefaultAndroidAppBuildCredentialsAsync = getDefaultAndroidAppBuildCredentialsAsync;
|
|
90
|
-
async function getAndroidAppBuildCredentialsByNameAsync(appLookupParams, name) {
|
|
90
|
+
async function getAndroidAppBuildCredentialsByNameAsync(graphqlClient, appLookupParams, name) {
|
|
91
91
|
var _a;
|
|
92
|
-
const buildCredentialsList = await getAndroidAppBuildCredentialsListAsync(appLookupParams);
|
|
92
|
+
const buildCredentialsList = await getAndroidAppBuildCredentialsListAsync(graphqlClient, appLookupParams);
|
|
93
93
|
return (_a = buildCredentialsList.find(buildCredentials => buildCredentials.name === name)) !== null && _a !== void 0 ? _a : null;
|
|
94
94
|
}
|
|
95
95
|
exports.getAndroidAppBuildCredentialsByNameAsync = getAndroidAppBuildCredentialsByNameAsync;
|
|
96
|
-
async function createOrUpdateAndroidAppBuildCredentialsByNameAsync(appLookupParams, name, { androidKeystoreId, }) {
|
|
97
|
-
const existingBuildCredentialsWithName = await getAndroidAppBuildCredentialsByNameAsync(appLookupParams, name);
|
|
96
|
+
async function createOrUpdateAndroidAppBuildCredentialsByNameAsync(graphqlClient, appLookupParams, name, { androidKeystoreId, }) {
|
|
97
|
+
const existingBuildCredentialsWithName = await getAndroidAppBuildCredentialsByNameAsync(graphqlClient, appLookupParams, name);
|
|
98
98
|
if (existingBuildCredentialsWithName) {
|
|
99
|
-
return await updateAndroidAppBuildCredentialsAsync(existingBuildCredentialsWithName, {
|
|
99
|
+
return await updateAndroidAppBuildCredentialsAsync(graphqlClient, existingBuildCredentialsWithName, {
|
|
100
100
|
androidKeystoreId,
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
|
-
const defaultBuildCredentialsExist = !!(await getDefaultAndroidAppBuildCredentialsAsync(appLookupParams));
|
|
104
|
-
return await createAndroidAppBuildCredentialsAsync(appLookupParams, {
|
|
103
|
+
const defaultBuildCredentialsExist = !!(await getDefaultAndroidAppBuildCredentialsAsync(graphqlClient, appLookupParams));
|
|
104
|
+
return await createAndroidAppBuildCredentialsAsync(graphqlClient, appLookupParams, {
|
|
105
105
|
name,
|
|
106
106
|
isDefault: !defaultBuildCredentialsExist,
|
|
107
107
|
androidKeystoreId,
|
|
@@ -112,8 +112,8 @@ async function createOrUpdateDefaultIosAppBuildCredentialsAsync() {
|
|
|
112
112
|
throw new Error('This requires user prompting. Look for me in BuildCredentialsUtils');
|
|
113
113
|
}
|
|
114
114
|
exports.createOrUpdateDefaultIosAppBuildCredentialsAsync = createOrUpdateDefaultIosAppBuildCredentialsAsync;
|
|
115
|
-
async function createKeystoreAsync(account, keystore) {
|
|
116
|
-
return await AndroidKeystoreMutation_1.AndroidKeystoreMutation.createAndroidKeystoreAsync({
|
|
115
|
+
async function createKeystoreAsync(graphqlClient, account, keystore) {
|
|
116
|
+
return await AndroidKeystoreMutation_1.AndroidKeystoreMutation.createAndroidKeystoreAsync(graphqlClient, {
|
|
117
117
|
base64EncodedKeystore: keystore.keystore,
|
|
118
118
|
keystorePassword: keystore.keystorePassword,
|
|
119
119
|
keyAlias: keystore.keyAlias,
|
|
@@ -122,33 +122,33 @@ async function createKeystoreAsync(account, keystore) {
|
|
|
122
122
|
}, account.id);
|
|
123
123
|
}
|
|
124
124
|
exports.createKeystoreAsync = createKeystoreAsync;
|
|
125
|
-
async function deleteKeystoreAsync(keystore) {
|
|
126
|
-
return await AndroidKeystoreMutation_1.AndroidKeystoreMutation.deleteAndroidKeystoreAsync(keystore.id);
|
|
125
|
+
async function deleteKeystoreAsync(graphqlClient, keystore) {
|
|
126
|
+
return await AndroidKeystoreMutation_1.AndroidKeystoreMutation.deleteAndroidKeystoreAsync(graphqlClient, keystore.id);
|
|
127
127
|
}
|
|
128
128
|
exports.deleteKeystoreAsync = deleteKeystoreAsync;
|
|
129
|
-
async function createFcmAsync(account, fcmApiKey, version) {
|
|
130
|
-
return await AndroidFcmMutation_1.AndroidFcmMutation.createAndroidFcmAsync({ credential: fcmApiKey, version }, account.id);
|
|
129
|
+
async function createFcmAsync(graphqlClient, account, fcmApiKey, version) {
|
|
130
|
+
return await AndroidFcmMutation_1.AndroidFcmMutation.createAndroidFcmAsync(graphqlClient, { credential: fcmApiKey, version }, account.id);
|
|
131
131
|
}
|
|
132
132
|
exports.createFcmAsync = createFcmAsync;
|
|
133
|
-
async function deleteFcmAsync(fcm) {
|
|
134
|
-
return await AndroidFcmMutation_1.AndroidFcmMutation.deleteAndroidFcmAsync(fcm.id);
|
|
133
|
+
async function deleteFcmAsync(graphqlClient, fcm) {
|
|
134
|
+
return await AndroidFcmMutation_1.AndroidFcmMutation.deleteAndroidFcmAsync(graphqlClient, fcm.id);
|
|
135
135
|
}
|
|
136
136
|
exports.deleteFcmAsync = deleteFcmAsync;
|
|
137
|
-
async function createGoogleServiceAccountKeyAsync(account, jsonKey) {
|
|
138
|
-
return await GoogleServiceAccountKeyMutation_1.GoogleServiceAccountKeyMutation.createGoogleServiceAccountKeyAsync({ jsonKey }, account.id);
|
|
137
|
+
async function createGoogleServiceAccountKeyAsync(graphqlClient, account, jsonKey) {
|
|
138
|
+
return await GoogleServiceAccountKeyMutation_1.GoogleServiceAccountKeyMutation.createGoogleServiceAccountKeyAsync(graphqlClient, { jsonKey }, account.id);
|
|
139
139
|
}
|
|
140
140
|
exports.createGoogleServiceAccountKeyAsync = createGoogleServiceAccountKeyAsync;
|
|
141
|
-
async function deleteGoogleServiceAccountKeyAsync(googleServiceAccountKey) {
|
|
142
|
-
return await GoogleServiceAccountKeyMutation_1.GoogleServiceAccountKeyMutation.deleteGoogleServiceAccountKeyAsync(googleServiceAccountKey.id);
|
|
141
|
+
async function deleteGoogleServiceAccountKeyAsync(graphqlClient, googleServiceAccountKey) {
|
|
142
|
+
return await GoogleServiceAccountKeyMutation_1.GoogleServiceAccountKeyMutation.deleteGoogleServiceAccountKeyAsync(graphqlClient, googleServiceAccountKey.id);
|
|
143
143
|
}
|
|
144
144
|
exports.deleteGoogleServiceAccountKeyAsync = deleteGoogleServiceAccountKeyAsync;
|
|
145
|
-
async function getGoogleServiceAccountKeysForAccountAsync(account) {
|
|
146
|
-
return await GoogleServiceAccountKeyQuery_1.GoogleServiceAccountKeyQuery.getAllForAccountAsync(account.name);
|
|
145
|
+
async function getGoogleServiceAccountKeysForAccountAsync(graphqlClient, account) {
|
|
146
|
+
return await GoogleServiceAccountKeyQuery_1.GoogleServiceAccountKeyQuery.getAllForAccountAsync(graphqlClient, account.name);
|
|
147
147
|
}
|
|
148
148
|
exports.getGoogleServiceAccountKeysForAccountAsync = getGoogleServiceAccountKeysForAccountAsync;
|
|
149
|
-
async function getAppAsync(appLookupParams) {
|
|
149
|
+
async function getAppAsync(graphqlClient, appLookupParams) {
|
|
150
150
|
const projectFullName = (0, exports.formatProjectFullName)(appLookupParams);
|
|
151
|
-
return await AppQuery_1.AppQuery.byFullNameAsync(projectFullName);
|
|
151
|
+
return await AppQuery_1.AppQuery.byFullNameAsync(graphqlClient, projectFullName);
|
|
152
152
|
}
|
|
153
153
|
const formatProjectFullName = ({ account, projectName }) => `@${account.name}/${projectName}`;
|
|
154
154
|
exports.formatProjectFullName = formatProjectFullName;
|
package/build/credentials/android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
1
2
|
import { AndroidAppBuildCredentialsFragment, AndroidAppBuildCredentialsInput } from '../../../../../graphql/generated';
|
|
2
3
|
export declare type AndroidAppBuildCredentialsMetadataInput = Omit<AndroidAppBuildCredentialsInput, 'keystoreId'>;
|
|
3
4
|
export declare const AndroidAppBuildCredentialsMutation: {
|
|
4
|
-
createAndroidAppBuildCredentialsAsync(androidAppBuildCredentialsInput: AndroidAppBuildCredentialsInput, androidAppCredentialsId: string): Promise<AndroidAppBuildCredentialsFragment>;
|
|
5
|
-
setKeystoreAsync(androidAppBuildCredentialsId: string, keystoreId: string): Promise<AndroidAppBuildCredentialsFragment>;
|
|
5
|
+
createAndroidAppBuildCredentialsAsync(graphqlClient: ExpoGraphqlClient, androidAppBuildCredentialsInput: AndroidAppBuildCredentialsInput, androidAppCredentialsId: string): Promise<AndroidAppBuildCredentialsFragment>;
|
|
6
|
+
setKeystoreAsync(graphqlClient: ExpoGraphqlClient, androidAppBuildCredentialsId: string, keystoreId: string): Promise<AndroidAppBuildCredentialsFragment>;
|
|
6
7
|
};
|
package/build/credentials/android/api/graphql/mutations/AndroidAppBuildCredentialsMutation.js
CHANGED
|
@@ -8,8 +8,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
|
8
8
|
const client_1 = require("../../../../../graphql/client");
|
|
9
9
|
const AndroidAppBuildCredentials_1 = require("../../../../../graphql/types/credentials/AndroidAppBuildCredentials");
|
|
10
10
|
exports.AndroidAppBuildCredentialsMutation = {
|
|
11
|
-
async createAndroidAppBuildCredentialsAsync(androidAppBuildCredentialsInput, androidAppCredentialsId) {
|
|
12
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
11
|
+
async createAndroidAppBuildCredentialsAsync(graphqlClient, androidAppBuildCredentialsInput, androidAppCredentialsId) {
|
|
12
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
13
13
|
.mutation((0, graphql_tag_1.default) `
|
|
14
14
|
mutation CreateAndroidAppBuildCredentialsMutation(
|
|
15
15
|
$androidAppBuildCredentialsInput: AndroidAppBuildCredentialsInput!
|
|
@@ -34,8 +34,8 @@ exports.AndroidAppBuildCredentialsMutation = {
|
|
|
34
34
|
(0, assert_1.default)(data.androidAppBuildCredentials.createAndroidAppBuildCredentials, 'GraphQL: `createAndroidAppBuildCredentials` not defined in server response');
|
|
35
35
|
return data.androidAppBuildCredentials.createAndroidAppBuildCredentials;
|
|
36
36
|
},
|
|
37
|
-
async setKeystoreAsync(androidAppBuildCredentialsId, keystoreId) {
|
|
38
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
37
|
+
async setKeystoreAsync(graphqlClient, androidAppBuildCredentialsId, keystoreId) {
|
|
38
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
39
39
|
.mutation((0, graphql_tag_1.default) `
|
|
40
40
|
mutation SetKeystoreMutation($androidAppBuildCredentialsId: ID!, $keystoreId: ID!) {
|
|
41
41
|
androidAppBuildCredentials {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
1
2
|
import { CommonAndroidAppCredentialsFragment } from '../../../../../graphql/generated';
|
|
2
3
|
export declare const AndroidAppCredentialsMutation: {
|
|
3
|
-
createAndroidAppCredentialsAsync(androidAppCredentialsInput: {
|
|
4
|
+
createAndroidAppCredentialsAsync(graphqlClient: ExpoGraphqlClient, androidAppCredentialsInput: {
|
|
4
5
|
fcmId?: string;
|
|
5
6
|
}, appId: string, applicationIdentifier: string): Promise<CommonAndroidAppCredentialsFragment>;
|
|
6
|
-
setFcmKeyAsync(androidAppCredentialsId: string, fcmId: string): Promise<CommonAndroidAppCredentialsFragment>;
|
|
7
|
-
setGoogleServiceAccountKeyForSubmissionsAsync(androidAppCredentialsId: string, googleServiceAccountKeyId: string): Promise<CommonAndroidAppCredentialsFragment>;
|
|
7
|
+
setFcmKeyAsync(graphqlClient: ExpoGraphqlClient, androidAppCredentialsId: string, fcmId: string): Promise<CommonAndroidAppCredentialsFragment>;
|
|
8
|
+
setGoogleServiceAccountKeyForSubmissionsAsync(graphqlClient: ExpoGraphqlClient, androidAppCredentialsId: string, googleServiceAccountKeyId: string): Promise<CommonAndroidAppCredentialsFragment>;
|
|
8
9
|
};
|
|
@@ -8,8 +8,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
|
8
8
|
const client_1 = require("../../../../../graphql/client");
|
|
9
9
|
const AndroidAppCredentials_1 = require("../../../../../graphql/types/credentials/AndroidAppCredentials");
|
|
10
10
|
exports.AndroidAppCredentialsMutation = {
|
|
11
|
-
async createAndroidAppCredentialsAsync(androidAppCredentialsInput, appId, applicationIdentifier) {
|
|
12
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
11
|
+
async createAndroidAppCredentialsAsync(graphqlClient, androidAppCredentialsInput, appId, applicationIdentifier) {
|
|
12
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
13
13
|
.mutation((0, graphql_tag_1.default) `
|
|
14
14
|
mutation CreateAndroidAppCredentialsMutation(
|
|
15
15
|
$androidAppCredentialsInput: AndroidAppCredentialsInput!
|
|
@@ -37,8 +37,8 @@ exports.AndroidAppCredentialsMutation = {
|
|
|
37
37
|
(0, assert_1.default)(data.androidAppCredentials.createAndroidAppCredentials, 'GraphQL: `createAndroidAppCredentials` not defined in server response');
|
|
38
38
|
return data.androidAppCredentials.createAndroidAppCredentials;
|
|
39
39
|
},
|
|
40
|
-
async setFcmKeyAsync(androidAppCredentialsId, fcmId) {
|
|
41
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
40
|
+
async setFcmKeyAsync(graphqlClient, androidAppCredentialsId, fcmId) {
|
|
41
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
42
42
|
.mutation((0, graphql_tag_1.default) `
|
|
43
43
|
mutation SetFcmMutation($androidAppCredentialsId: ID!, $fcmId: ID!) {
|
|
44
44
|
androidAppCredentials {
|
|
@@ -57,8 +57,8 @@ exports.AndroidAppCredentialsMutation = {
|
|
|
57
57
|
(0, assert_1.default)(data.androidAppCredentials.setFcm, 'GraphQL: `setFcm` not defined in server response');
|
|
58
58
|
return data.androidAppCredentials.setFcm;
|
|
59
59
|
},
|
|
60
|
-
async setGoogleServiceAccountKeyForSubmissionsAsync(androidAppCredentialsId, googleServiceAccountKeyId) {
|
|
61
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
60
|
+
async setGoogleServiceAccountKeyForSubmissionsAsync(graphqlClient, androidAppCredentialsId, googleServiceAccountKeyId) {
|
|
61
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
62
62
|
.mutation((0, graphql_tag_1.default) `
|
|
63
63
|
mutation SetGoogleServiceAccountKeyForSubmissionsMutation(
|
|
64
64
|
$androidAppCredentialsId: ID!
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
1
2
|
import { AndroidFcmFragment, AndroidFcmInput } from '../../../../../graphql/generated';
|
|
2
3
|
export declare const AndroidFcmMutation: {
|
|
3
|
-
createAndroidFcmAsync(androidFcmInput: AndroidFcmInput, accountId: string): Promise<AndroidFcmFragment>;
|
|
4
|
-
deleteAndroidFcmAsync(androidFcmId: string): Promise<void>;
|
|
4
|
+
createAndroidFcmAsync(graphqlClient: ExpoGraphqlClient, androidFcmInput: AndroidFcmInput, accountId: string): Promise<AndroidFcmFragment>;
|
|
5
|
+
deleteAndroidFcmAsync(graphqlClient: ExpoGraphqlClient, androidFcmId: string): Promise<void>;
|
|
5
6
|
};
|
|
@@ -8,8 +8,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
|
8
8
|
const client_1 = require("../../../../../graphql/client");
|
|
9
9
|
const AndroidFcm_1 = require("../../../../../graphql/types/credentials/AndroidFcm");
|
|
10
10
|
exports.AndroidFcmMutation = {
|
|
11
|
-
async createAndroidFcmAsync(androidFcmInput, accountId) {
|
|
12
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
11
|
+
async createAndroidFcmAsync(graphqlClient, androidFcmInput, accountId) {
|
|
12
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
13
13
|
.mutation((0, graphql_tag_1.default) `
|
|
14
14
|
mutation CreateAndroidFcmMutation($androidFcmInput: AndroidFcmInput!, $accountId: ID!) {
|
|
15
15
|
androidFcm {
|
|
@@ -28,8 +28,8 @@ exports.AndroidFcmMutation = {
|
|
|
28
28
|
(0, assert_1.default)(data.androidFcm.createAndroidFcm, 'GraphQL: `createAndroidFcm` not defined in server response');
|
|
29
29
|
return data.androidFcm.createAndroidFcm;
|
|
30
30
|
},
|
|
31
|
-
async deleteAndroidFcmAsync(androidFcmId) {
|
|
32
|
-
await (0, client_1.withErrorHandlingAsync)(
|
|
31
|
+
async deleteAndroidFcmAsync(graphqlClient, androidFcmId) {
|
|
32
|
+
await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
33
33
|
.mutation((0, graphql_tag_1.default) `
|
|
34
34
|
mutation DeleteAndroidFcmMutation($androidFcmId: ID!) {
|
|
35
35
|
androidFcm {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
1
2
|
import { AndroidKeystoreFragment, AndroidKeystoreInput } from '../../../../../graphql/generated';
|
|
2
3
|
export declare const AndroidKeystoreMutation: {
|
|
3
|
-
createAndroidKeystoreAsync(androidKeystoreInput: AndroidKeystoreInput, accountId: string): Promise<AndroidKeystoreFragment>;
|
|
4
|
-
deleteAndroidKeystoreAsync(androidKeystoreId: string): Promise<void>;
|
|
4
|
+
createAndroidKeystoreAsync(graphqlClient: ExpoGraphqlClient, androidKeystoreInput: AndroidKeystoreInput, accountId: string): Promise<AndroidKeystoreFragment>;
|
|
5
|
+
deleteAndroidKeystoreAsync(graphqlClient: ExpoGraphqlClient, androidKeystoreId: string): Promise<void>;
|
|
5
6
|
};
|
|
@@ -8,8 +8,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
|
8
8
|
const client_1 = require("../../../../../graphql/client");
|
|
9
9
|
const AndroidKeystore_1 = require("../../../../../graphql/types/credentials/AndroidKeystore");
|
|
10
10
|
exports.AndroidKeystoreMutation = {
|
|
11
|
-
async createAndroidKeystoreAsync(androidKeystoreInput, accountId) {
|
|
12
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
11
|
+
async createAndroidKeystoreAsync(graphqlClient, androidKeystoreInput, accountId) {
|
|
12
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
13
13
|
.mutation((0, graphql_tag_1.default) `
|
|
14
14
|
mutation CreateAndroidKeystoreMutation(
|
|
15
15
|
$androidKeystoreInput: AndroidKeystoreInput!
|
|
@@ -34,8 +34,8 @@ exports.AndroidKeystoreMutation = {
|
|
|
34
34
|
(0, assert_1.default)(data.androidKeystore.createAndroidKeystore, 'GraphQL: `createAndroidKeystore` not defined in server response');
|
|
35
35
|
return data.androidKeystore.createAndroidKeystore;
|
|
36
36
|
},
|
|
37
|
-
async deleteAndroidKeystoreAsync(androidKeystoreId) {
|
|
38
|
-
await (0, client_1.withErrorHandlingAsync)(
|
|
37
|
+
async deleteAndroidKeystoreAsync(graphqlClient, androidKeystoreId) {
|
|
38
|
+
await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
39
39
|
.mutation((0, graphql_tag_1.default) `
|
|
40
40
|
mutation DeleteAndroidKeystoreMutation($androidKeystoreId: ID!) {
|
|
41
41
|
androidKeystore {
|
package/build/credentials/android/api/graphql/mutations/GoogleServiceAccountKeyMutation.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
1
2
|
import { GoogleServiceAccountKeyFragment, GoogleServiceAccountKeyInput } from '../../../../../graphql/generated';
|
|
2
3
|
export declare const GoogleServiceAccountKeyMutation: {
|
|
3
|
-
createGoogleServiceAccountKeyAsync(googleServiceAccountKeyInput: GoogleServiceAccountKeyInput, accountId: string): Promise<GoogleServiceAccountKeyFragment>;
|
|
4
|
-
deleteGoogleServiceAccountKeyAsync(googleServiceAccountKeyId: string): Promise<void>;
|
|
4
|
+
createGoogleServiceAccountKeyAsync(graphqlClient: ExpoGraphqlClient, googleServiceAccountKeyInput: GoogleServiceAccountKeyInput, accountId: string): Promise<GoogleServiceAccountKeyFragment>;
|
|
5
|
+
deleteGoogleServiceAccountKeyAsync(graphqlClient: ExpoGraphqlClient, googleServiceAccountKeyId: string): Promise<void>;
|
|
5
6
|
};
|
|
@@ -8,8 +8,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
|
8
8
|
const client_1 = require("../../../../../graphql/client");
|
|
9
9
|
const GoogleServiceAccountKey_1 = require("../../../../../graphql/types/credentials/GoogleServiceAccountKey");
|
|
10
10
|
exports.GoogleServiceAccountKeyMutation = {
|
|
11
|
-
async createGoogleServiceAccountKeyAsync(googleServiceAccountKeyInput, accountId) {
|
|
12
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
11
|
+
async createGoogleServiceAccountKeyAsync(graphqlClient, googleServiceAccountKeyInput, accountId) {
|
|
12
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
13
13
|
.mutation((0, graphql_tag_1.default) `
|
|
14
14
|
mutation CreateGoogleServiceAccountKeyMutation(
|
|
15
15
|
$googleServiceAccountKeyInput: GoogleServiceAccountKeyInput!
|
|
@@ -34,8 +34,8 @@ exports.GoogleServiceAccountKeyMutation = {
|
|
|
34
34
|
(0, assert_1.default)(data.googleServiceAccountKey.createGoogleServiceAccountKey, 'GraphQL: `createAndroidFcm` not defined in server response');
|
|
35
35
|
return data.googleServiceAccountKey.createGoogleServiceAccountKey;
|
|
36
36
|
},
|
|
37
|
-
async deleteGoogleServiceAccountKeyAsync(googleServiceAccountKeyId) {
|
|
38
|
-
await (0, client_1.withErrorHandlingAsync)(
|
|
37
|
+
async deleteGoogleServiceAccountKeyAsync(graphqlClient, googleServiceAccountKeyId) {
|
|
38
|
+
await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
39
39
|
.mutation((0, graphql_tag_1.default) `
|
|
40
40
|
mutation DeleteGoogleServiceAccountKeyMutation($googleServiceAccountKeyId: ID!) {
|
|
41
41
|
googleServiceAccountKey {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
1
2
|
import { CommonAndroidAppCredentialsFragment } from '../../../../../graphql/generated';
|
|
2
3
|
export declare const AndroidAppCredentialsQuery: {
|
|
3
|
-
withCommonFieldsByApplicationIdentifierAsync(projectFullName: string, { androidApplicationIdentifier, legacyOnly, }: {
|
|
4
|
+
withCommonFieldsByApplicationIdentifierAsync(graphqlClient: ExpoGraphqlClient, projectFullName: string, { androidApplicationIdentifier, legacyOnly, }: {
|
|
4
5
|
androidApplicationIdentifier?: string | undefined;
|
|
5
6
|
legacyOnly?: boolean | undefined;
|
|
6
7
|
}): Promise<CommonAndroidAppCredentialsFragment | null>;
|
|
@@ -8,9 +8,9 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
|
8
8
|
const client_1 = require("../../../../../graphql/client");
|
|
9
9
|
const AndroidAppCredentials_1 = require("../../../../../graphql/types/credentials/AndroidAppCredentials");
|
|
10
10
|
exports.AndroidAppCredentialsQuery = {
|
|
11
|
-
async withCommonFieldsByApplicationIdentifierAsync(projectFullName, { androidApplicationIdentifier, legacyOnly, }) {
|
|
11
|
+
async withCommonFieldsByApplicationIdentifierAsync(graphqlClient, projectFullName, { androidApplicationIdentifier, legacyOnly, }) {
|
|
12
12
|
var _a;
|
|
13
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
13
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
14
14
|
.query((0, graphql_tag_1.default) `
|
|
15
15
|
query CommonAndroidAppCredentialsWithBuildCredentialsByApplicationIdentifierQuery(
|
|
16
16
|
$projectFullName: String!
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
1
2
|
import { GoogleServiceAccountKeyFragment } from '../../../../../graphql/generated';
|
|
2
3
|
export declare const GoogleServiceAccountKeyQuery: {
|
|
3
|
-
getAllForAccountAsync(accountName: string): Promise<GoogleServiceAccountKeyFragment[]>;
|
|
4
|
+
getAllForAccountAsync(graphqlClient: ExpoGraphqlClient, accountName: string): Promise<GoogleServiceAccountKeyFragment[]>;
|
|
4
5
|
};
|
|
@@ -7,8 +7,8 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
|
7
7
|
const client_1 = require("../../../../../graphql/client");
|
|
8
8
|
const GoogleServiceAccountKey_1 = require("../../../../../graphql/types/credentials/GoogleServiceAccountKey");
|
|
9
9
|
exports.GoogleServiceAccountKeyQuery = {
|
|
10
|
-
async getAllForAccountAsync(accountName) {
|
|
11
|
-
const data = await (0, client_1.withErrorHandlingAsync)(
|
|
10
|
+
async getAllForAccountAsync(graphqlClient, accountName) {
|
|
11
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
12
12
|
.query((0, graphql_tag_1.default) `
|
|
13
13
|
query GoogleServiceAccountKeyByAccountQuery($accountName: String!) {
|
|
14
14
|
account {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
1
2
|
import { KeystoreWithType } from '../credentials';
|
|
2
3
|
export declare function keytoolCommandExistsAsync(): Promise<boolean>;
|
|
3
|
-
export declare function generateRandomKeystoreAsync(projectId: string): Promise<KeystoreWithType>;
|
|
4
|
+
export declare function generateRandomKeystoreAsync(graphqlClient: ExpoGraphqlClient, projectId: string): Promise<KeystoreWithType>;
|
|
@@ -31,16 +31,16 @@ var KeystoreCreateStep;
|
|
|
31
31
|
KeystoreCreateStep["Fail"] = "fail";
|
|
32
32
|
KeystoreCreateStep["Success"] = "success";
|
|
33
33
|
})(KeystoreCreateStep || (KeystoreCreateStep = {}));
|
|
34
|
-
async function generateRandomKeystoreAsync(projectId) {
|
|
34
|
+
async function generateRandomKeystoreAsync(graphqlClient, projectId) {
|
|
35
35
|
const keystoreData = {
|
|
36
36
|
keystorePassword: crypto_1.default.randomBytes(16).toString('hex'),
|
|
37
37
|
keyPassword: crypto_1.default.randomBytes(16).toString('hex'),
|
|
38
38
|
keyAlias: crypto_1.default.randomBytes(16).toString('hex'),
|
|
39
39
|
};
|
|
40
|
-
return await createKeystoreAsync(keystoreData, projectId);
|
|
40
|
+
return await createKeystoreAsync(graphqlClient, keystoreData, projectId);
|
|
41
41
|
}
|
|
42
42
|
exports.generateRandomKeystoreAsync = generateRandomKeystoreAsync;
|
|
43
|
-
async function createKeystoreAsync(keystoreParams, projectId) {
|
|
43
|
+
async function createKeystoreAsync(graphqlClient, keystoreParams, projectId) {
|
|
44
44
|
events_1.Analytics.logEvent(events_1.BuildEvent.ANDROID_KEYSTORE_CREATE, {
|
|
45
45
|
project_id: projectId,
|
|
46
46
|
step: KeystoreCreateStep.Attempt,
|
|
@@ -59,7 +59,7 @@ async function createKeystoreAsync(keystoreParams, projectId) {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
if (!keystore) {
|
|
62
|
-
keystore = await createKeystoreInCloudAsync(keystoreParams, {
|
|
62
|
+
keystore = await createKeystoreInCloudAsync(graphqlClient, keystoreParams, {
|
|
63
63
|
showKeytoolDetectionMsg: !localAttempt,
|
|
64
64
|
});
|
|
65
65
|
}
|
|
@@ -116,13 +116,13 @@ async function createKeystoreLocallyAsync(keystoreParams) {
|
|
|
116
116
|
await fs_extra_1.default.remove(keystorePath);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
async function createKeystoreInCloudAsync(keystoreParams, { showKeytoolDetectionMsg = true } = {}) {
|
|
119
|
+
async function createKeystoreInCloudAsync(graphqlClient, keystoreParams, { showKeytoolDetectionMsg = true } = {}) {
|
|
120
120
|
if (showKeytoolDetectionMsg) {
|
|
121
121
|
log_1.default.log(`Detected that you do not have ${chalk_1.default.bold('keytool')} installed locally.`);
|
|
122
122
|
}
|
|
123
123
|
const spinner = (0, ora_1.ora)('Generating keystore in the cloud...').start();
|
|
124
124
|
try {
|
|
125
|
-
const url = await KeystoreGenerationUrlMutation_1.KeystoreGenerationUrlMutation.createKeystoreGenerationUrlAsync();
|
|
125
|
+
const url = await KeystoreGenerationUrlMutation_1.KeystoreGenerationUrlMutation.createKeystoreGenerationUrlAsync(graphqlClient);
|
|
126
126
|
const response = await (0, fetch_1.default)(url, {
|
|
127
127
|
method: 'POST',
|
|
128
128
|
body: JSON.stringify(keystoreParams),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
2
|
import { Env } from '@expo/eas-build-job';
|
|
3
3
|
import { EasJson } from '@expo/eas-json';
|
|
4
|
+
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
4
5
|
import { Actor } from '../user/User';
|
|
5
6
|
import * as AndroidGraphqlClient from './android/api/GraphqlClient';
|
|
6
7
|
import * as IosGraphqlClient from './ios/api/GraphqlClient';
|
|
@@ -17,6 +18,7 @@ export declare class CredentialsContext {
|
|
|
17
18
|
readonly nonInteractive: boolean;
|
|
18
19
|
readonly projectDir: string;
|
|
19
20
|
readonly user: Actor;
|
|
21
|
+
readonly graphqlClient: ExpoGraphqlClient;
|
|
20
22
|
readonly easJsonCliConfig?: EasJson['cli'];
|
|
21
23
|
private shouldAskAuthenticateAppStore;
|
|
22
24
|
private projectInfo;
|
|
@@ -26,6 +28,7 @@ export declare class CredentialsContext {
|
|
|
26
28
|
nonInteractive: boolean;
|
|
27
29
|
projectDir: string;
|
|
28
30
|
user: Actor;
|
|
31
|
+
graphqlClient: ExpoGraphqlClient;
|
|
29
32
|
env?: Env;
|
|
30
33
|
});
|
|
31
34
|
static getExpoConfigInProject(projectDir: string, { env }?: {
|
|
@@ -21,6 +21,7 @@ class CredentialsContext {
|
|
|
21
21
|
this.easJsonCliConfig = options.easJsonCliConfig;
|
|
22
22
|
this.projectDir = options.projectDir;
|
|
23
23
|
this.user = options.user;
|
|
24
|
+
this.graphqlClient = options.graphqlClient;
|
|
24
25
|
this.nonInteractive = (_a = options.nonInteractive) !== null && _a !== void 0 ? _a : false;
|
|
25
26
|
this.projectInfo = options.projectInfo;
|
|
26
27
|
}
|
|
@@ -149,7 +149,7 @@ function createTargetCredentialsPathsMap(targets, rawCredentialsJsonMap) {
|
|
|
149
149
|
}
|
|
150
150
|
async function getTargetBuildCredentialsAsync(ctx, app, target, iosDistributionType) {
|
|
151
151
|
var _a, _b, _c, _d;
|
|
152
|
-
const appCredentials = await ctx.ios.getIosAppCredentialsWithCommonFieldsAsync({
|
|
152
|
+
const appCredentials = await ctx.ios.getIosAppCredentialsWithCommonFieldsAsync(ctx.graphqlClient, {
|
|
153
153
|
account: app.account,
|
|
154
154
|
projectName: app.projectName,
|
|
155
155
|
bundleIdentifier: target.bundleIdentifier,
|
|
@@ -5,7 +5,7 @@ async function resolveAppleTeamIfAuthenticatedAsync(ctx, app) {
|
|
|
5
5
|
if (!ctx.appStore.authCtx) {
|
|
6
6
|
return null;
|
|
7
7
|
}
|
|
8
|
-
return await ctx.ios.createOrGetExistingAppleTeamAsync(app.account, {
|
|
8
|
+
return await ctx.ios.createOrGetExistingAppleTeamAsync(ctx.graphqlClient, app.account, {
|
|
9
9
|
appleTeamIdentifier: ctx.appStore.authCtx.team.id,
|
|
10
10
|
appleTeamName: ctx.appStore.authCtx.team.name,
|
|
11
11
|
});
|
|
@@ -129,7 +129,7 @@ async function getBestEffortIssuerIdAsync(ctx, ascApiKeyId) {
|
|
|
129
129
|
return (_a = ascApiKeyInfo === null || ascApiKeyInfo === void 0 ? void 0 : ascApiKeyInfo.issuerId) !== null && _a !== void 0 ? _a : null;
|
|
130
130
|
}
|
|
131
131
|
async function getAscApiKeysFromAccountAsync(ctx, account, { filterDifferentAppleTeam } = {}) {
|
|
132
|
-
const ascApiKeysForAccount = await ctx.ios.getAscApiKeysForAccountAsync(account);
|
|
132
|
+
const ascApiKeysForAccount = await ctx.ios.getAscApiKeysForAccountAsync(ctx.graphqlClient, account);
|
|
133
133
|
if (!filterDifferentAppleTeam) {
|
|
134
134
|
return ascApiKeysForAccount;
|
|
135
135
|
}
|
|
@@ -12,10 +12,10 @@ class AssignAscApiKey {
|
|
|
12
12
|
async runAsync(ctx, ascApiKey, purpose) {
|
|
13
13
|
var _a, _b;
|
|
14
14
|
const appleTeam = (_b = (_a = (await (0, AppleTeamUtils_1.resolveAppleTeamIfAuthenticatedAsync)(ctx, this.app))) !== null && _a !== void 0 ? _a : ascApiKey.appleTeam) !== null && _b !== void 0 ? _b : null;
|
|
15
|
-
const appCredentials = await ctx.ios.createOrGetIosAppCredentialsWithCommonFieldsAsync(this.app, { appleTeam: appleTeam !== null && appleTeam !== void 0 ? appleTeam : undefined });
|
|
15
|
+
const appCredentials = await ctx.ios.createOrGetIosAppCredentialsWithCommonFieldsAsync(ctx.graphqlClient, this.app, { appleTeam: appleTeam !== null && appleTeam !== void 0 ? appleTeam : undefined });
|
|
16
16
|
let updatedAppCredentials;
|
|
17
17
|
if (purpose === AscApiKeyUtils_1.AppStoreApiKeyPurpose.SUBMISSION_SERVICE) {
|
|
18
|
-
updatedAppCredentials = await ctx.ios.updateIosAppCredentialsAsync(appCredentials, {
|
|
18
|
+
updatedAppCredentials = await ctx.ios.updateIosAppCredentialsAsync(ctx.graphqlClient, appCredentials, {
|
|
19
19
|
ascApiKeyIdForSubmissions: ascApiKey.id,
|
|
20
20
|
});
|
|
21
21
|
}
|
|
@@ -11,8 +11,8 @@ class AssignPushKey {
|
|
|
11
11
|
async runAsync(ctx, pushKey) {
|
|
12
12
|
var _a, _b;
|
|
13
13
|
const appleTeam = (_b = (_a = (await (0, AppleTeamUtils_1.resolveAppleTeamIfAuthenticatedAsync)(ctx, this.app))) !== null && _a !== void 0 ? _a : pushKey.appleTeam) !== null && _b !== void 0 ? _b : null;
|
|
14
|
-
const appCredentials = await ctx.ios.createOrGetIosAppCredentialsWithCommonFieldsAsync(this.app, { appleTeam: appleTeam !== null && appleTeam !== void 0 ? appleTeam : undefined });
|
|
15
|
-
const updatedAppCredentials = await ctx.ios.updateIosAppCredentialsAsync(appCredentials, {
|
|
14
|
+
const appCredentials = await ctx.ios.createOrGetIosAppCredentialsWithCommonFieldsAsync(ctx.graphqlClient, this.app, { appleTeam: appleTeam !== null && appleTeam !== void 0 ? appleTeam : undefined });
|
|
15
|
+
const updatedAppCredentials = await ctx.ios.updateIosAppCredentialsAsync(ctx.graphqlClient, appCredentials, {
|
|
16
16
|
applePushKeyId: pushKey.id,
|
|
17
17
|
});
|
|
18
18
|
log_1.default.succeed(`Push Key assigned to ${this.app.projectName}: ${this.app.bundleIdentifier}`);
|
|
@@ -6,7 +6,7 @@ const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
|
6
6
|
const projectUtils_1 = require("../../../project/projectUtils");
|
|
7
7
|
const AppleTeamUtils_1 = require("./AppleTeamUtils");
|
|
8
8
|
async function getAllBuildCredentialsAsync(ctx, app) {
|
|
9
|
-
const appCredentials = await ctx.ios.getIosAppCredentialsWithBuildCredentialsAsync(app, {});
|
|
9
|
+
const appCredentials = await ctx.ios.getIosAppCredentialsWithBuildCredentialsAsync(ctx.graphqlClient, app, {});
|
|
10
10
|
if (!appCredentials) {
|
|
11
11
|
return [];
|
|
12
12
|
}
|
|
@@ -14,7 +14,7 @@ async function getAllBuildCredentialsAsync(ctx, app) {
|
|
|
14
14
|
}
|
|
15
15
|
exports.getAllBuildCredentialsAsync = getAllBuildCredentialsAsync;
|
|
16
16
|
async function getBuildCredentialsAsync(ctx, app, iosDistributionType) {
|
|
17
|
-
const appCredentials = await ctx.ios.getIosAppCredentialsWithBuildCredentialsAsync(app, {
|
|
17
|
+
const appCredentials = await ctx.ios.getIosAppCredentialsWithBuildCredentialsAsync(ctx.graphqlClient, app, {
|
|
18
18
|
iosDistributionType,
|
|
19
19
|
});
|
|
20
20
|
if (!appCredentials || appCredentials.iosAppBuildCredentialsList.length === 0) {
|
|
@@ -38,8 +38,8 @@ async function getDistributionCertificateAsync(ctx, app, iosDistributionType) {
|
|
|
38
38
|
exports.getDistributionCertificateAsync = getDistributionCertificateAsync;
|
|
39
39
|
async function assignBuildCredentialsAsync(ctx, app, iosDistributionType, distCert, provisioningProfile, appleTeam) {
|
|
40
40
|
const resolvedAppleTeam = (0, nullthrows_1.default)(appleTeam !== null && appleTeam !== void 0 ? appleTeam : (await (0, AppleTeamUtils_1.resolveAppleTeamIfAuthenticatedAsync)(ctx, app)));
|
|
41
|
-
const appleAppIdentifier = await ctx.ios.createOrGetExistingAppleAppIdentifierAsync(app, resolvedAppleTeam);
|
|
42
|
-
return await ctx.ios.createOrUpdateIosAppBuildCredentialsAsync(app, {
|
|
41
|
+
const appleAppIdentifier = await ctx.ios.createOrGetExistingAppleAppIdentifierAsync(ctx.graphqlClient, app, resolvedAppleTeam);
|
|
42
|
+
return await ctx.ios.createOrUpdateIosAppBuildCredentialsAsync(ctx.graphqlClient, app, {
|
|
43
43
|
appleTeam: resolvedAppleTeam,
|
|
44
44
|
appleAppIdentifierId: appleAppIdentifier.id,
|
|
45
45
|
appleDistributionCertificateId: distCert.id,
|
|
@@ -52,7 +52,7 @@ async function getAppFromContextAsync(ctx) {
|
|
|
52
52
|
ctx.ensureProjectContext();
|
|
53
53
|
const projectName = ctx.exp.slug;
|
|
54
54
|
const projectId = ctx.projectId;
|
|
55
|
-
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId);
|
|
55
|
+
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(ctx.graphqlClient, projectId);
|
|
56
56
|
return {
|
|
57
57
|
account,
|
|
58
58
|
projectName,
|
|
@@ -56,7 +56,7 @@ class ConfigureProvisioningProfile {
|
|
|
56
56
|
const projectTag = `${chalk_1.default.bold(slugTag)} ${chalk_1.default.dim(bundleIdTag)}`;
|
|
57
57
|
const spinner = (0, ora_1.ora)(`Updating Expo profile for ${projectTag}`).start();
|
|
58
58
|
try {
|
|
59
|
-
const configuredProvisioningProfile = await ctx.ios.updateProvisioningProfileAsync(this.originalProvisioningProfile.id, {
|
|
59
|
+
const configuredProvisioningProfile = await ctx.ios.updateProvisioningProfileAsync(ctx.graphqlClient, this.originalProvisioningProfile.id, {
|
|
60
60
|
appleProvisioningProfile: updatedProfile.provisioningProfile,
|
|
61
61
|
developerPortalIdentifier: updatedProfile.provisioningProfileId,
|
|
62
62
|
});
|