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,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.canCopyLegacyCredentialsAsync = canCopyLegacyCredentialsAsync;
|
|
4
|
+
exports.promptUserAndCopyLegacyCredentialsAsync = promptUserAndCopyLegacyCredentialsAsync;
|
|
5
|
+
exports.getAppLookupParamsFromContextAsync = getAppLookupParamsFromContextAsync;
|
|
6
|
+
exports.createOrUpdateDefaultAndroidAppBuildCredentialsAsync = createOrUpdateDefaultAndroidAppBuildCredentialsAsync;
|
|
7
|
+
exports.promptForNameAsync = promptForNameAsync;
|
|
8
|
+
exports.sortBuildCredentials = sortBuildCredentials;
|
|
4
9
|
const tslib_1 = require("tslib");
|
|
5
10
|
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
11
|
const nanoid_1 = require("nanoid");
|
|
@@ -21,7 +26,6 @@ async function canCopyLegacyCredentialsAsync(ctx, app) {
|
|
|
21
26
|
const legacyAppCredentials = await ctx.android.getLegacyAndroidAppCredentialsWithCommonFieldsAsync(ctx.graphqlClient, app);
|
|
22
27
|
return !!legacyAppCredentials; // user has some legacy credentials
|
|
23
28
|
}
|
|
24
|
-
exports.canCopyLegacyCredentialsAsync = canCopyLegacyCredentialsAsync;
|
|
25
29
|
async function promptUserAndCopyLegacyCredentialsAsync(ctx, app) {
|
|
26
30
|
(0, assert_1.default)(await canCopyLegacyCredentialsAsync(ctx, app), 'User not eligible to copy classic build credentials to EAS');
|
|
27
31
|
const spinner = (0, ora_1.ora)('Classic credentials detected, copying to EAS...').start();
|
|
@@ -59,7 +63,6 @@ async function promptUserAndCopyLegacyCredentialsAsync(ctx, app) {
|
|
|
59
63
|
}
|
|
60
64
|
spinner.succeed('Credentials copied to EAS.');
|
|
61
65
|
}
|
|
62
|
-
exports.promptUserAndCopyLegacyCredentialsAsync = promptUserAndCopyLegacyCredentialsAsync;
|
|
63
66
|
async function getAppLookupParamsFromContextAsync(ctx, gradleContext) {
|
|
64
67
|
const exp = await ctx.getExpoConfigAsync();
|
|
65
68
|
const projectName = exp.slug;
|
|
@@ -71,7 +74,6 @@ async function getAppLookupParamsFromContextAsync(ctx, gradleContext) {
|
|
|
71
74
|
}
|
|
72
75
|
return { account, projectName, androidApplicationIdentifier };
|
|
73
76
|
}
|
|
74
|
-
exports.getAppLookupParamsFromContextAsync = getAppLookupParamsFromContextAsync;
|
|
75
77
|
async function createOrUpdateDefaultAndroidAppBuildCredentialsAsync(ctx, appLookupParams, { androidKeystoreId, }) {
|
|
76
78
|
(0, assert_1.default)(!ctx.nonInteractive, 'createOrUpdateDefaultAndroidAppBuildCredentialsAsync must be run in interactive mode');
|
|
77
79
|
const existingDefaultBuildCredentials = await ctx.android.getDefaultAndroidAppBuildCredentialsAsync(ctx.graphqlClient, appLookupParams);
|
|
@@ -84,7 +86,6 @@ async function createOrUpdateDefaultAndroidAppBuildCredentialsAsync(ctx, appLook
|
|
|
84
86
|
androidKeystoreId,
|
|
85
87
|
});
|
|
86
88
|
}
|
|
87
|
-
exports.createOrUpdateDefaultAndroidAppBuildCredentialsAsync = createOrUpdateDefaultAndroidAppBuildCredentialsAsync;
|
|
88
89
|
async function promptForNameAsync() {
|
|
89
90
|
const { providedName } = await (0, prompts_1.promptAsync)({
|
|
90
91
|
type: 'text',
|
|
@@ -95,7 +96,6 @@ async function promptForNameAsync() {
|
|
|
95
96
|
});
|
|
96
97
|
return providedName;
|
|
97
98
|
}
|
|
98
|
-
exports.promptForNameAsync = promptForNameAsync;
|
|
99
99
|
/**
|
|
100
100
|
* sort a build credentials array in descending order of preference
|
|
101
101
|
* prefer default credentials, then prefer names that come first lexicographically
|
|
@@ -111,7 +111,6 @@ function sortBuildCredentials(androidAppBuildCredentialsList) {
|
|
|
111
111
|
return buildCredentialsA.name.localeCompare(buildCredentialsB.name);
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
exports.sortBuildCredentials = sortBuildCredentials;
|
|
115
114
|
function generateRandomName() {
|
|
116
115
|
return `Build Credentials ${(0, nanoid_1.nanoid)(10)}`;
|
|
117
116
|
}
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatProjectFullName =
|
|
3
|
+
exports.formatProjectFullName = void 0;
|
|
4
|
+
exports.getAndroidAppCredentialsWithCommonFieldsAsync = getAndroidAppCredentialsWithCommonFieldsAsync;
|
|
5
|
+
exports.getAndroidAppBuildCredentialsListAsync = getAndroidAppBuildCredentialsListAsync;
|
|
6
|
+
exports.getLegacyAndroidAppCredentialsWithCommonFieldsAsync = getLegacyAndroidAppCredentialsWithCommonFieldsAsync;
|
|
7
|
+
exports.getLegacyAndroidAppBuildCredentialsAsync = getLegacyAndroidAppBuildCredentialsAsync;
|
|
8
|
+
exports.createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync = createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync;
|
|
9
|
+
exports.updateAndroidAppCredentialsAsync = updateAndroidAppCredentialsAsync;
|
|
10
|
+
exports.updateAndroidAppBuildCredentialsAsync = updateAndroidAppBuildCredentialsAsync;
|
|
11
|
+
exports.setDefaultAndroidAppBuildCredentialsAsync = setDefaultAndroidAppBuildCredentialsAsync;
|
|
12
|
+
exports.createAndroidAppBuildCredentialsAsync = createAndroidAppBuildCredentialsAsync;
|
|
13
|
+
exports.getDefaultAndroidAppBuildCredentialsAsync = getDefaultAndroidAppBuildCredentialsAsync;
|
|
14
|
+
exports.getAndroidAppBuildCredentialsByNameAsync = getAndroidAppBuildCredentialsByNameAsync;
|
|
15
|
+
exports.createOrUpdateAndroidAppBuildCredentialsByNameAsync = createOrUpdateAndroidAppBuildCredentialsByNameAsync;
|
|
16
|
+
exports.createOrUpdateDefaultIosAppBuildCredentialsAsync = createOrUpdateDefaultIosAppBuildCredentialsAsync;
|
|
17
|
+
exports.createKeystoreAsync = createKeystoreAsync;
|
|
18
|
+
exports.deleteKeystoreAsync = deleteKeystoreAsync;
|
|
19
|
+
exports.createFcmAsync = createFcmAsync;
|
|
20
|
+
exports.deleteFcmAsync = deleteFcmAsync;
|
|
21
|
+
exports.createGoogleServiceAccountKeyAsync = createGoogleServiceAccountKeyAsync;
|
|
22
|
+
exports.deleteGoogleServiceAccountKeyAsync = deleteGoogleServiceAccountKeyAsync;
|
|
23
|
+
exports.getGoogleServiceAccountKeysForAccountAsync = getGoogleServiceAccountKeysForAccountAsync;
|
|
4
24
|
const AndroidAppBuildCredentialsMutation_1 = require("./graphql/mutations/AndroidAppBuildCredentialsMutation");
|
|
5
25
|
const AndroidAppCredentialsMutation_1 = require("./graphql/mutations/AndroidAppCredentialsMutation");
|
|
6
26
|
const AndroidFcmMutation_1 = require("./graphql/mutations/AndroidFcmMutation");
|
|
@@ -17,12 +37,10 @@ async function getAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appL
|
|
|
17
37
|
legacyOnly: false,
|
|
18
38
|
});
|
|
19
39
|
}
|
|
20
|
-
exports.getAndroidAppCredentialsWithCommonFieldsAsync = getAndroidAppCredentialsWithCommonFieldsAsync;
|
|
21
40
|
async function getAndroidAppBuildCredentialsListAsync(graphqlClient, appLookupParams) {
|
|
22
41
|
const appCredentials = await getAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams);
|
|
23
42
|
return appCredentials?.androidAppBuildCredentialsList ?? [];
|
|
24
43
|
}
|
|
25
|
-
exports.getAndroidAppBuildCredentialsListAsync = getAndroidAppBuildCredentialsListAsync;
|
|
26
44
|
/* There is at most one set of legacy android app credentials associated with an Expo App */
|
|
27
45
|
async function getLegacyAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams) {
|
|
28
46
|
const projectFullName = (0, exports.formatProjectFullName)(appLookupParams);
|
|
@@ -30,13 +48,11 @@ async function getLegacyAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient
|
|
|
30
48
|
legacyOnly: true,
|
|
31
49
|
});
|
|
32
50
|
}
|
|
33
|
-
exports.getLegacyAndroidAppCredentialsWithCommonFieldsAsync = getLegacyAndroidAppCredentialsWithCommonFieldsAsync;
|
|
34
51
|
/* There is at most one set of legacy android app build credentials associated with an Expo App */
|
|
35
52
|
async function getLegacyAndroidAppBuildCredentialsAsync(graphqlClient, appLookupParams) {
|
|
36
53
|
const legacyAppCredentials = await getLegacyAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams);
|
|
37
54
|
return legacyAppCredentials?.androidAppBuildCredentialsList[0] ?? null;
|
|
38
55
|
}
|
|
39
|
-
exports.getLegacyAndroidAppBuildCredentialsAsync = getLegacyAndroidAppBuildCredentialsAsync;
|
|
40
56
|
async function createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync(graphqlClient, appLookupParams) {
|
|
41
57
|
const maybeAndroidAppCredentials = await getAndroidAppCredentialsWithCommonFieldsAsync(graphqlClient, appLookupParams);
|
|
42
58
|
if (maybeAndroidAppCredentials) {
|
|
@@ -47,7 +63,6 @@ async function createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync
|
|
|
47
63
|
return await AndroidAppCredentialsMutation_1.AndroidAppCredentialsMutation.createAndroidAppCredentialsAsync(graphqlClient, {}, app.id, appLookupParams.androidApplicationIdentifier);
|
|
48
64
|
}
|
|
49
65
|
}
|
|
50
|
-
exports.createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync = createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync;
|
|
51
66
|
async function updateAndroidAppCredentialsAsync(graphqlClient, appCredentials, { androidFcmId, googleServiceAccountKeyForSubmissionsId, googleServiceAccountKeyForFcmV1Id, }) {
|
|
52
67
|
let updatedAppCredentials = appCredentials;
|
|
53
68
|
if (androidFcmId) {
|
|
@@ -63,15 +78,12 @@ async function updateAndroidAppCredentialsAsync(graphqlClient, appCredentials, {
|
|
|
63
78
|
}
|
|
64
79
|
return updatedAppCredentials;
|
|
65
80
|
}
|
|
66
|
-
exports.updateAndroidAppCredentialsAsync = updateAndroidAppCredentialsAsync;
|
|
67
81
|
async function updateAndroidAppBuildCredentialsAsync(graphqlClient, buildCredentials, { androidKeystoreId, }) {
|
|
68
82
|
return await AndroidAppBuildCredentialsMutation_1.AndroidAppBuildCredentialsMutation.setKeystoreAsync(graphqlClient, buildCredentials.id, androidKeystoreId);
|
|
69
83
|
}
|
|
70
|
-
exports.updateAndroidAppBuildCredentialsAsync = updateAndroidAppBuildCredentialsAsync;
|
|
71
84
|
async function setDefaultAndroidAppBuildCredentialsAsync(graphqlClient, buildCredentials) {
|
|
72
85
|
return await AndroidAppBuildCredentialsMutation_1.AndroidAppBuildCredentialsMutation.setDefaultAndroidAppBuildCredentialsAsync(graphqlClient, buildCredentials.id);
|
|
73
86
|
}
|
|
74
|
-
exports.setDefaultAndroidAppBuildCredentialsAsync = setDefaultAndroidAppBuildCredentialsAsync;
|
|
75
87
|
async function createAndroidAppBuildCredentialsAsync(graphqlClient, appLookupParams, { name, isDefault, androidKeystoreId, }) {
|
|
76
88
|
const androidAppCredentials = await createOrGetExistingAndroidAppCredentialsWithBuildCredentialsAsync(graphqlClient, appLookupParams);
|
|
77
89
|
return await AndroidAppBuildCredentialsMutation_1.AndroidAppBuildCredentialsMutation.createAndroidAppBuildCredentialsAsync(graphqlClient, {
|
|
@@ -80,17 +92,14 @@ async function createAndroidAppBuildCredentialsAsync(graphqlClient, appLookupPar
|
|
|
80
92
|
keystoreId: androidKeystoreId,
|
|
81
93
|
}, androidAppCredentials.id);
|
|
82
94
|
}
|
|
83
|
-
exports.createAndroidAppBuildCredentialsAsync = createAndroidAppBuildCredentialsAsync;
|
|
84
95
|
async function getDefaultAndroidAppBuildCredentialsAsync(graphqlClient, appLookupParams) {
|
|
85
96
|
const buildCredentialsList = await getAndroidAppBuildCredentialsListAsync(graphqlClient, appLookupParams);
|
|
86
97
|
return buildCredentialsList.find(buildCredentials => buildCredentials.isDefault) ?? null;
|
|
87
98
|
}
|
|
88
|
-
exports.getDefaultAndroidAppBuildCredentialsAsync = getDefaultAndroidAppBuildCredentialsAsync;
|
|
89
99
|
async function getAndroidAppBuildCredentialsByNameAsync(graphqlClient, appLookupParams, name) {
|
|
90
100
|
const buildCredentialsList = await getAndroidAppBuildCredentialsListAsync(graphqlClient, appLookupParams);
|
|
91
101
|
return buildCredentialsList.find(buildCredentials => buildCredentials.name === name) ?? null;
|
|
92
102
|
}
|
|
93
|
-
exports.getAndroidAppBuildCredentialsByNameAsync = getAndroidAppBuildCredentialsByNameAsync;
|
|
94
103
|
async function createOrUpdateAndroidAppBuildCredentialsByNameAsync(graphqlClient, appLookupParams, name, { androidKeystoreId, }) {
|
|
95
104
|
const existingBuildCredentialsWithName = await getAndroidAppBuildCredentialsByNameAsync(graphqlClient, appLookupParams, name);
|
|
96
105
|
if (existingBuildCredentialsWithName) {
|
|
@@ -105,11 +114,9 @@ async function createOrUpdateAndroidAppBuildCredentialsByNameAsync(graphqlClient
|
|
|
105
114
|
androidKeystoreId,
|
|
106
115
|
});
|
|
107
116
|
}
|
|
108
|
-
exports.createOrUpdateAndroidAppBuildCredentialsByNameAsync = createOrUpdateAndroidAppBuildCredentialsByNameAsync;
|
|
109
117
|
async function createOrUpdateDefaultIosAppBuildCredentialsAsync() {
|
|
110
118
|
throw new Error('This requires user prompting. Look for me in BuildCredentialsUtils');
|
|
111
119
|
}
|
|
112
|
-
exports.createOrUpdateDefaultIosAppBuildCredentialsAsync = createOrUpdateDefaultIosAppBuildCredentialsAsync;
|
|
113
120
|
async function createKeystoreAsync(graphqlClient, account, keystore) {
|
|
114
121
|
return await AndroidKeystoreMutation_1.AndroidKeystoreMutation.createAndroidKeystoreAsync(graphqlClient, {
|
|
115
122
|
base64EncodedKeystore: keystore.keystore,
|
|
@@ -118,31 +125,24 @@ async function createKeystoreAsync(graphqlClient, account, keystore) {
|
|
|
118
125
|
keyPassword: keystore.keyPassword,
|
|
119
126
|
}, account.id);
|
|
120
127
|
}
|
|
121
|
-
exports.createKeystoreAsync = createKeystoreAsync;
|
|
122
128
|
async function deleteKeystoreAsync(graphqlClient, keystore) {
|
|
123
129
|
await AndroidKeystoreMutation_1.AndroidKeystoreMutation.deleteAndroidKeystoreAsync(graphqlClient, keystore.id);
|
|
124
130
|
}
|
|
125
|
-
exports.deleteKeystoreAsync = deleteKeystoreAsync;
|
|
126
131
|
async function createFcmAsync(graphqlClient, account, fcmApiKey, version) {
|
|
127
132
|
return await AndroidFcmMutation_1.AndroidFcmMutation.createAndroidFcmAsync(graphqlClient, { credential: fcmApiKey, version }, account.id);
|
|
128
133
|
}
|
|
129
|
-
exports.createFcmAsync = createFcmAsync;
|
|
130
134
|
async function deleteFcmAsync(graphqlClient, fcm) {
|
|
131
135
|
await AndroidFcmMutation_1.AndroidFcmMutation.deleteAndroidFcmAsync(graphqlClient, fcm.id);
|
|
132
136
|
}
|
|
133
|
-
exports.deleteFcmAsync = deleteFcmAsync;
|
|
134
137
|
async function createGoogleServiceAccountKeyAsync(graphqlClient, account, jsonKey) {
|
|
135
138
|
return await GoogleServiceAccountKeyMutation_1.GoogleServiceAccountKeyMutation.createGoogleServiceAccountKeyAsync(graphqlClient, { jsonKey }, account.id);
|
|
136
139
|
}
|
|
137
|
-
exports.createGoogleServiceAccountKeyAsync = createGoogleServiceAccountKeyAsync;
|
|
138
140
|
async function deleteGoogleServiceAccountKeyAsync(graphqlClient, googleServiceAccountKey) {
|
|
139
141
|
await GoogleServiceAccountKeyMutation_1.GoogleServiceAccountKeyMutation.deleteGoogleServiceAccountKeyAsync(graphqlClient, googleServiceAccountKey.id);
|
|
140
142
|
}
|
|
141
|
-
exports.deleteGoogleServiceAccountKeyAsync = deleteGoogleServiceAccountKeyAsync;
|
|
142
143
|
async function getGoogleServiceAccountKeysForAccountAsync(graphqlClient, account) {
|
|
143
144
|
return await GoogleServiceAccountKeyQuery_1.GoogleServiceAccountKeyQuery.getAllForAccountAsync(graphqlClient, account.name);
|
|
144
145
|
}
|
|
145
|
-
exports.getGoogleServiceAccountKeysForAccountAsync = getGoogleServiceAccountKeysForAccountAsync;
|
|
146
146
|
async function getAppAsync(graphqlClient, appLookupParams) {
|
|
147
147
|
const projectFullName = (0, exports.formatProjectFullName)(appLookupParams);
|
|
148
148
|
return await AppQuery_1.AppQuery.byFullNameAsync(graphqlClient, projectFullName);
|
|
@@ -2,7 +2,7 @@ import { ExpoGraphqlClient } from '../../../../../commandUtils/context/contextUt
|
|
|
2
2
|
import { CommonAndroidAppCredentialsFragment } from '../../../../../graphql/generated';
|
|
3
3
|
export declare const AndroidAppCredentialsQuery: {
|
|
4
4
|
withCommonFieldsByApplicationIdentifierAsync(graphqlClient: ExpoGraphqlClient, projectFullName: string, { androidApplicationIdentifier, legacyOnly, }: {
|
|
5
|
-
androidApplicationIdentifier?: string
|
|
6
|
-
legacyOnly?: boolean
|
|
5
|
+
androidApplicationIdentifier?: string;
|
|
6
|
+
legacyOnly?: boolean;
|
|
7
7
|
}): Promise<CommonAndroidAppCredentialsFragment | null>;
|
|
8
8
|
};
|
|
@@ -3,9 +3,9 @@ import { GoogleServiceAccountKeyFragment, GoogleServiceAccountKeysPaginatedByAcc
|
|
|
3
3
|
export declare const GoogleServiceAccountKeyQuery: {
|
|
4
4
|
getAllForAccountAsync(graphqlClient: ExpoGraphqlClient, accountName: string): Promise<GoogleServiceAccountKeyFragment[]>;
|
|
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<GoogleServiceAccountKeysPaginatedByAccountQuery[
|
|
6
|
+
after?: string;
|
|
7
|
+
first?: number;
|
|
8
|
+
before?: string;
|
|
9
|
+
last?: number;
|
|
10
|
+
}): Promise<GoogleServiceAccountKeysPaginatedByAccountQuery["account"]["byName"]["googleServiceAccountKeysPaginated"]>;
|
|
11
11
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.MinimalGoogleServiceAccountKeySchema = void 0;
|
|
4
|
+
exports.readAndValidateServiceAccountKey = readAndValidateServiceAccountKey;
|
|
5
|
+
exports.selectGoogleServiceAccountKeyAsync = selectGoogleServiceAccountKeyAsync;
|
|
6
|
+
exports.detectGoogleServiceAccountKeyPathAsync = detectGoogleServiceAccountKeyPathAsync;
|
|
4
7
|
const tslib_1 = require("tslib");
|
|
5
8
|
const json_file_1 = tslib_1.__importDefault(require("@expo/json-file"));
|
|
6
9
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
@@ -47,7 +50,6 @@ function readAndValidateServiceAccountKey(keyJsonPath) {
|
|
|
47
50
|
throw err;
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
|
-
exports.readAndValidateServiceAccountKey = readAndValidateServiceAccountKey;
|
|
51
53
|
async function selectGoogleServiceAccountKeyAsync(keys) {
|
|
52
54
|
const sortedKeys = sortGoogleServiceAccountKeysByUpdatedAtDesc(keys);
|
|
53
55
|
const { chosenKey } = await (0, prompts_1.promptAsync)({
|
|
@@ -61,7 +63,6 @@ async function selectGoogleServiceAccountKeyAsync(keys) {
|
|
|
61
63
|
});
|
|
62
64
|
return chosenKey;
|
|
63
65
|
}
|
|
64
|
-
exports.selectGoogleServiceAccountKeyAsync = selectGoogleServiceAccountKeyAsync;
|
|
65
66
|
function sortGoogleServiceAccountKeysByUpdatedAtDesc(keys) {
|
|
66
67
|
return keys.sort((keyA, keyB) => new Date(keyB.updatedAt).getTime() - new Date(keyA.updatedAt).getTime());
|
|
67
68
|
}
|
|
@@ -93,7 +94,6 @@ async function detectGoogleServiceAccountKeyPathAsync(projectDir) {
|
|
|
93
94
|
}
|
|
94
95
|
return null;
|
|
95
96
|
}
|
|
96
|
-
exports.detectGoogleServiceAccountKeyPathAsync = detectGoogleServiceAccountKeyPathAsync;
|
|
97
97
|
async function displayPathChooserAsync(paths, projectDir) {
|
|
98
98
|
const choices = paths.map(f => ({
|
|
99
99
|
value: f,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.keytoolCommandExistsAsync = keytoolCommandExistsAsync;
|
|
4
|
+
exports.generateRandomKeystoreAsync = generateRandomKeystoreAsync;
|
|
4
5
|
const tslib_1 = require("tslib");
|
|
5
6
|
const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
|
|
6
7
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
@@ -24,7 +25,6 @@ async function keytoolCommandExistsAsync() {
|
|
|
24
25
|
return false;
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
|
-
exports.keytoolCommandExistsAsync = keytoolCommandExistsAsync;
|
|
28
28
|
var KeystoreCreateStep;
|
|
29
29
|
(function (KeystoreCreateStep) {
|
|
30
30
|
KeystoreCreateStep["Attempt"] = "attempt";
|
|
@@ -39,7 +39,6 @@ async function generateRandomKeystoreAsync(graphqlClient, analytics, projectId)
|
|
|
39
39
|
};
|
|
40
40
|
return await createKeystoreAsync(graphqlClient, analytics, keystoreData, projectId);
|
|
41
41
|
}
|
|
42
|
-
exports.generateRandomKeystoreAsync = generateRandomKeystoreAsync;
|
|
43
42
|
async function createKeystoreAsync(graphqlClient, analytics, keystoreParams, projectId) {
|
|
44
43
|
analytics.logEvent(AnalyticsManager_1.BuildEvent.ANDROID_KEYSTORE_CREATE, {
|
|
45
44
|
project_id: projectId,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getKeystoreWithType = getKeystoreWithType;
|
|
4
|
+
exports.getKeystoreType = getKeystoreType;
|
|
5
|
+
exports.validateKeystore = validateKeystore;
|
|
4
6
|
const tslib_1 = require("tslib");
|
|
5
7
|
const pkcs12_1 = require("@expo/pkcs12");
|
|
6
8
|
const jks_js_1 = tslib_1.__importDefault(require("jks-js"));
|
|
@@ -10,7 +12,6 @@ function getKeystoreWithType(keystore) {
|
|
|
10
12
|
const type = getKeystoreType(keystore);
|
|
11
13
|
return { ...keystore, type };
|
|
12
14
|
}
|
|
13
|
-
exports.getKeystoreWithType = getKeystoreWithType;
|
|
14
15
|
function getKeystoreType(keystore) {
|
|
15
16
|
if (isPKCSKeystore(keystore)) {
|
|
16
17
|
return generated_1.AndroidKeystoreType.Pkcs12;
|
|
@@ -20,7 +21,6 @@ function getKeystoreType(keystore) {
|
|
|
20
21
|
}
|
|
21
22
|
return generated_1.AndroidKeystoreType.Unknown;
|
|
22
23
|
}
|
|
23
|
-
exports.getKeystoreType = getKeystoreType;
|
|
24
24
|
function isPKCSKeystore(keystore) {
|
|
25
25
|
try {
|
|
26
26
|
(0, pkcs12_1.parsePKCS12)(keystore.keystore, keystore.keystorePassword);
|
|
@@ -53,7 +53,6 @@ function validateKeystore(keystore) {
|
|
|
53
53
|
log_1.default.warn(`Unsupported keystore type: ${keystore.type}, skipping validation.`);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
exports.validateKeystore = validateKeystore;
|
|
57
56
|
function getPemFromJksKeystore(keystore) {
|
|
58
57
|
const keystoreEntries = jks_js_1.default.parseJks(Buffer.from(keystore.keystore, 'base64'), keystore.keystorePassword);
|
|
59
58
|
// keystore entries are case insensitive in both keytool and jks-js implementations
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.displayEmptyAndroidCredentials = displayEmptyAndroidCredentials;
|
|
4
|
+
exports.displayAndroidKeystore = displayAndroidKeystore;
|
|
5
|
+
exports.displayAndroidAppCredentials = displayAndroidAppCredentials;
|
|
4
6
|
const tslib_1 = require("tslib");
|
|
5
7
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
8
|
const generated_1 = require("../../../graphql/generated");
|
|
@@ -19,7 +21,6 @@ function displayEmptyAndroidCredentials(appLookupParams) {
|
|
|
19
21
|
log_1.default.log((0, formatFields_1.default)([{ label: 'No credentials set up yet!', value: '' }]));
|
|
20
22
|
log_1.default.newLine();
|
|
21
23
|
}
|
|
22
|
-
exports.displayEmptyAndroidCredentials = displayEmptyAndroidCredentials;
|
|
23
24
|
function displayAndroidFcmCredentials(appCredentials) {
|
|
24
25
|
const maybeFcm = appCredentials.androidFcm;
|
|
25
26
|
log_1.default.log((0, formatFields_1.default)([{ label: 'Push Notifications (FCM Legacy)', value: '' }], {
|
|
@@ -144,7 +145,6 @@ function displayAndroidKeystore(keystore) {
|
|
|
144
145
|
];
|
|
145
146
|
log_1.default.log((0, formatFields_1.default)(fields, { labelFormat: chalk_1.default.cyan.bold }));
|
|
146
147
|
}
|
|
147
|
-
exports.displayAndroidKeystore = displayAndroidKeystore;
|
|
148
148
|
function displayAndroidAppCredentials({ appLookupParams, appCredentials, }) {
|
|
149
149
|
const { projectName, androidApplicationIdentifier } = appLookupParams;
|
|
150
150
|
const fields = [
|
|
@@ -158,4 +158,3 @@ function displayAndroidAppCredentials({ appLookupParams, appCredentials, }) {
|
|
|
158
158
|
displayEASAndroidAppCredentials(appCredentials);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
exports.displayAndroidAppCredentials = displayAndroidAppCredentials;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.readAndroidCredentialsAsync = readAndroidCredentialsAsync;
|
|
4
|
+
exports.readIosCredentialsAsync = readIosCredentialsAsync;
|
|
5
|
+
exports.readRawAsync = readRawAsync;
|
|
4
6
|
const tslib_1 = require("tslib");
|
|
5
7
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
8
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
@@ -21,7 +23,6 @@ async function readAndroidCredentialsAsync(projectDir) {
|
|
|
21
23
|
},
|
|
22
24
|
};
|
|
23
25
|
}
|
|
24
|
-
exports.readAndroidCredentialsAsync = readAndroidCredentialsAsync;
|
|
25
26
|
async function readIosCredentialsAsync(projectDir, applicationTarget) {
|
|
26
27
|
const credentialsJson = await readAsync(projectDir);
|
|
27
28
|
if (!credentialsJson.ios) {
|
|
@@ -42,7 +43,6 @@ async function readIosCredentialsAsync(projectDir, applicationTarget) {
|
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
exports.readIosCredentialsAsync = readIosCredentialsAsync;
|
|
46
46
|
function isCredentialsMap(ios) {
|
|
47
47
|
return typeof ios.provisioningProfilePath !== 'string';
|
|
48
48
|
}
|
|
@@ -85,7 +85,6 @@ async function readRawAsync(projectDir, { throwIfMissing = true } = {}) {
|
|
|
85
85
|
throw new Error(`credentials.json must exist in the project root directory and contain a valid JSON`);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
exports.readRawAsync = readRawAsync;
|
|
89
88
|
function getAbsolutePath(projectDir, filePath) {
|
|
90
89
|
return path_1.default.isAbsolute(filePath) ? filePath : path_1.default.join(projectDir, filePath);
|
|
91
90
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.updateAndroidCredentialsAsync = updateAndroidCredentialsAsync;
|
|
4
|
+
exports.updateIosCredentialsAsync = updateIosCredentialsAsync;
|
|
4
5
|
const tslib_1 = require("tslib");
|
|
5
6
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
7
|
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
@@ -47,7 +48,6 @@ async function updateAndroidCredentialsAsync(ctx, buildCredentials) {
|
|
|
47
48
|
}
|
|
48
49
|
displayUntrackedFilesWarning(newFilePaths);
|
|
49
50
|
}
|
|
50
|
-
exports.updateAndroidCredentialsAsync = updateAndroidCredentialsAsync;
|
|
51
51
|
/**
|
|
52
52
|
* Update iOS credentials in credentials.json with values from www, contents
|
|
53
53
|
* of credentials.json are not validated, if www has incomplete credentials
|
|
@@ -110,7 +110,6 @@ async function updateIosCredentialsAsync(ctx, app, targets, distributionType) {
|
|
|
110
110
|
}
|
|
111
111
|
displayUntrackedFilesWarning(newFilePaths);
|
|
112
112
|
}
|
|
113
|
-
exports.updateIosCredentialsAsync = updateIosCredentialsAsync;
|
|
114
113
|
function createTargetCredentialsPathsMap(targets, rawCredentialsJsonMap) {
|
|
115
114
|
const hasManyTargets = targets.length > 1;
|
|
116
115
|
const paths = {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getCredentialsJsonPath = getCredentialsJsonPath;
|
|
4
|
+
exports.ensureAllTargetsAreConfigured = ensureAllTargetsAreConfigured;
|
|
4
5
|
const tslib_1 = require("tslib");
|
|
5
6
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
7
|
function getCredentialsJsonPath(projectDir) {
|
|
7
8
|
return path_1.default.join(projectDir, 'credentials.json');
|
|
8
9
|
}
|
|
9
|
-
exports.getCredentialsJsonPath = getCredentialsJsonPath;
|
|
10
10
|
function ensureAllTargetsAreConfigured(targets, credentialsJson) {
|
|
11
11
|
const notConfiguredTargets = [];
|
|
12
12
|
for (const target of targets) {
|
|
@@ -24,4 +24,3 @@ function ensureAllTargetsAreConfigured(targets, credentialsJson) {
|
|
|
24
24
|
throw new Error(errorMessage);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
exports.ensureAllTargetsAreConfigured = ensureAllTargetsAreConfigured;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatAppleTeam =
|
|
3
|
+
exports.formatAppleTeam = formatAppleTeam;
|
|
4
4
|
function formatAppleTeam({ appleTeamIdentifier, appleTeamName, }) {
|
|
5
5
|
return `Team ID: ${appleTeamIdentifier}${appleTeamName ? `, Team name: ${appleTeamName}` : ''}`;
|
|
6
6
|
}
|
|
7
|
-
exports.formatAppleTeam = formatAppleTeam;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveAppleTeamIfAuthenticatedAsync =
|
|
3
|
+
exports.resolveAppleTeamIfAuthenticatedAsync = resolveAppleTeamIfAuthenticatedAsync;
|
|
4
4
|
async function resolveAppleTeamIfAuthenticatedAsync(ctx, app) {
|
|
5
5
|
if (!ctx.appStore.authCtx) {
|
|
6
6
|
return null;
|
|
@@ -10,4 +10,3 @@ async function resolveAppleTeamIfAuthenticatedAsync(ctx, app) {
|
|
|
10
10
|
appleTeamName: ctx.appStore.authCtx.team.name,
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
-
exports.resolveAppleTeamIfAuthenticatedAsync = resolveAppleTeamIfAuthenticatedAsync;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AppStoreApiKeyPurpose = void 0;
|
|
4
|
+
exports.promptForAscApiKeyPathAsync = promptForAscApiKeyPathAsync;
|
|
5
|
+
exports.promptForIssuerIdAsync = promptForIssuerIdAsync;
|
|
6
|
+
exports.getMinimalAscApiKeyAsync = getMinimalAscApiKeyAsync;
|
|
7
|
+
exports.provideOrGenerateAscApiKeyAsync = provideOrGenerateAscApiKeyAsync;
|
|
8
|
+
exports.getAscApiKeyName = getAscApiKeyName;
|
|
9
|
+
exports.getAscApiKeysFromAccountAsync = getAscApiKeysFromAccountAsync;
|
|
10
|
+
exports.selectAscApiKeysFromAccountAsync = selectAscApiKeysFromAccountAsync;
|
|
11
|
+
exports.sortAscApiKeysByUpdatedAtDesc = sortAscApiKeysByUpdatedAtDesc;
|
|
12
|
+
exports.formatAscApiKey = formatAscApiKey;
|
|
4
13
|
const tslib_1 = require("tslib");
|
|
5
14
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
15
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
@@ -27,7 +36,6 @@ async function promptForAscApiKeyPathAsync(ctx) {
|
|
|
27
36
|
const issuerId = await promptForIssuerIdAsync();
|
|
28
37
|
return { keyId, issuerId, keyP8Path };
|
|
29
38
|
}
|
|
30
|
-
exports.promptForAscApiKeyPathAsync = promptForAscApiKeyPathAsync;
|
|
31
39
|
async function promptForIssuerIdAsync() {
|
|
32
40
|
log_1.default.log(chalk_1.default.bold('An App Store Connect Issuer ID is required'));
|
|
33
41
|
log_1.default.log(`If you're not sure what this is or how to find yours, ${(0, log_1.learnMore)('https://expo.fyi/asc-issuer-id')}`);
|
|
@@ -35,14 +43,12 @@ async function promptForIssuerIdAsync() {
|
|
|
35
43
|
const { issuerId } = await (0, promptForCredentials_1.getCredentialsFromUserAsync)(credentials_1.ascApiKeyIssuerIdSchema);
|
|
36
44
|
return issuerId;
|
|
37
45
|
}
|
|
38
|
-
exports.promptForIssuerIdAsync = promptForIssuerIdAsync;
|
|
39
46
|
async function getMinimalAscApiKeyAsync(ascApiKey) {
|
|
40
47
|
return {
|
|
41
48
|
...ascApiKey,
|
|
42
49
|
issuerId: ascApiKey.issuerId ?? (await promptForIssuerIdAsync()),
|
|
43
50
|
};
|
|
44
51
|
}
|
|
45
|
-
exports.getMinimalAscApiKeyAsync = getMinimalAscApiKeyAsync;
|
|
46
52
|
async function provideOrGenerateAscApiKeyAsync(ctx, purpose) {
|
|
47
53
|
if (ctx.nonInteractive) {
|
|
48
54
|
throw new Error(`A new App Store Connect API Key cannot be created in non-interactive mode.`);
|
|
@@ -67,7 +73,6 @@ async function provideOrGenerateAscApiKeyAsync(ctx, purpose) {
|
|
|
67
73
|
}
|
|
68
74
|
return await provideOrGenerateAscApiKeyAsync(ctx, purpose);
|
|
69
75
|
}
|
|
70
|
-
exports.provideOrGenerateAscApiKeyAsync = provideOrGenerateAscApiKeyAsync;
|
|
71
76
|
async function generateAscApiKeyAsync(ctx, purpose) {
|
|
72
77
|
await ctx.appStore.ensureAuthenticatedAsync();
|
|
73
78
|
const ascApiKey = await ctx.appStore.createAscApiKeyAsync(ctx.analytics, {
|
|
@@ -79,7 +84,6 @@ function getAscApiKeyName(purpose) {
|
|
|
79
84
|
const nameParts = ['[Expo]', purpose, (0, nanoid_1.nanoid)(10)];
|
|
80
85
|
return nameParts.join(' ');
|
|
81
86
|
}
|
|
82
|
-
exports.getAscApiKeyName = getAscApiKeyName;
|
|
83
87
|
async function promptForAscApiKeyAsync(ctx) {
|
|
84
88
|
const shouldAutoGenerateCredentials = await (0, promptForCredentials_1.shouldAutoGenerateCredentialsAsync)(credentials_1.ascApiKeyIdSchema);
|
|
85
89
|
if (shouldAutoGenerateCredentials) {
|
|
@@ -134,7 +138,6 @@ async function getAscApiKeysFromAccountAsync(ctx, account, { filterDifferentAppl
|
|
|
134
138
|
return filterKeysFromDifferentAppleTeam(ctx, ascApiKeysForAccount);
|
|
135
139
|
}
|
|
136
140
|
}
|
|
137
|
-
exports.getAscApiKeysFromAccountAsync = getAscApiKeysFromAccountAsync;
|
|
138
141
|
async function selectAscApiKeysFromAccountAsync(ctx, account, { filterDifferentAppleTeam } = {}) {
|
|
139
142
|
const ascApiKeysForAccount = await getAscApiKeysFromAccountAsync(ctx, account, {
|
|
140
143
|
filterDifferentAppleTeam,
|
|
@@ -151,7 +154,6 @@ async function selectAscApiKeysFromAccountAsync(ctx, account, { filterDifferentA
|
|
|
151
154
|
}
|
|
152
155
|
return await selectAscApiKeysAsync(ascApiKeysForAccount);
|
|
153
156
|
}
|
|
154
|
-
exports.selectAscApiKeysFromAccountAsync = selectAscApiKeysFromAccountAsync;
|
|
155
157
|
async function selectAscApiKeysAsync(ascApiKeys) {
|
|
156
158
|
const sortedAscApiKeys = sortAscApiKeysByUpdatedAtDesc(ascApiKeys);
|
|
157
159
|
const { chosenAscApiKey } = await (0, prompts_1.promptAsync)({
|
|
@@ -175,7 +177,6 @@ function filterKeysFromDifferentAppleTeam(ctx, keys) {
|
|
|
175
177
|
function sortAscApiKeysByUpdatedAtDesc(keys) {
|
|
176
178
|
return keys.sort((keyA, keyB) => new Date(keyB.updatedAt).getTime() - new Date(keyA.updatedAt).getTime());
|
|
177
179
|
}
|
|
178
|
-
exports.sortAscApiKeysByUpdatedAtDesc = sortAscApiKeysByUpdatedAtDesc;
|
|
179
180
|
function formatAscApiKey(ascApiKey) {
|
|
180
181
|
const { keyIdentifier, appleTeam, name, updatedAt } = ascApiKey;
|
|
181
182
|
let line = '';
|
|
@@ -189,4 +190,3 @@ function formatAscApiKey(ascApiKey) {
|
|
|
189
190
|
line += chalk_1.default.gray(`\n Updated: ${(0, date_1.fromNow)(new Date(updatedAt))} ago`);
|
|
190
191
|
return line;
|
|
191
192
|
}
|
|
192
|
-
exports.formatAscApiKey = formatAscApiKey;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getAllBuildCredentialsAsync = getAllBuildCredentialsAsync;
|
|
4
|
+
exports.getBuildCredentialsAsync = getBuildCredentialsAsync;
|
|
5
|
+
exports.getProvisioningProfileAsync = getProvisioningProfileAsync;
|
|
6
|
+
exports.getDistributionCertificateAsync = getDistributionCertificateAsync;
|
|
7
|
+
exports.assignBuildCredentialsAsync = assignBuildCredentialsAsync;
|
|
8
|
+
exports.getAppFromContextAsync = getAppFromContextAsync;
|
|
9
|
+
exports.getAppLookupParamsFromContextAsync = getAppLookupParamsFromContextAsync;
|
|
4
10
|
const tslib_1 = require("tslib");
|
|
5
11
|
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
6
12
|
const AppleTeamUtils_1 = require("./AppleTeamUtils");
|
|
@@ -12,7 +18,6 @@ async function getAllBuildCredentialsAsync(ctx, app) {
|
|
|
12
18
|
}
|
|
13
19
|
return appCredentials.iosAppBuildCredentialsList;
|
|
14
20
|
}
|
|
15
|
-
exports.getAllBuildCredentialsAsync = getAllBuildCredentialsAsync;
|
|
16
21
|
async function getBuildCredentialsAsync(ctx, app, iosDistributionType) {
|
|
17
22
|
const appCredentials = await ctx.ios.getIosAppCredentialsWithBuildCredentialsAsync(ctx.graphqlClient, app, {
|
|
18
23
|
iosDistributionType,
|
|
@@ -23,17 +28,14 @@ async function getBuildCredentialsAsync(ctx, app, iosDistributionType) {
|
|
|
23
28
|
const [buildCredentials] = appCredentials.iosAppBuildCredentialsList;
|
|
24
29
|
return buildCredentials;
|
|
25
30
|
}
|
|
26
|
-
exports.getBuildCredentialsAsync = getBuildCredentialsAsync;
|
|
27
31
|
async function getProvisioningProfileAsync(ctx, app, iosDistributionType) {
|
|
28
32
|
const buildCredentials = await getBuildCredentialsAsync(ctx, app, iosDistributionType);
|
|
29
33
|
return buildCredentials?.provisioningProfile ?? null;
|
|
30
34
|
}
|
|
31
|
-
exports.getProvisioningProfileAsync = getProvisioningProfileAsync;
|
|
32
35
|
async function getDistributionCertificateAsync(ctx, app, iosDistributionType) {
|
|
33
36
|
const buildCredentials = await getBuildCredentialsAsync(ctx, app, iosDistributionType);
|
|
34
37
|
return buildCredentials?.distributionCertificate ?? null;
|
|
35
38
|
}
|
|
36
|
-
exports.getDistributionCertificateAsync = getDistributionCertificateAsync;
|
|
37
39
|
async function assignBuildCredentialsAsync(ctx, app, iosDistributionType, distCert, provisioningProfile, appleTeam) {
|
|
38
40
|
const resolvedAppleTeam = (0, nullthrows_1.default)(appleTeam ?? (await (0, AppleTeamUtils_1.resolveAppleTeamIfAuthenticatedAsync)(ctx, app)));
|
|
39
41
|
const appleAppIdentifier = await ctx.ios.createOrGetExistingAppleAppIdentifierAsync(ctx.graphqlClient, app, resolvedAppleTeam);
|
|
@@ -45,7 +47,6 @@ async function assignBuildCredentialsAsync(ctx, app, iosDistributionType, distCe
|
|
|
45
47
|
iosDistributionType,
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
|
-
exports.assignBuildCredentialsAsync = assignBuildCredentialsAsync;
|
|
49
50
|
async function getAppFromContextAsync(ctx) {
|
|
50
51
|
const exp = await ctx.getExpoConfigAsync();
|
|
51
52
|
const projectName = exp.slug;
|
|
@@ -56,9 +57,7 @@ async function getAppFromContextAsync(ctx) {
|
|
|
56
57
|
projectName,
|
|
57
58
|
};
|
|
58
59
|
}
|
|
59
|
-
exports.getAppFromContextAsync = getAppFromContextAsync;
|
|
60
60
|
async function getAppLookupParamsFromContextAsync(ctx, target) {
|
|
61
61
|
const app = await getAppFromContextAsync(ctx);
|
|
62
62
|
return { ...app, bundleIdentifier: target.bundleIdentifier };
|
|
63
63
|
}
|
|
64
|
-
exports.getAppLookupParamsFromContextAsync = getAppLookupParamsFromContextAsync;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.chooseDevicesAsync = chooseDevicesAsync;
|
|
4
|
+
exports.formatDeviceLabel = formatDeviceLabel;
|
|
4
5
|
const prompts_1 = require("../.././../prompts");
|
|
5
6
|
const AppleDevice_1 = require("../../../graphql/types/credentials/AppleDevice");
|
|
6
7
|
async function chooseDevicesAsync(allDevices, preselectedDeviceIdentifiers = []) {
|
|
@@ -23,12 +24,10 @@ async function chooseDevicesAsync(allDevices, preselectedDeviceIdentifiers = [])
|
|
|
23
24
|
});
|
|
24
25
|
return devices;
|
|
25
26
|
}
|
|
26
|
-
exports.chooseDevicesAsync = chooseDevicesAsync;
|
|
27
27
|
function formatDeviceLabel(device) {
|
|
28
28
|
const deviceDetails = formatDeviceDetails(device);
|
|
29
29
|
return `${device.identifier}${deviceDetails !== '' ? ` ${deviceDetails}` : ''}${device.name ? ` (${device.name})` : ''}${device.createdAt ? ` (created at: ${device.createdAt})` : ''}`;
|
|
30
30
|
}
|
|
31
|
-
exports.formatDeviceLabel = formatDeviceLabel;
|
|
32
31
|
function formatDeviceDetails(device) {
|
|
33
32
|
let details = '';
|
|
34
33
|
if (device.deviceClass) {
|