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

@nianxie/nianxie-interaction-sdk

v0.1.4

Published

Nianxie interaction signal SDK for Flutter InAppWebView.

Readme

Nianxie WebSDK 简明说明书

基础接入说明。

1. SDK 接入方式

安装

npm install @nianxie/nianxie-interaction-sdk --@nianxie:registry=https://npm.pkg.github.com

or

git clone https://github.com/nianxie/nianxie_web_sdk.git

最小接入代码

<script src="./nianxie-interaction-sdk.js"></script>
<script>
  const sdk = NianxieInteractionSDK.createNianxieInteractionSDK({
    source: "webview",
    defaultTimeoutMs: 10000,
  });

  sdk.onInit(async () => {
    await sdk.sendReady({ extras: { stage: "ready" } });
  });

  sdk.onStart(() => {
    // start 后进入交互
  });

  async function finish() {
    await sdk.sendEnd({ extras: { result: "completed" } });
  }
</script>

接入要求

  • 入口文件是 dist/index.html
  • 本地资源使用相对路径(如 ./assets/...)
  • 业务字段统一放在 extras

2. 信号量(⚠️ 必须)

⚠️ 必须实现:信号量协议不是可选项,必须完整走完这 4 个信号。

  1. OnMiniInit(Flutter -> Web):收到信号后开始初始化页面(资源、逻辑准备等)
  2. NianxieMiniReady(Web -> Flutter):页面准备完成后发送ready信号给宿主,但暂不开始
  3. OnMiniStart(Flutter -> Web):收到宿主发来的开始信号,开始正常运行
  4. NianxieMiniEnd(Web -> Flutter):运行结束,发送结束信号给宿主

缺少任意信号即视为协议不完整,会导致流程异常(如超时、无法开始、无法结束),并可能导致校验不通过。

3. 检查工具如何使用

在 package.json 添加脚本:

{
  "scripts": {
    "nx:package": "npx nianxie-gate package",
    "nx:verify:runtime": "npx nianxie-gate verify-runtime",
    "nx:preflight": "npx nianxie-gate preflight",
    "nx:submit:prepare": "npx nianxie-gate submit-prepare"
  }
}

推荐执行顺序

npm run nx:preflight
npm run nx:submit:prepare

命令说明

  • nx:package:打包,生成 dist/ 和 dist.zip
  • nx:verify:runtime:检查协议和运行时问题
  • nx:preflight:顺序执行 package + verify
  • nx:submit:prepare:生成上传摘要

提交前通过标准

  • reports/runtime-verify.json 中 ok=true
  • blockingCount=0
  • 已生成 dist.zip