@fern-api/fdr-sdk 1.2.72-c5de911f8d → 1.2.73-6e6ce5ee80
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 +24 -0
- package/dist/js/converters/index.js.map +1 -1
- package/dist/js/converters/index.mjs +24 -0
- package/dist/js/converters/index.mjs.map +1 -1
- package/dist/js/index.js +24 -0
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +24 -0
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/navigation/index.js +24 -0
- package/dist/js/navigation/index.js.map +1 -1
- package/dist/js/navigation/index.mjs +24 -0
- package/dist/js/navigation/index.mjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/navigation/NodeCollector.d.ts +13 -0
- package/dist/types/navigation/NodeCollector.d.ts.map +1 -1
- package/dist/types/navigation/__test__/NodeCollector.getRoles.test.d.ts +2 -0
- package/dist/types/navigation/__test__/NodeCollector.getRoles.test.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/js/index.js
CHANGED
|
@@ -18540,6 +18540,30 @@ var NodeCollector = class _NodeCollector {
|
|
|
18540
18540
|
getNodesInOrder = () => {
|
|
18541
18541
|
return this.nodesInOrder;
|
|
18542
18542
|
};
|
|
18543
|
+
/**
|
|
18544
|
+
* The distinct RBAC roles referenced anywhere in the navigation, collected from every node's
|
|
18545
|
+
* `viewers`. This is the authoritative source of "which roles gate content on this site" — the
|
|
18546
|
+
* top-level `root.roles` is not populated by the nav builders, and docs.yml's declared `roles`
|
|
18547
|
+
* list is not serialized into the docs definition, so the roles that actually exist are the ones
|
|
18548
|
+
* appearing in node `viewers` (e.g. the implicit `everyone` plus any custom roles like `beta`).
|
|
18549
|
+
*
|
|
18550
|
+
* NOTE: this is a faithful collection of every role in `viewers` — it INCLUDES the implicit
|
|
18551
|
+
* `everyone` role when present (kept deliberately, so callers can e.g. detect whether a site uses
|
|
18552
|
+
* RBAC at all). Consumers that want only masquerade-able custom roles MUST filter `everyone`
|
|
18553
|
+
* themselves (the preview widget does this via `EVERYONE_ROLE`).
|
|
18554
|
+
*/
|
|
18555
|
+
getRoles = (0, import_function.once)(() => {
|
|
18556
|
+
const roles = /* @__PURE__ */ new Set();
|
|
18557
|
+
for (const node of this.nodesInOrder) {
|
|
18558
|
+
const viewers = node.viewers;
|
|
18559
|
+
if (viewers != null) {
|
|
18560
|
+
for (const role of viewers) {
|
|
18561
|
+
roles.add(role);
|
|
18562
|
+
}
|
|
18563
|
+
}
|
|
18564
|
+
}
|
|
18565
|
+
return Array.from(roles);
|
|
18566
|
+
});
|
|
18543
18567
|
};
|
|
18544
18568
|
var MAX_CHANGELOG_ENTRIES_MINIMUM = 15;
|
|
18545
18569
|
var CHANGELOG_RECENCY_MONTHS = 6;
|