@raisindb/client 0.3.0 → 0.4.1

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/index.mjs CHANGED
@@ -2688,6 +2688,13 @@ var Branches = class {
2688
2688
  * Each root's parent path must already exist on the target branch. With
2689
2689
  * `deleteMissing`, target nodes under the roots that are absent from the
2690
2690
  * copied source set are pruned (one-way sync).
2691
+ *
2692
+ * `sourceRevision` pins the read to a point in time. A promotion of a large
2693
+ * set is not instantaneous, so without it the copy reads each node when its
2694
+ * turn comes and a writer working in parallel lands partly inside the result
2695
+ * — a torn snapshot. Pass the revision captured when the operation was
2696
+ * decided (see `getHead`) to copy exactly that state. The target branch is
2697
+ * always resolved at its head: the pin says WHAT to copy, never where.
2691
2698
  */
2692
2699
  async copyNodes(sourceBranch, targetBranch, opts) {
2693
2700
  return this.sendRequest(
@@ -2697,7 +2704,8 @@ var Branches = class {
2697
2704
  workspace: opts.workspace,
2698
2705
  roots: opts.roots,
2699
2706
  recursive: opts.recursive ?? true,
2700
- delete_missing: opts.deleteMissing ?? false
2707
+ delete_missing: opts.deleteMissing ?? false,
2708
+ source_revision: opts.sourceRevision ?? null
2701
2709
  },
2702
2710
  "branch_copy_nodes" /* BranchCopyNodes */
2703
2711
  );