eas-cli 5.4.0 → 5.5.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 +103 -55
- package/build/branch/utils.d.ts +2 -1
- package/build/branch/utils.js +2 -4
- package/build/build/android/build.js +5 -3
- package/build/build/android/prepareJob.js +1 -2
- package/build/build/android/syncProjectConfiguration.d.ts +3 -1
- package/build/build/android/syncProjectConfiguration.js +2 -2
- package/build/build/android/version.d.ts +4 -2
- package/build/build/android/version.js +4 -4
- package/build/build/build.d.ts +1 -3
- package/build/build/build.js +7 -58
- package/build/build/configure.d.ts +2 -0
- package/build/build/configure.js +9 -10
- package/build/build/context.d.ts +4 -0
- package/build/build/createContext.d.ts +3 -1
- package/build/build/createContext.js +7 -2
- package/build/build/ios/build.js +4 -0
- package/build/build/ios/prepareJob.js +1 -2
- package/build/build/ios/syncProjectConfiguration.d.ts +3 -1
- package/build/build/ios/syncProjectConfiguration.js +3 -3
- package/build/build/ios/version.d.ts +6 -4
- package/build/build/ios/version.js +10 -10
- package/build/build/metadata.js +7 -8
- package/build/build/runBuildAndSubmit.d.ts +2 -1
- package/build/build/runBuildAndSubmit.js +12 -8
- package/build/build/utils/devClient.d.ts +3 -1
- package/build/build/utils/devClient.js +6 -7
- package/build/build/utils/repository.d.ts +6 -5
- package/build/build/utils/repository.js +14 -15
- package/build/build/utils/resourceClass.js +3 -12
- package/build/build/validate.js +2 -3
- package/build/commandUtils/EasCommand.d.ts +4 -0
- package/build/commandUtils/EasCommand.js +4 -0
- package/build/commandUtils/context/VcsClientContextField.d.ts +5 -0
- package/build/commandUtils/context/VcsClientContextField.js +11 -0
- package/build/commands/branch/create.d.ts +1 -0
- package/build/commands/branch/create.js +3 -2
- package/build/commands/build/cancel.d.ts +1 -0
- package/build/commands/build/cancel.js +1 -0
- package/build/commands/build/configure.d.ts +1 -0
- package/build/commands/build/configure.js +8 -6
- package/build/commands/build/index.d.ts +1 -0
- package/build/commands/build/index.js +3 -2
- package/build/commands/build/inspect.d.ts +1 -0
- package/build/commands/build/inspect.js +5 -6
- package/build/commands/build/internal.d.ts +1 -0
- package/build/commands/build/internal.js +3 -2
- package/build/commands/build/list.d.ts +1 -0
- package/build/commands/build/list.js +1 -0
- package/build/commands/build/resign.d.ts +1 -0
- package/build/commands/build/resign.js +5 -3
- package/build/commands/build/run.d.ts +1 -0
- package/build/commands/build/run.js +1 -0
- package/build/commands/build/version/get.d.ts +1 -0
- package/build/commands/build/version/get.js +3 -1
- package/build/commands/build/version/set.d.ts +1 -0
- package/build/commands/build/version/set.js +3 -1
- package/build/commands/build/version/sync.d.ts +1 -0
- package/build/commands/build/version/sync.js +9 -4
- package/build/commands/build/view.d.ts +1 -0
- package/build/commands/build/view.js +1 -0
- package/build/commands/credentials.d.ts +1 -0
- package/build/commands/credentials.js +3 -2
- package/build/commands/diagnostics.d.ts +1 -0
- package/build/commands/diagnostics.js +6 -5
- package/build/commands/metadata/pull.d.ts +1 -0
- package/build/commands/metadata/pull.js +4 -2
- package/build/commands/metadata/push.d.ts +1 -0
- package/build/commands/metadata/push.js +4 -2
- package/build/commands/project/init.d.ts +1 -0
- package/build/commands/project/init.js +43 -11
- package/build/commands/submit.d.ts +1 -0
- package/build/commands/submit.js +3 -1
- package/build/commands/update/configure.d.ts +1 -0
- package/build/commands/update/configure.js +4 -3
- package/build/commands/update/index.d.ts +1 -0
- package/build/commands/update/index.js +17 -11
- package/build/commands/update/roll-back-to-embedded.d.ts +1 -1
- package/build/commands/update/roll-back-to-embedded.js +8 -6
- package/build/commands/update/rollback.d.ts +0 -1
- package/build/commands/update/rollback.js +0 -1
- package/build/credentials/android/actions/BuildCredentialsUtils.js +1 -1
- package/build/credentials/android/api/GraphqlClient.js +0 -1
- package/build/credentials/context.d.ts +3 -0
- package/build/credentials/context.js +1 -0
- package/build/credentials/credentialsJson/update.js +6 -8
- package/build/credentials/ios/actions/DeviceUtils.js +1 -1
- package/build/credentials/manager/HelperActions.d.ts +2 -0
- package/build/credentials/manager/ManageAndroid.js +2 -1
- package/build/credentials/manager/ManageIos.js +3 -0
- package/build/credentials/manager/SelectPlatform.d.ts +3 -1
- package/build/credentials/manager/SelectPlatform.js +2 -1
- package/build/graphql/generated.d.ts +457 -4
- package/build/graphql/generated.js +7 -2
- package/build/graphql/types/Account.js +4 -0
- package/build/graphql/types/credentials/AppleDevice.js +1 -0
- package/build/metadata/auth.js +4 -4
- package/build/project/android/applicationId.d.ts +4 -2
- package/build/project/android/applicationId.js +5 -5
- package/build/project/android/gradle.d.ts +2 -1
- package/build/project/android/gradle.js +2 -2
- package/build/project/applicationIdentifier.d.ts +3 -1
- package/build/project/applicationIdentifier.js +10 -7
- package/build/project/ios/bundleIdentifier.d.ts +4 -2
- package/build/project/ios/bundleIdentifier.js +5 -5
- package/build/project/ios/entitlements.d.ts +2 -1
- package/build/project/ios/entitlements.js +2 -2
- package/build/project/ios/scheme.d.ts +3 -1
- package/build/project/ios/scheme.js +2 -2
- package/build/project/ios/target.d.ts +4 -2
- package/build/project/ios/target.js +10 -8
- package/build/project/projectUtils.d.ts +1 -0
- package/build/project/projectUtils.js +12 -1
- package/build/project/publish.d.ts +6 -4
- package/build/project/publish.js +10 -11
- package/build/project/workflow.d.ts +4 -3
- package/build/project/workflow.js +5 -8
- package/build/submit/android/AndroidSubmitCommand.js +1 -1
- package/build/submit/context.d.ts +3 -0
- package/build/submit/context.js +2 -1
- package/build/submit/ios/AppProduce.js +1 -1
- package/build/submit/ios/AscApiKeySource.js +1 -1
- package/build/update/configure.d.ts +3 -1
- package/build/update/configure.js +5 -5
- package/build/update/ios/UpdatesModule.d.ts +2 -1
- package/build/update/ios/UpdatesModule.js +4 -5
- package/build/uploads.d.ts +1 -1
- package/build/uploads.js +2 -1
- package/oclif.manifest.json +1 -1
- package/package.json +6 -6
|
@@ -30,7 +30,6 @@ const download_1 = require("../utils/download");
|
|
|
30
30
|
const filter_1 = require("../utils/expodash/filter");
|
|
31
31
|
const json_1 = require("../utils/json");
|
|
32
32
|
const profiles_1 = require("../utils/profiles");
|
|
33
|
-
const vcs_1 = require("../vcs");
|
|
34
33
|
const build_1 = require("./android/build");
|
|
35
34
|
const build_2 = require("./build");
|
|
36
35
|
const configure_2 = require("./configure");
|
|
@@ -41,13 +40,14 @@ const printBuildInfo_1 = require("./utils/printBuildInfo");
|
|
|
41
40
|
const repository_1 = require("./utils/repository");
|
|
42
41
|
let metroConfigValidated = false;
|
|
43
42
|
let sdkVersionChecked = false;
|
|
44
|
-
async function runBuildAndSubmitAsync(graphqlClient, analytics, projectDir, flags, actor, getDynamicPrivateProjectConfigAsync) {
|
|
43
|
+
async function runBuildAndSubmitAsync(graphqlClient, analytics, vcsClient, projectDir, flags, actor, getDynamicPrivateProjectConfigAsync) {
|
|
45
44
|
var _a, _b;
|
|
46
|
-
await
|
|
47
|
-
await (0, repository_1.ensureRepoIsCleanAsync)(flags.nonInteractive);
|
|
45
|
+
await vcsClient.ensureRepoExistsAsync();
|
|
46
|
+
await (0, repository_1.ensureRepoIsCleanAsync)(vcsClient, flags.nonInteractive);
|
|
48
47
|
await (0, configure_2.ensureProjectConfiguredAsync)({
|
|
49
48
|
projectDir,
|
|
50
49
|
nonInteractive: flags.nonInteractive,
|
|
50
|
+
vcsClient,
|
|
51
51
|
});
|
|
52
52
|
const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
|
|
53
53
|
const easJsonCliConfig = (_a = (await eas_json_1.EasJsonUtils.getCliConfigAsync(easJsonAccessor))) !== null && _a !== void 0 ? _a : {};
|
|
@@ -66,6 +66,7 @@ async function runBuildAndSubmitAsync(graphqlClient, analytics, projectDir, flag
|
|
|
66
66
|
projectDir,
|
|
67
67
|
nonInteractive: flags.nonInteractive,
|
|
68
68
|
buildProfiles,
|
|
69
|
+
vcsClient,
|
|
69
70
|
});
|
|
70
71
|
const customBuildConfigMetadataByPlatform = {};
|
|
71
72
|
for (const buildProfile of buildProfiles) {
|
|
@@ -88,6 +89,7 @@ async function runBuildAndSubmitAsync(graphqlClient, analytics, projectDir, flag
|
|
|
88
89
|
actor,
|
|
89
90
|
graphqlClient,
|
|
90
91
|
analytics,
|
|
92
|
+
vcsClient,
|
|
91
93
|
getDynamicPrivateProjectConfigAsync,
|
|
92
94
|
customBuildConfigMetadata: customBuildConfigMetadataByPlatform[platform],
|
|
93
95
|
});
|
|
@@ -139,8 +141,6 @@ async function runBuildAndSubmitAsync(graphqlClient, analytics, projectDir, flag
|
|
|
139
141
|
const builds = await (0, build_2.waitForBuildEndAsync)(graphqlClient, {
|
|
140
142
|
buildIds: startedBuilds.map(({ build }) => build.id),
|
|
141
143
|
accountName,
|
|
142
|
-
projectDir,
|
|
143
|
-
nonInteractive: flags.nonInteractive,
|
|
144
144
|
});
|
|
145
145
|
if (!flags.json) {
|
|
146
146
|
(0, printBuildInfo_1.printBuildResults)(builds);
|
|
@@ -165,7 +165,7 @@ async function runBuildAndSubmitAsync(graphqlClient, analytics, projectDir, flag
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
exports.runBuildAndSubmitAsync = runBuildAndSubmitAsync;
|
|
168
|
-
async function prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildProfile, easJsonCliConfig, actor, graphqlClient, analytics, getDynamicPrivateProjectConfigAsync, customBuildConfigMetadata, }) {
|
|
168
|
+
async function prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildProfile, easJsonCliConfig, actor, graphqlClient, analytics, vcsClient, getDynamicPrivateProjectConfigAsync, customBuildConfigMetadata, }) {
|
|
169
169
|
const buildCtx = await (0, createContext_1.createBuildContextAsync)({
|
|
170
170
|
buildProfileName: buildProfile.profileName,
|
|
171
171
|
resourceClassFlag: flags.resourceClass,
|
|
@@ -181,6 +181,7 @@ async function prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildP
|
|
|
181
181
|
actor,
|
|
182
182
|
graphqlClient,
|
|
183
183
|
analytics,
|
|
184
|
+
vcsClient,
|
|
184
185
|
getDynamicPrivateProjectConfigAsync,
|
|
185
186
|
customBuildConfigMetadata,
|
|
186
187
|
});
|
|
@@ -196,6 +197,7 @@ async function prepareAndStartBuildAsync({ projectDir, flags, moreBuilds, buildP
|
|
|
196
197
|
exp: buildCtx.exp,
|
|
197
198
|
projectId: buildCtx.projectId,
|
|
198
199
|
projectDir,
|
|
200
|
+
vcsClient: buildCtx.vcsClient,
|
|
199
201
|
sdkVersion: buildCtx.exp.sdkVersion,
|
|
200
202
|
nonInteractive: flags.nonInteractive,
|
|
201
203
|
buildProfile,
|
|
@@ -260,6 +262,7 @@ async function prepareAndStartSubmissionAsync({ build, buildCtx, moreBuilds, pro
|
|
|
260
262
|
analytics: buildCtx.analytics,
|
|
261
263
|
projectId: buildCtx.projectId,
|
|
262
264
|
exp: buildCtx.exp,
|
|
265
|
+
vcsClient: buildCtx.vcsClient,
|
|
263
266
|
});
|
|
264
267
|
if (moreBuilds) {
|
|
265
268
|
log_1.default.newLine();
|
|
@@ -295,7 +298,7 @@ async function maybeDownloadAndRunSimulatorBuildsAsync(builds, flags) {
|
|
|
295
298
|
}
|
|
296
299
|
}
|
|
297
300
|
}
|
|
298
|
-
async function validateExpoUpdatesInstalledAsProjectDependencyAsync({ exp, graphqlClient, projectId, projectDir, buildProfile, nonInteractive, sdkVersion, }) {
|
|
301
|
+
async function validateExpoUpdatesInstalledAsProjectDependencyAsync({ exp, graphqlClient, projectId, projectDir, vcsClient, buildProfile, nonInteractive, sdkVersion, }) {
|
|
299
302
|
if ((0, projectUtils_1.isExpoUpdatesInstalledOrAvailable)(projectDir, sdkVersion)) {
|
|
300
303
|
return;
|
|
301
304
|
}
|
|
@@ -316,6 +319,7 @@ async function validateExpoUpdatesInstalledAsProjectDependencyAsync({ exp, graph
|
|
|
316
319
|
projectId,
|
|
317
320
|
projectDir,
|
|
318
321
|
platform: platform_1.RequestedPlatform.All,
|
|
322
|
+
vcsClient,
|
|
319
323
|
});
|
|
320
324
|
log_1.default.withTick('Installed expo-updates and configured EAS Update.');
|
|
321
325
|
throw new Error('Command must be re-run to pick up new updates configuration.');
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ProfileData } from '../../utils/profiles';
|
|
2
|
-
|
|
2
|
+
import { Client } from '../../vcs/vcs';
|
|
3
|
+
export declare function ensureExpoDevClientInstalledForDevClientBuildsAsync({ projectDir, vcsClient, nonInteractive, buildProfiles, }: {
|
|
3
4
|
projectDir: string;
|
|
5
|
+
vcsClient: Client;
|
|
4
6
|
nonInteractive?: boolean;
|
|
5
7
|
buildProfiles?: ProfileData<'build'>[];
|
|
6
8
|
}): Promise<void>;
|
|
@@ -12,9 +12,8 @@ const platform_1 = require("../../platform");
|
|
|
12
12
|
const workflow_1 = require("../../project/workflow");
|
|
13
13
|
const prompts_1 = require("../../prompts");
|
|
14
14
|
const expoCli_1 = require("../../utils/expoCli");
|
|
15
|
-
const vcs_1 = require("../../vcs");
|
|
16
15
|
const repository_1 = require("./repository");
|
|
17
|
-
async function ensureExpoDevClientInstalledForDevClientBuildsAsync({ projectDir, nonInteractive = false, buildProfiles = [], }) {
|
|
16
|
+
async function ensureExpoDevClientInstalledForDevClientBuildsAsync({ projectDir, vcsClient, nonInteractive = false, buildProfiles = [], }) {
|
|
18
17
|
if (await isExpoDevClientInstalledAsync(projectDir)) {
|
|
19
18
|
return;
|
|
20
19
|
}
|
|
@@ -24,7 +23,7 @@ async function ensureExpoDevClientInstalledForDevClientBuildsAsync({ projectDir,
|
|
|
24
23
|
return;
|
|
25
24
|
}
|
|
26
25
|
const platformsToCheck = buildProfilesWithDevelopmentClientRequired.map(({ platform }) => platform);
|
|
27
|
-
const workflowPerPlatformList = await Promise.all(platformsToCheck.map(platform => (0, workflow_1.resolveWorkflowAsync)(projectDir, platform)));
|
|
26
|
+
const workflowPerPlatformList = await Promise.all(platformsToCheck.map(platform => (0, workflow_1.resolveWorkflowAsync)(projectDir, platform, vcsClient)));
|
|
28
27
|
log_1.default.newLine();
|
|
29
28
|
log_1.default.error(`You want to build a development client build for platforms: ${platformsToCheck
|
|
30
29
|
.map(i => chalk_1.default.bold(platform_1.appPlatformDisplayNames[(0, AppPlatform_1.toAppPlatform)(i)]))
|
|
@@ -37,7 +36,7 @@ async function ensureExpoDevClientInstalledForDevClientBuildsAsync({ projectDir,
|
|
|
37
36
|
instructions: 'The command will abort unless you agree.',
|
|
38
37
|
});
|
|
39
38
|
if (install) {
|
|
40
|
-
await installExpoDevClientAsync(projectDir, { nonInteractive });
|
|
39
|
+
await installExpoDevClientAsync(projectDir, vcsClient, { nonInteractive });
|
|
41
40
|
}
|
|
42
41
|
else {
|
|
43
42
|
core_1.Errors.error(`Install ${chalk_1.default.bold('expo-dev-client')} manually and come back later.`, {
|
|
@@ -73,14 +72,14 @@ async function isExpoDevClientInstalledAsync(projectDir) {
|
|
|
73
72
|
return false;
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
|
-
async function installExpoDevClientAsync(projectDir, { nonInteractive }) {
|
|
75
|
+
async function installExpoDevClientAsync(projectDir, vcsClient, { nonInteractive }) {
|
|
77
76
|
log_1.default.newLine();
|
|
78
77
|
log_1.default.log(`Running ${chalk_1.default.bold('expo install expo-dev-client')}`);
|
|
79
78
|
log_1.default.newLine();
|
|
80
79
|
await (0, expoCli_1.expoCommandAsync)(projectDir, ['install', 'expo-dev-client']);
|
|
81
80
|
log_1.default.newLine();
|
|
82
|
-
if (await
|
|
83
|
-
await (0, repository_1.reviewAndCommitChangesAsync)('Install expo-dev-client', {
|
|
81
|
+
if (await vcsClient.isCommitRequiredAsync()) {
|
|
82
|
+
await (0, repository_1.reviewAndCommitChangesAsync)(vcsClient, 'Install expo-dev-client', {
|
|
84
83
|
nonInteractive,
|
|
85
84
|
});
|
|
86
85
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function
|
|
1
|
+
import { Client } from '../../vcs/vcs';
|
|
2
|
+
export declare function maybeBailOnRepoStatusAsync(vcsClient: Client): Promise<void>;
|
|
3
|
+
export declare function ensureRepoIsCleanAsync(vcsClient: Client, nonInteractive?: boolean): Promise<void>;
|
|
4
|
+
export declare function commitPromptAsync(vcsClient: Client, { initialCommitMessage, commitAllFiles, }?: {
|
|
4
5
|
initialCommitMessage?: string;
|
|
5
6
|
commitAllFiles?: boolean;
|
|
6
7
|
}): Promise<void>;
|
|
7
|
-
export declare function makeProjectTarballAsync(): Promise<{
|
|
8
|
+
export declare function makeProjectTarballAsync(vcsClient: Client): Promise<{
|
|
8
9
|
path: string;
|
|
9
10
|
size: number;
|
|
10
11
|
}>;
|
|
11
|
-
export declare function reviewAndCommitChangesAsync(initialCommitMessage: string, { nonInteractive, askedFirstTime }: {
|
|
12
|
+
export declare function reviewAndCommitChangesAsync(vcsClient: Client, initialCommitMessage: string, { nonInteractive, askedFirstTime }: {
|
|
12
13
|
nonInteractive: boolean;
|
|
13
14
|
askedFirstTime?: boolean;
|
|
14
15
|
}): Promise<void>;
|
|
@@ -13,9 +13,8 @@ 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
|
-
|
|
17
|
-
|
|
18
|
-
if (!(await (0, vcs_1.getVcsClient)().isCommitRequiredAsync())) {
|
|
16
|
+
async function maybeBailOnRepoStatusAsync(vcsClient) {
|
|
17
|
+
if (!(await vcsClient.isCommitRequiredAsync())) {
|
|
19
18
|
return;
|
|
20
19
|
}
|
|
21
20
|
log_1.default.addNewLineIfNone();
|
|
@@ -29,8 +28,8 @@ async function maybeBailOnRepoStatusAsync() {
|
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
exports.maybeBailOnRepoStatusAsync = maybeBailOnRepoStatusAsync;
|
|
32
|
-
async function ensureRepoIsCleanAsync(nonInteractive = false) {
|
|
33
|
-
if (!(await
|
|
31
|
+
async function ensureRepoIsCleanAsync(vcsClient, nonInteractive = false) {
|
|
32
|
+
if (!(await vcsClient.isCommitRequiredAsync())) {
|
|
34
33
|
return;
|
|
35
34
|
}
|
|
36
35
|
log_1.default.addNewLineIfNone();
|
|
@@ -43,14 +42,14 @@ async function ensureRepoIsCleanAsync(nonInteractive = false) {
|
|
|
43
42
|
message: `Commit changes to git?`,
|
|
44
43
|
});
|
|
45
44
|
if (answer) {
|
|
46
|
-
await commitPromptAsync({ commitAllFiles: true });
|
|
45
|
+
await commitPromptAsync(vcsClient, { commitAllFiles: true });
|
|
47
46
|
}
|
|
48
47
|
else {
|
|
49
48
|
throw new Error('Commit all changes. Aborting...');
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
51
|
exports.ensureRepoIsCleanAsync = ensureRepoIsCleanAsync;
|
|
53
|
-
async function commitPromptAsync({ initialCommitMessage, commitAllFiles, } = {}) {
|
|
52
|
+
async function commitPromptAsync(vcsClient, { initialCommitMessage, commitAllFiles, } = {}) {
|
|
54
53
|
const { message } = await (0, prompts_1.promptAsync)({
|
|
55
54
|
type: 'text',
|
|
56
55
|
name: 'message',
|
|
@@ -58,14 +57,14 @@ async function commitPromptAsync({ initialCommitMessage, commitAllFiles, } = {})
|
|
|
58
57
|
initial: initialCommitMessage,
|
|
59
58
|
validate: (input) => input !== '',
|
|
60
59
|
});
|
|
61
|
-
await
|
|
60
|
+
await vcsClient.commitAsync({
|
|
62
61
|
commitAllFiles,
|
|
63
62
|
commitMessage: message,
|
|
64
63
|
nonInteractive: false,
|
|
65
64
|
});
|
|
66
65
|
}
|
|
67
66
|
exports.commitPromptAsync = commitPromptAsync;
|
|
68
|
-
async function makeProjectTarballAsync() {
|
|
67
|
+
async function makeProjectTarballAsync(vcsClient) {
|
|
69
68
|
const spinner = (0, ora_1.ora)('Compressing project files');
|
|
70
69
|
await fs_extra_1.default.mkdirp((0, paths_1.getTmpDirectory)());
|
|
71
70
|
const shallowClonePath = path_1.default.join((0, paths_1.getTmpDirectory)(), `${(0, uuid_1.v4)()}-shallow-clone`);
|
|
@@ -81,7 +80,7 @@ async function makeProjectTarballAsync() {
|
|
|
81
80
|
const compressTimerLabel = 'makeProjectTarballAsync';
|
|
82
81
|
(0, timer_1.startTimer)(compressTimerLabel);
|
|
83
82
|
try {
|
|
84
|
-
await
|
|
83
|
+
await vcsClient.makeShallowCopyAsync(shallowClonePath);
|
|
85
84
|
await tar_1.default.create({ cwd: shallowClonePath, file: tarPath, prefix: 'project', gzip: true }, [
|
|
86
85
|
'.',
|
|
87
86
|
]);
|
|
@@ -112,9 +111,9 @@ var ShouldCommitChanges;
|
|
|
112
111
|
ShouldCommitChanges[ShouldCommitChanges["ShowDiffFirst"] = 1] = "ShowDiffFirst";
|
|
113
112
|
ShouldCommitChanges[ShouldCommitChanges["Abort"] = 2] = "Abort";
|
|
114
113
|
})(ShouldCommitChanges || (ShouldCommitChanges = {}));
|
|
115
|
-
async function reviewAndCommitChangesAsync(initialCommitMessage, { nonInteractive, askedFirstTime = true }) {
|
|
114
|
+
async function reviewAndCommitChangesAsync(vcsClient, initialCommitMessage, { nonInteractive, askedFirstTime = true }) {
|
|
116
115
|
if (process.env.EAS_BUILD_AUTOCOMMIT) {
|
|
117
|
-
await
|
|
116
|
+
await vcsClient.commitAsync({
|
|
118
117
|
commitMessage: initialCommitMessage,
|
|
119
118
|
commitAllFiles: false,
|
|
120
119
|
nonInteractive,
|
|
@@ -144,12 +143,12 @@ async function reviewAndCommitChangesAsync(initialCommitMessage, { nonInteractiv
|
|
|
144
143
|
throw new Error("Aborting, run the command again once you're ready. Make sure to commit any changes you've made.");
|
|
145
144
|
}
|
|
146
145
|
else if (selected === ShouldCommitChanges.Yes) {
|
|
147
|
-
await commitPromptAsync({ initialCommitMessage });
|
|
146
|
+
await commitPromptAsync(vcsClient, { initialCommitMessage });
|
|
148
147
|
log_1.default.withTick('Committed changes.');
|
|
149
148
|
}
|
|
150
149
|
else if (selected === ShouldCommitChanges.ShowDiffFirst) {
|
|
151
|
-
await
|
|
152
|
-
await reviewAndCommitChangesAsync(initialCommitMessage, {
|
|
150
|
+
await vcsClient.showDiffAsync();
|
|
151
|
+
await reviewAndCommitChangesAsync(vcsClient, initialCommitMessage, {
|
|
153
152
|
nonInteractive,
|
|
154
153
|
askedFirstTime: false,
|
|
155
154
|
});
|
|
@@ -10,10 +10,7 @@ const log_1 = tslib_1.__importStar(require("../../log"));
|
|
|
10
10
|
const iosResourceClassToBuildResourceClassMapping = {
|
|
11
11
|
[eas_json_1.ResourceClass.DEFAULT]: generated_1.BuildResourceClass.IosDefault,
|
|
12
12
|
[eas_json_1.ResourceClass.LARGE]: generated_1.BuildResourceClass.IosLarge,
|
|
13
|
-
[eas_json_1.ResourceClass.M1_EXPERIMENTAL]: generated_1.BuildResourceClass.IosMMedium,
|
|
14
13
|
[eas_json_1.ResourceClass.M1_MEDIUM]: generated_1.BuildResourceClass.IosMMedium,
|
|
15
|
-
[eas_json_1.ResourceClass.M1_LARGE]: generated_1.BuildResourceClass.IosMLarge,
|
|
16
|
-
[eas_json_1.ResourceClass.INTEL_MEDIUM]: generated_1.BuildResourceClass.IosIntelMedium,
|
|
17
14
|
[eas_json_1.ResourceClass.MEDIUM]: generated_1.BuildResourceClass.IosMedium,
|
|
18
15
|
[eas_json_1.ResourceClass.M_MEDIUM]: generated_1.BuildResourceClass.IosMMedium,
|
|
19
16
|
[eas_json_1.ResourceClass.M_LARGE]: generated_1.BuildResourceClass.IosMLarge,
|
|
@@ -35,13 +32,7 @@ async function resolveBuildResourceClassAsync(profile, platform, resourceClassFl
|
|
|
35
32
|
}
|
|
36
33
|
exports.resolveBuildResourceClassAsync = resolveBuildResourceClassAsync;
|
|
37
34
|
function resolveAndroidResourceClass(selectedResourceClass) {
|
|
38
|
-
if (selectedResourceClass &&
|
|
39
|
-
[
|
|
40
|
-
eas_json_1.ResourceClass.M1_EXPERIMENTAL,
|
|
41
|
-
eas_json_1.ResourceClass.M1_MEDIUM,
|
|
42
|
-
eas_json_1.ResourceClass.M1_LARGE,
|
|
43
|
-
eas_json_1.ResourceClass.INTEL_MEDIUM,
|
|
44
|
-
].includes(selectedResourceClass)) {
|
|
35
|
+
if (selectedResourceClass && eas_json_1.ResourceClass.M1_MEDIUM === selectedResourceClass) {
|
|
45
36
|
throw new Error(`Resource class ${selectedResourceClass} is only available for iOS builds`);
|
|
46
37
|
}
|
|
47
38
|
const resourceClass = selectedResourceClass !== null && selectedResourceClass !== void 0 ? selectedResourceClass : eas_json_1.ResourceClass.DEFAULT;
|
|
@@ -53,10 +44,10 @@ function resolveIosResourceClass(resourceClassFlag, profileResourceClass) {
|
|
|
53
44
|
if (resourceClassFlag === eas_json_1.ResourceClass.LARGE) {
|
|
54
45
|
throw new Error(`Experimental "large" resource class for Intel iOS workers is no longer available. Remove the specified resource class to use the default, or learn more about all available resource classes: ${(0, log_1.link)('https://docs.expo.dev/build-reference/eas-json/')}`);
|
|
55
46
|
}
|
|
56
|
-
if (
|
|
47
|
+
if (eas_json_1.ResourceClass.M1_MEDIUM === resourceClass) {
|
|
57
48
|
log_1.default.warn(`Resource class ${chalk_1.default.bold(resourceClass)} is deprecated. Use ${chalk_1.default.bold('m-medium')} instead.`);
|
|
58
49
|
}
|
|
59
|
-
if (
|
|
50
|
+
if (eas_json_1.ResourceClass.M_LARGE === resourceClass) {
|
|
60
51
|
log_1.default.warn(`Resource class ${chalk_1.default.bold(resourceClass)} is deprecated. Use ${chalk_1.default.bold('large')} instead.`);
|
|
61
52
|
}
|
|
62
53
|
return iosResourceClassToBuildResourceClassMapping[resourceClass];
|
package/build/build/validate.js
CHANGED
|
@@ -9,7 +9,6 @@ const path_1 = tslib_1.__importDefault(require("path"));
|
|
|
9
9
|
const semver_1 = tslib_1.__importDefault(require("semver"));
|
|
10
10
|
const log_1 = tslib_1.__importStar(require("../log"));
|
|
11
11
|
const image_1 = require("../utils/image");
|
|
12
|
-
const vcs_1 = require("../vcs");
|
|
13
12
|
function checkNodeEnvVariable(ctx) {
|
|
14
13
|
var _a;
|
|
15
14
|
if (((_a = ctx.buildProfile.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) === 'production') {
|
|
@@ -27,11 +26,11 @@ async function checkGoogleServicesFileAsync(ctx) {
|
|
|
27
26
|
if (!googleServicesFilePath) {
|
|
28
27
|
return;
|
|
29
28
|
}
|
|
30
|
-
const rootDir = path_1.default.normalize(await
|
|
29
|
+
const rootDir = path_1.default.normalize(await ctx.vcsClient.getRootPathAsync());
|
|
31
30
|
const absGoogleServicesFilePath = path_1.default.resolve(ctx.projectDir, googleServicesFilePath);
|
|
32
31
|
if ((await fs_extra_1.default.pathExists(absGoogleServicesFilePath)) &&
|
|
33
32
|
(!isInsideDirectory(absGoogleServicesFilePath, rootDir) ||
|
|
34
|
-
(await
|
|
33
|
+
(await ctx.vcsClient.isFileIgnoredAsync(path_1.default.relative(rootDir, absGoogleServicesFilePath))))) {
|
|
35
34
|
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.`);
|
|
36
35
|
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')}`);
|
|
37
36
|
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.`);
|
|
@@ -8,6 +8,7 @@ import { OptionalPrivateProjectConfigContextField } from './context/OptionalPriv
|
|
|
8
8
|
import { PrivateProjectConfigContextField } from './context/PrivateProjectConfigContextField';
|
|
9
9
|
import ProjectDirContextField from './context/ProjectDirContextField';
|
|
10
10
|
import SessionManagementContextField from './context/SessionManagementContextField';
|
|
11
|
+
import VcsClientContextField from './context/VcsClientContextField';
|
|
11
12
|
export type ContextInput<T extends {
|
|
12
13
|
[name: string]: any;
|
|
13
14
|
} = object> = {
|
|
@@ -75,6 +76,9 @@ export default abstract class EasCommand extends Command {
|
|
|
75
76
|
Analytics: {
|
|
76
77
|
analytics: AnalyticsContextField;
|
|
77
78
|
};
|
|
79
|
+
Vcs: {
|
|
80
|
+
vcsClient: VcsClientContextField;
|
|
81
|
+
};
|
|
78
82
|
};
|
|
79
83
|
/**
|
|
80
84
|
* Context allows for subclasses (commands) to declare their prerequisites in a type-safe manner.
|
|
@@ -15,6 +15,7 @@ const OptionalPrivateProjectConfigContextField_1 = require("./context/OptionalPr
|
|
|
15
15
|
const PrivateProjectConfigContextField_1 = require("./context/PrivateProjectConfigContextField");
|
|
16
16
|
const ProjectDirContextField_1 = tslib_1.__importDefault(require("./context/ProjectDirContextField"));
|
|
17
17
|
const SessionManagementContextField_1 = tslib_1.__importDefault(require("./context/SessionManagementContextField"));
|
|
18
|
+
const VcsClientContextField_1 = tslib_1.__importDefault(require("./context/VcsClientContextField"));
|
|
18
19
|
const errors_1 = require("./errors");
|
|
19
20
|
const BASE_GRAPHQL_ERROR_MESSAGE = 'GraphQL request failed.';
|
|
20
21
|
class EasCommand extends core_1.Command {
|
|
@@ -151,6 +152,9 @@ EasCommand.ContextOptions = {
|
|
|
151
152
|
Analytics: {
|
|
152
153
|
analytics: new AnalyticsContextField_1.default(),
|
|
153
154
|
},
|
|
155
|
+
Vcs: {
|
|
156
|
+
vcsClient: new VcsClientContextField_1.default(),
|
|
157
|
+
},
|
|
154
158
|
};
|
|
155
159
|
/**
|
|
156
160
|
* Context allows for subclasses (commands) to declare their prerequisites in a type-safe manner.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const vcs_1 = require("../../vcs");
|
|
5
|
+
const ContextField_1 = tslib_1.__importDefault(require("./ContextField"));
|
|
6
|
+
class VcsClientContextField extends ContextField_1.default {
|
|
7
|
+
async getValueAsync() {
|
|
8
|
+
return (0, vcs_1.getVcsClient)();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.default = VcsClientContextField;
|
|
@@ -11,6 +11,7 @@ export default class BranchCreate extends EasCommand {
|
|
|
11
11
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
12
|
};
|
|
13
13
|
static contextDefinition: {
|
|
14
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
14
15
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
15
16
|
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
16
17
|
};
|
|
@@ -14,7 +14,7 @@ const json_1 = require("../../utils/json");
|
|
|
14
14
|
class BranchCreate extends EasCommand_1.default {
|
|
15
15
|
async runAsync() {
|
|
16
16
|
let { args: { name }, flags: { json: jsonFlag, 'non-interactive': nonInteractive }, } = await this.parse(BranchCreate);
|
|
17
|
-
const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(BranchCreate, {
|
|
17
|
+
const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, vcsClient, } = await this.getContextAsync(BranchCreate, {
|
|
18
18
|
nonInteractive,
|
|
19
19
|
});
|
|
20
20
|
if (jsonFlag) {
|
|
@@ -30,7 +30,7 @@ class BranchCreate extends EasCommand_1.default {
|
|
|
30
30
|
type: 'text',
|
|
31
31
|
name: 'name',
|
|
32
32
|
message: 'Provide a branch name:',
|
|
33
|
-
initial: await (0, utils_1.getDefaultBranchNameAsync)(),
|
|
33
|
+
initial: await (0, utils_1.getDefaultBranchNameAsync)(vcsClient),
|
|
34
34
|
validate: value => (value ? true : validationMessage),
|
|
35
35
|
}));
|
|
36
36
|
}
|
|
@@ -59,4 +59,5 @@ BranchCreate.flags = {
|
|
|
59
59
|
BranchCreate.contextDefinition = {
|
|
60
60
|
..._a.ContextOptions.ProjectConfig,
|
|
61
61
|
..._a.ContextOptions.LoggedIn,
|
|
62
|
+
..._a.ContextOptions.Vcs,
|
|
62
63
|
};
|
|
@@ -10,6 +10,7 @@ export default class BuildCancel extends EasCommand {
|
|
|
10
10
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
};
|
|
12
12
|
static contextDefinition: {
|
|
13
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
13
14
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
14
15
|
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
15
16
|
};
|
|
@@ -5,6 +5,7 @@ export default class BuildConfigure extends EasCommand {
|
|
|
5
5
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
6
|
};
|
|
7
7
|
static contextDefinition: {
|
|
8
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
8
9
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
9
10
|
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
10
11
|
};
|
|
@@ -16,16 +16,16 @@ const prompts_1 = require("../../prompts");
|
|
|
16
16
|
const UpdatesModule_1 = require("../../update/android/UpdatesModule");
|
|
17
17
|
const configure_2 = require("../../update/configure");
|
|
18
18
|
const UpdatesModule_2 = require("../../update/ios/UpdatesModule");
|
|
19
|
-
const vcs_1 = require("../../vcs");
|
|
20
19
|
class BuildConfigure extends EasCommand_1.default {
|
|
21
20
|
async runAsync() {
|
|
22
21
|
var _b, _c;
|
|
23
22
|
const { flags } = await this.parse(BuildConfigure);
|
|
24
|
-
const { privateProjectConfig: { exp, projectId, projectDir }, loggedIn: { graphqlClient }, } = await this.getContextAsync(BuildConfigure, {
|
|
23
|
+
const { privateProjectConfig: { exp, projectId, projectDir }, loggedIn: { graphqlClient }, vcsClient, } = await this.getContextAsync(BuildConfigure, {
|
|
25
24
|
nonInteractive: false,
|
|
26
25
|
});
|
|
27
26
|
log_1.default.log('💡 The following process will configure your iOS and/or Android project to be compatible with EAS Build. These changes only apply to your local project files and you can safely revert them at any time.');
|
|
28
|
-
|
|
27
|
+
// BuildConfigure.ContextOptions.Vcs.client.getValueAsync()
|
|
28
|
+
await vcsClient.ensureRepoExistsAsync();
|
|
29
29
|
const expoUpdatesIsInstalled = (0, projectUtils_1.isExpoUpdatesInstalled)(projectDir);
|
|
30
30
|
const platform = (_b = flags.platform) !== null && _b !== void 0 ? _b : (await promptForPlatformAsync());
|
|
31
31
|
// clean up old Android configuration
|
|
@@ -37,6 +37,7 @@ class BuildConfigure extends EasCommand_1.default {
|
|
|
37
37
|
const didCreateEasJson = await (0, configure_1.ensureProjectConfiguredAsync)({
|
|
38
38
|
projectDir,
|
|
39
39
|
nonInteractive: false,
|
|
40
|
+
vcsClient,
|
|
40
41
|
});
|
|
41
42
|
if (didCreateEasJson && (0, projectUtils_1.isUsingEASUpdate)(exp, projectId)) {
|
|
42
43
|
if ((_c = exp.updates) === null || _c === void 0 ? void 0 : _c.useClassicUpdates) {
|
|
@@ -49,15 +50,15 @@ class BuildConfigure extends EasCommand_1.default {
|
|
|
49
50
|
// configure expo-updates
|
|
50
51
|
if (expoUpdatesIsInstalled) {
|
|
51
52
|
if ([platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.All].includes(platform)) {
|
|
52
|
-
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
53
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID, vcsClient);
|
|
53
54
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
54
55
|
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(graphqlClient, projectDir, exp, projectId);
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
if ([platform_1.RequestedPlatform.Ios, platform_1.RequestedPlatform.All].includes(platform)) {
|
|
58
|
-
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
|
|
59
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS, vcsClient);
|
|
59
60
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
60
|
-
await (0, UpdatesModule_2.syncUpdatesConfigurationAsync)(graphqlClient, projectDir, exp, projectId);
|
|
61
|
+
await (0, UpdatesModule_2.syncUpdatesConfigurationAsync)(graphqlClient, vcsClient, projectDir, exp, projectId);
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
}
|
|
@@ -84,6 +85,7 @@ BuildConfigure.flags = {
|
|
|
84
85
|
BuildConfigure.contextDefinition = {
|
|
85
86
|
..._a.ContextOptions.ProjectConfig,
|
|
86
87
|
..._a.ContextOptions.LoggedIn,
|
|
88
|
+
..._a.ContextOptions.Vcs,
|
|
87
89
|
};
|
|
88
90
|
async function promptForPlatformAsync() {
|
|
89
91
|
log_1.default.addNewLineIfNone();
|
|
@@ -19,6 +19,7 @@ export default class Build extends EasCommand {
|
|
|
19
19
|
message: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
20
20
|
};
|
|
21
21
|
static contextDefinition: {
|
|
22
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
22
23
|
analytics: import("../../commandUtils/context/AnalyticsContextField").default;
|
|
23
24
|
projectDir: import("../../commandUtils/context/ProjectDirContextField").default;
|
|
24
25
|
getDynamicPublicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
@@ -28,7 +28,7 @@ class Build extends EasCommand_1.default {
|
|
|
28
28
|
(0, json_1.enableJsonOutput)();
|
|
29
29
|
}
|
|
30
30
|
const flags = this.sanitizeFlags(rawFlags);
|
|
31
|
-
const { loggedIn: { actor, graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, analytics, } = await this.getContextAsync(Build, {
|
|
31
|
+
const { loggedIn: { actor, graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, analytics, vcsClient, } = await this.getContextAsync(Build, {
|
|
32
32
|
nonInteractive: flags.nonInteractive,
|
|
33
33
|
});
|
|
34
34
|
await handleDeprecatedEasJsonAsync(projectDir, flags.nonInteractive);
|
|
@@ -38,7 +38,7 @@ class Build extends EasCommand_1.default {
|
|
|
38
38
|
: [generated_1.StatuspageServiceName.EasBuild]);
|
|
39
39
|
}
|
|
40
40
|
const flagsWithPlatform = await this.ensurePlatformSelectedAsync(flags);
|
|
41
|
-
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(graphqlClient, analytics, projectDir, flagsWithPlatform, actor, getDynamicPrivateProjectConfigAsync);
|
|
41
|
+
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(graphqlClient, analytics, vcsClient, projectDir, flagsWithPlatform, actor, getDynamicPrivateProjectConfigAsync);
|
|
42
42
|
}
|
|
43
43
|
sanitizeFlags(flags) {
|
|
44
44
|
var _b;
|
|
@@ -183,6 +183,7 @@ Build.contextDefinition = {
|
|
|
183
183
|
..._a.ContextOptions.DynamicProjectConfig,
|
|
184
184
|
..._a.ContextOptions.ProjectDir,
|
|
185
185
|
..._a.ContextOptions.Analytics,
|
|
186
|
+
..._a.ContextOptions.Vcs,
|
|
186
187
|
};
|
|
187
188
|
async function handleDeprecatedEasJsonAsync(projectDir, nonInteractive) {
|
|
188
189
|
if (!(await fs_extra_1.default.pathExists(eas_json_1.EasJsonAccessor.formatEasJsonPath(projectDir)))) {
|
|
@@ -16,6 +16,7 @@ export default class BuildInspect extends EasCommand {
|
|
|
16
16
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
17
|
};
|
|
18
18
|
static contextDefinition: {
|
|
19
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
19
20
|
analytics: import("../../commandUtils/context/AnalyticsContextField").default;
|
|
20
21
|
projectDir: import("../../commandUtils/context/ProjectDirContextField").default;
|
|
21
22
|
getDynamicPublicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
@@ -14,7 +14,6 @@ const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
|
14
14
|
const ora_1 = require("../../ora");
|
|
15
15
|
const platform_1 = require("../../platform");
|
|
16
16
|
const paths_1 = require("../../utils/paths");
|
|
17
|
-
const vcs_1 = require("../../vcs");
|
|
18
17
|
var InspectStage;
|
|
19
18
|
(function (InspectStage) {
|
|
20
19
|
InspectStage["ARCHIVE"] = "archive";
|
|
@@ -28,7 +27,7 @@ const STAGE_DESCRIPTION = `Stage of the build you want to inspect.
|
|
|
28
27
|
class BuildInspect extends EasCommand_1.default {
|
|
29
28
|
async runAsync() {
|
|
30
29
|
const { flags } = await this.parse(BuildInspect);
|
|
31
|
-
const { loggedIn: { actor, graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, analytics, } = await this.getContextAsync(BuildInspect, {
|
|
30
|
+
const { loggedIn: { actor, graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, analytics, vcsClient, } = await this.getContextAsync(BuildInspect, {
|
|
32
31
|
nonInteractive: false,
|
|
33
32
|
});
|
|
34
33
|
const outputDirectory = path_1.default.resolve(process.cwd(), flags.output);
|
|
@@ -38,14 +37,13 @@ class BuildInspect extends EasCommand_1.default {
|
|
|
38
37
|
}
|
|
39
38
|
await this.prepareOutputDirAsync(outputDirectory, flags.force);
|
|
40
39
|
if (flags.stage === InspectStage.ARCHIVE) {
|
|
41
|
-
|
|
42
|
-
await
|
|
43
|
-
await vcs.makeShallowCopyAsync(tmpWorkingdir);
|
|
40
|
+
await vcsClient.ensureRepoExistsAsync();
|
|
41
|
+
await vcsClient.makeShallowCopyAsync(tmpWorkingdir);
|
|
44
42
|
await this.copyToOutputDirAsync(tmpWorkingdir, outputDirectory);
|
|
45
43
|
}
|
|
46
44
|
else {
|
|
47
45
|
try {
|
|
48
|
-
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(graphqlClient, analytics, projectDir, {
|
|
46
|
+
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(graphqlClient, analytics, vcsClient, projectDir, {
|
|
49
47
|
nonInteractive: false,
|
|
50
48
|
wait: true,
|
|
51
49
|
clearCache: false,
|
|
@@ -143,4 +141,5 @@ BuildInspect.contextDefinition = {
|
|
|
143
141
|
..._a.ContextOptions.DynamicProjectConfig,
|
|
144
142
|
..._a.ContextOptions.ProjectDir,
|
|
145
143
|
..._a.ContextOptions.Analytics,
|
|
144
|
+
..._a.ContextOptions.Vcs,
|
|
146
145
|
};
|
|
@@ -12,6 +12,7 @@ export default class BuildInternal extends EasCommand {
|
|
|
12
12
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
13
13
|
};
|
|
14
14
|
static contextDefinition: {
|
|
15
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
15
16
|
analytics: import("../../commandUtils/context/AnalyticsContextField").default;
|
|
16
17
|
projectDir: import("../../commandUtils/context/ProjectDirContextField").default;
|
|
17
18
|
getDynamicPublicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
@@ -21,12 +21,12 @@ class BuildInternal extends EasCommand_1.default {
|
|
|
21
21
|
const { flags } = await this.parse(BuildInternal);
|
|
22
22
|
// This command is always run with implicit --non-interactive and --json options
|
|
23
23
|
(0, json_1.enableJsonOutput)();
|
|
24
|
-
const { loggedIn: { actor, graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, analytics, } = await this.getContextAsync(BuildInternal, {
|
|
24
|
+
const { loggedIn: { actor, graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, analytics, vcsClient, } = await this.getContextAsync(BuildInternal, {
|
|
25
25
|
nonInteractive: true,
|
|
26
26
|
});
|
|
27
27
|
(0, vcs_1.setVcsClient)(new gitNoCommit_1.default());
|
|
28
28
|
await (0, _1.handleDeprecatedEasJsonAsync)(projectDir, flags.nonInteractive);
|
|
29
|
-
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(graphqlClient, analytics, projectDir, {
|
|
29
|
+
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(graphqlClient, analytics, vcsClient, projectDir, {
|
|
30
30
|
requestedPlatform: flags.platform,
|
|
31
31
|
profile: flags.profile,
|
|
32
32
|
nonInteractive: true,
|
|
@@ -60,4 +60,5 @@ BuildInternal.contextDefinition = {
|
|
|
60
60
|
..._a.ContextOptions.DynamicProjectConfig,
|
|
61
61
|
..._a.ContextOptions.ProjectDir,
|
|
62
62
|
..._a.ContextOptions.Analytics,
|
|
63
|
+
..._a.ContextOptions.Vcs,
|
|
63
64
|
};
|
|
@@ -21,6 +21,7 @@ export default class BuildList extends EasCommand {
|
|
|
21
21
|
gitCommitHash: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
22
22
|
};
|
|
23
23
|
static contextDefinition: {
|
|
24
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
24
25
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
25
26
|
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
26
27
|
};
|