@shipfox/client-workflows 12.0.2 → 13.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.
- package/.storybook/preview.tsx +3 -3
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +56 -0
- package/dist/components/job-graph/job-duration-format.d.ts +2 -2
- package/dist/components/job-graph/job-duration-format.d.ts.map +1 -1
- package/dist/components/job-graph/job-duration-format.js +4 -2
- package/dist/components/job-graph/job-duration-format.js.map +1 -1
- package/dist/components/job-graph/job-node.d.ts +1 -1
- package/dist/components/job-graph/job-node.d.ts.map +1 -1
- package/dist/components/job-graph/job-node.js +5 -4
- package/dist/components/job-graph/job-node.js.map +1 -1
- package/dist/components/step-list/step-list.d.ts +2 -2
- package/dist/components/step-list/step-list.d.ts.map +1 -1
- package/dist/components/step-list/step-list.js.map +1 -1
- package/dist/components/workflow-run-list/job-status-strip.d.ts +21 -0
- package/dist/components/workflow-run-list/job-status-strip.d.ts.map +1 -0
- package/dist/components/workflow-run-list/job-status-strip.js +185 -0
- package/dist/components/workflow-run-list/job-status-strip.js.map +1 -0
- package/dist/components/workflow-run-list/run-display.d.ts +27 -3
- package/dist/components/workflow-run-list/run-display.d.ts.map +1 -1
- package/dist/components/workflow-run-list/run-display.js +78 -7
- package/dist/components/workflow-run-list/run-display.js.map +1 -1
- package/dist/components/workflow-run-list/types.d.ts +23 -24
- package/dist/components/workflow-run-list/types.d.ts.map +1 -1
- package/dist/components/workflow-run-list/types.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-filter-menu.d.ts +22 -0
- package/dist/components/workflow-run-list/workflow-run-filter-menu.d.ts.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-filter-menu.js +68 -0
- package/dist/components/workflow-run-list/workflow-run-filter-menu.js.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-filters.d.ts +18 -0
- package/dist/components/workflow-run-list/workflow-run-filters.d.ts.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-filters.js +236 -0
- package/dist/components/workflow-run-list/workflow-run-filters.js.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-list-content.d.ts +8 -4
- package/dist/components/workflow-run-list/workflow-run-list-content.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-content.js +40 -12
- package/dist/components/workflow-run-list/workflow-run-list-content.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-states.d.ts +29 -2
- package/dist/components/workflow-run-list/workflow-run-list-states.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-states.js +103 -44
- package/dist/components/workflow-run-list/workflow-run-list-states.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-view.d.ts +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-view.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-view.js +60 -43
- package/dist/components/workflow-run-list/workflow-run-list-view.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list.d.ts +1 -1
- package/dist/components/workflow-run-list/workflow-run-list.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list.js +20 -8
- package/dist/components/workflow-run-list/workflow-run-list.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-row.d.ts +19 -9
- package/dist/components/workflow-run-list/workflow-run-row.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-row.js +179 -112
- package/dist/components/workflow-run-list/workflow-run-row.js.map +1 -1
- package/dist/components/workflow-run-number-label.d.ts +15 -0
- package/dist/components/workflow-run-number-label.d.ts.map +1 -0
- package/dist/components/workflow-run-number-label.js +41 -0
- package/dist/components/workflow-run-number-label.js.map +1 -0
- package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.d.ts +3 -3
- package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.d.ts.map +1 -1
- package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.js +8 -7
- package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.js.map +1 -1
- package/dist/components/workflow-run-summary/workflow-run-summary.d.ts +3 -3
- package/dist/components/workflow-run-summary/workflow-run-summary.d.ts.map +1 -1
- package/dist/components/workflow-run-summary/workflow-run-summary.js +16 -7
- package/dist/components/workflow-run-summary/workflow-run-summary.js.map +1 -1
- package/dist/components/workflow-run-view/agent-config-failure-callout.d.ts +2 -2
- package/dist/components/workflow-run-view/agent-config-failure-callout.d.ts.map +1 -1
- package/dist/components/workflow-run-view/agent-config-failure-callout.js +4 -4
- package/dist/components/workflow-run-view/agent-config-failure-callout.js.map +1 -1
- package/dist/components/workflow-run-view/job-card.d.ts +2 -2
- package/dist/components/workflow-run-view/job-card.d.ts.map +1 -1
- package/dist/components/workflow-run-view/job-card.js +51 -32
- package/dist/components/workflow-run-view/job-card.js.map +1 -1
- package/dist/components/workflow-run-view/job-execution-switcher.d.ts +1 -1
- package/dist/components/workflow-run-view/job-execution-switcher.d.ts.map +1 -1
- package/dist/components/workflow-run-view/job-execution-switcher.js +20 -8
- package/dist/components/workflow-run-view/job-execution-switcher.js.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-view.d.ts +3 -2
- package/dist/components/workflow-run-view/workflow-run-view.d.ts.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-view.js +15 -11
- package/dist/components/workflow-run-view/workflow-run-view.js.map +1 -1
- package/dist/components/workflow-status/status-visuals.d.ts +4 -4
- package/dist/components/workflow-status/status-visuals.d.ts.map +1 -1
- package/dist/components/workflow-status/status-visuals.js +7 -0
- package/dist/components/workflow-status/status-visuals.js.map +1 -1
- package/dist/components/workflow-status/workflow-status-icon.d.ts +3 -4
- package/dist/components/workflow-status/workflow-status-icon.d.ts.map +1 -1
- package/dist/components/workflow-status/workflow-status-icon.js +6 -4
- package/dist/components/workflow-status/workflow-status-icon.js.map +1 -1
- package/dist/core/entities/job-execution.d.ts +10 -0
- package/dist/core/entities/job-execution.d.ts.map +1 -1
- package/dist/core/entities/job-execution.js +11 -0
- package/dist/core/entities/job-execution.js.map +1 -1
- package/dist/core/entities/job.d.ts +4 -2
- package/dist/core/entities/job.d.ts.map +1 -1
- package/dist/core/entities/job.js +8 -1
- package/dist/core/entities/job.js.map +1 -1
- package/dist/core/entities/workflow-run.d.ts +52 -4
- package/dist/core/entities/workflow-run.d.ts.map +1 -1
- package/dist/core/entities/workflow-run.js +22 -3
- package/dist/core/entities/workflow-run.js.map +1 -1
- package/dist/core/workflow-run.d.ts +6 -6
- package/dist/core/workflow-run.d.ts.map +1 -1
- package/dist/core/workflow-run.js +3 -3
- package/dist/core/workflow-run.js.map +1 -1
- package/dist/feature.d.ts +7 -7
- package/dist/feature.js +5 -5
- package/dist/feature.js.map +1 -1
- package/dist/hooks/api/workflow-run-mapper.d.ts +4 -3
- package/dist/hooks/api/workflow-run-mapper.d.ts.map +1 -1
- package/dist/hooks/api/workflow-run-mapper.js +31 -3
- package/dist/hooks/api/workflow-run-mapper.js.map +1 -1
- package/dist/hooks/api/workflow-runs.d.ts +4 -4
- package/dist/hooks/api/workflow-runs.d.ts.map +1 -1
- package/dist/hooks/api/workflow-runs.js +12 -4
- package/dist/hooks/api/workflow-runs.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/pages/project-workflows-page.js +46 -1
- package/dist/pages/project-workflows-page.js.map +1 -1
- package/dist/pages/workflow-run-detail-page.d.ts +11 -0
- package/dist/pages/workflow-run-detail-page.d.ts.map +1 -0
- package/dist/pages/workflow-run-detail-page.js +30 -0
- package/dist/pages/workflow-run-detail-page.js.map +1 -0
- package/dist/pages/workflow-run-list-page.d.ts +10 -0
- package/dist/pages/workflow-run-list-page.d.ts.map +1 -0
- package/dist/pages/workflow-run-list-page.js +43 -0
- package/dist/pages/workflow-run-list-page.js.map +1 -0
- package/dist/routes/inputs.d.ts +61 -5
- package/dist/routes/inputs.d.ts.map +1 -1
- package/dist/routes/inputs.js +150 -13
- package/dist/routes/inputs.js.map +1 -1
- package/dist/routes/project-route.d.ts +6 -0
- package/dist/routes/project-route.d.ts.map +1 -0
- package/dist/routes/project-route.js +25 -0
- package/dist/routes/project-route.js.map +1 -0
- package/dist/routes/run-detail.d.ts.map +1 -1
- package/dist/routes/run-detail.js +12 -7
- package/dist/routes/run-detail.js.map +1 -1
- package/dist/routes/runs.d.ts.map +1 -1
- package/dist/routes/runs.js +11 -6
- package/dist/routes/runs.js.map +1 -1
- package/dist/routes/workflows.d.ts.map +1 -1
- package/dist/routes/workflows.js +6 -5
- package/dist/routes/workflows.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/components/job-graph/job-duration-format.ts +11 -2
- package/src/components/job-graph/job-graph-view.test.tsx +19 -8
- package/src/components/job-graph/job-graph.stories.tsx +23 -19
- package/src/components/job-graph/job-node.stories.tsx +10 -5
- package/src/components/job-graph/job-node.test.tsx +55 -10
- package/src/components/job-graph/job-node.tsx +16 -9
- package/src/components/step-list/step-list.stories.tsx +2 -3
- package/src/components/step-list/step-list.tsx +3 -2
- package/src/components/workflow-run-list/job-status-strip.tsx +189 -0
- package/src/components/workflow-run-list/run-display.test.ts +169 -30
- package/src/components/workflow-run-list/run-display.ts +116 -9
- package/src/components/workflow-run-list/types.ts +21 -17
- package/src/components/workflow-run-list/workflow-run-filter-menu.tsx +100 -0
- package/src/components/workflow-run-list/workflow-run-filters.tsx +243 -0
- package/src/components/workflow-run-list/workflow-run-list-content.tsx +44 -16
- package/src/components/workflow-run-list/workflow-run-list-states.tsx +128 -27
- package/src/components/workflow-run-list/workflow-run-list-view.test.tsx +441 -104
- package/src/components/workflow-run-list/workflow-run-list-view.tsx +73 -43
- package/src/components/workflow-run-list/workflow-run-list.stories.tsx +140 -20
- package/src/components/workflow-run-list/workflow-run-list.tsx +20 -10
- package/src/components/workflow-run-list/workflow-run-row.tsx +173 -106
- package/src/components/workflow-run-number-label.test.tsx +45 -0
- package/src/components/workflow-run-number-label.tsx +47 -0
- package/src/components/workflow-run-summary/workflow-run-attempt-switcher.test.tsx +7 -8
- package/src/components/workflow-run-summary/workflow-run-attempt-switcher.tsx +13 -12
- package/src/components/workflow-run-summary/workflow-run-summary.stories.tsx +6 -8
- package/src/components/workflow-run-summary/workflow-run-summary.test.tsx +27 -2
- package/src/components/workflow-run-summary/workflow-run-summary.tsx +19 -9
- package/src/components/workflow-run-view/agent-config-failure-callout.stories.tsx +2 -3
- package/src/components/workflow-run-view/agent-config-failure-callout.tsx +4 -4
- package/src/components/workflow-run-view/job-card.stories.tsx +11 -10
- package/src/components/workflow-run-view/job-card.test.tsx +115 -0
- package/src/components/workflow-run-view/job-card.tsx +74 -35
- package/src/components/workflow-run-view/job-execution-switcher.tsx +31 -9
- package/src/components/workflow-run-view/workflow-run-view.test.tsx +88 -30
- package/src/components/workflow-run-view/workflow-run-view.tsx +24 -14
- package/src/components/workflow-status/status-visuals.test.ts +9 -0
- package/src/components/workflow-status/status-visuals.ts +6 -4
- package/src/components/workflow-status/workflow-status-icon.stories.tsx +10 -2
- package/src/components/workflow-status/workflow-status-icon.test.tsx +18 -0
- package/src/components/workflow-status/workflow-status-icon.tsx +17 -24
- package/src/core/entities/job-execution.ts +22 -0
- package/src/core/entities/job-status.test.ts +104 -0
- package/src/core/entities/job.ts +18 -3
- package/src/core/entities/workflow-run.ts +76 -7
- package/src/core/workflow-run.test.ts +24 -9
- package/src/core/workflow-run.ts +17 -2
- package/src/feature.ts +5 -5
- package/src/hooks/api/workflow-run-mapper.ts +30 -3
- package/src/hooks/api/workflow-runs.test.tsx +2 -0
- package/src/hooks/api/workflow-runs.ts +12 -7
- package/src/index.ts +7 -2
- package/src/page-harness-budget.test.ts +1 -1
- package/src/pages/project-workflows-page.test.tsx +59 -5
- package/src/pages/project-workflows-page.tsx +34 -1
- package/src/pages/workflow-run-detail-page.tsx +45 -0
- package/src/pages/workflow-run-list-page.tsx +65 -0
- package/src/pages/{workflow-run-page.test.tsx → workflow-run-pages.test.tsx} +211 -47
- package/src/routes/inputs.test.ts +193 -12
- package/src/routes/inputs.ts +170 -11
- package/src/routes/project-route.tsx +25 -0
- package/src/routes/run-detail.tsx +15 -8
- package/src/routes/runs.tsx +14 -7
- package/src/routes/workflows.tsx +5 -4
- package/test/fixtures/workflow-run.ts +76 -7
- package/test/pages.tsx +18 -8
- package/test/render.tsx +8 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-header.d.ts +0 -10
- package/dist/components/workflow-run-list/workflow-run-list-header.d.ts.map +0 -1
- package/dist/components/workflow-run-list/workflow-run-list-header.js +0 -55
- package/dist/components/workflow-run-list/workflow-run-list-header.js.map +0 -1
- package/dist/pages/workflow-run-first-time-use.d.ts +0 -6
- package/dist/pages/workflow-run-first-time-use.d.ts.map +0 -1
- package/dist/pages/workflow-run-first-time-use.js +0 -17
- package/dist/pages/workflow-run-first-time-use.js.map +0 -1
- package/dist/pages/workflow-run-page.d.ts +0 -10
- package/dist/pages/workflow-run-page.d.ts.map +0 -1
- package/dist/pages/workflow-run-page.js +0 -90
- package/dist/pages/workflow-run-page.js.map +0 -1
- package/src/components/workflow-run-list/workflow-run-list-header.tsx +0 -53
- package/src/pages/workflow-run-first-time-use.tsx +0 -17
- package/src/pages/workflow-run-page.tsx +0 -94
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type WorkflowDisplayStatus } from './status-visuals.js';
|
|
2
2
|
export interface WorkflowStatusIconProps {
|
|
3
|
-
status:
|
|
4
|
-
jobMode?: 'one_shot' | 'listening';
|
|
3
|
+
status: WorkflowDisplayStatus;
|
|
5
4
|
/** Optical diameter in px: 14 in the DAG node and run row. */
|
|
6
5
|
size?: number;
|
|
7
6
|
/** Pulsing halo for the running state. */
|
|
@@ -18,5 +17,5 @@ export interface WorkflowStatusIconProps {
|
|
|
18
17
|
* names the state. Carries the status as its accessible name (`role="img"`) and, by default,
|
|
19
18
|
* a hover tooltip, so the state is reachable by pointer and assistive tech everywhere.
|
|
20
19
|
*/
|
|
21
|
-
export declare function WorkflowStatusIcon({ status,
|
|
20
|
+
export declare function WorkflowStatusIcon({ status, size, ripple, tooltip, className, }: WorkflowStatusIconProps): import("react").JSX.Element;
|
|
22
21
|
//# sourceMappingURL=workflow-status-icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-status-icon.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-status/workflow-status-icon.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA0B,KAAK,
|
|
1
|
+
{"version":3,"file":"workflow-status-icon.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-status/workflow-status-icon.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA0B,KAAK,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAyCxF,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,qBAAqB,CAAC;IAC9B,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,IAAS,EACT,MAAa,EACb,OAAc,EACd,SAAS,GACV,EAAE,uBAAuB,+BAwDzB"}
|
|
@@ -42,19 +42,21 @@ const PENDING_RING_MASK = 'radial-gradient(circle closest-side, transparent 0 52
|
|
|
42
42
|
* The job/run/step state indicator: an icon-in-circle glyph whose shape (not just color)
|
|
43
43
|
* names the state. Carries the status as its accessible name (`role="img"`) and, by default,
|
|
44
44
|
* a hover tooltip, so the state is reachable by pointer and assistive tech everywhere.
|
|
45
|
-
*/ export function WorkflowStatusIcon({ status,
|
|
45
|
+
*/ export function WorkflowStatusIcon({ status, size = 14, ripple = true, tooltip = true, className }) {
|
|
46
46
|
const visual = getWorkflowStatusVisual(status);
|
|
47
47
|
const box = dotSizeClass[size] ?? 'size-14';
|
|
48
48
|
let glyph;
|
|
49
|
-
if (visual.kind === '
|
|
50
|
-
glyph =
|
|
49
|
+
if (visual.kind === 'listening') {
|
|
50
|
+
glyph = /*#__PURE__*/ _jsx("span", {
|
|
51
51
|
className: cn('inline-flex shrink-0 items-center justify-center rounded-full bg-current', box, toneByVariant.info),
|
|
52
52
|
children: /*#__PURE__*/ _jsx(Icon, {
|
|
53
53
|
name: "pulseLine",
|
|
54
54
|
size: Math.max(8, Math.round(size * 0.7)),
|
|
55
55
|
className: "text-white"
|
|
56
56
|
})
|
|
57
|
-
})
|
|
57
|
+
});
|
|
58
|
+
} else if (visual.kind === 'running') {
|
|
59
|
+
glyph = /*#__PURE__*/ _jsx(Dot, {
|
|
58
60
|
variant: "info",
|
|
59
61
|
ripple: ripple,
|
|
60
62
|
className: box
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/workflow-status/workflow-status-icon.tsx"],"sourcesContent":["import {Dot, type DotVariant} from '@shipfox/react-ui/dot';\nimport {Icon, type IconName} from '@shipfox/react-ui/icon';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {cn} from '@shipfox/react-ui/utils';\nimport type {ReactNode} from 'react';\nimport {getWorkflowStatusVisual, type
|
|
1
|
+
{"version":3,"sources":["../../../src/components/workflow-status/workflow-status-icon.tsx"],"sourcesContent":["import {Dot, type DotVariant} from '@shipfox/react-ui/dot';\nimport {Icon, type IconName} from '@shipfox/react-ui/icon';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {cn} from '@shipfox/react-ui/utils';\nimport type {ReactNode} from 'react';\nimport {getWorkflowStatusVisual, type WorkflowDisplayStatus} from './status-visuals.js';\n\n// Status glyphs use the same saturated accent tokens as IconBadge/StatusBadge.\nconst toneByVariant: Record<DotVariant, string> = {\n neutral: 'text-tag-neutral-icon',\n info: 'text-tag-blue-icon',\n feature: 'text-tag-purple-icon',\n success: 'text-tag-success-icon',\n warning: 'text-tag-warning-icon',\n error: 'text-tag-error-icon',\n};\n\n// Terminal states are self-contained solid discs; the shape names the state. Running and\n// pending render their own shapes (the live Dot and a bold ring), so they aren't here.\nconst glyphByKind: Partial<Record<WorkflowDisplayStatus, IconName>> = {\n succeeded: 'checkCircleSolid',\n failed: 'xCircleSolid',\n cancelled: 'forbid2Fill',\n skipped: 'forbid2Fill',\n};\n\n// The solid discs fill ~90-95% of their viewBox and forbid2Fill ~83%, so one numeric size\n// renders different diameters. These multipliers land every disc at the running Dot's diameter.\nconst glyphScale: Partial<Record<IconName, number>> = {\n checkCircleSolid: 1.12,\n xCircleSolid: 1.06,\n forbid2Fill: 1.22,\n};\n\n// Only the two sizes the app uses are mapped; both are literal strings so Tailwind emits them.\nconst dotSizeClass: Record<number, string> = {\n 12: 'size-12',\n 14: 'size-14',\n 20: 'size-20',\n};\n\n// Pending is a neutral ring: a filled disc with a transparent center punched out by a radial\n// mask. Reads as \"not started\" and stays visually consistent with the solid discs - much\n// bolder than a dotted outline. Tune the mask stops to make the band thicker or thinner.\nconst PENDING_RING_MASK = 'radial-gradient(circle closest-side, transparent 0 52%, #000 56%)';\n\nexport interface WorkflowStatusIconProps {\n status: WorkflowDisplayStatus;\n /** Optical diameter in px: 14 in the DAG node and run row. */\n size?: number;\n /** Pulsing halo for the running state. */\n ripple?: boolean;\n /**\n * Wrap the indicator in a hover tooltip naming the status. Defaults on. Pass false where\n * the status text is already visible next to it (the DAG node) to avoid a redundant tooltip.\n */\n tooltip?: boolean;\n className?: string;\n}\n\n/**\n * The job/run/step state indicator: an icon-in-circle glyph whose shape (not just color)\n * names the state. Carries the status as its accessible name (`role=\"img\"`) and, by default,\n * a hover tooltip, so the state is reachable by pointer and assistive tech everywhere.\n */\nexport function WorkflowStatusIcon({\n status,\n size = 14,\n ripple = true,\n tooltip = true,\n className,\n}: WorkflowStatusIconProps) {\n const visual = getWorkflowStatusVisual(status);\n const box = dotSizeClass[size] ?? 'size-14';\n\n let glyph: ReactNode;\n if (visual.kind === 'listening') {\n glyph = (\n <span\n className={cn(\n 'inline-flex shrink-0 items-center justify-center rounded-full bg-current',\n box,\n toneByVariant.info,\n )}\n >\n <Icon name=\"pulseLine\" size={Math.max(8, Math.round(size * 0.7))} className=\"text-white\" />\n </span>\n );\n } else if (visual.kind === 'running') {\n glyph = <Dot variant=\"info\" ripple={ripple} className={box} />;\n } else if (visual.kind === 'pending') {\n glyph = (\n <span\n className={cn('rounded-full bg-current', box, toneByVariant.neutral)}\n style={{maskImage: PENDING_RING_MASK, WebkitMaskImage: PENDING_RING_MASK}}\n />\n );\n } else {\n const name = glyphByKind[visual.kind] ?? 'forbid2Fill';\n glyph = (\n <span\n className={cn(\n 'inline-flex shrink-0 items-center justify-center',\n box,\n toneByVariant[visual.dot],\n (visual.kind === 'cancelled' || visual.kind === 'skipped') && 'opacity-70',\n )}\n >\n <Icon name={name} size={Math.round(size * (glyphScale[name] ?? 1))} />\n </span>\n );\n }\n\n const indicator = (\n <span role=\"img\" aria-label={visual.label} className={cn('inline-flex shrink-0', className)}>\n {glyph}\n </span>\n );\n\n if (!tooltip) return indicator;\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{indicator}</TooltipTrigger>\n <TooltipContent>{visual.label}</TooltipContent>\n </Tooltip>\n );\n}\n"],"names":["Dot","Icon","Tooltip","TooltipContent","TooltipTrigger","cn","getWorkflowStatusVisual","toneByVariant","neutral","info","feature","success","warning","error","glyphByKind","succeeded","failed","cancelled","skipped","glyphScale","checkCircleSolid","xCircleSolid","forbid2Fill","dotSizeClass","PENDING_RING_MASK","WorkflowStatusIcon","status","size","ripple","tooltip","className","visual","box","glyph","kind","span","name","Math","max","round","variant","style","maskImage","WebkitMaskImage","dot","indicator","role","aria-label","label","asChild"],"mappings":";AAAA,SAAQA,GAAG,QAAwB,wBAAwB;AAC3D,SAAQC,IAAI,QAAsB,yBAAyB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,GAAG,2BAA2B2B,KAAKzB,cAAcC,OAAO;YACnEiC,OAAO;gBAACC,WAAWlB;gBAAmBmB,iBAAiBnB;YAAiB;;IAG9E,OAAO;QACL,MAAMY,OAAOtB,WAAW,CAACiB,OAAOG,IAAI,CAAC,IAAI;QACzCD,sBACE,KAACE;YACCL,WAAWzB,GACT,oDACA2B,KACAzB,aAAa,CAACwB,OAAOa,GAAG,CAAC,EACzB,AAACb,CAAAA,OAAOG,IAAI,KAAK,eAAeH,OAAOG,IAAI,KAAK,SAAQ,KAAM;sBAGhE,cAAA,KAACjC;gBAAKmC,MAAMA;gBAAMT,MAAMU,KAAKE,KAAK,CAACZ,OAAQR,CAAAA,UAAU,CAACiB,KAAK,IAAI,CAAA;;;IAGrE;IAEA,MAAMS,0BACJ,KAACV;QAAKW,MAAK;QAAMC,cAAYhB,OAAOiB,KAAK;QAAElB,WAAWzB,GAAG,wBAAwByB;kBAC9EG;;IAIL,IAAI,CAACJ,SAAS,OAAOgB;IAErB,qBACE,MAAC3C;;0BACC,KAACE;gBAAe6C,OAAO;0BAAEJ;;0BACzB,KAAC1C;0BAAgB4B,OAAOiB,KAAK;;;;AAGnC"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { type Duration } from 'date-fns';
|
|
2
2
|
import type { Step } from './step.js';
|
|
3
3
|
export type JobExecutionStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled';
|
|
4
|
+
export type JobExecutionDisplayStatus = JobExecutionStatus;
|
|
4
5
|
export interface WorkflowExecutionEvent {
|
|
5
6
|
source: string;
|
|
6
7
|
event: string;
|
|
7
8
|
deliveryId: string;
|
|
8
9
|
receivedAt: string;
|
|
10
|
+
project: {
|
|
11
|
+
id: string;
|
|
12
|
+
} | null;
|
|
13
|
+
repository: string | null;
|
|
14
|
+
ref: string | null;
|
|
15
|
+
commit: string | null;
|
|
9
16
|
data: unknown;
|
|
10
17
|
}
|
|
11
18
|
export type JobExecutionTime = {
|
|
@@ -52,10 +59,13 @@ export declare class JobExecution {
|
|
|
52
59
|
updatedAt: string;
|
|
53
60
|
steps: Step[];
|
|
54
61
|
constructor(fields: JobExecutionFields);
|
|
62
|
+
get displayName(): string;
|
|
55
63
|
get queueTime(): JobExecutionTime | null;
|
|
56
64
|
get runTime(): JobExecutionTime | null;
|
|
57
65
|
get displayDuration(): JobExecutionDisplayDuration | null;
|
|
58
66
|
}
|
|
67
|
+
export declare function deriveJobExecutionDisplayStatus({ status, steps, }: Pick<JobExecution, 'status' | 'steps'>): JobExecutionDisplayStatus;
|
|
68
|
+
export declare function isTerminalJobExecutionStatus(status: JobExecutionStatus): boolean;
|
|
59
69
|
export declare function jobExecutionQueueTimeFromTimestamps({ queuedAt, startedAt, finishedAt, }: {
|
|
60
70
|
queuedAt: string | null;
|
|
61
71
|
startedAt: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job-execution.d.ts","sourceRoot":"","sources":["../../../src/core/entities/job-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,QAAQ,EAAqB,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAEpC,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAC9F,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;CACf;AACD,MAAM,MAAM,gBAAgB,GACxB;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAC,GACnC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAAC;AACrC,MAAM,MAAM,2BAA2B,GACnC,CAAC;IAAC,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,GAAG,gBAAgB,GAAG,IAAI,CAM1B;AAED,wBAAgB,yCAAyC,CAAC,UAAU,EAAE;IACpE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,GAAG,2BAA2B,GAAG,IAAI,CAQrC"}
|
|
@@ -3,6 +3,9 @@ export class JobExecution {
|
|
|
3
3
|
constructor(fields){
|
|
4
4
|
Object.assign(this, fields);
|
|
5
5
|
}
|
|
6
|
+
get displayName() {
|
|
7
|
+
return this.name;
|
|
8
|
+
}
|
|
6
9
|
get queueTime() {
|
|
7
10
|
return jobExecutionQueueTimeFromTimestamps(this);
|
|
8
11
|
}
|
|
@@ -13,6 +16,14 @@ export class JobExecution {
|
|
|
13
16
|
return jobExecutionDisplayDurationFromTimestamps(this);
|
|
14
17
|
}
|
|
15
18
|
}
|
|
19
|
+
export function deriveJobExecutionDisplayStatus({ status, steps }) {
|
|
20
|
+
if (isTerminalJobExecutionStatus(status)) return status;
|
|
21
|
+
if (steps.some((step)=>step.status === 'running')) return 'running';
|
|
22
|
+
return 'pending';
|
|
23
|
+
}
|
|
24
|
+
export function isTerminalJobExecutionStatus(status) {
|
|
25
|
+
return status === 'succeeded' || status === 'failed' || status === 'cancelled';
|
|
26
|
+
}
|
|
16
27
|
export function jobExecutionQueueTimeFromTimestamps({ queuedAt, startedAt, finishedAt }) {
|
|
17
28
|
if (queuedAt === null) return null;
|
|
18
29
|
if (finishedAt !== null && startedAt === null) return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/entities/job-execution.ts"],"sourcesContent":["import {type Duration, intervalToDuration} from 'date-fns';\nimport type {Step} from './step.js';\n\nexport type JobExecutionStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled';\nexport interface WorkflowExecutionEvent {\n source: string;\n event: string;\n deliveryId: string;\n receivedAt: string;\n data: unknown;\n}\nexport type JobExecutionTime =\n | {state: 'fixed'; elapsed: Duration}\n | {state: 'live'; fromIso: string};\nexport type JobExecutionDisplayDuration =\n | ({kind: 'queue'} & JobExecutionTime)\n | ({kind: 'run'} & JobExecutionTime);\n\ninterface JobExecutionFields {\n id: string;\n jobId: string;\n sequence: number;\n name: string;\n status: JobExecutionStatus;\n statusReason: string | null;\n triggerEvents: WorkflowExecutionEvent[];\n queuedAt: string | null;\n startedAt: string | null;\n finishedAt: string | null;\n timedOutAt: string | null;\n createdAt: string;\n updatedAt: string;\n steps: Step[];\n}\n\nexport class JobExecution {\n id!: string;\n jobId!: string;\n sequence!: number;\n name!: string;\n status!: JobExecutionStatus;\n statusReason!: string | null;\n triggerEvents!: WorkflowExecutionEvent[];\n queuedAt!: string | null;\n startedAt!: string | null;\n finishedAt!: string | null;\n timedOutAt!: string | null;\n createdAt!: string;\n updatedAt!: string;\n steps!: Step[];\n\n constructor(fields: JobExecutionFields) {\n Object.assign(this, fields);\n }\n\n get queueTime(): JobExecutionTime | null {\n return jobExecutionQueueTimeFromTimestamps(this);\n }\n\n get runTime(): JobExecutionTime | null {\n return jobExecutionRunTimeFromTimestamps(this);\n }\n\n get displayDuration(): JobExecutionDisplayDuration | null {\n return jobExecutionDisplayDurationFromTimestamps(this);\n }\n}\n\nexport function jobExecutionQueueTimeFromTimestamps({\n queuedAt,\n startedAt,\n finishedAt,\n}: {\n queuedAt: string | null;\n startedAt: string | null;\n finishedAt: string | null;\n}): JobExecutionTime | null {\n if (queuedAt === null) return null;\n if (finishedAt !== null && startedAt === null) return null;\n if (startedAt === null) return {state: 'live', fromIso: queuedAt};\n\n const elapsed = durationBetween(queuedAt, startedAt);\n return elapsed === null ? null : {state: 'fixed', elapsed};\n}\n\nexport function jobExecutionRunTimeFromTimestamps({\n startedAt,\n finishedAt,\n}: {\n startedAt: string | null;\n finishedAt: string | null;\n}): JobExecutionTime | null {\n if (startedAt === null) return null;\n if (finishedAt === null) return {state: 'live', fromIso: startedAt};\n\n const elapsed = durationBetween(startedAt, finishedAt);\n return elapsed === null ? null : {state: 'fixed', elapsed};\n}\n\nexport function jobExecutionDisplayDurationFromTimestamps(timestamps: {\n queuedAt: string | null;\n startedAt: string | null;\n finishedAt: string | null;\n}): JobExecutionDisplayDuration | null {\n const runTime = jobExecutionRunTimeFromTimestamps(timestamps);\n if (runTime !== null) return {kind: 'run', ...runTime};\n\n const queueTime = jobExecutionQueueTimeFromTimestamps(timestamps);\n if (queueTime !== null) return {kind: 'queue', ...queueTime};\n\n return null;\n}\n\nfunction durationBetween(from: string, to: string): Duration | null {\n const start = new Date(from);\n const end = new Date(to);\n if (!Number.isFinite(start.getTime()) || !Number.isFinite(end.getTime())) return null;\n\n return intervalToDuration({\n start,\n end: end < start ? start : end,\n });\n}\n"],"names":["intervalToDuration","JobExecution","fields","Object","assign","queueTime","jobExecutionQueueTimeFromTimestamps","runTime","jobExecutionRunTimeFromTimestamps","displayDuration","jobExecutionDisplayDurationFromTimestamps","queuedAt","startedAt","finishedAt","state","fromIso","elapsed","durationBetween","timestamps","kind","from","to","start","Date","end","Number","isFinite","getTime"],"mappings":"AAAA,SAAuBA,kBAAkB,QAAO,WAAW;
|
|
1
|
+
{"version":3,"sources":["../../../src/core/entities/job-execution.ts"],"sourcesContent":["import {type Duration, intervalToDuration} from 'date-fns';\nimport type {Step} from './step.js';\n\nexport type JobExecutionStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled';\nexport type JobExecutionDisplayStatus = JobExecutionStatus;\nexport interface WorkflowExecutionEvent {\n source: string;\n event: string;\n deliveryId: string;\n receivedAt: string;\n project: {id: string} | null;\n repository: string | null;\n ref: string | null;\n commit: string | null;\n data: unknown;\n}\nexport type JobExecutionTime =\n | {state: 'fixed'; elapsed: Duration}\n | {state: 'live'; fromIso: string};\nexport type JobExecutionDisplayDuration =\n | ({kind: 'queue'} & JobExecutionTime)\n | ({kind: 'run'} & JobExecutionTime);\n\ninterface JobExecutionFields {\n id: string;\n jobId: string;\n sequence: number;\n name: string;\n status: JobExecutionStatus;\n statusReason: string | null;\n triggerEvents: WorkflowExecutionEvent[];\n queuedAt: string | null;\n startedAt: string | null;\n finishedAt: string | null;\n timedOutAt: string | null;\n createdAt: string;\n updatedAt: string;\n steps: Step[];\n}\n\nexport class JobExecution {\n id!: string;\n jobId!: string;\n sequence!: number;\n name!: string;\n status!: JobExecutionStatus;\n statusReason!: string | null;\n triggerEvents!: WorkflowExecutionEvent[];\n queuedAt!: string | null;\n startedAt!: string | null;\n finishedAt!: string | null;\n timedOutAt!: string | null;\n createdAt!: string;\n updatedAt!: string;\n steps!: Step[];\n\n constructor(fields: JobExecutionFields) {\n Object.assign(this, fields);\n }\n\n get displayName(): string {\n return this.name;\n }\n\n get queueTime(): JobExecutionTime | null {\n return jobExecutionQueueTimeFromTimestamps(this);\n }\n\n get runTime(): JobExecutionTime | null {\n return jobExecutionRunTimeFromTimestamps(this);\n }\n\n get displayDuration(): JobExecutionDisplayDuration | null {\n return jobExecutionDisplayDurationFromTimestamps(this);\n }\n}\n\nexport function deriveJobExecutionDisplayStatus({\n status,\n steps,\n}: Pick<JobExecution, 'status' | 'steps'>): JobExecutionDisplayStatus {\n if (isTerminalJobExecutionStatus(status)) return status;\n if (steps.some((step) => step.status === 'running')) return 'running';\n return 'pending';\n}\n\nexport function isTerminalJobExecutionStatus(status: JobExecutionStatus): boolean {\n return status === 'succeeded' || status === 'failed' || status === 'cancelled';\n}\n\nexport function jobExecutionQueueTimeFromTimestamps({\n queuedAt,\n startedAt,\n finishedAt,\n}: {\n queuedAt: string | null;\n startedAt: string | null;\n finishedAt: string | null;\n}): JobExecutionTime | null {\n if (queuedAt === null) return null;\n if (finishedAt !== null && startedAt === null) return null;\n if (startedAt === null) return {state: 'live', fromIso: queuedAt};\n\n const elapsed = durationBetween(queuedAt, startedAt);\n return elapsed === null ? null : {state: 'fixed', elapsed};\n}\n\nexport function jobExecutionRunTimeFromTimestamps({\n startedAt,\n finishedAt,\n}: {\n startedAt: string | null;\n finishedAt: string | null;\n}): JobExecutionTime | null {\n if (startedAt === null) return null;\n if (finishedAt === null) return {state: 'live', fromIso: startedAt};\n\n const elapsed = durationBetween(startedAt, finishedAt);\n return elapsed === null ? null : {state: 'fixed', elapsed};\n}\n\nexport function jobExecutionDisplayDurationFromTimestamps(timestamps: {\n queuedAt: string | null;\n startedAt: string | null;\n finishedAt: string | null;\n}): JobExecutionDisplayDuration | null {\n const runTime = jobExecutionRunTimeFromTimestamps(timestamps);\n if (runTime !== null) return {kind: 'run', ...runTime};\n\n const queueTime = jobExecutionQueueTimeFromTimestamps(timestamps);\n if (queueTime !== null) return {kind: 'queue', ...queueTime};\n\n return null;\n}\n\nfunction durationBetween(from: string, to: string): Duration | null {\n const start = new Date(from);\n const end = new Date(to);\n if (!Number.isFinite(start.getTime()) || !Number.isFinite(end.getTime())) return null;\n\n return intervalToDuration({\n start,\n end: end < start ? start : end,\n });\n}\n"],"names":["intervalToDuration","JobExecution","fields","Object","assign","displayName","name","queueTime","jobExecutionQueueTimeFromTimestamps","runTime","jobExecutionRunTimeFromTimestamps","displayDuration","jobExecutionDisplayDurationFromTimestamps","deriveJobExecutionDisplayStatus","status","steps","isTerminalJobExecutionStatus","some","step","queuedAt","startedAt","finishedAt","state","fromIso","elapsed","durationBetween","timestamps","kind","from","to","start","Date","end","Number","isFinite","getTime"],"mappings":"AAAA,SAAuBA,kBAAkB,QAAO,WAAW;AAwC3D,OAAO,MAAMC;IAgBX,YAAYC,MAA0B,CAAE;QACtCC,OAAOC,MAAM,CAAC,IAAI,EAAEF;IACtB;IAEA,IAAIG,cAAsB;QACxB,OAAO,IAAI,CAACC,IAAI;IAClB;IAEA,IAAIC,YAAqC;QACvC,OAAOC,oCAAoC,IAAI;IACjD;IAEA,IAAIC,UAAmC;QACrC,OAAOC,kCAAkC,IAAI;IAC/C;IAEA,IAAIC,kBAAsD;QACxD,OAAOC,0CAA0C,IAAI;IACvD;AACF;AAEA,OAAO,SAASC,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,MAAMK,OAAO,OAAO,CAACF,OAAOC,QAAQ,CAACF,IAAIG,OAAO,KAAK,OAAO;IAEjF,OAAOnC,mBAAmB;QACxB8B;QACAE,KAAKA,MAAMF,QAAQA,QAAQE;IAC7B;AACF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type JobExecution, type JobExecutionDisplayDuration } from './job-execution.js';
|
|
2
2
|
export type JobStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'skipped';
|
|
3
|
+
export type JobDisplayStatus = JobStatus | 'listening';
|
|
3
4
|
export type JobMode = 'one_shot' | 'listening';
|
|
4
5
|
export type ListenerStatus = 'inactive' | 'listening' | 'resolved';
|
|
5
6
|
export type ResolutionReason = 'until' | 'timeout' | 'max_executions' | 'cancelled';
|
|
@@ -72,7 +73,8 @@ export declare class Job {
|
|
|
72
73
|
get executionCountVisible(): boolean;
|
|
73
74
|
}
|
|
74
75
|
export declare function isTerminalJobStatus(status: JobStatus): boolean;
|
|
76
|
+
export declare function deriveJobDisplayStatus(job: Pick<Job, 'mode' | 'status' | 'listenerStatus' | 'jobExecutions'>): JobDisplayStatus;
|
|
75
77
|
export declare function resolveJobExecution(job: Job, jobExecutionId: string | undefined): JobExecution | undefined;
|
|
76
|
-
export declare function defaultJobExecution(job: Job): JobExecution | undefined;
|
|
78
|
+
export declare function defaultJobExecution(job: Pick<Job, 'jobExecutions'>): JobExecution | undefined;
|
|
77
79
|
export {};
|
|
78
80
|
//# sourceMappingURL=job.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job.d.ts","sourceRoot":"","sources":["../../../src/core/entities/job.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"job.d.ts","sourceRoot":"","sources":["../../../src/core/entities/job.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,2BAA2B,EACjC,MAAM,oBAAoB,CAAC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AI,CAAC;IAChC,cAAc,EAAG,cAAc,CAAC;IAChC,gBAAgB,EAAG,gBAAgB,GAAG,IAAI,CAAC;IAC3C,YAAY,EAAG,MAAM,EAAE,CAAC;IACxB,QAAQ,EAAG,MAAM,CAAC;IAClB,SAAS,EAAG,MAAM,CAAC;IACnB,SAAS,EAAG,MAAM,CAAC;IACnB,aAAa,EAAG,YAAY,EAAE,CAAC;gBAEnB,MAAM,EAAE,SAAS;IAI7B,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,eAAe,IAAI,kBAAkB,GAAG,IAAI,CAI/C;IAED,IAAI,qBAAqB,IAAI,OAAO,CAInC;CACF;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAE9D;AAED,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,GAAG,gBAAgB,GAAG,eAAe,CAAC,GACrE,gBAAgB,CAMlB;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,GAAG,EACR,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,YAAY,GAAG,SAAS,CAO1B;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC,GAAG,YAAY,GAAG,SAAS,CAU7F"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { deriveJobExecutionDisplayStatus } from './job-execution.js';
|
|
1
2
|
export const WORKFLOW_JOB_STATUSES = [
|
|
2
3
|
'pending',
|
|
3
4
|
'running',
|
|
@@ -18,7 +19,7 @@ export class Job {
|
|
|
18
19
|
Object.assign(this, fields);
|
|
19
20
|
}
|
|
20
21
|
get displayName() {
|
|
21
|
-
return this.name
|
|
22
|
+
return this.name ?? this.key;
|
|
22
23
|
}
|
|
23
24
|
get displayDuration() {
|
|
24
25
|
if (this.mode === 'listening') return null;
|
|
@@ -32,6 +33,12 @@ export class Job {
|
|
|
32
33
|
export function isTerminalJobStatus(status) {
|
|
33
34
|
return TERMINAL_JOB_STATUS_SET.has(status);
|
|
34
35
|
}
|
|
36
|
+
export function deriveJobDisplayStatus(job) {
|
|
37
|
+
if (isTerminalJobStatus(job.status)) return job.status;
|
|
38
|
+
if (job.mode === 'listening' && job.listenerStatus === 'listening') return 'listening';
|
|
39
|
+
const execution = defaultJobExecution(job);
|
|
40
|
+
return execution ? deriveJobExecutionDisplayStatus(execution) : 'pending';
|
|
41
|
+
}
|
|
35
42
|
export function resolveJobExecution(job, jobExecutionId) {
|
|
36
43
|
const selectedExecution = jobExecutionId ? job.jobExecutions.find((jobExecution)=>jobExecution.id === jobExecutionId) : undefined;
|
|
37
44
|
if (selectedExecution) return selectedExecution;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/entities/job.ts"],"sourcesContent":["import type
|
|
1
|
+
{"version":3,"sources":["../../../src/core/entities/job.ts"],"sourcesContent":["import {\n deriveJobExecutionDisplayStatus,\n type JobExecution,\n type JobExecutionDisplayDuration,\n} from './job-execution.js';\n\nexport type JobStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'skipped';\nexport type JobDisplayStatus = JobStatus | 'listening';\nexport type JobMode = 'one_shot' | 'listening';\nexport type ListenerStatus = 'inactive' | 'listening' | 'resolved';\nexport type ResolutionReason = 'until' | 'timeout' | 'max_executions' | 'cancelled';\nexport type JobStatusReason =\n | 'dependency_not_completed'\n | 'condition_false'\n | 'default_gate_rejected'\n | 'condition_rejected'\n | 'condition_errored'\n | 'user_cancelled'\n | 'run_cancelled'\n | 'timed_out'\n | 'runner_lost'\n | 'step_failed'\n | 'unknown';\nexport interface JobListening {\n on: Array<{\n source: string;\n event: string;\n inputs?: Record<string, unknown> | undefined;\n filter?: string | undefined;\n }>;\n until: Array<{\n source: string;\n event: string;\n inputs?: Record<string, unknown> | undefined;\n filter?: string | undefined;\n }> | null;\n timeoutMs: number | null;\n maxExecutions: number | null;\n batch: {\n debounceMs?: number | undefined;\n maxSize?: number | undefined;\n maxWaitMs?: number | undefined;\n } | null;\n onResolve: 'finish' | 'cancel';\n executionTimeoutMs: number | null;\n name: string | null;\n}\n\nexport type JobDisplayDuration = JobExecutionDisplayDuration;\n\nexport const WORKFLOW_JOB_STATUSES = [\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n 'skipped',\n] as const satisfies readonly JobStatus[];\n\nexport const TERMINAL_WORKFLOW_JOB_STATUSES = [\n 'succeeded',\n 'failed',\n 'cancelled',\n 'skipped',\n] as const satisfies readonly JobStatus[];\n\nconst TERMINAL_JOB_STATUS_SET = new Set<JobStatus>(TERMINAL_WORKFLOW_JOB_STATUSES);\n\ninterface JobFields {\n id: string;\n runAttemptId: string;\n key: string;\n name: string | null;\n mode: JobMode;\n status: JobStatus;\n statusReason: JobStatusReason | null;\n carriedOver: boolean;\n listening: JobListening | null;\n listenerStatus: ListenerStatus;\n resolutionReason: ResolutionReason | null;\n dependencies: string[];\n position: number;\n createdAt: string;\n updatedAt: string;\n jobExecutions: JobExecution[];\n}\n\nexport class Job {\n id!: string;\n runAttemptId!: string;\n key!: string;\n name!: string | null;\n mode!: JobMode;\n status!: JobStatus;\n statusReason!: JobStatusReason | null;\n carriedOver!: boolean;\n listening!: JobListening | null;\n listenerStatus!: ListenerStatus;\n resolutionReason!: ResolutionReason | null;\n dependencies!: string[];\n position!: number;\n createdAt!: string;\n updatedAt!: string;\n jobExecutions!: JobExecution[];\n\n constructor(fields: JobFields) {\n Object.assign(this, fields);\n }\n\n get displayName(): string {\n return this.name ?? this.key;\n }\n\n get displayDuration(): JobDisplayDuration | null {\n if (this.mode === 'listening') return null;\n if (this.jobExecutions.length !== 1) return null;\n return this.jobExecutions[0]?.displayDuration ?? null;\n }\n\n get executionCountVisible(): boolean {\n return (\n this.jobExecutions.length > 0 && (this.mode === 'listening' || this.jobExecutions.length > 1)\n );\n }\n}\n\nexport function isTerminalJobStatus(status: JobStatus): boolean {\n return TERMINAL_JOB_STATUS_SET.has(status);\n}\n\nexport function deriveJobDisplayStatus(\n job: Pick<Job, 'mode' | 'status' | 'listenerStatus' | 'jobExecutions'>,\n): JobDisplayStatus {\n if (isTerminalJobStatus(job.status)) return job.status;\n if (job.mode === 'listening' && job.listenerStatus === 'listening') return 'listening';\n\n const execution = defaultJobExecution(job);\n return execution ? deriveJobExecutionDisplayStatus(execution) : 'pending';\n}\n\nexport function resolveJobExecution(\n job: Job,\n jobExecutionId: string | undefined,\n): JobExecution | undefined {\n const selectedExecution = jobExecutionId\n ? job.jobExecutions.find((jobExecution) => jobExecution.id === jobExecutionId)\n : undefined;\n if (selectedExecution) return selectedExecution;\n\n return defaultJobExecution(job);\n}\n\nexport function defaultJobExecution(job: Pick<Job, 'jobExecutions'>): JobExecution | undefined {\n const runningExecution = job.jobExecutions.find(\n (jobExecution) => jobExecution.status === 'running',\n );\n if (runningExecution) return runningExecution;\n\n return job.jobExecutions.reduce<JobExecution | undefined>((latest, jobExecution) => {\n if (!latest) return jobExecution;\n return jobExecution.sequence > latest.sequence ? jobExecution : latest;\n }, undefined);\n}\n"],"names":["deriveJobExecutionDisplayStatus","WORKFLOW_JOB_STATUSES","TERMINAL_WORKFLOW_JOB_STATUSES","TERMINAL_JOB_STATUS_SET","Set","Job","fields","Object","assign","displayName","name","key","displayDuration","mode","jobExecutions","length","executionCountVisible","isTerminalJobStatus","status","has","deriveJobDisplayStatus","job","listenerStatus","execution","defaultJobExecution","resolveJobExecution","jobExecutionId","selectedExecution","find","jobExecution","id","undefined","runningExecution","reduce","latest","sequence"],"mappings":"AAAA,SACEA,+BAA+B,QAG1B,qBAAqB;AA8C5B,OAAO,MAAMC,wBAAwB;IACnC;IACA;IACA;IACA;IACA;IACA;CACD,CAAyC;AAE1C,OAAO,MAAMC,iCAAiC;IAC5C;IACA;IACA;IACA;CACD,CAAyC;AAE1C,MAAMC,0BAA0B,IAAIC,IAAeF;AAqBnD,OAAO,MAAMG;IAkBX,YAAYC,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AM,CAA2B,CAACC,QAAQL;QACjE,IAAI,CAACK,QAAQ,OAAOL;QACpB,OAAOA,aAAaM,QAAQ,GAAGD,OAAOC,QAAQ,GAAGN,eAAeK;IAClE,GAAGH;AACL"}
|
|
@@ -1,19 +1,56 @@
|
|
|
1
|
-
import { type Job, WORKFLOW_JOB_STATUSES } from './job.js';
|
|
1
|
+
import { type Job, type JobStatus, WORKFLOW_JOB_STATUSES } from './job.js';
|
|
2
2
|
import type { WorkflowRunAttempt, WorkflowRunAttemptSummary } from './workflow-run-attempt.js';
|
|
3
3
|
export type WorkflowRunStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled';
|
|
4
4
|
export type WorkflowRunRerunMode = 'all' | 'failed';
|
|
5
5
|
export type WorkflowStatus = WorkflowRunStatus | (typeof WORKFLOW_JOB_STATUSES)[number];
|
|
6
|
+
export type WorkflowDisplayStatus = WorkflowStatus | 'listening';
|
|
6
7
|
export declare const WORKFLOW_RUN_STATUSES: readonly ["pending", "running", "succeeded", "failed", "cancelled"];
|
|
7
8
|
export declare const TERMINAL_WORKFLOW_RUN_STATUSES: readonly ["succeeded", "failed", "cancelled"];
|
|
8
9
|
export interface WorkflowSourceSnapshot {
|
|
9
10
|
content: string;
|
|
10
11
|
format: 'yaml';
|
|
11
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Provider-neutral trigger facts. Every field is nullable: only source-control triggers
|
|
15
|
+
* resolve a reference at all, and a payload can name a ref without naming an actor.
|
|
16
|
+
*/
|
|
17
|
+
export interface WorkflowRunTriggerReference {
|
|
18
|
+
repository: string | null;
|
|
19
|
+
ref: string | null;
|
|
20
|
+
commit: string | null;
|
|
21
|
+
actor: string | null;
|
|
22
|
+
}
|
|
23
|
+
/** One glyph in a run row's job status strip: enough to draw and label it, nothing more. */
|
|
24
|
+
export interface WorkflowRunJobSummary {
|
|
25
|
+
id: string;
|
|
26
|
+
key: string;
|
|
27
|
+
name: string | null;
|
|
28
|
+
status: JobStatus;
|
|
29
|
+
position: number;
|
|
30
|
+
}
|
|
31
|
+
export interface WorkflowRunJobStatusCount {
|
|
32
|
+
status: JobStatus;
|
|
33
|
+
count: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A run's jobs as the list receives them: a bounded slice to draw, plus totals covering all
|
|
37
|
+
* of them.
|
|
38
|
+
*
|
|
39
|
+
* `preview` is capped by the API, so `preview.length` is not the job count and the strip
|
|
40
|
+
* reads `total` and `statusCounts` for anything it says rather than anything it draws.
|
|
41
|
+
*/
|
|
42
|
+
export interface WorkflowRunJobs {
|
|
43
|
+
preview: WorkflowRunJobSummary[];
|
|
44
|
+
statusCounts: WorkflowRunJobStatusCount[];
|
|
45
|
+
total: number;
|
|
46
|
+
}
|
|
12
47
|
export interface WorkflowRun {
|
|
13
48
|
id: string;
|
|
14
49
|
projectId: string;
|
|
15
50
|
definitionId: string;
|
|
51
|
+
number: number | null;
|
|
16
52
|
name: string;
|
|
53
|
+
workflowName: string;
|
|
17
54
|
currentAttempt: number;
|
|
18
55
|
triggerProvider: string | null;
|
|
19
56
|
triggerSource: string;
|
|
@@ -21,18 +58,22 @@ export interface WorkflowRun {
|
|
|
21
58
|
triggerDisplayLabel: string;
|
|
22
59
|
triggerLabel: string;
|
|
23
60
|
triggerPayload: Record<string, unknown>;
|
|
61
|
+
triggerReference: WorkflowRunTriggerReference | null;
|
|
24
62
|
inputs: Record<string, unknown> | null;
|
|
25
63
|
sourceSnapshot: WorkflowSourceSnapshot | null;
|
|
26
64
|
createdAt: string;
|
|
27
65
|
updatedAt: string;
|
|
28
|
-
shortId: string;
|
|
29
66
|
isTemporary: boolean;
|
|
30
67
|
}
|
|
31
|
-
|
|
68
|
+
/** A run as the API returns it outside the list: no job strip, because none was fetched. */
|
|
69
|
+
export interface WorkflowRunRecord extends WorkflowRun {
|
|
32
70
|
status: WorkflowRunStatus;
|
|
33
71
|
latestAttempt: number;
|
|
34
72
|
runAttempt: WorkflowRunAttemptSummary;
|
|
35
73
|
}
|
|
74
|
+
export interface WorkflowRunListItem extends WorkflowRunRecord {
|
|
75
|
+
jobs: WorkflowRunJobs;
|
|
76
|
+
}
|
|
36
77
|
export interface WorkflowRunDetail extends WorkflowRun {
|
|
37
78
|
latestAttempt: number;
|
|
38
79
|
runAttempt: WorkflowRunAttempt;
|
|
@@ -46,7 +87,6 @@ export interface WorkflowRunListPage {
|
|
|
46
87
|
export interface ManualWorkflowLaunch {
|
|
47
88
|
workflowRunId: string;
|
|
48
89
|
}
|
|
49
|
-
export declare function workflowRunShortId(id: string): string;
|
|
50
90
|
export declare function workflowRunTriggerLabel({ triggerSource, triggerEvent, }: {
|
|
51
91
|
triggerSource: string;
|
|
52
92
|
triggerEvent: string;
|
|
@@ -55,6 +95,14 @@ export declare function workflowRunTriggerDisplayLabel({ triggerSource, triggerE
|
|
|
55
95
|
triggerSource: string;
|
|
56
96
|
triggerEvent: string;
|
|
57
97
|
}): string;
|
|
98
|
+
/**
|
|
99
|
+
* The ref as a person names it: `main` for a branch, `#42` for a pull request, the tag for a
|
|
100
|
+
* tag. An unrecognized ref is shown verbatim rather than hidden, since a ref nobody can read
|
|
101
|
+
* is still better evidence than a blank cell.
|
|
102
|
+
*/
|
|
103
|
+
export declare function workflowRunBranchLabel(run: Pick<WorkflowRun, 'triggerReference'>): string | null;
|
|
104
|
+
export declare function workflowRunCommitLabel(run: Pick<WorkflowRun, 'triggerReference'>): string | null;
|
|
105
|
+
export declare function workflowRunActor(run: Pick<WorkflowRun, 'triggerReference'>): string | null;
|
|
58
106
|
export declare function isWorkflowRunTerminal(status: WorkflowRunStatus): boolean;
|
|
59
107
|
export declare function isWorkflowStatus(status: string): status is WorkflowStatus;
|
|
60
108
|
//# sourceMappingURL=workflow-run.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-run.d.ts","sourceRoot":"","sources":["../../../src/core/entities/workflow-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,GAAG,EAAE,q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AL_WORKFLOW_RUN_STATUSES);
|
|
19
|
-
export function workflowRunShortId(id) {
|
|
20
|
-
return id.length <= 8 ? id : id.slice(0, 8);
|
|
21
|
-
}
|
|
22
19
|
export function workflowRunTriggerLabel({ triggerSource, triggerEvent }) {
|
|
23
20
|
return [
|
|
24
21
|
triggerSource,
|
|
@@ -28,6 +25,28 @@ export function workflowRunTriggerLabel({ triggerSource, triggerEvent }) {
|
|
|
28
25
|
export function workflowRunTriggerDisplayLabel({ triggerSource, triggerEvent }) {
|
|
29
26
|
return triggerEvent || triggerSource;
|
|
30
27
|
}
|
|
28
|
+
const SHORT_COMMIT_LENGTH = 7;
|
|
29
|
+
const PULL_REQUEST_REF_PATTERN = /^refs\/pull\/(\d+)\/head$/u;
|
|
30
|
+
/**
|
|
31
|
+
* The ref as a person names it: `main` for a branch, `#42` for a pull request, the tag for a
|
|
32
|
+
* tag. An unrecognized ref is shown verbatim rather than hidden, since a ref nobody can read
|
|
33
|
+
* is still better evidence than a blank cell.
|
|
34
|
+
*/ export function workflowRunBranchLabel(run) {
|
|
35
|
+
const ref = run.triggerReference?.ref;
|
|
36
|
+
if (!ref) return null;
|
|
37
|
+
const pullRequest = PULL_REQUEST_REF_PATTERN.exec(ref);
|
|
38
|
+
if (pullRequest) return `#${pullRequest[1]}`;
|
|
39
|
+
if (ref.startsWith('refs/heads/')) return ref.slice('refs/heads/'.length);
|
|
40
|
+
if (ref.startsWith('refs/tags/')) return ref.slice('refs/tags/'.length);
|
|
41
|
+
return ref;
|
|
42
|
+
}
|
|
43
|
+
export function workflowRunCommitLabel(run) {
|
|
44
|
+
const commit = run.triggerReference?.commit;
|
|
45
|
+
return commit ? commit.slice(0, SHORT_COMMIT_LENGTH) : null;
|
|
46
|
+
}
|
|
47
|
+
export function workflowRunActor(run) {
|
|
48
|
+
return run.triggerReference?.actor ?? null;
|
|
49
|
+
}
|
|
31
50
|
export function isWorkflowRunTerminal(status) {
|
|
32
51
|
return TERMINAL_WORKFLOW_RUN_STATUS_SET.has(status);
|
|
33
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/entities/workflow-run.ts"],"sourcesContent":["import {type Job, WORKFLOW_JOB_STATUSES} from './job.js';\nimport type {WorkflowRunAttempt, WorkflowRunAttemptSummary} from './workflow-run-attempt.js';\n\nexport type WorkflowRunStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled';\nexport type WorkflowRunRerunMode = 'all' | 'failed';\nexport type WorkflowStatus = WorkflowRunStatus | (typeof WORKFLOW_JOB_STATUSES)[number];\n\nexport const WORKFLOW_RUN_STATUSES = [\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n] as const satisfies readonly WorkflowRunStatus[];\n\nexport const TERMINAL_WORKFLOW_RUN_STATUSES = [\n 'succeeded',\n 'failed',\n 'cancelled',\n] as const satisfies readonly WorkflowRunStatus[];\n\nconst WORKFLOW_STATUSES = new Set<WorkflowStatus>([\n ...WORKFLOW_RUN_STATUSES,\n ...WORKFLOW_JOB_STATUSES,\n]);\nconst TERMINAL_WORKFLOW_RUN_STATUS_SET = new Set<WorkflowRunStatus>(TERMINAL_WORKFLOW_RUN_STATUSES);\n\nexport interface WorkflowSourceSnapshot {\n content: string;\n format: 'yaml';\n}\n\nexport interface WorkflowRun {\n id: string;\n projectId: string;\n definitionId: string;\n name: string;\n currentAttempt: number;\n triggerProvider: string | null;\n triggerSource: string;\n triggerEvent: string;\n triggerDisplayLabel: string;\n triggerLabel: string;\n triggerPayload: Record<string, unknown>;\n inputs: Record<string, unknown> | null;\n sourceSnapshot: WorkflowSourceSnapshot | null;\n createdAt: string;\n updatedAt: string;\n
|
|
1
|
+
{"version":3,"sources":["../../../src/core/entities/workflow-run.ts"],"sourcesContent":["import {type Job, type JobStatus, WORKFLOW_JOB_STATUSES} from './job.js';\nimport type {WorkflowRunAttempt, WorkflowRunAttemptSummary} from './workflow-run-attempt.js';\n\nexport type WorkflowRunStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled';\nexport type WorkflowRunRerunMode = 'all' | 'failed';\nexport type WorkflowStatus = WorkflowRunStatus | (typeof WORKFLOW_JOB_STATUSES)[number];\nexport type WorkflowDisplayStatus = WorkflowStatus | 'listening';\n\nexport const WORKFLOW_RUN_STATUSES = [\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n] as const satisfies readonly WorkflowRunStatus[];\n\nexport const TERMINAL_WORKFLOW_RUN_STATUSES = [\n 'succeeded',\n 'failed',\n 'cancelled',\n] as const satisfies readonly WorkflowRunStatus[];\n\nconst WORKFLOW_STATUSES = new Set<WorkflowStatus>([\n ...WORKFLOW_RUN_STATUSES,\n ...WORKFLOW_JOB_STATUSES,\n]);\nconst TERMINAL_WORKFLOW_RUN_STATUS_SET = new Set<WorkflowRunStatus>(TERMINAL_WORKFLOW_RUN_STATUSES);\n\nexport interface WorkflowSourceSnapshot {\n content: string;\n format: 'yaml';\n}\n\n/**\n * Provider-neutral trigger facts. Every field is nullable: only source-control triggers\n * resolve a reference at all, and a payload can name a ref without naming an actor.\n */\nexport interface WorkflowRunTriggerReference {\n repository: string | null;\n ref: string | null;\n commit: string | null;\n actor: string | null;\n}\n\n/** One glyph in a run row's job status strip: enough to draw and label it, nothing more. */\nexport interface WorkflowRunJobSummary {\n id: string;\n key: string;\n name: string | null;\n status: JobStatus;\n position: number;\n}\n\nexport interface WorkflowRunJobStatusCount {\n status: JobStatus;\n count: number;\n}\n\n/**\n * A run's jobs as the list receives them: a bounded slice to draw, plus totals covering all\n * of them.\n *\n * `preview` is capped by the API, so `preview.length` is not the job count and the strip\n * reads `total` and `statusCounts` for anything it says rather than anything it draws.\n */\nexport interface WorkflowRunJobs {\n preview: WorkflowRunJobSummary[];\n statusCounts: WorkflowRunJobStatusCount[];\n total: number;\n}\n\nexport interface WorkflowRun {\n id: string;\n projectId: string;\n definitionId: string;\n number: number | null;\n name: string;\n workflowName: string;\n currentAttempt: number;\n triggerProvider: string | null;\n triggerSource: string;\n triggerEvent: string;\n triggerDisplayLabel: string;\n triggerLabel: string;\n triggerPayload: Record<string, unknown>;\n triggerReference: WorkflowRunTriggerReference | null;\n inputs: Record<string, unknown> | null;\n sourceSnapshot: WorkflowSourceSnapshot | null;\n createdAt: string;\n updatedAt: string;\n isTemporary: boolean;\n}\n\n/** A run as the API returns it outside the list: no job strip, because none was fetched. */\nexport interface WorkflowRunRecord extends WorkflowRun {\n status: WorkflowRunStatus;\n latestAttempt: number;\n runAttempt: WorkflowRunAttemptSummary;\n}\n\nexport interface WorkflowRunListItem extends WorkflowRunRecord {\n jobs: WorkflowRunJobs;\n}\n\nexport interface WorkflowRunDetail extends WorkflowRun {\n latestAttempt: number;\n runAttempt: WorkflowRunAttempt;\n jobs: Job[];\n}\n\nexport interface WorkflowRunListPage {\n runs: WorkflowRunListItem[];\n nextCursor: string | null;\n filteredTotalCount: number | null;\n}\n\nexport interface ManualWorkflowLaunch {\n workflowRunId: string;\n}\n\nexport function workflowRunTriggerLabel({\n triggerSource,\n triggerEvent,\n}: {\n triggerSource: string;\n triggerEvent: string;\n}): string {\n return [triggerSource, triggerEvent].filter(Boolean).join(' · ');\n}\n\nexport function workflowRunTriggerDisplayLabel({\n triggerSource,\n triggerEvent,\n}: {\n triggerSource: string;\n triggerEvent: string;\n}): string {\n return triggerEvent || triggerSource;\n}\n\nconst SHORT_COMMIT_LENGTH = 7;\nconst PULL_REQUEST_REF_PATTERN = /^refs\\/pull\\/(\\d+)\\/head$/u;\n\n/**\n * The ref as a person names it: `main` for a branch, `#42` for a pull request, the tag for a\n * tag. An unrecognized ref is shown verbatim rather than hidden, since a ref nobody can read\n * is still better evidence than a blank cell.\n */\nexport function workflowRunBranchLabel(run: Pick<WorkflowRun, 'triggerReference'>): string | null {\n const ref = run.triggerReference?.ref;\n if (!ref) return null;\n const pullRequest = PULL_REQUEST_REF_PATTERN.exec(ref);\n if (pullRequest) return `#${pullRequest[1]}`;\n if (ref.startsWith('refs/heads/')) return ref.slice('refs/heads/'.length);\n if (ref.startsWith('refs/tags/')) return ref.slice('refs/tags/'.length);\n return ref;\n}\n\nexport function workflowRunCommitLabel(run: Pick<WorkflowRun, 'triggerReference'>): string | null {\n const commit = run.triggerReference?.commit;\n return commit ? commit.slice(0, SHORT_COMMIT_LENGTH) : null;\n}\n\nexport function workflowRunActor(run: Pick<WorkflowRun, 'triggerReference'>): string | null {\n return run.triggerReference?.actor ?? null;\n}\n\nexport function isWorkflowRunTerminal(status: WorkflowRunStatus): boolean {\n return TERMINAL_WORKFLOW_RUN_STATUS_SET.has(status);\n}\n\nexport function isWorkflowStatus(status: string): status is WorkflowStatus {\n return WORKFLOW_STATUSES.has(status as WorkflowStatus);\n}\n"],"names":["WORKFLOW_JOB_STATUSES","WORKFLOW_RUN_STATUSES","TERMINAL_WORKFLOW_RUN_STATUSES","WORKFLOW_STATUSES","Set","TERMINAL_WORKFLOW_RUN_STATUS_SET","workflowRunTriggerLabel","triggerSource","triggerEvent","filter","Boolean","join","workflowRunTriggerDisplayLabel","SHORT_COMMIT_LENGTH","PULL_REQUEST_REF_PATTERN","workflowRunBranchLabel","run","ref","triggerReference","pullRequest","exec","startsWith","slice","length","workflowRunCommitLabel","commit","workflowRunActor","actor","isWorkflowRunTerminal","status","has","isWorkflowStatus"],"mappings":"AAAA,SAAkCA,qBAAqB,QAAO,WAAW;AAQzE,OAAO,MAAMC,wBAAwB;IACnC;IACA;IACA;IACA;IACA;CACD,CAAiD;AAElD,OAAO,MAAMC,iCAAiC;IAC5C;IACA;IACA;CACD,CAAiD;AAElD,MAAMC,oBAAoB,IAAIC,IAAoB;OAC7CH;OACAD;CACJ;AACD,MAAMK,mCAAmC,IAAID,IAAuBF;AA8FpE,OAAO,SAASI,wBAAwB,EACtCC,aAAa,EACbC,YAAY,EAIb;IACC,OAAO;QAACD;QAAeC;KAAa,CAACC,MAAM,CAACC,SAASC,IAAI,CAAC;AAC5D;AAEA,OAAO,SAASC,+BAA+B,EAC7CL,aAAa,EACbC,YAAY,EAIb;IACC,OAAOA,gBAAgBD;AACzB;AAEA,MAAMM,sBAAsB;AAC5B,MAAMC,2BAA2B;AAEjC;;;;CAIC,GACD,OAAO,SAASC,uBAAuBC,GAA0C;IAC/E,MAAMC,MAAMD,IAAIE,gBAAgB,EAAED;IAClC,IAAI,CAACA,KAAK,OAAO;IACjB,MAAME,cAAcL,yBAAyBM,IAAI,CAACH;IAClD,IAAIE,aAAa,OAAO,CAAC,CAAC,EAAEA,WAAW,CAAC,EAAE,EAAE;IAC5C,IAAIF,IAAII,UAAU,CAAC,gBAAgB,OAAOJ,IAAIK,KAAK,CAAC,cAAcC,MAAM;IACxE,IAAIN,IAAII,UAAU,CAAC,eAAe,OAAOJ,IAAIK,KAAK,CAAC,aAAaC,MAAM;IACtE,OAAON;AACT;AAEA,OAAO,SAASO,uBAAuBR,GAA0C;IAC/E,MAAMS,SAAST,IAAIE,gBAAgB,EAAEO;IACrC,OAAOA,SAASA,OAAOH,KAAK,CAAC,GAAGT,uBAAuB;AACzD;AAEA,OAAO,SAASa,iBAAiBV,GAA0C;IACzE,OAAOA,IAAIE,gBAAgB,EAAES,SAAS;AACxC;AAEA,OAAO,SAASC,sBAAsBC,MAAyB;IAC7D,OAAOxB,iCAAiCyB,GAAG,CAACD;AAC9C;AAEA,OAAO,SAASE,iBAAiBF,MAAc;IAC7C,OAAO1B,kBAAkB2B,GAAG,CAACD;AAC/B"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export type { JobDisplayDuration, JobListening, JobMode, JobStatus, JobStatusReason, ListenerStatus, ResolutionReason, } from './entities/job.js';
|
|
2
|
-
export { defaultJobExecution, isTerminalJobStatus, Job, resolveJobExecution, TERMINAL_WORKFLOW_JOB_STATUSES, WORKFLOW_JOB_STATUSES, } from './entities/job.js';
|
|
3
|
-
export type { JobExecutionDisplayDuration, JobExecutionStatus, JobExecutionTime, WorkflowExecutionEvent, } from './entities/job-execution.js';
|
|
4
|
-
export { JobExecution } from './entities/job-execution.js';
|
|
1
|
+
export type { JobDisplayDuration, JobDisplayStatus, JobListening, JobMode, JobStatus, JobStatusReason, ListenerStatus, ResolutionReason, } from './entities/job.js';
|
|
2
|
+
export { defaultJobExecution, deriveJobDisplayStatus, isTerminalJobStatus, Job, resolveJobExecution, TERMINAL_WORKFLOW_JOB_STATUSES, WORKFLOW_JOB_STATUSES, } from './entities/job.js';
|
|
3
|
+
export type { JobExecutionDisplayDuration, JobExecutionDisplayStatus, JobExecutionStatus, JobExecutionTime, WorkflowExecutionEvent, } from './entities/job-execution.js';
|
|
4
|
+
export { deriveJobExecutionDisplayStatus, isTerminalJobExecutionStatus, JobExecution, } from './entities/job-execution.js';
|
|
5
5
|
export type { AgentConfigIssue, AgentStepConfig, Step, StepError, StepErrorCategory, StepErrorReason, StepSourceLocation, } from './entities/step.js';
|
|
6
6
|
export { AGENT_CONFIG_ISSUES, STEP_ERROR_REASONS } from './entities/step.js';
|
|
7
7
|
export type { StepAttemptDisplayDuration, StepGateResult, } from './entities/step-attempt.js';
|
|
8
8
|
export { StepAttempt } from './entities/step-attempt.js';
|
|
9
|
-
export type { ManualWorkflowLaunch, WorkflowRun, WorkflowRunDetail, WorkflowRunListItem, WorkflowRunListPage, WorkflowRunRerunMode, WorkflowRunStatus, WorkflowSourceSnapshot, WorkflowStatus, } from './entities/workflow-run.js';
|
|
10
|
-
export { isWorkflowRunTerminal, isWorkflowStatus, TERMINAL_WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_STATUSES,
|
|
9
|
+
export type { ManualWorkflowLaunch, WorkflowDisplayStatus, WorkflowRun, WorkflowRunDetail, WorkflowRunJobStatusCount, WorkflowRunJobSummary, WorkflowRunJobs, WorkflowRunListItem, WorkflowRunListPage, WorkflowRunRecord, WorkflowRunRerunMode, WorkflowRunStatus, WorkflowRunTriggerReference, WorkflowSourceSnapshot, WorkflowStatus, } from './entities/workflow-run.js';
|
|
10
|
+
export { isWorkflowRunTerminal, isWorkflowStatus, TERMINAL_WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_STATUSES, workflowRunActor, workflowRunBranchLabel, workflowRunCommitLabel, workflowRunTriggerDisplayLabel, workflowRunTriggerLabel, } from './entities/workflow-run.js';
|
|
11
11
|
export type { WorkflowRunAttemptDisplayDuration } from './entities/workflow-run-attempt.js';
|
|
12
12
|
export { WorkflowRunAttempt, WorkflowRunAttemptSummary } from './entities/workflow-run-attempt.js';
|
|
13
13
|
//# sourceMappingURL=workflow-run.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-run.d.ts","sourceRoot":"","sources":["../../src/core/workflow-run.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,YAAY,EACZ,OAAO,EACP,SAAS,EACT,eAAe,EACf,cAAc,EACd,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,GAAG,EACH,mBAAmB,EACnB,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,2BAA2B,EAC3B,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,
|
|
1
|
+
{"version":3,"file":"workflow-run.d.ts","sourceRoot":"","sources":["../../src/core/workflow-run.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,SAAS,EACT,eAAe,EACf,cAAc,EACd,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,GAAG,EACH,mBAAmB,EACnB,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,2BAA2B,EAC3B,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,EAC5B,YAAY,GACb,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,IAAI,EACJ,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAC3E,YAAY,EACV,0BAA0B,EAC1B,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AACvD,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,2BAA2B,EAC3B,sBAAsB,EACtB,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,8BAA8B,EAC9B,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,EACtB,8BAA8B,EAC9B,uBAAuB,GACxB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAC,iCAAiC,EAAC,MAAM,oCAAoC,CAAC;AAC1F,OAAO,EAAC,kBAAkB,EAAE,yBAAyB,EAAC,MAAM,oCAAoC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { defaultJobExecution, isTerminalJobStatus, Job, resolveJobExecution, TERMINAL_WORKFLOW_JOB_STATUSES, WORKFLOW_JOB_STATUSES } from './entities/job.js';
|
|
2
|
-
export { JobExecution } from './entities/job-execution.js';
|
|
1
|
+
export { defaultJobExecution, deriveJobDisplayStatus, isTerminalJobStatus, Job, resolveJobExecution, TERMINAL_WORKFLOW_JOB_STATUSES, WORKFLOW_JOB_STATUSES } from './entities/job.js';
|
|
2
|
+
export { deriveJobExecutionDisplayStatus, isTerminalJobExecutionStatus, JobExecution } from './entities/job-execution.js';
|
|
3
3
|
export { AGENT_CONFIG_ISSUES, STEP_ERROR_REASONS } from './entities/step.js';
|
|
4
4
|
export { StepAttempt } from './entities/step-attempt.js';
|
|
5
|
-
export { isWorkflowRunTerminal, isWorkflowStatus, TERMINAL_WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_STATUSES,
|
|
5
|
+
export { isWorkflowRunTerminal, isWorkflowStatus, TERMINAL_WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_STATUSES, workflowRunActor, workflowRunBranchLabel, workflowRunCommitLabel, workflowRunTriggerDisplayLabel, workflowRunTriggerLabel } from './entities/workflow-run.js';
|
|
6
6
|
export { WorkflowRunAttempt, WorkflowRunAttemptSummary } from './entities/workflow-run-attempt.js';
|
|
7
7
|
|
|
8
8
|
//# sourceMappingURL=workflow-run.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/workflow-run.ts"],"sourcesContent":["export type {\n JobDisplayDuration,\n JobListening,\n JobMode,\n JobStatus,\n JobStatusReason,\n ListenerStatus,\n ResolutionReason,\n} from './entities/job.js';\nexport {\n defaultJobExecution,\n isTerminalJobStatus,\n Job,\n resolveJobExecution,\n TERMINAL_WORKFLOW_JOB_STATUSES,\n WORKFLOW_JOB_STATUSES,\n} from './entities/job.js';\nexport type {\n JobExecutionDisplayDuration,\n JobExecutionStatus,\n JobExecutionTime,\n WorkflowExecutionEvent,\n} from './entities/job-execution.js';\nexport {JobExecution} from './entities/job-execution.js';\nexport type {\n AgentConfigIssue,\n AgentStepConfig,\n Step,\n StepError,\n StepErrorCategory,\n StepErrorReason,\n StepSourceLocation,\n} from './entities/step.js';\nexport {AGENT_CONFIG_ISSUES, STEP_ERROR_REASONS} from './entities/step.js';\nexport type {\n StepAttemptDisplayDuration,\n StepGateResult,\n} from './entities/step-attempt.js';\nexport {StepAttempt} from './entities/step-attempt.js';\nexport type {\n ManualWorkflowLaunch,\n WorkflowRun,\n WorkflowRunDetail,\n WorkflowRunListItem,\n WorkflowRunListPage,\n WorkflowRunRerunMode,\n WorkflowRunStatus,\n WorkflowSourceSnapshot,\n WorkflowStatus,\n} from './entities/workflow-run.js';\nexport {\n isWorkflowRunTerminal,\n isWorkflowStatus,\n TERMINAL_WORKFLOW_RUN_STATUSES,\n WORKFLOW_RUN_STATUSES,\n
|
|
1
|
+
{"version":3,"sources":["../../src/core/workflow-run.ts"],"sourcesContent":["export type {\n JobDisplayDuration,\n JobDisplayStatus,\n JobListening,\n JobMode,\n JobStatus,\n JobStatusReason,\n ListenerStatus,\n ResolutionReason,\n} from './entities/job.js';\nexport {\n defaultJobExecution,\n deriveJobDisplayStatus,\n isTerminalJobStatus,\n Job,\n resolveJobExecution,\n TERMINAL_WORKFLOW_JOB_STATUSES,\n WORKFLOW_JOB_STATUSES,\n} from './entities/job.js';\nexport type {\n JobExecutionDisplayDuration,\n JobExecutionDisplayStatus,\n JobExecutionStatus,\n JobExecutionTime,\n WorkflowExecutionEvent,\n} from './entities/job-execution.js';\nexport {\n deriveJobExecutionDisplayStatus,\n isTerminalJobExecutionStatus,\n JobExecution,\n} from './entities/job-execution.js';\nexport type {\n AgentConfigIssue,\n AgentStepConfig,\n Step,\n StepError,\n StepErrorCategory,\n StepErrorReason,\n StepSourceLocation,\n} from './entities/step.js';\nexport {AGENT_CONFIG_ISSUES, STEP_ERROR_REASONS} from './entities/step.js';\nexport type {\n StepAttemptDisplayDuration,\n StepGateResult,\n} from './entities/step-attempt.js';\nexport {StepAttempt} from './entities/step-attempt.js';\nexport type {\n ManualWorkflowLaunch,\n WorkflowDisplayStatus,\n WorkflowRun,\n WorkflowRunDetail,\n WorkflowRunJobStatusCount,\n WorkflowRunJobSummary,\n WorkflowRunJobs,\n WorkflowRunListItem,\n WorkflowRunListPage,\n WorkflowRunRecord,\n WorkflowRunRerunMode,\n WorkflowRunStatus,\n WorkflowRunTriggerReference,\n WorkflowSourceSnapshot,\n WorkflowStatus,\n} from './entities/workflow-run.js';\nexport {\n isWorkflowRunTerminal,\n isWorkflowStatus,\n TERMINAL_WORKFLOW_RUN_STATUSES,\n WORKFLOW_RUN_STATUSES,\n workflowRunActor,\n workflowRunBranchLabel,\n workflowRunCommitLabel,\n workflowRunTriggerDisplayLabel,\n workflowRunTriggerLabel,\n} from './entities/workflow-run.js';\nexport type {WorkflowRunAttemptDisplayDuration} from './entities/workflow-run-attempt.js';\nexport {WorkflowRunAttempt, WorkflowRunAttemptSummary} from './entities/workflow-run-attempt.js';\n"],"names":["defaultJobExecution","deriveJobDisplayStatus","isTerminalJobStatus","Job","resolveJobExecution","TERMINAL_WORKFLOW_JOB_STATUSES","WORKFLOW_JOB_STATUSES","deriveJobExecutionDisplayStatus","isTerminalJobExecutionStatus","JobExecution","AGENT_CONFIG_ISSUES","STEP_ERROR_REASONS","StepAttempt","isWorkflowRunTerminal","isWorkflowStatus","TERMINAL_WORKFLOW_RUN_STATUSES","WORKFLOW_RUN_STATUSES","workflowRunActor","workflowRunBranchLabel","workflowRunCommitLabel","workflowRunTriggerDisplayLabel","workflowRunTriggerLabel","WorkflowRunAttempt","WorkflowRunAttemptSummary"],"mappings":"AAUA,SACEA,mBAAmB,EACnBC,sBAAsB,EACtBC,mBAAmB,EACnBC,GAAG,EACHC,mBAAmB,EACnBC,8BAA8B,EAC9BC,qBAAqB,QAChB,oBAAoB;AAQ3B,SACEC,+BAA+B,EAC/BC,4BAA4B,EAC5BC,YAAY,QACP,8BAA8B;AAUrC,SAAQC,mBAAmB,EAAEC,kBAAkB,QAAO,qBAAqB;AAK3E,SAAQC,WAAW,QAAO,6BAA6B;AAkBvD,SACEC,qBAAqB,EACrBC,gBAAgB,EAChBC,8BAA8B,EAC9BC,qBAAqB,EACrBC,gBAAgB,EAChBC,sBAAsB,EACtBC,sBAAsB,EACtBC,8BAA8B,EAC9BC,uBAAuB,QAClB,6BAA6B;AAEpC,SAAQC,kBAAkB,EAAEC,yBAAyB,QAAO,qCAAqC"}
|