@fern-api/fdr-sdk 1.2.72-c5de911f8d → 1.2.73-c1680dd0b8
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
|
@@ -13437,6 +13437,30 @@ var NodeCollector = class _NodeCollector {
|
|
|
13437
13437
|
getNodesInOrder = () => {
|
|
13438
13438
|
return this.nodesInOrder;
|
|
13439
13439
|
};
|
|
13440
|
+
/**
|
|
13441
|
+
* The distinct RBAC roles referenced anywhere in the navigation, collected from every node's
|
|
13442
|
+
* `viewers`. This is the authoritative source of "which roles gate content on this site" — the
|
|
13443
|
+
* top-level `root.roles` is not populated by the nav builders, and docs.yml's declared `roles`
|
|
13444
|
+
* list is not serialized into the docs definition, so the roles that actually exist are the ones
|
|
13445
|
+
* appearing in node `viewers` (e.g. the implicit `everyone` plus any custom roles like `beta`).
|
|
13446
|
+
*
|
|
13447
|
+
* NOTE: this is a faithful collection of every role in `viewers` — it INCLUDES the implicit
|
|
13448
|
+
* `everyone` role when present (kept deliberately, so callers can e.g. detect whether a site uses
|
|
13449
|
+
* RBAC at all). Consumers that want only masquerade-able custom roles MUST filter `everyone`
|
|
13450
|
+
* themselves (the preview widget does this via `EVERYONE_ROLE`).
|
|
13451
|
+
*/
|
|
13452
|
+
getRoles = once(() => {
|
|
13453
|
+
const roles = /* @__PURE__ */ new Set();
|
|
13454
|
+
for (const node of this.nodesInOrder) {
|
|
13455
|
+
const viewers = node.viewers;
|
|
13456
|
+
if (viewers != null) {
|
|
13457
|
+
for (const role of viewers) {
|
|
13458
|
+
roles.add(role);
|
|
13459
|
+
}
|
|
13460
|
+
}
|
|
13461
|
+
}
|
|
13462
|
+
return Array.from(roles);
|
|
13463
|
+
});
|
|
13440
13464
|
};
|
|
13441
13465
|
var MAX_CHANGELOG_ENTRIES_MINIMUM = 15;
|
|
13442
13466
|
var CHANGELOG_RECENCY_MONTHS = 6;
|