eas-cli 13.0.1 → 13.1.1
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 +63 -63
- package/build/build/build.js +50 -5
- package/build/build/metadata.d.ts +2 -1
- package/build/build/metadata.js +4 -3
- package/build/build/utils/url.d.ts +1 -0
- package/build/build/utils/url.js +5 -1
- package/build/commands/build/internal.js +2 -1
- package/build/commands/update/index.js +1 -1
- package/build/commands/workflow/run.d.ts +21 -0
- package/build/commands/workflow/run.js +91 -0
- package/build/commands/workflow/validate.d.ts +11 -0
- package/build/commands/workflow/validate.js +87 -0
- package/build/graphql/generated.d.ts +297 -44
- package/build/graphql/generated.js +72 -31
- package/build/graphql/mutations/UploadSessionMutation.d.ts +5 -1
- package/build/graphql/mutations/UploadSessionMutation.js +18 -0
- package/build/graphql/mutations/WorkflowRunMutation.d.ts +11 -0
- package/build/graphql/mutations/WorkflowRunMutation.js +36 -0
- package/build/project/maybeUploadFingerprintAsync.d.ts +3 -3
- package/build/project/maybeUploadFingerprintAsync.js +5 -5
- package/build/project/uploadAccountScopedEasJsonAsync.d.ts +12 -0
- package/build/project/uploadAccountScopedEasJsonAsync.js +34 -0
- package/build/project/uploadAccountScopedProjectSourceAsync.d.ts +13 -0
- package/build/project/uploadAccountScopedProjectSourceAsync.js +48 -0
- package/build/uploads.d.ts +7 -1
- package/build/uploads.js +7 -1
- package/build/utils/fingerprintCli.d.ts +12 -0
- package/build/utils/fingerprintCli.js +26 -0
- package/build/utils/progress.js +2 -1
- package/oclif.manifest.json +51 -1
- package/package.json +3 -2
|
@@ -6,9 +6,9 @@
|
|
|
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.
|
|
11
|
-
exports.WorkerLoggerLevel = exports.WorkerDeploymentLogLevel = exports.WebhookType = exports.UserEntityTypeName = exports.UserAgentOs = void 0;
|
|
9
|
+
exports.FingerprintSourceType = exports.Feature = exports.Experiment = exports.EnvironmentVariableVisibility = exports.EnvironmentVariableScope = exports.EnvironmentVariableEnvironment = exports.EnvironmentSecretType = exports.EntityTypeName = exports.EasTotalPlanEnablementUnit = exports.EasServiceMetric = exports.EasService = exports.EasBuildWaiverType = exports.EasBuildDeprecationInfoType = exports.EasBuildBillingResourceClass = exports.DistributionType = exports.CustomDomainStatus = exports.CustomDomainDnsRecordType = exports.CrashSampleFor = exports.ContinentCode = exports.BuildWorkflow = exports.BuildTrigger = exports.BuildStatus = exports.BuildRetryDisabledReason = exports.BuildResourceClass = exports.BuildPriority = exports.BuildPhase = exports.BuildMode = exports.BuildLimitThresholdExceededMetadataType = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.BackgroundJobState = exports.BackgroundJobResultType = exports.AuthProviderIdentifier = exports.AuthProtocolType = exports.AuditLogsExportFormat = exports.AssetMetadataStatus = exports.AppsFilter = exports.AppleTeamType = exports.AppleDeviceClass = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AppInternalDistributionBuildPrivacy = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = exports.AccountUploadSessionType = exports.AccountAppsSortByField = void 0;
|
|
10
|
+
exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.TargetEntityMutationType = exports.SubmissionStatus = exports.SubmissionPriority = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ResponseType = exports.ResponseStatusType = exports.ResponseCacheStatus = exports.ResourceClassExperiment = exports.RequestsOrderByField = exports.RequestsOrderByDirection = exports.RequestMethod = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OnboardingEnvironment = exports.OnboardingDeviceType = exports.OfferType = exports.NotificationType = exports.NotificationEvent = exports.MailchimpTag = exports.MailchimpAudience = exports.JobRunStatus = exports.JobRunPriority = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.InsightsFilterType = exports.GitHubJobRunTriggerType = exports.GitHubJobRunTriggerRunStatus = exports.GitHubJobRunJobType = exports.GitHubBuildTriggerType = exports.GitHubBuildTriggerRunStatus = exports.GitHubBuildTriggerExecutionBehavior = exports.GitHubAppInstallationStatus = exports.GitHubAppEnvironment = void 0;
|
|
11
|
+
exports.WorkflowRunStatus = exports.WorkflowProjectSourceType = exports.WorkflowJobType = exports.WorkflowJobStatus = exports.WorkerLoggerLevel = exports.WorkerDeploymentLogLevel = exports.WebhookType = exports.UserEntityTypeName = exports.UserAgentOs = exports.UserAgentBrowser = void 0;
|
|
12
12
|
var AccountAppsSortByField;
|
|
13
13
|
(function (AccountAppsSortByField) {
|
|
14
14
|
AccountAppsSortByField["LatestActivityTime"] = "LATEST_ACTIVITY_TIME";
|
|
@@ -18,6 +18,10 @@ var AccountAppsSortByField;
|
|
|
18
18
|
*/
|
|
19
19
|
AccountAppsSortByField["Name"] = "NAME";
|
|
20
20
|
})(AccountAppsSortByField || (exports.AccountAppsSortByField = AccountAppsSortByField = {}));
|
|
21
|
+
var AccountUploadSessionType;
|
|
22
|
+
(function (AccountUploadSessionType) {
|
|
23
|
+
AccountUploadSessionType["WorkflowsProjectSources"] = "WORKFLOWS_PROJECT_SOURCES";
|
|
24
|
+
})(AccountUploadSessionType || (exports.AccountUploadSessionType = AccountUploadSessionType = {}));
|
|
21
25
|
var ActivityTimelineProjectActivityType;
|
|
22
26
|
(function (ActivityTimelineProjectActivityType) {
|
|
23
27
|
ActivityTimelineProjectActivityType["Build"] = "BUILD";
|
|
@@ -233,6 +237,8 @@ var BuildResourceClass;
|
|
|
233
237
|
BuildResourceClass["IosMLarge"] = "IOS_M_LARGE";
|
|
234
238
|
BuildResourceClass["IosMMedium"] = "IOS_M_MEDIUM";
|
|
235
239
|
BuildResourceClass["Legacy"] = "LEGACY";
|
|
240
|
+
BuildResourceClass["LinuxLarge"] = "LINUX_LARGE";
|
|
241
|
+
BuildResourceClass["LinuxMedium"] = "LINUX_MEDIUM";
|
|
236
242
|
})(BuildResourceClass || (exports.BuildResourceClass = BuildResourceClass = {}));
|
|
237
243
|
var BuildRetryDisabledReason;
|
|
238
244
|
(function (BuildRetryDisabledReason) {
|
|
@@ -340,25 +346,25 @@ var EasTotalPlanEnablementUnit;
|
|
|
340
346
|
})(EasTotalPlanEnablementUnit || (exports.EasTotalPlanEnablementUnit = EasTotalPlanEnablementUnit = {}));
|
|
341
347
|
var EntityTypeName;
|
|
342
348
|
(function (EntityTypeName) {
|
|
343
|
-
EntityTypeName["
|
|
344
|
-
EntityTypeName["
|
|
345
|
-
EntityTypeName["
|
|
346
|
-
EntityTypeName["
|
|
347
|
-
EntityTypeName["
|
|
348
|
-
EntityTypeName["
|
|
349
|
-
EntityTypeName["
|
|
350
|
-
EntityTypeName["
|
|
351
|
-
EntityTypeName["
|
|
352
|
-
EntityTypeName["
|
|
353
|
-
EntityTypeName["
|
|
354
|
-
EntityTypeName["
|
|
355
|
-
EntityTypeName["
|
|
356
|
-
EntityTypeName["
|
|
357
|
-
EntityTypeName["
|
|
358
|
-
EntityTypeName["
|
|
359
|
-
EntityTypeName["
|
|
360
|
-
EntityTypeName["
|
|
361
|
-
EntityTypeName["
|
|
349
|
+
EntityTypeName["AccountEntity"] = "AccountEntity";
|
|
350
|
+
EntityTypeName["AccountSsoConfigurationEntity"] = "AccountSSOConfigurationEntity";
|
|
351
|
+
EntityTypeName["AndroidAppCredentialsEntity"] = "AndroidAppCredentialsEntity";
|
|
352
|
+
EntityTypeName["AndroidKeystoreEntity"] = "AndroidKeystoreEntity";
|
|
353
|
+
EntityTypeName["AppEntity"] = "AppEntity";
|
|
354
|
+
EntityTypeName["AppStoreConnectApiKeyEntity"] = "AppStoreConnectApiKeyEntity";
|
|
355
|
+
EntityTypeName["AppleDeviceEntity"] = "AppleDeviceEntity";
|
|
356
|
+
EntityTypeName["AppleDistributionCertificateEntity"] = "AppleDistributionCertificateEntity";
|
|
357
|
+
EntityTypeName["AppleProvisioningProfileEntity"] = "AppleProvisioningProfileEntity";
|
|
358
|
+
EntityTypeName["AppleTeamEntity"] = "AppleTeamEntity";
|
|
359
|
+
EntityTypeName["BranchEntity"] = "BranchEntity";
|
|
360
|
+
EntityTypeName["ChannelEntity"] = "ChannelEntity";
|
|
361
|
+
EntityTypeName["CustomerEntity"] = "CustomerEntity";
|
|
362
|
+
EntityTypeName["GoogleServiceAccountKeyEntity"] = "GoogleServiceAccountKeyEntity";
|
|
363
|
+
EntityTypeName["IosAppCredentialsEntity"] = "IosAppCredentialsEntity";
|
|
364
|
+
EntityTypeName["UserInvitationEntity"] = "UserInvitationEntity";
|
|
365
|
+
EntityTypeName["UserPermissionEntity"] = "UserPermissionEntity";
|
|
366
|
+
EntityTypeName["WorkflowEntity"] = "WorkflowEntity";
|
|
367
|
+
EntityTypeName["WorkflowRevisionEntity"] = "WorkflowRevisionEntity";
|
|
362
368
|
})(EntityTypeName || (exports.EntityTypeName = EntityTypeName = {}));
|
|
363
369
|
var EnvironmentSecretType;
|
|
364
370
|
(function (EnvironmentSecretType) {
|
|
@@ -495,6 +501,8 @@ var MailchimpAudience;
|
|
|
495
501
|
(function (MailchimpAudience) {
|
|
496
502
|
MailchimpAudience["ExpoDevelopers"] = "EXPO_DEVELOPERS";
|
|
497
503
|
MailchimpAudience["ExpoDeveloperOnboarding"] = "EXPO_DEVELOPER_ONBOARDING";
|
|
504
|
+
MailchimpAudience["LaunchParty_2024"] = "LAUNCH_PARTY_2024";
|
|
505
|
+
MailchimpAudience["NonprodExpoDevelopers"] = "NONPROD_EXPO_DEVELOPERS";
|
|
498
506
|
})(MailchimpAudience || (exports.MailchimpAudience = MailchimpAudience = {}));
|
|
499
507
|
var MailchimpTag;
|
|
500
508
|
(function (MailchimpTag) {
|
|
@@ -776,15 +784,15 @@ var UserAgentOs;
|
|
|
776
784
|
})(UserAgentOs || (exports.UserAgentOs = UserAgentOs = {}));
|
|
777
785
|
var UserEntityTypeName;
|
|
778
786
|
(function (UserEntityTypeName) {
|
|
779
|
-
UserEntityTypeName["
|
|
780
|
-
UserEntityTypeName["
|
|
781
|
-
UserEntityTypeName["
|
|
782
|
-
UserEntityTypeName["
|
|
783
|
-
UserEntityTypeName["
|
|
784
|
-
UserEntityTypeName["
|
|
785
|
-
UserEntityTypeName["
|
|
786
|
-
UserEntityTypeName["
|
|
787
|
-
UserEntityTypeName["
|
|
787
|
+
UserEntityTypeName["AccessTokenEntity"] = "AccessTokenEntity";
|
|
788
|
+
UserEntityTypeName["DiscordUserEntity"] = "DiscordUserEntity";
|
|
789
|
+
UserEntityTypeName["GitHubUserEntity"] = "GitHubUserEntity";
|
|
790
|
+
UserEntityTypeName["PasswordEntity"] = "PasswordEntity";
|
|
791
|
+
UserEntityTypeName["SsoUserEntity"] = "SSOUserEntity";
|
|
792
|
+
UserEntityTypeName["UserEntity"] = "UserEntity";
|
|
793
|
+
UserEntityTypeName["UserPermissionEntity"] = "UserPermissionEntity";
|
|
794
|
+
UserEntityTypeName["UserSecondFactorBackupCodesEntity"] = "UserSecondFactorBackupCodesEntity";
|
|
795
|
+
UserEntityTypeName["UserSecondFactorDeviceEntity"] = "UserSecondFactorDeviceEntity";
|
|
788
796
|
})(UserEntityTypeName || (exports.UserEntityTypeName = UserEntityTypeName = {}));
|
|
789
797
|
var WebhookType;
|
|
790
798
|
(function (WebhookType) {
|
|
@@ -809,3 +817,36 @@ var WorkerLoggerLevel;
|
|
|
809
817
|
WorkerLoggerLevel["Trace"] = "TRACE";
|
|
810
818
|
WorkerLoggerLevel["Warn"] = "WARN";
|
|
811
819
|
})(WorkerLoggerLevel || (exports.WorkerLoggerLevel = WorkerLoggerLevel = {}));
|
|
820
|
+
var WorkflowJobStatus;
|
|
821
|
+
(function (WorkflowJobStatus) {
|
|
822
|
+
WorkflowJobStatus["ActionRequired"] = "ACTION_REQUIRED";
|
|
823
|
+
WorkflowJobStatus["Canceled"] = "CANCELED";
|
|
824
|
+
WorkflowJobStatus["Failure"] = "FAILURE";
|
|
825
|
+
WorkflowJobStatus["InProgress"] = "IN_PROGRESS";
|
|
826
|
+
WorkflowJobStatus["New"] = "NEW";
|
|
827
|
+
WorkflowJobStatus["Skipped"] = "SKIPPED";
|
|
828
|
+
WorkflowJobStatus["Success"] = "SUCCESS";
|
|
829
|
+
})(WorkflowJobStatus || (exports.WorkflowJobStatus = WorkflowJobStatus = {}));
|
|
830
|
+
var WorkflowJobType;
|
|
831
|
+
(function (WorkflowJobType) {
|
|
832
|
+
WorkflowJobType["AppleDeviceRegistrationRequest"] = "APPLE_DEVICE_REGISTRATION_REQUEST";
|
|
833
|
+
WorkflowJobType["Build"] = "BUILD";
|
|
834
|
+
WorkflowJobType["Custom"] = "CUSTOM";
|
|
835
|
+
WorkflowJobType["MaestroTest"] = "MAESTRO_TEST";
|
|
836
|
+
WorkflowJobType["RequireApproval"] = "REQUIRE_APPROVAL";
|
|
837
|
+
WorkflowJobType["Submission"] = "SUBMISSION";
|
|
838
|
+
WorkflowJobType["Update"] = "UPDATE";
|
|
839
|
+
})(WorkflowJobType || (exports.WorkflowJobType = WorkflowJobType = {}));
|
|
840
|
+
var WorkflowProjectSourceType;
|
|
841
|
+
(function (WorkflowProjectSourceType) {
|
|
842
|
+
WorkflowProjectSourceType["Gcs"] = "GCS";
|
|
843
|
+
})(WorkflowProjectSourceType || (exports.WorkflowProjectSourceType = WorkflowProjectSourceType = {}));
|
|
844
|
+
var WorkflowRunStatus;
|
|
845
|
+
(function (WorkflowRunStatus) {
|
|
846
|
+
WorkflowRunStatus["ActionRequired"] = "ACTION_REQUIRED";
|
|
847
|
+
WorkflowRunStatus["Canceled"] = "CANCELED";
|
|
848
|
+
WorkflowRunStatus["Failure"] = "FAILURE";
|
|
849
|
+
WorkflowRunStatus["InProgress"] = "IN_PROGRESS";
|
|
850
|
+
WorkflowRunStatus["New"] = "NEW";
|
|
851
|
+
WorkflowRunStatus["Success"] = "SUCCESS";
|
|
852
|
+
})(WorkflowRunStatus || (exports.WorkflowRunStatus = WorkflowRunStatus = {}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import { UploadSessionType } from '../generated';
|
|
2
|
+
import { AccountUploadSessionType, UploadSessionType } from '../generated';
|
|
3
3
|
export interface SignedUrl {
|
|
4
4
|
url: string;
|
|
5
5
|
headers: Record<string, string>;
|
|
@@ -7,4 +7,8 @@ export interface SignedUrl {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const UploadSessionMutation: {
|
|
9
9
|
createUploadSessionAsync(graphqlClient: ExpoGraphqlClient, type: UploadSessionType): Promise<SignedUrl>;
|
|
10
|
+
createAccountScopedUploadSessionAsync(graphqlClient: ExpoGraphqlClient, { type, accountID, }: {
|
|
11
|
+
type: AccountUploadSessionType;
|
|
12
|
+
accountID: string;
|
|
13
|
+
}): Promise<SignedUrl>;
|
|
10
14
|
};
|
|
@@ -19,4 +19,22 @@ exports.UploadSessionMutation = {
|
|
|
19
19
|
.toPromise());
|
|
20
20
|
return data.uploadSession.createUploadSession;
|
|
21
21
|
},
|
|
22
|
+
async createAccountScopedUploadSessionAsync(graphqlClient, { type, accountID, }) {
|
|
23
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
24
|
+
.mutation((0, graphql_tag_1.default) `
|
|
25
|
+
mutation CreateAccountScopedUploadSessionMutation(
|
|
26
|
+
$accountID: ID!
|
|
27
|
+
$type: AccountUploadSessionType!
|
|
28
|
+
) {
|
|
29
|
+
uploadSession {
|
|
30
|
+
createAccountScopedUploadSession(accountID: $accountID, type: $type)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`, {
|
|
34
|
+
type,
|
|
35
|
+
accountID,
|
|
36
|
+
})
|
|
37
|
+
.toPromise());
|
|
38
|
+
return data.uploadSession.createAccountScopedUploadSession;
|
|
39
|
+
},
|
|
22
40
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
+
import { WorkflowRevisionInput, WorkflowRunInput } from '../generated';
|
|
3
|
+
export declare namespace WorkflowRunMutation {
|
|
4
|
+
function createWorkflowRunAsync(graphqlClient: ExpoGraphqlClient, { appId, workflowRevisionInput, workflowRunInput, }: {
|
|
5
|
+
appId: string;
|
|
6
|
+
workflowRevisionInput: WorkflowRevisionInput;
|
|
7
|
+
workflowRunInput: WorkflowRunInput;
|
|
8
|
+
}): Promise<{
|
|
9
|
+
id: string;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowRunMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
|
+
const client_1 = require("../client");
|
|
7
|
+
var WorkflowRunMutation;
|
|
8
|
+
(function (WorkflowRunMutation) {
|
|
9
|
+
async function createWorkflowRunAsync(graphqlClient, { appId, workflowRevisionInput, workflowRunInput, }) {
|
|
10
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
11
|
+
.mutation((0, graphql_tag_1.default) `
|
|
12
|
+
mutation CreateWorkflowRun(
|
|
13
|
+
$appId: ID!
|
|
14
|
+
$workflowRevisionInput: WorkflowRevisionInput!
|
|
15
|
+
$workflowRunInput: WorkflowRunInput!
|
|
16
|
+
) {
|
|
17
|
+
workflowRun {
|
|
18
|
+
createWorkflowRun(
|
|
19
|
+
appId: $appId
|
|
20
|
+
workflowRevisionInput: $workflowRevisionInput
|
|
21
|
+
workflowRunInput: $workflowRunInput
|
|
22
|
+
) {
|
|
23
|
+
id
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
`, {
|
|
28
|
+
appId,
|
|
29
|
+
workflowRevisionInput,
|
|
30
|
+
workflowRunInput,
|
|
31
|
+
})
|
|
32
|
+
.toPromise());
|
|
33
|
+
return { id: data.workflowRun.createWorkflowRun.id };
|
|
34
|
+
}
|
|
35
|
+
WorkflowRunMutation.createWorkflowRunAsync = createWorkflowRunAsync;
|
|
36
|
+
})(WorkflowRunMutation || (exports.WorkflowRunMutation = WorkflowRunMutation = {}));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FingerprintSource } from '@expo/eas-build-job';
|
|
2
2
|
import { LocalBuildMode } from '../build/local';
|
|
3
3
|
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
4
|
-
export declare function maybeUploadFingerprintAsync({
|
|
5
|
-
|
|
4
|
+
export declare function maybeUploadFingerprintAsync({ hash, fingerprint, graphqlClient, localBuildMode, }: {
|
|
5
|
+
hash: string;
|
|
6
6
|
fingerprint: {
|
|
7
7
|
fingerprintSources: object[];
|
|
8
8
|
isDebugFingerprintSource: boolean;
|
|
@@ -10,6 +10,6 @@ export declare function maybeUploadFingerprintAsync({ runtimeVersion, fingerprin
|
|
|
10
10
|
graphqlClient: ExpoGraphqlClient;
|
|
11
11
|
localBuildMode?: LocalBuildMode;
|
|
12
12
|
}): Promise<{
|
|
13
|
-
|
|
13
|
+
hash: string;
|
|
14
14
|
fingerprintSource?: FingerprintSource;
|
|
15
15
|
}>;
|
|
@@ -11,16 +11,16 @@ const generated_1 = require("../graphql/generated");
|
|
|
11
11
|
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
12
12
|
const uploads_1 = require("../uploads");
|
|
13
13
|
const paths_1 = require("../utils/paths");
|
|
14
|
-
async function maybeUploadFingerprintAsync({
|
|
14
|
+
async function maybeUploadFingerprintAsync({ hash, fingerprint, graphqlClient, localBuildMode, }) {
|
|
15
15
|
await fs_extra_1.default.mkdirp((0, paths_1.getTmpDirectory)());
|
|
16
16
|
const fingerprintLocation = path_1.default.join((0, paths_1.getTmpDirectory)(), `${(0, uuid_1.v4)()}-runtime-fingerprint.json`);
|
|
17
17
|
await fs_extra_1.default.writeJSON(fingerprintLocation, {
|
|
18
|
-
hash
|
|
18
|
+
hash,
|
|
19
19
|
sources: fingerprint.fingerprintSources,
|
|
20
20
|
});
|
|
21
21
|
if (localBuildMode === local_1.LocalBuildMode.LOCAL_BUILD_PLUGIN) {
|
|
22
22
|
return {
|
|
23
|
-
|
|
23
|
+
hash,
|
|
24
24
|
fingerprintSource: {
|
|
25
25
|
type: eas_build_job_1.FingerprintSourceType.PATH,
|
|
26
26
|
path: fingerprintLocation,
|
|
@@ -39,14 +39,14 @@ async function maybeUploadFingerprintAsync({ runtimeVersion, fingerprint, graphq
|
|
|
39
39
|
}
|
|
40
40
|
log_1.default.warn(errMessage);
|
|
41
41
|
return {
|
|
42
|
-
|
|
42
|
+
hash,
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
finally {
|
|
46
46
|
await fs_extra_1.default.remove(fingerprintLocation);
|
|
47
47
|
}
|
|
48
48
|
return {
|
|
49
|
-
|
|
49
|
+
hash,
|
|
50
50
|
fingerprintSource: {
|
|
51
51
|
type: eas_build_job_1.FingerprintSourceType.GCS,
|
|
52
52
|
bucketKey: fingerprintGCSBucketKey,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
+
/**
|
|
3
|
+
* Uploads the `eas.json` file to GCS as account-scoped object.
|
|
4
|
+
* Used in workflows. Takes care of logging progress.
|
|
5
|
+
*/
|
|
6
|
+
export declare function uploadAccountScopedEasJsonAsync({ graphqlClient, accountId, projectDir, }: {
|
|
7
|
+
graphqlClient: ExpoGraphqlClient;
|
|
8
|
+
accountId: string;
|
|
9
|
+
projectDir: string;
|
|
10
|
+
}): Promise<{
|
|
11
|
+
easJsonBucketKey: string;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uploadAccountScopedEasJsonAsync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
+
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
7
|
+
const node_path_1 = tslib_1.__importDefault(require("node:path"));
|
|
8
|
+
const generated_1 = require("../graphql/generated");
|
|
9
|
+
const uploads_1 = require("../uploads");
|
|
10
|
+
const files_1 = require("../utils/files");
|
|
11
|
+
const progress_1 = require("../utils/progress");
|
|
12
|
+
/**
|
|
13
|
+
* Uploads the `eas.json` file to GCS as account-scoped object.
|
|
14
|
+
* Used in workflows. Takes care of logging progress.
|
|
15
|
+
*/
|
|
16
|
+
async function uploadAccountScopedEasJsonAsync({ graphqlClient, accountId, projectDir, }) {
|
|
17
|
+
const easJsonFilePath = node_path_1.default.join(projectDir, 'eas.json');
|
|
18
|
+
const easJsonFileStat = await node_fs_1.default.promises.stat(easJsonFilePath);
|
|
19
|
+
if (easJsonFileStat.size > 1024 * 1024) {
|
|
20
|
+
throw new Error('eas.json is too big. Maximum allowed size is 1MB.');
|
|
21
|
+
}
|
|
22
|
+
const easJsonBucketKey = await (0, uploads_1.uploadAccountScopedFileAtPathToGCSAsync)(graphqlClient, {
|
|
23
|
+
accountId,
|
|
24
|
+
type: generated_1.AccountUploadSessionType.WorkflowsProjectSources,
|
|
25
|
+
path: easJsonFilePath,
|
|
26
|
+
handleProgressEvent: (0, progress_1.createProgressTracker)({
|
|
27
|
+
total: easJsonFileStat.size,
|
|
28
|
+
message: ratio => `Uploading eas.json to EAS (${(0, files_1.formatBytes)(easJsonFileStat.size * ratio)} / ${(0, files_1.formatBytes)(easJsonFileStat.size)})`,
|
|
29
|
+
completedMessage: (duration) => `Uploaded eas.json to EAS ${chalk_1.default.dim(duration)}`,
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
32
|
+
return { easJsonBucketKey };
|
|
33
|
+
}
|
|
34
|
+
exports.uploadAccountScopedEasJsonAsync = uploadAccountScopedEasJsonAsync;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
+
import { Client } from '../vcs/vcs';
|
|
3
|
+
/**
|
|
4
|
+
* Archives the project and uploads it to GCS as account-scoped object.
|
|
5
|
+
* Used in workflows. Takes care of logging progress and cleaning up the tarball.
|
|
6
|
+
*/
|
|
7
|
+
export declare function uploadAccountScopedProjectSourceAsync({ graphqlClient, vcsClient, accountId, }: {
|
|
8
|
+
graphqlClient: ExpoGraphqlClient;
|
|
9
|
+
vcsClient: Client;
|
|
10
|
+
accountId: string;
|
|
11
|
+
}): Promise<{
|
|
12
|
+
projectArchiveBucketKey: string;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uploadAccountScopedProjectSourceAsync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
+
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
7
|
+
const repository_1 = require("../build/utils/repository");
|
|
8
|
+
const generated_1 = require("../graphql/generated");
|
|
9
|
+
const log_1 = tslib_1.__importStar(require("../log"));
|
|
10
|
+
const uploads_1 = require("../uploads");
|
|
11
|
+
const files_1 = require("../utils/files");
|
|
12
|
+
const progress_1 = require("../utils/progress");
|
|
13
|
+
/**
|
|
14
|
+
* Archives the project and uploads it to GCS as account-scoped object.
|
|
15
|
+
* Used in workflows. Takes care of logging progress and cleaning up the tarball.
|
|
16
|
+
*/
|
|
17
|
+
async function uploadAccountScopedProjectSourceAsync({ graphqlClient, vcsClient, accountId, }) {
|
|
18
|
+
let projectTarballPath;
|
|
19
|
+
try {
|
|
20
|
+
log_1.default.newLine();
|
|
21
|
+
log_1.default.log(`Compressing project files and uploading to EAS. ${(0, log_1.learnMore)('https://expo.fyi/eas-build-archive')}`);
|
|
22
|
+
const projectTarball = await (0, repository_1.makeProjectTarballAsync)(vcsClient);
|
|
23
|
+
projectTarballPath = projectTarball.path;
|
|
24
|
+
if (projectTarball.size > 1024 * 1024 * 100) {
|
|
25
|
+
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')}`);
|
|
26
|
+
}
|
|
27
|
+
if (projectTarball.size > 2 * 1024 * 1024 * 1024) {
|
|
28
|
+
throw new Error('Project archive is too big. Maximum allowed size is 2GB.');
|
|
29
|
+
}
|
|
30
|
+
const projectArchiveBucketKey = await (0, uploads_1.uploadAccountScopedFileAtPathToGCSAsync)(graphqlClient, {
|
|
31
|
+
accountId,
|
|
32
|
+
type: generated_1.AccountUploadSessionType.WorkflowsProjectSources,
|
|
33
|
+
path: projectTarball.path,
|
|
34
|
+
handleProgressEvent: (0, progress_1.createProgressTracker)({
|
|
35
|
+
total: projectTarball.size,
|
|
36
|
+
message: ratio => `Uploading project archive to EAS (${(0, files_1.formatBytes)(projectTarball.size * ratio)} / ${(0, files_1.formatBytes)(projectTarball.size)})`,
|
|
37
|
+
completedMessage: (duration) => `Uploaded project archive to EAS ${chalk_1.default.dim(duration)}`,
|
|
38
|
+
}),
|
|
39
|
+
});
|
|
40
|
+
return { projectArchiveBucketKey };
|
|
41
|
+
}
|
|
42
|
+
finally {
|
|
43
|
+
if (projectTarballPath) {
|
|
44
|
+
await node_fs_1.default.promises.rm(projectTarballPath);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.uploadAccountScopedProjectSourceAsync = uploadAccountScopedProjectSourceAsync;
|
package/build/uploads.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { Response } from 'node-fetch';
|
|
2
2
|
import { ExpoGraphqlClient } from './commandUtils/context/contextUtils/createGraphqlClient';
|
|
3
|
-
import { UploadSessionType } from './graphql/generated';
|
|
3
|
+
import { AccountUploadSessionType, UploadSessionType } from './graphql/generated';
|
|
4
4
|
import { ProgressHandler } from './utils/progress';
|
|
5
5
|
export interface PresignedPost {
|
|
6
6
|
url: string;
|
|
7
7
|
fields: Record<string, string>;
|
|
8
8
|
}
|
|
9
9
|
export declare function uploadFileAtPathToGCSAsync(graphqlClient: ExpoGraphqlClient, type: UploadSessionType, path: string, handleProgressEvent?: ProgressHandler): Promise<string>;
|
|
10
|
+
export declare function uploadAccountScopedFileAtPathToGCSAsync(graphqlClient: ExpoGraphqlClient, { type, accountId, path, handleProgressEvent, }: {
|
|
11
|
+
type: AccountUploadSessionType;
|
|
12
|
+
accountId: string;
|
|
13
|
+
path: string;
|
|
14
|
+
handleProgressEvent: ProgressHandler;
|
|
15
|
+
}): Promise<string>;
|
|
10
16
|
export declare function uploadWithPresignedPostWithRetryAsync(file: string, presignedPost: PresignedPost, onAssetUploadBegin: () => void): Promise<Response>;
|
package/build/uploads.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.uploadWithPresignedPostWithRetryAsync = exports.uploadFileAtPathToGCSAsync = void 0;
|
|
3
|
+
exports.uploadWithPresignedPostWithRetryAsync = exports.uploadAccountScopedFileAtPathToGCSAsync = exports.uploadFileAtPathToGCSAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const form_data_1 = tslib_1.__importDefault(require("form-data"));
|
|
6
6
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
@@ -13,6 +13,12 @@ async function uploadFileAtPathToGCSAsync(graphqlClient, type, path, handleProgr
|
|
|
13
13
|
return signedUrl.bucketKey;
|
|
14
14
|
}
|
|
15
15
|
exports.uploadFileAtPathToGCSAsync = uploadFileAtPathToGCSAsync;
|
|
16
|
+
async function uploadAccountScopedFileAtPathToGCSAsync(graphqlClient, { type, accountId, path, handleProgressEvent, }) {
|
|
17
|
+
const signedUrl = await UploadSessionMutation_1.UploadSessionMutation.createAccountScopedUploadSessionAsync(graphqlClient, { type, accountID: accountId });
|
|
18
|
+
await uploadWithSignedUrlWithProgressAsync(path, signedUrl, handleProgressEvent);
|
|
19
|
+
return signedUrl.bucketKey;
|
|
20
|
+
}
|
|
21
|
+
exports.uploadAccountScopedFileAtPathToGCSAsync = uploadAccountScopedFileAtPathToGCSAsync;
|
|
16
22
|
async function uploadWithPresignedPostWithRetryAsync(file, presignedPost, onAssetUploadBegin) {
|
|
17
23
|
return await (0, promise_retry_1.default)(async (retry) => {
|
|
18
24
|
// retry fetch errors (usually connection or DNS errors)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Env, Workflow } from '@expo/eas-build-job';
|
|
2
|
+
export declare function createFingerprintAsync(projectDir: string, options: {
|
|
3
|
+
workflow: Workflow;
|
|
4
|
+
platform: string;
|
|
5
|
+
debug?: boolean;
|
|
6
|
+
env: Env | undefined;
|
|
7
|
+
cwd?: string;
|
|
8
|
+
}): Promise<{
|
|
9
|
+
hash: string;
|
|
10
|
+
sources: object[];
|
|
11
|
+
isDebugSource: boolean;
|
|
12
|
+
} | null>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createFingerprintAsync = void 0;
|
|
4
|
+
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
5
|
+
const resolve_from_1 = require("resolve-from");
|
|
6
|
+
async function createFingerprintAsync(projectDir, options) {
|
|
7
|
+
// @expo/fingerprint is exported in the expo package for SDK 52+
|
|
8
|
+
const fingerprintPath = (0, resolve_from_1.silent)(projectDir, 'expo/fingerprint');
|
|
9
|
+
if (!fingerprintPath) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
const Fingerprint = require(fingerprintPath);
|
|
13
|
+
const fingerprintOptions = {};
|
|
14
|
+
if (options.platform) {
|
|
15
|
+
fingerprintOptions.platforms = [options.platform];
|
|
16
|
+
}
|
|
17
|
+
if (options.workflow === eas_build_job_1.Workflow.MANAGED) {
|
|
18
|
+
fingerprintOptions.ignorePaths = ['android/**/*', 'ios/**/*'];
|
|
19
|
+
}
|
|
20
|
+
if (options.debug) {
|
|
21
|
+
fingerprintOptions.debug = true;
|
|
22
|
+
}
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/return-await
|
|
24
|
+
return await Fingerprint.createFingerprintAsync(projectDir, fingerprintOptions);
|
|
25
|
+
}
|
|
26
|
+
exports.createFingerprintAsync = createFingerprintAsync;
|
package/build/utils/progress.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createProgressTracker = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
+
const node_crypto_1 = require("node:crypto");
|
|
6
7
|
const timer_1 = require("./timer");
|
|
7
8
|
const ora_1 = require("../ora");
|
|
8
9
|
function createProgressTracker({ total, message, completedMessage, }) {
|
|
@@ -10,7 +11,7 @@ function createProgressTracker({ total, message, completedMessage, }) {
|
|
|
10
11
|
let calcTotal = total ?? 0;
|
|
11
12
|
let transferredSoFar = 0;
|
|
12
13
|
let current = 0;
|
|
13
|
-
const timerLabel = String(
|
|
14
|
+
const timerLabel = String((0, node_crypto_1.randomUUID)());
|
|
14
15
|
const getMessage = (v, total) => {
|
|
15
16
|
const ratio = Math.min(Math.max(v, 0), 1);
|
|
16
17
|
const percent = Math.floor(ratio * 100);
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "13.
|
|
2
|
+
"version": "13.1.1",
|
|
3
3
|
"commands": {
|
|
4
4
|
"analytics": {
|
|
5
5
|
"id": "analytics",
|
|
@@ -3807,6 +3807,56 @@
|
|
|
3807
3807
|
"loggedIn": {}
|
|
3808
3808
|
}
|
|
3809
3809
|
},
|
|
3810
|
+
"workflow:run": {
|
|
3811
|
+
"id": "workflow:run",
|
|
3812
|
+
"description": "Run an EAS workflow",
|
|
3813
|
+
"strict": true,
|
|
3814
|
+
"pluginName": "eas-cli",
|
|
3815
|
+
"pluginAlias": "eas-cli",
|
|
3816
|
+
"pluginType": "core",
|
|
3817
|
+
"hidden": true,
|
|
3818
|
+
"state": "beta",
|
|
3819
|
+
"aliases": [],
|
|
3820
|
+
"flags": {
|
|
3821
|
+
"non-interactive": {
|
|
3822
|
+
"name": "non-interactive",
|
|
3823
|
+
"type": "boolean",
|
|
3824
|
+
"description": "Run the command in non-interactive mode.",
|
|
3825
|
+
"allowNo": false
|
|
3826
|
+
}
|
|
3827
|
+
},
|
|
3828
|
+
"args": {
|
|
3829
|
+
"file": {
|
|
3830
|
+
"name": "file",
|
|
3831
|
+
"description": "Path to the workflow file to run"
|
|
3832
|
+
}
|
|
3833
|
+
},
|
|
3834
|
+
"contextDefinition": {
|
|
3835
|
+
"getDynamicPublicProjectConfigAsync": {},
|
|
3836
|
+
"getDynamicPrivateProjectConfigAsync": {},
|
|
3837
|
+
"projectDir": {},
|
|
3838
|
+
"vcsClient": {},
|
|
3839
|
+
"loggedIn": {}
|
|
3840
|
+
}
|
|
3841
|
+
},
|
|
3842
|
+
"workflow:validate": {
|
|
3843
|
+
"id": "workflow:validate",
|
|
3844
|
+
"description": "validate a workflow configuration yaml file",
|
|
3845
|
+
"strict": true,
|
|
3846
|
+
"pluginName": "eas-cli",
|
|
3847
|
+
"pluginAlias": "eas-cli",
|
|
3848
|
+
"pluginType": "core",
|
|
3849
|
+
"hidden": true,
|
|
3850
|
+
"aliases": [],
|
|
3851
|
+
"flags": {},
|
|
3852
|
+
"args": {
|
|
3853
|
+
"path": {
|
|
3854
|
+
"name": "path",
|
|
3855
|
+
"description": "Path to the workflow configuration YAML file (must end with .yml or .yaml)",
|
|
3856
|
+
"required": true
|
|
3857
|
+
}
|
|
3858
|
+
}
|
|
3859
|
+
},
|
|
3810
3860
|
"build:version:get": {
|
|
3811
3861
|
"id": "build:version:get",
|
|
3812
3862
|
"description": "get the latest version from EAS servers",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eas-cli",
|
|
3
3
|
"description": "EAS command line tool",
|
|
4
|
-
"version": "13.
|
|
4
|
+
"version": "13.1.1",
|
|
5
5
|
"author": "Expo <support@expo.dev>",
|
|
6
6
|
"bin": {
|
|
7
7
|
"eas": "./bin/run"
|
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
"untildify": "4.0.0",
|
|
87
87
|
"uuid": "9.0.1",
|
|
88
88
|
"wrap-ansi": "7.0.0",
|
|
89
|
+
"yaml": "2.6.0",
|
|
89
90
|
"zod": "^3.23.8"
|
|
90
91
|
},
|
|
91
92
|
"devDependencies": {
|
|
@@ -227,5 +228,5 @@
|
|
|
227
228
|
"node": "20.11.0",
|
|
228
229
|
"yarn": "1.22.21"
|
|
229
230
|
},
|
|
230
|
-
"gitHead": "
|
|
231
|
+
"gitHead": "a5d3ea8aba96da496376bb12090f25ed39f714b1"
|
|
231
232
|
}
|