eas-cli 23.2.0 → 24.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 (96) hide show
  1. package/README.md +380 -205
  2. package/build/build/utils/url.d.ts +1 -0
  3. package/build/build/utils/url.js +4 -0
  4. package/build/channel/protection.d.ts +4 -0
  5. package/build/channel/protection.js +49 -0
  6. package/build/channel/queries.d.ts +6 -0
  7. package/build/channel/queries.js +5 -1
  8. package/build/commands/channel/protect.d.ts +16 -0
  9. package/build/commands/channel/protect.js +68 -0
  10. package/build/commands/channel/unprotect.d.ts +16 -0
  11. package/build/commands/channel/unprotect.js +78 -0
  12. package/build/commands/observe/errors.d.ts +27 -0
  13. package/build/commands/observe/errors.js +122 -0
  14. package/build/commands/observe/event.d.ts +18 -0
  15. package/build/commands/observe/event.js +149 -0
  16. package/build/commands/observe/events.d.ts +2 -0
  17. package/build/commands/observe/events.js +10 -4
  18. package/build/commands/observe/metrics-summary.d.ts +1 -0
  19. package/build/commands/observe/metrics-summary.js +3 -2
  20. package/build/commands/observe/metrics.d.ts +2 -0
  21. package/build/commands/observe/metrics.js +8 -4
  22. package/build/commands/observe/routes.d.ts +2 -1
  23. package/build/commands/observe/routes.js +5 -5
  24. package/build/commands/observe/session.d.ts +1 -0
  25. package/build/commands/observe/session.js +14 -8
  26. package/build/commands/observe/versions.d.ts +1 -0
  27. package/build/commands/observe/versions.js +3 -2
  28. package/build/commands/project/status.d.ts +16 -0
  29. package/build/commands/project/status.js +47 -0
  30. package/build/commands/simulator/get.js +3 -1
  31. package/build/commands/simulator/index.js +6 -2
  32. package/build/credentials/ios/credentials.d.ts +5 -3
  33. package/build/credentials/ios/utils/printCredentials.js +6 -1
  34. package/build/graphql/generated.d.ts +2288 -1133
  35. package/build/graphql/generated.js +48 -17
  36. package/build/graphql/mutations/RealtimeLogsMutation.d.ts +2 -2
  37. package/build/graphql/queries/AppStoreConnectApiKeyQuery.d.ts +1 -1
  38. package/build/graphql/queries/AppStoreConnectApiKeyQuery.js +1 -1
  39. package/build/graphql/queries/ChannelQuery.js +2 -0
  40. package/build/graphql/queries/DeviceRunSessionQuery.js +5 -0
  41. package/build/graphql/queries/ObserveQuery.d.ts +62 -30
  42. package/build/graphql/queries/ObserveQuery.js +276 -121
  43. package/build/graphql/queries/SubmissionQuery.d.ts +6 -1
  44. package/build/graphql/queries/SubmissionQuery.js +41 -0
  45. package/build/graphql/types/Observe.d.ts +5 -3
  46. package/build/graphql/types/Observe.js +80 -21
  47. package/build/graphql/types/UpdateChannelBasicInfo.js +1 -0
  48. package/build/observe/fetchCustomEvents.d.ts +6 -4
  49. package/build/observe/fetchCustomEvents.js +4 -2
  50. package/build/observe/fetchErrors.d.ts +32 -0
  51. package/build/observe/fetchErrors.js +42 -0
  52. package/build/observe/fetchEvents.d.ts +9 -6
  53. package/build/observe/fetchEvents.js +16 -17
  54. package/build/observe/fetchMetrics.d.ts +2 -2
  55. package/build/observe/fetchMetrics.js +9 -9
  56. package/build/observe/fetchNavigationRoutes.d.ts +7 -5
  57. package/build/observe/fetchNavigationRoutes.js +8 -8
  58. package/build/observe/fetchSessions.d.ts +13 -11
  59. package/build/observe/fetchSessions.js +59 -30
  60. package/build/observe/fetchVersions.d.ts +4 -3
  61. package/build/observe/fetchVersions.js +7 -11
  62. package/build/observe/flags.d.ts +6 -0
  63. package/build/observe/flags.js +12 -2
  64. package/build/observe/formatCustomEvents.d.ts +16 -10
  65. package/build/observe/formatCustomEvents.js +61 -28
  66. package/build/observe/formatErrors.d.ts +97 -0
  67. package/build/observe/formatErrors.js +203 -0
  68. package/build/observe/formatEvents.d.ts +11 -5
  69. package/build/observe/formatEvents.js +46 -18
  70. package/build/observe/formatMetrics.d.ts +4 -4
  71. package/build/observe/formatMetrics.js +2 -2
  72. package/build/observe/formatNavigationRoutes.d.ts +4 -4
  73. package/build/observe/formatNavigationRoutes.js +3 -3
  74. package/build/observe/formatSessions.d.ts +3 -3
  75. package/build/observe/formatSessions.js +8 -8
  76. package/build/observe/formatVersions.js +2 -2
  77. package/build/observe/platforms.d.ts +10 -19
  78. package/build/observe/platforms.js +42 -40
  79. package/build/project/projectStatus.d.ts +96 -0
  80. package/build/project/projectStatus.js +314 -0
  81. package/build/simulator/utils.d.ts +11 -0
  82. package/build/simulator/utils.js +44 -5
  83. package/build/submit/utils/urls.js +2 -3
  84. package/build/utils/centrifuge.d.ts +2 -2
  85. package/oclif.manifest.json +2502 -1986
  86. package/package.json +7 -7
  87. package/build/chat/chatClient.d.ts +0 -37
  88. package/build/chat/chatClient.js +0 -359
  89. package/build/chat/detectProject.d.ts +0 -5
  90. package/build/chat/detectProject.js +0 -41
  91. package/build/chat/renderMarkdown.d.ts +0 -7
  92. package/build/chat/renderMarkdown.js +0 -47
  93. package/build/chat/replInput.d.ts +0 -10
  94. package/build/chat/replInput.js +0 -52
  95. package/build/commands/chat.d.ts +0 -18
  96. package/build/commands/chat.js +0 -221
@@ -33,7 +33,9 @@ class ObserveEvents extends EasCommand_1.default {
33
33
  }),
34
34
  ...flags_2.ObserveTimeRangeFlags,
35
35
  ...flags_2.ObserveAppVersionFlag,
36
+ ...flags_2.ObserveBuildNumberFlag,
36
37
  ...flags_2.ObserveUpdateIdFlag,
38
+ ...flags_2.ObserveEnvironmentFlag,
37
39
  'session-id': core_1.Flags.string({
38
40
  description: 'Filter by session ID. When no event name is given, lists the events in the session instead of the event-name summary.',
39
41
  }),
@@ -68,7 +70,7 @@ class ObserveEvents extends EasCommand_1.default {
68
70
  (0, json_1.enableJsonOutput)();
69
71
  }
70
72
  const { daysBack, startTime, endTime } = (0, startAndEndTime_1.resolveTimeRange)(flags);
71
- const platform = (0, platforms_1.appObservePlatformFromFlag)(flags.platform);
73
+ const platforms = (0, platforms_1.observePlatformsFromFlag)(flags.platform);
72
74
  // A session ID narrows to a single session, so show that session's events
73
75
  // (like --all-events) instead of the account-wide name+count summary, which
74
76
  // has no session filter.
@@ -77,7 +79,8 @@ class ObserveEvents extends EasCommand_1.default {
77
79
  appId: projectId,
78
80
  startTime,
79
81
  endTime,
80
- platform,
82
+ platforms,
83
+ environment: flags.environment,
81
84
  }));
82
85
  if (json) {
83
86
  (0, json_1.printJsonOnlyOutput)((0, formatCustomEvents_1.buildObserveCustomEventNamesJson)(names, isTruncated));
@@ -99,17 +102,20 @@ class ObserveEvents extends EasCommand_1.default {
99
102
  ...(flags.after && { after: flags.after }),
100
103
  startTime,
101
104
  endTime,
102
- platform,
105
+ platforms,
103
106
  appVersion: flags['app-version'],
107
+ buildNumber: flags['build-number'],
104
108
  updateId: flags['update-id'],
105
109
  sessionId: flags['session-id'],
110
+ environment: flags.environment,
106
111
  }));
107
112
  if (args.eventName && events.length === 0) {
108
113
  const { names, isTruncated } = await ObserveQuery_1.ObserveQuery.customEventNamesAsync(graphqlClient, {
109
114
  appId: projectId,
110
115
  startTime,
111
116
  endTime,
112
- platform,
117
+ platforms,
118
+ environment: flags.environment,
113
119
  });
114
120
  if (json) {
115
121
  (0, json_1.printJsonOnlyOutput)((0, formatCustomEvents_1.buildObserveCustomEventsEmptyWithSuggestionsJson)(args.eventName, names, isTruncated));
@@ -5,6 +5,7 @@ export default class ObserveMetricsSummary extends EasCommand {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
6
6
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
7
  'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
9
  start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
10
  end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
11
  days: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -47,6 +47,7 @@ class ObserveMetricsSummary extends EasCommand_1.default {
47
47
  options: DEFAULT_STATS_JSON,
48
48
  })(),
49
49
  ...flags_2.ObserveTimeRangeFlags,
50
+ ...flags_2.ObserveEnvironmentFlag,
50
51
  ...flags_2.ObserveProjectIdFlag,
51
52
  ...flags_1.EasNonInteractiveAndJsonFlags,
52
53
  };
@@ -74,8 +75,8 @@ class ObserveMetricsSummary extends EasCommand_1.default {
74
75
  ? flags.metric.map(metricNames_1.resolveMetricName)
75
76
  : DEFAULT_METRICS;
76
77
  const { daysBack, startTime, endTime } = (0, startAndEndTime_1.resolveTimeRange)(flags);
77
- const platforms = (0, platforms_1.appPlatformsFromFlag)(flags.platform);
78
- const { metricsMap, buildNumbersMap, updateIdsMap, totalEventCounts } = await (0, planGating_1.withObservePlanGateHandlingAsync)(() => (0, fetchMetrics_1.fetchObserveMetricsAsync)(graphqlClient, projectId, metricNames, platforms, startTime, endTime));
78
+ const targets = (0, platforms_1.observePlatformTargetsFromFlag)(flags.platform);
79
+ const { metricsMap, buildNumbersMap, updateIdsMap, totalEventCounts } = await (0, planGating_1.withObservePlanGateHandlingAsync)(() => (0, fetchMetrics_1.fetchObserveMetricsAsync)(graphqlClient, projectId, metricNames, targets, startTime, endTime, flags.environment));
79
80
  const argumentsStat = flags.stat?.length
80
81
  ? Array.from(new Set(flags.stat.map(formatMetrics_1.resolveStatKey)))
81
82
  : undefined;
@@ -8,7 +8,9 @@ export default class ObserveMetrics extends EasCommand {
8
8
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
9
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
10
  'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
12
  'update-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ 'build-number': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
14
  'app-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
15
  start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
16
  end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -42,7 +42,9 @@ class ObserveMetrics extends EasCommand_1.default {
42
42
  }),
43
43
  ...flags_2.ObserveTimeRangeFlags,
44
44
  ...flags_2.ObserveAppVersionFlag,
45
+ ...flags_2.ObserveBuildNumberFlag,
45
46
  ...flags_2.ObserveUpdateIdFlag,
47
+ ...flags_2.ObserveEnvironmentFlag,
46
48
  ...flags_2.ObserveProjectIdFlag,
47
49
  ...flags_1.EasNonInteractiveAndJsonFlags,
48
50
  };
@@ -83,8 +85,8 @@ class ObserveMetrics extends EasCommand_1.default {
83
85
  }
84
86
  const orderBy = (0, fetchEvents_1.resolveOrderBy)(flags.sort);
85
87
  const { daysBack, startTime, endTime } = (0, startAndEndTime_1.resolveTimeRange)(flags);
86
- const platform = (0, platforms_1.appObservePlatformFromFlag)(flags.platform);
87
- const platforms = (0, platforms_1.appPlatformsFromFlag)(flags.platform);
88
+ const platforms = (0, platforms_1.observePlatformsFromFlag)(flags.platform);
89
+ const targets = (0, platforms_1.observePlatformTargetsFromFlag)(flags.platform);
88
90
  const [{ events, pageInfo }, totalEventCount] = await (0, planGating_1.withObservePlanGateHandlingAsync)(() => Promise.all([
89
91
  (0, fetchEvents_1.fetchObserveEventsAsync)(graphqlClient, projectId, {
90
92
  metricName,
@@ -93,11 +95,13 @@ class ObserveMetrics extends EasCommand_1.default {
93
95
  ...(flags.after && { after: flags.after }),
94
96
  startTime,
95
97
  endTime,
96
- platform,
98
+ platforms,
97
99
  appVersion: flags['app-version'],
100
+ buildNumber: flags['build-number'],
98
101
  updateId: flags['update-id'],
102
+ environment: flags.environment,
99
103
  }),
100
- (0, fetchEvents_1.fetchTotalEventCountAsync)(graphqlClient, projectId, metricName, platforms, startTime, endTime),
104
+ (0, fetchEvents_1.fetchTotalEventCountAsync)(graphqlClient, projectId, metricName, targets, startTime, endTime, flags.environment),
101
105
  ]));
102
106
  if (json) {
103
107
  (0, json_1.printJsonOnlyOutput)((0, formatEvents_1.buildObserveEventsJson)(events, pageInfo));
@@ -5,9 +5,10 @@ export default class ObserveRoutes extends EasCommand {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
6
6
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
7
  'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
- 'build-number': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
9
  'route-name': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
10
  'update-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ 'build-number': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
12
  'app-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
13
  start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
14
  end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -40,14 +40,13 @@ class ObserveRoutes extends EasCommand_1.default {
40
40
  }),
41
41
  ...flags_2.ObserveTimeRangeFlags,
42
42
  ...flags_2.ObserveAppVersionFlag,
43
+ ...flags_2.ObserveBuildNumberFlag,
43
44
  ...flags_2.ObserveUpdateIdFlag,
44
- 'build-number': core_1.Flags.string({
45
- description: 'Filter by app build number',
46
- }),
47
45
  'route-name': core_1.Flags.string({
48
46
  description: 'Filter by route name (can be specified multiple times to include several routes)',
49
47
  multiple: true,
50
48
  }),
49
+ ...flags_2.ObserveEnvironmentFlag,
51
50
  ...flags_2.ObserveProjectIdFlag,
52
51
  ...flags_1.EasNonInteractiveAndJsonFlags,
53
52
  };
@@ -81,17 +80,18 @@ class ObserveRoutes extends EasCommand_1.default {
81
80
  ? Array.from(new Set(flags['route-name']))
82
81
  : undefined;
83
82
  const { daysBack, startTime, endTime } = (0, startAndEndTime_1.resolveTimeRange)(flags);
84
- const platforms = (0, platforms_1.appPlatformsFromFlag)(flags.platform);
83
+ const targets = (0, platforms_1.observePlatformTargetsFromFlag)(flags.platform);
85
84
  const { routes, pageInfoByPlatform } = await (0, planGating_1.withObservePlanGateHandlingAsync)(() => (0, fetchNavigationRoutes_1.fetchObserveNavigationRoutesAsync)(graphqlClient, projectId, {
86
85
  startTime,
87
86
  endTime,
88
- platforms,
87
+ targets,
89
88
  limit: flags.limit ?? DEFAULT_ROUTES_LIMIT,
90
89
  ...(flags.after && { after: flags.after }),
91
90
  appVersion: flags['app-version'],
92
91
  updateId: flags['update-id'],
93
92
  buildNumber: flags['build-number'],
94
93
  routeNames,
94
+ environment: flags.environment,
95
95
  }));
96
96
  if (json) {
97
97
  const stats = argumentsStat ?? DEFAULT_STATS_JSON;
@@ -8,6 +8,7 @@ export default class ObserveSession extends EasCommand {
8
8
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
9
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
10
  'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
12
  start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
13
  end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
14
  days: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -42,6 +42,7 @@ class ObserveSession extends EasCommand_1.default {
42
42
  description: 'Metric or log event name to pick candidate sessions by (e.g. tti, cold_launch, login_pressed). If omitted in interactive mode, you will be prompted.',
43
43
  }),
44
44
  ...flags_2.ObserveTimeRangeFlags,
45
+ ...flags_2.ObserveEnvironmentFlag,
45
46
  ...flags_2.ObserveProjectIdFlag,
46
47
  ...flags_1.EasNonInteractiveAndJsonFlags,
47
48
  };
@@ -71,9 +72,10 @@ class ObserveSession extends EasCommand_1.default {
71
72
  flags.sort !== undefined ||
72
73
  flags.days !== undefined ||
73
74
  flags.start !== undefined ||
74
- flags.end !== undefined;
75
+ flags.end !== undefined ||
76
+ flags.environment !== undefined;
75
77
  if (pickerFlagsProvided) {
76
- throw new errors_1.EasCommandError('The picker flags (--event-name, --sort, --days, --start, --end) describe how to find a session and cannot be combined with a session ID argument.');
78
+ throw new errors_1.EasCommandError('The picker flags (--event-name, --sort, --days, --start, --end, --environment) describe how to find a session and cannot be combined with a session ID argument.');
77
79
  }
78
80
  sessionId = args.sessionId;
79
81
  }
@@ -92,6 +94,7 @@ class ObserveSession extends EasCommand_1.default {
92
94
  eventNameFlag: flags['event-name'],
93
95
  sort: flags.sort,
94
96
  timeRangeFlags: { days: flags.days, start: flags.start, end: flags.end },
97
+ environment: flags.environment,
95
98
  });
96
99
  }
97
100
  const { entries, metadata, hasMoreMetricEvents, hasMoreLogEvents } = await (0, planGating_1.withObservePlanGateHandlingAsync)(() => (0, fetchSessions_1.fetchObserveSessionEventsAsync)(graphqlClient, projectId, {
@@ -112,11 +115,11 @@ class ObserveSession extends EasCommand_1.default {
112
115
  }
113
116
  }
114
117
  exports.default = ObserveSession;
115
- async function pickSessionIdInteractivelyAsync({ graphqlClient, projectId, eventNameFlag, sort, timeRangeFlags, }) {
118
+ async function pickSessionIdInteractivelyAsync({ graphqlClient, projectId, eventNameFlag, sort, timeRangeFlags, environment, }) {
116
119
  const { startTime, endTime } = (0, startAndEndTime_1.resolveTimeRange)(timeRangeFlags);
117
120
  const eventNameChoice = eventNameFlag
118
121
  ? { name: eventNameFlag, isMetric: (0, metricNames_1.isKnownMetricName)(eventNameFlag) }
119
- : await promptForEventNameAsync({ graphqlClient, projectId, startTime, endTime });
122
+ : await promptForEventNameAsync({ graphqlClient, projectId, startTime, endTime, environment });
120
123
  let sortValue;
121
124
  if (sort) {
122
125
  const preset = sort.toUpperCase();
@@ -136,6 +139,7 @@ async function pickSessionIdInteractivelyAsync({ graphqlClient, projectId, event
136
139
  startTime,
137
140
  endTime,
138
141
  limit: PICKER_CANDIDATE_LIMIT,
142
+ environment,
139
143
  })).map(event => ({ sessionId: event.sessionId, title: (0, formatSessions_1.formatMetricCandidateTitle)(event) }))
140
144
  : (await (0, fetchSessions_1.fetchSessionLogCandidatesAsync)(graphqlClient, projectId, {
141
145
  eventName: eventNameChoice.name,
@@ -143,6 +147,7 @@ async function pickSessionIdInteractivelyAsync({ graphqlClient, projectId, event
143
147
  startTime,
144
148
  endTime,
145
149
  limit: PICKER_CANDIDATE_LIMIT,
150
+ environment,
146
151
  })).map(event => ({ sessionId: event.sessionId, title: (0, formatSessions_1.formatLogCandidateTitle)(event) }));
147
152
  if (candidates.length === 0) {
148
153
  throw new errors_1.EasCommandError(`No events found for "${eventNameChoice.name}" in the selected time range. Try widening the window with --days or picking a different --event-name.`);
@@ -168,19 +173,20 @@ async function promptForSortOrderAsync(isMetric) {
168
173
  ];
169
174
  return await (0, prompts_1.selectAsync)('Sort candidate events by', choices);
170
175
  }
171
- async function promptForEventNameAsync({ graphqlClient, projectId, startTime, endTime, }) {
176
+ async function promptForEventNameAsync({ graphqlClient, projectId, startTime, endTime, environment, }) {
172
177
  const { names: customEventNames } = await ObserveQuery_1.ObserveQuery.customEventNamesAsync(graphqlClient, {
173
178
  appId: projectId,
174
179
  startTime,
175
180
  endTime,
181
+ environment,
176
182
  });
177
183
  const metricChoices = Object.entries(metricNames_1.METRIC_SHORT_NAMES).map(([fullName, displayName]) => ({
178
184
  title: `${displayName} (metric)`,
179
185
  value: { name: fullName, isMetric: true },
180
186
  }));
181
- const logChoices = customEventNames.map(({ eventName, count }) => ({
182
- title: `${eventName} (${count} log event${count === 1 ? '' : 's'})`,
183
- value: { name: eventName, isMetric: false },
187
+ const logChoices = customEventNames.map(({ name, count }) => ({
188
+ title: `${name} (${count} log event${count === 1 ? '' : 's'})`,
189
+ value: { name, isMetric: false },
184
190
  }));
185
191
  const choices = [...metricChoices, ...logChoices];
186
192
  if (choices.length === 0) {
@@ -5,6 +5,7 @@ export default class ObserveVersions extends EasCommand {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
6
6
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
7
  'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
9
  start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
10
  end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
11
  days: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -16,6 +16,7 @@ class ObserveVersions extends EasCommand_1.default {
16
16
  static flags = {
17
17
  ...flags_2.ObservePlatformFlag,
18
18
  ...flags_2.ObserveTimeRangeFlags,
19
+ ...flags_2.ObserveEnvironmentFlag,
19
20
  ...flags_2.ObserveProjectIdFlag,
20
21
  ...flags_1.EasNonInteractiveAndJsonFlags,
21
22
  };
@@ -40,8 +41,8 @@ class ObserveVersions extends EasCommand_1.default {
40
41
  (0, json_1.enableJsonOutput)();
41
42
  }
42
43
  const { startTime, endTime } = (0, startAndEndTime_1.resolveTimeRange)(flags);
43
- const platforms = (0, platforms_1.appPlatformsFromFlag)(flags.platform);
44
- const results = await (0, fetchVersions_1.fetchObserveVersionsAsync)(graphqlClient, projectId, platforms, startTime, endTime);
44
+ const targets = (0, platforms_1.observePlatformTargetsFromFlag)(flags.platform);
45
+ const results = await (0, fetchVersions_1.fetchObserveVersionsAsync)(graphqlClient, projectId, targets, startTime, endTime, flags.environment);
45
46
  if (json) {
46
47
  (0, json_1.printJsonOnlyOutput)((0, formatVersions_1.buildObserveVersionsJson)(results));
47
48
  }
@@ -0,0 +1,16 @@
1
+ import EasCommand from '../../commandUtils/EasCommand';
2
+ export default class ProjectStatus extends EasCommand {
3
+ static description: string;
4
+ static aliases: string[];
5
+ static examples: string[];
6
+ static flags: {
7
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ 'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
10
+ };
11
+ static contextDefinition: {
12
+ loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
13
+ projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
14
+ };
15
+ runAsync(): Promise<void>;
16
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
5
+ const flags_1 = require("../../commandUtils/flags");
6
+ const pagination_1 = require("../../commandUtils/pagination");
7
+ const projectStatus_1 = require("../../project/projectStatus");
8
+ const json_1 = require("../../utils/json");
9
+ class ProjectStatus extends EasCommand_1.default {
10
+ static description = 'show a snapshot of the project: recent builds, dev builds, workflow runs, submissions, and updates';
11
+ static aliases = ['status'];
12
+ static examples = [
13
+ '$ eas status \t # Show a concise project snapshot',
14
+ '$ eas status --json \t # Output a machine-readable snapshot for agents and automation',
15
+ '$ eas status --json --limit 10 \t # Include more activity from each section',
16
+ ];
17
+ static flags = {
18
+ limit: (0, pagination_1.getLimitFlagWithCustomValues)({
19
+ defaultTo: projectStatus_1.PROJECT_STATUS_DEFAULT_LIMIT,
20
+ limit: 25,
21
+ description: `The number of items to show in each section. Defaults to ${projectStatus_1.PROJECT_STATUS_DEFAULT_LIMIT} and is capped at 25.`,
22
+ }),
23
+ ...flags_1.EasNonInteractiveAndJsonFlags,
24
+ };
25
+ static contextDefinition = {
26
+ ...this.ContextOptions.ProjectId,
27
+ ...this.ContextOptions.LoggedIn,
28
+ };
29
+ async runAsync() {
30
+ const { flags } = await this.parse(ProjectStatus);
31
+ const { json: jsonFlag, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
32
+ if (jsonFlag) {
33
+ (0, json_1.enableJsonOutput)();
34
+ }
35
+ const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(ProjectStatus, { nonInteractive });
36
+ const status = await (0, projectStatus_1.getProjectStatusAsync)(graphqlClient, {
37
+ projectId,
38
+ limit: flags.limit ?? projectStatus_1.PROJECT_STATUS_DEFAULT_LIMIT,
39
+ });
40
+ if (jsonFlag) {
41
+ (0, json_1.printJsonOnlyOutput)(status);
42
+ return;
43
+ }
44
+ (0, projectStatus_1.printProjectStatusAsText)(status);
45
+ }
46
+ }
47
+ exports.default = ProjectStatus;
@@ -66,7 +66,9 @@ class SimulatorGet extends EasCommand_1.default {
66
66
  finishedAt: session.finishedAt ?? undefined,
67
67
  updatedAt: session.updatedAt,
68
68
  deviceRunSessionUrl,
69
- remoteConfig: session.remoteConfig,
69
+ remoteConfig: session.remoteConfig
70
+ ? (0, utils_1.sanitizeRemoteConfigForJson)(session.remoteConfig)
71
+ : session.remoteConfig,
70
72
  artifacts: session.artifacts,
71
73
  });
72
74
  return;
@@ -181,7 +181,11 @@ class Simulator extends EasCommand_1.default {
181
181
  platform,
182
182
  type: utils_1.DEVICE_RUN_SESSION_TYPE_BY_FLAG_VALUE[flags.type],
183
183
  packageVersion: flags['package-version'],
184
- deviceIdentifier,
184
+ ...(deviceIdentifier
185
+ ? platform === generated_1.AppPlatform.Ios
186
+ ? { ios: { deviceIdentifier } }
187
+ : { android: { deviceIdentifier } }
188
+ : {}),
185
189
  ...(buildId ? { buildId } : {}),
186
190
  ...(applicationArchiveUrlFromFlag
187
191
  ? { applicationArchiveUrl: applicationArchiveUrlFromFlag }
@@ -284,7 +288,7 @@ class Simulator extends EasCommand_1.default {
284
288
  name,
285
289
  type: flags.type,
286
290
  deviceRunSessionUrl,
287
- remoteConfig,
291
+ remoteConfig: (0, utils_1.sanitizeRemoteConfigForJson)(remoteConfig),
288
292
  });
289
293
  return;
290
294
  }
@@ -40,7 +40,7 @@ export declare const distributionCertificateSchema: CredentialSchema<Distributio
40
40
  export type MinimalAscApiKey = {
41
41
  keyP8: string;
42
42
  keyId: string;
43
- issuerId: string;
43
+ issuerId?: string;
44
44
  teamId?: string;
45
45
  teamName?: string;
46
46
  roles?: UserRole[];
@@ -49,9 +49,11 @@ export type MinimalAscApiKey = {
49
49
  export interface AscApiKeyPath {
50
50
  keyP8Path: string;
51
51
  keyId: string;
52
- issuerId: string;
52
+ issuerId?: string;
53
53
  }
54
54
  export declare const ascApiKeyIdSchema: CredentialSchema<Pick<MinimalAscApiKey, 'keyId'>>;
55
- export declare const ascApiKeyIssuerIdSchema: CredentialSchema<Pick<MinimalAscApiKey, 'issuerId'>>;
55
+ export declare const ascApiKeyIssuerIdSchema: CredentialSchema<{
56
+ issuerId: string;
57
+ }>;
56
58
  export declare const pushKeySchema: CredentialSchema<PushKey>;
57
59
  export declare const provisioningProfileSchema: CredentialSchema<ProvisioningProfile>;
@@ -204,7 +204,12 @@ function displayAscApiKey(maybeAscApiKey, fields) {
204
204
  if (name) {
205
205
  fields.push({ label: 'Name', value: name });
206
206
  }
207
- fields.push({ label: 'Issuer ID', value: issuerIdentifier });
207
+ if (issuerIdentifier) {
208
+ fields.push({ label: 'Issuer ID', value: issuerIdentifier });
209
+ }
210
+ else {
211
+ fields.push({ label: 'Key Type', value: 'Individual (submissions only)' });
212
+ }
208
213
  if (roles) {
209
214
  fields.push({ label: 'Roles', value: roles.join(',') });
210
215
  }