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

poi-plugin-piggy-data-uploader

v0.1.7

Published

按用户授权收集并上传舰队事件

Readme

舰队数据上报

按用户明确授权,从 poi 的实时游戏事件中收集指定统计并上传至配置的服务器。

默认所有上传项关闭。上传凭据只通过 Authorization: Bearer 请求头发送,不写入事件内容或日志。 关闭某一上传项时,该类型尚未发出的本地队列记录也会立即移除。远程服务器必须使用 HTTPS,本机测试允许 localhost。 新事件默认在进入本地队列 30 秒后上传,可在插件设置中调整为 0–86400 秒;修改延迟会立即重新计算尚未上传的记录。

“本地测试模式”仅在服务器主机为 localhost、127.0.0.1 或 ::1 时生效。生效后会忽略各事件开关与数量门槛,上报所有 Boss 点战斗结果、所有舰船掉落、正数的每日出击战果和开发资材获取、血条击破以及装备改修失败。测试记录只允许发往当前本机测试服务器;关闭测试模式或改为非本机地址会移除尚未发出的测试记录。

当前事件

  • Boss 点 C/D 败北。
  • 按舰种和 api_backs 规则判定的稀有舰掉落。
  • 游戏日内出击战果达到 70(按每 100,000 提督经验折算 70 战果,在下一个游戏日首次观测时结算)。
  • 普通或联合舰队结算包中满足 api_now_hp - api_sub_value <= 0 的血条击破。
  • 单次出击获得至少 5 个开发资材。
  • 改修工厂中的装备改修失败,包含装备名称和失败时的当前改修等级。

开发资材只在当前运行中的出击内累计,不保存出击统计、收入明细或支出数据。

游戏日按 UTC+8 的 04:00 切换。

稀有舰规则还会把舰名中不含任何汉字的舰船直接判定为稀有,包括拉丁字母、西里尔字母和纯假名舰名。 雪風(api_id=20)、島風(api_id=50)、長門(api_id=80)、陸奥(api_id=81)、瑞鳳(api_id=116)、伊8(api_id=128)、時津風(api_id=186)、嵐(api_id=454)和萩風(api_id=455)明确视为非稀有舰。

战斗点使用 poi 内置 fcd.map 路线数据转换为字母编号,保留原始数字节点作为兼容字段。new 判断会沿 api_aftershipid 双向合并整条改造链;任一改造形态已持有或在当前出击中已掉落时,都不会标记为新舰。

安装

cd "$HOME/Library/Application Support/poi/plugins"
npm install poi-plugin-piggy-data-uploader

安装后在 poi 插件设置中启用并重载“舰队数据上报”。

本地开发

cd poi-plugin-data-uploader
npm link
cd "$HOME/Library/Application Support/poi/plugins"
npm link poi-plugin-piggy-data-uploader

插件不注册独立窗口,仅提供设置页;服务器地址、上传凭据和各上传开关在修改后立即保存。

可选开启“在游戏界面通知条显示服务器新播报”。插件会使用上传凭据每 10 秒获取一次增量播报;首次开启只建立当前进度,不回放历史消息,也不会显示当前凭据所属用户自己的播报。