@deepstorm/cli 0.10.0 → 0.10.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/dist/registry.json
CHANGED
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"buildTool": "pnpm:*",
|
|
105
105
|
"formatCmd": "pnpm",
|
|
106
106
|
"fileExt": "*.component.ts / *.service.ts / *.ts",
|
|
107
|
-
"sourcePath": "src/
|
|
107
|
+
"sourcePath": "client/src/",
|
|
108
108
|
"styleRef": "→ 参考 [Angular 前端速查](quick-reference.md)"
|
|
109
109
|
},
|
|
110
110
|
"affectedTemplates": [
|
|
@@ -405,7 +405,7 @@
|
|
|
405
405
|
"buildTool": "pnpm:*",
|
|
406
406
|
"formatCmd": "npx eslint",
|
|
407
407
|
"fileExt": "*.ts",
|
|
408
|
-
"sourcePath": "src/ test/",
|
|
408
|
+
"sourcePath": "server/src/ server/test/",
|
|
409
409
|
"styleRef": "→ 参考 [Node.js NestJS 后端速查](quick-reference.md)"
|
|
410
410
|
},
|
|
411
411
|
"availableAiFrameworks": [
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
## 构建命令
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
#
|
|
38
|
+
# 依赖安装(在项目根目录执行)
|
|
39
39
|
pnpm install
|
|
40
40
|
|
|
41
|
-
# Prisma
|
|
42
|
-
npx prisma generate
|
|
41
|
+
# Prisma 客户端生成(在 server/ 目录执行)
|
|
42
|
+
cd server && npx prisma generate
|
|
43
43
|
|
|
44
44
|
# 代码检查
|
|
45
|
-
npx eslint src/ --ext .ts
|
|
46
|
-
npx prettier --check src/
|
|
45
|
+
cd server && npx eslint src/ --ext .ts
|
|
46
|
+
cd server && npx prettier --check src/
|
|
47
47
|
|
|
48
48
|
# 测试
|
|
49
|
-
npx jest
|
|
49
|
+
cd server && npx jest
|
|
50
50
|
|
|
51
51
|
# 构建
|
|
52
|
-
npx nest build
|
|
52
|
+
cd server && npx nest build
|
|
53
53
|
```
|
|
@@ -79,30 +79,31 @@ export class ToolsModule {}
|
|
|
79
79
|
## 项目目录结构
|
|
80
80
|
|
|
81
81
|
```
|
|
82
|
-
src/
|
|
82
|
+
server/src/
|
|
83
83
|
├── main.ts # 入口文件
|
|
84
84
|
├── app.module.ts # 根模块
|
|
85
85
|
├── app.controller.ts # 根 Controller(健康检查)
|
|
86
86
|
├── prisma/
|
|
87
87
|
│ ├── prisma.module.ts # Prisma 全局模块
|
|
88
88
|
│ └── prisma.service.ts # Prisma Client 封装
|
|
89
|
-
├── modules/
|
|
90
|
-
│ └── {module}/
|
|
91
|
-
│ ├── {module}.module.ts
|
|
92
|
-
│ ├── {module}.controller.ts
|
|
93
|
-
│ ├── {module}.service.ts
|
|
94
|
-
│ ├── dto/
|
|
95
|
-
│ │ ├── create-{entity}.dto.ts
|
|
96
|
-
│ │ └── update-{entity}.dto.ts
|
|
97
|
-
│ └── entities/
|
|
98
|
-
│ └── {entity}.entity.ts # Prisma 生成类型的二次封装(可选)
|
|
99
89
|
├── common/
|
|
100
|
-
│ ├──
|
|
101
|
-
│ ├──
|
|
102
|
-
│ ├──
|
|
103
|
-
│
|
|
104
|
-
└──
|
|
105
|
-
|
|
90
|
+
│ ├── guards/ # 认证/授权守卫
|
|
91
|
+
│ ├── interceptors/ # 请求拦截器
|
|
92
|
+
│ ├── filters/ # 异常过滤器
|
|
93
|
+
│ ├── pipes/ # 管道校验
|
|
94
|
+
│ └── decorators/ # 自定义装饰器
|
|
95
|
+
├── config/
|
|
96
|
+
│ └── app.config.ts # 应用配置
|
|
97
|
+
└── modules/
|
|
98
|
+
└── {module}/
|
|
99
|
+
├── {module}.module.ts
|
|
100
|
+
├── {module}.controller.ts
|
|
101
|
+
├── {module}.service.ts
|
|
102
|
+
├── dto/
|
|
103
|
+
│ ├── create-{entity}.dto.ts
|
|
104
|
+
│ └── update-{entity}.dto.ts
|
|
105
|
+
└── entities/
|
|
106
|
+
└── {entity}.entity.ts # Prisma 生成类型的二次封装(可选)
|
|
106
107
|
```
|
|
107
108
|
|
|
108
109
|
## 常见坑
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepstorm/cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "DeepStorm CLI — 一键配置项目开发环境",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "billkang",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dotenv": "^17.4.2",
|
|
17
17
|
"handlebars": "^4.7.8",
|
|
18
18
|
"js-yaml": "^4.1.0",
|
|
19
|
-
"@deepstorm/pilot": "^0.10.
|
|
19
|
+
"@deepstorm/pilot": "^0.10.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/node": "^22.0.0",
|