Follow-up from #16243
#16243 extended autobot-infrastructure/shared/scripts/gen_frontend_types.py to
generate the Permission union from autobot_shared/auth/permissions.py, the
same pipeline Role already uses. constants/roles.ts's ROLE_RANK (added by
#16244, mirroring _ROLE_META's priority field) stays hand-maintained for
now -- it's DATA (a Dict[Role, int]), not a type/enum shape, and the codegen
framework's MANIFEST only supports emitting TypeScript from a Python
@dataclass or Enum (see gen_frontend_types.py's own module doc).
Ask
Extend the codegen framework to also support emitting a typed data constant
from a Python dict (or add a small, purpose-built second code path) so
ROLE_RANK (and potentially the backend's real _ROLE_META priorities
directly) can be generated rather than hand-mirrored -- closing the same
silent-drift gap #16243 closed for Permission.
Refs #16243, #16244.
Follow-up from #16243
#16243 extended
autobot-infrastructure/shared/scripts/gen_frontend_types.pytogenerate the
Permissionunion fromautobot_shared/auth/permissions.py, thesame pipeline
Rolealready uses.constants/roles.ts'sROLE_RANK(added by#16244, mirroring
_ROLE_META'spriorityfield) stays hand-maintained fornow -- it's DATA (a
Dict[Role, int]), not a type/enum shape, and the codegenframework's MANIFEST only supports emitting TypeScript from a Python
@dataclassorEnum(seegen_frontend_types.py's own module doc).Ask
Extend the codegen framework to also support emitting a typed data constant
from a Python dict (or add a small, purpose-built second code path) so
ROLE_RANK(and potentially the backend's real_ROLE_METAprioritiesdirectly) can be generated rather than hand-mirrored -- closing the same
silent-drift gap #16243 closed for
Permission.Refs #16243, #16244.