eas-cli 2.7.0 → 2.8.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 +1135 -7
- package/build/branch/queries.d.ts +1 -0
- package/build/branch/queries.js +2 -2
- package/build/build/build.js +2 -2
- package/build/build/createContext.js +1 -0
- package/build/build/graphql.js +6 -0
- package/build/build/local.js +1 -1
- package/build/build/queries.d.ts +4 -2
- package/build/build/queries.js +32 -7
- package/build/commands/build/run.js +24 -11
- package/build/commands/credentials.d.ts +1 -0
- package/build/commands/credentials.js +3 -2
- package/build/commands/submit.js +1 -1
- package/build/commands/update/index.js +8 -6
- package/build/credentials/manager/HelperActions.d.ts +2 -0
- package/build/credentials/manager/ManageAndroid.js +8 -1
- package/build/credentials/manager/ManageIos.js +8 -1
- package/build/credentials/manager/SelectPlatform.d.ts +3 -1
- package/build/credentials/manager/SelectPlatform.js +2 -1
- package/build/devices/utils/formatDevice.js +1 -2
- package/build/graphql/generated.d.ts +12 -0
- package/build/graphql/generated.js +9 -2
- package/build/graphql/mutations/SubmissionMutation.js +14 -2
- package/build/graphql/mutations/UploadSessionMutation.d.ts +4 -3
- package/build/prompts.js +3 -1
- package/build/run/android/aapt.d.ts +5 -0
- package/build/run/android/aapt.js +51 -0
- package/build/run/android/adb.d.ts +23 -0
- package/build/run/android/adb.js +120 -0
- package/build/run/android/emulator.d.ts +7 -0
- package/build/run/android/emulator.js +109 -0
- package/build/run/android/run.d.ts +1 -1
- package/build/run/android/run.js +10 -3
- package/build/run/android/sdk.d.ts +3 -0
- package/build/run/android/sdk.js +29 -0
- package/build/run/android/systemRequirements.d.ts +1 -0
- package/build/run/android/systemRequirements.js +24 -0
- package/build/submit/ArchiveSource.d.ts +20 -10
- package/build/submit/ArchiveSource.js +59 -60
- package/build/submit/BaseSubmitter.d.ts +4 -1
- package/build/submit/BaseSubmitter.js +20 -0
- package/build/submit/android/AndroidSubmitCommand.js +1 -2
- package/build/submit/android/AndroidSubmitter.d.ts +3 -3
- package/build/submit/android/AndroidSubmitter.js +12 -7
- package/build/submit/commons.d.ts +1 -1
- package/build/submit/commons.js +1 -16
- package/build/submit/ios/IosSubmitCommand.js +1 -2
- package/build/submit/ios/IosSubmitter.d.ts +3 -3
- package/build/submit/ios/IosSubmitter.js +11 -6
- package/build/submit/utils/files.js +2 -2
- package/build/submit/utils/summary.d.ts +2 -2
- package/build/submit/utils/summary.js +7 -8
- package/build/uploads.d.ts +4 -10
- package/build/uploads.js +16 -36
- package/build/utils/download.d.ts +3 -2
- package/build/utils/download.js +37 -30
- package/build/utils/progress.d.ts +1 -1
- package/build/utils/progress.js +6 -4
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
package/build/branch/queries.js
CHANGED
|
@@ -102,7 +102,7 @@ async function ensureBranchExistsAsync(graphqlClient, { appId, branchName, }) {
|
|
|
102
102
|
name: branchName,
|
|
103
103
|
});
|
|
104
104
|
const { id } = updateBranch;
|
|
105
|
-
return { branchId: id };
|
|
105
|
+
return { branchId: id, createdBranch: false };
|
|
106
106
|
}
|
|
107
107
|
catch (error) {
|
|
108
108
|
if (error instanceof utils_2.BranchNotFoundError) {
|
|
@@ -110,7 +110,7 @@ async function ensureBranchExistsAsync(graphqlClient, { appId, branchName, }) {
|
|
|
110
110
|
appId,
|
|
111
111
|
name: branchName,
|
|
112
112
|
});
|
|
113
|
-
return { branchId: newUpdateBranch.id };
|
|
113
|
+
return { branchId: newUpdateBranch.id, createdBranch: true };
|
|
114
114
|
}
|
|
115
115
|
else {
|
|
116
116
|
throw error;
|
package/build/build/build.js
CHANGED
|
@@ -53,7 +53,7 @@ async function prepareBuildRequestForPlatformAsync(builder) {
|
|
|
53
53
|
path: (await (0, repository_1.makeProjectTarballAsync)()).path,
|
|
54
54
|
}
|
|
55
55
|
: {
|
|
56
|
-
type: eas_build_job_1.ArchiveSourceType.
|
|
56
|
+
type: eas_build_job_1.ArchiveSourceType.GCS,
|
|
57
57
|
bucketKey: await uploadProjectAsync(ctx),
|
|
58
58
|
};
|
|
59
59
|
const metadata = await (0, metadata_1.collectMetadataAsync)(ctx);
|
|
@@ -120,7 +120,7 @@ async function uploadProjectAsync(ctx) {
|
|
|
120
120
|
log_1.default.warn(`Your project archive is ${(0, files_1.formatBytes)(projectTarball.size)}. You can reduce its size and the time it takes to upload by excluding files that are unnecessary for the build process in ${chalk_1.default.bold('.easignore')} file. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-archive')}`);
|
|
121
121
|
}
|
|
122
122
|
projectTarballPath = projectTarball.path;
|
|
123
|
-
const
|
|
123
|
+
const bucketKey = await (0, uploads_1.uploadFileAtPathToGCSAsync)(ctx.graphqlClient, generated_1.UploadSessionType.EasBuildGcsProjectSources, projectTarball.path, (0, progress_1.createProgressTracker)({
|
|
124
124
|
total: projectTarball.size,
|
|
125
125
|
message: ratio => `Uploading to EAS Build (${(0, files_1.formatBytes)(projectTarball.size * ratio)} / ${(0, files_1.formatBytes)(projectTarball.size)})`,
|
|
126
126
|
completedMessage: (duration) => `Uploaded to EAS ${chalk_1.default.dim(duration)}`,
|
|
@@ -38,6 +38,7 @@ async function createBuildContextAsync({ buildProfileName, buildProfile, easJson
|
|
|
38
38
|
const analyticsEventProperties = {
|
|
39
39
|
tracking_id: (0, uuid_1.v4)(),
|
|
40
40
|
platform,
|
|
41
|
+
...(exp.sdkVersion && { sdk_version: exp.sdkVersion }),
|
|
41
42
|
...(accountId && { account_id: accountId }),
|
|
42
43
|
project_id: projectId,
|
|
43
44
|
project_type: workflow,
|
package/build/build/graphql.js
CHANGED
|
@@ -10,6 +10,12 @@ function transformProjectArchive(archiveSource) {
|
|
|
10
10
|
bucketKey: archiveSource.bucketKey,
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
+
else if (archiveSource.type === eas_build_job_1.ArchiveSourceType.GCS) {
|
|
14
|
+
return {
|
|
15
|
+
type: generated_1.ProjectArchiveSourceType.Gcs,
|
|
16
|
+
bucketKey: archiveSource.bucketKey,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
13
19
|
else if (archiveSource.type === eas_build_job_1.ArchiveSourceType.URL) {
|
|
14
20
|
return {
|
|
15
21
|
type: generated_1.ProjectArchiveSourceType.Url,
|
package/build/build/local.js
CHANGED
|
@@ -6,7 +6,7 @@ const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
|
|
|
6
6
|
const semver_1 = tslib_1.__importDefault(require("semver"));
|
|
7
7
|
const ora_1 = require("../ora");
|
|
8
8
|
const PLUGIN_PACKAGE_NAME = 'eas-cli-local-build-plugin';
|
|
9
|
-
const PLUGIN_PACKAGE_VERSION = '0.0.
|
|
9
|
+
const PLUGIN_PACKAGE_VERSION = '0.0.120';
|
|
10
10
|
async function runLocalBuildAsync(job, metadata, options) {
|
|
11
11
|
var _a;
|
|
12
12
|
const { command, args } = await getCommandAndArgsAsync(job, metadata);
|
package/build/build/queries.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
2
|
import { PaginatedQueryOptions } from '../commandUtils/pagination';
|
|
3
|
-
import { BuildFilter, BuildFragment } from '../graphql/generated';
|
|
3
|
+
import { AppPlatform, BuildFilter, BuildFragment } from '../graphql/generated';
|
|
4
4
|
export declare const BUILDS_LIMIT = 50;
|
|
5
5
|
export declare function listAndRenderBuildsOnAppAsync(graphqlClient: ExpoGraphqlClient, { projectId, projectDisplayName, filter, paginatedQueryOptions, }: {
|
|
6
6
|
projectId: string;
|
|
@@ -8,11 +8,13 @@ export declare function listAndRenderBuildsOnAppAsync(graphqlClient: ExpoGraphql
|
|
|
8
8
|
filter?: BuildFilter;
|
|
9
9
|
paginatedQueryOptions: PaginatedQueryOptions;
|
|
10
10
|
}): Promise<void>;
|
|
11
|
-
export declare function listAndSelectBuildsOnAppAsync(graphqlClient: ExpoGraphqlClient, { projectId, projectDisplayName, filter, queryOptions, }: {
|
|
11
|
+
export declare function listAndSelectBuildsOnAppAsync(graphqlClient: ExpoGraphqlClient, selectedPlatform: AppPlatform, { projectId, projectDisplayName, filter, queryOptions, selectPromptDisabledFunction, warningMessage, }: {
|
|
12
12
|
projectId: string;
|
|
13
13
|
projectDisplayName: string;
|
|
14
14
|
filter?: BuildFilter;
|
|
15
15
|
queryOptions: PaginatedQueryOptions;
|
|
16
|
+
selectPromptDisabledFunction?: (build: BuildFragment) => boolean;
|
|
17
|
+
warningMessage?: string;
|
|
16
18
|
}): Promise<BuildFragment>;
|
|
17
19
|
export declare function getLatestBuildAsync(graphqlClient: ExpoGraphqlClient, { projectId, filter, }: {
|
|
18
20
|
projectId: string;
|
package/build/build/queries.js
CHANGED
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getLatestBuildAsync = exports.listAndSelectBuildsOnAppAsync = exports.listAndRenderBuildsOnAppAsync = exports.BUILDS_LIMIT = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
+
const generated_1 = require("../graphql/generated");
|
|
6
7
|
const BuildQuery_1 = require("../graphql/queries/BuildQuery");
|
|
7
8
|
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
8
|
-
const platform_1 = require("../platform");
|
|
9
9
|
const prompts_1 = require("../prompts");
|
|
10
|
+
const date_1 = require("../utils/date");
|
|
10
11
|
const json_1 = require("../utils/json");
|
|
11
12
|
const queries_1 = require("../utils/queries");
|
|
12
13
|
const formatBuild_1 = require("./utils/formatBuild");
|
|
@@ -40,7 +41,25 @@ async function listAndRenderBuildsOnAppAsync(graphqlClient, { projectId, project
|
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
exports.listAndRenderBuildsOnAppAsync = listAndRenderBuildsOnAppAsync;
|
|
43
|
-
|
|
44
|
+
function formatBuildChoiceValue(value) {
|
|
45
|
+
return value ? chalk_1.default.bold(value) : chalk_1.default.dim('Unknown');
|
|
46
|
+
}
|
|
47
|
+
function formatBuildChoiceTitleAndDescription(build) {
|
|
48
|
+
var _a;
|
|
49
|
+
const splitCommitMessage = (_a = build.gitCommitMessage) === null || _a === void 0 ? void 0 : _a.split('\n');
|
|
50
|
+
const formattedCommitData = build.gitCommitHash && splitCommitMessage && splitCommitMessage.length > 0
|
|
51
|
+
? `${chalk_1.default.dim(build.gitCommitHash.slice(0, 7))} "${chalk_1.default.bold(splitCommitMessage[0] + (splitCommitMessage.length > 1 ? '…' : ''))}"`
|
|
52
|
+
: 'Unknown';
|
|
53
|
+
return {
|
|
54
|
+
title: `ID: ${chalk_1.default.dim(build.id)} (${chalk_1.default.dim(`${(0, date_1.fromNow)(new Date(build.updatedAt))} ago`)})`,
|
|
55
|
+
description: [
|
|
56
|
+
`\tVersion: ${formatBuildChoiceValue(build.appVersion)}`,
|
|
57
|
+
`\t${build.platform === generated_1.AppPlatform.Ios ? 'Build number' : 'Version code'}: ${formatBuildChoiceValue(build.appBuildVersion)}`,
|
|
58
|
+
`\tCommit: ${formattedCommitData}`,
|
|
59
|
+
].join('\n'),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
async function listAndSelectBuildsOnAppAsync(graphqlClient, selectedPlatform, { projectId, projectDisplayName, filter, queryOptions, selectPromptDisabledFunction, warningMessage, }) {
|
|
44
63
|
var _a;
|
|
45
64
|
const builds = await BuildQuery_1.BuildQuery.viewBuildsOnAppAsync(graphqlClient, {
|
|
46
65
|
appId: projectId,
|
|
@@ -53,12 +72,18 @@ async function listAndSelectBuildsOnAppAsync(graphqlClient, { projectId, project
|
|
|
53
72
|
}
|
|
54
73
|
const { selectedSimulatorBuild } = await (0, prompts_1.promptAsync)({
|
|
55
74
|
type: 'select',
|
|
56
|
-
message: `Select simulator build to run for ${projectDisplayName} app`,
|
|
75
|
+
message: `Select ${selectedPlatform === generated_1.AppPlatform.Ios ? 'iOS' : 'Android'} ${selectedPlatform === generated_1.AppPlatform.Ios ? 'simulator' : 'emulator'} build to run for ${projectDisplayName} app`,
|
|
57
76
|
name: 'selectedSimulatorBuild',
|
|
58
|
-
choices: builds.map(build =>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
77
|
+
choices: builds.map(build => {
|
|
78
|
+
const buildChoice = formatBuildChoiceTitleAndDescription(build);
|
|
79
|
+
return {
|
|
80
|
+
title: buildChoice.title,
|
|
81
|
+
description: buildChoice.description,
|
|
82
|
+
value: build,
|
|
83
|
+
disabled: selectPromptDisabledFunction === null || selectPromptDisabledFunction === void 0 ? void 0 : selectPromptDisabledFunction(build),
|
|
84
|
+
};
|
|
85
|
+
}),
|
|
86
|
+
warn: warningMessage,
|
|
62
87
|
});
|
|
63
88
|
return selectedSimulatorBuild;
|
|
64
89
|
}
|
|
@@ -6,7 +6,6 @@ const core_1 = require("@oclif/core");
|
|
|
6
6
|
const fs_extra_1 = require("fs-extra");
|
|
7
7
|
const node_assert_1 = tslib_1.__importDefault(require("node:assert"));
|
|
8
8
|
const queries_1 = require("../../build/queries");
|
|
9
|
-
const types_1 = require("../../build/types");
|
|
10
9
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
11
10
|
const pagination_1 = require("../../commandUtils/pagination");
|
|
12
11
|
const generated_1 = require("../../graphql/generated");
|
|
@@ -14,7 +13,6 @@ const BuildQuery_1 = require("../../graphql/queries/BuildQuery");
|
|
|
14
13
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
15
14
|
const prompts_1 = require("../../prompts");
|
|
16
15
|
const run_1 = require("../../run/run");
|
|
17
|
-
const buildDistribution_1 = require("../../utils/buildDistribution");
|
|
18
16
|
const download_1 = require("../../utils/download");
|
|
19
17
|
class Run extends EasCommand_1.default {
|
|
20
18
|
async runAsync() {
|
|
@@ -30,11 +28,16 @@ class Run extends EasCommand_1.default {
|
|
|
30
28
|
async sanitizeFlagsAsync(flags) {
|
|
31
29
|
const { platform, limit, offset, ...runArchiveFlags } = flags;
|
|
32
30
|
const selectedPlatform = await resolvePlatformAsync(platform);
|
|
31
|
+
if (platform === 'ios' && process.platform !== 'darwin') {
|
|
32
|
+
core_1.Errors.error('You can only use an iOS simulator to run apps on macOS devices', {
|
|
33
|
+
exit: 1,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
33
36
|
if (runArchiveFlags.path &&
|
|
34
37
|
!((runArchiveFlags.path.endsWith('.tar.gz') ||
|
|
35
38
|
runArchiveFlags.path.endsWith('.app') ||
|
|
36
39
|
runArchiveFlags.path.endsWith('.apk')) &&
|
|
37
|
-
(0, fs_extra_1.
|
|
40
|
+
(await (0, fs_extra_1.pathExists)(runArchiveFlags.path)))) {
|
|
38
41
|
core_1.Errors.error('The path must point to a .tar.gz archive, .apk file, or .app directory', {
|
|
39
42
|
exit: 1,
|
|
40
43
|
});
|
|
@@ -61,7 +64,7 @@ Run.flags = {
|
|
|
61
64
|
exclusive: ['latest', 'id', 'path'],
|
|
62
65
|
}),
|
|
63
66
|
path: core_1.Flags.string({
|
|
64
|
-
description: 'Path to the simulator/emulator build archive or
|
|
67
|
+
description: 'Path to the simulator/emulator build archive or app',
|
|
65
68
|
exclusive: ['latest', 'id', 'url'],
|
|
66
69
|
}),
|
|
67
70
|
id: core_1.Flags.string({
|
|
@@ -80,6 +83,9 @@ Run.contextDefinition = {
|
|
|
80
83
|
..._a.ContextOptions.ProjectDir,
|
|
81
84
|
};
|
|
82
85
|
async function resolvePlatformAsync(platform) {
|
|
86
|
+
if (process.platform !== 'darwin') {
|
|
87
|
+
return generated_1.AppPlatform.Android;
|
|
88
|
+
}
|
|
83
89
|
if (platform && Object.values(generated_1.AppPlatform).includes(platform.toUpperCase())) {
|
|
84
90
|
return platform.toUpperCase();
|
|
85
91
|
}
|
|
@@ -95,6 +101,7 @@ async function resolvePlatformAsync(platform) {
|
|
|
95
101
|
return selectedPlatform;
|
|
96
102
|
}
|
|
97
103
|
async function maybeGetBuildAsync(graphqlClient, flags, projectId, paginatedQueryOptions) {
|
|
104
|
+
const distributionType = flags.selectedPlatform === generated_1.AppPlatform.Ios ? generated_1.DistributionType.Simulator : undefined;
|
|
98
105
|
if (flags.runArchiveFlags.id) {
|
|
99
106
|
return BuildQuery_1.BuildQuery.byIdAsync(graphqlClient, flags.runArchiveFlags.id);
|
|
100
107
|
}
|
|
@@ -102,15 +109,22 @@ async function maybeGetBuildAsync(graphqlClient, flags, projectId, paginatedQuer
|
|
|
102
109
|
!flags.runArchiveFlags.path &&
|
|
103
110
|
!flags.runArchiveFlags.url &&
|
|
104
111
|
!flags.runArchiveFlags.latest) {
|
|
105
|
-
return await (0, queries_1.listAndSelectBuildsOnAppAsync)(graphqlClient, {
|
|
112
|
+
return await (0, queries_1.listAndSelectBuildsOnAppAsync)(graphqlClient, flags.selectedPlatform, {
|
|
106
113
|
projectId,
|
|
107
114
|
projectDisplayName: await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId),
|
|
108
115
|
filter: {
|
|
109
116
|
platform: flags.selectedPlatform,
|
|
110
|
-
distribution:
|
|
117
|
+
distribution: distributionType,
|
|
111
118
|
status: generated_1.BuildStatus.Finished,
|
|
112
119
|
},
|
|
113
120
|
queryOptions: paginatedQueryOptions,
|
|
121
|
+
selectPromptDisabledFunction: build => {
|
|
122
|
+
var _b, _c, _d;
|
|
123
|
+
return build.platform === generated_1.AppPlatform.Ios
|
|
124
|
+
? false
|
|
125
|
+
: (_d = !((_c = (_b = build.artifacts) === null || _b === void 0 ? void 0 : _b.applicationArchiveUrl) === null || _c === void 0 ? void 0 : _c.endsWith('.apk'))) !== null && _d !== void 0 ? _d : false;
|
|
126
|
+
},
|
|
127
|
+
warningMessage: 'This is not a simulator/emulator build',
|
|
114
128
|
});
|
|
115
129
|
}
|
|
116
130
|
else if (flags.runArchiveFlags.latest) {
|
|
@@ -118,7 +132,7 @@ async function maybeGetBuildAsync(graphqlClient, flags, projectId, paginatedQuer
|
|
|
118
132
|
projectId,
|
|
119
133
|
filter: {
|
|
120
134
|
platform: flags.selectedPlatform,
|
|
121
|
-
distribution:
|
|
135
|
+
distribution: distributionType,
|
|
122
136
|
status: generated_1.BuildStatus.Finished,
|
|
123
137
|
},
|
|
124
138
|
});
|
|
@@ -130,18 +144,17 @@ async function maybeGetBuildAsync(graphqlClient, flags, projectId, paginatedQuer
|
|
|
130
144
|
async function getPathToSimulatorBuildAppAsync(graphqlClient, projectId, flags, queryOptions) {
|
|
131
145
|
var _b, _c;
|
|
132
146
|
const maybeBuild = await maybeGetBuildAsync(graphqlClient, flags, projectId, queryOptions);
|
|
133
|
-
const appExtension = flags.selectedPlatform === generated_1.AppPlatform.Ios ? 'app' : 'apk';
|
|
134
147
|
if (maybeBuild) {
|
|
135
148
|
if (!((_b = maybeBuild.artifacts) === null || _b === void 0 ? void 0 : _b.applicationArchiveUrl)) {
|
|
136
149
|
throw new Error('Build does not have an application archive url');
|
|
137
150
|
}
|
|
138
|
-
return await (0, download_1.
|
|
151
|
+
return await (0, download_1.downloadAndMaybeExtractAppAsync)(maybeBuild.artifacts.applicationArchiveUrl, flags.selectedPlatform);
|
|
139
152
|
}
|
|
140
153
|
if (flags.runArchiveFlags.url) {
|
|
141
|
-
return await (0, download_1.
|
|
154
|
+
return await (0, download_1.downloadAndMaybeExtractAppAsync)(flags.runArchiveFlags.url, flags.selectedPlatform);
|
|
142
155
|
}
|
|
143
156
|
if ((_c = flags.runArchiveFlags.path) === null || _c === void 0 ? void 0 : _c.endsWith('.tar.gz')) {
|
|
144
|
-
return await (0, download_1.extractAppFromLocalArchiveAsync)(flags.runArchiveFlags.path,
|
|
157
|
+
return await (0, download_1.extractAppFromLocalArchiveAsync)(flags.runArchiveFlags.path, flags.selectedPlatform);
|
|
145
158
|
}
|
|
146
159
|
// this should never fail, due to the validation in sanitizeFlagsAsync
|
|
147
160
|
(0, node_assert_1.default)(flags.runArchiveFlags.path);
|
|
@@ -6,6 +6,7 @@ export default class Credentials extends EasCommand {
|
|
|
6
6
|
};
|
|
7
7
|
static contextDefinition: {
|
|
8
8
|
analytics: import("../commandUtils/context/AnalyticsContextField").default;
|
|
9
|
+
getDynamicProjectConfigAsync: import("../commandUtils/context/DynamicProjectConfigContextField").DynamicProjectConfigContextField;
|
|
9
10
|
projectConfig: import("../commandUtils/context/OptionalProjectConfigContextField").OptionalProjectConfigContextField;
|
|
10
11
|
loggedIn: import("../commandUtils/context/LoggedInContextField").default;
|
|
11
12
|
};
|
|
@@ -8,10 +8,10 @@ const SelectPlatform_1 = require("../credentials/manager/SelectPlatform");
|
|
|
8
8
|
class Credentials extends EasCommand_1.default {
|
|
9
9
|
async runAsync() {
|
|
10
10
|
const { flags } = await this.parse(Credentials);
|
|
11
|
-
const { loggedIn: { actor, graphqlClient }, projectConfig, analytics, } = await this.getContextAsync(Credentials, {
|
|
11
|
+
const { loggedIn: { actor, graphqlClient }, projectConfig, getDynamicProjectConfigAsync, analytics, } = await this.getContextAsync(Credentials, {
|
|
12
12
|
nonInteractive: false,
|
|
13
13
|
});
|
|
14
|
-
await new SelectPlatform_1.SelectPlatform(actor, graphqlClient, analytics, projectConfig !== null && projectConfig !== void 0 ? projectConfig : null, flags.platform).runAsync();
|
|
14
|
+
await new SelectPlatform_1.SelectPlatform(actor, graphqlClient, analytics, projectConfig !== null && projectConfig !== void 0 ? projectConfig : null, getDynamicProjectConfigAsync, flags.platform).runAsync();
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
exports.default = Credentials;
|
|
@@ -23,5 +23,6 @@ Credentials.flags = {
|
|
|
23
23
|
Credentials.contextDefinition = {
|
|
24
24
|
..._a.ContextOptions.LoggedIn,
|
|
25
25
|
..._a.ContextOptions.OptionalProjectConfig,
|
|
26
|
+
..._a.ContextOptions.DynamicProjectConfig,
|
|
26
27
|
..._a.ContextOptions.Analytics,
|
|
27
28
|
};
|
package/build/commands/submit.js
CHANGED
|
@@ -124,7 +124,7 @@ Submit.flags = {
|
|
|
124
124
|
exclusive: ['latest', 'id', 'path'],
|
|
125
125
|
}),
|
|
126
126
|
verbose: core_1.Flags.boolean({
|
|
127
|
-
description: 'Always print logs from
|
|
127
|
+
description: 'Always print logs from EAS Submit',
|
|
128
128
|
default: false,
|
|
129
129
|
}),
|
|
130
130
|
wait: core_1.Flags.boolean({
|
|
@@ -248,15 +248,17 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
248
248
|
runtimeToPlatformMapping.push({ runtimeVersion: runtime.runtimeVersion, platforms });
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
const { branchId } = await (0, queries_1.ensureBranchExistsAsync)(graphqlClient, {
|
|
251
|
+
const { branchId, createdBranch } = await (0, queries_1.ensureBranchExistsAsync)(graphqlClient, {
|
|
252
252
|
appId: projectId,
|
|
253
253
|
branchName,
|
|
254
254
|
});
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
255
|
+
if (createdBranch) {
|
|
256
|
+
await (0, queries_2.ensureChannelExistsAsync)(graphqlClient, {
|
|
257
|
+
appId: projectId,
|
|
258
|
+
branchId,
|
|
259
|
+
channelName: branchName,
|
|
260
|
+
});
|
|
261
|
+
}
|
|
260
262
|
log_1.default.withTick(`Channel: ${chalk_1.default.bold(branchName)} pointed at branch: ${chalk_1.default.bold(branchName)}`);
|
|
261
263
|
const gitCommitHash = await (0, vcs_1.getVcsClient)().getCommitHashAsync();
|
|
262
264
|
// Sort the updates into different groups based on their platform specific runtime versions
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Analytics } from '../../analytics/AnalyticsManager';
|
|
2
|
+
import { DynamicConfigContextFn } from '../../commandUtils/context/DynamicProjectConfigContextField';
|
|
2
3
|
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
3
4
|
import { Actor } from '../../user/User';
|
|
4
5
|
import { CredentialsContext, CredentialsContextProjectInfo } from '../context';
|
|
@@ -7,6 +8,7 @@ export interface Action<T = void> {
|
|
|
7
8
|
graphqlClient: ExpoGraphqlClient;
|
|
8
9
|
analytics: Analytics;
|
|
9
10
|
projectInfo: CredentialsContextProjectInfo | null;
|
|
11
|
+
getDynamicProjectConfigAsync: DynamicConfigContextFn;
|
|
10
12
|
runAsync(ctx: CredentialsContext): Promise<T>;
|
|
11
13
|
}
|
|
12
14
|
export declare class PressAnyKeyToContinue {
|
|
@@ -38,9 +38,16 @@ class ManageAndroid {
|
|
|
38
38
|
const buildProfile = hasProjectContext
|
|
39
39
|
? await new SelectBuildProfileFromEasJson_1.SelectBuildProfileFromEasJson(this.projectDir, eas_build_job_1.Platform.ANDROID).runAsync()
|
|
40
40
|
: null;
|
|
41
|
+
let projectInfo = null;
|
|
42
|
+
if (hasProjectContext) {
|
|
43
|
+
const { exp, projectId } = await this.callingAction.getDynamicProjectConfigAsync({
|
|
44
|
+
env: buildProfile === null || buildProfile === void 0 ? void 0 : buildProfile.env,
|
|
45
|
+
});
|
|
46
|
+
projectInfo = { exp, projectId };
|
|
47
|
+
}
|
|
41
48
|
const ctx = new context_1.CredentialsContext({
|
|
42
49
|
projectDir: process.cwd(),
|
|
43
|
-
projectInfo
|
|
50
|
+
projectInfo,
|
|
44
51
|
user: this.callingAction.actor,
|
|
45
52
|
graphqlClient: this.callingAction.graphqlClient,
|
|
46
53
|
analytics: this.callingAction.analytics,
|
|
@@ -48,9 +48,16 @@ class ManageIos {
|
|
|
48
48
|
const buildProfile = this.callingAction.projectInfo
|
|
49
49
|
? await new SelectBuildProfileFromEasJson_1.SelectBuildProfileFromEasJson(this.projectDir, eas_build_job_1.Platform.IOS).runAsync()
|
|
50
50
|
: null;
|
|
51
|
+
let projectInfo = null;
|
|
52
|
+
if (this.callingAction.projectInfo) {
|
|
53
|
+
const { exp, projectId } = await this.callingAction.getDynamicProjectConfigAsync({
|
|
54
|
+
env: buildProfile === null || buildProfile === void 0 ? void 0 : buildProfile.env,
|
|
55
|
+
});
|
|
56
|
+
projectInfo = { exp, projectId };
|
|
57
|
+
}
|
|
51
58
|
const ctx = new context_1.CredentialsContext({
|
|
52
59
|
projectDir: process.cwd(),
|
|
53
|
-
projectInfo
|
|
60
|
+
projectInfo,
|
|
54
61
|
user: this.callingAction.actor,
|
|
55
62
|
graphqlClient: this.callingAction.graphqlClient,
|
|
56
63
|
analytics: this.callingAction.analytics,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Analytics } from '../../analytics/AnalyticsManager';
|
|
2
|
+
import { DynamicConfigContextFn } from '../../commandUtils/context/DynamicProjectConfigContextField';
|
|
2
3
|
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
3
4
|
import { Actor } from '../../user/User';
|
|
4
5
|
import { CredentialsContextProjectInfo } from '../context';
|
|
@@ -7,7 +8,8 @@ export declare class SelectPlatform {
|
|
|
7
8
|
readonly graphqlClient: ExpoGraphqlClient;
|
|
8
9
|
readonly analytics: Analytics;
|
|
9
10
|
readonly projectInfo: CredentialsContextProjectInfo | null;
|
|
11
|
+
readonly getDynamicProjectConfigAsync: DynamicConfigContextFn;
|
|
10
12
|
private readonly flagPlatform?;
|
|
11
|
-
constructor(actor: Actor, graphqlClient: ExpoGraphqlClient, analytics: Analytics, projectInfo: CredentialsContextProjectInfo | null, flagPlatform?: string | undefined);
|
|
13
|
+
constructor(actor: Actor, graphqlClient: ExpoGraphqlClient, analytics: Analytics, projectInfo: CredentialsContextProjectInfo | null, getDynamicProjectConfigAsync: DynamicConfigContextFn, flagPlatform?: string | undefined);
|
|
12
14
|
runAsync(): Promise<void>;
|
|
13
15
|
}
|
|
@@ -5,11 +5,12 @@ const platform_1 = require("../../platform");
|
|
|
5
5
|
const ManageAndroid_1 = require("./ManageAndroid");
|
|
6
6
|
const ManageIos_1 = require("./ManageIos");
|
|
7
7
|
class SelectPlatform {
|
|
8
|
-
constructor(actor, graphqlClient, analytics, projectInfo, flagPlatform) {
|
|
8
|
+
constructor(actor, graphqlClient, analytics, projectInfo, getDynamicProjectConfigAsync, flagPlatform) {
|
|
9
9
|
this.actor = actor;
|
|
10
10
|
this.graphqlClient = graphqlClient;
|
|
11
11
|
this.analytics = analytics;
|
|
12
12
|
this.projectInfo = projectInfo;
|
|
13
|
+
this.getDynamicProjectConfigAsync = getDynamicProjectConfigAsync;
|
|
13
14
|
this.flagPlatform = flagPlatform;
|
|
14
15
|
}
|
|
15
16
|
async runAsync() {
|
|
@@ -19,13 +19,12 @@ function formatDeviceClass(device) {
|
|
|
19
19
|
function formatDevice(device, team) {
|
|
20
20
|
var _a, _b;
|
|
21
21
|
const fields = [
|
|
22
|
-
{ label: '
|
|
22
|
+
{ label: 'UDID', value: device.identifier },
|
|
23
23
|
{ label: 'Name', value: (_a = device.name) !== null && _a !== void 0 ? _a : 'Unknown' },
|
|
24
24
|
{
|
|
25
25
|
label: 'Class',
|
|
26
26
|
value: formatDeviceClass(device),
|
|
27
27
|
},
|
|
28
|
-
{ label: 'UDID', value: device.identifier },
|
|
29
28
|
];
|
|
30
29
|
if (team) {
|
|
31
30
|
fields.push({ label: 'Apple Team ID', value: team.appleTeamIdentifier }, { label: 'Apple Team Name', value: (_b = team.appleTeamName) !== null && _b !== void 0 ? _b : 'Unknown' });
|
|
@@ -2114,6 +2114,11 @@ export declare type GetSignedAssetUploadSpecificationsResult = {
|
|
|
2114
2114
|
__typename?: 'GetSignedAssetUploadSpecificationsResult';
|
|
2115
2115
|
specifications: Array<Scalars['String']>;
|
|
2116
2116
|
};
|
|
2117
|
+
export declare enum GitHubAppEnvironment {
|
|
2118
|
+
Development = "DEVELOPMENT",
|
|
2119
|
+
Production = "PRODUCTION",
|
|
2120
|
+
Staging = "STAGING"
|
|
2121
|
+
}
|
|
2117
2122
|
export declare type GitHubAppInstallation = {
|
|
2118
2123
|
__typename?: 'GitHubAppInstallation';
|
|
2119
2124
|
accessibleRepositories: GitHubRepositoryPaginationResult;
|
|
@@ -2166,7 +2171,9 @@ export declare type GitHubAppQuery = {
|
|
|
2166
2171
|
__typename?: 'GitHubAppQuery';
|
|
2167
2172
|
appIdentifier: Scalars['String'];
|
|
2168
2173
|
clientIdentifier: Scalars['String'];
|
|
2174
|
+
environment: GitHubAppEnvironment;
|
|
2169
2175
|
installation: GitHubAppInstallation;
|
|
2176
|
+
name: Scalars['String'];
|
|
2170
2177
|
searchRepositories: GitHubRepositoryPaginationResult;
|
|
2171
2178
|
};
|
|
2172
2179
|
export declare type GitHubAppQueryInstallationArgs = {
|
|
@@ -2187,12 +2194,14 @@ export declare type GitHubRepository = {
|
|
|
2187
2194
|
};
|
|
2188
2195
|
export declare type GitHubRepositoryMetadata = {
|
|
2189
2196
|
__typename?: 'GitHubRepositoryMetadata';
|
|
2197
|
+
defaultBranch?: Maybe<Scalars['String']>;
|
|
2190
2198
|
githubRepoDescription?: Maybe<Scalars['String']>;
|
|
2191
2199
|
githubRepoName: Scalars['String'];
|
|
2192
2200
|
githubRepoOwnerName: Scalars['String'];
|
|
2193
2201
|
githubRepoUrl: Scalars['String'];
|
|
2194
2202
|
lastPushed: Scalars['DateTime'];
|
|
2195
2203
|
lastUpdated: Scalars['DateTime'];
|
|
2204
|
+
openGraphImageUrl?: Maybe<Scalars['String']>;
|
|
2196
2205
|
private: Scalars['Boolean'];
|
|
2197
2206
|
};
|
|
2198
2207
|
export declare type GitHubRepositoryMutation = {
|
|
@@ -2735,6 +2744,7 @@ export declare type ProjectArchiveSourceInput = {
|
|
|
2735
2744
|
url?: InputMaybe<Scalars['String']>;
|
|
2736
2745
|
};
|
|
2737
2746
|
export declare enum ProjectArchiveSourceType {
|
|
2747
|
+
Gcs = "GCS",
|
|
2738
2748
|
S3 = "S3",
|
|
2739
2749
|
Url = "URL"
|
|
2740
2750
|
}
|
|
@@ -6939,6 +6949,7 @@ export declare type CreateAndroidSubmissionMutationVariables = Exact<{
|
|
|
6939
6949
|
appId: Scalars['ID'];
|
|
6940
6950
|
config: AndroidSubmissionConfigInput;
|
|
6941
6951
|
submittedBuildId?: InputMaybe<Scalars['ID']>;
|
|
6952
|
+
archiveSource?: InputMaybe<SubmissionArchiveSourceInput>;
|
|
6942
6953
|
}>;
|
|
6943
6954
|
export declare type CreateAndroidSubmissionMutation = {
|
|
6944
6955
|
__typename?: 'RootMutation';
|
|
@@ -6987,6 +6998,7 @@ export declare type CreateIosSubmissionMutationVariables = Exact<{
|
|
|
6987
6998
|
appId: Scalars['ID'];
|
|
6988
6999
|
config: IosSubmissionConfigInput;
|
|
6989
7000
|
submittedBuildId?: InputMaybe<Scalars['ID']>;
|
|
7001
|
+
archiveSource?: InputMaybe<SubmissionArchiveSourceInput>;
|
|
6990
7002
|
}>;
|
|
6991
7003
|
export declare type CreateIosSubmissionMutation = {
|
|
6992
7004
|
__typename?: 'RootMutation';
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* For more info and docs, visit https://graphql-code-generator.com/
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
10
|
-
exports.WebhookType = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = void 0;
|
|
9
|
+
exports.SubmissionArchiveSourceType = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OfferType = exports.MailchimpTag = exports.MailchimpAudience = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.GitHubAppInstallationStatus = exports.GitHubAppEnvironment = exports.Feature = exports.EnvironmentSecretType = exports.EasServiceMetric = exports.EasBuildDeprecationInfoType = exports.DistributionType = exports.CacheControlScope = exports.BuildWorkflow = exports.BuildStatus = exports.BuildResourceClass = exports.BuildPriority = exports.BuildJobStatus = exports.BuildJobLogsFormat = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.AuthProtocolType = exports.AssetMetadataStatus = exports.AppsFilter = exports.AppleDeviceClass = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = void 0;
|
|
10
|
+
exports.WebhookType = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.SubmissionStatus = void 0;
|
|
11
11
|
var ActivityTimelineProjectActivityType;
|
|
12
12
|
(function (ActivityTimelineProjectActivityType) {
|
|
13
13
|
ActivityTimelineProjectActivityType["Build"] = "BUILD";
|
|
@@ -186,6 +186,12 @@ var Feature;
|
|
|
186
186
|
/** Share access to projects */
|
|
187
187
|
Feature["Teams"] = "TEAMS";
|
|
188
188
|
})(Feature = exports.Feature || (exports.Feature = {}));
|
|
189
|
+
var GitHubAppEnvironment;
|
|
190
|
+
(function (GitHubAppEnvironment) {
|
|
191
|
+
GitHubAppEnvironment["Development"] = "DEVELOPMENT";
|
|
192
|
+
GitHubAppEnvironment["Production"] = "PRODUCTION";
|
|
193
|
+
GitHubAppEnvironment["Staging"] = "STAGING";
|
|
194
|
+
})(GitHubAppEnvironment = exports.GitHubAppEnvironment || (exports.GitHubAppEnvironment = {}));
|
|
189
195
|
var GitHubAppInstallationStatus;
|
|
190
196
|
(function (GitHubAppInstallationStatus) {
|
|
191
197
|
GitHubAppInstallationStatus["Active"] = "ACTIVE";
|
|
@@ -253,6 +259,7 @@ var Permission;
|
|
|
253
259
|
})(Permission = exports.Permission || (exports.Permission = {}));
|
|
254
260
|
var ProjectArchiveSourceType;
|
|
255
261
|
(function (ProjectArchiveSourceType) {
|
|
262
|
+
ProjectArchiveSourceType["Gcs"] = "GCS";
|
|
256
263
|
ProjectArchiveSourceType["S3"] = "S3";
|
|
257
264
|
ProjectArchiveSourceType["Url"] = "URL";
|
|
258
265
|
})(ProjectArchiveSourceType = exports.ProjectArchiveSourceType || (exports.ProjectArchiveSourceType = {}));
|
|
@@ -15,10 +15,16 @@ exports.SubmissionMutation = {
|
|
|
15
15
|
$appId: ID!
|
|
16
16
|
$config: AndroidSubmissionConfigInput!
|
|
17
17
|
$submittedBuildId: ID
|
|
18
|
+
$archiveSource: SubmissionArchiveSourceInput
|
|
18
19
|
) {
|
|
19
20
|
submission {
|
|
20
21
|
createAndroidSubmission(
|
|
21
|
-
input: {
|
|
22
|
+
input: {
|
|
23
|
+
appId: $appId
|
|
24
|
+
config: $config
|
|
25
|
+
submittedBuildId: $submittedBuildId
|
|
26
|
+
archiveSource: $archiveSource
|
|
27
|
+
}
|
|
22
28
|
) {
|
|
23
29
|
submission {
|
|
24
30
|
id
|
|
@@ -39,10 +45,16 @@ exports.SubmissionMutation = {
|
|
|
39
45
|
$appId: ID!
|
|
40
46
|
$config: IosSubmissionConfigInput!
|
|
41
47
|
$submittedBuildId: ID
|
|
48
|
+
$archiveSource: SubmissionArchiveSourceInput
|
|
42
49
|
) {
|
|
43
50
|
submission {
|
|
44
51
|
createIosSubmission(
|
|
45
|
-
input: {
|
|
52
|
+
input: {
|
|
53
|
+
appId: $appId
|
|
54
|
+
config: $config
|
|
55
|
+
submittedBuildId: $submittedBuildId
|
|
56
|
+
archiveSource: $archiveSource
|
|
57
|
+
}
|
|
46
58
|
) {
|
|
47
59
|
submission {
|
|
48
60
|
id
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
2
|
import { UploadSessionType } from '../generated';
|
|
3
|
-
export interface
|
|
3
|
+
export interface SignedUrl {
|
|
4
4
|
url: string;
|
|
5
|
-
|
|
5
|
+
headers: Record<string, string>;
|
|
6
|
+
bucketKey: string;
|
|
6
7
|
}
|
|
7
8
|
export declare const UploadSessionMutation: {
|
|
8
|
-
createUploadSessionAsync(graphqlClient: ExpoGraphqlClient, type: UploadSessionType): Promise<
|
|
9
|
+
createUploadSessionAsync(graphqlClient: ExpoGraphqlClient, type: UploadSessionType): Promise<SignedUrl>;
|
|
9
10
|
};
|
package/build/prompts.js
CHANGED
|
@@ -5,8 +5,10 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const os_1 = require("os");
|
|
6
6
|
const prompts_1 = tslib_1.__importDefault(require("prompts"));
|
|
7
7
|
async function promptAsync(questions, options = {}) {
|
|
8
|
+
var _a;
|
|
8
9
|
if (!process.stdin.isTTY && !global.test) {
|
|
9
|
-
|
|
10
|
+
const message = Array.isArray(questions) ? (_a = questions[0]) === null || _a === void 0 ? void 0 : _a.message : questions.message;
|
|
11
|
+
throw new Error(`Input is required, but stdin is not readable. Failed to display prompt: ${message}`);
|
|
10
12
|
}
|
|
11
13
|
return await (0, prompts_1.default)(questions, {
|
|
12
14
|
onCancel() {
|