@workglow/task-graph 0.0.124 → 0.0.126
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/README.md +108 -12
- package/dist/browser.d.ts +1 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +1242 -767
- package/dist/browser.js.map +21 -21
- package/dist/bun.js +605 -767
- package/dist/bun.js.map +19 -20
- package/dist/debug/console/ConsoleFormatters.d.ts +45 -0
- package/dist/debug/console/ConsoleFormatters.d.ts.map +1 -0
- package/dist/node.js +605 -767
- package/dist/node.js.map +19 -20
- package/dist/task-graph/Conversions.d.ts.map +1 -1
- package/package.json +20 -11
- package/src/debug/README.md +115 -0
- package/src/storage/README.md +51 -5
- package/dist/types.d.ts +0 -7
- package/dist/types.d.ts.map +0 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
type Config = Record<string, unknown>;
|
|
7
|
+
type JsonMLTagName = string;
|
|
8
|
+
interface JsonMLAttributes {
|
|
9
|
+
readonly [key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
type JsonMLNode = JsonMLText | JsonMLElementDef;
|
|
12
|
+
type JsonMLText = string;
|
|
13
|
+
type JsonMLElementDef = [JsonMLTagName, JsonMLAttributes?, ...JsonMLNode[]];
|
|
14
|
+
declare abstract class ConsoleFormatter {
|
|
15
|
+
abstract header(value: unknown, config?: Config): JsonMLElementDef | null;
|
|
16
|
+
abstract hasBody(value: unknown, config?: Config): boolean;
|
|
17
|
+
abstract body(value: unknown, config?: Config): JsonMLElementDef | null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Returns whether the browser is in dark mode
|
|
21
|
+
*/
|
|
22
|
+
export declare function isDarkMode(): boolean;
|
|
23
|
+
declare global {
|
|
24
|
+
interface Window {
|
|
25
|
+
devtoolsFormatters?: ConsoleFormatter[];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Installs custom DevTools formatters for Workglow task graphs, workflows, and related objects.
|
|
30
|
+
* Call this function once in your application to enable rich console output for debugging.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* import { installDevToolsFormatters } from "@workglow/task-graph";
|
|
35
|
+
*
|
|
36
|
+
* // Call early in your app initialization
|
|
37
|
+
* installDevToolsFormatters();
|
|
38
|
+
*
|
|
39
|
+
* // Now console.log will show rich output for Workflow, Task, TaskGraph, etc.
|
|
40
|
+
* console.log(myWorkflow);
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function installDevToolsFormatters(): void;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=ConsoleFormatters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConsoleFormatters.d.ts","sourceRoot":"","sources":["../../../src/debug/console/ConsoleFormatters.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAwBtC,KAAK,aAAa,GAAG,MAAM,CAAC;AAE5B,UAAU,gBAAgB;IACxB,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAED,KAAK,UAAU,GAAG,UAAU,GAAG,gBAAgB,CAAC;AAEhD,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,KAAK,gBAAgB,GAAG,CAAC,aAAa,EAAE,gBAAgB,CAAC,EAAE,GAAG,UAAU,EAAE,CAAC,CAAC;AAE5E,uBAAe,gBAAgB;IAC7B,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAAC;IAC1E,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3D,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAAC;CACzE;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAk0BD,OAAO,CAAC,MAAM,CAAC,CAAC;IACd,UAAU,MAAM;QACd,kBAAkB,CAAC,EAAE,gBAAgB,EAAE,CAAC;KACzC;CACF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAWhD"}
|