@fern-api/fdr-sdk 1.2.46-c24af8d81b → 1.2.47-644c48eaef
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 +46 -9
- package/dist/js/navigation/ledger-root-builder.js.map +1 -1
- package/dist/js/navigation/ledger-root-builder.mjs +46 -9
- package/dist/js/navigation/ledger-root-builder.mjs.map +1 -1
- package/dist/navigation/__test__/ledger-canonical-bugs.repro.test.d.ts +2 -0
- package/dist/navigation/__test__/ledger-canonical-bugs.repro.test.d.ts.map +1 -0
- package/dist/navigation/__test__/ledger-canonical-bugs.repro.test.js +335 -0
- package/dist/navigation/__test__/ledger-canonical-bugs.repro.test.js.map +1 -0
- package/dist/navigation/__test__/ledger-root-builder.contentfulRedirectRepro.test.js +8 -0
- 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.d.ts.map +1 -1
- package/dist/navigation/ledger-root-builder.js +80 -16
- package/dist/navigation/ledger-root-builder.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/navigation/__test__/ledger-canonical-bugs.repro.test.d.ts +2 -0
- package/dist/types/navigation/__test__/ledger-canonical-bugs.repro.test.d.ts.map +1 -0
- 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/navigation/ledger-root-builder.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import * as FernNavigation from "../index.js";
|
|
3
|
+
import { buildFullRootFromSegments } from "../ledger-root-builder.js";
|
|
4
|
+
function detail(opts) {
|
|
5
|
+
return {
|
|
6
|
+
id: opts.id,
|
|
7
|
+
displayName: opts.name,
|
|
8
|
+
icon: null,
|
|
9
|
+
sortOrder: 0,
|
|
10
|
+
hidden: false,
|
|
11
|
+
viewers: [],
|
|
12
|
+
orphaned: false,
|
|
13
|
+
featureFlags: [],
|
|
14
|
+
metadata: { slug: opts.slug, default: opts.isDefault ?? false, pointsTo: opts.pointsTo }
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function seg(opts) {
|
|
18
|
+
return {
|
|
19
|
+
segmentId: opts.segmentHash,
|
|
20
|
+
segmentHash: opts.segmentHash,
|
|
21
|
+
section: opts.section ?? "",
|
|
22
|
+
locale: "en",
|
|
23
|
+
sortOrder: 0,
|
|
24
|
+
hidden: false,
|
|
25
|
+
metadata: opts.metadata ?? { type: "section" },
|
|
26
|
+
product: null,
|
|
27
|
+
version: opts.version ?? null,
|
|
28
|
+
variant: null,
|
|
29
|
+
tab: null
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function epRoute(opts) {
|
|
33
|
+
return {
|
|
34
|
+
type: "rest",
|
|
35
|
+
fullPath: opts.fullPath,
|
|
36
|
+
stream: null,
|
|
37
|
+
hidden: false,
|
|
38
|
+
metadata: {
|
|
39
|
+
title: opts.title,
|
|
40
|
+
endpointId: opts.endpointId,
|
|
41
|
+
method: opts.method,
|
|
42
|
+
apiDefinitionId: opts.apiDefinitionId,
|
|
43
|
+
isResponseStream: false
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function mdRoute(opts) {
|
|
48
|
+
return {
|
|
49
|
+
type: "markdown",
|
|
50
|
+
fullPath: opts.fullPath,
|
|
51
|
+
hidden: false,
|
|
52
|
+
metadata: { title: opts.title, pageId: opts.pageId }
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function findCanonicalSlug(root, slug) {
|
|
56
|
+
const result = FernNavigation.utils.findNode(root, FernNavigation.Slug(slug));
|
|
57
|
+
if (result.type === "found") {
|
|
58
|
+
return result.node.canonicalSlug;
|
|
59
|
+
}
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
describe("buildFullRootFromSegments - within-version canonical slug deduplication", () => {
|
|
63
|
+
it("deduplicates same endpoint appearing under two sections (unversioned)", () => {
|
|
64
|
+
const root = buildFullRootFromSegments({
|
|
65
|
+
basePath: "",
|
|
66
|
+
title: "Test",
|
|
67
|
+
segments: [
|
|
68
|
+
seg({
|
|
69
|
+
segmentHash: "seg-content",
|
|
70
|
+
section: "content/redirects",
|
|
71
|
+
metadata: { type: "apiReference", apiDefinitionId: "api-store" }
|
|
72
|
+
}),
|
|
73
|
+
seg({
|
|
74
|
+
segmentHash: "seg-mgmt",
|
|
75
|
+
section: "management/redirects",
|
|
76
|
+
metadata: { type: "apiReference", apiDefinitionId: "api-store" }
|
|
77
|
+
})
|
|
78
|
+
],
|
|
79
|
+
navBySegment: new Map([
|
|
80
|
+
[
|
|
81
|
+
"seg-content",
|
|
82
|
+
[
|
|
83
|
+
epRoute({
|
|
84
|
+
fullPath: "content/redirects/delete-redirect",
|
|
85
|
+
title: "Delete Redirect",
|
|
86
|
+
endpointId: "delete-redirect",
|
|
87
|
+
method: "DELETE",
|
|
88
|
+
apiDefinitionId: "api-store"
|
|
89
|
+
}),
|
|
90
|
+
epRoute({
|
|
91
|
+
fullPath: "content/redirects/create-redirect",
|
|
92
|
+
title: "Create Redirect",
|
|
93
|
+
endpointId: "create-redirect",
|
|
94
|
+
method: "POST",
|
|
95
|
+
apiDefinitionId: "api-store"
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
],
|
|
99
|
+
[
|
|
100
|
+
"seg-mgmt",
|
|
101
|
+
[
|
|
102
|
+
epRoute({
|
|
103
|
+
fullPath: "management/redirects/delete-redirect",
|
|
104
|
+
title: "Delete Redirect",
|
|
105
|
+
endpointId: "delete-redirect",
|
|
106
|
+
method: "DELETE",
|
|
107
|
+
apiDefinitionId: "api-store"
|
|
108
|
+
}),
|
|
109
|
+
epRoute({
|
|
110
|
+
fullPath: "management/redirects/create-redirect",
|
|
111
|
+
title: "Create Redirect",
|
|
112
|
+
endpointId: "create-redirect",
|
|
113
|
+
method: "POST",
|
|
114
|
+
apiDefinitionId: "api-store"
|
|
115
|
+
})
|
|
116
|
+
]
|
|
117
|
+
]
|
|
118
|
+
])
|
|
119
|
+
});
|
|
120
|
+
// First occurrence (content section): no canonicalSlug
|
|
121
|
+
expect(findCanonicalSlug(root, "content/redirects/delete-redirect")).toBeUndefined();
|
|
122
|
+
expect(findCanonicalSlug(root, "content/redirects/create-redirect")).toBeUndefined();
|
|
123
|
+
// Second occurrence (management section): canonicalSlug points to first
|
|
124
|
+
expect(findCanonicalSlug(root, "management/redirects/delete-redirect")).toBe("content/redirects/delete-redirect");
|
|
125
|
+
expect(findCanonicalSlug(root, "management/redirects/create-redirect")).toBe("content/redirects/create-redirect");
|
|
126
|
+
});
|
|
127
|
+
it("deduplicates same endpoint across three sections", () => {
|
|
128
|
+
const root = buildFullRootFromSegments({
|
|
129
|
+
basePath: "",
|
|
130
|
+
title: "Test",
|
|
131
|
+
segments: [
|
|
132
|
+
seg({
|
|
133
|
+
segmentHash: "seg-a",
|
|
134
|
+
section: "section-a",
|
|
135
|
+
metadata: { type: "apiReference", apiDefinitionId: "api-1" }
|
|
136
|
+
}),
|
|
137
|
+
seg({
|
|
138
|
+
segmentHash: "seg-b",
|
|
139
|
+
section: "section-b",
|
|
140
|
+
metadata: { type: "apiReference", apiDefinitionId: "api-1" }
|
|
141
|
+
}),
|
|
142
|
+
seg({
|
|
143
|
+
segmentHash: "seg-c",
|
|
144
|
+
section: "section-c",
|
|
145
|
+
metadata: { type: "apiReference", apiDefinitionId: "api-1" }
|
|
146
|
+
})
|
|
147
|
+
],
|
|
148
|
+
navBySegment: new Map([
|
|
149
|
+
[
|
|
150
|
+
"seg-a",
|
|
151
|
+
[
|
|
152
|
+
epRoute({
|
|
153
|
+
fullPath: "section-a/list-items",
|
|
154
|
+
title: "List Items",
|
|
155
|
+
endpointId: "list-items",
|
|
156
|
+
method: "GET",
|
|
157
|
+
apiDefinitionId: "api-1"
|
|
158
|
+
})
|
|
159
|
+
]
|
|
160
|
+
],
|
|
161
|
+
[
|
|
162
|
+
"seg-b",
|
|
163
|
+
[
|
|
164
|
+
epRoute({
|
|
165
|
+
fullPath: "section-b/list-items",
|
|
166
|
+
title: "List Items",
|
|
167
|
+
endpointId: "list-items",
|
|
168
|
+
method: "GET",
|
|
169
|
+
apiDefinitionId: "api-1"
|
|
170
|
+
})
|
|
171
|
+
]
|
|
172
|
+
],
|
|
173
|
+
[
|
|
174
|
+
"seg-c",
|
|
175
|
+
[
|
|
176
|
+
epRoute({
|
|
177
|
+
fullPath: "section-c/list-items",
|
|
178
|
+
title: "List Items",
|
|
179
|
+
endpointId: "list-items",
|
|
180
|
+
method: "GET",
|
|
181
|
+
apiDefinitionId: "api-1"
|
|
182
|
+
})
|
|
183
|
+
]
|
|
184
|
+
]
|
|
185
|
+
])
|
|
186
|
+
});
|
|
187
|
+
// First: canonical
|
|
188
|
+
expect(findCanonicalSlug(root, "section-a/list-items")).toBeUndefined();
|
|
189
|
+
// Second and third: point to first
|
|
190
|
+
expect(findCanonicalSlug(root, "section-b/list-items")).toBe("section-a/list-items");
|
|
191
|
+
expect(findCanonicalSlug(root, "section-c/list-items")).toBe("section-a/list-items");
|
|
192
|
+
});
|
|
193
|
+
it("does NOT deduplicate different endpoints in same section", () => {
|
|
194
|
+
const root = buildFullRootFromSegments({
|
|
195
|
+
basePath: "",
|
|
196
|
+
title: "Test",
|
|
197
|
+
segments: [
|
|
198
|
+
seg({
|
|
199
|
+
segmentHash: "seg-api",
|
|
200
|
+
section: "api-ref",
|
|
201
|
+
metadata: { type: "apiReference", apiDefinitionId: "api-1" }
|
|
202
|
+
})
|
|
203
|
+
],
|
|
204
|
+
navBySegment: new Map([
|
|
205
|
+
[
|
|
206
|
+
"seg-api",
|
|
207
|
+
[
|
|
208
|
+
epRoute({
|
|
209
|
+
fullPath: "api-ref/list-items",
|
|
210
|
+
title: "List Items",
|
|
211
|
+
endpointId: "list-items",
|
|
212
|
+
method: "GET",
|
|
213
|
+
apiDefinitionId: "api-1"
|
|
214
|
+
}),
|
|
215
|
+
epRoute({
|
|
216
|
+
fullPath: "api-ref/create-item",
|
|
217
|
+
title: "Create Item",
|
|
218
|
+
endpointId: "create-item",
|
|
219
|
+
method: "POST",
|
|
220
|
+
apiDefinitionId: "api-1"
|
|
221
|
+
})
|
|
222
|
+
]
|
|
223
|
+
]
|
|
224
|
+
])
|
|
225
|
+
});
|
|
226
|
+
expect(findCanonicalSlug(root, "api-ref/list-items")).toBeUndefined();
|
|
227
|
+
expect(findCanonicalSlug(root, "api-ref/create-item")).toBeUndefined();
|
|
228
|
+
});
|
|
229
|
+
it("deduplicates markdown pages with same pageId across sections", () => {
|
|
230
|
+
const root = buildFullRootFromSegments({
|
|
231
|
+
basePath: "",
|
|
232
|
+
title: "Test",
|
|
233
|
+
segments: [
|
|
234
|
+
seg({ segmentHash: "seg-guides", section: "guides" }),
|
|
235
|
+
seg({ segmentHash: "seg-reference", section: "reference" })
|
|
236
|
+
],
|
|
237
|
+
navBySegment: new Map([
|
|
238
|
+
[
|
|
239
|
+
"seg-guides",
|
|
240
|
+
[mdRoute({ fullPath: "guides/auth", title: "Authentication", pageId: "pg-auth" })]
|
|
241
|
+
],
|
|
242
|
+
[
|
|
243
|
+
"seg-reference",
|
|
244
|
+
[mdRoute({ fullPath: "reference/auth", title: "Authentication", pageId: "pg-auth" })]
|
|
245
|
+
]
|
|
246
|
+
])
|
|
247
|
+
});
|
|
248
|
+
expect(findCanonicalSlug(root, "guides/auth")).toBeUndefined();
|
|
249
|
+
expect(findCanonicalSlug(root, "reference/auth")).toBe("guides/auth");
|
|
250
|
+
});
|
|
251
|
+
it("does NOT deduplicate markdown pages with different pageIds and different titles", () => {
|
|
252
|
+
const root = buildFullRootFromSegments({
|
|
253
|
+
basePath: "",
|
|
254
|
+
title: "Test",
|
|
255
|
+
segments: [
|
|
256
|
+
seg({ segmentHash: "seg-guides", section: "guides", metadata: { type: "section", title: "Guides" } }),
|
|
257
|
+
seg({
|
|
258
|
+
segmentHash: "seg-reference",
|
|
259
|
+
section: "reference",
|
|
260
|
+
metadata: { type: "section", title: "Reference" }
|
|
261
|
+
})
|
|
262
|
+
],
|
|
263
|
+
navBySegment: new Map([
|
|
264
|
+
[
|
|
265
|
+
"seg-guides",
|
|
266
|
+
[mdRoute({ fullPath: "guides/auth", title: "Auth Guide", pageId: "pg-auth-1" })]
|
|
267
|
+
],
|
|
268
|
+
[
|
|
269
|
+
"seg-reference",
|
|
270
|
+
[mdRoute({ fullPath: "reference/auth", title: "Auth Reference", pageId: "pg-auth-2" })]
|
|
271
|
+
]
|
|
272
|
+
])
|
|
273
|
+
});
|
|
274
|
+
expect(findCanonicalSlug(root, "guides/auth")).toBeUndefined();
|
|
275
|
+
expect(findCanonicalSlug(root, "reference/auth")).toBeUndefined();
|
|
276
|
+
});
|
|
277
|
+
it("deduplicates within versioned site (default version)", () => {
|
|
278
|
+
const defaultVersion = detail({
|
|
279
|
+
id: "v-default",
|
|
280
|
+
name: "v1",
|
|
281
|
+
slug: "v1",
|
|
282
|
+
isDefault: true,
|
|
283
|
+
pointsTo: "v1/section-a/list-items"
|
|
284
|
+
});
|
|
285
|
+
const root = buildFullRootFromSegments({
|
|
286
|
+
basePath: "",
|
|
287
|
+
title: "Test",
|
|
288
|
+
segments: [
|
|
289
|
+
seg({
|
|
290
|
+
segmentHash: "seg-a",
|
|
291
|
+
version: defaultVersion,
|
|
292
|
+
section: "v1/section-a",
|
|
293
|
+
metadata: { type: "apiReference", apiDefinitionId: "api-1" }
|
|
294
|
+
}),
|
|
295
|
+
seg({
|
|
296
|
+
segmentHash: "seg-b",
|
|
297
|
+
version: defaultVersion,
|
|
298
|
+
section: "v1/section-b",
|
|
299
|
+
metadata: { type: "apiReference", apiDefinitionId: "api-1" }
|
|
300
|
+
})
|
|
301
|
+
],
|
|
302
|
+
navBySegment: new Map([
|
|
303
|
+
[
|
|
304
|
+
"seg-a",
|
|
305
|
+
[
|
|
306
|
+
epRoute({
|
|
307
|
+
fullPath: "v1/section-a/list-items",
|
|
308
|
+
title: "List Items",
|
|
309
|
+
endpointId: "list-items",
|
|
310
|
+
method: "GET",
|
|
311
|
+
apiDefinitionId: "api-1"
|
|
312
|
+
})
|
|
313
|
+
]
|
|
314
|
+
],
|
|
315
|
+
[
|
|
316
|
+
"seg-b",
|
|
317
|
+
[
|
|
318
|
+
epRoute({
|
|
319
|
+
fullPath: "v1/section-b/list-items",
|
|
320
|
+
title: "List Items",
|
|
321
|
+
endpointId: "list-items",
|
|
322
|
+
method: "GET",
|
|
323
|
+
apiDefinitionId: "api-1"
|
|
324
|
+
})
|
|
325
|
+
]
|
|
326
|
+
]
|
|
327
|
+
])
|
|
328
|
+
});
|
|
329
|
+
// For a default version, markDefaultVersionCanonicalSlugs strips
|
|
330
|
+
// the version prefix from ALL nodes' slugs, so every node gets a
|
|
331
|
+
// canonicalSlug (even the first occurrence — it becomes self-canonical
|
|
332
|
+
// at the pruned slug). Within-scope dedup then makes the second
|
|
333
|
+
// occurrence point to the first occurrence's pruned slug.
|
|
334
|
+
// After default-version slug elision, both nodes have canonicalSlug
|
|
335
|
+
// set to the first occurrence's pruned slug.
|
|
336
|
+
const slugA = findCanonicalSlug(root, "section-a/list-items");
|
|
337
|
+
const slugB = findCanonicalSlug(root, "section-b/list-items");
|
|
338
|
+
// Both point to the first occurrence's pruned slug (version prefix stripped).
|
|
339
|
+
// Node A is self-canonical (version elision), Node B is deduped to A.
|
|
340
|
+
expect(slugA).toBe("section-a/list-items");
|
|
341
|
+
expect(slugB).toBe("section-a/list-items");
|
|
342
|
+
});
|
|
343
|
+
it("leaves unique endpoints untouched when duplicates are deduped", () => {
|
|
344
|
+
const root = buildFullRootFromSegments({
|
|
345
|
+
basePath: "",
|
|
346
|
+
title: "Test",
|
|
347
|
+
segments: [
|
|
348
|
+
seg({
|
|
349
|
+
segmentHash: "seg-content",
|
|
350
|
+
section: "content",
|
|
351
|
+
metadata: { type: "apiReference", apiDefinitionId: "api-store" }
|
|
352
|
+
}),
|
|
353
|
+
seg({
|
|
354
|
+
segmentHash: "seg-mgmt",
|
|
355
|
+
section: "management",
|
|
356
|
+
metadata: { type: "apiReference", apiDefinitionId: "api-store" }
|
|
357
|
+
})
|
|
358
|
+
],
|
|
359
|
+
navBySegment: new Map([
|
|
360
|
+
[
|
|
361
|
+
"seg-content",
|
|
362
|
+
[
|
|
363
|
+
epRoute({
|
|
364
|
+
fullPath: "content/delete-redirect",
|
|
365
|
+
title: "Delete Redirect",
|
|
366
|
+
endpointId: "delete-redirect",
|
|
367
|
+
method: "DELETE",
|
|
368
|
+
apiDefinitionId: "api-store"
|
|
369
|
+
}),
|
|
370
|
+
epRoute({
|
|
371
|
+
fullPath: "content/list-pages",
|
|
372
|
+
title: "List Pages",
|
|
373
|
+
endpointId: "list-pages",
|
|
374
|
+
method: "GET",
|
|
375
|
+
apiDefinitionId: "api-store"
|
|
376
|
+
})
|
|
377
|
+
]
|
|
378
|
+
],
|
|
379
|
+
[
|
|
380
|
+
"seg-mgmt",
|
|
381
|
+
[
|
|
382
|
+
epRoute({
|
|
383
|
+
fullPath: "management/delete-redirect",
|
|
384
|
+
title: "Delete Redirect",
|
|
385
|
+
endpointId: "delete-redirect",
|
|
386
|
+
method: "DELETE",
|
|
387
|
+
apiDefinitionId: "api-store"
|
|
388
|
+
}),
|
|
389
|
+
epRoute({
|
|
390
|
+
fullPath: "management/list-scripts",
|
|
391
|
+
title: "List Scripts",
|
|
392
|
+
endpointId: "list-scripts",
|
|
393
|
+
method: "GET",
|
|
394
|
+
apiDefinitionId: "api-store"
|
|
395
|
+
})
|
|
396
|
+
]
|
|
397
|
+
]
|
|
398
|
+
])
|
|
399
|
+
});
|
|
400
|
+
// Shared endpoint: second occurrence points to first
|
|
401
|
+
expect(findCanonicalSlug(root, "content/delete-redirect")).toBeUndefined();
|
|
402
|
+
expect(findCanonicalSlug(root, "management/delete-redirect")).toBe("content/delete-redirect");
|
|
403
|
+
// Unique endpoints: untouched
|
|
404
|
+
expect(findCanonicalSlug(root, "content/list-pages")).toBeUndefined();
|
|
405
|
+
expect(findCanonicalSlug(root, "management/list-scripts")).toBeUndefined();
|
|
406
|
+
});
|
|
407
|
+
});
|
|
408
|
+
//# sourceMappingURL=ledger-root-builder.withinVersionDedup.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ledger-root-builder.withinVersionDedup.test.js","sourceRoot":"","sources":["../../../src/navigation/__test__/ledger-root-builder.withinVersionDedup.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,KAAK,cAAc,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,SAAS,MAAM,CAAC,IAAwF;IACpG,OAAO;QACH,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,WAAW,EAAE,IAAI,CAAC,IAAI;QACtB,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,CAAC;QACZ,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,EAAE;QAChB,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,IAAI,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;KAC3F,CAAC;AACN,CAAC;AAED,SAAS,GAAG,CAAC,IAKZ;IACG,OAAO;QACH,SAAS,EAAE,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CAC9D;AAED,2CAA2C;AAC3C,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAuBjE;AAoRD;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GACjB,cAAc,CAAC,YAAY,GAC3B,cAAc,CAAC,WAAW,GAC1B,cAAc,CAAC,aAAa,GAC5B,cAAc,CAAC,QAAQ,GACvB,cAAc,CAAC,WAAW,CAAC;AAOjC;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACnC,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,MAAM,EAChB,sBAAsB,EAAE,MAAM,GAC/B,WAAW,GAAG,SAAS,CAGzB;AA+KD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACtC,MAAM,EAAE,QAAQ,EAAE,EAClB,QAAQ,EAAE,MAAM,EAChB,sBAAsB,EAAE,MAAM,GAC/B,WAAW,EAAE,CAKf;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,GAAG,SAAS,CASxF;AA0bD;;;;;;GAMG;AACH,2CAA2C;AAC3C,wBAAgB,kBAAkB,CAC9B,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,WAAW,EAAE,EACxB,MAAM,EAAE,QAAQ,EAAE,GACnB,cAAc,CAAC,eAAe,EAAE,CAsElC;AA4zBD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,gBAAgB,GAAG,cAAc,CAAC,QAAQ,CA0F5F"}
|
|
@@ -623,10 +623,12 @@ function mergeChildrenByPosition(ctx, nav, sectionChildren) {
|
|
|
623
623
|
function sectionNode(ctx, scoped, sectionChildren, scopePrefix) {
|
|
624
624
|
const { seg, nav } = scoped;
|
|
625
625
|
const overview = overviewRoute(nav) ?? overviewRouteFromSegmentMeta(seg, nav);
|
|
626
|
-
//
|
|
627
|
-
//
|
|
628
|
-
//
|
|
629
|
-
|
|
626
|
+
// Prefer the overview page's actual pageId (which is what V1/V2 use
|
|
627
|
+
// for content-ID dedup), falling back to the segment metadata's
|
|
628
|
+
// overviewPageId. The two can diverge when the publisher writes a
|
|
629
|
+
// section-specific overviewPageId that differs from the page content
|
|
630
|
+
// ID, breaking cross-section canonical-slug dedup.
|
|
631
|
+
const overviewPageId = metaStr(overview?.metadata, "pageId") ?? metaStr(seg.metadata, "overviewPageId");
|
|
630
632
|
// Strip the leading scope prefix to prevent double-prefixing when the
|
|
631
633
|
// section path already includes the scope (e.g. section="2026-02-09"
|
|
632
634
|
// with scopePrefix="2026-02-09" would produce "2026-02-09/2026-02-09").
|
|
@@ -769,9 +771,9 @@ function buildApiChildren(ctx, scoped, scopeSegs, apiDefinitionId, scopePrefix)
|
|
|
769
771
|
function apiPackageChildNode(ctx, scoped, scopeSegs, parentApiDefinitionId, scopePrefix) {
|
|
770
772
|
const { seg, nav } = scoped;
|
|
771
773
|
const overview = overviewRoute(nav);
|
|
772
|
-
//
|
|
773
|
-
//
|
|
774
|
-
const overviewPageId = metaStr(seg.metadata, "overviewPageId");
|
|
774
|
+
// Prefer the overview page's actual pageId for content-ID dedup,
|
|
775
|
+
// falling back to segment metadata's overviewPageId (see sectionNode).
|
|
776
|
+
const overviewPageId = metaStr(overview?.metadata, "pageId") ?? metaStr(seg.metadata, "overviewPageId");
|
|
775
777
|
const apiDefinitionId = metaStr(seg.metadata, "apiDefinitionId") ?? parentApiDefinitionId;
|
|
776
778
|
// Use structuralNodeSlug so the package gets its own slug (matching V2)
|
|
777
779
|
// rather than inheriting the first endpoint's path.
|
|
@@ -875,9 +877,9 @@ export function mergeEndpointPairs(ctx, leafNodes, allNav) {
|
|
|
875
877
|
function apiReferenceNode(ctx, scoped, scopeSegs, scopePrefix) {
|
|
876
878
|
const { seg, nav } = scoped;
|
|
877
879
|
const overview = overviewRoute(nav);
|
|
878
|
-
//
|
|
879
|
-
//
|
|
880
|
-
const overviewPageId = metaStr(seg.metadata, "overviewPageId");
|
|
880
|
+
// Prefer the overview page's actual pageId for content-ID dedup,
|
|
881
|
+
// falling back to segment metadata's overviewPageId (see sectionNode).
|
|
882
|
+
const overviewPageId = metaStr(overview?.metadata, "pageId") ?? metaStr(seg.metadata, "overviewPageId");
|
|
881
883
|
const apiDefinitionId = metaStr(seg.metadata, "apiDefinitionId") ?? "";
|
|
882
884
|
// Slug: prefer the overview route, else a structural slug rooted at the
|
|
883
885
|
// enclosing scope (so the subtree stays inside the default-version prune
|
|
@@ -1916,7 +1918,7 @@ function buildTabbedOrSidebar(ctx, scopeSegs, tabsPresent, scopePrefix) {
|
|
|
1916
1918
|
}
|
|
1917
1919
|
function buildUnversioned(ctx, scopeSegs, scopePrefix, tabsPresent) {
|
|
1918
1920
|
const first = scopeSegs[0];
|
|
1919
|
-
|
|
1921
|
+
const node = {
|
|
1920
1922
|
type: "unversioned",
|
|
1921
1923
|
id: ctx.nodeId(`unversioned:${first?.seg.product?.id ?? "root"}`),
|
|
1922
1924
|
collapsed: undefined,
|
|
@@ -1926,6 +1928,10 @@ function buildUnversioned(ctx, scopeSegs, scopePrefix, tabsPresent) {
|
|
|
1926
1928
|
// namespace.
|
|
1927
1929
|
child: buildTabbedOrSidebar(ctx, scopeSegs, tabsPresent, scopePrefix)
|
|
1928
1930
|
};
|
|
1931
|
+
// Within-scope dedup for unversioned sites: collapse duplicate pages
|
|
1932
|
+
// that appear under multiple parent sections.
|
|
1933
|
+
markWithinScopeCanonicalSlugs(node);
|
|
1934
|
+
return node;
|
|
1929
1935
|
}
|
|
1930
1936
|
/**
|
|
1931
1937
|
* Merge shared (tab-level) sections from sibling versions into the default
|
|
@@ -2060,6 +2066,11 @@ function buildVersioned(ctx, versions, scoped, rootSlug, productPrefix, skipShar
|
|
|
2060
2066
|
// version subtree stays inside the default-version prune window.
|
|
2061
2067
|
child: buildTabbedOrSidebar(ctx, versionSegs, tabsPresent, asSlug(slug))
|
|
2062
2068
|
};
|
|
2069
|
+
// Within-version dedup: collapse duplicate pages that appear
|
|
2070
|
+
// under multiple parent sections (same endpointId, pageId, etc.).
|
|
2071
|
+
// Must run BEFORE markDefaultVersionCanonicalSlugs so the canonical
|
|
2072
|
+
// slug is transformed along with the rest of the version's slugs.
|
|
2073
|
+
markWithinScopeCanonicalSlugs(node);
|
|
2063
2074
|
if (node.default) {
|
|
2064
2075
|
markDefaultVersionCanonicalSlugs(node, productPrefix != null ? asSlug(productPrefix) : rootSlug, node.slug);
|
|
2065
2076
|
}
|
|
@@ -2193,6 +2204,50 @@ function buildLandingPage(ctx, scopeSegs) {
|
|
|
2193
2204
|
const landingSegment = scopeSegs.find((s) => metaStr(s.seg.metadata, "type") === "tabRoot" && metaBool(s.seg.metadata, "landingPage") === true);
|
|
2194
2205
|
return routeToLandingPage(ctx, landingSegment?.nav.find((route) => route.type === "markdown"));
|
|
2195
2206
|
}
|
|
2207
|
+
/**
|
|
2208
|
+
* Within a single version (or unversioned scope), deduplicate pages that
|
|
2209
|
+
* share the same content-identity key (endpointId, pageId, etc.).
|
|
2210
|
+
* The first occurrence in DFS order becomes canonical; subsequent
|
|
2211
|
+
* occurrences get `canonicalSlug` pointing to the first.
|
|
2212
|
+
*
|
|
2213
|
+
* This mirrors V2's global `#canonicalSlugs` map in v1ToV2.ts, which
|
|
2214
|
+
* deduplicates endpoints appearing under multiple parent sections within
|
|
2215
|
+
* the same version (e.g. the same endpoint under both
|
|
2216
|
+
* `content/store-content/redirects/` and `management/redirects/`).
|
|
2217
|
+
*/
|
|
2218
|
+
function markWithinScopeCanonicalSlugs(scopeNode) {
|
|
2219
|
+
const keyToCanonical = new Map();
|
|
2220
|
+
FernNavigation.traverseDF(scopeNode, (child, parents) => {
|
|
2221
|
+
if (FernNavigation.hasMetadata(child) && FernNavigation.isPage(child)) {
|
|
2222
|
+
const keys = crossVersionDedupKeys(child, parents);
|
|
2223
|
+
let matched = false;
|
|
2224
|
+
for (const key of keys) {
|
|
2225
|
+
const canonical = keyToCanonical.get(key);
|
|
2226
|
+
if (canonical != null && canonical !== child.slug) {
|
|
2227
|
+
// Skip dedup when the canonical slug is a proper ancestor
|
|
2228
|
+
// of the child's slug AND the child has children of its own
|
|
2229
|
+
// (it's a container like apiPackage with endpoints, not a
|
|
2230
|
+
// leaf-level landing page). Container nodes at different URL
|
|
2231
|
+
// depths are separate sitemap entries, not duplicates.
|
|
2232
|
+
if (child.slug.startsWith(canonical + "/") && FernNavigation.getChildren(child).length > 0) {
|
|
2233
|
+
continue;
|
|
2234
|
+
}
|
|
2235
|
+
child.canonicalSlug = canonical;
|
|
2236
|
+
matched = true;
|
|
2237
|
+
break;
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2240
|
+
if (!matched) {
|
|
2241
|
+
const slug = child.canonicalSlug ?? child.slug;
|
|
2242
|
+
for (const key of keys) {
|
|
2243
|
+
if (!keyToCanonical.has(key)) {
|
|
2244
|
+
keyToCanonical.set(key, slug);
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
});
|
|
2250
|
+
}
|
|
2196
2251
|
/**
|
|
2197
2252
|
* After default-version canonical slugs are marked, propagate them across
|
|
2198
2253
|
* ALL versions using a global first-come-first-served approach (matching V2).
|
|
@@ -2220,6 +2275,12 @@ function markCrossVersionCanonicalSlugs(versionNodes) {
|
|
|
2220
2275
|
for (const key of keys) {
|
|
2221
2276
|
const canonical = keyToCanonical.get(key);
|
|
2222
2277
|
if (canonical != null && !version.default) {
|
|
2278
|
+
// Skip dedup when the canonical slug is a proper ancestor
|
|
2279
|
+
// of the child's slug AND the child has children (container
|
|
2280
|
+
// nodes at different URL depths, not duplicates).
|
|
2281
|
+
if (child.slug.startsWith(canonical + "/") && FernNavigation.getChildren(child).length > 0) {
|
|
2282
|
+
continue;
|
|
2283
|
+
}
|
|
2223
2284
|
child.canonicalSlug = canonical;
|
|
2224
2285
|
matched = true;
|
|
2225
2286
|
break;
|
|
@@ -2320,12 +2381,15 @@ function markCrossProductCanonicalSlugs(productNodes) {
|
|
|
2320
2381
|
return;
|
|
2321
2382
|
}
|
|
2322
2383
|
const key = `pid:${pid}`;
|
|
2323
|
-
const
|
|
2324
|
-
if (
|
|
2325
|
-
child.canonicalSlug =
|
|
2384
|
+
const entry = pageIdToCanonical.get(key);
|
|
2385
|
+
if (entry != null && !product.default && entry.productId !== product.productId) {
|
|
2386
|
+
child.canonicalSlug = entry.slug;
|
|
2326
2387
|
}
|
|
2327
|
-
else if (
|
|
2328
|
-
pageIdToCanonical.set(key,
|
|
2388
|
+
else if (entry == null) {
|
|
2389
|
+
pageIdToCanonical.set(key, {
|
|
2390
|
+
slug: child.canonicalSlug ?? child.slug,
|
|
2391
|
+
productId: product.productId
|
|
2392
|
+
});
|
|
2329
2393
|
}
|
|
2330
2394
|
}
|
|
2331
2395
|
});
|