@workglow/util 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 CHANGED
@@ -16,6 +16,7 @@ The `@workglow/util` package provides a comprehensive set of utility functions,
16
16
  - **Worker Utilities**: Web worker and background task helpers
17
17
  - **JSON Schema Utilities**: JSON Schema types and utilities for schema validation and type inference
18
18
  - **Multi-Platform Support**: Works in browser, Node.js, and Bun environments
19
+ - **Browser debug formatters**: Chrome DevTools custom formatters for workflows and tasks are exported from `@workglow/task-graph` in the browser build — see the [`task-graph` package README](../task-graph/README.md) and [`src/debug/README.md`](../task-graph/src/debug/README.md)
19
20
 
20
21
  ## Installation
21
22
 
@@ -113,11 +114,7 @@ const userService = container.resolve<UserService>("UserService");
113
114
  The input resolver registry enables automatic resolution of string identifiers to object instances based on JSON Schema format annotations. This is used by the TaskRunner to resolve inputs like model names or repository IDs before task execution.
114
115
 
115
116
  ```typescript
116
- import {
117
- registerInputResolver,
118
- getInputResolvers,
119
- INPUT_RESOLVERS,
120
- } from "@workglow/util";
117
+ import { registerInputResolver, getInputResolvers, INPUT_RESOLVERS } from "@workglow/util";
121
118
 
122
119
  // Register a custom resolver for a format prefix
123
120
  registerInputResolver("myformat", async (id, format, registry) => {
@@ -307,6 +304,10 @@ type User = z.infer<typeof userSchemaZod>;
307
304
  - Worker lifecycle management
308
305
  - Error handling and recovery
309
306
 
307
+ ### Debug formatters
308
+
309
+ Chrome DevTools custom formatters for `Workflow`, `TaskGraph`, `Task`, and related types are provided by **`@workglow/task-graph`** in the browser build. See the [task-graph debug README](../task-graph/src/debug/README.md).
310
+
310
311
  ### JSON Schema Utilities (`/json-schema`)
311
312
 
312
313
  - `JsonSchema` - Extended JSON Schema type with custom extensions
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export * from "./common";
7
+ export * from "./worker/Worker.browser";
8
+ //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC"}
@@ -5,4 +5,4 @@
5
5
  */
6
6
  export * from "./common";
7
7
  export * from "./worker/Worker.bun";
8
- //# sourceMappingURL=types.d.ts.map
8
+ //# sourceMappingURL=bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bun.d.ts","sourceRoot":"","sources":["../src/bun.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC"}
package/dist/node.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export * from "./common";
7
+ export * from "./worker/Worker.node";
8
+ //# sourceMappingURL=node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@workglow/util",
3
3
  "type": "module",
4
- "version": "0.0.124",
4
+ "version": "0.0.126",
5
5
  "description": "Utility functions and shared types for Workglow, providing common functionality across all packages.",
6
6
  "scripts": {
7
7
  "watch": "concurrently -c 'auto' 'bun:watch-*'",
@@ -17,7 +17,7 @@
17
17
  "watch-compress-browser": "bun build --watch --no-clear-screen --target=browser --sourcemap=external --packages=external --outdir ./dist ./src/compress-browser.ts",
18
18
  "watch-compress-node": "bun build --watch --no-clear-screen --target=node --sourcemap=external --packages=external --outdir ./dist ./src/compress-node.ts",
19
19
  "watch-types": "tsc --watch --preserveWatchOutput",
20
- "build-package": "concurrently -c 'auto' -n 'browser,node,bun,worker,schema,graph,media,compress,types' 'bun run build-browser' 'bun run build-node' 'bun run build-bun' 'bun run build-worker' 'bun run build-schema' 'bun run build-graph' 'bun run build-media' 'bun run build-compress' 'bun run build-types'",
20
+ "build-package": "bun run build-js && bun run build-types",
21
21
  "build-js": "concurrently -c 'auto' -n 'browser,node,bun,worker,schema,graph,media,compress' 'bun run build-browser' 'bun run build-node' 'bun run build-bun' 'bun run build-worker' 'bun run build-schema' 'bun run build-graph' 'bun run build-media' 'bun run build-compress'",
22
22
  "build-clean": "rm -fr dist/* tsconfig.tsbuildinfo",
23
23
  "build-browser": "bun build --target=browser --sourcemap=external --packages=external --outdir ./dist ./src/browser.ts",
@@ -41,10 +41,19 @@
41
41
  },
42
42
  "exports": {
43
43
  ".": {
44
- "react-native": "./dist/browser.js",
45
- "browser": "./dist/browser.js",
46
- "bun": "./dist/bun.js",
47
- "types": "./dist/types.d.ts",
44
+ "react-native": {
45
+ "types": "./dist/browser.d.ts",
46
+ "import": "./dist/browser.js"
47
+ },
48
+ "browser": {
49
+ "types": "./dist/browser.d.ts",
50
+ "import": "./dist/browser.js"
51
+ },
52
+ "bun": {
53
+ "types": "./dist/bun.d.ts",
54
+ "import": "./dist/bun.js"
55
+ },
56
+ "types": "./dist/node.d.ts",
48
57
  "import": "./dist/node.js"
49
58
  },
50
59
  "./schema": {
@@ -56,23 +65,50 @@
56
65
  "import": "./dist/graph-entry.js"
57
66
  },
58
67
  "./media": {
59
- "react-native": "./dist/media-browser.js",
60
- "browser": "./dist/media-browser.js",
61
- "bun": "./dist/media-node.js",
68
+ "react-native": {
69
+ "types": "./dist/media-browser.d.ts",
70
+ "import": "./dist/media-browser.js"
71
+ },
72
+ "browser": {
73
+ "types": "./dist/media-browser.d.ts",
74
+ "import": "./dist/media-browser.js"
75
+ },
76
+ "bun": {
77
+ "types": "./dist/media-node.d.ts",
78
+ "import": "./dist/media-node.js"
79
+ },
62
80
  "types": "./dist/media-node.d.ts",
63
81
  "import": "./dist/media-node.js"
64
82
  },
65
83
  "./compress": {
66
- "react-native": "./dist/compress-browser.js",
67
- "browser": "./dist/compress-browser.js",
68
- "bun": "./dist/compress-node.js",
84
+ "react-native": {
85
+ "types": "./dist/compress-browser.d.ts",
86
+ "import": "./dist/compress-browser.js"
87
+ },
88
+ "browser": {
89
+ "types": "./dist/compress-browser.d.ts",
90
+ "import": "./dist/compress-browser.js"
91
+ },
92
+ "bun": {
93
+ "types": "./dist/compress-node.d.ts",
94
+ "import": "./dist/compress-node.js"
95
+ },
69
96
  "types": "./dist/compress-node.d.ts",
70
97
  "import": "./dist/compress-node.js"
71
98
  },
72
99
  "./worker": {
73
- "react-native": "./dist/worker-browser.js",
74
- "browser": "./dist/worker-browser.js",
75
- "bun": "./dist/worker-bun.js",
100
+ "react-native": {
101
+ "types": "./dist/worker-browser.d.ts",
102
+ "import": "./dist/worker-browser.js"
103
+ },
104
+ "browser": {
105
+ "types": "./dist/worker-browser.d.ts",
106
+ "import": "./dist/worker-browser.js"
107
+ },
108
+ "bun": {
109
+ "types": "./dist/worker-bun.d.ts",
110
+ "import": "./dist/worker-bun.js"
111
+ },
76
112
  "types": "./dist/worker-entry.d.ts",
77
113
  "import": "./dist/worker-node.js"
78
114
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC"}