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