eas-cli 0.38.3 → 0.41.1
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 +277 -29
- package/build/api.d.ts +1 -0
- package/build/api.js +13 -1
- package/build/build/build.js +3 -3
- package/build/build/context.d.ts +2 -1
- package/build/build/createContext.d.ts +3 -2
- package/build/build/createContext.js +3 -3
- package/build/build/local.d.ts +9 -1
- package/build/build/local.js +35 -5
- package/build/build/metadata.js +14 -0
- package/build/build/runBuildAndSubmit.d.ts +15 -0
- package/build/build/runBuildAndSubmit.js +173 -0
- package/build/commands/branch/create.d.ts +0 -1
- package/build/commands/branch/create.js +0 -1
- package/build/commands/branch/delete.d.ts +0 -1
- package/build/commands/branch/delete.js +1 -2
- package/build/commands/branch/list.d.ts +0 -1
- package/build/commands/branch/list.js +1 -2
- package/build/commands/branch/publish.d.ts +1 -18
- package/build/commands/branch/publish.js +2 -354
- package/build/commands/branch/rename.d.ts +0 -1
- package/build/commands/branch/rename.js +0 -1
- package/build/commands/branch/view.d.ts +0 -1
- package/build/commands/branch/view.js +0 -1
- package/build/commands/build/configure.js +1 -1
- package/build/commands/build/index.d.ts +0 -5
- package/build/commands/build/index.js +8 -159
- package/build/commands/build/inspect.d.ts +22 -0
- package/build/commands/build/inspect.js +129 -0
- package/build/commands/channel/create.d.ts +0 -1
- package/build/commands/channel/create.js +0 -1
- package/build/commands/channel/edit.d.ts +0 -1
- package/build/commands/channel/edit.js +1 -2
- package/build/commands/channel/list.d.ts +0 -1
- package/build/commands/channel/list.js +0 -1
- package/build/commands/channel/view.d.ts +0 -1
- package/build/commands/channel/view.js +3 -4
- package/build/commands/credentials.js +1 -7
- package/build/commands/diagnostics.d.ts +1 -0
- package/build/commands/diagnostics.js +20 -1
- package/build/commands/submit.js +1 -1
- package/build/commands/update/configure.d.ts +0 -2
- package/build/commands/update/configure.js +23 -15
- package/build/commands/update/delete.d.ts +0 -1
- package/build/commands/update/delete.js +0 -1
- package/build/commands/update/index.d.ts +19 -0
- package/build/commands/update/index.js +384 -0
- package/build/commands/update/view.d.ts +0 -1
- package/build/commands/update/view.js +0 -1
- package/build/credentials/context.d.ts +5 -0
- package/build/credentials/context.js +12 -7
- package/build/credentials/ios/actions/AscApiKeyUtils.js +1 -1
- package/build/credentials/ios/appstore/ensureAppExists.js +3 -3
- package/build/credentials/manager/ManageAndroid.d.ts +3 -3
- package/build/credentials/manager/ManageAndroid.js +21 -13
- package/build/credentials/manager/ManageIos.d.ts +3 -3
- package/build/credentials/manager/ManageIos.js +23 -13
- package/build/credentials/manager/SelectBuildProfileFromEasJson.d.ts +2 -3
- package/build/credentials/manager/SelectBuildProfileFromEasJson.js +3 -6
- package/build/credentials/manager/SelectPlatform.d.ts +1 -2
- package/build/credentials/manager/SelectPlatform.js +3 -3
- package/build/graphql/generated.d.ts +31 -11
- package/build/graphql/generated.js +6 -1
- package/build/graphql/types/Submission.js +1 -0
- package/build/project/expoSdk.d.ts +3 -0
- package/build/project/expoSdk.js +30 -0
- package/build/project/ios/target.js +32 -7
- package/build/prompts.d.ts +3 -3
- package/build/submit/context.js +0 -1
- package/build/submit/ios/AppProduce.js +3 -3
- package/build/submit/ios/IosSubmitCommand.js +7 -2
- package/build/submit/utils/urls.js +1 -1
- package/build/submit/utils/wait.js +1 -1
- package/build/update/utils.js +5 -5
- package/build/utils/profiles.d.ts +1 -1
- package/build/utils/profiles.js +80 -30
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const command_1 = require("@oclif/command");
|
|
5
|
+
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
6
|
+
const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
|
|
7
|
+
const path_1 = (0, tslib_1.__importDefault)(require("path"));
|
|
8
|
+
const uuid_1 = require("uuid");
|
|
9
|
+
const runBuildAndSubmit_1 = require("../../build/runBuildAndSubmit");
|
|
10
|
+
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
11
|
+
const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
|
|
12
|
+
const ora_1 = require("../../ora");
|
|
13
|
+
const platform_1 = require("../../platform");
|
|
14
|
+
const projectUtils_1 = require("../../project/projectUtils");
|
|
15
|
+
const paths_1 = require("../../utils/paths");
|
|
16
|
+
const vcs_1 = require("../../vcs");
|
|
17
|
+
var InspectStage;
|
|
18
|
+
(function (InspectStage) {
|
|
19
|
+
InspectStage["ARCHIVE"] = "archive";
|
|
20
|
+
InspectStage["PRE_BUILD"] = "pre-build";
|
|
21
|
+
InspectStage["POST_BUILD"] = "post-build";
|
|
22
|
+
})(InspectStage || (InspectStage = {}));
|
|
23
|
+
const STAGE_DESCRIPTION = `Stage of the build you want to inspect.
|
|
24
|
+
archive - builds the project archive that would be uploaded to EAS when building
|
|
25
|
+
pre-build - prepares the project to be built with Gradle/Xcode. Does not run the native build.
|
|
26
|
+
post-build - builds the native project and leaves the output directory for inspection`;
|
|
27
|
+
class BuildInspect extends EasCommand_1.default {
|
|
28
|
+
async runAsync() {
|
|
29
|
+
const { flags } = this.parse(BuildInspect);
|
|
30
|
+
const outputDirectory = path_1.default.resolve(process.cwd(), flags.output);
|
|
31
|
+
await this.prepareOutputDirAsync(outputDirectory, flags.force);
|
|
32
|
+
if (flags.stage === InspectStage.ARCHIVE) {
|
|
33
|
+
const vcs = (0, vcs_1.getVcsClient)();
|
|
34
|
+
await vcs.ensureRepoExistsAsync();
|
|
35
|
+
await vcs.makeShallowCopyAsync(outputDirectory);
|
|
36
|
+
log_1.default.withTick(`Project saved to ${outputDirectory}`);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
40
|
+
const tmpWorkingdir = path_1.default.join((0, paths_1.getTmpDirectory)(), (0, uuid_1.v4)());
|
|
41
|
+
try {
|
|
42
|
+
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(projectDir, {
|
|
43
|
+
skipProjectConfiguration: false,
|
|
44
|
+
nonInteractive: false,
|
|
45
|
+
wait: true,
|
|
46
|
+
clearCache: false,
|
|
47
|
+
json: false,
|
|
48
|
+
autoSubmit: false,
|
|
49
|
+
requestedPlatform: flags.platform,
|
|
50
|
+
profile: flags.profile,
|
|
51
|
+
localBuildOptions: {
|
|
52
|
+
enable: true,
|
|
53
|
+
...(flags.stage === InspectStage.PRE_BUILD ? { skipNativeBuild: true } : {}),
|
|
54
|
+
...(flags.stage === InspectStage.POST_BUILD ? { skipCleanup: true } : {}),
|
|
55
|
+
verbose: flags.verbose,
|
|
56
|
+
workingdir: tmpWorkingdir,
|
|
57
|
+
artifactsDir: path_1.default.join(tmpWorkingdir, 'artifacts'),
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
if (!flags.verbose) {
|
|
61
|
+
log_1.default.log(chalk_1.default.green('Build successful'));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
if (!flags.verbose) {
|
|
66
|
+
log_1.default.error('Build failed');
|
|
67
|
+
log_1.default.error(`Re-run this command with ${chalk_1.default.bold('--verbose')} flag to see the logs`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
finally {
|
|
71
|
+
const spinner = (0, ora_1.ora)().start(`Copying project build directory to ${outputDirectory}`);
|
|
72
|
+
try {
|
|
73
|
+
const tmpBuildDirectory = path_1.default.join(tmpWorkingdir, 'build');
|
|
74
|
+
if (await fs_extra_1.default.pathExists(tmpBuildDirectory)) {
|
|
75
|
+
await fs_extra_1.default.copy(tmpBuildDirectory, outputDirectory);
|
|
76
|
+
}
|
|
77
|
+
await fs_extra_1.default.remove(tmpWorkingdir);
|
|
78
|
+
spinner.succeed(`Project build directory saved to ${outputDirectory}`);
|
|
79
|
+
}
|
|
80
|
+
catch (err) {
|
|
81
|
+
spinner.fail();
|
|
82
|
+
throw err;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
async prepareOutputDirAsync(outputDir, force) {
|
|
88
|
+
if (await fs_extra_1.default.pathExists(outputDir)) {
|
|
89
|
+
if (force) {
|
|
90
|
+
await fs_extra_1.default.remove(outputDir);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
throw new Error(`Directory ${outputDir} already exists`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
await fs_extra_1.default.mkdirp(outputDir);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.default = BuildInspect;
|
|
100
|
+
BuildInspect.description = 'Inspect the state of the project at specific build stages. Useful for troubleshooting.';
|
|
101
|
+
BuildInspect.flags = {
|
|
102
|
+
platform: command_1.flags.enum({
|
|
103
|
+
char: 'p',
|
|
104
|
+
options: [platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.Ios],
|
|
105
|
+
required: true,
|
|
106
|
+
}),
|
|
107
|
+
profile: command_1.flags.string({
|
|
108
|
+
description: 'Name of the build profile from eas.json. Defaults to "production" if defined in eas.json.',
|
|
109
|
+
helpValue: 'PROFILE_NAME',
|
|
110
|
+
}),
|
|
111
|
+
stage: command_1.flags.enum({
|
|
112
|
+
char: 's',
|
|
113
|
+
description: STAGE_DESCRIPTION,
|
|
114
|
+
options: [InspectStage.ARCHIVE, InspectStage.PRE_BUILD, InspectStage.POST_BUILD],
|
|
115
|
+
required: true,
|
|
116
|
+
}),
|
|
117
|
+
output: command_1.flags.string({
|
|
118
|
+
description: 'Output directory.',
|
|
119
|
+
required: true,
|
|
120
|
+
helpValue: 'OUTPUT_DIRECTORY',
|
|
121
|
+
}),
|
|
122
|
+
force: command_1.flags.boolean({
|
|
123
|
+
description: 'Delete OUTPUT_DIRECTORY if it already exists.',
|
|
124
|
+
default: false,
|
|
125
|
+
}),
|
|
126
|
+
verbose: command_1.flags.boolean({
|
|
127
|
+
default: false,
|
|
128
|
+
}),
|
|
129
|
+
};
|
|
@@ -6,7 +6,6 @@ export declare function createUpdateChannelOnAppAsync({ appId, channelName, bran
|
|
|
6
6
|
branchId: string;
|
|
7
7
|
}): Promise<CreateUpdateChannelOnAppMutation>;
|
|
8
8
|
export default class ChannelCreate extends EasCommand {
|
|
9
|
-
static hidden: boolean;
|
|
10
9
|
static description: string;
|
|
11
10
|
static args: {
|
|
12
11
|
name: string;
|
|
@@ -54,7 +54,7 @@ async function updateChannelBranchMappingAsync({ channelId, branchMapping, }) {
|
|
|
54
54
|
.toPromise());
|
|
55
55
|
const channel = data.updateChannel.editUpdateChannel;
|
|
56
56
|
if (!channel) {
|
|
57
|
-
throw new Error(`Could not
|
|
57
|
+
throw new Error(`Could not find a channel with id: ${channelId}`);
|
|
58
58
|
}
|
|
59
59
|
return data.updateChannel.editUpdateChannel;
|
|
60
60
|
}
|
|
@@ -112,7 +112,6 @@ class ChannelEdit extends EasCommand_1.default {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
exports.default = ChannelEdit;
|
|
115
|
-
ChannelEdit.hidden = true;
|
|
116
115
|
ChannelEdit.description = 'Point a channel at a new branch.';
|
|
117
116
|
ChannelEdit.args = [
|
|
118
117
|
{
|
|
@@ -133,7 +133,7 @@ function logChannelDetails(channel) {
|
|
|
133
133
|
: []),
|
|
134
134
|
(0, utils_1.formatUpdate)(update),
|
|
135
135
|
(_a = update === null || update === void 0 ? void 0 : update.runtimeVersion) !== null && _a !== void 0 ? _a : 'N/A',
|
|
136
|
-
(_b = update === null || update === void 0 ? void 0 : update.group) !== null && _b !== void 0 ? _b : 'N/A
|
|
136
|
+
(_b = update === null || update === void 0 ? void 0 : update.group) !== null && _b !== void 0 ? _b : 'N/A',
|
|
137
137
|
(0, utils_1.getPlatformsForGroup)({
|
|
138
138
|
updates: branch.updates,
|
|
139
139
|
group: (_c = branch.updates[0]) === null || _c === void 0 ? void 0 : _c.group,
|
|
@@ -168,7 +168,7 @@ class ChannelView extends EasCommand_1.default {
|
|
|
168
168
|
});
|
|
169
169
|
const channel = (_a = getUpdateChannelByNameForAppresult.app) === null || _a === void 0 ? void 0 : _a.byId.updateChannelByName;
|
|
170
170
|
if (!channel) {
|
|
171
|
-
throw new Error(`Could not
|
|
171
|
+
throw new Error(`Could not find a channel with name: ${channelName}`);
|
|
172
172
|
}
|
|
173
173
|
if (jsonFlag) {
|
|
174
174
|
log_1.default.log(JSON.stringify(channel));
|
|
@@ -181,12 +181,11 @@ class ChannelView extends EasCommand_1.default {
|
|
|
181
181
|
{ label: 'ID', value: channel.id },
|
|
182
182
|
]));
|
|
183
183
|
log_1.default.addNewLineIfNone();
|
|
184
|
-
log_1.default.log((0, chalk_1.default) `{bold Branches
|
|
184
|
+
log_1.default.log((0, chalk_1.default) `{bold Branches pointed at this channel and their most recent update group:}`);
|
|
185
185
|
logChannelDetails(channel);
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
exports.default = ChannelView;
|
|
189
|
-
ChannelView.hidden = true;
|
|
190
189
|
ChannelView.description = 'View a channel on the current project.';
|
|
191
190
|
ChannelView.args = [
|
|
192
191
|
{
|
|
@@ -2,16 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../commandUtils/EasCommand"));
|
|
5
|
-
const context_1 = require("../credentials/context");
|
|
6
5
|
const SelectPlatform_1 = require("../credentials/manager/SelectPlatform");
|
|
7
|
-
const actions_1 = require("../user/actions");
|
|
8
6
|
class Credentials extends EasCommand_1.default {
|
|
9
7
|
async runAsync() {
|
|
10
|
-
|
|
11
|
-
projectDir: process.cwd(),
|
|
12
|
-
user: await (0, actions_1.ensureLoggedInAsync)(),
|
|
13
|
-
});
|
|
14
|
-
await new SelectPlatform_1.SelectPlatform().runAsync(ctx);
|
|
8
|
+
await new SelectPlatform_1.SelectPlatform().runAsync();
|
|
15
9
|
}
|
|
16
10
|
}
|
|
17
11
|
exports.default = Credentials;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
4
5
|
const envinfo_1 = (0, tslib_1.__importDefault)(require("envinfo"));
|
|
5
6
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../commandUtils/EasCommand"));
|
|
6
7
|
const log_1 = (0, tslib_1.__importDefault)(require("../log"));
|
|
8
|
+
const projectUtils_1 = require("../project/projectUtils");
|
|
9
|
+
const workflow_1 = require("../project/workflow");
|
|
7
10
|
const easCli_1 = require("../utils/easCli");
|
|
8
11
|
class Diagnostics extends EasCommand_1.default {
|
|
9
12
|
constructor() {
|
|
@@ -25,12 +28,28 @@ class Diagnostics extends EasCommand_1.default {
|
|
|
25
28
|
'react-navigation',
|
|
26
29
|
'@expo/webpack-config',
|
|
27
30
|
'expo-dev-client',
|
|
31
|
+
'expo-updates',
|
|
28
32
|
],
|
|
29
33
|
npmGlobalPackages: ['eas-cli', 'expo-cli'],
|
|
30
34
|
}, {
|
|
31
35
|
title: `EAS CLI ${easCli_1.easCliVersion} environment info`,
|
|
32
36
|
});
|
|
33
|
-
log_1.default.log(info);
|
|
37
|
+
log_1.default.log(info.trimEnd());
|
|
38
|
+
await this.printWorkflowAsync();
|
|
39
|
+
log_1.default.newLine();
|
|
40
|
+
}
|
|
41
|
+
async printWorkflowAsync() {
|
|
42
|
+
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
43
|
+
const androidWorkflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
44
|
+
const iosWorkflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
|
|
45
|
+
if (androidWorkflow === iosWorkflow) {
|
|
46
|
+
log_1.default.log(` Project workflow: ${androidWorkflow}`);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
log_1.default.log(` Project Workflow:`);
|
|
50
|
+
log_1.default.log(` Android: ${androidWorkflow}`);
|
|
51
|
+
log_1.default.log(` iOS: ${iosWorkflow}`);
|
|
52
|
+
}
|
|
34
53
|
}
|
|
35
54
|
}
|
|
36
55
|
exports.default = Diagnostics;
|
package/build/commands/submit.js
CHANGED
|
@@ -74,7 +74,7 @@ class Submit extends EasCommand_1.default {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
exports.default = Submit;
|
|
77
|
-
Submit.description = `
|
|
77
|
+
Submit.description = `Submit build archive to App Store Connect
|
|
78
78
|
See how to configure submits with eas.json: ${(0, log_1.link)('https://docs.expo.dev/submit/eas-json/')}`;
|
|
79
79
|
Submit.aliases = ['build:submit'];
|
|
80
80
|
Submit.flags = {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { ExpoConfig } from '@expo/config';
|
|
2
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
|
-
export declare function getEASUpdateURLAsync(exp: ExpoConfig): Promise<string>;
|
|
4
2
|
export default class UpdateConfigure extends EasCommand {
|
|
5
3
|
static description: string;
|
|
6
4
|
runAsync(): Promise<void>;
|
|
@@ -1,41 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEASUpdateURLAsync = void 0;
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
4
|
const config_1 = require("@expo/config");
|
|
6
5
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
7
6
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
7
|
+
const api_1 = require("../../api");
|
|
8
8
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
9
9
|
const log_1 = (0, tslib_1.__importStar)(require("../../log"));
|
|
10
10
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
11
11
|
const workflow_1 = require("../../project/workflow");
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return new URL(projectId, EAS_UPDATE_URL).href;
|
|
16
|
-
}
|
|
17
|
-
exports.getEASUpdateURLAsync = getEASUpdateURLAsync;
|
|
18
|
-
async function ensureEASUrlSetAsync(projectDir, exp) {
|
|
12
|
+
const DEFAULT_MANAGED_RUNTIME_VERSION = { policy: 'sdkVersion' };
|
|
13
|
+
const DEFAULT_BARE_RUNTIME_VERSION = '1.0.0';
|
|
14
|
+
async function configureProjectForEASUpdateAsync(projectDir, exp, isBare) {
|
|
19
15
|
var _a, _b;
|
|
20
|
-
const
|
|
16
|
+
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
17
|
+
const easUpdateURL = (0, api_1.getEASUpdateURL)(projectId);
|
|
18
|
+
const preexistingRuntimeVersion = exp.runtimeVersion;
|
|
19
|
+
const defaultRuntimeVersion = isBare
|
|
20
|
+
? DEFAULT_BARE_RUNTIME_VERSION
|
|
21
|
+
: DEFAULT_MANAGED_RUNTIME_VERSION;
|
|
21
22
|
const result = await (0, config_1.modifyConfigAsync)(projectDir, {
|
|
23
|
+
runtimeVersion: preexistingRuntimeVersion !== null && preexistingRuntimeVersion !== void 0 ? preexistingRuntimeVersion : defaultRuntimeVersion,
|
|
22
24
|
updates: { ...exp.updates, url: easUpdateURL },
|
|
23
25
|
});
|
|
24
26
|
switch (result.type) {
|
|
25
27
|
case 'success':
|
|
26
28
|
if ((_a = exp.updates) === null || _a === void 0 ? void 0 : _a.url) {
|
|
27
|
-
|
|
29
|
+
if (exp.updates.url !== easUpdateURL) {
|
|
30
|
+
log_1.default.withTick(`Overwrote "${(_b = exp.updates) === null || _b === void 0 ? void 0 : _b.url}" with "${easUpdateURL}" for the updates.url value in app.json`);
|
|
31
|
+
}
|
|
28
32
|
}
|
|
29
33
|
else {
|
|
30
34
|
log_1.default.withTick(`Set updates.url value, to "${easUpdateURL}" in app.json`);
|
|
31
35
|
}
|
|
36
|
+
if (!preexistingRuntimeVersion) {
|
|
37
|
+
log_1.default.withTick(`Set runtimeVersion to "${JSON.stringify(defaultRuntimeVersion)}" in app.json`);
|
|
38
|
+
}
|
|
32
39
|
break;
|
|
33
40
|
case 'warn': {
|
|
34
41
|
log_1.default.addNewLineIfNone();
|
|
35
42
|
log_1.default.warn(`It looks like you are using a dynamic configuration! ${(0, log_1.learnMore)('https://docs.expo.dev/workflow/configuration/#dynamic-configuration-with-appconfigjs)')}`);
|
|
36
|
-
log_1.default.warn(
|
|
37
|
-
log_1.default.log(chalk_1.default.bold(`
|
|
38
|
-
log_1.default.
|
|
43
|
+
log_1.default.warn(`In order to finish configuring your project for EAS Update, you are going to need manually add the following to your app.config.js:\n${(0, log_1.learnMore)('https://expo.fyi/eas-update-config.md')}\n`);
|
|
44
|
+
log_1.default.log(chalk_1.default.bold(`{\n updates": {\n "url": "${easUpdateURL}"\n },\n "runtimeVersion": {\n "policy": "sdkVersion"\n }\n}`));
|
|
45
|
+
log_1.default.addNewLineIfNone();
|
|
39
46
|
throw new Error(result.message);
|
|
40
47
|
}
|
|
41
48
|
case 'fail':
|
|
@@ -51,11 +58,12 @@ class UpdateConfigure extends EasCommand_1.default {
|
|
|
51
58
|
const { exp } = (0, config_1.getConfig)(projectDir, {
|
|
52
59
|
skipSDKVersionRequirement: true,
|
|
53
60
|
});
|
|
54
|
-
await ensureEASUrlSetAsync(projectDir, exp);
|
|
55
61
|
const hasAndroidNativeProject = (await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID)) === eas_build_job_1.Workflow.GENERIC;
|
|
56
62
|
const hasIosNativeProject = (await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS)) === eas_build_job_1.Workflow.GENERIC;
|
|
63
|
+
const isBare = hasAndroidNativeProject || hasIosNativeProject;
|
|
64
|
+
await configureProjectForEASUpdateAsync(projectDir, exp, isBare);
|
|
57
65
|
log_1.default.addNewLineIfNone();
|
|
58
|
-
if (
|
|
66
|
+
if (isBare) {
|
|
59
67
|
log_1.default.log(`🧐 It seems you are on the bare workflow! Please also update your native files. You can do this by either running ${chalk_1.default.bold('eas build:configure')} or manually editing Expo.plist/AndroidManifest.xml. ${(0, log_1.learnMore)('https://expo.fyi/eas-update-config.md#native-configuration')}`);
|
|
60
68
|
}
|
|
61
69
|
else {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { flags } from '@oclif/command';
|
|
2
|
+
import EasCommand from '../../commandUtils/EasCommand';
|
|
3
|
+
import { PublishPlatform } from '../../project/publish';
|
|
4
|
+
export declare const defaultPublishPlatforms: PublishPlatform[];
|
|
5
|
+
export default class UpdatePublish extends EasCommand {
|
|
6
|
+
static description: string;
|
|
7
|
+
static flags: {
|
|
8
|
+
branch: flags.IOptionFlag<string | undefined>;
|
|
9
|
+
message: flags.IOptionFlag<string | undefined>;
|
|
10
|
+
republish: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
11
|
+
group: flags.IOptionFlag<string | undefined>;
|
|
12
|
+
'input-dir': flags.IOptionFlag<string>;
|
|
13
|
+
'skip-bundler': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
14
|
+
platform: flags.IOptionFlag<string>;
|
|
15
|
+
json: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
16
|
+
auto: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
17
|
+
};
|
|
18
|
+
runAsync(): Promise<void>;
|
|
19
|
+
}
|