更新 CLI 版本至 0.1.33,重构构建配置,添加新的路由和中间件,增强身份验证支持

This commit is contained in:
xiongxiao
2026-03-24 17:38:37 +08:00
committed by cnb
parent b05f059aea
commit 4e2ae49372
27 changed files with 125 additions and 97 deletions

View File

@@ -41,6 +41,7 @@ app.route({
key: 'main',
description: 'config 命令',
metadata: {
middleware: ['auth'],
args: {
dev: z.string().optional().describe('Specify dev'),
set: z.string().optional().describe('set config'),
@@ -114,6 +115,7 @@ app.route({
key: 'set',
description: 'set config',
metadata: {
middleware: ['auth'],
args: {
key: z.string().describe('配置键名'),
value: z.string().optional().describe('配置值'),
@@ -173,6 +175,7 @@ app.route({
key: 'get',
description: 'get config',
metadata: {
middleware: ['auth'],
args: {
key: z.string().optional().describe('配置键名'),
}
@@ -201,6 +204,7 @@ app.route({
key: 'remove',
description: 'remove config',
metadata: {
middleware: ['auth'],
args: {
key: z.string().describe('配置键名'),
}
@@ -220,6 +224,7 @@ app.route({
key: 'list',
description: 'list config',
metadata: {
middleware: ['auth'],
args: {}
}
}).define(async () => {