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
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { PaginatedQueryOptions } from '../commandUtils/pagination';
|
|
2
2
|
import { UpdateBranchFragment } from '../graphql/generated';
|
|
3
3
|
export declare const BRANCHES_LIMIT = 50;
|
|
4
|
-
export declare function
|
|
5
|
-
|
|
4
|
+
export declare function selectBranchOnAppAsync({ projectId, promptTitle, displayTextForListItem, paginatedQueryOptions, }: {
|
|
5
|
+
projectId: string;
|
|
6
|
+
displayTextForListItem: (queryItem: UpdateBranchFragment) => string;
|
|
7
|
+
promptTitle: string;
|
|
8
|
+
paginatedQueryOptions: PaginatedQueryOptions;
|
|
9
|
+
}): Promise<UpdateBranchFragment>;
|
|
10
|
+
export declare function listAndRenderBranchesOnAppAsync({ projectId, paginatedQueryOptions, }: {
|
|
11
|
+
projectId: string;
|
|
12
|
+
paginatedQueryOptions: PaginatedQueryOptions;
|
|
13
|
+
}): Promise<void>;
|
package/build/branch/queries.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.listAndRenderBranchesOnAppAsync = exports.selectBranchOnAppAsync = exports.BRANCHES_LIMIT = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
6
|
const cli_table3_1 = tslib_1.__importDefault(require("cli-table3"));
|
|
@@ -10,19 +10,19 @@ const utils_1 = require("../update/utils");
|
|
|
10
10
|
const json_1 = require("../utils/json");
|
|
11
11
|
const queries_1 = require("../utils/queries");
|
|
12
12
|
exports.BRANCHES_LIMIT = 50;
|
|
13
|
-
async function
|
|
13
|
+
async function selectBranchOnAppAsync({ projectId, promptTitle, displayTextForListItem, paginatedQueryOptions, }) {
|
|
14
14
|
var _a;
|
|
15
|
-
if (
|
|
15
|
+
if (paginatedQueryOptions.nonInteractive) {
|
|
16
16
|
throw new Error('Unable to select a branch in non-interactive mode.');
|
|
17
17
|
}
|
|
18
18
|
const selectedBranch = await (0, queries_1.paginatedQueryWithSelectPromptAsync)({
|
|
19
|
-
limit: (_a =
|
|
20
|
-
offset:
|
|
21
|
-
queryToPerform: (limit, offset) =>
|
|
19
|
+
limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.BRANCHES_LIMIT,
|
|
20
|
+
offset: paginatedQueryOptions.offset,
|
|
21
|
+
queryToPerform: (limit, offset) => queryBranchesOnProjectAsync(limit, offset, projectId),
|
|
22
22
|
promptOptions: {
|
|
23
23
|
title: promptTitle,
|
|
24
24
|
getIdentifierForQueryItem: updateBranchFragment => updateBranchFragment.id,
|
|
25
|
-
createDisplayTextForSelectionPromptListItem:
|
|
25
|
+
createDisplayTextForSelectionPromptListItem: displayTextForListItem,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
if (!selectedBranch) {
|
|
@@ -30,28 +30,28 @@ async function selectBranchFromPaginatedQueryAsync(projectId, promptTitle, optio
|
|
|
30
30
|
}
|
|
31
31
|
return selectedBranch;
|
|
32
32
|
}
|
|
33
|
-
exports.
|
|
34
|
-
async function
|
|
33
|
+
exports.selectBranchOnAppAsync = selectBranchOnAppAsync;
|
|
34
|
+
async function listAndRenderBranchesOnAppAsync({ projectId, paginatedQueryOptions, }) {
|
|
35
35
|
var _a, _b;
|
|
36
|
-
if (
|
|
37
|
-
const branches = await
|
|
38
|
-
renderPageOfBranches(branches,
|
|
36
|
+
if (paginatedQueryOptions.nonInteractive) {
|
|
37
|
+
const branches = await queryBranchesOnProjectAsync((_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.BRANCHES_LIMIT, paginatedQueryOptions.offset, projectId);
|
|
38
|
+
renderPageOfBranches(branches, paginatedQueryOptions);
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
41
|
await (0, queries_1.paginatedQueryWithConfirmPromptAsync)({
|
|
42
|
-
limit: (_b =
|
|
43
|
-
offset:
|
|
44
|
-
queryToPerform: (limit, offset) =>
|
|
42
|
+
limit: (_b = paginatedQueryOptions.limit) !== null && _b !== void 0 ? _b : exports.BRANCHES_LIMIT,
|
|
43
|
+
offset: paginatedQueryOptions.offset,
|
|
44
|
+
queryToPerform: (limit, offset) => queryBranchesOnProjectAsync(limit, offset, projectId),
|
|
45
45
|
promptOptions: {
|
|
46
46
|
title: 'Load more branches?',
|
|
47
|
-
renderListItems: branches => renderPageOfBranches(branches,
|
|
47
|
+
renderListItems: branches => renderPageOfBranches(branches, paginatedQueryOptions),
|
|
48
48
|
},
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
exports.
|
|
53
|
-
async function
|
|
54
|
-
return await BranchQuery_1.BranchQuery.
|
|
52
|
+
exports.listAndRenderBranchesOnAppAsync = listAndRenderBranchesOnAppAsync;
|
|
53
|
+
async function queryBranchesOnProjectAsync(limit, offset, projectId) {
|
|
54
|
+
return await BranchQuery_1.BranchQuery.listBranchesOnAppAsync({
|
|
55
55
|
appId: projectId,
|
|
56
56
|
limit,
|
|
57
57
|
offset,
|
|
@@ -67,15 +67,18 @@ function renderPageOfBranches(currentPage, { json }) {
|
|
|
67
67
|
wordWrap: true,
|
|
68
68
|
});
|
|
69
69
|
table.push(...currentPage.map(branch => {
|
|
70
|
-
|
|
70
|
+
if (branch.updates.length === 0) {
|
|
71
|
+
return [branch.name, 'N/A', 'N/A', 'N/A', 'N/A'];
|
|
72
|
+
}
|
|
73
|
+
const latestUpdateOnBranch = branch.updates[0];
|
|
71
74
|
return [
|
|
72
75
|
branch.name,
|
|
73
|
-
(0, utils_1.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
(0, utils_1.formatUpdateMessage)(latestUpdateOnBranch),
|
|
77
|
+
latestUpdateOnBranch.runtimeVersion,
|
|
78
|
+
latestUpdateOnBranch.group,
|
|
76
79
|
(0, utils_1.getPlatformsForGroup)({
|
|
80
|
+
group: latestUpdateOnBranch.group,
|
|
77
81
|
updates: branch.updates,
|
|
78
|
-
group: (_e = branch.updates[0]) === null || _e === void 0 ? void 0 : _e.group,
|
|
79
82
|
}),
|
|
80
83
|
];
|
|
81
84
|
}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BranchNotFoundError = exports.getDefaultBranchNameAsync = void 0;
|
|
4
|
+
const vcs_1 = require("../vcs");
|
|
5
|
+
async function getDefaultBranchNameAsync() {
|
|
6
|
+
return ((await (0, vcs_1.getVcsClient)().getBranchNameAsync()) ||
|
|
7
|
+
`branch-${Math.random().toString(36).substring(2, 4)}`);
|
|
8
|
+
}
|
|
9
|
+
exports.getDefaultBranchNameAsync = getDefaultBranchNameAsync;
|
|
10
|
+
class BranchNotFoundError extends Error {
|
|
11
|
+
constructor(message) {
|
|
12
|
+
super(message !== null && message !== void 0 ? message : 'Branch not found.');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.BranchNotFoundError = BranchNotFoundError;
|
|
@@ -12,7 +12,6 @@ const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
|
12
12
|
const applicationId_1 = require("../../project/android/applicationId");
|
|
13
13
|
const gradle_1 = require("../../project/android/gradle");
|
|
14
14
|
const prompts_1 = require("../../prompts");
|
|
15
|
-
const Account_1 = require("../../user/Account");
|
|
16
15
|
const build_1 = require("../build");
|
|
17
16
|
const graphql_1 = require("../graphql");
|
|
18
17
|
const credentials_1 = require("../utils/credentials");
|
|
@@ -39,7 +38,7 @@ This means that it will most likely produce an AAB and you will not be able to i
|
|
|
39
38
|
await (0, validate_1.checkGoogleServicesFileAsync)(ctx);
|
|
40
39
|
const gradleContext = await (0, gradle_1.resolveGradleBuildContextAsync)(ctx.projectDir, buildProfile);
|
|
41
40
|
if (ctx.workflow === eas_build_job_1.Workflow.MANAGED) {
|
|
42
|
-
await (0, applicationId_1.ensureApplicationIdIsDefinedForManagedProjectAsync)(ctx.projectDir, ctx.exp);
|
|
41
|
+
await (0, applicationId_1.ensureApplicationIdIsDefinedForManagedProjectAsync)(ctx.projectDir, ctx.exp, ctx.user);
|
|
43
42
|
}
|
|
44
43
|
const applicationId = await (0, applicationId_1.getApplicationIdAsync)(ctx.projectDir, ctx.exp, gradleContext);
|
|
45
44
|
const versionCodeOverride = ((_b = ctx.easJsonCliConfig) === null || _b === void 0 ? void 0 : _b.appVersionSource) === eas_json_1.AppVersionSource.REMOTE
|
|
@@ -68,6 +67,7 @@ async function prepareAndroidBuildAsync(ctx) {
|
|
|
68
67
|
localAutoIncrement: ((_a = ctx.easJsonCliConfig) === null || _a === void 0 ? void 0 : _a.appVersionSource) === eas_json_1.AppVersionSource.REMOTE
|
|
69
68
|
? false
|
|
70
69
|
: ctx.buildProfile.autoIncrement,
|
|
70
|
+
projectId: ctx.projectId,
|
|
71
71
|
});
|
|
72
72
|
},
|
|
73
73
|
prepareJobAsync: async (ctx, jobData) => {
|
|
@@ -96,7 +96,7 @@ async function ensureAndroidCredentialsAsync(ctx) {
|
|
|
96
96
|
const androidApplicationIdentifier = await (0, applicationId_1.getApplicationIdAsync)(ctx.projectDir, ctx.exp, ctx.android.gradleContext);
|
|
97
97
|
const provider = new AndroidCredentialsProvider_1.default(ctx.credentialsCtx, {
|
|
98
98
|
app: {
|
|
99
|
-
account: (0, nullthrows_1.default)(
|
|
99
|
+
account: (0, nullthrows_1.default)(ctx.user.accounts.find(a => a.name === ctx.accountName), `You do not have access to account: ${ctx.accountName}`),
|
|
100
100
|
projectName: ctx.projectName,
|
|
101
101
|
androidApplicationIdentifier,
|
|
102
102
|
},
|
|
@@ -17,7 +17,8 @@ function transformJob(job) {
|
|
|
17
17
|
cache: job.cache,
|
|
18
18
|
version: ((_a = job.version) === null || _a === void 0 ? void 0 : _a.versionCode) ? { versionCode: job.version.versionCode } : undefined,
|
|
19
19
|
gradleCommand: job.gradleCommand,
|
|
20
|
-
|
|
20
|
+
applicationArchivePath: job.applicationArchivePath,
|
|
21
|
+
buildArtifactPaths: job.buildArtifactPaths,
|
|
21
22
|
username: job.username,
|
|
22
23
|
buildType: job.buildType && transformBuildType(job.buildType),
|
|
23
24
|
developmentClient: job.developmentClient,
|
|
@@ -6,7 +6,6 @@ const eas_build_job_1 = require("@expo/eas-build-job");
|
|
|
6
6
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
7
|
const slash_1 = tslib_1.__importDefault(require("slash"));
|
|
8
8
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
9
|
-
const actions_1 = require("../../user/actions");
|
|
10
9
|
const vcs_1 = require("../../vcs");
|
|
11
10
|
const cacheDefaults = {
|
|
12
11
|
disabled: false,
|
|
@@ -14,7 +13,8 @@ const cacheDefaults = {
|
|
|
14
13
|
cacheDefaultPaths: true,
|
|
15
14
|
};
|
|
16
15
|
async function prepareJobAsync(ctx, jobData) {
|
|
17
|
-
|
|
16
|
+
var _a;
|
|
17
|
+
const username = (0, projectUtils_1.getUsername)(ctx.exp, ctx.user);
|
|
18
18
|
const buildProfile = ctx.buildProfile;
|
|
19
19
|
const projectRootDirectory = (0, slash_1.default)(path_1.default.relative(await (0, vcs_1.getVcsClient)().getRootPathAsync(), ctx.projectDir)) || '.';
|
|
20
20
|
const { credentials } = jobData;
|
|
@@ -59,7 +59,8 @@ async function prepareJobAsync(ctx, jobData) {
|
|
|
59
59
|
updates: { channel: ctx.buildProfile.channel },
|
|
60
60
|
developmentClient: buildProfile.developmentClient,
|
|
61
61
|
gradleCommand: buildProfile.gradleCommand,
|
|
62
|
-
|
|
62
|
+
applicationArchivePath: (_a = buildProfile.applicationArchivePath) !== null && _a !== void 0 ? _a : buildProfile.artifactPath,
|
|
63
|
+
buildArtifactPaths: buildProfile.buildArtifactPaths,
|
|
63
64
|
buildType,
|
|
64
65
|
username,
|
|
65
66
|
...(ctx.android.versionCodeOverride && {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
2
|
import { AndroidVersionAutoIncrement } from '@expo/eas-json';
|
|
3
|
-
export declare function syncProjectConfigurationAsync({ projectDir, exp, localAutoIncrement, }: {
|
|
3
|
+
export declare function syncProjectConfigurationAsync({ projectDir, exp, localAutoIncrement, projectId, }: {
|
|
4
4
|
projectDir: string;
|
|
5
5
|
exp: ExpoConfig;
|
|
6
6
|
localAutoIncrement?: AndroidVersionAutoIncrement;
|
|
7
|
+
projectId: string;
|
|
7
8
|
}): Promise<void>;
|
|
8
9
|
export declare function cleanUpOldEasBuildGradleScriptAsync(projectDir: string): Promise<void>;
|
|
@@ -12,13 +12,13 @@ const projectUtils_1 = require("../../project/projectUtils");
|
|
|
12
12
|
const workflow_1 = require("../../project/workflow");
|
|
13
13
|
const UpdatesModule_1 = require("../../update/android/UpdatesModule");
|
|
14
14
|
const version_1 = require("./version");
|
|
15
|
-
async function syncProjectConfigurationAsync({ projectDir, exp, localAutoIncrement, }) {
|
|
15
|
+
async function syncProjectConfigurationAsync({ projectDir, exp, localAutoIncrement, projectId, }) {
|
|
16
16
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
17
17
|
const versionBumpStrategy = resolveVersionBumpStrategy(localAutoIncrement !== null && localAutoIncrement !== void 0 ? localAutoIncrement : false);
|
|
18
18
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
19
19
|
await cleanUpOldEasBuildGradleScriptAsync(projectDir);
|
|
20
20
|
if ((0, projectUtils_1.isExpoUpdatesInstalled)(projectDir)) {
|
|
21
|
-
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp);
|
|
21
|
+
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp, projectId);
|
|
22
22
|
}
|
|
23
23
|
await (0, version_1.bumpVersionAsync)({ projectDir, exp, bumpStrategy: versionBumpStrategy });
|
|
24
24
|
}
|
package/build/build/build.js
CHANGED
|
@@ -79,20 +79,28 @@ async function prepareBuildRequestForPlatformAsync(builder) {
|
|
|
79
79
|
}
|
|
80
80
|
exports.prepareBuildRequestForPlatformAsync = prepareBuildRequestForPlatformAsync;
|
|
81
81
|
function handleBuildRequestError(error, platform) {
|
|
82
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
82
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
83
83
|
if (((_c = (_b = (_a = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.extensions) === null || _c === void 0 ? void 0 : _c.errorCode) === 'TURTLE_DEPRECATED_JOB_FORMAT') {
|
|
84
84
|
log_1.default.error('EAS Build API has changed. Upgrade to the latest eas-cli version.');
|
|
85
85
|
throw new Error('Build request failed.');
|
|
86
86
|
}
|
|
87
87
|
else if (((_f = (_e = (_d = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.extensions) === null || _f === void 0 ? void 0 : _f.errorCode) === 'EAS_BUILD_DOWN_FOR_MAINTENANCE') {
|
|
88
|
-
log_1.default.error(
|
|
88
|
+
log_1.default.error(`EAS Build is down for maintenance. Try again later. Check ${(0, log_1.link)('https://status.expo.dev/')} for updates.`);
|
|
89
89
|
throw new Error('Build request failed.');
|
|
90
90
|
}
|
|
91
91
|
else if (((_j = (_h = (_g = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.extensions) === null || _j === void 0 ? void 0 : _j.errorCode) === 'EAS_BUILD_FREE_TIER_DISABLED') {
|
|
92
|
-
log_1.default.error(
|
|
92
|
+
log_1.default.error(`EAS Build free tier is temporarily disabled and we are not accepting any new builds. Try again later. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-queues')}`);
|
|
93
93
|
throw new Error('Build request failed.');
|
|
94
94
|
}
|
|
95
|
-
else if (((_m = (_l = (_k = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.extensions) === null || _m === void 0 ? void 0 : _m.errorCode) === '
|
|
95
|
+
else if (((_m = (_l = (_k = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.extensions) === null || _m === void 0 ? void 0 : _m.errorCode) === 'EAS_BUILD_FREE_TIER_DISABLED_IOS') {
|
|
96
|
+
log_1.default.error(`EAS Build free tier is temporarily disabled for iOS and we are not accepting any new builds. Try again later. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-queues')}`);
|
|
97
|
+
throw new Error('Build request failed.');
|
|
98
|
+
}
|
|
99
|
+
else if (((_q = (_p = (_o = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _o === void 0 ? void 0 : _o[0]) === null || _p === void 0 ? void 0 : _p.extensions) === null || _q === void 0 ? void 0 : _q.errorCode) === 'EAS_BUILD_FREE_TIER_DISABLED_ANDROID') {
|
|
100
|
+
log_1.default.error(`EAS Build free tier is temporarily disabled for Android and we are not accepting any new builds. Try again later. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-queues')}`);
|
|
101
|
+
throw new Error('Build request failed.');
|
|
102
|
+
}
|
|
103
|
+
else if (((_t = (_s = (_r = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _r === void 0 ? void 0 : _r[0]) === null || _s === void 0 ? void 0 : _s.extensions) === null || _t === void 0 ? void 0 : _t.errorCode) === 'EAS_BUILD_TOO_MANY_PENDING_BUILDS') {
|
|
96
104
|
log_1.default.error(`You have already reached the maximum number of pending ${platform_1.requestedPlatformDisplayNames[platform]} builds for your account. Try again later.`);
|
|
97
105
|
throw new Error('Build request failed.');
|
|
98
106
|
}
|
|
@@ -108,6 +116,9 @@ async function uploadProjectAsync(ctx) {
|
|
|
108
116
|
log_1.default.newLine();
|
|
109
117
|
log_1.default.log(`Compressing project files and uploading to EAS Build. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-archive')}`);
|
|
110
118
|
const projectTarball = await (0, repository_1.makeProjectTarballAsync)();
|
|
119
|
+
if (projectTarball.size > 1024 * 1024 * 100) {
|
|
120
|
+
log_1.default.warn(`Your project archive is ${(0, files_1.formatBytes)(projectTarball.size)}. You can reduce its size and the time it takes to upload by excluding files that are unnecessary for the build process in ${chalk_1.default.bold('.easignore')} file. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-archive')}`);
|
|
121
|
+
}
|
|
111
122
|
projectTarballPath = projectTarball.path;
|
|
112
123
|
const { bucketKey } = await (0, uploads_1.uploadFileAtPathToS3Async)(generated_1.UploadSessionType.EasBuildProjectSources, projectTarball.path, (0, progress_1.createProgressTracker)({
|
|
113
124
|
total: projectTarball.size,
|
package/build/build/configure.js
CHANGED
|
@@ -19,7 +19,7 @@ const repository_1 = require("./utils/repository");
|
|
|
19
19
|
* - true - if eas.json was created by the function
|
|
20
20
|
*/
|
|
21
21
|
async function ensureProjectConfiguredAsync(configureParams) {
|
|
22
|
-
if (await fs_extra_1.default.pathExists(eas_json_1.
|
|
22
|
+
if (await fs_extra_1.default.pathExists(eas_json_1.EasJsonAccessor.formatEasJsonPath(configureParams.projectDir))) {
|
|
23
23
|
return false;
|
|
24
24
|
}
|
|
25
25
|
await configureAsync(configureParams);
|
|
@@ -78,7 +78,7 @@ const EAS_JSON_BARE_DEFAULT = {
|
|
|
78
78
|
},
|
|
79
79
|
};
|
|
80
80
|
async function createEasJsonAsync(projectDir) {
|
|
81
|
-
const easJsonPath = eas_json_1.
|
|
81
|
+
const easJsonPath = eas_json_1.EasJsonAccessor.formatEasJsonPath(projectDir);
|
|
82
82
|
const hasAndroidNativeProject = (await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID)) === eas_build_job_1.Workflow.GENERIC;
|
|
83
83
|
const hasIosNativeProject = (await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS)) === eas_build_job_1.Workflow.GENERIC;
|
|
84
84
|
const easJson = hasAndroidNativeProject || hasIosNativeProject
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Platform } from '@expo/eas-build-job';
|
|
2
2
|
import { BuildProfile, EasJson } from '@expo/eas-json';
|
|
3
|
+
import { DynamicConfigContextFn } from '../commandUtils/context/DynamicProjectConfigContextField';
|
|
3
4
|
import { BuildResourceClass } from '../graphql/generated';
|
|
5
|
+
import { Actor } from '../user/User';
|
|
4
6
|
import { BuildContext } from './context';
|
|
5
7
|
import { LocalBuildOptions } from './local';
|
|
6
|
-
export declare function createBuildContextAsync<T extends Platform>({ buildProfileName, buildProfile, easJsonCliConfig, clearCache, localBuildOptions, nonInteractive, noWait, platform, projectDir, resourceClass, message, }: {
|
|
8
|
+
export declare function createBuildContextAsync<T extends Platform>({ buildProfileName, buildProfile, easJsonCliConfig, clearCache, localBuildOptions, nonInteractive, noWait, platform, projectDir, resourceClass, message, actor, getDynamicProjectConfigAsync, }: {
|
|
7
9
|
buildProfileName: string;
|
|
8
10
|
buildProfile: BuildProfile<T>;
|
|
9
11
|
easJsonCliConfig: EasJson['cli'];
|
|
@@ -15,4 +17,6 @@ export declare function createBuildContextAsync<T extends Platform>({ buildProfi
|
|
|
15
17
|
projectDir: string;
|
|
16
18
|
resourceClass: BuildResourceClass;
|
|
17
19
|
message?: string;
|
|
20
|
+
actor: Actor;
|
|
21
|
+
getDynamicProjectConfigAsync: DynamicConfigContextFn;
|
|
18
22
|
}): Promise<BuildContext<T>>;
|
|
@@ -9,28 +9,22 @@ const resolve_from_1 = tslib_1.__importDefault(require("resolve-from"));
|
|
|
9
9
|
const uuid_1 = require("uuid");
|
|
10
10
|
const events_1 = require("../analytics/events");
|
|
11
11
|
const context_1 = require("../credentials/context");
|
|
12
|
-
const expoConfig_1 = require("../project/expoConfig");
|
|
13
12
|
const projectUtils_1 = require("../project/projectUtils");
|
|
14
13
|
const workflow_1 = require("../project/workflow");
|
|
15
|
-
const Account_1 = require("../user/Account");
|
|
16
|
-
const actions_1 = require("../user/actions");
|
|
17
14
|
const build_1 = require("./android/build");
|
|
18
15
|
const build_2 = require("./ios/build");
|
|
19
|
-
async function createBuildContextAsync({ buildProfileName, buildProfile, easJsonCliConfig, clearCache = false, localBuildOptions, nonInteractive, noWait, platform, projectDir, resourceClass, message, }) {
|
|
20
|
-
|
|
21
|
-
const exp = (0, expoConfig_1.getExpoConfig)(projectDir, { env: buildProfile.env });
|
|
22
|
-
const user = await (0, actions_1.ensureLoggedInAsync)();
|
|
23
|
-
const accountName = (0, projectUtils_1.getProjectAccountName)(exp, user);
|
|
16
|
+
async function createBuildContextAsync({ buildProfileName, buildProfile, easJsonCliConfig, clearCache = false, localBuildOptions, nonInteractive, noWait, platform, projectDir, resourceClass, message, actor, getDynamicProjectConfigAsync, }) {
|
|
17
|
+
const { exp, projectId } = await getDynamicProjectConfigAsync({ env: buildProfile.env });
|
|
24
18
|
const projectName = exp.slug;
|
|
25
|
-
const
|
|
19
|
+
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId);
|
|
26
20
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, platform);
|
|
27
|
-
const accountId =
|
|
21
|
+
const accountId = account.id;
|
|
28
22
|
const runFromCI = getenv_1.default.boolish('CI', false);
|
|
29
23
|
const credentialsCtx = new context_1.CredentialsContext({
|
|
30
|
-
exp,
|
|
24
|
+
projectInfo: { exp, projectId },
|
|
31
25
|
nonInteractive,
|
|
32
26
|
projectDir,
|
|
33
|
-
user,
|
|
27
|
+
user: actor,
|
|
34
28
|
env: buildProfile.env,
|
|
35
29
|
easJsonCliConfig,
|
|
36
30
|
});
|
|
@@ -51,7 +45,7 @@ async function createBuildContextAsync({ buildProfileName, buildProfile, easJson
|
|
|
51
45
|
};
|
|
52
46
|
events_1.Analytics.logEvent(events_1.BuildEvent.BUILD_COMMAND, trackingCtx);
|
|
53
47
|
const commonContext = {
|
|
54
|
-
accountName,
|
|
48
|
+
accountName: account.name,
|
|
55
49
|
buildProfile,
|
|
56
50
|
buildProfileName,
|
|
57
51
|
resourceClass,
|
|
@@ -67,7 +61,7 @@ async function createBuildContextAsync({ buildProfileName, buildProfile, easJson
|
|
|
67
61
|
projectId,
|
|
68
62
|
projectName,
|
|
69
63
|
trackingCtx,
|
|
70
|
-
user,
|
|
64
|
+
user: actor,
|
|
71
65
|
workflow,
|
|
72
66
|
message,
|
|
73
67
|
runFromCI,
|
package/build/build/ios/build.js
CHANGED
|
@@ -19,7 +19,7 @@ async function createIosContextAsync(ctx) {
|
|
|
19
19
|
var _a;
|
|
20
20
|
const { buildProfile } = ctx;
|
|
21
21
|
if (ctx.workflow === eas_build_job_1.Workflow.MANAGED) {
|
|
22
|
-
await (0, bundleIdentifier_1.ensureBundleIdentifierIsDefinedForManagedProjectAsync)(ctx.projectDir, ctx.exp);
|
|
22
|
+
await (0, bundleIdentifier_1.ensureBundleIdentifierIsDefinedForManagedProjectAsync)(ctx.projectDir, ctx.exp, ctx.user);
|
|
23
23
|
}
|
|
24
24
|
(0, validate_1.checkNodeEnvVariable)(ctx);
|
|
25
25
|
await (0, validate_1.checkGoogleServicesFileAsync)(ctx);
|
|
@@ -68,6 +68,7 @@ async function prepareIosBuildAsync(ctx) {
|
|
|
68
68
|
localAutoIncrement: ((_a = ctx.easJsonCliConfig) === null || _a === void 0 ? void 0 : _a.appVersionSource) === eas_json_1.AppVersionSource.REMOTE
|
|
69
69
|
? false
|
|
70
70
|
: ctx.buildProfile.autoIncrement,
|
|
71
|
+
projectId: ctx.projectId,
|
|
71
72
|
});
|
|
72
73
|
},
|
|
73
74
|
prepareJobAsync: async (ctx, jobData) => {
|
|
@@ -12,7 +12,7 @@ async function ensureIosCredentialsAsync(buildCtx, targets) {
|
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
14
|
const provider = new IosCredentialsProvider_1.default(buildCtx.credentialsCtx, {
|
|
15
|
-
app: (0, BuildCredentialsUtils_1.
|
|
15
|
+
app: await (0, BuildCredentialsUtils_1.getAppFromContextAsync)(buildCtx.credentialsCtx),
|
|
16
16
|
targets,
|
|
17
17
|
distribution: (_a = buildCtx.buildProfile.distribution) !== null && _a !== void 0 ? _a : 'store',
|
|
18
18
|
enterpriseProvisioning: buildCtx.buildProfile.enterpriseProvisioning,
|
|
@@ -18,7 +18,8 @@ function transformJob(job) {
|
|
|
18
18
|
version: ((_a = job.version) === null || _a === void 0 ? void 0 : _a.buildNumber) ? { buildNumber: job.version.buildNumber } : undefined,
|
|
19
19
|
scheme: job.scheme,
|
|
20
20
|
buildConfiguration: job.buildConfiguration,
|
|
21
|
-
|
|
21
|
+
applicationArchivePath: job.applicationArchivePath,
|
|
22
|
+
buildArtifactPaths: job.buildArtifactPaths,
|
|
22
23
|
username: job.username,
|
|
23
24
|
developmentClient: job.developmentClient,
|
|
24
25
|
simulator: job.simulator,
|
|
@@ -6,7 +6,6 @@ const eas_build_job_1 = require("@expo/eas-build-job");
|
|
|
6
6
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
7
|
const slash_1 = tslib_1.__importDefault(require("slash"));
|
|
8
8
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
9
|
-
const actions_1 = require("../../user/actions");
|
|
10
9
|
const vcs_1 = require("../../vcs");
|
|
11
10
|
const cacheDefaults = {
|
|
12
11
|
disabled: false,
|
|
@@ -14,8 +13,9 @@ const cacheDefaults = {
|
|
|
14
13
|
cacheDefaultPaths: true,
|
|
15
14
|
};
|
|
16
15
|
async function prepareJobAsync(ctx, jobData) {
|
|
16
|
+
var _a;
|
|
17
17
|
const projectRootDirectory = (0, slash_1.default)(path_1.default.relative(await (0, vcs_1.getVcsClient)().getRootPathAsync(), ctx.projectDir)) || '.';
|
|
18
|
-
const username = (0, projectUtils_1.getUsername)(ctx.exp,
|
|
18
|
+
const username = (0, projectUtils_1.getUsername)(ctx.exp, ctx.user);
|
|
19
19
|
const buildCredentials = {};
|
|
20
20
|
if (jobData.credentials) {
|
|
21
21
|
const targetNames = Object.keys(jobData.credentials);
|
|
@@ -52,7 +52,8 @@ async function prepareJobAsync(ctx, jobData) {
|
|
|
52
52
|
simulator: ctx.buildProfile.simulator,
|
|
53
53
|
scheme: jobData.buildScheme,
|
|
54
54
|
buildConfiguration: ctx.buildProfile.buildConfiguration,
|
|
55
|
-
|
|
55
|
+
applicationArchivePath: (_a = ctx.buildProfile.applicationArchivePath) !== null && _a !== void 0 ? _a : ctx.buildProfile.artifactPath,
|
|
56
|
+
buildArtifactPaths: ctx.buildProfile.buildArtifactPaths,
|
|
56
57
|
username,
|
|
57
58
|
...(ctx.ios.buildNumberOverride && {
|
|
58
59
|
version: {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
2
|
import { IosVersionAutoIncrement } from '@expo/eas-json';
|
|
3
3
|
import { Target } from '../../credentials/ios/types';
|
|
4
|
-
export declare function syncProjectConfigurationAsync({ projectDir, exp, targets, localAutoIncrement, }: {
|
|
4
|
+
export declare function syncProjectConfigurationAsync({ projectDir, exp, targets, localAutoIncrement, projectId, }: {
|
|
5
5
|
projectDir: string;
|
|
6
6
|
exp: ExpoConfig;
|
|
7
7
|
targets: Target[];
|
|
8
8
|
localAutoIncrement?: IosVersionAutoIncrement;
|
|
9
|
+
projectId: string;
|
|
9
10
|
}): Promise<void>;
|
|
@@ -6,12 +6,12 @@ const projectUtils_1 = require("../../project/projectUtils");
|
|
|
6
6
|
const workflow_1 = require("../../project/workflow");
|
|
7
7
|
const UpdatesModule_1 = require("../../update/ios/UpdatesModule");
|
|
8
8
|
const version_1 = require("./version");
|
|
9
|
-
async function syncProjectConfigurationAsync({ projectDir, exp, targets, localAutoIncrement, }) {
|
|
9
|
+
async function syncProjectConfigurationAsync({ projectDir, exp, targets, localAutoIncrement, projectId, }) {
|
|
10
10
|
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
|
|
11
11
|
const versionBumpStrategy = resolveVersionBumpStrategy(localAutoIncrement !== null && localAutoIncrement !== void 0 ? localAutoIncrement : false);
|
|
12
12
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
13
13
|
if ((0, projectUtils_1.isExpoUpdatesInstalled)(projectDir)) {
|
|
14
|
-
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp);
|
|
14
|
+
await (0, UpdatesModule_1.syncUpdatesConfigurationAsync)(projectDir, exp, projectId);
|
|
15
15
|
}
|
|
16
16
|
await (0, version_1.bumpVersionAsync)({ projectDir, exp, bumpStrategy: versionBumpStrategy, targets });
|
|
17
17
|
}
|
package/build/build/local.js
CHANGED
|
@@ -6,7 +6,7 @@ const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
|
|
|
6
6
|
const semver_1 = tslib_1.__importDefault(require("semver"));
|
|
7
7
|
const ora_1 = require("../ora");
|
|
8
8
|
const PLUGIN_PACKAGE_NAME = 'eas-cli-local-build-plugin';
|
|
9
|
-
const PLUGIN_PACKAGE_VERSION = '0.0.
|
|
9
|
+
const PLUGIN_PACKAGE_VERSION = '0.0.110';
|
|
10
10
|
async function runLocalBuildAsync(job, metadata, options) {
|
|
11
11
|
var _a;
|
|
12
12
|
const { command, args } = await getCommandAndArgsAsync(job, metadata);
|
package/build/build/metadata.js
CHANGED
|
@@ -10,7 +10,6 @@ const log_1 = tslib_1.__importDefault(require("../log"));
|
|
|
10
10
|
const projectUtils_1 = require("../project/projectUtils");
|
|
11
11
|
const UpdatesModule_1 = require("../update/android/UpdatesModule");
|
|
12
12
|
const UpdatesModule_2 = require("../update/ios/UpdatesModule");
|
|
13
|
-
const actions_1 = require("../user/actions");
|
|
14
13
|
const easCli_1 = require("../utils/easCli");
|
|
15
14
|
const vcs_1 = require("../vcs");
|
|
16
15
|
const version_1 = require("./android/version");
|
|
@@ -39,7 +38,7 @@ async function collectMetadataAsync(ctx) {
|
|
|
39
38
|
gitCommitHash: await vcsClient.getCommitHashAsync(),
|
|
40
39
|
gitCommitMessage: truncateGitCommitMessage((_c = (await vcsClient.getLastCommitMessageAsync())) !== null && _c !== void 0 ? _c : undefined),
|
|
41
40
|
isGitWorkingTreeDirty: await vcsClient.hasUncommittedChangesAsync(),
|
|
42
|
-
username: (0, projectUtils_1.getUsername)(ctx.exp,
|
|
41
|
+
username: (0, projectUtils_1.getUsername)(ctx.exp, ctx.user),
|
|
43
42
|
message: ctx.message,
|
|
44
43
|
...(ctx.platform === eas_build_job_1.Platform.IOS && {
|
|
45
44
|
iosEnterpriseProvisioning: resolveIosEnterpriseProvisioning(ctx),
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PaginatedQueryOptions } from '../commandUtils/pagination';
|
|
2
|
+
import { BuildFilter } from '../graphql/generated';
|
|
3
|
+
export declare const BUILDS_LIMIT = 50;
|
|
4
|
+
export declare function listAndRenderBuildsOnAppAsync({ projectId, projectDisplayName, filter, paginatedQueryOptions, }: {
|
|
5
|
+
projectId: string;
|
|
6
|
+
projectDisplayName: string;
|
|
7
|
+
filter?: BuildFilter;
|
|
8
|
+
paginatedQueryOptions: PaginatedQueryOptions;
|
|
9
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listAndRenderBuildsOnAppAsync = exports.BUILDS_LIMIT = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
+
const BuildQuery_1 = require("../graphql/queries/BuildQuery");
|
|
7
|
+
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
8
|
+
const json_1 = require("../utils/json");
|
|
9
|
+
const queries_1 = require("../utils/queries");
|
|
10
|
+
const formatBuild_1 = require("./utils/formatBuild");
|
|
11
|
+
exports.BUILDS_LIMIT = 50;
|
|
12
|
+
async function listAndRenderBuildsOnAppAsync({ projectId, projectDisplayName, filter, paginatedQueryOptions, }) {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
if (paginatedQueryOptions.nonInteractive) {
|
|
15
|
+
const builds = await BuildQuery_1.BuildQuery.viewBuildsOnAppAsync({
|
|
16
|
+
appId: projectId,
|
|
17
|
+
limit: (_a = paginatedQueryOptions.limit) !== null && _a !== void 0 ? _a : exports.BUILDS_LIMIT,
|
|
18
|
+
offset: paginatedQueryOptions.offset,
|
|
19
|
+
filter,
|
|
20
|
+
});
|
|
21
|
+
renderPageOfBuilds({ builds, projectDisplayName, paginatedQueryOptions });
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
await (0, queries_1.paginatedQueryWithConfirmPromptAsync)({
|
|
25
|
+
limit: (_b = paginatedQueryOptions.limit) !== null && _b !== void 0 ? _b : exports.BUILDS_LIMIT,
|
|
26
|
+
offset: paginatedQueryOptions.offset,
|
|
27
|
+
queryToPerform: (limit, offset) => BuildQuery_1.BuildQuery.viewBuildsOnAppAsync({
|
|
28
|
+
appId: projectId,
|
|
29
|
+
limit,
|
|
30
|
+
offset,
|
|
31
|
+
filter,
|
|
32
|
+
}),
|
|
33
|
+
promptOptions: {
|
|
34
|
+
title: 'Load more builds?',
|
|
35
|
+
renderListItems: builds => renderPageOfBuilds({ builds, projectDisplayName, paginatedQueryOptions }),
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.listAndRenderBuildsOnAppAsync = listAndRenderBuildsOnAppAsync;
|
|
41
|
+
function renderPageOfBuilds({ builds, projectDisplayName, paginatedQueryOptions, }) {
|
|
42
|
+
if (paginatedQueryOptions.json) {
|
|
43
|
+
(0, json_1.printJsonOnlyOutput)(builds);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const list = builds.map(build => (0, formatBuild_1.formatGraphQLBuild)(build)).join(`\n\n${chalk_1.default.dim('———')}\n\n`);
|
|
47
|
+
log_1.default.addNewLineIfNone();
|
|
48
|
+
log_1.default.log(chalk_1.default.bold(`Builds for ${projectDisplayName}:`));
|
|
49
|
+
log_1.default.log(`\n${list}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { DynamicConfigContextFn } from '../commandUtils/context/DynamicProjectConfigContextField';
|
|
1
2
|
import { RequestedPlatform } from '../platform';
|
|
3
|
+
import { Actor } from '../user/User';
|
|
2
4
|
import { LocalBuildOptions } from './local';
|
|
3
5
|
import { UserInputResourceClass } from './types';
|
|
4
6
|
export interface BuildFlags {
|
|
@@ -14,4 +16,4 @@ export interface BuildFlags {
|
|
|
14
16
|
userInputResourceClass?: UserInputResourceClass;
|
|
15
17
|
message?: string;
|
|
16
18
|
}
|
|
17
|
-
export declare function runBuildAndSubmitAsync(projectDir: string, flags: BuildFlags): Promise<void>;
|
|
19
|
+
export declare function runBuildAndSubmitAsync(projectDir: string, flags: BuildFlags, actor: Actor, getDynamicProjectConfigAsync: DynamicConfigContextFn): Promise<void>;
|