@nocobase/cli 2.1.0-alpha.14 → 2.1.0-alpha.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/cli",
3
- "version": "2.1.0-alpha.14",
3
+ "version": "2.1.0-alpha.15",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./src/index.js",
@@ -8,7 +8,7 @@
8
8
  "nocobase": "./bin/index.js"
9
9
  },
10
10
  "dependencies": {
11
- "@nocobase/app": "2.1.0-alpha.14",
11
+ "@nocobase/app": "2.1.0-alpha.15",
12
12
  "@nocobase/license-kit": "^0.3.8",
13
13
  "@types/fs-extra": "^11.0.1",
14
14
  "@umijs/utils": "3.5.20",
@@ -27,12 +27,12 @@
27
27
  "tsx": "^4.19.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@nocobase/devtools": "2.1.0-alpha.14"
30
+ "@nocobase/devtools": "2.1.0-alpha.15"
31
31
  },
32
32
  "repository": {
33
33
  "type": "git",
34
34
  "url": "git+https://github.com/nocobase/nocobase.git",
35
35
  "directory": "packages/core/cli"
36
36
  },
37
- "gitHead": "d8735b541de0ff9557bba704de49c799b4962672"
37
+ "gitHead": "7c86e75b0af4b9f532c8ebf5ef96a7423b0ab60e"
38
38
  }
package/src/cli.js CHANGED
@@ -14,6 +14,15 @@ const cli = new Command();
14
14
 
15
15
  cli.version(require('../package.json').version);
16
16
 
17
+ const argv = process.argv.slice(2);
18
+ const emptyArgs = argv.length === 0;
19
+ const isPmListCommand = argv[0] === 'pm' && argv[1] === 'list';
20
+ const hasSilentLikeFlag = argv.includes('--help') || argv.includes('-h') || argv.includes('--silent');
21
+
22
+ if (emptyArgs || isPmListCommand || hasSilentLikeFlag) {
23
+ process.env.LOGGER_SILENT = 'true';
24
+ }
25
+
17
26
  commands(cli);
18
27
 
19
28
  module.exports = cli;
package/src/util.js CHANGED
@@ -199,6 +199,9 @@ exports.runAppCommand = async (command, args = []) => {
199
199
  };
200
200
 
201
201
  exports.promptForTs = () => {
202
+ if (process.env.LOGGER_SILENT === 'true') {
203
+ return;
204
+ }
202
205
  console.log(chalk.green('WAIT: ') + 'TypeScript compiling...');
203
206
  };
204
207