eas-cli 13.3.0 → 13.4.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 +299 -165
- package/build/build/build.js +3 -3
- package/build/build/evaluateConfigWithEnvVarsAsync.js +18 -2
- package/build/commandUtils/flags.d.ts +5 -4
- package/build/commandUtils/flags.js +6 -8
- package/build/commands/env/create.d.ts +6 -6
- package/build/commands/env/create.js +27 -28
- package/build/commands/env/delete.d.ts +5 -5
- package/build/commands/env/delete.js +15 -13
- package/build/commands/env/exec.d.ts +0 -1
- package/build/commands/env/exec.js +1 -2
- package/build/commands/env/get.d.ts +5 -5
- package/build/commands/env/get.js +16 -13
- package/build/commands/env/link.d.ts +1 -1
- package/build/commands/env/link.js +12 -13
- package/build/commands/env/list.d.ts +5 -5
- package/build/commands/env/list.js +14 -12
- package/build/commands/env/pull.d.ts +1 -2
- package/build/commands/env/pull.js +8 -9
- package/build/commands/env/push.d.ts +1 -2
- package/build/commands/env/push.js +9 -10
- package/build/commands/env/unlink.d.ts +1 -1
- package/build/commands/env/unlink.js +11 -10
- package/build/commands/env/update.d.ts +6 -6
- package/build/commands/env/update.js +18 -15
- package/build/commands/secret/create.d.ts +1 -0
- package/build/commands/secret/create.js +3 -0
- package/build/commands/secret/delete.d.ts +1 -0
- package/build/commands/secret/delete.js +3 -0
- package/build/commands/secret/list.d.ts +1 -0
- package/build/commands/secret/list.js +3 -0
- package/build/commands/secret/push.d.ts +1 -0
- package/build/commands/secret/push.js +3 -0
- package/build/commands/update/index.js +19 -2
- package/build/graphql/generated.d.ts +140 -26
- package/build/graphql/generated.js +2 -0
- package/build/graphql/mutations/EnvironmentVariableMutation.d.ts +1 -0
- package/build/graphql/types/Update.js +9 -0
- package/build/project/publish.d.ts +23 -1
- package/build/project/publish.js +71 -11
- package/build/project/resolveRuntimeVersionAsync.d.ts +2 -0
- package/build/project/resolveRuntimeVersionAsync.js +4 -0
- package/build/update/republish.js +19 -0
- package/build/utils/expodash/mapMapAsync.d.ts +1 -0
- package/build/utils/expodash/mapMapAsync.js +12 -0
- package/build/utils/fingerprintCli.d.ts +21 -3
- package/build/utils/fingerprintCli.js +62 -13
- package/build/utils/prompts.d.ts +1 -1
- package/build/utils/prompts.js +1 -1
- package/oclif.manifest.json +43 -48
- package/package.json +7 -4
|
@@ -2878,11 +2878,6 @@ export type CreateIosSubmissionInput = {
|
|
|
2878
2878
|
config: IosSubmissionConfigInput;
|
|
2879
2879
|
submittedBuildId?: InputMaybe<Scalars['ID']['input']>;
|
|
2880
2880
|
};
|
|
2881
|
-
export type CreateServerlessFunctionUploadUrlResult = {
|
|
2882
|
-
__typename?: 'CreateServerlessFunctionUploadUrlResult';
|
|
2883
|
-
formDataFields: Scalars['JSONObject']['output'];
|
|
2884
|
-
url: Scalars['String']['output'];
|
|
2885
|
-
};
|
|
2886
2881
|
export type CreateSharedEnvironmentVariableInput = {
|
|
2887
2882
|
environments?: InputMaybe<Array<EnvironmentVariableEnvironment>>;
|
|
2888
2883
|
fileName?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -3074,10 +3069,6 @@ export type DeleteWorkerDeploymentResult = {
|
|
|
3074
3069
|
deploymentIdentifier: Scalars['WorkerDeploymentIdentifier']['output'];
|
|
3075
3070
|
id: Scalars['ID']['output'];
|
|
3076
3071
|
};
|
|
3077
|
-
export type DeployServerlessFunctionResult = {
|
|
3078
|
-
__typename?: 'DeployServerlessFunctionResult';
|
|
3079
|
-
url: Scalars['String']['output'];
|
|
3080
|
-
};
|
|
3081
3072
|
/** Represents a Deployment - a set of Builds with the same Runtime Version and Channel */
|
|
3082
3073
|
export type Deployment = {
|
|
3083
3074
|
__typename?: 'Deployment';
|
|
@@ -3524,6 +3515,7 @@ export type Fingerprint = {
|
|
|
3524
3515
|
debugInfoUrl?: Maybe<Scalars['String']['output']>;
|
|
3525
3516
|
hash: Scalars['String']['output'];
|
|
3526
3517
|
id: Scalars['ID']['output'];
|
|
3518
|
+
source?: Maybe<FingerprintSource>;
|
|
3527
3519
|
updatedAt: Scalars['DateTime']['output'];
|
|
3528
3520
|
};
|
|
3529
3521
|
export type FingerprintInfo = {
|
|
@@ -3535,6 +3527,12 @@ export type FingerprintInfoGroup = {
|
|
|
3535
3527
|
ios?: InputMaybe<FingerprintInfo>;
|
|
3536
3528
|
web?: InputMaybe<FingerprintInfo>;
|
|
3537
3529
|
};
|
|
3530
|
+
export type FingerprintSource = {
|
|
3531
|
+
__typename?: 'FingerprintSource';
|
|
3532
|
+
bucketKey: Scalars['String']['output'];
|
|
3533
|
+
isDebugFingerprint?: Maybe<Scalars['Boolean']['output']>;
|
|
3534
|
+
type: FingerprintSourceType;
|
|
3535
|
+
};
|
|
3538
3536
|
export type FingerprintSourceInput = {
|
|
3539
3537
|
bucketKey?: InputMaybe<Scalars['String']['input']>;
|
|
3540
3538
|
isDebugFingerprint?: InputMaybe<Scalars['Boolean']['input']>;
|
|
@@ -4835,7 +4833,6 @@ export type RootMutation = {
|
|
|
4835
4833
|
notificationSubscription: NotificationSubscriptionMutation;
|
|
4836
4834
|
/** Mutations that create, update, and delete Robots */
|
|
4837
4835
|
robot: RobotMutation;
|
|
4838
|
-
serverlessFunction: ServerlessFunctionMutation;
|
|
4839
4836
|
/** Mutations that modify an EAS Submit submission */
|
|
4840
4837
|
submission: SubmissionMutation;
|
|
4841
4838
|
update: UpdateMutation;
|
|
@@ -5185,22 +5182,6 @@ export type SecondFactorRegenerateBackupCodesResult = {
|
|
|
5185
5182
|
__typename?: 'SecondFactorRegenerateBackupCodesResult';
|
|
5186
5183
|
plaintextBackupCodes: Array<Scalars['String']['output']>;
|
|
5187
5184
|
};
|
|
5188
|
-
export type ServerlessFunctionIdentifierInput = {
|
|
5189
|
-
gitCommitSHA1: Scalars['String']['input'];
|
|
5190
|
-
};
|
|
5191
|
-
export type ServerlessFunctionMutation = {
|
|
5192
|
-
__typename?: 'ServerlessFunctionMutation';
|
|
5193
|
-
createDeployment: DeployServerlessFunctionResult;
|
|
5194
|
-
createUploadPresignedUrl: CreateServerlessFunctionUploadUrlResult;
|
|
5195
|
-
};
|
|
5196
|
-
export type ServerlessFunctionMutationCreateDeploymentArgs = {
|
|
5197
|
-
appId: Scalars['ID']['input'];
|
|
5198
|
-
serverlessFunctionIdentifierInput: ServerlessFunctionIdentifierInput;
|
|
5199
|
-
};
|
|
5200
|
-
export type ServerlessFunctionMutationCreateUploadPresignedUrlArgs = {
|
|
5201
|
-
appId: Scalars['ID']['input'];
|
|
5202
|
-
serverlessFunctionIdentifierInput: ServerlessFunctionIdentifierInput;
|
|
5203
|
-
};
|
|
5204
5185
|
export type Snack = Project & {
|
|
5205
5186
|
__typename?: 'Snack';
|
|
5206
5187
|
/** Description of the Snack */
|
|
@@ -6834,6 +6815,7 @@ export declare enum WorkflowJobStatus {
|
|
|
6834
6815
|
Failure = "FAILURE",
|
|
6835
6816
|
InProgress = "IN_PROGRESS",
|
|
6836
6817
|
New = "NEW",
|
|
6818
|
+
PendingCancel = "PENDING_CANCEL",
|
|
6837
6819
|
Skipped = "SKIPPED",
|
|
6838
6820
|
Success = "SUCCESS"
|
|
6839
6821
|
}
|
|
@@ -6907,6 +6889,7 @@ export type WorkflowRun = ActivityTimelineProjectActivity & {
|
|
|
6907
6889
|
activityTimestamp: Scalars['DateTime']['output'];
|
|
6908
6890
|
actor?: Maybe<Actor>;
|
|
6909
6891
|
createdAt: Scalars['DateTime']['output'];
|
|
6892
|
+
errors: Array<WorkflowRunError>;
|
|
6910
6893
|
gitCommitHash?: Maybe<Scalars['String']['output']>;
|
|
6911
6894
|
gitCommitMessage?: Maybe<Scalars['String']['output']>;
|
|
6912
6895
|
githubRepository?: Maybe<GitHubRepository>;
|
|
@@ -6926,13 +6909,22 @@ export type WorkflowRunEdge = {
|
|
|
6926
6909
|
cursor: Scalars['String']['output'];
|
|
6927
6910
|
node: WorkflowRun;
|
|
6928
6911
|
};
|
|
6912
|
+
export type WorkflowRunError = {
|
|
6913
|
+
__typename?: 'WorkflowRunError';
|
|
6914
|
+
message: Scalars['String']['output'];
|
|
6915
|
+
title?: Maybe<Scalars['String']['output']>;
|
|
6916
|
+
};
|
|
6929
6917
|
export type WorkflowRunInput = {
|
|
6930
6918
|
projectSource: WorkflowProjectSourceInput;
|
|
6931
6919
|
};
|
|
6932
6920
|
export type WorkflowRunMutation = {
|
|
6933
6921
|
__typename?: 'WorkflowRunMutation';
|
|
6922
|
+
cancelWorkflowRun: WorkflowRun;
|
|
6934
6923
|
createWorkflowRun: WorkflowRun;
|
|
6935
6924
|
};
|
|
6925
|
+
export type WorkflowRunMutationCancelWorkflowRunArgs = {
|
|
6926
|
+
workflowRunId: Scalars['ID']['input'];
|
|
6927
|
+
};
|
|
6936
6928
|
export type WorkflowRunMutationCreateWorkflowRunArgs = {
|
|
6937
6929
|
appId: Scalars['ID']['input'];
|
|
6938
6930
|
workflowRevisionInput: WorkflowRevisionInput;
|
|
@@ -6951,6 +6943,7 @@ export declare enum WorkflowRunStatus {
|
|
|
6951
6943
|
Failure = "FAILURE",
|
|
6952
6944
|
InProgress = "IN_PROGRESS",
|
|
6953
6945
|
New = "NEW",
|
|
6946
|
+
PendingCancel = "PENDING_CANCEL",
|
|
6954
6947
|
Success = "SUCCESS"
|
|
6955
6948
|
}
|
|
6956
6949
|
export type WorkflowRunsConnection = {
|
|
@@ -11393,6 +11386,17 @@ export type UpdatePublishMutation = {
|
|
|
11393
11386
|
__typename?: 'Update';
|
|
11394
11387
|
id: string;
|
|
11395
11388
|
} | null;
|
|
11389
|
+
fingerprint?: {
|
|
11390
|
+
__typename?: 'Fingerprint';
|
|
11391
|
+
id: string;
|
|
11392
|
+
hash: string;
|
|
11393
|
+
source?: {
|
|
11394
|
+
__typename?: 'FingerprintSource';
|
|
11395
|
+
type: FingerprintSourceType;
|
|
11396
|
+
bucketKey: string;
|
|
11397
|
+
isDebugFingerprint?: boolean | null;
|
|
11398
|
+
} | null;
|
|
11399
|
+
} | null;
|
|
11396
11400
|
}>;
|
|
11397
11401
|
};
|
|
11398
11402
|
};
|
|
@@ -11467,6 +11471,17 @@ export type SetRolloutPercentageMutation = {
|
|
|
11467
11471
|
__typename?: 'Update';
|
|
11468
11472
|
id: string;
|
|
11469
11473
|
} | null;
|
|
11474
|
+
fingerprint?: {
|
|
11475
|
+
__typename?: 'Fingerprint';
|
|
11476
|
+
id: string;
|
|
11477
|
+
hash: string;
|
|
11478
|
+
source?: {
|
|
11479
|
+
__typename?: 'FingerprintSource';
|
|
11480
|
+
type: FingerprintSourceType;
|
|
11481
|
+
bucketKey: string;
|
|
11482
|
+
isDebugFingerprint?: boolean | null;
|
|
11483
|
+
} | null;
|
|
11484
|
+
} | null;
|
|
11470
11485
|
};
|
|
11471
11486
|
};
|
|
11472
11487
|
};
|
|
@@ -11926,6 +11941,17 @@ export type BranchesByAppQuery = {
|
|
|
11926
11941
|
__typename?: 'Update';
|
|
11927
11942
|
id: string;
|
|
11928
11943
|
} | null;
|
|
11944
|
+
fingerprint?: {
|
|
11945
|
+
__typename?: 'Fingerprint';
|
|
11946
|
+
id: string;
|
|
11947
|
+
hash: string;
|
|
11948
|
+
source?: {
|
|
11949
|
+
__typename?: 'FingerprintSource';
|
|
11950
|
+
type: FingerprintSourceType;
|
|
11951
|
+
bucketKey: string;
|
|
11952
|
+
isDebugFingerprint?: boolean | null;
|
|
11953
|
+
} | null;
|
|
11954
|
+
} | null;
|
|
11929
11955
|
}>;
|
|
11930
11956
|
}>;
|
|
11931
11957
|
};
|
|
@@ -12028,6 +12054,17 @@ export type ViewBranchesOnUpdateChannelQuery = {
|
|
|
12028
12054
|
__typename?: 'Update';
|
|
12029
12055
|
id: string;
|
|
12030
12056
|
} | null;
|
|
12057
|
+
fingerprint?: {
|
|
12058
|
+
__typename?: 'Fingerprint';
|
|
12059
|
+
id: string;
|
|
12060
|
+
hash: string;
|
|
12061
|
+
source?: {
|
|
12062
|
+
__typename?: 'FingerprintSource';
|
|
12063
|
+
type: FingerprintSourceType;
|
|
12064
|
+
bucketKey: string;
|
|
12065
|
+
isDebugFingerprint?: boolean | null;
|
|
12066
|
+
} | null;
|
|
12067
|
+
} | null;
|
|
12031
12068
|
}>>;
|
|
12032
12069
|
}>;
|
|
12033
12070
|
} | null;
|
|
@@ -12372,6 +12409,17 @@ export type ViewUpdateChannelOnAppQuery = {
|
|
|
12372
12409
|
__typename?: 'Update';
|
|
12373
12410
|
id: string;
|
|
12374
12411
|
} | null;
|
|
12412
|
+
fingerprint?: {
|
|
12413
|
+
__typename?: 'Fingerprint';
|
|
12414
|
+
id: string;
|
|
12415
|
+
hash: string;
|
|
12416
|
+
source?: {
|
|
12417
|
+
__typename?: 'FingerprintSource';
|
|
12418
|
+
type: FingerprintSourceType;
|
|
12419
|
+
bucketKey: string;
|
|
12420
|
+
isDebugFingerprint?: boolean | null;
|
|
12421
|
+
} | null;
|
|
12422
|
+
} | null;
|
|
12375
12423
|
}>>;
|
|
12376
12424
|
}>;
|
|
12377
12425
|
} | null;
|
|
@@ -12443,6 +12491,17 @@ export type ViewUpdateChannelsOnAppQuery = {
|
|
|
12443
12491
|
__typename?: 'Update';
|
|
12444
12492
|
id: string;
|
|
12445
12493
|
} | null;
|
|
12494
|
+
fingerprint?: {
|
|
12495
|
+
__typename?: 'Fingerprint';
|
|
12496
|
+
id: string;
|
|
12497
|
+
hash: string;
|
|
12498
|
+
source?: {
|
|
12499
|
+
__typename?: 'FingerprintSource';
|
|
12500
|
+
type: FingerprintSourceType;
|
|
12501
|
+
bucketKey: string;
|
|
12502
|
+
isDebugFingerprint?: boolean | null;
|
|
12503
|
+
} | null;
|
|
12504
|
+
} | null;
|
|
12446
12505
|
}>>;
|
|
12447
12506
|
}>;
|
|
12448
12507
|
}>;
|
|
@@ -12892,6 +12951,17 @@ export type ViewUpdatesByGroupQuery = {
|
|
|
12892
12951
|
__typename?: 'Update';
|
|
12893
12952
|
id: string;
|
|
12894
12953
|
} | null;
|
|
12954
|
+
fingerprint?: {
|
|
12955
|
+
__typename?: 'Fingerprint';
|
|
12956
|
+
id: string;
|
|
12957
|
+
hash: string;
|
|
12958
|
+
source?: {
|
|
12959
|
+
__typename?: 'FingerprintSource';
|
|
12960
|
+
type: FingerprintSourceType;
|
|
12961
|
+
bucketKey: string;
|
|
12962
|
+
isDebugFingerprint?: boolean | null;
|
|
12963
|
+
} | null;
|
|
12964
|
+
} | null;
|
|
12895
12965
|
}>;
|
|
12896
12966
|
};
|
|
12897
12967
|
export type ViewUpdateGroupsOnBranchQueryVariables = Exact<{
|
|
@@ -12952,6 +13022,17 @@ export type ViewUpdateGroupsOnBranchQuery = {
|
|
|
12952
13022
|
__typename?: 'Update';
|
|
12953
13023
|
id: string;
|
|
12954
13024
|
} | null;
|
|
13025
|
+
fingerprint?: {
|
|
13026
|
+
__typename?: 'Fingerprint';
|
|
13027
|
+
id: string;
|
|
13028
|
+
hash: string;
|
|
13029
|
+
source?: {
|
|
13030
|
+
__typename?: 'FingerprintSource';
|
|
13031
|
+
type: FingerprintSourceType;
|
|
13032
|
+
bucketKey: string;
|
|
13033
|
+
isDebugFingerprint?: boolean | null;
|
|
13034
|
+
} | null;
|
|
13035
|
+
} | null;
|
|
12955
13036
|
}>>;
|
|
12956
13037
|
} | null;
|
|
12957
13038
|
};
|
|
@@ -13011,6 +13092,17 @@ export type ViewUpdateGroupsOnAppQuery = {
|
|
|
13011
13092
|
__typename?: 'Update';
|
|
13012
13093
|
id: string;
|
|
13013
13094
|
} | null;
|
|
13095
|
+
fingerprint?: {
|
|
13096
|
+
__typename?: 'Fingerprint';
|
|
13097
|
+
id: string;
|
|
13098
|
+
hash: string;
|
|
13099
|
+
source?: {
|
|
13100
|
+
__typename?: 'FingerprintSource';
|
|
13101
|
+
type: FingerprintSourceType;
|
|
13102
|
+
bucketKey: string;
|
|
13103
|
+
isDebugFingerprint?: boolean | null;
|
|
13104
|
+
} | null;
|
|
13105
|
+
} | null;
|
|
13014
13106
|
}>>;
|
|
13015
13107
|
};
|
|
13016
13108
|
};
|
|
@@ -13612,6 +13704,17 @@ export type UpdateFragment = {
|
|
|
13612
13704
|
__typename?: 'Update';
|
|
13613
13705
|
id: string;
|
|
13614
13706
|
} | null;
|
|
13707
|
+
fingerprint?: {
|
|
13708
|
+
__typename?: 'Fingerprint';
|
|
13709
|
+
id: string;
|
|
13710
|
+
hash: string;
|
|
13711
|
+
source?: {
|
|
13712
|
+
__typename?: 'FingerprintSource';
|
|
13713
|
+
type: FingerprintSourceType;
|
|
13714
|
+
bucketKey: string;
|
|
13715
|
+
isDebugFingerprint?: boolean | null;
|
|
13716
|
+
} | null;
|
|
13717
|
+
} | null;
|
|
13615
13718
|
};
|
|
13616
13719
|
export type UpdateBranchFragment = {
|
|
13617
13720
|
__typename?: 'UpdateBranch';
|
|
@@ -13658,6 +13761,17 @@ export type UpdateBranchFragment = {
|
|
|
13658
13761
|
__typename?: 'Update';
|
|
13659
13762
|
id: string;
|
|
13660
13763
|
} | null;
|
|
13764
|
+
fingerprint?: {
|
|
13765
|
+
__typename?: 'Fingerprint';
|
|
13766
|
+
id: string;
|
|
13767
|
+
hash: string;
|
|
13768
|
+
source?: {
|
|
13769
|
+
__typename?: 'FingerprintSource';
|
|
13770
|
+
type: FingerprintSourceType;
|
|
13771
|
+
bucketKey: string;
|
|
13772
|
+
isDebugFingerprint?: boolean | null;
|
|
13773
|
+
} | null;
|
|
13774
|
+
} | null;
|
|
13661
13775
|
}>;
|
|
13662
13776
|
};
|
|
13663
13777
|
export type UpdateBranchBasicInfoFragment = {
|
|
@@ -830,6 +830,7 @@ var WorkflowJobStatus;
|
|
|
830
830
|
WorkflowJobStatus["Failure"] = "FAILURE";
|
|
831
831
|
WorkflowJobStatus["InProgress"] = "IN_PROGRESS";
|
|
832
832
|
WorkflowJobStatus["New"] = "NEW";
|
|
833
|
+
WorkflowJobStatus["PendingCancel"] = "PENDING_CANCEL";
|
|
833
834
|
WorkflowJobStatus["Skipped"] = "SKIPPED";
|
|
834
835
|
WorkflowJobStatus["Success"] = "SUCCESS";
|
|
835
836
|
})(WorkflowJobStatus || (exports.WorkflowJobStatus = WorkflowJobStatus = {}));
|
|
@@ -855,5 +856,6 @@ var WorkflowRunStatus;
|
|
|
855
856
|
WorkflowRunStatus["Failure"] = "FAILURE";
|
|
856
857
|
WorkflowRunStatus["InProgress"] = "IN_PROGRESS";
|
|
857
858
|
WorkflowRunStatus["New"] = "NEW";
|
|
859
|
+
WorkflowRunStatus["PendingCancel"] = "PENDING_CANCEL";
|
|
858
860
|
WorkflowRunStatus["Success"] = "SUCCESS";
|
|
859
861
|
})(WorkflowRunStatus || (exports.WorkflowRunStatus = WorkflowRunStatus = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { ExpoConfig, Platform as ExpoConfigPlatform } from '@expo/config';
|
|
3
|
-
import { Env, Workflow } from '@expo/eas-build-job';
|
|
3
|
+
import { Env, FingerprintSource, Platform, Workflow } from '@expo/eas-build-job';
|
|
4
4
|
import Joi from 'joi';
|
|
5
5
|
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
6
6
|
import { PaginatedQueryOptions } from '../commandUtils/pagination';
|
|
@@ -149,6 +149,14 @@ export type RuntimeVersionInfo = {
|
|
|
149
149
|
fingerprintSources: object[];
|
|
150
150
|
isDebugFingerprintSource: boolean;
|
|
151
151
|
} | null;
|
|
152
|
+
fingerprintHash: string | null;
|
|
153
|
+
};
|
|
154
|
+
type FingerprintInfoGroup = {
|
|
155
|
+
[key in UpdatePublishPlatform]?: FingerprintInfo;
|
|
156
|
+
};
|
|
157
|
+
type FingerprintInfo = {
|
|
158
|
+
fingerprintHash: string;
|
|
159
|
+
fingerprintSource: FingerprintSource;
|
|
152
160
|
};
|
|
153
161
|
export declare function getRuntimeVersionInfoObjectsAsync({ exp, platforms, workflows, projectDir, env, }: {
|
|
154
162
|
exp: ExpoConfig;
|
|
@@ -166,6 +174,20 @@ export declare function getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntim
|
|
|
166
174
|
}[]): (RuntimeVersionInfo & {
|
|
167
175
|
platforms: UpdatePublishPlatform[];
|
|
168
176
|
})[];
|
|
177
|
+
export declare function maybeCalculateFingerprintForRuntimeVersionInfoObjectsWithoutExpoUpdatesAsync({ projectDir, graphqlClient, runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping, workflowsByPlatform, env, }: {
|
|
178
|
+
projectDir: string;
|
|
179
|
+
graphqlClient: ExpoGraphqlClient;
|
|
180
|
+
runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping: (RuntimeVersionInfo & {
|
|
181
|
+
platforms: UpdatePublishPlatform[];
|
|
182
|
+
fingerprintSource: FingerprintSource | null;
|
|
183
|
+
})[];
|
|
184
|
+
workflowsByPlatform: Record<Platform, Workflow>;
|
|
185
|
+
env: Env | undefined;
|
|
186
|
+
}): Promise<(RuntimeVersionInfo & {
|
|
187
|
+
platforms: UpdatePublishPlatform[];
|
|
188
|
+
fingerprintSource: FingerprintSource | null;
|
|
189
|
+
fingerprintInfoGroup: FingerprintInfoGroup;
|
|
190
|
+
})[]>;
|
|
169
191
|
export declare const platformDisplayNames: Record<UpdatePublishPlatform, string>;
|
|
170
192
|
export declare const updatePublishPlatformToAppPlatform: Record<UpdatePublishPlatform, AppPlatform>;
|
|
171
193
|
export declare function getRuntimeToUpdateRolloutInfoGroupMappingAsync(graphqlClient: ExpoGraphqlClient, { appId, branchName, rolloutPercentage, runtimeToPlatformsAndFingerprintInfoMapping, }: {
|
package/build/project/publish.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRuntimeToUpdateRolloutInfoGroupMappingAsync = exports.updatePublishPlatformToAppPlatform = exports.platformDisplayNames = exports.getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObjects = exports.getRuntimeVersionInfoObjectsAsync = exports.defaultPublishPlatforms = exports.getUpdateMessageForCommandAsync = exports.getBranchNameForCommandAsync = exports.isUploadedAssetCountAboveWarningThreshold = exports.uploadAssetsAsync = exports.filterOutAssetsThatAlreadyExistAsync = exports.collectAssetsAsync = exports.getOriginalPathFromAssetMap = exports.getAssetHashFromPath = exports.loadAssetMapAsync = exports.filterCollectedAssetsByRequestedPlatforms = exports.generateEasMetadataAsync = exports.loadMetadata = exports.resolveInputDirectoryAsync = exports.buildBundlesAsync = exports.buildUnsortedUpdateInfoGroupAsync = exports.convertAssetToUpdateInfoGroupFormatAsync = exports.getStorageKeyForAssetAsync = exports.getStorageKey = exports.getBase64URLEncoding = exports.guessContentTypeFromExtension = exports.MetadataJoi = void 0;
|
|
3
|
+
exports.getRuntimeToUpdateRolloutInfoGroupMappingAsync = exports.updatePublishPlatformToAppPlatform = exports.platformDisplayNames = exports.maybeCalculateFingerprintForRuntimeVersionInfoObjectsWithoutExpoUpdatesAsync = exports.getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObjects = exports.getRuntimeVersionInfoObjectsAsync = exports.defaultPublishPlatforms = exports.getUpdateMessageForCommandAsync = exports.getBranchNameForCommandAsync = exports.isUploadedAssetCountAboveWarningThreshold = exports.uploadAssetsAsync = exports.filterOutAssetsThatAlreadyExistAsync = exports.collectAssetsAsync = exports.getOriginalPathFromAssetMap = exports.getAssetHashFromPath = exports.loadAssetMapAsync = exports.filterCollectedAssetsByRequestedPlatforms = exports.generateEasMetadataAsync = exports.loadMetadata = exports.resolveInputDirectoryAsync = exports.buildBundlesAsync = exports.buildUnsortedUpdateInfoGroupAsync = exports.convertAssetToUpdateInfoGroupFormatAsync = exports.getStorageKeyForAssetAsync = exports.getStorageKey = exports.getBase64URLEncoding = exports.guessContentTypeFromExtension = exports.MetadataJoi = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
6
6
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
@@ -14,6 +14,7 @@ const mime_1 = tslib_1.__importDefault(require("mime"));
|
|
|
14
14
|
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
15
15
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
16
16
|
const promise_limit_1 = tslib_1.__importDefault(require("promise-limit"));
|
|
17
|
+
const maybeUploadFingerprintAsync_1 = require("./maybeUploadFingerprintAsync");
|
|
17
18
|
const projectUtils_1 = require("./projectUtils");
|
|
18
19
|
const resolveRuntimeVersionAsync_1 = require("./resolveRuntimeVersionAsync");
|
|
19
20
|
const queries_1 = require("../branch/queries");
|
|
@@ -33,7 +34,9 @@ const expoUpdatesCli_1 = require("../utils/expoUpdatesCli");
|
|
|
33
34
|
const chunk_1 = tslib_1.__importDefault(require("../utils/expodash/chunk"));
|
|
34
35
|
const filter_1 = require("../utils/expodash/filter");
|
|
35
36
|
const groupBy_1 = tslib_1.__importDefault(require("../utils/expodash/groupBy"));
|
|
37
|
+
const mapMapAsync_1 = tslib_1.__importDefault(require("../utils/expodash/mapMapAsync"));
|
|
36
38
|
const uniqBy_1 = tslib_1.__importDefault(require("../utils/expodash/uniqBy"));
|
|
39
|
+
const fingerprintCli_1 = require("../utils/fingerprintCli");
|
|
37
40
|
const fileMetadataJoi = joi_1.default.object({
|
|
38
41
|
assets: joi_1.default.array()
|
|
39
42
|
.required()
|
|
@@ -514,6 +517,7 @@ async function getRuntimeVersionInfoForPlatformAsync({ exp, platform, workflow,
|
|
|
514
517
|
return {
|
|
515
518
|
runtimeVersion: resolvedRuntimeVersion,
|
|
516
519
|
fingerprint: null,
|
|
520
|
+
fingerprintHash: null,
|
|
517
521
|
};
|
|
518
522
|
}
|
|
519
523
|
function getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObjects(runtimeVersionInfoObjects) {
|
|
@@ -523,10 +527,75 @@ function getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObj
|
|
|
523
527
|
runtimeVersion,
|
|
524
528
|
platforms: runtimeVersionInfoObjects.map(runtimeVersionInfoObject => runtimeVersionInfoObject.platform),
|
|
525
529
|
fingerprint: runtimeVersionInfoObjects.map(runtimeVersionInfoObject => runtimeVersionInfoObject.runtimeVersionInfo.fingerprint)[0] ?? null,
|
|
530
|
+
fingerprintHash: runtimeVersionInfoObjects.map(runtimeVersionInfoObject => runtimeVersionInfoObject.runtimeVersionInfo.fingerprintHash)[0] ?? null,
|
|
526
531
|
};
|
|
527
532
|
});
|
|
528
533
|
}
|
|
529
534
|
exports.getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObjects = getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObjects;
|
|
535
|
+
async function maybeCalculateFingerprintForRuntimeVersionInfoObjectsWithoutExpoUpdatesAsync({ projectDir, graphqlClient, runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping, workflowsByPlatform, env, }) {
|
|
536
|
+
const runtimesToComputeFingerprintsFor = runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping.filter(infoGroup => !infoGroup.fingerprintHash);
|
|
537
|
+
const fingerprintOptionsByRuntimeAndPlatform = new Map();
|
|
538
|
+
for (const infoGroup of runtimesToComputeFingerprintsFor) {
|
|
539
|
+
for (const platform of infoGroup.platforms) {
|
|
540
|
+
const runtimeAndPlatform = `${infoGroup.runtimeVersion}-${platform}`;
|
|
541
|
+
const options = {
|
|
542
|
+
platforms: [platform],
|
|
543
|
+
workflow: workflowsByPlatform[platform],
|
|
544
|
+
projectDir,
|
|
545
|
+
env,
|
|
546
|
+
};
|
|
547
|
+
fingerprintOptionsByRuntimeAndPlatform.set(runtimeAndPlatform, options);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
const fingerprintsByRuntimeAndPlatform = await (0, fingerprintCli_1.createFingerprintsByKeyAsync)(projectDir, fingerprintOptionsByRuntimeAndPlatform);
|
|
551
|
+
const uploadedFingerprintsByRuntimeAndPlatform = await (0, mapMapAsync_1.default)(fingerprintsByRuntimeAndPlatform, async (fingerprint) => {
|
|
552
|
+
return {
|
|
553
|
+
...fingerprint,
|
|
554
|
+
uploadedSource: (await (0, maybeUploadFingerprintAsync_1.maybeUploadFingerprintAsync)({
|
|
555
|
+
hash: fingerprint.hash,
|
|
556
|
+
fingerprint: {
|
|
557
|
+
fingerprintSources: fingerprint.sources,
|
|
558
|
+
isDebugFingerprintSource: fingerprint.isDebugSource,
|
|
559
|
+
},
|
|
560
|
+
graphqlClient,
|
|
561
|
+
})).fingerprintSource,
|
|
562
|
+
};
|
|
563
|
+
});
|
|
564
|
+
const runtimesWithComputedFingerprint = runtimesToComputeFingerprintsFor.map(runtimeInfo => {
|
|
565
|
+
const fingerprintInfoGroup = {};
|
|
566
|
+
for (const platform of runtimeInfo.platforms) {
|
|
567
|
+
const runtimeAndPlatform = `${runtimeInfo.runtimeVersion}-${platform}`;
|
|
568
|
+
const fingerprint = uploadedFingerprintsByRuntimeAndPlatform.get(runtimeAndPlatform);
|
|
569
|
+
if (fingerprint && fingerprint.uploadedSource) {
|
|
570
|
+
fingerprintInfoGroup[platform] = {
|
|
571
|
+
fingerprintHash: fingerprint.hash,
|
|
572
|
+
fingerprintSource: fingerprint.uploadedSource,
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
return {
|
|
577
|
+
...runtimeInfo,
|
|
578
|
+
fingerprintInfoGroup,
|
|
579
|
+
};
|
|
580
|
+
});
|
|
581
|
+
// These are runtimes whose fingerprint has already been computed and uploaded with EAS Update fingerprint runtime policy
|
|
582
|
+
const runtimesWithPreviouslyComputedFingerprints = runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping
|
|
583
|
+
.filter((infoGroup) => !!infoGroup.fingerprintHash && !!infoGroup.fingerprintSource)
|
|
584
|
+
.map(infoGroup => {
|
|
585
|
+
const platform = infoGroup.platforms[0];
|
|
586
|
+
return {
|
|
587
|
+
...infoGroup,
|
|
588
|
+
fingerprintInfoGroup: {
|
|
589
|
+
[platform]: {
|
|
590
|
+
fingerprintHash: infoGroup.fingerprintHash,
|
|
591
|
+
fingerprintSource: infoGroup.fingerprintSource,
|
|
592
|
+
},
|
|
593
|
+
},
|
|
594
|
+
};
|
|
595
|
+
});
|
|
596
|
+
return [...runtimesWithComputedFingerprint, ...runtimesWithPreviouslyComputedFingerprints];
|
|
597
|
+
}
|
|
598
|
+
exports.maybeCalculateFingerprintForRuntimeVersionInfoObjectsWithoutExpoUpdatesAsync = maybeCalculateFingerprintForRuntimeVersionInfoObjectsWithoutExpoUpdatesAsync;
|
|
530
599
|
exports.platformDisplayNames = {
|
|
531
600
|
android: 'Android',
|
|
532
601
|
ios: 'iOS',
|
|
@@ -535,18 +604,9 @@ exports.updatePublishPlatformToAppPlatform = {
|
|
|
535
604
|
android: generated_1.AppPlatform.Android,
|
|
536
605
|
ios: generated_1.AppPlatform.Ios,
|
|
537
606
|
};
|
|
538
|
-
const mapMapAsync = async function (map, mapper) {
|
|
539
|
-
const resultingMap = new Map();
|
|
540
|
-
await Promise.all(Array.from(map.keys()).map(async (k) => {
|
|
541
|
-
const initialValue = map.get(k);
|
|
542
|
-
const result = await mapper(initialValue, k);
|
|
543
|
-
resultingMap.set(k, result);
|
|
544
|
-
}));
|
|
545
|
-
return resultingMap;
|
|
546
|
-
};
|
|
547
607
|
async function getRuntimeToUpdateRolloutInfoGroupMappingAsync(graphqlClient, { appId, branchName, rolloutPercentage, runtimeToPlatformsAndFingerprintInfoMapping, }) {
|
|
548
608
|
const runtimeToPlatformsMap = new Map(runtimeToPlatformsAndFingerprintInfoMapping.map(r => [r.runtimeVersion, r.platforms]));
|
|
549
|
-
return await
|
|
609
|
+
return await (0, mapMapAsync_1.default)(runtimeToPlatformsMap, async (platforms, runtimeVersion) => {
|
|
550
610
|
return Object.fromEntries(await Promise.all(platforms.map(async (platform) => {
|
|
551
611
|
const updateIdForPlatform = await BranchQuery_1.BranchQuery.getLatestUpdateIdOnBranchAsync(graphqlClient, {
|
|
552
612
|
appId,
|
|
@@ -12,6 +12,7 @@ export declare function resolveRuntimeVersionUsingCLIAsync({ platform, workflow,
|
|
|
12
12
|
fingerprintSources: object[];
|
|
13
13
|
isDebugFingerprintSource: boolean;
|
|
14
14
|
} | null;
|
|
15
|
+
fingerprintHash: string | null;
|
|
15
16
|
}>;
|
|
16
17
|
export declare function resolveRuntimeVersionAsync({ exp, platform, workflow, projectDir, env, cwd, }: {
|
|
17
18
|
exp: ExpoConfig;
|
|
@@ -26,4 +27,5 @@ export declare function resolveRuntimeVersionAsync({ exp, platform, workflow, pr
|
|
|
26
27
|
fingerprintSources: object[];
|
|
27
28
|
isDebugFingerprintSource: boolean;
|
|
28
29
|
} | null;
|
|
30
|
+
fingerprintHash: string | null;
|
|
29
31
|
} | null>;
|
|
@@ -22,6 +22,9 @@ async function resolveRuntimeVersionUsingCLIAsync({ platform, workflow, projectD
|
|
|
22
22
|
isDebugFingerprintSource: useDebugFingerprintSource,
|
|
23
23
|
}
|
|
24
24
|
: null,
|
|
25
|
+
fingerprintHash: runtimeVersionResult.fingerprintSources
|
|
26
|
+
? runtimeVersionResult.runtimeVersion
|
|
27
|
+
: null,
|
|
25
28
|
};
|
|
26
29
|
}
|
|
27
30
|
exports.resolveRuntimeVersionUsingCLIAsync = resolveRuntimeVersionUsingCLIAsync;
|
|
@@ -32,6 +35,7 @@ async function resolveRuntimeVersionAsync({ exp, platform, workflow, projectDir,
|
|
|
32
35
|
return {
|
|
33
36
|
runtimeVersion: await config_plugins_1.Updates.getRuntimeVersionNullableAsync(projectDir, exp, platform),
|
|
34
37
|
fingerprint: null,
|
|
38
|
+
fingerprintHash: null,
|
|
35
39
|
};
|
|
36
40
|
}
|
|
37
41
|
try {
|
|
@@ -57,6 +57,25 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
|
|
|
57
57
|
}
|
|
58
58
|
: {
|
|
59
59
|
updateInfoGroup: Object.fromEntries(updatesToPublish.map(update => [update.platform, JSON.parse(update.manifestFragment)])),
|
|
60
|
+
fingerprintInfoGroup: Object.fromEntries(updatesToPublish.map(update => {
|
|
61
|
+
const fingerprint = update.fingerprint;
|
|
62
|
+
if (!fingerprint) {
|
|
63
|
+
return [update.platform, undefined];
|
|
64
|
+
}
|
|
65
|
+
return [
|
|
66
|
+
update.platform,
|
|
67
|
+
{
|
|
68
|
+
fingerprintHash: fingerprint.hash,
|
|
69
|
+
fingerprintSource: fingerprint.source
|
|
70
|
+
? {
|
|
71
|
+
type: fingerprint.source.type,
|
|
72
|
+
bucketKey: fingerprint.source.bucketKey,
|
|
73
|
+
isDebugFingerprint: fingerprint.source.isDebugFingerprint,
|
|
74
|
+
}
|
|
75
|
+
: undefined,
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
})),
|
|
60
79
|
};
|
|
61
80
|
updatesRepublished = await PublishMutation_1.PublishMutation.publishUpdateGroupAsync(graphqlClient, [
|
|
62
81
|
{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function mapMapAsync<K, V, M>(map: ReadonlyMap<K, V>, mapper: (value: V, key: K) => Promise<M>): Promise<Map<K, M>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
async function mapMapAsync(map, mapper) {
|
|
4
|
+
const resultingMap = new Map();
|
|
5
|
+
await Promise.all(Array.from(map.keys()).map(async (k) => {
|
|
6
|
+
const initialValue = map.get(k);
|
|
7
|
+
const result = await mapper(initialValue, k);
|
|
8
|
+
resultingMap.set(k, result);
|
|
9
|
+
}));
|
|
10
|
+
return resultingMap;
|
|
11
|
+
}
|
|
12
|
+
exports.default = mapMapAsync;
|
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
import { Env, Workflow } from '@expo/eas-build-job';
|
|
2
|
-
export
|
|
2
|
+
export type FingerprintOptions = {
|
|
3
3
|
workflow: Workflow;
|
|
4
|
-
|
|
4
|
+
platforms: string[];
|
|
5
5
|
debug?: boolean;
|
|
6
6
|
env: Env | undefined;
|
|
7
7
|
cwd?: string;
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
|
+
export declare function createFingerprintAsync(projectDir: string, options: FingerprintOptions): Promise<{
|
|
9
10
|
hash: string;
|
|
10
11
|
sources: object[];
|
|
11
12
|
isDebugSource: boolean;
|
|
12
13
|
} | null>;
|
|
14
|
+
/**
|
|
15
|
+
* Computes project fingerprints based on provided options and returns a map of fingerprint data keyed by a string.
|
|
16
|
+
*
|
|
17
|
+
* @param projectDir - The root directory of the project.
|
|
18
|
+
* @param fingerprintOptionsByKey - A map where each key is associated with options for generating the fingerprint.
|
|
19
|
+
* - **Key**: A unique identifier (`string`) for the fingerprint options.
|
|
20
|
+
* - **Value**: An object containing options for generating a fingerprint.
|
|
21
|
+
*
|
|
22
|
+
* @returns A promise that resolves to a map where each key corresponds to the input keys, and each value is an object containing fingerprint data.
|
|
23
|
+
*
|
|
24
|
+
* @throws Will throw an error if fingerprint computation fails.
|
|
25
|
+
*/
|
|
26
|
+
export declare function createFingerprintsByKeyAsync(projectDir: string, fingerprintOptionsByKey: Map<string, FingerprintOptions>): Promise<Map<string, {
|
|
27
|
+
hash: string;
|
|
28
|
+
sources: object[];
|
|
29
|
+
isDebugSource: boolean;
|
|
30
|
+
}>>;
|