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/core-option-frontend

v2.0.0-13

Published

Frontend option loading helpers for Buck core option.

Readme

@wildbuck/core-option-frontend

@wildbuck/core-option-frontendcore:option 的前端入口,用于从后端 BrickOptionProvider 加载下拉、单选、多选和标签选项。

业务页面不要硬编码稳定业务状态、字典或枚举选项。先在后端功能点 provider 中实现 BrickOptionProvider,再在前端调用:

import { createOptionRequest, loadBrickOptions } from '@wildbuck/core-option-frontend';

// 在会话 / access token 就绪后调用;未登录时 POST /brick/options/list 默认 401 是预期行为。
const options = await loadBrickOptions([
  createOptionRequest('face_archive_status')
]);

statusOptions.value = options.face_archive_status || [];

鉴权说明

  • POST /brick/options/list 默认需要认证。公开 client-meta 可访问,表示 options 可匿名。
  • 壳启动时先恢复会话,再批量 loadBrickOptions;不要在 token 未就绪时狂刷字典,也不要为消 401 在前端写死枚举。
  • 开发 open-mode 下若业务坚持匿名拉字典,须由业务 BrickAuthorizationRuleContributor 显式放行,并评估字典泄露面;框架不提供默认匿名 options。
  • 时序总览见 docs/architecture/delivery/business-frontend-ui-reference.md「壳启动时序:client-meta 与 options 鉴权」。

本包只封装 /brick/options/list 协议,不定义页面控件和视觉样式。