@lakphy/local-router 0.3.3 → 0.4.0-beta.1
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.
- package/config.schema.json +26 -0
- package/dist/cli.js +407 -46
- package/dist/entry.js +400 -39
- package/dist/web/assets/index-DuaLtWlv.js +191 -0
- package/dist/web/assets/index-RuflkSNT.css +2 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-CbUvycUp.css +0 -2
- package/dist/web/assets/index-Dz4pO265.js +0 -191
package/config.schema.json
CHANGED
|
@@ -167,6 +167,13 @@
|
|
|
167
167
|
"additionalProperties": {
|
|
168
168
|
"$ref": "#/$defs/modelCapabilities"
|
|
169
169
|
}
|
|
170
|
+
},
|
|
171
|
+
"plugins": {
|
|
172
|
+
"type": "array",
|
|
173
|
+
"description": "插件列表。数组顺序决定洋葱模型的外→内层级:请求阶段正序执行,响应阶段逆序执行。",
|
|
174
|
+
"items": {
|
|
175
|
+
"$ref": "#/$defs/pluginConfig"
|
|
176
|
+
}
|
|
170
177
|
}
|
|
171
178
|
}
|
|
172
179
|
},
|
|
@@ -259,6 +266,25 @@
|
|
|
259
266
|
"description": "单个流式请求最大记录字节数(默认约 10MB = 10485760 字节)。超出部分将被截断并在文件末尾追加 [TRUNCATED] 标记。设置合理上限可防止异常长响应撑爆磁盘。"
|
|
260
267
|
}
|
|
261
268
|
}
|
|
269
|
+
},
|
|
270
|
+
"pluginConfig": {
|
|
271
|
+
"type": "object",
|
|
272
|
+
"description": "单个插件的配置。package 指定 npm 包名或本地路径,params 为传递给 create() 的参数对象。",
|
|
273
|
+
"additionalProperties": false,
|
|
274
|
+
"required": ["package"],
|
|
275
|
+
"properties": {
|
|
276
|
+
"package": {
|
|
277
|
+
"type": "string",
|
|
278
|
+
"minLength": 1,
|
|
279
|
+
"description": "插件包名或本地路径。以 ./ 或 ../ 或 / 开头视为本地文件(相对于配置文件目录解析),否则作为 npm 包名通过 import() 加载。",
|
|
280
|
+
"examples": ["local-router-plugin-audit", "./plugins/content-filter.ts"]
|
|
281
|
+
},
|
|
282
|
+
"params": {
|
|
283
|
+
"type": "object",
|
|
284
|
+
"description": "传递给插件 create() 方法的参数对象。",
|
|
285
|
+
"additionalProperties": true
|
|
286
|
+
}
|
|
287
|
+
}
|
|
262
288
|
}
|
|
263
289
|
}
|
|
264
290
|
}
|