@workglow/task-graph 0.0.119 → 0.0.120
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/browser.js +17 -6
- package/dist/browser.js.map +3 -3
- package/dist/bun.js +17 -6
- package/dist/bun.js.map +3 -3
- package/dist/node.js +17 -6
- package/dist/node.js.map +3 -3
- package/dist/task/Task.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/node.js
CHANGED
|
@@ -1719,7 +1719,22 @@ class Task {
|
|
|
1719
1719
|
}
|
|
1720
1720
|
toJSON(_options) {
|
|
1721
1721
|
const ctor = this.constructor;
|
|
1722
|
-
const
|
|
1722
|
+
const schema = ctor.configSchema();
|
|
1723
|
+
const schemaProperties = typeof schema !== "boolean" && schema?.properties ? schema.properties : {};
|
|
1724
|
+
const config = {};
|
|
1725
|
+
for (const [key, propSchema] of Object.entries(schemaProperties)) {
|
|
1726
|
+
if (key === "id")
|
|
1727
|
+
continue;
|
|
1728
|
+
if (propSchema?.["x-ui-hidden"] === true && key !== "inputSchema" && key !== "outputSchema" && key !== "extras") {
|
|
1729
|
+
continue;
|
|
1730
|
+
}
|
|
1731
|
+
const value = this.config[key];
|
|
1732
|
+
if (value === undefined)
|
|
1733
|
+
continue;
|
|
1734
|
+
if (typeof value === "function" || typeof value === "symbol")
|
|
1735
|
+
continue;
|
|
1736
|
+
config[key] = value;
|
|
1737
|
+
}
|
|
1723
1738
|
if (config.title === ctor.title)
|
|
1724
1739
|
delete config.title;
|
|
1725
1740
|
if (config.description === ctor.description)
|
|
@@ -1727,10 +1742,6 @@ class Task {
|
|
|
1727
1742
|
const extras = config.extras;
|
|
1728
1743
|
if (!extras || Object.keys(extras).length === 0)
|
|
1729
1744
|
delete config.extras;
|
|
1730
|
-
for (const key of Object.keys(config)) {
|
|
1731
|
-
if (config[key] === undefined)
|
|
1732
|
-
delete config[key];
|
|
1733
|
-
}
|
|
1734
1745
|
const json = this.stripSymbols({
|
|
1735
1746
|
id: this.id,
|
|
1736
1747
|
type: this.type,
|
|
@@ -6862,4 +6873,4 @@ export {
|
|
|
6862
6873
|
ConditionalTask
|
|
6863
6874
|
};
|
|
6864
6875
|
|
|
6865
|
-
//# debugId=
|
|
6876
|
+
//# debugId=65F073C748987DA264756E2164756E21
|