eas-cli 0.41.1 → 0.44.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 +313 -157
- package/bin/dev +17 -0
- package/bin/dev.cmd +3 -0
- package/bin/run +3 -3
- package/build/build/android/UpdatesModule.d.ts +0 -1
- package/build/build/android/UpdatesModule.js +4 -37
- package/build/build/android/build.js +3 -3
- package/build/build/android/{configure.d.ts → syncProjectConfiguration.d.ts} +2 -3
- package/build/build/android/{configure.js → syncProjectConfiguration.js} +22 -23
- package/build/build/build.d.ts +1 -1
- package/build/build/build.js +6 -8
- package/build/build/configure.d.ts +12 -7
- package/build/build/configure.js +25 -99
- package/build/build/context.d.ts +0 -12
- package/build/build/createContext.d.ts +1 -2
- package/build/build/createContext.js +1 -2
- package/build/build/ios/UpdatesModule.d.ts +0 -1
- package/build/build/ios/UpdatesModule.js +8 -39
- package/build/build/ios/build.js +3 -3
- package/build/build/ios/{configure.d.ts → syncProjectConfiguration.d.ts} +1 -3
- package/build/build/ios/{configure.js → syncProjectConfiguration.js} +3 -18
- package/build/build/local.d.ts +1 -0
- package/build/build/local.js +2 -1
- package/build/build/runBuildAndSubmit.d.ts +0 -1
- package/build/build/runBuildAndSubmit.js +4 -2
- 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 +11 -6
- package/build/commands/branch/delete.d.ts +1 -1
- package/build/commands/branch/delete.js +11 -5
- package/build/commands/branch/list.d.ts +1 -1
- package/build/commands/branch/list.js +8 -4
- package/build/commands/branch/rename.d.ts +3 -4
- package/build/commands/branch/rename.js +13 -8
- package/build/commands/branch/view.d.ts +1 -3
- package/build/commands/branch/view.js +35 -74
- package/build/commands/build/cancel.js +1 -1
- package/build/commands/build/configure.d.ts +1 -2
- package/build/commands/build/configure.js +38 -28
- package/build/commands/build/index.d.ts +12 -12
- package/build/commands/build/index.js +32 -21
- package/build/commands/build/inspect.d.ts +7 -7
- package/build/commands/build/inspect.js +31 -25
- 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 +24 -19
- package/build/commands/channel/delete.d.ts +15 -0
- package/build/commands/channel/delete.js +124 -0
- package/build/commands/channel/edit.d.ts +2 -3
- package/build/commands/channel/edit.js +14 -9
- package/build/commands/channel/list.d.ts +1 -1
- package/build/commands/channel/list.js +17 -12
- package/build/commands/channel/rollout.d.ts +4 -5
- package/build/commands/channel/rollout.js +14 -10
- package/build/commands/channel/view.d.ts +1 -1
- package/build/commands/channel/view.js +19 -14
- 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/configure.js +1 -1
- package/build/commands/update/delete.d.ts +1 -1
- package/build/commands/update/delete.js +12 -7
- package/build/commands/update/index.d.ts +9 -10
- package/build/commands/update/index.js +29 -17
- package/build/commands/update/list.d.ts +10 -0
- package/build/commands/update/list.js +114 -0
- package/build/commands/update/view.d.ts +1 -1
- package/build/commands/update/view.js +25 -20
- 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/credentials/ios/appstore/bundleIdCapabilities.js +0 -2
- package/build/credentials/ios/appstore/ensureAppExists.js +3 -1
- package/build/graphql/generated.d.ts +92 -30
- package/build/graphql/queries/UpdateQuery.d.ts +7 -0
- package/build/graphql/queries/UpdateQuery.js +85 -0
- 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/build/vcs/local.js +5 -1
- package/oclif.manifest.json +1 -1
- package/package.json +21 -14
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
export default class ChannelDelete extends EasCommand {
|
|
3
|
+
static hidden: boolean;
|
|
4
|
+
static description: string;
|
|
5
|
+
static args: {
|
|
6
|
+
name: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
description: string;
|
|
9
|
+
}[];
|
|
10
|
+
static flags: {
|
|
11
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
};
|
|
14
|
+
runAsync(): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const config_1 = require("@expo/config");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
|
|
7
|
+
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
8
|
+
const client_1 = require("../../graphql/client");
|
|
9
|
+
const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
|
|
10
|
+
const projectUtils_1 = require("../../project/projectUtils");
|
|
11
|
+
const prompts_1 = require("../../prompts");
|
|
12
|
+
const json_1 = require("../../utils/json");
|
|
13
|
+
class ChannelDelete extends EasCommand_1.default {
|
|
14
|
+
async runAsync() {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
const { args: { name: nameArg }, flags: { json: jsonFlag, 'non-interactive': nonInteractiveFlag }, } = await this.parse(ChannelDelete);
|
|
17
|
+
if (jsonFlag && !nonInteractiveFlag) {
|
|
18
|
+
throw new Error('--json is allowed only in non-interactive mode');
|
|
19
|
+
}
|
|
20
|
+
if (jsonFlag) {
|
|
21
|
+
(0, json_1.enableJsonOutput)();
|
|
22
|
+
}
|
|
23
|
+
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
24
|
+
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
25
|
+
const fullName = await (0, projectUtils_1.getProjectFullNameAsync)(exp);
|
|
26
|
+
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
27
|
+
let name;
|
|
28
|
+
if (nameArg) {
|
|
29
|
+
name = nameArg;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
if (nonInteractiveFlag) {
|
|
33
|
+
throw new Error('Channel name must be set when running in non-interactive mode');
|
|
34
|
+
}
|
|
35
|
+
name = (await (0, prompts_1.promptAsync)({
|
|
36
|
+
type: 'text',
|
|
37
|
+
name: 'name',
|
|
38
|
+
message: 'Please enter the name of the channel to delete:',
|
|
39
|
+
validate: (value) => (value ? true : 'Channel name may not be empty.'),
|
|
40
|
+
})).name;
|
|
41
|
+
}
|
|
42
|
+
const data = await getChannelInfoAsync({ appId: projectId, name });
|
|
43
|
+
const channelId = (_b = (_a = data.app) === null || _a === void 0 ? void 0 : _a.byId.updateChannelByName) === null || _b === void 0 ? void 0 : _b.id;
|
|
44
|
+
if (!channelId) {
|
|
45
|
+
throw new Error(`Could not find channel ${name} on ${fullName}`);
|
|
46
|
+
}
|
|
47
|
+
if (!nonInteractiveFlag) {
|
|
48
|
+
log_1.default.addNewLineIfNone();
|
|
49
|
+
log_1.default.warn(`You are about to permamently delete channel: "${name}".\nThis action is irreversible.`);
|
|
50
|
+
log_1.default.newLine();
|
|
51
|
+
const confirmed = await (0, prompts_1.toggleConfirmAsync)({ message: 'Are you sure you wish to proceed?' });
|
|
52
|
+
if (!confirmed) {
|
|
53
|
+
log_1.default.error(`Canceled deletion of channel: "${name}".`);
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const deletionResult = await deleteChannelOnAppAsync({
|
|
58
|
+
channelId,
|
|
59
|
+
});
|
|
60
|
+
if (jsonFlag) {
|
|
61
|
+
(0, json_1.printJsonOnlyOutput)(deletionResult);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
log_1.default.withTick(`️Deleted channel "${name}".`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.default = ChannelDelete;
|
|
69
|
+
ChannelDelete.hidden = true;
|
|
70
|
+
ChannelDelete.description = 'Delete a channel on the current project';
|
|
71
|
+
ChannelDelete.args = [
|
|
72
|
+
{
|
|
73
|
+
name: 'name',
|
|
74
|
+
required: false,
|
|
75
|
+
description: 'Name of the channel to delete',
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
ChannelDelete.flags = {
|
|
79
|
+
json: core_1.Flags.boolean({
|
|
80
|
+
description: `Delete a channel on the current project`,
|
|
81
|
+
default: false,
|
|
82
|
+
}),
|
|
83
|
+
'non-interactive': core_1.Flags.boolean({
|
|
84
|
+
default: false,
|
|
85
|
+
description: 'Run command in non-interactive mode',
|
|
86
|
+
}),
|
|
87
|
+
};
|
|
88
|
+
async function getChannelInfoAsync({ appId, name, }) {
|
|
89
|
+
const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
90
|
+
.query((0, graphql_tag_1.default) `
|
|
91
|
+
query GetChannelInfo($appId: String!, $name: String!) {
|
|
92
|
+
app {
|
|
93
|
+
byId(appId: $appId) {
|
|
94
|
+
id
|
|
95
|
+
updateChannelByName(name: $name) {
|
|
96
|
+
id
|
|
97
|
+
name
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
`, {
|
|
103
|
+
appId,
|
|
104
|
+
name,
|
|
105
|
+
}, { additionalTypenames: ['UpdateChannel'] })
|
|
106
|
+
.toPromise());
|
|
107
|
+
return data;
|
|
108
|
+
}
|
|
109
|
+
async function deleteChannelOnAppAsync({ channelId, }) {
|
|
110
|
+
const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
111
|
+
.mutation((0, graphql_tag_1.default) `
|
|
112
|
+
mutation DeleteUpdateChannel($channelId: ID!) {
|
|
113
|
+
updateChannel {
|
|
114
|
+
deleteUpdateChannel(channelId: $channelId) {
|
|
115
|
+
id
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
`, {
|
|
120
|
+
channelId,
|
|
121
|
+
})
|
|
122
|
+
.toPromise());
|
|
123
|
+
return data.updateChannel.deleteUpdateChannel;
|
|
124
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
2
|
import { UpdateChannelBranchMappingMutationVariables } from '../../graphql/generated';
|
|
4
3
|
export declare function updateChannelBranchMappingAsync({ channelId, branchMapping, }: UpdateChannelBranchMappingMutationVariables): Promise<{
|
|
@@ -14,8 +13,8 @@ export default class ChannelEdit extends EasCommand {
|
|
|
14
13
|
description: string;
|
|
15
14
|
}[];
|
|
16
15
|
static flags: {
|
|
17
|
-
branch:
|
|
18
|
-
json: import("@oclif/
|
|
16
|
+
branch: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
17
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
18
|
};
|
|
20
19
|
runAsync(): Promise<void>;
|
|
21
20
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.updateChannelBranchMappingAsync = 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 graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
|
|
9
9
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
@@ -11,6 +11,7 @@ const client_1 = require("../../graphql/client");
|
|
|
11
11
|
const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
|
|
12
12
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
13
13
|
const prompts_1 = require("../../prompts");
|
|
14
|
+
const json_1 = require("../../utils/json");
|
|
14
15
|
async function getChannelByNameForAppAsync({ appId, channelName, }) {
|
|
15
16
|
var _a;
|
|
16
17
|
const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
@@ -61,7 +62,10 @@ async function updateChannelBranchMappingAsync({ channelId, branchMapping, }) {
|
|
|
61
62
|
exports.updateChannelBranchMappingAsync = updateChannelBranchMappingAsync;
|
|
62
63
|
class ChannelEdit extends EasCommand_1.default {
|
|
63
64
|
async runAsync() {
|
|
64
|
-
let { args: { name: channelName }, flags: { branch: branchName, json: jsonFlag }, } = this.parse(ChannelEdit);
|
|
65
|
+
let { args: { name: channelName }, flags: { branch: branchName, json: jsonFlag }, } = await this.parse(ChannelEdit);
|
|
66
|
+
if (jsonFlag) {
|
|
67
|
+
(0, json_1.enableJsonOutput)();
|
|
68
|
+
}
|
|
65
69
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
66
70
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
67
71
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
@@ -103,12 +107,13 @@ class ChannelEdit extends EasCommand_1.default {
|
|
|
103
107
|
}),
|
|
104
108
|
});
|
|
105
109
|
if (jsonFlag) {
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
(0, json_1.printJsonOnlyOutput)(channel);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
log_1.default.withTick((0, chalk_1.default) `Channel {bold ${channel.name}} is now set to branch {bold ${branch.name}}.\n`);
|
|
114
|
+
log_1.default.addNewLineIfNone();
|
|
115
|
+
log_1.default.log((0, chalk_1.default) `Users with builds on channel {bold ${channel.name}} will now receive the active update on {bold ${branch.name}}.`);
|
|
108
116
|
}
|
|
109
|
-
log_1.default.withTick((0, chalk_1.default) `Channel {bold ${channel.name}} is now set to branch {bold ${branch.name}}.\n`);
|
|
110
|
-
log_1.default.addNewLineIfNone();
|
|
111
|
-
log_1.default.log((0, chalk_1.default) `Users with builds on channel {bold ${channel.name}} will now receive the active update on {bold ${branch.name}}.`);
|
|
112
117
|
}
|
|
113
118
|
}
|
|
114
119
|
exports.default = ChannelEdit;
|
|
@@ -121,10 +126,10 @@ ChannelEdit.args = [
|
|
|
121
126
|
},
|
|
122
127
|
];
|
|
123
128
|
ChannelEdit.flags = {
|
|
124
|
-
branch:
|
|
129
|
+
branch: core_1.Flags.string({
|
|
125
130
|
description: 'Name of the branch to point to',
|
|
126
131
|
}),
|
|
127
|
-
json:
|
|
132
|
+
json: core_1.Flags.boolean({
|
|
128
133
|
description: 'print output as a JSON object with the channel ID, name and branch mapping.',
|
|
129
134
|
default: false,
|
|
130
135
|
}),
|
|
@@ -2,7 +2,7 @@ import EasCommand from '../../commandUtils/EasCommand';
|
|
|
2
2
|
export default class ChannelList extends EasCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
|
-
json: import("@oclif/
|
|
5
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
6
6
|
};
|
|
7
7
|
runAsync(): Promise<void>;
|
|
8
8
|
}
|
|
@@ -2,13 +2,14 @@
|
|
|
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 graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
|
|
7
7
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
8
8
|
const client_1 = require("../../graphql/client");
|
|
9
9
|
const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
|
|
10
10
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
11
11
|
const formatFields_1 = (0, tslib_1.__importDefault)(require("../../utils/formatFields"));
|
|
12
|
+
const json_1 = require("../../utils/json");
|
|
12
13
|
const view_1 = require("./view");
|
|
13
14
|
const CHANNEL_LIMIT = 10000;
|
|
14
15
|
async function getAllUpdateChannelForAppAsync({ appId, }) {
|
|
@@ -53,7 +54,10 @@ async function getAllUpdateChannelForAppAsync({ appId, }) {
|
|
|
53
54
|
class ChannelList extends EasCommand_1.default {
|
|
54
55
|
async runAsync() {
|
|
55
56
|
var _a;
|
|
56
|
-
const { flags: { json: jsonFlag }, } = this.parse(ChannelList);
|
|
57
|
+
const { flags: { json: jsonFlag }, } = await this.parse(ChannelList);
|
|
58
|
+
if (jsonFlag) {
|
|
59
|
+
(0, json_1.enableJsonOutput)();
|
|
60
|
+
}
|
|
57
61
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
58
62
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
59
63
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
@@ -65,23 +69,24 @@ class ChannelList extends EasCommand_1.default {
|
|
|
65
69
|
throw new Error(`Could not find channels on project with id ${projectId}`);
|
|
66
70
|
}
|
|
67
71
|
if (jsonFlag) {
|
|
68
|
-
|
|
69
|
-
return;
|
|
72
|
+
(0, json_1.printJsonOnlyOutput)(channels);
|
|
70
73
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
else {
|
|
75
|
+
for (const channel of channels) {
|
|
76
|
+
log_1.default.addNewLineIfNone();
|
|
77
|
+
log_1.default.log((0, formatFields_1.default)([
|
|
78
|
+
{ label: 'Name', value: channel.name },
|
|
79
|
+
{ label: 'ID', value: channel.id },
|
|
80
|
+
]));
|
|
81
|
+
(0, view_1.logChannelDetails)(channel);
|
|
82
|
+
}
|
|
78
83
|
}
|
|
79
84
|
}
|
|
80
85
|
}
|
|
81
86
|
exports.default = ChannelList;
|
|
82
87
|
ChannelList.description = 'List all channels on the current project.';
|
|
83
88
|
ChannelList.flags = {
|
|
84
|
-
json:
|
|
89
|
+
json: core_1.Flags.boolean({
|
|
85
90
|
description: 'print output as a JSON object with the channel ID, name and branch mapping.',
|
|
86
91
|
default: false,
|
|
87
92
|
}),
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
2
|
export default class ChannelRollout extends EasCommand {
|
|
4
3
|
static hidden: boolean;
|
|
@@ -9,10 +8,10 @@ export default class ChannelRollout extends EasCommand {
|
|
|
9
8
|
description: string;
|
|
10
9
|
}[];
|
|
11
10
|
static flags: {
|
|
12
|
-
branch:
|
|
13
|
-
percent: import("@oclif/
|
|
14
|
-
end: import("@oclif/
|
|
15
|
-
json: import("@oclif/
|
|
11
|
+
branch: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
|
+
percent: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
13
|
+
end: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
15
|
};
|
|
17
16
|
runAsync(): Promise<void>;
|
|
18
17
|
}
|
|
@@ -2,12 +2,13 @@
|
|
|
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 log_1 = (0, tslib_1.__importDefault)(require("../../log"));
|
|
9
9
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
10
10
|
const prompts_1 = require("../../prompts");
|
|
11
|
+
const json_1 = require("../../utils/json");
|
|
11
12
|
const edit_1 = require("./edit");
|
|
12
13
|
const view_1 = require("./view");
|
|
13
14
|
async function promptForRolloutPercentAsync({ promptMessage, }) {
|
|
@@ -165,8 +166,10 @@ async function endRolloutAsync({ channelName, branchName, jsonFlag, projectId, g
|
|
|
165
166
|
class ChannelRollout extends EasCommand_1.default {
|
|
166
167
|
async runAsync() {
|
|
167
168
|
var _a, _b;
|
|
168
|
-
const { args: { channel: channelName }, flags: { json: jsonFlag, end: endFlag }, } = this.parse(ChannelRollout);
|
|
169
|
-
|
|
169
|
+
const { args: { channel: channelName }, flags: { json: jsonFlag, end: endFlag, branch: branchName, percent }, } = await this.parse(ChannelRollout);
|
|
170
|
+
if (jsonFlag) {
|
|
171
|
+
(0, json_1.enableJsonOutput)();
|
|
172
|
+
}
|
|
170
173
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
171
174
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
172
175
|
const fullName = await (0, projectUtils_1.getProjectFullNameAsync)(exp);
|
|
@@ -229,10 +232,11 @@ class ChannelRollout extends EasCommand_1.default {
|
|
|
229
232
|
}
|
|
230
233
|
const { newChannelInfo, logMessage } = rolloutMutationResult;
|
|
231
234
|
if (jsonFlag) {
|
|
232
|
-
|
|
233
|
-
|
|
235
|
+
(0, json_1.printJsonOnlyOutput)(newChannelInfo);
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
log_1.default.withTick(logMessage);
|
|
234
239
|
}
|
|
235
|
-
log_1.default.withTick(logMessage);
|
|
236
240
|
}
|
|
237
241
|
}
|
|
238
242
|
exports.default = ChannelRollout;
|
|
@@ -246,19 +250,19 @@ ChannelRollout.args = [
|
|
|
246
250
|
},
|
|
247
251
|
];
|
|
248
252
|
ChannelRollout.flags = {
|
|
249
|
-
branch:
|
|
253
|
+
branch: core_1.Flags.string({
|
|
250
254
|
description: 'branch to rollout',
|
|
251
255
|
required: false,
|
|
252
256
|
}),
|
|
253
|
-
percent:
|
|
257
|
+
percent: core_1.Flags.integer({
|
|
254
258
|
description: 'percent of traffic to redirect to the new branch',
|
|
255
259
|
required: false,
|
|
256
260
|
}),
|
|
257
|
-
end:
|
|
261
|
+
end: core_1.Flags.boolean({
|
|
258
262
|
description: 'end the rollout',
|
|
259
263
|
default: false,
|
|
260
264
|
}),
|
|
261
|
-
json:
|
|
265
|
+
json: core_1.Flags.boolean({
|
|
262
266
|
description: 'print output as a JSON object with the new channel ID, name and branch mapping',
|
|
263
267
|
default: false,
|
|
264
268
|
}),
|
|
@@ -42,7 +42,7 @@ export default class ChannelView extends EasCommand {
|
|
|
42
42
|
description: string;
|
|
43
43
|
}[];
|
|
44
44
|
static flags: {
|
|
45
|
-
json: import("@oclif/
|
|
45
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
46
46
|
};
|
|
47
47
|
runAsync(): Promise<void>;
|
|
48
48
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.logChannelDetails = exports.getUpdateChannelByNameForAppAsync = exports.getBranchMapping = 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 assert_1 = (0, tslib_1.__importDefault)(require("assert"));
|
|
8
8
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
9
9
|
const cli_table3_1 = (0, tslib_1.__importDefault)(require("cli-table3"));
|
|
@@ -15,6 +15,7 @@ const projectUtils_1 = require("../../project/projectUtils");
|
|
|
15
15
|
const prompts_1 = require("../../prompts");
|
|
16
16
|
const utils_1 = require("../../update/utils");
|
|
17
17
|
const formatFields_1 = (0, tslib_1.__importDefault)(require("../../utils/formatFields"));
|
|
18
|
+
const json_1 = require("../../utils/json");
|
|
18
19
|
/**
|
|
19
20
|
* Get the branch mapping and determine whether it is a rollout.
|
|
20
21
|
* Ensure that the branch mapping is properly formatted.
|
|
@@ -146,7 +147,10 @@ exports.logChannelDetails = logChannelDetails;
|
|
|
146
147
|
class ChannelView extends EasCommand_1.default {
|
|
147
148
|
async runAsync() {
|
|
148
149
|
var _a;
|
|
149
|
-
let { args: { name: channelName }, flags: { json: jsonFlag }, } = this.parse(ChannelView);
|
|
150
|
+
let { args: { name: channelName }, flags: { json: jsonFlag }, } = await this.parse(ChannelView);
|
|
151
|
+
if (jsonFlag) {
|
|
152
|
+
(0, json_1.enableJsonOutput)();
|
|
153
|
+
}
|
|
150
154
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
151
155
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
152
156
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
@@ -171,18 +175,19 @@ class ChannelView extends EasCommand_1.default {
|
|
|
171
175
|
throw new Error(`Could not find a channel with name: ${channelName}`);
|
|
172
176
|
}
|
|
173
177
|
if (jsonFlag) {
|
|
174
|
-
|
|
175
|
-
|
|
178
|
+
(0, json_1.printJsonOnlyOutput)(channel);
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
log_1.default.addNewLineIfNone();
|
|
182
|
+
log_1.default.log(chalk_1.default.bold('Channel:'));
|
|
183
|
+
log_1.default.log((0, formatFields_1.default)([
|
|
184
|
+
{ label: 'Name', value: channel.name },
|
|
185
|
+
{ label: 'ID', value: channel.id },
|
|
186
|
+
]));
|
|
187
|
+
log_1.default.addNewLineIfNone();
|
|
188
|
+
log_1.default.log((0, chalk_1.default) `{bold Branches pointed at this channel and their most recent update group:}`);
|
|
189
|
+
logChannelDetails(channel);
|
|
176
190
|
}
|
|
177
|
-
log_1.default.addNewLineIfNone();
|
|
178
|
-
log_1.default.log(chalk_1.default.bold('Channel:'));
|
|
179
|
-
log_1.default.log((0, formatFields_1.default)([
|
|
180
|
-
{ label: 'Name', value: channel.name },
|
|
181
|
-
{ label: 'ID', value: channel.id },
|
|
182
|
-
]));
|
|
183
|
-
log_1.default.addNewLineIfNone();
|
|
184
|
-
log_1.default.log((0, chalk_1.default) `{bold Branches pointed at this channel and their most recent update group:}`);
|
|
185
|
-
logChannelDetails(channel);
|
|
186
191
|
}
|
|
187
192
|
}
|
|
188
193
|
exports.default = ChannelView;
|
|
@@ -195,7 +200,7 @@ ChannelView.args = [
|
|
|
195
200
|
},
|
|
196
201
|
];
|
|
197
202
|
ChannelView.flags = {
|
|
198
|
-
json:
|
|
203
|
+
json: core_1.Flags.boolean({
|
|
199
204
|
description: 'print output as a JSON object with the channel ID, name and branch mapping.',
|
|
200
205
|
default: false,
|
|
201
206
|
}),
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import EasCommand from '../commandUtils/EasCommand';
|
|
3
2
|
export default class Config extends EasCommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
|
-
platform:
|
|
7
|
-
profile:
|
|
5
|
+
platform: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
|
+
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
7
|
};
|
|
9
8
|
protected requiresAuthentication: boolean;
|
|
10
9
|
runAsync(): Promise<void>;
|
package/build/commands/config.js
CHANGED
|
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
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
|
-
const
|
|
7
|
+
const core_1 = require("@oclif/core");
|
|
8
8
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../commandUtils/EasCommand"));
|
|
9
9
|
const log_1 = (0, tslib_1.__importDefault)(require("../log"));
|
|
10
10
|
const expoConfig_1 = require("../project/expoConfig");
|
|
@@ -17,7 +17,7 @@ class Config extends EasCommand_1.default {
|
|
|
17
17
|
this.requiresAuthentication = false;
|
|
18
18
|
}
|
|
19
19
|
async runAsync() {
|
|
20
|
-
const { flags } = this.parse(Config);
|
|
20
|
+
const { flags } = await this.parse(Config);
|
|
21
21
|
const { platform: maybePlatform, profile: maybeProfile } = flags;
|
|
22
22
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
23
23
|
await (0, build_1.handleDeprecatedEasJsonAsync)(projectDir, false);
|
|
@@ -51,6 +51,6 @@ class Config extends EasCommand_1.default {
|
|
|
51
51
|
exports.default = Config;
|
|
52
52
|
Config.description = 'show the eas.json config';
|
|
53
53
|
Config.flags = {
|
|
54
|
-
platform:
|
|
55
|
-
profile:
|
|
54
|
+
platform: core_1.Flags.enum({ char: 'p', options: ['android', 'ios'] }),
|
|
55
|
+
profile: core_1.Flags.string(),
|
|
56
56
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
2
|
export default class BuildList extends EasCommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
|
-
'apple-team-id':
|
|
5
|
+
'apple-team-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
6
|
};
|
|
8
7
|
runAsync(): Promise<void>;
|
|
9
8
|
}
|
|
@@ -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 assert_1 = (0, tslib_1.__importDefault)(require("assert"));
|
|
7
7
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
8
8
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
@@ -15,7 +15,7 @@ const projectUtils_1 = require("../../project/projectUtils");
|
|
|
15
15
|
const prompts_1 = require("../../prompts");
|
|
16
16
|
class BuildList extends EasCommand_1.default {
|
|
17
17
|
async runAsync() {
|
|
18
|
-
let appleTeamIdentifier = this.parse(BuildList).flags['apple-team-id'];
|
|
18
|
+
let appleTeamIdentifier = (await this.parse(BuildList)).flags['apple-team-id'];
|
|
19
19
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
20
20
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
21
21
|
const accountName = await (0, projectUtils_1.getProjectAccountNameAsync)(exp);
|
|
@@ -78,5 +78,5 @@ class BuildList extends EasCommand_1.default {
|
|
|
78
78
|
exports.default = BuildList;
|
|
79
79
|
BuildList.description = 'list all registered devices for your account';
|
|
80
80
|
BuildList.flags = {
|
|
81
|
-
'apple-team-id':
|
|
81
|
+
'apple-team-id': core_1.Flags.string(),
|
|
82
82
|
};
|
|
@@ -10,7 +10,7 @@ const ora_1 = require("../../ora");
|
|
|
10
10
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
11
11
|
class DeviceView extends EasCommand_1.default {
|
|
12
12
|
async runAsync() {
|
|
13
|
-
const { UDID } = this.parse(DeviceView).args;
|
|
13
|
+
const { UDID } = (await this.parse(DeviceView)).args;
|
|
14
14
|
if (!UDID) {
|
|
15
15
|
log_1.default.log(`The device UDID is required to view a specific device. For example:
|
|
16
16
|
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
2
|
import { EnvironmentSecretScope } from '../../graphql/queries/EnvironmentSecretsQuery';
|
|
4
3
|
export default class EnvironmentSecretCreate extends EasCommand {
|
|
5
4
|
static description: string;
|
|
6
5
|
static flags: {
|
|
7
|
-
scope:
|
|
8
|
-
name:
|
|
9
|
-
value:
|
|
10
|
-
force: import("@oclif/
|
|
6
|
+
scope: import("@oclif/core/lib/interfaces").OptionFlag<EnvironmentSecretScope>;
|
|
7
|
+
name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
|
+
value: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
|
+
force: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
10
|
};
|
|
12
11
|
runAsync(): Promise<void>;
|
|
13
12
|
}
|
|
@@ -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 EnvironmentSecretMutation_1 = require("../../graphql/mutations/EnvironmentSecretMutation");
|
|
@@ -16,7 +16,7 @@ const actions_1 = require("../../user/actions");
|
|
|
16
16
|
class EnvironmentSecretCreate extends EasCommand_1.default {
|
|
17
17
|
async runAsync() {
|
|
18
18
|
const actor = await (0, actions_1.ensureLoggedInAsync)();
|
|
19
|
-
let { flags: { name, value: secretValue, scope, force }, } = this.parse(EnvironmentSecretCreate);
|
|
19
|
+
let { flags: { name, value: secretValue, scope, force }, } = await this.parse(EnvironmentSecretCreate);
|
|
20
20
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
21
21
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
22
22
|
const accountName = await (0, projectUtils_1.getProjectAccountNameAsync)(exp);
|
|
@@ -108,18 +108,18 @@ class EnvironmentSecretCreate extends EasCommand_1.default {
|
|
|
108
108
|
exports.default = EnvironmentSecretCreate;
|
|
109
109
|
EnvironmentSecretCreate.description = 'Create an environment secret on the current project or owner account.';
|
|
110
110
|
EnvironmentSecretCreate.flags = {
|
|
111
|
-
scope:
|
|
111
|
+
scope: core_1.Flags.enum({
|
|
112
112
|
description: 'Scope for the secret',
|
|
113
113
|
options: [EnvironmentSecretsQuery_1.EnvironmentSecretScope.ACCOUNT, EnvironmentSecretsQuery_1.EnvironmentSecretScope.PROJECT],
|
|
114
114
|
default: EnvironmentSecretsQuery_1.EnvironmentSecretScope.PROJECT,
|
|
115
115
|
}),
|
|
116
|
-
name:
|
|
116
|
+
name: core_1.Flags.string({
|
|
117
117
|
description: 'Name of the secret',
|
|
118
118
|
}),
|
|
119
|
-
value:
|
|
119
|
+
value: core_1.Flags.string({
|
|
120
120
|
description: 'Value of the secret',
|
|
121
121
|
}),
|
|
122
|
-
force:
|
|
122
|
+
force: core_1.Flags.boolean({
|
|
123
123
|
description: 'Delete and recreate existing secrets',
|
|
124
124
|
default: false,
|
|
125
125
|
}),
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
2
|
export default class EnvironmentSecretDelete extends EasCommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
|
-
id:
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
6
|
};
|
|
8
7
|
runAsync(): Promise<void>;
|
|
9
8
|
}
|
|
@@ -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 EnvironmentSecretMutation_1 = require("../../graphql/mutations/EnvironmentSecretMutation");
|
|
@@ -16,7 +16,7 @@ class EnvironmentSecretDelete extends EasCommand_1.default {
|
|
|
16
16
|
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
17
17
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
18
18
|
const projectAccountName = await (0, projectUtils_1.getProjectAccountNameAsync)(exp);
|
|
19
|
-
let { flags: { id }, } = this.parse(EnvironmentSecretDelete);
|
|
19
|
+
let { flags: { id }, } = await this.parse(EnvironmentSecretDelete);
|
|
20
20
|
let secret;
|
|
21
21
|
if (!id) {
|
|
22
22
|
const validationMessage = 'You must select which secret to delete.';
|
|
@@ -55,7 +55,7 @@ exports.default = EnvironmentSecretDelete;
|
|
|
55
55
|
EnvironmentSecretDelete.description = `Delete an environment secret by ID.
|
|
56
56
|
Unsure where to find the secret's ID? Run ${chalk_1.default.bold('eas secret:list')}`;
|
|
57
57
|
EnvironmentSecretDelete.flags = {
|
|
58
|
-
id:
|
|
58
|
+
id: core_1.Flags.string({
|
|
59
59
|
description: 'ID of the secret to delete',
|
|
60
60
|
}),
|
|
61
61
|
};
|