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

ls_middleware

v1.2.0

Published

Windows middleware asset package for Vite and other web projects.

Readme

ls_middleware

适用于 Windows 项目的中间件资源包,提供可直接发布到静态目录的运行文件和安装包,适合 Vite 和其他 Web 项目在安装依赖后同步到 public 目录。

这个包只分发资源文件,不会自动执行 EXE、JAR 或安装程序。同时提供 JavaScript、TypeScript 和 CLI 用法。

安装

npm install ls_middleware

当前资源内容

  • middleware/comm/yyy_client.exe
  • middleware/ReportPrint/ReportPrint.jar
  • middleware/ReportPrint/runtime8/
  • middleware/CLodop32/
  • middleware/CLodop64/
  • packages/CHSV16.0.1.exe

Vite 接入

推荐在你的 Vite 项目里加同步脚本,把资源复制到 public 目录:

{
  "scripts": {
    "sync:middleware": "ls_middleware copy-middleware ./public/middleware --overwrite",
    "sync:packages": "ls_middleware copy-installers ./public/packages --overwrite",
    "postinstall": "npm run sync:middleware && npm run sync:packages"
  }
}

同步后可通过这些相对路径访问:

  • /middleware/comm/yyy_client.exe
  • /middleware/ReportPrint/ReportPrint.jar
  • /packages/CHSV16.0.1.exe

如果你的项目配置了非根路径部署,访问时请基于 import.meta.env.BASE_URL 拼接资源地址,不要把 /middleware/.../packages/... 写死。

CLI

查看包内资源路径:

npx ls_middleware paths

复制整套资源:

npx ls_middleware copy ./vendor/ls-middleware --overwrite

只复制中间件目录:

npx ls_middleware copy-middleware ./public/middleware --overwrite

只复制安装包目录:

npx ls_middleware copy-installers ./public/packages --overwrite

TypeScript

import { paths, copyMiddleware } from 'ls_middleware';

console.log(paths.commClientExe);
console.log(paths.chsvInstaller);

copyMiddleware('./public/middleware', { overwrite: true });

paths.chsvInstallerZip 仍然保留为兼容字段,但现在实际指向的是 CHSV16.0.1.exe

发版

发版前建议先检查:

  • package.json 里的 nameversion
  • middleware/packages/ 下的资源是否已经替换为最新版本
  • npm run pack:check

生成发布包:

npm run pack:release

发布到 npm:

npm login
npm whoami
npm publish --cache ./.npm-cache

如果你已经生成了 tarball,也可以直接发布:

npm publish ls_middleware-1.0.1.tgz --cache ./.npm-cache

当前打包排除项

发布时会排除:

  • middleware/comm/db/*.db-shm
  • middleware/comm/db/*.db-wal
  • middleware/CLodop32/unins000.*
  • middleware/CLodop64/unins000.*
  • middleware/CLodop32/Rootdir/CLodopDemos
  • middleware/CLodop64/Rootdir/CLodopDemos