@nodegx/preview 0.2.3 → 0.2.4
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/backend/cli.js +39 -12
- package/dist/browser/noodl-graph-target.js +72 -72
- package/dist/browser/noodl-preview-in-page.js +17 -17
- package/dist/external/deploy/noodl.deploy.js +1 -1
- package/dist/nodegx-deploy.cjs +39 -12
- package/dist/noodl-preview.cjs +40 -13
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/backend/cli.js
CHANGED
|
@@ -27332,6 +27332,35 @@ var require_simplejavascript = __commonJS({
|
|
|
27332
27332
|
}
|
|
27333
27333
|
return users;
|
|
27334
27334
|
}
|
|
27335
|
+
function placingSignalPorts(node17) {
|
|
27336
|
+
const saved = node17.model.outputPorts;
|
|
27337
|
+
const params6 = node17.model.parameters || {};
|
|
27338
|
+
const names = [];
|
|
27339
|
+
for (const key in saved) {
|
|
27340
|
+
if (saved[key] && saved[key].type === "signal") names.push(key);
|
|
27341
|
+
}
|
|
27342
|
+
const declare = (key) => {
|
|
27343
|
+
if (!(key in saved) && names.indexOf(key) === -1) names.push(key);
|
|
27344
|
+
};
|
|
27345
|
+
const listed = [];
|
|
27346
|
+
const scriptOutputs = params6["scriptOutputs"];
|
|
27347
|
+
if (Array.isArray(scriptOutputs)) {
|
|
27348
|
+
scriptOutputs.forEach((p) => {
|
|
27349
|
+
listed.push("out-" + p.label);
|
|
27350
|
+
if (params6["outtype-" + p.label] === "signal") declare("out-" + p.label);
|
|
27351
|
+
});
|
|
27352
|
+
}
|
|
27353
|
+
const script = params6["functionScript"];
|
|
27354
|
+
if (typeof script === "string") {
|
|
27355
|
+
const cached2 = node17._internal.codeSignals;
|
|
27356
|
+
const signals = cached2 && cached2.script === script ? cached2.names : functionScriptPortNames(script).signals;
|
|
27357
|
+
node17._internal.codeSignals = { script, names: signals };
|
|
27358
|
+
signals.forEach((n) => {
|
|
27359
|
+
if (listed.indexOf("out-" + n) === -1) declare("out-" + n);
|
|
27360
|
+
});
|
|
27361
|
+
}
|
|
27362
|
+
return names;
|
|
27363
|
+
}
|
|
27335
27364
|
function publishHeldWrites(node17) {
|
|
27336
27365
|
node17._internal.heldWrites.forEach((prop) => {
|
|
27337
27366
|
node17.registerOutputIfNeeded("out-" + prop);
|
|
@@ -27604,18 +27633,16 @@ var require_simplejavascript = __commonJS({
|
|
|
27604
27633
|
}
|
|
27605
27634
|
const inputs = this._internal.inputValues;
|
|
27606
27635
|
const outputs = this._internal.outputValuesProxy;
|
|
27607
|
-
|
|
27608
|
-
|
|
27609
|
-
|
|
27610
|
-
|
|
27611
|
-
|
|
27612
|
-
|
|
27613
|
-
|
|
27614
|
-
|
|
27615
|
-
|
|
27616
|
-
|
|
27617
|
-
}
|
|
27618
|
-
}
|
|
27636
|
+
placingSignalPorts(this).forEach((key) => {
|
|
27637
|
+
const _sendSignal = () => {
|
|
27638
|
+
this._internal.outputWrites.add(key.substring("out-".length));
|
|
27639
|
+
publishHeldWrites(this);
|
|
27640
|
+
if (this.hasOutput(key)) this.sendSignalOnOutput(key);
|
|
27641
|
+
};
|
|
27642
|
+
const signalValue = _sendSignal;
|
|
27643
|
+
signalValue.send = _sendSignal;
|
|
27644
|
+
this._internal.outputValues[key.substring("out-".length)] = signalValue;
|
|
27645
|
+
});
|
|
27619
27646
|
const noodlAPI = JavascriptNodeParser3.createNoodlAPI(this.nodeScope.modelScope);
|
|
27620
27647
|
noodlAPI.Inputs = inputs;
|
|
27621
27648
|
noodlAPI.Outputs = outputs;
|