eas-cli 21.3.0 → 21.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.
@@ -137,11 +137,14 @@ const SERVER_SIDE_DEFINED_ERRORS = {
137
137
  VALIDATION_ERROR: errors_1.RequestValidationError,
138
138
  };
139
139
  function handleBuildRequestError(error, platform) {
140
- log_1.default.debug(JSON.stringify(error.graphQLErrors, null, 2));
141
- const graphQLErrorCode = error?.graphQLErrors?.[0]?.extensions?.errorCode;
142
- if (graphQLErrorCode in SERVER_SIDE_DEFINED_ERRORS) {
140
+ logBuildRequestErrorDebugInfo(error);
141
+ const graphQLErrors = Array.isArray(error?.graphQLErrors)
142
+ ? error.graphQLErrors
143
+ : [];
144
+ const graphQLErrorCode = graphQLErrors[0]?.extensions?.errorCode;
145
+ if (graphQLErrorCode && graphQLErrorCode in SERVER_SIDE_DEFINED_ERRORS) {
143
146
  const ErrorClass = SERVER_SIDE_DEFINED_ERRORS[graphQLErrorCode];
144
- throw new ErrorClass(error?.graphQLErrors?.[0]?.message);
147
+ throw new ErrorClass(graphQLErrors[0]?.message);
145
148
  }
146
149
  else if (graphQLErrorCode === 'EAS_BUILD_DOWN_FOR_MAINTENANCE') {
147
150
  throw new errors_1.EasBuildDownForMaintenanceError(`EAS Build is down for maintenance. Try again later. Check ${(0, log_1.link)('https://status.expo.dev/')} for updates.`);
@@ -149,22 +152,104 @@ function handleBuildRequestError(error, platform) {
149
152
  else if (graphQLErrorCode === 'EAS_BUILD_TOO_MANY_PENDING_BUILDS') {
150
153
  throw new errors_1.EasBuildTooManyPendingBuildsError(`You have already reached the maximum number of pending ${platform_1.requestedPlatformDisplayNames[platform]} builds for your account. Try again later.`);
151
154
  }
152
- else if (error?.graphQLErrors) {
153
- const errorMessage = error.graphQLErrors
154
- .map((graphQLError) => {
155
- const requestIdLine = graphQLError?.extensions?.requestId
156
- ? `\nRequest ID: ${graphQLError.extensions.requestId}`
157
- : '';
158
- const errorMessageLine = graphQLError?.message
159
- ? `\nError message: ${graphQLError.message}`
160
- : '';
161
- return `${requestIdLine}${errorMessageLine}`;
162
- })
163
- .join('');
164
- throw new Error(`Build request failed. Make sure you are using the latest eas-cli version. If the problem persists, report the issue.${errorMessage}`);
155
+ else if (Array.isArray(error?.graphQLErrors)) {
156
+ const errorDetails = formatBuildRequestErrorDetails(error, graphQLErrors);
157
+ throw new Error(`Build request failed. Make sure you are using the latest eas-cli version. If the problem persists, report the issue.${errorDetails}`);
165
158
  }
166
159
  throw error;
167
160
  }
161
+ function formatBuildRequestErrorDetails(error, graphQLErrors) {
162
+ const details = graphQLErrors
163
+ .map((graphQLError) => {
164
+ const requestIdLine = graphQLError?.extensions?.requestId
165
+ ? `\nRequest ID: ${graphQLError.extensions.requestId}`
166
+ : '';
167
+ const errorMessageLine = graphQLError?.message
168
+ ? `\nError message: ${graphQLError.message}`
169
+ : '';
170
+ return `${requestIdLine}${errorMessageLine}`;
171
+ })
172
+ .filter(Boolean);
173
+ if (error?.networkError?.message) {
174
+ details.push(`\nNetwork error: ${error.networkError.message}`);
175
+ }
176
+ const response = error?.response;
177
+ if (response?.status !== undefined || response?.statusText) {
178
+ const status = [response.status, response.statusText]
179
+ .filter(value => value !== undefined && value !== '')
180
+ .join(' ');
181
+ details.push(`\nResponse status: ${status}`);
182
+ }
183
+ const responseRequestId = getResponseRequestId(response);
184
+ const graphQLRequestIds = new Set(graphQLErrors.map(graphQLError => graphQLError?.extensions?.requestId));
185
+ if (responseRequestId && !graphQLRequestIds.has(responseRequestId)) {
186
+ details.push(`\nRequest ID: ${responseRequestId}`);
187
+ }
188
+ if (details.length === 0 && error?.message) {
189
+ details.push(`\nError message: ${error.message}`);
190
+ }
191
+ return details.join('');
192
+ }
193
+ function getResponseRequestId(response) {
194
+ return (response?.headers?.get?.('expo-request-id') ?? response?.headers?.get?.('x-request-id') ?? null);
195
+ }
196
+ function logBuildRequestErrorDebugInfo(error) {
197
+ const debugInfo = collectBuildRequestErrorDebugInfo(error);
198
+ if (debugInfo) {
199
+ log_1.default.debug(`Build request error details:\n${JSON.stringify(debugInfo, null, 2)}`);
200
+ }
201
+ }
202
+ function collectBuildRequestErrorDebugInfo(error) {
203
+ if (!Array.isArray(error?.graphQLErrors) && !error?.response && !error?.networkError) {
204
+ return null;
205
+ }
206
+ const debugInfo = {};
207
+ if (error?.message) {
208
+ debugInfo.message = error.message;
209
+ }
210
+ if (Array.isArray(error?.graphQLErrors)) {
211
+ debugInfo.graphQLErrors = error.graphQLErrors;
212
+ }
213
+ if (error?.networkError) {
214
+ debugInfo.networkError = collectErrorDebugInfo(error.networkError);
215
+ }
216
+ const response = collectResponseDebugInfo(error?.response);
217
+ if (response) {
218
+ debugInfo.response = response;
219
+ }
220
+ return debugInfo;
221
+ }
222
+ function collectErrorDebugInfo(error) {
223
+ const debugInfo = {};
224
+ for (const property of ['name', 'message', 'code', 'type', 'errno', 'syscall', 'stack']) {
225
+ if (error?.[property]) {
226
+ debugInfo[property] = error[property];
227
+ }
228
+ }
229
+ return debugInfo;
230
+ }
231
+ function collectResponseDebugInfo(response) {
232
+ if (!response) {
233
+ return null;
234
+ }
235
+ const debugInfo = {};
236
+ for (const property of ['status', 'statusText', 'url']) {
237
+ if (response[property] !== undefined && response[property] !== '') {
238
+ debugInfo[property] = response[property];
239
+ }
240
+ }
241
+ const headers = {};
242
+ for (const headerName of ['expo-request-id', 'x-request-id', 'content-type']) {
243
+ const headerValue = response?.headers?.get?.(headerName);
244
+ if (headerValue) {
245
+ headers[headerName] = headerValue;
246
+ }
247
+ }
248
+ if (Object.keys(headers).length > 0) {
249
+ debugInfo.headers = headers;
250
+ }
251
+ return Object.keys(debugInfo).length > 0 ? debugInfo : null;
252
+ }
168
253
  async function uploadProjectAsync(ctx) {
169
254
  let projectTarballPath;
170
255
  try {
@@ -35,7 +35,7 @@ class ObserveEvents extends EasCommand_1.default {
35
35
  ...flags_2.ObserveAppVersionFlag,
36
36
  ...flags_2.ObserveUpdateIdFlag,
37
37
  'session-id': core_1.Flags.string({
38
- description: 'Filter by session ID',
38
+ description: 'Filter by session ID. When no event name is given, lists the events in the session instead of the event-name summary.',
39
39
  }),
40
40
  'all-events': core_1.Flags.boolean({
41
41
  description: 'When no event name argument is provided, list all events across all event names instead of a summary of event names + counts.',
@@ -69,7 +69,10 @@ class ObserveEvents extends EasCommand_1.default {
69
69
  }
70
70
  const { daysBack, startTime, endTime } = (0, startAndEndTime_1.resolveTimeRange)(flags);
71
71
  const platform = (0, platforms_1.appObservePlatformFromFlag)(flags.platform);
72
- if (!args.eventName && !flags['all-events']) {
72
+ // A session ID narrows to a single session, so show that session's events
73
+ // (like --all-events) instead of the account-wide name+count summary, which
74
+ // has no session filter.
75
+ if (!args.eventName && !flags['all-events'] && !flags['session-id']) {
73
76
  const { names, isTruncated } = await (0, planGating_1.withObservePlanGateHandlingAsync)(() => ObserveQuery_1.ObserveQuery.customEventNamesAsync(graphqlClient, {
74
77
  appId: projectId,
75
78
  startTime,
@@ -0,0 +1,16 @@
1
+ import EasCommand from '../../commandUtils/EasCommand';
2
+ export default class SimulatorEvents extends EasCommand {
3
+ static hidden: boolean;
4
+ static description: string;
5
+ static flags: {
6
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
+ 'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ follow: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ };
11
+ static contextDefinition: {
12
+ projectDir: import("../../commandUtils/context/ProjectDirContextField").default;
13
+ loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
14
+ };
15
+ runAsync(): Promise<void>;
16
+ }
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const core_1 = require("@oclif/core");
5
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
6
+ const flags_1 = require("../../commandUtils/flags");
7
+ const generated_1 = require("../../graphql/generated");
8
+ const DeviceRunSessionQuery_1 = require("../../graphql/queries/DeviceRunSessionQuery");
9
+ const log_1 = tslib_1.__importDefault(require("../../log"));
10
+ const env_1 = require("../../simulator/env");
11
+ const events_1 = require("../../simulator/events");
12
+ const json_1 = require("../../utils/json");
13
+ const promise_1 = require("../../utils/promise");
14
+ const POLL_INTERVAL_MS = 5_000;
15
+ const POST_STOP_REFRESH_COUNT = 2;
16
+ class SimulatorEvents extends EasCommand_1.default {
17
+ static hidden = true;
18
+ static description = '[EXPERIMENTAL] show activity events from a remote simulator session';
19
+ static flags = {
20
+ id: core_1.Flags.string({
21
+ description: `Simulator session ID. Defaults to ${env_1.SIMULATOR_DOTENV_FILE_NAME}.`,
22
+ }),
23
+ follow: core_1.Flags.boolean({
24
+ char: 'f',
25
+ description: 'Keep watching for new events until the session ends.',
26
+ }),
27
+ ...flags_1.EasNonInteractiveAndJsonFlags,
28
+ };
29
+ static contextDefinition = {
30
+ ...this.ContextOptions.LoggedIn,
31
+ ...this.ContextOptions.ProjectDir,
32
+ };
33
+ async runAsync() {
34
+ const { flags } = await this.parse(SimulatorEvents);
35
+ const { json: jsonFlag, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
36
+ if (jsonFlag && flags.follow) {
37
+ throw new Error('Use either --json or --follow, not both.');
38
+ }
39
+ if (jsonFlag) {
40
+ (0, json_1.enableJsonOutput)();
41
+ }
42
+ const { projectDir, loggedIn: { graphqlClient }, } = await this.getContextAsync(SimulatorEvents, { nonInteractive });
43
+ await (0, env_1.loadSimulatorEnvAsync)(projectDir);
44
+ const deviceRunSessionId = flags.id ?? process.env[env_1.EAS_SIMULATOR_SESSION_ID];
45
+ if (!deviceRunSessionId) {
46
+ throw new Error(`No simulator session ID provided. Pass --id, or run \`eas simulator:start\` first to write ${env_1.SIMULATOR_DOTENV_FILE_NAME}.`);
47
+ }
48
+ const printedEventIds = new Set();
49
+ let observedRunningSession = false;
50
+ let remainingPostStopRefreshes = 0;
51
+ let latestEvents = [];
52
+ const abortController = new AbortController();
53
+ const { signal } = abortController;
54
+ const abortPromise = new Promise(resolve => {
55
+ signal.addEventListener('abort', () => {
56
+ resolve();
57
+ }, { once: true });
58
+ });
59
+ const interruptHandler = () => {
60
+ if (signal.aborted) {
61
+ process.exit(130);
62
+ }
63
+ abortController.abort();
64
+ };
65
+ if (flags.follow) {
66
+ process.on('SIGINT', interruptHandler);
67
+ }
68
+ try {
69
+ while (!signal.aborted) {
70
+ let session;
71
+ let events;
72
+ try {
73
+ session = await DeviceRunSessionQuery_1.DeviceRunSessionQuery.eventsByIdAsync(graphqlClient, deviceRunSessionId);
74
+ const eventArtifact = session.artifacts.find(artifact => artifact.metadata?.__eas_type === 'session-events');
75
+ events = eventArtifact
76
+ ? await (0, events_1.downloadDeviceRunSessionEventsAsync)(eventArtifact.downloadUrl)
77
+ : [];
78
+ }
79
+ catch (err) {
80
+ if (!flags.follow) {
81
+ throw err;
82
+ }
83
+ log_1.default.debug(`Failed to poll simulator session events: ${err instanceof Error ? err.message : String(err)}`);
84
+ await Promise.race([(0, promise_1.sleepAsync)(POLL_INTERVAL_MS), abortPromise]);
85
+ continue;
86
+ }
87
+ latestEvents = events;
88
+ if (jsonFlag) {
89
+ (0, json_1.printJsonOnlyOutput)({ deviceRunSessionId, events });
90
+ return;
91
+ }
92
+ const isRunning = session.status === generated_1.DeviceRunSessionStatus.New ||
93
+ session.status === generated_1.DeviceRunSessionStatus.InProgress;
94
+ if (isRunning) {
95
+ observedRunningSession = true;
96
+ remainingPostStopRefreshes = 0;
97
+ }
98
+ else if (observedRunningSession) {
99
+ observedRunningSession = false;
100
+ remainingPostStopRefreshes = POST_STOP_REFRESH_COUNT;
101
+ }
102
+ const shouldRefreshAgain = flags.follow && !signal.aborted && (isRunning || remainingPostStopRefreshes > 0);
103
+ printNewEvents(events, printedEventIds, !shouldRefreshAgain);
104
+ if (!shouldRefreshAgain) {
105
+ if (events.length === 0) {
106
+ log_1.default.log('No simulator session activity has been recorded.');
107
+ }
108
+ return;
109
+ }
110
+ if (!isRunning) {
111
+ remainingPostStopRefreshes -= 1;
112
+ }
113
+ await Promise.race([(0, promise_1.sleepAsync)(POLL_INTERVAL_MS), abortPromise]);
114
+ }
115
+ printNewEvents(latestEvents, printedEventIds, true);
116
+ }
117
+ finally {
118
+ if (flags.follow) {
119
+ process.removeListener('SIGINT', interruptHandler);
120
+ }
121
+ }
122
+ }
123
+ }
124
+ exports.default = SimulatorEvents;
125
+ function printNewEvents(events, printedEventIds, includeIncompleteOperations) {
126
+ const displayEvents = (0, events_1.projectDeviceRunSessionEventsForDisplay)(events, {
127
+ includeIncompleteOperations,
128
+ });
129
+ for (const event of displayEvents) {
130
+ if (printedEventIds.has(event.eventId)) {
131
+ continue;
132
+ }
133
+ log_1.default.log((0, events_1.formatDeviceRunSessionEvent)(event));
134
+ printedEventIds.add(event.eventId);
135
+ }
136
+ }
@@ -55,6 +55,7 @@ class SimulatorGet extends EasCommand_1.default {
55
55
  if (jsonFlag) {
56
56
  (0, json_1.printJsonOnlyOutput)({
57
57
  id: session.id,
58
+ name: session.name ?? undefined,
58
59
  type: (0, utils_1.deviceRunSessionTypeToFlagValue)(session.type),
59
60
  status: session.status,
60
61
  platform: session.platform,
@@ -86,6 +87,7 @@ exports.default = SimulatorGet;
86
87
  function formatSessionFields(session, deviceRunSessionUrl) {
87
88
  return (0, formatFields_1.default)([
88
89
  { label: 'ID', value: session.id },
90
+ { label: 'Name', value: formatNullable(session.name) },
89
91
  { label: 'Type', value: session.type },
90
92
  { label: 'Status', value: session.status },
91
93
  { label: 'Platform', value: session.platform },
@@ -100,6 +100,7 @@ class SimulatorList extends EasCommand_1.default {
100
100
  (0, json_1.printJsonOnlyOutput)({
101
101
  sessions: sessions.map(session => ({
102
102
  id: session.id,
103
+ name: session.name ?? undefined,
103
104
  type: (0, utils_1.deviceRunSessionTypeToFlagValue)(session.type),
104
105
  status: session.status,
105
106
  platform: session.platform,
@@ -122,6 +123,7 @@ class SimulatorList extends EasCommand_1.default {
122
123
  const deviceRunSessionUrl = (0, url_1.getDeviceRunSessionUrl)(session.app.ownerAccount.name, session.app.slug, session.id);
123
124
  const lines = [
124
125
  `ID: ${session.id}`,
126
+ `Name: ${session.name ?? 'null'}`,
125
127
  `Type: ${session.type}`,
126
128
  `Status: ${session.status}`,
127
129
  `Platform: ${session.platform}`,
@@ -7,6 +7,7 @@ export default class SimulatorStart extends EasCommand {
7
7
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
8
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
9
  platform: import("@oclif/core/lib/interfaces").OptionFlag<"android" | "ios" | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
11
  type: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
11
12
  'package-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
13
  'max-duration-minutes': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -37,6 +37,9 @@ class SimulatorStart extends EasCommand_1.default {
37
37
  description: 'Device platform',
38
38
  options: PLATFORM_FLAG_VALUES,
39
39
  })(),
40
+ name: core_1.Flags.string({
41
+ description: 'Human-readable name for the simulator session, shown in eas simulator:list and on expo.dev. Defaults to unnamed.',
42
+ }),
40
43
  type: core_1.Flags.option({
41
44
  description: 'Type of simulator session to create',
42
45
  options: Object.values(utils_1.DEVICE_RUN_SESSION_TYPE_FLAG_VALUES),
@@ -75,6 +78,9 @@ class SimulatorStart extends EasCommand_1.default {
75
78
  const { projectId, projectDir, loggedIn: { graphqlClient }, } = await this.getContextAsync(SimulatorStart, {
76
79
  nonInteractive,
77
80
  });
81
+ // The server rejects blank names, so trim here and treat a whitespace-only
82
+ // --name as if it had been omitted rather than surfacing a validation error.
83
+ const name = flags.name?.trim() || undefined;
78
84
  await (0, env_1.loadSimulatorEnvAsync)(projectDir);
79
85
  const existingDeviceRunSessionId = process.env[env_1.EAS_SIMULATOR_SESSION_ID];
80
86
  if (existingDeviceRunSessionId && !flags.force) {
@@ -93,6 +99,7 @@ class SimulatorStart extends EasCommand_1.default {
93
99
  try {
94
100
  const session = await DeviceRunSessionMutation_1.DeviceRunSessionMutation.createDeviceRunSessionAsync(graphqlClient, {
95
101
  appId: projectId,
102
+ name,
96
103
  platform,
97
104
  type: utils_1.DEVICE_RUN_SESSION_TYPE_BY_FLAG_VALUE[flags.type],
98
105
  packageVersion: flags['package-version'],
@@ -155,6 +162,7 @@ class SimulatorStart extends EasCommand_1.default {
155
162
  if (jsonFlag) {
156
163
  (0, json_1.printJsonOnlyOutput)({
157
164
  id: deviceRunSessionId,
165
+ name,
158
166
  type: flags.type,
159
167
  deviceRunSessionUrl,
160
168
  remoteConfig,
@@ -1845,6 +1845,12 @@ export type AppObserve = {
1845
1845
  errorTimeSeries: AppObserveErrorTimeSeries;
1846
1846
  events: AppObserveEventsConnection;
1847
1847
  navigationRoutes: AppObserveNavigationRoutesConnection;
1848
+ /** Active users and sessions for the Overview engagement band, across all versions. */
1849
+ overviewEngagement: AppObserveOverviewEngagement;
1850
+ /** Per-update comparison within one app version: the embedded bundle plus each OTA update. */
1851
+ overviewUpdateComparison: AppObserveOverviewUpdateComparison;
1852
+ /** Per-version, per-platform metric summaries for the Overview version-comparison matrix. */
1853
+ overviewVersionComparison: AppObserveOverviewVersionComparison;
1848
1854
  timeSeries: AppObserveTimeSeries;
1849
1855
  totalEventCount: Scalars['Int']['output'];
1850
1856
  /**
@@ -1917,6 +1923,15 @@ export type AppObserveNavigationRoutesArgs = {
1917
1923
  last?: InputMaybe<Scalars['Int']['input']>;
1918
1924
  orderBy?: InputMaybe<AppObserveNavigationRoutesOrderBy>;
1919
1925
  };
1926
+ export type AppObserveOverviewEngagementArgs = {
1927
+ input: AppObserveOverviewEngagementInput;
1928
+ };
1929
+ export type AppObserveOverviewUpdateComparisonArgs = {
1930
+ input: AppObserveOverviewUpdateComparisonInput;
1931
+ };
1932
+ export type AppObserveOverviewVersionComparisonArgs = {
1933
+ input: AppObserveOverviewVersionComparisonInput;
1934
+ };
1920
1935
  export type AppObserveTimeSeriesArgs = {
1921
1936
  input: AppObserveTimeSeriesInput;
1922
1937
  };
@@ -2426,6 +2441,118 @@ export type AppObserveNavigationStat = {
2426
2441
  median?: Maybe<Scalars['Float']['output']>;
2427
2442
  p90?: Maybe<Scalars['Float']['output']>;
2428
2443
  };
2444
+ export type AppObserveOverviewEngagement = {
2445
+ __typename?: 'AppObserveOverviewEngagement';
2446
+ activeUsers: AppObserveOverviewEngagementStat;
2447
+ sessions: AppObserveOverviewEngagementStat;
2448
+ };
2449
+ export type AppObserveOverviewEngagementBucket = {
2450
+ __typename?: 'AppObserveOverviewEngagementBucket';
2451
+ bucketStart: Scalars['DateTime']['output'];
2452
+ count: Scalars['Int']['output'];
2453
+ };
2454
+ /** Engagement-band filters. No release filters: the band always spans all versions. */
2455
+ export type AppObserveOverviewEngagementInput = {
2456
+ /** Series bucket size. Defaults to one day. */
2457
+ bucketIntervalMinutes?: InputMaybe<Scalars['Int']['input']>;
2458
+ endTime: Scalars['DateTime']['input'];
2459
+ environment?: InputMaybe<Scalars['String']['input']>;
2460
+ platform?: InputMaybe<AppObservePlatform>;
2461
+ startTime: Scalars['DateTime']['input'];
2462
+ };
2463
+ export type AppObserveOverviewEngagementStat = {
2464
+ __typename?: 'AppObserveOverviewEngagementStat';
2465
+ previousPeriodTotal: Scalars['Int']['output'];
2466
+ /** Per-bucket approximate uniques; buckets do not sum to `total`. */
2467
+ series: Array<AppObserveOverviewEngagementBucket>;
2468
+ total: Scalars['Int']['output'];
2469
+ };
2470
+ export type AppObserveOverviewStability = {
2471
+ __typename?: 'AppObserveOverviewStability';
2472
+ affectedUsers: Scalars['Int']['output'];
2473
+ /** Fraction (0..1) of active sessions without a fatal error. */
2474
+ crashFreeSessions: Scalars['Float']['output'];
2475
+ /** Fraction (0..1) of active users without a fatal error. */
2476
+ crashFreeUsers: Scalars['Float']['output'];
2477
+ totalErrors: Scalars['Int']['output'];
2478
+ };
2479
+ export type AppObserveOverviewUpdate = {
2480
+ __typename?: 'AppObserveOverviewUpdate';
2481
+ /** Null for the embedded bundle. */
2482
+ appUpdateId?: Maybe<Scalars['ID']['output']>;
2483
+ /** Downloads recorded in range; null when none were recorded (and always for the embedded bundle). */
2484
+ downloadCount?: Maybe<Scalars['Int']['output']>;
2485
+ eventCount: Scalars['Int']['output'];
2486
+ firstSeenAt: Scalars['DateTime']['output'];
2487
+ isEmbedded: Scalars['Boolean']['output'];
2488
+ medianDownloadTime?: Maybe<Scalars['Float']['output']>;
2489
+ /** EAS update message; null for the embedded bundle or when the update row no longer exists. */
2490
+ message?: Maybe<Scalars['String']['output']>;
2491
+ /** One entry per metric with data in range, all platforms combined. */
2492
+ metrics: Array<AppObserveOverviewUpdateMetric>;
2493
+ /** When the update was published; null for the embedded bundle. */
2494
+ publishedAt?: Maybe<Scalars['DateTime']['output']>;
2495
+ stability: AppObserveOverviewStability;
2496
+ uniqueUserCount: Scalars['Int']['output'];
2497
+ };
2498
+ export type AppObserveOverviewUpdateComparison = {
2499
+ __typename?: 'AppObserveOverviewUpdateComparison';
2500
+ /** Embedded bundle first, then OTA updates oldest first. Only updates with runtime data appear. */
2501
+ updates: Array<AppObserveOverviewUpdate>;
2502
+ };
2503
+ export type AppObserveOverviewUpdateComparisonInput = {
2504
+ appVersion: Scalars['String']['input'];
2505
+ endTime: Scalars['DateTime']['input'];
2506
+ environment?: InputMaybe<Scalars['String']['input']>;
2507
+ /** Metric names to aggregate. Defaults to all metrics available on the account's plan. */
2508
+ metricNames?: InputMaybe<Array<Scalars['String']['input']>>;
2509
+ startTime: Scalars['DateTime']['input'];
2510
+ };
2511
+ export type AppObserveOverviewUpdateMetric = {
2512
+ __typename?: 'AppObserveOverviewUpdateMetric';
2513
+ eventCount: Scalars['Int']['output'];
2514
+ metricName: Scalars['String']['output'];
2515
+ statistics: AppObserveVersionMarkerStatistics;
2516
+ };
2517
+ export type AppObserveOverviewVersion = {
2518
+ __typename?: 'AppObserveOverviewVersion';
2519
+ appVersion: Scalars['String']['output'];
2520
+ firstSeenAt: Scalars['DateTime']['output'];
2521
+ /** One entry per (metric, platform) with data in range; iOS includes tvOS and iPadOS. */
2522
+ metrics: Array<AppObserveOverviewVersionMetric>;
2523
+ /** Error stats for this version, all platforms combined. */
2524
+ stability: AppObserveOverviewStability;
2525
+ uniqueUserCount: Scalars['Int']['output'];
2526
+ };
2527
+ export type AppObserveOverviewVersionComparison = {
2528
+ __typename?: 'AppObserveOverviewVersionComparison';
2529
+ /** Every version with data in range, highest version first, for the version picker. */
2530
+ allVersions: Array<AppObserveOverviewVersionSummary>;
2531
+ /** Compared versions, lowest version first. Requested versions with no data are omitted. */
2532
+ versions: Array<AppObserveOverviewVersion>;
2533
+ };
2534
+ export type AppObserveOverviewVersionComparisonInput = {
2535
+ /** Versions to compare (max 10, any order). Defaults to the three highest versions. */
2536
+ appVersions?: InputMaybe<Array<Scalars['String']['input']>>;
2537
+ endTime: Scalars['DateTime']['input'];
2538
+ environment?: InputMaybe<Scalars['String']['input']>;
2539
+ /** Metric names to aggregate. Defaults to all metrics available on the account's plan. */
2540
+ metricNames?: InputMaybe<Array<Scalars['String']['input']>>;
2541
+ startTime: Scalars['DateTime']['input'];
2542
+ };
2543
+ export type AppObserveOverviewVersionMetric = {
2544
+ __typename?: 'AppObserveOverviewVersionMetric';
2545
+ eventCount: Scalars['Int']['output'];
2546
+ metricName: Scalars['String']['output'];
2547
+ platform: AppObservePlatform;
2548
+ statistics: AppObserveVersionMarkerStatistics;
2549
+ };
2550
+ export type AppObserveOverviewVersionSummary = {
2551
+ __typename?: 'AppObserveOverviewVersionSummary';
2552
+ appVersion: Scalars['String']['output'];
2553
+ firstSeenAt: Scalars['DateTime']['output'];
2554
+ uniqueUserCount: Scalars['Int']['output'];
2555
+ };
2429
2556
  export declare enum AppObservePlatform {
2430
2557
  Android = "ANDROID",
2431
2558
  Ios = "IOS"
@@ -4205,6 +4332,11 @@ export type CreateDeviceRunSessionInput = {
4205
4332
  * plans. If omitted, the default is derived based on the job run's priority.
4206
4333
  */
4207
4334
  maxRunTimeMinutes?: InputMaybe<Scalars['Int']['input']>;
4335
+ /**
4336
+ * Human-readable label for the session, at most 255 characters. If omitted, the
4337
+ * session is unnamed and clients fall back to identifying it by id.
4338
+ */
4339
+ name?: InputMaybe<Scalars['String']['input']>;
4208
4340
  /**
4209
4341
  * The version of the package backing the device run session (e.g. "0.1.3-alpha.3").
4210
4342
  * If omitted, consumers treat the session as pinned to "latest".
@@ -4833,6 +4965,11 @@ export type DeviceRunSession = {
4833
4965
  finishedAt?: Maybe<Scalars['DateTime']['output']>;
4834
4966
  id: Scalars['ID']['output'];
4835
4967
  initiatingActor?: Maybe<Actor>;
4968
+ /**
4969
+ * Human-readable label chosen by whoever started the session. Null when the
4970
+ * session was started without one.
4971
+ */
4972
+ name?: Maybe<Scalars['String']['output']>;
4836
4973
  /**
4837
4974
  * The version of the package backing the device run session. Null means the session is
4838
4975
  * pinned to "latest" at the consumer side.
@@ -9076,6 +9213,11 @@ export type User = Actor & UserActor & {
9076
9213
  lastName?: Maybe<Scalars['String']['output']>;
9077
9214
  newEmailPendingVerification?: Maybe<Scalars['String']['output']>;
9078
9215
  oAuthIdentities: Array<OAuthIdentity>;
9216
+ /**
9217
+ * The organization created during signup onboarding: the most recently
9218
+ * created organization this user owns. Only resolves for the viewer.
9219
+ */
9220
+ onboardingOrganization?: Maybe<Account>;
9079
9221
  /** Registered passkey credentials */
9080
9222
  passkeyCredentials: Array<UserPasskeyCredential>;
9081
9223
  /** Pending UserInvitations for this user. Only resolves for the viewer. */
@@ -18018,6 +18160,26 @@ export type SimulatorAvailabilityQuery = {
18018
18160
  };
18019
18161
  };
18020
18162
  };
18163
+ export type DeviceRunSessionEventsByIdQueryVariables = Exact<{
18164
+ deviceRunSessionId: Scalars['ID']['input'];
18165
+ }>;
18166
+ export type DeviceRunSessionEventsByIdQuery = {
18167
+ __typename?: 'RootQuery';
18168
+ deviceRunSessions: {
18169
+ __typename?: 'DeviceRunSessionQuery';
18170
+ byId: {
18171
+ __typename?: 'DeviceRunSession';
18172
+ id: string;
18173
+ status: DeviceRunSessionStatus;
18174
+ artifacts: Array<{
18175
+ __typename?: 'DeviceRunSessionArtifact';
18176
+ id: string;
18177
+ downloadUrl: string;
18178
+ metadata?: any | null;
18179
+ }>;
18180
+ };
18181
+ };
18182
+ };
18021
18183
  export type DeviceRunSessionByIdQueryVariables = Exact<{
18022
18184
  deviceRunSessionId: Scalars['ID']['input'];
18023
18185
  }>;
@@ -18028,6 +18190,7 @@ export type DeviceRunSessionByIdQuery = {
18028
18190
  byId: {
18029
18191
  __typename?: 'DeviceRunSession';
18030
18192
  id: string;
18193
+ name?: string | null;
18031
18194
  status: DeviceRunSessionStatus;
18032
18195
  type: DeviceRunSessionType;
18033
18196
  platform: AppPlatform;
@@ -18099,6 +18262,7 @@ export type DeviceRunSessionsByAppIdQuery = {
18099
18262
  node: {
18100
18263
  __typename?: 'DeviceRunSession';
18101
18264
  id: string;
18265
+ name?: string | null;
18102
18266
  status: DeviceRunSessionStatus;
18103
18267
  type: DeviceRunSessionType;
18104
18268
  platform: AppPlatform;
@@ -1,6 +1,7 @@
1
1
  import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
- import { DeviceRunSessionByIdQuery, DeviceRunSessionFilterInput, DeviceRunSessionsByAppIdQuery } from '../generated';
2
+ import { DeviceRunSessionByIdQuery, DeviceRunSessionEventsByIdQuery, DeviceRunSessionFilterInput, DeviceRunSessionsByAppIdQuery } from '../generated';
3
3
  export declare const DeviceRunSessionQuery: {
4
+ eventsByIdAsync(graphqlClient: ExpoGraphqlClient, deviceRunSessionId: string): Promise<DeviceRunSessionEventsByIdQuery["deviceRunSessions"]["byId"]>;
4
5
  byIdAsync(graphqlClient: ExpoGraphqlClient, deviceRunSessionId: string): Promise<DeviceRunSessionByIdQuery["deviceRunSessions"]["byId"]>;
5
6
  listByAppIdAsync(graphqlClient: ExpoGraphqlClient, { appId, first, after, filter, }: {
6
7
  appId: string;
@@ -5,6 +5,26 @@ const tslib_1 = require("tslib");
5
5
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
6
  const client_1 = require("../client");
7
7
  exports.DeviceRunSessionQuery = {
8
+ async eventsByIdAsync(graphqlClient, deviceRunSessionId) {
9
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
10
+ .query((0, graphql_tag_1.default) `
11
+ query DeviceRunSessionEventsByIdQuery($deviceRunSessionId: ID!) {
12
+ deviceRunSessions {
13
+ byId(deviceRunSessionId: $deviceRunSessionId) {
14
+ id
15
+ status
16
+ artifacts {
17
+ id
18
+ downloadUrl
19
+ metadata
20
+ }
21
+ }
22
+ }
23
+ }
24
+ `, { deviceRunSessionId }, { requestPolicy: 'network-only' })
25
+ .toPromise());
26
+ return data.deviceRunSessions.byId;
27
+ },
8
28
  async byIdAsync(graphqlClient, deviceRunSessionId) {
9
29
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
10
30
  .query((0, graphql_tag_1.default) `
@@ -12,6 +32,7 @@ exports.DeviceRunSessionQuery = {
12
32
  deviceRunSessions {
13
33
  byId(deviceRunSessionId: $deviceRunSessionId) {
14
34
  id
35
+ name
15
36
  status
16
37
  type
17
38
  platform
@@ -81,6 +102,7 @@ exports.DeviceRunSessionQuery = {
81
102
  cursor
82
103
  node {
83
104
  id
105
+ name
84
106
  status
85
107
  type
86
108
  platform