@bian-womp/spark-graph 0.2.2 → 0.2.3
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/lib/cjs/index.cjs +6 -6
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/esm/index.js +6 -6
- package/lib/esm/index.js.map +1 -1
- package/package.json +2 -2
package/lib/cjs/index.cjs
CHANGED
|
@@ -2150,7 +2150,7 @@ function setupBasicGraphRegistry() {
|
|
|
2150
2150
|
});
|
|
2151
2151
|
// JSON parser node: base.stringToObject
|
|
2152
2152
|
registry.registerNode({
|
|
2153
|
-
id: "base.
|
|
2153
|
+
id: "base.string.toObject",
|
|
2154
2154
|
categoryId: "compute",
|
|
2155
2155
|
inputs: { Text: "base.string" },
|
|
2156
2156
|
outputs: { Object: "base.object" },
|
|
@@ -2166,7 +2166,7 @@ function setupBasicGraphRegistry() {
|
|
|
2166
2166
|
},
|
|
2167
2167
|
});
|
|
2168
2168
|
registry.registerNode({
|
|
2169
|
-
id: "base.
|
|
2169
|
+
id: "base.object.toString",
|
|
2170
2170
|
categoryId: "compute",
|
|
2171
2171
|
inputs: { Object: "base.object" },
|
|
2172
2172
|
outputs: { Text: "base.string" },
|
|
@@ -2256,7 +2256,7 @@ function setupBasicGraphRegistry() {
|
|
|
2256
2256
|
impl: (ins) => {
|
|
2257
2257
|
const a = asArray(ins.A ?? []);
|
|
2258
2258
|
const b = asArray(ins.B ?? []);
|
|
2259
|
-
const op = Number(ins.Operation ??
|
|
2259
|
+
const op = Number(ins.Operation ?? BaseMathOperation.Add);
|
|
2260
2260
|
const unaryByOp = {
|
|
2261
2261
|
[BaseMathOperation.Round]: (x) => Math.round(x),
|
|
2262
2262
|
[BaseMathOperation.Floor]: (x) => Math.floor(x),
|
|
@@ -2317,7 +2317,7 @@ function setupBasicGraphRegistry() {
|
|
|
2317
2317
|
outputs: { Result: "base.bool[]" },
|
|
2318
2318
|
impl: (ins) => {
|
|
2319
2319
|
const [a, b] = broadcast(ins.A, ins.B);
|
|
2320
|
-
const op = Number(ins.Operation ?? BaseCompareOperation.Equal)
|
|
2320
|
+
const op = Number(ins.Operation ?? BaseCompareOperation.Equal);
|
|
2321
2321
|
const compareByOp = {
|
|
2322
2322
|
[BaseCompareOperation.LessThan]: (x, y) => x < y,
|
|
2323
2323
|
[BaseCompareOperation.LessThanOrEqual]: (x, y) => x <= y,
|
|
@@ -2342,7 +2342,7 @@ function setupBasicGraphRegistry() {
|
|
|
2342
2342
|
outputs: { Result: "base.bool[]" },
|
|
2343
2343
|
inputDefaults: { Operation: BaseLogicOperation.Not },
|
|
2344
2344
|
impl: (ins) => {
|
|
2345
|
-
const op = Number(ins.Operation ?? BaseLogicOperation.Not)
|
|
2345
|
+
const op = Number(ins.Operation ?? BaseLogicOperation.Not);
|
|
2346
2346
|
if (op === BaseLogicOperation.Not) {
|
|
2347
2347
|
const a = asBoolArray(ins.A ?? []);
|
|
2348
2348
|
return { Result: a.map((x) => !x) };
|
|
@@ -3002,7 +3002,7 @@ function createValidationGraphDef() {
|
|
|
3002
3002
|
{ nodeId: "nA", typeId: "base.number" },
|
|
3003
3003
|
{ nodeId: "nB", typeId: "base.number" },
|
|
3004
3004
|
{ nodeId: "nC", typeId: "base.math" },
|
|
3005
|
-
{ nodeId: "s1", typeId: "base.
|
|
3005
|
+
{ nodeId: "s1", typeId: "base.object.toString" },
|
|
3006
3006
|
{ nodeId: "cmp", typeId: "base.compare" },
|
|
3007
3007
|
// Global validation issue: unknown node type (no nodeId/edgeId in data)
|
|
3008
3008
|
{ nodeId: "bad", typeId: "unknownType" },
|