@fern-api/fdr-sdk 1.2.46-282936abd4 → 1.2.46-4b6622be55
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 +29 -1
- package/dist/js/navigation/ledger-root-builder.js.map +1 -1
- package/dist/js/navigation/ledger-root-builder.mjs +29 -1
- package/dist/js/navigation/ledger-root-builder.mjs.map +1 -1
- package/dist/js/orpc-client.js +36 -0
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +36 -0
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/navigation/__test__/ledger-root-builder.contentfulRedirectRepro.test.js +56 -1
- package/dist/navigation/__test__/ledger-root-builder.contentfulRedirectRepro.test.js.map +1 -1
- package/dist/navigation/__test__/ledger-root-builder.withinVersionDedup.test.d.ts +2 -0
- package/dist/navigation/__test__/ledger-root-builder.withinVersionDedup.test.d.ts.map +1 -0
- package/dist/navigation/__test__/ledger-root-builder.withinVersionDedup.test.js +408 -0
- package/dist/navigation/__test__/ledger-root-builder.withinVersionDedup.test.js.map +1 -0
- package/dist/navigation/ledger-root-builder.js +46 -1
- package/dist/navigation/ledger-root-builder.js.map +1 -1
- package/dist/orpc-client/docs-ledger/__test__/config-files.navFiles.test.js +28 -1
- package/dist/orpc-client/docs-ledger/__test__/config-files.navFiles.test.js.map +1 -1
- package/dist/orpc-client/docs-ledger/config-files.d.ts.map +1 -1
- package/dist/orpc-client/docs-ledger/config-files.js +34 -0
- package/dist/orpc-client/docs-ledger/config-files.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/navigation/__test__/ledger-root-builder.withinVersionDedup.test.d.ts +2 -0
- package/dist/types/navigation/__test__/ledger-root-builder.withinVersionDedup.test.d.ts.map +1 -0
- package/dist/types/orpc-client/docs-ledger/config-files.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/js/orpc-client.mjs
CHANGED
|
@@ -5602,6 +5602,38 @@ function isDarkAndLight(colors) {
|
|
|
5602
5602
|
return colors.type === "darkAndLight";
|
|
5603
5603
|
}
|
|
5604
5604
|
var NAV_ICON_FILE_PREFIX = "file:";
|
|
5605
|
+
var FileTokenTreeSchema = z32.lazy(
|
|
5606
|
+
() => z32.union([
|
|
5607
|
+
z32.string(),
|
|
5608
|
+
z32.number(),
|
|
5609
|
+
z32.boolean(),
|
|
5610
|
+
z32.null(),
|
|
5611
|
+
z32.array(FileTokenTreeSchema),
|
|
5612
|
+
z32.record(z32.string(), FileTokenTreeSchema)
|
|
5613
|
+
])
|
|
5614
|
+
);
|
|
5615
|
+
var ConfigFileTokenViewSchema = z32.object({
|
|
5616
|
+
landingPage: FileTokenTreeSchema.optional().catch(void 0)
|
|
5617
|
+
});
|
|
5618
|
+
function addFileTokenPath(paths, value) {
|
|
5619
|
+
if (typeof value === "string") {
|
|
5620
|
+
if (value.startsWith(NAV_ICON_FILE_PREFIX) && value.length > NAV_ICON_FILE_PREFIX.length) {
|
|
5621
|
+
paths.add(value.slice(NAV_ICON_FILE_PREFIX.length));
|
|
5622
|
+
}
|
|
5623
|
+
return;
|
|
5624
|
+
}
|
|
5625
|
+
if (Array.isArray(value)) {
|
|
5626
|
+
for (const item of value) {
|
|
5627
|
+
addFileTokenPath(paths, item);
|
|
5628
|
+
}
|
|
5629
|
+
return;
|
|
5630
|
+
}
|
|
5631
|
+
if (value !== null && typeof value === "object") {
|
|
5632
|
+
for (const item of Object.values(value)) {
|
|
5633
|
+
addFileTokenPath(paths, item);
|
|
5634
|
+
}
|
|
5635
|
+
}
|
|
5636
|
+
}
|
|
5605
5637
|
var SegmentDetailIconViewSchema = z32.object({
|
|
5606
5638
|
icon: z32.string().nullish().catch(void 0),
|
|
5607
5639
|
metadata: z32.object({
|
|
@@ -5649,6 +5681,10 @@ function collectNavFilePaths(segments) {
|
|
|
5649
5681
|
function collectConfigFilePaths(config) {
|
|
5650
5682
|
const paths = /* @__PURE__ */ new Set();
|
|
5651
5683
|
const view = ConfigViewSchema.parse(config);
|
|
5684
|
+
const fileTokenView = ConfigFileTokenViewSchema.parse(config);
|
|
5685
|
+
if (fileTokenView.landingPage != null) {
|
|
5686
|
+
addFileTokenPath(paths, fileTokenView.landingPage);
|
|
5687
|
+
}
|
|
5652
5688
|
if (view.favicon != null) {
|
|
5653
5689
|
paths.add(view.favicon);
|
|
5654
5690
|
}
|