eas-cli 19.1.0 → 20.0.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.
Files changed (30) hide show
  1. package/README.md +301 -100
  2. package/build/commands/go.d.ts +1 -0
  3. package/build/commands/go.js +29 -1
  4. package/build/commands/observe/events.d.ts +3 -3
  5. package/build/commands/observe/events.js +69 -51
  6. package/build/commands/observe/{logs.d.ts → metrics-summary.d.ts} +3 -11
  7. package/build/commands/observe/metrics-summary.js +95 -0
  8. package/build/commands/observe/metrics.d.ts +8 -3
  9. package/build/commands/observe/metrics.js +63 -47
  10. package/build/commands/observe/routes.d.ts +0 -1
  11. package/build/commands/observe/routes.js +0 -4
  12. package/build/commands/observe/versions.d.ts +0 -1
  13. package/build/commands/observe/versions.js +0 -4
  14. package/build/commands/update/embedded/upload.d.ts +20 -0
  15. package/build/commands/update/embedded/upload.js +129 -0
  16. package/build/graphql/client.js +1 -0
  17. package/build/graphql/generated.d.ts +70 -1
  18. package/build/graphql/mutations/EmbeddedUpdateAssetMutation.d.ts +13 -0
  19. package/build/graphql/mutations/EmbeddedUpdateAssetMutation.js +32 -0
  20. package/build/graphql/mutations/EmbeddedUpdateMutation.d.ts +14 -0
  21. package/build/graphql/mutations/EmbeddedUpdateMutation.js +37 -0
  22. package/build/graphql/queries/WorkflowRunQuery.d.ts +2 -1
  23. package/build/graphql/queries/WorkflowRunQuery.js +19 -6
  24. package/build/observe/formatCustomEvents.js +5 -5
  25. package/build/observe/metricNames.js +2 -0
  26. package/build/update/embeddedManifest.d.ts +3 -0
  27. package/build/update/embeddedManifest.js +28 -0
  28. package/oclif.manifest.json +2476 -2350
  29. package/package.json +6 -6
  30. package/build/commands/observe/logs.js +0 -141
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const eas_build_job_1 = require("@expo/eas-build-job");
5
+ const config_plugins_1 = require("@expo/config-plugins");
6
+ const core_1 = require("@oclif/core");
7
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
8
+ const EasCommand_1 = tslib_1.__importDefault(require("../../../commandUtils/EasCommand"));
9
+ const flags_1 = require("../../../commandUtils/flags");
10
+ const EmbeddedUpdateAssetMutation_1 = require("../../../graphql/mutations/EmbeddedUpdateAssetMutation");
11
+ const EmbeddedUpdateMutation_1 = require("../../../graphql/mutations/EmbeddedUpdateMutation");
12
+ const AppPlatform_1 = require("../../../graphql/types/AppPlatform");
13
+ const log_1 = tslib_1.__importDefault(require("../../../log"));
14
+ const ora_1 = require("../../../ora");
15
+ const embeddedManifest_1 = require("../../../update/embeddedManifest");
16
+ const uploads_1 = require("../../../uploads");
17
+ const json_1 = require("../../../utils/json");
18
+ const promise_1 = require("../../../utils/promise");
19
+ const MAX_ATTEMPTS = 10;
20
+ const RETRY_BASE_DELAY_MS = 3_000;
21
+ const RETRY_MAX_DELAY_MS = 10_000;
22
+ class UpdateEmbeddedUpload extends EasCommand_1.default {
23
+ static description = 'upload the JS bundle embedded in a native build so EAS Update can generate bsdiff patches against it';
24
+ static examples = [
25
+ '$ eas update:embedded:upload --platform ios --bundle ios/build/App.app/main.jsbundle --manifest ios/build/App.app/app.manifest --channel production',
26
+ '$ eas update:embedded:upload --platform android --bundle android/app/src/main/assets/index.android.bundle --manifest android/app/src/main/assets/app.manifest --channel production --build-id <BUILD-ID>',
27
+ ];
28
+ static flags = {
29
+ platform: core_1.Flags.option({
30
+ char: 'p',
31
+ description: 'Platform of the embedded bundle',
32
+ options: [eas_build_job_1.Platform.IOS, eas_build_job_1.Platform.ANDROID],
33
+ required: true,
34
+ })(),
35
+ bundle: core_1.Flags.string({
36
+ description: 'Path to the embedded JS bundle file',
37
+ required: true,
38
+ }),
39
+ manifest: core_1.Flags.string({
40
+ description: 'Path to the app.manifest file embedded in the build',
41
+ required: true,
42
+ }),
43
+ channel: core_1.Flags.string({
44
+ description: 'Channel name the embedded update should be associated with',
45
+ required: true,
46
+ }),
47
+ 'build-id': core_1.Flags.string({
48
+ description: 'EAS Build ID that produced this binary (required when invoked from EAS Build)',
49
+ required: false,
50
+ }),
51
+ ...flags_1.EasNonInteractiveAndJsonFlags,
52
+ };
53
+ static contextDefinition = {
54
+ ...this.ContextOptions.ProjectConfig,
55
+ };
56
+ async runAsync() {
57
+ const { flags } = await this.parse(UpdateEmbeddedUpload);
58
+ const { json: jsonFlag, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
59
+ const platform = flags.platform;
60
+ const bundlePath = flags.bundle;
61
+ const manifestPath = flags.manifest;
62
+ const channelName = flags.channel;
63
+ const buildId = flags['build-id'];
64
+ const { loggedIn: { graphqlClient }, privateProjectConfig: { projectId, exp, projectDir }, } = await this.getContextAsync(UpdateEmbeddedUpload, {
65
+ nonInteractive,
66
+ withServerSideEnvironment: null,
67
+ });
68
+ if (jsonFlag) {
69
+ (0, json_1.enableJsonOutput)();
70
+ }
71
+ if (!(await fs_extra_1.default.pathExists(bundlePath))) {
72
+ core_1.Errors.error(`Bundle file not found at "${bundlePath}". Check that the path is correct and points to the JS bundle in your native build output.`, { exit: 1 });
73
+ }
74
+ const { id: embeddedUpdateId } = await (0, embeddedManifest_1.readEmbeddedManifestAsync)(manifestPath);
75
+ const runtimeVersion = await config_plugins_1.Updates.getRuntimeVersionNullableAsync(projectDir, exp, platform);
76
+ if (runtimeVersion === null) {
77
+ core_1.Errors.error(`Could not resolve runtimeVersion for platform "${platform}". ` +
78
+ `Ensure runtimeVersion is set in your app.json under the expo key.`, { exit: 1 });
79
+ }
80
+ const appPlatform = (0, AppPlatform_1.toAppPlatform)(platform);
81
+ const uploadSpinner = (0, ora_1.ora)('Uploading bundle...').start();
82
+ const contentType = 'application/javascript';
83
+ const uploadSpec = await EmbeddedUpdateAssetMutation_1.EmbeddedUpdateAssetMutation.getSignedUploadSpecAsync(graphqlClient, {
84
+ appId: projectId,
85
+ embeddedUpdateId,
86
+ contentType,
87
+ });
88
+ await (0, uploads_1.uploadWithPresignedPostWithRetryAsync)(bundlePath, { url: uploadSpec.presignedUrl, fields: uploadSpec.fields }, () => { });
89
+ uploadSpinner.succeed('Uploaded bundle');
90
+ const registerSpinner = (0, ora_1.ora)('Registering embedded update...').start();
91
+ let embeddedUpdate;
92
+ for (let attempt = 1; attempt <= MAX_ATTEMPTS; attempt++) {
93
+ try {
94
+ embeddedUpdate = await EmbeddedUpdateMutation_1.EmbeddedUpdateMutation.uploadEmbeddedUpdateAsync(graphqlClient, {
95
+ appId: projectId,
96
+ platform: appPlatform,
97
+ runtimeVersion,
98
+ channel: channelName,
99
+ embeddedUpdateId,
100
+ turtleBuildId: buildId,
101
+ });
102
+ break;
103
+ }
104
+ catch (e) {
105
+ if ((0, EmbeddedUpdateMutation_1.isEmbeddedUpdateAssetNotAvailableError)(e)) {
106
+ if (attempt < MAX_ATTEMPTS) {
107
+ await (0, promise_1.sleepAsync)(Math.min(RETRY_BASE_DELAY_MS * 2 ** (attempt - 1), RETRY_MAX_DELAY_MS));
108
+ }
109
+ continue;
110
+ }
111
+ registerSpinner.fail('Failed to register embedded update');
112
+ if ((0, EmbeddedUpdateMutation_1.isEmbeddedUpdateAlreadyExistsError)(e)) {
113
+ core_1.Errors.error(`An embedded update with id "${embeddedUpdateId}" is already registered for this app. Delete it before re-uploading.`, { exit: 1 });
114
+ }
115
+ throw e;
116
+ }
117
+ }
118
+ if (embeddedUpdate === undefined) {
119
+ registerSpinner.fail('Failed to register embedded update');
120
+ throw new Error('Embedded bundle could not be processed in time. Try re-running the command in a moment.');
121
+ }
122
+ registerSpinner.succeed(`Registered ${platform} embedded update (runtimeVersion: ${runtimeVersion}, channel: "${channelName}")`);
123
+ log_1.default.log(`Embedded update ID: ${embeddedUpdate.id}`);
124
+ if (jsonFlag) {
125
+ (0, json_1.printJsonOnlyOutput)(embeddedUpdate);
126
+ }
127
+ }
128
+ }
129
+ exports.default = UpdateEmbeddedUpload;
@@ -16,6 +16,7 @@ async function withErrorHandlingAsync(promise) {
16
16
  ![
17
17
  'EAS_BUILD_FREE_TIER_LIMIT_EXCEEDED',
18
18
  'EAS_BUILD_FREE_TIER_IOS_LIMIT_EXCEEDED',
19
+ 'EMBEDDED_UPDATE_ASSET_NOT_AVAILABLE',
19
20
  ].includes(e?.extensions?.errorCode))) {
20
21
  log_1.default.error(`We've encountered a transient error. Try again shortly.`);
21
22
  }
@@ -3990,6 +3990,12 @@ export type CreateConvexTeamConnectionInput = {
3990
3990
  };
3991
3991
  export type CreateDeviceRunSessionInput = {
3992
3992
  appId: Scalars['ID']['input'];
3993
+ /**
3994
+ * Override for the underlying turtle job run's max run time, in minutes. Must
3995
+ * be non-negative and smaller than 120 (2 hours). Only customizable on paid
3996
+ * plans. If omitted, the default is derived based on the job run's priority.
3997
+ */
3998
+ maxRunTimeMinutes?: InputMaybe<Scalars['Int']['input']>;
3993
3999
  /**
3994
4000
  * The version of the package backing the device run session (e.g. "0.1.3-alpha.3").
3995
4001
  * If omitted, consumers treat the session as pinned to "latest".
@@ -5231,7 +5237,8 @@ export type EmbeddedUpdateMutation = {
5231
5237
  __typename?: 'EmbeddedUpdateMutation';
5232
5238
  /**
5233
5239
  * Register an embedded bundle as the launch asset for a given app/platform/channel.
5234
- * Returns EMBEDDED_UPDATE_ASSET_NOT_AVAILABLE if the asset has not been finalized yet.
5240
+ * Returns EMBEDDED_UPDATE_ASSET_NOT_AVAILABLE if the asset has not been finalized yet,
5241
+ * or EMBEDDED_UPDATE_ALREADY_EXISTS if an embedded update with this id is already registered.
5235
5242
  */
5236
5243
  uploadEmbeddedUpdate: EmbeddedUpdate;
5237
5244
  };
@@ -5475,6 +5482,8 @@ export type ExperimentationQuery = {
5475
5482
  export type ExpoGoBuildQuery = {
5476
5483
  __typename?: 'ExpoGoBuildQuery';
5477
5484
  repackConfiguration: ExpoGoProjectConfiguration;
5485
+ supportedSdkVersionKeys: Array<Scalars['String']['output']>;
5486
+ supportedSdkVersions: Array<ExpoGoSdkVersion>;
5478
5487
  };
5479
5488
  export type ExpoGoBuildQueryRepackConfigurationArgs = {
5480
5489
  input: ExpoGoRepackInput;
@@ -5496,6 +5505,13 @@ export type ExpoGoRepackInput = {
5496
5505
  bundleId: Scalars['String']['input'];
5497
5506
  sdkVersion?: InputMaybe<Scalars['String']['input']>;
5498
5507
  };
5508
+ export type ExpoGoSdkVersion = {
5509
+ __typename?: 'ExpoGoSdkVersion';
5510
+ isBeta: Scalars['Boolean']['output'];
5511
+ isDeprecated: Scalars['Boolean']['output'];
5512
+ isLatest: Scalars['Boolean']['output'];
5513
+ sdkVersion: Scalars['String']['output'];
5514
+ };
5499
5515
  export type FcmSnippet = FcmSnippetLegacy | FcmSnippetV1;
5500
5516
  export type FcmSnippetLegacy = {
5501
5517
  __typename?: 'FcmSnippetLegacy';
@@ -6296,6 +6312,8 @@ export type JobRun = {
6296
6312
  initiatingActor?: Maybe<Actor>;
6297
6313
  isWaived: Scalars['Boolean']['output'];
6298
6314
  logFileUrls: Array<Scalars['String']['output']>;
6315
+ /** Max run time in seconds for this job run. */
6316
+ maxRunTimeSeconds?: Maybe<Scalars['Int']['output']>;
6299
6317
  name: Scalars['String']['output'];
6300
6318
  priority: JobRunPriority;
6301
6319
  /** String describing the worker profile used to run this job run. */
@@ -6303,6 +6321,7 @@ export type JobRun = {
6303
6321
  startedAt?: Maybe<Scalars['DateTime']['output']>;
6304
6322
  status: JobRunStatus;
6305
6323
  updateGroups: Array<Array<Update>>;
6324
+ workflowJob?: Maybe<WorkflowJob>;
6306
6325
  };
6307
6326
  export type JobRunError = {
6308
6327
  __typename?: 'JobRunError';
@@ -14525,6 +14544,40 @@ export type EnsureDeviceRunSessionStoppedMutation = {
14525
14544
  };
14526
14545
  };
14527
14546
  };
14547
+ export type GetSignedEmbeddedUpdateAssetUploadSpecMutationVariables = Exact<{
14548
+ appId: Scalars['ID']['input'];
14549
+ embeddedUpdateId: Scalars['ID']['input'];
14550
+ contentType: Scalars['String']['input'];
14551
+ }>;
14552
+ export type GetSignedEmbeddedUpdateAssetUploadSpecMutation = {
14553
+ __typename?: 'RootMutation';
14554
+ embeddedUpdateAsset: {
14555
+ __typename?: 'EmbeddedUpdateAssetMutation';
14556
+ getSignedEmbeddedUpdateAssetUploadSpecifications: {
14557
+ __typename?: 'EmbeddedUpdateAssetUploadSpec';
14558
+ storageKey: string;
14559
+ presignedUrl: string;
14560
+ fields: any;
14561
+ };
14562
+ };
14563
+ };
14564
+ export type UploadEmbeddedUpdateMutationVariables = Exact<{
14565
+ input: UploadEmbeddedUpdateInput;
14566
+ }>;
14567
+ export type UploadEmbeddedUpdateMutation = {
14568
+ __typename?: 'RootMutation';
14569
+ embeddedUpdate: {
14570
+ __typename?: 'EmbeddedUpdateMutation';
14571
+ uploadEmbeddedUpdate: {
14572
+ __typename?: 'EmbeddedUpdate';
14573
+ id: string;
14574
+ platform: AppPlatform;
14575
+ runtimeVersion: string;
14576
+ channel: string;
14577
+ createdAt: any;
14578
+ };
14579
+ };
14580
+ };
14528
14581
  export type CreateEnvironmentSecretForAccountMutationVariables = Exact<{
14529
14582
  input: CreateEnvironmentSecretInput;
14530
14583
  accountId: Scalars['String']['input'];
@@ -18596,6 +18649,22 @@ export type WorkflowJobByIdQuery = {
18596
18649
  };
18597
18650
  };
18598
18651
  };
18652
+ export type ExpoGoSupportedSdkVersionsQueryVariables = Exact<{
18653
+ [key: string]: never;
18654
+ }>;
18655
+ export type ExpoGoSupportedSdkVersionsQuery = {
18656
+ __typename?: 'RootQuery';
18657
+ expoGoBuild: {
18658
+ __typename?: 'ExpoGoBuildQuery';
18659
+ supportedSdkVersions: Array<{
18660
+ __typename?: 'ExpoGoSdkVersion';
18661
+ sdkVersion: string;
18662
+ isLatest: boolean;
18663
+ isBeta: boolean;
18664
+ isDeprecated: boolean;
18665
+ }>;
18666
+ };
18667
+ };
18599
18668
  export type ExpoGoRepackConfigurationQueryVariables = Exact<{
18600
18669
  input: ExpoGoRepackInput;
18601
18670
  }>;
@@ -0,0 +1,13 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
+ export type EmbeddedUpdateAssetUploadSpec = {
3
+ storageKey: string;
4
+ presignedUrl: string;
5
+ fields: Record<string, string>;
6
+ };
7
+ export declare const EmbeddedUpdateAssetMutation: {
8
+ getSignedUploadSpecAsync(graphqlClient: ExpoGraphqlClient, { appId, embeddedUpdateId, contentType, }: {
9
+ appId: string;
10
+ embeddedUpdateId: string;
11
+ contentType: string;
12
+ }): Promise<EmbeddedUpdateAssetUploadSpec>;
13
+ };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmbeddedUpdateAssetMutation = 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
+ exports.EmbeddedUpdateAssetMutation = {
8
+ async getSignedUploadSpecAsync(graphqlClient, { appId, embeddedUpdateId, contentType, }) {
9
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
10
+ .mutation((0, graphql_tag_1.default) `
11
+ mutation GetSignedEmbeddedUpdateAssetUploadSpec(
12
+ $appId: ID!
13
+ $embeddedUpdateId: ID!
14
+ $contentType: String!
15
+ ) {
16
+ embeddedUpdateAsset {
17
+ getSignedEmbeddedUpdateAssetUploadSpecifications(
18
+ appId: $appId
19
+ embeddedUpdateId: $embeddedUpdateId
20
+ contentType: $contentType
21
+ ) {
22
+ storageKey
23
+ presignedUrl
24
+ fields
25
+ }
26
+ }
27
+ }
28
+ `, { appId, embeddedUpdateId, contentType })
29
+ .toPromise());
30
+ return data.embeddedUpdateAsset.getSignedEmbeddedUpdateAssetUploadSpecifications;
31
+ },
32
+ };
@@ -0,0 +1,14 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
+ import { AppPlatform, UploadEmbeddedUpdateInput } from '../generated';
3
+ export type EmbeddedUpdateResult = {
4
+ id: string;
5
+ platform: AppPlatform;
6
+ runtimeVersion: string;
7
+ channel: string;
8
+ createdAt: string;
9
+ };
10
+ export declare function isEmbeddedUpdateAssetNotAvailableError(error: unknown): boolean;
11
+ export declare function isEmbeddedUpdateAlreadyExistsError(error: unknown): boolean;
12
+ export declare const EmbeddedUpdateMutation: {
13
+ uploadEmbeddedUpdateAsync(graphqlClient: ExpoGraphqlClient, input: UploadEmbeddedUpdateInput): Promise<EmbeddedUpdateResult>;
14
+ };
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmbeddedUpdateMutation = void 0;
4
+ exports.isEmbeddedUpdateAssetNotAvailableError = isEmbeddedUpdateAssetNotAvailableError;
5
+ exports.isEmbeddedUpdateAlreadyExistsError = isEmbeddedUpdateAlreadyExistsError;
6
+ const tslib_1 = require("tslib");
7
+ const core_1 = require("@urql/core");
8
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
9
+ const client_1 = require("../client");
10
+ function isEmbeddedUpdateAssetNotAvailableError(error) {
11
+ return (error instanceof core_1.CombinedError &&
12
+ error.graphQLErrors.some(e => e.extensions?.['errorCode'] === 'EMBEDDED_UPDATE_ASSET_NOT_AVAILABLE'));
13
+ }
14
+ function isEmbeddedUpdateAlreadyExistsError(error) {
15
+ return (error instanceof core_1.CombinedError &&
16
+ error.graphQLErrors.some(e => e.extensions?.['errorCode'] === 'EMBEDDED_UPDATE_ALREADY_EXISTS'));
17
+ }
18
+ exports.EmbeddedUpdateMutation = {
19
+ async uploadEmbeddedUpdateAsync(graphqlClient, input) {
20
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
21
+ .mutation((0, graphql_tag_1.default) `
22
+ mutation UploadEmbeddedUpdate($input: UploadEmbeddedUpdateInput!) {
23
+ embeddedUpdate {
24
+ uploadEmbeddedUpdate(input: $input) {
25
+ id
26
+ platform
27
+ runtimeVersion
28
+ channel
29
+ createdAt
30
+ }
31
+ }
32
+ }
33
+ `, { input })
34
+ .toPromise());
35
+ return data.embeddedUpdate.uploadEmbeddedUpdate;
36
+ },
37
+ };
@@ -1,6 +1,7 @@
1
1
  import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
- import { ExpoGoProjectConfiguration, ExpoGoRepackInput, WorkflowRunByIdQuery, WorkflowRunByIdWithJobsQuery, WorkflowRunFragment, WorkflowRunStatus } from '../generated';
2
+ import { ExpoGoProjectConfiguration, ExpoGoRepackInput, ExpoGoSdkVersion, WorkflowRunByIdQuery, WorkflowRunByIdWithJobsQuery, WorkflowRunFragment, WorkflowRunStatus } from '../generated';
3
3
  export declare const WorkflowRunQuery: {
4
+ expoGoSupportedSdkVersionsAsync(graphqlClient: ExpoGraphqlClient): Promise<ExpoGoSdkVersion[]>;
4
5
  expoGoRepackConfigurationAsync(graphqlClient: ExpoGraphqlClient, input: ExpoGoRepackInput): Promise<ExpoGoProjectConfiguration>;
5
6
  byIdAsync(graphqlClient: ExpoGraphqlClient, workflowRunId: string, { useCache }?: {
6
7
  useCache?: boolean;
@@ -9,11 +9,26 @@ const client_1 = require("../client");
9
9
  const WorkflowJob_1 = require("../types/WorkflowJob");
10
10
  const WorkflowRun_1 = require("../types/WorkflowRun");
11
11
  exports.WorkflowRunQuery = {
12
+ async expoGoSupportedSdkVersionsAsync(graphqlClient) {
13
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
14
+ .query((0, graphql_tag_1.default) `
15
+ query ExpoGoSupportedSdkVersions {
16
+ expoGoBuild {
17
+ supportedSdkVersions {
18
+ sdkVersion
19
+ isLatest
20
+ isBeta
21
+ isDeprecated
22
+ }
23
+ }
24
+ }
25
+ `, {}, { requestPolicy: 'network-only' })
26
+ .toPromise());
27
+ return data.expoGoBuild.supportedSdkVersions;
28
+ },
12
29
  async expoGoRepackConfigurationAsync(graphqlClient, input) {
13
30
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
14
- .query(
15
- /* eslint-disable graphql/template-strings */
16
- (0, graphql_tag_1.default) `
31
+ .query((0, graphql_tag_1.default) `
17
32
  query ExpoGoRepackConfiguration($input: ExpoGoRepackInput!) {
18
33
  expoGoBuild {
19
34
  repackConfiguration(input: $input) {
@@ -25,9 +40,7 @@ exports.WorkflowRunQuery = {
25
40
  }
26
41
  }
27
42
  }
28
- `,
29
- /* eslint-enable graphql/template-strings */
30
- { input }, { requestPolicy: 'network-only' })
43
+ `, { input }, { requestPolicy: 'network-only' })
31
44
  .toPromise());
32
45
  return data.expoGoBuild.repackConfiguration;
33
46
  },
@@ -21,7 +21,7 @@ function formatSeverity(event) {
21
21
  }
22
22
  function buildObserveCustomEventsTable(events, pageInfo, options) {
23
23
  if (events.length === 0) {
24
- return chalk_1.default.yellow('No custom events found.');
24
+ return chalk_1.default.yellow('No events found.');
25
25
  }
26
26
  const showEventName = !options?.eventName;
27
27
  const hasSeverity = events.some(e => e.severityText != null || e.severityNumber != null);
@@ -49,7 +49,7 @@ function buildObserveCustomEventsTable(events, pageInfo, options) {
49
49
  const totalDesc = options.totalEventCount != null
50
50
  ? ` — ${options.totalEventCount.toLocaleString()} total events`
51
51
  : '';
52
- const subject = options.eventName ? `${options.eventName} events` : 'Custom events';
52
+ const subject = options.eventName ? `${options.eventName} events` : 'Events';
53
53
  lines.push(chalk_1.default.bold(`${subject} ${timeDesc}${totalDesc}`.trim()), '');
54
54
  }
55
55
  lines.push((0, renderTextTable_1.default)(headers, rows));
@@ -94,7 +94,7 @@ function buildObserveCustomEventsEmptyWithSuggestionsTable(eventName, names, opt
94
94
  const timeDesc = options ? (0, formatUtils_1.buildTimeRangeDescription)(options) : '';
95
95
  lines.push(chalk_1.default.yellow(`No events found matching "${eventName}" ${timeDesc}.`.trim()));
96
96
  if (names.length === 0) {
97
- lines.push('', chalk_1.default.yellow('No custom event names found in this time range.'));
97
+ lines.push('', chalk_1.default.yellow('No event names found in this time range.'));
98
98
  return lines.join('\n');
99
99
  }
100
100
  lines.push('', 'Available event names in this time range:', '');
@@ -116,14 +116,14 @@ function buildObserveCustomEventsEmptyWithSuggestionsJson(eventName, names, isTr
116
116
  }
117
117
  function buildObserveCustomEventNamesTable(names, options) {
118
118
  if (names.length === 0) {
119
- return chalk_1.default.yellow('No custom event names found.');
119
+ return chalk_1.default.yellow('No event names found.');
120
120
  }
121
121
  const headers = ['Event Name', 'Count'];
122
122
  const rows = names.map(n => [n.eventName, n.count.toLocaleString()]);
123
123
  const lines = [];
124
124
  if (options) {
125
125
  const timeDesc = (0, formatUtils_1.buildTimeRangeDescription)(options);
126
- const subject = 'Custom event names';
126
+ const subject = 'Event names';
127
127
  lines.push(chalk_1.default.bold(`${subject} ${timeDesc}`.trim()), '');
128
128
  }
129
129
  lines.push((0, renderTextTable_1.default)(headers, rows));
@@ -11,6 +11,7 @@ exports.METRIC_ALIASES = {
11
11
  cold_launch: 'expo.app_startup.cold_launch_time',
12
12
  warm_launch: 'expo.app_startup.warm_launch_time',
13
13
  bundle_load: 'expo.app_startup.bundle_load_time',
14
+ update_download: 'expo.updates.download_time',
14
15
  };
15
16
  exports.NAVIGATION_METRIC_ALIASES = {
16
17
  cold_ttr: 'expo.navigation.cold_ttr',
@@ -25,6 +26,7 @@ exports.METRIC_SHORT_NAMES = {
25
26
  'expo.app_startup.tti': 'Startup TTI',
26
27
  'expo.app_startup.ttr': 'Startup TTR',
27
28
  'expo.app_startup.bundle_load_time': 'Bundle Load',
29
+ 'expo.updates.download_time': 'Update Download',
28
30
  'expo.navigation.cold_ttr': 'Nav Cold TTR',
29
31
  'expo.navigation.warm_ttr': 'Nav Warm TTR',
30
32
  'expo.navigation.tti': 'Nav TTI',
@@ -0,0 +1,3 @@
1
+ export declare function readEmbeddedManifestAsync(manifestPath: string): Promise<{
2
+ id: string;
3
+ }>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readEmbeddedManifestAsync = readEmbeddedManifestAsync;
4
+ const tslib_1 = require("tslib");
5
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
6
+ const uuid = tslib_1.__importStar(require("uuid"));
7
+ async function readEmbeddedManifestAsync(manifestPath) {
8
+ let parsed;
9
+ try {
10
+ parsed = JSON.parse(await fs_extra_1.default.readFile(manifestPath, 'utf8'));
11
+ }
12
+ catch {
13
+ throw new Error(`Could not read or parse manifest at "${manifestPath}". ` +
14
+ `Check the file exists, is readable, and contains valid JSON.`);
15
+ }
16
+ if (typeof parsed !== 'object' ||
17
+ parsed === null ||
18
+ typeof parsed.id !== 'string') {
19
+ throw new Error(`Manifest at "${manifestPath}" is missing the required "id" field. ` +
20
+ `Make sure you're pointing at the app.manifest generated by expo-updates during your native build, not a different JSON file.`);
21
+ }
22
+ const id = parsed.id;
23
+ if (!uuid.validate(id)) {
24
+ throw new Error(`Manifest at "${manifestPath}" has an invalid "id" field ("${id}" is not a UUID). ` +
25
+ `Make sure you're pointing at the app.manifest generated by expo-updates during your native build.`);
26
+ }
27
+ return { id };
28
+ }