@nodegx/mcp 0.2.3 → 0.2.5

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.
@@ -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
- for (const key in this.model.outputPorts) {
27608
- if (this._isSignalType(key)) {
27609
- const _sendSignal = () => {
27610
- this._internal.outputWrites.add(key.substring("out-".length));
27611
- publishHeldWrites(this);
27612
- if (this.hasOutput(key)) this.sendSignalOnOutput(key);
27613
- };
27614
- const signalValue = _sendSignal;
27615
- signalValue.send = _sendSignal;
27616
- this._internal.outputValues[key.substring("out-".length)] = signalValue;
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;
@@ -19679,6 +19679,35 @@ var require_simplejavascript = __commonJS({
19679
19679
  }
19680
19680
  return users;
19681
19681
  }
19682
+ function placingSignalPorts(node) {
19683
+ const saved = node.model.outputPorts;
19684
+ const params = node.model.parameters || {};
19685
+ const names = [];
19686
+ for (const key in saved) {
19687
+ if (saved[key] && saved[key].type === "signal") names.push(key);
19688
+ }
19689
+ const declare = (key) => {
19690
+ if (!(key in saved) && names.indexOf(key) === -1) names.push(key);
19691
+ };
19692
+ const listed = [];
19693
+ const scriptOutputs = params["scriptOutputs"];
19694
+ if (Array.isArray(scriptOutputs)) {
19695
+ scriptOutputs.forEach((p) => {
19696
+ listed.push("out-" + p.label);
19697
+ if (params["outtype-" + p.label] === "signal") declare("out-" + p.label);
19698
+ });
19699
+ }
19700
+ const script = params["functionScript"];
19701
+ if (typeof script === "string") {
19702
+ const cached = node._internal.codeSignals;
19703
+ const signals = cached && cached.script === script ? cached.names : functionScriptPortNames(script).signals;
19704
+ node._internal.codeSignals = { script, names: signals };
19705
+ signals.forEach((n) => {
19706
+ if (listed.indexOf("out-" + n) === -1) declare("out-" + n);
19707
+ });
19708
+ }
19709
+ return names;
19710
+ }
19682
19711
  function publishHeldWrites(node) {
19683
19712
  node._internal.heldWrites.forEach((prop) => {
19684
19713
  node.registerOutputIfNeeded("out-" + prop);
@@ -19951,18 +19980,16 @@ var require_simplejavascript = __commonJS({
19951
19980
  }
19952
19981
  const inputs = this._internal.inputValues;
19953
19982
  const outputs = this._internal.outputValuesProxy;
19954
- for (const key in this.model.outputPorts) {
19955
- if (this._isSignalType(key)) {
19956
- const _sendSignal = () => {
19957
- this._internal.outputWrites.add(key.substring("out-".length));
19958
- publishHeldWrites(this);
19959
- if (this.hasOutput(key)) this.sendSignalOnOutput(key);
19960
- };
19961
- const signalValue = _sendSignal;
19962
- signalValue.send = _sendSignal;
19963
- this._internal.outputValues[key.substring("out-".length)] = signalValue;
19964
- }
19965
- }
19983
+ placingSignalPorts(this).forEach((key) => {
19984
+ const _sendSignal = () => {
19985
+ this._internal.outputWrites.add(key.substring("out-".length));
19986
+ publishHeldWrites(this);
19987
+ if (this.hasOutput(key)) this.sendSignalOnOutput(key);
19988
+ };
19989
+ const signalValue = _sendSignal;
19990
+ signalValue.send = _sendSignal;
19991
+ this._internal.outputValues[key.substring("out-".length)] = signalValue;
19992
+ });
19966
19993
  const noodlAPI = JavascriptNodeParser4.createNoodlAPI(this.nodeScope.modelScope);
19967
19994
  noodlAPI.Inputs = inputs;
19968
19995
  noodlAPI.Outputs = outputs;
@@ -66766,9 +66793,9 @@ var init_navigation_stack = __esm({
66766
66793
  }
66767
66794
  });
66768
66795
 
66769
- // type-stub:/Users/richardosborne/vscode_projects/OpenNoodl-worktrees/l1-npm023/packages/noodl-viewer-react/src/types.ts
66796
+ // type-stub:/Users/richardosborne/vscode_projects/OpenNoodl-worktrees/own020-pack024/packages/noodl-viewer-react/src/types.ts
66770
66797
  var require_types2 = __commonJS({
66771
- "type-stub:/Users/richardosborne/vscode_projects/OpenNoodl-worktrees/l1-npm023/packages/noodl-viewer-react/src/types.ts"(exports2, module2) {
66798
+ "type-stub:/Users/richardosborne/vscode_projects/OpenNoodl-worktrees/own020-pack024/packages/noodl-viewer-react/src/types.ts"(exports2, module2) {
66772
66799
  var noop2 = new Proxy(function() {
66773
66800
  }, { get: () => noop2, apply: () => noop2 });
66774
66801
  module2.exports = new Proxy({}, { get: () => noop2 });