eas-cli 0.33.0 → 0.35.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 +27 -27
- package/build/analytics.js +3 -9
- package/build/api.js +3 -3
- package/build/build/android/UpdatesModule.js +4 -15
- 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 +6 -18
- 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 +8 -5
- package/build/build/utils/formatBuild.js +1 -9
- package/build/build/utils/repository.js +10 -7
- package/build/build/utils/url.js +1 -1
- 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 +20 -48
- package/build/commands/branch/view.js +1 -1
- package/build/commands/build/index.js +43 -24
- 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/secret/delete.js +1 -1
- package/build/commands/update/view.js +1 -1
- package/build/credentials/android/AndroidCredentialsProvider.js +2 -2
- package/build/credentials/android/actions/{SetupBuildCredentials.d.ts → SetUpBuildCredentials.d.ts} +1 -1
- package/build/credentials/android/actions/{SetupBuildCredentials.js → SetUpBuildCredentials.js} +3 -3
- package/build/credentials/android/actions/{SetupBuildCredentialsFromCredentialsJson.d.ts → SetUpBuildCredentialsFromCredentialsJson.d.ts} +1 -1
- package/build/credentials/android/actions/{SetupBuildCredentialsFromCredentialsJson.js → SetUpBuildCredentialsFromCredentialsJson.js} +3 -3
- package/build/credentials/android/actions/{SetupGoogleServiceAccountKey.d.ts → SetUpGoogleServiceAccountKey.d.ts} +1 -1
- package/build/credentials/android/actions/{SetupGoogleServiceAccountKey.js → SetUpGoogleServiceAccountKey.js} +3 -3
- package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.js +2 -0
- package/build/credentials/credentialsJson/update.js +5 -4
- package/build/credentials/errors.d.ts +4 -0
- package/build/credentials/errors.js +8 -1
- package/build/credentials/ios/IosCredentialsProvider.js +4 -4
- package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +17 -1
- package/build/credentials/ios/actions/AscApiKeyUtils.js +156 -23
- package/build/credentials/ios/actions/AssignAscApiKey.d.ts +9 -0
- package/build/credentials/ios/actions/AssignAscApiKey.js +29 -0
- package/build/credentials/ios/actions/CreateAscApiKey.d.ts +9 -0
- package/build/credentials/ios/actions/CreateAscApiKey.js +21 -0
- 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 +6 -8
- package/build/credentials/ios/actions/PushKeyUtils.d.ts +1 -1
- package/build/credentials/ios/actions/PushKeyUtils.js +6 -6
- package/build/credentials/ios/actions/RemoveAscApiKey.d.ts +14 -0
- package/build/credentials/ios/actions/RemoveAscApiKey.js +55 -0
- package/build/credentials/ios/actions/{SetupAdhocProvisioningProfile.d.ts → SetUpAdhocProvisioningProfile.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupAdhocProvisioningProfile.js → SetUpAdhocProvisioningProfile.js} +5 -5
- package/build/credentials/ios/actions/SetUpAscApiKey.d.ts +21 -0
- package/build/credentials/ios/actions/SetUpAscApiKey.js +114 -0
- package/build/credentials/ios/actions/{SetupBuildCredentials.d.ts → SetUpBuildCredentials.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupBuildCredentials.js → SetUpBuildCredentials.js} +5 -5
- package/build/credentials/ios/actions/{SetupBuildCredentialsFromCredentialsJson.d.ts → SetUpBuildCredentialsFromCredentialsJson.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupBuildCredentialsFromCredentialsJson.js → SetUpBuildCredentialsFromCredentialsJson.js} +5 -5
- package/build/credentials/ios/actions/{SetupDistributionCertificate.d.ts → SetUpDistributionCertificate.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupDistributionCertificate.js → SetUpDistributionCertificate.js} +3 -3
- package/build/credentials/ios/actions/{SetupInternalProvisioningProfile.d.ts → SetUpInternalProvisioningProfile.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupInternalProvisioningProfile.js → SetUpInternalProvisioningProfile.js} +7 -7
- package/build/credentials/ios/actions/{SetupProvisioningProfile.d.ts → SetUpProvisioningProfile.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupProvisioningProfile.js → SetUpProvisioningProfile.js} +5 -5
- package/build/credentials/ios/actions/{SetupPushKey.d.ts → SetUpPushKey.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupPushKey.js → SetUpPushKey.js} +3 -3
- package/build/credentials/ios/actions/SetUpSubmissionCredentials.d.ts +10 -0
- package/build/credentials/ios/actions/SetUpSubmissionCredentials.js +53 -0
- package/build/credentials/ios/actions/{SetupTargetBuildCredentials.d.ts → SetUpTargetBuildCredentials.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupTargetBuildCredentials.js → SetUpTargetBuildCredentials.js} +10 -10
- package/build/credentials/ios/actions/{SetupTargetBuildCredentialsFromCredentialsJson.d.ts → SetUpTargetBuildCredentialsFromCredentialsJson.d.ts} +1 -1
- package/build/credentials/ios/actions/{SetupTargetBuildCredentialsFromCredentialsJson.js → SetUpTargetBuildCredentialsFromCredentialsJson.js} +3 -3
- package/build/credentials/ios/api/GraphqlClient.d.ts +8 -2
- package/build/credentials/ios/api/GraphqlClient.js +74 -2
- package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.d.ts +5 -0
- package/build/credentials/ios/api/graphql/mutations/AppStoreConnectApiKeyMutation.js +54 -0
- package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.d.ts +1 -0
- package/build/credentials/ios/api/graphql/mutations/IosAppCredentialsMutation.js +25 -0
- package/build/credentials/ios/api/graphql/queries/AppQuery.js +3 -1
- package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.d.ts +4 -0
- package/build/credentials/ios/api/graphql/queries/AppStoreConnectApiKeyQuery.js +33 -0
- 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/ios/appstore/AppStoreApi.d.ts +1 -1
- package/build/credentials/ios/appstore/Credentials.types.d.ts +1 -0
- package/build/credentials/ios/appstore/ascApiKey.d.ts +1 -1
- package/build/credentials/ios/appstore/ascApiKey.js +22 -12
- package/build/credentials/ios/credentials.d.ts +2 -1
- package/build/credentials/ios/credentials.js +8 -3
- package/build/credentials/ios/utils/printCredentials.js +30 -1
- package/build/credentials/ios/validators/validateAscApiKey.d.ts +5 -0
- package/build/credentials/ios/validators/validateAscApiKey.js +21 -0
- package/build/credentials/manager/Actions.d.ts +52 -0
- package/build/credentials/manager/Actions.js +53 -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 +7 -0
- package/build/credentials/manager/IosActions.js +145 -0
- package/build/credentials/manager/ManageAndroid.d.ts +1 -29
- package/build/credentials/manager/ManageAndroid.js +30 -163
- package/build/credentials/manager/ManageIos.d.ts +1 -29
- package/build/credentials/manager/ManageIos.js +78 -166
- package/build/credentials/utils/promptForCredentials.d.ts +2 -1
- package/build/credentials/utils/promptForCredentials.js +3 -2
- package/build/graphql/client.d.ts +8 -2
- package/build/graphql/client.js +1 -1
- package/build/graphql/generated.d.ts +170 -33
- 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/graphql/types/Build.js +1 -6
- package/build/graphql/types/credentials/AppStoreConnectApiKey.d.ts +1 -0
- package/build/graphql/types/credentials/AppStoreConnectApiKey.js +23 -0
- package/build/graphql/types/credentials/IosAppCredentials.js +6 -0
- 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/ArchiveSource.js +6 -5
- package/build/submit/android/ServiceAccountSource.js +2 -2
- package/build/submit/ios/AppSpecificPasswordSource.d.ts +2 -6
- package/build/submit/ios/AppSpecificPasswordSource.js +0 -18
- package/build/submit/ios/AscApiKeySource.d.ts +9 -3
- package/build/submit/ios/AscApiKeySource.js +10 -10
- package/build/submit/ios/CredentialsServiceSource.d.ts +14 -0
- package/build/submit/ios/CredentialsServiceSource.js +46 -0
- package/build/submit/ios/IosSubmitCommand.js +22 -14
- package/build/submit/ios/IosSubmitter.d.ts +3 -0
- package/build/submit/ios/IosSubmitter.js +30 -20
- package/build/submit/utils/errors.js +2 -0
- 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 +10 -10
|
@@ -7,14 +7,14 @@ const path_1 = (0, tslib_1.__importDefault)(require("path"));
|
|
|
7
7
|
const slash_1 = (0, tslib_1.__importDefault)(require("slash"));
|
|
8
8
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
9
9
|
const actions_1 = require("../../user/actions");
|
|
10
|
-
const vcs_1 =
|
|
10
|
+
const vcs_1 = require("../../vcs");
|
|
11
11
|
const cacheDefaults = {
|
|
12
12
|
disabled: false,
|
|
13
13
|
customPaths: [],
|
|
14
14
|
cacheDefaultPaths: true,
|
|
15
15
|
};
|
|
16
16
|
async function prepareJobAsync(ctx, jobData) {
|
|
17
|
-
const projectRootDirectory = (0, slash_1.default)(path_1.default.relative(await vcs_1.
|
|
17
|
+
const projectRootDirectory = (0, slash_1.default)(path_1.default.relative(await (0, vcs_1.getVcsClient)().getRootPathAsync(), ctx.projectDir)) || '.';
|
|
18
18
|
const username = (0, projectUtils_1.getUsername)(ctx.exp, await (0, actions_1.ensureLoggedInAsync)());
|
|
19
19
|
const buildCredentials = {};
|
|
20
20
|
if (jobData.credentials) {
|
|
@@ -28,7 +28,6 @@ async function prepareJobAsync(ctx, jobData) {
|
|
|
28
28
|
platform: eas_build_job_1.Platform.IOS,
|
|
29
29
|
projectArchive: jobData.projectArchive,
|
|
30
30
|
projectRootDirectory,
|
|
31
|
-
distribution: ctx.buildProfile.simulator ? 'simulator' : ctx.buildProfile.distribution,
|
|
32
31
|
builderEnvironment: {
|
|
33
32
|
image: ctx.buildProfile.image,
|
|
34
33
|
node: ctx.buildProfile.node,
|
|
@@ -49,12 +48,11 @@ async function prepareJobAsync(ctx, jobData) {
|
|
|
49
48
|
},
|
|
50
49
|
releaseChannel: ctx.buildProfile.releaseChannel,
|
|
51
50
|
updates: { channel: ctx.buildProfile.channel },
|
|
51
|
+
developmentClient: ctx.buildProfile.developmentClient,
|
|
52
|
+
simulator: ctx.buildProfile.simulator,
|
|
52
53
|
scheme: jobData.buildScheme,
|
|
53
54
|
buildConfiguration: ctx.buildProfile.buildConfiguration,
|
|
54
55
|
artifactPath: ctx.buildProfile.artifactPath,
|
|
55
|
-
buildType: ctx.buildProfile.developmentClient
|
|
56
|
-
? eas_build_job_1.Ios.BuildType.DEVELOPMENT_CLIENT
|
|
57
|
-
: eas_build_job_1.Ios.BuildType.RELEASE,
|
|
58
56
|
username,
|
|
59
57
|
};
|
|
60
58
|
return (0, eas_build_job_1.sanitizeJob)(job);
|
package/build/build/metadata.js
CHANGED
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.collectMetadataAsync = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
6
5
|
const applicationId_1 = require("../project/android/applicationId");
|
|
7
6
|
const bundleIdentifier_1 = require("../project/ios/bundleIdentifier");
|
|
8
7
|
const projectUtils_1 = require("../project/projectUtils");
|
|
9
8
|
const actions_1 = require("../user/actions");
|
|
10
|
-
const
|
|
9
|
+
const easCli_1 = require("../utils/easCli");
|
|
10
|
+
const vcs_1 = require("../vcs");
|
|
11
11
|
const UpdatesModule_1 = require("./android/UpdatesModule");
|
|
12
12
|
const version_1 = require("./android/version");
|
|
13
13
|
const UpdatesModule_2 = require("./ios/UpdatesModule");
|
|
14
14
|
const version_2 = require("./ios/version");
|
|
15
15
|
const updates_1 = require("./utils/updates");
|
|
16
|
-
/**
|
|
17
|
-
* We use require() to exclude package.json from TypeScript's analysis since it lives outside
|
|
18
|
-
* the src directory and would change the directory structure of the emitted files
|
|
19
|
-
* under the build directory
|
|
20
|
-
*/
|
|
21
|
-
const packageJSON = require('../../package.json');
|
|
22
16
|
async function collectMetadataAsync(ctx, platformContext) {
|
|
23
17
|
var _a;
|
|
24
18
|
const channelOrReleaseChannel = await resolveChannelOrReleaseChannelAsync(ctx);
|
|
@@ -28,7 +22,7 @@ async function collectMetadataAsync(ctx, platformContext) {
|
|
|
28
22
|
const metadata = {
|
|
29
23
|
trackingContext: ctx.trackingCtx,
|
|
30
24
|
...(await maybeResolveVersionsAsync(ctx, platformContext)),
|
|
31
|
-
cliVersion:
|
|
25
|
+
cliVersion: easCli_1.easCliVersion,
|
|
32
26
|
workflow: ctx.workflow,
|
|
33
27
|
credentialsSource: ctx.buildProfile.credentialsSource,
|
|
34
28
|
sdkVersion: ctx.exp.sdkVersion,
|
|
@@ -38,7 +32,8 @@ async function collectMetadataAsync(ctx, platformContext) {
|
|
|
38
32
|
appName: ctx.exp.name,
|
|
39
33
|
appIdentifier: await resolveAppIdentifierAsync(ctx, platformContext),
|
|
40
34
|
buildProfile: ctx.buildProfileName,
|
|
41
|
-
gitCommitHash: await vcs_1.
|
|
35
|
+
gitCommitHash: await (0, vcs_1.getVcsClient)().getCommitHashAsync(),
|
|
36
|
+
isGitWorkingTreeDirty: await (0, vcs_1.getVcsClient)().hasUncommittedChangesAsync(),
|
|
42
37
|
username: (0, projectUtils_1.getUsername)(ctx.exp, await (0, actions_1.ensureLoggedInAsync)()),
|
|
43
38
|
...(ctx.platform === eas_build_job_1.Platform.IOS && {
|
|
44
39
|
iosEnterpriseProvisioning: resolveIosEnterpriseProvisioning(ctx),
|
|
@@ -11,7 +11,8 @@ const log_1 = (0, tslib_1.__importStar)(require("../../log"));
|
|
|
11
11
|
const platform_1 = require("../../platform");
|
|
12
12
|
const workflow_1 = require("../../project/workflow");
|
|
13
13
|
const prompts_1 = require("../../prompts");
|
|
14
|
-
const
|
|
14
|
+
const expoCli_1 = require("../../utils/expoCli");
|
|
15
|
+
const vcs_1 = require("../../vcs");
|
|
15
16
|
const repository_1 = require("./repository");
|
|
16
17
|
async function ensureExpoDevClientInstalledForDevClientBuildsAsync({ projectDir, nonInteractive = false, buildProfiles = [], }) {
|
|
17
18
|
if (await isExpoDevClientInstalledAsync(projectDir)) {
|
|
@@ -76,9 +77,11 @@ async function installExpoDevClientAsync(projectDir, { nonInteractive }) {
|
|
|
76
77
|
log_1.default.newLine();
|
|
77
78
|
log_1.default.log(`Running ${chalk_1.default.bold('expo install expo-dev-client')}`);
|
|
78
79
|
log_1.default.newLine();
|
|
79
|
-
await (0,
|
|
80
|
+
await (0, expoCli_1.expoCommandAsync)(projectDir, ['install', 'expo-dev-client']);
|
|
80
81
|
log_1.default.newLine();
|
|
81
|
-
await (0,
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
if (await (0, vcs_1.getVcsClient)().isCommitRequiredAsync()) {
|
|
83
|
+
await (0, repository_1.reviewAndCommitChangesAsync)('Install expo-dev-client', {
|
|
84
|
+
nonInteractive,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
84
87
|
}
|
|
@@ -117,13 +117,5 @@ function formatGraphQLBuild(build) {
|
|
|
117
117
|
exports.formatGraphQLBuild = formatGraphQLBuild;
|
|
118
118
|
const getActorName = (build) => {
|
|
119
119
|
var _a;
|
|
120
|
-
|
|
121
|
-
return 'unknown';
|
|
122
|
-
}
|
|
123
|
-
else if (build.initiatingActor.__typename === 'User') {
|
|
124
|
-
return build.initiatingActor.username;
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
return (_a = build.initiatingActor.firstName) !== null && _a !== void 0 ? _a : 'unknown';
|
|
128
|
-
}
|
|
120
|
+
return ((_a = build.initiatingActor) === null || _a === void 0 ? void 0 : _a.displayName) || 'unknown';
|
|
129
121
|
};
|
|
@@ -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/utils/url.js
CHANGED
|
@@ -26,7 +26,7 @@ exports.getArtifactUrl = getArtifactUrl;
|
|
|
26
26
|
function getInternalDistributionInstallUrl(build) {
|
|
27
27
|
var _a;
|
|
28
28
|
if (build.platform === generated_1.AppPlatform.Ios) {
|
|
29
|
-
return `itms-services://?action=download-manifest;url=${(0, api_1.getExpoApiBaseUrl)()}
|
|
29
|
+
return `itms-services://?action=download-manifest;url=${(0, api_1.getExpoApiBaseUrl)()}/v2/projects/${build.project.id}/builds/${build.id}/manifest.plist`;
|
|
30
30
|
}
|
|
31
31
|
(0, assert_1.default)((_a = build.artifacts) === null || _a === void 0 ? void 0 : _a.buildUrl, 'buildUrl is missing');
|
|
32
32
|
return build.artifacts.buildUrl;
|
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
|
}
|
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.defaultPublishPlatforms = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const config_1 = require("@expo/config");
|
|
6
|
-
const
|
|
6
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
7
|
+
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
7
8
|
const command_1 = require("@oclif/command");
|
|
8
9
|
const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
|
|
9
10
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
@@ -16,11 +17,12 @@ const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
|
|
|
16
17
|
const ora_1 = require("../../ora");
|
|
17
18
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
18
19
|
const publish_1 = require("../../project/publish");
|
|
20
|
+
const workflow_1 = require("../../project/workflow");
|
|
19
21
|
const prompts_1 = require("../../prompts");
|
|
20
22
|
const utils_1 = require("../../update/utils");
|
|
21
23
|
const uniqBy_1 = (0, tslib_1.__importDefault)(require("../../utils/expodash/uniqBy"));
|
|
22
24
|
const formatFields_1 = (0, tslib_1.__importDefault)(require("../../utils/formatFields"));
|
|
23
|
-
const vcs_1 =
|
|
25
|
+
const vcs_1 = require("../../vcs");
|
|
24
26
|
const create_1 = require("./create");
|
|
25
27
|
const list_1 = require("./list");
|
|
26
28
|
const view_1 = require("./view");
|
|
@@ -40,7 +42,7 @@ async function getUpdateGroupAsync({ group, }) {
|
|
|
40
42
|
}
|
|
41
43
|
`, {
|
|
42
44
|
group,
|
|
43
|
-
})
|
|
45
|
+
}, { additionalTypenames: ['Update'] })
|
|
44
46
|
.toPromise());
|
|
45
47
|
return updatesByGroup;
|
|
46
48
|
}
|
|
@@ -69,11 +71,12 @@ class BranchPublish extends EasCommand_1.default {
|
|
|
69
71
|
skipSDKVersionRequirement: true,
|
|
70
72
|
isPublicConfig: true,
|
|
71
73
|
});
|
|
72
|
-
const runtimeVersions =
|
|
74
|
+
const runtimeVersions = await getRuntimeVersionObjectAsync(exp, platformFlag, projectDir);
|
|
73
75
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
74
76
|
if (!branchName && autoFlag) {
|
|
75
77
|
branchName =
|
|
76
|
-
(await vcs_1.
|
|
78
|
+
(await (0, vcs_1.getVcsClient)().getBranchNameAsync()) ||
|
|
79
|
+
`branch-${Math.random().toString(36).substr(2, 4)}`;
|
|
77
80
|
}
|
|
78
81
|
if (!branchName) {
|
|
79
82
|
const validationMessage = 'branch name may not be empty.';
|
|
@@ -170,7 +173,7 @@ class BranchPublish extends EasCommand_1.default {
|
|
|
170
173
|
}
|
|
171
174
|
}
|
|
172
175
|
if (!message && autoFlag) {
|
|
173
|
-
message = (_b = (await vcs_1.
|
|
176
|
+
message = (_b = (await (0, vcs_1.getVcsClient)().getLastCommitMessageAsync())) === null || _b === void 0 ? void 0 : _b.trim();
|
|
174
177
|
}
|
|
175
178
|
if (!message) {
|
|
176
179
|
const validationMessage = 'publish message may not be empty.';
|
|
@@ -183,7 +186,7 @@ class BranchPublish extends EasCommand_1.default {
|
|
|
183
186
|
message: `Please enter a publication message.`,
|
|
184
187
|
initial: republish
|
|
185
188
|
? `Republish "${oldMessage}" - group: ${group}`
|
|
186
|
-
: (_c = (await vcs_1.
|
|
189
|
+
: (_c = (await (0, vcs_1.getVcsClient)().getLastCommitMessageAsync())) === null || _c === void 0 ? void 0 : _c.trim(),
|
|
187
190
|
validate: value => (value ? true : validationMessage),
|
|
188
191
|
}));
|
|
189
192
|
}
|
|
@@ -295,50 +298,19 @@ BranchPublish.flags = {
|
|
|
295
298
|
default: false,
|
|
296
299
|
}),
|
|
297
300
|
};
|
|
298
|
-
function
|
|
301
|
+
async function getRuntimeVersionObjectAsync(exp, platformFlag, projectDir) {
|
|
299
302
|
var _a, _b;
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
}
|
|
309
|
-
const iOSRuntimeVersion = (_a = exp.ios) === null || _a === void 0 ? void 0 : _a.runtimeVersion; // TODO-JJ remove cast to any
|
|
310
|
-
const androidRuntimeVersion = (_b = exp.android) === null || _b === void 0 ? void 0 : _b.runtimeVersion; // TODO-JJ remove cast to any
|
|
311
|
-
let runtimeVersions;
|
|
312
|
-
switch (platformFlag) {
|
|
313
|
-
case 'ios': {
|
|
314
|
-
runtimeVersions = {
|
|
315
|
-
ios: iOSRuntimeVersion !== null && iOSRuntimeVersion !== void 0 ? iOSRuntimeVersion : defaultRuntimeVersion,
|
|
316
|
-
};
|
|
317
|
-
break;
|
|
318
|
-
}
|
|
319
|
-
case 'android': {
|
|
320
|
-
runtimeVersions = {
|
|
321
|
-
android: androidRuntimeVersion !== null && androidRuntimeVersion !== void 0 ? androidRuntimeVersion : defaultRuntimeVersion,
|
|
322
|
-
};
|
|
323
|
-
break;
|
|
324
|
-
}
|
|
325
|
-
case 'all': {
|
|
326
|
-
runtimeVersions = {
|
|
327
|
-
ios: iOSRuntimeVersion !== null && iOSRuntimeVersion !== void 0 ? iOSRuntimeVersion : defaultRuntimeVersion,
|
|
328
|
-
android: androidRuntimeVersion !== null && androidRuntimeVersion !== void 0 ? androidRuntimeVersion : defaultRuntimeVersion,
|
|
329
|
-
};
|
|
330
|
-
break;
|
|
303
|
+
const platforms = (platformFlag === 'all' ? ['android', 'ios'] : [platformFlag]);
|
|
304
|
+
for (const platform of platforms) {
|
|
305
|
+
const isPolicy = typeof ((_b = (_a = exp[platform]) === null || _a === void 0 ? void 0 : _a.runtimeVersion) !== null && _b !== void 0 ? _b : exp.runtimeVersion) === 'object';
|
|
306
|
+
if (isPolicy) {
|
|
307
|
+
const isManaged = (await (0, workflow_1.resolveWorkflowAsync)(projectDir, platform)) === eas_build_job_1.Workflow.MANAGED;
|
|
308
|
+
if (!isManaged) {
|
|
309
|
+
throw new Error('Runtime version policies are only supported in the managed workflow.');
|
|
310
|
+
}
|
|
331
311
|
}
|
|
332
|
-
default:
|
|
333
|
-
throw new Error('Platform flag must be "ios", "android", or "all"');
|
|
334
|
-
}
|
|
335
|
-
if (Object.values(runtimeVersions).some(runtime => !runtime)) {
|
|
336
|
-
throw new Error("Couldn't find a 'runtimeVersion' for every platform. Please specify it under the 'expo' key in 'app.json'");
|
|
337
|
-
}
|
|
338
|
-
if (Object.values(runtimeVersions).some(runtime => typeof runtime !== 'string')) {
|
|
339
|
-
throw new Error(`Please ensure that all of the runtime versions defined in the app.json are strings.`);
|
|
340
312
|
}
|
|
341
|
-
return
|
|
313
|
+
return Object.fromEntries(platforms.map(platform => [platform, config_plugins_1.Updates.getRuntimeVersion(exp, platform)]));
|
|
342
314
|
}
|
|
343
315
|
function formatUpdateTitle(update) {
|
|
344
316
|
const { message, createdAt, actor, runtimeVersion } = update;
|
|
@@ -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,43 @@ Build.flags = {
|
|
|
272
276
|
}),
|
|
273
277
|
};
|
|
274
278
|
async function handleDeprecatedEasJsonAsync(projectDir, nonInteractive) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
279
|
+
const easJsonPath = eas_json_1.EasJsonReader.formatEasJsonPath(projectDir);
|
|
280
|
+
if (!(await fs_extra_1.default.pathExists(easJsonPath))) {
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
const easJsonReader = new eas_json_1.EasJsonReader(projectDir);
|
|
284
|
+
const rawEasJson = await easJsonReader.readRawAsync();
|
|
285
|
+
if (rawEasJson === null || rawEasJson === void 0 ? void 0 : rawEasJson.cli) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
if (nonInteractive) {
|
|
289
|
+
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.`);
|
|
290
|
+
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.');
|
|
291
|
+
(0, vcs_1.setVcsClient)(new git_1.default());
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
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')}`);
|
|
295
|
+
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.`);
|
|
296
|
+
log_1.default.newLine();
|
|
297
|
+
const mode = await (0, prompts_1.selectAsync)('Select your preferred Git integration', [
|
|
298
|
+
{ title: 'Require changes to be committed in Git (old default)', value: 'requireCommit' },
|
|
299
|
+
{ title: 'Allow builds with dirty Git working tree (new default)', value: 'noCommit' },
|
|
300
|
+
]);
|
|
301
|
+
if (mode === 'requireCommit') {
|
|
302
|
+
(0, vcs_1.setVcsClient)(new git_1.default());
|
|
303
|
+
await (0, repository_1.ensureRepoIsCleanAsync)(nonInteractive);
|
|
304
|
+
}
|
|
305
|
+
rawEasJson.cli =
|
|
306
|
+
mode === 'requireCommit'
|
|
307
|
+
? { version: `>= ${easCli_1.easCliVersion}`, requireCommit: true }
|
|
308
|
+
: { version: `>= ${easCli_1.easCliVersion}` };
|
|
309
|
+
await fs_extra_1.default.writeJSON(easJsonPath, rawEasJson, { spaces: 2 });
|
|
310
|
+
log_1.default.withTick('Updated eas.json');
|
|
311
|
+
if (mode === 'requireCommit') {
|
|
312
|
+
await (0, vcs_1.getVcsClient)().trackFileAsync(easJsonPath);
|
|
313
|
+
await (0, repository_1.reviewAndCommitChangesAsync)('Set cli.requireCommit to true in eas.json', {
|
|
314
|
+
nonInteractive,
|
|
284
315
|
});
|
|
285
|
-
if (confirm) {
|
|
286
|
-
await (0, eas_json_1.migrateAsync)(projectDir);
|
|
287
|
-
if (hasMismatchedExtendsKeys) {
|
|
288
|
-
log_1.default.warn('"extends" keyword can only be migrated automatically to the new format if both Android and iOS profiles extend base profiles with the same names for both platforms');
|
|
289
|
-
log_1.default.warn('Migration was successful, but you need to manually adjust the extend rules for your profiles');
|
|
290
|
-
(0, errors_1.error)('Fix eas.json manually', { exit: 1 });
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
else {
|
|
294
|
-
log_1.default.error("Aborting, update your eas.json according to https://docs.expo.dev/build/eas-json and run 'eas build' again");
|
|
295
|
-
(0, errors_1.error)('Unsupported eas.json format', { exit: 1 });
|
|
296
|
-
}
|
|
297
316
|
}
|
|
298
317
|
}
|
|
299
318
|
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
|
}
|
|
@@ -59,7 +59,7 @@ class EnvironmentSecretDelete extends EasCommand_1.default {
|
|
|
59
59
|
}
|
|
60
60
|
exports.default = EnvironmentSecretDelete;
|
|
61
61
|
EnvironmentSecretDelete.description = `Delete an environment secret by ID.
|
|
62
|
-
Unsure where to find the secret's ID? Run ${chalk_1.default.bold('eas
|
|
62
|
+
Unsure where to find the secret's ID? Run ${chalk_1.default.bold('eas secret:list')}`;
|
|
63
63
|
EnvironmentSecretDelete.flags = {
|
|
64
64
|
id: command_1.flags.string({
|
|
65
65
|
description: 'ID of the secret to delete',
|