@fern-api/fdr-sdk 1.2.42-23647d2912 → 1.2.42-304ea6b285
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/navigation/ledger-root-builder.js +0 -27
- package/dist/js/navigation/ledger-root-builder.js.map +1 -1
- package/dist/js/navigation/ledger-root-builder.mjs +0 -27
- package/dist/js/navigation/ledger-root-builder.mjs.map +1 -1
- package/dist/navigation/ledger-root-builder.js +0 -46
- package/dist/navigation/ledger-root-builder.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/navigation/__test__/ledger-root-builder.crossProductDedup.test.d.ts +0 -2
- package/dist/navigation/__test__/ledger-root-builder.crossProductDedup.test.d.ts.map +0 -1
- package/dist/navigation/__test__/ledger-root-builder.crossProductDedup.test.js +0 -267
- package/dist/navigation/__test__/ledger-root-builder.crossProductDedup.test.js.map +0 -1
- package/dist/types/navigation/__test__/ledger-root-builder.crossProductDedup.test.d.ts +0 -2
- package/dist/types/navigation/__test__/ledger-root-builder.crossProductDedup.test.d.ts.map +0 -1
|
@@ -2397,7 +2397,6 @@ function buildProductGroup(ctx, products, scoped, rootSlug, skipSharedSectionMer
|
|
|
2397
2397
|
};
|
|
2398
2398
|
return node;
|
|
2399
2399
|
});
|
|
2400
|
-
markCrossProductCanonicalSlugs(children);
|
|
2401
2400
|
return {
|
|
2402
2401
|
type: "productgroup",
|
|
2403
2402
|
id: ctx.nodeId("productgroup"),
|
|
@@ -2409,32 +2408,6 @@ function buildProductGroup(ctx, products, scoped, rootSlug, skipSharedSectionMer
|
|
|
2409
2408
|
children
|
|
2410
2409
|
};
|
|
2411
2410
|
}
|
|
2412
|
-
function markCrossProductCanonicalSlugs(productNodes) {
|
|
2413
|
-
const pageIdToCanonical = /* @__PURE__ */ new Map();
|
|
2414
|
-
const sorted = [...productNodes].sort((a, b) => {
|
|
2415
|
-
if (a.default !== b.default) {
|
|
2416
|
-
return a.default ? -1 : 1;
|
|
2417
|
-
}
|
|
2418
|
-
return 0;
|
|
2419
|
-
});
|
|
2420
|
-
for (const product of sorted) {
|
|
2421
|
-
traverseDF(product, (child) => {
|
|
2422
|
-
if (hasMetadata(child) && isPage(child)) {
|
|
2423
|
-
const pid = getPageId(child);
|
|
2424
|
-
if (pid == null) {
|
|
2425
|
-
return;
|
|
2426
|
-
}
|
|
2427
|
-
const key = `pid:${pid}`;
|
|
2428
|
-
const canonical = pageIdToCanonical.get(key);
|
|
2429
|
-
if (canonical != null && !product.default) {
|
|
2430
|
-
child.canonicalSlug = canonical;
|
|
2431
|
-
} else if (canonical == null) {
|
|
2432
|
-
pageIdToCanonical.set(key, child.canonicalSlug ?? child.slug);
|
|
2433
|
-
}
|
|
2434
|
-
}
|
|
2435
|
-
});
|
|
2436
|
-
}
|
|
2437
|
-
}
|
|
2438
2411
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2439
2412
|
0 && (module.exports = {
|
|
2440
2413
|
apiLeafNodeFromNavRoute,
|