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
package/build/build/metadata.js
CHANGED
|
@@ -16,9 +16,8 @@ const UpdatesModule_1 = require("../update/android/UpdatesModule");
|
|
|
16
16
|
const UpdatesModule_2 = require("../update/ios/UpdatesModule");
|
|
17
17
|
const easCli_1 = require("../utils/easCli");
|
|
18
18
|
async function collectMetadataAsync(ctx) {
|
|
19
|
-
var _a, _b, _c, _d, _e;
|
|
20
19
|
const channelObject = await resolveChannelAsync(ctx);
|
|
21
|
-
const distribution =
|
|
20
|
+
const distribution = ctx.buildProfile.distribution ?? types_1.BuildDistributionType.STORE;
|
|
22
21
|
const metadata = {
|
|
23
22
|
trackingContext: ctx.analyticsEventProperties,
|
|
24
23
|
...(await maybeResolveVersionsAsync(ctx)),
|
|
@@ -26,13 +25,14 @@ async function collectMetadataAsync(ctx) {
|
|
|
26
25
|
workflow: ctx.workflow,
|
|
27
26
|
credentialsSource: ctx.buildProfile.credentialsSource,
|
|
28
27
|
sdkVersion: ctx.exp.sdkVersion,
|
|
29
|
-
runtimeVersion: (
|
|
28
|
+
runtimeVersion: (await (0, resolveRuntimeVersionAsync_1.resolveRuntimeVersionAsync)({
|
|
30
29
|
exp: ctx.exp,
|
|
31
30
|
platform: ctx.platform,
|
|
32
31
|
workflow: ctx.workflow,
|
|
33
32
|
projectDir: ctx.projectDir,
|
|
34
33
|
env: ctx.buildProfile.env,
|
|
35
|
-
|
|
34
|
+
cwd: ctx.projectDir,
|
|
35
|
+
})) ?? undefined,
|
|
36
36
|
reactNativeVersion: await getReactNativeVersionAsync(ctx.projectDir),
|
|
37
37
|
...channelObject,
|
|
38
38
|
distribution,
|
|
@@ -40,7 +40,7 @@ async function collectMetadataAsync(ctx) {
|
|
|
40
40
|
appIdentifier: resolveAppIdentifier(ctx),
|
|
41
41
|
buildProfile: ctx.buildProfileName,
|
|
42
42
|
gitCommitHash: await ctx.vcsClient.getCommitHashAsync(),
|
|
43
|
-
gitCommitMessage: truncateGitCommitMessage((
|
|
43
|
+
gitCommitMessage: truncateGitCommitMessage((await ctx.vcsClient.getLastCommitMessageAsync()) ?? undefined),
|
|
44
44
|
isGitWorkingTreeDirty: ctx.localBuildOptions.localBuildMode === local_1.LocalBuildMode.INTERNAL
|
|
45
45
|
? false
|
|
46
46
|
: await ctx.vcsClient.hasUncommittedChangesAsync(),
|
|
@@ -51,9 +51,9 @@ async function collectMetadataAsync(ctx) {
|
|
|
51
51
|
}),
|
|
52
52
|
runWithNoWaitFlag: ctx.noWait,
|
|
53
53
|
runFromCI: ctx.runFromCI,
|
|
54
|
-
customWorkflowName:
|
|
54
|
+
customWorkflowName: ctx.customBuildConfigMetadata?.workflowName,
|
|
55
55
|
developmentClient: ctx.developmentClient,
|
|
56
|
-
requiredPackageManager:
|
|
56
|
+
requiredPackageManager: ctx.requiredPackageManager ?? undefined,
|
|
57
57
|
selectedImage: ctx.buildProfile.image,
|
|
58
58
|
customNodeVersion: ctx.buildProfile.node,
|
|
59
59
|
simulator: 'simulator' in ctx.buildProfile && ctx.buildProfile.simulator,
|
|
@@ -110,13 +110,12 @@ async function resolveChannelAsync(ctx) {
|
|
|
110
110
|
return null;
|
|
111
111
|
}
|
|
112
112
|
async function getNativeChannelAsync(ctx) {
|
|
113
|
-
var _a, _b;
|
|
114
113
|
switch (ctx.platform) {
|
|
115
114
|
case eas_build_job_1.Platform.ANDROID: {
|
|
116
|
-
return (
|
|
115
|
+
return (await (0, UpdatesModule_1.readChannelSafelyAsync)(ctx.projectDir)) ?? undefined;
|
|
117
116
|
}
|
|
118
117
|
case eas_build_job_1.Platform.IOS: {
|
|
119
|
-
return (
|
|
118
|
+
return (await (0, UpdatesModule_2.readChannelSafelyAsync)(ctx.projectDir)) ?? undefined;
|
|
120
119
|
}
|
|
121
120
|
}
|
|
122
121
|
return undefined;
|
package/build/build/queries.js
CHANGED
|
@@ -12,11 +12,10 @@ const json_1 = require("../utils/json");
|
|
|
12
12
|
const queries_1 = require("../utils/queries");
|
|
13
13
|
exports.BUILDS_LIMIT = 50;
|
|
14
14
|
async function listAndRenderBuildsOnAppAsync(graphqlClient, { projectId, projectDisplayName, filter, paginatedQueryOptions, }) {
|
|
15
|
-
var _a, _b;
|
|
16
15
|
if (paginatedQueryOptions.nonInteractive) {
|
|
17
16
|
const builds = await BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
|
|
18
17
|
appId: projectId,
|
|
19
|
-
limit:
|
|
18
|
+
limit: paginatedQueryOptions.limit ?? exports.BUILDS_LIMIT,
|
|
20
19
|
offset: paginatedQueryOptions.offset,
|
|
21
20
|
filter,
|
|
22
21
|
});
|
|
@@ -24,7 +23,7 @@ async function listAndRenderBuildsOnAppAsync(graphqlClient, { projectId, project
|
|
|
24
23
|
}
|
|
25
24
|
else {
|
|
26
25
|
await (0, queries_1.paginatedQueryWithConfirmPromptAsync)({
|
|
27
|
-
limit:
|
|
26
|
+
limit: paginatedQueryOptions.limit ?? exports.BUILDS_LIMIT,
|
|
28
27
|
offset: paginatedQueryOptions.offset,
|
|
29
28
|
queryToPerform: (limit, offset) => BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
|
|
30
29
|
appId: projectId,
|
|
@@ -41,13 +40,12 @@ async function listAndRenderBuildsOnAppAsync(graphqlClient, { projectId, project
|
|
|
41
40
|
}
|
|
42
41
|
exports.listAndRenderBuildsOnAppAsync = listAndRenderBuildsOnAppAsync;
|
|
43
42
|
async function listAndSelectBuildOnAppAsync(graphqlClient, { projectId, title, filter, paginatedQueryOptions, selectPromptDisabledFunction, selectPromptWarningMessage, }) {
|
|
44
|
-
var _a;
|
|
45
43
|
if (paginatedQueryOptions.nonInteractive) {
|
|
46
44
|
throw new Error('Unable to select a build in non-interactive mode.');
|
|
47
45
|
}
|
|
48
46
|
else {
|
|
49
47
|
const selectedBuild = await (0, queries_1.paginatedQueryWithSelectPromptAsync)({
|
|
50
|
-
limit:
|
|
48
|
+
limit: paginatedQueryOptions.limit ?? exports.BUILDS_LIMIT,
|
|
51
49
|
offset: paginatedQueryOptions.offset,
|
|
52
50
|
queryToPerform: (limit, offset) => BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
|
|
53
51
|
appId: projectId,
|
|
@@ -62,14 +60,13 @@ async function listAndSelectBuildOnAppAsync(graphqlClient, { projectId, title, f
|
|
|
62
60
|
selectPromptWarningMessage,
|
|
63
61
|
},
|
|
64
62
|
});
|
|
65
|
-
return selectedBuild
|
|
63
|
+
return selectedBuild ?? null;
|
|
66
64
|
}
|
|
67
65
|
}
|
|
68
66
|
exports.listAndSelectBuildOnAppAsync = listAndSelectBuildOnAppAsync;
|
|
69
67
|
function createBuildToPartialChoiceMaker(selectPromptDisabledFunction) {
|
|
70
68
|
return (build) => {
|
|
71
|
-
|
|
72
|
-
const splitCommitMessage = (_a = build.gitCommitMessage) === null || _a === void 0 ? void 0 : _a.split('\n');
|
|
69
|
+
const splitCommitMessage = build.gitCommitMessage?.split('\n');
|
|
73
70
|
const formattedCommitData = build.gitCommitHash && splitCommitMessage && splitCommitMessage.length > 0
|
|
74
71
|
? `${build.gitCommitHash.slice(0, 7)} "${chalk_1.default.bold(splitCommitMessage[0] + (splitCommitMessage.length > 1 ? '…' : ''))}"`
|
|
75
72
|
: null;
|
|
@@ -94,7 +91,7 @@ function createBuildToPartialChoiceMaker(selectPromptDisabledFunction) {
|
|
|
94
91
|
return {
|
|
95
92
|
title: `${chalk_1.default.bold(`ID:`)} ${build.id} (${chalk_1.default.bold(`${(0, date_1.fromNow)(new Date(build.completedAt))} ago`)})`,
|
|
96
93
|
description: filteredDescriptionArray.length > 0 ? filteredDescriptionArray.join('\n') : '',
|
|
97
|
-
disabled: selectPromptDisabledFunction
|
|
94
|
+
disabled: selectPromptDisabledFunction?.(build),
|
|
98
95
|
};
|
|
99
96
|
};
|
|
100
97
|
}
|
|
@@ -22,4 +22,6 @@ export interface BuildFlags {
|
|
|
22
22
|
buildLoggerLevel?: LoggerLevel;
|
|
23
23
|
freezeCredentials: boolean;
|
|
24
24
|
}
|
|
25
|
-
export declare function runBuildAndSubmitAsync(graphqlClient: ExpoGraphqlClient, analytics: Analytics, vcsClient: Client, projectDir: string, flags: BuildFlags, actor: Actor, getDynamicPrivateProjectConfigAsync: DynamicConfigContextFn): Promise<
|
|
25
|
+
export declare function runBuildAndSubmitAsync(graphqlClient: ExpoGraphqlClient, analytics: Analytics, vcsClient: Client, projectDir: string, flags: BuildFlags, actor: Actor, getDynamicPrivateProjectConfigAsync: DynamicConfigContextFn): Promise<{
|
|
26
|
+
buildIds: string[];
|
|
27
|
+
}>;
|
|
@@ -41,7 +41,6 @@ const profiles_1 = require("../utils/profiles");
|
|
|
41
41
|
let metroConfigValidated = false;
|
|
42
42
|
let sdkVersionChecked = false;
|
|
43
43
|
async function runBuildAndSubmitAsync(graphqlClient, analytics, vcsClient, projectDir, flags, actor, getDynamicPrivateProjectConfigAsync) {
|
|
44
|
-
var _a, _b;
|
|
45
44
|
await vcsClient.ensureRepoExistsAsync();
|
|
46
45
|
await (0, repository_1.ensureRepoIsCleanAsync)(vcsClient, flags.nonInteractive);
|
|
47
46
|
await (0, configure_1.ensureProjectConfiguredAsync)({
|
|
@@ -50,13 +49,13 @@ async function runBuildAndSubmitAsync(graphqlClient, analytics, vcsClient, proje
|
|
|
50
49
|
vcsClient,
|
|
51
50
|
});
|
|
52
51
|
const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
|
|
53
|
-
const easJsonCliConfig = (
|
|
52
|
+
const easJsonCliConfig = (await eas_json_1.EasJsonUtils.getCliConfigAsync(easJsonAccessor)) ?? {};
|
|
54
53
|
const platforms = (0, platform_1.toPlatforms)(flags.requestedPlatform);
|
|
55
54
|
const buildProfiles = await (0, profiles_1.getProfilesAsync)({
|
|
56
55
|
type: 'build',
|
|
57
56
|
easJsonAccessor,
|
|
58
57
|
platforms,
|
|
59
|
-
profileName:
|
|
58
|
+
profileName: flags.profile ?? undefined,
|
|
60
59
|
projectDir,
|
|
61
60
|
});
|
|
62
61
|
log_1.default.log(`Loaded "env" configuration for the "${buildProfiles[0].profileName}" profile: ${buildProfiles[0].profile.env
|
|
@@ -121,7 +120,9 @@ async function runBuildAndSubmitAsync(graphqlClient, analytics, vcsClient, proje
|
|
|
121
120
|
buildCtxByPlatform[platform] = buildCtx;
|
|
122
121
|
}
|
|
123
122
|
if (flags.localBuildOptions.localBuildMode === local_1.LocalBuildMode.LOCAL_BUILD_PLUGIN) {
|
|
124
|
-
return
|
|
123
|
+
return {
|
|
124
|
+
buildIds: startedBuilds.map(({ build }) => build.id),
|
|
125
|
+
};
|
|
125
126
|
}
|
|
126
127
|
if (flags.localBuildOptions.localBuildMode === local_1.LocalBuildMode.INTERNAL) {
|
|
127
128
|
const startedBuild = await BuildQuery_1.BuildQuery.byIdAsync(graphqlClient, (0, nullthrows_1.default)(process.env.EAS_BUILD_ID, 'EAS_BUILD_ID is not defined'));
|
|
@@ -162,13 +163,17 @@ async function runBuildAndSubmitAsync(graphqlClient, analytics, vcsClient, proje
|
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
165
|
if (flags.localBuildOptions.localBuildMode) {
|
|
165
|
-
return
|
|
166
|
+
return {
|
|
167
|
+
buildIds: startedBuilds.map(({ build }) => build.id),
|
|
168
|
+
};
|
|
166
169
|
}
|
|
167
170
|
if (!flags.wait) {
|
|
168
171
|
if (flags.json) {
|
|
169
172
|
(0, json_1.printJsonOnlyOutput)(startedBuilds.map(buildInfo => buildInfo.build));
|
|
170
173
|
}
|
|
171
|
-
return
|
|
174
|
+
return {
|
|
175
|
+
buildIds: startedBuilds.map(({ build }) => build.id),
|
|
176
|
+
};
|
|
172
177
|
}
|
|
173
178
|
const { accountName } = Object.values(buildCtxByPlatform)[0];
|
|
174
179
|
const builds = await (0, build_2.waitForBuildEndAsync)(graphqlClient, {
|
|
@@ -178,8 +183,8 @@ async function runBuildAndSubmitAsync(graphqlClient, analytics, vcsClient, proje
|
|
|
178
183
|
if (!flags.json) {
|
|
179
184
|
(0, printBuildInfo_1.printBuildResults)(builds);
|
|
180
185
|
}
|
|
181
|
-
const haveAllBuildsFailedOrCanceled = builds.every(build =>
|
|
182
|
-
[generated_1.BuildStatus.Errored, generated_1.BuildStatus.Canceled, generated_1.BuildStatus.PendingCancel].includes(build
|
|
186
|
+
const haveAllBuildsFailedOrCanceled = builds.every(build => build?.status &&
|
|
187
|
+
[generated_1.BuildStatus.Errored, generated_1.BuildStatus.Canceled, generated_1.BuildStatus.PendingCancel].includes(build?.status));
|
|
183
188
|
await maybeDownloadAndRunSimulatorBuildsAsync(builds, flags);
|
|
184
189
|
if (haveAllBuildsFailedOrCanceled || !flags.autoSubmit) {
|
|
185
190
|
if (flags.json) {
|
|
@@ -196,6 +201,9 @@ async function runBuildAndSubmitAsync(graphqlClient, analytics, vcsClient, proje
|
|
|
196
201
|
}
|
|
197
202
|
(0, submit_1.exitWithNonZeroCodeIfSomeSubmissionsDidntFinish)(completedSubmissions);
|
|
198
203
|
}
|
|
204
|
+
return {
|
|
205
|
+
buildIds: startedBuilds.map(({ build }) => build.id),
|
|
206
|
+
};
|
|
199
207
|
}
|
|
200
208
|
exports.runBuildAndSubmitAsync = runBuildAndSubmitAsync;
|
|
201
209
|
async function prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildProfile, easJsonCliConfig, actor, graphqlClient, analytics, vcsClient, getDynamicPrivateProjectConfigAsync, customBuildConfigMetadata, }) {
|
|
@@ -250,7 +258,7 @@ async function prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildP
|
|
|
250
258
|
}
|
|
251
259
|
}
|
|
252
260
|
await (0, projectUtils_1.validateAppVersionRuntimePolicySupportAsync)(buildCtx.projectDir, buildCtx.exp);
|
|
253
|
-
if (
|
|
261
|
+
if (easJsonCliConfig?.appVersionSource === eas_json_1.AppVersionSource.REMOTE) {
|
|
254
262
|
(0, remoteVersionSource_1.validateAppConfigForRemoteVersionSource)(buildCtx.exp, buildProfile.platform);
|
|
255
263
|
}
|
|
256
264
|
if (buildCtx.workflow === eas_build_job_1.Workflow.MANAGED) {
|
|
@@ -280,7 +288,6 @@ async function startBuildAsync(ctx) {
|
|
|
280
288
|
return await sendBuildRequestAsync();
|
|
281
289
|
}
|
|
282
290
|
async function prepareAndStartSubmissionAsync({ build, buildCtx, moreBuilds, projectDir, buildProfile, submitProfile, nonInteractive, }) {
|
|
283
|
-
var _a, _b, _c;
|
|
284
291
|
const platform = (0, AppPlatform_1.toPlatform)(build.platform);
|
|
285
292
|
const submissionCtx = await (0, context_1.createSubmissionContextAsync)({
|
|
286
293
|
platform,
|
|
@@ -290,7 +297,7 @@ async function prepareAndStartSubmissionAsync({ build, buildCtx, moreBuilds, pro
|
|
|
290
297
|
nonInteractive,
|
|
291
298
|
env: buildProfile.env,
|
|
292
299
|
credentialsCtx: buildCtx.credentialsCtx,
|
|
293
|
-
applicationIdentifier:
|
|
300
|
+
applicationIdentifier: buildCtx.android?.applicationId ?? buildCtx.ios?.bundleIdentifier,
|
|
294
301
|
actor: buildCtx.user,
|
|
295
302
|
graphqlClient: buildCtx.graphqlClient,
|
|
296
303
|
analytics: buildCtx.analytics,
|
|
@@ -312,8 +319,7 @@ function exitWithNonZeroCodeIfSomeBuildsFailed(maybeBuilds) {
|
|
|
312
319
|
}
|
|
313
320
|
}
|
|
314
321
|
async function downloadAndRunAsync(build) {
|
|
315
|
-
|
|
316
|
-
(0, assert_1.default)((_a = build.artifacts) === null || _a === void 0 ? void 0 : _a.applicationArchiveUrl);
|
|
322
|
+
(0, assert_1.default)(build.artifacts?.applicationArchiveUrl);
|
|
317
323
|
const buildPath = await (0, download_1.downloadAndMaybeExtractAppAsync)(build.artifacts.applicationArchiveUrl, build.platform);
|
|
318
324
|
await (0, run_1.runAsync)(buildPath, build.platform);
|
|
319
325
|
}
|
|
@@ -6,11 +6,10 @@ const ExpoConfig = tslib_1.__importStar(require("@expo/config"));
|
|
|
6
6
|
const json_file_1 = tslib_1.__importDefault(require("@expo/json-file"));
|
|
7
7
|
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
8
8
|
async function updateAppJsonConfigAsync({ projectDir, exp, }, modifyConfig) {
|
|
9
|
-
var _a;
|
|
10
9
|
const paths = ExpoConfig.getConfigFilePaths(projectDir);
|
|
11
10
|
(0, assert_1.default)(paths.staticConfigPath, "can't update dynamic config");
|
|
12
11
|
const rawStaticConfig = readAppJson(paths.staticConfigPath);
|
|
13
|
-
rawStaticConfig.expo =
|
|
12
|
+
rawStaticConfig.expo = rawStaticConfig.expo ?? {};
|
|
14
13
|
modifyConfig(rawStaticConfig.expo);
|
|
15
14
|
await json_file_1.default.writeAsync(paths.staticConfigPath, rawStaticConfig, { json5: false });
|
|
16
15
|
modifyConfig(exp);
|
|
@@ -8,7 +8,6 @@ const generated_1 = require("../../graphql/generated");
|
|
|
8
8
|
const platform_1 = require("../../platform");
|
|
9
9
|
const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
|
|
10
10
|
function formatGraphQLBuild(build) {
|
|
11
|
-
var _a, _b;
|
|
12
11
|
const actor = getActorName(build);
|
|
13
12
|
const fields = [
|
|
14
13
|
{ label: 'ID', value: build.id },
|
|
@@ -44,11 +43,11 @@ function formatGraphQLBuild(build) {
|
|
|
44
43
|
},
|
|
45
44
|
{
|
|
46
45
|
label: 'Distribution',
|
|
47
|
-
value:
|
|
46
|
+
value: build.distribution?.toLowerCase(),
|
|
48
47
|
},
|
|
49
48
|
{
|
|
50
49
|
label: 'Enterprise Provisioning',
|
|
51
|
-
value:
|
|
50
|
+
value: build.iosEnterpriseProvisioning?.toLowerCase(),
|
|
52
51
|
},
|
|
53
52
|
{
|
|
54
53
|
label: 'Channel',
|
|
@@ -81,7 +80,6 @@ function formatGraphQLBuild(build) {
|
|
|
81
80
|
{
|
|
82
81
|
label: 'Artifact',
|
|
83
82
|
get value() {
|
|
84
|
-
var _a;
|
|
85
83
|
switch (build.status) {
|
|
86
84
|
case generated_1.BuildStatus.New:
|
|
87
85
|
case generated_1.BuildStatus.InQueue:
|
|
@@ -92,7 +90,7 @@ function formatGraphQLBuild(build) {
|
|
|
92
90
|
case generated_1.BuildStatus.Errored:
|
|
93
91
|
return null;
|
|
94
92
|
case generated_1.BuildStatus.Finished: {
|
|
95
|
-
const url =
|
|
93
|
+
const url = build.artifacts?.buildUrl;
|
|
96
94
|
return url ? url : chalk_1.default.red('not found');
|
|
97
95
|
}
|
|
98
96
|
default:
|
|
@@ -111,13 +109,12 @@ function formatGraphQLBuild(build) {
|
|
|
111
109
|
? '<in progress>'
|
|
112
110
|
: new Date(build.updatedAt).toLocaleString(),
|
|
113
111
|
},
|
|
114
|
-
{ label: 'Started by', value: actor
|
|
112
|
+
{ label: 'Started by', value: actor ?? 'unknown' },
|
|
115
113
|
];
|
|
116
114
|
const filteredFields = fields.filter(({ value }) => value !== undefined && value !== null);
|
|
117
115
|
return (0, formatFields_1.default)(filteredFields);
|
|
118
116
|
}
|
|
119
117
|
exports.formatGraphQLBuild = formatGraphQLBuild;
|
|
120
118
|
const getActorName = (build) => {
|
|
121
|
-
|
|
122
|
-
return ((_a = build.initiatingActor) === null || _a === void 0 ? void 0 : _a.displayName) || 'unknown';
|
|
119
|
+
return build.initiatingActor?.displayName || 'unknown';
|
|
123
120
|
};
|
|
@@ -49,7 +49,6 @@ function printBuildResults(builds) {
|
|
|
49
49
|
}
|
|
50
50
|
exports.printBuildResults = printBuildResults;
|
|
51
51
|
function printBuildResult(build) {
|
|
52
|
-
var _a;
|
|
53
52
|
if (build.status === generated_1.BuildStatus.Errored) {
|
|
54
53
|
log_1.default.addNewLineIfNone();
|
|
55
54
|
const userError = build.error;
|
|
@@ -77,7 +76,7 @@ function printBuildResult(build) {
|
|
|
77
76
|
else {
|
|
78
77
|
// TODO: it looks like buildUrl could possibly be undefined, based on the code below.
|
|
79
78
|
// we should account for this case better if it is possible
|
|
80
|
-
const url =
|
|
79
|
+
const url = build.artifacts?.buildUrl;
|
|
81
80
|
if (url) {
|
|
82
81
|
log_1.default.addNewLineIfNone();
|
|
83
82
|
log_1.default.log(`${platform_1.appPlatformEmojis[build.platform]} ${platform_1.appPlatformDisplayNames[build.platform]} app:`);
|
|
@@ -25,7 +25,7 @@ async function resolveBuildResourceClassAsync(profile, platform, resourceClassFl
|
|
|
25
25
|
if (profileResourceClass && resourceClassFlag && resourceClassFlag !== profileResourceClass) {
|
|
26
26
|
log_1.default.warn(`Build profile specifies the "${profileResourceClass}" resource class but you passed "${resourceClassFlag}" to --resource-class.\nUsing "${resourceClassFlag}" as the override.`);
|
|
27
27
|
}
|
|
28
|
-
const selectedResourceClass = resourceClassFlag
|
|
28
|
+
const selectedResourceClass = resourceClassFlag ?? profileResourceClass;
|
|
29
29
|
return platform === eas_build_job_1.Platform.IOS
|
|
30
30
|
? resolveIosResourceClass(resourceClassFlag, profileResourceClass)
|
|
31
31
|
: resolveAndroidResourceClass(selectedResourceClass);
|
|
@@ -35,12 +35,11 @@ function resolveAndroidResourceClass(selectedResourceClass) {
|
|
|
35
35
|
if (selectedResourceClass && eas_json_1.ResourceClass.M1_MEDIUM === selectedResourceClass) {
|
|
36
36
|
throw new Error(`Resource class ${selectedResourceClass} is only available for iOS builds`);
|
|
37
37
|
}
|
|
38
|
-
const resourceClass = selectedResourceClass
|
|
38
|
+
const resourceClass = selectedResourceClass ?? eas_json_1.ResourceClass.DEFAULT;
|
|
39
39
|
return androidResourceClassToBuildResourceClassMapping[resourceClass];
|
|
40
40
|
}
|
|
41
41
|
function resolveIosResourceClass(resourceClassFlag, profileResourceClass) {
|
|
42
|
-
|
|
43
|
-
const resourceClass = (_a = resourceClassFlag !== null && resourceClassFlag !== void 0 ? resourceClassFlag : profileResourceClass) !== null && _a !== void 0 ? _a : eas_json_1.ResourceClass.DEFAULT;
|
|
42
|
+
const resourceClass = resourceClassFlag ?? profileResourceClass ?? eas_json_1.ResourceClass.DEFAULT;
|
|
44
43
|
if (resourceClassFlag === eas_json_1.ResourceClass.LARGE) {
|
|
45
44
|
throw new Error(`Experimental "large" resource class for Intel iOS workers is no longer available. Remove the specified resource class to use the default, or learn more about all available resource classes: ${(0, log_1.link)('https://docs.expo.dev/build-reference/eas-json/')}`);
|
|
46
45
|
}
|
package/build/build/utils/url.js
CHANGED
|
@@ -22,11 +22,10 @@ function getArtifactUrl(artifactId) {
|
|
|
22
22
|
}
|
|
23
23
|
exports.getArtifactUrl = getArtifactUrl;
|
|
24
24
|
function getInternalDistributionInstallUrl(build) {
|
|
25
|
-
var _a;
|
|
26
25
|
if (build.platform === generated_1.AppPlatform.Ios) {
|
|
27
26
|
return `itms-services://?action=download-manifest;url=${(0, api_1.getExpoApiBaseUrl)()}/v2/projects/${build.project.id}/builds/${build.id}/manifest.plist`;
|
|
28
27
|
}
|
|
29
|
-
(0, assert_1.default)(
|
|
28
|
+
(0, assert_1.default)(build.artifacts?.buildUrl, 'buildUrl is missing');
|
|
30
29
|
return build.artifacts.buildUrl;
|
|
31
30
|
}
|
|
32
31
|
exports.getInternalDistributionInstallUrl = getInternalDistributionInstallUrl;
|
package/build/build/validate.js
CHANGED
|
@@ -10,19 +10,17 @@ const semver_1 = tslib_1.__importDefault(require("semver"));
|
|
|
10
10
|
const log_1 = tslib_1.__importStar(require("../log"));
|
|
11
11
|
const image_1 = require("../utils/image");
|
|
12
12
|
function checkNodeEnvVariable(ctx) {
|
|
13
|
-
|
|
14
|
-
if (((_a = ctx.buildProfile.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) === 'production') {
|
|
13
|
+
if (ctx.buildProfile.env?.NODE_ENV === 'production') {
|
|
15
14
|
log_1.default.warn('You set NODE_ENV=production in the build profile. Remember that it will be available during the entire build process. In particular, it will make yarn/npm install only production packages.');
|
|
16
15
|
log_1.default.newLine();
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
18
|
exports.checkNodeEnvVariable = checkNodeEnvVariable;
|
|
20
19
|
async function checkGoogleServicesFileAsync(ctx) {
|
|
21
|
-
|
|
22
|
-
if (ctx.workflow === eas_build_job_1.Workflow.GENERIC || ((_b = (_a = ctx.buildProfile) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b.GOOGLE_SERVICES_FILE)) {
|
|
20
|
+
if (ctx.workflow === eas_build_job_1.Workflow.GENERIC || ctx.buildProfile?.env?.GOOGLE_SERVICES_FILE) {
|
|
23
21
|
return;
|
|
24
22
|
}
|
|
25
|
-
const googleServicesFilePath =
|
|
23
|
+
const googleServicesFilePath = ctx.exp[ctx.platform]?.googleServicesFile;
|
|
26
24
|
if (!googleServicesFilePath) {
|
|
27
25
|
return;
|
|
28
26
|
}
|
|
@@ -62,7 +60,6 @@ async function validatePNGsForManagedProjectAsync(ctx) {
|
|
|
62
60
|
}
|
|
63
61
|
exports.validatePNGsForManagedProjectAsync = validatePNGsForManagedProjectAsync;
|
|
64
62
|
async function validateAndroidPNGsAsync(ctx) {
|
|
65
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
66
63
|
const pngs = [
|
|
67
64
|
{
|
|
68
65
|
configPath: 'exp.icon',
|
|
@@ -70,23 +67,23 @@ async function validateAndroidPNGsAsync(ctx) {
|
|
|
70
67
|
},
|
|
71
68
|
{
|
|
72
69
|
configPath: 'exp.android.icon',
|
|
73
|
-
pngPath:
|
|
70
|
+
pngPath: ctx.exp.android?.icon,
|
|
74
71
|
},
|
|
75
72
|
{
|
|
76
73
|
configPath: 'exp.android.adaptiveIcon.foregroundImage',
|
|
77
|
-
pngPath:
|
|
74
|
+
pngPath: ctx.exp.android?.adaptiveIcon?.foregroundImage,
|
|
78
75
|
},
|
|
79
76
|
{
|
|
80
77
|
configPath: 'exp.android.adaptiveIcon.backgroundImage',
|
|
81
|
-
pngPath:
|
|
78
|
+
pngPath: ctx.exp.android?.adaptiveIcon?.backgroundImage,
|
|
82
79
|
},
|
|
83
80
|
{
|
|
84
81
|
configPath: 'exp.splash.image',
|
|
85
|
-
pngPath:
|
|
82
|
+
pngPath: ctx.exp.splash?.image,
|
|
86
83
|
},
|
|
87
84
|
{
|
|
88
85
|
configPath: 'exp.notification.icon',
|
|
89
|
-
pngPath:
|
|
86
|
+
pngPath: ctx.exp.notification?.icon,
|
|
90
87
|
},
|
|
91
88
|
];
|
|
92
89
|
await validatePNGsAsync(pngs);
|
|
@@ -44,11 +44,10 @@ class SelectChannel {
|
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
async runAsync(ctx) {
|
|
47
|
-
var _a, _b;
|
|
48
47
|
const { nonInteractive } = ctx;
|
|
49
48
|
const { filterPredicate } = this.options;
|
|
50
|
-
const printedType =
|
|
51
|
-
const pageSize =
|
|
49
|
+
const printedType = this.options.printedType ?? 'channel';
|
|
50
|
+
const pageSize = this.options.pageSize ?? 100;
|
|
52
51
|
if (nonInteractive) {
|
|
53
52
|
throw new utils_1.NonInteractiveError(`${printedType} selection cannot be run in non-interactive mode.`);
|
|
54
53
|
}
|
package/build/channel/errors.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ChannelNotFoundError = void 0;
|
|
4
4
|
class ChannelNotFoundError extends Error {
|
|
5
5
|
constructor(message) {
|
|
6
|
-
super(message
|
|
6
|
+
super(message ?? 'Channel not found.');
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
exports.ChannelNotFoundError = ChannelNotFoundError;
|
package/build/channel/queries.js
CHANGED
|
@@ -20,12 +20,11 @@ const json_1 = require("../utils/json");
|
|
|
20
20
|
const queries_2 = require("../utils/queries");
|
|
21
21
|
exports.CHANNELS_LIMIT = 25;
|
|
22
22
|
async function selectChannelOnAppAsync(graphqlClient, { projectId, selectionPromptTitle, paginatedQueryOptions, }) {
|
|
23
|
-
var _a;
|
|
24
23
|
if (paginatedQueryOptions.nonInteractive) {
|
|
25
24
|
throw new Error('Unable to select a channel in non-interactive mode.');
|
|
26
25
|
}
|
|
27
26
|
const updateChannel = await (0, queries_2.paginatedQueryWithSelectPromptAsync)({
|
|
28
|
-
limit:
|
|
27
|
+
limit: paginatedQueryOptions.limit ?? exports.CHANNELS_LIMIT,
|
|
29
28
|
offset: paginatedQueryOptions.offset,
|
|
30
29
|
queryToPerform: (limit, offset) => queryChannelsOnAppAsync(graphqlClient, { appId: projectId, limit, offset }),
|
|
31
30
|
promptOptions: {
|
|
@@ -41,18 +40,17 @@ async function selectChannelOnAppAsync(graphqlClient, { projectId, selectionProm
|
|
|
41
40
|
}
|
|
42
41
|
exports.selectChannelOnAppAsync = selectChannelOnAppAsync;
|
|
43
42
|
async function listAndRenderChannelsOnAppAsync(graphqlClient, { projectId, paginatedQueryOptions, }) {
|
|
44
|
-
var _a, _b;
|
|
45
43
|
if (paginatedQueryOptions.nonInteractive) {
|
|
46
44
|
const channels = await queryChannelsOnAppAsync(graphqlClient, {
|
|
47
45
|
appId: projectId,
|
|
48
|
-
limit:
|
|
46
|
+
limit: paginatedQueryOptions.limit ?? exports.CHANNELS_LIMIT,
|
|
49
47
|
offset: paginatedQueryOptions.offset,
|
|
50
48
|
});
|
|
51
49
|
renderPageOfChannels(channels, paginatedQueryOptions);
|
|
52
50
|
}
|
|
53
51
|
else {
|
|
54
52
|
await (0, queries_2.paginatedQueryWithConfirmPromptAsync)({
|
|
55
|
-
limit:
|
|
53
|
+
limit: paginatedQueryOptions.limit ?? exports.CHANNELS_LIMIT,
|
|
56
54
|
offset: paginatedQueryOptions.offset,
|
|
57
55
|
queryToPerform: (limit, offset) => queryChannelsOnAppAsync(graphqlClient, { limit, offset, appId: projectId }),
|
|
58
56
|
promptOptions: {
|
|
@@ -64,7 +62,6 @@ async function listAndRenderChannelsOnAppAsync(graphqlClient, { projectId, pagin
|
|
|
64
62
|
}
|
|
65
63
|
exports.listAndRenderChannelsOnAppAsync = listAndRenderChannelsOnAppAsync;
|
|
66
64
|
async function listAndRenderBranchesAndUpdatesOnChannelAsync(graphqlClient, { projectId: appId, channelName, paginatedQueryOptions, }) {
|
|
67
|
-
var _a, _b;
|
|
68
65
|
const channel = await ChannelQuery_1.ChannelQuery.viewUpdateChannelAsync(graphqlClient, { appId, channelName });
|
|
69
66
|
renderChannelHeaderContent({ channelName: channel.name, channelId: channel.id });
|
|
70
67
|
if (paginatedQueryOptions.nonInteractive) {
|
|
@@ -72,13 +69,13 @@ async function listAndRenderBranchesAndUpdatesOnChannelAsync(graphqlClient, { pr
|
|
|
72
69
|
appId,
|
|
73
70
|
channelName,
|
|
74
71
|
offset: paginatedQueryOptions.offset,
|
|
75
|
-
limit:
|
|
72
|
+
limit: paginatedQueryOptions.limit ?? exports.CHANNELS_LIMIT,
|
|
76
73
|
});
|
|
77
74
|
renderPageOfBranchesOnChannel(channel, branches, paginatedQueryOptions);
|
|
78
75
|
}
|
|
79
76
|
else {
|
|
80
77
|
await (0, queries_2.paginatedQueryWithConfirmPromptAsync)({
|
|
81
|
-
limit:
|
|
78
|
+
limit: paginatedQueryOptions.limit ?? exports.CHANNELS_LIMIT,
|
|
82
79
|
offset: paginatedQueryOptions.offset,
|
|
83
80
|
queryToPerform: (limit, offset) => queryBranchesAndUpdateGroupsOnChannelAsync(graphqlClient, {
|
|
84
81
|
channelName,
|
|
@@ -166,7 +163,6 @@ async function createChannelOnAppAsync(graphqlClient, { appId, branchId, channel
|
|
|
166
163
|
}
|
|
167
164
|
exports.createChannelOnAppAsync = createChannelOnAppAsync;
|
|
168
165
|
async function ensureChannelExistsAsync(graphqlClient, { appId, branchId, channelName }) {
|
|
169
|
-
var _a;
|
|
170
166
|
try {
|
|
171
167
|
await createChannelOnAppAsync(graphqlClient, {
|
|
172
168
|
appId,
|
|
@@ -175,7 +171,7 @@ async function ensureChannelExistsAsync(graphqlClient, { appId, branchId, channe
|
|
|
175
171
|
});
|
|
176
172
|
}
|
|
177
173
|
catch (e) {
|
|
178
|
-
const isIgnorableError =
|
|
174
|
+
const isIgnorableError = e.graphQLErrors?.length === 1 &&
|
|
179
175
|
e.graphQLErrors[0].extensions.errorCode === 'CHANNEL_ALREADY_EXISTS';
|
|
180
176
|
if (!isIgnorableError) {
|
|
181
177
|
throw e;
|
package/build/channel/utils.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.getUpdateBranch = void 0;
|
|
|
4
4
|
function getUpdateBranchNullable(channel, branchId) {
|
|
5
5
|
const updateBranches = channel.updateBranches;
|
|
6
6
|
const updateBranch = updateBranches.find(branch => branch.id === branchId);
|
|
7
|
-
return updateBranch
|
|
7
|
+
return updateBranch ?? null;
|
|
8
8
|
}
|
|
9
9
|
function getUpdateBranch(channel, branchId) {
|
|
10
10
|
const updateBranch = getUpdateBranchNullable(channel, branchId);
|
|
@@ -70,19 +70,20 @@ class EasCommand extends core_1.Command {
|
|
|
70
70
|
if (err instanceof errors_1.EasCommandError) {
|
|
71
71
|
log_1.default.error(err.message);
|
|
72
72
|
}
|
|
73
|
-
else if (err instanceof core_2.CombinedError &&
|
|
74
|
-
const cleanMessage = err
|
|
75
|
-
|
|
73
|
+
else if (err instanceof core_2.CombinedError && err?.graphQLErrors) {
|
|
74
|
+
const cleanMessage = err?.graphQLErrors
|
|
75
|
+
.map((graphQLError) => {
|
|
76
76
|
const messageLine = graphQLError.message.replace('[GraphQL] ', '');
|
|
77
|
-
const requestIdLine =
|
|
77
|
+
const requestIdLine = graphQLError.extensions?.requestId
|
|
78
78
|
? `\nRequest ID: ${err.graphQLErrors[0].extensions.requestId}`
|
|
79
79
|
: '';
|
|
80
80
|
const defaultMsg = `${messageLine}${requestIdLine}`;
|
|
81
|
-
if (
|
|
81
|
+
if (graphQLError.extensions?.errorCode === 'UNAUTHORIZED_ERROR') {
|
|
82
82
|
return `${chalk_1.default.bold(`You don't have the required permissions to perform this operation.`)}\n\nThis can sometimes happen if you are logged in as incorrect user.\nRun ${chalk_1.default.bold('eas whoami')} to check the username you are logged in as.\nRun ${chalk_1.default.bold('eas login')} to change the account.\n\nOriginal error message: ${defaultMsg}`;
|
|
83
83
|
}
|
|
84
84
|
return defaultMsg;
|
|
85
|
-
})
|
|
85
|
+
})
|
|
86
|
+
.join('\n');
|
|
86
87
|
log_1.default.error(cleanMessage);
|
|
87
88
|
baseMessage = BASE_GRAPHQL_ERROR_MESSAGE;
|
|
88
89
|
}
|
|
@@ -22,13 +22,13 @@ exports.ensureBuildExistsAsync = ensureBuildExistsAsync;
|
|
|
22
22
|
async function fetchBuildsAsync({ graphqlClient, projectId, filters, }) {
|
|
23
23
|
let builds;
|
|
24
24
|
const queryFilters = {};
|
|
25
|
-
if (
|
|
25
|
+
if (filters?.platform && filters.platform !== 'all') {
|
|
26
26
|
queryFilters['platform'] = platformToAppPlatform[filters.platform];
|
|
27
27
|
}
|
|
28
|
-
if (filters
|
|
28
|
+
if (filters?.profile) {
|
|
29
29
|
queryFilters['buildProfile'] = filters.profile;
|
|
30
30
|
}
|
|
31
|
-
if (!
|
|
31
|
+
if (!filters?.statuses) {
|
|
32
32
|
builds = await BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
|
|
33
33
|
appId: projectId,
|
|
34
34
|
offset: 0,
|
|
@@ -13,7 +13,7 @@ class DynamicPublicProjectConfigContextField extends ContextField_1.default {
|
|
|
13
13
|
const expBefore = (0, expoConfig_1.getPublicExpoConfig)(projectDir, options);
|
|
14
14
|
const projectId = await (0, getProjectIdAsync_1.getProjectIdAsync)(sessionManager, expBefore, {
|
|
15
15
|
nonInteractive,
|
|
16
|
-
env: options
|
|
16
|
+
env: options?.env,
|
|
17
17
|
});
|
|
18
18
|
const exp = (0, expoConfig_1.getPublicExpoConfig)(projectDir, options);
|
|
19
19
|
return {
|
|
@@ -32,7 +32,7 @@ class DynamicPrivateProjectConfigContextField extends ContextField_1.default {
|
|
|
32
32
|
const expBefore = (0, expoConfig_1.getPrivateExpoConfig)(projectDir, options);
|
|
33
33
|
const projectId = await (0, getProjectIdAsync_1.getProjectIdAsync)(sessionManager, expBefore, {
|
|
34
34
|
nonInteractive,
|
|
35
|
-
env: options
|
|
35
|
+
env: options?.env,
|
|
36
36
|
});
|
|
37
37
|
const exp = (0, expoConfig_1.getPrivateExpoConfig)(projectDir, options);
|
|
38
38
|
return {
|
|
@@ -7,11 +7,10 @@ const FeatureGateEnvOverrides_1 = tslib_1.__importDefault(require("../gating/Fea
|
|
|
7
7
|
const FeatureGating_1 = tslib_1.__importDefault(require("../gating/FeatureGating"));
|
|
8
8
|
class LoggedInContextField extends ContextField_1.default {
|
|
9
9
|
async getValueAsync({ nonInteractive, sessionManager }) {
|
|
10
|
-
var _a;
|
|
11
10
|
const { actor, authenticationInfo } = await sessionManager.ensureLoggedInAsync({
|
|
12
11
|
nonInteractive,
|
|
13
12
|
});
|
|
14
|
-
const featureGateServerValues =
|
|
13
|
+
const featureGateServerValues = actor?.featureGates ?? {};
|
|
15
14
|
const graphqlClient = (0, createGraphqlClient_1.createGraphqlClient)(authenticationInfo);
|
|
16
15
|
return {
|
|
17
16
|
actor,
|