@gadmin2n/cli 0.0.161 → 0.0.162
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/actions/prisma.action.js +4 -4
- package/package.json +2 -2
package/actions/prisma.action.js
CHANGED
|
@@ -112,16 +112,16 @@ class PrismaAction extends abstract_action_1.AbstractAction {
|
|
|
112
112
|
};
|
|
113
113
|
// 构建合并的 schema(两种模式都需要重建 schema.prisma)
|
|
114
114
|
this.buildMergedSchema();
|
|
115
|
-
// Staging 目录:generator 全量写入到
|
|
115
|
+
// Staging 目录:generator 全量写入到 .gadmin/generated/*,CLI 再增量分发。
|
|
116
116
|
// 不放在 src/ 下,避免任何 watcher 感知到中间态的进出。
|
|
117
117
|
// 用绝对路径以便 (a) 在 shell.cd('server/') 之后仍指向正确位置;
|
|
118
118
|
// (b) 通过 env 传给 generator 子进程时无歧义。
|
|
119
119
|
const cwd = process.cwd();
|
|
120
|
-
const WEB_STAGING = (0, path_1.resolve)(cwd, '
|
|
121
|
-
const SERVER_STAGING = (0, path_1.resolve)(cwd, '
|
|
120
|
+
const WEB_STAGING = (0, path_1.resolve)(cwd, '.gadmin/generated/web');
|
|
121
|
+
const SERVER_STAGING = (0, path_1.resolve)(cwd, '.gadmin/generated/server');
|
|
122
122
|
const WEB_ROUTES_DIR = (0, path_1.resolve)(cwd, 'web/src/routes');
|
|
123
123
|
// 每轮清空对应 staging,让「本轮 staging = 本轮完整产物」这个不变量成立,
|
|
124
|
-
// 后续孤儿清理直接依赖它。父目录(如
|
|
124
|
+
// 后续孤儿清理直接依赖它。父目录(如 .gadmin/generated/)不存在时先创建,
|
|
125
125
|
// 避免 generator 首次运行时因缺目录报错。
|
|
126
126
|
fs.rmSync(WEB_STAGING, { recursive: true, force: true });
|
|
127
127
|
fs.mkdirSync(WEB_STAGING, { recursive: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gadmin2n/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.162",
|
|
4
4
|
"description": "Gadmin - modern, fast, powerful node.js web framework (@cli)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@angular-devkit/core": "13.3.2",
|
|
48
48
|
"@angular-devkit/schematics": "13.3.2",
|
|
49
49
|
"@angular-devkit/schematics-cli": "13.3.2",
|
|
50
|
-
"@gadmin2n/schematics": "^0.0.
|
|
50
|
+
"@gadmin2n/schematics": "^0.0.130",
|
|
51
51
|
"abc": "^0.6.1",
|
|
52
52
|
"chalk": "3.0.0",
|
|
53
53
|
"chokidar": "3.5.3",
|