eas-cli 16.28.0 → 16.30.0
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 +97 -94
- package/build/analytics/AnalyticsManager.js +4 -4
- package/build/analytics/common.js +1 -2
- package/build/api.js +5 -5
- package/build/branch/delete.js +1 -2
- package/build/branch/queries.js +5 -5
- package/build/branch/utils.js +2 -2
- package/build/build/android/build.js +3 -4
- package/build/build/android/graphql.js +1 -2
- package/build/build/android/prepareJob.js +1 -2
- package/build/build/android/syncProjectConfiguration.js +2 -3
- package/build/build/android/version.js +6 -6
- package/build/build/build.js +3 -4
- package/build/build/configure.js +4 -5
- package/build/build/createContext.js +1 -2
- package/build/build/evaluateConfigWithEnvVarsAsync.js +1 -2
- package/build/build/graphql.js +7 -7
- package/build/build/ios/build.js +2 -3
- package/build/build/ios/credentials.js +2 -3
- package/build/build/ios/graphql.js +2 -3
- package/build/build/ios/prepareJob.js +2 -3
- package/build/build/ios/syncProjectConfiguration.js +1 -2
- package/build/build/ios/version.js +10 -10
- package/build/build/local.js +2 -2
- package/build/build/metadata.js +3 -4
- package/build/build/queries.js +4 -4
- package/build/build/runBuildAndSubmit.js +2 -3
- package/build/build/utils/appJson.js +2 -3
- package/build/build/utils/credentials.js +1 -2
- package/build/build/utils/devClient.js +1 -2
- package/build/build/utils/formatBuild.js +2 -3
- package/build/build/utils/printBuildInfo.js +4 -5
- package/build/build/utils/repository.js +8 -9
- package/build/build/utils/resourceClass.js +1 -2
- package/build/build/utils/url.js +8 -9
- package/build/build/utils/version.js +2 -3
- package/build/build/validate.js +3 -4
- package/build/channel/branch-mapping.js +24 -24
- package/build/channel/delete.d.ts +5 -0
- package/build/channel/delete.js +23 -0
- package/build/channel/print-utils.js +2 -3
- package/build/channel/queries.js +8 -8
- package/build/channel/utils.js +1 -2
- package/build/commandUtils/builds.js +3 -4
- package/build/commandUtils/context/contextUtils/createGraphqlClient.js +1 -2
- package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +2 -3
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +3 -4
- package/build/commandUtils/context/contextUtils/loadServerSideEnvironmentVariablesAsync.js +1 -2
- package/build/commandUtils/experienceParser.d.ts +6 -0
- package/build/commandUtils/experienceParser.js +42 -0
- package/build/commandUtils/new/commands.js +3 -4
- package/build/commandUtils/new/configs.js +4 -5
- package/build/commandUtils/new/projectFiles.js +6 -7
- package/build/commandUtils/new/utils.js +1 -2
- package/build/commandUtils/projectNameValidation.d.ts +8 -0
- package/build/commandUtils/projectNameValidation.js +30 -0
- package/build/commandUtils/workflow/buildProfileUtils.js +12 -13
- package/build/commandUtils/workflow/creation.js +5 -5
- package/build/commandUtils/workflow/fetchLogs.js +2 -3
- package/build/commandUtils/workflow/inputs.js +5 -5
- package/build/commandUtils/workflow/stateMachine.js +7 -7
- package/build/commandUtils/workflow/utils.js +12 -12
- package/build/commandUtils/workflow/validation.js +4 -5
- package/build/commands/build/cancel.js +1 -2
- package/build/commands/build/delete.js +1 -2
- package/build/commands/build/index.js +1 -2
- package/build/commands/channel/delete.js +7 -23
- package/build/commands/channel/edit.js +1 -2
- package/build/commands/channel/pause.js +1 -2
- package/build/commands/channel/resume.js +1 -2
- package/build/commands/deploy/index.js +1 -1
- package/build/commands/project/init.js +3 -1
- package/build/commands/project/new.js +3 -4
- package/build/commands/update/index.d.ts +8 -0
- package/build/commands/update/index.js +39 -2
- package/build/commands/update/list.d.ts +3 -0
- package/build/commands/update/list.js +30 -1
- package/build/commands/update/revert-update-rollout.js +1 -2
- package/build/credentials/android/actions/BuildCredentialsUtils.js +6 -7
- package/build/credentials/android/api/GraphqlClient.js +21 -21
- package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.d.ts +2 -2
- package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.d.ts +5 -5
- package/build/credentials/android/utils/googleServiceAccountKey.js +4 -4
- package/build/credentials/android/utils/keystore.js +2 -3
- package/build/credentials/android/utils/keystoreNew.js +3 -4
- package/build/credentials/android/utils/printCredentials.js +3 -4
- package/build/credentials/credentialsJson/read.js +3 -4
- package/build/credentials/credentialsJson/update.js +2 -3
- package/build/credentials/credentialsJson/utils.js +2 -3
- package/build/credentials/ios/actions/AppleTeamFormatting.js +1 -2
- package/build/credentials/ios/actions/AppleTeamUtils.js +1 -2
- package/build/credentials/ios/actions/AscApiKeyUtils.js +10 -10
- package/build/credentials/ios/actions/BuildCredentialsUtils.js +7 -8
- package/build/credentials/ios/actions/DeviceUtils.js +2 -3
- package/build/credentials/ios/actions/DistributionCertificateUtils.js +4 -5
- package/build/credentials/ios/actions/ProvisioningProfileUtils.js +2 -3
- package/build/credentials/ios/actions/PushKeyUtils.js +5 -6
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +2 -2
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.js +6 -2
- package/build/credentials/ios/api/GraphqlClient.js +24 -25
- package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.d.ts +5 -5
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.d.ts +8 -8
- package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.d.ts +5 -5
- package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.d.ts +5 -5
- package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.d.ts +1 -1
- package/build/credentials/ios/appstore/AppStoreApi.d.ts +0 -2
- package/build/credentials/ios/appstore/Credentials.js +4 -5
- package/build/credentials/ios/appstore/Credentials.types.d.ts +0 -1
- package/build/credentials/ios/appstore/CredentialsUtils.js +6 -7
- package/build/credentials/ios/appstore/ascApiKey.d.ts +0 -1
- package/build/credentials/ios/appstore/ascApiKey.js +6 -7
- package/build/credentials/ios/appstore/authenticate.d.ts +0 -1
- package/build/credentials/ios/appstore/authenticate.js +4 -5
- package/build/credentials/ios/appstore/authenticateTypes.d.ts +0 -1
- package/build/credentials/ios/appstore/bundleId.d.ts +0 -1
- package/build/credentials/ios/appstore/bundleId.js +2 -3
- package/build/credentials/ios/appstore/bundleIdCapabilities.d.ts +0 -1
- package/build/credentials/ios/appstore/bundleIdCapabilities.js +3 -3
- package/build/credentials/ios/appstore/capabilityIdentifiers.d.ts +0 -1
- package/build/credentials/ios/appstore/capabilityIdentifiers.js +1 -2
- package/build/credentials/ios/appstore/capabilityList.d.ts +0 -1
- package/build/credentials/ios/appstore/contractMessages.d.ts +0 -1
- package/build/credentials/ios/appstore/contractMessages.js +2 -3
- package/build/credentials/ios/appstore/distributionCertificate.d.ts +0 -1
- package/build/credentials/ios/appstore/distributionCertificate.js +7 -7
- package/build/credentials/ios/appstore/ensureAppExists.d.ts +6 -1
- package/build/credentials/ios/appstore/ensureAppExists.js +55 -18
- package/build/credentials/ios/appstore/ensureTestFlightGroup.d.ts +0 -1
- package/build/credentials/ios/appstore/ensureTestFlightGroup.js +1 -2
- package/build/credentials/ios/appstore/keychain.js +4 -4
- package/build/credentials/ios/appstore/provisioningProfile.d.ts +0 -1
- package/build/credentials/ios/appstore/provisioningProfile.js +5 -5
- package/build/credentials/ios/appstore/provisioningProfileAdhoc.d.ts +0 -1
- package/build/credentials/ios/appstore/provisioningProfileAdhoc.js +1 -2
- package/build/credentials/ios/appstore/pushKey.js +4 -4
- package/build/credentials/ios/appstore/resolveCredentials.d.ts +0 -1
- package/build/credentials/ios/appstore/resolveCredentials.js +6 -7
- package/build/credentials/ios/credentials.d.ts +0 -1
- package/build/credentials/ios/credentials.js +2 -2
- package/build/credentials/ios/utils/authType.d.ts +0 -1
- package/build/credentials/ios/utils/authType.js +1 -2
- package/build/credentials/ios/utils/convertHTMLToASCII.js +1 -2
- package/build/credentials/ios/utils/p12Certificate.d.ts +0 -1
- package/build/credentials/ios/utils/p12Certificate.js +3 -4
- package/build/credentials/ios/utils/printCredentials.js +3 -4
- package/build/credentials/ios/utils/provisioningProfile.js +5 -6
- package/build/credentials/ios/validators/validateAscApiKey.js +2 -3
- package/build/credentials/ios/validators/validateDistributionCertificate.js +1 -2
- package/build/credentials/ios/validators/validateProvisioningProfile.js +1 -2
- package/build/credentials/ios/validators/validatePushKey.js +1 -2
- package/build/credentials/manager/IosActions.js +4 -4
- package/build/credentials/manager/SelectPlatform.js +1 -1
- package/build/credentials/utils/promptForCredentials.js +3 -4
- package/build/devices/actions/create/currentMachineMethod.js +1 -2
- package/build/devices/actions/create/developerPortalMethod.d.ts +0 -1
- package/build/devices/actions/create/developerPortalMethod.js +2 -3
- package/build/devices/actions/create/inputMethod.js +1 -2
- package/build/devices/actions/create/registrationUrlMethod.js +1 -2
- package/build/devices/actions/create/utils.js +4 -5
- package/build/devices/context.js +1 -2
- package/build/devices/queries.js +4 -4
- package/build/devices/udids.js +2 -3
- package/build/devices/utils/formatDevice.js +2 -3
- package/build/fetch.d.ts +0 -1
- package/build/fetch.js +1 -1
- package/build/fingerprint/cli.js +3 -4
- package/build/fingerprint/diff.js +1 -2
- package/build/fingerprint/types.d.ts +0 -1
- package/build/fingerprint/utils.js +4 -5
- package/build/graphql/client.js +2 -2
- package/build/graphql/generated.d.ts +177 -88
- package/build/graphql/generated.js +39 -3
- package/build/graphql/mutations/PublishMutation.d.ts +2 -2
- package/build/graphql/queries/AccountUsageQuery.d.ts +1 -1
- package/build/graphql/queries/AppVersionQuery.d.ts +1 -1
- package/build/graphql/queries/BackgroundJobReceiptQuery.d.ts +1 -1
- package/build/graphql/queries/BranchQuery.d.ts +3 -3
- package/build/graphql/queries/BuildQuery.d.ts +3 -3
- package/build/graphql/queries/ChannelQuery.d.ts +2 -2
- package/build/graphql/queries/ChannelQuery.js +2 -2
- package/build/graphql/queries/EnvironmentVariablesQuery.d.ts +12 -12
- package/build/graphql/queries/FingerprintQuery.d.ts +6 -6
- package/build/graphql/queries/PublishQuery.d.ts +1 -1
- package/build/graphql/queries/SubmissionQuery.d.ts +1 -1
- package/build/graphql/queries/UserQuery.d.ts +1 -1
- package/build/graphql/queries/WorkflowJobQuery.d.ts +2 -2
- package/build/graphql/queries/WorkflowRunQuery.d.ts +4 -4
- package/build/graphql/types/AppPlatform.js +2 -3
- package/build/log.js +2 -3
- package/build/metadata/apple/config/reader.d.ts +0 -1
- package/build/metadata/apple/config/writer.d.ts +0 -1
- package/build/metadata/apple/data.d.ts +0 -1
- package/build/metadata/apple/tasks/age-rating.d.ts +0 -1
- package/build/metadata/apple/tasks/age-rating.js +0 -1
- package/build/metadata/apple/tasks/app-info.d.ts +0 -1
- package/build/metadata/apple/tasks/app-info.js +15 -4
- package/build/metadata/apple/tasks/app-review-detail.d.ts +0 -1
- package/build/metadata/apple/tasks/app-review-detail.js +0 -1
- package/build/metadata/apple/tasks/app-version.d.ts +0 -1
- package/build/metadata/apple/tasks/app-version.js +15 -3
- package/build/metadata/apple/tasks/index.js +1 -2
- package/build/metadata/apple/types.d.ts +0 -1
- package/build/metadata/auth.d.ts +0 -1
- package/build/metadata/auth.js +1 -2
- package/build/metadata/config/resolve.js +4 -5
- package/build/metadata/config/validate.js +1 -2
- package/build/metadata/download.js +1 -2
- package/build/metadata/errors.js +3 -3
- package/build/metadata/upload.js +1 -2
- package/build/metadata/utils/ajv.js +2 -3
- package/build/metadata/utils/asc.d.ts +0 -1
- package/build/metadata/utils/date.js +1 -2
- package/build/metadata/utils/log.js +1 -2
- package/build/metadata/utils/retry.js +2 -3
- package/build/metadata/utils/telemetry.d.ts +0 -1
- package/build/metadata/utils/telemetry.js +2 -3
- package/build/onboarding/git.js +3 -4
- package/build/onboarding/installDependencies.js +3 -3
- package/build/onboarding/runCommand.js +1 -2
- package/build/ora.js +1 -2
- package/build/platform.d.ts +1 -0
- package/build/platform.js +28 -10
- package/build/project/android/applicationId.js +6 -6
- package/build/project/android/gradle.js +1 -2
- package/build/project/android/gradleUtils.js +4 -4
- package/build/project/android/versions.js +3 -3
- package/build/project/applicationIdentifier.js +1 -2
- package/build/project/customBuildConfig.js +3 -4
- package/build/project/expoConfig.js +5 -6
- package/build/project/expoSdk.js +1 -2
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +2 -3
- package/build/project/ios/bundleIdentifier.js +6 -6
- package/build/project/ios/entitlements.js +2 -3
- package/build/project/ios/exemptEncryption.js +1 -2
- package/build/project/ios/scheme.js +2 -3
- package/build/project/ios/target.d.ts +0 -1
- package/build/project/ios/target.js +8 -9
- package/build/project/ios/versions.js +3 -3
- package/build/project/maybeUploadAssetMapAsync.js +1 -2
- package/build/project/maybeUploadFingerprintAsync.js +1 -2
- package/build/project/metroConfig.js +1 -2
- package/build/project/projectUtils.js +15 -16
- package/build/project/publish.d.ts +15 -2
- package/build/project/publish.js +56 -29
- package/build/project/remoteVersionSource.js +6 -6
- package/build/project/resolveRuntimeVersionAsync.js +2 -3
- package/build/project/uploadAccountScopedFileAsync.js +1 -2
- package/build/project/uploadAccountScopedProjectSourceAsync.js +1 -2
- package/build/project/workflow.js +3 -4
- package/build/prompts.js +5 -6
- package/build/rollout/branch-mapping.js +14 -15
- package/build/rollout/utils.js +5 -6
- package/build/run/android/aapt.js +2 -3
- package/build/run/android/adb.js +8 -9
- package/build/run/android/emulator.js +6 -6
- package/build/run/android/run.js +1 -2
- package/build/run/android/sdk.d.ts +0 -1
- package/build/run/android/sdk.js +2 -2
- package/build/run/android/systemRequirements.js +1 -2
- package/build/run/ios/run.js +1 -2
- package/build/run/ios/simctl.js +1 -2
- package/build/run/ios/simulator.js +9 -10
- package/build/run/ios/systemRequirements.js +1 -2
- package/build/run/ios/xcode.js +5 -5
- package/build/run/ios/xcrun.js +3 -4
- package/build/run/run.js +2 -3
- package/build/run/utils.js +1 -2
- package/build/submit/ArchiveSource.js +3 -3
- package/build/submit/android/ServiceAccountSource.js +4 -4
- package/build/submit/commons.js +2 -3
- package/build/submit/context.js +1 -2
- package/build/submit/ios/AppProduce.js +1 -2
- package/build/submit/ios/AppSpecificPasswordSource.js +3 -3
- package/build/submit/ios/AscApiKeySource.js +4 -4
- package/build/submit/ios/utils/language.js +1 -2
- package/build/submit/submit.js +3 -4
- package/build/submit/utils/builds.js +1 -2
- package/build/submit/utils/errors.js +1 -2
- package/build/submit/utils/files.js +2 -3
- package/build/submit/utils/logs.js +1 -2
- package/build/submit/utils/summary.js +2 -3
- package/build/submit/utils/urls.js +2 -3
- package/build/submit/utils/wait.js +2 -3
- package/build/update/android/UpdatesModule.js +2 -3
- package/build/update/configure.js +4 -4
- package/build/update/delete.js +1 -2
- package/build/update/getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync.js +1 -2
- package/build/update/ios/UpdatesModule.js +2 -3
- package/build/update/queries.d.ts +5 -3
- package/build/update/queries.js +12 -9
- package/build/update/republish.js +5 -6
- package/build/update/roll-back-to-embedded.js +1 -2
- package/build/update/utils.js +15 -15
- package/build/uploads.js +3 -4
- package/build/user/User.js +2 -3
- package/build/user/actions.js +1 -2
- package/build/user/expoSsoLauncher.js +1 -2
- package/build/user/fetchSessionSecretAndSsoUser.js +1 -2
- package/build/user/fetchSessionSecretAndUser.js +1 -2
- package/build/user/fetchUser.js +1 -2
- package/build/utils/code-signing.d.ts +0 -1
- package/build/utils/code-signing.js +7 -8
- package/build/utils/date.js +1 -2
- package/build/utils/download.js +2 -3
- package/build/utils/expoCli.js +4 -4
- package/build/utils/expoUpdatesCli.js +2 -2
- package/build/utils/expodash/areSetsEqual.js +1 -1
- package/build/utils/expodash/capitalize.js +1 -1
- package/build/utils/expodash/chunk.js +1 -1
- package/build/utils/expodash/differenceBy.js +1 -1
- package/build/utils/expodash/filter.js +1 -2
- package/build/utils/expodash/groupBy.js +1 -1
- package/build/utils/expodash/intersection.js +1 -1
- package/build/utils/expodash/mapMapAsync.js +1 -1
- package/build/utils/expodash/memoize.js +1 -2
- package/build/utils/expodash/pick.js +1 -1
- package/build/utils/expodash/sortBy.js +1 -1
- package/build/utils/expodash/uniq.js +1 -1
- package/build/utils/expodash/uniqBy.js +1 -1
- package/build/utils/expodash/zipObject.js +1 -1
- package/build/utils/files.js +2 -3
- package/build/utils/formatFields.js +1 -1
- package/build/utils/image.js +3 -3
- package/build/utils/json.js +2 -3
- package/build/utils/plist.d.ts +0 -1
- package/build/utils/plist.js +3 -4
- package/build/utils/pollForBackgroundJobReceiptAsync.js +2 -2
- package/build/utils/profiles.js +3 -4
- package/build/utils/progress.js +1 -2
- package/build/utils/promise.js +1 -2
- package/build/utils/prompts.js +8 -9
- package/build/utils/queries.js +2 -3
- package/build/utils/relay.js +4 -4
- package/build/utils/statuspageService.js +1 -2
- package/build/utils/timer.js +4 -5
- package/build/utils/usage/checkForOverages.js +4 -5
- package/build/utils/variableUtils.js +4 -5
- package/build/vcs/clients/git.js +1 -2
- package/build/vcs/git.js +5 -6
- package/build/vcs/index.js +1 -2
- package/build/vcs/local.js +2 -2
- package/build/webhooks/formatWebhook.js +1 -2
- package/build/webhooks/input.js +3 -4
- package/build/worker/assets.d.ts +0 -1
- package/build/worker/assets.js +6 -7
- package/build/worker/deployment.js +8 -9
- package/build/worker/mutations.d.ts +1 -1
- package/build/worker/queries.d.ts +4 -4
- package/build/worker/upload.d.ts +0 -2
- package/build/worker/upload.js +5 -6
- package/build/worker/utils/logs.js +5 -5
- package/build/worker/utils/multipart.js +3 -3
- package/oclif.manifest.json +35 -1
- package/package.json +13 -11
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.formatDistributionCertificate = formatDistributionCertificate;
|
|
4
|
+
exports.selectDistributionCertificateWithDependenciesAsync = selectDistributionCertificateWithDependenciesAsync;
|
|
5
|
+
exports.selectValidDistributionCertificateAsync = selectValidDistributionCertificateAsync;
|
|
6
|
+
exports.provideOrGenerateDistributionCertificateAsync = provideOrGenerateDistributionCertificateAsync;
|
|
4
7
|
const tslib_1 = require("tslib");
|
|
5
8
|
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
9
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
@@ -41,7 +44,6 @@ function formatDistributionCertificate(distributionCertificate, validSerialNumbe
|
|
|
41
44
|
}
|
|
42
45
|
return line;
|
|
43
46
|
}
|
|
44
|
-
exports.formatDistributionCertificate = formatDistributionCertificate;
|
|
45
47
|
async function selectDistributionCertificateAsync(distCerts, validDistributionCertificates) {
|
|
46
48
|
const validDistCertSerialNumbers = validDistributionCertificates?.map(distCert => distCert.serialNumber);
|
|
47
49
|
const { chosenDistCert } = await (0, prompts_1.promptAsync)({
|
|
@@ -72,7 +74,6 @@ async function selectDistributionCertificateWithDependenciesAsync(ctx, account)
|
|
|
72
74
|
const validDistCerts = (0, CredentialsUtils_1.filterRevokedDistributionCertsFromEasServers)(distCertsForAccount, certInfoFromApple);
|
|
73
75
|
return await selectDistributionCertificateAsync(distCertsForAccount, validDistCerts);
|
|
74
76
|
}
|
|
75
|
-
exports.selectDistributionCertificateWithDependenciesAsync = selectDistributionCertificateWithDependenciesAsync;
|
|
76
77
|
/**
|
|
77
78
|
* select a distribution certificate from a valid set (curated on a best effort basis)
|
|
78
79
|
* */
|
|
@@ -97,7 +98,6 @@ async function selectValidDistributionCertificateAsync(ctx, appLookupParams) {
|
|
|
97
98
|
log_1.default.log(`${validDistCerts.length}/${distCertsForAccount.length} Distribution Certificates are currently valid for Apple Team ${ctx.appStore.authCtx?.team.id}.`);
|
|
98
99
|
return await selectDistributionCertificateAsync(validDistCerts);
|
|
99
100
|
}
|
|
100
|
-
exports.selectValidDistributionCertificateAsync = selectValidDistributionCertificateAsync;
|
|
101
101
|
const APPLE_DIST_CERTS_TOO_MANY_GENERATED_ERROR = `
|
|
102
102
|
You can have only ${chalk_1.default.underline('three')} Apple Distribution Certificates generated on your Apple Developer account.
|
|
103
103
|
Revoke the old ones or reuse existing from your other apps.
|
|
@@ -122,7 +122,6 @@ async function provideOrGenerateDistributionCertificateAsync(ctx) {
|
|
|
122
122
|
}
|
|
123
123
|
return await generateDistributionCertificateAsync(ctx);
|
|
124
124
|
}
|
|
125
|
-
exports.provideOrGenerateDistributionCertificateAsync = provideOrGenerateDistributionCertificateAsync;
|
|
126
125
|
async function promptForDistCertAsync(ctx) {
|
|
127
126
|
let initialValues = {};
|
|
128
127
|
if (ctx.appStore.authCtx) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.formatProvisioningProfileFromApple = formatProvisioningProfileFromApple;
|
|
4
|
+
exports.generateProvisioningProfileAsync = generateProvisioningProfileAsync;
|
|
4
5
|
const tslib_1 = require("tslib");
|
|
5
6
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
7
|
const target_1 = require("../../../project/ios/target");
|
|
@@ -12,7 +13,6 @@ function formatProvisioningProfileFromApple(appleInfo) {
|
|
|
12
13
|
const details = chalk_1.default.green(`\n Name: ${name}\n Expiry: ${expiryString}`);
|
|
13
14
|
return `Provisioning Profile - ID: ${id}${details}`;
|
|
14
15
|
}
|
|
15
|
-
exports.formatProvisioningProfileFromApple = formatProvisioningProfileFromApple;
|
|
16
16
|
async function generateProvisioningProfileAsync(ctx, target, bundleIdentifier, distCert) {
|
|
17
17
|
const appleAuthCtx = await ctx.appStore.ensureAuthenticatedAsync();
|
|
18
18
|
const type = appleAuthCtx.team.inHouse ? 'Enterprise ' : 'AppStore';
|
|
@@ -20,4 +20,3 @@ async function generateProvisioningProfileAsync(ctx, target, bundleIdentifier, d
|
|
|
20
20
|
const applePlatform = (0, target_1.getApplePlatformFromTarget)(target);
|
|
21
21
|
return await ctx.appStore.createProvisioningProfileAsync(bundleIdentifier, distCert, profileName, applePlatform);
|
|
22
22
|
}
|
|
23
|
-
exports.generateProvisioningProfileAsync = generateProvisioningProfileAsync;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.provideOrGeneratePushKeyAsync = provideOrGeneratePushKeyAsync;
|
|
4
|
+
exports.selectPushKeyAsync = selectPushKeyAsync;
|
|
5
|
+
exports.getValidAndTrackedPushKeysOnEasServersAsync = getValidAndTrackedPushKeysOnEasServersAsync;
|
|
6
|
+
exports.sortPushKeys = sortPushKeys;
|
|
7
|
+
exports.formatPushKey = formatPushKey;
|
|
4
8
|
const tslib_1 = require("tslib");
|
|
5
9
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
10
|
const AppleTeamFormatting_1 = require("./AppleTeamFormatting");
|
|
@@ -38,7 +42,6 @@ async function provideOrGeneratePushKeyAsync(ctx) {
|
|
|
38
42
|
}
|
|
39
43
|
return await generatePushKeyAsync(ctx);
|
|
40
44
|
}
|
|
41
|
-
exports.provideOrGeneratePushKeyAsync = provideOrGeneratePushKeyAsync;
|
|
42
45
|
async function promptForPushKeyAsync(ctx) {
|
|
43
46
|
let initialValues = {};
|
|
44
47
|
if (ctx.appStore.authCtx) {
|
|
@@ -116,12 +119,10 @@ async function selectPushKeyAsync(ctx, account) {
|
|
|
116
119
|
const validPushKeys = await getValidAndTrackedPushKeysOnEasServersAsync(ctx, pushKeysForAccount);
|
|
117
120
|
return await selectPushKeysAsync(pushKeysForAccount, validPushKeys);
|
|
118
121
|
}
|
|
119
|
-
exports.selectPushKeyAsync = selectPushKeyAsync;
|
|
120
122
|
async function getValidAndTrackedPushKeysOnEasServersAsync(ctx, pushKeysForAccount) {
|
|
121
123
|
const pushInfoFromApple = await ctx.appStore.listPushKeysAsync();
|
|
122
124
|
return await (0, CredentialsUtils_1.filterRevokedAndUntrackedPushKeysFromEasServersAsync)(pushKeysForAccount, pushInfoFromApple);
|
|
123
125
|
}
|
|
124
|
-
exports.getValidAndTrackedPushKeysOnEasServersAsync = getValidAndTrackedPushKeysOnEasServersAsync;
|
|
125
126
|
async function selectPushKeysAsync(pushKeys, validPushKeys) {
|
|
126
127
|
const validPushKeyIdentifiers = validPushKeys?.map(pushKey => pushKey.keyIdentifier);
|
|
127
128
|
const sortedPushKeys = sortPushKeys(pushKeys, validPushKeys);
|
|
@@ -148,7 +149,6 @@ function sortPushKeys(pushKeys, validPushKeys) {
|
|
|
148
149
|
return 0;
|
|
149
150
|
});
|
|
150
151
|
}
|
|
151
|
-
exports.sortPushKeys = sortPushKeys;
|
|
152
152
|
function formatPushKey(pushKey, validPushKeyIdentifiers) {
|
|
153
153
|
const { keyIdentifier, appleTeam, updatedAt } = pushKey;
|
|
154
154
|
let line = '';
|
|
@@ -173,4 +173,3 @@ function formatPushKey(pushKey, validPushKeyIdentifiers) {
|
|
|
173
173
|
}
|
|
174
174
|
return line;
|
|
175
175
|
}
|
|
176
|
-
exports.formatPushKey = formatPushKey;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SetUpAdhocProvisioningProfile = void 0;
|
|
4
|
+
exports.doUDIDsMatch = doUDIDsMatch;
|
|
4
5
|
const tslib_1 = require("tslib");
|
|
5
6
|
const apple_utils_1 = require("@expo/apple-utils");
|
|
6
7
|
const core_1 = require("@oclif/core");
|
|
@@ -251,4 +252,3 @@ function doUDIDsMatch(udidsA, udidsB) {
|
|
|
251
252
|
}
|
|
252
253
|
return true;
|
|
253
254
|
}
|
|
254
|
-
exports.doUDIDsMatch = doUDIDsMatch;
|
|
@@ -13,14 +13,18 @@ class SetUpTargetBuildCredentials {
|
|
|
13
13
|
this.options = options;
|
|
14
14
|
}
|
|
15
15
|
async runAsync(ctx) {
|
|
16
|
-
const { app, entitlements } = this.options;
|
|
16
|
+
const { app, entitlements, target } = this.options;
|
|
17
17
|
await ctx.bestEffortAppStoreAuthenticateAsync();
|
|
18
18
|
if (ctx.appStore.authCtx) {
|
|
19
19
|
await ctx.appStore.ensureBundleIdExistsAsync({
|
|
20
20
|
accountName: app.account.name,
|
|
21
21
|
bundleIdentifier: app.bundleIdentifier,
|
|
22
22
|
projectName: app.projectName,
|
|
23
|
-
}, {
|
|
23
|
+
}, {
|
|
24
|
+
entitlements,
|
|
25
|
+
usesBroadcastPushNotifications: ctx.usesBroadcastPushNotifications,
|
|
26
|
+
parentBundleIdentifier: target.parentBundleIdentifier,
|
|
27
|
+
});
|
|
24
28
|
}
|
|
25
29
|
try {
|
|
26
30
|
return await this.setupBuildCredentialsAsync(ctx);
|
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.createOrUpdateIosAppBuildCredentialsAsync = createOrUpdateIosAppBuildCredentialsAsync;
|
|
4
|
+
exports.getIosAppCredentialsWithBuildCredentialsAsync = getIosAppCredentialsWithBuildCredentialsAsync;
|
|
5
|
+
exports.getIosAppCredentialsWithCommonFieldsAsync = getIosAppCredentialsWithCommonFieldsAsync;
|
|
6
|
+
exports.createOrGetIosAppCredentialsWithCommonFieldsAsync = createOrGetIosAppCredentialsWithCommonFieldsAsync;
|
|
7
|
+
exports.updateIosAppCredentialsAsync = updateIosAppCredentialsAsync;
|
|
8
|
+
exports.createOrGetExistingAppleTeamAndUpdateNameIfChangedAsync = createOrGetExistingAppleTeamAndUpdateNameIfChangedAsync;
|
|
9
|
+
exports.createOrGetExistingAppleAppIdentifierAsync = createOrGetExistingAppleAppIdentifierAsync;
|
|
10
|
+
exports.getDevicesForAppleTeamAsync = getDevicesForAppleTeamAsync;
|
|
11
|
+
exports.createProvisioningProfileAsync = createProvisioningProfileAsync;
|
|
12
|
+
exports.getProvisioningProfileAsync = getProvisioningProfileAsync;
|
|
13
|
+
exports.updateProvisioningProfileAsync = updateProvisioningProfileAsync;
|
|
14
|
+
exports.deleteProvisioningProfilesAsync = deleteProvisioningProfilesAsync;
|
|
15
|
+
exports.getDistributionCertificateForAppAsync = getDistributionCertificateForAppAsync;
|
|
16
|
+
exports.getDistributionCertificatesForAccountAsync = getDistributionCertificatesForAccountAsync;
|
|
17
|
+
exports.createDistributionCertificateAsync = createDistributionCertificateAsync;
|
|
18
|
+
exports.deleteDistributionCertificateAsync = deleteDistributionCertificateAsync;
|
|
19
|
+
exports.createPushKeyAsync = createPushKeyAsync;
|
|
20
|
+
exports.getPushKeysForAccountAsync = getPushKeysForAccountAsync;
|
|
21
|
+
exports.getPushKeyForAppAsync = getPushKeyForAppAsync;
|
|
22
|
+
exports.deletePushKeyAsync = deletePushKeyAsync;
|
|
23
|
+
exports.createAscApiKeyAsync = createAscApiKeyAsync;
|
|
24
|
+
exports.getAscApiKeysForAccountAsync = getAscApiKeysForAccountAsync;
|
|
25
|
+
exports.getAscApiKeyForAppSubmissionsAsync = getAscApiKeyForAppSubmissionsAsync;
|
|
26
|
+
exports.deleteAscApiKeyAsync = deleteAscApiKeyAsync;
|
|
4
27
|
const tslib_1 = require("tslib");
|
|
5
28
|
const apple_utils_1 = require("@expo/apple-utils");
|
|
6
29
|
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
@@ -47,7 +70,6 @@ async function createOrUpdateIosAppBuildCredentialsAsync(graphqlClient, appLooku
|
|
|
47
70
|
return await IosAppBuildCredentialsMutation_1.IosAppBuildCredentialsMutation.setProvisioningProfileAsync(graphqlClient, iosAppBuildCredentials.id, appleProvisioningProfileId);
|
|
48
71
|
}
|
|
49
72
|
}
|
|
50
|
-
exports.createOrUpdateIosAppBuildCredentialsAsync = createOrUpdateIosAppBuildCredentialsAsync;
|
|
51
73
|
async function getIosAppCredentialsWithBuildCredentialsAsync(graphqlClient, appLookupParams, { iosDistributionType }) {
|
|
52
74
|
const { account, bundleIdentifier } = appLookupParams;
|
|
53
75
|
const appleAppIdentifier = await AppleAppIdentifierQuery_1.AppleAppIdentifierQuery.byBundleIdentifierAsync(graphqlClient, account.name, bundleIdentifier);
|
|
@@ -60,7 +82,6 @@ async function getIosAppCredentialsWithBuildCredentialsAsync(graphqlClient, appL
|
|
|
60
82
|
iosDistributionType,
|
|
61
83
|
});
|
|
62
84
|
}
|
|
63
|
-
exports.getIosAppCredentialsWithBuildCredentialsAsync = getIosAppCredentialsWithBuildCredentialsAsync;
|
|
64
85
|
async function getIosAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams) {
|
|
65
86
|
const { account, bundleIdentifier } = appLookupParams;
|
|
66
87
|
const appleAppIdentifier = await AppleAppIdentifierQuery_1.AppleAppIdentifierQuery.byBundleIdentifierAsync(graphqlClient, account.name, bundleIdentifier);
|
|
@@ -72,7 +93,6 @@ async function getIosAppCredentialsWithCommonFieldsAsync(graphqlClient, appLooku
|
|
|
72
93
|
appleAppIdentifierId: appleAppIdentifier.id,
|
|
73
94
|
});
|
|
74
95
|
}
|
|
75
|
-
exports.getIosAppCredentialsWithCommonFieldsAsync = getIosAppCredentialsWithCommonFieldsAsync;
|
|
76
96
|
async function createOrGetIosAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams, { appleTeam, }) {
|
|
77
97
|
const maybeIosAppCredentials = await getIosAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams);
|
|
78
98
|
if (maybeIosAppCredentials) {
|
|
@@ -84,7 +104,6 @@ async function createOrGetIosAppCredentialsWithCommonFieldsAsync(graphqlClient,
|
|
|
84
104
|
]);
|
|
85
105
|
return await IosAppCredentialsMutation_1.IosAppCredentialsMutation.createIosAppCredentialsAsync(graphqlClient, { appleTeamId: appleTeam?.id }, app.id, appleAppIdentifier.id);
|
|
86
106
|
}
|
|
87
|
-
exports.createOrGetIosAppCredentialsWithCommonFieldsAsync = createOrGetIosAppCredentialsWithCommonFieldsAsync;
|
|
88
107
|
async function updateIosAppCredentialsAsync(graphqlClient, appCredentials, { applePushKeyId, ascApiKeyIdForSubmissions, }) {
|
|
89
108
|
let updatedAppCredentials = appCredentials;
|
|
90
109
|
if (applePushKeyId) {
|
|
@@ -96,7 +115,6 @@ async function updateIosAppCredentialsAsync(graphqlClient, appCredentials, { app
|
|
|
96
115
|
}
|
|
97
116
|
return updatedAppCredentials;
|
|
98
117
|
}
|
|
99
|
-
exports.updateIosAppCredentialsAsync = updateIosAppCredentialsAsync;
|
|
100
118
|
async function createOrGetExistingIosAppCredentialsWithBuildCredentialsAsync(graphqlClient, appLookupParams, { appleTeam, appleAppIdentifierId, iosDistributionType, }) {
|
|
101
119
|
const maybeIosAppCredentials = await getIosAppCredentialsWithBuildCredentialsAsync(graphqlClient, appLookupParams, {
|
|
102
120
|
iosDistributionType,
|
|
@@ -132,7 +150,6 @@ async function createOrGetExistingAppleTeamAndUpdateNameIfChangedAsync(graphqlCl
|
|
|
132
150
|
return await AppleTeamMutation_1.AppleTeamMutation.createAppleTeamAsync(graphqlClient, { appleTeamIdentifier, appleTeamName }, accountId);
|
|
133
151
|
}
|
|
134
152
|
}
|
|
135
|
-
exports.createOrGetExistingAppleTeamAndUpdateNameIfChangedAsync = createOrGetExistingAppleTeamAndUpdateNameIfChangedAsync;
|
|
136
153
|
async function createOrGetExistingAppleAppIdentifierAsync(graphqlClient, { account, projectName, bundleIdentifier, parentBundleIdentifier }, appleTeam) {
|
|
137
154
|
const appleAppIdentifier = await AppleAppIdentifierQuery_1.AppleAppIdentifierQuery.byBundleIdentifierAsync(graphqlClient, account.name, bundleIdentifier);
|
|
138
155
|
if (appleAppIdentifier) {
|
|
@@ -152,17 +169,14 @@ async function createOrGetExistingAppleAppIdentifierAsync(graphqlClient, { accou
|
|
|
152
169
|
}, account.id);
|
|
153
170
|
}
|
|
154
171
|
}
|
|
155
|
-
exports.createOrGetExistingAppleAppIdentifierAsync = createOrGetExistingAppleAppIdentifierAsync;
|
|
156
172
|
async function getDevicesForAppleTeamAsync(graphqlClient, { account }, { appleTeamIdentifier }, { useCache = true } = {}) {
|
|
157
173
|
return await AppleDeviceQuery_1.AppleDeviceQuery.getAllByAppleTeamIdentifierAsync(graphqlClient, account.name, appleTeamIdentifier, {
|
|
158
174
|
useCache,
|
|
159
175
|
});
|
|
160
176
|
}
|
|
161
|
-
exports.getDevicesForAppleTeamAsync = getDevicesForAppleTeamAsync;
|
|
162
177
|
async function createProvisioningProfileAsync(graphqlClient, { account }, appleAppIdentifier, appleProvisioningProfileInput) {
|
|
163
178
|
return await AppleProvisioningProfileMutation_1.AppleProvisioningProfileMutation.createAppleProvisioningProfileAsync(graphqlClient, appleProvisioningProfileInput, account.id, appleAppIdentifier.id);
|
|
164
179
|
}
|
|
165
|
-
exports.createProvisioningProfileAsync = createProvisioningProfileAsync;
|
|
166
180
|
async function getProvisioningProfileAsync(graphqlClient, appLookupParams, iosDistributionType, { appleTeam } = { appleTeam: null }) {
|
|
167
181
|
const projectFullName = formatProjectFullName(appLookupParams);
|
|
168
182
|
const appleAppIdentifier = await createOrGetExistingAppleAppIdentifierAsync(graphqlClient, appLookupParams, appleTeam);
|
|
@@ -171,15 +185,12 @@ async function getProvisioningProfileAsync(graphqlClient, appLookupParams, iosDi
|
|
|
171
185
|
iosDistributionType,
|
|
172
186
|
});
|
|
173
187
|
}
|
|
174
|
-
exports.getProvisioningProfileAsync = getProvisioningProfileAsync;
|
|
175
188
|
async function updateProvisioningProfileAsync(graphqlClient, appleProvisioningProfileId, appleProvisioningProfileInput) {
|
|
176
189
|
return await AppleProvisioningProfileMutation_1.AppleProvisioningProfileMutation.updateAppleProvisioningProfileAsync(graphqlClient, appleProvisioningProfileId, appleProvisioningProfileInput);
|
|
177
190
|
}
|
|
178
|
-
exports.updateProvisioningProfileAsync = updateProvisioningProfileAsync;
|
|
179
191
|
async function deleteProvisioningProfilesAsync(graphqlClient, appleProvisioningProfileIds) {
|
|
180
192
|
await AppleProvisioningProfileMutation_1.AppleProvisioningProfileMutation.deleteAppleProvisioningProfilesAsync(graphqlClient, appleProvisioningProfileIds);
|
|
181
193
|
}
|
|
182
|
-
exports.deleteProvisioningProfilesAsync = deleteProvisioningProfilesAsync;
|
|
183
194
|
async function getDistributionCertificateForAppAsync(graphqlClient, appLookupParams, iosDistributionType, { appleTeam } = { appleTeam: null }) {
|
|
184
195
|
const projectFullName = formatProjectFullName(appLookupParams);
|
|
185
196
|
const appleAppIdentifier = await createOrGetExistingAppleAppIdentifierAsync(graphqlClient, appLookupParams, appleTeam);
|
|
@@ -188,11 +199,9 @@ async function getDistributionCertificateForAppAsync(graphqlClient, appLookupPar
|
|
|
188
199
|
iosDistributionType,
|
|
189
200
|
});
|
|
190
201
|
}
|
|
191
|
-
exports.getDistributionCertificateForAppAsync = getDistributionCertificateForAppAsync;
|
|
192
202
|
async function getDistributionCertificatesForAccountAsync(graphqlClient, account) {
|
|
193
203
|
return await AppleDistributionCertificateQuery_1.AppleDistributionCertificateQuery.getAllForAccountAsync(graphqlClient, account.name);
|
|
194
204
|
}
|
|
195
|
-
exports.getDistributionCertificatesForAccountAsync = getDistributionCertificatesForAccountAsync;
|
|
196
205
|
async function createDistributionCertificateAsync(graphqlClient, account, distCert) {
|
|
197
206
|
const appleTeam = await createOrGetExistingAppleTeamAndUpdateNameIfChangedAsync(graphqlClient, account.id, {
|
|
198
207
|
appleTeamIdentifier: distCert.teamId,
|
|
@@ -206,11 +215,9 @@ async function createDistributionCertificateAsync(graphqlClient, account, distCe
|
|
|
206
215
|
appleTeamId: appleTeam.id,
|
|
207
216
|
}, account.id);
|
|
208
217
|
}
|
|
209
|
-
exports.createDistributionCertificateAsync = createDistributionCertificateAsync;
|
|
210
218
|
async function deleteDistributionCertificateAsync(graphqlClient, distributionCertificateId) {
|
|
211
219
|
await AppleDistributionCertificateMutation_1.AppleDistributionCertificateMutation.deleteAppleDistributionCertificateAsync(graphqlClient, distributionCertificateId);
|
|
212
220
|
}
|
|
213
|
-
exports.deleteDistributionCertificateAsync = deleteDistributionCertificateAsync;
|
|
214
221
|
async function createPushKeyAsync(graphqlClient, account, pushKey) {
|
|
215
222
|
const appleTeam = await createOrGetExistingAppleTeamAndUpdateNameIfChangedAsync(graphqlClient, account.id, {
|
|
216
223
|
appleTeamIdentifier: pushKey.teamId,
|
|
@@ -222,20 +229,16 @@ async function createPushKeyAsync(graphqlClient, account, pushKey) {
|
|
|
222
229
|
appleTeamId: appleTeam.id,
|
|
223
230
|
}, account.id);
|
|
224
231
|
}
|
|
225
|
-
exports.createPushKeyAsync = createPushKeyAsync;
|
|
226
232
|
async function getPushKeysForAccountAsync(graphqlClient, account) {
|
|
227
233
|
return await ApplePushKeyQuery_1.ApplePushKeyQuery.getAllForAccountAsync(graphqlClient, account.name);
|
|
228
234
|
}
|
|
229
|
-
exports.getPushKeysForAccountAsync = getPushKeysForAccountAsync;
|
|
230
235
|
async function getPushKeyForAppAsync(graphqlClient, appLookupParams) {
|
|
231
236
|
const maybeIosAppCredentials = await getIosAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams);
|
|
232
237
|
return maybeIosAppCredentials?.pushKey ?? null;
|
|
233
238
|
}
|
|
234
|
-
exports.getPushKeyForAppAsync = getPushKeyForAppAsync;
|
|
235
239
|
async function deletePushKeyAsync(graphqlClient, pushKeyId) {
|
|
236
240
|
await ApplePushKeyMutation_1.ApplePushKeyMutation.deleteApplePushKeyAsync(graphqlClient, pushKeyId);
|
|
237
241
|
}
|
|
238
|
-
exports.deletePushKeyAsync = deletePushKeyAsync;
|
|
239
242
|
async function createAscApiKeyAsync(graphqlClient, account, ascApiKey) {
|
|
240
243
|
const maybeAppleTeam = ascApiKey.teamId
|
|
241
244
|
? await createOrGetExistingAppleTeamAndUpdateNameIfChangedAsync(graphqlClient, account.id, {
|
|
@@ -252,20 +255,16 @@ async function createAscApiKeyAsync(graphqlClient, account, ascApiKey) {
|
|
|
252
255
|
appleTeamId: maybeAppleTeam ? maybeAppleTeam.id : null,
|
|
253
256
|
}, account.id);
|
|
254
257
|
}
|
|
255
|
-
exports.createAscApiKeyAsync = createAscApiKeyAsync;
|
|
256
258
|
async function getAscApiKeysForAccountAsync(graphqlClient, account) {
|
|
257
259
|
return await AppStoreConnectApiKeyQuery_1.AppStoreConnectApiKeyQuery.getAllForAccountAsync(graphqlClient, account.name);
|
|
258
260
|
}
|
|
259
|
-
exports.getAscApiKeysForAccountAsync = getAscApiKeysForAccountAsync;
|
|
260
261
|
async function getAscApiKeyForAppSubmissionsAsync(graphqlClient, appLookupParams) {
|
|
261
262
|
const maybeIosAppCredentials = await getIosAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams);
|
|
262
263
|
return maybeIosAppCredentials?.appStoreConnectApiKeyForSubmissions ?? null;
|
|
263
264
|
}
|
|
264
|
-
exports.getAscApiKeyForAppSubmissionsAsync = getAscApiKeyForAppSubmissionsAsync;
|
|
265
265
|
async function deleteAscApiKeyAsync(graphqlClient, ascApiKeyId) {
|
|
266
266
|
await AppStoreConnectApiKeyMutation_1.AppStoreConnectApiKeyMutation.deleteAppStoreConnectApiKeyAsync(graphqlClient, ascApiKeyId);
|
|
267
267
|
}
|
|
268
|
-
exports.deleteAscApiKeyAsync = deleteAscApiKeyAsync;
|
|
269
268
|
function convertUserRoleToGraphqlType(userRole) {
|
|
270
269
|
switch (userRole) {
|
|
271
270
|
case apple_utils_1.UserRole.ADMIN:
|
|
@@ -3,9 +3,9 @@ import { AppStoreConnectApiKeyFragment, AppStoreConnectApiKeysPaginatedByAccount
|
|
|
3
3
|
export declare const AppStoreConnectApiKeyQuery: {
|
|
4
4
|
getAllForAccountAsync(graphqlClient: ExpoGraphqlClient, accountName: string): Promise<AppStoreConnectApiKeyFragment[]>;
|
|
5
5
|
getAllForAccountPaginatedAsync(graphqlClient: ExpoGraphqlClient, accountName: string, { after, first, before, last, }: {
|
|
6
|
-
after?: string
|
|
7
|
-
first?: number
|
|
8
|
-
before?: string
|
|
9
|
-
last?: number
|
|
10
|
-
}): Promise<AppStoreConnectApiKeysPaginatedByAccountQuery[
|
|
6
|
+
after?: string;
|
|
7
|
+
first?: number;
|
|
8
|
+
before?: string;
|
|
9
|
+
last?: number;
|
|
10
|
+
}): Promise<AppStoreConnectApiKeysPaginatedByAccountQuery["account"]["byName"]["appStoreConnectApiKeysPaginated"]>;
|
|
11
11
|
};
|
|
@@ -12,16 +12,16 @@ export type AppleDevicesByIdentifierQueryResult = AppleDeviceQueryResult & {
|
|
|
12
12
|
};
|
|
13
13
|
export declare const AppleDeviceQuery: {
|
|
14
14
|
getAllByAppleTeamIdentifierAsync(graphqlClient: ExpoGraphqlClient, accountName: string, appleTeamIdentifier: string, { useCache }?: {
|
|
15
|
-
useCache?: boolean
|
|
15
|
+
useCache?: boolean;
|
|
16
16
|
}): Promise<AppleDeviceFragmentWithAppleTeam[]>;
|
|
17
17
|
getAllForAppleTeamAsync(graphqlClient: ExpoGraphqlClient, { accountName, appleTeamIdentifier, offset, limit }: AppleDevicesByTeamIdentifierQueryVariables): Promise<AppleDeviceFragment[]>;
|
|
18
18
|
getByDeviceIdentifierAsync(graphqlClient: ExpoGraphqlClient, accountName: string, identifier: string): Promise<AppleDeviceFragmentWithAppleTeam>;
|
|
19
19
|
getAllForAccountPaginatedAsync(graphqlClient: ExpoGraphqlClient, accountName: string, { after, first, before, last, filter, useCache, }: {
|
|
20
|
-
after?: string
|
|
21
|
-
first?: number
|
|
22
|
-
before?: string
|
|
23
|
-
last?: number
|
|
24
|
-
filter?: AppleDeviceFilterInput
|
|
25
|
-
useCache?: boolean
|
|
26
|
-
}): Promise<AppleDevicesPaginatedByAccountQuery[
|
|
20
|
+
after?: string;
|
|
21
|
+
first?: number;
|
|
22
|
+
before?: string;
|
|
23
|
+
last?: number;
|
|
24
|
+
filter?: AppleDeviceFilterInput;
|
|
25
|
+
useCache?: boolean;
|
|
26
|
+
}): Promise<AppleDevicesPaginatedByAccountQuery["account"]["byName"]["appleDevicesPaginated"]>;
|
|
27
27
|
};
|
|
@@ -7,9 +7,9 @@ export declare const AppleDistributionCertificateQuery: {
|
|
|
7
7
|
}): Promise<AppleDistributionCertificateFragment | null>;
|
|
8
8
|
getAllForAccountAsync(graphqlClient: ExpoGraphqlClient, accountName: string): Promise<AppleDistributionCertificateFragment[]>;
|
|
9
9
|
getAllForAccountPaginatedAsync(graphqlClient: ExpoGraphqlClient, accountName: string, { after, first, before, last, }: {
|
|
10
|
-
after?: string
|
|
11
|
-
first?: number
|
|
12
|
-
before?: string
|
|
13
|
-
last?: number
|
|
14
|
-
}): Promise<AppleDistributionCertificatesPaginatedByAccountQuery[
|
|
10
|
+
after?: string;
|
|
11
|
+
first?: number;
|
|
12
|
+
before?: string;
|
|
13
|
+
last?: number;
|
|
14
|
+
}): Promise<AppleDistributionCertificatesPaginatedByAccountQuery["account"]["byName"]["appleDistributionCertificatesPaginated"]>;
|
|
15
15
|
};
|
|
@@ -3,9 +3,9 @@ import { ApplePushKeyFragment, ApplePushKeysPaginatedByAccountQuery } from '../.
|
|
|
3
3
|
export declare const ApplePushKeyQuery: {
|
|
4
4
|
getAllForAccountAsync(graphqlClient: ExpoGraphqlClient, accountName: string): Promise<ApplePushKeyFragment[]>;
|
|
5
5
|
getAllForAccountPaginatedAsync(graphqlClient: ExpoGraphqlClient, accountName: string, { after, first, before, last, }: {
|
|
6
|
-
after?: string
|
|
7
|
-
first?: number
|
|
8
|
-
before?: string
|
|
9
|
-
last?: number
|
|
10
|
-
}): Promise<ApplePushKeysPaginatedByAccountQuery[
|
|
6
|
+
after?: string;
|
|
7
|
+
first?: number;
|
|
8
|
+
before?: string;
|
|
9
|
+
last?: number;
|
|
10
|
+
}): Promise<ApplePushKeysPaginatedByAccountQuery["account"]["byName"]["applePushKeysPaginated"]>;
|
|
11
11
|
};
|
|
@@ -3,7 +3,7 @@ import { CommonIosAppCredentialsFragment, IosDistributionType } from '../../../.
|
|
|
3
3
|
export declare const IosAppCredentialsQuery: {
|
|
4
4
|
withBuildCredentialsByAppIdentifierIdAsync(graphqlClient: ExpoGraphqlClient, projectFullName: string, { appleAppIdentifierId, iosDistributionType, }: {
|
|
5
5
|
appleAppIdentifierId: string;
|
|
6
|
-
iosDistributionType?: IosDistributionType
|
|
6
|
+
iosDistributionType?: IosDistributionType;
|
|
7
7
|
}): Promise<CommonIosAppCredentialsFragment | null>;
|
|
8
8
|
withCommonFieldsByAppIdentifierIdAsync(graphqlClient: ExpoGraphqlClient, projectFullName: string, { appleAppIdentifierId, }: {
|
|
9
9
|
appleAppIdentifierId: string;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="@expo/apple-utils/ts-declarations/expo__app-store" />
|
|
2
|
-
/// <reference types="@expo/apple-utils/ts-declarations/expo__app-store" />
|
|
3
1
|
import { ProfileType } from '@expo/app-store';
|
|
4
2
|
import { AscApiKey, AscApiKeyInfo, DistributionCertificate, DistributionCertificateStoreInfo, ProvisioningProfile, ProvisioningProfileStoreInfo, PushKey, PushKeyStoreInfo } from './Credentials.types';
|
|
5
3
|
import { Options as AuthenticateOptions } from './authenticate';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.formatDistributionCertificate = formatDistributionCertificate;
|
|
4
|
+
exports.isDistributionCertificate = isDistributionCertificate;
|
|
5
|
+
exports.formatPushKey = formatPushKey;
|
|
6
|
+
exports.isPushKey = isPushKey;
|
|
4
7
|
const tslib_1 = require("tslib");
|
|
5
8
|
const dateformat_1 = tslib_1.__importDefault(require("dateformat"));
|
|
6
9
|
function formatDistributionCertificate({ name, id, status, expires, created, ownerName, }) {
|
|
@@ -8,7 +11,6 @@ function formatDistributionCertificate({ name, id, status, expires, created, own
|
|
|
8
11
|
const createdDate = formatTimestamp(created);
|
|
9
12
|
return `${name} (${status}) - ID: ${id} - expires: ${expiresDate} (created: ${createdDate}) - owner: ${ownerName}`;
|
|
10
13
|
}
|
|
11
|
-
exports.formatDistributionCertificate = formatDistributionCertificate;
|
|
12
14
|
function isDistributionCertificate(val) {
|
|
13
15
|
return (val.certP12 &&
|
|
14
16
|
typeof val.certP12 === 'string' &&
|
|
@@ -17,11 +19,9 @@ function isDistributionCertificate(val) {
|
|
|
17
19
|
val.teamId &&
|
|
18
20
|
typeof val.teamId === 'string');
|
|
19
21
|
}
|
|
20
|
-
exports.isDistributionCertificate = isDistributionCertificate;
|
|
21
22
|
function formatPushKey({ id, name }) {
|
|
22
23
|
return `${name} - ID: ${id}`;
|
|
23
24
|
}
|
|
24
|
-
exports.formatPushKey = formatPushKey;
|
|
25
25
|
function isPushKey(obj) {
|
|
26
26
|
return (obj.apnsKeyP8 &&
|
|
27
27
|
typeof obj.apnsKeyP8 === 'string' &&
|
|
@@ -30,7 +30,6 @@ function isPushKey(obj) {
|
|
|
30
30
|
obj.teamId &&
|
|
31
31
|
typeof obj.teamId === 'string');
|
|
32
32
|
}
|
|
33
|
-
exports.isPushKey = isPushKey;
|
|
34
33
|
function formatTimestamp(timestamp) {
|
|
35
34
|
return (0, dateformat_1.default)(new Date(timestamp * 1000));
|
|
36
35
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.filterRevokedAndUntrackedPushKeysAsync = filterRevokedAndUntrackedPushKeysAsync;
|
|
4
|
+
exports.filterRevokedAndUntrackedPushKeysFromEasServersAsync = filterRevokedAndUntrackedPushKeysFromEasServersAsync;
|
|
5
|
+
exports.filterRevokedDistributionCertsFromEasServers = filterRevokedDistributionCertsFromEasServers;
|
|
6
|
+
exports.filterRevokedDistributionCerts = filterRevokedDistributionCerts;
|
|
7
|
+
exports.sortCertificatesByExpiryDesc = sortCertificatesByExpiryDesc;
|
|
8
|
+
exports.getValidCertSerialNumbers = getValidCertSerialNumbers;
|
|
4
9
|
/**
|
|
5
10
|
* Edge case: Uploaded push keys rely on the user to provide the keyIdentifier, which could be incorrect
|
|
6
11
|
* It is possible an uploaded key could have a valid p8 but invalid identifier, making it impossible for us to
|
|
@@ -13,7 +18,6 @@ async function filterRevokedAndUntrackedPushKeysAsync(pushKeys, pushInfoFromAppl
|
|
|
13
18
|
return validKeyIdsOnAppleServer.includes(pushKey.apnsKeyId);
|
|
14
19
|
});
|
|
15
20
|
}
|
|
16
|
-
exports.filterRevokedAndUntrackedPushKeysAsync = filterRevokedAndUntrackedPushKeysAsync;
|
|
17
21
|
/**
|
|
18
22
|
* Edge case: Uploaded push keys rely on the user to provide the keyIdentifier, which could be incorrect
|
|
19
23
|
* It is possible an uploaded key could have a valid p8 but invalid identifier, making it impossible for us to
|
|
@@ -26,7 +30,6 @@ async function filterRevokedAndUntrackedPushKeysFromEasServersAsync(pushKeys, pu
|
|
|
26
30
|
return validKeyIdsOnAppleServer.includes(pushKey.keyIdentifier);
|
|
27
31
|
});
|
|
28
32
|
}
|
|
29
|
-
exports.filterRevokedAndUntrackedPushKeysFromEasServersAsync = filterRevokedAndUntrackedPushKeysFromEasServersAsync;
|
|
30
33
|
function filterRevokedDistributionCertsFromEasServers(distributionCerts, certInfoFromApple) {
|
|
31
34
|
if (distributionCerts.length === 0) {
|
|
32
35
|
return [];
|
|
@@ -39,7 +42,6 @@ function filterRevokedDistributionCertsFromEasServers(distributionCerts, certInf
|
|
|
39
42
|
.map(cert => cert.serialNumber);
|
|
40
43
|
return distributionCerts.filter(cert => validCertSerialsOnAppleServer.includes(cert.serialNumber));
|
|
41
44
|
}
|
|
42
|
-
exports.filterRevokedDistributionCertsFromEasServers = filterRevokedDistributionCertsFromEasServers;
|
|
43
45
|
function filterRevokedDistributionCerts(distributionCerts, certInfoFromApple) {
|
|
44
46
|
if (distributionCerts.length === 0) {
|
|
45
47
|
return [];
|
|
@@ -58,7 +60,6 @@ function filterRevokedDistributionCerts(distributionCerts, certInfoFromApple) {
|
|
|
58
60
|
});
|
|
59
61
|
return validDistributionCerts;
|
|
60
62
|
}
|
|
61
|
-
exports.filterRevokedDistributionCerts = filterRevokedDistributionCerts;
|
|
62
63
|
function sortCertificatesByExpiryDesc(certInfoFromApple, distributionCerts) {
|
|
63
64
|
return distributionCerts.sort((certA, certB) => {
|
|
64
65
|
const certAInfo = certInfoFromApple.find(cert => cert.id === certA.certId);
|
|
@@ -68,7 +69,6 @@ function sortCertificatesByExpiryDesc(certInfoFromApple, distributionCerts) {
|
|
|
68
69
|
return certBExpiry - certAExpiry;
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
|
-
exports.sortCertificatesByExpiryDesc = sortCertificatesByExpiryDesc;
|
|
72
72
|
function getValidCertSerialNumbers(certInfoFromApple) {
|
|
73
73
|
return certInfoFromApple
|
|
74
74
|
.filter(
|
|
@@ -76,4 +76,3 @@ function getValidCertSerialNumbers(certInfoFromApple) {
|
|
|
76
76
|
cert => cert.expires > Math.floor(Date.now() / 1000))
|
|
77
77
|
.map(cert => cert.serialNumber);
|
|
78
78
|
}
|
|
79
|
-
exports.getValidCertSerialNumbers = getValidCertSerialNumbers;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.listAscApiKeysAsync = listAscApiKeysAsync;
|
|
4
|
+
exports.getAscApiKeyAsync = getAscApiKeyAsync;
|
|
5
|
+
exports.downloadWithRetryAsync = downloadWithRetryAsync;
|
|
6
|
+
exports.createAscApiKeyAsync = createAscApiKeyAsync;
|
|
7
|
+
exports.revokeAscApiKeyAsync = revokeAscApiKeyAsync;
|
|
8
|
+
exports.getAscApiKeyInfo = getAscApiKeyInfo;
|
|
4
9
|
const tslib_1 = require("tslib");
|
|
5
10
|
const apple_utils_1 = require("@expo/apple-utils");
|
|
6
11
|
const promise_retry_1 = tslib_1.__importDefault(require("promise-retry"));
|
|
@@ -25,7 +30,6 @@ async function listAscApiKeysAsync(userAuthCtx) {
|
|
|
25
30
|
throw error;
|
|
26
31
|
}
|
|
27
32
|
}
|
|
28
|
-
exports.listAscApiKeysAsync = listAscApiKeysAsync;
|
|
29
33
|
/**
|
|
30
34
|
* Get an App Store Connect API Key.
|
|
31
35
|
* **Does not support App Store Connect API (CI).**
|
|
@@ -49,7 +53,6 @@ async function getAscApiKeyAsync(userAuthCtx, keyId) {
|
|
|
49
53
|
throw error;
|
|
50
54
|
}
|
|
51
55
|
}
|
|
52
|
-
exports.getAscApiKeyAsync = getAscApiKeyAsync;
|
|
53
56
|
/**
|
|
54
57
|
* There is a bug in Apple's infrastructure that does not propagate newly created objects for a
|
|
55
58
|
* while. If the key has not propagated and you try to download it, Apple will error saying that
|
|
@@ -97,7 +100,6 @@ async function downloadWithRetryAsync(analytics, key, { minTimeout = 1000, retri
|
|
|
97
100
|
throw e;
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
|
-
exports.downloadWithRetryAsync = downloadWithRetryAsync;
|
|
101
103
|
/**
|
|
102
104
|
* Create an App Store Connect API Key.
|
|
103
105
|
* **Does not support App Store Connect API (CI).**
|
|
@@ -138,7 +140,6 @@ async function createAscApiKeyAsync(analytics, userAuthCtx, { nickname, allAppsV
|
|
|
138
140
|
throw err;
|
|
139
141
|
}
|
|
140
142
|
}
|
|
141
|
-
exports.createAscApiKeyAsync = createAscApiKeyAsync;
|
|
142
143
|
/**
|
|
143
144
|
* Revoke an App Store Connect API Key.
|
|
144
145
|
* **Does not support App Store Connect API (CI).**
|
|
@@ -158,7 +159,6 @@ async function revokeAscApiKeyAsync(userAuthCtx, keyId) {
|
|
|
158
159
|
throw error;
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
|
-
exports.revokeAscApiKeyAsync = revokeAscApiKeyAsync;
|
|
162
162
|
function getAscApiKeyInfo(apiKey, authCtx) {
|
|
163
163
|
return {
|
|
164
164
|
name: apiKey.attributes.nickname,
|
|
@@ -170,4 +170,3 @@ function getAscApiKeyInfo(apiKey, authCtx) {
|
|
|
170
170
|
isRevoked: !!apiKey.attributes.revokingDate,
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
|
-
exports.getAscApiKeyInfo = getAscApiKeyInfo;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="@expo/apple-utils/ts-declarations/expo__app-store" />
|
|
2
1
|
import { RequestContext, Session } from '@expo/apple-utils';
|
|
3
2
|
import { AppleTeamType, AuthCtx, AuthenticationMode, UserAuthCtx } from './authenticateTypes';
|
|
4
3
|
import { MinimalAscApiKey } from '../credentials';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isUserAuthCtx = isUserAuthCtx;
|
|
4
|
+
exports.assertUserAuthCtx = assertUserAuthCtx;
|
|
5
|
+
exports.getRequestContext = getRequestContext;
|
|
6
|
+
exports.authenticateAsync = authenticateAsync;
|
|
4
7
|
const tslib_1 = require("tslib");
|
|
5
8
|
const apple_utils_1 = require("@expo/apple-utils");
|
|
6
9
|
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
@@ -14,19 +17,16 @@ const APPLE_IN_HOUSE_TEAM_TYPE = 'in-house';
|
|
|
14
17
|
function isUserAuthCtx(authCtx) {
|
|
15
18
|
return !!authCtx && typeof authCtx.appleId === 'string';
|
|
16
19
|
}
|
|
17
|
-
exports.isUserAuthCtx = isUserAuthCtx;
|
|
18
20
|
function assertUserAuthCtx(authCtx) {
|
|
19
21
|
if (isUserAuthCtx(authCtx)) {
|
|
20
22
|
return authCtx;
|
|
21
23
|
}
|
|
22
24
|
throw new Error('Expected user authentication context (login/password).');
|
|
23
25
|
}
|
|
24
|
-
exports.assertUserAuthCtx = assertUserAuthCtx;
|
|
25
26
|
function getRequestContext(authCtx) {
|
|
26
27
|
(0, assert_1.default)(authCtx.authState?.context, 'Apple request context must be defined');
|
|
27
28
|
return authCtx.authState.context;
|
|
28
29
|
}
|
|
29
|
-
exports.getRequestContext = getRequestContext;
|
|
30
30
|
async function loginAsync(userCredentials = {}, options) {
|
|
31
31
|
// First try login with cookies JSON
|
|
32
32
|
if (userCredentials.cookies) {
|
|
@@ -101,7 +101,6 @@ async function authenticateAsync(options = {}) {
|
|
|
101
101
|
return await authenticateAsUserAsync(options);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
exports.authenticateAsync = authenticateAsync;
|
|
105
104
|
async function authenticateWithApiKeyAsync(options = {}) {
|
|
106
105
|
// Resolve the user credentials, optimizing for password-less login.
|
|
107
106
|
const ascApiKey = await (0, resolveCredentials_1.resolveAscApiKeyAsync)(options.ascApiKey);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="@expo/apple-utils/ts-declarations/expo__app-store" />
|
|
2
1
|
import { BundleId, Profile, RequestContext } from '@expo/apple-utils';
|
|
3
2
|
export declare function getProfilesForBundleIdAsync(context: RequestContext, bundleIdentifier: string): Promise<Profile[]>;
|
|
4
3
|
export declare function getBundleIdForIdentifierAsync(context: RequestContext, bundleIdentifier: string): Promise<BundleId>;
|