eas-cli 0.40.0 → 0.42.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 +466 -101
- package/bin/run +3 -4
- package/build/api.d.ts +1 -0
- package/build/api.js +13 -1
- package/build/build/build.js +3 -3
- package/build/build/configure.js +3 -3
- package/build/build/context.d.ts +2 -1
- package/build/build/createContext.d.ts +3 -2
- package/build/build/createContext.js +2 -2
- package/build/build/local.d.ts +9 -1
- package/build/build/local.js +35 -5
- package/build/build/runBuildAndSubmit.d.ts +15 -0
- package/build/build/runBuildAndSubmit.js +173 -0
- package/build/build/utils/devClient.js +3 -3
- package/build/commandUtils/EasCommand.d.ts +2 -1
- package/build/commandUtils/EasCommand.js +7 -4
- package/build/commands/account/login.d.ts +1 -0
- package/build/commands/account/login.js +1 -0
- package/build/commands/account/logout.d.ts +1 -0
- package/build/commands/account/logout.js +1 -0
- package/build/commands/account/view.d.ts +1 -0
- package/build/commands/account/view.js +1 -0
- package/build/commands/analytics.js +1 -1
- package/build/commands/branch/create.d.ts +1 -2
- package/build/commands/branch/create.js +3 -4
- package/build/commands/branch/delete.d.ts +1 -2
- package/build/commands/branch/delete.js +4 -5
- package/build/commands/branch/list.d.ts +1 -2
- package/build/commands/branch/list.js +4 -5
- package/build/commands/branch/rename.d.ts +3 -5
- package/build/commands/branch/rename.js +5 -6
- package/build/commands/branch/view.d.ts +1 -2
- package/build/commands/branch/view.js +3 -4
- package/build/commands/build/cancel.js +1 -1
- package/build/commands/build/configure.d.ts +1 -2
- package/build/commands/build/configure.js +3 -3
- package/build/commands/build/index.d.ts +11 -17
- package/build/commands/build/index.js +27 -177
- package/build/commands/build/inspect.d.ts +21 -0
- package/build/commands/build/inspect.js +129 -0
- package/build/commands/build/list.d.ts +13 -14
- package/build/commands/build/list.js +15 -15
- package/build/commands/build/view.d.ts +1 -1
- package/build/commands/build/view.js +3 -3
- package/build/commands/channel/create.d.ts +1 -2
- package/build/commands/channel/create.js +3 -4
- package/build/commands/channel/edit.d.ts +2 -4
- package/build/commands/channel/edit.js +4 -5
- package/build/commands/channel/list.d.ts +1 -2
- package/build/commands/channel/list.js +3 -4
- package/build/commands/channel/rollout.d.ts +4 -5
- package/build/commands/channel/rollout.js +6 -7
- package/build/commands/channel/view.d.ts +1 -2
- package/build/commands/channel/view.js +3 -4
- package/build/commands/config.d.ts +2 -3
- package/build/commands/config.js +4 -4
- package/build/commands/device/list.d.ts +1 -2
- package/build/commands/device/list.js +3 -3
- package/build/commands/device/view.js +1 -1
- package/build/commands/diagnostics.js +1 -0
- package/build/commands/secret/create.d.ts +4 -5
- package/build/commands/secret/create.js +6 -6
- package/build/commands/secret/delete.d.ts +1 -2
- package/build/commands/secret/delete.js +3 -3
- package/build/commands/submit.d.ts +9 -10
- package/build/commands/submit.js +13 -14
- package/build/commands/update/configure.d.ts +0 -3
- package/build/commands/update/configure.js +14 -15
- package/build/commands/update/delete.d.ts +1 -2
- package/build/commands/update/delete.js +3 -4
- package/build/commands/update/index.d.ts +9 -11
- package/build/commands/update/index.js +60 -29
- package/build/commands/update/view.d.ts +1 -2
- package/build/commands/update/view.js +3 -4
- package/build/commands/webhook/create.d.ts +3 -4
- package/build/commands/webhook/create.js +5 -5
- package/build/commands/webhook/delete.js +1 -1
- package/build/commands/webhook/list.d.ts +1 -2
- package/build/commands/webhook/list.js +3 -3
- package/build/commands/webhook/update.d.ts +4 -5
- package/build/commands/webhook/update.js +6 -6
- package/build/commands/webhook/view.js +1 -1
- package/build/graphql/generated.d.ts +31 -11
- package/build/graphql/generated.js +6 -1
- package/build/graphql/types/Submission.js +1 -0
- package/build/index.d.ts +1 -1
- package/build/index.js +2 -2
- package/build/project/expoSdk.d.ts +3 -0
- package/build/project/expoSdk.js +30 -0
- package/build/project/metroConfig.js +2 -2
- package/build/project/publish.js +1 -3
- package/build/prompts.d.ts +3 -3
- package/build/submit/ios/IosSubmitCommand.js +6 -1
- package/build/submit/utils/urls.js +1 -1
- package/build/update/utils.js +4 -4
- package/build/user/actions.js +2 -2
- package/build/utils/expoCli.d.ts +3 -1
- package/build/utils/expoCli.js +13 -11
- package/build/utils/profiles.d.ts +1 -1
- package/build/utils/profiles.js +80 -30
- package/build/vcs/clients/git.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +17 -12
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.listBranchesAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const config_1 = require("@expo/config");
|
|
6
|
-
const
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
7
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
8
8
|
const cli_table3_1 = (0, tslib_1.__importDefault)(require("cli-table3"));
|
|
9
9
|
const graphql_1 = require("graphql");
|
|
@@ -41,7 +41,7 @@ async function listBranchesAsync({ projectId, }) {
|
|
|
41
41
|
exports.listBranchesAsync = listBranchesAsync;
|
|
42
42
|
class BranchList extends EasCommand_1.default {
|
|
43
43
|
async runAsync() {
|
|
44
|
-
const { flags } = this.parse(BranchList);
|
|
44
|
+
const { flags } = await this.parse(BranchList);
|
|
45
45
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
46
46
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
47
47
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
@@ -51,7 +51,7 @@ class BranchList extends EasCommand_1.default {
|
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
53
|
const table = new cli_table3_1.default({
|
|
54
|
-
head: ['
|
|
54
|
+
head: ['Branch', ...utils_1.UPDATE_COLUMNS],
|
|
55
55
|
wordWrap: true,
|
|
56
56
|
});
|
|
57
57
|
table.push(...branches.map(branch => {
|
|
@@ -77,10 +77,9 @@ class BranchList extends EasCommand_1.default {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
exports.default = BranchList;
|
|
80
|
-
BranchList.hidden = true;
|
|
81
80
|
BranchList.description = 'List all branches on this project.';
|
|
82
81
|
BranchList.flags = {
|
|
83
|
-
json:
|
|
82
|
+
json: core_1.Flags.boolean({
|
|
84
83
|
description: 'return output as JSON',
|
|
85
84
|
default: false,
|
|
86
85
|
}),
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
2
|
export default class BranchRename extends EasCommand {
|
|
4
|
-
static hidden: boolean;
|
|
5
3
|
static description: string;
|
|
6
4
|
static flags: {
|
|
7
|
-
from:
|
|
8
|
-
to:
|
|
9
|
-
json: import("@oclif/
|
|
5
|
+
from: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
|
+
to: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
8
|
};
|
|
11
9
|
runAsync(): Promise<void>;
|
|
12
10
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const config_1 = require("@expo/config");
|
|
5
|
-
const
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
6
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
7
7
|
const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
|
|
8
8
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
@@ -33,7 +33,7 @@ async function renameUpdateBranchOnAppAsync({ appId, name, newName, }) {
|
|
|
33
33
|
}
|
|
34
34
|
class BranchRename extends EasCommand_1.default {
|
|
35
35
|
async runAsync() {
|
|
36
|
-
let { flags: { json: jsonFlag, from: currentName, to: newName }, } = this.parse(BranchRename);
|
|
36
|
+
let { flags: { json: jsonFlag, from: currentName, to: newName }, } = await this.parse(BranchRename);
|
|
37
37
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
38
38
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
39
39
|
const fullName = await (0, projectUtils_1.getProjectFullNameAsync)(exp);
|
|
@@ -75,18 +75,17 @@ class BranchRename extends EasCommand_1.default {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
exports.default = BranchRename;
|
|
78
|
-
BranchRename.hidden = true;
|
|
79
78
|
BranchRename.description = 'Rename a branch.';
|
|
80
79
|
BranchRename.flags = {
|
|
81
|
-
from:
|
|
80
|
+
from: core_1.Flags.string({
|
|
82
81
|
description: 'current name of the branch.',
|
|
83
82
|
required: false,
|
|
84
83
|
}),
|
|
85
|
-
to:
|
|
84
|
+
to: core_1.Flags.string({
|
|
86
85
|
description: 'new name of the branch.',
|
|
87
86
|
required: false,
|
|
88
87
|
}),
|
|
89
|
-
json:
|
|
88
|
+
json: core_1.Flags.boolean({
|
|
90
89
|
description: `return a json with the edited branch's ID and name.`,
|
|
91
90
|
default: false,
|
|
92
91
|
}),
|
|
@@ -2,7 +2,6 @@ import EasCommand from '../../commandUtils/EasCommand';
|
|
|
2
2
|
import { ViewBranchQuery, ViewBranchQueryVariables } from '../../graphql/generated';
|
|
3
3
|
export declare function viewUpdateBranchAsync({ appId, name, }: Pick<ViewBranchQueryVariables, 'appId' | 'name'>): Promise<ViewBranchQuery>;
|
|
4
4
|
export default class BranchView extends EasCommand {
|
|
5
|
-
static hidden: boolean;
|
|
6
5
|
static description: string;
|
|
7
6
|
static args: {
|
|
8
7
|
name: string;
|
|
@@ -10,7 +9,7 @@ export default class BranchView extends EasCommand {
|
|
|
10
9
|
description: string;
|
|
11
10
|
}[];
|
|
12
11
|
static flags: {
|
|
13
|
-
json: import("@oclif/
|
|
12
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
13
|
};
|
|
15
14
|
runAsync(): Promise<void>;
|
|
16
15
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.viewUpdateBranchAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const config_1 = require("@expo/config");
|
|
6
|
-
const
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
7
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
8
8
|
const cli_table3_1 = (0, tslib_1.__importDefault)(require("cli-table3"));
|
|
9
9
|
const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
|
|
@@ -59,7 +59,7 @@ async function viewUpdateBranchAsync({ appId, name, }) {
|
|
|
59
59
|
exports.viewUpdateBranchAsync = viewUpdateBranchAsync;
|
|
60
60
|
class BranchView extends EasCommand_1.default {
|
|
61
61
|
async runAsync() {
|
|
62
|
-
let { args: { name }, flags: { json: jsonFlag }, } = this.parse(BranchView);
|
|
62
|
+
let { args: { name }, flags: { json: jsonFlag }, } = await this.parse(BranchView);
|
|
63
63
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
64
64
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
65
65
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
@@ -115,7 +115,6 @@ class BranchView extends EasCommand_1.default {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
exports.default = BranchView;
|
|
118
|
-
BranchView.hidden = true;
|
|
119
118
|
BranchView.description = 'View a branch.';
|
|
120
119
|
BranchView.args = [
|
|
121
120
|
{
|
|
@@ -125,7 +124,7 @@ BranchView.args = [
|
|
|
125
124
|
},
|
|
126
125
|
];
|
|
127
126
|
BranchView.flags = {
|
|
128
|
-
json:
|
|
127
|
+
json: core_1.Flags.boolean({
|
|
129
128
|
description: `return a json with the branch's ID name and recent update groups.`,
|
|
130
129
|
default: false,
|
|
131
130
|
}),
|
|
@@ -90,7 +90,7 @@ async function ensureBuildExistsAsync(buildId) {
|
|
|
90
90
|
}
|
|
91
91
|
class BuildCancel extends EasCommand_1.default {
|
|
92
92
|
async runAsync() {
|
|
93
|
-
const { BUILD_ID: buildIdFromArg } = this.parse(BuildCancel).args;
|
|
93
|
+
const { BUILD_ID: buildIdFromArg } = (await this.parse(BuildCancel)).args;
|
|
94
94
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
95
95
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
96
96
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
2
|
export default class BuildConfigure extends EasCommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
|
-
platform:
|
|
5
|
+
platform: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
6
|
};
|
|
8
7
|
runAsync(): Promise<void>;
|
|
9
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
5
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
6
6
|
const configure_1 = require("../../build/configure");
|
|
7
7
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
@@ -13,7 +13,7 @@ const vcs_1 = require("../../vcs");
|
|
|
13
13
|
class BuildConfigure extends EasCommand_1.default {
|
|
14
14
|
async runAsync() {
|
|
15
15
|
var _a;
|
|
16
|
-
const { flags } = this.parse(BuildConfigure);
|
|
16
|
+
const { flags } = await this.parse(BuildConfigure);
|
|
17
17
|
log_1.default.log('💡 The following process will configure your iOS and/or Android project to be compatible with EAS Build. These changes only apply to your local project files and you can safely revert them at any time.');
|
|
18
18
|
log_1.default.newLine();
|
|
19
19
|
await (0, vcs_1.getVcsClient)().ensureRepoExistsAsync();
|
|
@@ -29,7 +29,7 @@ class BuildConfigure extends EasCommand_1.default {
|
|
|
29
29
|
exports.default = BuildConfigure;
|
|
30
30
|
BuildConfigure.description = 'Configure the project to support EAS Build.';
|
|
31
31
|
BuildConfigure.flags = {
|
|
32
|
-
platform:
|
|
32
|
+
platform: core_1.Flags.enum({
|
|
33
33
|
description: 'Platform to configure',
|
|
34
34
|
char: 'p',
|
|
35
35
|
options: ['android', 'ios', 'all'],
|
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
2
|
export default class Build extends EasCommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
|
-
platform:
|
|
7
|
-
'skip-credentials-check': import("@oclif/
|
|
8
|
-
json: import("@oclif/
|
|
9
|
-
'skip-project-configuration': import("@oclif/
|
|
10
|
-
profile:
|
|
11
|
-
'non-interactive': import("@oclif/
|
|
12
|
-
local: import("@oclif/
|
|
13
|
-
wait: import("@oclif/
|
|
14
|
-
'clear-cache': import("@oclif/
|
|
15
|
-
'auto-submit': import("@oclif/
|
|
16
|
-
'auto-submit-with-profile':
|
|
5
|
+
platform: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
|
+
'skip-credentials-check': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
'skip-project-configuration': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
10
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
local: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
wait: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
'clear-cache': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
'auto-submit': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
'auto-submit-with-profile': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
17
16
|
};
|
|
18
|
-
private metroConfigValidated;
|
|
19
17
|
runAsync(): Promise<void>;
|
|
20
18
|
private sanitizeFlagsAsync;
|
|
21
|
-
private prepareAndStartBuildAsync;
|
|
22
|
-
private startBuildAsync;
|
|
23
|
-
private prepareAndStartSubmissionAsync;
|
|
24
|
-
private exitWithNonZeroCodeIfSomeBuildsFailed;
|
|
25
19
|
}
|
|
26
20
|
export declare function handleDeprecatedEasJsonAsync(projectDir: string, nonInteractive: boolean): Promise<void>;
|
|
@@ -2,147 +2,55 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.handleDeprecatedEasJsonAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
6
5
|
const eas_json_1 = require("@expo/eas-json");
|
|
7
|
-
const
|
|
8
|
-
const errors_1 = require("@oclif/errors");
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
9
7
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
10
8
|
const figures_1 = (0, tslib_1.__importDefault)(require("figures"));
|
|
11
9
|
const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
|
|
12
|
-
const
|
|
13
|
-
const build_1 = require("../../build/android/build");
|
|
14
|
-
const build_2 = require("../../build/build");
|
|
15
|
-
const configure_1 = require("../../build/configure");
|
|
16
|
-
const createContext_1 = require("../../build/createContext");
|
|
17
|
-
const build_3 = require("../../build/ios/build");
|
|
18
|
-
const devClient_1 = require("../../build/utils/devClient");
|
|
19
|
-
const printBuildInfo_1 = require("../../build/utils/printBuildInfo");
|
|
10
|
+
const runBuildAndSubmit_1 = require("../../build/runBuildAndSubmit");
|
|
20
11
|
const repository_1 = require("../../build/utils/repository");
|
|
21
12
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
22
|
-
const generated_1 = require("../../graphql/generated");
|
|
23
|
-
const AppPlatform_1 = require("../../graphql/types/AppPlatform");
|
|
24
13
|
const log_1 = (0, tslib_1.__importStar)(require("../../log"));
|
|
25
14
|
const platform_1 = require("../../platform");
|
|
26
|
-
const metroConfig_1 = require("../../project/metroConfig");
|
|
27
15
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
28
16
|
const prompts_1 = require("../../prompts");
|
|
29
|
-
const context_1 = require("../../submit/context");
|
|
30
|
-
const submit_1 = require("../../submit/submit");
|
|
31
|
-
const urls_1 = require("../../submit/utils/urls");
|
|
32
17
|
const easCli_1 = require("../../utils/easCli");
|
|
33
18
|
const json_1 = require("../../utils/json");
|
|
34
|
-
const profiles_1 = require("../../utils/profiles");
|
|
35
19
|
const vcs_1 = require("../../vcs");
|
|
36
20
|
const git_1 = (0, tslib_1.__importDefault)(require("../../vcs/clients/git"));
|
|
37
21
|
class Build extends EasCommand_1.default {
|
|
38
|
-
constructor() {
|
|
39
|
-
super(...arguments);
|
|
40
|
-
this.metroConfigValidated = false;
|
|
41
|
-
}
|
|
42
22
|
async runAsync() {
|
|
43
|
-
|
|
44
|
-
const { flags: rawFlags } = this.parse(Build);
|
|
23
|
+
const { flags: rawFlags } = await this.parse(Build);
|
|
45
24
|
if (rawFlags.json) {
|
|
46
25
|
(0, json_1.enableJsonOutput)();
|
|
47
26
|
}
|
|
48
27
|
const flags = await this.sanitizeFlagsAsync(rawFlags);
|
|
49
|
-
const { requestedPlatform } = flags;
|
|
50
28
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
51
29
|
await handleDeprecatedEasJsonAsync(projectDir, flags.nonInteractive);
|
|
52
|
-
await (0,
|
|
53
|
-
await (0, repository_1.ensureRepoIsCleanAsync)(flags.nonInteractive);
|
|
54
|
-
await (0, configure_1.ensureProjectConfiguredAsync)(projectDir, requestedPlatform);
|
|
55
|
-
const platforms = (0, platform_1.toPlatforms)(requestedPlatform);
|
|
56
|
-
const buildProfiles = await (0, profiles_1.getProfilesAsync)({
|
|
57
|
-
type: 'build',
|
|
58
|
-
projectDir,
|
|
59
|
-
platforms,
|
|
60
|
-
profileName: (_a = flags.profile) !== null && _a !== void 0 ? _a : undefined,
|
|
61
|
-
});
|
|
62
|
-
await (0, devClient_1.ensureExpoDevClientInstalledForDevClientBuildsAsync)({
|
|
63
|
-
projectDir,
|
|
64
|
-
nonInteractive: flags.nonInteractive,
|
|
65
|
-
buildProfiles,
|
|
66
|
-
});
|
|
67
|
-
const startedBuilds = [];
|
|
68
|
-
const buildCtxByPlatform = {};
|
|
69
|
-
for (const buildProfile of buildProfiles) {
|
|
70
|
-
const { build: maybeBuild, buildCtx } = await this.prepareAndStartBuildAsync({
|
|
71
|
-
projectDir,
|
|
72
|
-
flags,
|
|
73
|
-
moreBuilds: platforms.length > 1,
|
|
74
|
-
buildProfile,
|
|
75
|
-
});
|
|
76
|
-
if (maybeBuild) {
|
|
77
|
-
startedBuilds.push({ build: maybeBuild, buildProfile });
|
|
78
|
-
}
|
|
79
|
-
buildCtxByPlatform[(0, AppPlatform_1.toAppPlatform)(buildProfile.platform)] = buildCtx;
|
|
80
|
-
}
|
|
81
|
-
if (flags.local) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
log_1.default.newLine();
|
|
85
|
-
(0, printBuildInfo_1.printLogsUrls)(startedBuilds.map(startedBuild => startedBuild.build));
|
|
86
|
-
log_1.default.newLine();
|
|
87
|
-
const submissions = [];
|
|
88
|
-
if (flags.autoSubmit) {
|
|
89
|
-
const submitProfiles = await (0, profiles_1.getProfilesAsync)({
|
|
90
|
-
projectDir,
|
|
91
|
-
platforms,
|
|
92
|
-
profileName: flags.submitProfile,
|
|
93
|
-
type: 'submit',
|
|
94
|
-
});
|
|
95
|
-
for (const startedBuild of startedBuilds) {
|
|
96
|
-
const submitProfile = (0, nullthrows_1.default)(submitProfiles.find(({ platform }) => (0, AppPlatform_1.toAppPlatform)(platform) === startedBuild.build.platform)).profile;
|
|
97
|
-
const submission = await this.prepareAndStartSubmissionAsync({
|
|
98
|
-
build: startedBuild.build,
|
|
99
|
-
buildCtx: (0, nullthrows_1.default)(buildCtxByPlatform[startedBuild.build.platform]),
|
|
100
|
-
moreBuilds: startedBuilds.length > 1,
|
|
101
|
-
projectDir,
|
|
102
|
-
buildProfile: startedBuild.buildProfile.profile,
|
|
103
|
-
submitProfile,
|
|
104
|
-
nonInteractive: flags.nonInteractive,
|
|
105
|
-
});
|
|
106
|
-
submissions.push(submission);
|
|
107
|
-
}
|
|
108
|
-
log_1.default.newLine();
|
|
109
|
-
(0, urls_1.printSubmissionDetailsUrls)(submissions);
|
|
110
|
-
log_1.default.newLine();
|
|
111
|
-
}
|
|
112
|
-
if (!flags.wait) {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
const builds = await (0, build_2.waitForBuildEndAsync)(startedBuilds.map(({ build }) => build.id));
|
|
116
|
-
(0, printBuildInfo_1.printBuildResults)(builds, flags.json);
|
|
117
|
-
const haveAllBuildsFailedOrCanceled = builds.every(build => (build === null || build === void 0 ? void 0 : build.status) && [generated_1.BuildStatus.Errored, generated_1.BuildStatus.Canceled].includes(build === null || build === void 0 ? void 0 : build.status));
|
|
118
|
-
if (haveAllBuildsFailedOrCanceled || !flags.autoSubmit) {
|
|
119
|
-
this.exitWithNonZeroCodeIfSomeBuildsFailed(builds);
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
// the following function also exits with non zero code if any of the submissions failed
|
|
123
|
-
await (0, submit_1.waitToCompleteAsync)(submissions);
|
|
124
|
-
}
|
|
30
|
+
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(projectDir, flags);
|
|
125
31
|
}
|
|
126
32
|
async sanitizeFlagsAsync(flags) {
|
|
127
33
|
var _a;
|
|
128
34
|
const nonInteractive = flags['non-interactive'];
|
|
129
35
|
if (!flags.platform && nonInteractive) {
|
|
130
|
-
|
|
36
|
+
core_1.Errors.error('--platform is required when building in non-interactive mode', { exit: 1 });
|
|
131
37
|
}
|
|
132
38
|
if (flags.json && !nonInteractive) {
|
|
133
|
-
|
|
39
|
+
core_1.Errors.error('--json is allowed only when building in non-interactive mode', { exit: 1 });
|
|
134
40
|
}
|
|
135
41
|
const requestedPlatform = await (0, platform_1.selectRequestedPlatformAsync)(flags.platform);
|
|
136
42
|
if (flags.local) {
|
|
137
43
|
if (flags['auto-submit'] || flags['auto-submit-with-profile'] !== undefined) {
|
|
138
44
|
// TODO: implement this
|
|
139
|
-
|
|
45
|
+
core_1.Errors.error('Auto-submits are not yet supported when building locally', { exit: 1 });
|
|
140
46
|
}
|
|
141
47
|
if (requestedPlatform === platform_1.RequestedPlatform.All) {
|
|
142
|
-
|
|
48
|
+
core_1.Errors.error('Builds for multiple platforms are not supported with flag --local', {
|
|
49
|
+
exit: 1,
|
|
50
|
+
});
|
|
143
51
|
}
|
|
144
52
|
else if (process.platform !== 'darwin' && requestedPlatform === platform_1.RequestedPlatform.Ios) {
|
|
145
|
-
|
|
53
|
+
core_1.Errors.error('Unsupported platform, macOS is required to build apps for iOS', { exit: 1 });
|
|
146
54
|
}
|
|
147
55
|
}
|
|
148
56
|
if (flags['skip-credentials-check']) {
|
|
@@ -155,7 +63,11 @@ class Build extends EasCommand_1.default {
|
|
|
155
63
|
skipProjectConfiguration: flags['skip-project-configuration'],
|
|
156
64
|
profile,
|
|
157
65
|
nonInteractive,
|
|
158
|
-
|
|
66
|
+
localBuildOptions: flags['local']
|
|
67
|
+
? { enable: true, verbose: true }
|
|
68
|
+
: {
|
|
69
|
+
enable: false,
|
|
70
|
+
},
|
|
159
71
|
wait: flags['wait'],
|
|
160
72
|
clearCache: flags['clear-cache'],
|
|
161
73
|
json: flags['json'],
|
|
@@ -163,115 +75,53 @@ class Build extends EasCommand_1.default {
|
|
|
163
75
|
submitProfile: (_a = flags['auto-submit-with-profile']) !== null && _a !== void 0 ? _a : profile,
|
|
164
76
|
};
|
|
165
77
|
}
|
|
166
|
-
async prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildProfile, }) {
|
|
167
|
-
const buildCtx = await (0, createContext_1.createBuildContextAsync)({
|
|
168
|
-
buildProfileName: buildProfile.profileName,
|
|
169
|
-
clearCache: flags.clearCache,
|
|
170
|
-
buildProfile: buildProfile.profile,
|
|
171
|
-
local: flags.local,
|
|
172
|
-
nonInteractive: flags.nonInteractive,
|
|
173
|
-
platform: buildProfile.platform,
|
|
174
|
-
projectDir,
|
|
175
|
-
skipProjectConfiguration: flags.skipProjectConfiguration,
|
|
176
|
-
});
|
|
177
|
-
if (moreBuilds) {
|
|
178
|
-
log_1.default.newLine();
|
|
179
|
-
const appPlatform = (0, AppPlatform_1.toAppPlatform)(buildProfile.platform);
|
|
180
|
-
log_1.default.log(`${platform_1.appPlatformEmojis[appPlatform]} ${chalk_1.default.bold(`${platform_1.appPlatformDisplayNames[appPlatform]} build`)}`);
|
|
181
|
-
}
|
|
182
|
-
if (buildCtx.workflow === eas_build_job_1.Workflow.MANAGED && !this.metroConfigValidated) {
|
|
183
|
-
await (0, metroConfig_1.validateMetroConfigForManagedWorkflowAsync)(buildCtx);
|
|
184
|
-
this.metroConfigValidated = true;
|
|
185
|
-
}
|
|
186
|
-
const build = await this.startBuildAsync(buildCtx);
|
|
187
|
-
return {
|
|
188
|
-
build,
|
|
189
|
-
buildCtx,
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
async startBuildAsync(ctx) {
|
|
193
|
-
let sendBuildRequestAsync;
|
|
194
|
-
if (ctx.platform === eas_build_job_1.Platform.ANDROID) {
|
|
195
|
-
sendBuildRequestAsync = await (0, build_1.prepareAndroidBuildAsync)(ctx);
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
sendBuildRequestAsync = await (0, build_3.prepareIosBuildAsync)(ctx);
|
|
199
|
-
}
|
|
200
|
-
return await sendBuildRequestAsync();
|
|
201
|
-
}
|
|
202
|
-
async prepareAndStartSubmissionAsync({ build, buildCtx, moreBuilds, projectDir, buildProfile, submitProfile, nonInteractive, }) {
|
|
203
|
-
var _a, _b, _c;
|
|
204
|
-
const platform = (0, AppPlatform_1.toPlatform)(build.platform);
|
|
205
|
-
const submissionCtx = await (0, context_1.createSubmissionContextAsync)({
|
|
206
|
-
platform,
|
|
207
|
-
projectDir,
|
|
208
|
-
projectId: build.project.id,
|
|
209
|
-
profile: submitProfile,
|
|
210
|
-
archiveFlags: { id: build.id },
|
|
211
|
-
nonInteractive,
|
|
212
|
-
env: buildProfile.env,
|
|
213
|
-
credentialsCtx: buildCtx.credentialsCtx,
|
|
214
|
-
applicationIdentifier: (_b = (_a = buildCtx.android) === null || _a === void 0 ? void 0 : _a.applicationId) !== null && _b !== void 0 ? _b : (_c = buildCtx.ios) === null || _c === void 0 ? void 0 : _c.bundleIdentifier,
|
|
215
|
-
});
|
|
216
|
-
if (moreBuilds) {
|
|
217
|
-
log_1.default.newLine();
|
|
218
|
-
log_1.default.log(`${platform_1.appPlatformEmojis[build.platform]} ${chalk_1.default.bold(`${platform_1.appPlatformDisplayNames[build.platform]} submission`)}`);
|
|
219
|
-
}
|
|
220
|
-
return await (0, submit_1.submitAsync)(submissionCtx);
|
|
221
|
-
}
|
|
222
|
-
exitWithNonZeroCodeIfSomeBuildsFailed(maybeBuilds) {
|
|
223
|
-
const failedBuilds = maybeBuilds.filter(i => i).filter(i => i.status === generated_1.BuildStatus.Errored);
|
|
224
|
-
if (failedBuilds.length > 0) {
|
|
225
|
-
process.exit(1);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
78
|
}
|
|
229
79
|
exports.default = Build;
|
|
230
80
|
Build.description = 'Start a build';
|
|
231
81
|
Build.flags = {
|
|
232
|
-
platform:
|
|
82
|
+
platform: core_1.Flags.enum({
|
|
233
83
|
char: 'p',
|
|
234
84
|
options: ['android', 'ios', 'all'],
|
|
235
85
|
}),
|
|
236
|
-
'skip-credentials-check':
|
|
86
|
+
'skip-credentials-check': core_1.Flags.boolean({
|
|
237
87
|
default: false,
|
|
238
88
|
hidden: true,
|
|
239
89
|
}),
|
|
240
|
-
json:
|
|
90
|
+
json: core_1.Flags.boolean({
|
|
241
91
|
description: 'Enable JSON output, non-JSON messages will be printed to stderr',
|
|
242
92
|
default: false,
|
|
243
93
|
}),
|
|
244
|
-
'skip-project-configuration':
|
|
94
|
+
'skip-project-configuration': core_1.Flags.boolean({
|
|
245
95
|
default: false,
|
|
246
96
|
description: 'Skip project configuration',
|
|
247
97
|
}),
|
|
248
|
-
profile:
|
|
98
|
+
profile: core_1.Flags.string({
|
|
249
99
|
description: 'Name of the build profile from eas.json. Defaults to "production" if defined in eas.json.',
|
|
250
100
|
helpValue: 'PROFILE_NAME',
|
|
251
101
|
}),
|
|
252
|
-
'non-interactive':
|
|
102
|
+
'non-interactive': core_1.Flags.boolean({
|
|
253
103
|
default: false,
|
|
254
104
|
description: 'Run command in non-interactive mode',
|
|
255
105
|
}),
|
|
256
|
-
local:
|
|
106
|
+
local: core_1.Flags.boolean({
|
|
257
107
|
default: false,
|
|
258
108
|
description: 'Run build locally [experimental]',
|
|
259
109
|
}),
|
|
260
|
-
wait:
|
|
110
|
+
wait: core_1.Flags.boolean({
|
|
261
111
|
default: true,
|
|
262
112
|
allowNo: true,
|
|
263
113
|
description: 'Wait for build(s) to complete',
|
|
264
114
|
}),
|
|
265
|
-
'clear-cache':
|
|
115
|
+
'clear-cache': core_1.Flags.boolean({
|
|
266
116
|
default: false,
|
|
267
117
|
description: 'Clear cache before the build',
|
|
268
118
|
}),
|
|
269
|
-
'auto-submit':
|
|
119
|
+
'auto-submit': core_1.Flags.boolean({
|
|
270
120
|
default: false,
|
|
271
121
|
description: 'Submit on build complete using the submit profile with the same name as the build profile',
|
|
272
122
|
exclusive: ['auto-submit-with-profile'],
|
|
273
123
|
}),
|
|
274
|
-
'auto-submit-with-profile':
|
|
124
|
+
'auto-submit-with-profile': core_1.Flags.string({
|
|
275
125
|
description: 'Submit on build complete using the submit profile with provided name',
|
|
276
126
|
helpValue: 'PROFILE_NAME',
|
|
277
127
|
exclusive: ['auto-submit'],
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
import { RequestedPlatform } from '../../platform';
|
|
3
|
+
declare enum InspectStage {
|
|
4
|
+
ARCHIVE = "archive",
|
|
5
|
+
PRE_BUILD = "pre-build",
|
|
6
|
+
POST_BUILD = "post-build"
|
|
7
|
+
}
|
|
8
|
+
export default class BuildInspect extends EasCommand {
|
|
9
|
+
static description: string;
|
|
10
|
+
static flags: {
|
|
11
|
+
platform: import("@oclif/core/lib/interfaces").OptionFlag<RequestedPlatform>;
|
|
12
|
+
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
13
|
+
stage: import("@oclif/core/lib/interfaces").OptionFlag<InspectStage>;
|
|
14
|
+
output: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
15
|
+
force: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
};
|
|
18
|
+
runAsync(): Promise<void>;
|
|
19
|
+
private prepareOutputDirAsync;
|
|
20
|
+
}
|
|
21
|
+
export {};
|