eas-cli 14.4.1 → 14.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.
@@ -464,21 +464,22 @@ async function computeAndMaybeUploadFingerprintFromExpoUpdatesAsync(ctx) {
464
464
  * It's ok for fingerprintSources or runtimeVersion to be empty
465
465
  * fingerprintSources only exist if the project is using runtimeVersion.policy: fingerprint
466
466
  */
467
- if (!resolvedRuntimeVersion.fingerprint || !resolvedRuntimeVersion.runtimeVersion) {
467
+ if (!resolvedRuntimeVersion.expoUpdatesRuntimeFingerprint ||
468
+ !resolvedRuntimeVersion.runtimeVersion) {
468
469
  return {
469
470
  runtimeVersion: resolvedRuntimeVersion.runtimeVersion ?? undefined,
470
471
  };
471
472
  }
472
473
  const uploadedFingerprint = await (0, maybeUploadFingerprintAsync_1.maybeUploadFingerprintAsync)({
473
474
  hash: resolvedRuntimeVersion.runtimeVersion,
474
- fingerprint: resolvedRuntimeVersion.fingerprint,
475
+ fingerprint: resolvedRuntimeVersion.expoUpdatesRuntimeFingerprint,
475
476
  graphqlClient: ctx.graphqlClient,
476
477
  localBuildMode: ctx.localBuildOptions.localBuildMode,
477
478
  });
478
479
  return {
479
480
  runtimeVersion: uploadedFingerprint.hash,
480
481
  fingerprintSource: uploadedFingerprint.fingerprintSource,
481
- fingerprintHash: resolvedRuntimeVersion.fingerprintHash ?? undefined,
482
+ fingerprintHash: resolvedRuntimeVersion.expoUpdatesRuntimeFingerprintHash ?? undefined,
482
483
  };
483
484
  }
484
485
  async function computeAndMaybeUploadFingerprintWithoutExpoUpdatesAsync(ctx, { debug } = {}) {
@@ -20,6 +20,7 @@ export default class BuildList extends EasCommand {
20
20
  'app-identifier': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
21
21
  'build-profile': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
22
22
  'git-commit-hash': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
23
+ 'fingerprint-hash': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
23
24
  };
24
25
  static contextDefinition: {
25
26
  vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
@@ -58,6 +58,9 @@ class BuildList extends EasCommand_1.default {
58
58
  aliases: ['gitCommitHash'],
59
59
  description: 'Filter only builds created with the specified git commit hash',
60
60
  }),
61
+ 'fingerprint-hash': core_1.Flags.string({
62
+ description: 'Filter only builds with the specified fingerprint hash',
63
+ }),
61
64
  ...pagination_1.EasPaginatedQueryFlags,
62
65
  limit: (0, pagination_1.getLimitFlagWithCustomValues)({ defaultTo: 10, limit: queries_1.BUILDS_LIMIT }),
63
66
  ...flags_1.EasNonInteractiveAndJsonFlags,
@@ -107,6 +110,7 @@ class BuildList extends EasCommand_1.default {
107
110
  buildProfile: flags['build-profile'],
108
111
  gitCommitHash: flags['git-commit-hash'],
109
112
  simulator: flags.simulator,
113
+ fingerprintHash: flags['fingerprint-hash'],
110
114
  },
111
115
  paginatedQueryOptions,
112
116
  });
@@ -12,9 +12,9 @@ const json_1 = require("../../utils/json");
12
12
  const deployment_1 = require("../../worker/deployment");
13
13
  const logs_1 = require("../../worker/utils/logs");
14
14
  class WorkerAlias extends EasCommand_1.default {
15
- static description = 'Assign deployment aliases';
16
- static aliases = ['deploy:alias', 'deploy:promote'];
17
- static state = 'beta';
15
+ static description = 'Assign deployment aliases.';
16
+ static aliases = ['worker:alias', 'deploy:promote'];
17
+ static state = 'preview';
18
18
  static flags = {
19
19
  prod: core_1.Flags.boolean({
20
20
  aliases: ['production'],
@@ -44,7 +44,7 @@ class WorkerAlias extends EasCommand_1.default {
44
44
  if (flags.json) {
45
45
  (0, json_1.enableJsonOutput)();
46
46
  }
47
- log_1.default.warn('EAS Hosting is still in beta and subject to changes.');
47
+ log_1.default.warn('EAS Hosting is still in preview and subject to changes.');
48
48
  const { getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, } = await this.getContextAsync(WorkerAlias, {
49
49
  nonInteractive: true,
50
50
  withServerSideEnvironment: null,
@@ -21,10 +21,10 @@ const isDirectory = (directoryPath) => node_fs_1.default.promises
21
21
  .then(stat => stat.isDirectory())
22
22
  .catch(() => false);
23
23
  class WorkerDeploy extends EasCommand_1.default {
24
- static description = 'Deploy your Expo web build';
25
- static aliases = ['deploy'];
24
+ static description = 'Deploy your Expo Router web build and API Routes.';
25
+ static aliases = ['worker:deploy'];
26
26
  static usage = [(0, chalk_1.default) `deploy {dim [options]}`, `deploy --prod`];
27
- static state = 'beta';
27
+ static state = 'preview';
28
28
  static flags = {
29
29
  prod: core_1.Flags.boolean({
30
30
  aliases: ['production'],
@@ -62,7 +62,7 @@ class WorkerDeploy extends EasCommand_1.default {
62
62
  if (flags.json) {
63
63
  (0, json_1.enableJsonOutput)();
64
64
  }
65
- log_1.default.warn('EAS Hosting is still in beta and subject to changes.');
65
+ log_1.default.warn('EAS Hosting is still in preview and subject to changes.');
66
66
  const { getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, projectDir, } = await this.getContextAsync(WorkerDeploy, { ...flags, withServerSideEnvironment: null });
67
67
  const projectDist = await resolveExportedProjectAsync(flags, projectDir);
68
68
  const { projectId } = await getDynamicPrivateProjectConfigAsync();
@@ -331,7 +331,7 @@ function logExportedProjectInfo(project) {
331
331
  // Only show the timestamp for exports older than 1 minute
332
332
  if (project.modifiedAt && Date.now() - project.modifiedAt.getTime() > 60000) {
333
333
  modifiedAgo = ` - exported ${(0, timeago_js_1.format)(project.modifiedAt)}`;
334
- log_1.default.warn(`> Project export: ${project.type}${modifiedAgo}}`);
334
+ log_1.default.warn(`> Project export: ${project.type}${modifiedAgo}`);
335
335
  }
336
336
  else {
337
337
  log_1.default.log((0, chalk_1.default) `{dim > Project export: ${project.type}}`);
@@ -269,10 +269,10 @@ class UpdatePublish extends EasCommand_1.default {
269
269
  const runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMappingFromExpoUpdates = await Promise.all(runtimeToPlatformsAndFingerprintInfoMapping.map(async (info) => {
270
270
  return {
271
271
  ...info,
272
- fingerprintSource: info.fingerprint
272
+ expoUpdatesRuntimeFingerprintSource: info.expoUpdatesRuntimeFingerprint
273
273
  ? (await (0, maybeUploadFingerprintAsync_1.maybeUploadFingerprintAsync)({
274
274
  hash: info.runtimeVersion,
275
- fingerprint: info.fingerprint,
275
+ fingerprint: info.expoUpdatesRuntimeFingerprint,
276
276
  graphqlClient,
277
277
  })).fingerprintSource ?? null
278
278
  : null,
@@ -296,7 +296,7 @@ class UpdatePublish extends EasCommand_1.default {
296
296
  const gitCommitHash = await vcsClient.getCommitHashAsync();
297
297
  const isGitWorkingTreeDirty = await vcsClient.hasUncommittedChangesAsync();
298
298
  // Sort the updates into different groups based on their platform specific runtime versions
299
- const updateGroups = runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping.map(({ runtimeVersion, platforms, fingerprintSource, fingerprintInfoGroup }) => {
299
+ const updateGroups = runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping.map(({ runtimeVersion, platforms, fingerprintInfoGroup }) => {
300
300
  const localUpdateInfoGroup = Object.fromEntries(platforms.map(platform => [
301
301
  platform,
302
302
  unsortedUpdateInfoGroups[platform],
@@ -323,9 +323,6 @@ class UpdatePublish extends EasCommand_1.default {
323
323
  branchId: branch.id,
324
324
  updateInfoGroup: localUpdateInfoGroup,
325
325
  rolloutInfoGroup: localRolloutInfoGroup,
326
- runtimeFingerprintSource: fingerprintSource
327
- ? (0, graphql_1.transformFingerprintSource)(fingerprintSource)
328
- : null,
329
326
  fingerprintInfoGroup: transformedFingerprintInfoGroup,
330
327
  runtimeVersion,
331
328
  message: updateMessage,
@@ -123,8 +123,8 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
123
123
  platform,
124
124
  runtimeVersionInfo: {
125
125
  runtimeVersion: selectedRuntime,
126
- fingerprint: null,
127
- fingerprintHash: null,
126
+ expoUpdatesRuntimeFingerprint: null,
127
+ expoUpdatesRuntimeFingerprintHash: null,
128
128
  },
129
129
  })));
130
130
  let newUpdates;
@@ -162,13 +162,18 @@ async function promptUsernameAsync() {
162
162
  // Get the email address that was last used and set it as
163
163
  // the default value for quicker authentication.
164
164
  const lastAppleId = await getCachedUsernameAsync();
165
- const { username } = await (0, prompts_1.promptAsync)({
165
+ let { username } = await (0, prompts_1.promptAsync)({
166
166
  type: 'text',
167
167
  name: 'username',
168
168
  message: `Apple ID:`,
169
169
  validate: (val) => val !== '',
170
170
  initial: lastAppleId ?? undefined,
171
171
  });
172
+ // https://github.com/expo/eas-cli/issues/2254
173
+ // user got an invalid unprintable character in their username, which was saved to cache and used to prefill the prompt
174
+ // which made them accept the prefilled value not knowing it contains the character and fail to log in
175
+ // this replace makes sure no such characters are used or cached
176
+ username = username.replace(/[\x00-\x1F]/gi, '');
172
177
  if (username && username !== lastAppleId) {
173
178
  await cacheUsernameAsync(username);
174
179
  }
@@ -175,6 +175,7 @@ export type Account = {
175
175
  /** Whether this account has SSO enabled. Can be queried by all members. */
176
176
  isSSOEnabled: Scalars['Boolean']['output'];
177
177
  lastDeletionAttemptTime?: Maybe<Scalars['DateTime']['output']>;
178
+ logRocketOrganization?: Maybe<LogRocketOrganization>;
178
179
  name: Scalars['String']['output'];
179
180
  /** Offers set on this account */
180
181
  offers?: Maybe<Array<Offer>>;
@@ -1154,6 +1155,7 @@ export type App = Project & {
1154
1155
  likeCount: Scalars['Int']['output'];
1155
1156
  /** @deprecated 'likes' have been deprecated. */
1156
1157
  likedBy: Array<Maybe<User>>;
1158
+ logRocketProject?: Maybe<LogRocketProject>;
1157
1159
  name: Scalars['String']['output'];
1158
1160
  ownerAccount: Account;
1159
1161
  /** @deprecated No longer supported */
@@ -2486,6 +2488,7 @@ export type BuildFilter = {
2486
2488
  buildProfile?: InputMaybe<Scalars['String']['input']>;
2487
2489
  channel?: InputMaybe<Scalars['String']['input']>;
2488
2490
  distribution?: InputMaybe<DistributionType>;
2491
+ fingerprintHash?: InputMaybe<Scalars['String']['input']>;
2489
2492
  gitCommitHash?: InputMaybe<Scalars['String']['input']>;
2490
2493
  hasFingerprint?: InputMaybe<Scalars['Boolean']['input']>;
2491
2494
  platform?: InputMaybe<AppPlatform>;
@@ -2498,6 +2501,7 @@ export type BuildFilterInput = {
2498
2501
  channel?: InputMaybe<Scalars['String']['input']>;
2499
2502
  developmentClient?: InputMaybe<Scalars['Boolean']['input']>;
2500
2503
  distributions?: InputMaybe<Array<DistributionType>>;
2504
+ fingerprintHash?: InputMaybe<Scalars['String']['input']>;
2501
2505
  hasFingerprint?: InputMaybe<Scalars['Boolean']['input']>;
2502
2506
  platforms?: InputMaybe<Array<AppPlatform>>;
2503
2507
  releaseChannel?: InputMaybe<Scalars['String']['input']>;
@@ -3107,6 +3111,14 @@ export type DeleteIosAppCredentialsResult = {
3107
3111
  __typename?: 'DeleteIosAppCredentialsResult';
3108
3112
  id: Scalars['ID']['output'];
3109
3113
  };
3114
+ export type DeleteLogRocketOrganizationResult = {
3115
+ __typename?: 'DeleteLogRocketOrganizationResult';
3116
+ accountId: Scalars['ID']['output'];
3117
+ };
3118
+ export type DeleteLogRocketProjectResult = {
3119
+ __typename?: 'DeleteLogRocketProjectResult';
3120
+ id: Scalars['ID']['output'];
3121
+ };
3110
3122
  export type DeleteRobotResult = {
3111
3123
  __typename?: 'DeleteRobotResult';
3112
3124
  id: Scalars['ID']['output'];
@@ -3581,12 +3593,35 @@ export declare enum Feature {
3581
3593
  export type Fingerprint = {
3582
3594
  __typename?: 'Fingerprint';
3583
3595
  app: App;
3596
+ builds: AppBuildsConnection;
3584
3597
  createdAt: Scalars['DateTime']['output'];
3585
3598
  debugInfoUrl?: Maybe<Scalars['String']['output']>;
3586
3599
  hash: Scalars['String']['output'];
3587
3600
  id: Scalars['ID']['output'];
3588
3601
  source?: Maybe<FingerprintSource>;
3589
3602
  updatedAt: Scalars['DateTime']['output'];
3603
+ updates: AppUpdatesConnection;
3604
+ };
3605
+ export type FingerprintBuildsArgs = {
3606
+ after?: InputMaybe<Scalars['String']['input']>;
3607
+ before?: InputMaybe<Scalars['String']['input']>;
3608
+ filter?: InputMaybe<FingerprintBuildsFilterInput>;
3609
+ first?: InputMaybe<Scalars['Int']['input']>;
3610
+ last?: InputMaybe<Scalars['Int']['input']>;
3611
+ };
3612
+ export type FingerprintUpdatesArgs = {
3613
+ after?: InputMaybe<Scalars['String']['input']>;
3614
+ before?: InputMaybe<Scalars['String']['input']>;
3615
+ first?: InputMaybe<Scalars['Int']['input']>;
3616
+ last?: InputMaybe<Scalars['Int']['input']>;
3617
+ };
3618
+ export type FingerprintBuildsFilterInput = {
3619
+ channel?: InputMaybe<Scalars['String']['input']>;
3620
+ developmentClient?: InputMaybe<Scalars['Boolean']['input']>;
3621
+ distributions?: InputMaybe<Array<DistributionType>>;
3622
+ platforms?: InputMaybe<Array<AppPlatform>>;
3623
+ releaseChannel?: InputMaybe<Scalars['String']['input']>;
3624
+ simulator?: InputMaybe<Scalars['Boolean']['input']>;
3590
3625
  };
3591
3626
  export type FingerprintFilterInput = {
3592
3627
  hashes?: InputMaybe<Array<Scalars['String']['input']>>;
@@ -3632,6 +3667,19 @@ export type FutureSubscription = {
3632
3667
  recurringCents?: Maybe<Scalars['Int']['output']>;
3633
3668
  startDate: Scalars['DateTime']['output'];
3634
3669
  };
3670
+ export type GenerateLogRocketOrganizationLinkResult = {
3671
+ __typename?: 'GenerateLogRocketOrganizationLinkResult';
3672
+ url: Scalars['String']['output'];
3673
+ };
3674
+ export type GenerateLogRocketOrganizationLinkingUrlInput = {
3675
+ accountId: Scalars['ID']['input'];
3676
+ callbackUrl: Scalars['String']['input'];
3677
+ };
3678
+ export type GenerateLogRocketReplayTokenResult = {
3679
+ __typename?: 'GenerateLogRocketReplayTokenResult';
3680
+ orgSlug: Scalars['String']['output'];
3681
+ replayToken: Scalars['String']['output'];
3682
+ };
3635
3683
  export type GetSignedAssetUploadSpecificationsResult = {
3636
3684
  __typename?: 'GetSignedAssetUploadSpecificationsResult';
3637
3685
  specifications: Array<Scalars['String']['output']>;
@@ -4364,6 +4412,14 @@ export type LineDataset = {
4364
4412
  id: Scalars['ID']['output'];
4365
4413
  label: Scalars['String']['output'];
4366
4414
  };
4415
+ export type LinkLogRocketOrganizationToExpoAccountInput = {
4416
+ accountId: Scalars['ID']['input'];
4417
+ client_id: Scalars['String']['input'];
4418
+ client_secret: Scalars['String']['input'];
4419
+ orgName: Scalars['String']['input'];
4420
+ orgSlug: Scalars['String']['input'];
4421
+ state: Scalars['String']['input'];
4422
+ };
4367
4423
  export type LinkSharedEnvironmentVariableInput = {
4368
4424
  appId: Scalars['ID']['input'];
4369
4425
  environment?: InputMaybe<EnvironmentVariableEnvironment>;
@@ -4374,6 +4430,60 @@ export type LogNameTypeMapping = {
4374
4430
  publicName: Scalars['String']['output'];
4375
4431
  typeName: EntityTypeName;
4376
4432
  };
4433
+ export type LogRocketOrganization = {
4434
+ __typename?: 'LogRocketOrganization';
4435
+ account: Account;
4436
+ createdAt: Scalars['DateTime']['output'];
4437
+ id: Scalars['ID']['output'];
4438
+ orgName: Scalars['String']['output'];
4439
+ orgSlug: Scalars['String']['output'];
4440
+ };
4441
+ export type LogRocketOrganizationMutation = {
4442
+ __typename?: 'LogRocketOrganizationMutation';
4443
+ /** Delete a LogRocket organization by ID */
4444
+ deleteLogRocketOrganization: DeleteLogRocketOrganizationResult;
4445
+ /** Generate a LogRocket linking URL */
4446
+ generateLogRocketOrganizationLinkingURL: GenerateLogRocketOrganizationLinkResult;
4447
+ /** Generate a LogRocket replay token for an organization */
4448
+ generateLogRocketReplayToken: GenerateLogRocketReplayTokenResult;
4449
+ /** Link a LogRocket organization to an Expo account */
4450
+ linkLogRocketOrganizationToExpoAccount: LogRocketOrganization;
4451
+ };
4452
+ export type LogRocketOrganizationMutationDeleteLogRocketOrganizationArgs = {
4453
+ accountId: Scalars['ID']['input'];
4454
+ };
4455
+ export type LogRocketOrganizationMutationGenerateLogRocketOrganizationLinkingUrlArgs = {
4456
+ input: GenerateLogRocketOrganizationLinkingUrlInput;
4457
+ };
4458
+ export type LogRocketOrganizationMutationGenerateLogRocketReplayTokenArgs = {
4459
+ accountId: Scalars['ID']['input'];
4460
+ };
4461
+ export type LogRocketOrganizationMutationLinkLogRocketOrganizationToExpoAccountArgs = {
4462
+ input: LinkLogRocketOrganizationToExpoAccountInput;
4463
+ };
4464
+ export type LogRocketProject = {
4465
+ __typename?: 'LogRocketProject';
4466
+ app: App;
4467
+ createdAt: Scalars['DateTime']['output'];
4468
+ id: Scalars['ID']['output'];
4469
+ logRocketOrgId: Scalars['ID']['output'];
4470
+ logRocketProjectSlug: Scalars['String']['output'];
4471
+ updatedAt: Scalars['DateTime']['output'];
4472
+ };
4473
+ export type LogRocketProjectMutation = {
4474
+ __typename?: 'LogRocketProjectMutation';
4475
+ /** Create a LogRocket project */
4476
+ createLogRocketProject: LogRocketProject;
4477
+ /** Delete a LogRocket project by ID */
4478
+ deleteLogRocketProject: DeleteLogRocketProjectResult;
4479
+ };
4480
+ export type LogRocketProjectMutationCreateLogRocketProjectArgs = {
4481
+ appId: Scalars['ID']['input'];
4482
+ logRocketProjectSlug: Scalars['String']['input'];
4483
+ };
4484
+ export type LogRocketProjectMutationDeleteLogRocketProjectArgs = {
4485
+ logRocketProjectId: Scalars['ID']['input'];
4486
+ };
4377
4487
  export type LogsTimespan = {
4378
4488
  end: Scalars['DateTime']['input'];
4379
4489
  start?: InputMaybe<Scalars['DateTime']['input']>;
@@ -4917,6 +5027,10 @@ export type RootMutation = {
4917
5027
  /** Mutations that modify an EAS Build */
4918
5028
  jobRun: JobRunMutation;
4919
5029
  keystoreGenerationUrl: KeystoreGenerationUrlMutation;
5030
+ /** Mutations for LogRocket organizations */
5031
+ logRocketOrganization: LogRocketOrganizationMutation;
5032
+ /** Mutations for LogRocket projects */
5033
+ logRocketProject: LogRocketProjectMutation;
4920
5034
  /** Mutations that modify the currently authenticated User */
4921
5035
  me: MeMutation;
4922
5036
  /** Mutations that modify a NotificationSubscription */
@@ -7008,6 +7122,8 @@ export type WorkflowRun = ActivityTimelineProjectActivity & {
7008
7122
  name: Scalars['String']['output'];
7009
7123
  pullRequestNumber?: Maybe<Scalars['Int']['output']>;
7010
7124
  requestedGitRef?: Maybe<Scalars['String']['output']>;
7125
+ retriedWorkflowRun?: Maybe<WorkflowRun>;
7126
+ retries: Array<WorkflowRun>;
7011
7127
  status: WorkflowRunStatus;
7012
7128
  triggerEventType: WorkflowRunTriggerEventType;
7013
7129
  updatedAt: Scalars['DateTime']['output'];
@@ -7031,6 +7147,7 @@ export type WorkflowRunMutation = {
7031
7147
  __typename?: 'WorkflowRunMutation';
7032
7148
  cancelWorkflowRun: WorkflowRun;
7033
7149
  createWorkflowRun: WorkflowRun;
7150
+ retryWorkflowRun: WorkflowRun;
7034
7151
  };
7035
7152
  export type WorkflowRunMutationCancelWorkflowRunArgs = {
7036
7153
  workflowRunId: Scalars['ID']['input'];
@@ -7040,6 +7157,9 @@ export type WorkflowRunMutationCreateWorkflowRunArgs = {
7040
7157
  workflowRevisionInput: WorkflowRevisionInput;
7041
7158
  workflowRunInput: WorkflowRunInput;
7042
7159
  };
7160
+ export type WorkflowRunMutationRetryWorkflowRunArgs = {
7161
+ workflowRunId: Scalars['ID']['input'];
7162
+ };
7043
7163
  export type WorkflowRunQuery = {
7044
7164
  __typename?: 'WorkflowRunQuery';
7045
7165
  byId: WorkflowRun;
@@ -145,11 +145,11 @@ export declare function getUpdateMessageForCommandAsync(vcsClient: Client, { upd
145
145
  export declare const defaultPublishPlatforms: UpdatePublishPlatform[];
146
146
  export type RuntimeVersionInfo = {
147
147
  runtimeVersion: string;
148
- fingerprint: {
148
+ expoUpdatesRuntimeFingerprint: {
149
149
  fingerprintSources: object[];
150
150
  isDebugFingerprintSource: boolean;
151
151
  } | null;
152
- fingerprintHash: string | null;
152
+ expoUpdatesRuntimeFingerprintHash: string | null;
153
153
  };
154
154
  type FingerprintInfoGroup = {
155
155
  [key in UpdatePublishPlatform]?: FingerprintInfo;
@@ -179,13 +179,13 @@ export declare function maybeCalculateFingerprintForRuntimeVersionInfoObjectsWit
179
179
  graphqlClient: ExpoGraphqlClient;
180
180
  runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping: (RuntimeVersionInfo & {
181
181
  platforms: UpdatePublishPlatform[];
182
- fingerprintSource: FingerprintSource | null;
182
+ expoUpdatesRuntimeFingerprintSource: FingerprintSource | null;
183
183
  })[];
184
184
  workflowsByPlatform: Record<Platform, Workflow>;
185
185
  env: Env | undefined;
186
186
  }): Promise<(RuntimeVersionInfo & {
187
187
  platforms: UpdatePublishPlatform[];
188
- fingerprintSource: FingerprintSource | null;
188
+ expoUpdatesRuntimeFingerprintSource: FingerprintSource | null;
189
189
  fingerprintInfoGroup: FingerprintInfoGroup;
190
190
  })[]>;
191
191
  export declare const platformDisplayNames: Record<UpdatePublishPlatform, string>;
@@ -520,8 +520,8 @@ async function getRuntimeVersionInfoForPlatformAsync({ exp, platform, workflow,
520
520
  }
521
521
  return {
522
522
  runtimeVersion: resolvedRuntimeVersion,
523
- fingerprint: null,
524
- fingerprintHash: null,
523
+ expoUpdatesRuntimeFingerprint: null,
524
+ expoUpdatesRuntimeFingerprintHash: null,
525
525
  };
526
526
  }
527
527
  function getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObjects(runtimeVersionInfoObjects) {
@@ -530,14 +530,14 @@ function getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObj
530
530
  return {
531
531
  runtimeVersion,
532
532
  platforms: runtimeVersionInfoObjects.map(runtimeVersionInfoObject => runtimeVersionInfoObject.platform),
533
- fingerprint: runtimeVersionInfoObjects.map(runtimeVersionInfoObject => runtimeVersionInfoObject.runtimeVersionInfo.fingerprint)[0] ?? null,
534
- fingerprintHash: runtimeVersionInfoObjects.map(runtimeVersionInfoObject => runtimeVersionInfoObject.runtimeVersionInfo.fingerprintHash)[0] ?? null,
533
+ expoUpdatesRuntimeFingerprint: runtimeVersionInfoObjects.map(runtimeVersionInfoObject => runtimeVersionInfoObject.runtimeVersionInfo.expoUpdatesRuntimeFingerprint)[0] ?? null,
534
+ expoUpdatesRuntimeFingerprintHash: runtimeVersionInfoObjects.map(runtimeVersionInfoObject => runtimeVersionInfoObject.runtimeVersionInfo.expoUpdatesRuntimeFingerprintHash)[0] ?? null,
535
535
  };
536
536
  });
537
537
  }
538
538
  exports.getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObjects = getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObjects;
539
539
  async function maybeCalculateFingerprintForRuntimeVersionInfoObjectsWithoutExpoUpdatesAsync({ projectDir, graphqlClient, runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping, workflowsByPlatform, env, }) {
540
- const runtimesToComputeFingerprintsFor = runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping.filter(infoGroup => !infoGroup.fingerprintHash);
540
+ const runtimesToComputeFingerprintsFor = runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping.filter(infoGroup => !infoGroup.expoUpdatesRuntimeFingerprintHash);
541
541
  const fingerprintOptionsByRuntimeAndPlatform = new Map();
542
542
  for (const infoGroup of runtimesToComputeFingerprintsFor) {
543
543
  for (const platform of infoGroup.platforms) {
@@ -584,15 +584,16 @@ async function maybeCalculateFingerprintForRuntimeVersionInfoObjectsWithoutExpoU
584
584
  });
585
585
  // These are runtimes whose fingerprint has already been computed and uploaded with EAS Update fingerprint runtime policy
586
586
  const runtimesWithPreviouslyComputedFingerprints = runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping
587
- .filter((infoGroup) => !!infoGroup.fingerprintHash && !!infoGroup.fingerprintSource)
587
+ .filter((infoGroup) => !!infoGroup.expoUpdatesRuntimeFingerprintHash &&
588
+ !!infoGroup.expoUpdatesRuntimeFingerprintSource)
588
589
  .map(infoGroup => {
589
590
  const platform = infoGroup.platforms[0];
590
591
  return {
591
592
  ...infoGroup,
592
593
  fingerprintInfoGroup: {
593
594
  [platform]: {
594
- fingerprintHash: infoGroup.fingerprintHash,
595
- fingerprintSource: infoGroup.fingerprintSource,
595
+ fingerprintHash: infoGroup.expoUpdatesRuntimeFingerprintHash,
596
+ fingerprintSource: infoGroup.expoUpdatesRuntimeFingerprintSource,
596
597
  },
597
598
  },
598
599
  };
@@ -8,11 +8,11 @@ export declare function resolveRuntimeVersionUsingCLIAsync({ platform, workflow,
8
8
  cwd?: string;
9
9
  }): Promise<{
10
10
  runtimeVersion: string | null;
11
- fingerprint: {
11
+ expoUpdatesRuntimeFingerprint: {
12
12
  fingerprintSources: object[];
13
13
  isDebugFingerprintSource: boolean;
14
14
  } | null;
15
- fingerprintHash: string | null;
15
+ expoUpdatesRuntimeFingerprintHash: string | null;
16
16
  }>;
17
17
  export declare function resolveRuntimeVersionAsync({ exp, platform, workflow, projectDir, env, cwd, }: {
18
18
  exp: ExpoConfig;
@@ -23,9 +23,9 @@ export declare function resolveRuntimeVersionAsync({ exp, platform, workflow, pr
23
23
  cwd?: string;
24
24
  }): Promise<{
25
25
  runtimeVersion: string | null;
26
- fingerprint: {
26
+ expoUpdatesRuntimeFingerprint: {
27
27
  fingerprintSources: object[];
28
28
  isDebugFingerprintSource: boolean;
29
29
  } | null;
30
- fingerprintHash: string | null;
30
+ expoUpdatesRuntimeFingerprintHash: string | null;
31
31
  } | null>;
@@ -16,13 +16,13 @@ async function resolveRuntimeVersionUsingCLIAsync({ platform, workflow, projectD
16
16
  log_1.default.debug(resolvedRuntimeVersionJSONResult);
17
17
  return {
18
18
  runtimeVersion: runtimeVersionResult.runtimeVersion ?? null,
19
- fingerprint: runtimeVersionResult.fingerprintSources
19
+ expoUpdatesRuntimeFingerprint: runtimeVersionResult.fingerprintSources
20
20
  ? {
21
21
  fingerprintSources: runtimeVersionResult.fingerprintSources,
22
22
  isDebugFingerprintSource: useDebugFingerprintSource,
23
23
  }
24
24
  : null,
25
- fingerprintHash: runtimeVersionResult.fingerprintSources
25
+ expoUpdatesRuntimeFingerprintHash: runtimeVersionResult.fingerprintSources
26
26
  ? runtimeVersionResult.runtimeVersion
27
27
  : null,
28
28
  };
@@ -34,8 +34,8 @@ async function resolveRuntimeVersionAsync({ exp, platform, workflow, projectDir,
34
34
  // than the versioned @expo/config-plugins dependency in the project)
35
35
  return {
36
36
  runtimeVersion: await config_plugins_1.Updates.getRuntimeVersionNullableAsync(projectDir, exp, platform),
37
- fingerprint: null,
38
- fingerprintHash: null,
37
+ expoUpdatesRuntimeFingerprint: null,
38
+ expoUpdatesRuntimeFingerprintHash: null,
39
39
  };
40
40
  }
41
41
  try {
@@ -8,6 +8,7 @@ const mime_1 = tslib_1.__importDefault(require("mime"));
8
8
  const minizlib_1 = require("minizlib");
9
9
  const node_fetch_1 = tslib_1.__importStar(require("node-fetch"));
10
10
  const node_fs_1 = tslib_1.__importStar(require("node:fs"));
11
+ const promises_1 = require("node:fs/promises");
11
12
  const node_path_1 = tslib_1.__importDefault(require("node:path"));
12
13
  const promise_retry_1 = tslib_1.__importDefault(require("promise-retry"));
13
14
  const MAX_RETRIES = 4;
@@ -32,6 +33,21 @@ const isCompressible = (contentType, size) => {
32
33
  return true;
33
34
  }
34
35
  };
36
+ const getContentTypeAsync = async (filePath) => {
37
+ let contentType = mime_1.default.getType(node_path_1.default.basename(filePath));
38
+ if (!contentType) {
39
+ const fileContent = await (0, promises_1.readFile)(filePath, 'utf-8');
40
+ try {
41
+ // check if file is valid JSON without an extension, e.g. for the apple app site association file
42
+ const parsedData = JSON.parse(fileContent);
43
+ if (parsedData) {
44
+ contentType = 'application/json';
45
+ }
46
+ }
47
+ catch { }
48
+ }
49
+ return contentType;
50
+ };
35
51
  let sharedAgent;
36
52
  const getAgent = () => {
37
53
  if (sharedAgent) {
@@ -52,11 +68,11 @@ const getAgent = () => {
52
68
  };
53
69
  async function uploadAsync(params) {
54
70
  const { filePath, signal, compress, method = 'POST', url, headers: headersInit, ...requestInit } = params;
55
- const stat = await node_fs_1.default.promises.stat(params.filePath);
71
+ const stat = await node_fs_1.default.promises.stat(filePath);
56
72
  if (stat.size > MAX_UPLOAD_SIZE) {
57
- throw new Error(`Upload of "${params.filePath}" aborted: File size is greater than the upload limit (>500MB)`);
73
+ throw new Error(`Upload of "${filePath}" aborted: File size is greater than the upload limit (>500MB)`);
58
74
  }
59
- const contentType = mime_1.default.getType(node_path_1.default.basename(params.filePath));
75
+ const contentType = await getContentTypeAsync(filePath);
60
76
  return await (0, promise_retry_1.default)(async (retry) => {
61
77
  const headers = new node_fetch_1.Headers(headersInit);
62
78
  if (contentType) {