@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.js
CHANGED
|
@@ -6247,6 +6247,38 @@ function isDarkAndLight(colors) {
|
|
|
6247
6247
|
return colors.type === "darkAndLight";
|
|
6248
6248
|
}
|
|
6249
6249
|
var NAV_ICON_FILE_PREFIX = "file:";
|
|
6250
|
+
var FileTokenTreeSchema = z32.lazy(
|
|
6251
|
+
() => z32.union([
|
|
6252
|
+
z32.string(),
|
|
6253
|
+
z32.number(),
|
|
6254
|
+
z32.boolean(),
|
|
6255
|
+
z32.null(),
|
|
6256
|
+
z32.array(FileTokenTreeSchema),
|
|
6257
|
+
z32.record(z32.string(), FileTokenTreeSchema)
|
|
6258
|
+
])
|
|
6259
|
+
);
|
|
6260
|
+
var ConfigFileTokenViewSchema = z32.object({
|
|
6261
|
+
landingPage: FileTokenTreeSchema.optional().catch(void 0)
|
|
6262
|
+
});
|
|
6263
|
+
function addFileTokenPath(paths, value) {
|
|
6264
|
+
if (typeof value === "string") {
|
|
6265
|
+
if (value.startsWith(NAV_ICON_FILE_PREFIX) && value.length > NAV_ICON_FILE_PREFIX.length) {
|
|
6266
|
+
paths.add(value.slice(NAV_ICON_FILE_PREFIX.length));
|
|
6267
|
+
}
|
|
6268
|
+
return;
|
|
6269
|
+
}
|
|
6270
|
+
if (Array.isArray(value)) {
|
|
6271
|
+
for (const item of value) {
|
|
6272
|
+
addFileTokenPath(paths, item);
|
|
6273
|
+
}
|
|
6274
|
+
return;
|
|
6275
|
+
}
|
|
6276
|
+
if (value !== null && typeof value === "object") {
|
|
6277
|
+
for (const item of Object.values(value)) {
|
|
6278
|
+
addFileTokenPath(paths, item);
|
|
6279
|
+
}
|
|
6280
|
+
}
|
|
6281
|
+
}
|
|
6250
6282
|
var SegmentDetailIconViewSchema = z32.object({
|
|
6251
6283
|
icon: z32.string().nullish().catch(void 0),
|
|
6252
6284
|
metadata: z32.object({
|
|
@@ -6294,6 +6326,10 @@ function collectNavFilePaths(segments) {
|
|
|
6294
6326
|
function collectConfigFilePaths(config) {
|
|
6295
6327
|
const paths = /* @__PURE__ */ new Set();
|
|
6296
6328
|
const view = ConfigViewSchema.parse(config);
|
|
6329
|
+
const fileTokenView = ConfigFileTokenViewSchema.parse(config);
|
|
6330
|
+
if (fileTokenView.landingPage != null) {
|
|
6331
|
+
addFileTokenPath(paths, fileTokenView.landingPage);
|
|
6332
|
+
}
|
|
6297
6333
|
if (view.favicon != null) {
|
|
6298
6334
|
paths.add(view.favicon);
|
|
6299
6335
|
}
|