eas-cli 5.3.1 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +103 -55
- package/build/branch/utils.d.ts +2 -1
- package/build/branch/utils.js +2 -4
- package/build/build/android/build.js +5 -3
- package/build/build/android/prepareJob.js +1 -2
- package/build/build/android/syncProjectConfiguration.d.ts +3 -1
- package/build/build/android/syncProjectConfiguration.js +2 -2
- package/build/build/android/version.d.ts +4 -2
- package/build/build/android/version.js +4 -4
- package/build/build/build.d.ts +1 -3
- package/build/build/build.js +7 -58
- package/build/build/configure.d.ts +2 -0
- package/build/build/configure.js +9 -10
- package/build/build/context.d.ts +4 -0
- package/build/build/createContext.d.ts +3 -1
- package/build/build/createContext.js +7 -2
- package/build/build/ios/build.js +4 -0
- package/build/build/ios/prepareJob.js +1 -2
- package/build/build/ios/syncProjectConfiguration.d.ts +3 -1
- package/build/build/ios/syncProjectConfiguration.js +3 -3
- package/build/build/ios/version.d.ts +6 -4
- package/build/build/ios/version.js +10 -10
- package/build/build/metadata.js +7 -8
- package/build/build/runBuildAndSubmit.d.ts +2 -1
- package/build/build/runBuildAndSubmit.js +12 -8
- package/build/build/utils/devClient.d.ts +3 -1
- package/build/build/utils/devClient.js +6 -7
- package/build/build/utils/repository.d.ts +6 -5
- package/build/build/utils/repository.js +14 -15
- package/build/build/utils/resourceClass.js +3 -12
- package/build/build/validate.js +2 -3
- package/build/commandUtils/EasCommand.d.ts +4 -0
- package/build/commandUtils/EasCommand.js +4 -0
- package/build/commandUtils/context/VcsClientContextField.d.ts +5 -0
- package/build/commandUtils/context/VcsClientContextField.js +11 -0
- package/build/commands/branch/create.d.ts +1 -0
- package/build/commands/branch/create.js +3 -2
- package/build/commands/build/cancel.d.ts +1 -0
- package/build/commands/build/cancel.js +1 -0
- package/build/commands/build/configure.d.ts +1 -0
- package/build/commands/build/configure.js +8 -6
- package/build/commands/build/index.d.ts +1 -0
- package/build/commands/build/index.js +3 -2
- package/build/commands/build/inspect.d.ts +1 -0
- package/build/commands/build/inspect.js +5 -6
- package/build/commands/build/internal.d.ts +1 -0
- package/build/commands/build/internal.js +3 -2
- package/build/commands/build/list.d.ts +1 -0
- package/build/commands/build/list.js +1 -0
- package/build/commands/build/resign.d.ts +1 -0
- package/build/commands/build/resign.js +5 -3
- package/build/commands/build/run.d.ts +1 -0
- package/build/commands/build/run.js +1 -0
- package/build/commands/build/version/get.d.ts +1 -0
- package/build/commands/build/version/get.js +3 -1
- package/build/commands/build/version/set.d.ts +1 -0
- package/build/commands/build/version/set.js +3 -1
- package/build/commands/build/version/sync.d.ts +1 -0
- package/build/commands/build/version/sync.js +9 -4
- package/build/commands/build/view.d.ts +1 -0
- package/build/commands/build/view.js +1 -0
- package/build/commands/credentials.d.ts +1 -0
- package/build/commands/credentials.js +3 -2
- package/build/commands/diagnostics.d.ts +1 -0
- package/build/commands/diagnostics.js +6 -5
- package/build/commands/metadata/pull.d.ts +1 -0
- package/build/commands/metadata/pull.js +4 -2
- package/build/commands/metadata/push.d.ts +1 -0
- package/build/commands/metadata/push.js +4 -2
- package/build/commands/project/init.d.ts +1 -0
- package/build/commands/project/init.js +43 -11
- package/build/commands/submit.d.ts +1 -0
- package/build/commands/submit.js +3 -1
- package/build/commands/update/configure.d.ts +1 -0
- package/build/commands/update/configure.js +4 -3
- package/build/commands/update/index.d.ts +1 -0
- package/build/commands/update/index.js +17 -11
- package/build/commands/update/roll-back-to-embedded.d.ts +1 -1
- package/build/commands/update/roll-back-to-embedded.js +8 -6
- package/build/commands/update/rollback.d.ts +0 -1
- package/build/commands/update/rollback.js +0 -1
- package/build/credentials/android/actions/BuildCredentialsUtils.js +1 -1
- package/build/credentials/android/api/GraphqlClient.js +0 -1
- package/build/credentials/context.d.ts +3 -0
- package/build/credentials/context.js +1 -0
- package/build/credentials/credentialsJson/update.js +6 -8
- package/build/credentials/ios/actions/DeviceUtils.js +1 -1
- package/build/credentials/ios/appstore/bundleIdCapabilities.js +7 -0
- package/build/credentials/manager/HelperActions.d.ts +2 -0
- package/build/credentials/manager/ManageAndroid.js +2 -1
- package/build/credentials/manager/ManageIos.js +3 -0
- package/build/credentials/manager/SelectPlatform.d.ts +3 -1
- package/build/credentials/manager/SelectPlatform.js +2 -1
- package/build/graphql/generated.d.ts +457 -4
- package/build/graphql/generated.js +7 -2
- package/build/graphql/types/Account.js +4 -0
- package/build/graphql/types/credentials/AppleDevice.js +1 -0
- package/build/metadata/auth.js +4 -4
- package/build/project/android/applicationId.d.ts +4 -2
- package/build/project/android/applicationId.js +5 -5
- package/build/project/android/gradle.d.ts +2 -1
- package/build/project/android/gradle.js +2 -2
- package/build/project/applicationIdentifier.d.ts +3 -1
- package/build/project/applicationIdentifier.js +10 -7
- package/build/project/ios/bundleIdentifier.d.ts +4 -2
- package/build/project/ios/bundleIdentifier.js +5 -5
- package/build/project/ios/entitlements.d.ts +2 -1
- package/build/project/ios/entitlements.js +2 -2
- package/build/project/ios/scheme.d.ts +3 -1
- package/build/project/ios/scheme.js +2 -2
- package/build/project/ios/target.d.ts +4 -2
- package/build/project/ios/target.js +10 -8
- package/build/project/projectUtils.d.ts +1 -0
- package/build/project/projectUtils.js +12 -1
- package/build/project/publish.d.ts +6 -4
- package/build/project/publish.js +10 -11
- package/build/project/workflow.d.ts +4 -3
- package/build/project/workflow.js +5 -8
- package/build/submit/android/AndroidSubmitCommand.js +1 -1
- package/build/submit/context.d.ts +3 -0
- package/build/submit/context.js +2 -1
- package/build/submit/ios/AppProduce.js +1 -1
- package/build/submit/ios/AscApiKeySource.js +1 -1
- package/build/update/configure.d.ts +3 -1
- package/build/update/configure.js +5 -5
- package/build/update/ios/UpdatesModule.d.ts +2 -1
- package/build/update/ios/UpdatesModule.js +4 -5
- package/build/uploads.d.ts +1 -1
- package/build/uploads.js +2 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* For more info and docs, visit https://graphql-code-generator.com/
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
10
|
-
exports.WebhookType = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.SubmissionStatus = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = void 0;
|
|
9
|
+
exports.NotificationType = exports.NotificationEvent = exports.MailchimpTag = exports.MailchimpAudience = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.GitHubBuildTriggerType = exports.GitHubBuildTriggerRunStatus = exports.GitHubAppInstallationStatus = exports.GitHubAppEnvironment = exports.Feature = exports.Experiment = exports.EnvironmentSecretType = exports.EasTotalPlanEnablementUnit = exports.EasServiceMetric = exports.EasService = exports.EasBuildDeprecationInfoType = exports.EasBuildBillingResourceClass = exports.DistributionType = exports.BuildWorkflow = exports.BuildTrigger = exports.BuildStatus = exports.BuildRetryDisabledReason = exports.BuildResourceClass = exports.BuildPriority = exports.BuildPhase = exports.BuildMode = exports.BuildLimitThresholdExceededMetadataType = exports.BuildJobStatus = exports.BuildJobLogsFormat = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.BackgroundJobState = exports.BackgroundJobResultType = exports.AuthProtocolType = exports.AssetMetadataStatus = exports.AppsFilter = exports.AppleDeviceClass = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = exports.AccountAppsSortByField = void 0;
|
|
10
|
+
exports.WebhookType = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.SubmissionStatus = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OfferType = void 0;
|
|
11
11
|
var AccountAppsSortByField;
|
|
12
12
|
(function (AccountAppsSortByField) {
|
|
13
13
|
AccountAppsSortByField["LatestActivityTime"] = "LATEST_ACTIVITY_TIME";
|
|
@@ -316,6 +316,11 @@ var GitHubAppInstallationStatus;
|
|
|
316
316
|
GitHubAppInstallationStatus["NotInstalled"] = "NOT_INSTALLED";
|
|
317
317
|
GitHubAppInstallationStatus["Suspended"] = "SUSPENDED";
|
|
318
318
|
})(GitHubAppInstallationStatus = exports.GitHubAppInstallationStatus || (exports.GitHubAppInstallationStatus = {}));
|
|
319
|
+
var GitHubBuildTriggerRunStatus;
|
|
320
|
+
(function (GitHubBuildTriggerRunStatus) {
|
|
321
|
+
GitHubBuildTriggerRunStatus["Errored"] = "ERRORED";
|
|
322
|
+
GitHubBuildTriggerRunStatus["Success"] = "SUCCESS";
|
|
323
|
+
})(GitHubBuildTriggerRunStatus = exports.GitHubBuildTriggerRunStatus || (exports.GitHubBuildTriggerRunStatus = {}));
|
|
319
324
|
var GitHubBuildTriggerType;
|
|
320
325
|
(function (GitHubBuildTriggerType) {
|
|
321
326
|
GitHubBuildTriggerType["PullRequestUpdated"] = "PULL_REQUEST_UPDATED";
|
package/build/metadata/auth.js
CHANGED
|
@@ -10,19 +10,19 @@ const bundleIdentifier_1 = require("../project/ios/bundleIdentifier");
|
|
|
10
10
|
* Resolve the bundle identifier from the selected submit profile.
|
|
11
11
|
* This bundle identifier is used as target for the metadata submission.
|
|
12
12
|
*/
|
|
13
|
-
async function resolveAppStoreBundleIdentifierAsync(projectDir, profile, exp) {
|
|
13
|
+
async function resolveAppStoreBundleIdentifierAsync(projectDir, profile, exp, vcsClient) {
|
|
14
14
|
var _a;
|
|
15
15
|
if ('bundleIdentifier' in profile) {
|
|
16
|
-
return (_a = profile.bundleIdentifier) !== null && _a !== void 0 ? _a : (await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp));
|
|
16
|
+
return (_a = profile.bundleIdentifier) !== null && _a !== void 0 ? _a : (await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, vcsClient));
|
|
17
17
|
}
|
|
18
|
-
return await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp);
|
|
18
|
+
return await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, vcsClient);
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* To start syncing ASC entities, we need access to the apple utils App instance.
|
|
22
22
|
* This resolves both the authentication and that App instance.
|
|
23
23
|
*/
|
|
24
24
|
async function getAppStoreAuthAsync({ projectDir, profile, exp, credentialsCtx, }) {
|
|
25
|
-
const bundleId = await resolveAppStoreBundleIdentifierAsync(projectDir, profile, exp);
|
|
25
|
+
const bundleId = await resolveAppStoreBundleIdentifierAsync(projectDir, profile, exp, credentialsCtx.vcsClient);
|
|
26
26
|
const authCtx = await credentialsCtx.appStore.ensureAuthenticatedAsync();
|
|
27
27
|
(0, assert_1.default)(authCtx.authState, 'Failed to authenticate with App Store Connect');
|
|
28
28
|
// TODO: improve error handling by mentioning possible configuration errors
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
2
|
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
3
|
+
import { Client } from '../../vcs/vcs';
|
|
3
4
|
import { GradleBuildContext } from './gradle';
|
|
4
5
|
export declare const INVALID_APPLICATION_ID_MESSAGE = "Invalid format of Android applicationId. Only alphanumeric characters, '.' and '_' are allowed, and each '.' must be followed by a letter.";
|
|
5
|
-
export declare function ensureApplicationIdIsDefinedForManagedProjectAsync({ graphqlClient, projectDir, projectId, exp, }: {
|
|
6
|
+
export declare function ensureApplicationIdIsDefinedForManagedProjectAsync({ graphqlClient, projectDir, projectId, exp, vcsClient, }: {
|
|
6
7
|
graphqlClient: ExpoGraphqlClient;
|
|
7
8
|
projectDir: string;
|
|
8
9
|
projectId: string;
|
|
9
10
|
exp: ExpoConfig;
|
|
11
|
+
vcsClient: Client;
|
|
10
12
|
}): Promise<string>;
|
|
11
13
|
export declare class AmbiguousApplicationIdError extends Error {
|
|
12
14
|
constructor(message?: string);
|
|
13
15
|
}
|
|
14
16
|
export declare function getApplicationIdFromBareAsync(projectDir: string, gradleContext?: GradleBuildContext): Promise<string>;
|
|
15
|
-
export declare function getApplicationIdAsync(projectDir: string, exp: ExpoConfig, gradleContext?: GradleBuildContext): Promise<string>;
|
|
17
|
+
export declare function getApplicationIdAsync(projectDir: string, exp: ExpoConfig, vcsClient: Client, gradleContext?: GradleBuildContext): Promise<string>;
|
|
16
18
|
export declare function isApplicationIdValid(applicationId: string): boolean;
|
|
17
19
|
export declare function warnIfAndroidPackageDefinedInAppConfigForBareWorkflowProject(projectDir: string, exp: ExpoConfig): void;
|
|
@@ -17,11 +17,11 @@ const prompts_1 = require("../../prompts");
|
|
|
17
17
|
const workflow_1 = require("../workflow");
|
|
18
18
|
const gradleUtils = tslib_1.__importStar(require("./gradleUtils"));
|
|
19
19
|
exports.INVALID_APPLICATION_ID_MESSAGE = `Invalid format of Android applicationId. Only alphanumeric characters, '.' and '_' are allowed, and each '.' must be followed by a letter.`;
|
|
20
|
-
async function ensureApplicationIdIsDefinedForManagedProjectAsync({ graphqlClient, projectDir, projectId, exp, }) {
|
|
21
|
-
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
20
|
+
async function ensureApplicationIdIsDefinedForManagedProjectAsync({ graphqlClient, projectDir, projectId, exp, vcsClient, }) {
|
|
21
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID, vcsClient);
|
|
22
22
|
(0, assert_1.default)(workflow === eas_build_job_1.Workflow.MANAGED, 'This function should be called only for managed projects');
|
|
23
23
|
try {
|
|
24
|
-
return await getApplicationIdAsync(projectDir, exp, {
|
|
24
|
+
return await getApplicationIdAsync(projectDir, exp, vcsClient, {
|
|
25
25
|
moduleName: gradleUtils.DEFAULT_MODULE_NAME,
|
|
26
26
|
});
|
|
27
27
|
}
|
|
@@ -65,8 +65,8 @@ async function getApplicationIdFromBareAsync(projectDir, gradleContext) {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
exports.getApplicationIdFromBareAsync = getApplicationIdFromBareAsync;
|
|
68
|
-
async function getApplicationIdAsync(projectDir, exp, gradleContext) {
|
|
69
|
-
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
68
|
+
async function getApplicationIdAsync(projectDir, exp, vcsClient, gradleContext) {
|
|
69
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID, vcsClient);
|
|
70
70
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
71
71
|
warnIfAndroidPackageDefinedInAppConfigForBareWorkflowProject(projectDir, exp);
|
|
72
72
|
return getApplicationIdFromBareAsync(projectDir, gradleContext);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Platform } from '@expo/eas-build-job';
|
|
2
2
|
import { BuildProfile } from '@expo/eas-json';
|
|
3
|
+
import { Client } from '../../vcs/vcs';
|
|
3
4
|
export interface GradleBuildContext {
|
|
4
5
|
moduleName?: string;
|
|
5
6
|
flavor?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare function resolveGradleBuildContextAsync(projectDir: string, buildProfile: BuildProfile<Platform.ANDROID
|
|
8
|
+
export declare function resolveGradleBuildContextAsync(projectDir: string, buildProfile: BuildProfile<Platform.ANDROID>, vcsClient: Client): Promise<GradleBuildContext | undefined>;
|
|
@@ -6,9 +6,9 @@ const eas_build_job_1 = require("@expo/eas-build-job");
|
|
|
6
6
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
7
7
|
const workflow_1 = require("../../project/workflow");
|
|
8
8
|
const gradleUtils = tslib_1.__importStar(require("./gradleUtils"));
|
|
9
|
-
async function resolveGradleBuildContextAsync(projectDir, buildProfile) {
|
|
9
|
+
async function resolveGradleBuildContextAsync(projectDir, buildProfile, vcsClient) {
|
|
10
10
|
var _a;
|
|
11
|
-
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
11
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID, vcsClient);
|
|
12
12
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
13
13
|
try {
|
|
14
14
|
if (buildProfile.gradleCommand) {
|
|
@@ -2,11 +2,13 @@ import { ExpoConfig } from '@expo/config';
|
|
|
2
2
|
import { Platform } from '@expo/eas-build-job';
|
|
3
3
|
import { BuildProfile } from '@expo/eas-json';
|
|
4
4
|
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
5
|
-
|
|
5
|
+
import { Client } from '../vcs/vcs';
|
|
6
|
+
export declare function getApplicationIdentifierAsync({ graphqlClient, projectDir, projectId, exp, buildProfile, platform, vcsClient, }: {
|
|
6
7
|
graphqlClient: ExpoGraphqlClient;
|
|
7
8
|
projectDir: string;
|
|
8
9
|
projectId: string;
|
|
9
10
|
exp: ExpoConfig;
|
|
10
11
|
buildProfile: BuildProfile;
|
|
11
12
|
platform: Platform;
|
|
13
|
+
vcsClient: Client;
|
|
12
14
|
}): Promise<string>;
|
|
@@ -8,23 +8,24 @@ const bundleIdentifier_1 = require("./ios/bundleIdentifier");
|
|
|
8
8
|
const scheme_1 = require("./ios/scheme");
|
|
9
9
|
const target_1 = require("./ios/target");
|
|
10
10
|
const workflow_1 = require("./workflow");
|
|
11
|
-
async function getApplicationIdentifierAsync({ graphqlClient, projectDir, projectId, exp, buildProfile, platform, }) {
|
|
11
|
+
async function getApplicationIdentifierAsync({ graphqlClient, projectDir, projectId, exp, buildProfile, platform, vcsClient, }) {
|
|
12
12
|
if (platform === eas_build_job_1.Platform.ANDROID) {
|
|
13
13
|
const profile = buildProfile;
|
|
14
|
-
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID);
|
|
14
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.ANDROID, vcsClient);
|
|
15
15
|
if (workflow === eas_build_job_1.Workflow.MANAGED) {
|
|
16
16
|
return await (0, applicationId_1.ensureApplicationIdIsDefinedForManagedProjectAsync)({
|
|
17
17
|
graphqlClient,
|
|
18
18
|
projectDir,
|
|
19
19
|
projectId,
|
|
20
20
|
exp,
|
|
21
|
+
vcsClient,
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
|
-
const gradleContext = await (0, gradle_1.resolveGradleBuildContextAsync)(projectDir, profile);
|
|
24
|
-
return await (0, applicationId_1.getApplicationIdAsync)(projectDir, exp, gradleContext);
|
|
24
|
+
const gradleContext = await (0, gradle_1.resolveGradleBuildContextAsync)(projectDir, profile, vcsClient);
|
|
25
|
+
return await (0, applicationId_1.getApplicationIdAsync)(projectDir, exp, vcsClient, gradleContext);
|
|
25
26
|
}
|
|
26
27
|
else {
|
|
27
|
-
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
|
|
28
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS, vcsClient);
|
|
28
29
|
const profile = buildProfile;
|
|
29
30
|
if (workflow === eas_build_job_1.Workflow.MANAGED) {
|
|
30
31
|
return await (0, bundleIdentifier_1.ensureBundleIdentifierIsDefinedForManagedProjectAsync)({
|
|
@@ -32,17 +33,19 @@ async function getApplicationIdentifierAsync({ graphqlClient, projectDir, projec
|
|
|
32
33
|
projectDir,
|
|
33
34
|
projectId,
|
|
34
35
|
exp,
|
|
36
|
+
vcsClient,
|
|
35
37
|
});
|
|
36
38
|
}
|
|
37
|
-
const xcodeBuildContext = await (0, scheme_1.resolveXcodeBuildContextAsync)({ exp, projectDir, nonInteractive: false }, profile);
|
|
39
|
+
const xcodeBuildContext = await (0, scheme_1.resolveXcodeBuildContextAsync)({ exp, projectDir, nonInteractive: false, vcsClient }, profile);
|
|
38
40
|
const targets = await (0, target_1.resolveTargetsAsync)({
|
|
39
41
|
projectDir,
|
|
40
42
|
exp,
|
|
41
43
|
xcodeBuildContext,
|
|
42
44
|
env: profile.env,
|
|
45
|
+
vcsClient,
|
|
43
46
|
});
|
|
44
47
|
const applicationTarget = (0, target_1.findApplicationTarget)(targets);
|
|
45
|
-
return await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, {
|
|
48
|
+
return await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, vcsClient, {
|
|
46
49
|
targetName: applicationTarget.targetName,
|
|
47
50
|
buildConfiguration: applicationTarget.buildConfiguration,
|
|
48
51
|
});
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
2
|
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
3
|
+
import { Client } from '../../vcs/vcs';
|
|
3
4
|
export declare const INVALID_BUNDLE_IDENTIFIER_MESSAGE = "Invalid format of iOS bundle identifier. Only alphanumeric characters, '.' and '-' are allowed, and each '.' must be followed by a letter.";
|
|
4
|
-
export declare function ensureBundleIdentifierIsDefinedForManagedProjectAsync({ graphqlClient, projectDir, projectId, exp, }: {
|
|
5
|
+
export declare function ensureBundleIdentifierIsDefinedForManagedProjectAsync({ graphqlClient, projectDir, projectId, exp, vcsClient, }: {
|
|
5
6
|
graphqlClient: ExpoGraphqlClient;
|
|
6
7
|
projectDir: string;
|
|
7
8
|
projectId: string;
|
|
8
9
|
exp: ExpoConfig;
|
|
10
|
+
vcsClient: Client;
|
|
9
11
|
}): Promise<string>;
|
|
10
12
|
export declare class AmbiguousBundleIdentifierError extends Error {
|
|
11
13
|
constructor(message?: string);
|
|
12
14
|
}
|
|
13
|
-
export declare function getBundleIdentifierAsync(projectDir: string, exp: ExpoConfig, xcodeContext?: {
|
|
15
|
+
export declare function getBundleIdentifierAsync(projectDir: string, exp: ExpoConfig, vcsClient: Client, xcodeContext?: {
|
|
14
16
|
targetName?: string;
|
|
15
17
|
buildConfiguration?: string;
|
|
16
18
|
}): Promise<string>;
|
|
@@ -14,11 +14,11 @@ const prompts_1 = require("../../prompts");
|
|
|
14
14
|
const projectUtils_1 = require("../projectUtils");
|
|
15
15
|
const workflow_1 = require("../workflow");
|
|
16
16
|
exports.INVALID_BUNDLE_IDENTIFIER_MESSAGE = `Invalid format of iOS bundle identifier. Only alphanumeric characters, '.' and '-' are allowed, and each '.' must be followed by a letter.`;
|
|
17
|
-
async function ensureBundleIdentifierIsDefinedForManagedProjectAsync({ graphqlClient, projectDir, projectId, exp, }) {
|
|
18
|
-
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
|
|
17
|
+
async function ensureBundleIdentifierIsDefinedForManagedProjectAsync({ graphqlClient, projectDir, projectId, exp, vcsClient, }) {
|
|
18
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS, vcsClient);
|
|
19
19
|
(0, assert_1.default)(workflow === eas_build_job_1.Workflow.MANAGED, 'This function should be called only for managed projects');
|
|
20
20
|
try {
|
|
21
|
-
return await getBundleIdentifierAsync(projectDir, exp);
|
|
21
|
+
return await getBundleIdentifierAsync(projectDir, exp, vcsClient);
|
|
22
22
|
}
|
|
23
23
|
catch {
|
|
24
24
|
return await configureBundleIdentifierAsync({
|
|
@@ -36,8 +36,8 @@ class AmbiguousBundleIdentifierError extends Error {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
exports.AmbiguousBundleIdentifierError = AmbiguousBundleIdentifierError;
|
|
39
|
-
async function getBundleIdentifierAsync(projectDir, exp, xcodeContext) {
|
|
40
|
-
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
|
|
39
|
+
async function getBundleIdentifierAsync(projectDir, exp, vcsClient, xcodeContext) {
|
|
40
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS, vcsClient);
|
|
41
41
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
42
42
|
warnIfBundleIdentifierDefinedInAppConfigForBareWorkflowProject(projectDir, exp);
|
|
43
43
|
const xcodeProject = config_plugins_1.IOSConfig.XcodeUtils.getPbxproj(projectDir);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { JSONObject } from '@expo/json-file';
|
|
2
|
+
import { Client } from '../../vcs/vcs';
|
|
2
3
|
interface Target {
|
|
3
4
|
buildConfiguration?: string;
|
|
4
5
|
targetName: string;
|
|
5
6
|
}
|
|
6
|
-
export declare function getManagedApplicationTargetEntitlementsAsync(projectDir: string, env: Record<string, string
|
|
7
|
+
export declare function getManagedApplicationTargetEntitlementsAsync(projectDir: string, env: Record<string, string>, vcsClient: Client): Promise<JSONObject>;
|
|
7
8
|
export declare function getNativeTargetEntitlementsAsync(projectDir: string, target: Target): Promise<JSONObject | null>;
|
|
8
9
|
export {};
|
|
@@ -5,7 +5,7 @@ const config_plugins_1 = require("@expo/config-plugins");
|
|
|
5
5
|
const prebuild_config_1 = require("@expo/prebuild-config");
|
|
6
6
|
const plist_1 = require("../../utils/plist");
|
|
7
7
|
const workflow_1 = require("../workflow");
|
|
8
|
-
async function getManagedApplicationTargetEntitlementsAsync(projectDir, env) {
|
|
8
|
+
async function getManagedApplicationTargetEntitlementsAsync(projectDir, env, vcsClient) {
|
|
9
9
|
var _a;
|
|
10
10
|
const originalProcessEnv = process.env;
|
|
11
11
|
try {
|
|
@@ -18,7 +18,7 @@ async function getManagedApplicationTargetEntitlementsAsync(projectDir, env) {
|
|
|
18
18
|
projectRoot: projectDir,
|
|
19
19
|
platforms: ['ios'],
|
|
20
20
|
introspect: true,
|
|
21
|
-
ignoreExistingNativeFiles: await (0, workflow_1.hasIgnoredIosProjectAsync)(projectDir),
|
|
21
|
+
ignoreExistingNativeFiles: await (0, workflow_1.hasIgnoredIosProjectAsync)(projectDir, vcsClient),
|
|
22
22
|
});
|
|
23
23
|
return ((_a = expWithMods.ios) === null || _a === void 0 ? void 0 : _a.entitlements) || {};
|
|
24
24
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { ExpoConfig } from '@expo/config';
|
|
2
2
|
import { Platform } from '@expo/eas-build-job';
|
|
3
3
|
import { BuildProfile } from '@expo/eas-json';
|
|
4
|
+
import { Client } from '../../vcs/vcs';
|
|
4
5
|
export interface XcodeBuildContext {
|
|
5
6
|
buildScheme: string;
|
|
6
7
|
buildConfiguration?: string;
|
|
7
8
|
}
|
|
8
|
-
export declare function resolveXcodeBuildContextAsync({ exp, projectDir, nonInteractive, }: {
|
|
9
|
+
export declare function resolveXcodeBuildContextAsync({ exp, projectDir, nonInteractive, vcsClient, }: {
|
|
9
10
|
exp: ExpoConfig;
|
|
10
11
|
projectDir: string;
|
|
11
12
|
nonInteractive: boolean;
|
|
13
|
+
vcsClient: Client;
|
|
12
14
|
}, buildProfile: BuildProfile<Platform.IOS>): Promise<XcodeBuildContext>;
|
|
13
15
|
export declare function selectSchemeAsync({ projectDir, nonInteractive, }: {
|
|
14
16
|
projectDir: string;
|
|
@@ -9,9 +9,9 @@ const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
|
9
9
|
const prompts_1 = require("../../prompts");
|
|
10
10
|
const sortBy_1 = tslib_1.__importDefault(require("../../utils/expodash/sortBy"));
|
|
11
11
|
const workflow_1 = require("../workflow");
|
|
12
|
-
async function resolveXcodeBuildContextAsync({ exp, projectDir, nonInteractive, }, buildProfile) {
|
|
12
|
+
async function resolveXcodeBuildContextAsync({ exp, projectDir, nonInteractive, vcsClient, }, buildProfile) {
|
|
13
13
|
var _a, _b;
|
|
14
|
-
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
|
|
14
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS, vcsClient);
|
|
15
15
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
16
16
|
const buildScheme = (_a = buildProfile.scheme) !== null && _a !== void 0 ? _a : (await selectSchemeAsync({
|
|
17
17
|
projectDir,
|
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
import { ExpoConfig } from '@expo/config';
|
|
3
3
|
import { ApplePlatform } from '../../credentials/ios/appstore/constants';
|
|
4
4
|
import { Target } from '../../credentials/ios/types';
|
|
5
|
+
import { Client } from '../../vcs/vcs';
|
|
5
6
|
import { XcodeBuildContext } from './scheme';
|
|
6
7
|
interface ResolveTargetOptions {
|
|
7
8
|
projectDir: string;
|
|
8
9
|
exp: ExpoConfig;
|
|
9
10
|
env?: Record<string, string>;
|
|
10
11
|
xcodeBuildContext: XcodeBuildContext;
|
|
12
|
+
vcsClient: Client;
|
|
11
13
|
}
|
|
12
|
-
export declare function resolveManagedProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, env, }: ResolveTargetOptions): Promise<Target[]>;
|
|
13
|
-
export declare function resolveBareProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, }: ResolveTargetOptions): Promise<Target[]>;
|
|
14
|
+
export declare function resolveManagedProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, env, vcsClient, }: ResolveTargetOptions): Promise<Target[]>;
|
|
15
|
+
export declare function resolveBareProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, vcsClient, }: ResolveTargetOptions): Promise<Target[]>;
|
|
14
16
|
export declare function resolveTargetsAsync(opts: ResolveTargetOptions): Promise<Target[]>;
|
|
15
17
|
export declare function findApplicationTarget(targets: Target[]): Target;
|
|
16
18
|
export declare function findTargetByName(targets: Target[], name: string): Target;
|
|
@@ -15,15 +15,15 @@ const AppExtensionsConfigSchema = joi_1.default.array().items(joi_1.default.obje
|
|
|
15
15
|
parentBundleIdentifier: joi_1.default.string(),
|
|
16
16
|
entitlements: joi_1.default.object(),
|
|
17
17
|
}));
|
|
18
|
-
async function resolveManagedProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, env, }) {
|
|
18
|
+
async function resolveManagedProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, env, vcsClient, }) {
|
|
19
19
|
var _a, _b, _c, _d, _e, _f;
|
|
20
20
|
const { buildScheme, buildConfiguration } = xcodeBuildContext;
|
|
21
21
|
const applicationTargetName = buildScheme;
|
|
22
|
-
const applicationTargetBundleIdentifier = await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, {
|
|
22
|
+
const applicationTargetBundleIdentifier = await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, vcsClient, {
|
|
23
23
|
targetName: applicationTargetName,
|
|
24
24
|
buildConfiguration,
|
|
25
25
|
});
|
|
26
|
-
const applicationTargetEntitlements = await (0, entitlements_1.getManagedApplicationTargetEntitlementsAsync)(projectDir, env !== null && env !== void 0 ? env : {});
|
|
26
|
+
const applicationTargetEntitlements = await (0, entitlements_1.getManagedApplicationTargetEntitlementsAsync)(projectDir, env !== null && env !== void 0 ? env : {}, vcsClient);
|
|
27
27
|
const appExtensions = (_f = (_e = (_d = (_c = (_b = (_a = exp.extra) === null || _a === void 0 ? void 0 : _a.eas) === null || _b === void 0 ? void 0 : _b.build) === null || _c === void 0 ? void 0 : _c.experimental) === null || _d === void 0 ? void 0 : _d.ios) === null || _e === void 0 ? void 0 : _e.appExtensions) !== null && _f !== void 0 ? _f : [];
|
|
28
28
|
const { error } = AppExtensionsConfigSchema.validate(appExtensions, {
|
|
29
29
|
allowUnknown: false,
|
|
@@ -53,12 +53,12 @@ async function resolveManagedProjectTargetsAsync({ exp, projectDir, xcodeBuildCo
|
|
|
53
53
|
];
|
|
54
54
|
}
|
|
55
55
|
exports.resolveManagedProjectTargetsAsync = resolveManagedProjectTargetsAsync;
|
|
56
|
-
async function resolveBareProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, }) {
|
|
56
|
+
async function resolveBareProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, vcsClient, }) {
|
|
57
57
|
const { buildScheme, buildConfiguration } = xcodeBuildContext;
|
|
58
58
|
const result = [];
|
|
59
59
|
const pbxProject = config_plugins_1.IOSConfig.XcodeUtils.getPbxproj(projectDir);
|
|
60
60
|
const applicationTarget = await config_plugins_1.IOSConfig.Target.findApplicationTargetWithDependenciesAsync(projectDir, buildScheme);
|
|
61
|
-
const bundleIdentifier = await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, {
|
|
61
|
+
const bundleIdentifier = await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, vcsClient, {
|
|
62
62
|
targetName: applicationTarget.name,
|
|
63
63
|
buildConfiguration,
|
|
64
64
|
});
|
|
@@ -80,6 +80,7 @@ async function resolveBareProjectTargetsAsync({ exp, projectDir, xcodeBuildConte
|
|
|
80
80
|
target: applicationTarget,
|
|
81
81
|
bundleIdentifier,
|
|
82
82
|
pbxProject,
|
|
83
|
+
vcsClient,
|
|
83
84
|
});
|
|
84
85
|
if (dependencies.length > 0) {
|
|
85
86
|
result.push(...dependencies);
|
|
@@ -88,7 +89,7 @@ async function resolveBareProjectTargetsAsync({ exp, projectDir, xcodeBuildConte
|
|
|
88
89
|
}
|
|
89
90
|
exports.resolveBareProjectTargetsAsync = resolveBareProjectTargetsAsync;
|
|
90
91
|
async function resolveTargetsAsync(opts) {
|
|
91
|
-
const workflow = await (0, workflow_1.resolveWorkflowAsync)(opts.projectDir, eas_build_job_1.Platform.IOS);
|
|
92
|
+
const workflow = await (0, workflow_1.resolveWorkflowAsync)(opts.projectDir, eas_build_job_1.Platform.IOS, opts.vcsClient);
|
|
92
93
|
if (workflow === eas_build_job_1.Workflow.GENERIC) {
|
|
93
94
|
return await resolveBareProjectTargetsAsync(opts);
|
|
94
95
|
}
|
|
@@ -100,14 +101,14 @@ async function resolveTargetsAsync(opts) {
|
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
103
|
exports.resolveTargetsAsync = resolveTargetsAsync;
|
|
103
|
-
async function resolveBareProjectDependenciesAsync({ exp, projectDir, buildConfiguration, target, bundleIdentifier, pbxProject, }) {
|
|
104
|
+
async function resolveBareProjectDependenciesAsync({ exp, projectDir, buildConfiguration, target, bundleIdentifier, pbxProject, vcsClient, }) {
|
|
104
105
|
const result = [];
|
|
105
106
|
if (target.dependencies && target.dependencies.length > 0) {
|
|
106
107
|
for (const dependency of target.dependencies) {
|
|
107
108
|
if (!dependency.signable) {
|
|
108
109
|
continue;
|
|
109
110
|
}
|
|
110
|
-
const dependencyBundleIdentifier = await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, {
|
|
111
|
+
const dependencyBundleIdentifier = await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, vcsClient, {
|
|
111
112
|
targetName: dependency.name,
|
|
112
113
|
buildConfiguration,
|
|
113
114
|
});
|
|
@@ -130,6 +131,7 @@ async function resolveBareProjectDependenciesAsync({ exp, projectDir, buildConfi
|
|
|
130
131
|
target: dependency,
|
|
131
132
|
bundleIdentifier: dependencyBundleIdentifier,
|
|
132
133
|
pbxProject,
|
|
134
|
+
vcsClient,
|
|
133
135
|
});
|
|
134
136
|
if (dependencyDependencies.length > 0) {
|
|
135
137
|
result.push(...dependencyDependencies);
|
|
@@ -17,6 +17,7 @@ export declare function isExpoUpdatesInstalledAsDevDependency(projectDir: string
|
|
|
17
17
|
export declare function isExpoUpdatesInstalledOrAvailable(projectDir: string, sdkVersion?: string): boolean;
|
|
18
18
|
export declare function isUsingEASUpdate(exp: ExpoConfig, projectId: string): boolean;
|
|
19
19
|
export declare function validateAppVersionRuntimePolicySupportAsync(projectDir: string, exp: ExpoConfig): Promise<void>;
|
|
20
|
+
export declare function enforceRollBackToEmbeddedUpdateSupportAsync(projectDir: string): Promise<void>;
|
|
20
21
|
export declare function installExpoUpdatesAsync(projectDir: string, options?: {
|
|
21
22
|
silent: boolean;
|
|
22
23
|
}): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDisplayNameForProjectIdAsync = exports.getOwnerAccountForProjectIdAsync = exports.installExpoUpdatesAsync = exports.validateAppVersionRuntimePolicySupportAsync = exports.isUsingEASUpdate = exports.isExpoUpdatesInstalledOrAvailable = exports.isExpoUpdatesInstalledAsDevDependency = exports.isExpoUpdatesInstalled = exports.getProjectConfigDescription = exports.toAppPrivacy = exports.getUsername = void 0;
|
|
3
|
+
exports.getDisplayNameForProjectIdAsync = exports.getOwnerAccountForProjectIdAsync = exports.installExpoUpdatesAsync = exports.enforceRollBackToEmbeddedUpdateSupportAsync = exports.validateAppVersionRuntimePolicySupportAsync = exports.isUsingEASUpdate = exports.isExpoUpdatesInstalledOrAvailable = exports.isExpoUpdatesInstalledAsDevDependency = exports.isExpoUpdatesInstalled = exports.getProjectConfigDescription = exports.toAppPrivacy = exports.getUsername = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const config_1 = require("@expo/config");
|
|
6
6
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
@@ -101,6 +101,17 @@ async function validateAppVersionRuntimePolicySupportAsync(projectDir, exp) {
|
|
|
101
101
|
log_1.default.warn(`You need to be on SDK 46 or higher, and use expo-updates >= 0.14.4 to use appVersion runtime policy.`);
|
|
102
102
|
}
|
|
103
103
|
exports.validateAppVersionRuntimePolicySupportAsync = validateAppVersionRuntimePolicySupportAsync;
|
|
104
|
+
async function enforceRollBackToEmbeddedUpdateSupportAsync(projectDir) {
|
|
105
|
+
const maybePackageJson = resolve_from_1.default.silent(projectDir, 'expo-updates/package.json');
|
|
106
|
+
if (maybePackageJson) {
|
|
107
|
+
const { version } = await fs_extra_1.default.readJson(maybePackageJson);
|
|
108
|
+
if (semver_1.default.gte(version, '0.19.0')) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
throw new Error('The expo-updates package must have a version >= 0.19.0 to use roll back to embedded, which corresponds to Expo SDK 50 or greater.');
|
|
113
|
+
}
|
|
114
|
+
exports.enforceRollBackToEmbeddedUpdateSupportAsync = enforceRollBackToEmbeddedUpdateSupportAsync;
|
|
104
115
|
async function installExpoUpdatesAsync(projectDir, options) {
|
|
105
116
|
log_1.default.log(chalk_1.default.gray `> npx expo install expo-updates`);
|
|
106
117
|
try {
|
|
@@ -5,6 +5,7 @@ import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGr
|
|
|
5
5
|
import { PaginatedQueryOptions } from '../commandUtils/pagination';
|
|
6
6
|
import { PartialManifestAsset } from '../graphql/generated';
|
|
7
7
|
import { RequestedPlatform } from '../platform';
|
|
8
|
+
import { Client } from '../vcs/vcs';
|
|
8
9
|
export type ExpoCLIExportPlatformFlag = Platform | 'all';
|
|
9
10
|
type Metadata = {
|
|
10
11
|
version: number;
|
|
@@ -115,9 +116,9 @@ export declare function uploadAssetsAsync(graphqlClient: ExpoGraphqlClient, asse
|
|
|
115
116
|
storageKey: string;
|
|
116
117
|
};
|
|
117
118
|
finished: boolean;
|
|
118
|
-
}[]) => void): Promise<AssetUploadResult>;
|
|
119
|
+
}[]) => void, onAssetUploadBegin: () => void): Promise<AssetUploadResult>;
|
|
119
120
|
export declare function isUploadedAssetCountAboveWarningThreshold(uploadedAssetCount: number, assetLimitPerUpdateGroup: number): boolean;
|
|
120
|
-
export declare function getBranchNameForCommandAsync({ graphqlClient, projectId, channelNameArg, branchNameArg, autoFlag, nonInteractive, paginatedQueryOptions, }: {
|
|
121
|
+
export declare function getBranchNameForCommandAsync({ graphqlClient, projectId, channelNameArg, branchNameArg, autoFlag, nonInteractive, paginatedQueryOptions, vcsClient, }: {
|
|
121
122
|
graphqlClient: ExpoGraphqlClient;
|
|
122
123
|
projectId: string;
|
|
123
124
|
channelNameArg: string | undefined;
|
|
@@ -125,8 +126,9 @@ export declare function getBranchNameForCommandAsync({ graphqlClient, projectId,
|
|
|
125
126
|
autoFlag: boolean;
|
|
126
127
|
nonInteractive: boolean;
|
|
127
128
|
paginatedQueryOptions: PaginatedQueryOptions;
|
|
129
|
+
vcsClient: Client;
|
|
128
130
|
}): Promise<string>;
|
|
129
|
-
export declare function getUpdateMessageForCommandAsync({ updateMessageArg, autoFlag, nonInteractive, jsonFlag, }: {
|
|
131
|
+
export declare function getUpdateMessageForCommandAsync(vcsClient: Client, { updateMessageArg, autoFlag, nonInteractive, jsonFlag, }: {
|
|
130
132
|
updateMessageArg: string | undefined;
|
|
131
133
|
autoFlag: boolean;
|
|
132
134
|
nonInteractive: boolean;
|
|
@@ -135,7 +137,7 @@ export declare function getUpdateMessageForCommandAsync({ updateMessageArg, auto
|
|
|
135
137
|
export declare const defaultPublishPlatforms: Platform[];
|
|
136
138
|
export declare function getRequestedPlatform(platform: ExpoCLIExportPlatformFlag): RequestedPlatform | null;
|
|
137
139
|
/** Get runtime versions grouped by platform. Runtime version is always `null` on web where the platform is always backwards compatible. */
|
|
138
|
-
export declare function getRuntimeVersionObjectAsync(exp: ExpoConfig, platforms: Platform[], projectDir: string): Promise<{
|
|
140
|
+
export declare function getRuntimeVersionObjectAsync(exp: ExpoConfig, platforms: Platform[], projectDir: string, vcsClient: Client): Promise<{
|
|
139
141
|
platform: string;
|
|
140
142
|
runtimeVersion: string;
|
|
141
143
|
}[]>;
|
package/build/project/publish.js
CHANGED
|
@@ -29,7 +29,6 @@ const expoCli_1 = require("../utils/expoCli");
|
|
|
29
29
|
const chunk_1 = tslib_1.__importDefault(require("../utils/expodash/chunk"));
|
|
30
30
|
const filter_1 = require("../utils/expodash/filter");
|
|
31
31
|
const uniqBy_1 = tslib_1.__importDefault(require("../utils/expodash/uniqBy"));
|
|
32
|
-
const vcs_1 = require("../vcs");
|
|
33
32
|
const workflow_1 = require("./workflow");
|
|
34
33
|
const fileMetadataJoi = joi_1.default.object({
|
|
35
34
|
assets: joi_1.default.array()
|
|
@@ -293,7 +292,7 @@ async function filterOutAssetsThatAlreadyExistAsync(graphqlClient, uniqueAssetsW
|
|
|
293
292
|
return missingAssets;
|
|
294
293
|
}
|
|
295
294
|
exports.filterOutAssetsThatAlreadyExistAsync = filterOutAssetsThatAlreadyExistAsync;
|
|
296
|
-
async function uploadAssetsAsync(graphqlClient, assetsForUpdateInfoGroup, projectId, cancelationToken, onAssetUploadResultsChanged) {
|
|
295
|
+
async function uploadAssetsAsync(graphqlClient, assetsForUpdateInfoGroup, projectId, cancelationToken, onAssetUploadResultsChanged, onAssetUploadBegin) {
|
|
297
296
|
let assets = [];
|
|
298
297
|
let platform;
|
|
299
298
|
const launchAssets = [];
|
|
@@ -336,7 +335,7 @@ async function uploadAssetsAsync(graphqlClient, assetsForUpdateInfoGroup, projec
|
|
|
336
335
|
throw Error('Canceled upload');
|
|
337
336
|
}
|
|
338
337
|
const presignedPost = JSON.parse(specifications[i]);
|
|
339
|
-
await (0, uploads_1.uploadWithPresignedPostWithRetryAsync)(missingAsset.path, presignedPost);
|
|
338
|
+
await (0, uploads_1.uploadWithPresignedPostWithRetryAsync)(missingAsset.path, presignedPost, onAssetUploadBegin);
|
|
340
339
|
});
|
|
341
340
|
}),
|
|
342
341
|
]);
|
|
@@ -371,7 +370,7 @@ function isUploadedAssetCountAboveWarningThreshold(uploadedAssetCount, assetLimi
|
|
|
371
370
|
return uploadedAssetCount > warningThreshold;
|
|
372
371
|
}
|
|
373
372
|
exports.isUploadedAssetCountAboveWarningThreshold = isUploadedAssetCountAboveWarningThreshold;
|
|
374
|
-
async function getBranchNameForCommandAsync({ graphqlClient, projectId, channelNameArg, branchNameArg, autoFlag, nonInteractive, paginatedQueryOptions, }) {
|
|
373
|
+
async function getBranchNameForCommandAsync({ graphqlClient, projectId, channelNameArg, branchNameArg, autoFlag, nonInteractive, paginatedQueryOptions, vcsClient, }) {
|
|
375
374
|
if (channelNameArg && branchNameArg) {
|
|
376
375
|
throw new Error('Cannot specify both --channel and --branch. Specify either --channel, --branch, or --auto.');
|
|
377
376
|
}
|
|
@@ -382,7 +381,7 @@ async function getBranchNameForCommandAsync({ graphqlClient, projectId, channelN
|
|
|
382
381
|
return branchNameArg;
|
|
383
382
|
}
|
|
384
383
|
if (autoFlag) {
|
|
385
|
-
return await (0, utils_1.getDefaultBranchNameAsync)();
|
|
384
|
+
return await (0, utils_1.getDefaultBranchNameAsync)(vcsClient);
|
|
386
385
|
}
|
|
387
386
|
else if (nonInteractive) {
|
|
388
387
|
throw new Error('Must supply --channel, --branch or --auto when in non-interactive mode.');
|
|
@@ -406,7 +405,7 @@ async function getBranchNameForCommandAsync({ graphqlClient, projectId, channelN
|
|
|
406
405
|
type: 'text',
|
|
407
406
|
name: 'name',
|
|
408
407
|
message: 'No branches found. Provide a branch name:',
|
|
409
|
-
initial: await (0, utils_1.getDefaultBranchNameAsync)(),
|
|
408
|
+
initial: await (0, utils_1.getDefaultBranchNameAsync)(vcsClient),
|
|
410
409
|
validate: value => (value ? true : 'Branch name may not be empty.'),
|
|
411
410
|
});
|
|
412
411
|
branchName = name;
|
|
@@ -416,11 +415,11 @@ async function getBranchNameForCommandAsync({ graphqlClient, projectId, channelN
|
|
|
416
415
|
}
|
|
417
416
|
}
|
|
418
417
|
exports.getBranchNameForCommandAsync = getBranchNameForCommandAsync;
|
|
419
|
-
async function getUpdateMessageForCommandAsync({ updateMessageArg, autoFlag, nonInteractive, jsonFlag, }) {
|
|
418
|
+
async function getUpdateMessageForCommandAsync(vcsClient, { updateMessageArg, autoFlag, nonInteractive, jsonFlag, }) {
|
|
420
419
|
var _a, _b;
|
|
421
420
|
let updateMessage = updateMessageArg;
|
|
422
421
|
if (!updateMessageArg && autoFlag) {
|
|
423
|
-
updateMessage = (_a = (await
|
|
422
|
+
updateMessage = (_a = (await vcsClient.getLastCommitMessageAsync())) === null || _a === void 0 ? void 0 : _a.trim();
|
|
424
423
|
}
|
|
425
424
|
if (!updateMessage) {
|
|
426
425
|
if (nonInteractive) {
|
|
@@ -434,7 +433,7 @@ async function getUpdateMessageForCommandAsync({ updateMessageArg, autoFlag, non
|
|
|
434
433
|
type: 'text',
|
|
435
434
|
name: 'updateMessageLocal',
|
|
436
435
|
message: `Provide an update message:`,
|
|
437
|
-
initial: (_b = (await
|
|
436
|
+
initial: (_b = (await vcsClient.getLastCommitMessageAsync())) === null || _b === void 0 ? void 0 : _b.trim(),
|
|
438
437
|
validate: (value) => (value ? true : validationMessage),
|
|
439
438
|
});
|
|
440
439
|
updateMessage = updateMessageLocal;
|
|
@@ -464,7 +463,7 @@ function getRequestedPlatform(platform) {
|
|
|
464
463
|
}
|
|
465
464
|
exports.getRequestedPlatform = getRequestedPlatform;
|
|
466
465
|
/** Get runtime versions grouped by platform. Runtime version is always `null` on web where the platform is always backwards compatible. */
|
|
467
|
-
async function getRuntimeVersionObjectAsync(exp, platforms, projectDir) {
|
|
466
|
+
async function getRuntimeVersionObjectAsync(exp, platforms, projectDir, vcsClient) {
|
|
468
467
|
var _a, _b;
|
|
469
468
|
for (const platform of platforms) {
|
|
470
469
|
if (platform === 'web') {
|
|
@@ -472,7 +471,7 @@ async function getRuntimeVersionObjectAsync(exp, platforms, projectDir) {
|
|
|
472
471
|
}
|
|
473
472
|
const isPolicy = typeof ((_b = (_a = exp[platform]) === null || _a === void 0 ? void 0 : _a.runtimeVersion) !== null && _b !== void 0 ? _b : exp.runtimeVersion) === 'object';
|
|
474
473
|
if (isPolicy) {
|
|
475
|
-
const isManaged = (await (0, workflow_1.resolveWorkflowAsync)(projectDir, platform)) ===
|
|
474
|
+
const isManaged = (await (0, workflow_1.resolveWorkflowAsync)(projectDir, platform, vcsClient)) ===
|
|
476
475
|
eas_build_job_1.Workflow.MANAGED;
|
|
477
476
|
if (!isManaged) {
|
|
478
477
|
throw new Error(`You're currently using the bare workflow, where runtime version policies are not supported. You must set your runtime version manually. For example, define your runtime version as "1.0.0", not {"policy": "appVersion"} in your app config. ${(0, log_1.learnMore)('https://docs.expo.dev/eas-update/runtime-versions')}`);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Platform, Workflow } from '@expo/eas-build-job';
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
2
|
+
import { Client } from '../vcs/vcs';
|
|
3
|
+
export declare function resolveWorkflowAsync(projectDir: string, platform: Platform, vcsClient: Client): Promise<Workflow>;
|
|
4
|
+
export declare function resolveWorkflowPerPlatformAsync(projectDir: string, vcsClient: Client): Promise<Record<Platform, Workflow>>;
|
|
5
|
+
export declare function hasIgnoredIosProjectAsync(projectDir: string, vcsClient: Client): Promise<boolean>;
|