@bian-womp/spark-workbench 0.3.68 → 0.3.69

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 CHANGED
@@ -564,6 +564,7 @@ class InMemoryWorkbench extends AbstractWorkbench {
564
564
  const copiedNodes = nodesToCopy.map((node) => {
565
565
  const pos = positions[node.nodeId];
566
566
  const size = sizes[node.nodeId];
567
+ const customNodeData = this.getCustomNodeData(node.nodeId);
567
568
  // Get all inbound edges for this node
568
569
  const inboundEdges = this.def.edges.filter((e) => e.target.nodeId === node.nodeId);
569
570
  // Build set of handles that have inbound edges
@@ -588,6 +589,9 @@ class InMemoryWorkbench extends AbstractWorkbench {
588
589
  : undefined,
589
590
  size,
590
591
  inputs: inputsToCopy,
592
+ customData: customNodeData !== undefined
593
+ ? lod.cloneDeep(customNodeData)
594
+ : undefined,
591
595
  originalNodeId: node.nodeId,
592
596
  };
593
597
  });
@@ -864,6 +868,12 @@ class InMemoryWorkbench extends AbstractWorkbench {
864
868
  dry: true,
865
869
  });
866
870
  nodeIdMap.set(nodeData.originalNodeId, newNodeId);
871
+ if (nodeData.customData !== undefined) {
872
+ this.setCustomNodeData(newNodeId, lod.cloneDeep(nodeData.customData), {
873
+ commit: false,
874
+ reason: options?.reason,
875
+ });
876
+ }
867
877
  }
868
878
  // Add edges
869
879
  for (const edgeData of data.edges) {