eas-cli 9.0.2 → 9.0.4
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 +59 -59
- package/build/analytics/AnalyticsManager.js +4 -5
- package/build/api.js +1 -2
- package/build/branch/actions/SelectBranch.js +2 -3
- package/build/branch/queries.js +3 -5
- package/build/branch/utils.js +1 -1
- package/build/build/android/build.js +3 -5
- package/build/build/android/graphql.js +1 -2
- package/build/build/android/prepareJob.js +1 -2
- package/build/build/android/syncProjectConfiguration.js +1 -1
- package/build/build/android/version.js +14 -16
- package/build/build/build.js +8 -10
- package/build/build/createContext.js +7 -8
- package/build/build/ios/build.js +2 -4
- package/build/build/ios/credentials.js +1 -2
- package/build/build/ios/graphql.js +4 -6
- package/build/build/ios/prepareJob.js +5 -6
- package/build/build/ios/syncProjectConfiguration.js +1 -1
- package/build/build/ios/version.js +17 -20
- package/build/build/local.js +2 -3
- package/build/build/metadata.js +9 -10
- package/build/build/queries.js +6 -9
- package/build/build/runBuildAndSubmit.d.ts +3 -1
- package/build/build/runBuildAndSubmit.js +19 -13
- package/build/build/utils/appJson.js +1 -2
- package/build/build/utils/formatBuild.js +5 -8
- package/build/build/utils/printBuildInfo.js +1 -2
- package/build/build/utils/resourceClass.js +3 -4
- package/build/build/utils/url.js +1 -2
- package/build/build/validate.js +8 -11
- package/build/channel/actions/SelectChannel.js +2 -3
- package/build/channel/errors.js +1 -1
- package/build/channel/queries.js +6 -10
- package/build/channel/utils.js +1 -1
- package/build/commandUtils/EasCommand.js +7 -6
- package/build/commandUtils/builds.js +3 -3
- package/build/commandUtils/context/DynamicProjectConfigContextField.js +2 -2
- package/build/commandUtils/context/LoggedInContextField.js +1 -2
- package/build/commandUtils/context/MaybeLoggedInContextField.js +2 -3
- package/build/commandUtils/context/VcsClientContextField.js +1 -1
- package/build/commandUtils/context/contextUtils/createGraphqlClient.js +1 -1
- package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +4 -6
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +2 -4
- package/build/commandUtils/gating/FeatureGateEnvOverrides.js +1 -2
- package/build/commandUtils/pagination.js +3 -4
- package/build/commands/account/view.js +1 -2
- package/build/commands/branch/delete.js +1 -2
- package/build/commands/build/configure.js +1 -2
- package/build/commands/build/index.js +1 -2
- package/build/commands/build/internal.js +1 -2
- package/build/commands/build/resign.js +7 -7
- package/build/commands/build/run.js +2 -3
- package/build/commands/build/version/get.js +3 -4
- package/build/commands/build/version/set.js +5 -6
- package/build/commands/build/version/sync.js +5 -7
- package/build/commands/channel/rollout.js +1 -2
- package/build/commands/config.js +16 -14
- package/build/commands/credentials/configure-build.js +3 -3
- package/build/commands/credentials/index.js +1 -1
- package/build/commands/device/create.js +1 -1
- package/build/commands/device/rename.js +1 -1
- package/build/commands/diagnostics.js +6 -2
- package/build/commands/project/init.js +11 -9
- package/build/commands/project/onboarding.js +204 -32
- package/build/commands/secret/delete.js +5 -5
- package/build/commands/update/index.js +6 -7
- package/build/commands/update/republish.js +1 -2
- package/build/commands/update/roll-back-to-embedded.js +4 -5
- package/build/credentials/android/AndroidCredentialsProvider.js +4 -5
- package/build/credentials/android/actions/BuildCredentialsUtils.js +2 -3
- package/build/credentials/android/actions/DownloadKeystore.js +2 -3
- package/build/credentials/android/actions/RemoveFcm.js +1 -1
- package/build/credentials/android/actions/SetUpBuildCredentials.js +3 -5
- package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForFcmV1.js +3 -3
- package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForSubmissions.js +3 -3
- package/build/credentials/android/api/GraphqlClient.js +4 -8
- package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.js +1 -2
- package/build/credentials/android/utils/printCredentials.js +4 -4
- package/build/credentials/context.js +2 -3
- package/build/credentials/credentialsJson/update.js +14 -16
- package/build/credentials/errors.js +7 -5
- package/build/credentials/ios/IosCredentialsProvider.js +3 -4
- package/build/credentials/ios/actions/AscApiKeyUtils.js +5 -9
- package/build/credentials/ios/actions/AssignAscApiKey.js +2 -3
- package/build/credentials/ios/actions/AssignPushKey.js +2 -3
- package/build/credentials/ios/actions/BuildCredentialsUtils.js +3 -5
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +1 -1
- package/build/credentials/ios/actions/CreateProvisioningProfile.js +2 -3
- package/build/credentials/ios/actions/DistributionCertificateUtils.js +3 -4
- package/build/credentials/ios/actions/ProvisioningProfileUtils.js +2 -3
- package/build/credentials/ios/actions/PushKeyUtils.js +5 -5
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +3 -4
- package/build/credentials/ios/actions/SetUpAscApiKey.js +1 -1
- package/build/credentials/ios/actions/SetUpBuildCredentials.js +3 -4
- package/build/credentials/ios/actions/SetUpDistributionCertificate.js +1 -2
- package/build/credentials/ios/actions/SetUpProvisioningProfile.js +2 -3
- package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.js +2 -3
- package/build/credentials/ios/api/GraphqlClient.js +11 -15
- package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +2 -4
- package/build/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.js +1 -2
- package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.js +2 -4
- package/build/credentials/ios/appstore/AppStoreApi.js +1 -2
- package/build/credentials/ios/appstore/ascApiKey.js +6 -8
- package/build/credentials/ios/appstore/authenticate.js +2 -4
- package/build/credentials/ios/appstore/bundleIdCapabilities.js +1 -1
- package/build/credentials/ios/appstore/contractMessages.js +3 -5
- package/build/credentials/ios/appstore/distributionCertificate.js +2 -3
- package/build/credentials/ios/appstore/ensureAppExists.js +1 -2
- package/build/credentials/ios/appstore/provisioningProfileAdhoc.js +5 -7
- package/build/credentials/ios/appstore/pushKey.js +2 -3
- package/build/credentials/ios/appstore/resolveCredentials.js +8 -9
- package/build/credentials/ios/errors.js +1 -1
- package/build/credentials/ios/utils/p12Certificate.js +1 -2
- package/build/credentials/ios/utils/provisioningProfile.js +1 -2
- package/build/credentials/ios/validators/validateProvisioningProfile.js +5 -7
- package/build/credentials/manager/ManageAndroid.js +2 -2
- package/build/credentials/manager/ManageIos.js +3 -4
- package/build/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.js +1 -2
- package/build/credentials/manager/SetDefaultAndroidKeystore.js +1 -1
- package/build/credentials/manager/SetUpAndroidBuildCredentials.js +2 -2
- package/build/credentials/manager/SetUpIosBuildCredentials.js +2 -2
- package/build/credentials/utils/promptForCredentials.js +2 -3
- package/build/devices/actions/create/currentMachineMethod.js +4 -5
- package/build/devices/actions/create/developerPortalMethod.js +1 -2
- package/build/devices/actions/create/inputMethod.js +1 -1
- package/build/devices/context.js +1 -1
- package/build/devices/queries.js +3 -6
- package/build/devices/utils/errors.js +2 -2
- package/build/devices/utils/formatDevice.js +4 -6
- package/build/graphql/client.js +5 -8
- package/build/graphql/generated.d.ts +42 -0
- package/build/graphql/mutations/AppMutation.js +1 -2
- package/build/graphql/mutations/AppVersionMutation.js +1 -2
- package/build/graphql/mutations/BuildMutation.js +4 -8
- package/build/graphql/mutations/UserPreferencesMutation.js +2 -3
- package/build/graphql/queries/AppVersionQuery.js +1 -2
- package/build/graphql/queries/BranchQuery.js +1 -2
- package/build/graphql/queries/BuildQuery.js +1 -2
- package/build/graphql/queries/EnvironmentSecretsQuery.js +2 -3
- package/build/graphql/queries/SubmissionQuery.js +1 -2
- package/build/graphql/queries/WebhookQuery.js +1 -2
- package/build/graphql/types/App.js +1 -0
- package/build/log.js +2 -2
- package/build/metadata/apple/config/reader.js +26 -32
- package/build/metadata/apple/config/writer.js +35 -39
- package/build/metadata/apple/rules/infoKeywordLength.js +2 -4
- package/build/metadata/apple/rules/infoRestrictedWords.js +2 -4
- package/build/metadata/apple/tasks/app-review-detail.js +1 -2
- package/build/metadata/apple/tasks/app-version.js +6 -8
- package/build/metadata/auth.js +1 -2
- package/build/metadata/config/resolve.js +2 -3
- package/build/metadata/config/validate.js +2 -4
- package/build/metadata/errors.js +3 -5
- package/build/metadata/upload.js +1 -2
- package/build/metadata/utils/retry.js +1 -2
- package/build/metadata/utils/telemetry.js +8 -11
- package/build/onboarding/runCommand.js +2 -2
- package/build/ora.js +18 -2
- package/build/project/android/applicationId.js +3 -4
- package/build/project/android/gradle.js +3 -4
- package/build/project/android/gradleUtils.js +4 -5
- package/build/project/expoConfig.js +3 -4
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +3 -5
- package/build/project/ios/bundleIdentifier.js +7 -8
- package/build/project/ios/entitlements.js +1 -2
- package/build/project/ios/scheme.js +7 -6
- package/build/project/ios/target.js +17 -23
- package/build/project/metroConfig.js +1 -2
- package/build/project/projectUtils.js +5 -7
- package/build/project/publish.js +18 -27
- package/build/project/remoteVersionSource.js +6 -7
- package/build/project/resolveRuntimeVersionAsync.d.ts +2 -1
- package/build/project/resolveRuntimeVersionAsync.js +3 -4
- package/build/prompts.js +5 -7
- package/build/rollout/actions/CreateRollout.js +4 -5
- package/build/rollout/actions/EditRollout.js +1 -2
- package/build/rollout/actions/EndRollout.js +2 -4
- package/build/rollout/actions/ManageRollout.js +1 -2
- package/build/rollout/actions/NonInteractiveRollout.js +1 -2
- package/build/rollout/actions/SelectRuntime.js +2 -4
- package/build/rollout/utils.js +4 -5
- package/build/run/android/adb.js +4 -7
- package/build/run/ios/xcode.js +1 -2
- package/build/run/ios/xcrun.js +1 -2
- package/build/run/utils.js +2 -4
- package/build/submit/ArchiveSource.js +1 -1
- package/build/submit/android/AndroidSubmitCommand.js +3 -5
- package/build/submit/android/AndroidSubmitter.js +3 -3
- package/build/submit/android/ServiceAccountSource.js +1 -2
- package/build/submit/ios/AppProduce.js +5 -4
- package/build/submit/ios/AppSpecificPasswordSource.js +2 -2
- package/build/submit/ios/AscApiKeySource.js +5 -3
- package/build/submit/ios/IosSubmitCommand.js +2 -3
- package/build/submit/ios/IosSubmitter.js +1 -1
- package/build/submit/ios/utils/language.js +3 -4
- package/build/submit/submit.js +2 -3
- package/build/submit/utils/errors.js +1 -2
- package/build/submit/utils/wait.js +1 -1
- package/build/update/android/UpdatesModule.js +1 -2
- package/build/update/configure.js +11 -14
- package/build/update/ios/UpdatesModule.js +2 -4
- package/build/update/queries.js +6 -10
- package/build/update/republish.js +1 -1
- package/build/update/utils.js +28 -39
- package/build/user/SessionManager.js +5 -8
- package/build/user/User.js +2 -2
- package/build/user/expoSsoLauncher.js +1 -2
- package/build/utils/code-signing.js +4 -7
- package/build/utils/expoCli.js +1 -2
- package/build/utils/expoUpdatesCli.d.ts +1 -0
- package/build/utils/expoUpdatesCli.js +3 -2
- package/build/utils/profiles.js +3 -3
- package/build/utils/progress.js +2 -2
- package/build/utils/relay.js +10 -14
- package/build/utils/timer.js +1 -2
- package/build/vcs/clients/git.d.ts +1 -1
- package/build/vcs/clients/git.js +24 -20
- package/build/vcs/git.d.ts +1 -1
- package/build/vcs/git.js +4 -2
- package/build/vcs/local.js +1 -2
- package/build/webhooks/input.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +5 -5
|
@@ -7,7 +7,6 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
|
7
7
|
const client_1 = require("../client");
|
|
8
8
|
exports.AppMutation = {
|
|
9
9
|
async createAppAsync(graphqlClient, appInput) {
|
|
10
|
-
var _a;
|
|
11
10
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
12
11
|
.mutation((0, graphql_tag_1.default) `
|
|
13
12
|
mutation CreateAppMutation($appInput: AppInput!) {
|
|
@@ -21,7 +20,7 @@ exports.AppMutation = {
|
|
|
21
20
|
appInput,
|
|
22
21
|
})
|
|
23
22
|
.toPromise());
|
|
24
|
-
const appId =
|
|
23
|
+
const appId = data.app?.createApp.id;
|
|
25
24
|
(0, assert_1.default)(appId, 'App ID must be defined');
|
|
26
25
|
return appId;
|
|
27
26
|
},
|
|
@@ -7,7 +7,6 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
|
7
7
|
const client_1 = require("../client");
|
|
8
8
|
exports.AppVersionMutation = {
|
|
9
9
|
async createAppVersionAsync(graphqlClient, appVersionInput) {
|
|
10
|
-
var _a;
|
|
11
10
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
12
11
|
.mutation((0, graphql_tag_1.default) `
|
|
13
12
|
mutation CreateAppVersionMutation($appVersionInput: AppVersionInput!) {
|
|
@@ -21,7 +20,7 @@ exports.AppVersionMutation = {
|
|
|
21
20
|
appVersionInput,
|
|
22
21
|
})
|
|
23
22
|
.toPromise());
|
|
24
|
-
const appVersionId =
|
|
23
|
+
const appVersionId = data.appVersion?.createAppVersion.id;
|
|
25
24
|
(0, assert_1.default)(appVersionId, 'AppVersion ID must be defined');
|
|
26
25
|
return appVersionId;
|
|
27
26
|
},
|
|
@@ -9,7 +9,6 @@ const client_1 = require("../client");
|
|
|
9
9
|
const Build_1 = require("../types/Build");
|
|
10
10
|
exports.BuildMutation = {
|
|
11
11
|
async createAndroidBuildAsync(graphqlClient, input) {
|
|
12
|
-
var _a;
|
|
13
12
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
14
13
|
.mutation((0, graphql_tag_1.default) `
|
|
15
14
|
mutation CreateAndroidBuildMutation(
|
|
@@ -39,10 +38,9 @@ exports.BuildMutation = {
|
|
|
39
38
|
${(0, graphql_1.print)(Build_1.BuildFragmentNode)}
|
|
40
39
|
`, input, { noRetry: true })
|
|
41
40
|
.toPromise());
|
|
42
|
-
return (0, nullthrows_1.default)(
|
|
41
|
+
return (0, nullthrows_1.default)(data.build?.createAndroidBuild);
|
|
43
42
|
},
|
|
44
43
|
async createIosBuildAsync(graphqlClient, input) {
|
|
45
|
-
var _a;
|
|
46
44
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
47
45
|
.mutation((0, graphql_tag_1.default) `
|
|
48
46
|
mutation CreateIosBuildMutation(
|
|
@@ -72,10 +70,9 @@ exports.BuildMutation = {
|
|
|
72
70
|
${(0, graphql_1.print)(Build_1.BuildFragmentNode)}
|
|
73
71
|
`, input, { noRetry: true })
|
|
74
72
|
.toPromise());
|
|
75
|
-
return (0, nullthrows_1.default)(
|
|
73
|
+
return (0, nullthrows_1.default)(data.build?.createIosBuild);
|
|
76
74
|
},
|
|
77
75
|
async updateBuildMetadataAsync(graphqlClient, input) {
|
|
78
|
-
var _a;
|
|
79
76
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
80
77
|
.mutation((0, graphql_tag_1.default) `
|
|
81
78
|
mutation UpdateBuildMetadataMutation($buildId: ID!, $metadata: BuildMetadataInput!) {
|
|
@@ -89,10 +86,9 @@ exports.BuildMutation = {
|
|
|
89
86
|
${(0, graphql_1.print)(Build_1.BuildFragmentNode)}
|
|
90
87
|
`, input)
|
|
91
88
|
.toPromise());
|
|
92
|
-
return (0, nullthrows_1.default)(
|
|
89
|
+
return (0, nullthrows_1.default)(data.build?.updateBuildMetadata);
|
|
93
90
|
},
|
|
94
91
|
async retryIosBuildAsync(graphqlClient, input) {
|
|
95
|
-
var _a;
|
|
96
92
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
97
93
|
.mutation((0, graphql_tag_1.default) `
|
|
98
94
|
mutation RetryIosBuildMutation($buildId: ID!, $jobOverrides: IosJobOverridesInput!) {
|
|
@@ -106,6 +102,6 @@ exports.BuildMutation = {
|
|
|
106
102
|
${(0, graphql_1.print)(Build_1.BuildFragmentNode)}
|
|
107
103
|
`, input, { noRetry: true })
|
|
108
104
|
.toPromise());
|
|
109
|
-
return (0, nullthrows_1.default)(
|
|
105
|
+
return (0, nullthrows_1.default)(data.build?.retryIosBuild);
|
|
110
106
|
},
|
|
111
107
|
};
|
|
@@ -7,7 +7,6 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
|
7
7
|
const client_1 = require("../client");
|
|
8
8
|
exports.UserPreferencesMutation = {
|
|
9
9
|
async markCliDoneInOnboardingUserPreferencesAsync(graphqlClient, userPreferencesData) {
|
|
10
|
-
var _a, _b;
|
|
11
10
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
12
11
|
.mutation((0, graphql_tag_1.default) `
|
|
13
12
|
mutation MarkCliDoneInOnboardingUserPreferencesMutation(
|
|
@@ -32,9 +31,9 @@ exports.UserPreferencesMutation = {
|
|
|
32
31
|
},
|
|
33
32
|
})
|
|
34
33
|
.toPromise());
|
|
35
|
-
const appId =
|
|
34
|
+
const appId = data.me.setPreferences.onboarding?.appId;
|
|
36
35
|
(0, assert_1.default)(appId, 'App ID must be defined');
|
|
37
|
-
const isCLIDone =
|
|
36
|
+
const isCLIDone = data.me.setPreferences.onboarding?.isCLIDone;
|
|
38
37
|
(0, assert_1.default)(isCLIDone, 'isCLIDone must be defined and true');
|
|
39
38
|
return {
|
|
40
39
|
appId,
|
|
@@ -6,7 +6,6 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
|
6
6
|
const client_1 = require("../client");
|
|
7
7
|
exports.AppVersionQuery = {
|
|
8
8
|
async latestVersionAsync(graphqlClient, appId, platform, applicationIdentifier) {
|
|
9
|
-
var _a;
|
|
10
9
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
11
10
|
.query((0, graphql_tag_1.default) `
|
|
12
11
|
query LatestAppVersion(
|
|
@@ -32,6 +31,6 @@ exports.AppVersionQuery = {
|
|
|
32
31
|
additionalTypenames: ['App', 'AppVersion'],
|
|
33
32
|
})
|
|
34
33
|
.toPromise());
|
|
35
|
-
return
|
|
34
|
+
return data.app.byId.latestAppVersionByPlatformAndApplicationIdentifier ?? null;
|
|
36
35
|
},
|
|
37
36
|
};
|
|
@@ -37,7 +37,6 @@ exports.BranchQuery = {
|
|
|
37
37
|
return updateBranchByName;
|
|
38
38
|
},
|
|
39
39
|
async listBranchesOnAppAsync(graphqlClient, { appId, limit, offset }) {
|
|
40
|
-
var _a, _b;
|
|
41
40
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
42
41
|
.query((0, graphql_tag_1.default) `
|
|
43
42
|
query BranchesByAppQuery($appId: String!, $limit: Int!, $offset: Int!) {
|
|
@@ -58,7 +57,7 @@ exports.BranchQuery = {
|
|
|
58
57
|
offset,
|
|
59
58
|
}, { additionalTypenames: ['UpdateBranch'] })
|
|
60
59
|
.toPromise());
|
|
61
|
-
return
|
|
60
|
+
return data?.app?.byId.updateBranches ?? [];
|
|
62
61
|
},
|
|
63
62
|
async listBranchesBasicInfoPaginatedOnAppAsync(graphqlClient, { appId, first, after, last, before }) {
|
|
64
63
|
const response = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
@@ -46,7 +46,6 @@ exports.BuildQuery = {
|
|
|
46
46
|
return data.builds.byId;
|
|
47
47
|
},
|
|
48
48
|
async viewBuildsOnAppAsync(graphqlClient, { appId, limit, offset, filter }) {
|
|
49
|
-
var _a, _b;
|
|
50
49
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
51
50
|
.query(
|
|
52
51
|
// TODO: Change $appId: String! to ID! when fixed server-side schema
|
|
@@ -72,6 +71,6 @@ exports.BuildQuery = {
|
|
|
72
71
|
additionalTypenames: ['Build'],
|
|
73
72
|
})
|
|
74
73
|
.toPromise());
|
|
75
|
-
return
|
|
74
|
+
return data.app?.byId.builds ?? [];
|
|
76
75
|
},
|
|
77
76
|
};
|
|
@@ -13,7 +13,6 @@ var EnvironmentSecretScope;
|
|
|
13
13
|
})(EnvironmentSecretScope || (exports.EnvironmentSecretScope = EnvironmentSecretScope = {}));
|
|
14
14
|
exports.EnvironmentSecretsQuery = {
|
|
15
15
|
async byAppIdAsync(graphqlClient, appId) {
|
|
16
|
-
var _a, _b, _c, _d;
|
|
17
16
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
18
17
|
.query((0, graphql_tag_1.default) `
|
|
19
18
|
query EnvironmentSecretsByAppId($appId: String!) {
|
|
@@ -38,8 +37,8 @@ exports.EnvironmentSecretsQuery = {
|
|
|
38
37
|
`, { appId }, { additionalTypenames: ['EnvironmentSecret'] })
|
|
39
38
|
.toPromise());
|
|
40
39
|
return {
|
|
41
|
-
accountSecrets:
|
|
42
|
-
appSecrets:
|
|
40
|
+
accountSecrets: data.app?.byId.ownerAccount.environmentSecrets ?? [],
|
|
41
|
+
appSecrets: data.app?.byId.environmentSecrets ?? [],
|
|
43
42
|
};
|
|
44
43
|
},
|
|
45
44
|
async allAsync(graphqlClient, projectId) {
|
|
@@ -27,7 +27,6 @@ exports.SubmissionQuery = {
|
|
|
27
27
|
return data.submissions.byId;
|
|
28
28
|
},
|
|
29
29
|
async allForAppAsync(graphqlClient, appId, { limit = 10, offset = 0, status, platform }) {
|
|
30
|
-
var _a, _b;
|
|
31
30
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
32
31
|
.query((0, graphql_tag_1.default) `
|
|
33
32
|
query GetAllSubmissionsForApp(
|
|
@@ -54,6 +53,6 @@ exports.SubmissionQuery = {
|
|
|
54
53
|
${(0, graphql_1.print)(Submission_1.SubmissionFragmentNode)}
|
|
55
54
|
`, { appId, offset, limit, status, platform }, { additionalTypenames: ['Submission'] })
|
|
56
55
|
.toPromise());
|
|
57
|
-
return
|
|
56
|
+
return data.app?.byId.submissions ?? [];
|
|
58
57
|
},
|
|
59
58
|
};
|
|
@@ -8,7 +8,6 @@ const client_1 = require("../client");
|
|
|
8
8
|
const Webhook_1 = require("../types/Webhook");
|
|
9
9
|
exports.WebhookQuery = {
|
|
10
10
|
async byAppIdAsync(graphqlClient, appId, webhookFilter) {
|
|
11
|
-
var _a, _b;
|
|
12
11
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
13
12
|
.query((0, graphql_tag_1.default) `
|
|
14
13
|
query WebhooksByAppId($appId: String!, $webhookFilter: WebhookFilter) {
|
|
@@ -27,7 +26,7 @@ exports.WebhookQuery = {
|
|
|
27
26
|
additionalTypenames: ['Webhook'],
|
|
28
27
|
})
|
|
29
28
|
.toPromise());
|
|
30
|
-
return
|
|
29
|
+
return data.app?.byId.webhooks ?? [];
|
|
31
30
|
},
|
|
32
31
|
async byIdAsync(graphqlClient, webhookId) {
|
|
33
32
|
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
package/build/log.js
CHANGED
|
@@ -83,7 +83,7 @@ exports.default = Log;
|
|
|
83
83
|
function link(url, { text = url, fallback, dim = true } = {}) {
|
|
84
84
|
// Links can be disabled via env variables https://github.com/jamestalmage/supports-hyperlinks/blob/master/index.js
|
|
85
85
|
const output = (0, terminal_link_1.default)(text, url, {
|
|
86
|
-
fallback: () => fallback
|
|
86
|
+
fallback: () => fallback ?? (text === url ? chalk_1.default.underline(url) : `${text}: ${chalk_1.default.underline(url)}`),
|
|
87
87
|
});
|
|
88
88
|
return dim ? chalk_1.default.dim(output) : output;
|
|
89
89
|
}
|
|
@@ -95,6 +95,6 @@ exports.link = link;
|
|
|
95
95
|
* @example Learn more: https://expo.dev
|
|
96
96
|
*/
|
|
97
97
|
function learnMore(url, { learnMoreMessage: maybeLearnMoreMessage, dim = true, } = {}) {
|
|
98
|
-
return link(url, { text: maybeLearnMoreMessage
|
|
98
|
+
return link(url, { text: maybeLearnMoreMessage ?? 'Learn more', dim });
|
|
99
99
|
}
|
|
100
100
|
exports.learnMore = learnMore;
|
|
@@ -16,28 +16,27 @@ class AppleConfigReader {
|
|
|
16
16
|
this.schema = schema;
|
|
17
17
|
}
|
|
18
18
|
getAgeRating() {
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
20
19
|
const attributes = this.schema.advisory;
|
|
21
20
|
if (!attributes) {
|
|
22
21
|
return null;
|
|
23
22
|
}
|
|
24
23
|
return {
|
|
25
|
-
alcoholTobaccoOrDrugUseOrReferences:
|
|
26
|
-
contests:
|
|
27
|
-
gamblingSimulated:
|
|
28
|
-
horrorOrFearThemes:
|
|
29
|
-
matureOrSuggestiveThemes:
|
|
30
|
-
medicalOrTreatmentInformation:
|
|
31
|
-
profanityOrCrudeHumor:
|
|
32
|
-
sexualContentGraphicAndNudity:
|
|
33
|
-
sexualContentOrNudity:
|
|
34
|
-
violenceCartoonOrFantasy:
|
|
35
|
-
violenceRealistic:
|
|
36
|
-
violenceRealisticProlongedGraphicOrSadistic:
|
|
37
|
-
gambling:
|
|
38
|
-
unrestrictedWebAccess:
|
|
39
|
-
kidsAgeBand:
|
|
40
|
-
seventeenPlus:
|
|
24
|
+
alcoholTobaccoOrDrugUseOrReferences: attributes.alcoholTobaccoOrDrugUseOrReferences ?? apple_utils_1.Rating.NONE,
|
|
25
|
+
contests: attributes.contests ?? apple_utils_1.Rating.NONE,
|
|
26
|
+
gamblingSimulated: attributes.gamblingSimulated ?? apple_utils_1.Rating.NONE,
|
|
27
|
+
horrorOrFearThemes: attributes.horrorOrFearThemes ?? apple_utils_1.Rating.NONE,
|
|
28
|
+
matureOrSuggestiveThemes: attributes.matureOrSuggestiveThemes ?? apple_utils_1.Rating.NONE,
|
|
29
|
+
medicalOrTreatmentInformation: attributes.medicalOrTreatmentInformation ?? apple_utils_1.Rating.NONE,
|
|
30
|
+
profanityOrCrudeHumor: attributes.profanityOrCrudeHumor ?? apple_utils_1.Rating.NONE,
|
|
31
|
+
sexualContentGraphicAndNudity: attributes.sexualContentGraphicAndNudity ?? apple_utils_1.Rating.NONE,
|
|
32
|
+
sexualContentOrNudity: attributes.sexualContentOrNudity ?? apple_utils_1.Rating.NONE,
|
|
33
|
+
violenceCartoonOrFantasy: attributes.violenceCartoonOrFantasy ?? apple_utils_1.Rating.NONE,
|
|
34
|
+
violenceRealistic: attributes.violenceRealistic ?? apple_utils_1.Rating.NONE,
|
|
35
|
+
violenceRealisticProlongedGraphicOrSadistic: attributes.violenceRealisticProlongedGraphicOrSadistic ?? apple_utils_1.Rating.NONE,
|
|
36
|
+
gambling: attributes.gambling ?? false,
|
|
37
|
+
unrestrictedWebAccess: attributes.unrestrictedWebAccess ?? false,
|
|
38
|
+
kidsAgeBand: attributes.kidsAgeBand ?? null,
|
|
39
|
+
seventeenPlus: attributes.seventeenPlus ?? false,
|
|
41
40
|
};
|
|
42
41
|
}
|
|
43
42
|
getLocales() {
|
|
@@ -45,8 +44,7 @@ class AppleConfigReader {
|
|
|
45
44
|
return (0, uniq_1.default)(Object.keys(this.schema.info || {}));
|
|
46
45
|
}
|
|
47
46
|
getInfoLocale(locale) {
|
|
48
|
-
|
|
49
|
-
const info = (_a = this.schema.info) === null || _a === void 0 ? void 0 : _a[locale];
|
|
47
|
+
const info = this.schema.info?.[locale];
|
|
50
48
|
if (!info) {
|
|
51
49
|
return null;
|
|
52
50
|
}
|
|
@@ -88,31 +86,29 @@ class AppleConfigReader {
|
|
|
88
86
|
}
|
|
89
87
|
/** Get the `AppStoreVersion` object. */
|
|
90
88
|
getVersion() {
|
|
91
|
-
var _a, _b;
|
|
92
89
|
const attributes = {
|
|
93
|
-
versionString:
|
|
94
|
-
copyright:
|
|
90
|
+
versionString: this.schema.version ?? '',
|
|
91
|
+
copyright: this.schema.copyright ?? null,
|
|
95
92
|
};
|
|
96
93
|
const hasValues = Object.values(attributes).some(Boolean);
|
|
97
94
|
return hasValues ? attributes : null;
|
|
98
95
|
}
|
|
99
96
|
getVersionReleaseType() {
|
|
100
|
-
var _a, _b;
|
|
101
97
|
const { release } = this.schema;
|
|
102
|
-
if (typeof
|
|
98
|
+
if (typeof release?.automaticRelease === 'string') {
|
|
103
99
|
return {
|
|
104
100
|
releaseType: apple_utils_1.ReleaseType.SCHEDULED,
|
|
105
101
|
// Convert time format to 2020-06-17T12:00:00-07:00, if that fails, try the date anyways.
|
|
106
|
-
earliestReleaseDate: (
|
|
102
|
+
earliestReleaseDate: (0, date_1.removeDatePrecision)(release.automaticRelease)?.toISOString() ?? release.automaticRelease,
|
|
107
103
|
};
|
|
108
104
|
}
|
|
109
|
-
if (
|
|
105
|
+
if (release?.automaticRelease === true) {
|
|
110
106
|
return {
|
|
111
107
|
releaseType: apple_utils_1.ReleaseType.AFTER_APPROVAL,
|
|
112
108
|
earliestReleaseDate: null,
|
|
113
109
|
};
|
|
114
110
|
}
|
|
115
|
-
if (
|
|
111
|
+
if (release?.automaticRelease === false) {
|
|
116
112
|
return {
|
|
117
113
|
releaseType: apple_utils_1.ReleaseType.MANUAL,
|
|
118
114
|
earliestReleaseDate: null,
|
|
@@ -121,8 +117,7 @@ class AppleConfigReader {
|
|
|
121
117
|
return null;
|
|
122
118
|
}
|
|
123
119
|
getVersionReleasePhased() {
|
|
124
|
-
|
|
125
|
-
if (((_a = this.schema.release) === null || _a === void 0 ? void 0 : _a.phasedRelease) === true) {
|
|
120
|
+
if (this.schema.release?.phasedRelease === true) {
|
|
126
121
|
return {
|
|
127
122
|
phasedReleaseState: apple_utils_1.PhasedReleaseState.ACTIVE,
|
|
128
123
|
};
|
|
@@ -132,15 +127,14 @@ class AppleConfigReader {
|
|
|
132
127
|
return null;
|
|
133
128
|
}
|
|
134
129
|
getVersionLocale(locale, context) {
|
|
135
|
-
|
|
136
|
-
const info = (_a = this.schema.info) === null || _a === void 0 ? void 0 : _a[locale];
|
|
130
|
+
const info = this.schema.info?.[locale];
|
|
137
131
|
if (!info) {
|
|
138
132
|
return null;
|
|
139
133
|
}
|
|
140
134
|
return {
|
|
141
135
|
locale,
|
|
142
136
|
description: info.description,
|
|
143
|
-
keywords:
|
|
137
|
+
keywords: info.keywords?.join(','),
|
|
144
138
|
// TODO: maybe move this to task logic, it's more an exception than data handling
|
|
145
139
|
whatsNew: context.versionIsFirst ? undefined : info.releaseNotes || exports.DEFAULT_WHATSNEW,
|
|
146
140
|
marketingUrl: info.marketingUrl,
|
|
@@ -18,33 +18,31 @@ class AppleConfigWriter {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
setAgeRating(attributes) {
|
|
21
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
22
21
|
this.schema.advisory = {
|
|
23
|
-
alcoholTobaccoOrDrugUseOrReferences:
|
|
24
|
-
contests:
|
|
25
|
-
gamblingSimulated:
|
|
26
|
-
horrorOrFearThemes:
|
|
27
|
-
matureOrSuggestiveThemes:
|
|
28
|
-
medicalOrTreatmentInformation:
|
|
29
|
-
profanityOrCrudeHumor:
|
|
30
|
-
sexualContentGraphicAndNudity:
|
|
31
|
-
sexualContentOrNudity:
|
|
32
|
-
violenceCartoonOrFantasy:
|
|
33
|
-
violenceRealistic:
|
|
34
|
-
violenceRealisticProlongedGraphicOrSadistic:
|
|
35
|
-
gambling:
|
|
36
|
-
unrestrictedWebAccess:
|
|
37
|
-
kidsAgeBand:
|
|
38
|
-
seventeenPlus:
|
|
22
|
+
alcoholTobaccoOrDrugUseOrReferences: attributes.alcoholTobaccoOrDrugUseOrReferences ?? apple_utils_1.Rating.NONE,
|
|
23
|
+
contests: attributes.contests ?? apple_utils_1.Rating.NONE,
|
|
24
|
+
gamblingSimulated: attributes.gamblingSimulated ?? apple_utils_1.Rating.NONE,
|
|
25
|
+
horrorOrFearThemes: attributes.horrorOrFearThemes ?? apple_utils_1.Rating.NONE,
|
|
26
|
+
matureOrSuggestiveThemes: attributes.matureOrSuggestiveThemes ?? apple_utils_1.Rating.NONE,
|
|
27
|
+
medicalOrTreatmentInformation: attributes.medicalOrTreatmentInformation ?? apple_utils_1.Rating.NONE,
|
|
28
|
+
profanityOrCrudeHumor: attributes.profanityOrCrudeHumor ?? apple_utils_1.Rating.NONE,
|
|
29
|
+
sexualContentGraphicAndNudity: attributes.sexualContentGraphicAndNudity ?? apple_utils_1.Rating.NONE,
|
|
30
|
+
sexualContentOrNudity: attributes.sexualContentOrNudity ?? apple_utils_1.Rating.NONE,
|
|
31
|
+
violenceCartoonOrFantasy: attributes.violenceCartoonOrFantasy ?? apple_utils_1.Rating.NONE,
|
|
32
|
+
violenceRealistic: attributes.violenceRealistic ?? apple_utils_1.Rating.NONE,
|
|
33
|
+
violenceRealisticProlongedGraphicOrSadistic: attributes.violenceRealisticProlongedGraphicOrSadistic ?? apple_utils_1.Rating.NONE,
|
|
34
|
+
gambling: attributes.gambling ?? false,
|
|
35
|
+
unrestrictedWebAccess: attributes.unrestrictedWebAccess ?? false,
|
|
36
|
+
kidsAgeBand: attributes.kidsAgeBand ?? null,
|
|
37
|
+
seventeenPlus: attributes.seventeenPlus ?? false,
|
|
39
38
|
};
|
|
40
39
|
}
|
|
41
40
|
setInfoLocale(attributes) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const existing = (_b = this.schema.info[attributes.locale]) !== null && _b !== void 0 ? _b : {};
|
|
41
|
+
this.schema.info = this.schema.info ?? {};
|
|
42
|
+
const existing = this.schema.info[attributes.locale] ?? {};
|
|
45
43
|
this.schema.info[attributes.locale] = {
|
|
46
44
|
...existing,
|
|
47
|
-
title:
|
|
45
|
+
title: attributes.name ?? '',
|
|
48
46
|
subtitle: optional(attributes.subtitle),
|
|
49
47
|
privacyPolicyUrl: optional(attributes.privacyPolicyUrl),
|
|
50
48
|
privacyPolicyText: optional(attributes.privacyPolicyText),
|
|
@@ -52,7 +50,6 @@ class AppleConfigWriter {
|
|
|
52
50
|
};
|
|
53
51
|
}
|
|
54
52
|
setCategories(attributes) {
|
|
55
|
-
var _a, _b, _c, _d, _e, _f;
|
|
56
53
|
this.schema.categories = undefined;
|
|
57
54
|
if (!attributes.primaryCategory && !attributes.secondaryCategory) {
|
|
58
55
|
return;
|
|
@@ -61,20 +58,20 @@ class AppleConfigWriter {
|
|
|
61
58
|
if (attributes.primaryCategory && attributes.primarySubcategoryOne) {
|
|
62
59
|
this.schema.categories[0] = [
|
|
63
60
|
attributes.primaryCategory.id,
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
attributes.primarySubcategoryOne?.id,
|
|
62
|
+
attributes.primarySubcategoryTwo?.id,
|
|
66
63
|
].filter(Boolean);
|
|
67
64
|
}
|
|
68
65
|
else {
|
|
69
66
|
// If only the secondaryCategory was provided,
|
|
70
67
|
// autofill with an empty string and cause a store config error.
|
|
71
|
-
this.schema.categories[0] =
|
|
68
|
+
this.schema.categories[0] = attributes.primaryCategory?.id ?? '';
|
|
72
69
|
}
|
|
73
70
|
if (attributes.secondaryCategory && attributes.secondarySubcategoryOne) {
|
|
74
71
|
this.schema.categories[1] = [
|
|
75
72
|
attributes.secondaryCategory.id,
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
attributes.secondarySubcategoryOne?.id,
|
|
74
|
+
attributes.secondarySubcategoryTwo?.id,
|
|
78
75
|
].filter(Boolean);
|
|
79
76
|
}
|
|
80
77
|
else if (attributes.secondaryCategory) {
|
|
@@ -106,9 +103,8 @@ class AppleConfigWriter {
|
|
|
106
103
|
}
|
|
107
104
|
}
|
|
108
105
|
setVersionReleasePhased(attributes) {
|
|
109
|
-
var _a;
|
|
110
106
|
if (!attributes) {
|
|
111
|
-
|
|
107
|
+
delete this.schema.release?.phasedRelease;
|
|
112
108
|
}
|
|
113
109
|
else {
|
|
114
110
|
this.schema.release = {
|
|
@@ -118,13 +114,14 @@ class AppleConfigWriter {
|
|
|
118
114
|
}
|
|
119
115
|
}
|
|
120
116
|
setVersionLocale(attributes) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const existing = (_b = this.schema.info[attributes.locale]) !== null && _b !== void 0 ? _b : {};
|
|
117
|
+
this.schema.info = this.schema.info ?? {};
|
|
118
|
+
const existing = this.schema.info[attributes.locale] ?? {};
|
|
124
119
|
this.schema.info[attributes.locale] = {
|
|
125
120
|
...existing,
|
|
126
121
|
description: optional(attributes.description),
|
|
127
|
-
keywords:
|
|
122
|
+
keywords: optional(attributes.keywords)
|
|
123
|
+
?.split(',')
|
|
124
|
+
.map(keyword => keyword.trim()),
|
|
128
125
|
releaseNotes: optional(attributes.whatsNew),
|
|
129
126
|
marketingUrl: optional(attributes.marketingUrl),
|
|
130
127
|
promoText: optional(attributes.promotionalText),
|
|
@@ -132,12 +129,11 @@ class AppleConfigWriter {
|
|
|
132
129
|
};
|
|
133
130
|
}
|
|
134
131
|
setReviewDetails(attributes) {
|
|
135
|
-
var _a, _b, _c, _d;
|
|
136
132
|
this.schema.review = {
|
|
137
|
-
firstName:
|
|
138
|
-
lastName:
|
|
139
|
-
email:
|
|
140
|
-
phone:
|
|
133
|
+
firstName: attributes.contactFirstName ?? '',
|
|
134
|
+
lastName: attributes.contactLastName ?? '',
|
|
135
|
+
email: attributes.contactEmail ?? '',
|
|
136
|
+
phone: attributes.contactPhone ?? '',
|
|
141
137
|
demoUsername: optional(attributes.demoAccountName),
|
|
142
138
|
demoPassword: optional(attributes.demoAccountPassword),
|
|
143
139
|
demoRequired: optional(attributes.demoAccountRequired),
|
|
@@ -149,5 +145,5 @@ class AppleConfigWriter {
|
|
|
149
145
|
exports.AppleConfigWriter = AppleConfigWriter;
|
|
150
146
|
/** Helper function to convert `T | null` to `T | undefined`, required for the entity properties */
|
|
151
147
|
function optional(value) {
|
|
152
|
-
return value
|
|
148
|
+
return value ?? undefined;
|
|
153
149
|
}
|
|
@@ -11,14 +11,12 @@ exports.infoKeywordLength = {
|
|
|
11
11
|
id: 'apple.info.keyword.length',
|
|
12
12
|
severity: 2,
|
|
13
13
|
validate(config) {
|
|
14
|
-
|
|
15
|
-
if (!((_a = config.apple) === null || _a === void 0 ? void 0 : _a.info) || Object.keys(config.apple.info).length === 0) {
|
|
14
|
+
if (!config.apple?.info || Object.keys(config.apple.info).length === 0) {
|
|
16
15
|
return null;
|
|
17
16
|
}
|
|
18
17
|
return Object.keys(config.apple.info)
|
|
19
18
|
.map(locale => {
|
|
20
|
-
|
|
21
|
-
const keywords = (_c = (_b = (_a = config.apple) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b[locale].keywords) !== null && _c !== void 0 ? _c : [];
|
|
19
|
+
const keywords = config.apple?.info?.[locale].keywords ?? [];
|
|
22
20
|
const length = keywords.join(',').length;
|
|
23
21
|
if (length > KEYWORD_CHARACTER_LIMIT) {
|
|
24
22
|
return {
|
|
@@ -14,14 +14,12 @@ exports.infoRestrictedWords = {
|
|
|
14
14
|
id: 'apple.info.restrictedWords',
|
|
15
15
|
severity: 1,
|
|
16
16
|
validate(config) {
|
|
17
|
-
|
|
18
|
-
if (!((_a = config.apple) === null || _a === void 0 ? void 0 : _a.info) || Object.keys(config.apple.info).length === 0) {
|
|
17
|
+
if (!config.apple?.info || Object.keys(config.apple.info).length === 0) {
|
|
19
18
|
return null;
|
|
20
19
|
}
|
|
21
20
|
return Object.keys(config.apple.info)
|
|
22
21
|
.map(locale => RESTRICTED_PROPERTIES.map(property => {
|
|
23
|
-
|
|
24
|
-
const value = getStringValue((_b = (_a = config.apple) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b[locale][property]);
|
|
22
|
+
const value = getStringValue(config.apple?.info?.[locale][property]);
|
|
25
23
|
const issueDescription = getDescriptionForFirstMatch(value);
|
|
26
24
|
if (issueDescription) {
|
|
27
25
|
return {
|
|
@@ -14,9 +14,8 @@ class AppReviewDetailTask extends task_1.AppleTask {
|
|
|
14
14
|
this.name = () => 'app review detail';
|
|
15
15
|
}
|
|
16
16
|
async prepareAsync({ context }) {
|
|
17
|
-
var _a;
|
|
18
17
|
(0, assert_1.default)(context.version, `App version not initialized, can't download store review details`);
|
|
19
|
-
context.reviewDetail = (
|
|
18
|
+
context.reviewDetail = (await context.version.getAppStoreReviewDetailAsync()) ?? undefined;
|
|
20
19
|
}
|
|
21
20
|
async downloadAsync({ config, context }) {
|
|
22
21
|
if (context.reviewDetail) {
|
|
@@ -11,13 +11,12 @@ const retry_1 = require("../../utils/retry");
|
|
|
11
11
|
const task_1 = require("../task");
|
|
12
12
|
class AppVersionTask extends task_1.AppleTask {
|
|
13
13
|
constructor(options = {}) {
|
|
14
|
-
var _a, _b, _c;
|
|
15
14
|
super();
|
|
16
15
|
this.name = () => (this.options.editLive ? 'live app version' : 'editable app version');
|
|
17
16
|
this.options = {
|
|
18
|
-
platform:
|
|
19
|
-
editLive:
|
|
20
|
-
version:
|
|
17
|
+
platform: options.platform ?? apple_utils_1.Platform.IOS,
|
|
18
|
+
editLive: options.editLive ?? false,
|
|
19
|
+
version: options.version ?? null,
|
|
21
20
|
};
|
|
22
21
|
}
|
|
23
22
|
async prepareAsync({ context }) {
|
|
@@ -30,18 +29,17 @@ class AppVersionTask extends task_1.AppleTask {
|
|
|
30
29
|
context.versionPhasedRelease = await version.getPhasedReleaseAsync();
|
|
31
30
|
}
|
|
32
31
|
async downloadAsync({ config, context }) {
|
|
33
|
-
var _a;
|
|
34
32
|
(0, assert_1.default)(context.version, `App version not initialized, can't download version`);
|
|
35
33
|
config.setVersion(context.version.attributes);
|
|
36
34
|
config.setVersionReleaseType(context.version.attributes);
|
|
37
|
-
config.setVersionReleasePhased(
|
|
35
|
+
config.setVersionReleasePhased(context.versionPhasedRelease?.attributes);
|
|
38
36
|
for (const locale of context.versionLocales) {
|
|
39
37
|
config.setVersionLocale(locale.attributes);
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
async uploadAsync({ config, context }) {
|
|
43
41
|
const version = config.getVersion();
|
|
44
|
-
if (!context.version &&
|
|
42
|
+
if (!context.version && version?.versionString) {
|
|
45
43
|
context.version = await (0, log_2.logAsync)(() => {
|
|
46
44
|
return context.app.createVersionAsync({
|
|
47
45
|
versionString: version.versionString,
|
|
@@ -128,7 +126,7 @@ async function resolveVersionAsync(app, { editLive, platform, version: versionSt
|
|
|
128
126
|
version: versionString,
|
|
129
127
|
});
|
|
130
128
|
}
|
|
131
|
-
versionIsLive =
|
|
129
|
+
versionIsLive = version?.attributes.appStoreState === apple_utils_1.AppStoreState.READY_FOR_SALE;
|
|
132
130
|
}
|
|
133
131
|
if (!version && editLive) {
|
|
134
132
|
version = await app.getLiveAppStoreVersionAsync({ platform });
|
package/build/metadata/auth.js
CHANGED
|
@@ -11,9 +11,8 @@ const bundleIdentifier_1 = require("../project/ios/bundleIdentifier");
|
|
|
11
11
|
* This bundle identifier is used as target for the metadata submission.
|
|
12
12
|
*/
|
|
13
13
|
async function resolveAppStoreBundleIdentifierAsync(projectDir, profile, exp, vcsClient) {
|
|
14
|
-
var _a;
|
|
15
14
|
if ('bundleIdentifier' in profile) {
|
|
16
|
-
return
|
|
15
|
+
return profile.bundleIdentifier ?? (await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, vcsClient));
|
|
17
16
|
}
|
|
18
17
|
return await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, vcsClient);
|
|
19
18
|
}
|
|
@@ -14,7 +14,7 @@ const errors_1 = require("../errors");
|
|
|
14
14
|
* It supports methods, async methods, or objects (json).
|
|
15
15
|
*/
|
|
16
16
|
async function resolveDynamicConfigAsync(configFile) {
|
|
17
|
-
const userConfigOrFunction = await Promise.resolve(`${configFile}`).then(s => tslib_1.__importStar(require(s))).then(file =>
|
|
17
|
+
const userConfigOrFunction = await Promise.resolve(`${configFile}`).then(s => tslib_1.__importStar(require(s))).then(file => file.default ?? file);
|
|
18
18
|
return typeof userConfigOrFunction === 'function'
|
|
19
19
|
? await userConfigOrFunction()
|
|
20
20
|
: userConfigOrFunction;
|
|
@@ -24,9 +24,8 @@ async function resolveDynamicConfigAsync(configFile) {
|
|
|
24
24
|
* This is relative to the project directory, and uses `store.config.json` by default.
|
|
25
25
|
*/
|
|
26
26
|
function resolveConfigFilePath(profile) {
|
|
27
|
-
var _a;
|
|
28
27
|
if ('metadataPath' in profile) {
|
|
29
|
-
return
|
|
28
|
+
return profile.metadataPath ?? 'store.config.json';
|
|
30
29
|
}
|
|
31
30
|
return 'store.config.json';
|
|
32
31
|
}
|