feat(authz): generate Permission and Role union types
Emits sorted TS unions from the merged catalog so a typo in can(ctx, "post:wrtie") is a compile-time error. Uses JSON.stringify for string-literal escaping (not manual backslash/quote replace) so role names containing raw newlines still produce valid TypeScript; role names are not regex-validated like permission ids, so this matters for the raw mergeCatalogs path.
This commit is contained in:
@@ -505,6 +505,7 @@
|
||||
"expandRoles",
|
||||
"filterAuthorized",
|
||||
"filterCan",
|
||||
"generatePermissionTypes",
|
||||
"guardPermission",
|
||||
"hasRole",
|
||||
"memoryAuditSink",
|
||||
|
||||
Reference in New Issue
Block a user