eas-cli 3.8.0 → 3.9.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 +79 -54
- package/build/build/build.d.ts +1 -0
- package/build/build/build.js +21 -20
- package/build/build/errors.d.ts +15 -0
- package/build/build/errors.js +25 -0
- package/build/build/runBuildAndSubmit.js +1 -1
- package/build/commandUtils/EasCommand.d.ts +11 -10
- package/build/commandUtils/EasCommand.js +20 -0
- package/build/commandUtils/context/DynamicProjectConfigContextField.js +1 -1
- package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +1 -1
- package/build/commandUtils/errors.d.ts +3 -0
- package/build/commandUtils/errors.js +11 -0
- package/build/commands/build/index.js +1 -1
- package/build/commands/build/internal.js +3 -0
- package/build/commands/build/resign.js +1 -1
- package/build/commands/build/version/set.js +1 -1
- package/build/commands/build/version/sync.js +1 -1
- package/build/commands/channel/rollout.d.ts +0 -2
- package/build/commands/channel/rollout.js +44 -18
- package/build/commands/config.js +1 -1
- package/build/commands/metadata/lint.js +1 -1
- package/build/commands/metadata/pull.js +1 -1
- package/build/commands/metadata/push.js +1 -1
- package/build/commands/submit.js +1 -1
- package/build/commands/update/index.d.ts +0 -2
- package/build/commands/update/index.js +32 -137
- package/build/commands/update/republish.js +1 -1
- package/build/commands/update/roll-back-to-embedded.d.ts +22 -0
- package/build/commands/update/roll-back-to-embedded.js +253 -0
- package/build/credentials/ios/IosCredentialsProvider.js +1 -1
- package/build/credentials/manager/SelectBuildProfileFromEasJson.js +1 -1
- package/build/graphql/generated.d.ts +139 -22
- package/build/graphql/generated.js +0 -2
- package/build/graphql/types/Update.js +1 -0
- package/build/project/customBuildConfig.js +19 -4
- package/build/project/publish.d.ts +31 -0
- package/build/project/publish.js +147 -2
- package/build/update/configure.js +1 -1
- package/build/update/utils.d.ts +2 -0
- package/build/update/utils.js +30 -13
- package/build/utils/code-signing.d.ts +4 -3
- package/build/utils/code-signing.js +23 -5
- package/build/utils/expoCli.js +3 -2
- package/build/utils/expodash/areSetsEqual.d.ts +1 -0
- package/build/utils/expodash/areSetsEqual.js +6 -0
- package/oclif.manifest.json +1 -1
- package/package.json +4 -3
|
@@ -85,6 +85,16 @@ export default abstract class EasCommand extends Command {
|
|
|
85
85
|
* it requires the `ProjectConfig` context, and then call `getContextAsync` to get the project ID.
|
|
86
86
|
*/
|
|
87
87
|
static contextDefinition: ContextInput;
|
|
88
|
+
/**
|
|
89
|
+
* The user session manager. Responsible for coordinating all user session related state.
|
|
90
|
+
* If needed in a subclass, use the SessionManager ContextOption.
|
|
91
|
+
*/
|
|
92
|
+
private sessionManagerInternal?;
|
|
93
|
+
/**
|
|
94
|
+
* The analytics manager. Used for logging analytics.
|
|
95
|
+
* It is set up here to ensure a consistent setup.
|
|
96
|
+
*/
|
|
97
|
+
private analyticsInternal?;
|
|
88
98
|
/**
|
|
89
99
|
* Execute the context in the contextDefinition to satisfy command prerequisites.
|
|
90
100
|
*/
|
|
@@ -95,20 +105,11 @@ export default abstract class EasCommand extends Command {
|
|
|
95
105
|
}, { nonInteractive }: {
|
|
96
106
|
nonInteractive: boolean;
|
|
97
107
|
}): Promise<ContextOutput<C>>;
|
|
98
|
-
/**
|
|
99
|
-
* The user session manager. Responsible for coordinating all user session related state.
|
|
100
|
-
* If needed in a subclass, use the SessionManager ContextOption.
|
|
101
|
-
*/
|
|
102
|
-
private sessionManagerInternal?;
|
|
103
108
|
private get sessionManager();
|
|
104
|
-
/**
|
|
105
|
-
* The analytics manager. Used for logging analytics.
|
|
106
|
-
* It is set up here to ensure a consistent set up.
|
|
107
|
-
*/
|
|
108
|
-
private analyticsInternal?;
|
|
109
109
|
private get analytics();
|
|
110
110
|
protected abstract runAsync(): Promise<any>;
|
|
111
111
|
run(): Promise<any>;
|
|
112
112
|
finally(err: Error): Promise<any>;
|
|
113
|
+
protected catch(err: Error): Promise<any>;
|
|
113
114
|
}
|
|
114
115
|
export {};
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const core_2 = require("@urql/core");
|
|
5
6
|
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
6
7
|
const AnalyticsManager_1 = require("../analytics/AnalyticsManager");
|
|
8
|
+
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
7
9
|
const SessionManager_1 = tslib_1.__importDefault(require("../user/SessionManager"));
|
|
8
10
|
const AnalyticsContextField_1 = tslib_1.__importDefault(require("./context/AnalyticsContextField"));
|
|
9
11
|
const DynamicProjectConfigContextField_1 = require("./context/DynamicProjectConfigContextField");
|
|
@@ -13,6 +15,8 @@ const OptionalProjectConfigContextField_1 = require("./context/OptionalProjectCo
|
|
|
13
15
|
const ProjectConfigContextField_1 = tslib_1.__importDefault(require("./context/ProjectConfigContextField"));
|
|
14
16
|
const ProjectDirContextField_1 = tslib_1.__importDefault(require("./context/ProjectDirContextField"));
|
|
15
17
|
const SessionManagementContextField_1 = tslib_1.__importDefault(require("./context/SessionManagementContextField"));
|
|
18
|
+
const errors_1 = require("./errors");
|
|
19
|
+
const BASE_GRAPHQL_ERROR_MESSAGE = 'GraphQL request failed.';
|
|
16
20
|
class EasCommand extends core_1.Command {
|
|
17
21
|
/**
|
|
18
22
|
* Execute the context in the contextDefinition to satisfy command prerequisites.
|
|
@@ -58,6 +62,22 @@ class EasCommand extends core_1.Command {
|
|
|
58
62
|
await this.analytics.flushAsync();
|
|
59
63
|
return super.finally(err);
|
|
60
64
|
}
|
|
65
|
+
catch(err) {
|
|
66
|
+
let baseMessage = `${this.id} command failed.`;
|
|
67
|
+
if (err instanceof errors_1.EasCommandError) {
|
|
68
|
+
log_1.default.error(err.message);
|
|
69
|
+
}
|
|
70
|
+
else if (err instanceof core_2.CombinedError && (err === null || err === void 0 ? void 0 : err.graphQLErrors)) {
|
|
71
|
+
const cleanMessage = err.message.replace('[GraphQL] ', '');
|
|
72
|
+
log_1.default.error(cleanMessage);
|
|
73
|
+
baseMessage = BASE_GRAPHQL_ERROR_MESSAGE;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
log_1.default.error(err.message);
|
|
77
|
+
}
|
|
78
|
+
log_1.default.debug(err);
|
|
79
|
+
throw new Error(baseMessage);
|
|
80
|
+
}
|
|
61
81
|
}
|
|
62
82
|
exports.default = EasCommand;
|
|
63
83
|
EasCommand.ContextOptions = {
|
|
@@ -8,8 +8,8 @@ const findProjectDirAndVerifyProjectSetupAsync_1 = require("./contextUtils/findP
|
|
|
8
8
|
const getProjectIdAsync_1 = require("./contextUtils/getProjectIdAsync");
|
|
9
9
|
class DynamicProjectConfigContextField extends ContextField_1.default {
|
|
10
10
|
async getValueAsync({ nonInteractive, sessionManager, }) {
|
|
11
|
+
const projectDir = await (0, findProjectDirAndVerifyProjectSetupAsync_1.findProjectDirAndVerifyProjectSetupAsync)();
|
|
11
12
|
return async (options) => {
|
|
12
|
-
const projectDir = await (0, findProjectDirAndVerifyProjectSetupAsync_1.findProjectDirAndVerifyProjectSetupAsync)();
|
|
13
13
|
const expBefore = (0, expoConfig_1.getExpoConfig)(projectDir, options);
|
|
14
14
|
const projectId = await (0, getProjectIdAsync_1.getProjectIdAsync)(sessionManager, expBefore, {
|
|
15
15
|
nonInteractive,
|
|
@@ -14,7 +14,7 @@ const easCli_1 = require("../../../utils/easCli");
|
|
|
14
14
|
const vcs_1 = require("../../../vcs");
|
|
15
15
|
const git_1 = tslib_1.__importDefault(require("../../../vcs/clients/git"));
|
|
16
16
|
async function applyCliConfigAsync(projectDir) {
|
|
17
|
-
const easJsonAccessor =
|
|
17
|
+
const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
|
|
18
18
|
const config = await eas_json_1.EasJsonUtils.getCliConfigAsync(easJsonAccessor);
|
|
19
19
|
if ((config === null || config === void 0 ? void 0 : config.version) && !semver_1.default.satisfies(easCli_1.easCliVersion, config.version)) {
|
|
20
20
|
throw new Error(`You are on eas-cli@${easCli_1.easCliVersion} which does not satisfy the CLI version constraint in eas.json (${config.version})`);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EasCommandError = void 0;
|
|
4
|
+
class EasCommandError extends Error {
|
|
5
|
+
// constructor is not useless, since the constructor for Error allows for optional `message`
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.EasCommandError = EasCommandError;
|
|
@@ -188,7 +188,7 @@ async function handleDeprecatedEasJsonAsync(projectDir, nonInteractive) {
|
|
|
188
188
|
if (!(await fs_extra_1.default.pathExists(eas_json_1.EasJsonAccessor.formatEasJsonPath(projectDir)))) {
|
|
189
189
|
return;
|
|
190
190
|
}
|
|
191
|
-
const easJsonAccessor =
|
|
191
|
+
const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
|
|
192
192
|
const profileNames = await eas_json_1.EasJsonUtils.getBuildProfileNamesAsync(easJsonAccessor);
|
|
193
193
|
const platformAndProfileNames = profileNames.flatMap(profileName => [
|
|
194
194
|
[eas_build_job_1.Platform.ANDROID, profileName],
|
|
@@ -8,6 +8,8 @@ const local_1 = require("../../build/local");
|
|
|
8
8
|
const runBuildAndSubmit_1 = require("../../build/runBuildAndSubmit");
|
|
9
9
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
10
10
|
const json_1 = require("../../utils/json");
|
|
11
|
+
const vcs_1 = require("../../vcs");
|
|
12
|
+
const gitNoCommit_1 = tslib_1.__importDefault(require("../../vcs/clients/gitNoCommit"));
|
|
11
13
|
/**
|
|
12
14
|
* This command will be run on the EAS Build workers, when building
|
|
13
15
|
* directly from git. This command resolves credentials and other
|
|
@@ -22,6 +24,7 @@ class BuildInternal extends EasCommand_1.default {
|
|
|
22
24
|
const { loggedIn: { actor, graphqlClient }, getDynamicProjectConfigAsync, projectDir, analytics, } = await this.getContextAsync(BuildInternal, {
|
|
23
25
|
nonInteractive: true,
|
|
24
26
|
});
|
|
27
|
+
(0, vcs_1.setVcsClient)(new gitNoCommit_1.default());
|
|
25
28
|
await (0, _1.handleDeprecatedEasJsonAsync)(projectDir, flags.nonInteractive);
|
|
26
29
|
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(graphqlClient, analytics, projectDir, {
|
|
27
30
|
requestedPlatform: flags.platform,
|
|
@@ -49,7 +49,7 @@ class BuildResign extends EasCommand_1.default {
|
|
|
49
49
|
}
|
|
50
50
|
await (0, _1.handleDeprecatedEasJsonAsync)(projectDir, flags.nonInteractive);
|
|
51
51
|
await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)(graphqlClient, [generated_1.StatuspageServiceName.EasBuild]);
|
|
52
|
-
const easJsonAccessor =
|
|
52
|
+
const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
|
|
53
53
|
const easJsonCliConfig = (_c = (await eas_json_1.EasJsonUtils.getCliConfigAsync(easJsonAccessor))) !== null && _c !== void 0 ? _c : {};
|
|
54
54
|
const buildProfile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, (_d = flags.profile) !== null && _d !== void 0 ? _d : 'production');
|
|
55
55
|
const { exp, projectId } = await getDynamicProjectConfigAsync({ env: buildProfile.env });
|
|
@@ -27,7 +27,7 @@ class BuildVersionSetView extends EasCommand_1.default {
|
|
|
27
27
|
nonInteractive: false,
|
|
28
28
|
});
|
|
29
29
|
const platform = await (0, platform_1.selectPlatformAsync)(flags.platform);
|
|
30
|
-
const easJsonAccessor =
|
|
30
|
+
const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
|
|
31
31
|
await (0, remoteVersionSource_1.ensureVersionSourceIsRemoteAsync)(easJsonAccessor);
|
|
32
32
|
const profile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, (_b = flags.profile) !== null && _b !== void 0 ? _b : undefined);
|
|
33
33
|
const { exp, projectId } = await getDynamicProjectConfigAsync({ env: profile.env });
|
|
@@ -30,7 +30,7 @@ class BuildVersionSyncView extends EasCommand_1.default {
|
|
|
30
30
|
nonInteractive: true,
|
|
31
31
|
});
|
|
32
32
|
const requestedPlatform = await (0, platform_1.selectRequestedPlatformAsync)(flags.platform);
|
|
33
|
-
const easJsonAccessor =
|
|
33
|
+
const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
|
|
34
34
|
await (0, remoteVersionSource_1.ensureVersionSourceIsRemoteAsync)(easJsonAccessor);
|
|
35
35
|
const platforms = (0, platform_1.toPlatforms)(requestedPlatform);
|
|
36
36
|
const buildProfiles = await (0, profiles_1.getProfilesAsync)({
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
2
|
export default class ChannelRollout extends EasCommand {
|
|
3
|
-
static hidden: boolean;
|
|
4
3
|
static description: string;
|
|
5
4
|
static args: {
|
|
6
5
|
name: string;
|
|
7
|
-
required: boolean;
|
|
8
6
|
description: string;
|
|
9
7
|
}[];
|
|
10
8
|
static flags: {
|
|
@@ -4,6 +4,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
6
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
|
+
const queries_1 = require("../../branch/queries");
|
|
8
|
+
const queries_2 = require("../../channel/queries");
|
|
7
9
|
const utils_1 = require("../../channel/utils");
|
|
8
10
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
9
11
|
const flags_1 = require("../../commandUtils/flags");
|
|
@@ -81,7 +83,7 @@ async function startRolloutAsync(graphqlClient, { channelName, branchName, perce
|
|
|
81
83
|
if (!oldBranch) {
|
|
82
84
|
throw new Error(`Branch mapping is missing its only branch for channel "${channelName}" on app "${displayName}"`);
|
|
83
85
|
}
|
|
84
|
-
const logMessage =
|
|
86
|
+
const logMessage = `Started a rollout of branch ${chalk_1.default.bold(branchName)} on channel ${chalk_1.default.bold(channelName)}! ${chalk_1.default.bold(percent)}% of users will be directed to branch ${chalk_1.default.bold(branchName)}, ${chalk_1.default.bold(100 - percent)}% to branch ${chalk_1.default.bold(oldBranch.name)}.`;
|
|
85
87
|
return { newChannelInfo, logMessage };
|
|
86
88
|
}
|
|
87
89
|
async function editRolloutAsync(graphqlClient, { channelName, percent, nonInteractive, currentBranchMapping, channel, }) {
|
|
@@ -99,7 +101,7 @@ async function editRolloutAsync(graphqlClient, { channelName, percent, nonIntera
|
|
|
99
101
|
channelId: channel.id,
|
|
100
102
|
branchMapping: JSON.stringify(newBranchMapping),
|
|
101
103
|
});
|
|
102
|
-
const logMessage =
|
|
104
|
+
const logMessage = `Rollout of branch ${chalk_1.default.bold(newBranch.name)} on channel ${chalk_1.default.bold(channelName)} updated from ${chalk_1.default.bold(currentPercent)}% to ${chalk_1.default.bold(percent)}%. ${chalk_1.default.bold(percent)}% of users will be directed to branch ${chalk_1.default.bold(newBranch.name)}, ${chalk_1.default.bold(100 - percent)}% to branch ${chalk_1.default.bold(oldBranch.name)}.`;
|
|
103
105
|
return { newChannelInfo, logMessage };
|
|
104
106
|
}
|
|
105
107
|
async function endRolloutAsync(graphqlClient, { channelName, branchName, nonInteractive, projectId, channel, }) {
|
|
@@ -153,12 +155,12 @@ async function endRolloutAsync(graphqlClient, { channelName, branchName, nonInte
|
|
|
153
155
|
channelId: channel.id,
|
|
154
156
|
branchMapping: JSON.stringify(newBranchMapping),
|
|
155
157
|
});
|
|
156
|
-
const logMessage =
|
|
158
|
+
const logMessage = `Rollout on channel ${chalk_1.default.bold(channelName)} ended. All traffic is now sent to branch ${chalk_1.default.bold(endOnNewBranch ? newBranch.name : oldBranch.name)}`;
|
|
157
159
|
return { newChannelInfo, logMessage };
|
|
158
160
|
}
|
|
159
161
|
class ChannelRollout extends EasCommand_1.default {
|
|
160
162
|
async runAsync() {
|
|
161
|
-
const { args: { channel:
|
|
163
|
+
const { args: { channel: channelNameArg }, flags: { json: jsonFlag, end: endFlag, branch: branchName, percent, 'non-interactive': nonInteractive, }, } = await this.parse(ChannelRollout);
|
|
162
164
|
const { projectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(ChannelRollout, {
|
|
163
165
|
nonInteractive,
|
|
164
166
|
});
|
|
@@ -166,9 +168,22 @@ class ChannelRollout extends EasCommand_1.default {
|
|
|
166
168
|
(0, json_1.enableJsonOutput)();
|
|
167
169
|
}
|
|
168
170
|
const projectDisplayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId);
|
|
171
|
+
let channelName = channelNameArg;
|
|
172
|
+
if (!channelName) {
|
|
173
|
+
const { name } = await (0, queries_2.selectChannelOnAppAsync)(graphqlClient, {
|
|
174
|
+
projectId,
|
|
175
|
+
selectionPromptTitle: 'Select a channel on which to perform a rollout',
|
|
176
|
+
paginatedQueryOptions: {
|
|
177
|
+
json: jsonFlag,
|
|
178
|
+
nonInteractive,
|
|
179
|
+
offset: 0,
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
channelName = name;
|
|
183
|
+
}
|
|
169
184
|
const channel = await ChannelQuery_1.ChannelQuery.viewUpdateChannelAsync(graphqlClient, {
|
|
170
185
|
appId: projectId,
|
|
171
|
-
channelName
|
|
186
|
+
channelName,
|
|
172
187
|
});
|
|
173
188
|
if (!channel) {
|
|
174
189
|
throw new Error(`Could not find a channel named "${channelName}". Check which channels exist on this project with ${chalk_1.default.bold('eas channel:list')}.`);
|
|
@@ -195,7 +210,13 @@ class ChannelRollout extends EasCommand_1.default {
|
|
|
195
210
|
if (!isRollout) {
|
|
196
211
|
rolloutMutationResult = await startRolloutAsync(graphqlClient, {
|
|
197
212
|
channelName,
|
|
198
|
-
branchName: branchName !== null && branchName !== void 0 ? branchName : (await promptForBranchNameAsync(
|
|
213
|
+
branchName: branchName !== null && branchName !== void 0 ? branchName : (await promptForBranchNameAsync({
|
|
214
|
+
graphqlClient,
|
|
215
|
+
projectId,
|
|
216
|
+
channelName,
|
|
217
|
+
nonInteractive,
|
|
218
|
+
json: jsonFlag,
|
|
219
|
+
})),
|
|
199
220
|
percent,
|
|
200
221
|
nonInteractive,
|
|
201
222
|
projectId,
|
|
@@ -236,13 +257,11 @@ class ChannelRollout extends EasCommand_1.default {
|
|
|
236
257
|
}
|
|
237
258
|
exports.default = ChannelRollout;
|
|
238
259
|
_a = ChannelRollout;
|
|
239
|
-
ChannelRollout.
|
|
240
|
-
ChannelRollout.description = 'Rollout a new branch out to a channel incrementally.';
|
|
260
|
+
ChannelRollout.description = 'Roll a new branch out on a channel incrementally.';
|
|
241
261
|
ChannelRollout.args = [
|
|
242
262
|
{
|
|
243
263
|
name: 'channel',
|
|
244
|
-
|
|
245
|
-
description: 'rollout that the channel is on',
|
|
264
|
+
description: 'channel on which the rollout should be done',
|
|
246
265
|
},
|
|
247
266
|
];
|
|
248
267
|
ChannelRollout.flags = {
|
|
@@ -251,7 +270,7 @@ ChannelRollout.flags = {
|
|
|
251
270
|
required: false,
|
|
252
271
|
}),
|
|
253
272
|
percent: core_1.Flags.integer({
|
|
254
|
-
description: 'percent of
|
|
273
|
+
description: 'percent of users to send to the new branch',
|
|
255
274
|
required: false,
|
|
256
275
|
}),
|
|
257
276
|
end: core_1.Flags.boolean({
|
|
@@ -264,15 +283,22 @@ ChannelRollout.contextDefinition = {
|
|
|
264
283
|
..._a.ContextOptions.ProjectConfig,
|
|
265
284
|
..._a.ContextOptions.LoggedIn,
|
|
266
285
|
};
|
|
267
|
-
async function promptForBranchNameAsync(channelName, nonInteractive) {
|
|
286
|
+
async function promptForBranchNameAsync({ graphqlClient, projectId, channelName, nonInteractive, json, }) {
|
|
268
287
|
if (nonInteractive) {
|
|
269
288
|
throw new Error('Must supply branch flag in non-interactive mode');
|
|
270
289
|
}
|
|
271
|
-
const { name } = await (0,
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
290
|
+
const { name: branchName } = await (0, queries_1.selectBranchOnAppAsync)(graphqlClient, {
|
|
291
|
+
projectId,
|
|
292
|
+
promptTitle: `Which branch would you like roll out on ${channelName}?`,
|
|
293
|
+
displayTextForListItem: updateBranch => ({
|
|
294
|
+
title: updateBranch.name,
|
|
295
|
+
}),
|
|
296
|
+
// discard limit and offset because this query is not their intended target
|
|
297
|
+
paginatedQueryOptions: {
|
|
298
|
+
json,
|
|
299
|
+
nonInteractive,
|
|
300
|
+
offset: 0,
|
|
301
|
+
},
|
|
276
302
|
});
|
|
277
|
-
return
|
|
303
|
+
return branchName;
|
|
278
304
|
}
|
package/build/commands/config.js
CHANGED
|
@@ -24,7 +24,7 @@ class Config extends EasCommand_1.default {
|
|
|
24
24
|
const { getDynamicProjectConfigAsync, projectDir } = await this.getContextAsync(Config, {
|
|
25
25
|
nonInteractive: false,
|
|
26
26
|
});
|
|
27
|
-
const accessor =
|
|
27
|
+
const accessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
|
|
28
28
|
const profileName = maybeProfile !== null && maybeProfile !== void 0 ? maybeProfile : (await (0, prompts_1.selectAsync)('Select build profile', (await eas_json_1.EasJsonUtils.getBuildProfileNamesAsync(accessor)).map(profileName => ({
|
|
29
29
|
title: profileName,
|
|
30
30
|
value: profileName,
|
|
@@ -25,7 +25,7 @@ class MetadataLint extends EasCommand_1.default {
|
|
|
25
25
|
}
|
|
26
26
|
const submitProfiles = await (0, profiles_1.getProfilesAsync)({
|
|
27
27
|
type: 'submit',
|
|
28
|
-
easJsonAccessor:
|
|
28
|
+
easJsonAccessor: eas_json_1.EasJsonAccessor.fromProjectPath(projectDir),
|
|
29
29
|
platforms: [eas_build_job_1.Platform.IOS],
|
|
30
30
|
profileName: flags.profile,
|
|
31
31
|
});
|
|
@@ -25,7 +25,7 @@ class MetadataPull extends EasCommand_1.default {
|
|
|
25
25
|
await (0, configure_1.ensureProjectConfiguredAsync)({ projectDir, nonInteractive: false });
|
|
26
26
|
const submitProfiles = await (0, profiles_1.getProfilesAsync)({
|
|
27
27
|
type: 'submit',
|
|
28
|
-
easJsonAccessor:
|
|
28
|
+
easJsonAccessor: eas_json_1.EasJsonAccessor.fromProjectPath(projectDir),
|
|
29
29
|
platforms: [eas_build_job_1.Platform.IOS],
|
|
30
30
|
profileName: flags.profile,
|
|
31
31
|
});
|
|
@@ -23,7 +23,7 @@ class MetadataPush extends EasCommand_1.default {
|
|
|
23
23
|
await (0, configure_1.ensureProjectConfiguredAsync)({ projectDir, nonInteractive: false });
|
|
24
24
|
const submitProfiles = await (0, profiles_1.getProfilesAsync)({
|
|
25
25
|
type: 'submit',
|
|
26
|
-
easJsonAccessor:
|
|
26
|
+
easJsonAccessor: eas_json_1.EasJsonAccessor.fromProjectPath(projectDir),
|
|
27
27
|
platforms: [eas_build_job_1.Platform.IOS],
|
|
28
28
|
profileName: flags.profile,
|
|
29
29
|
});
|
package/build/commands/submit.js
CHANGED
|
@@ -27,7 +27,7 @@ class Submit extends EasCommand_1.default {
|
|
|
27
27
|
const platforms = (0, platform_1.toPlatforms)(flagsWithPlatform.requestedPlatform);
|
|
28
28
|
const submissionProfiles = await (0, profiles_1.getProfilesAsync)({
|
|
29
29
|
type: 'submit',
|
|
30
|
-
easJsonAccessor:
|
|
30
|
+
easJsonAccessor: eas_json_1.EasJsonAccessor.fromProjectPath(projectDir),
|
|
31
31
|
platforms,
|
|
32
32
|
profileName: flagsWithPlatform.profile,
|
|
33
33
|
});
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { Platform as PublishPlatform } from '@expo/config';
|
|
2
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
|
-
export declare const defaultPublishPlatforms: Partial<PublishPlatform>[];
|
|
4
2
|
export default class UpdatePublish extends EasCommand {
|
|
5
3
|
static description: string;
|
|
6
4
|
static flags: {
|