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-parking

v0.10.2

Published

商圈停车模块:计费支付、车辆寻车、缴费记录与开票(codegen 源)。

Readme

module-parking · 停车缴费业务组件

商圈停车域承接组件(@tbox.cn/app-module-parking,componentId parking)。 查车(我的车辆/车牌绑定)、查费(停车费用明细/欠费)、开票(发票申领)与缴费支付 (三步链 + 证据回报);跨模块最大域模型(QuoteSnapshot 报价快照)与默认唯一 写动作面(支付状态机)。

业务职责

| 能力域 | 承接 | |---|---| | 车辆 | locate-vehicle 车辆定位/绑定指引 | | 缴费报价 | quote-out / payment-quote 快照与续付 | | 支付 | 支付三步链(confirm → poll → evidence 回报)| | 发票 | 开票入口与可开票订单查询 | | 记录 | 缴费记录 / 权益(月卡)面 |

架构分层

src/
  server/
    index.ts     模块注册(工具 + 卡 + preTool + handler)
    tools.ts     模型可见查询工具
    actions.ts   写动作链(支付三步/绑定/解绑/改价等)
    domain.ts    QuoteSnapshot 快照与状态机(本家族唯一带 domain.ts 的模块)
  client/cards/  卡组件

外部供给:provider 包 parking 域 service(~1700 行厂商复杂度锚)。

领域模型(契约真源)

  • modules/contracts-mall/src/domain/parking.ts + services/parking.ts(含 1030 附录 A.3 的 QuoteSnapshot 全量字段:QUOTE_TTL_MS 5 分钟、autoSettleOnPaidEvidence、revision CAS、UNKNOWN 悬挂态)。
  • StateStore 命名空间四件:parking.quotes / parking.payment-operations / parking.latest-payment / parking.quote-payment。

工具与写动作

(全量清单以 1030 附录 A.3 为对账摘录;此处保持摘要层级)

  • 模型可见查询 4 件:locate-vehicle 等。
  • 写动作 5 件:confirm-payment / report-payment-result / reprice / bind-vehicle / unbind-vehicle(支付三步链主导,UNKNOWN 悬挂由 report-payment-result 收口)。

卡片清单

parking 家族卡片(含 member-parking-gate 门禁卡),全量以 contracts-mall parking 分节 schema 为准。

跨模块协作

  • ← member:门禁(member.status / memberGateCardOf)。
  • StateStore 命名空间与 revision CAS 对跨模块并发写安全。

铁律摘要

  • register 只注册不解析;写动作必须经过输入确认链(支付类动作禁隐式触发)。
  • 厂商语义收口在 provider 包(#decodeSelection/uploadResult 空实现 → @human-required 降级),模块域不写厂商分支。

已知限制与文档漂移

  • 本 README 为归一版:详细机制(QuoteSnapshot 字段表、支付三步链、厂商复杂度分析) 已由 1030 附录 A.3 承载,避免双源漂移。Historic detailed draft(2026-09 会话交付) 与本骨架一致。