eas-cli 2.0.0 → 2.2.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 +8 -1034
- package/build/branch/queries.d.ts +10 -2
- package/build/branch/queries.js +27 -24
- package/build/branch/utils.d.ts +4 -0
- package/build/branch/utils.js +15 -0
- package/build/build/android/build.js +3 -3
- package/build/build/android/graphql.js +2 -1
- package/build/build/android/prepareJob.js +4 -3
- package/build/build/android/syncProjectConfiguration.d.ts +2 -1
- package/build/build/android/syncProjectConfiguration.js +2 -2
- package/build/build/build.js +15 -4
- package/build/build/configure.js +2 -2
- package/build/build/createContext.d.ts +5 -1
- package/build/build/createContext.js +8 -14
- package/build/build/ios/build.js +2 -1
- package/build/build/ios/credentials.js +1 -1
- package/build/build/ios/graphql.js +2 -1
- package/build/build/ios/prepareJob.js +4 -3
- package/build/build/ios/syncProjectConfiguration.d.ts +2 -1
- package/build/build/ios/syncProjectConfiguration.js +2 -2
- package/build/build/local.js +1 -1
- package/build/build/metadata.js +1 -2
- package/build/build/queries.d.ts +9 -0
- package/build/build/queries.js +51 -0
- package/build/build/runBuildAndSubmit.d.ts +3 -1
- package/build/build/runBuildAndSubmit.js +15 -7
- package/build/build/utils/repository.js +5 -1
- package/build/channel/queries.d.ts +17 -0
- package/build/channel/queries.js +137 -0
- package/build/channel/utils.d.ts +22 -0
- package/build/channel/utils.js +87 -0
- package/build/commandUtils/EasCommand.d.ts +68 -7
- package/build/commandUtils/EasCommand.js +60 -79
- package/build/commandUtils/context/ActorContextField.d.ts +5 -0
- package/build/commandUtils/context/ActorContextField.js +11 -0
- package/build/commandUtils/context/ContextField.d.ts +6 -0
- package/build/commandUtils/context/ContextField.js +5 -0
- package/build/commandUtils/context/DynamicProjectConfigContextField.d.ts +11 -0
- package/build/commandUtils/context/DynamicProjectConfigContextField.js +27 -0
- package/build/commandUtils/context/OptionalProjectConfigContextField.d.ts +13 -0
- package/build/commandUtils/context/OptionalProjectConfigContextField.js +37 -0
- package/build/commandUtils/context/ProjectConfigContextField.d.ts +13 -0
- package/build/commandUtils/context/ProjectConfigContextField.js +23 -0
- package/build/commandUtils/context/ProjectDirContextField.d.ts +4 -0
- package/build/commandUtils/context/ProjectDirContextField.js +11 -0
- package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.d.ts +21 -0
- package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.js +75 -0
- package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.d.ts +17 -0
- package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +102 -0
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.d.ts +24 -0
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +108 -0
- package/build/commandUtils/flags.d.ts +10 -0
- package/build/commandUtils/flags.js +23 -0
- package/build/commandUtils/pagination.d.ts +7 -4
- package/build/commandUtils/pagination.js +11 -15
- package/build/commands/account/login.d.ts +0 -2
- package/build/commands/account/login.js +2 -7
- package/build/commands/account/logout.d.ts +0 -2
- package/build/commands/account/logout.js +0 -5
- package/build/commands/account/view.d.ts +0 -2
- package/build/commands/account/view.js +0 -5
- package/build/commands/analytics.d.ts +0 -1
- package/build/commands/analytics.js +0 -4
- package/build/commands/branch/create.d.ts +4 -0
- package/build/commands/branch/create.js +18 -18
- package/build/commands/branch/delete.d.ts +4 -0
- package/build/commands/branch/delete.js +29 -26
- package/build/commands/branch/list.d.ts +5 -2
- package/build/commands/branch/list.js +13 -8
- package/build/commands/branch/rename.d.ts +5 -1
- package/build/commands/branch/rename.js +15 -13
- package/build/commands/branch/view.d.ts +5 -2
- package/build/commands/branch/view.js +31 -13
- package/build/commands/build/cancel.d.ts +7 -0
- package/build/commands/build/cancel.js +50 -23
- package/build/commands/build/configure.d.ts +3 -0
- package/build/commands/build/configure.js +12 -7
- package/build/commands/build/index.d.ts +7 -2
- package/build/commands/build/index.js +77 -15
- package/build/commands/build/inspect.d.ts +5 -0
- package/build/commands/build/inspect.js +12 -3
- package/build/commands/build/list.d.ts +7 -2
- package/build/commands/build/list.js +36 -59
- package/build/commands/build/version/set.d.ts +5 -0
- package/build/commands/build/version/set.js +22 -14
- package/build/commands/build/version/sync.d.ts +5 -0
- package/build/commands/build/version/sync.js +22 -13
- package/build/commands/build/view.d.ts +3 -0
- package/build/commands/build/view.js +20 -14
- package/build/commands/channel/create.d.ts +4 -0
- package/build/commands/channel/create.js +32 -25
- package/build/commands/channel/delete.d.ts +3 -0
- package/build/commands/channel/delete.js +36 -59
- package/build/commands/channel/edit.d.ts +7 -7
- package/build/commands/channel/edit.js +39 -72
- package/build/commands/channel/list.d.ts +6 -0
- package/build/commands/channel/list.js +20 -76
- package/build/commands/channel/rollout.d.ts +5 -1
- package/build/commands/channel/rollout.js +34 -35
- package/build/commands/channel/view.d.ts +6 -33
- package/build/commands/channel/view.js +31 -132
- package/build/commands/config.d.ts +6 -2
- package/build/commands/config.js +22 -13
- package/build/commands/credentials.d.ts +4 -0
- package/build/commands/credentials.js +10 -1
- package/build/commands/device/create.d.ts +4 -0
- package/build/commands/device/create.js +15 -3
- package/build/commands/device/delete.d.ts +13 -8
- package/build/commands/device/delete.js +81 -129
- package/build/commands/device/list.d.ts +7 -0
- package/build/commands/device/list.js +42 -63
- package/build/commands/device/view.d.ts +3 -0
- package/build/commands/device/view.js +10 -5
- package/build/commands/diagnostics.d.ts +3 -1
- package/build/commands/diagnostics.js +10 -8
- package/build/commands/metadata/pull.d.ts +4 -0
- package/build/commands/metadata/pull.js +13 -8
- package/build/commands/metadata/push.d.ts +4 -0
- package/build/commands/metadata/push.js +13 -8
- package/build/commands/open.d.ts +8 -0
- package/build/commands/open.js +42 -0
- package/build/commands/project/info.d.ts +3 -0
- package/build/commands/project/info.js +9 -6
- package/build/commands/project/init.d.ts +12 -0
- package/build/commands/project/init.js +155 -8
- package/build/commands/secret/create.d.ts +6 -0
- package/build/commands/secret/create.js +87 -30
- package/build/commands/secret/delete.d.ts +4 -0
- package/build/commands/secret/delete.js +28 -19
- package/build/commands/secret/list.d.ts +3 -0
- package/build/commands/secret/list.js +19 -13
- package/build/commands/submit.d.ts +5 -0
- package/build/commands/submit.js +16 -7
- package/build/commands/update/configure.d.ts +3 -0
- package/build/commands/update/configure.js +24 -18
- package/build/commands/update/delete.d.ts +1 -0
- package/build/commands/update/delete.js +5 -8
- package/build/commands/update/index.d.ts +8 -12
- package/build/commands/update/index.js +90 -166
- package/build/commands/update/list.d.ts +8 -2
- package/build/commands/update/list.js +51 -81
- package/build/commands/update/view.d.ts +0 -4
- package/build/commands/update/view.js +14 -51
- package/build/commands/webhook/create.d.ts +4 -0
- package/build/commands/webhook/create.js +10 -5
- package/build/commands/webhook/delete.d.ts +6 -0
- package/build/commands/webhook/delete.js +26 -14
- package/build/commands/webhook/list.d.ts +3 -0
- package/build/commands/webhook/list.js +13 -9
- package/build/commands/webhook/update.d.ts +1 -0
- package/build/commands/webhook/update.js +3 -1
- package/build/credentials/android/actions/BuildCredentialsUtils.js +2 -6
- package/build/credentials/android/actions/CreateFcm.d.ts +2 -3
- package/build/credentials/android/actions/CreateGoogleServiceAccountKey.d.ts +2 -3
- package/build/credentials/android/actions/CreateKeystore.d.ts +2 -3
- package/build/credentials/android/actions/CreateKeystore.js +1 -2
- package/build/credentials/android/actions/RemoveGoogleServiceAccountKey.d.ts +2 -3
- package/build/credentials/android/actions/UseExistingGoogleServiceAccountKey.d.ts +2 -3
- package/build/credentials/android/api/GraphqlClient.d.ts +6 -7
- package/build/credentials/context.d.ts +8 -4
- package/build/credentials/context.js +8 -23
- package/build/credentials/ios/IosCredentialsProvider.js +11 -6
- package/build/credentials/ios/actions/AppleTeamFormatting.d.ts +2 -0
- package/build/credentials/ios/actions/AppleTeamFormatting.js +7 -0
- package/build/credentials/ios/actions/AppleTeamUtils.d.ts +1 -2
- package/build/credentials/ios/actions/AppleTeamUtils.js +1 -5
- package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +3 -4
- package/build/credentials/ios/actions/AscApiKeyUtils.js +2 -2
- package/build/credentials/ios/actions/AssignAscApiKey.d.ts +1 -1
- package/build/credentials/ios/actions/AssignPushKey.d.ts +1 -1
- package/build/credentials/ios/actions/BuildCredentialsUtils.d.ts +3 -3
- package/build/credentials/ios/actions/BuildCredentialsUtils.js +8 -12
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.d.ts +4 -2
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +5 -2
- package/build/credentials/ios/actions/CreateAscApiKey.d.ts +2 -3
- package/build/credentials/ios/actions/CreateDistributionCertificate.d.ts +2 -2
- package/build/credentials/ios/actions/CreateProvisioningProfile.d.ts +4 -2
- package/build/credentials/ios/actions/CreateProvisioningProfile.js +3 -2
- package/build/credentials/ios/actions/CreatePushKey.d.ts +2 -3
- package/build/credentials/ios/actions/DeviceUtils.d.ts +0 -1
- package/build/credentials/ios/actions/DeviceUtils.js +3 -19
- package/build/credentials/ios/actions/DistributionCertificateUtils.d.ts +3 -4
- package/build/credentials/ios/actions/DistributionCertificateUtils.js +2 -2
- package/build/credentials/ios/actions/ProvisioningProfileUtils.d.ts +2 -1
- package/build/credentials/ios/actions/ProvisioningProfileUtils.js +4 -2
- package/build/credentials/ios/actions/PushKeyUtils.d.ts +2 -3
- package/build/credentials/ios/actions/PushKeyUtils.js +2 -2
- package/build/credentials/ios/actions/RemoveAscApiKey.d.ts +2 -3
- package/build/credentials/ios/actions/RemoveDistributionCertificate.d.ts +3 -4
- package/build/credentials/ios/actions/RemoveProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/RemovePushKey.d.ts +2 -3
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.d.ts +9 -3
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +30 -18
- package/build/credentials/ios/actions/SetUpAscApiKey.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpBuildCredentials.js +1 -0
- package/build/credentials/ios/actions/SetUpDistributionCertificate.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.d.ts +9 -3
- package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.js +6 -12
- package/build/credentials/ios/actions/SetUpProvisioningProfile.d.ts +4 -2
- package/build/credentials/ios/actions/SetUpProvisioningProfile.js +8 -5
- package/build/credentials/ios/actions/SetUpPushKey.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpSubmissionCredentials.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.d.ts +3 -1
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.js +5 -5
- package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.d.ts +1 -1
- package/build/credentials/ios/api/GraphqlClient.d.ts +9 -15
- package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.d.ts +2 -3
- package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.js +3 -1
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.d.ts +3 -3
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +20 -6
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.d.ts +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +8 -7
- package/build/credentials/ios/api/graphql/types/AppLookupParams.d.ts +7 -0
- package/build/credentials/ios/api/graphql/types/AppLookupParams.js +2 -0
- package/build/credentials/ios/appstore/AppStoreApi.d.ts +7 -4
- package/build/credentials/ios/appstore/AppStoreApi.js +8 -8
- package/build/credentials/ios/appstore/Credentials.types.d.ts +0 -14
- package/build/credentials/ios/appstore/Credentials.types.js +0 -6
- package/build/credentials/ios/appstore/constants.d.ts +1 -0
- package/build/credentials/ios/appstore/constants.js +6 -0
- package/build/credentials/ios/appstore/distributionCertificate.js +1 -1
- package/build/credentials/ios/appstore/provisioningProfile.d.ts +5 -3
- package/build/credentials/ios/appstore/provisioningProfile.js +30 -7
- package/build/credentials/ios/appstore/provisioningProfileAdhoc.d.ts +3 -1
- package/build/credentials/ios/appstore/provisioningProfileAdhoc.js +10 -10
- package/build/credentials/ios/types.d.ts +2 -3
- package/build/credentials/ios/utils/printCredentials.d.ts +1 -1
- package/build/credentials/ios/validators/validateProvisioningProfile.d.ts +3 -2
- package/build/credentials/ios/validators/validateProvisioningProfile.js +6 -4
- package/build/credentials/manager/HelperActions.d.ts +4 -1
- package/build/credentials/manager/ManageAndroid.js +4 -14
- package/build/credentials/manager/ManageIos.js +20 -20
- package/build/credentials/manager/SelectBuildProfileFromEasJson.d.ts +1 -1
- package/build/credentials/manager/SelectBuildProfileFromEasJson.js +3 -3
- package/build/credentials/manager/SelectPlatform.d.ts +5 -1
- package/build/credentials/manager/SelectPlatform.js +5 -3
- package/build/devices/actions/create/action.d.ts +2 -3
- package/build/devices/actions/create/developerPortalMethod.js +2 -2
- package/build/devices/context.d.ts +3 -5
- package/build/devices/context.js +2 -11
- package/build/devices/manager.d.ts +4 -5
- package/build/devices/manager.js +9 -16
- package/build/devices/queries.d.ts +21 -0
- package/build/devices/queries.js +121 -0
- package/build/devices/utils/errors.d.ts +3 -0
- package/build/devices/utils/errors.js +9 -0
- package/build/devices/utils/formatDevice.d.ts +3 -3
- package/build/devices/utils/formatDevice.js +8 -3
- package/build/graphql/generated.d.ts +1141 -192
- package/build/graphql/generated.js +13 -2
- package/build/graphql/mutations/EnvironmentSecretMutation.d.ts +3 -1
- package/build/graphql/queries/AppQuery.d.ts +1 -0
- package/build/graphql/queries/AppQuery.js +19 -0
- package/build/graphql/queries/BranchQuery.d.ts +5 -6
- package/build/graphql/queries/BranchQuery.js +44 -3
- package/build/graphql/queries/BuildQuery.d.ts +2 -20
- package/build/graphql/queries/BuildQuery.js +2 -2
- package/build/graphql/queries/ChannelQuery.d.ts +5 -2
- package/build/graphql/queries/ChannelQuery.js +45 -19
- package/build/graphql/queries/EnvironmentSecretsQuery.d.ts +5 -3
- package/build/graphql/queries/EnvironmentSecretsQuery.js +14 -28
- package/build/graphql/queries/UpdateQuery.d.ts +4 -6
- package/build/graphql/queries/UpdateQuery.js +59 -50
- package/build/graphql/queries/UserQuery.js +8 -1
- package/build/graphql/types/Account.d.ts +1 -0
- package/build/graphql/types/Account.js +17 -0
- package/build/graphql/types/App.js +7 -0
- package/build/graphql/types/EnvironmentSecret.d.ts +7 -0
- package/build/graphql/types/EnvironmentSecret.js +16 -1
- package/build/graphql/types/Update.d.ts +1 -0
- package/build/graphql/types/Update.js +30 -0
- package/build/graphql/types/UpdateBranch.js +4 -15
- package/build/metadata/context.d.ts +1 -1
- package/build/metadata/context.js +7 -9
- package/build/project/android/applicationId.d.ts +2 -1
- package/build/project/android/applicationId.js +7 -7
- package/build/project/android/versions.js +1 -1
- package/build/project/applicationIdentifier.d.ts +2 -1
- package/build/project/applicationIdentifier.js +2 -2
- package/build/project/expoConfig.d.ts +3 -3
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.d.ts +22 -0
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +93 -0
- package/build/project/ios/bundleIdentifier.d.ts +2 -1
- package/build/project/ios/bundleIdentifier.js +7 -7
- package/build/project/ios/scheme.d.ts +1 -1
- package/build/project/ios/target.d.ts +7 -0
- package/build/project/ios/target.js +26 -1
- package/build/project/projectUtils.d.ts +4 -31
- package/build/project/projectUtils.js +13 -123
- package/build/project/remoteVersionSource.d.ts +2 -2
- package/build/project/remoteVersionSource.js +8 -7
- package/build/project/workflow.js +3 -1
- package/build/submit/android/ServiceAccountSource.js +1 -2
- package/build/submit/context.d.ts +3 -1
- package/build/submit/context.js +12 -14
- package/build/submit/ios/CredentialsServiceSource.js +1 -2
- package/build/submit/utils/builds.js +3 -1
- package/build/update/android/UpdatesModule.d.ts +1 -1
- package/build/update/android/UpdatesModule.js +2 -3
- package/build/update/ios/UpdatesModule.d.ts +1 -1
- package/build/update/ios/UpdatesModule.js +2 -3
- package/build/update/queries.d.ts +16 -1
- package/build/update/queries.js +96 -30
- package/build/update/utils.d.ts +21 -8
- package/build/update/utils.js +75 -14
- package/build/user/actions.d.ts +2 -8
- package/build/user/actions.js +4 -63
- package/build/utils/profiles.d.ts +3 -3
- package/build/utils/profiles.js +6 -5
- package/build/vcs/clients/git.d.ts +1 -1
- package/build/vcs/clients/git.js +5 -2
- package/build/vcs/clients/gitNoCommit.js +2 -1
- package/build/vcs/vcs.d.ts +1 -1
- package/build/webhooks/input.d.ts +2 -1
- package/build/webhooks/input.js +10 -1
- package/oclif.manifest.json +1 -1
- package/package.json +6 -5
- package/build/project/ensureProjectExists.d.ts +0 -21
- package/build/project/ensureProjectExists.js +0 -88
- package/build/user/Account.d.ts +0 -3
- package/build/user/Account.js +0 -7
|
@@ -4,5 +4,8 @@ export default class BuildConfigure extends EasCommand {
|
|
|
4
4
|
static flags: {
|
|
5
5
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
6
|
};
|
|
7
|
+
static contextDefinition: {
|
|
8
|
+
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
9
|
+
};
|
|
7
10
|
runAsync(): Promise<void>;
|
|
8
11
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
@@ -9,7 +10,6 @@ const configure_1 = require("../../build/configure");
|
|
|
9
10
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
10
11
|
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
11
12
|
const platform_1 = require("../../platform");
|
|
12
|
-
const expoConfig_1 = require("../../project/expoConfig");
|
|
13
13
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
14
14
|
const workflow_1 = require("../../project/workflow");
|
|
15
15
|
const prompts_1 = require("../../prompts");
|
|
@@ -18,13 +18,15 @@ const UpdatesModule_2 = require("../../update/ios/UpdatesModule");
|
|
|
18
18
|
const vcs_1 = require("../../vcs");
|
|
19
19
|
class BuildConfigure extends EasCommand_1.default {
|
|
20
20
|
async runAsync() {
|
|
21
|
-
var
|
|
21
|
+
var _b;
|
|
22
22
|
const { flags } = await this.parse(BuildConfigure);
|
|
23
|
+
const { projectConfig: { exp, projectId, projectDir }, } = await this.getContextAsync(BuildConfigure, {
|
|
24
|
+
nonInteractive: false,
|
|
25
|
+
});
|
|
23
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.');
|
|
24
27
|
await (0, vcs_1.getVcsClient)().ensureRepoExistsAsync();
|
|
25
|
-
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
26
28
|
const expoUpdatesIsInstalled = (0, projectUtils_1.isExpoUpdatesInstalled)(projectDir);
|
|
27
|
-
const platform = (
|
|
29
|
+
const platform = (_b = flags.platform) !== null && _b !== void 0 ? _b : (await promptForPlatformAsync());
|
|
28
30
|
// clean up old Android configuration
|
|
29
31
|
if ([platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.All].includes(platform)) {
|
|
30
32
|
await (0, syncProjectConfiguration_1.cleanUpOldEasBuildGradleScriptAsync)(projectDir);
|
|
@@ -37,17 +39,16 @@ class BuildConfigure extends EasCommand_1.default {
|
|
|
37
39
|
});
|
|
38
40
|
// configure expo-updates
|
|
39
41
|
if (expoUpdatesIsInstalled) {
|
|
40
|
-
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
41
42
|
if ([platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.All].includes(platform)) {
|
|
42
43
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
43
44
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
44
|
-
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp);
|
|
45
|
+
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp, projectId);
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
if ([platform_1.RequestedPlatform.Ios, platform_1.RequestedPlatform.All].includes(platform)) {
|
|
48
49
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
|
|
49
50
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
50
|
-
await (0, UpdatesModule_2.syncUpdatesConfigurationAsync)(projectDir, exp);
|
|
51
|
+
await (0, UpdatesModule_2.syncUpdatesConfigurationAsync)(projectDir, exp, projectId);
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
}
|
|
@@ -62,6 +63,7 @@ class BuildConfigure extends EasCommand_1.default {
|
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
exports.default = BuildConfigure;
|
|
66
|
+
_a = BuildConfigure;
|
|
65
67
|
BuildConfigure.description = 'configure the project to support EAS Build';
|
|
66
68
|
BuildConfigure.flags = {
|
|
67
69
|
platform: core_1.Flags.enum({
|
|
@@ -70,6 +72,9 @@ BuildConfigure.flags = {
|
|
|
70
72
|
options: ['android', 'ios', 'all'],
|
|
71
73
|
}),
|
|
72
74
|
};
|
|
75
|
+
BuildConfigure.contextDefinition = {
|
|
76
|
+
..._a.ContextOptions.ProjectConfig,
|
|
77
|
+
};
|
|
73
78
|
async function promptForPlatformAsync() {
|
|
74
79
|
log_1.default.addNewLineIfNone();
|
|
75
80
|
const { platform } = await (0, prompts_1.promptAsync)({
|
|
@@ -3,12 +3,12 @@ import EasCommand from '../../commandUtils/EasCommand';
|
|
|
3
3
|
export default class Build extends EasCommand {
|
|
4
4
|
static description: string;
|
|
5
5
|
static flags: {
|
|
6
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
6
8
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
9
|
'skip-credentials-check': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
-
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
10
|
'skip-project-configuration': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
11
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
|
-
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
12
|
local: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
13
|
output: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
14
14
|
wait: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
@@ -18,6 +18,11 @@ export default class Build extends EasCommand {
|
|
|
18
18
|
'resource-class': import("@oclif/core/lib/interfaces").OptionFlag<UserInputResourceClass>;
|
|
19
19
|
message: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
20
20
|
};
|
|
21
|
+
static contextDefinition: {
|
|
22
|
+
projectDir: import("../../commandUtils/context/ProjectDirContextField").default;
|
|
23
|
+
getDynamicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicProjectConfigContextField;
|
|
24
|
+
actor: import("../../commandUtils/context/ActorContextField").default;
|
|
25
|
+
};
|
|
21
26
|
runAsync(): Promise<void>;
|
|
22
27
|
private sanitizeFlags;
|
|
23
28
|
private ensurePlatformSelectedAsync;
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
6
|
+
const eas_json_1 = require("@expo/eas-json");
|
|
4
7
|
const core_1 = require("@oclif/core");
|
|
8
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
9
|
+
const figures_1 = tslib_1.__importDefault(require("figures"));
|
|
10
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
5
11
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
12
|
const runBuildAndSubmit_1 = require("../../build/runBuildAndSubmit");
|
|
7
13
|
const types_1 = require("../../build/types");
|
|
8
14
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
15
|
+
const flags_1 = require("../../commandUtils/flags");
|
|
9
16
|
const generated_1 = require("../../graphql/generated");
|
|
10
|
-
const log_1 = tslib_1.
|
|
17
|
+
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
11
18
|
const platform_1 = require("../../platform");
|
|
12
|
-
const
|
|
19
|
+
const prompts_1 = require("../../prompts");
|
|
20
|
+
const uniq_1 = tslib_1.__importDefault(require("../../utils/expodash/uniq"));
|
|
13
21
|
const json_1 = require("../../utils/json");
|
|
14
22
|
const statuspageService_1 = require("../../utils/statuspageService");
|
|
15
23
|
class Build extends EasCommand_1.default {
|
|
@@ -19,17 +27,20 @@ class Build extends EasCommand_1.default {
|
|
|
19
27
|
(0, json_1.enableJsonOutput)();
|
|
20
28
|
}
|
|
21
29
|
const flags = this.sanitizeFlags(rawFlags);
|
|
22
|
-
const projectDir = await (
|
|
30
|
+
const { actor, getDynamicProjectConfigAsync, projectDir } = await this.getContextAsync(Build, {
|
|
31
|
+
nonInteractive: flags.nonInteractive,
|
|
32
|
+
});
|
|
33
|
+
await handleDeprecatedEasJsonAsync(projectDir, flags.nonInteractive);
|
|
23
34
|
if (!flags.localBuildOptions.enable) {
|
|
24
35
|
await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)(flags.autoSubmit
|
|
25
36
|
? [generated_1.StatuspageServiceName.EasBuild, generated_1.StatuspageServiceName.EasSubmit]
|
|
26
37
|
: [generated_1.StatuspageServiceName.EasBuild]);
|
|
27
38
|
}
|
|
28
39
|
const flagsWithPlatform = await this.ensurePlatformSelectedAsync(flags);
|
|
29
|
-
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(projectDir, flagsWithPlatform);
|
|
40
|
+
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(projectDir, flagsWithPlatform, actor, getDynamicProjectConfigAsync);
|
|
30
41
|
}
|
|
31
42
|
sanitizeFlags(flags) {
|
|
32
|
-
var
|
|
43
|
+
var _b, _c;
|
|
33
44
|
const nonInteractive = flags['non-interactive'];
|
|
34
45
|
if (!flags.local && flags.output) {
|
|
35
46
|
core_1.Errors.error('--output is allowed only for local builds', { exit: 1 });
|
|
@@ -74,8 +85,8 @@ class Build extends EasCommand_1.default {
|
|
|
74
85
|
clearCache: flags['clear-cache'],
|
|
75
86
|
json: flags['json'],
|
|
76
87
|
autoSubmit: flags['auto-submit'] || flags['auto-submit-with-profile'] !== undefined,
|
|
77
|
-
submitProfile: (
|
|
78
|
-
userInputResourceClass: (
|
|
88
|
+
submitProfile: (_b = flags['auto-submit-with-profile']) !== null && _b !== void 0 ? _b : profile,
|
|
89
|
+
userInputResourceClass: (_c = flags['resource-class']) !== null && _c !== void 0 ? _c : types_1.UserInputResourceClass.DEFAULT,
|
|
79
90
|
message,
|
|
80
91
|
};
|
|
81
92
|
}
|
|
@@ -102,6 +113,7 @@ class Build extends EasCommand_1.default {
|
|
|
102
113
|
}
|
|
103
114
|
}
|
|
104
115
|
exports.default = Build;
|
|
116
|
+
_a = Build;
|
|
105
117
|
Build.description = 'start a build';
|
|
106
118
|
Build.flags = {
|
|
107
119
|
platform: core_1.Flags.enum({
|
|
@@ -112,22 +124,15 @@ Build.flags = {
|
|
|
112
124
|
default: false,
|
|
113
125
|
hidden: true,
|
|
114
126
|
}),
|
|
115
|
-
json: core_1.Flags.boolean({
|
|
116
|
-
description: 'Enable JSON output, non-JSON messages will be printed to stderr',
|
|
117
|
-
default: false,
|
|
118
|
-
}),
|
|
119
127
|
'skip-project-configuration': core_1.Flags.boolean({
|
|
120
128
|
default: false,
|
|
121
129
|
hidden: true,
|
|
122
130
|
}),
|
|
123
131
|
profile: core_1.Flags.string({
|
|
132
|
+
char: 'e',
|
|
124
133
|
description: 'Name of the build profile from eas.json. Defaults to "production" if defined in eas.json.',
|
|
125
134
|
helpValue: 'PROFILE_NAME',
|
|
126
135
|
}),
|
|
127
|
-
'non-interactive': core_1.Flags.boolean({
|
|
128
|
-
default: false,
|
|
129
|
-
description: 'Run command in non-interactive mode',
|
|
130
|
-
}),
|
|
131
136
|
local: core_1.Flags.boolean({
|
|
132
137
|
default: false,
|
|
133
138
|
description: 'Run build locally [experimental]',
|
|
@@ -163,4 +168,61 @@ Build.flags = {
|
|
|
163
168
|
char: 'm',
|
|
164
169
|
description: 'A short message describing the build',
|
|
165
170
|
}),
|
|
171
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
166
172
|
};
|
|
173
|
+
Build.contextDefinition = {
|
|
174
|
+
..._a.ContextOptions.LoggedIn,
|
|
175
|
+
..._a.ContextOptions.DynamicProjectConfig,
|
|
176
|
+
..._a.ContextOptions.ProjectDir,
|
|
177
|
+
};
|
|
178
|
+
async function handleDeprecatedEasJsonAsync(projectDir, nonInteractive) {
|
|
179
|
+
if (!(await fs_extra_1.default.pathExists(eas_json_1.EasJsonAccessor.formatEasJsonPath(projectDir)))) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
const easJsonAccessor = new eas_json_1.EasJsonAccessor(projectDir);
|
|
183
|
+
const profileNames = await eas_json_1.EasJsonUtils.getBuildProfileNamesAsync(easJsonAccessor);
|
|
184
|
+
const platformAndProfileNames = profileNames.flatMap(profileName => [
|
|
185
|
+
[eas_build_job_1.Platform.ANDROID, profileName],
|
|
186
|
+
[eas_build_job_1.Platform.IOS, profileName],
|
|
187
|
+
]);
|
|
188
|
+
const deprecatedProfiles = [];
|
|
189
|
+
for (const [platform, profileName] of platformAndProfileNames) {
|
|
190
|
+
const buildProfile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, profileName);
|
|
191
|
+
if (buildProfile.artifactPath) {
|
|
192
|
+
deprecatedProfiles.push([platform, profileName]);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (deprecatedProfiles.length === 0) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
const deprecatedProfileNames = (0, uniq_1.default)(deprecatedProfiles.map(([, profileName]) => profileName));
|
|
199
|
+
log_1.default.warn(`Some of your build profiles use deprecated field ${chalk_1.default.bold('artifactPath')}:`);
|
|
200
|
+
for (const profileName of deprecatedProfileNames) {
|
|
201
|
+
log_1.default.warn(`- ${profileName}`);
|
|
202
|
+
}
|
|
203
|
+
log_1.default.newLine();
|
|
204
|
+
if (nonInteractive) {
|
|
205
|
+
log_1.default.warn(`${figures_1.default.warning} Action required: rename ${chalk_1.default.bold('artifactPath')} to ${chalk_1.default.bold('applicationArchivePath')} in all of the build profiles listed above.`);
|
|
206
|
+
log_1.default.warn(`See ${(0, log_1.link)('https://docs.expo.dev/build-reference/eas-json/')} for more information.`);
|
|
207
|
+
log_1.default.warn(`This warning will become an error in a future EAS CLI release. This build will continue to use the ${chalk_1.default.bold('artifactPath')} setting.`);
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
const rename = await (0, prompts_1.selectAsync)('Do you want us to handle renaming the field for you?', [
|
|
211
|
+
{ title: 'Yes', value: true },
|
|
212
|
+
{ title: 'No, I will edit eas.json manually (EAS CLI exits)', value: false },
|
|
213
|
+
]);
|
|
214
|
+
if (!rename) {
|
|
215
|
+
core_1.Errors.exit(1);
|
|
216
|
+
}
|
|
217
|
+
await easJsonAccessor.readRawJsonAsync();
|
|
218
|
+
for (const [platform, profileName] of deprecatedProfiles) {
|
|
219
|
+
easJsonAccessor.patch(easJsonRawObject => {
|
|
220
|
+
easJsonRawObject.build[profileName][platform].applicationArchivePath =
|
|
221
|
+
easJsonRawObject.build[profileName][platform].artifactPath;
|
|
222
|
+
delete easJsonRawObject.build[profileName][platform].artifactPath;
|
|
223
|
+
return easJsonRawObject;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
await easJsonAccessor.writeAsync();
|
|
227
|
+
log_1.default.withTick('Updated eas.json');
|
|
228
|
+
}
|
|
@@ -15,6 +15,11 @@ export default class BuildInspect extends EasCommand {
|
|
|
15
15
|
force: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
16
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
17
|
};
|
|
18
|
+
static contextDefinition: {
|
|
19
|
+
projectDir: import("../../commandUtils/context/ProjectDirContextField").default;
|
|
20
|
+
getDynamicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicProjectConfigContextField;
|
|
21
|
+
actor: import("../../commandUtils/context/ActorContextField").default;
|
|
22
|
+
};
|
|
18
23
|
runAsync(): Promise<void>;
|
|
19
24
|
private prepareOutputDirAsync;
|
|
20
25
|
private copyToOutputDirAsync;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const core_1 = require("@oclif/core");
|
|
@@ -11,7 +12,6 @@ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasComm
|
|
|
11
12
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
12
13
|
const ora_1 = require("../../ora");
|
|
13
14
|
const platform_1 = require("../../platform");
|
|
14
|
-
const projectUtils_1 = require("../../project/projectUtils");
|
|
15
15
|
const paths_1 = require("../../utils/paths");
|
|
16
16
|
const vcs_1 = require("../../vcs");
|
|
17
17
|
var InspectStage;
|
|
@@ -27,6 +27,9 @@ const STAGE_DESCRIPTION = `Stage of the build you want to inspect.
|
|
|
27
27
|
class BuildInspect extends EasCommand_1.default {
|
|
28
28
|
async runAsync() {
|
|
29
29
|
const { flags } = await this.parse(BuildInspect);
|
|
30
|
+
const { actor, getDynamicProjectConfigAsync, projectDir } = await this.getContextAsync(BuildInspect, {
|
|
31
|
+
nonInteractive: false,
|
|
32
|
+
});
|
|
30
33
|
const outputDirectory = path_1.default.resolve(process.cwd(), flags.output);
|
|
31
34
|
const tmpWorkingdir = path_1.default.join((0, paths_1.getTmpDirectory)(), (0, uuid_1.v4)());
|
|
32
35
|
if (flags.force && process.cwd().startsWith(outputDirectory)) {
|
|
@@ -40,7 +43,6 @@ class BuildInspect extends EasCommand_1.default {
|
|
|
40
43
|
await this.copyToOutputDirAsync(tmpWorkingdir, outputDirectory);
|
|
41
44
|
}
|
|
42
45
|
else {
|
|
43
|
-
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
44
46
|
try {
|
|
45
47
|
await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(projectDir, {
|
|
46
48
|
nonInteractive: false,
|
|
@@ -58,7 +60,7 @@ class BuildInspect extends EasCommand_1.default {
|
|
|
58
60
|
workingdir: tmpWorkingdir,
|
|
59
61
|
artifactsDir: path_1.default.join(tmpWorkingdir, 'artifacts'),
|
|
60
62
|
},
|
|
61
|
-
});
|
|
63
|
+
}, actor, getDynamicProjectConfigAsync);
|
|
62
64
|
if (!flags.verbose) {
|
|
63
65
|
log_1.default.log(chalk_1.default.green('Build successful'));
|
|
64
66
|
}
|
|
@@ -101,6 +103,7 @@ class BuildInspect extends EasCommand_1.default {
|
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
105
|
exports.default = BuildInspect;
|
|
106
|
+
_a = BuildInspect;
|
|
104
107
|
BuildInspect.description = 'inspect the state of the project at specific build stages, useful for troubleshooting';
|
|
105
108
|
BuildInspect.flags = {
|
|
106
109
|
platform: core_1.Flags.enum({
|
|
@@ -109,6 +112,7 @@ BuildInspect.flags = {
|
|
|
109
112
|
required: true,
|
|
110
113
|
}),
|
|
111
114
|
profile: core_1.Flags.string({
|
|
115
|
+
char: 'e',
|
|
112
116
|
description: 'Name of the build profile from eas.json. Defaults to "production" if defined in eas.json.',
|
|
113
117
|
helpValue: 'PROFILE_NAME',
|
|
114
118
|
}),
|
|
@@ -133,3 +137,8 @@ BuildInspect.flags = {
|
|
|
133
137
|
default: false,
|
|
134
138
|
}),
|
|
135
139
|
};
|
|
140
|
+
BuildInspect.contextDefinition = {
|
|
141
|
+
..._a.ContextOptions.LoggedIn,
|
|
142
|
+
..._a.ContextOptions.DynamicProjectConfig,
|
|
143
|
+
..._a.ContextOptions.ProjectDir,
|
|
144
|
+
};
|
|
@@ -4,8 +4,11 @@ import { RequestedPlatform } from '../../platform';
|
|
|
4
4
|
export default class BuildList extends EasCommand {
|
|
5
5
|
static description: string;
|
|
6
6
|
static flags: {
|
|
7
|
-
platform: import("@oclif/core/lib/interfaces").OptionFlag<RequestedPlatform>;
|
|
8
7
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
limit: any;
|
|
10
|
+
offset: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
11
|
+
platform: import("@oclif/core/lib/interfaces").OptionFlag<RequestedPlatform>;
|
|
9
12
|
status: import("@oclif/core/lib/interfaces").OptionFlag<BuildStatus>;
|
|
10
13
|
distribution: import("@oclif/core/lib/interfaces").OptionFlag<BuildDistributionType>;
|
|
11
14
|
channel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
@@ -16,7 +19,9 @@ export default class BuildList extends EasCommand {
|
|
|
16
19
|
appIdentifier: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
17
20
|
buildProfile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
18
21
|
gitCommitHash: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
19
|
-
|
|
22
|
+
};
|
|
23
|
+
static contextDefinition: {
|
|
24
|
+
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
20
25
|
};
|
|
21
26
|
runAsync(): Promise<void>;
|
|
22
27
|
}
|
|
@@ -1,87 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const core_1 = require("@oclif/core");
|
|
5
|
-
const
|
|
6
|
+
const queries_1 = require("../../build/queries");
|
|
6
7
|
const types_1 = require("../../build/types");
|
|
7
|
-
const formatBuild_1 = require("../../build/utils/formatBuild");
|
|
8
8
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
9
|
+
const flags_1 = require("../../commandUtils/flags");
|
|
10
|
+
const pagination_1 = require("../../commandUtils/pagination");
|
|
9
11
|
const generated_1 = require("../../graphql/generated");
|
|
10
|
-
const BuildQuery_1 = require("../../graphql/queries/BuildQuery");
|
|
11
|
-
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
12
|
-
const ora_1 = require("../../ora");
|
|
13
12
|
const platform_1 = require("../../platform");
|
|
14
|
-
const expoConfig_1 = require("../../project/expoConfig");
|
|
15
13
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
16
14
|
const json_1 = require("../../utils/json");
|
|
17
15
|
class BuildList extends EasCommand_1.default {
|
|
18
16
|
async runAsync() {
|
|
19
17
|
const { flags } = await this.parse(BuildList);
|
|
20
|
-
const
|
|
21
|
-
|
|
18
|
+
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
|
|
19
|
+
const { json: jsonFlag, platform: requestedPlatform, status: buildStatus, distribution: buildDistribution, 'non-interactive': nonInteractive, } = flags;
|
|
20
|
+
const { projectConfig: { projectId }, } = await this.getContextAsync(BuildList, {
|
|
21
|
+
nonInteractive,
|
|
22
|
+
});
|
|
23
|
+
if (jsonFlag) {
|
|
22
24
|
(0, json_1.enableJsonOutput)();
|
|
23
25
|
}
|
|
24
26
|
const platform = toAppPlatform(requestedPlatform);
|
|
25
27
|
const graphqlBuildStatus = toGraphQLBuildStatus(buildStatus);
|
|
26
28
|
const graphqlBuildDistribution = toGraphQLBuildDistribution(buildDistribution);
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
gitCommitHash: flags.gitCommitHash,
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
if (builds.length) {
|
|
50
|
-
if (platform || graphqlBuildStatus) {
|
|
51
|
-
spinner.succeed(`Showing ${builds.length} matching builds for the project ${projectName}`);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
spinner.succeed(`Showing last ${builds.length} builds for the project ${projectName}`);
|
|
55
|
-
}
|
|
56
|
-
if (json) {
|
|
57
|
-
(0, json_1.printJsonOnlyOutput)(builds);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
const list = builds
|
|
61
|
-
.map(build => (0, formatBuild_1.formatGraphQLBuild)(build))
|
|
62
|
-
.join(`\n\n${chalk_1.default.dim('———')}\n\n`);
|
|
63
|
-
log_1.default.log(`\n${list}`);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
spinner.fail(`Couldn't find any builds for the project ${projectName}`);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
catch (e) {
|
|
71
|
-
spinner.fail(`Something went wrong and we couldn't fetch the build list ${projectName}`);
|
|
72
|
-
throw e;
|
|
73
|
-
}
|
|
29
|
+
const displayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(projectId);
|
|
30
|
+
await (0, queries_1.listAndRenderBuildsOnAppAsync)({
|
|
31
|
+
projectId,
|
|
32
|
+
projectDisplayName: displayName,
|
|
33
|
+
filter: {
|
|
34
|
+
platform,
|
|
35
|
+
status: graphqlBuildStatus,
|
|
36
|
+
distribution: graphqlBuildDistribution,
|
|
37
|
+
channel: flags.channel,
|
|
38
|
+
appVersion: flags.appVersion,
|
|
39
|
+
appBuildVersion: flags.appBuildVersion,
|
|
40
|
+
sdkVersion: flags.sdkVersion,
|
|
41
|
+
runtimeVersion: flags.runtimeVersion,
|
|
42
|
+
appIdentifier: flags.appIdentifier,
|
|
43
|
+
buildProfile: flags.buildProfile,
|
|
44
|
+
gitCommitHash: flags.gitCommitHash,
|
|
45
|
+
},
|
|
46
|
+
paginatedQueryOptions,
|
|
47
|
+
});
|
|
74
48
|
}
|
|
75
49
|
}
|
|
76
50
|
exports.default = BuildList;
|
|
51
|
+
_a = BuildList;
|
|
77
52
|
BuildList.description = 'list all builds for your project';
|
|
78
53
|
BuildList.flags = {
|
|
79
54
|
platform: core_1.Flags.enum({
|
|
80
55
|
options: [platform_1.RequestedPlatform.All, platform_1.RequestedPlatform.Android, platform_1.RequestedPlatform.Ios],
|
|
81
56
|
}),
|
|
82
|
-
json: core_1.Flags.boolean({
|
|
83
|
-
description: 'Enable JSON output, non-JSON messages will be printed to stderr',
|
|
84
|
-
}),
|
|
85
57
|
status: core_1.Flags.enum({
|
|
86
58
|
options: [
|
|
87
59
|
types_1.BuildStatus.NEW,
|
|
@@ -107,7 +79,12 @@ BuildList.flags = {
|
|
|
107
79
|
appIdentifier: core_1.Flags.string(),
|
|
108
80
|
buildProfile: core_1.Flags.string(),
|
|
109
81
|
gitCommitHash: core_1.Flags.string(),
|
|
110
|
-
|
|
82
|
+
...pagination_1.EasPaginatedQueryFlags,
|
|
83
|
+
limit: (0, pagination_1.getLimitFlagWithCustomValues)({ defaultTo: 10, limit: queries_1.BUILDS_LIMIT }),
|
|
84
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
85
|
+
};
|
|
86
|
+
BuildList.contextDefinition = {
|
|
87
|
+
..._a.ContextOptions.ProjectConfig,
|
|
111
88
|
};
|
|
112
89
|
const toAppPlatform = (requestedPlatform) => {
|
|
113
90
|
if (!requestedPlatform || requestedPlatform === platform_1.RequestedPlatform.All) {
|
|
@@ -5,5 +5,10 @@ export default class BuildVersionSetView extends EasCommand {
|
|
|
5
5
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
6
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
7
|
};
|
|
8
|
+
static contextDefinition: {
|
|
9
|
+
projectDir: import("../../../commandUtils/context/ProjectDirContextField").default;
|
|
10
|
+
getDynamicProjectConfigAsync: import("../../../commandUtils/context/DynamicProjectConfigContextField").DynamicProjectConfigContextField;
|
|
11
|
+
actor: import("../../../commandUtils/context/ActorContextField").default;
|
|
12
|
+
};
|
|
8
13
|
runAsync(): Promise<void>;
|
|
9
14
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const Updates_1 = require("@expo/config-plugins/build/utils/Updates");
|
|
@@ -14,29 +15,29 @@ const log_1 = tslib_1.__importDefault(require("../../../log"));
|
|
|
14
15
|
const platform_1 = require("../../../platform");
|
|
15
16
|
const versions_1 = require("../../../project/android/versions");
|
|
16
17
|
const applicationIdentifier_1 = require("../../../project/applicationIdentifier");
|
|
17
|
-
const expoConfig_1 = require("../../../project/expoConfig");
|
|
18
18
|
const versions_2 = require("../../../project/ios/versions");
|
|
19
19
|
const projectUtils_1 = require("../../../project/projectUtils");
|
|
20
20
|
const remoteVersionSource_1 = require("../../../project/remoteVersionSource");
|
|
21
21
|
const prompts_1 = require("../../../prompts");
|
|
22
22
|
class BuildVersionSetView extends EasCommand_1.default {
|
|
23
23
|
async runAsync() {
|
|
24
|
-
var
|
|
24
|
+
var _b, _c, _d;
|
|
25
25
|
const { flags } = await this.parse(BuildVersionSetView);
|
|
26
|
-
const projectDir = await (
|
|
26
|
+
const { actor, getDynamicProjectConfigAsync, projectDir } = await this.getContextAsync(BuildVersionSetView, {
|
|
27
|
+
nonInteractive: false,
|
|
28
|
+
});
|
|
27
29
|
const platform = await (0, platform_1.selectPlatformAsync)(flags.platform);
|
|
28
|
-
const
|
|
29
|
-
await (0, remoteVersionSource_1.ensureVersionSourceIsRemoteAsync)(
|
|
30
|
-
const profile = await
|
|
31
|
-
const exp =
|
|
32
|
-
const
|
|
33
|
-
const projectFullName = await (0, projectUtils_1.getProjectFullNameAsync)(exp);
|
|
30
|
+
const easJsonAccessor = new eas_json_1.EasJsonAccessor(projectDir);
|
|
31
|
+
await (0, remoteVersionSource_1.ensureVersionSourceIsRemoteAsync)(easJsonAccessor);
|
|
32
|
+
const profile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, (_b = flags.profile) !== null && _b !== void 0 ? _b : undefined);
|
|
33
|
+
const { exp, projectId } = await getDynamicProjectConfigAsync({ env: profile.env });
|
|
34
|
+
const displayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(projectId);
|
|
34
35
|
(0, remoteVersionSource_1.validateAppConfigForRemoteVersionSource)(exp, platform);
|
|
35
|
-
const applicationIdentifier = await (0, applicationIdentifier_1.getApplicationIdentifierAsync)(projectDir, exp, profile, platform);
|
|
36
|
+
const applicationIdentifier = await (0, applicationIdentifier_1.getApplicationIdentifierAsync)(projectDir, exp, profile, platform, actor);
|
|
36
37
|
const remoteVersions = await AppVersionQuery_1.AppVersionQuery.latestVersionAsync(projectId, (0, AppPlatform_1.toAppPlatform)(platform), applicationIdentifier);
|
|
37
38
|
const currentStateMessage = (remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)
|
|
38
|
-
? `Project ${chalk_1.default.bold(
|
|
39
|
-
: `Project ${chalk_1.default.bold(
|
|
39
|
+
? `Project ${chalk_1.default.bold(displayName)} with ${getApplicationIdentifierName(platform)} "${applicationIdentifier}" is configured with ${(0, remoteVersionSource_1.getBuildVersionName)(platform)} ${remoteVersions.buildVersion}.`
|
|
40
|
+
: `Project ${chalk_1.default.bold(displayName)} with ${getApplicationIdentifierName(platform)} "${applicationIdentifier}" does not have any ${(0, remoteVersionSource_1.getBuildVersionName)(platform)} configured.`;
|
|
40
41
|
const versionPromptMessage = (remoteVersions === null || remoteVersions === void 0 ? void 0 : remoteVersions.buildVersion)
|
|
41
42
|
? `What version would you like to set?`
|
|
42
43
|
: `What version would you like to initialize it with?`;
|
|
@@ -53,13 +54,14 @@ class BuildVersionSetView extends EasCommand_1.default {
|
|
|
53
54
|
appId: projectId,
|
|
54
55
|
platform: (0, AppPlatform_1.toAppPlatform)(platform),
|
|
55
56
|
applicationIdentifier,
|
|
56
|
-
storeVersion: (
|
|
57
|
+
storeVersion: (_c = exp.version) !== null && _c !== void 0 ? _c : '1.0.0',
|
|
57
58
|
buildVersion: String(version),
|
|
58
|
-
runtimeVersion: (
|
|
59
|
+
runtimeVersion: (_d = (0, Updates_1.getRuntimeVersionNullable)(exp, platform)) !== null && _d !== void 0 ? _d : undefined,
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
exports.default = BuildVersionSetView;
|
|
64
|
+
_a = BuildVersionSetView;
|
|
63
65
|
BuildVersionSetView.description = 'Update version of an app.';
|
|
64
66
|
BuildVersionSetView.flags = {
|
|
65
67
|
platform: core_1.Flags.enum({
|
|
@@ -67,10 +69,16 @@ BuildVersionSetView.flags = {
|
|
|
67
69
|
options: ['android', 'ios'],
|
|
68
70
|
}),
|
|
69
71
|
profile: core_1.Flags.string({
|
|
72
|
+
char: 'e',
|
|
70
73
|
description: 'Name of the build profile from eas.json. Defaults to "production" if defined in eas.json.',
|
|
71
74
|
helpValue: 'PROFILE_NAME',
|
|
72
75
|
}),
|
|
73
76
|
};
|
|
77
|
+
BuildVersionSetView.contextDefinition = {
|
|
78
|
+
..._a.ContextOptions.LoggedIn,
|
|
79
|
+
..._a.ContextOptions.DynamicProjectConfig,
|
|
80
|
+
..._a.ContextOptions.ProjectDir,
|
|
81
|
+
};
|
|
74
82
|
function getApplicationIdentifierName(platform) {
|
|
75
83
|
if (platform === eas_build_job_1.Platform.ANDROID) {
|
|
76
84
|
return 'application ID';
|
|
@@ -5,6 +5,11 @@ export default class BuildVersionSyncView extends EasCommand {
|
|
|
5
5
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
6
|
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
7
|
};
|
|
8
|
+
static contextDefinition: {
|
|
9
|
+
projectDir: import("../../../commandUtils/context/ProjectDirContextField").default;
|
|
10
|
+
getDynamicProjectConfigAsync: import("../../../commandUtils/context/DynamicProjectConfigContextField").DynamicProjectConfigContextField;
|
|
11
|
+
actor: import("../../../commandUtils/context/ActorContextField").default;
|
|
12
|
+
};
|
|
8
13
|
runAsync(): Promise<void>;
|
|
9
14
|
private syncIosAsync;
|
|
10
15
|
private syncAndroidAsync;
|