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

@shanghaihengli/ygft-api-server

v0.4.9

Published

远景中央 HTTPS API 的 Windows 交互式部署工具

Readme

@shanghaihengli/ygft-api-server

远景中央 HTTPS API 的 Windows Server 部署工具。请在目标服务器以管理员身份执行:

npm install -g @shanghaihengli/ygft-api-server
ygft-api-server setup

部署时可选择以下连接模式,原模式默认保留:

  • smart:原远程 Smart ODBC 网关。缺少 32 位 Smart ODBC Driver 时,输入公司受控的 satrda.dll 本地路径或 UNC 共享路径,例如 D:\\安装包\\satrda.dll\\\\fileserver\\ygft\\satrda.dll,即可校验 SHA-256、复制到 API 服务器并自动注册。此模式只输入网关地址、端口和数据库名称,不输入、不保存数据库账号或密码。
  • local:本机 SQL Server。自动检测服务器已有的 64 位或 32 位 SQL Server ODBC 驱动,并以相同位数的 PowerShell 连接;通常实例填写 .。必须使用独立的 API SQL 账号,不能复用或读取远景客户端 ini 中的加密账号字段。

随后交互输入 API 地址、端口及数据库连接信息,生成 TLS 证书,注册 Windows 计划任务并执行端口与数据库检查。只有 local 本机 SQL Server 模式需要数据库账号和密码;原有未包含 connection_mode 的配置自动按 smart_odbc 解释,保持兼容。

npm install 本身不会收集密码、生成私钥或启动服务。Smart 网关模式不保存数据库密码;只有 local 模式的数据库密码会保存到 Windows 服务器机器级环境变量,且不会打包进 npm、客户端或日志。

升级服务端

先更新 npm 包,再以管理员 PowerShell 执行:

npm install -g @shanghaihengli/[email protected] --registry=https://registry.npmjs.org
ygft-api-server update

update 会保留现有 api_service.ini 和 TLS 证书,升级服务端程序与合同校验/创建过程。升级后支持最多 10 份 DOCDOCXXLSXLSXBMPJPEGJPGGIFPDF 附件(合计最多 10 MB);商品单价按客户价格表原值写入,不再对 KPC 乘以 1000;客户货号会从 tb_goodscust.cgcode 自动写入合同商品行;若存在已审核、客户/经营单位/商品/单价均匹配的报价明细,会同步报价单号、明细备注及报价行字段,并按 合同数量 ÷ 每箱数量 自动计算外包装数量;业务员必须由调用方明确提供,业务部门按该业务员的用户资料带入。若当前为 Smart 网关模式,会自动移除旧版遗留的数据库账号/密码配置及机器级密码变量;若过程升级失败,会恢复旧服务程序。

再次执行 setup 更换 API DNS/IP 时,会保留原 api-ca.pem 和旧证书地址,只重签服务器证书并加入本次输入的地址;已配置该 CA 的客户端无需重新分发 CA 文件。

停止与重启服务

在服务器的“管理员身份”PowerShell 或命令提示符中执行:

ygft-api-server stop
ygft-api-server restart
ygft-api-server status

stop 只停止 YGFT Central HTTPS API 计划任务正在运行的服务进程,保留 API 配置、TLS 证书和所有数据库数据。restart 会确认原进程已停止后再启动,并检查 HTTPS 端口是否重新监听。

satrda.dll 不包含在 npm 包,也不能放入公开 npm。它只应放在公司受控的安装目录或共享目录;安装完成后,API 服务使用服务器本地副本,不依赖共享路径。当前批准 DLL 的 SHA-256 是 C222583AEB948DF9839F6D1F964B7CF2ADEB635C36F77CFADE545C331006EF21。如 IT 提供新版驱动,须先核对其 SHA-256,再在安装提示中输入新值。

生产环境必须在网络防火墙及 Windows 防火墙中把 TCP 8443 限制为公司 VPN/办公网段。