@ucdjs/pipelines-ui 0.0.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -0
  3. package/dist/components/detail/execution-result.d.mts +49 -0
  4. package/dist/components/detail/execution-result.mjs +366 -0
  5. package/dist/components/detail/version-selector.d.mts +21 -0
  6. package/dist/components/detail/version-selector.mjs +132 -0
  7. package/dist/components/graph/details.d.mts +14 -0
  8. package/dist/components/graph/details.mjs +369 -0
  9. package/dist/components/graph/filters.d.mts +14 -0
  10. package/dist/components/graph/filters.mjs +183 -0
  11. package/dist/components/graph/node-types.d.mts +10 -0
  12. package/dist/components/graph/node-types.mjs +13 -0
  13. package/dist/components/graph/nodes.d.mts +14 -0
  14. package/dist/components/graph/nodes.mjs +264 -0
  15. package/dist/components/graph/pipeline-graph.d.mts +15 -0
  16. package/dist/components/graph/pipeline-graph.mjs +241 -0
  17. package/dist/components/logs/execution-log-payload.d.mts +12 -0
  18. package/dist/components/logs/execution-log-payload.mjs +79 -0
  19. package/dist/components/logs/execution-log-table.d.mts +16 -0
  20. package/dist/components/logs/execution-log-table.mjs +121 -0
  21. package/dist/components/logs/execution-span-drawer.d.mts +16 -0
  22. package/dist/components/logs/execution-span-drawer.mjs +208 -0
  23. package/dist/components/logs/execution-waterfall.d.mts +18 -0
  24. package/dist/components/logs/execution-waterfall.mjs +354 -0
  25. package/dist/components/pipeline-sidebar.d.mts +6 -0
  26. package/dist/components/pipeline-sidebar.mjs +190 -0
  27. package/dist/components/status-badge.d.mts +11 -0
  28. package/dist/components/status-badge.mjs +50 -0
  29. package/dist/components/status-icon.d.mts +11 -0
  30. package/dist/components/status-icon.mjs +46 -0
  31. package/dist/hooks/index.d.mts +7 -0
  32. package/dist/hooks/index.mjs +8 -0
  33. package/dist/hooks/use-event-view.d.mts +19 -0
  34. package/dist/hooks/use-event-view.mjs +112 -0
  35. package/dist/hooks/use-execute.d.mts +20 -0
  36. package/dist/hooks/use-execute.mjs +68 -0
  37. package/dist/hooks/use-pipeline-file.d.mts +20 -0
  38. package/dist/hooks/use-pipeline-file.mjs +39 -0
  39. package/dist/hooks/use-pipeline-versions.d.mts +10 -0
  40. package/dist/hooks/use-pipeline-versions.mjs +137 -0
  41. package/dist/hooks/use-pipeline.d.mts +21 -0
  42. package/dist/hooks/use-pipeline.mjs +46 -0
  43. package/dist/hooks/use-pipelines.d.mts +26 -0
  44. package/dist/hooks/use-pipelines.mjs +38 -0
  45. package/dist/index.d.mts +31 -0
  46. package/dist/index.mjs +29 -0
  47. package/dist/lib/adapter.d.mts +26 -0
  48. package/dist/lib/adapter.mjs +74 -0
  49. package/dist/lib/colors.d.mts +7 -0
  50. package/dist/lib/colors.mjs +15 -0
  51. package/dist/lib/execution-logs.d.mts +19 -0
  52. package/dist/lib/execution-logs.mjs +74 -0
  53. package/dist/lib/format-time.d.mts +4 -0
  54. package/dist/lib/format-time.mjs +7 -0
  55. package/dist/lib/index.d.mts +5 -0
  56. package/dist/lib/index.mjs +6 -0
  57. package/dist/lib/layout.d.mts +8 -0
  58. package/dist/lib/layout.mjs +71 -0
  59. package/dist/lib/pipeline-utils.d.mts +9 -0
  60. package/dist/lib/pipeline-utils.mjs +49 -0
  61. package/dist/lib/utils.d.mts +6 -0
  62. package/dist/lib/utils.mjs +10 -0
  63. package/dist/styles/globals.css +3 -0
  64. package/dist/types.d.mts +143 -0
  65. package/package.json +95 -0
@@ -0,0 +1,74 @@
1
+ //#region src/lib/adapter.ts
2
+ function getNodeLabel(node) {
3
+ switch (node.type) {
4
+ case "source": return `v${node.version}`;
5
+ case "file": return node.file.name;
6
+ case "route": return node.routeId;
7
+ case "artifact": return node.artifactId;
8
+ case "output": return node.property ? `Output[${node.outputIndex}].${node.property}` : `Output[${node.outputIndex}]`;
9
+ }
10
+ }
11
+ function getEdgeStyle(edgeType) {
12
+ const baseStyle = { strokeWidth: 2 };
13
+ switch (edgeType) {
14
+ case "provides": return { style: {
15
+ ...baseStyle,
16
+ stroke: "#6366f1"
17
+ } };
18
+ case "matched": return { style: {
19
+ ...baseStyle,
20
+ stroke: "#22c55e"
21
+ } };
22
+ case "parsed": return { style: {
23
+ ...baseStyle,
24
+ stroke: "#f59e0b"
25
+ } };
26
+ case "resolved": return { style: {
27
+ ...baseStyle,
28
+ stroke: "#3b82f6"
29
+ } };
30
+ case "uses-artifact": return {
31
+ style: {
32
+ ...baseStyle,
33
+ stroke: "#8b5cf6"
34
+ },
35
+ animated: true
36
+ };
37
+ default: return { style: baseStyle };
38
+ }
39
+ }
40
+ function pipelineGraphToFlow(graph) {
41
+ return {
42
+ nodes: graph.nodes.map((node) => ({
43
+ id: node.id,
44
+ type: node.type,
45
+ position: {
46
+ x: 0,
47
+ y: 0
48
+ },
49
+ data: {
50
+ pipelineNode: node,
51
+ label: getNodeLabel(node)
52
+ }
53
+ })),
54
+ edges: graph.edges.map((edge, index) => ({
55
+ id: `edge-${index}-${edge.from}-${edge.to}`,
56
+ source: edge.from,
57
+ target: edge.to,
58
+ label: edge.type,
59
+ ...getEdgeStyle(edge.type),
60
+ data: { pipelineEdge: edge }
61
+ }))
62
+ };
63
+ }
64
+ function filterNodesByType(nodes, edges, visibleTypes) {
65
+ const filteredNodes = nodes.filter((node) => visibleTypes.has(node.type));
66
+ const filteredNodeIds = new Set(filteredNodes.map((n) => n.id));
67
+ return {
68
+ nodes: filteredNodes,
69
+ edges: edges.filter((edge) => filteredNodeIds.has(edge.source) && filteredNodeIds.has(edge.target))
70
+ };
71
+ }
72
+
73
+ //#endregion
74
+ export { filterNodesByType, pipelineGraphToFlow };
@@ -0,0 +1,7 @@
1
+ //#region src/lib/colors.d.ts
2
+ declare const nodeTypeColors: Record<string, string>;
3
+ declare function getNodeColor(node: {
4
+ type?: string;
5
+ }): string;
6
+ //#endregion
7
+ export { getNodeColor, nodeTypeColors };
@@ -0,0 +1,15 @@
1
+ //#region src/lib/colors.ts
2
+ const nodeTypeColors = {
3
+ source: "#6366f1",
4
+ file: "#10b981",
5
+ route: "#f59e0b",
6
+ artifact: "#8b5cf6",
7
+ output: "#0ea5e9",
8
+ default: "#6b7280"
9
+ };
10
+ function getNodeColor(node) {
11
+ return nodeTypeColors[node.type ?? ""] ?? nodeTypeColors.default ?? "#6b7280";
12
+ }
13
+
14
+ //#endregion
15
+ export { getNodeColor, nodeTypeColors };
@@ -0,0 +1,19 @@
1
+ import { PipelineEvent } from "@ucdjs/pipelines-core";
2
+
3
+ //#region src/lib/execution-logs.d.ts
4
+ interface ExecutionSpan {
5
+ spanId: string;
6
+ label: string;
7
+ start: number;
8
+ end: number;
9
+ durationMs: number;
10
+ phase: string;
11
+ isError?: boolean;
12
+ }
13
+ declare function formatDuration(ms: number): string;
14
+ declare function formatTimeLabel(timestamp: string): string;
15
+ declare function formatTimestamp(timestamp: string): string;
16
+ declare function formatBytes(value: number | null): string;
17
+ declare function buildExecutionSpans(events: PipelineEvent[]): ExecutionSpan[];
18
+ //#endregion
19
+ export { ExecutionSpan, buildExecutionSpans, formatBytes, formatDuration, formatTimeLabel, formatTimestamp };
@@ -0,0 +1,74 @@
1
+ //#region src/lib/execution-logs.ts
2
+ function formatDuration(ms) {
3
+ if (ms >= 1e3) return `${(ms / 1e3).toFixed(2)}s`;
4
+ if (ms >= 1) return `${ms.toFixed(1)}ms`;
5
+ return `${(ms * 1e3).toFixed(0)}μs`;
6
+ }
7
+ function formatTimeLabel(timestamp) {
8
+ return new Date(timestamp).toLocaleTimeString();
9
+ }
10
+ function formatTimestamp(timestamp) {
11
+ const date = new Date(timestamp);
12
+ return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")} ${String(date.getHours()).padStart(2, "0")}:${String(date.getMinutes()).padStart(2, "0")}:${String(date.getSeconds()).padStart(2, "0")}.${String(date.getMilliseconds()).padStart(3, "0")} ${Intl.DateTimeFormat().resolvedOptions().timeZone}`;
13
+ }
14
+ function formatBytes(value) {
15
+ if (!value) return "0B";
16
+ if (value < 1024) return `${value}B`;
17
+ if (value < 1024 * 1024) return `${(value / 1024).toFixed(1)}KB`;
18
+ return `${(value / (1024 * 1024)).toFixed(1)}MB`;
19
+ }
20
+ function buildSpanLabel(event) {
21
+ if ("version" in event && event.version) return `${event.type} v${event.version}`;
22
+ if ("routeId" in event && event.routeId) return `${event.type} ${event.routeId}`;
23
+ if ("artifactId" in event && event.artifactId) return `${event.type} ${event.artifactId}`;
24
+ if ("file" in event && event.file) return `${event.type} ${event.file.name}`;
25
+ return event.type;
26
+ }
27
+ function buildSpanPhase(type) {
28
+ if (type.startsWith("pipeline:")) return "Pipeline";
29
+ if (type.startsWith("version:")) return "Version";
30
+ if (type.startsWith("parse:")) return "Parse";
31
+ if (type.startsWith("resolve:")) return "Resolve";
32
+ if (type.startsWith("artifact:")) return "Artifact";
33
+ if (type.startsWith("file:")) return "File";
34
+ if (type.startsWith("cache:")) return "Cache";
35
+ return "Other";
36
+ }
37
+ function buildExecutionSpans(events) {
38
+ const startMap = /* @__PURE__ */ new Map();
39
+ const spans = [];
40
+ const sorted = [...events].sort((a, b) => a.timestamp - b.timestamp);
41
+ for (const event of sorted) {
42
+ if (event.type.endsWith(":start")) {
43
+ startMap.set(event.spanId, event);
44
+ continue;
45
+ }
46
+ if (event.type.endsWith(":end")) {
47
+ const startEvent = startMap.get(event.spanId);
48
+ if (!startEvent) continue;
49
+ const durationMs = "durationMs" in event && typeof event.durationMs === "number" ? event.durationMs : Math.max(0, event.timestamp - startEvent.timestamp);
50
+ spans.push({
51
+ spanId: event.spanId,
52
+ label: buildSpanLabel(startEvent),
53
+ start: startEvent.timestamp,
54
+ end: event.timestamp,
55
+ durationMs,
56
+ phase: buildSpanPhase(startEvent.type)
57
+ });
58
+ startMap.delete(event.spanId);
59
+ }
60
+ if (event.type === "error") spans.push({
61
+ spanId: event.spanId,
62
+ label: buildSpanLabel(event),
63
+ start: event.timestamp,
64
+ end: event.timestamp + 1,
65
+ durationMs: 0,
66
+ phase: "Error",
67
+ isError: true
68
+ });
69
+ }
70
+ return spans.sort((a, b) => a.start - b.start);
71
+ }
72
+
73
+ //#endregion
74
+ export { buildExecutionSpans, formatBytes, formatDuration, formatTimeLabel, formatTimestamp };
@@ -0,0 +1,4 @@
1
+ //#region src/lib/format-time.d.ts
2
+ declare function formatHighPrecisionTime(ms: number): string;
3
+ //#endregion
4
+ export { formatHighPrecisionTime };
@@ -0,0 +1,7 @@
1
+ //#region src/lib/format-time.ts
2
+ function formatHighPrecisionTime(ms) {
3
+ return `${Math.floor(ms / 1e3)}.${(ms % 1e3).toFixed(3).padStart(6, "0")}s`;
4
+ }
5
+
6
+ //#endregion
7
+ export { formatHighPrecisionTime };
@@ -0,0 +1,5 @@
1
+ import { PipelineFlowEdge, PipelineFlowNode, filterNodesByType, pipelineGraphToFlow } from "./adapter.mjs";
2
+ import { getNodeColor, nodeTypeColors } from "./colors.mjs";
3
+ import { NODE_HEIGHT, NODE_WIDTH, applyLayout } from "./layout.mjs";
4
+ import { cn } from "./utils.mjs";
5
+ export { NODE_HEIGHT, NODE_WIDTH, type PipelineFlowEdge, type PipelineFlowNode, applyLayout, cn, filterNodesByType, getNodeColor, nodeTypeColors, pipelineGraphToFlow };
@@ -0,0 +1,6 @@
1
+ import { cn } from "./utils.mjs";
2
+ import { filterNodesByType, pipelineGraphToFlow } from "./adapter.mjs";
3
+ import { getNodeColor, nodeTypeColors } from "./colors.mjs";
4
+ import { NODE_HEIGHT, NODE_WIDTH, applyLayout } from "./layout.mjs";
5
+
6
+ export { NODE_HEIGHT, NODE_WIDTH, applyLayout, cn, filterNodesByType, getNodeColor, nodeTypeColors, pipelineGraphToFlow };
@@ -0,0 +1,8 @@
1
+ import { PipelineFlowEdge, PipelineFlowNode } from "./adapter.mjs";
2
+
3
+ //#region src/lib/layout.d.ts
4
+ declare const NODE_WIDTH = 180;
5
+ declare const NODE_HEIGHT = 60;
6
+ declare function applyLayout(nodes: PipelineFlowNode[], edges: PipelineFlowEdge[]): PipelineFlowNode[];
7
+ //#endregion
8
+ export { NODE_HEIGHT, NODE_WIDTH, applyLayout };
@@ -0,0 +1,71 @@
1
+ //#region src/lib/layout.ts
2
+ const NODE_WIDTH = 180;
3
+ const NODE_HEIGHT = 60;
4
+ const HORIZONTAL_GAP = 80;
5
+ const VERTICAL_GAP = 40;
6
+ function applyLayout(nodes, edges) {
7
+ if (nodes.length === 0) return nodes;
8
+ const incomingEdges = /* @__PURE__ */ new Map();
9
+ const outgoingEdges = /* @__PURE__ */ new Map();
10
+ for (const node of nodes) {
11
+ incomingEdges.set(node.id, /* @__PURE__ */ new Set());
12
+ outgoingEdges.set(node.id, /* @__PURE__ */ new Set());
13
+ }
14
+ const nodeIds = new Set(nodes.map((n) => n.id));
15
+ for (const edge of edges) if (nodeIds.has(edge.source) && nodeIds.has(edge.target)) {
16
+ incomingEdges.get(edge.target)?.add(edge.source);
17
+ outgoingEdges.get(edge.source)?.add(edge.target);
18
+ }
19
+ const layers = /* @__PURE__ */ new Map();
20
+ const rootNodes = nodes.filter((n) => incomingEdges.get(n.id)?.size === 0);
21
+ const firstNode = nodes[0];
22
+ const queue = rootNodes.length > 0 ? rootNodes.map((n) => ({
23
+ id: n.id,
24
+ layer: 0
25
+ })) : firstNode ? [{
26
+ id: firstNode.id,
27
+ layer: 0
28
+ }] : [];
29
+ while (queue.length > 0) {
30
+ const item = queue.shift();
31
+ if (!item) continue;
32
+ const { id, layer } = item;
33
+ if (!layers.has(id) || layers.get(id) < layer) {
34
+ layers.set(id, layer);
35
+ for (const childId of outgoingEdges.get(id) || []) queue.push({
36
+ id: childId,
37
+ layer: layer + 1
38
+ });
39
+ }
40
+ }
41
+ for (const node of nodes) if (!layers.has(node.id)) layers.set(node.id, 0);
42
+ const layerGroups = /* @__PURE__ */ new Map();
43
+ for (const node of nodes) {
44
+ const layer = layers.get(node.id) ?? 0;
45
+ if (!layerGroups.has(layer)) layerGroups.set(layer, []);
46
+ layerGroups.get(layer).push(node);
47
+ }
48
+ const sortedLayers = Array.from(layerGroups.entries()).sort((a, b) => a[0] - b[0]);
49
+ const positionedNodes = /* @__PURE__ */ new Map();
50
+ for (const [layerIndex, layerNodes] of sortedLayers) {
51
+ const x = layerIndex * (NODE_WIDTH + HORIZONTAL_GAP);
52
+ const startY = -(layerNodes.length * (NODE_HEIGHT + VERTICAL_GAP) - VERTICAL_GAP) / 2;
53
+ for (let i = 0; i < layerNodes.length; i++) {
54
+ const node = layerNodes[i];
55
+ if (!node) continue;
56
+ const y = startY + i * (NODE_HEIGHT + VERTICAL_GAP);
57
+ const positionedNode = {
58
+ ...node,
59
+ position: {
60
+ x,
61
+ y
62
+ }
63
+ };
64
+ positionedNodes.set(node.id, positionedNode);
65
+ }
66
+ }
67
+ return nodes.map((n) => positionedNodes.get(n.id) ?? n);
68
+ }
69
+
70
+ //#endregion
71
+ export { NODE_HEIGHT, NODE_WIDTH, applyLayout };
@@ -0,0 +1,9 @@
1
+ import { PipelineDetails, PipelineInfo } from "../types.mjs";
2
+ import { PipelineDefinition, PipelineRouteDefinition } from "@ucdjs/pipelines-core";
3
+
4
+ //#region src/lib/pipeline-utils.d.ts
5
+ declare function toPipelineInfo(pipeline: PipelineDefinition): PipelineInfo;
6
+ declare function toPipelineDetails(pipeline: PipelineDefinition): PipelineDetails;
7
+ declare function toRouteDetails(route: PipelineRouteDefinition): PipelineDetails["routes"][number];
8
+ //#endregion
9
+ export { toPipelineDetails, toPipelineInfo, toRouteDetails };
@@ -0,0 +1,49 @@
1
+ import { parseDependency } from "@ucdjs/pipelines-core";
2
+
3
+ //#region src/lib/pipeline-utils.ts
4
+ function toPipelineInfo(pipeline) {
5
+ return {
6
+ id: pipeline.id,
7
+ name: pipeline.name,
8
+ description: pipeline.description,
9
+ tags: pipeline.tags,
10
+ versions: pipeline.versions,
11
+ routeCount: pipeline.routes.length,
12
+ sourceCount: pipeline.inputs.length,
13
+ sourceId: pipeline.inputs[0]?.id ?? "local"
14
+ };
15
+ }
16
+ function toPipelineDetails(pipeline) {
17
+ return {
18
+ ...toPipelineInfo(pipeline),
19
+ routes: pipeline.routes.map((route) => toRouteDetails(route)),
20
+ sources: pipeline.inputs.map((source) => ({ id: source.id }))
21
+ };
22
+ }
23
+ function toRouteDetails(route) {
24
+ const depends = (route.depends ?? []).map((dep) => parseDependency(dep));
25
+ const emits = Object.entries(route.emits ?? {}).map(([id, def]) => {
26
+ return {
27
+ id,
28
+ scope: def.scope === "global" ? "global" : "version"
29
+ };
30
+ });
31
+ const outputs = route.out ? [{
32
+ dir: route.out.dir,
33
+ fileName: typeof route.out.fileName === "function" ? "[fn]" : route.out.fileName
34
+ }] : [];
35
+ const transforms = (route.transforms ?? []).map((transform, index) => {
36
+ return transform.id ?? `transform-${index + 1}`;
37
+ });
38
+ return {
39
+ id: route.id,
40
+ cache: route.cache !== false,
41
+ depends,
42
+ emits,
43
+ outputs,
44
+ transforms
45
+ };
46
+ }
47
+
48
+ //#endregion
49
+ export { toPipelineDetails, toPipelineInfo, toRouteDetails };
@@ -0,0 +1,6 @@
1
+ import { ClassValue } from "clsx";
2
+
3
+ //#region src/lib/utils.d.ts
4
+ declare function cn(...inputs: ClassValue[]): string;
5
+ //#endregion
6
+ export { cn };
@@ -0,0 +1,10 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ //#region src/lib/utils.ts
5
+ function cn(...inputs) {
6
+ return twMerge(clsx(inputs));
7
+ }
8
+
9
+ //#endregion
10
+ export { cn };
@@ -0,0 +1,3 @@
1
+ @import "@ucdjs-internal/shared-ui/styles.css";
2
+
3
+ @source "../components/**/*.{ts,js,mjs,jsx,tsx}";
@@ -0,0 +1,143 @@
1
+ import { PipelineEvent, PipelineGraph } from "@ucdjs/pipelines-core";
2
+ import { ExecutionStatus } from "@ucdjs/pipelines-executor";
3
+
4
+ //#region src/types.d.ts
5
+ interface PipelineInfo {
6
+ id: string;
7
+ name: string;
8
+ description?: string;
9
+ tags?: string[];
10
+ versions: string[];
11
+ routeCount: number;
12
+ sourceCount: number;
13
+ sourceId: string;
14
+ }
15
+ interface PipelineFileInfo {
16
+ fileId: string;
17
+ filePath: string;
18
+ fileLabel?: string;
19
+ sourceId: string;
20
+ pipelines: PipelineInfo[];
21
+ }
22
+ interface PipelineDetails {
23
+ id: string;
24
+ name?: string;
25
+ description?: string;
26
+ versions: string[];
27
+ routeCount: number;
28
+ sourceCount: number;
29
+ routes: Array<{
30
+ id: string;
31
+ cache: boolean;
32
+ depends: Array<{
33
+ type: "route";
34
+ routeId: string;
35
+ } | {
36
+ type: "artifact";
37
+ routeId: string;
38
+ artifactName: string;
39
+ }>;
40
+ emits: Array<{
41
+ id: string;
42
+ scope: "version" | "global";
43
+ }>;
44
+ outputs: Array<{
45
+ dir?: string;
46
+ fileName?: string;
47
+ }>;
48
+ transforms: string[];
49
+ }>;
50
+ sources: Array<{
51
+ id: string;
52
+ }>;
53
+ }
54
+ interface LoadError {
55
+ filePath: string;
56
+ message: string;
57
+ sourceId?: string;
58
+ }
59
+ interface PipelinesResponse {
60
+ files: PipelineFileInfo[];
61
+ errors: LoadError[];
62
+ }
63
+ interface PipelineResponse {
64
+ pipeline?: PipelineDetails;
65
+ error?: string;
66
+ fileId?: string;
67
+ filePath?: string;
68
+ fileLabel?: string;
69
+ sourceId?: string;
70
+ }
71
+ interface ExecuteResult {
72
+ success: boolean;
73
+ pipelineId: string;
74
+ executionId?: string;
75
+ summary?: {
76
+ versions: string[];
77
+ totalFiles: number;
78
+ matchedFiles: number;
79
+ skippedFiles: number;
80
+ fallbackFiles: number;
81
+ totalOutputs: number;
82
+ durationMs: number;
83
+ };
84
+ graph?: PipelineGraph;
85
+ events?: PipelineEvent[];
86
+ errors?: Array<{
87
+ scope: string;
88
+ message: string;
89
+ }>;
90
+ error?: string;
91
+ }
92
+ type ExecutionLogStream = "stdout" | "stderr";
93
+ interface ExecutionLogPayload {
94
+ message: string;
95
+ stream: ExecutionLogStream;
96
+ args?: unknown[];
97
+ truncated?: boolean;
98
+ originalSize?: number;
99
+ event?: PipelineEvent;
100
+ }
101
+ interface ExecutionLogItem {
102
+ id: string;
103
+ spanId: string | null;
104
+ stream: ExecutionLogStream;
105
+ message: string;
106
+ timestamp: string;
107
+ payload: ExecutionLogPayload | null;
108
+ }
109
+ interface ExecutionLogsResponse {
110
+ executionId: string;
111
+ pipelineId: string;
112
+ status: ExecutionStatus;
113
+ logs: ExecutionLogItem[];
114
+ truncated: boolean;
115
+ capturedSize: number;
116
+ originalSize: number | null;
117
+ pagination: {
118
+ total: number;
119
+ limit: number;
120
+ offset: number;
121
+ hasMore: boolean;
122
+ };
123
+ }
124
+ interface ExecutionEventItem {
125
+ id: string;
126
+ type: string;
127
+ timestamp: string;
128
+ data: PipelineEvent;
129
+ }
130
+ interface ExecutionEventsResponse {
131
+ executionId: string;
132
+ pipelineId: string;
133
+ status: ExecutionStatus;
134
+ events: ExecutionEventItem[];
135
+ pagination: {
136
+ total: number;
137
+ limit: number;
138
+ offset: number;
139
+ hasMore: boolean;
140
+ };
141
+ }
142
+ //#endregion
143
+ export { ExecuteResult, ExecutionEventItem, ExecutionEventsResponse, ExecutionLogItem, ExecutionLogPayload, ExecutionLogStream, ExecutionLogsResponse, LoadError, PipelineDetails, PipelineFileInfo, PipelineInfo, PipelineResponse, PipelinesResponse };
package/package.json ADDED
@@ -0,0 +1,95 @@
1
+ {
2
+ "name": "@ucdjs/pipelines-ui",
3
+ "version": "0.0.1-beta.1",
4
+ "type": "module",
5
+ "author": {
6
+ "name": "Lucas Nørgård",
7
+ "email": "lucasnrgaard@gmail.com",
8
+ "url": "https://luxass.dev"
9
+ },
10
+ "license": "MIT",
11
+ "homepage": "https://github.com/ucdjs/ucd",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/ucdjs/ucd.git",
15
+ "directory": "packages/pipelines/pipeline-ui"
16
+ },
17
+ "bugs": {
18
+ "url": "https://github.com/ucdjs/ucd/issues"
19
+ },
20
+ "sideEffects": false,
21
+ "imports": {
22
+ "#components/*": "./src/components/*.tsx",
23
+ "#lib/*": "./src/lib/*.ts",
24
+ "#hooks/*": "./src/hooks/*.ts"
25
+ },
26
+ "exports": {
27
+ ".": "./dist/index.mjs",
28
+ "./components/pipeline-sidebar": "./dist/components/pipeline-sidebar.mjs",
29
+ "./components/status-badge": "./dist/components/status-badge.mjs",
30
+ "./components/status-icon": "./dist/components/status-icon.mjs",
31
+ "./hooks": "./dist/hooks/index.mjs",
32
+ "./lib": "./dist/lib/index.mjs",
33
+ "./lib/adapter": "./dist/lib/adapter.mjs",
34
+ "./lib/colors": "./dist/lib/colors.mjs",
35
+ "./lib/execution-logs": "./dist/lib/execution-logs.mjs",
36
+ "./lib/format-time": "./dist/lib/format-time.mjs",
37
+ "./lib/layout": "./dist/lib/layout.mjs",
38
+ "./lib/pipeline-utils": "./dist/lib/pipeline-utils.mjs",
39
+ "./lib/utils": "./dist/lib/utils.mjs",
40
+ "./styles.css": "./dist/styles/globals.css",
41
+ "./package.json": "./package.json"
42
+ },
43
+ "types": "./dist/index.d.mts",
44
+ "files": [
45
+ "dist"
46
+ ],
47
+ "engines": {
48
+ "node": ">=22.18"
49
+ },
50
+ "peerDependencies": {
51
+ "@tanstack/react-router": "1.159.5",
52
+ "react": ">=19.2.0",
53
+ "react-dom": ">=19.2.0"
54
+ },
55
+ "dependencies": {
56
+ "@icons-pack/react-simple-icons": "13.8.0",
57
+ "@xyflow/react": "12.10.0",
58
+ "clsx": "2.1.1",
59
+ "lucide-react": "0.563.0",
60
+ "tailwind-merge": "3.4.0",
61
+ "@ucdjs-internal/shared-ui": "0.1.0",
62
+ "@ucdjs/pipelines-core": "0.0.1-beta.1",
63
+ "@ucdjs/pipelines-executor": "0.0.1-beta.1"
64
+ },
65
+ "devDependencies": {
66
+ "@eslint-react/eslint-plugin": "2.12.4",
67
+ "@luxass/eslint-config": "7.2.0",
68
+ "@rollup/plugin-babel": "6.1.0",
69
+ "@tanstack/react-router": "1.159.5",
70
+ "@types/react": "19.2.14",
71
+ "@types/react-dom": "19.2.3",
72
+ "babel-plugin-react-compiler": "1.0.0",
73
+ "eslint": "10.0.0",
74
+ "eslint-plugin-react-hooks": "7.0.1",
75
+ "eslint-plugin-react-refresh": "0.5.0",
76
+ "publint": "0.3.17",
77
+ "react": "19.2.4",
78
+ "react-dom": "19.2.4",
79
+ "tailwindcss": "4.1.18",
80
+ "tsdown": "0.20.3",
81
+ "typescript": "5.9.3",
82
+ "@ucdjs-tooling/tsdown-config": "1.0.0",
83
+ "@ucdjs-tooling/tsconfig": "1.0.0"
84
+ },
85
+ "publishConfig": {
86
+ "access": "public"
87
+ },
88
+ "scripts": {
89
+ "build": "tsdown --tsconfig=./tsconfig.build.json",
90
+ "dev": "tsdown --watch",
91
+ "clean": "git clean -xdf dist node_modules",
92
+ "lint": "eslint .",
93
+ "typecheck": "tsc --noEmit -p tsconfig.build.json"
94
+ }
95
+ }