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

uomtiles

v0.1.6

Published

UOM 适飞地图预览、下载、对比与 MBTiles/PMTiles 发布工具

Readme

UOM适飞地图

本地运行的 UOM 适飞空域预览、下载、对比和发布工具。地图任务保存在可断点续传的 .uomtiles 工作文件中,并可导出标准 MBTiles 或 PMTiles。

快速开始

需要 Node.js 22.13 或更高版本(使用内建 node:sqlite)。

npx uomtiles

命令会启动本地 Web 工作台并打开浏览器。首次使用时通过手机号登录 UOM;凭据只写入本机 ~/.uomtiles/auth.json,权限为 0600,不会写入任务文件或导出文件。

工作台包含六个功能:

  • 在线地图预览:代理 UOM 官方实时地图,不把 token 发送给浏览器。
  • 地图下载任务:创建、导入和管理 .uomtiles 任务;完成任务可查看和导出,未完成任务可断点续传。
  • 地图版本对比:分别选择或拖入 .uomtiles、.mbtiles、.pmtiles,在浏览器 Worker 中执行逐瓦片 alpha 像素 diff,并同步移动、滑块或叠加审阅。
  • 地图高级功能:选择本地地图文件后,可按当前位置和最小面积寻找多个最近的适飞区域。
  • 地图服务管理:从任务文件启用本地 WMS/WMTS 服务,并配置颜色与透明度。
  • 地图图层管理:在所有地图中共享选择状态,底图可在 OSM/天地图之间单选,DJI Flysafe 与 Antigravity 可任意多选。

地图图层数据

叠加层使用本地快照,不依赖浏览器按缩放层级请求远端区域文件。首次在工作台启用某个叠加层时,如果本地没有数据,在“地图图层管理”的“数据源状态”中点击“下载”即可;也可以执行 npx uomtiles map-layers-update 下载两份数据。文件写入用户数据目录的 map-layers/,后续地图从本地快照读取,因此在所有缩放级别都能保持完整区域几何。

更新按钮会检查并下载可用的区域数据,下载过程会显示进度和状态。区域数据只保存在本机用户数据目录,不会随 npm 包发布。

发布包只包含程序和静态前端资源,不包含 DJI 或 Antigravity 区域文件。npm pack/npm publish 不会因为本地地图数据缺失而失败;用户数据目录默认是 ~/.uomtiles(仓库开发模式默认是 ./data)。

项目源代码采用 Apache License 2.0;区域数据、在线地图和其他第三方服务不属于源代码许可证的授权范围,使用时请遵守相应数据源条款。

浏览器负责登录、文件选择和地图审阅;任务文件、区域数据和导出操作均在本机完成。CLI 与 Web 工作台使用同一套本地数据目录。

CLI

# 验证固定账户文件,并实际请求 UOM SSO
npx uomtiles whoami

# 创建以当前昵称和时间命名的工作文件并前台显示进度
npx uomtiles fetch

# 创建或从 checkpoint 继续指定任务
npx uomtiles fetch china-2026-08-21.uomtiles

# 转入后台下载
npx uomtiles fetch -d china-2026-08-21.uomtiles

# 查看文件摘要
npx uomtiles inspect china-2026-08-21.uomtiles

# 生成干净的标准发布文件
npx uomtiles export china-2026-08-21.uomtiles china.mbtiles
npx uomtiles export china-2026-08-21.uomtiles china.pmtiles

# 可指定导出范围
npx uomtiles export china-2026-08-21.uomtiles china.mbtiles --min-zoom 6 --max-zoom 16

# 可重复性检查;不一致时退出码为 2
npx uomtiles diff first.uomtiles second.uomtiles repeatability.json

# 将旧任务数据库复制迁移为工作文件;源文件不修改
npx uomtiles migrate legacy.mbtiles task.uomtiles

PMTiles 导出调用 Protomaps pmtiles convert。可用 UOMTILES_PMTILES_COMMAND 指定命令路径。

发布包不依赖额外的原生数据库 addon。PMTiles 转换器是可选的外部 CLI,只有执行 PMTiles 导出时才需要。

文件格式

.uomtiles 是本工具使用的 SQLite 工作文件格式,支持任务状态保存、断点续传、预览、对比和导出。MBTiles/PMTiles 导出包含标准地图元数据;登录凭据和访问令牌不会写入导出文件。

项目结构

app/                 Nuxt 4 客户端应用、页面、布局和浏览器 composables
server/              Nitro API 路由与仅服务端的任务、认证、地图代理逻辑
shared/              浏览器与服务端共享的纯 TypeScript DTO
src/                 CLI 与服务端共同复用的任务、地图和导出核心
*.test.ts            单模块测试伴随源码放置;Nuxt runtime 测试使用 *.nuxt.test.ts
research/            历史验证、旧管线和像素实验,不进入发布包
data/                本地认证、运行状态、下载的地图数据和缓存;始终忽略提交

Nuxt 使用 v4 默认 app/ source directory;server/ 与 shared/ 保持根级目录。CLI 源码使用 Node 原生 TypeScript type stripping 直接开发运行,发布前由 tsconfig.cli.json 编译到被忽略的 dist/。Nuxt/Nitro 生产输出写入被忽略的 .output/。

开发

pnpm install
pnpm dev
pnpm typecheck
pnpm test
pnpm build

测试使用一个 Vitest 入口和两个 projects。纯 Node/TypeScript 测试以 a.test.ts 伴随 a.ts 放置,在快速的 Node environment 中运行;依赖 Nuxt auto-import、useState 或组件运行时的测试使用同目录 a.nuxt.test.ts,由 @nuxt/test-utils 的 Nuxt environment 运行。两类测试统一由 pnpm test 执行。

常用环境变量:

  • UOMTILES_DATA_DIR:账户和 Web 工作区目录。npx uomtiles 默认使用 ~/.uomtiles,仓库内 pnpm dev 默认使用 ./data。
  • UOMTILES_AUTH_FILE:CLI 固定认证文件。
  • UOMTILES_PORT:本地 Web 首选端口,默认 4173。
  • UOMTILES_PMTILES_COMMAND:PMTiles 转换命令。
  • NUXT_TIANDITU_TOKEN:可选的天地图开发者令牌。未配置时工作台默认使用 OSM,并禁用天地图选项;npx uomtiles 会读取当前目录的 .env。
  • NUXT_DJI_NFZ_PATH:可选的 DJI Flysafe 外部快照路径;仅用于已有部署的显式文件覆盖。
  • NUXT_ANTIGRAVITY_NFZ_PATH:可选的 Antigravity 外部 SQLite 快照路径;仅用于已有部署的显式文件覆盖。

品牌与许可

产品图标使用 Lucide map-pinned,通过 Iconify/Icones 获取,依照 Lucide ISC License 使用。

源代码采用 Apache License 2.0。本项目与第三方数据源提供方不存在隶属或背书关系。