eas-cli 24.1.1 → 24.2.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 (85) hide show
  1. package/README.md +237 -131
  2. package/build/channel/insights/formatInsights.js +1 -5
  3. package/build/commandUtils/EasCommand.d.ts +2 -1
  4. package/build/commandUtils/EasCommand.js +2 -1
  5. package/build/commandUtils/context/ContextField.d.ts +2 -0
  6. package/build/commandUtils/context/ProjectIdContextField.d.ts +1 -1
  7. package/build/commandUtils/context/ProjectIdContextField.js +4 -1
  8. package/build/commandUtils/flags.d.ts +3 -0
  9. package/build/commandUtils/flags.js +6 -1
  10. package/build/commandUtils/pagination.js +2 -2
  11. package/build/commandUtils/planGating.d.ts +2 -0
  12. package/build/commandUtils/planGating.js +10 -0
  13. package/build/commands/channel/insights.d.ts +2 -2
  14. package/build/commands/channel/insights.js +1 -13
  15. package/build/commands/observe/errors.d.ts +0 -1
  16. package/build/commands/observe/errors.js +3 -10
  17. package/build/commands/observe/event.d.ts +0 -1
  18. package/build/commands/observe/event.js +3 -11
  19. package/build/commands/observe/events.d.ts +0 -1
  20. package/build/commands/observe/events.js +3 -10
  21. package/build/commands/observe/metrics-summary.d.ts +0 -1
  22. package/build/commands/observe/metrics-summary.js +3 -10
  23. package/build/commands/observe/metrics.d.ts +0 -1
  24. package/build/commands/observe/metrics.js +3 -10
  25. package/build/commands/observe/routes.d.ts +0 -1
  26. package/build/commands/observe/routes.js +3 -10
  27. package/build/commands/observe/session.d.ts +0 -1
  28. package/build/commands/observe/session.js +3 -10
  29. package/build/commands/observe/versions.d.ts +0 -1
  30. package/build/commands/observe/versions.js +3 -10
  31. package/build/commands/simulator/egress.js +1 -1
  32. package/build/commands/simulator/index.js +2 -6
  33. package/build/commands/update/insights.d.ts +1 -1
  34. package/build/commands/update/insights.js +1 -13
  35. package/build/commands/workflow/insights/index.d.ts +23 -0
  36. package/build/commands/workflow/insights/index.js +80 -0
  37. package/build/commands/workflow/insights/maestro.d.ts +26 -0
  38. package/build/commands/workflow/insights/maestro.js +140 -0
  39. package/build/graphql/generated.d.ts +261 -0
  40. package/build/graphql/generated.js +2 -0
  41. package/build/graphql/queries/AppQuery.d.ts +4 -0
  42. package/build/graphql/queries/AppQuery.js +19 -0
  43. package/build/graphql/queries/WorkflowDeviceTestCaseInsightsQuery.d.ts +27 -0
  44. package/build/graphql/queries/WorkflowDeviceTestCaseInsightsQuery.js +173 -0
  45. package/build/graphql/queries/WorkflowsInsightsQuery.d.ts +13 -0
  46. package/build/graphql/queries/WorkflowsInsightsQuery.js +84 -0
  47. package/build/insights/formatFilters.d.ts +2 -0
  48. package/build/insights/formatFilters.js +10 -0
  49. package/build/insights/formatRunsOverTime.d.ts +13 -0
  50. package/build/insights/formatRunsOverTime.js +49 -0
  51. package/build/insights/formatTimespan.d.ts +5 -1
  52. package/build/insights/formatTimespan.js +12 -0
  53. package/build/insights/metrics.d.ts +22 -0
  54. package/build/insights/metrics.js +48 -0
  55. package/build/insights/timeRange.d.ts +5 -0
  56. package/build/insights/timeRange.js +17 -1
  57. package/build/observe/flags.d.ts +0 -3
  58. package/build/observe/flags.js +1 -6
  59. package/build/observe/formatErrors.js +3 -5
  60. package/build/observe/planGating.js +2 -5
  61. package/build/observe/startAndEndTime.js +9 -0
  62. package/build/simulator/egress.js +4 -1
  63. package/build/simulator/utils.d.ts +5 -1
  64. package/build/simulator/utils.js +21 -28
  65. package/build/update/insights/formatInsights.js +1 -5
  66. package/build/utils/terminalText.d.ts +1 -0
  67. package/build/utils/terminalText.js +4 -0
  68. package/build/workflow/insights/filters.d.ts +30 -0
  69. package/build/workflow/insights/filters.js +79 -0
  70. package/build/workflow/insights/formatInsights.d.ts +44 -0
  71. package/build/workflow/insights/formatInsights.js +155 -0
  72. package/build/workflow/insights/formatMaestroInsights.d.ts +105 -0
  73. package/build/workflow/insights/formatMaestroInsights.js +298 -0
  74. package/build/workflow/insights/granularity.d.ts +27 -0
  75. package/build/workflow/insights/granularity.js +79 -0
  76. package/build/workflow/insights/maestroFilters.d.ts +23 -0
  77. package/build/workflow/insights/maestroFilters.js +47 -0
  78. package/build/workflow/insights/maestroSort.d.ts +7 -0
  79. package/build/workflow/insights/maestroSort.js +27 -0
  80. package/build/workflow/insights/planGating.d.ts +6 -0
  81. package/build/workflow/insights/planGating.js +33 -0
  82. package/oclif.manifest.json +1941 -1561
  83. package/package.json +5 -5
  84. package/build/observe/resolveProjectContext.d.ts +0 -22
  85. package/build/observe/resolveProjectContext.js +0 -21
@@ -0,0 +1,23 @@
1
+ import EasCommand from '../../../commandUtils/EasCommand';
2
+ import { WorkflowRunTriggerEventType } from '../../../graphql/generated';
3
+ export default class WorkflowInsights extends EasCommand {
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
+ 'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
10
+ days: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ status: import("@oclif/core/lib/interfaces").OptionFlag<(import("../../../graphql/generated").WorkflowRunStatus.Canceled | import("../../../graphql/generated").WorkflowRunStatus.Failure | import("../../../graphql/generated").WorkflowRunStatus.Success)[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
+ trigger: import("@oclif/core/lib/interfaces").OptionFlag<WorkflowRunTriggerEventType[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ workflow: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ 'git-ref': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
17
+ };
18
+ static contextDefinition: {
19
+ loggedIn: import("../../../commandUtils/context/LoggedInContextField").default;
20
+ projectId: import("../../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
21
+ };
22
+ runAsync(): Promise<void>;
23
+ }
@@ -0,0 +1,80 @@
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 pagination_1 = require("../../../commandUtils/pagination");
8
+ const generated_1 = require("../../../graphql/generated");
9
+ const WorkflowsInsightsQuery_1 = require("../../../graphql/queries/WorkflowsInsightsQuery");
10
+ const timeRange_1 = require("../../../insights/timeRange");
11
+ const log_1 = tslib_1.__importDefault(require("../../../log"));
12
+ const json_1 = require("../../../utils/json");
13
+ const filters_1 = require("../../../workflow/insights/filters");
14
+ const formatInsights_1 = require("../../../workflow/insights/formatInsights");
15
+ const granularity_1 = require("../../../workflow/insights/granularity");
16
+ const planGating_1 = require("../../../workflow/insights/planGating");
17
+ const DEFAULT_WORKFLOWS_LIMIT = 50;
18
+ const MAX_WORKFLOWS_LIMIT = 100;
19
+ class WorkflowInsights extends EasCommand_1.default {
20
+ static description = 'display run counts, success rate, and per-workflow trends for a time range';
21
+ static flags = {
22
+ ...filters_1.WorkflowsInsightsSharedFilterFlags,
23
+ status: core_1.Flags.option({
24
+ description: 'Only include runs with this status (can be specified multiple times).',
25
+ options: filters_1.INSIGHTS_RUN_STATUSES,
26
+ multiple: true,
27
+ })(),
28
+ trigger: core_1.Flags.option({
29
+ description: 'Only include runs started by this trigger (can be specified multiple times).',
30
+ options: Object.values(generated_1.WorkflowRunTriggerEventType),
31
+ multiple: true,
32
+ })(),
33
+ ...timeRange_1.InsightsTimeRangeFlags,
34
+ limit: (0, pagination_1.getLimitFlagWithCustomValues)({
35
+ defaultTo: DEFAULT_WORKFLOWS_LIMIT,
36
+ limit: MAX_WORKFLOWS_LIMIT,
37
+ description: `The number of workflows to list. Defaults to ${DEFAULT_WORKFLOWS_LIMIT} and is capped at ${MAX_WORKFLOWS_LIMIT}.`,
38
+ }),
39
+ ...flags_1.EasProjectIdFlag,
40
+ ...flags_1.EasNonInteractiveAndJsonFlags,
41
+ };
42
+ static contextDefinition = {
43
+ ...this.ContextOptions.ProjectId,
44
+ ...this.ContextOptions.LoggedIn,
45
+ };
46
+ async runAsync() {
47
+ const { flags } = await this.parse(WorkflowInsights);
48
+ const { json, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
49
+ if (json) {
50
+ (0, json_1.enableJsonOutput)();
51
+ }
52
+ const { timespan, granularity } = (0, granularity_1.alignInsightsTimespan)((0, timeRange_1.resolveInsightsTimeRange)(flags));
53
+ const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(WorkflowInsights, {
54
+ nonInteractive,
55
+ projectIdOverride: flags['project-id'],
56
+ });
57
+ const filters = await (0, filters_1.resolveWorkflowsInsightsFiltersInputAsync)(graphqlClient, projectId, flags);
58
+ const app = await (0, planGating_1.withInsightsPlanGateHandlingAsync)(() => WorkflowsInsightsQuery_1.WorkflowsInsightsQuery.byAppIdAsync(graphqlClient, {
59
+ appId: projectId,
60
+ startTime: timespan.startTime,
61
+ endTime: timespan.endTime,
62
+ filters,
63
+ granularity,
64
+ first: flags.limit ?? DEFAULT_WORKFLOWS_LIMIT,
65
+ }));
66
+ const summary = (0, formatInsights_1.toWorkflowsInsightsSummary)(app, {
67
+ timespan,
68
+ granularity,
69
+ filters: (0, filters_1.getAppliedWorkflowsInsightsFilters)(flags),
70
+ });
71
+ if (json) {
72
+ (0, json_1.printJsonOnlyOutput)((0, formatInsights_1.buildWorkflowsInsightsJson)(summary));
73
+ }
74
+ else {
75
+ log_1.default.addNewLineIfNone();
76
+ log_1.default.log((0, formatInsights_1.buildWorkflowsInsightsTable)(summary));
77
+ }
78
+ }
79
+ }
80
+ exports.default = WorkflowInsights;
@@ -0,0 +1,26 @@
1
+ import EasCommand from '../../../commandUtils/EasCommand';
2
+ export default class WorkflowInsightsMaestro extends EasCommand {
3
+ static description: string;
4
+ static flags: {
5
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
6
+ 'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
+ 'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
9
+ days: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ start: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ end: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ status: import("@oclif/core/lib/interfaces").OptionFlag<("FAILED" | "PASSED" | "FLAKY")[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ tag: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
+ search: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ sort: import("@oclif/core/lib/interfaces").OptionFlag<"runs" | "p90" | "fails" | "flakes" | "pass-rate" | "flake-rate" | "last-run", import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ 'sort-direction': import("@oclif/core/lib/interfaces").OptionFlag<"asc" | "desc", import("@oclif/core/lib/interfaces").CustomOptions>;
17
+ flow: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
18
+ workflow: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
+ 'git-ref': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
20
+ };
21
+ static contextDefinition: {
22
+ loggedIn: import("../../../commandUtils/context/LoggedInContextField").default;
23
+ projectId: import("../../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
24
+ };
25
+ runAsync(): Promise<void>;
26
+ }
@@ -0,0 +1,140 @@
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 pagination_1 = require("../../../commandUtils/pagination");
8
+ const WorkflowDeviceTestCaseInsightsQuery_1 = require("../../../graphql/queries/WorkflowDeviceTestCaseInsightsQuery");
9
+ const timeRange_1 = require("../../../insights/timeRange");
10
+ const log_1 = tslib_1.__importDefault(require("../../../log"));
11
+ const json_1 = require("../../../utils/json");
12
+ const filters_1 = require("../../../workflow/insights/filters");
13
+ const formatMaestroInsights_1 = require("../../../workflow/insights/formatMaestroInsights");
14
+ const granularity_1 = require("../../../workflow/insights/granularity");
15
+ const maestroFilters_1 = require("../../../workflow/insights/maestroFilters");
16
+ const maestroSort_1 = require("../../../workflow/insights/maestroSort");
17
+ const planGating_1 = require("../../../workflow/insights/planGating");
18
+ const DEFAULT_LIMIT = 50;
19
+ const MAX_LIMIT = 100;
20
+ const ERROR_PATTERNS_LIMIT = 5;
21
+ // These only shape the flows table, so they cannot be combined with a single flow's history.
22
+ const OVERVIEW_ONLY_FLAGS = ['status', 'tag', 'search', 'sort', 'sort-direction'];
23
+ class WorkflowInsightsMaestro extends EasCommand_1.default {
24
+ static description = "display Maestro test insights for a time range: pass and flake rates, per-flow stats, and a single flow's history";
25
+ static flags = {
26
+ ...filters_1.WorkflowsInsightsSharedFilterFlags,
27
+ status: core_1.Flags.option({
28
+ description: 'Only include flow runs with this status (can be specified multiple times). PASSED means passed on the first attempt.',
29
+ options: maestroFilters_1.MAESTRO_STATUS_OPTIONS,
30
+ multiple: true,
31
+ exclusive: ['flow'],
32
+ })(),
33
+ tag: core_1.Flags.string({
34
+ description: 'Only include flow runs with this tag (can be specified multiple times).',
35
+ multiple: true,
36
+ exclusive: ['flow'],
37
+ }),
38
+ search: core_1.Flags.string({
39
+ description: 'Only list flows whose path contains this text.',
40
+ exclusive: ['flow'],
41
+ }),
42
+ sort: core_1.Flags.option({
43
+ description: 'Sort the flows table by this column.',
44
+ options: maestroSort_1.MAESTRO_SORT_OPTIONS,
45
+ default: 'fails',
46
+ exclusive: ['flow'],
47
+ })(),
48
+ 'sort-direction': core_1.Flags.option({
49
+ description: 'Sort direction for the flows table.',
50
+ options: maestroSort_1.MAESTRO_SORT_DIRECTIONS,
51
+ default: 'desc',
52
+ exclusive: ['flow'],
53
+ })(),
54
+ flow: core_1.Flags.string({
55
+ description: `Show one flow's history instead of the overview, by flow path. Cannot be combined with ${OVERVIEW_ONLY_FLAGS.map(flag => `--${flag}`).join(', ')}.`,
56
+ exclusive: OVERVIEW_ONLY_FLAGS,
57
+ }),
58
+ ...timeRange_1.InsightsTimeRangeFlags,
59
+ limit: (0, pagination_1.getLimitFlagWithCustomValues)({
60
+ defaultTo: DEFAULT_LIMIT,
61
+ limit: MAX_LIMIT,
62
+ description: `The number of flows to list, or of recent runs with --flow. Defaults to ${DEFAULT_LIMIT} and is capped at ${MAX_LIMIT}.`,
63
+ }),
64
+ ...flags_1.EasProjectIdFlag,
65
+ ...flags_1.EasNonInteractiveAndJsonFlags,
66
+ };
67
+ static contextDefinition = {
68
+ ...this.ContextOptions.ProjectId,
69
+ ...this.ContextOptions.LoggedIn,
70
+ };
71
+ async runAsync() {
72
+ const { flags } = await this.parse(WorkflowInsightsMaestro);
73
+ const { json, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
74
+ if (json) {
75
+ (0, json_1.enableJsonOutput)();
76
+ }
77
+ const { timespan, granularity } = (0, granularity_1.alignMaestroInsightsTimespan)((0, timeRange_1.resolveInsightsTimeRange)(flags));
78
+ const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(WorkflowInsightsMaestro, {
79
+ nonInteractive,
80
+ projectIdOverride: flags['project-id'],
81
+ });
82
+ const appliedFilters = (0, maestroFilters_1.getAppliedMaestroInsightsFilters)(flags);
83
+ const limit = flags.limit ?? DEFAULT_LIMIT;
84
+ if (flags.flow !== undefined) {
85
+ const flowPath = flags.flow;
86
+ const filters = await (0, maestroFilters_1.resolveMaestroHistoryFiltersInputAsync)(graphqlClient, projectId, flags);
87
+ const app = await (0, planGating_1.withInsightsPlanGateHandlingAsync)(() => WorkflowDeviceTestCaseInsightsQuery_1.WorkflowDeviceTestCaseInsightsQuery.historyByAppIdAsync(graphqlClient, {
88
+ appId: projectId,
89
+ path: flowPath,
90
+ startTime: timespan.startTime,
91
+ endTime: timespan.endTime,
92
+ filters,
93
+ granularity,
94
+ errorPatternsFirst: ERROR_PATTERNS_LIMIT,
95
+ recentRunsFirst: limit,
96
+ }));
97
+ const summary = (0, formatMaestroInsights_1.toMaestroFlowHistorySummary)(app, {
98
+ flowPath,
99
+ timespan,
100
+ granularity,
101
+ filters: appliedFilters,
102
+ });
103
+ if (json) {
104
+ (0, json_1.printJsonOnlyOutput)((0, formatMaestroInsights_1.buildMaestroFlowHistoryJson)(summary));
105
+ }
106
+ else {
107
+ log_1.default.addNewLineIfNone();
108
+ log_1.default.log((0, formatMaestroInsights_1.buildMaestroFlowHistoryTable)(summary));
109
+ }
110
+ return;
111
+ }
112
+ const filters = await (0, maestroFilters_1.resolveMaestroInsightsFiltersInputAsync)(graphqlClient, projectId, flags);
113
+ const sort = { field: flags.sort, direction: flags['sort-direction'] };
114
+ const app = await (0, planGating_1.withInsightsPlanGateHandlingAsync)(() => WorkflowDeviceTestCaseInsightsQuery_1.WorkflowDeviceTestCaseInsightsQuery.insightsByAppIdAsync(graphqlClient, {
115
+ appId: projectId,
116
+ startTime: timespan.startTime,
117
+ endTime: timespan.endTime,
118
+ filters,
119
+ granularity,
120
+ sortField: maestroSort_1.SORT_FIELD_BY_OPTION[sort.field],
121
+ sortDirection: maestroSort_1.SORT_DIRECTION_BY_OPTION[sort.direction],
122
+ search: flags.search,
123
+ first: limit,
124
+ }));
125
+ const summary = (0, formatMaestroInsights_1.toMaestroInsightsSummary)(app, {
126
+ timespan,
127
+ granularity,
128
+ filters: appliedFilters,
129
+ sort,
130
+ });
131
+ if (json) {
132
+ (0, json_1.printJsonOnlyOutput)((0, formatMaestroInsights_1.buildMaestroInsightsJson)(summary));
133
+ }
134
+ else {
135
+ log_1.default.addNewLineIfNone();
136
+ log_1.default.log((0, formatMaestroInsights_1.buildMaestroInsightsTable)(summary));
137
+ }
138
+ }
139
+ }
140
+ exports.default = WorkflowInsightsMaestro;
@@ -5168,6 +5168,8 @@ export declare enum BuildRetryDisabledReason {
5168
5168
  AlreadyRetried = "ALREADY_RETRIED",
5169
5169
  InvalidStatus = "INVALID_STATUS",
5170
5170
  IsGithubBuild = "IS_GITHUB_BUILD",
5171
+ IsWorkflowBuild = "IS_WORKFLOW_BUILD",
5172
+ LocalBuildsNotRetryable = "LOCAL_BUILDS_NOT_RETRYABLE",
5171
5173
  NotCompletedYet = "NOT_COMPLETED_YET",
5172
5174
  TooMuchTimeElapsed = "TOO_MUCH_TIME_ELAPSED"
5173
5175
  }
@@ -18328,6 +18330,24 @@ export type AppByIdWorkflowsQuery = {
18328
18330
  };
18329
18331
  };
18330
18332
  };
18333
+ export type AppByIdWorkflowFileNamesQueryVariables = Exact<{
18334
+ appId: Scalars['String']['input'];
18335
+ }>;
18336
+ export type AppByIdWorkflowFileNamesQuery = {
18337
+ __typename?: 'RootQuery';
18338
+ app: {
18339
+ __typename?: 'AppQuery';
18340
+ byId: {
18341
+ __typename?: 'App';
18342
+ id: string;
18343
+ workflows: Array<{
18344
+ __typename?: 'Workflow';
18345
+ id: string;
18346
+ fileName: string;
18347
+ }>;
18348
+ };
18349
+ };
18350
+ };
18331
18351
  export type AppByIdWorkflowRunsFilteredByStatusQueryVariables = Exact<{
18332
18352
  appId: Scalars['String']['input'];
18333
18353
  status?: InputMaybe<WorkflowRunStatus>;
@@ -22008,6 +22028,166 @@ export type WebhookByIdQuery = {
22008
22028
  };
22009
22029
  };
22010
22030
  };
22031
+ export type WorkflowDeviceTestCaseInsightsByAppIdQueryVariables = Exact<{
22032
+ appId: Scalars['String']['input'];
22033
+ timespan: WorkflowDeviceTestCaseInsightsTimespanInput;
22034
+ filters?: InputMaybe<WorkflowDeviceTestCaseInsightsFiltersInput>;
22035
+ granularity: WorkflowDeviceTestCaseInsightsTimeSeriesGranularity;
22036
+ sortField?: InputMaybe<WorkflowDeviceTestCaseStatSortField>;
22037
+ sortDirection?: InputMaybe<WorkflowDeviceTestCaseSortDirection>;
22038
+ search?: InputMaybe<Scalars['String']['input']>;
22039
+ first: Scalars['Int']['input'];
22040
+ }>;
22041
+ export type WorkflowDeviceTestCaseInsightsByAppIdQuery = {
22042
+ __typename?: 'RootQuery';
22043
+ app: {
22044
+ __typename?: 'AppQuery';
22045
+ byId: {
22046
+ __typename?: 'App';
22047
+ id: string;
22048
+ fullName: string;
22049
+ workflowDeviceTestCaseInsights: {
22050
+ __typename?: 'WorkflowDeviceTestCaseInsights';
22051
+ totals: {
22052
+ __typename?: 'WorkflowDeviceTestCaseInsightsTotals';
22053
+ totalRuns: {
22054
+ __typename?: 'WorkflowDeviceTestCaseInsightsMetric';
22055
+ currentValue: number;
22056
+ previousValue: number;
22057
+ };
22058
+ passedCleanCount: {
22059
+ __typename?: 'WorkflowDeviceTestCaseInsightsMetric';
22060
+ currentValue: number;
22061
+ previousValue: number;
22062
+ };
22063
+ flakyCount: {
22064
+ __typename?: 'WorkflowDeviceTestCaseInsightsMetric';
22065
+ currentValue: number;
22066
+ previousValue: number;
22067
+ };
22068
+ distinctFlakyTestCount: {
22069
+ __typename?: 'WorkflowDeviceTestCaseInsightsMetric';
22070
+ currentValue: number;
22071
+ previousValue: number;
22072
+ };
22073
+ avgDurationMs: {
22074
+ __typename?: 'WorkflowDeviceTestCaseInsightsNullableMetric';
22075
+ currentValue?: number | null;
22076
+ previousValue?: number | null;
22077
+ };
22078
+ };
22079
+ timeSeries: Array<{
22080
+ __typename?: 'WorkflowDeviceTestCaseInsightsBucket';
22081
+ bucketStartAt: any;
22082
+ passedClean: number;
22083
+ flaky: number;
22084
+ failed: number;
22085
+ }>;
22086
+ tests: {
22087
+ __typename?: 'WorkflowDeviceTestCaseStatConnection';
22088
+ totalCount: number;
22089
+ edges: Array<{
22090
+ __typename?: 'WorkflowDeviceTestCaseStatEdge';
22091
+ node: {
22092
+ __typename?: 'WorkflowDeviceTestCaseStat';
22093
+ path: string;
22094
+ name: string;
22095
+ totalRuns: number;
22096
+ passedCleanCount: number;
22097
+ flakyCount: number;
22098
+ failedCount: number;
22099
+ p90DurationMs?: number | null;
22100
+ lastRunAt: any;
22101
+ lastRunStatus: WorkflowDeviceTestCaseStatus;
22102
+ lastRunIsFlaky: boolean;
22103
+ };
22104
+ }>;
22105
+ pageInfo: {
22106
+ __typename?: 'PageInfo';
22107
+ hasNextPage: boolean;
22108
+ };
22109
+ };
22110
+ };
22111
+ };
22112
+ };
22113
+ };
22114
+ export type WorkflowDeviceTestCaseHistoryByAppIdQueryVariables = Exact<{
22115
+ appId: Scalars['String']['input'];
22116
+ path: Scalars['String']['input'];
22117
+ timespan: WorkflowDeviceTestCaseInsightsTimespanInput;
22118
+ filters?: InputMaybe<WorkflowDeviceTestCaseHistoryFiltersInput>;
22119
+ granularity: WorkflowDeviceTestCaseInsightsTimeSeriesGranularity;
22120
+ errorPatternsFirst: Scalars['Int']['input'];
22121
+ recentRunsFirst: Scalars['Int']['input'];
22122
+ }>;
22123
+ export type WorkflowDeviceTestCaseHistoryByAppIdQuery = {
22124
+ __typename?: 'RootQuery';
22125
+ app: {
22126
+ __typename?: 'AppQuery';
22127
+ byId: {
22128
+ __typename?: 'App';
22129
+ id: string;
22130
+ fullName: string;
22131
+ workflowDeviceTestCaseHistory: {
22132
+ __typename?: 'WorkflowDeviceTestCaseHistory';
22133
+ totals: {
22134
+ __typename?: 'WorkflowDeviceTestCaseInsightsTotals';
22135
+ totalRuns: {
22136
+ __typename?: 'WorkflowDeviceTestCaseInsightsMetric';
22137
+ currentValue: number;
22138
+ };
22139
+ passedCleanCount: {
22140
+ __typename?: 'WorkflowDeviceTestCaseInsightsMetric';
22141
+ currentValue: number;
22142
+ };
22143
+ flakyCount: {
22144
+ __typename?: 'WorkflowDeviceTestCaseInsightsMetric';
22145
+ currentValue: number;
22146
+ };
22147
+ p90DurationMs: {
22148
+ __typename?: 'WorkflowDeviceTestCaseInsightsNullableMetric';
22149
+ currentValue?: number | null;
22150
+ };
22151
+ };
22152
+ timeSeries: Array<{
22153
+ __typename?: 'WorkflowDeviceTestCaseInsightsBucket';
22154
+ bucketStartAt: any;
22155
+ passedClean: number;
22156
+ flaky: number;
22157
+ failed: number;
22158
+ }>;
22159
+ errorPatterns: Array<{
22160
+ __typename?: 'WorkflowDeviceTestCaseErrorPattern';
22161
+ sampleMessage: string;
22162
+ count: number;
22163
+ }>;
22164
+ recentRuns: {
22165
+ __typename?: 'WorkflowDeviceTestCaseRecentRunConnection';
22166
+ totalCount: number;
22167
+ edges: Array<{
22168
+ __typename?: 'WorkflowDeviceTestCaseRecentRunEdge';
22169
+ node: {
22170
+ __typename?: 'WorkflowDeviceTestCaseRecentRun';
22171
+ id: string;
22172
+ status: WorkflowDeviceTestCaseStatus;
22173
+ durationMs?: number | null;
22174
+ isFlaky: boolean;
22175
+ createdAt: any;
22176
+ workflowRunId: string;
22177
+ workflowRunName: string;
22178
+ gitRef?: string | null;
22179
+ commitSha?: string | null;
22180
+ };
22181
+ }>;
22182
+ pageInfo: {
22183
+ __typename?: 'PageInfo';
22184
+ hasNextPage: boolean;
22185
+ };
22186
+ };
22187
+ };
22188
+ };
22189
+ };
22190
+ };
22011
22191
  export type WorkflowJobByIdQueryVariables = Exact<{
22012
22192
  workflowJobId: Scalars['ID']['input'];
22013
22193
  }>;
@@ -22515,6 +22695,87 @@ export type WorkflowRunsForAppIdFileNameAndStatusQuery = {
22515
22695
  };
22516
22696
  };
22517
22697
  };
22698
+ export type WorkflowsInsightsByAppIdQueryVariables = Exact<{
22699
+ appId: Scalars['String']['input'];
22700
+ timespan: WorkflowsInsightsTimespanInput;
22701
+ filters?: InputMaybe<WorkflowsInsightsFiltersInput>;
22702
+ granularity: WorkflowsInsightsRunsOverTimeGranularity;
22703
+ first: Scalars['Int']['input'];
22704
+ }>;
22705
+ export type WorkflowsInsightsByAppIdQuery = {
22706
+ __typename?: 'RootQuery';
22707
+ app: {
22708
+ __typename?: 'AppQuery';
22709
+ byId: {
22710
+ __typename?: 'App';
22711
+ id: string;
22712
+ fullName: string;
22713
+ workflows: Array<{
22714
+ __typename?: 'Workflow';
22715
+ id: string;
22716
+ fileName: string;
22717
+ }>;
22718
+ workflowsInsights: {
22719
+ __typename?: 'AppWorkflowsInsights';
22720
+ overviewMetrics: {
22721
+ __typename?: 'WorkflowsInsightsOverviewMetrics';
22722
+ totalRuns: {
22723
+ __typename?: 'WorkflowsInsightsMetric';
22724
+ currentValue: number;
22725
+ previousValue: number;
22726
+ };
22727
+ successfulRuns: {
22728
+ __typename?: 'WorkflowsInsightsMetric';
22729
+ currentValue: number;
22730
+ previousValue: number;
22731
+ };
22732
+ failedRuns: {
22733
+ __typename?: 'WorkflowsInsightsMetric';
22734
+ currentValue: number;
22735
+ previousValue: number;
22736
+ };
22737
+ activeWorkflows: {
22738
+ __typename?: 'WorkflowsInsightsMetric';
22739
+ currentValue: number;
22740
+ previousValue: number;
22741
+ };
22742
+ };
22743
+ runsOverTime: {
22744
+ __typename?: 'WorkflowsInsightsRunsOverTimeData';
22745
+ lineChart: {
22746
+ __typename?: 'LineChartData';
22747
+ labels: Array<string>;
22748
+ datasets: Array<{
22749
+ __typename?: 'LineDataset';
22750
+ id: string;
22751
+ data: Array<number | null>;
22752
+ }>;
22753
+ };
22754
+ };
22755
+ workflows: {
22756
+ __typename?: 'WorkflowsInsightsWorkflowConnection';
22757
+ edges: Array<{
22758
+ __typename?: 'WorkflowsInsightsWorkflowEdge';
22759
+ node: {
22760
+ __typename?: 'WorkflowsInsightsWorkflowNode';
22761
+ workflowId: string;
22762
+ name: string;
22763
+ totalRuns: number;
22764
+ successfulRuns: number;
22765
+ failedRuns: number;
22766
+ canceledRuns: number;
22767
+ lastRunAt: any;
22768
+ };
22769
+ }>;
22770
+ pageInfo: {
22771
+ __typename?: 'PageInfo';
22772
+ hasNextPage: boolean;
22773
+ };
22774
+ };
22775
+ };
22776
+ };
22777
+ };
22778
+ };
22518
22779
  export type AccountFragment = {
22519
22780
  __typename?: 'Account';
22520
22781
  id: string;
@@ -446,6 +446,8 @@ var BuildRetryDisabledReason;
446
446
  BuildRetryDisabledReason["AlreadyRetried"] = "ALREADY_RETRIED";
447
447
  BuildRetryDisabledReason["InvalidStatus"] = "INVALID_STATUS";
448
448
  BuildRetryDisabledReason["IsGithubBuild"] = "IS_GITHUB_BUILD";
449
+ BuildRetryDisabledReason["IsWorkflowBuild"] = "IS_WORKFLOW_BUILD";
450
+ BuildRetryDisabledReason["LocalBuildsNotRetryable"] = "LOCAL_BUILDS_NOT_RETRYABLE";
449
451
  BuildRetryDisabledReason["NotCompletedYet"] = "NOT_COMPLETED_YET";
450
452
  BuildRetryDisabledReason["TooMuchTimeElapsed"] = "TOO_MUCH_TIME_ELAPSED";
451
453
  })(BuildRetryDisabledReason || (exports.BuildRetryDisabledReason = BuildRetryDisabledReason = {}));
@@ -5,5 +5,9 @@ export declare const AppQuery: {
5
5
  byFullNameAsync(graphqlClient: ExpoGraphqlClient, fullName: string): Promise<AppFragment>;
6
6
  byIdProfileImageUrlAsync(graphqlClient: ExpoGraphqlClient, projectId: string): Promise<string | null>;
7
7
  byIdWorkflowsAsync(graphqlClient: ExpoGraphqlClient, appId: string): Promise<WorkflowFragment[]>;
8
+ byIdWorkflowFileNamesAsync(graphqlClient: ExpoGraphqlClient, appId: string): Promise<{
9
+ id: string;
10
+ fileName: string;
11
+ }[]>;
8
12
  byIdWorkflowRunsFilteredByStatusAsync(graphqlClient: ExpoGraphqlClient, appId: string, status?: WorkflowRunStatus, limit?: number): Promise<WorkflowRunFragment[]>;
9
13
  };
@@ -88,6 +88,25 @@ exports.AppQuery = {
88
88
  (0, assert_1.default)(data.app, 'GraphQL: `app` not defined in server response');
89
89
  return data.app.byId.workflows;
90
90
  },
91
+ async byIdWorkflowFileNamesAsync(graphqlClient, appId) {
92
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
93
+ .query((0, graphql_tag_1.default) `
94
+ query AppByIdWorkflowFileNamesQuery($appId: String!) {
95
+ app {
96
+ byId(appId: $appId) {
97
+ id
98
+ workflows {
99
+ id
100
+ fileName
101
+ }
102
+ }
103
+ }
104
+ }
105
+ `, { appId }, { additionalTypenames: ['App', 'Workflow'] })
106
+ .toPromise());
107
+ (0, assert_1.default)(data.app, 'GraphQL: `app` not defined in server response');
108
+ return data.app.byId.workflows;
109
+ },
91
110
  async byIdWorkflowRunsFilteredByStatusAsync(graphqlClient, appId, status, limit) {
92
111
  validateLimit(limit);
93
112
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
@@ -0,0 +1,27 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
+ import { WorkflowDeviceTestCaseHistoryByAppIdQuery, WorkflowDeviceTestCaseHistoryFiltersInput, WorkflowDeviceTestCaseInsightsByAppIdQuery, WorkflowDeviceTestCaseInsightsFiltersInput, WorkflowDeviceTestCaseInsightsTimeSeriesGranularity, WorkflowDeviceTestCaseSortDirection, WorkflowDeviceTestCaseStatSortField } from '../generated';
3
+ export type AppWithMaestroInsightsObject = WorkflowDeviceTestCaseInsightsByAppIdQuery['app']['byId'];
4
+ export type AppWithMaestroFlowHistoryObject = WorkflowDeviceTestCaseHistoryByAppIdQuery['app']['byId'];
5
+ export declare const WorkflowDeviceTestCaseInsightsQuery: {
6
+ insightsByAppIdAsync(graphqlClient: ExpoGraphqlClient, { appId, startTime, endTime, filters, granularity, sortField, sortDirection, search, first, }: {
7
+ appId: string;
8
+ startTime: string;
9
+ endTime: string;
10
+ filters?: WorkflowDeviceTestCaseInsightsFiltersInput;
11
+ granularity: WorkflowDeviceTestCaseInsightsTimeSeriesGranularity;
12
+ sortField: WorkflowDeviceTestCaseStatSortField;
13
+ sortDirection: WorkflowDeviceTestCaseSortDirection;
14
+ search?: string;
15
+ first: number;
16
+ }): Promise<AppWithMaestroInsightsObject>;
17
+ historyByAppIdAsync(graphqlClient: ExpoGraphqlClient, { appId, path, startTime, endTime, filters, granularity, errorPatternsFirst, recentRunsFirst, }: {
18
+ appId: string;
19
+ path: string;
20
+ startTime: string;
21
+ endTime: string;
22
+ filters?: WorkflowDeviceTestCaseHistoryFiltersInput;
23
+ granularity: WorkflowDeviceTestCaseInsightsTimeSeriesGranularity;
24
+ errorPatternsFirst: number;
25
+ recentRunsFirst: number;
26
+ }): Promise<AppWithMaestroFlowHistoryObject>;
27
+ };