@bian-womp/spark-remote 0.3.77 → 0.3.79

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
@@ -573,14 +573,9 @@ async function createServerRuntimeAdapter(id, createRegistry, send, extensions)
573
573
  await originalAdapter.build(def, { environment: payload.environment });
574
574
  }
575
575
  else {
576
- const releasePause = graphRuntime.requestPause();
577
- try {
578
- graphRuntime.setEnvironment(payload.environment || {});
579
- graphRuntime.update(def, registry);
580
- }
581
- finally {
582
- releasePause();
583
- }
576
+ // Reuse adapter methods so applySnapshot follows normal update semantics.
577
+ await originalAdapter.setEnvironment(payload.environment || {}, { merge: false, dry: true });
578
+ await originalAdapter.update(def);
584
579
  }
585
580
  }
586
581
  else if (!graphRuntime) {
@@ -601,9 +596,7 @@ async function createServerRuntimeAdapter(id, createRegistry, send, extensions)
601
596
  const snapshot = await originalAdapter.snapshotFull();
602
597
  const converter = sparkGraph.buildValueConverter(converterConfig);
603
598
  const converted = sparkGraph.convertSnapshot(snapshot, converter);
604
- await originalAdapter.applySnapshotFull(converted, {
605
- skipBuild: true,
606
- });
599
+ await originalAdapter.applySnapshotFull(converted, { skipBuild: true });
607
600
  return converted;
608
601
  },
609
602
  pause: async () => {