npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wildbuck/module-iam-frontend

v2.0.0-13

Published

Frontend module package for Buck IAM routes, permissions, and feature pages.

Downloads

1,241

Readme

iam/frontend

IAM 的前端模块包。

结构

  • src/generated
    • 合同生成的 SDK、类型和错误定义
  • src/features/current-principal
    • 当前主体 feature 元数据(无管理页);侧栏与权限投影由 workspace helper 承担
  • src/current-principal-workspace.js
    • 提供上层业务壳可复用的当前主体工作台 helper(/iam/current-principal/workspace):菜单投影、导航分组、头像和菜单图标资源解析
  • src/features/roles
    • 角色页面、路由和权限映射
  • src/features/sessions
    • 会话能力的前端 API 和权限映射
  • src/routes
    • 模块级路由聚合出口

认证视图品牌

默认登录页通过公开包入口 @wildbuck/module-iam-frontend/auth-view 装配。:app 必须是 { state, ...useAuthWorkspace() },不要只传 workspace。轻量品牌用 props 配置,不要写死验证壳样例:

<AuthFlowView
  :app="{ state, ...authWorkspace }"
  brand-title="业务系统名称"
  brand-mark="业"
  brand-subtitle="生产环境"
  primary-button-type="primary"
/>
  • brandTitle / brandMark / brandSubtitle 均为可选;全部为空时不渲染品牌条。
  • primaryButtonType 默认 primary,不要把演示向 danger 当作默认可交付形态。
  • 业务版本页脚:从 GET /brick/client-meta 读取 appVersion / buildId(流水线写入 jar 内 identity,业务零配置);props 可覆盖调试。无版本时不渲染页脚,meta 失败不阻断登录。
  • 登录品牌/布局:读取 capabilities.loginBrand(系统名、描述、logo、整页背景、formPositionbrandPosition)。位置为受控预设:表单 CENTER|LEFT|RIGHT;品牌 ABOVE_FORM|BELOW_FORM|LEFT_PANEL|RIGHT_PANEL|TOP_BAR。props brandTitle/Mark/Subtitle 仅作无配置时的回退。
  • useAuthWorkspace()currentLoginMode 等字段是 ComputedRef。组装 app 时用 shallowRef 或对象字面量持有 workspace 返回值,不要 ref({ ...useAuthWorkspace() }) 再深度展开。IamAuthFlowView 内部用 unref 兼容 Ref 与已解包对象,避免登录页白屏。
  • 需要完全自定义版式时走整页自定义模式,状态与动作仍用 auth-state / auth-workspace

原则

  • 不承载最终应用壳
  • 不直接写原始接口字符串
  • 对外暴露稳定的模块路由、权限和 feature registry