@hile/cli 1.0.16 → 1.0.18
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/index.js +3 -1
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -59,7 +59,6 @@ program
|
|
|
59
59
|
.option('-e, --env-file <path>', '加载指定 env 文件(兼容 Node --env-file 语义;可多次指定,先加载的不被后加载覆盖)', (v, acc) => (acc.push(v), acc), [])
|
|
60
60
|
.description('启动服务,加载所有后缀为 boot.ts 或 boot.js 的服务,并注册退出钩子,在进程退出时销毁所有服务')
|
|
61
61
|
.action(async (options) => {
|
|
62
|
-
const offEvent = container.onEvent(logContainerEvent);
|
|
63
62
|
// 先加载 --env-file(与 Node --env-file 行为一致:先加载的优先,已存在的 key 不被覆盖)
|
|
64
63
|
const envFiles = options.envFile ?? [];
|
|
65
64
|
for (const p of envFiles) {
|
|
@@ -73,6 +72,9 @@ program
|
|
|
73
72
|
else {
|
|
74
73
|
process.env.NODE_ENV = 'production';
|
|
75
74
|
}
|
|
75
|
+
const offEvent = process.env.NODE_ENV === 'development'
|
|
76
|
+
? container.on(logContainerEvent)
|
|
77
|
+
: () => { };
|
|
76
78
|
const cwd = process.cwd();
|
|
77
79
|
const files = [];
|
|
78
80
|
// 加载 package.json 文件
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hile/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build": "tsc -b",
|
|
7
|
+
"build": "tsc -b && fix-esm-import-path --preserve-import-type ./dist",
|
|
8
8
|
"dev": "tsc -b --watch"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
@@ -20,14 +20,15 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/async-exit-hook": "^2.0.2",
|
|
23
|
+
"fix-esm-import-path": "^1.10.3",
|
|
23
24
|
"vitest": "^4.0.18"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
|
-
"@hile/core": "^1.0.
|
|
27
|
+
"@hile/core": "^1.0.20",
|
|
27
28
|
"async-exit-hook": "^2.0.1",
|
|
28
29
|
"commander": "^14.0.3",
|
|
29
30
|
"glob": "^13.0.6",
|
|
30
31
|
"tsx": "^4.21.0"
|
|
31
32
|
},
|
|
32
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "07067534cbd2e1c4011c72f74d16d18506081aac"
|
|
33
34
|
}
|