eas-cli 5.4.0 → 5.6.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 +4 -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 +474 -5
- package/build/graphql/generated.js +10 -3
- package/build/graphql/types/Account.js +4 -0
- package/build/graphql/types/Build.js +1 -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 +25 -7
- package/build/submit/android/AndroidSubmitter.d.ts +1 -1
- package/build/submit/android/AndroidSubmitter.js +2 -9
- package/build/submit/commons.d.ts +1 -0
- package/build/submit/commons.js +20 -1
- package/build/submit/context.d.ts +5 -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/submit/ios/IosSubmitCommand.js +23 -6
- package/build/submit/ios/IosSubmitter.d.ts +1 -1
- package/build/submit/ios/IosSubmitter.js +2 -9
- 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
|
@@ -88,6 +88,7 @@ BuildList.flags = {
|
|
|
88
88
|
BuildList.contextDefinition = {
|
|
89
89
|
..._a.ContextOptions.ProjectConfig,
|
|
90
90
|
..._a.ContextOptions.LoggedIn,
|
|
91
|
+
..._a.ContextOptions.Vcs,
|
|
91
92
|
};
|
|
92
93
|
const toAppPlatform = (requestedPlatform) => {
|
|
93
94
|
if (!requestedPlatform || requestedPlatform === platform_1.RequestedPlatform.All) {
|
|
@@ -35,6 +35,7 @@ export default class BuildResign extends EasCommand {
|
|
|
35
35
|
id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
36
36
|
};
|
|
37
37
|
static contextDefinition: {
|
|
38
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
38
39
|
analytics: import("../../commandUtils/context/AnalyticsContextField").default;
|
|
39
40
|
projectDir: import("../../commandUtils/context/ProjectDirContextField").default;
|
|
40
41
|
getDynamicPublicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
@@ -37,7 +37,7 @@ class BuildResign extends EasCommand_1.default {
|
|
|
37
37
|
}
|
|
38
38
|
const flags = this.sanitizeFlags(rawFlags);
|
|
39
39
|
const { limit, offset, nonInteractive } = flags;
|
|
40
|
-
const { loggedIn: { actor, graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, analytics, } = await this.getContextAsync(BuildResign, {
|
|
40
|
+
const { loggedIn: { actor, graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, analytics, vcsClient, } = await this.getContextAsync(BuildResign, {
|
|
41
41
|
nonInteractive: flags.nonInteractive,
|
|
42
42
|
});
|
|
43
43
|
const maybeBuild = flags.maybeBuildId
|
|
@@ -64,6 +64,7 @@ class BuildResign extends EasCommand_1.default {
|
|
|
64
64
|
analytics,
|
|
65
65
|
env: buildProfile.env,
|
|
66
66
|
easJsonCliConfig,
|
|
67
|
+
vcsClient,
|
|
67
68
|
});
|
|
68
69
|
if (buildProfile.credentialsSource !== eas_json_1.CredentialsSource.LOCAL && !nonInteractive) {
|
|
69
70
|
await credentialsCtx.appStore.ensureAuthenticatedAsync();
|
|
@@ -72,12 +73,14 @@ class BuildResign extends EasCommand_1.default {
|
|
|
72
73
|
projectDir,
|
|
73
74
|
nonInteractive,
|
|
74
75
|
exp,
|
|
76
|
+
vcsClient,
|
|
75
77
|
}, buildProfile);
|
|
76
78
|
const targets = await (0, target_1.resolveTargetsAsync)({
|
|
77
79
|
projectDir,
|
|
78
80
|
exp,
|
|
79
81
|
xcodeBuildContext,
|
|
80
82
|
env: buildProfile.env,
|
|
83
|
+
vcsClient,
|
|
81
84
|
});
|
|
82
85
|
const credentialsResult = await (0, credentials_1.ensureIosCredentialsForBuildResignAsync)(credentialsCtx, targets, buildProfile);
|
|
83
86
|
(0, assert_1.default)((_e = build.artifacts) === null || _e === void 0 ? void 0 : _e.applicationArchiveUrl, 'Missing application archive.');
|
|
@@ -109,8 +112,6 @@ class BuildResign extends EasCommand_1.default {
|
|
|
109
112
|
const buildResult = await (0, build_1.waitForBuildEndAsync)(graphqlClient, {
|
|
110
113
|
buildIds: [newBuild.id],
|
|
111
114
|
accountName: account.name,
|
|
112
|
-
nonInteractive,
|
|
113
|
-
projectDir,
|
|
114
115
|
});
|
|
115
116
|
if (!flags.json) {
|
|
116
117
|
(0, printBuildInfo_1.printBuildResults)(buildResult);
|
|
@@ -206,4 +207,5 @@ BuildResign.contextDefinition = {
|
|
|
206
207
|
..._a.ContextOptions.DynamicProjectConfig,
|
|
207
208
|
..._a.ContextOptions.ProjectDir,
|
|
208
209
|
..._a.ContextOptions.Analytics,
|
|
210
|
+
..._a.ContextOptions.Vcs,
|
|
209
211
|
};
|
|
@@ -11,6 +11,7 @@ export default class Run extends EasCommand {
|
|
|
11
11
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
12
|
};
|
|
13
13
|
static contextDefinition: {
|
|
14
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
14
15
|
projectDir: import("../../commandUtils/context/ProjectDirContextField").default;
|
|
15
16
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
16
17
|
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
@@ -8,6 +8,7 @@ export default class BuildVersionGetView extends EasCommand {
|
|
|
8
8
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
9
|
};
|
|
10
10
|
static contextDefinition: {
|
|
11
|
+
vcsClient: import("../../../commandUtils/context/VcsClientContextField").default;
|
|
11
12
|
projectDir: import("../../../commandUtils/context/ProjectDirContextField").default;
|
|
12
13
|
getDynamicPublicProjectConfigAsync: import("../../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
13
14
|
getDynamicPrivateProjectConfigAsync: import("../../../commandUtils/context/DynamicProjectConfigContextField").DynamicPrivateProjectConfigContextField;
|
|
@@ -22,7 +22,7 @@ class BuildVersionGetView extends EasCommand_1.default {
|
|
|
22
22
|
if (flags.json) {
|
|
23
23
|
(0, json_1.enableJsonOutput)();
|
|
24
24
|
}
|
|
25
|
-
const { loggedIn: { graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, } = await this.getContextAsync(BuildVersionGetView, {
|
|
25
|
+
const { loggedIn: { graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, vcsClient, } = await this.getContextAsync(BuildVersionGetView, {
|
|
26
26
|
nonInteractive: true,
|
|
27
27
|
});
|
|
28
28
|
if (!flags.platform && flags['non-interactive']) {
|
|
@@ -54,6 +54,7 @@ class BuildVersionGetView extends EasCommand_1.default {
|
|
|
54
54
|
exp,
|
|
55
55
|
buildProfile: profile,
|
|
56
56
|
platform,
|
|
57
|
+
vcsClient,
|
|
57
58
|
});
|
|
58
59
|
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(graphqlClient, projectId, (0, AppPlatform_1.toAppPlatform)(platform), applicationIdentifier);
|
|
59
60
|
if (remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion) {
|
|
@@ -103,4 +104,5 @@ BuildVersionGetView.contextDefinition = {
|
|
|
103
104
|
..._a.ContextOptions.LoggedIn,
|
|
104
105
|
..._a.ContextOptions.DynamicProjectConfig,
|
|
105
106
|
..._a.ContextOptions.ProjectDir,
|
|
107
|
+
..._a.ContextOptions.Vcs,
|
|
106
108
|
};
|
|
@@ -6,6 +6,7 @@ export default class BuildVersionSetView extends EasCommand {
|
|
|
6
6
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
7
|
};
|
|
8
8
|
static contextDefinition: {
|
|
9
|
+
vcsClient: import("../../../commandUtils/context/VcsClientContextField").default;
|
|
9
10
|
projectDir: import("../../../commandUtils/context/ProjectDirContextField").default;
|
|
10
11
|
getDynamicPublicProjectConfigAsync: import("../../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
11
12
|
getDynamicPrivateProjectConfigAsync: import("../../../commandUtils/context/DynamicProjectConfigContextField").DynamicPrivateProjectConfigContextField;
|
|
@@ -23,7 +23,7 @@ class BuildVersionSetView extends EasCommand_1.default {
|
|
|
23
23
|
async runAsync() {
|
|
24
24
|
var _b, _c, _d;
|
|
25
25
|
const { flags } = await this.parse(BuildVersionSetView);
|
|
26
|
-
const { loggedIn: { graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, } = await this.getContextAsync(BuildVersionSetView, {
|
|
26
|
+
const { loggedIn: { graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, vcsClient, } = await this.getContextAsync(BuildVersionSetView, {
|
|
27
27
|
nonInteractive: false,
|
|
28
28
|
});
|
|
29
29
|
const platform = await (0, platform_1.selectPlatformAsync)(flags.platform);
|
|
@@ -40,6 +40,7 @@ class BuildVersionSetView extends EasCommand_1.default {
|
|
|
40
40
|
exp,
|
|
41
41
|
buildProfile: profile,
|
|
42
42
|
platform,
|
|
43
|
+
vcsClient,
|
|
43
44
|
});
|
|
44
45
|
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(graphqlClient, projectId, (0, AppPlatform_1.toAppPlatform)(platform), applicationIdentifier);
|
|
45
46
|
const currentStateMessage = (remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)
|
|
@@ -85,6 +86,7 @@ BuildVersionSetView.contextDefinition = {
|
|
|
85
86
|
..._a.ContextOptions.LoggedIn,
|
|
86
87
|
..._a.ContextOptions.DynamicProjectConfig,
|
|
87
88
|
..._a.ContextOptions.ProjectDir,
|
|
89
|
+
..._a.ContextOptions.Vcs,
|
|
88
90
|
};
|
|
89
91
|
function getApplicationIdentifierName(platform) {
|
|
90
92
|
if (platform === eas_build_job_1.Platform.ANDROID) {
|
|
@@ -6,6 +6,7 @@ export default class BuildVersionSyncView extends EasCommand {
|
|
|
6
6
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
7
|
};
|
|
8
8
|
static contextDefinition: {
|
|
9
|
+
vcsClient: import("../../../commandUtils/context/VcsClientContextField").default;
|
|
9
10
|
projectDir: import("../../../commandUtils/context/ProjectDirContextField").default;
|
|
10
11
|
getDynamicPublicProjectConfigAsync: import("../../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
11
12
|
getDynamicPrivateProjectConfigAsync: import("../../../commandUtils/context/DynamicProjectConfigContextField").DynamicPrivateProjectConfigContextField;
|
|
@@ -26,7 +26,7 @@ class BuildVersionSyncView extends EasCommand_1.default {
|
|
|
26
26
|
async runAsync() {
|
|
27
27
|
var _b;
|
|
28
28
|
const { flags } = await this.parse(BuildVersionSyncView);
|
|
29
|
-
const { loggedIn: { graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, } = await this.getContextAsync(BuildVersionSyncView, {
|
|
29
|
+
const { loggedIn: { graphqlClient }, getDynamicPrivateProjectConfigAsync, projectDir, vcsClient, } = await this.getContextAsync(BuildVersionSyncView, {
|
|
30
30
|
nonInteractive: true,
|
|
31
31
|
});
|
|
32
32
|
const requestedPlatform = await (0, platform_1.selectRequestedPlatformAsync)(flags.platform);
|
|
@@ -53,9 +53,10 @@ class BuildVersionSyncView extends EasCommand_1.default {
|
|
|
53
53
|
exp,
|
|
54
54
|
buildProfile: profileInfo.profile,
|
|
55
55
|
platform: profileInfo.platform,
|
|
56
|
+
vcsClient,
|
|
56
57
|
});
|
|
57
58
|
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(graphqlClient, projectId, (0, AppPlatform_1.toAppPlatform)(profileInfo.platform), applicationIdentifier);
|
|
58
|
-
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, profileInfo.platform);
|
|
59
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, profileInfo.platform, vcsClient);
|
|
59
60
|
if (!(remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)) {
|
|
60
61
|
log_1.default.warn(`Skipping versions sync for ${platformDisplayName}. There are no versions configured on Expo servers, use "eas build:version:set" or run a build to initialize it.`);
|
|
61
62
|
continue;
|
|
@@ -71,6 +72,7 @@ class BuildVersionSyncView extends EasCommand_1.default {
|
|
|
71
72
|
profile: profileInfo.profile,
|
|
72
73
|
workflow,
|
|
73
74
|
buildVersion: remoteVersions.buildVersion,
|
|
75
|
+
vcsClient,
|
|
74
76
|
});
|
|
75
77
|
}
|
|
76
78
|
else {
|
|
@@ -80,18 +82,20 @@ class BuildVersionSyncView extends EasCommand_1.default {
|
|
|
80
82
|
profile: profileInfo.profile,
|
|
81
83
|
workflow,
|
|
82
84
|
buildVersion: remoteVersions.buildVersion,
|
|
85
|
+
vcsClient,
|
|
83
86
|
});
|
|
84
87
|
}
|
|
85
88
|
log_1.default.withTick(`Successfully updated the ${platformDisplayName} ${(0, remoteVersionSource_1.getBuildVersionName)(profileInfo.platform)} in native code to ${chalk_1.default.bold(remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)}.`);
|
|
86
89
|
}
|
|
87
90
|
}
|
|
88
|
-
async syncIosAsync({ workflow, projectDir, exp, profile, buildVersion, }) {
|
|
89
|
-
const xcodeBuildContext = await (0, scheme_1.resolveXcodeBuildContextAsync)({ exp, projectDir, nonInteractive: false }, profile);
|
|
91
|
+
async syncIosAsync({ workflow, projectDir, exp, profile, buildVersion, vcsClient, }) {
|
|
92
|
+
const xcodeBuildContext = await (0, scheme_1.resolveXcodeBuildContextAsync)({ exp, projectDir, nonInteractive: false, vcsClient }, profile);
|
|
90
93
|
const targets = await (0, target_1.resolveTargetsAsync)({
|
|
91
94
|
projectDir,
|
|
92
95
|
exp,
|
|
93
96
|
xcodeBuildContext,
|
|
94
97
|
env: profile.env,
|
|
98
|
+
vcsClient,
|
|
95
99
|
});
|
|
96
100
|
if (!(0, versions_2.isValidBuildNumber)(buildVersion)) {
|
|
97
101
|
throw new Error(`Invalid buildNumber (${buildVersion}), ${versions_2.BUILD_NUMBER_REQUIREMENTS}.`);
|
|
@@ -137,4 +141,5 @@ BuildVersionSyncView.contextDefinition = {
|
|
|
137
141
|
..._a.ContextOptions.LoggedIn,
|
|
138
142
|
..._a.ContextOptions.DynamicProjectConfig,
|
|
139
143
|
..._a.ContextOptions.ProjectDir,
|
|
144
|
+
..._a.ContextOptions.Vcs,
|
|
140
145
|
};
|
|
@@ -8,6 +8,7 @@ export default class BuildView extends EasCommand {
|
|
|
8
8
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
9
|
};
|
|
10
10
|
static contextDefinition: {
|
|
11
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
11
12
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
12
13
|
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
13
14
|
};
|
|
@@ -5,6 +5,7 @@ export default class Credentials 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
|
analytics: import("../commandUtils/context/AnalyticsContextField").default;
|
|
9
10
|
getDynamicPublicProjectConfigAsync: import("../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
10
11
|
getDynamicPrivateProjectConfigAsync: import("../commandUtils/context/DynamicProjectConfigContextField").DynamicPrivateProjectConfigContextField;
|
|
@@ -8,10 +8,10 @@ const SelectPlatform_1 = require("../credentials/manager/SelectPlatform");
|
|
|
8
8
|
class Credentials extends EasCommand_1.default {
|
|
9
9
|
async runAsync() {
|
|
10
10
|
const { flags } = await this.parse(Credentials);
|
|
11
|
-
const { loggedIn: { actor, graphqlClient }, privateProjectConfig, getDynamicPrivateProjectConfigAsync, analytics, } = await this.getContextAsync(Credentials, {
|
|
11
|
+
const { loggedIn: { actor, graphqlClient }, privateProjectConfig, getDynamicPrivateProjectConfigAsync, analytics, vcsClient, } = await this.getContextAsync(Credentials, {
|
|
12
12
|
nonInteractive: false,
|
|
13
13
|
});
|
|
14
|
-
await new SelectPlatform_1.SelectPlatform(actor, graphqlClient, analytics, privateProjectConfig !== null && privateProjectConfig !== void 0 ? privateProjectConfig : null, getDynamicPrivateProjectConfigAsync, flags.platform).runAsync();
|
|
14
|
+
await new SelectPlatform_1.SelectPlatform(actor, graphqlClient, vcsClient, analytics, privateProjectConfig !== null && privateProjectConfig !== void 0 ? privateProjectConfig : null, getDynamicPrivateProjectConfigAsync, flags.platform).runAsync();
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
exports.default = Credentials;
|
|
@@ -25,4 +25,5 @@ Credentials.contextDefinition = {
|
|
|
25
25
|
..._a.ContextOptions.OptionalProjectConfig,
|
|
26
26
|
..._a.ContextOptions.DynamicProjectConfig,
|
|
27
27
|
..._a.ContextOptions.Analytics,
|
|
28
|
+
..._a.ContextOptions.Vcs,
|
|
28
29
|
};
|
|
@@ -2,6 +2,7 @@ import EasCommand from '../commandUtils/EasCommand';
|
|
|
2
2
|
export default class Diagnostics extends EasCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static contextDefinition: {
|
|
5
|
+
vcsClient: import("../commandUtils/context/VcsClientContextField").default;
|
|
5
6
|
projectDir: import("../commandUtils/context/ProjectDirContextField").default;
|
|
6
7
|
};
|
|
7
8
|
runAsync(): Promise<void>;
|
|
@@ -10,7 +10,7 @@ const workflow_1 = require("../project/workflow");
|
|
|
10
10
|
const easCli_1 = require("../utils/easCli");
|
|
11
11
|
class Diagnostics extends EasCommand_1.default {
|
|
12
12
|
async runAsync() {
|
|
13
|
-
const { projectDir } = await this.getContextAsync(Diagnostics, {
|
|
13
|
+
const { projectDir, vcsClient } = await this.getContextAsync(Diagnostics, {
|
|
14
14
|
nonInteractive: true,
|
|
15
15
|
});
|
|
16
16
|
const info = await envinfo_1.default.run({
|
|
@@ -34,12 +34,12 @@ class Diagnostics extends EasCommand_1.default {
|
|
|
34
34
|
title: `EAS CLI ${easCli_1.easCliVersion} environment info`,
|
|
35
35
|
});
|
|
36
36
|
log_1.default.log(info.trimEnd());
|
|
37
|
-
await this.printWorkflowAsync(projectDir);
|
|
37
|
+
await this.printWorkflowAsync(projectDir, vcsClient);
|
|
38
38
|
log_1.default.newLine();
|
|
39
39
|
}
|
|
40
|
-
async printWorkflowAsync(projectDir) {
|
|
41
|
-
const androidWorkflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
42
|
-
const iosWorkflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
|
|
40
|
+
async printWorkflowAsync(projectDir, vcsClient) {
|
|
41
|
+
const androidWorkflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID, vcsClient);
|
|
42
|
+
const iosWorkflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS, vcsClient);
|
|
43
43
|
if (androidWorkflow === iosWorkflow) {
|
|
44
44
|
log_1.default.log(` Project workflow: ${androidWorkflow}`);
|
|
45
45
|
}
|
|
@@ -55,4 +55,5 @@ _a = Diagnostics;
|
|
|
55
55
|
Diagnostics.description = 'display environment info';
|
|
56
56
|
Diagnostics.contextDefinition = {
|
|
57
57
|
..._a.ContextOptions.ProjectDir,
|
|
58
|
+
..._a.ContextOptions.Vcs,
|
|
58
59
|
};
|
|
@@ -5,6 +5,7 @@ export default class MetadataPull extends EasCommand {
|
|
|
5
5
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
6
|
};
|
|
7
7
|
static contextDefinition: {
|
|
8
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
8
9
|
analytics: import("../../commandUtils/context/AnalyticsContextField").default;
|
|
9
10
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
10
11
|
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
@@ -18,11 +18,11 @@ class MetadataPull extends EasCommand_1.default {
|
|
|
18
18
|
async runAsync() {
|
|
19
19
|
log_1.default.warn('EAS Metadata is in beta and subject to breaking changes.');
|
|
20
20
|
const { flags } = await this.parse(MetadataPull);
|
|
21
|
-
const { loggedIn: { actor, graphqlClient }, privateProjectConfig: { exp, projectId, projectDir }, analytics, } = await this.getContextAsync(MetadataPull, {
|
|
21
|
+
const { loggedIn: { actor, graphqlClient }, privateProjectConfig: { exp, projectId, projectDir }, analytics, vcsClient, } = await this.getContextAsync(MetadataPull, {
|
|
22
22
|
nonInteractive: false,
|
|
23
23
|
});
|
|
24
24
|
// this command is interactive (all nonInteractive flags passed to utility functions are false)
|
|
25
|
-
await (0, configure_1.ensureProjectConfiguredAsync)({ projectDir, nonInteractive: false });
|
|
25
|
+
await (0, configure_1.ensureProjectConfiguredAsync)({ projectDir, nonInteractive: false, vcsClient });
|
|
26
26
|
const submitProfiles = await (0, profiles_1.getProfilesAsync)({
|
|
27
27
|
type: 'submit',
|
|
28
28
|
easJsonAccessor: eas_json_1.EasJsonAccessor.fromProjectPath(projectDir),
|
|
@@ -41,6 +41,7 @@ class MetadataPull extends EasCommand_1.default {
|
|
|
41
41
|
graphqlClient,
|
|
42
42
|
analytics,
|
|
43
43
|
nonInteractive: false,
|
|
44
|
+
vcsClient,
|
|
44
45
|
});
|
|
45
46
|
try {
|
|
46
47
|
const filePath = await (0, download_1.downloadMetadataAsync)({
|
|
@@ -77,4 +78,5 @@ MetadataPull.contextDefinition = {
|
|
|
77
78
|
..._a.ContextOptions.ProjectConfig,
|
|
78
79
|
..._a.ContextOptions.LoggedIn,
|
|
79
80
|
..._a.ContextOptions.Analytics,
|
|
81
|
+
..._a.ContextOptions.Vcs,
|
|
80
82
|
};
|
|
@@ -5,6 +5,7 @@ export default class MetadataPush extends EasCommand {
|
|
|
5
5
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
6
|
};
|
|
7
7
|
static contextDefinition: {
|
|
8
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
8
9
|
analytics: import("../../commandUtils/context/AnalyticsContextField").default;
|
|
9
10
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
10
11
|
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
@@ -16,11 +16,11 @@ class MetadataPush extends EasCommand_1.default {
|
|
|
16
16
|
async runAsync() {
|
|
17
17
|
log_1.default.warn('EAS Metadata is in beta and subject to breaking changes.');
|
|
18
18
|
const { flags } = await this.parse(MetadataPush);
|
|
19
|
-
const { loggedIn: { actor, graphqlClient }, privateProjectConfig: { exp, projectId, projectDir }, analytics, } = await this.getContextAsync(MetadataPush, {
|
|
19
|
+
const { loggedIn: { actor, graphqlClient }, privateProjectConfig: { exp, projectId, projectDir }, analytics, vcsClient, } = await this.getContextAsync(MetadataPush, {
|
|
20
20
|
nonInteractive: false,
|
|
21
21
|
});
|
|
22
22
|
// this command is interactive (all nonInteractive flags passed to utility functions are false)
|
|
23
|
-
await (0, configure_1.ensureProjectConfiguredAsync)({ projectDir, nonInteractive: false });
|
|
23
|
+
await (0, configure_1.ensureProjectConfiguredAsync)({ projectDir, nonInteractive: false, vcsClient });
|
|
24
24
|
const submitProfiles = await (0, profiles_1.getProfilesAsync)({
|
|
25
25
|
type: 'submit',
|
|
26
26
|
easJsonAccessor: eas_json_1.EasJsonAccessor.fromProjectPath(projectDir),
|
|
@@ -39,6 +39,7 @@ class MetadataPush extends EasCommand_1.default {
|
|
|
39
39
|
graphqlClient,
|
|
40
40
|
analytics,
|
|
41
41
|
nonInteractive: false,
|
|
42
|
+
vcsClient,
|
|
42
43
|
});
|
|
43
44
|
try {
|
|
44
45
|
const { appleLink } = await (0, upload_1.uploadMetadataAsync)({
|
|
@@ -71,4 +72,5 @@ MetadataPush.contextDefinition = {
|
|
|
71
72
|
..._a.ContextOptions.ProjectConfig,
|
|
72
73
|
..._a.ContextOptions.LoggedIn,
|
|
73
74
|
..._a.ContextOptions.Analytics,
|
|
75
|
+
..._a.ContextOptions.Vcs,
|
|
74
76
|
};
|
|
@@ -17,5 +17,6 @@ export default class ProjectInit extends EasCommand {
|
|
|
17
17
|
private static setExplicitIDAsync;
|
|
18
18
|
private static initializeWithExplicitIDAsync;
|
|
19
19
|
private static initializeWithInteractiveSelectionAsync;
|
|
20
|
+
private static getAccountChoices;
|
|
20
21
|
runAsync(): Promise<void>;
|
|
21
22
|
}
|
|
@@ -147,17 +147,7 @@ class ProjectInit extends EasCommand_1.default {
|
|
|
147
147
|
accountName = allAccounts[0].name;
|
|
148
148
|
}
|
|
149
149
|
else {
|
|
150
|
-
|
|
151
|
-
const sortedAccounts = actor.__typename === 'Robot'
|
|
152
|
-
? allAccounts
|
|
153
|
-
: [...allAccounts].sort((a, _b) => actor.__typename === 'User' ? (a.name === actor.username ? -1 : 1) : 0);
|
|
154
|
-
const choices = sortedAccounts.map(account => ({
|
|
155
|
-
title: account.name,
|
|
156
|
-
value: account,
|
|
157
|
-
description: !accountNamesWhereUserHasSufficientPermissionsToCreateApp.has(account.name)
|
|
158
|
-
? '(Viewer Role)'
|
|
159
|
-
: undefined,
|
|
160
|
-
}));
|
|
150
|
+
const choices = ProjectInit.getAccountChoices(actor, accountNamesWhereUserHasSufficientPermissionsToCreateApp);
|
|
161
151
|
accountName = (await (0, prompts_1.promptAsync)({
|
|
162
152
|
type: 'select',
|
|
163
153
|
name: 'account',
|
|
@@ -211,6 +201,48 @@ class ProjectInit extends EasCommand_1.default {
|
|
|
211
201
|
await ProjectInit.saveProjectIdAndLogSuccessAsync(projectDir, createdProjectId);
|
|
212
202
|
return createdProjectId;
|
|
213
203
|
}
|
|
204
|
+
static getAccountChoices(actor, namesWithSufficientPermissions) {
|
|
205
|
+
const allAccounts = actor.accounts;
|
|
206
|
+
const sortedAccounts = actor.__typename === 'Robot'
|
|
207
|
+
? allAccounts
|
|
208
|
+
: [...allAccounts].sort((a, _b) => actor.__typename === 'User' ? (a.name === actor.username ? -1 : 1) : 0);
|
|
209
|
+
if (actor.__typename !== 'Robot') {
|
|
210
|
+
const personalAccount = allAccounts === null || allAccounts === void 0 ? void 0 : allAccounts.find(account => { var _c; return ((_c = account === null || account === void 0 ? void 0 : account.ownerUserActor) === null || _c === void 0 ? void 0 : _c.id) === actor.id; });
|
|
211
|
+
const personalAccountChoice = personalAccount
|
|
212
|
+
? {
|
|
213
|
+
title: personalAccount.name,
|
|
214
|
+
value: personalAccount,
|
|
215
|
+
description: !namesWithSufficientPermissions.has(personalAccount.name)
|
|
216
|
+
? '(Personal) (Viewer Role)'
|
|
217
|
+
: '(Personal)',
|
|
218
|
+
}
|
|
219
|
+
: undefined;
|
|
220
|
+
const userAccounts = allAccounts === null || allAccounts === void 0 ? void 0 : allAccounts.filter(account => account.ownerUserActor && account.name !== actor.username).map(account => ({
|
|
221
|
+
title: account.name,
|
|
222
|
+
value: account,
|
|
223
|
+
description: !namesWithSufficientPermissions.has(account.name)
|
|
224
|
+
? '(Team) (Viewer Role)'
|
|
225
|
+
: '(Team)',
|
|
226
|
+
}));
|
|
227
|
+
const organizationAccounts = allAccounts === null || allAccounts === void 0 ? void 0 : allAccounts.filter(account => account.name !== actor.username && !account.ownerUserActor).map(account => ({
|
|
228
|
+
title: account.name,
|
|
229
|
+
value: account,
|
|
230
|
+
description: !namesWithSufficientPermissions.has(account.name)
|
|
231
|
+
? '(Organization) (Viewer Role)'
|
|
232
|
+
: '(Organization)',
|
|
233
|
+
}));
|
|
234
|
+
let choices = [];
|
|
235
|
+
if (personalAccountChoice) {
|
|
236
|
+
choices = [personalAccountChoice];
|
|
237
|
+
}
|
|
238
|
+
return [...choices, ...userAccounts, ...organizationAccounts].sort((a, _b) => actor.__typename === 'User' ? (a.value.name === actor.username ? -1 : 1) : 0);
|
|
239
|
+
}
|
|
240
|
+
return sortedAccounts.map(account => ({
|
|
241
|
+
title: account.name,
|
|
242
|
+
value: account,
|
|
243
|
+
description: !namesWithSufficientPermissions.has(account.name) ? '(Viewer Role)' : undefined,
|
|
244
|
+
}));
|
|
245
|
+
}
|
|
214
246
|
async runAsync() {
|
|
215
247
|
const { flags: { id: idArgument, force, 'non-interactive': nonInteractive }, } = await this.parse(ProjectInit);
|
|
216
248
|
const { loggedIn: { actor, graphqlClient }, projectDir, } = await this.getContextAsync(ProjectInit, { nonInteractive });
|
|
@@ -14,6 +14,7 @@ export default class Submit extends EasCommand {
|
|
|
14
14
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
15
|
};
|
|
16
16
|
static contextDefinition: {
|
|
17
|
+
vcsClient: import("../commandUtils/context/VcsClientContextField").default;
|
|
17
18
|
analytics: import("../commandUtils/context/AnalyticsContextField").default;
|
|
18
19
|
projectDir: import("../commandUtils/context/ProjectDirContextField").default;
|
|
19
20
|
loggedIn: import("../commandUtils/context/LoggedInContextField").default;
|
package/build/commands/submit.js
CHANGED
|
@@ -18,7 +18,7 @@ const statuspageService_1 = require("../utils/statuspageService");
|
|
|
18
18
|
class Submit extends EasCommand_1.default {
|
|
19
19
|
async runAsync() {
|
|
20
20
|
const { flags: rawFlags } = await this.parse(Submit);
|
|
21
|
-
const { loggedIn: { actor, graphqlClient }, privateProjectConfig: { exp, projectId, projectDir }, analytics, } = await this.getContextAsync(Submit, {
|
|
21
|
+
const { loggedIn: { actor, graphqlClient }, privateProjectConfig: { exp, projectId, projectDir }, analytics, vcsClient, } = await this.getContextAsync(Submit, {
|
|
22
22
|
nonInteractive: false,
|
|
23
23
|
});
|
|
24
24
|
const flags = this.sanitizeFlags(rawFlags);
|
|
@@ -46,6 +46,8 @@ class Submit extends EasCommand_1.default {
|
|
|
46
46
|
analytics,
|
|
47
47
|
exp,
|
|
48
48
|
projectId,
|
|
49
|
+
vcsClient,
|
|
50
|
+
specifiedProfile: flagsWithPlatform.profile,
|
|
49
51
|
});
|
|
50
52
|
if (submissionProfiles.length > 1) {
|
|
51
53
|
log_1.default.newLine();
|
|
@@ -143,4 +145,5 @@ Submit.contextDefinition = {
|
|
|
143
145
|
..._a.ContextOptions.ProjectConfig,
|
|
144
146
|
..._a.ContextOptions.ProjectDir,
|
|
145
147
|
..._a.ContextOptions.Analytics,
|
|
148
|
+
..._a.ContextOptions.Vcs,
|
|
146
149
|
};
|
|
@@ -6,6 +6,7 @@ export default class UpdateConfigure extends EasCommand {
|
|
|
6
6
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
7
|
};
|
|
8
8
|
static contextDefinition: {
|
|
9
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
9
10
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
10
11
|
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
11
12
|
};
|
|
@@ -9,21 +9,21 @@ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasComm
|
|
|
9
9
|
const flags_1 = require("../../commandUtils/flags");
|
|
10
10
|
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
11
11
|
const configure_2 = require("../../update/configure");
|
|
12
|
-
const vcs_1 = require("../../vcs");
|
|
13
12
|
class UpdateConfigure extends EasCommand_1.default {
|
|
14
13
|
async runAsync() {
|
|
15
14
|
const { flags } = await this.parse(UpdateConfigure);
|
|
16
15
|
const platform = flags.platform;
|
|
17
|
-
const { privateProjectConfig: { projectId, exp, projectDir }, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdateConfigure, {
|
|
16
|
+
const { privateProjectConfig: { projectId, exp, projectDir }, loggedIn: { graphqlClient }, vcsClient, } = await this.getContextAsync(UpdateConfigure, {
|
|
18
17
|
nonInteractive: flags['non-interactive'],
|
|
19
18
|
});
|
|
20
19
|
log_1.default.log('💡 The following process will configure your project to use EAS Update. These changes only apply to your local project files and you can safely revert them at any time.');
|
|
21
|
-
await
|
|
20
|
+
await vcsClient.ensureRepoExistsAsync();
|
|
22
21
|
await (0, configure_2.ensureEASUpdateIsConfiguredAsync)(graphqlClient, {
|
|
23
22
|
exp,
|
|
24
23
|
projectId,
|
|
25
24
|
projectDir,
|
|
26
25
|
platform,
|
|
26
|
+
vcsClient,
|
|
27
27
|
});
|
|
28
28
|
await (0, configure_2.ensureEASUpdateIsConfiguredInEasJsonAsync)(projectDir);
|
|
29
29
|
log_1.default.addNewLineIfNone();
|
|
@@ -53,4 +53,5 @@ UpdateConfigure.flags = {
|
|
|
53
53
|
UpdateConfigure.contextDefinition = {
|
|
54
54
|
..._a.ContextOptions.ProjectConfig,
|
|
55
55
|
..._a.ContextOptions.LoggedIn,
|
|
56
|
+
..._a.ContextOptions.Vcs,
|
|
56
57
|
};
|
|
@@ -18,6 +18,7 @@ export default class UpdatePublish extends EasCommand {
|
|
|
18
18
|
'private-key-path': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
19
19
|
};
|
|
20
20
|
static contextDefinition: {
|
|
21
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
21
22
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
22
23
|
getDynamicPublicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
23
24
|
getDynamicPrivateProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPrivateProjectConfigContextField;
|