@fern-api/fdr-sdk 1.2.39-1829e82a64 → 1.2.39-2a1aa9df8f
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/js/converters/index.js +4 -9
- package/dist/js/converters/index.js.map +1 -1
- package/dist/js/converters/index.mjs +4 -9
- package/dist/js/converters/index.mjs.map +1 -1
- package/dist/js/index.js +4 -9
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +4 -9
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/navigation/index.js +4 -9
- package/dist/js/navigation/index.js.map +1 -1
- package/dist/js/navigation/index.mjs +4 -9
- package/dist/js/navigation/index.mjs.map +1 -1
- package/dist/js/navigation/ledger-root-builder.js +14 -6
- package/dist/js/navigation/ledger-root-builder.js.map +1 -1
- package/dist/js/navigation/ledger-root-builder.mjs +14 -6
- package/dist/js/navigation/ledger-root-builder.mjs.map +1 -1
- package/dist/navigation/__test__/findNode.authedRedirect.test.d.ts +2 -0
- package/dist/navigation/__test__/findNode.authedRedirect.test.d.ts.map +1 -0
- package/dist/navigation/__test__/findNode.authedRedirect.test.js +184 -0
- package/dist/navigation/__test__/findNode.authedRedirect.test.js.map +1 -0
- package/dist/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.d.ts +2 -0
- package/dist/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.d.ts.map +1 -0
- package/dist/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.js +85 -0
- package/dist/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.js.map +1 -0
- package/dist/navigation/__test__/ledger-root-builder.skipSlugApiReference.test.d.ts +2 -0
- package/dist/navigation/__test__/ledger-root-builder.skipSlugApiReference.test.d.ts.map +1 -0
- package/dist/navigation/__test__/ledger-root-builder.skipSlugApiReference.test.js +210 -0
- package/dist/navigation/__test__/ledger-root-builder.skipSlugApiReference.test.js.map +1 -0
- package/dist/navigation/ledger-root-builder.d.ts +5 -1
- package/dist/navigation/ledger-root-builder.d.ts.map +1 -1
- package/dist/navigation/ledger-root-builder.js +27 -12
- package/dist/navigation/ledger-root-builder.js.map +1 -1
- package/dist/navigation/utils/findNode.d.ts +1 -0
- package/dist/navigation/utils/findNode.d.ts.map +1 -1
- package/dist/navigation/utils/findNode.js +3 -11
- package/dist/navigation/utils/findNode.js.map +1 -1
- package/dist/navigation/utils/followRedirect.d.ts.map +1 -1
- package/dist/navigation/utils/followRedirect.js +2 -0
- package/dist/navigation/utils/followRedirect.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/navigation/__test__/findNode.authedRedirect.test.d.ts +2 -0
- package/dist/types/navigation/__test__/findNode.authedRedirect.test.d.ts.map +1 -0
- package/dist/types/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.d.ts +2 -0
- package/dist/types/navigation/__test__/ledger-root-builder.collapsedDeterminism.test.d.ts.map +1 -0
- package/dist/types/navigation/__test__/ledger-root-builder.skipSlugApiReference.test.d.ts +2 -0
- package/dist/types/navigation/__test__/ledger-root-builder.skipSlugApiReference.test.d.ts.map +1 -0
- package/dist/types/navigation/ledger-root-builder.d.ts +5 -1
- package/dist/types/navigation/ledger-root-builder.d.ts.map +1 -1
- package/dist/types/navigation/utils/findNode.d.ts +1 -0
- package/dist/types/navigation/utils/findNode.d.ts.map +1 -1
- package/dist/types/navigation/utils/followRedirect.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -805,6 +805,14 @@ function traverseDF(node, visit) {
|
|
|
805
805
|
}
|
|
806
806
|
|
|
807
807
|
// src/navigation/ledger-root-builder.ts
|
|
808
|
+
var STRUCTURAL_SEGMENT_TYPES = /* @__PURE__ */ new Set([
|
|
809
|
+
"section",
|
|
810
|
+
"apiReference",
|
|
811
|
+
"apiPackage",
|
|
812
|
+
"changelog"
|
|
813
|
+
]);
|
|
814
|
+
var API_NODE_SEGMENT_TYPES = /* @__PURE__ */ new Set(["apiReference", "apiPackage"]);
|
|
815
|
+
var INFRA_SEGMENT_TYPES = /* @__PURE__ */ new Set(["files", "redirects"]);
|
|
808
816
|
function createBuildContext(basePath) {
|
|
809
817
|
const seen = /* @__PURE__ */ new Map();
|
|
810
818
|
const basePrefix = basePath.replace(/^\/+|\/+$/g, "");
|
|
@@ -882,7 +890,7 @@ function toViewers(viewers) {
|
|
|
882
890
|
return viewers.map((v) => RoleId(v));
|
|
883
891
|
}
|
|
884
892
|
function mergeVariantViewers(seg) {
|
|
885
|
-
const segViewers =
|
|
893
|
+
const segViewers = STRUCTURAL_SEGMENT_TYPES.has(seg.metadata.type) ? seg.metadata.viewers : void 0;
|
|
886
894
|
const variantViewers = seg.variant?.viewers;
|
|
887
895
|
if ((segViewers == null || segViewers.length === 0) && (variantViewers == null || variantViewers.length === 0)) {
|
|
888
896
|
return void 0;
|
|
@@ -1570,7 +1578,7 @@ function buildSectionTree(ctx, scopeSegs, parentPath, scopePrefix, changelogScop
|
|
|
1570
1578
|
const type = metaStr(s.seg.metadata, "type");
|
|
1571
1579
|
const childIndex = metaNum(s.seg.metadata, "childIndex");
|
|
1572
1580
|
let node;
|
|
1573
|
-
if (type
|
|
1581
|
+
if (API_NODE_SEGMENT_TYPES.has(type ?? "")) {
|
|
1574
1582
|
node = apiReferenceNode(ctx, s, scopeSegs, scopePrefix);
|
|
1575
1583
|
} else if (type === "changelog") {
|
|
1576
1584
|
node = changelogNode(ctx, s, changelogScopePrefix ?? scopePrefix);
|
|
@@ -1634,7 +1642,7 @@ function buildSidebarRootChildren(ctx, scopeSegs, scopePrefix, changelogScopePre
|
|
|
1634
1642
|
if (type === "tabRoot" && metaBool(s.seg.metadata, "landingPage") === true) {
|
|
1635
1643
|
continue;
|
|
1636
1644
|
}
|
|
1637
|
-
if (type === "tabRoot" || sec === "" && type
|
|
1645
|
+
if (type === "tabRoot" || sec === "" && !STRUCTURAL_SEGMENT_TYPES.has(type ?? "")) {
|
|
1638
1646
|
for (const r of s.nav) {
|
|
1639
1647
|
const node = artifactToNode(ctx, r);
|
|
1640
1648
|
if (node != null) {
|
|
@@ -1651,12 +1659,12 @@ function buildSidebarRootChildren(ctx, scopeSegs, scopePrefix, changelogScopePre
|
|
|
1651
1659
|
}
|
|
1652
1660
|
const parent = parentSectionPath(sec);
|
|
1653
1661
|
const isRootLevel = parent === "" || !sectionPaths.has(parent) && nearestExistingAncestor(sec, sectionPaths) === "";
|
|
1654
|
-
if (isRootLevel && hasRootSection) {
|
|
1662
|
+
if (isRootLevel && hasRootSection && sec !== "") {
|
|
1655
1663
|
continue;
|
|
1656
1664
|
}
|
|
1657
1665
|
if (isRootLevel) {
|
|
1658
1666
|
let node;
|
|
1659
|
-
if (type
|
|
1667
|
+
if (API_NODE_SEGMENT_TYPES.has(type ?? "")) {
|
|
1660
1668
|
node = apiReferenceNode(ctx, s, scopeSegs, scopePrefix);
|
|
1661
1669
|
} else if (type === "changelog") {
|
|
1662
1670
|
node = changelogNode(ctx, s, changelogScopePrefix ?? scopePrefix);
|
|
@@ -1731,7 +1739,7 @@ function buildFullRootFromSegments(options) {
|
|
|
1731
1739
|
const ctx = createBuildContext(basePath);
|
|
1732
1740
|
const scoped = segments.filter((seg) => {
|
|
1733
1741
|
const t = metaStr(seg.metadata, "type");
|
|
1734
|
-
return t
|
|
1742
|
+
return !INFRA_SEGMENT_TYPES.has(t ?? "");
|
|
1735
1743
|
}).map((seg) => ({ seg, nav: navBySegment.get(seg.segmentHash) ?? [] }));
|
|
1736
1744
|
const rootSlug = asSlug(sourceRootSlug ?? basePath);
|
|
1737
1745
|
const scopesByKey = /* @__PURE__ */ new Map();
|