eas-cli 0.44.0 → 0.46.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 +1 -826
- package/build/build/android/graphql.js +1 -0
- package/build/build/android/prepareJob.js +3 -0
- package/build/build/ios/graphql.js +1 -0
- package/build/build/ios/prepareJob.js +3 -0
- package/build/build/local.js +1 -1
- package/build/build/runBuildAndSubmit.js +4 -0
- package/build/commands/analytics.js +1 -1
- package/build/commands/branch/create.js +1 -1
- package/build/commands/branch/delete.js +1 -1
- package/build/commands/branch/list.js +1 -1
- package/build/commands/branch/rename.js +1 -1
- package/build/commands/branch/view.js +1 -1
- package/build/commands/build/cancel.js +1 -1
- package/build/commands/build/configure.js +11 -3
- package/build/commands/build/index.js +1 -1
- package/build/commands/build/inspect.js +1 -1
- package/build/commands/channel/create.js +1 -1
- package/build/commands/channel/delete.js +2 -2
- package/build/commands/channel/edit.js +1 -1
- package/build/commands/channel/list.js +1 -1
- package/build/commands/channel/view.js +1 -1
- package/build/commands/config.js +9 -3
- package/build/commands/credentials.js +1 -1
- package/build/commands/device/delete.d.ts +17 -0
- package/build/commands/device/delete.js +181 -0
- package/build/commands/device/list.js +1 -1
- package/build/commands/diagnostics.js +1 -1
- package/build/commands/secret/create.js +1 -1
- package/build/commands/secret/delete.js +1 -3
- package/build/commands/secret/list.js +1 -1
- package/build/commands/submit.js +2 -3
- package/build/commands/update/configure.js +1 -1
- package/build/commands/update/delete.js +1 -1
- package/build/commands/update/index.js +1 -1
- package/build/commands/update/list.js +1 -1
- package/build/commands/update/view.js +1 -1
- package/build/commands/webhook/create.js +1 -1
- package/build/commands/webhook/delete.js +1 -1
- package/build/commands/webhook/list.js +1 -1
- package/build/commands/webhook/update.js +1 -1
- package/build/commands/webhook/view.js +1 -1
- package/build/credentials/ios/actions/DeviceUtils.d.ts +1 -0
- package/build/credentials/ios/actions/DeviceUtils.js +16 -1
- package/build/credentials/ios/api/graphql/mutations/AppleDeviceMutation.d.ts +1 -0
- package/build/credentials/ios/api/graphql/mutations/AppleDeviceMutation.js +16 -0
- package/build/graphql/generated.d.ts +5808 -3522
- package/build/graphql/generated.js +223 -223
- package/build/submit/ArchiveSource.js +4 -4
- package/oclif.manifest.json +1 -1
- package/package.json +51 -49
|
@@ -54,6 +54,9 @@ async function prepareJobAsync(ctx, jobData) {
|
|
|
54
54
|
buildConfiguration: ctx.buildProfile.buildConfiguration,
|
|
55
55
|
artifactPath: ctx.buildProfile.artifactPath,
|
|
56
56
|
username,
|
|
57
|
+
experimental: {
|
|
58
|
+
prebuildCommand: ctx.buildProfile.prebuildCommand,
|
|
59
|
+
},
|
|
57
60
|
};
|
|
58
61
|
return (0, eas_build_job_1.sanitizeJob)(job);
|
|
59
62
|
}
|
package/build/build/local.js
CHANGED
|
@@ -6,7 +6,7 @@ const spawn_async_1 = (0, tslib_1.__importDefault)(require("@expo/spawn-async"))
|
|
|
6
6
|
const semver_1 = (0, 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.62';
|
|
10
10
|
async function runLocalBuildAsync(job, options) {
|
|
11
11
|
var _a;
|
|
12
12
|
const { command, args } = await getCommandAndArgsAsync(job);
|
|
@@ -14,6 +14,7 @@ const metroConfig_1 = require("../project/metroConfig");
|
|
|
14
14
|
const context_1 = require("../submit/context");
|
|
15
15
|
const submit_1 = require("../submit/submit");
|
|
16
16
|
const urls_1 = require("../submit/utils/urls");
|
|
17
|
+
const json_1 = require("../utils/json");
|
|
17
18
|
const profiles_1 = require("../utils/profiles");
|
|
18
19
|
const vcs_1 = require("../vcs");
|
|
19
20
|
const build_1 = require("./android/build");
|
|
@@ -92,6 +93,9 @@ async function runBuildAndSubmitAsync(projectDir, flags) {
|
|
|
92
93
|
log_1.default.newLine();
|
|
93
94
|
}
|
|
94
95
|
if (!flags.wait) {
|
|
96
|
+
if (flags.json) {
|
|
97
|
+
(0, json_1.printJsonOnlyOutput)(startedBuilds.map(buildInfo => buildInfo.build));
|
|
98
|
+
}
|
|
95
99
|
return;
|
|
96
100
|
}
|
|
97
101
|
const builds = await (0, build_2.waitForBuildEndAsync)(startedBuilds.map(({ build }) => build.id));
|
|
@@ -22,5 +22,5 @@ class AnalyticsView extends EasCommand_1.default {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
exports.default = AnalyticsView;
|
|
25
|
-
AnalyticsView.description = '
|
|
25
|
+
AnalyticsView.description = 'display or change analytics settings';
|
|
26
26
|
AnalyticsView.args = [{ name: 'STATUS', options: ['on', 'off'] }];
|
|
@@ -70,7 +70,7 @@ class BranchCreate extends EasCommand_1.default {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
exports.default = BranchCreate;
|
|
73
|
-
BranchCreate.description = '
|
|
73
|
+
BranchCreate.description = 'create a branch';
|
|
74
74
|
BranchCreate.args = [
|
|
75
75
|
{
|
|
76
76
|
name: 'name',
|
|
@@ -99,7 +99,7 @@ class BranchDelete extends EasCommand_1.default {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
exports.default = BranchDelete;
|
|
102
|
-
BranchDelete.description = '
|
|
102
|
+
BranchDelete.description = 'delete a branch';
|
|
103
103
|
BranchDelete.args = [
|
|
104
104
|
{
|
|
105
105
|
name: 'name',
|
|
@@ -81,7 +81,7 @@ class BranchList extends EasCommand_1.default {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
exports.default = BranchList;
|
|
84
|
-
BranchList.description = '
|
|
84
|
+
BranchList.description = 'list all branches';
|
|
85
85
|
BranchList.flags = {
|
|
86
86
|
json: core_1.Flags.boolean({
|
|
87
87
|
description: 'return output as JSON',
|
|
@@ -80,7 +80,7 @@ class BranchRename extends EasCommand_1.default {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
exports.default = BranchRename;
|
|
83
|
-
BranchRename.description = '
|
|
83
|
+
BranchRename.description = 'rename a branch';
|
|
84
84
|
BranchRename.flags = {
|
|
85
85
|
from: core_1.Flags.string({
|
|
86
86
|
description: 'current name of the branch.',
|
|
@@ -2,6 +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 eas_build_job_1 = require("@expo/eas-build-job");
|
|
5
6
|
const core_1 = require("@oclif/core");
|
|
6
7
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
7
8
|
const UpdatesModule_1 = require("../../build/android/UpdatesModule");
|
|
@@ -13,6 +14,7 @@ const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/Ea
|
|
|
13
14
|
const log_1 = (0, tslib_1.__importStar)(require("../../log"));
|
|
14
15
|
const platform_1 = require("../../platform");
|
|
15
16
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
17
|
+
const workflow_1 = require("../../project/workflow");
|
|
16
18
|
const prompts_1 = require("../../prompts");
|
|
17
19
|
const vcs_1 = require("../../vcs");
|
|
18
20
|
class BuildConfigure extends EasCommand_1.default {
|
|
@@ -38,10 +40,16 @@ class BuildConfigure extends EasCommand_1.default {
|
|
|
38
40
|
if (expoUpdatesIsInstalled) {
|
|
39
41
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
40
42
|
if ([platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.All].includes(platform)) {
|
|
41
|
-
await (0,
|
|
43
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
44
|
+
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
45
|
+
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp);
|
|
46
|
+
}
|
|
42
47
|
}
|
|
43
48
|
if ([platform_1.RequestedPlatform.Ios, platform_1.RequestedPlatform.All].includes(platform)) {
|
|
44
|
-
await (0,
|
|
49
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
|
|
50
|
+
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
51
|
+
await (0, UpdatesModule_2.syncUpdatesConfigurationAsync)(projectDir, exp);
|
|
52
|
+
}
|
|
45
53
|
}
|
|
46
54
|
}
|
|
47
55
|
log_1.default.addNewLineIfNone();
|
|
@@ -55,7 +63,7 @@ class BuildConfigure extends EasCommand_1.default {
|
|
|
55
63
|
}
|
|
56
64
|
}
|
|
57
65
|
exports.default = BuildConfigure;
|
|
58
|
-
BuildConfigure.description = '
|
|
66
|
+
BuildConfigure.description = 'configure the project to support EAS Build';
|
|
59
67
|
BuildConfigure.flags = {
|
|
60
68
|
platform: core_1.Flags.enum({
|
|
61
69
|
description: 'Platform to configure',
|
|
@@ -101,7 +101,7 @@ class BuildInspect extends EasCommand_1.default {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
exports.default = BuildInspect;
|
|
104
|
-
BuildInspect.description = '
|
|
104
|
+
BuildInspect.description = 'inspect the state of the project at specific build stages, useful for troubleshooting';
|
|
105
105
|
BuildInspect.flags = {
|
|
106
106
|
platform: core_1.Flags.enum({
|
|
107
107
|
char: 'p',
|
|
@@ -108,7 +108,7 @@ class ChannelCreate extends EasCommand_1.default {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
exports.default = ChannelCreate;
|
|
111
|
-
ChannelCreate.description = '
|
|
111
|
+
ChannelCreate.description = 'create a channel';
|
|
112
112
|
ChannelCreate.args = [
|
|
113
113
|
{
|
|
114
114
|
name: 'name',
|
|
@@ -67,7 +67,7 @@ class ChannelDelete extends EasCommand_1.default {
|
|
|
67
67
|
}
|
|
68
68
|
exports.default = ChannelDelete;
|
|
69
69
|
ChannelDelete.hidden = true;
|
|
70
|
-
ChannelDelete.description = 'Delete a channel
|
|
70
|
+
ChannelDelete.description = 'Delete a channel';
|
|
71
71
|
ChannelDelete.args = [
|
|
72
72
|
{
|
|
73
73
|
name: 'name',
|
|
@@ -77,7 +77,7 @@ ChannelDelete.args = [
|
|
|
77
77
|
];
|
|
78
78
|
ChannelDelete.flags = {
|
|
79
79
|
json: core_1.Flags.boolean({
|
|
80
|
-
description:
|
|
80
|
+
description: 'print output as a JSON object',
|
|
81
81
|
default: false,
|
|
82
82
|
}),
|
|
83
83
|
'non-interactive': core_1.Flags.boolean({
|
|
@@ -117,7 +117,7 @@ class ChannelEdit extends EasCommand_1.default {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
exports.default = ChannelEdit;
|
|
120
|
-
ChannelEdit.description = '
|
|
120
|
+
ChannelEdit.description = 'point a channel at a new branch';
|
|
121
121
|
ChannelEdit.args = [
|
|
122
122
|
{
|
|
123
123
|
name: 'name',
|
|
@@ -84,7 +84,7 @@ class ChannelList extends EasCommand_1.default {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
exports.default = ChannelList;
|
|
87
|
-
ChannelList.description = '
|
|
87
|
+
ChannelList.description = 'list all channels';
|
|
88
88
|
ChannelList.flags = {
|
|
89
89
|
json: core_1.Flags.boolean({
|
|
90
90
|
description: 'print output as a JSON object with the channel ID, name and branch mapping.',
|
|
@@ -191,7 +191,7 @@ class ChannelView extends EasCommand_1.default {
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
exports.default = ChannelView;
|
|
194
|
-
ChannelView.description = '
|
|
194
|
+
ChannelView.description = 'view a channel';
|
|
195
195
|
ChannelView.args = [
|
|
196
196
|
{
|
|
197
197
|
name: 'name',
|
package/build/commands/config.js
CHANGED
|
@@ -5,8 +5,11 @@ const config_1 = require("@expo/config");
|
|
|
5
5
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
6
6
|
const eas_json_1 = require("@expo/eas-json");
|
|
7
7
|
const core_1 = require("@oclif/core");
|
|
8
|
+
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
8
9
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../commandUtils/EasCommand"));
|
|
10
|
+
const AppPlatform_1 = require("../graphql/types/AppPlatform");
|
|
9
11
|
const log_1 = (0, tslib_1.__importDefault)(require("../log"));
|
|
12
|
+
const platform_1 = require("../platform");
|
|
10
13
|
const expoConfig_1 = require("../project/expoConfig");
|
|
11
14
|
const projectUtils_1 = require("../project/projectUtils");
|
|
12
15
|
const prompts_1 = require("../prompts");
|
|
@@ -38,18 +41,21 @@ class Config extends EasCommand_1.default {
|
|
|
38
41
|
]));
|
|
39
42
|
const profile = await reader.getBuildProfileAsync(platform, profileName);
|
|
40
43
|
const config = (0, expoConfig_1.getExpoConfig)(projectDir, { env: profile.env, isPublicConfig: true });
|
|
41
|
-
log_1.default.
|
|
44
|
+
log_1.default.addNewLineIfNone();
|
|
45
|
+
log_1.default.log(chalk_1.default.bold((0, config_1.getProjectConfigDescription)(projectDir)));
|
|
42
46
|
log_1.default.newLine();
|
|
43
47
|
log_1.default.log(JSON.stringify(config, null, 2));
|
|
44
48
|
log_1.default.newLine();
|
|
45
49
|
log_1.default.newLine();
|
|
46
|
-
|
|
50
|
+
const appPlatform = (0, AppPlatform_1.toAppPlatform)(platform);
|
|
51
|
+
const platformEmoji = platform_1.appPlatformEmojis[appPlatform];
|
|
52
|
+
log_1.default.log(`${platformEmoji} ${chalk_1.default.bold(`Build profile "${profileName}"`)}`);
|
|
47
53
|
log_1.default.newLine();
|
|
48
54
|
log_1.default.log(JSON.stringify(profile, null, 2));
|
|
49
55
|
}
|
|
50
56
|
}
|
|
51
57
|
exports.default = Config;
|
|
52
|
-
Config.description = '
|
|
58
|
+
Config.description = 'display project configuration (app.json + eas.json)';
|
|
53
59
|
Config.flags = {
|
|
54
60
|
platform: core_1.Flags.enum({ char: 'p', options: ['android', 'ios'] }),
|
|
55
61
|
profile: core_1.Flags.string(),
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
import { AppleDeviceQueryResult, AppleDevicesByTeamIdentifierQueryResult } from '../../credentials/ios/api/graphql/queries/AppleDeviceQuery';
|
|
3
|
+
import { AppleDevice, Maybe } from '../../graphql/generated';
|
|
4
|
+
export default class DeviceDelete extends EasCommand {
|
|
5
|
+
static description: string;
|
|
6
|
+
static flags: {
|
|
7
|
+
'apple-team-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
|
+
udid: import("@oclif/core/lib/interfaces").OptionFlag<string[]>;
|
|
9
|
+
};
|
|
10
|
+
runAsync(): Promise<void>;
|
|
11
|
+
askAndDisableOnAppleAsync(chosenDevices: (AppleDevice | AppleDeviceQueryResult)[], appleTeamIdentifier: string): Promise<void>;
|
|
12
|
+
askAndRemoveFromExpoAsync(chosenDevices: (AppleDevice | AppleDeviceQueryResult)[]): Promise<boolean>;
|
|
13
|
+
logChosenDevices(chosenDevices: (AppleDevice | AppleDeviceQueryResult)[], appleTeamName: Maybe<string> | undefined, appleTeamIdentifier: string): void;
|
|
14
|
+
chooseDevicesToDeleteAsync(appleDevices: AppleDeviceQueryResult[], udids: string[]): Promise<(AppleDevice | AppleDeviceQueryResult)[]>;
|
|
15
|
+
getDevicesForTeamAsync(accountName: string, appleTeamIdentifier: string): Promise<AppleDevicesByTeamIdentifierQueryResult | undefined>;
|
|
16
|
+
askForAppleTeamAsync(accountName: string): Promise<string | undefined>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const apple_utils_1 = require("@expo/apple-utils");
|
|
5
|
+
const config_1 = require("@expo/config");
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
|
+
const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
|
|
8
|
+
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
9
|
+
const DeviceUtils_1 = require("../../credentials/ios/actions/DeviceUtils");
|
|
10
|
+
const AppleDeviceMutation_1 = require("../../credentials/ios/api/graphql/mutations/AppleDeviceMutation");
|
|
11
|
+
const AppleDeviceQuery_1 = require("../../credentials/ios/api/graphql/queries/AppleDeviceQuery");
|
|
12
|
+
const AppleTeamQuery_1 = require("../../credentials/ios/api/graphql/queries/AppleTeamQuery");
|
|
13
|
+
const authenticate_1 = require("../../credentials/ios/appstore/authenticate");
|
|
14
|
+
const formatDevice_1 = (0, tslib_1.__importDefault)(require("../../devices/utils/formatDevice"));
|
|
15
|
+
const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
|
|
16
|
+
const ora_1 = require("../../ora");
|
|
17
|
+
const projectUtils_1 = require("../../project/projectUtils");
|
|
18
|
+
const prompts_1 = require("../../prompts");
|
|
19
|
+
class DeviceDelete extends EasCommand_1.default {
|
|
20
|
+
async runAsync() {
|
|
21
|
+
let { flags: { 'apple-team-id': appleTeamIdentifier, udid: udids }, } = await this.parse(DeviceDelete);
|
|
22
|
+
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
23
|
+
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
24
|
+
const accountName = await (0, projectUtils_1.getProjectAccountNameAsync)(exp);
|
|
25
|
+
if (!appleTeamIdentifier) {
|
|
26
|
+
appleTeamIdentifier = await this.askForAppleTeamAsync(accountName);
|
|
27
|
+
}
|
|
28
|
+
(0, assert_1.default)(appleTeamIdentifier, 'No team identifier is specified');
|
|
29
|
+
const appleDevicesResult = await this.getDevicesForTeamAsync(accountName, appleTeamIdentifier);
|
|
30
|
+
if (!appleDevicesResult) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const { appleTeamName, appleDevices } = appleDevicesResult;
|
|
34
|
+
const chosenDevices = await this.chooseDevicesToDeleteAsync(appleDevices, udids);
|
|
35
|
+
if (chosenDevices.length === 0) {
|
|
36
|
+
log_1.default.newLine();
|
|
37
|
+
log_1.default.warn('No devices were chosen to be removed.');
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
this.logChosenDevices(chosenDevices, appleTeamName, appleTeamIdentifier);
|
|
41
|
+
const hasRemoved = await this.askAndRemoveFromExpoAsync(chosenDevices);
|
|
42
|
+
if (!hasRemoved) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
await this.askAndDisableOnAppleAsync(chosenDevices, appleTeamIdentifier);
|
|
46
|
+
}
|
|
47
|
+
async askAndDisableOnAppleAsync(chosenDevices, appleTeamIdentifier) {
|
|
48
|
+
log_1.default.newLine();
|
|
49
|
+
const deleteOnApple = await (0, prompts_1.toggleConfirmAsync)({
|
|
50
|
+
message: 'Do you want to disable these devices on your Apple account as well?',
|
|
51
|
+
});
|
|
52
|
+
if (!deleteOnApple) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const ctx = await (0, authenticate_1.authenticateAsync)({ teamId: appleTeamIdentifier });
|
|
56
|
+
const context = (0, authenticate_1.getRequestContext)(ctx);
|
|
57
|
+
log_1.default.addNewLineIfNone();
|
|
58
|
+
const removeAppleSpinner = (0, ora_1.ora)('Disabling devices on Apple').start();
|
|
59
|
+
try {
|
|
60
|
+
let realDevices = await apple_utils_1.Device.getAllIOSProfileDevicesAsync(context);
|
|
61
|
+
realDevices = realDevices.filter(d => chosenDevices.map(cd => cd.identifier).includes(d.attributes.udid));
|
|
62
|
+
for (const device of realDevices) {
|
|
63
|
+
await device.updateAsync({ status: apple_utils_1.DeviceStatus.DISABLED });
|
|
64
|
+
}
|
|
65
|
+
removeAppleSpinner.succeed('Disabled devices on Apple');
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
removeAppleSpinner.fail();
|
|
69
|
+
throw err;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
async askAndRemoveFromExpoAsync(chosenDevices) {
|
|
73
|
+
log_1.default.warn(`You are about to remove the Apple device${chosenDevices.length > 1 ? 's' : ''} listed above from your Expo account.`);
|
|
74
|
+
log_1.default.newLine();
|
|
75
|
+
const confirmed = await (0, prompts_1.toggleConfirmAsync)({
|
|
76
|
+
message: 'Are you sure you wish to proceed?',
|
|
77
|
+
});
|
|
78
|
+
if (confirmed) {
|
|
79
|
+
const removalSpinner = (0, ora_1.ora)(`Removing Apple devices on Expo`).start();
|
|
80
|
+
try {
|
|
81
|
+
for (const chosenDevice of chosenDevices) {
|
|
82
|
+
await AppleDeviceMutation_1.AppleDeviceMutation.deleteAppleDeviceAsync(chosenDevice.id);
|
|
83
|
+
}
|
|
84
|
+
removalSpinner.succeed('Removed Apple devices from Expo');
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
removalSpinner.fail();
|
|
88
|
+
throw err;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return confirmed;
|
|
92
|
+
}
|
|
93
|
+
logChosenDevices(chosenDevices, appleTeamName, appleTeamIdentifier) {
|
|
94
|
+
log_1.default.addNewLineIfNone();
|
|
95
|
+
chosenDevices.forEach(device => {
|
|
96
|
+
log_1.default.log((0, formatDevice_1.default)(device, {
|
|
97
|
+
appleTeamName,
|
|
98
|
+
appleTeamIdentifier: appleTeamIdentifier,
|
|
99
|
+
}));
|
|
100
|
+
log_1.default.newLine();
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
async chooseDevicesToDeleteAsync(appleDevices, udids) {
|
|
104
|
+
let chosenDevices = [];
|
|
105
|
+
log_1.default.newLine();
|
|
106
|
+
if (udids) {
|
|
107
|
+
udids.forEach(udid => {
|
|
108
|
+
const foundDevice = appleDevices.find(device => device.identifier === udid);
|
|
109
|
+
if (foundDevice) {
|
|
110
|
+
chosenDevices.push(foundDevice);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
log_1.default.warn(`No device found with UDID ${udid}.`);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
if (chosenDevices.length === 0) {
|
|
118
|
+
log_1.default.addNewLineIfNone();
|
|
119
|
+
chosenDevices = await (0, DeviceUtils_1.chooseDevicesToDeleteAsync)(appleDevices);
|
|
120
|
+
log_1.default.newLine();
|
|
121
|
+
}
|
|
122
|
+
return chosenDevices;
|
|
123
|
+
}
|
|
124
|
+
async getDevicesForTeamAsync(accountName, appleTeamIdentifier) {
|
|
125
|
+
const devicesSpinner = (0, ora_1.ora)().start('Fetching the list of devices for the team…');
|
|
126
|
+
try {
|
|
127
|
+
const result = await AppleDeviceQuery_1.AppleDeviceQuery.getAllForAppleTeamAsync(accountName, appleTeamIdentifier);
|
|
128
|
+
if (result === null || result === void 0 ? void 0 : result.appleDevices.length) {
|
|
129
|
+
const { appleTeamName, appleDevices } = result;
|
|
130
|
+
devicesSpinner.succeed(`Found ${appleDevices.length} devices for team ${appleTeamName !== null && appleTeamName !== void 0 ? appleTeamName : appleTeamIdentifier}`);
|
|
131
|
+
return result;
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
devicesSpinner.fail(`Couldn't find any devices for the team ${appleTeamIdentifier}`);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
catch (e) {
|
|
139
|
+
devicesSpinner.fail(`Something went wrong and we couldn't fetch the device list`);
|
|
140
|
+
throw e;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
async askForAppleTeamAsync(accountName) {
|
|
144
|
+
const teamSpinner = (0, ora_1.ora)().start('Fetching the list of teams for the project…');
|
|
145
|
+
try {
|
|
146
|
+
const teams = await AppleTeamQuery_1.AppleTeamQuery.getAllForAccountAsync(accountName);
|
|
147
|
+
if (teams.length > 0) {
|
|
148
|
+
teamSpinner.succeed('Fetched the list of teams for the project');
|
|
149
|
+
if (teams.length === 1) {
|
|
150
|
+
return teams[0].appleTeamIdentifier;
|
|
151
|
+
}
|
|
152
|
+
const result = await (0, prompts_1.promptAsync)({
|
|
153
|
+
type: 'select',
|
|
154
|
+
name: 'appleTeamIdentifier',
|
|
155
|
+
message: 'What Apple Team would you like to list devices for?',
|
|
156
|
+
choices: teams.map(team => ({
|
|
157
|
+
title: team.appleTeamName
|
|
158
|
+
? `${team.appleTeamName} (ID: ${team.appleTeamIdentifier})`
|
|
159
|
+
: team.appleTeamIdentifier,
|
|
160
|
+
value: team.appleTeamIdentifier,
|
|
161
|
+
})),
|
|
162
|
+
});
|
|
163
|
+
return result.appleTeamIdentifier;
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
teamSpinner.fail(`Couldn't find any teams for the account ${accountName}`);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
catch (e) {
|
|
171
|
+
teamSpinner.fail(`Something went wrong and we couldn't fetch the list of teams`);
|
|
172
|
+
throw e;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
exports.default = DeviceDelete;
|
|
177
|
+
DeviceDelete.description = 'remove a registered device from your account';
|
|
178
|
+
DeviceDelete.flags = {
|
|
179
|
+
'apple-team-id': core_1.Flags.string(),
|
|
180
|
+
udid: core_1.Flags.string({ multiple: true }),
|
|
181
|
+
};
|
|
@@ -24,7 +24,7 @@ class BuildList extends EasCommand_1.default {
|
|
|
24
24
|
spinner = (0, ora_1.ora)().start('Fetching the list of teams for the project…');
|
|
25
25
|
try {
|
|
26
26
|
const teams = await AppleTeamQuery_1.AppleTeamQuery.getAllForAccountAsync(accountName);
|
|
27
|
-
if (teams.length) {
|
|
27
|
+
if (teams.length > 0) {
|
|
28
28
|
spinner.succeed();
|
|
29
29
|
if (teams.length === 1) {
|
|
30
30
|
appleTeamIdentifier = teams[0].appleTeamIdentifier;
|
|
@@ -106,7 +106,7 @@ class EnvironmentSecretCreate extends EasCommand_1.default {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
exports.default = EnvironmentSecretCreate;
|
|
109
|
-
EnvironmentSecretCreate.description = '
|
|
109
|
+
EnvironmentSecretCreate.description = 'create an environment secret on the current project or owner account';
|
|
110
110
|
EnvironmentSecretCreate.flags = {
|
|
111
111
|
scope: core_1.Flags.enum({
|
|
112
112
|
description: 'Scope for the secret',
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const config_1 = require("@expo/config");
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
|
-
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
7
6
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
8
7
|
const EnvironmentSecretMutation_1 = require("../../graphql/mutations/EnvironmentSecretMutation");
|
|
9
8
|
const EnvironmentSecretsQuery_1 = require("../../graphql/queries/EnvironmentSecretsQuery");
|
|
@@ -52,8 +51,7 @@ class EnvironmentSecretDelete extends EasCommand_1.default {
|
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
exports.default = EnvironmentSecretDelete;
|
|
55
|
-
EnvironmentSecretDelete.description =
|
|
56
|
-
Unsure where to find the secret's ID? Run ${chalk_1.default.bold('eas secret:list')}`;
|
|
54
|
+
EnvironmentSecretDelete.description = 'delete an environment secret by ID';
|
|
57
55
|
EnvironmentSecretDelete.flags = {
|
|
58
56
|
id: core_1.Flags.string({
|
|
59
57
|
description: 'ID of the secret to delete',
|
|
@@ -32,4 +32,4 @@ class EnvironmentSecretList extends EasCommand_1.default {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
exports.default = EnvironmentSecretList;
|
|
35
|
-
EnvironmentSecretList.description = '
|
|
35
|
+
EnvironmentSecretList.description = 'list environment secrets available for your current app';
|
package/build/commands/submit.js
CHANGED
|
@@ -6,7 +6,7 @@ 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 AppPlatform_1 = require("../graphql/types/AppPlatform");
|
|
9
|
-
const log_1 = (0, tslib_1.
|
|
9
|
+
const log_1 = (0, tslib_1.__importDefault)(require("../log"));
|
|
10
10
|
const platform_1 = require("../platform");
|
|
11
11
|
const projectUtils_1 = require("../project/projectUtils");
|
|
12
12
|
const context_1 = require("../submit/context");
|
|
@@ -73,8 +73,7 @@ class Submit extends EasCommand_1.default {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
exports.default = Submit;
|
|
76
|
-
Submit.description =
|
|
77
|
-
See how to configure submits with eas.json: ${(0, log_1.link)('https://docs.expo.dev/submit/eas-json/')}`;
|
|
76
|
+
Submit.description = 'submit app binary to app store';
|
|
78
77
|
Submit.aliases = ['build:submit'];
|
|
79
78
|
Submit.flags = {
|
|
80
79
|
platform: core_1.Flags.enum({
|
|
@@ -51,7 +51,7 @@ class UpdateDelete extends EasCommand_1.default {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
exports.default = UpdateDelete;
|
|
54
|
-
UpdateDelete.description = '
|
|
54
|
+
UpdateDelete.description = 'delete all the updates in an update group';
|
|
55
55
|
UpdateDelete.args = [
|
|
56
56
|
{
|
|
57
57
|
name: 'groupId',
|
|
@@ -311,7 +311,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
exports.default = UpdatePublish;
|
|
314
|
-
UpdatePublish.description = '
|
|
314
|
+
UpdatePublish.description = 'publish an update group';
|
|
315
315
|
UpdatePublish.flags = {
|
|
316
316
|
branch: core_1.Flags.string({
|
|
317
317
|
description: 'Branch to publish the update group on',
|
|
@@ -66,7 +66,7 @@ class BranchView extends EasCommand_1.default {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
exports.default = BranchView;
|
|
69
|
-
BranchView.description = '
|
|
69
|
+
BranchView.description = 'view the recent updates for a branch';
|
|
70
70
|
BranchView.flags = {
|
|
71
71
|
branch: core_1.Flags.string({
|
|
72
72
|
description: 'List all updates on this branch',
|
|
@@ -28,7 +28,7 @@ class WebhookCreate extends EasCommand_1.default {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.default = WebhookCreate;
|
|
31
|
-
WebhookCreate.description = '
|
|
31
|
+
WebhookCreate.description = 'create a webhook';
|
|
32
32
|
WebhookCreate.flags = {
|
|
33
33
|
event: core_1.Flags.enum({
|
|
34
34
|
description: 'Event type that triggers the webhook',
|