eas-cli 0.41.1 → 0.42.3
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 +258 -153
- package/bin/run +3 -4
- package/build/build/configure.js +3 -3
- package/build/build/local.js +1 -1
- 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 -1
- package/build/commands/branch/create.js +3 -3
- package/build/commands/branch/delete.d.ts +1 -1
- package/build/commands/branch/delete.js +3 -3
- package/build/commands/branch/list.d.ts +1 -1
- package/build/commands/branch/list.js +3 -3
- package/build/commands/branch/rename.d.ts +3 -4
- package/build/commands/branch/rename.js +5 -5
- package/build/commands/branch/view.d.ts +1 -1
- package/build/commands/branch/view.js +3 -3
- 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 -12
- package/build/commands/build/index.js +20 -19
- package/build/commands/build/inspect.d.ts +6 -7
- package/build/commands/build/inspect.js +8 -8
- 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 -1
- package/build/commands/channel/create.js +3 -3
- package/build/commands/channel/edit.d.ts +2 -3
- package/build/commands/channel/edit.js +4 -4
- package/build/commands/channel/list.d.ts +1 -1
- package/build/commands/channel/list.js +3 -3
- 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 -1
- package/build/commands/channel/view.js +3 -3
- 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/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/delete.d.ts +1 -1
- package/build/commands/update/delete.js +3 -3
- package/build/commands/update/index.d.ts +9 -10
- package/build/commands/update/index.js +22 -14
- package/build/commands/update/view.d.ts +1 -1
- package/build/commands/update/view.js +3 -3
- 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/index.d.ts +1 -1
- package/build/index.js +2 -2
- package/build/project/expoSdk.js +2 -2
- package/build/project/metroConfig.js +2 -2
- package/build/project/publish.js +1 -3
- package/build/user/actions.js +2 -2
- package/build/utils/expoCli.d.ts +3 -1
- package/build/utils/expoCli.js +13 -11
- package/build/vcs/clients/git.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +16 -12
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import EasCommand from '../commandUtils/EasCommand';
|
|
3
2
|
export default class Submit extends EasCommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static aliases: string[];
|
|
6
5
|
static flags: {
|
|
7
|
-
platform:
|
|
8
|
-
profile:
|
|
9
|
-
latest: import("@oclif/
|
|
10
|
-
id:
|
|
11
|
-
path:
|
|
12
|
-
url:
|
|
13
|
-
verbose: import("@oclif/
|
|
14
|
-
wait: import("@oclif/
|
|
15
|
-
'non-interactive': import("@oclif/
|
|
6
|
+
platform: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
|
+
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
|
+
latest: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
10
|
+
path: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
|
+
url: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
wait: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
15
|
};
|
|
17
16
|
runAsync(): Promise<void>;
|
|
18
17
|
private sanitizeFlagsAsync;
|
package/build/commands/submit.js
CHANGED
|
@@ -2,8 +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
|
|
6
|
-
const errors_1 = require("@oclif/errors");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
7
6
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
8
7
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../commandUtils/EasCommand"));
|
|
9
8
|
const AppPlatform_1 = require("../graphql/types/AppPlatform");
|
|
@@ -16,7 +15,7 @@ const urls_1 = require("../submit/utils/urls");
|
|
|
16
15
|
const profiles_1 = require("../utils/profiles");
|
|
17
16
|
class Submit extends EasCommand_1.default {
|
|
18
17
|
async runAsync() {
|
|
19
|
-
const { flags: rawFlags } = this.parse(Submit);
|
|
18
|
+
const { flags: rawFlags } = await this.parse(Submit);
|
|
20
19
|
const flags = await this.sanitizeFlagsAsync(rawFlags);
|
|
21
20
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
22
21
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
@@ -55,12 +54,12 @@ class Submit extends EasCommand_1.default {
|
|
|
55
54
|
async sanitizeFlagsAsync(flags) {
|
|
56
55
|
const { platform, verbose, wait, profile, 'non-interactive': nonInteractive, ...archiveFlags } = flags;
|
|
57
56
|
if (!flags.platform && nonInteractive) {
|
|
58
|
-
|
|
57
|
+
core_1.Errors.error('--platform is required when building in non-interactive mode', { exit: 1 });
|
|
59
58
|
}
|
|
60
59
|
const requestedPlatform = await (0, platform_1.selectRequestedPlatformAsync)(flags.platform);
|
|
61
60
|
if (requestedPlatform === platform_1.RequestedPlatform.All) {
|
|
62
61
|
if (archiveFlags.id || archiveFlags.path || archiveFlags.url) {
|
|
63
|
-
|
|
62
|
+
core_1.Errors.error('--id, --path, and --url params are only supported when performing a single-platform submit', { exit: 1 });
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
return {
|
|
@@ -78,39 +77,39 @@ Submit.description = `Submit build archive to App Store Connect
|
|
|
78
77
|
See how to configure submits with eas.json: ${(0, log_1.link)('https://docs.expo.dev/submit/eas-json/')}`;
|
|
79
78
|
Submit.aliases = ['build:submit'];
|
|
80
79
|
Submit.flags = {
|
|
81
|
-
platform:
|
|
80
|
+
platform: core_1.Flags.enum({
|
|
82
81
|
char: 'p',
|
|
83
82
|
options: ['android', 'ios', 'all'],
|
|
84
83
|
}),
|
|
85
|
-
profile:
|
|
84
|
+
profile: core_1.Flags.string({
|
|
86
85
|
description: 'Name of the submit profile from eas.json. Defaults to "production" if defined in eas.json.',
|
|
87
86
|
}),
|
|
88
|
-
latest:
|
|
87
|
+
latest: core_1.Flags.boolean({
|
|
89
88
|
description: 'Submit the latest build for specified platform',
|
|
90
89
|
exclusive: ['id', 'path', 'url'],
|
|
91
90
|
}),
|
|
92
|
-
id:
|
|
91
|
+
id: core_1.Flags.string({
|
|
93
92
|
description: 'ID of the build to submit',
|
|
94
93
|
exclusive: ['latest, path, url'],
|
|
95
94
|
}),
|
|
96
|
-
path:
|
|
95
|
+
path: core_1.Flags.string({
|
|
97
96
|
description: 'Path to the .apk/.aab/.ipa file',
|
|
98
97
|
exclusive: ['latest', 'id', 'url'],
|
|
99
98
|
}),
|
|
100
|
-
url:
|
|
99
|
+
url: core_1.Flags.string({
|
|
101
100
|
description: 'App archive url',
|
|
102
101
|
exclusive: ['latest', 'id', 'path'],
|
|
103
102
|
}),
|
|
104
|
-
verbose:
|
|
103
|
+
verbose: core_1.Flags.boolean({
|
|
105
104
|
description: 'Always print logs from Submission Service',
|
|
106
105
|
default: false,
|
|
107
106
|
}),
|
|
108
|
-
wait:
|
|
107
|
+
wait: core_1.Flags.boolean({
|
|
109
108
|
description: 'Wait for submission to complete',
|
|
110
109
|
default: true,
|
|
111
110
|
allowNo: true,
|
|
112
111
|
}),
|
|
113
|
-
'non-interactive':
|
|
112
|
+
'non-interactive': core_1.Flags.boolean({
|
|
114
113
|
default: false,
|
|
115
114
|
description: 'Run command in non-interactive mode',
|
|
116
115
|
}),
|
|
@@ -7,7 +7,7 @@ export default class UpdateDelete extends EasCommand {
|
|
|
7
7
|
description: string;
|
|
8
8
|
}[];
|
|
9
9
|
static flags: {
|
|
10
|
-
json: import("@oclif/
|
|
10
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
};
|
|
12
12
|
runAsync(): Promise<void>;
|
|
13
13
|
}
|
|
@@ -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 graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
|
|
7
7
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
@@ -23,7 +23,7 @@ async function deleteUpdateGroupAsync({ group, }) {
|
|
|
23
23
|
}
|
|
24
24
|
class UpdateDelete extends EasCommand_1.default {
|
|
25
25
|
async runAsync() {
|
|
26
|
-
const { args: { groupId: group }, flags: { json: jsonFlag }, } = this.parse(UpdateDelete);
|
|
26
|
+
const { args: { groupId: group }, flags: { json: jsonFlag }, } = await this.parse(UpdateDelete);
|
|
27
27
|
if (!jsonFlag) {
|
|
28
28
|
const shouldAbort = await (0, prompts_1.confirmAsync)({
|
|
29
29
|
message: `🚨${chalk_1.default.red('CAUTION')}🚨\n\n` +
|
|
@@ -55,7 +55,7 @@ UpdateDelete.args = [
|
|
|
55
55
|
},
|
|
56
56
|
];
|
|
57
57
|
UpdateDelete.flags = {
|
|
58
|
-
json:
|
|
58
|
+
json: core_1.Flags.boolean({
|
|
59
59
|
description: `Return a json with the group ID of the deleted updates.`,
|
|
60
60
|
default: false,
|
|
61
61
|
}),
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
2
|
import { PublishPlatform } from '../../project/publish';
|
|
4
3
|
export declare const defaultPublishPlatforms: PublishPlatform[];
|
|
5
4
|
export default class UpdatePublish extends EasCommand {
|
|
6
5
|
static description: string;
|
|
7
6
|
static flags: {
|
|
8
|
-
branch:
|
|
9
|
-
message:
|
|
10
|
-
republish: import("@oclif/
|
|
11
|
-
group:
|
|
12
|
-
'input-dir':
|
|
13
|
-
'skip-bundler': import("@oclif/
|
|
14
|
-
platform:
|
|
15
|
-
json: import("@oclif/
|
|
16
|
-
auto: import("@oclif/
|
|
7
|
+
branch: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
|
+
message: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
|
+
republish: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
group: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
|
+
'input-dir': import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
12
|
+
'skip-bundler': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
platform: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
14
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
auto: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
16
|
};
|
|
18
17
|
runAsync(): Promise<void>;
|
|
19
18
|
}
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const config_1 = require("@expo/config");
|
|
6
6
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
7
7
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
8
|
-
const
|
|
8
|
+
const core_1 = require("@oclif/core");
|
|
9
9
|
const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
|
|
10
10
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
11
11
|
const dateformat_1 = (0, tslib_1.__importDefault)(require("dateformat"));
|
|
@@ -85,8 +85,8 @@ async function ensureBranchExistsAsync({ appId, name: branchName, }) {
|
|
|
85
85
|
class UpdatePublish extends EasCommand_1.default {
|
|
86
86
|
async runAsync() {
|
|
87
87
|
var _a, _b, _c;
|
|
88
|
-
let { flags: { branch: branchName, json: jsonFlag, auto: autoFlag, message, republish, group, 'input-dir': inputDir, 'skip-bundler': skipBundler, }, } = this.parse(UpdatePublish);
|
|
89
|
-
const platformFlag =
|
|
88
|
+
let { flags: { branch: branchName, json: jsonFlag, auto: autoFlag, message, republish, group, 'input-dir': inputDir, 'skip-bundler': skipBundler, platform, }, } = await this.parse(UpdatePublish);
|
|
89
|
+
const platformFlag = platform;
|
|
90
90
|
// If a group was specified, that means we are republishing it.
|
|
91
91
|
republish = group ? true : republish;
|
|
92
92
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
@@ -222,9 +222,17 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
222
222
|
}
|
|
223
223
|
// build bundle and upload assets for a new publish
|
|
224
224
|
if (!skipBundler) {
|
|
225
|
-
|
|
225
|
+
const bundleSpinner = (0, ora_1.ora)().start('Building bundle...');
|
|
226
|
+
try {
|
|
227
|
+
await (0, publish_1.buildBundlesAsync)({ projectDir, inputDir });
|
|
228
|
+
bundleSpinner.succeed('Built bundle!');
|
|
229
|
+
}
|
|
230
|
+
catch (e) {
|
|
231
|
+
bundleSpinner.fail('Failed to build bundle!');
|
|
232
|
+
throw e;
|
|
233
|
+
}
|
|
226
234
|
}
|
|
227
|
-
const assetSpinner = (0, ora_1.ora)('Uploading assets...')
|
|
235
|
+
const assetSpinner = (0, ora_1.ora)().start('Uploading assets...');
|
|
228
236
|
try {
|
|
229
237
|
const platforms = platformFlag === 'all' ? exports.defaultPublishPlatforms : [platformFlag];
|
|
230
238
|
const assets = await (0, publish_1.collectAssetsAsync)({ inputDir: inputDir, platforms });
|
|
@@ -301,42 +309,42 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
301
309
|
exports.default = UpdatePublish;
|
|
302
310
|
UpdatePublish.description = 'Publish an update group.';
|
|
303
311
|
UpdatePublish.flags = {
|
|
304
|
-
branch:
|
|
312
|
+
branch: core_1.Flags.string({
|
|
305
313
|
description: 'Branch to publish the update group on',
|
|
306
314
|
required: false,
|
|
307
315
|
}),
|
|
308
|
-
message:
|
|
316
|
+
message: core_1.Flags.string({
|
|
309
317
|
description: 'A short message describing the update',
|
|
310
318
|
required: false,
|
|
311
319
|
}),
|
|
312
|
-
republish:
|
|
320
|
+
republish: core_1.Flags.boolean({
|
|
313
321
|
description: 'Republish an update group',
|
|
314
322
|
exclusive: ['input-dir', 'skip-bundler'],
|
|
315
323
|
}),
|
|
316
|
-
group:
|
|
324
|
+
group: core_1.Flags.string({
|
|
317
325
|
description: 'Update group to republish',
|
|
318
326
|
exclusive: ['input-dir', 'skip-bundler'],
|
|
319
327
|
}),
|
|
320
|
-
'input-dir':
|
|
328
|
+
'input-dir': core_1.Flags.string({
|
|
321
329
|
description: 'Location of the bundle',
|
|
322
330
|
default: 'dist',
|
|
323
331
|
required: false,
|
|
324
332
|
}),
|
|
325
|
-
'skip-bundler':
|
|
333
|
+
'skip-bundler': core_1.Flags.boolean({
|
|
326
334
|
description: `Skip running Expo CLI to bundle the app before publishing`,
|
|
327
335
|
default: false,
|
|
328
336
|
}),
|
|
329
|
-
platform:
|
|
337
|
+
platform: core_1.Flags.enum({
|
|
330
338
|
char: 'p',
|
|
331
339
|
options: [...exports.defaultPublishPlatforms, 'all'],
|
|
332
340
|
default: 'all',
|
|
333
341
|
required: false,
|
|
334
342
|
}),
|
|
335
|
-
json:
|
|
343
|
+
json: core_1.Flags.boolean({
|
|
336
344
|
description: 'Enable JSON output, non-JSON messages will be printed to stderr',
|
|
337
345
|
default: false,
|
|
338
346
|
}),
|
|
339
|
-
auto:
|
|
347
|
+
auto: core_1.Flags.boolean({
|
|
340
348
|
description: 'Use the current git branch and commit message for the EAS branch and update message',
|
|
341
349
|
default: false,
|
|
342
350
|
}),
|
|
@@ -11,7 +11,7 @@ export default class UpdateView extends EasCommand {
|
|
|
11
11
|
description: string;
|
|
12
12
|
}[];
|
|
13
13
|
static flags: {
|
|
14
|
-
json: import("@oclif/
|
|
14
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
15
|
};
|
|
16
16
|
runAsync(): Promise<void>;
|
|
17
17
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.viewUpdateAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
6
|
const cli_table3_1 = (0, tslib_1.__importDefault)(require("cli-table3"));
|
|
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"));
|
|
@@ -44,7 +44,7 @@ exports.viewUpdateAsync = viewUpdateAsync;
|
|
|
44
44
|
class UpdateView extends EasCommand_1.default {
|
|
45
45
|
async runAsync() {
|
|
46
46
|
var _a;
|
|
47
|
-
const { args: { groupId }, flags: { json: jsonFlag }, } = this.parse(UpdateView);
|
|
47
|
+
const { args: { groupId }, flags: { json: jsonFlag }, } = await this.parse(UpdateView);
|
|
48
48
|
const { updatesByGroup } = await viewUpdateAsync({ groupId });
|
|
49
49
|
if (jsonFlag) {
|
|
50
50
|
log_1.default.log(JSON.stringify(updatesByGroup));
|
|
@@ -77,7 +77,7 @@ UpdateView.args = [
|
|
|
77
77
|
},
|
|
78
78
|
];
|
|
79
79
|
UpdateView.flags = {
|
|
80
|
-
json:
|
|
80
|
+
json: core_1.Flags.boolean({
|
|
81
81
|
description: `Return a json with the updates belonging to the group.`,
|
|
82
82
|
default: false,
|
|
83
83
|
}),
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
2
|
import { WebhookType } from '../../graphql/generated';
|
|
4
3
|
export default class WebhookCreate extends EasCommand {
|
|
5
4
|
static description: string;
|
|
6
5
|
static flags: {
|
|
7
|
-
event:
|
|
8
|
-
url:
|
|
9
|
-
secret:
|
|
6
|
+
event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType>;
|
|
7
|
+
url: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
|
+
secret: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
10
9
|
};
|
|
11
10
|
runAsync(): Promise<void>;
|
|
12
11
|
}
|
|
@@ -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 EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
7
7
|
const generated_1 = require("../../graphql/generated");
|
|
8
8
|
const WebhookMutation_1 = require("../../graphql/mutations/WebhookMutation");
|
|
@@ -11,7 +11,7 @@ const projectUtils_1 = require("../../project/projectUtils");
|
|
|
11
11
|
const input_1 = require("../../webhooks/input");
|
|
12
12
|
class WebhookCreate extends EasCommand_1.default {
|
|
13
13
|
async runAsync() {
|
|
14
|
-
const { flags } = this.parse(WebhookCreate);
|
|
14
|
+
const { flags } = await this.parse(WebhookCreate);
|
|
15
15
|
const webhookInputParams = await (0, input_1.prepareInputParamsAsync)(flags);
|
|
16
16
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
17
17
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
@@ -30,14 +30,14 @@ class WebhookCreate extends EasCommand_1.default {
|
|
|
30
30
|
exports.default = WebhookCreate;
|
|
31
31
|
WebhookCreate.description = 'Create a webhook on the current project.';
|
|
32
32
|
WebhookCreate.flags = {
|
|
33
|
-
event:
|
|
33
|
+
event: core_1.Flags.enum({
|
|
34
34
|
description: 'Event type that triggers the webhook',
|
|
35
35
|
options: [generated_1.WebhookType.Build, generated_1.WebhookType.Submit],
|
|
36
36
|
}),
|
|
37
|
-
url:
|
|
37
|
+
url: core_1.Flags.string({
|
|
38
38
|
description: 'Webhook URL',
|
|
39
39
|
}),
|
|
40
|
-
secret:
|
|
40
|
+
secret: core_1.Flags.string({
|
|
41
41
|
description: "Secret used to create a hash signature of the request payload, provided in the 'Expo-Signature' header.",
|
|
42
42
|
}),
|
|
43
43
|
};
|
|
@@ -15,7 +15,7 @@ const prompts_1 = require("../../prompts");
|
|
|
15
15
|
const formatWebhook_1 = require("../../webhooks/formatWebhook");
|
|
16
16
|
class WebhookDelete extends EasCommand_1.default {
|
|
17
17
|
async runAsync() {
|
|
18
|
-
let { args: { ID: webhookId }, } = this.parse(WebhookDelete);
|
|
18
|
+
let { args: { ID: webhookId }, } = await this.parse(WebhookDelete);
|
|
19
19
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
20
20
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
21
21
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
2
|
import { WebhookType } from '../../graphql/generated';
|
|
4
3
|
export default class WebhookList extends EasCommand {
|
|
5
4
|
static description: string;
|
|
6
5
|
static flags: {
|
|
7
|
-
event:
|
|
6
|
+
event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType>;
|
|
8
7
|
};
|
|
9
8
|
runAsync(): Promise<void>;
|
|
10
9
|
}
|
|
@@ -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 EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
8
8
|
const generated_1 = require("../../graphql/generated");
|
|
@@ -13,7 +13,7 @@ const projectUtils_1 = require("../../project/projectUtils");
|
|
|
13
13
|
const formatWebhook_1 = require("../../webhooks/formatWebhook");
|
|
14
14
|
class WebhookList extends EasCommand_1.default {
|
|
15
15
|
async runAsync() {
|
|
16
|
-
const { flags: { event }, } = this.parse(WebhookList);
|
|
16
|
+
const { flags: { event }, } = await this.parse(WebhookList);
|
|
17
17
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
18
18
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
19
19
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
@@ -41,7 +41,7 @@ class WebhookList extends EasCommand_1.default {
|
|
|
41
41
|
exports.default = WebhookList;
|
|
42
42
|
WebhookList.description = 'List webhooks on the current project.';
|
|
43
43
|
WebhookList.flags = {
|
|
44
|
-
event:
|
|
44
|
+
event: core_1.Flags.enum({
|
|
45
45
|
description: 'Event type that triggers the webhook',
|
|
46
46
|
options: [generated_1.WebhookType.Build, generated_1.WebhookType.Submit],
|
|
47
47
|
}),
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
2
|
import { WebhookType } from '../../graphql/generated';
|
|
4
3
|
export default class WebhookUpdate extends EasCommand {
|
|
5
4
|
static description: string;
|
|
6
5
|
static flags: {
|
|
7
|
-
id:
|
|
8
|
-
event:
|
|
9
|
-
url:
|
|
10
|
-
secret:
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
|
+
event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType>;
|
|
8
|
+
url: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
|
+
secret: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
10
|
};
|
|
12
11
|
runAsync(): Promise<void>;
|
|
13
12
|
}
|
|
@@ -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 EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
6
6
|
const generated_1 = require("../../graphql/generated");
|
|
7
7
|
const WebhookMutation_1 = require("../../graphql/mutations/WebhookMutation");
|
|
@@ -11,7 +11,7 @@ const pick_1 = (0, tslib_1.__importDefault)(require("../../utils/expodash/pick")
|
|
|
11
11
|
const input_1 = require("../../webhooks/input");
|
|
12
12
|
class WebhookUpdate extends EasCommand_1.default {
|
|
13
13
|
async runAsync() {
|
|
14
|
-
const { flags } = this.parse(WebhookUpdate);
|
|
14
|
+
const { flags } = await this.parse(WebhookUpdate);
|
|
15
15
|
const webhookId = flags.id;
|
|
16
16
|
const webhook = await WebhookQuery_1.WebhookQuery.byIdAsync(webhookId);
|
|
17
17
|
const webhookInputParams = await (0, input_1.prepareInputParamsAsync)((0, pick_1.default)(flags, ['event', 'url', 'secret']), webhook);
|
|
@@ -29,18 +29,18 @@ class WebhookUpdate extends EasCommand_1.default {
|
|
|
29
29
|
exports.default = WebhookUpdate;
|
|
30
30
|
WebhookUpdate.description = 'Create a webhook on the current project.';
|
|
31
31
|
WebhookUpdate.flags = {
|
|
32
|
-
id:
|
|
32
|
+
id: core_1.Flags.string({
|
|
33
33
|
description: 'Webhook ID',
|
|
34
34
|
required: true,
|
|
35
35
|
}),
|
|
36
|
-
event:
|
|
36
|
+
event: core_1.Flags.enum({
|
|
37
37
|
description: 'Event type that triggers the webhook',
|
|
38
38
|
options: [generated_1.WebhookType.Build, generated_1.WebhookType.Submit],
|
|
39
39
|
}),
|
|
40
|
-
url:
|
|
40
|
+
url: core_1.Flags.string({
|
|
41
41
|
description: 'Webhook URL',
|
|
42
42
|
}),
|
|
43
|
-
secret:
|
|
43
|
+
secret: core_1.Flags.string({
|
|
44
44
|
description: "Secret used to create a hash signature of the request payload, provided in the 'Expo-Signature' header.",
|
|
45
45
|
}),
|
|
46
46
|
};
|
|
@@ -8,7 +8,7 @@ const ora_1 = require("../../ora");
|
|
|
8
8
|
const formatWebhook_1 = require("../../webhooks/formatWebhook");
|
|
9
9
|
class WebhookView extends EasCommand_1.default {
|
|
10
10
|
async runAsync() {
|
|
11
|
-
const { args: { ID: webhookId }, } = this.parse(WebhookView);
|
|
11
|
+
const { args: { ID: webhookId }, } = await this.parse(WebhookView);
|
|
12
12
|
const spinner = (0, ora_1.ora)(`Fetching the webhook details for ID ${webhookId}`).start();
|
|
13
13
|
try {
|
|
14
14
|
const webhook = await WebhookQuery_1.WebhookQuery.byIdAsync(webhookId);
|
package/build/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { run } from '@oclif/
|
|
1
|
+
export { run } from '@oclif/core';
|
package/build/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.run = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "run", { enumerable: true, get: function () { return
|
|
4
|
+
var core_1 = require("@oclif/core");
|
|
5
|
+
Object.defineProperty(exports, "run", { enumerable: true, get: function () { return core_1.run; } });
|
package/build/project/expoSdk.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.checkExpoSdkIsSupportedAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
6
|
-
const
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
7
|
const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
|
|
8
8
|
const semver_1 = (0, tslib_1.__importDefault)(require("semver"));
|
|
9
9
|
const log_1 = (0, tslib_1.__importDefault)(require("../log"));
|
|
@@ -24,7 +24,7 @@ async function checkExpoSdkIsSupportedAsync(ctx) {
|
|
|
24
24
|
message: `${unsupportedSdkMessage} Do you want to proceed?`,
|
|
25
25
|
});
|
|
26
26
|
if (!proceed) {
|
|
27
|
-
|
|
27
|
+
core_1.Errors.exit(1);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.checkExpoSdkIsSupportedAsync = checkExpoSdkIsSupportedAsync;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateMetroConfigForManagedWorkflowAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
6
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
7
7
|
const resolve_from_1 = (0, tslib_1.__importDefault)(require("resolve-from"));
|
|
8
8
|
const log_1 = (0, tslib_1.__importStar)(require("../log"));
|
|
@@ -32,7 +32,7 @@ async function validateMetroConfigForManagedWorkflowAsync(ctx) {
|
|
|
32
32
|
});
|
|
33
33
|
if (shouldAbort) {
|
|
34
34
|
log_1.default.error('Aborting...');
|
|
35
|
-
|
|
35
|
+
core_1.Errors.exit(1);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
package/build/project/publish.js
CHANGED
|
@@ -11,7 +11,6 @@ const path_1 = (0, tslib_1.__importDefault)(require("path"));
|
|
|
11
11
|
const generated_1 = require("../graphql/generated");
|
|
12
12
|
const PublishMutation_1 = require("../graphql/mutations/PublishMutation");
|
|
13
13
|
const PublishQuery_1 = require("../graphql/queries/PublishQuery");
|
|
14
|
-
const log_1 = (0, tslib_1.__importDefault)(require("../log"));
|
|
15
14
|
const uploads_1 = require("../uploads");
|
|
16
15
|
const expoCli_1 = require("../utils/expoCli");
|
|
17
16
|
const uniqBy_1 = (0, tslib_1.__importDefault)(require("../utils/expodash/uniqBy"));
|
|
@@ -107,8 +106,7 @@ async function buildBundlesAsync({ projectDir, inputDir, }) {
|
|
|
107
106
|
if (!packageJSON) {
|
|
108
107
|
throw new Error('Could not locate package.json');
|
|
109
108
|
}
|
|
110
|
-
|
|
111
|
-
await (0, expoCli_1.expoCommandAsync)(projectDir, ['export', '--output-dir', inputDir, '--experimental-bundle']);
|
|
109
|
+
await (0, expoCli_1.expoCommandAsync)(projectDir, ['export', '--output-dir', inputDir, '--experimental-bundle'], { silent: true });
|
|
112
110
|
}
|
|
113
111
|
exports.buildBundlesAsync = buildBundlesAsync;
|
|
114
112
|
async function resolveInputDirectoryAsync(customInputDirectory) {
|
package/build/user/actions.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ensureActorHasUsername = exports.ensureLoggedInAsync = exports.showLoginPromptAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
6
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
7
7
|
const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
|
|
8
8
|
const ApiV2Error_1 = (0, tslib_1.__importDefault)(require("../ApiV2Error"));
|
|
@@ -12,7 +12,7 @@ const User_1 = require("./User");
|
|
|
12
12
|
const otp_1 = require("./otp");
|
|
13
13
|
async function showLoginPromptAsync({ nonInteractive = false, printNewLine = false, } = {}) {
|
|
14
14
|
if (nonInteractive) {
|
|
15
|
-
|
|
15
|
+
core_1.Errors.error(`Either log in with ${chalk_1.default.bold('eas login')} or set the ${chalk_1.default.bold('EXPO_TOKEN')} environment variable if you're using EAS CLI on CI (${(0, log_1.learnMore)('https://docs.expo.dev/accounts/programmatic-access/', { dim: false })})`);
|
|
16
16
|
}
|
|
17
17
|
if (printNewLine) {
|
|
18
18
|
log_1.default.newLine();
|
package/build/utils/expoCli.d.ts
CHANGED
package/build/utils/expoCli.js
CHANGED
|
@@ -6,7 +6,7 @@ const spawn_async_1 = (0, tslib_1.__importDefault)(require("@expo/spawn-async"))
|
|
|
6
6
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
7
7
|
const resolve_from_1 = (0, tslib_1.__importDefault)(require("resolve-from"));
|
|
8
8
|
const log_1 = (0, tslib_1.__importDefault)(require("../log"));
|
|
9
|
-
async function expoCommandAsync(projectDir, args) {
|
|
9
|
+
async function expoCommandAsync(projectDir, args, { silent = false } = {}) {
|
|
10
10
|
const expoCliPath = (0, resolve_from_1.default)(projectDir, 'expo/bin/cli.js');
|
|
11
11
|
const spawnPromise = (0, spawn_async_1.default)(expoCliPath, args, {
|
|
12
12
|
stdio: ['inherit', 'pipe', 'pipe'], // inherit stdin so user can install a missing expo-cli from inside this command
|
|
@@ -15,16 +15,18 @@ async function expoCommandAsync(projectDir, args) {
|
|
|
15
15
|
if (!(stdout && stderr)) {
|
|
16
16
|
throw new Error('Failed to spawn expo-cli');
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
if (!silent) {
|
|
19
|
+
stdout.on('data', data => {
|
|
20
|
+
for (const line of data.toString().trim().split('\n')) {
|
|
21
|
+
log_1.default.log(`${chalk_1.default.gray('[expo-cli]')} ${line}`);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
stderr.on('data', data => {
|
|
25
|
+
for (const line of data.toString().trim().split('\n')) {
|
|
26
|
+
log_1.default.warn(`${chalk_1.default.gray('[expo-cli]')} ${line}`);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
28
30
|
await spawnPromise;
|
|
29
31
|
}
|
|
30
32
|
exports.expoCommandAsync = expoCommandAsync;
|