@shipfox/client-workflows 12.0.2 → 14.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/main.ts +16 -1
- package/.storybook/preview.tsx +3 -3
- package/.storybook/workspace-source.ts +31 -0
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +79 -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-duration-label.js +1 -1
- package/dist/components/job-graph/job-duration-label.js.map +1 -1
- package/dist/components/job-graph/job-graph-content.d.ts +2 -1
- package/dist/components/job-graph/job-graph-content.d.ts.map +1 -1
- package/dist/components/job-graph/job-graph-content.js +3 -3
- package/dist/components/job-graph/job-graph-content.js.map +1 -1
- package/dist/components/job-graph/job-graph-view.d.ts +2 -1
- package/dist/components/job-graph/job-graph-view.d.ts.map +1 -1
- package/dist/components/job-graph/job-graph-view.js +2 -2
- package/dist/components/job-graph/job-graph-view.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 +10 -9
- package/dist/components/job-graph/job-node.js.map +1 -1
- package/dist/components/job-graph/types.d.ts +2 -1
- package/dist/components/job-graph/types.d.ts.map +1 -1
- package/dist/components/job-graph/types.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-duration-label.js +1 -1
- package/dist/components/workflow-run-duration-label.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 +10 -9
- 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 +4 -9
- package/dist/components/workflow-run-summary/workflow-run-summary.d.ts.map +1 -1
- package/dist/components/workflow-run-summary/workflow-run-summary.js +107 -74
- package/dist/components/workflow-run-summary/workflow-run-summary.js.map +1 -1
- package/dist/components/workflow-run-tabs/index.d.ts +6 -0
- package/dist/components/workflow-run-tabs/index.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/index.js +7 -0
- package/dist/components/workflow-run-tabs/index.js.map +1 -0
- package/dist/components/workflow-run-tabs/run-annotation-summary-line.d.ts +11 -0
- package/dist/components/workflow-run-tabs/run-annotation-summary-line.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/run-annotation-summary-line.js +71 -0
- package/dist/components/workflow-run-tabs/run-annotation-summary-line.js.map +1 -0
- package/dist/components/workflow-run-tabs/run-annotations-empty.d.ts +2 -0
- package/dist/components/workflow-run-tabs/run-annotations-empty.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/run-annotations-empty.js +11 -0
- package/dist/components/workflow-run-tabs/run-annotations-empty.js.map +1 -0
- package/dist/components/workflow-run-tabs/run-jobs-list.d.ts +18 -0
- package/dist/components/workflow-run-tabs/run-jobs-list.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/run-jobs-list.js +107 -0
- package/dist/components/workflow-run-tabs/run-jobs-list.js.map +1 -0
- package/dist/components/workflow-run-tabs/run-tab-count.d.ts +6 -0
- package/dist/components/workflow-run-tabs/run-tab-count.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/run-tab-count.js +27 -0
- package/dist/components/workflow-run-tabs/run-tab-count.js.map +1 -0
- package/dist/components/workflow-run-tabs/run-tab-strip.d.ts +8 -0
- package/dist/components/workflow-run-tabs/run-tab-strip.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/run-tab-strip.js +82 -0
- package/dist/components/workflow-run-tabs/run-tab-strip.js.map +1 -0
- 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-selection.d.ts.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-selection.js +40 -1
- package/dist/components/workflow-run-view/workflow-run-selection.js.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-states.d.ts +1 -0
- package/dist/components/workflow-run-view/workflow-run-states.d.ts.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-states.js +10 -1
- package/dist/components/workflow-run-view/workflow-run-states.js.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-view.d.ts +10 -5
- package/dist/components/workflow-run-view/workflow-run-view.d.ts.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-view.js +136 -85
- package/dist/components/workflow-run-view/workflow-run-view.js.map +1 -1
- package/dist/components/workflow-source-panel/index.d.ts +1 -0
- package/dist/components/workflow-source-panel/index.d.ts.map +1 -1
- package/dist/components/workflow-source-panel/index.js +1 -0
- package/dist/components/workflow-source-panel/index.js.map +1 -1
- package/dist/components/workflow-source-panel/workflow-source-content.d.ts +12 -0
- package/dist/components/workflow-source-panel/workflow-source-content.d.ts.map +1 -0
- package/dist/components/workflow-source-panel/workflow-source-content.js +53 -0
- package/dist/components/workflow-source-panel/workflow-source-content.js.map +1 -0
- package/dist/components/workflow-source-panel/workflow-source-panel.d.ts +1 -1
- package/dist/components/workflow-source-panel/workflow-source-panel.d.ts.map +1 -1
- package/dist/components/workflow-source-panel/workflow-source-panel.js +7 -54
- package/dist/components/workflow-source-panel/workflow-source-panel.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/step.d.ts +1 -1
- package/dist/core/entities/step.d.ts.map +1 -1
- package/dist/core/entities/step.js +2 -0
- package/dist/core/entities/step.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-tabs.d.ts +9 -0
- package/dist/core/workflow-run-tabs.d.ts.map +1 -0
- package/dist/core/workflow-run-tabs.js +3 -0
- package/dist/core/workflow-run-tabs.js.map +1 -0
- 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 +52 -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 +94 -5
- package/dist/routes/inputs.d.ts.map +1 -1
- package/dist/routes/inputs.js +199 -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-duration-label.tsx +5 -1
- package/src/components/job-graph/job-graph-content.tsx +7 -4
- package/src/components/job-graph/job-graph-view.test.tsx +19 -8
- package/src/components/job-graph/job-graph-view.tsx +6 -3
- package/src/components/job-graph/job-graph.stories.tsx +24 -20
- package/src/components/job-graph/job-node.stories.tsx +11 -6
- package/src/components/job-graph/job-node.test.tsx +82 -12
- package/src/components/job-graph/job-node.tsx +22 -15
- package/src/components/job-graph/types.ts +5 -1
- 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-duration-label.tsx +1 -1
- 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 +15 -14
- package/src/components/workflow-run-summary/workflow-run-summary.stories.tsx +29 -38
- package/src/components/workflow-run-summary/workflow-run-summary.test.tsx +30 -24
- package/src/components/workflow-run-summary/workflow-run-summary.tsx +102 -77
- package/src/components/workflow-run-tabs/index.ts +5 -0
- package/src/components/workflow-run-tabs/run-annotation-summary-line.test.tsx +69 -0
- package/src/components/workflow-run-tabs/run-annotation-summary-line.tsx +97 -0
- package/src/components/workflow-run-tabs/run-annotations-empty.tsx +11 -0
- package/src/components/workflow-run-tabs/run-jobs-list.tsx +151 -0
- package/src/components/workflow-run-tabs/run-tab-count.tsx +28 -0
- package/src/components/workflow-run-tabs/run-tab-strip.stories.tsx +52 -0
- package/src/components/workflow-run-tabs/run-tab-strip.test.tsx +117 -0
- package/src/components/workflow-run-tabs/run-tab-strip.tsx +97 -0
- 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-selection.test.ts +48 -0
- package/src/components/workflow-run-view/workflow-run-selection.ts +48 -1
- package/src/components/workflow-run-view/workflow-run-states.tsx +12 -1
- package/src/components/workflow-run-view/workflow-run-view.test.tsx +152 -94
- package/src/components/workflow-run-view/workflow-run-view.tsx +219 -95
- package/src/components/workflow-source-panel/index.ts +1 -0
- package/src/components/workflow-source-panel/workflow-source-content.tsx +84 -0
- package/src/components/workflow-source-panel/workflow-source-panel.tsx +14 -81
- 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/step.ts +4 -0
- package/src/core/entities/workflow-run.ts +76 -7
- package/src/core/workflow-run-tabs.ts +8 -0
- 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 +72 -0
- package/src/pages/workflow-run-list-page.tsx +65 -0
- package/src/pages/workflow-run-pages.test.tsx +823 -0
- package/src/routes/inputs.test.ts +240 -12
- package/src/routes/inputs.ts +215 -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/src/storybook-config.test.ts +27 -0
- 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/tsconfig.test.json +7 -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.test.tsx +0 -519
- package/src/pages/workflow-run-page.tsx +0 -94
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useNavigate } from '@tanstack/react-router';
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import { WorkflowRunList } from '#components/workflow-run-list/workflow-run-list.js';
|
|
5
|
+
import { applyWorkflowRunFilterPatch, clearWorkflowRunFilters, workflowRunSearchParams } from '#routes/inputs.js';
|
|
6
|
+
const EMPTY_SEARCH = {};
|
|
7
|
+
export function WorkflowRunsPage({ projectId, workspaceSlug, projectSlug, search = EMPTY_SEARCH }) {
|
|
8
|
+
const navigate = useNavigate();
|
|
9
|
+
// Filter changes replace history instead of pushing it, so Back leaves the list rather than
|
|
10
|
+
// walking every keystroke of a search box.
|
|
11
|
+
const commitSearch = useCallback((next)=>{
|
|
12
|
+
navigate({
|
|
13
|
+
search: workflowRunSearchParams(next, {}),
|
|
14
|
+
replace: true
|
|
15
|
+
});
|
|
16
|
+
}, [
|
|
17
|
+
navigate
|
|
18
|
+
]);
|
|
19
|
+
const onFiltersChange = useCallback((patch)=>commitSearch(applyWorkflowRunFilterPatch(search, patch)), [
|
|
20
|
+
commitSearch,
|
|
21
|
+
search
|
|
22
|
+
]);
|
|
23
|
+
const onClearFilters = useCallback(()=>commitSearch(clearWorkflowRunFilters(search)), [
|
|
24
|
+
commitSearch,
|
|
25
|
+
search
|
|
26
|
+
]);
|
|
27
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
28
|
+
className: "flex min-h-0 flex-1 overflow-hidden bg-background-neutral-base",
|
|
29
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
30
|
+
className: "mx-auto flex min-h-0 w-full max-w-[1120px] flex-1 flex-col px-24 py-24",
|
|
31
|
+
children: /*#__PURE__*/ _jsx(WorkflowRunList, {
|
|
32
|
+
projectId: projectId,
|
|
33
|
+
workspaceSlug: workspaceSlug,
|
|
34
|
+
projectSlug: projectSlug,
|
|
35
|
+
search: search,
|
|
36
|
+
onFiltersChange: onFiltersChange,
|
|
37
|
+
onClearFilters: onClearFilters
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=workflow-run-list-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/pages/workflow-run-list-page.tsx"],"sourcesContent":["import {useNavigate} from '@tanstack/react-router';\nimport {useCallback} from 'react';\nimport {WorkflowRunList} from '#components/workflow-run-list/workflow-run-list.js';\nimport {\n applyWorkflowRunFilterPatch,\n clearWorkflowRunFilters,\n type WorkflowRunFilterPatch,\n type WorkflowRunsSearch,\n workflowRunSearchParams,\n} from '#routes/inputs.js';\n\ninterface WorkflowRunsPageProps {\n projectId: string;\n workspaceSlug: string;\n projectSlug: string;\n search?: WorkflowRunsSearch;\n}\n\nconst EMPTY_SEARCH: WorkflowRunsSearch = {};\n\nexport function WorkflowRunsPage({\n projectId,\n workspaceSlug,\n projectSlug,\n search = EMPTY_SEARCH,\n}: WorkflowRunsPageProps) {\n const navigate = useNavigate();\n\n // Filter changes replace history instead of pushing it, so Back leaves the list rather than\n // walking every keystroke of a search box.\n const commitSearch = useCallback(\n (next: WorkflowRunsSearch) => {\n navigate({\n search: workflowRunSearchParams(next, {}) as never,\n replace: true,\n });\n },\n [navigate],\n );\n\n const onFiltersChange = useCallback(\n (patch: WorkflowRunFilterPatch) => commitSearch(applyWorkflowRunFilterPatch(search, patch)),\n [commitSearch, search],\n );\n\n const onClearFilters = useCallback(\n () => commitSearch(clearWorkflowRunFilters(search)),\n [commitSearch, search],\n );\n\n return (\n <div className=\"flex min-h-0 flex-1 overflow-hidden bg-background-neutral-base\">\n <div className=\"mx-auto flex min-h-0 w-full max-w-[1120px] flex-1 flex-col px-24 py-24\">\n <WorkflowRunList\n projectId={projectId}\n workspaceSlug={workspaceSlug}\n projectSlug={projectSlug}\n search={search}\n onFiltersChange={onFiltersChange}\n onClearFilters={onClearFilters}\n />\n </div>\n </div>\n );\n}\n"],"names":["useNavigate","useCallback","WorkflowRunList","applyWorkflowRunFilterPatch","clearWorkflowRunFilters","workflowRunSearchParams","EMPTY_SEARCH","WorkflowRunsPage","projectId","workspaceSlug","projectSlug","search","navigate","commitSearch","next","replace","onFiltersChange","patch","onClearFilters","div","className"],"mappings":";AAAA,SAAQA,WAAW,QAAO,yBAAyB;AACnD,SAAQC,WAAW,QAAO,QAAQ;AAClC,SAAQC,eAAe,QAAO,qDAAqD;AACnF,SACEC,2BAA2B,EAC3BC,uBAAuB,EAGvBC,uBAAuB,QAClB,oBAAoB;AAS3B,MAAMC,eAAmC,CAAC;AAE1C,OAAO,SAASC,iBAAiB,EAC/BC,SAAS,EACTC,aAAa,EACbC,WAAW,EACXC,SAASL,YAAY,EACC;IACtB,MAAMM,WAAWZ;IAEjB,4FAA4F;IAC5F,2CAA2C;IAC3C,MAAMa,eAAeZ,YACnB,CAACa;QACCF,SAAS;YACPD,QAAQN,wBAAwBS,MAAM,CAAC;YACvCC,SAAS;QACX;IACF,GACA;QAACH;KAAS;IAGZ,MAAMI,kBAAkBf,YACtB,CAACgB,QAAkCJ,aAAaV,4BAA4BQ,QAAQM,SACpF;QAACJ;QAAcF;KAAO;IAGxB,MAAMO,iBAAiBjB,YACrB,IAAMY,aAAaT,wBAAwBO,UAC3C;QAACE;QAAcF;KAAO;IAGxB,qBACE,KAACQ;QAAIC,WAAU;kBACb,cAAA,KAACD;YAAIC,WAAU;sBACb,cAAA,KAAClB;gBACCM,WAAWA;gBACXC,eAAeA;gBACfC,aAAaA;gBACbC,QAAQA;gBACRK,iBAAiBA;gBACjBE,gBAAgBA;;;;AAK1B"}
|
package/dist/routes/inputs.d.ts
CHANGED
|
@@ -1,22 +1,111 @@
|
|
|
1
|
-
import type { WorkflowRunListStatusFilter } from '#components/workflow-run-list/types.js';
|
|
2
1
|
import type { WorkflowRunSelectionInput } from '#core/workflow-run-url-state.js';
|
|
2
|
+
/**
|
|
3
|
+
* Statuses the run list can filter by. Absent means all; there is deliberately no `all`
|
|
4
|
+
* value, so "no filter" and "every filter" are the same URL rather than two.
|
|
5
|
+
*/
|
|
6
|
+
export declare const WORKFLOW_RUN_LIST_STATUSES: readonly ["succeeded", "failed", "running", "cancelled"];
|
|
7
|
+
export type WorkflowRunListStatus = (typeof WORKFLOW_RUN_LIST_STATUSES)[number];
|
|
8
|
+
export declare const WORKFLOW_RUN_TABS: readonly ["summary", "jobs", "annotations", "source"];
|
|
9
|
+
export type WorkflowRunTab = (typeof WORKFLOW_RUN_TABS)[number];
|
|
10
|
+
export declare const WORKFLOW_RUN_ANNOTATION_SEVERITIES: readonly ["error", "warning", "info", "success"];
|
|
11
|
+
export type WorkflowRunAnnotationSeverity = (typeof WORKFLOW_RUN_ANNOTATION_SEVERITIES)[number];
|
|
3
12
|
export interface WorkflowRunsSearch extends WorkflowRunSelectionInput {
|
|
4
13
|
search?: string;
|
|
5
|
-
status?:
|
|
14
|
+
status?: WorkflowRunListStatus[];
|
|
15
|
+
branch?: string[];
|
|
16
|
+
actor?: string[];
|
|
17
|
+
event?: string[];
|
|
18
|
+
/** Inclusive lower bound on the run's local calendar date, `YYYY-MM-DD`. */
|
|
19
|
+
after?: string;
|
|
20
|
+
/** Inclusive upper bound on the run's local calendar date, `YYYY-MM-DD`. */
|
|
21
|
+
before?: string;
|
|
22
|
+
tab?: WorkflowRunTab;
|
|
23
|
+
annotation?: string;
|
|
24
|
+
severity?: WorkflowRunAnnotationSeverity;
|
|
6
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Reads the run list and run detail query string.
|
|
28
|
+
*
|
|
29
|
+
* Every value is dropped rather than rejected when it does not fit: a truncated or
|
|
30
|
+
* hand-edited URL should degrade to a sensible page, never to an error screen. Unknown
|
|
31
|
+
* parameters are ignored for the same reason.
|
|
32
|
+
*/
|
|
7
33
|
export declare function validateWorkflowRunsSearch(input: Record<string, unknown>): WorkflowRunsSearch;
|
|
34
|
+
/**
|
|
35
|
+
* Writes the query string back.
|
|
36
|
+
*
|
|
37
|
+
* Array values reach the router as arrays and the app's `stringifySearch` expands each into
|
|
38
|
+
* repeated keys; joining them here would defeat that and break on branch names with commas.
|
|
39
|
+
*/
|
|
8
40
|
export declare function workflowRunSearchParams(search: WorkflowRunsSearch, selection?: WorkflowRunSelectionInput): {
|
|
9
41
|
runAttempt?: string;
|
|
10
42
|
stepAttempt?: string;
|
|
11
43
|
step?: string;
|
|
12
44
|
jobExecution?: string;
|
|
13
45
|
job?: string;
|
|
14
|
-
|
|
46
|
+
severity?: "error" | "success" | "warning" | "info";
|
|
47
|
+
annotation?: string;
|
|
48
|
+
tab?: "jobs" | "annotations" | "source";
|
|
49
|
+
before?: string;
|
|
50
|
+
after?: string;
|
|
51
|
+
event?: string[];
|
|
52
|
+
actor?: string[];
|
|
53
|
+
branch?: string[];
|
|
54
|
+
status?: ("running" | "succeeded" | "failed" | "cancelled")[];
|
|
15
55
|
search?: string;
|
|
16
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Resolves the detail surface for a URL. Explicit tabs win; legacy selection-only URLs belong
|
|
59
|
+
* to Jobs so their selected detail remains visible instead of silently landing on Summary.
|
|
60
|
+
*/
|
|
61
|
+
export declare function workflowRunTab(search: Pick<WorkflowRunsSearch, 'tab' | 'jobId' | 'jobExecutionId' | 'stepId' | 'stepAttemptId'>): WorkflowRunTab;
|
|
62
|
+
/** Serializes only list filters when leaving a run detail page for the run list. */
|
|
63
|
+
export declare function workflowRunListSearchParams(search: WorkflowRunsSearch): {
|
|
64
|
+
runAttempt?: string;
|
|
65
|
+
stepAttempt?: string;
|
|
66
|
+
step?: string;
|
|
67
|
+
jobExecution?: string;
|
|
68
|
+
job?: string;
|
|
69
|
+
severity?: "error" | "success" | "warning" | "info";
|
|
70
|
+
annotation?: string;
|
|
71
|
+
tab?: "jobs" | "annotations" | "source";
|
|
72
|
+
before?: string;
|
|
73
|
+
after?: string;
|
|
74
|
+
event?: string[];
|
|
75
|
+
actor?: string[];
|
|
76
|
+
branch?: string[];
|
|
77
|
+
status?: ("running" | "succeeded" | "failed" | "cancelled")[];
|
|
78
|
+
search?: string;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* A filter change. Each member is explicitly optional-or-undefined so that "present and
|
|
82
|
+
* undefined" (clear this filter) stays distinguishable from "absent" (leave it alone) under
|
|
83
|
+
* `exactOptionalPropertyTypes`.
|
|
84
|
+
*/
|
|
85
|
+
export interface WorkflowRunFilterPatch {
|
|
86
|
+
search?: string | undefined;
|
|
87
|
+
status?: WorkflowRunListStatus[] | undefined;
|
|
88
|
+
branch?: string[] | undefined;
|
|
89
|
+
actor?: string[] | undefined;
|
|
90
|
+
event?: string[] | undefined;
|
|
91
|
+
after?: string | undefined;
|
|
92
|
+
before?: string | undefined;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Applies a filter change.
|
|
96
|
+
*
|
|
97
|
+
* A key present with `undefined`, an empty string, or an empty array clears that filter; a
|
|
98
|
+
* key left out is untouched. Cleared filters are deleted rather than stored empty, so "no
|
|
99
|
+
* filter" is one URL instead of several that render the same list.
|
|
100
|
+
*/
|
|
101
|
+
export declare function applyWorkflowRunFilterPatch(search: WorkflowRunsSearch, patch: WorkflowRunFilterPatch): WorkflowRunsSearch;
|
|
102
|
+
/** Drops every filter while keeping the run-selection parameters the detail route owns. */
|
|
103
|
+
export declare function clearWorkflowRunFilters(search: WorkflowRunsSearch): WorkflowRunsSearch;
|
|
104
|
+
/** True when any list filter is active, which separates "no matches" from "no runs". */
|
|
105
|
+
export declare function hasWorkflowRunFilters(search: WorkflowRunsSearch): boolean;
|
|
17
106
|
export declare function workflowRouteParams(input: Record<string, unknown>): {
|
|
18
|
-
|
|
19
|
-
|
|
107
|
+
workspaceSlug: string;
|
|
108
|
+
projectSlug: string;
|
|
20
109
|
workflowRunId?: string;
|
|
21
110
|
};
|
|
22
111
|
//# sourceMappingURL=inputs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../src/routes/inputs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../src/routes/inputs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,iCAAiC,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,0BAA0B,0DAA2D,CAAC;AAEnG,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhF,eAAO,MAAM,iBAAiB,uDAAwD,CAAC;AAEvF,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,kCAAkC,kDAAmD,CAAC;AAEnG,MAAM,MAAM,6BAA6B,GAAG,CAAC,OAAO,kCAAkC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhG,MAAM,WAAW,kBAAmB,SAAQ,yBAAyB;IACnE,MAAM,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AAE,MAAM,GAAG,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,sBAAsB,GAC5B,kBAAkB,CAUpB;AAED,2FAA2F;AAC3F,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,GAAG,kBAAkB,CAUtF;AAED,wFAAwF;AACxF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAUzE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACnE,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAOA"}
|
package/dist/routes/inputs.js
CHANGED
|
@@ -1,14 +1,79 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Statuses the run list can filter by. Absent means all; there is deliberately no `all`
|
|
3
|
+
* value, so "no filter" and "every filter" are the same URL rather than two.
|
|
4
|
+
*/ export const WORKFLOW_RUN_LIST_STATUSES = [
|
|
5
|
+
'succeeded',
|
|
6
|
+
'failed',
|
|
7
|
+
'running',
|
|
8
|
+
'cancelled'
|
|
9
|
+
];
|
|
10
|
+
export const WORKFLOW_RUN_TABS = [
|
|
11
|
+
'summary',
|
|
12
|
+
'jobs',
|
|
13
|
+
'annotations',
|
|
14
|
+
'source'
|
|
15
|
+
];
|
|
16
|
+
export const WORKFLOW_RUN_ANNOTATION_SEVERITIES = [
|
|
17
|
+
'error',
|
|
18
|
+
'warning',
|
|
19
|
+
'info',
|
|
20
|
+
'success'
|
|
21
|
+
];
|
|
22
|
+
const STATUS_VALUES = new Set(WORKFLOW_RUN_LIST_STATUSES);
|
|
23
|
+
const TAB_VALUES = new Set(WORKFLOW_RUN_TABS);
|
|
24
|
+
const ANNOTATION_SEVERITY_VALUES = new Set(WORKFLOW_RUN_ANNOTATION_SEVERITIES);
|
|
25
|
+
const CALENDAR_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/u;
|
|
26
|
+
/**
|
|
27
|
+
* Reads the run list and run detail query string.
|
|
28
|
+
*
|
|
29
|
+
* Every value is dropped rather than rejected when it does not fit: a truncated or
|
|
30
|
+
* hand-edited URL should degrade to a sensible page, never to an error screen. Unknown
|
|
31
|
+
* parameters are ignored for the same reason.
|
|
32
|
+
*/ export function validateWorkflowRunsSearch(input) {
|
|
2
33
|
const search = string(input.search);
|
|
3
|
-
const status = input.status
|
|
34
|
+
const status = repeatable(input.status).filter(isWorkflowRunListStatus);
|
|
35
|
+
const branch = repeatable(input.branch);
|
|
36
|
+
const actor = repeatable(input.actor);
|
|
37
|
+
const event = repeatable(input.event);
|
|
38
|
+
const after = calendarDate(input.after);
|
|
39
|
+
const before = calendarDate(input.before);
|
|
4
40
|
const runAttempt = positiveInteger(input.runAttempt);
|
|
41
|
+
const tabValue = string(input.tab);
|
|
42
|
+
const tab = tabValue && TAB_VALUES.has(tabValue) ? tabValue : undefined;
|
|
43
|
+
const annotation = string(input.annotation);
|
|
44
|
+
const severityValue = string(input.severity);
|
|
45
|
+
const severity = severityValue && ANNOTATION_SEVERITY_VALUES.has(severityValue) ? severityValue : undefined;
|
|
5
46
|
return {
|
|
6
47
|
...search ? {
|
|
7
48
|
search
|
|
8
49
|
} : {},
|
|
9
|
-
...status
|
|
50
|
+
...status.length > 0 ? {
|
|
10
51
|
status
|
|
11
|
-
},
|
|
52
|
+
} : {},
|
|
53
|
+
...branch.length > 0 ? {
|
|
54
|
+
branch
|
|
55
|
+
} : {},
|
|
56
|
+
...actor.length > 0 ? {
|
|
57
|
+
actor
|
|
58
|
+
} : {},
|
|
59
|
+
...event.length > 0 ? {
|
|
60
|
+
event
|
|
61
|
+
} : {},
|
|
62
|
+
...after ? {
|
|
63
|
+
after
|
|
64
|
+
} : {},
|
|
65
|
+
...before ? {
|
|
66
|
+
before
|
|
67
|
+
} : {},
|
|
68
|
+
...tab ? {
|
|
69
|
+
tab
|
|
70
|
+
} : {},
|
|
71
|
+
...annotation ? {
|
|
72
|
+
annotation
|
|
73
|
+
} : {},
|
|
74
|
+
...severity ? {
|
|
75
|
+
severity
|
|
76
|
+
} : {},
|
|
12
77
|
...string(input.job) ? {
|
|
13
78
|
jobId: string(input.job)
|
|
14
79
|
} : {},
|
|
@@ -26,14 +91,43 @@ export function validateWorkflowRunsSearch(input) {
|
|
|
26
91
|
} : {}
|
|
27
92
|
};
|
|
28
93
|
}
|
|
29
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Writes the query string back.
|
|
96
|
+
*
|
|
97
|
+
* Array values reach the router as arrays and the app's `stringifySearch` expands each into
|
|
98
|
+
* repeated keys; joining them here would defeat that and break on branch names with commas.
|
|
99
|
+
*/ export function workflowRunSearchParams(search, selection = search) {
|
|
30
100
|
return {
|
|
31
101
|
...search.search ? {
|
|
32
102
|
search: search.search
|
|
33
103
|
} : {},
|
|
34
|
-
...search.status
|
|
104
|
+
...search.status?.length ? {
|
|
35
105
|
status: search.status
|
|
36
106
|
} : {},
|
|
107
|
+
...search.branch?.length ? {
|
|
108
|
+
branch: search.branch
|
|
109
|
+
} : {},
|
|
110
|
+
...search.actor?.length ? {
|
|
111
|
+
actor: search.actor
|
|
112
|
+
} : {},
|
|
113
|
+
...search.event?.length ? {
|
|
114
|
+
event: search.event
|
|
115
|
+
} : {},
|
|
116
|
+
...search.after ? {
|
|
117
|
+
after: search.after
|
|
118
|
+
} : {},
|
|
119
|
+
...search.before ? {
|
|
120
|
+
before: search.before
|
|
121
|
+
} : {},
|
|
122
|
+
...search.tab && search.tab !== 'summary' ? {
|
|
123
|
+
tab: search.tab
|
|
124
|
+
} : {},
|
|
125
|
+
...search.annotation ? {
|
|
126
|
+
annotation: search.annotation
|
|
127
|
+
} : {},
|
|
128
|
+
...search.severity ? {
|
|
129
|
+
severity: search.severity
|
|
130
|
+
} : {},
|
|
37
131
|
...selection.jobId ? {
|
|
38
132
|
job: selection.jobId
|
|
39
133
|
} : {},
|
|
@@ -51,20 +145,112 @@ export function workflowRunSearchParams(search, selection = search) {
|
|
|
51
145
|
} : {}
|
|
52
146
|
};
|
|
53
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* Resolves the detail surface for a URL. Explicit tabs win; legacy selection-only URLs belong
|
|
150
|
+
* to Jobs so their selected detail remains visible instead of silently landing on Summary.
|
|
151
|
+
*/ export function workflowRunTab(search) {
|
|
152
|
+
if (search.tab) return search.tab;
|
|
153
|
+
if (search.jobId || search.jobExecutionId || search.stepId || search.stepAttemptId) return 'jobs';
|
|
154
|
+
return 'summary';
|
|
155
|
+
}
|
|
156
|
+
/** Serializes only list filters when leaving a run detail page for the run list. */ export function workflowRunListSearchParams(search) {
|
|
157
|
+
const { tab: _tab, annotation: _annotation, severity: _severity, ...listSearch } = search;
|
|
158
|
+
return workflowRunSearchParams(listSearch, {});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Applies a filter change.
|
|
162
|
+
*
|
|
163
|
+
* A key present with `undefined`, an empty string, or an empty array clears that filter; a
|
|
164
|
+
* key left out is untouched. Cleared filters are deleted rather than stored empty, so "no
|
|
165
|
+
* filter" is one URL instead of several that render the same list.
|
|
166
|
+
*/ export function applyWorkflowRunFilterPatch(search, patch) {
|
|
167
|
+
const next = {
|
|
168
|
+
...search
|
|
169
|
+
};
|
|
170
|
+
if ('search' in patch) setOrDelete(next, 'search', patch.search || undefined);
|
|
171
|
+
if ('status' in patch) setOrDelete(next, 'status', nonEmptyList(patch.status));
|
|
172
|
+
if ('branch' in patch) setOrDelete(next, 'branch', nonEmptyList(patch.branch));
|
|
173
|
+
if ('actor' in patch) setOrDelete(next, 'actor', nonEmptyList(patch.actor));
|
|
174
|
+
if ('event' in patch) setOrDelete(next, 'event', nonEmptyList(patch.event));
|
|
175
|
+
if ('after' in patch) setOrDelete(next, 'after', patch.after || undefined);
|
|
176
|
+
if ('before' in patch) setOrDelete(next, 'before', patch.before || undefined);
|
|
177
|
+
return next;
|
|
178
|
+
}
|
|
179
|
+
/** Drops every filter while keeping the run-selection parameters the detail route owns. */ export function clearWorkflowRunFilters(search) {
|
|
180
|
+
return applyWorkflowRunFilterPatch(search, {
|
|
181
|
+
search: undefined,
|
|
182
|
+
status: undefined,
|
|
183
|
+
branch: undefined,
|
|
184
|
+
actor: undefined,
|
|
185
|
+
event: undefined,
|
|
186
|
+
after: undefined,
|
|
187
|
+
before: undefined
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
/** True when any list filter is active, which separates "no matches" from "no runs". */ export function hasWorkflowRunFilters(search) {
|
|
191
|
+
return Boolean(search.search || search.status?.length || search.branch?.length || search.actor?.length || search.event?.length || search.after || search.before);
|
|
192
|
+
}
|
|
54
193
|
export function workflowRouteParams(input) {
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
if (!
|
|
194
|
+
const workspaceSlug = string(input.workspaceSlug);
|
|
195
|
+
const projectSlug = string(input.projectSlug);
|
|
196
|
+
if (!workspaceSlug || !projectSlug) throw new Error('Workflow route is missing required path parameters.');
|
|
58
197
|
const workflowRunId = string(input.workflowRunId);
|
|
59
198
|
return workflowRunId ? {
|
|
60
|
-
|
|
61
|
-
|
|
199
|
+
workspaceSlug,
|
|
200
|
+
projectSlug,
|
|
62
201
|
workflowRunId
|
|
63
202
|
} : {
|
|
64
|
-
|
|
65
|
-
|
|
203
|
+
workspaceSlug,
|
|
204
|
+
projectSlug
|
|
66
205
|
};
|
|
67
206
|
}
|
|
207
|
+
function setOrDelete(target, key, value) {
|
|
208
|
+
if (value === undefined) delete target[key];
|
|
209
|
+
else target[key] = value;
|
|
210
|
+
}
|
|
211
|
+
function nonEmptyList(value) {
|
|
212
|
+
return value && value.length > 0 ? [
|
|
213
|
+
...value
|
|
214
|
+
] : undefined;
|
|
215
|
+
}
|
|
216
|
+
function isWorkflowRunListStatus(value) {
|
|
217
|
+
return STATUS_VALUES.has(value);
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Normalizes a repeatable parameter into a deduplicated list.
|
|
221
|
+
*
|
|
222
|
+
* A single occurrence parses as a scalar rather than a one-element array, and the parser
|
|
223
|
+
* coerces bare digits to numbers, so `?branch=2024` has to survive as the string `"2024"`.
|
|
224
|
+
*/ function repeatable(value) {
|
|
225
|
+
const values = Array.isArray(value) ? value : [
|
|
226
|
+
value
|
|
227
|
+
];
|
|
228
|
+
const normalized = values.flatMap((entry)=>{
|
|
229
|
+
if (typeof entry === 'string') return entry.length > 0 ? [
|
|
230
|
+
entry
|
|
231
|
+
] : [];
|
|
232
|
+
if (typeof entry === 'number' && Number.isFinite(entry)) return [
|
|
233
|
+
String(entry)
|
|
234
|
+
];
|
|
235
|
+
if (typeof entry === 'boolean') return [
|
|
236
|
+
String(entry)
|
|
237
|
+
];
|
|
238
|
+
return [];
|
|
239
|
+
});
|
|
240
|
+
return [
|
|
241
|
+
...new Set(normalized)
|
|
242
|
+
];
|
|
243
|
+
}
|
|
244
|
+
function calendarDate(value) {
|
|
245
|
+
if (typeof value !== 'string' || !CALENDAR_DATE_PATTERN.test(value)) return undefined;
|
|
246
|
+
// Rejects a well-shaped but impossible date such as 2026-02-31, which Date rolls forward.
|
|
247
|
+
// Parsed as UTC: whether `2026-05-01` is a real date does not depend on the reader's zone,
|
|
248
|
+
// and a local-time parse would reject a day the reader's zone skipped outright.
|
|
249
|
+
const [year, month, day] = value.split('-').map(Number);
|
|
250
|
+
const parsed = new Date(`${value}T00:00:00.000Z`);
|
|
251
|
+
const isRealDate = !Number.isNaN(parsed.getTime()) && parsed.getUTCFullYear() === year && parsed.getUTCMonth() === month - 1 && parsed.getUTCDate() === day;
|
|
252
|
+
return isRealDate ? value : undefined;
|
|
253
|
+
}
|
|
68
254
|
function string(value) {
|
|
69
255
|
return typeof value === 'string' && value.length > 0 ? value : undefined;
|
|
70
256
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/routes/inputs.ts"],"sourcesContent":["import type {WorkflowRunListStatusFilter} from '#components/workflow-run-list/types.js';\nimport type {WorkflowRunSelectionInput} from '#core/workflow-run-url-state.js';\n\nexport interface WorkflowRunsSearch extends WorkflowRunSelectionInput {\n search?: string;\n status?: WorkflowRunListStatusFilter;\n}\n\nexport function validateWorkflowRunsSearch(input: Record<string, unknown>): WorkflowRunsSearch {\n const search = string(input.search);\n const status = input.status === 'failed' || input.status === 'running' ? input.status : 'all';\n const runAttempt = positiveInteger(input.runAttempt);\n return {\n ...(search ? {search} : {}),\n ...(status === 'all' ? {} : {status}),\n ...(string(input.job) ? {jobId: string(input.job)} : {}),\n ...(string(input.jobExecution) ? {jobExecutionId: string(input.jobExecution)} : {}),\n ...(string(input.step) ? {stepId: string(input.step)} : {}),\n ...(string(input.stepAttempt) ? {stepAttemptId: string(input.stepAttempt)} : {}),\n ...(runAttempt ? {runAttempt} : {}),\n };\n}\n\nexport function workflowRunSearchParams(\n search: WorkflowRunsSearch,\n selection: WorkflowRunSelectionInput = search,\n) {\n return {\n ...(search.search ? {search: search.search} : {}),\n ...(search.status && search.status !== 'all' ? {status: search.status} : {}),\n ...(selection.jobId ? {job: selection.jobId} : {}),\n ...(selection.jobExecutionId ? {jobExecution: selection.jobExecutionId} : {}),\n ...(selection.stepId ? {step: selection.stepId} : {}),\n ...(selection.stepAttemptId ? {stepAttempt: selection.stepAttemptId} : {}),\n ...(selection.runAttempt ? {runAttempt: String(selection.runAttempt)} : {}),\n };\n}\n\nexport function workflowRouteParams(input: Record<string, unknown>): {\n wid: string;\n pid: string;\n workflowRunId?: string;\n} {\n const wid = string(input.wid);\n const pid = string(input.pid);\n if (!wid || !pid) throw new Error('Workflow route is missing required path parameters.');\n const workflowRunId = string(input.workflowRunId);\n return workflowRunId ? {wid, pid, workflowRunId} : {wid, pid};\n}\n\nfunction string(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\n\nfunction positiveInteger(value: unknown): number | undefined {\n const number = typeof value === 'string' ? Number(value) : value;\n return typeof number === 'number' && Number.isInteger(number) && number > 0 ? number : undefined;\n}\n"],"names":["validateWorkflowRunsSearch","input","search","string","status","runAttempt","positiveInteger","job","jobId","jobExecution","jobExecutionId","step","stepId","stepAttempt","stepAttemptId","workflowRunSearchParams","selection","String","workflowRouteParams","wid","pid","Error","workflowRunId","value","length","undefined","number","Number","isInteger"],"mappings":"AAQA,OAAO,SAASA,2BAA2BC,KAA8B;IACvE,MAAMC,SAASC,OAAOF,MAAMC,MAAM;IAClC,MAAME,SAASH,MAAMG,MAAM,KAAK,YAAYH,MAAMG,MAAM,KAAK,YAAYH,MAAMG,MAAM,GAAG;IACxF,MAAMC,aAAaC,gBAAgBL,MAAMI,UAAU;IACnD,OAAO;QACL,GAAIH,SAAS;YAACA;QAAM,IAAI,CAAC,CAAC;QAC1B,GAAIE,WAAW,QAAQ,CAAC,IAAI;YAACA;QAAM,CAAC;QACpC,GAAID,OAAOF,MAAMM,GAAG,IAAI;YAACC,OAAOL,OAAOF,MAAMM,GAAG;QAAC,IAAI,CAAC,CAAC;QACvD,GAAIJ,OAAOF,MAAMQ,YAAY,IAAI;YAACC,gBAAgBP,OAAOF,MAAMQ,YAAY;QAAC,IAAI,CAAC,CAAC;QAClF,GAAIN,OAAOF,MAAMU,IAAI,IAAI;YAACC,QAAQT,OAAOF,MAAMU,IAAI;QAAC,IAAI,CAAC,CAAC;QAC1D,GAAIR,OAAOF,MAAMY,WAAW,IAAI;YAACC,eAAeX,OAAOF,MAAMY,WAAW;QAAC,IAAI,CAAC,CAAC;QAC/E,GAAIR,aAAa;YAACA;QAAU,IAAI,CAAC,CAAC;IACpC;AACF;AAEA,OAAO,SAASU,wBACdb,MAA0B,EAC1Bc,YAAuCd,MAAM;IAE7C,OAAO;QACL,GAAIA,OAAOA,MAAM,GAAG;YAACA,QAAQA,OAAOA,MAAM;QAAA,IA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run-url-state.js';\n\n/**\n * Statuses the run list can filter by. Absent means all; there is deliberately no `all`\n * value, so \"no filter\" and \"every filter\" are the same URL rather than two.\n */\nexport const WORKFLOW_RUN_LIST_STATUSES = ['succeeded', 'failed', 'running', 'cancelled'] as const;\n\nexport type WorkflowRunListStatus = (typeof WORKFLOW_RUN_LIST_STATUSES)[number];\n\nexport const WORKFLOW_RUN_TABS = ['summary', 'jobs', 'annotations', 'source'] as const;\n\nexport type WorkflowRunTab = (typeof WORKFLOW_RUN_TABS)[number];\n\nexport const WORKFLOW_RUN_ANNOTATION_SEVERITIES = ['error', 'warning', 'info', 'success'] as const;\n\nexport type WorkflowRunAnnotationSeverity = (typeof WORKFLOW_RUN_ANNOTATION_SEVERITIES)[number];\n\nexport interface WorkflowRunsSearch extends WorkflowRunSelectionInput {\n search?: string;\n status?: WorkflowRunListStatus[];\n branch?: string[];\n actor?: string[];\n event?: string[];\n /** Inclusive lower bound on the run's local calendar date, `YYYY-MM-DD`. */\n after?: string;\n /** Inclusive upper bound on the run's local calendar date, `YYYY-MM-DD`. */\n before?: string;\n tab?: WorkflowRunTab;\n annotation?: string;\n severity?: WorkflowRunAnnotationSeverity;\n}\n\nconst STATUS_VALUES = new Set<string>(WORKFLOW_RUN_LIST_STATUSES);\nconst TAB_VALUES = new Set<string>(WORKFLOW_RUN_TABS);\nconst ANNOTATION_SEVERITY_VALUES = new Set<string>(WORKFLOW_RUN_ANNOTATION_SEVERITIES);\nconst CALENDAR_DATE_PATTERN = /^\\d{4}-\\d{2}-\\d{2}$/u;\n\n/**\n * Reads the run list and run detail query string.\n *\n * Every value is dropped rather than rejected when it does not fit: a truncated or\n * hand-edited URL should degrade to a sensible page, never to an error screen. Unknown\n * parameters are ignored for the same reason.\n */\nexport function validateWorkflowRunsSearch(input: Record<string, unknown>): WorkflowRunsSearch {\n const search = string(input.search);\n const status = repeatable(input.status).filter(isWorkflowRunListStatus);\n const branch = repeatable(input.branch);\n const actor = repeatable(input.actor);\n const event = repeatable(input.event);\n const after = calendarDate(input.after);\n const before = calendarDate(input.before);\n const runAttempt = positiveInteger(input.runAttempt);\n const tabValue = string(input.tab);\n const tab = tabValue && TAB_VALUES.has(tabValue) ? (tabValue as WorkflowRunTab) : undefined;\n const annotation = string(input.annotation);\n const severityValue = string(input.severity);\n const severity =\n severityValue && ANNOTATION_SEVERITY_VALUES.has(severityValue)\n ? (severityValue as WorkflowRunAnnotationSeverity)\n : undefined;\n\n return {\n ...(search ? {search} : {}),\n ...(status.length > 0 ? {status} : {}),\n ...(branch.length > 0 ? {branch} : {}),\n ...(actor.length > 0 ? {actor} : {}),\n ...(event.length > 0 ? {event} : {}),\n ...(after ? {after} : {}),\n ...(before ? {before} : {}),\n ...(tab ? {tab} : {}),\n ...(annotation ? {annotation} : {}),\n ...(severity ? {severity} : {}),\n ...(string(input.job) ? {jobId: string(input.job)} : {}),\n ...(string(input.jobExecution) ? {jobExecutionId: string(input.jobExecution)} : {}),\n ...(string(input.step) ? {stepId: string(input.step)} : {}),\n ...(string(input.stepAttempt) ? {stepAttemptId: string(input.stepAttempt)} : {}),\n ...(runAttempt ? {runAttempt} : {}),\n };\n}\n\n/**\n * Writes the query string back.\n *\n * Array values reach the router as arrays and the app's `stringifySearch` expands each into\n * repeated keys; joining them here would defeat that and break on branch names with commas.\n */\nexport function workflowRunSearchParams(\n search: WorkflowRunsSearch,\n selection: WorkflowRunSelectionInput = search,\n) {\n return {\n ...(search.search ? {search: search.search} : {}),\n ...(search.status?.length ? {status: search.status} : {}),\n ...(search.branch?.length ? {branch: search.branch} : {}),\n ...(search.actor?.length ? {actor: search.actor} : {}),\n ...(search.event?.length ? {event: search.event} : {}),\n ...(search.after ? {after: search.after} : {}),\n ...(search.before ? {before: search.before} : {}),\n ...(search.tab && search.tab !== 'summary' ? {tab: search.tab} : {}),\n ...(search.annotation ? {annotation: search.annotation} : {}),\n ...(search.severity ? {severity: search.severity} : {}),\n ...(selection.jobId ? {job: selection.jobId} : {}),\n ...(selection.jobExecutionId ? {jobExecution: selection.jobExecutionId} : {}),\n ...(selection.stepId ? {step: selection.stepId} : {}),\n ...(selection.stepAttemptId ? {stepAttempt: selection.stepAttemptId} : {}),\n ...(selection.runAttempt ? {runAttempt: String(selection.runAttempt)} : {}),\n };\n}\n\n/**\n * Resolves the detail surface for a URL. Explicit tabs win; legacy selection-only URLs belong\n * to Jobs so their selected detail remains visible instead of silently landing on Summary.\n */\nexport function workflowRunTab(\n search: Pick<WorkflowRunsSearch, 'tab' | 'jobId' | 'jobExecutionId' | 'stepId' | 'stepAttemptId'>,\n): WorkflowRunTab {\n if (search.tab) return search.tab;\n if (search.jobId || search.jobExecutionId || search.stepId || search.stepAttemptId) return 'jobs';\n return 'summary';\n}\n\n/** Serializes only list filters when leaving a run detail page for the run list. */\nexport function workflowRunListSearchParams(search: WorkflowRunsSearch) {\n const {tab: _tab, annotation: _annotation, severity: _severity, ...listSearch} = search;\n return workflowRunSearchParams(listSearch, {});\n}\n\n/**\n * A filter change. Each member is explicitly optional-or-undefined so that \"present and\n * undefined\" (clear this filter) stays distinguishable from \"absent\" (leave it alone) under\n * `exactOptionalPropertyTypes`.\n */\nexport interface WorkflowRunFilterPatch {\n search?: string | undefined;\n status?: WorkflowRunListStatus[] | undefined;\n branch?: string[] | undefined;\n actor?: string[] | undefined;\n event?: string[] | undefined;\n after?: string | undefined;\n before?: string | undefined;\n}\n\n/**\n * Applies a filter change.\n *\n * A key present with `undefined`, an empty string, or an empty array clears that filter; a\n * key left out is untouched. Cleared filters are deleted rather than stored empty, so \"no\n * filter\" is one URL instead of several that render the same list.\n */\nexport function applyWorkflowRunFilterPatch(\n search: WorkflowRunsSearch,\n patch: WorkflowRunFilterPatch,\n): WorkflowRunsSearch {\n const next: WorkflowRunsSearch = {...search};\n if ('search' in patch) setOrDelete(next, 'search', patch.search || undefined);\n if ('status' in patch) setOrDelete(next, 'status', nonEmptyList(patch.status));\n if ('branch' in patch) setOrDelete(next, 'branch', nonEmptyList(patch.branch));\n if ('actor' in patch) setOrDelete(next, 'actor', nonEmptyList(patch.actor));\n if ('event' in patch) setOrDelete(next, 'event', nonEmptyList(patch.event));\n if ('after' in patch) setOrDelete(next, 'after', patch.after || undefined);\n if ('before' in patch) setOrDelete(next, 'before', patch.before || undefined);\n return next;\n}\n\n/** Drops every filter while keeping the run-selection parameters the detail route owns. */\nexport function clearWorkflowRunFilters(search: WorkflowRunsSearch): WorkflowRunsSearch {\n return applyWorkflowRunFilterPatch(search, {\n search: undefined,\n status: undefined,\n branch: undefined,\n actor: undefined,\n event: undefined,\n after: undefined,\n before: undefined,\n });\n}\n\n/** True when any list filter is active, which separates \"no matches\" from \"no runs\". */\nexport function hasWorkflowRunFilters(search: WorkflowRunsSearch): boolean {\n return Boolean(\n search.search ||\n search.status?.length ||\n search.branch?.length ||\n search.actor?.length ||\n search.event?.length ||\n search.after ||\n search.before,\n );\n}\n\nexport function workflowRouteParams(input: Record<string, unknown>): {\n workspaceSlug: string;\n projectSlug: string;\n workflowRunId?: string;\n} {\n const workspaceSlug = string(input.workspaceSlug);\n const projectSlug = string(input.projectSlug);\n if (!workspaceSlug || !projectSlug)\n throw new Error('Workflow route is missing required path parameters.');\n const workflowRunId = string(input.workflowRunId);\n return workflowRunId ? {workspaceSlug, projectSlug, workflowRunId} : {workspaceSlug, projectSlug};\n}\n\nfunction setOrDelete<TKey extends keyof WorkflowRunsSearch>(\n target: WorkflowRunsSearch,\n key: TKey,\n value: WorkflowRunsSearch[TKey] | undefined,\n): void {\n if (value === undefined) delete target[key];\n else target[key] = value;\n}\n\nfunction nonEmptyList<TValue>(value: readonly TValue[] | undefined): TValue[] | undefined {\n return value && value.length > 0 ? [...value] : undefined;\n}\n\nfunction isWorkflowRunListStatus(value: string): value is WorkflowRunListStatus {\n return STATUS_VALUES.has(value);\n}\n\n/**\n * Normalizes a repeatable parameter into a deduplicated list.\n *\n * A single occurrence parses as a scalar rather than a one-element array, and the parser\n * coerces bare digits to numbers, so `?branch=2024` has to survive as the string `\"2024\"`.\n */\nfunction repeatable(value: unknown): string[] {\n const values = Array.isArray(value) ? value : [value];\n const normalized = values.flatMap((entry) => {\n if (typeof entry === 'string') return entry.length > 0 ? [entry] : [];\n if (typeof entry === 'number' && Number.isFinite(entry)) return [String(entry)];\n if (typeof entry === 'boolean') return [String(entry)];\n return [];\n });\n return [...new Set(normalized)];\n}\n\nfunction calendarDate(value: unknown): string | undefined {\n if (typeof value !== 'string' || !CALENDAR_DATE_PATTERN.test(value)) return undefined;\n // Rejects a well-shaped but impossible date such as 2026-02-31, which Date rolls forward.\n // Parsed as UTC: whether `2026-05-01` is a real date does not depend on the reader's zone,\n // and a local-time parse would reject a day the reader's zone skipped outright.\n const [year, month, day] = value.split('-').map(Number) as [number, number, number];\n const parsed = new Date(`${value}T00:00:00.000Z`);\n const isRealDate =\n !Number.isNaN(parsed.getTime()) &&\n parsed.getUTCFullYear() === year &&\n parsed.getUTCMonth() === month - 1 &&\n parsed.getUTCDate() === day;\n return isRealDate ? value : undefined;\n}\n\nfunction string(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\n\nfunction positiveInteger(value: unknown): number | undefined {\n const number = typeof value === 'string' ? Number(value) : value;\n return typeof number === 'number' && Number.isInteger(number) && number > 0 ? number : undefined;\n}\n"],"names":["WORKFLOW_RUN_LIST_STATUSES","WORKFLOW_RUN_TABS","WORKFLOW_RUN_ANNOTATION_SEVERITIES","STATUS_VALUES","Set","TAB_VALUES","ANNOTATION_SEVERITY_VALUES","CALENDAR_DATE_PATTERN","validateWorkflowRunsSearch","input","search","string","status","repeatable","filter","isWorkflowRunListStatus","branch","actor","event","after","calendarDate","before","runAttempt","positiveInteger","tabValue","tab","has","undefined","annotation","severityValue","severity","length","job","jobId","jobExecution","jobExecutionId","step","stepId","stepAttempt","stepAttemptId","workflowRunSearchParams","selection","String","workflowRunTab","workflowRunListSearchParams","_tab","_annotation","_severity","listSearch","applyWorkflowRunFilterPatch","patch","next","setOrDelete","nonEmptyList","clearWorkflowRunFilters","hasWorkflowRunFilters","Boolean","workflowRouteParams","workspaceSlug","projectSlug","Error","workflowRunId","target","key","value","values","Array","isArray","normalized","flatMap","entry","Number","isFinite","test","year","month","day","split","map","parsed","Date","isRealDate","isNaN","getTime","getUTCFullYear","getUTCMonth","getUTCDate","number","isInteger"],"mappings":"AAEA;;;CAGC,GACD,OAAO,MAAMA,6BAA6B;IAAC;IAAa;IAAU;IAAW;CAAY,CAAU;AAInG,OAAO,MAAMC,oBAAoB;IAAC;IAAW;IAAQ;IAAe;CAAS,CAAU;AAIvF,OAAO,MAAMC,qCAAqC;IAAC;IAAS;IAAW;IAAQ;CAAU,CAAU;AAmBnG,MAAMC,gBAAgB,IAAIC,IAAYJ;AACtC,MAAMK,aAAa,IAAID,IAAYH;AACnC,MAAMK,6BAA6B,IAAIF,IAAYF;AACnD,MAAMK,wBAAwB;AAE9B;;;;;;CAMC,GACD,OAAO,SAASC,2BAA2BC,KAA8B;IACvE,MAAMC,SAASC,OAAOF,MAAMC,MAAM;IAClC,MAAME,SAASC,WAAWJ,MAAMG,MAAM,EAAEE,MAAM,CAACC;IAC/C,MAAMC,SAASH,WAAWJ,MAAMO,MAAM;IACtC,MAAMC,QAAQJ,WAAWJ,MAAMQ,KAAK;IACpC,MAAMC,QAAQL,WAAWJ,MAAMS,KAAK;IACpC,MAAMC,QAAQC,aAAaX,MAAMU,KAAK;IACtC,MAAME,SAASD,aAAaX,MAAMY,MAAM;IACxC,MAAMC,aAAaC,gBAAgBd,MAAMa,UAAU;IACnD,MAAME,WAAWb,OAAOF,MAAMgB,GAAG;IACjC,MAAMA,MAAMD,YAAYnB,WAAWqB,GAAG,CAACF,YAAaA,WAA8BG;IAClF,MAAMC,aAAajB,OAAOF,MAAMmB,UAAU;IAC1C,MAAMC,gBAAgBlB,OAAOF,MAAMqB,QAAQ;IAC3C,MAAMA,WACJD,iBAAiBvB,2BAA2BoB,GAAG,CAACG,iBAC3CA,gBACDF;IAEN,OAAO;QAC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AAO4B;SAAO;QAC/E,IAAI,OAAOA,UAAU,WAAW,OAAO;YAAC5B,OAAO4B;SAAO;QACtD,OAAO,EAAE;IACX;IACA,OAAO;WAAI,IAAIlE,IAAIgE;KAAY;AACjC;AAEA,SAAShD,aAAa4C,KAAc;IAClC,IAAI,OAAOA,UAAU,YAAY,CAACzD,sBAAsBkE,IAAI,CAACT,QAAQ,OAAOrC;IAC5E,0FAA0F;IAC1F,2FAA2F;IAC3F,gFAAgF;IAChF,MAAM,CAAC+C,MAAMC,OAAOC,IAAI,GAAGZ,MAAMa,KAAK,CAAC,KAAKC,GAAG,CAACP;IAChD,MAAMQ,SAAS,IAAIC,KAAK,GAAGhB,MAAM,cAAc,CAAC;IAChD,MAAMiB,aACJ,CAACV,OAAOW,KAAK,CAACH,OAAOI,OAAO,OAC5BJ,OAAOK,cAAc,OAAOV,QAC5BK,OAAOM,WAAW,OAAOV,QAAQ,KACjCI,OAAOO,UAAU,OAAOV;IAC1B,OAAOK,aAAajB,QAAQrC;AAC9B;AAEA,SAAShB,OAAOqD,KAAc;IAC5B,OAAO,OAAOA,UAAU,YAAYA,MAAMjC,MAAM,GAAG,IAAIiC,QAAQrC;AACjE;AAEA,SAASJ,gBAAgByC,KAAc;IACrC,MAAMuB,SAAS,OAAOvB,UAAU,WAAWO,OAAOP,SAASA;IAC3D,OAAO,OAAOuB,WAAW,YAAYhB,OAAOiB,SAAS,CAACD,WAAWA,SAAS,IAAIA,SAAS5D;AACzF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Project } from '@shipfox/client-projects';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export declare function ProjectRoute({ children }: {
|
|
4
|
+
children: (project: Project) => ReactNode;
|
|
5
|
+
}): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
6
|
+
//# sourceMappingURL=project-route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-route.d.ts","sourceRoot":"","sources":["../../src/routes/project-route.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,OAAO,EAA6B,MAAM,0BAA0B,CAAC;AAIlF,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAErC,wBAAgB,YAAY,CAAC,EAAC,QAAQ,EAAC,EAAE;IAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,SAAS,CAAA;CAAC,+TAkBnF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMaybeActiveProjectQuery } from '@shipfox/client-projects';
|
|
3
|
+
import { QueryLoadError } from '@shipfox/client-ui';
|
|
4
|
+
import { EmptyState } from '@shipfox/react-ui/empty-state';
|
|
5
|
+
import { FullPageLoader } from '@shipfox/react-ui/loader';
|
|
6
|
+
export function ProjectRoute({ children }) {
|
|
7
|
+
const projectQuery = useMaybeActiveProjectQuery();
|
|
8
|
+
if (projectQuery.isPending) return /*#__PURE__*/ _jsx(FullPageLoader, {});
|
|
9
|
+
if (projectQuery.isError && projectQuery.data === undefined) {
|
|
10
|
+
return /*#__PURE__*/ _jsx(QueryLoadError, {
|
|
11
|
+
query: projectQuery,
|
|
12
|
+
subject: "project"
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
if (!projectQuery.data) {
|
|
16
|
+
return /*#__PURE__*/ _jsx(EmptyState, {
|
|
17
|
+
icon: "errorWarningLine",
|
|
18
|
+
title: "Project not found",
|
|
19
|
+
description: "This project doesn't exist, or you don't have access to it."
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return children(projectQuery.data);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=project-route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/routes/project-route.tsx"],"sourcesContent":["import {type Project, useMaybeActiveProjectQuery} from '@shipfox/client-projects';\nimport {QueryLoadError} from '@shipfox/client-ui';\nimport {EmptyState} from '@shipfox/react-ui/empty-state';\nimport {FullPageLoader} from '@shipfox/react-ui/loader';\nimport type {ReactNode} from 'react';\n\nexport function ProjectRoute({children}: {children: (project: Project) => ReactNode}) {\n const projectQuery = useMaybeActiveProjectQuery();\n\n if (projectQuery.isPending) return <FullPageLoader />;\n if (projectQuery.isError && projectQuery.data === undefined) {\n return <QueryLoadError query={projectQuery} subject=\"project\" />;\n }\n if (!projectQuery.data) {\n return (\n <EmptyState\n icon=\"errorWarningLine\"\n title=\"Project not found\"\n description=\"This project doesn't exist, or you don't have access to it.\"\n />\n );\n }\n\n return children(projectQuery.data);\n}\n"],"names":["useMaybeActiveProjectQuery","QueryLoadError","EmptyState","FullPageLoader","ProjectRoute","children","projectQuery","isPending","isError","data","undefined","query","subject","icon","title","description"],"mappings":";AAAA,SAAsBA,0BAA0B,QAAO,2BAA2B;AAClF,SAAQC,cAAc,QAAO,qBAAqB;AAClD,SAAQC,UAAU,QAAO,gCAAgC;AACzD,SAAQC,cAAc,QAAO,2BAA2B;AAGxD,OAAO,SAASC,aAAa,EAACC,QAAQ,EAA8C;IAClF,MAAMC,eAAeN;IAErB,IAAIM,aAAaC,SAAS,EAAE,qBAAO,KAACJ;IACpC,IAAIG,aAAaE,OAAO,IAAIF,aAAaG,IAAI,KAAKC,WAAW;QAC3D,qBAAO,KAACT;YAAeU,OAAOL;YAAcM,SAAQ;;IACtD;IACA,IAAI,CAACN,aAAaG,IAAI,EAAE;QACtB,qBACE,KAACP;YACCW,MAAK;YACLC,OAAM;YACNC,aAAY;;IAGlB;IAEA,OAAOV,SAASC,aAAaG,IAAI;AACnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-detail.d.ts","sourceRoot":"","sources":["../../src/routes/run-detail.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,0BAA0B,EAAsB,MAAM,aAAa,CAAC;;;;;;;;
|
|
1
|
+
{"version":3,"file":"run-detail.d.ts","sourceRoot":"","sources":["../../src/routes/run-detail.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,0BAA0B,EAAsB,MAAM,aAAa,CAAC;;;;;;;;AAG5E,wBAoBG"}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { defineRoute, useRouteParams, useRouteSearch } from '@shipfox/client-shell/runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { WorkflowRunDetailPage } from '#pages/workflow-run-detail-page.js';
|
|
4
4
|
import { validateWorkflowRunsSearch, workflowRouteParams } from './inputs.js';
|
|
5
|
+
import { ProjectRoute } from './project-route.js';
|
|
5
6
|
export default defineRoute({
|
|
6
7
|
staticData: {
|
|
7
8
|
layout: 'full-bleed'
|
|
8
9
|
},
|
|
9
10
|
validateSearch: validateWorkflowRunsSearch,
|
|
10
11
|
component: ()=>{
|
|
11
|
-
const {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const { workspaceSlug, projectSlug, workflowRunId } = useRouteParams(workflowRouteParams);
|
|
13
|
+
const search = useRouteSearch(validateWorkflowRunsSearch);
|
|
14
|
+
return /*#__PURE__*/ _jsx(ProjectRoute, {
|
|
15
|
+
children: (project)=>/*#__PURE__*/ _jsx(WorkflowRunDetailPage, {
|
|
16
|
+
projectId: project.id,
|
|
17
|
+
workspaceSlug: workspaceSlug,
|
|
18
|
+
projectSlug: projectSlug,
|
|
19
|
+
workflowRunId: workflowRunId,
|
|
20
|
+
search: search
|
|
21
|
+
})
|
|
17
22
|
});
|
|
18
23
|
}
|
|
19
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/routes/run-detail.tsx"],"sourcesContent":["import {defineRoute, useRouteParams, useRouteSearch} from '@shipfox/client-shell/runtime';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/routes/run-detail.tsx"],"sourcesContent":["import {defineRoute, useRouteParams, useRouteSearch} from '@shipfox/client-shell/runtime';\nimport {WorkflowRunDetailPage} from '#pages/workflow-run-detail-page.js';\nimport {validateWorkflowRunsSearch, workflowRouteParams} from './inputs.js';\nimport {ProjectRoute} from './project-route.js';\n\nexport default defineRoute({\n staticData: {layout: 'full-bleed'},\n validateSearch: validateWorkflowRunsSearch,\n component: () => {\n const {workspaceSlug, projectSlug, workflowRunId} = useRouteParams(workflowRouteParams);\n const search = useRouteSearch(validateWorkflowRunsSearch);\n return (\n <ProjectRoute>\n {(project) => (\n <WorkflowRunDetailPage\n projectId={project.id}\n workspaceSlug={workspaceSlug}\n projectSlug={projectSlug}\n workflowRunId={workflowRunId}\n search={search}\n />\n )}\n </ProjectRoute>\n );\n },\n});\n"],"names":["defineRoute","useRouteParams","useRouteSearch","WorkflowRunDetailPage","validateWorkflowRunsSearch","workflowRouteParams","ProjectRoute","staticData","layout","validateSearch","component","workspaceSlug","projectSlug","workflowRunId","search","project","projectId","id"],"mappings":";AAAA,SAAQA,WAAW,EAAEC,cAAc,EAAEC,cAAc,QAAO,gCAAgC;AAC1F,SAAQC,qBAAqB,QAAO,qCAAqC;AACzE,SAAQC,0BAA0B,EAAEC,mBAAmB,QAAO,cAAc;AAC5E,SAAQC,YAAY,QAAO,qBAAqB;AAEhD,eAAeN,YAAY;IACzBO,YAAY;QAACC,QAAQ;IAAY;IACjCC,gBAAgBL;IAChBM,WAAW;QACT,MAAM,EAACC,aAAa,EAAEC,WAAW,EAAEC,aAAa,EAAC,GAAGZ,eAAeI;QACnE,MAAMS,SAASZ,eAAeE;QAC9B,qBACE,KAACE;sBACE,CAACS,wBACA,KAACZ;oBACCa,WAAWD,QAAQE,EAAE;oBACrBN,eAAeA;oBACfC,aAAaA;oBACbC,eAAeA;oBACfC,QAAQA;;;IAKlB;AACF,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/routes/runs.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,0BAA0B,EAAsB,MAAM,aAAa,CAAC;;;;;;;;
|
|
1
|
+
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/routes/runs.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,0BAA0B,EAAsB,MAAM,aAAa,CAAC;;;;;;;;AAG5E,wBAmBG"}
|
package/dist/routes/runs.js
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { defineRoute, useRouteParams, useRouteSearch } from '@shipfox/client-shell/runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { WorkflowRunsPage } from '#pages/workflow-run-list-page.js';
|
|
4
4
|
import { validateWorkflowRunsSearch, workflowRouteParams } from './inputs.js';
|
|
5
|
+
import { ProjectRoute } from './project-route.js';
|
|
5
6
|
export default defineRoute({
|
|
6
7
|
staticData: {
|
|
7
8
|
layout: 'full-bleed'
|
|
8
9
|
},
|
|
9
10
|
validateSearch: validateWorkflowRunsSearch,
|
|
10
11
|
component: ()=>{
|
|
11
|
-
const {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const { workspaceSlug, projectSlug } = useRouteParams(workflowRouteParams);
|
|
13
|
+
const search = useRouteSearch(validateWorkflowRunsSearch);
|
|
14
|
+
return /*#__PURE__*/ _jsx(ProjectRoute, {
|
|
15
|
+
children: (project)=>/*#__PURE__*/ _jsx(WorkflowRunsPage, {
|
|
16
|
+
projectId: project.id,
|
|
17
|
+
workspaceSlug: workspaceSlug,
|
|
18
|
+
projectSlug: projectSlug,
|
|
19
|
+
search: search
|
|
20
|
+
})
|
|
16
21
|
});
|
|
17
22
|
}
|
|
18
23
|
});
|
package/dist/routes/runs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/routes/runs.tsx"],"sourcesContent":["import {defineRoute, useRouteParams, useRouteSearch} from '@shipfox/client-shell/runtime';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/routes/runs.tsx"],"sourcesContent":["import {defineRoute, useRouteParams, useRouteSearch} from '@shipfox/client-shell/runtime';\nimport {WorkflowRunsPage} from '#pages/workflow-run-list-page.js';\nimport {validateWorkflowRunsSearch, workflowRouteParams} from './inputs.js';\nimport {ProjectRoute} from './project-route.js';\n\nexport default defineRoute({\n staticData: {layout: 'full-bleed'},\n validateSearch: validateWorkflowRunsSearch,\n component: () => {\n const {workspaceSlug, projectSlug} = useRouteParams(workflowRouteParams);\n const search = useRouteSearch(validateWorkflowRunsSearch);\n return (\n <ProjectRoute>\n {(project) => (\n <WorkflowRunsPage\n projectId={project.id}\n workspaceSlug={workspaceSlug}\n projectSlug={projectSlug}\n search={search}\n />\n )}\n </ProjectRoute>\n );\n },\n});\n"],"names":["defineRoute","useRouteParams","useRouteSearch","WorkflowRunsPage","validateWorkflowRunsSearch","workflowRouteParams","ProjectRoute","staticData","layout","validateSearch","component","workspaceSlug","projectSlug","search","project","projectId","id"],"mappings":";AAAA,SAAQA,WAAW,EAAEC,cAAc,EAAEC,cAAc,QAAO,gCAAgC;AAC1F,SAAQC,gBAAgB,QAAO,mCAAmC;AAClE,SAAQC,0BAA0B,EAAEC,mBAAmB,QAAO,cAAc;AAC5E,SAAQC,YAAY,QAAO,qBAAqB;AAEhD,eAAeN,YAAY;IACzBO,YAAY;QAACC,QAAQ;IAAY;IACjCC,gBAAgBL;IAChBM,WAAW;QACT,MAAM,EAACC,aAAa,EAAEC,WAAW,EAAC,GAAGX,eAAeI;QACpD,MAAMQ,SAASX,eAAeE;QAC9B,qBACE,KAACE;sBACE,CAACQ,wBACA,KAACX;oBACCY,WAAWD,QAAQE,EAAE;oBACrBL,eAAeA;oBACfC,aAAaA;oBACbC,QAAQA;;;IAKlB;AACF,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/routes/workflows.tsx"],"names":[],"mappings":";;;AAIA,
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/routes/workflows.tsx"],"names":[],"mappings":";;;AAIA,wBAMG"}
|