@xyit-team/wellspring-gateway 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +38 -2
  3. package/index.ts +14 -0
  4. package/package.json +39 -5
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Hangzhou Xiangyuan Internet Technology Co., Ltd.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,39 @@
1
- # Temporary Holding Version
1
+ # @xyit-team/wellspring-gateway
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Wellspring 网关插件:统一入口(单端口 / 路由 / TLS / 统一登录)。
4
+
5
+ 当前是占位版本:网关实现待重写。仓库此前是 `wellspring-http`(插件 HTTP 服务托管层,
6
+ 已停止维护;旧包 `@xyit-team/wellspring-http` 用 `npm deprecate` 标记)。
7
+
8
+ ## 安装
9
+
10
+ ```bash
11
+ wellspring plugin install npm:@xyit-team/wellspring-gateway
12
+ # 或
13
+ wellspring plugin install github:xyit-team/wellspring-gateway
14
+ ```
15
+
16
+ ## 开发
17
+
18
+ 目录只保留包身份与发布流程所需文件:`package.json`、插件入口 `index.ts`、README、LICENSE、
19
+ `publish-npm.yml`。CI、构建脚本与消费者 SDK 在网关实现落地后补回。
20
+
21
+ ## 发布
22
+
23
+ 首次发布手动执行(包在 npm 上存在后才能配 Trusted Publishing):
24
+
25
+ ```bash
26
+ npm login
27
+ npm publish --access public
28
+ ```
29
+
30
+ 配置 Trusted Publishing(需要 2FA):
31
+
32
+ ```bash
33
+ npm trust github @xyit-team/wellspring-gateway \
34
+ --repo xyit-team/wellspring-gateway \
35
+ --file publish-npm.yml \
36
+ --allow-publish
37
+ ```
38
+
39
+ 之后的版本:改 `package.json` 的 version → 提交 → 推同名 `v*` 标签,`publish-npm.yml` 自动发布。
package/index.ts ADDED
@@ -0,0 +1,14 @@
1
+ import type { PluginApi } from "wellspring/api/host/index.ts"
2
+
3
+ export function setup() {
4
+ return {
5
+ id: "wellspring-gateway",
6
+ name: "Wellspring Gateway",
7
+ description: "统一入口网关(占位版本)",
8
+ version: "0.1.0",
9
+ status: "ok" as const,
10
+ init: (api: PluginApi) => {
11
+ api.logger.info("wellspring-gateway 占位版本")
12
+ },
13
+ }
14
+ }
package/package.json CHANGED
@@ -1,6 +1,40 @@
1
1
  {
2
- "name": "@xyit-team/wellspring-gateway",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@xyit-team/wellspring-gateway",
3
+ "version": "0.1.0",
4
+ "description": "Wellspring 网关插件:统一入口、路由、TLS 与登录(占位版本,实现待重写)",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/xyit-team/wellspring-gateway.git"
9
+ },
10
+ "homepage": "https://github.com/xyit-team/wellspring-gateway#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/xyit-team/wellspring-gateway/issues"
13
+ },
14
+ "type": "module",
15
+ "main": "index.ts",
16
+ "engines": {
17
+ "node": ">=24"
18
+ },
19
+ "files": [
20
+ "index.ts",
21
+ "README.md",
22
+ "LICENSE"
23
+ ],
24
+ "wellspring": {
25
+ "apiVersion": 1,
26
+ "name": "wellspring-gateway",
27
+ "npm": "@xyit-team/wellspring-gateway",
28
+ "github": "xyit-team/wellspring-gateway",
29
+ "sandbox": {
30
+ "profile": "plugin",
31
+ "fs": {
32
+ "read": [],
33
+ "write": []
34
+ },
35
+ "hostApi": [
36
+ "logger"
37
+ ]
38
+ }
39
+ }
40
+ }