@hile/cli 1.0.22 → 1.0.23

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 CHANGED
@@ -16,8 +16,13 @@ program.version(pkg.version, '-v, --version', '当前版本号');
16
16
  program
17
17
  .command('start')
18
18
  .option('-d, --dev', '开发模式', false)
19
+ .option('-s, --silent', '静默模式', false)
19
20
  .option('-e, --env-file <path>', '加载指定 env 文件(兼容 Node --env-file 语义;可多次指定,先加载的不被后加载覆盖)', (v, acc) => (acc.push(v), acc), [])
20
21
  .description('启动服务,加载所有后缀为 boot.ts 或 boot.js 的服务,并注册退出钩子,在进程退出时销毁所有服务')
21
- .action((options) => start({ dev: options.dev, envFile: options.envFile }));
22
+ .action((options) => start({
23
+ dev: options.dev,
24
+ envFile: options.envFile,
25
+ silent: options.silent
26
+ }));
22
27
  program.parseAsync(process.argv);
23
28
  export * from './start.js';
package/dist/start.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export declare function start(options: {
2
2
  dev: boolean;
3
3
  envFile?: string[];
4
+ silent?: boolean;
4
5
  }): Promise<void>;
package/dist/start.js CHANGED
@@ -74,7 +74,7 @@ export async function start(options) {
74
74
  else {
75
75
  process.env.NODE_ENV = 'production';
76
76
  }
77
- const offEvent = process.env.NODE_ENV === 'development'
77
+ const offEvent = !options.silent && process.env.NODE_ENV === 'development'
78
78
  ? container.on(logContainerEvent)
79
79
  : () => { };
80
80
  const cwd = process.cwd();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hile/cli",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -31,5 +31,5 @@
31
31
  "glob": "^13.0.6",
32
32
  "tsx": "^4.21.0"
33
33
  },
34
- "gitHead": "4ad0c56518461cbcc48c1dfe2fcb667303c5c889"
34
+ "gitHead": "95793238e98f678a8f07ae4cb214968dd447494f"
35
35
  }