@holeauth/rbac-yaml
v0.0.1-alpha.0
Published
YAML loader + validator for @holeauth/plugin-rbac. Node-only helper; plugin-rbac itself is headless.
Readme
@holeauth/rbac-yaml
Node-only helper for loading, validating, and hot-reloading YAML-based
RBAC group definitions for @holeauth/plugin-rbac.
import { loadRbacYaml } from '@holeauth/rbac-yaml';
import { rbac } from '@holeauth/plugin-rbac';
const yaml = loadRbacYaml('./holeauth.rbac.yml', {
watch: process.env.NODE_ENV !== 'production',
});
const plugin = rbac({ groups: yaml.snapshot.groups, adapter });
yaml.onReload((s) => plugin.reload(s.groups));The plugin-rbac package itself is headless — no filesystem access —
so it stays edge-compatible when group definitions are passed directly
as an array instead of via YAML.
