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

@zhaoxiangjun/base44-backend

v1.0.4

Published

ThinkSign Base44 backend function proxy package

Readme

node_base44_comm

node_base44_comm 是 ThinkSign 为 Base44 和本地 Node/Koa 服务准备的公共后端 npm 包项目。

发布到 npm registry 的包名是:

@zhaoxiangjun/base44-backend

当前项目不是 Koa、Fastify 或 Express 服务本身,而是一个可被其他项目引用的公共库。它主要负责把 Base44 Backend Function 或本地 HTTP 宿主收到的请求,安全地转发到 ThinkSign 后端 /ts/* 接口;同时提供 WixDeviceApi 调用 node_wix_server 的设备相关接口。

项目作用

本项目解决四类问题:

  1. Base44 Backend Function 中不再重复编写 tsProxy 转发逻辑。
  2. 本地 Node/Koa 服务可以复用同一套 ThinkSign 后端调用能力。
  3. Crypto、XData、Forward、Local File、COS、Supabase Storage 等接口统一从一个 npm 包导出,后续新增能力只维护公共包和文档。
  4. Base44 可以通过独立的 WIX_SERVER_API_BASE 访问 node_wix_server,不要求设备服务和 ThinkSign /ts/* 服务部署在同一个地址。

核心功能

  • Base44 Auth 衔接
  • JSON payload 解析与校验
  • /ts/* 路径白名单
  • JSON 请求转发
  • base64 / hex 文件上传转换为 FormData
  • 文件下载转换为 base64 返回
  • 内部代理密钥请求头
  • 统一错误结构
  • 服务客户端封装
  • node_wix_server 设备接口封装

当前服务模块:

| 模块 | 对象 | 后端路径 | | --- | --- | --- | | Crypto | Client.CryptoApi | /ts/crypto/* | | XData | Client.XDataApi | /ts/xdata | | Forward | Client.ForwardApi | /ts/forward/send | | Local File | Client.FileApi.Local | /ts/files/ts/upload/default/ts/download/default/ts/read 等 | | COS | Client.FileApi.Cos | /ts/cos/* | | Supabase Storage | Client.FileApi.Supabase(bucket) | /ts/supabase/{bucket}/* | | Wix Device | Client.WixDeviceApi | /hzhx/wix_server |

文档入口

文档索引:

docs/README.md

Base44 Backend Function 接入、前端如何触发、payload 格式、接口总表:

docs/base44-usage-guide.md

本地 Koa HTTP 宿主 node_base44_http 的使用方式、QJson 命令、/hzhx/proxy 兼容入口:

docs/local-http-service-guide.md

npm 发布流程、token 配置、publish-npm.bat 说明:

docs/npm-publish-guide.md

版本修改记录:

docs/logs/

Base44 使用方向

Base44 Backend Function 中通过 npm 引入:

import { createClientFromRequest } from 'npm:@base44/[email protected]';
import Base44Backend from 'npm:@zhaoxiangjun/[email protected]';

const { createBase44ThinkSignProxy } = Base44Backend;

const Proxy = createBase44ThinkSignProxy({
  apiBaseUrl: Deno.env.get('THINKSIGN_API_BASE'),
  proxySecret: Deno.env.get('THINKSIGN_PROXY_SECRET'),
  createBase44ClientFromRequest: createClientFromRequest,
  requireAuth: true,
});

Deno.serve((Req) => Proxy.handle(Req));

完整示例和接口说明见 docs/base44-usage-guide.md

如果需要调用 node_wix_server 设备接口,业务 Function 中使用服务客户端并单独配置:

const Client = createThinkSignBackendClient({
  apiBaseUrl: Deno.env.get('THINKSIGN_API_BASE'),
  wixApiBaseUrl: Deno.env.get('WIX_SERVER_API_BASE'),
  proxySecret: Deno.env.get('THINKSIGN_PROXY_SECRET'),
  createBase44ClientFromRequest: createClientFromRequest,
  requireAuth: false,
});

const Result = await Client.WixDeviceApi.QuerySoracomTraffic({
  Mac: '54B56C04DC87',
  HoursValue: 24,
});

本地服务使用方向

本地 Node/Koa 服务,例如 node_base44_http,可以通过两种方式使用本包:

  1. 使用 createThinkSignBackendClient() 封装 QJson 命令入口。
  2. 使用 createBase44ThinkSignProxy() 提供和 Base44 tsProxy 相同 payload 的 HTTP 入口。

默认本地服务入口示例:

POST http://localhost:21044/hzhx/base44_http
POST http://localhost:21044/hzhx/proxy

完整说明见 docs/local-http-service-guide.md

本地检查

安装依赖:

install.bat

运行检查:

npm run check
npm test

打包预检:

npm pack --dry-run

发布

项目根目录提供发布脚本:

publish-npm.bat

发布前需要在系统或用户环境变量中配置:

NPM_TOKEN

详细发布流程见 docs/npm-publish-guide.md