eas-cli 0.33.1 → 0.34.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 +26 -26
- package/build/analytics.js +3 -9
- package/build/build/android/configure.js +2 -2
- package/build/build/android/graphql.js +2 -4
- package/build/build/android/prepareJob.js +4 -3
- package/build/build/build.js +2 -2
- package/build/build/configure.js +14 -7
- package/build/build/ios/UpdatesModule.js +2 -2
- package/build/build/ios/graphql.js +2 -23
- package/build/build/ios/prepareJob.js +4 -6
- package/build/build/metadata.js +5 -10
- package/build/build/utils/devClient.js +2 -2
- package/build/build/utils/repository.js +10 -7
- package/build/build/validate.js +4 -4
- package/build/commandUtils/EasCommand.d.ts +1 -0
- package/build/commandUtils/EasCommand.js +21 -0
- package/build/commands/branch/create.js +3 -2
- package/build/commands/branch/delete.js +1 -1
- package/build/commands/branch/list.js +1 -1
- package/build/commands/branch/publish.js +6 -5
- package/build/commands/branch/view.js +1 -1
- package/build/commands/build/index.js +35 -25
- 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/diagnostics.js +2 -2
- package/build/commands/project/info.js +1 -1
- package/build/commands/update/view.js +1 -1
- package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.js +2 -0
- package/build/credentials/credentialsJson/update.js +5 -4
- package/build/credentials/ios/actions/CreateDistributionCertificate.js +1 -1
- package/build/credentials/ios/actions/CreatePushKey.js +1 -1
- package/build/credentials/ios/actions/DistributionCertificateUtils.d.ts +1 -1
- package/build/credentials/ios/actions/DistributionCertificateUtils.js +5 -7
- package/build/credentials/ios/actions/PushKeyUtils.d.ts +1 -1
- package/build/credentials/ios/actions/PushKeyUtils.js +5 -5
- package/build/credentials/ios/api/graphql/queries/AppQuery.js +3 -1
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +6 -2
- package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +7 -1
- package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +5 -1
- package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.js +2 -0
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +5 -1
- package/build/credentials/manager/Actions.d.ts +47 -0
- package/build/credentials/manager/Actions.js +48 -0
- package/build/credentials/manager/AndroidActions.d.ts +6 -0
- package/build/credentials/manager/AndroidActions.js +114 -0
- package/build/credentials/manager/IosActions.d.ts +6 -0
- package/build/credentials/manager/IosActions.js +110 -0
- package/build/credentials/manager/ManageAndroid.d.ts +1 -29
- package/build/credentials/manager/ManageAndroid.js +26 -159
- package/build/credentials/manager/ManageIos.d.ts +1 -29
- package/build/credentials/manager/ManageIos.js +28 -155
- package/build/graphql/client.d.ts +8 -2
- package/build/graphql/generated.d.ts +85 -8
- package/build/graphql/generated.js +23 -1
- package/build/graphql/queries/BuildQuery.js +4 -1
- package/build/graphql/queries/EnvironmentSecretsQuery.js +4 -2
- package/build/graphql/queries/ProjectQuery.js +3 -1
- package/build/graphql/queries/PublishQuery.js +4 -1
- package/build/graphql/queries/SubmissionQuery.js +5 -2
- package/build/graphql/queries/UserQuery.js +4 -1
- package/build/graphql/queries/WebhookQuery.js +6 -2
- package/build/log.d.ts +0 -2
- package/build/log.js +2 -12
- package/build/project/projectUtils.js +1 -1
- package/build/project/publish.js +2 -2
- package/build/project/workflow.js +2 -2
- package/build/submit/ios/IosSubmitter.js +1 -1
- package/build/user/User.js +1 -0
- package/build/utils/easCli.d.ts +1 -0
- package/build/utils/easCli.js +5 -0
- package/build/utils/{expoCommand.d.ts → expoCli.d.ts} +0 -0
- package/build/utils/{expoCommand.js → expoCli.js} +0 -0
- package/build/utils/profiles.js +9 -2
- package/build/vcs/clients/git.d.ts +26 -0
- package/build/vcs/clients/git.js +184 -0
- package/build/vcs/clients/gitNoCommit.d.ts +7 -0
- package/build/vcs/clients/gitNoCommit.js +27 -0
- package/build/vcs/clients/noVcs.d.ts +6 -0
- package/build/vcs/clients/noVcs.js +19 -0
- package/build/vcs/git.d.ts +10 -17
- package/build/vcs/git.js +7 -175
- package/build/vcs/index.d.ts +2 -2
- package/build/vcs/index.js +15 -6
- package/build/vcs/local.d.ts +18 -5
- package/build/vcs/local.js +61 -32
- package/build/vcs/vcs.d.ts +2 -1
- package/build/vcs/vcs.js +8 -4
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
|
@@ -13,9 +13,9 @@ const prompts_1 = require("../../prompts");
|
|
|
13
13
|
const files_1 = require("../../utils/files");
|
|
14
14
|
const paths_1 = require("../../utils/paths");
|
|
15
15
|
const timer_1 = require("../../utils/timer");
|
|
16
|
-
const vcs_1 =
|
|
16
|
+
const vcs_1 = require("../../vcs");
|
|
17
17
|
async function maybeBailOnRepoStatusAsync() {
|
|
18
|
-
if (!(await vcs_1.
|
|
18
|
+
if (!(await (0, vcs_1.getVcsClient)().isCommitRequiredAsync())) {
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
log_1.default.addNewLineIfNone();
|
|
@@ -30,7 +30,7 @@ async function maybeBailOnRepoStatusAsync() {
|
|
|
30
30
|
}
|
|
31
31
|
exports.maybeBailOnRepoStatusAsync = maybeBailOnRepoStatusAsync;
|
|
32
32
|
async function ensureRepoIsCleanAsync(nonInteractive = false) {
|
|
33
|
-
if (!(await vcs_1.
|
|
33
|
+
if (!(await (0, vcs_1.getVcsClient)().isCommitRequiredAsync())) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
log_1.default.addNewLineIfNone();
|
|
@@ -58,7 +58,7 @@ async function commitPromptAsync({ initialCommitMessage, commitAllFiles, } = {})
|
|
|
58
58
|
initial: initialCommitMessage,
|
|
59
59
|
validate: (input) => input !== '',
|
|
60
60
|
});
|
|
61
|
-
await vcs_1.
|
|
61
|
+
await (0, vcs_1.getVcsClient)().commitAsync({ commitAllFiles, commitMessage: message });
|
|
62
62
|
}
|
|
63
63
|
exports.commitPromptAsync = commitPromptAsync;
|
|
64
64
|
async function makeProjectTarballAsync() {
|
|
@@ -77,7 +77,7 @@ async function makeProjectTarballAsync() {
|
|
|
77
77
|
const compressTimerLabel = 'makeProjectTarballAsync';
|
|
78
78
|
(0, timer_1.startTimer)(compressTimerLabel);
|
|
79
79
|
try {
|
|
80
|
-
await vcs_1.
|
|
80
|
+
await (0, vcs_1.getVcsClient)().makeShallowCopyAsync(shallowClonePath);
|
|
81
81
|
await tar_1.default.create({ cwd: shallowClonePath, file: tarPath, prefix: 'project', gzip: true }, [
|
|
82
82
|
'.',
|
|
83
83
|
]);
|
|
@@ -110,7 +110,10 @@ var ShouldCommitChanges;
|
|
|
110
110
|
})(ShouldCommitChanges || (ShouldCommitChanges = {}));
|
|
111
111
|
async function reviewAndCommitChangesAsync(initialCommitMessage, { nonInteractive, askedFirstTime = true }) {
|
|
112
112
|
if (process.env.EAS_BUILD_AUTOCOMMIT) {
|
|
113
|
-
await vcs_1.
|
|
113
|
+
await (0, vcs_1.getVcsClient)().commitAsync({
|
|
114
|
+
commitMessage: initialCommitMessage,
|
|
115
|
+
commitAllFiles: false,
|
|
116
|
+
});
|
|
114
117
|
log_1.default.withTick('Committed changes.');
|
|
115
118
|
return;
|
|
116
119
|
}
|
|
@@ -140,7 +143,7 @@ async function reviewAndCommitChangesAsync(initialCommitMessage, { nonInteractiv
|
|
|
140
143
|
log_1.default.withTick('Committed changes.');
|
|
141
144
|
}
|
|
142
145
|
else if (selected === ShouldCommitChanges.ShowDiffFirst) {
|
|
143
|
-
await vcs_1.
|
|
146
|
+
await (0, vcs_1.getVcsClient)().showDiffAsync();
|
|
144
147
|
await reviewAndCommitChangesAsync(initialCommitMessage, {
|
|
145
148
|
nonInteractive,
|
|
146
149
|
askedFirstTime: false,
|
package/build/build/validate.js
CHANGED
|
@@ -6,7 +6,7 @@ const eas_build_job_1 = require("@expo/eas-build-job");
|
|
|
6
6
|
const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
|
|
7
7
|
const path_1 = (0, tslib_1.__importDefault)(require("path"));
|
|
8
8
|
const log_1 = (0, tslib_1.__importStar)(require("../log"));
|
|
9
|
-
const vcs_1 =
|
|
9
|
+
const vcs_1 = require("../vcs");
|
|
10
10
|
function checkNodeEnvVariable(ctx) {
|
|
11
11
|
var _a;
|
|
12
12
|
if (((_a = ctx.buildProfile.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) === 'production') {
|
|
@@ -24,14 +24,14 @@ async function checkGoogleServicesFileAsync(ctx) {
|
|
|
24
24
|
if (!googleServicesFilePath) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
const rootDir = path_1.default.normalize(await vcs_1.
|
|
27
|
+
const rootDir = path_1.default.normalize(await (0, vcs_1.getVcsClient)().getRootPathAsync());
|
|
28
28
|
const absGoogleServicesFilePath = path_1.default.resolve(ctx.projectDir, googleServicesFilePath);
|
|
29
29
|
if ((await fs_extra_1.default.pathExists(absGoogleServicesFilePath)) &&
|
|
30
30
|
(!isInsideDirectory(absGoogleServicesFilePath, rootDir) ||
|
|
31
|
-
(await vcs_1.
|
|
31
|
+
(await (0, vcs_1.getVcsClient)().isFileIgnoredAsync(path_1.default.relative(rootDir, absGoogleServicesFilePath))))) {
|
|
32
32
|
log_1.default.warn(`File specified via "${ctx.platform}.googleServicesFile" field in your app.json is not checked in to your repository and won't be uploaded to the builder.`);
|
|
33
33
|
log_1.default.warn(`Use EAS Secret to pass all values that you don't want to include in your version control. ${(0, log_1.learnMore)('https://docs.expo.dev/build-reference/variables/#using-secrets-in-environment-variables')}`);
|
|
34
|
-
log_1.default.warn(
|
|
34
|
+
log_1.default.warn(`If you are using that file for compatibility with the classic build service (expo build) you can silence this warning by setting your build profile's env.GOOGLE_SERVICES_FILE in eas.json to any non-empty string.`);
|
|
35
35
|
log_1.default.newLine();
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const eas_json_1 = require("@expo/eas-json");
|
|
3
5
|
const command_1 = require("@oclif/command");
|
|
6
|
+
const semver_1 = (0, tslib_1.__importDefault)(require("semver"));
|
|
4
7
|
const analytics_1 = require("../analytics");
|
|
8
|
+
const log_1 = (0, tslib_1.__importDefault)(require("../log"));
|
|
9
|
+
const projectUtils_1 = require("../project/projectUtils");
|
|
5
10
|
const User_1 = require("../user/User");
|
|
6
11
|
const actions_1 = require("../user/actions");
|
|
12
|
+
const easCli_1 = require("../utils/easCli");
|
|
13
|
+
const vcs_1 = require("../vcs");
|
|
14
|
+
const git_1 = (0, tslib_1.__importDefault)(require("../vcs/clients/git"));
|
|
7
15
|
class EasCommand extends command_1.Command {
|
|
8
16
|
constructor() {
|
|
9
17
|
super(...arguments);
|
|
@@ -16,7 +24,9 @@ class EasCommand extends command_1.Command {
|
|
|
16
24
|
// eslint-disable-next-line async-protect/async-suffix
|
|
17
25
|
async run() {
|
|
18
26
|
var _a;
|
|
27
|
+
eas_json_1.EasJsonReader.setLog(log_1.default);
|
|
19
28
|
await (0, analytics_1.initAsync)();
|
|
29
|
+
await this.applyCliConfigAsync();
|
|
20
30
|
if (this.requiresAuthentication) {
|
|
21
31
|
const { flags } = this.parse();
|
|
22
32
|
const nonInteractive = (_a = flags['non-interactive']) !== null && _a !== void 0 ? _a : false;
|
|
@@ -37,5 +47,16 @@ class EasCommand extends command_1.Command {
|
|
|
37
47
|
await (0, analytics_1.flushAsync)();
|
|
38
48
|
return super.finally(err);
|
|
39
49
|
}
|
|
50
|
+
async applyCliConfigAsync() {
|
|
51
|
+
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
52
|
+
const easJsonReader = new eas_json_1.EasJsonReader(projectDir);
|
|
53
|
+
const config = await easJsonReader.getCliConfigAsync();
|
|
54
|
+
if ((config === null || config === void 0 ? void 0 : config.version) && !semver_1.default.satisfies(easCli_1.easCliVersion, config.version)) {
|
|
55
|
+
throw new Error(`You are on eas-cli@${easCli_1.easCliVersion} which does not satisfy the CLI version constraint in eas.json (${config.version})`);
|
|
56
|
+
}
|
|
57
|
+
if (config === null || config === void 0 ? void 0 : config.requireCommit) {
|
|
58
|
+
(0, vcs_1.setVcsClient)(new git_1.default());
|
|
59
|
+
}
|
|
60
|
+
}
|
|
40
61
|
}
|
|
41
62
|
exports.default = EasCommand;
|
|
@@ -11,7 +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 vcs_1 =
|
|
14
|
+
const vcs_1 = require("../../vcs");
|
|
15
15
|
async function createUpdateBranchOnAppAsync({ appId, name, }) {
|
|
16
16
|
const result = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
17
17
|
.mutation((0, graphql_tag_1.default) `
|
|
@@ -51,7 +51,8 @@ class BranchCreate extends EasCommand_1.default {
|
|
|
51
51
|
type: 'text',
|
|
52
52
|
name: 'name',
|
|
53
53
|
message: 'Please name the branch:',
|
|
54
|
-
initial: (await vcs_1.
|
|
54
|
+
initial: (await (0, vcs_1.getVcsClient)().getBranchNameAsync()) ||
|
|
55
|
+
`branch-${Math.random().toString(36).substr(2, 4)}`,
|
|
55
56
|
validate: value => (value ? true : validationMessage),
|
|
56
57
|
}));
|
|
57
58
|
}
|
|
@@ -34,7 +34,7 @@ async function listBranchesAsync({ projectId, }) {
|
|
|
34
34
|
`, {
|
|
35
35
|
appId: projectId,
|
|
36
36
|
limit: BRANCHES_LIMIT,
|
|
37
|
-
})
|
|
37
|
+
}, { additionalTypenames: ['UpdateBranch'] })
|
|
38
38
|
.toPromise());
|
|
39
39
|
return (_b = (_a = data === null || data === void 0 ? void 0 : data.app) === null || _a === void 0 ? void 0 : _a.byId.updateBranches) !== null && _b !== void 0 ? _b : [];
|
|
40
40
|
}
|
|
@@ -22,7 +22,7 @@ const prompts_1 = require("../../prompts");
|
|
|
22
22
|
const utils_1 = require("../../update/utils");
|
|
23
23
|
const uniqBy_1 = (0, tslib_1.__importDefault)(require("../../utils/expodash/uniqBy"));
|
|
24
24
|
const formatFields_1 = (0, tslib_1.__importDefault)(require("../../utils/formatFields"));
|
|
25
|
-
const vcs_1 =
|
|
25
|
+
const vcs_1 = require("../../vcs");
|
|
26
26
|
const create_1 = require("./create");
|
|
27
27
|
const list_1 = require("./list");
|
|
28
28
|
const view_1 = require("./view");
|
|
@@ -42,7 +42,7 @@ async function getUpdateGroupAsync({ group, }) {
|
|
|
42
42
|
}
|
|
43
43
|
`, {
|
|
44
44
|
group,
|
|
45
|
-
})
|
|
45
|
+
}, { additionalTypenames: ['Update'] })
|
|
46
46
|
.toPromise());
|
|
47
47
|
return updatesByGroup;
|
|
48
48
|
}
|
|
@@ -75,7 +75,8 @@ class BranchPublish extends EasCommand_1.default {
|
|
|
75
75
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
76
76
|
if (!branchName && autoFlag) {
|
|
77
77
|
branchName =
|
|
78
|
-
(await vcs_1.
|
|
78
|
+
(await (0, vcs_1.getVcsClient)().getBranchNameAsync()) ||
|
|
79
|
+
`branch-${Math.random().toString(36).substr(2, 4)}`;
|
|
79
80
|
}
|
|
80
81
|
if (!branchName) {
|
|
81
82
|
const validationMessage = 'branch name may not be empty.';
|
|
@@ -172,7 +173,7 @@ class BranchPublish extends EasCommand_1.default {
|
|
|
172
173
|
}
|
|
173
174
|
}
|
|
174
175
|
if (!message && autoFlag) {
|
|
175
|
-
message = (_b = (await vcs_1.
|
|
176
|
+
message = (_b = (await (0, vcs_1.getVcsClient)().getLastCommitMessageAsync())) === null || _b === void 0 ? void 0 : _b.trim();
|
|
176
177
|
}
|
|
177
178
|
if (!message) {
|
|
178
179
|
const validationMessage = 'publish message may not be empty.';
|
|
@@ -185,7 +186,7 @@ class BranchPublish extends EasCommand_1.default {
|
|
|
185
186
|
message: `Please enter a publication message.`,
|
|
186
187
|
initial: republish
|
|
187
188
|
? `Republish "${oldMessage}" - group: ${group}`
|
|
188
|
-
: (_c = (await vcs_1.
|
|
189
|
+
: (_c = (await (0, vcs_1.getVcsClient)().getLastCommitMessageAsync())) === null || _c === void 0 ? void 0 : _c.trim(),
|
|
189
190
|
validate: value => (value ? true : validationMessage),
|
|
190
191
|
}));
|
|
191
192
|
}
|
|
@@ -7,6 +7,8 @@ const eas_json_1 = require("@expo/eas-json");
|
|
|
7
7
|
const command_1 = require("@oclif/command");
|
|
8
8
|
const errors_1 = require("@oclif/errors");
|
|
9
9
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
10
|
+
const figures_1 = (0, tslib_1.__importDefault)(require("figures"));
|
|
11
|
+
const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
|
|
10
12
|
const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
|
|
11
13
|
const build_1 = require("../../build/android/build");
|
|
12
14
|
const build_2 = require("../../build/build");
|
|
@@ -19,7 +21,7 @@ const repository_1 = require("../../build/utils/repository");
|
|
|
19
21
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
20
22
|
const generated_1 = require("../../graphql/generated");
|
|
21
23
|
const AppPlatform_1 = require("../../graphql/types/AppPlatform");
|
|
22
|
-
const log_1 = (0, tslib_1.
|
|
24
|
+
const log_1 = (0, tslib_1.__importStar)(require("../../log"));
|
|
23
25
|
const platform_1 = require("../../platform");
|
|
24
26
|
const isEasEnabledForProject_1 = require("../../project/isEasEnabledForProject");
|
|
25
27
|
const metroConfig_1 = require("../../project/metroConfig");
|
|
@@ -28,9 +30,11 @@ const prompts_1 = require("../../prompts");
|
|
|
28
30
|
const context_2 = require("../../submit/context");
|
|
29
31
|
const submit_1 = require("../../submit/submit");
|
|
30
32
|
const urls_1 = require("../../submit/utils/urls");
|
|
33
|
+
const easCli_1 = require("../../utils/easCli");
|
|
31
34
|
const json_1 = require("../../utils/json");
|
|
32
35
|
const profiles_1 = require("../../utils/profiles");
|
|
33
|
-
const vcs_1 =
|
|
36
|
+
const vcs_1 = require("../../vcs");
|
|
37
|
+
const git_1 = (0, tslib_1.__importDefault)(require("../../vcs/clients/git"));
|
|
34
38
|
class Build extends EasCommand_1.default {
|
|
35
39
|
constructor() {
|
|
36
40
|
super(...arguments);
|
|
@@ -46,7 +50,7 @@ class Build extends EasCommand_1.default {
|
|
|
46
50
|
const { requestedPlatform } = flags;
|
|
47
51
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
48
52
|
await handleDeprecatedEasJsonAsync(projectDir, flags.nonInteractive);
|
|
49
|
-
await vcs_1.
|
|
53
|
+
await (0, vcs_1.getVcsClient)().ensureRepoExistsAsync();
|
|
50
54
|
await (0, repository_1.ensureRepoIsCleanAsync)(flags.nonInteractive);
|
|
51
55
|
await (0, configure_1.ensureProjectConfiguredAsync)(projectDir, requestedPlatform);
|
|
52
56
|
const platforms = (0, platform_1.toPlatforms)(requestedPlatform);
|
|
@@ -272,28 +276,34 @@ Build.flags = {
|
|
|
272
276
|
}),
|
|
273
277
|
};
|
|
274
278
|
async function handleDeprecatedEasJsonAsync(projectDir, nonInteractive) {
|
|
275
|
-
if (await (
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
279
|
+
if (!(await fs_extra_1.default.pathExists(eas_json_1.EasJsonReader.formatEasJsonPath(projectDir)))) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
const easJsonReader = new eas_json_1.EasJsonReader(projectDir);
|
|
283
|
+
const rawEasJson = await easJsonReader.readRawAsync();
|
|
284
|
+
if (rawEasJson === null || rawEasJson === void 0 ? void 0 : rawEasJson.cli) {
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
if (nonInteractive) {
|
|
288
|
+
log_1.default.warn(`${figures_1.default.warning} Action required: the default behavior of EAS CLI has changed and your eas.json must be updated to remove ambiguity around which Git integration workflow to use. Refer to ${(0, log_1.link)('https://expo.fyi/eas-vcs-workflow')} for more information.`);
|
|
289
|
+
log_1.default.warn('This warning will become an error in an upcoming EAS CLI release. For now, we will proceed with the old default behavior to avoid disruption of your builds.');
|
|
290
|
+
(0, vcs_1.setVcsClient)(new git_1.default());
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
log_1.default.log(`${chalk_1.default.bold('eas-cli@>=0.34.0 no longer requires that you commit changes to Git before starting a build.')} ${(0, log_1.learnMore)('https://expo.fyi/eas-vcs-workflow')}`);
|
|
294
|
+
log_1.default.log(`If you want to continue using the Git integration, you can opt in with ${chalk_1.default.bold('cli.requireCommit')} in ${chalk_1.default.bold('eas.json')} or with the following prompt`);
|
|
295
|
+
log_1.default.newLine();
|
|
296
|
+
const mode = await (0, prompts_1.selectAsync)('Select your preferred Git integration', [
|
|
297
|
+
{ title: 'Require changes to be committed in Git (old default)', value: 'requireCommit' },
|
|
298
|
+
{ title: 'Allow builds with dirty Git working tree (new default)', value: 'noCommit' },
|
|
299
|
+
]);
|
|
300
|
+
rawEasJson.cli =
|
|
301
|
+
mode === 'requireCommit'
|
|
302
|
+
? { version: `>= ${easCli_1.easCliVersion}`, requireCommit: true }
|
|
303
|
+
: { version: `>= ${easCli_1.easCliVersion}` };
|
|
304
|
+
await fs_extra_1.default.writeJSON(eas_json_1.EasJsonReader.formatEasJsonPath(projectDir), rawEasJson, { spaces: 2 });
|
|
305
|
+
if (mode === 'requireCommit') {
|
|
306
|
+
(0, vcs_1.setVcsClient)(new git_1.default());
|
|
297
307
|
}
|
|
298
308
|
}
|
|
299
309
|
exports.handleDeprecatedEasJsonAsync = handleDeprecatedEasJsonAsync;
|
|
@@ -30,7 +30,7 @@ async function getChannelByNameForAppAsync({ appId, channelName, }) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
`, { appId, channelName })
|
|
33
|
+
`, { appId, channelName }, { additionalTypenames: ['UpdateChannel', 'UpdateBranch'] })
|
|
34
34
|
.toPromise());
|
|
35
35
|
const updateChannelByNameResult = (_a = data.app) === null || _a === void 0 ? void 0 : _a.byId.updateChannelByName;
|
|
36
36
|
if (!updateChannelByNameResult) {
|
|
@@ -47,7 +47,7 @@ async function getAllUpdateChannelForAppAsync({ appId, }) {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
`, { appId, offset: 0, limit: CHANNEL_LIMIT })
|
|
50
|
+
`, { appId, offset: 0, limit: CHANNEL_LIMIT }, { additionalTypenames: ['UpdateChannel', 'UpdateBranch', 'Update'] })
|
|
51
51
|
.toPromise());
|
|
52
52
|
}
|
|
53
53
|
class ChannelList extends EasCommand_1.default {
|
|
@@ -101,7 +101,7 @@ async function getUpdateChannelByNameForAppAsync({ appId, channelName, }) {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
`, { appId, channelName })
|
|
104
|
+
`, { appId, channelName }, { additionalTypenames: ['UpdateChannel', 'UpdateBranch', 'Update'] })
|
|
105
105
|
.toPromise());
|
|
106
106
|
}
|
|
107
107
|
exports.getUpdateChannelByNameForAppAsync = getUpdateChannelByNameForAppAsync;
|
|
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const envinfo_1 = (0, tslib_1.__importDefault)(require("envinfo"));
|
|
5
5
|
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../commandUtils/EasCommand"));
|
|
6
6
|
const log_1 = (0, tslib_1.__importDefault)(require("../log"));
|
|
7
|
-
const
|
|
7
|
+
const easCli_1 = require("../utils/easCli");
|
|
8
8
|
class Diagnostics extends EasCommand_1.default {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
@@ -28,7 +28,7 @@ class Diagnostics extends EasCommand_1.default {
|
|
|
28
28
|
],
|
|
29
29
|
npmGlobalPackages: ['eas-cli', 'expo-cli'],
|
|
30
30
|
}, {
|
|
31
|
-
title: `EAS CLI ${
|
|
31
|
+
title: `EAS CLI ${easCli_1.easCliVersion} environment info`,
|
|
32
32
|
});
|
|
33
33
|
log_1.default.log(info);
|
|
34
34
|
}
|
|
@@ -24,6 +24,8 @@ exports.GoogleServiceAccountKeyQuery = {
|
|
|
24
24
|
${(0, graphql_1.print)(GoogleServiceAccountKey_1.GoogleServiceAccountKeyFragmentNode)}
|
|
25
25
|
`, {
|
|
26
26
|
accountName,
|
|
27
|
+
}, {
|
|
28
|
+
additionalTypenames: ['GoogleServiceAccountKey'],
|
|
27
29
|
})
|
|
28
30
|
.toPromise());
|
|
29
31
|
return data.account.byName.googleServiceAccountKeys;
|
|
@@ -8,8 +8,8 @@ const path_1 = (0, tslib_1.__importDefault)(require("path"));
|
|
|
8
8
|
const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
|
|
9
9
|
const target_1 = require("../../project/ios/target");
|
|
10
10
|
const zipObject_1 = (0, tslib_1.__importDefault)(require("../../utils/expodash/zipObject"));
|
|
11
|
-
const vcs_1 =
|
|
12
|
-
const git_1 = (0, tslib_1.__importDefault)(require("../../vcs/git"));
|
|
11
|
+
const vcs_1 = require("../../vcs");
|
|
12
|
+
const git_1 = (0, tslib_1.__importDefault)(require("../../vcs/clients/git"));
|
|
13
13
|
const read_1 = require("./read");
|
|
14
14
|
const utils_1 = require("./utils");
|
|
15
15
|
/**
|
|
@@ -197,8 +197,9 @@ async function updateFileAsync(projectDir, filePath, base64Data) {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
async function isFileUntrackedAsync(path) {
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
const vcsClient = (0, vcs_1.getVcsClient)();
|
|
201
|
+
if (vcsClient instanceof git_1.default) {
|
|
202
|
+
return await vcsClient.isFileUntrackedAsync(path);
|
|
202
203
|
}
|
|
203
204
|
return false;
|
|
204
205
|
}
|
|
@@ -9,7 +9,7 @@ class CreateDistributionCertificate {
|
|
|
9
9
|
this.account = account;
|
|
10
10
|
}
|
|
11
11
|
async runAsync(ctx) {
|
|
12
|
-
const distCert = await (0, DistributionCertificateUtils_1.provideOrGenerateDistributionCertificateAsync)(ctx
|
|
12
|
+
const distCert = await (0, DistributionCertificateUtils_1.provideOrGenerateDistributionCertificateAsync)(ctx);
|
|
13
13
|
const result = await ctx.ios.createDistributionCertificateAsync(this.account, distCert);
|
|
14
14
|
log_1.default.succeed('Created distribution certificate');
|
|
15
15
|
return result;
|
|
@@ -12,7 +12,7 @@ class CreatePushKey {
|
|
|
12
12
|
if (ctx.nonInteractive) {
|
|
13
13
|
throw new Error(`A new push key cannot be created in non-interactive mode.`);
|
|
14
14
|
}
|
|
15
|
-
const pushKey = await (0, PushKeyUtils_1.provideOrGeneratePushKeyAsync)(ctx
|
|
15
|
+
const pushKey = await (0, PushKeyUtils_1.provideOrGeneratePushKeyAsync)(ctx);
|
|
16
16
|
const result = await ctx.ios.createPushKeyAsync(this.account, pushKey);
|
|
17
17
|
log_1.default.succeed('Created push key');
|
|
18
18
|
return result;
|
|
@@ -12,4 +12,4 @@ export declare function selectDistributionCertificateWithDependenciesAsync(ctx:
|
|
|
12
12
|
* select a distribution certificate from a valid set (curated on a best effort basis)
|
|
13
13
|
* */
|
|
14
14
|
export declare function selectValidDistributionCertificateAsync(ctx: CredentialsContext, appLookupParams: AppLookupParams): Promise<AppleDistributionCertificateFragment | null>;
|
|
15
|
-
export declare function provideOrGenerateDistributionCertificateAsync(ctx: CredentialsContext
|
|
15
|
+
export declare function provideOrGenerateDistributionCertificateAsync(ctx: CredentialsContext): Promise<DistributionCertificate>;
|
|
@@ -99,7 +99,7 @@ You can have only ${chalk_1.default.underline('three')} Apple Distribution Certi
|
|
|
99
99
|
Please revoke the old ones or reuse existing from your other apps.
|
|
100
100
|
Please remember that Apple Distribution Certificates are not application specific!
|
|
101
101
|
`;
|
|
102
|
-
async function provideOrGenerateDistributionCertificateAsync(ctx
|
|
102
|
+
async function provideOrGenerateDistributionCertificateAsync(ctx) {
|
|
103
103
|
if (!ctx.nonInteractive) {
|
|
104
104
|
const userProvided = await promptForDistCertAsync(ctx);
|
|
105
105
|
if (userProvided) {
|
|
@@ -112,13 +112,11 @@ async function provideOrGenerateDistributionCertificateAsync(ctx, accountName) {
|
|
|
112
112
|
if (!isValid) {
|
|
113
113
|
log_1.default.warn("Provided Distribution Certificate is no longer valid on Apple's server");
|
|
114
114
|
}
|
|
115
|
-
return isValid
|
|
116
|
-
? userProvided
|
|
117
|
-
: await provideOrGenerateDistributionCertificateAsync(ctx, accountName);
|
|
115
|
+
return isValid ? userProvided : await provideOrGenerateDistributionCertificateAsync(ctx);
|
|
118
116
|
}
|
|
119
117
|
}
|
|
120
118
|
}
|
|
121
|
-
return await generateDistributionCertificateAsync(ctx
|
|
119
|
+
return await generateDistributionCertificateAsync(ctx);
|
|
122
120
|
}
|
|
123
121
|
exports.provideOrGenerateDistributionCertificateAsync = provideOrGenerateDistributionCertificateAsync;
|
|
124
122
|
async function promptForDistCertAsync(ctx) {
|
|
@@ -140,7 +138,7 @@ async function promptForDistCertAsync(ctx) {
|
|
|
140
138
|
}
|
|
141
139
|
return userProvided;
|
|
142
140
|
}
|
|
143
|
-
async function generateDistributionCertificateAsync(ctx
|
|
141
|
+
async function generateDistributionCertificateAsync(ctx) {
|
|
144
142
|
await ctx.appStore.ensureAuthenticatedAsync();
|
|
145
143
|
try {
|
|
146
144
|
return await ctx.appStore.createDistributionCertificateAsync();
|
|
@@ -176,7 +174,7 @@ async function generateDistributionCertificateAsync(ctx, accountName) {
|
|
|
176
174
|
throw e;
|
|
177
175
|
}
|
|
178
176
|
}
|
|
179
|
-
return await generateDistributionCertificateAsync(ctx
|
|
177
|
+
return await generateDistributionCertificateAsync(ctx);
|
|
180
178
|
}
|
|
181
179
|
function formatDistributionCertificateFromApple(appleInfo) {
|
|
182
180
|
const { name, status, id, expires, created, ownerName, serialNumber } = appleInfo;
|
|
@@ -2,7 +2,7 @@ import { ApplePushKeyFragment } from '../../../graphql/generated';
|
|
|
2
2
|
import { Account } from '../../../user/Account';
|
|
3
3
|
import { CredentialsContext } from '../../context';
|
|
4
4
|
import { PushKey } from '../appstore/Credentials.types';
|
|
5
|
-
export declare function provideOrGeneratePushKeyAsync(ctx: CredentialsContext
|
|
5
|
+
export declare function provideOrGeneratePushKeyAsync(ctx: CredentialsContext): Promise<PushKey>;
|
|
6
6
|
/**
|
|
7
7
|
* select a push key from an account (validity status shown on a best effort basis)
|
|
8
8
|
* */
|
|
@@ -12,7 +12,7 @@ const pushKey_1 = require("../appstore/pushKey");
|
|
|
12
12
|
const credentials_1 = require("../credentials");
|
|
13
13
|
const validatePushKey_1 = require("../validators/validatePushKey");
|
|
14
14
|
const AppleTeamUtils_1 = require("./AppleTeamUtils");
|
|
15
|
-
async function provideOrGeneratePushKeyAsync(ctx
|
|
15
|
+
async function provideOrGeneratePushKeyAsync(ctx) {
|
|
16
16
|
if (!ctx.nonInteractive) {
|
|
17
17
|
const userProvided = await promptForPushKeyAsync(ctx);
|
|
18
18
|
if (userProvided) {
|
|
@@ -32,11 +32,11 @@ async function provideOrGeneratePushKeyAsync(ctx, accountName) {
|
|
|
32
32
|
if (useUserProvided) {
|
|
33
33
|
return userProvided;
|
|
34
34
|
}
|
|
35
|
-
return await provideOrGeneratePushKeyAsync(ctx
|
|
35
|
+
return await provideOrGeneratePushKeyAsync(ctx);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
return await generatePushKeyAsync(ctx
|
|
39
|
+
return await generatePushKeyAsync(ctx);
|
|
40
40
|
}
|
|
41
41
|
exports.provideOrGeneratePushKeyAsync = provideOrGeneratePushKeyAsync;
|
|
42
42
|
async function promptForPushKeyAsync(ctx) {
|
|
@@ -58,7 +58,7 @@ async function promptForPushKeyAsync(ctx) {
|
|
|
58
58
|
}
|
|
59
59
|
return userProvided;
|
|
60
60
|
}
|
|
61
|
-
async function generatePushKeyAsync(ctx
|
|
61
|
+
async function generatePushKeyAsync(ctx) {
|
|
62
62
|
await ctx.appStore.ensureAuthenticatedAsync();
|
|
63
63
|
try {
|
|
64
64
|
return await ctx.appStore.createPushKeyAsync();
|
|
@@ -94,7 +94,7 @@ async function generatePushKeyAsync(ctx, accountName) {
|
|
|
94
94
|
throw e;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
return await generatePushKeyAsync(ctx
|
|
97
|
+
return await generatePushKeyAsync(ctx);
|
|
98
98
|
}
|
|
99
99
|
function formatPushKeyFromApple(pushKey) {
|
|
100
100
|
const { name, id } = pushKey;
|
|
@@ -20,7 +20,9 @@ exports.AppQuery = {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
${(0, graphql_1.print)(App_1.AppFragmentNode)}
|
|
23
|
-
`, { fullName }
|
|
23
|
+
`, { fullName }, {
|
|
24
|
+
additionalTypenames: ['App'],
|
|
25
|
+
})
|
|
24
26
|
.toPromise());
|
|
25
27
|
(0, assert_1.default)(data.app, 'GraphQL: `app` not defined in server response');
|
|
26
28
|
return data.app.byFullName;
|
|
@@ -68,7 +68,9 @@ exports.AppleDeviceQuery = {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
`, { accountName, appleTeamIdentifier }
|
|
71
|
+
`, { accountName, appleTeamIdentifier }, {
|
|
72
|
+
additionalTypenames: ['AppleDevice', 'AppleTeam'],
|
|
73
|
+
})
|
|
72
74
|
.toPromise());
|
|
73
75
|
return data.account.byName.appleTeams[0];
|
|
74
76
|
},
|
|
@@ -95,7 +97,9 @@ exports.AppleDeviceQuery = {
|
|
|
95
97
|
}
|
|
96
98
|
}
|
|
97
99
|
}
|
|
98
|
-
`, { accountName, identifier }
|
|
100
|
+
`, { accountName, identifier }, {
|
|
101
|
+
additionalTypenames: ['AppleDevice', 'AppleTeam'],
|
|
102
|
+
})
|
|
99
103
|
.toPromise());
|
|
100
104
|
return (_a = data.account.byName.appleDevices[0]) !== null && _a !== void 0 ? _a : null;
|
|
101
105
|
},
|
|
@@ -47,7 +47,11 @@ exports.AppleDistributionCertificateQuery = {
|
|
|
47
47
|
appleAppIdentifierId,
|
|
48
48
|
iosDistributionType,
|
|
49
49
|
}, {
|
|
50
|
-
additionalTypenames: [
|
|
50
|
+
additionalTypenames: [
|
|
51
|
+
'AppleDistributionCertificate',
|
|
52
|
+
'IosAppCredentials',
|
|
53
|
+
'IosAppBuildCredentials',
|
|
54
|
+
],
|
|
51
55
|
})
|
|
52
56
|
.toPromise());
|
|
53
57
|
(0, assert_1.default)(data.app, 'GraphQL: `app` not defined in server response');
|
|
@@ -70,6 +74,8 @@ exports.AppleDistributionCertificateQuery = {
|
|
|
70
74
|
${(0, graphql_1.print)(AppleDistributionCertificate_1.AppleDistributionCertificateFragmentNode)}
|
|
71
75
|
`, {
|
|
72
76
|
accountName,
|
|
77
|
+
}, {
|
|
78
|
+
additionalTypenames: ['AppleDistributionCertificate'],
|
|
73
79
|
})
|
|
74
80
|
.toPromise());
|
|
75
81
|
return data.account.byName.appleDistributionCertificates;
|
|
@@ -59,7 +59,11 @@ exports.AppleProvisioningProfileQuery = {
|
|
|
59
59
|
appleAppIdentifierId,
|
|
60
60
|
iosDistributionType,
|
|
61
61
|
}, {
|
|
62
|
-
additionalTypenames: [
|
|
62
|
+
additionalTypenames: [
|
|
63
|
+
'AppleProvisioningProfile',
|
|
64
|
+
'IosAppCredentials',
|
|
65
|
+
'IosAppBuildCredentials',
|
|
66
|
+
],
|
|
63
67
|
})
|
|
64
68
|
.toPromise());
|
|
65
69
|
(0, assert_1.default)(data.app, 'GraphQL: `app` not defined in server response');
|