@fern-api/fdr-sdk 1.2.91-ddab979b89 → 1.2.92-44ed75bcdd

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.
@@ -14929,9 +14929,6 @@ function toUnversionedSlug(slug, versionSlug) {
14929
14929
  return Slug(slug.replace(new RegExp(`^${escapeRegExp4(versionSlug)}(/|$)`), ""));
14930
14930
  }
14931
14931
 
14932
- // src/navigation/utils/pruneNavigationTree.ts
14933
- import structuredClone from "@ungap/structured-clone";
14934
-
14935
14932
  // src/utils/traversers/prunetree.ts
14936
14933
  function prunetree(root, opts) {
14937
14934
  const { predicate, getChildren: getChildren3, deleter, getPointer = (node) => node } = opts;
@@ -15068,11 +15065,20 @@ function mutableDeleteChild(parent, node) {
15068
15065
  // src/navigation/utils/pruneNavigationTree.ts
15069
15066
  var Pruner = class _Pruner {
15070
15067
  static from(tree) {
15068
+ return new _Pruner(structuredClone(tree));
15069
+ }
15070
+ /**
15071
+ * Skips the defensive clone `from` makes: the caller transfers ownership of
15072
+ * `tree` and must not read it afterwards. Use when the tree is already a
15073
+ * private copy (e.g. cloned one step earlier in the same pipeline) — cloning
15074
+ * a megabyte-scale nav tree twice per page dominates static-build GC.
15075
+ */
15076
+ static fromOwned(tree) {
15071
15077
  return new _Pruner(tree);
15072
15078
  }
15073
15079
  tree;
15074
15080
  constructor(tree) {
15075
- this.tree = structuredClone(tree);
15081
+ this.tree = tree;
15076
15082
  }
15077
15083
  keep(predicate) {
15078
15084
  if (this.tree == null) {