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

@tbox.cn/app-module-mall-core

v0.3.3

Published

商圈基础模块:scope 域装配注册 + mall-info 工具链 + mall-directory 服务 + 首页主屏(home 槽 / 联单面板 / 会员停车快览)+ 首页预览卡。

Readme

@tbox.cn/app-module-mall-core

商圈基础模块:scope 域装配注册 + mall-info 工具/缓存/preTool + mall-directory 服务 + 首页面(home 槽主屏 / /api/m/mall-core/* 四端点 / 卡覆盖与内联过滤)+ 首页预览卡(dev 专用)。 2026-09-20 随 module-mall-home 并入(家页面全量承接)。

贡献面

| 能力 | 通道 | 说明 | |---|---|---| | 域装配 | ctx.domainAssemblies.register(SCOPE_ASSEMBLY_KIND, assembly) | register 期以 ctx.integrations.raw 构造(投影 = contracts-mall 纯函数);四消费点(validateContext / scopeSessions / scopeDefaults / instanceIdOf)+ WS 双钩(defaultMallContext / enhanceHelloContext)运行期惰性查表 | | mall-info 工具 | ctx.tools.register + 声明式 preTools(always + mallId 入参化 + silent + dedup) | mall.info 槽消费(缓存 → single-flight → 槽拉取;fail-soft) | | mall-directory 服务 | ctx.services.register('mall-directory', ...) | 控制平面 malls 单一来源(shopping-guide 近场 / customer-service 客服电话消费) | | 首页面路由 | ctx.routes.register('mall-core', ...)/api/m/mall-core/{config,linked-panel,nearby-mall,bumpin-banner} | 首页配置面 / 联单面板(member.snapshot + parking.snapshot 服务化消费)/ 就近商场 / bumpin banner | | home 槽 | ctx.slots.register('home', homeSlotValue) | 商圈主屏(MallHome + 会员门禁浮层自持 + 恒挂载显隐);kit ChatPage 空态消费 | | 卡覆盖/内联过滤 | ctx.cards.registerOverride('promotion-bumpin-activity', ...) / registerInlineFilter | 聊天视图组合层(防嵌套)+ 会员门禁卡系剥离 | | mall-home 预览卡 | server 声明式 cards map + client 组件 | dev 预览专用(/_tbox/card-preview 目录收录;无工具出卡路径,chat 零出场);schema-first 样本 19 格 |

消费方接线(模板装配点)

import { resolveMallScopeAssembly } from '@app/module-mall-core/server';

// validateContext / instanceIdOf:auth/registry 构造早于 ctx → 闭包运行期查表
validateContext: (attributes) => resolveMallScopeAssembly(ctx)?.validateScope(attributes) ?? true,

// start()(registerAll 之后):WS/scope 会话装点
const assembly = resolveMallScopeAssembly(ctx);
const scopeSessions = assembly ? createScopeSessionRegistry({
  extractScopeKey: (c) => assembly.extractScopeKey(c),
  validateScope: (a) => assembly.validateScope(a),
  buildScope: (a) => assembly.buildScopeWithMallName(a),
}) : undefined;

无 integrations 配置(raw 缺席)→ 不注册(resolve 返回 undefined,装配点按"无控制面"降级)。

升级与兼容

  • module-mall-home 并入module remove mall-homemodule update mall-core; 路由命名空间 /api/m/mall-home/*/api/m/mall-core/*(客户端同包内一致更名)。
  • 与旧 mall-home 并装(应避免):home 槽双注册告警覆盖 + bumpin 配置幂等重注入,可启动不炸。
  • kit optional peer 机制(宿主携带包 @app/agent-ui-kit)延续 mall-home 形态,pack 门禁同名通用。