@workflow/web-shared 4.0.1-beta.24 → 4.0.1-beta.26
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/dist/api/workflow-api-client.d.ts +40 -5
- package/dist/api/workflow-api-client.d.ts.map +1 -1
- package/dist/api/workflow-api-client.js +280 -196
- package/dist/api/workflow-api-client.js.map +1 -1
- package/dist/api/workflow-server-actions.d.ts +18 -1
- package/dist/api/workflow-server-actions.d.ts.map +1 -1
- package/dist/api/workflow-server-actions.js +173 -93
- package/dist/api/workflow-server-actions.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts +19 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +64 -0
- package/dist/lib/utils.js.map +1 -1
- package/dist/sidebar/attribute-panel.d.ts +6 -2
- package/dist/sidebar/attribute-panel.d.ts.map +1 -1
- package/dist/sidebar/attribute-panel.js +136 -9
- package/dist/sidebar/attribute-panel.js.map +1 -1
- package/dist/sidebar/detail-card.d.ts.map +1 -1
- package/dist/sidebar/detail-card.js +2 -2
- package/dist/sidebar/detail-card.js.map +1 -1
- package/dist/sidebar/events-list.d.ts +2 -1
- package/dist/sidebar/events-list.d.ts.map +1 -1
- package/dist/sidebar/events-list.js +9 -7
- package/dist/sidebar/events-list.js.map +1 -1
- package/dist/sidebar/workflow-detail-panel.d.ts +5 -1
- package/dist/sidebar/workflow-detail-panel.d.ts.map +1 -1
- package/dist/sidebar/workflow-detail-panel.js +2 -2
- package/dist/sidebar/workflow-detail-panel.js.map +1 -1
- package/dist/stream-viewer.d.ts +13 -0
- package/dist/stream-viewer.d.ts.map +1 -0
- package/dist/stream-viewer.js +108 -0
- package/dist/stream-viewer.js.map +1 -0
- package/dist/trace-viewer/components/markers.js +2 -2
- package/dist/trace-viewer/components/markers.js.map +1 -1
- package/dist/trace-viewer/components/span-detail-panel.js +2 -2
- package/dist/trace-viewer/components/span-detail-panel.js.map +1 -1
- package/dist/trace-viewer/trace-viewer.module.css +25 -20
- package/dist/trace-viewer/util/timing.d.ts +7 -1
- package/dist/trace-viewer/util/timing.d.ts.map +1 -1
- package/dist/trace-viewer/util/timing.js +7 -12
- package/dist/trace-viewer/util/timing.js.map +1 -1
- package/dist/workflow-trace-view.d.ts +3 -1
- package/dist/workflow-trace-view.d.ts.map +1 -1
- package/dist/workflow-trace-view.js +2 -2
- package/dist/workflow-trace-view.js.map +1 -1
- package/package.json +4 -3
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import type { Hook, WorkflowRun, WorkflowRunStatus } from '@workflow/world';
|
|
2
|
-
import type { EnvMap } from './workflow-server-actions';
|
|
2
|
+
import type { EnvMap, ServerActionError } from './workflow-server-actions';
|
|
3
3
|
/**
|
|
4
4
|
* Gets a user-facing error message from an error object.
|
|
5
|
-
* Handles both
|
|
5
|
+
* Handles both WorkflowWebAPIError and regular Error instances.
|
|
6
6
|
*/
|
|
7
|
-
export declare const getErrorMessage: (error: Error |
|
|
7
|
+
export declare const getErrorMessage: (error: Error | WorkflowWebAPIError) => string;
|
|
8
|
+
/**
|
|
9
|
+
* Helper to handle server action results and throw WorkflowWebAPIError on failure
|
|
10
|
+
*/
|
|
11
|
+
export declare function unwrapServerActionResult<T>(promise: Promise<{
|
|
12
|
+
success: boolean;
|
|
13
|
+
data?: T;
|
|
14
|
+
error?: ServerActionError;
|
|
15
|
+
}>): Promise<{
|
|
16
|
+
error: WorkflowWebAPIError;
|
|
17
|
+
result: null;
|
|
18
|
+
} | {
|
|
19
|
+
error: null;
|
|
20
|
+
result: T;
|
|
21
|
+
}>;
|
|
8
22
|
/**
|
|
9
23
|
* Error instance for API and server-side errors.
|
|
10
24
|
* `error.message` will be a user-facing error message, to be displayed in UI.
|
|
@@ -19,7 +33,7 @@ export declare const getErrorMessage: (error: Error | WorkflowAPIError) => strin
|
|
|
19
33
|
* calling the server action, these fields will be populated:
|
|
20
34
|
* - `error.layer` will be 'server'
|
|
21
35
|
*/
|
|
22
|
-
export declare class
|
|
36
|
+
export declare class WorkflowWebAPIError extends Error {
|
|
23
37
|
request?: any;
|
|
24
38
|
layer?: 'client' | 'server' | 'API';
|
|
25
39
|
constructor(message: string, options?: {
|
|
@@ -83,6 +97,7 @@ export declare function useWorkflowTraceViewerData(env: EnvMap, runId: string, o
|
|
|
83
97
|
error: undefined;
|
|
84
98
|
completedAt: undefined;
|
|
85
99
|
executionContext?: Record<string, any> | undefined;
|
|
100
|
+
expiredAt?: Date | undefined;
|
|
86
101
|
startedAt?: Date | undefined;
|
|
87
102
|
} | {
|
|
88
103
|
runId: string;
|
|
@@ -96,6 +111,7 @@ export declare function useWorkflowTraceViewerData(env: EnvMap, runId: string, o
|
|
|
96
111
|
error: undefined;
|
|
97
112
|
completedAt: Date;
|
|
98
113
|
executionContext?: Record<string, any> | undefined;
|
|
114
|
+
expiredAt?: Date | undefined;
|
|
99
115
|
startedAt?: Date | undefined;
|
|
100
116
|
} | {
|
|
101
117
|
runId: string;
|
|
@@ -109,6 +125,7 @@ export declare function useWorkflowTraceViewerData(env: EnvMap, runId: string, o
|
|
|
109
125
|
error: undefined;
|
|
110
126
|
completedAt: Date;
|
|
111
127
|
executionContext?: Record<string, any> | undefined;
|
|
128
|
+
expiredAt?: Date | undefined;
|
|
112
129
|
startedAt?: Date | undefined;
|
|
113
130
|
} | {
|
|
114
131
|
runId: string;
|
|
@@ -126,6 +143,7 @@ export declare function useWorkflowTraceViewerData(env: EnvMap, runId: string, o
|
|
|
126
143
|
};
|
|
127
144
|
completedAt: Date;
|
|
128
145
|
executionContext?: Record<string, any> | undefined;
|
|
146
|
+
expiredAt?: Date | undefined;
|
|
129
147
|
startedAt?: Date | undefined;
|
|
130
148
|
};
|
|
131
149
|
steps: {
|
|
@@ -245,6 +263,7 @@ export declare function useWorkflowResourceData(env: EnvMap, resource: 'run' | '
|
|
|
245
263
|
error: undefined;
|
|
246
264
|
completedAt: undefined;
|
|
247
265
|
executionContext?: Record<string, any> | undefined;
|
|
266
|
+
expiredAt?: Date | undefined;
|
|
248
267
|
startedAt?: Date | undefined;
|
|
249
268
|
} | {
|
|
250
269
|
runId: string;
|
|
@@ -258,6 +277,7 @@ export declare function useWorkflowResourceData(env: EnvMap, resource: 'run' | '
|
|
|
258
277
|
error: undefined;
|
|
259
278
|
completedAt: Date;
|
|
260
279
|
executionContext?: Record<string, any> | undefined;
|
|
280
|
+
expiredAt?: Date | undefined;
|
|
261
281
|
startedAt?: Date | undefined;
|
|
262
282
|
} | {
|
|
263
283
|
runId: string;
|
|
@@ -271,6 +291,7 @@ export declare function useWorkflowResourceData(env: EnvMap, resource: 'run' | '
|
|
|
271
291
|
error: undefined;
|
|
272
292
|
completedAt: Date;
|
|
273
293
|
executionContext?: Record<string, any> | undefined;
|
|
294
|
+
expiredAt?: Date | undefined;
|
|
274
295
|
startedAt?: Date | undefined;
|
|
275
296
|
} | {
|
|
276
297
|
runId: string;
|
|
@@ -288,6 +309,7 @@ export declare function useWorkflowResourceData(env: EnvMap, resource: 'run' | '
|
|
|
288
309
|
};
|
|
289
310
|
completedAt: Date;
|
|
290
311
|
executionContext?: Record<string, any> | undefined;
|
|
312
|
+
expiredAt?: Date | undefined;
|
|
291
313
|
startedAt?: Date | undefined;
|
|
292
314
|
} | {
|
|
293
315
|
runId: string;
|
|
@@ -389,6 +411,19 @@ export declare function cancelRun(env: EnvMap, runId: string): Promise<void>;
|
|
|
389
411
|
* Start a new workflow run
|
|
390
412
|
*/
|
|
391
413
|
export declare function recreateRun(env: EnvMap, runId: string): Promise<string>;
|
|
392
|
-
export declare function readStream(env: EnvMap, streamId: string, startIndex?: number): Promise<ReadableStream<
|
|
414
|
+
export declare function readStream(env: EnvMap, streamId: string, startIndex?: number): Promise<ReadableStream<unknown>>;
|
|
415
|
+
/**
|
|
416
|
+
* List all stream IDs for a run
|
|
417
|
+
*/
|
|
418
|
+
export declare function listStreams(env: EnvMap, runId: string): Promise<string[]>;
|
|
419
|
+
/**
|
|
420
|
+
* Hook to fetch and manage stream list for a run
|
|
421
|
+
*/
|
|
422
|
+
export declare function useWorkflowStreams(env: EnvMap, runId: string, refreshInterval?: number): {
|
|
423
|
+
streams: string[];
|
|
424
|
+
loading: boolean;
|
|
425
|
+
error: Error | null;
|
|
426
|
+
refresh: () => Promise<void>;
|
|
427
|
+
};
|
|
393
428
|
export {};
|
|
394
429
|
//# sourceMappingURL=workflow-api-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-api-client.d.ts","sourceRoot":"","sources":["../../src/api/workflow-api-client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,IAAI,EAEJ,WAAW,EACX,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"workflow-api-client.d.ts","sourceRoot":"","sources":["../../src/api/workflow-api-client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,IAAI,EAEJ,WAAW,EACX,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAkC3E;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,KAAK,GAAG,mBAAmB,KAAG,MAapE,CAAC;AAEF;;GAEG;AACH,wBAAsB,wBAAwB,CAAC,CAAC,EAC9C,OAAO,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B,CAAC,GACD,OAAO,CACR;IAAE,KAAK,EAAE,mBAAmB,CAAC;IAAC,MAAM,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,CAAC,CAAA;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