@nocobase/cli 2.0.0-alpha.50 → 2.0.0-alpha.52

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.0.0-alpha.50",
3
+ "version": "2.0.0-alpha.52",
4
4
  "description": "",
5
5
  "license": "AGPL-3.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.0.0-alpha.50",
11
+ "@nocobase/app": "2.0.0-alpha.52",
12
12
  "@nocobase/license-kit": "^0.2.17",
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.0.0-alpha.50"
30
+ "@nocobase/devtools": "2.0.0-alpha.52"
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": "a6eb64abf3632e116ad0b295a7f410270a1059d1"
37
+ "gitHead": "b32992d8baeb4ca6616d839ca2f9c023d49476a9"
38
38
  }
@@ -56,32 +56,35 @@ module.exports = (cli) => {
56
56
  await downloadPro();
57
57
  }
58
58
 
59
- const watcher = chokidar.watch('./storage/plugins/**/*', {
60
- cwd: process.cwd(),
61
- ignoreInitial: true,
62
- ignored: /(^|[\/\\])\../, // 忽略隐藏文件
63
- persistent: true,
64
- depth: 1, // 只监听第一层目录
65
- });
59
+ if (process.env.NO_WATCH_PLUGINS === true || process.env.NO_WATCH_PLUGINS === 'true') {
66
60
 
67
- const restart = _.debounce(async () => {
68
- console.log('restarting...');
69
- await run('yarn', ['nocobase', 'pm2-restart']);
70
- }, 500);
61
+ const restart = _.debounce(async () => {
62
+ console.log('restarting...');
63
+ await run('yarn', ['nocobase', 'pm2-restart']);
64
+ }, 500);
71
65
 
72
- watcher
73
- .on('ready', () => {
74
- isReady = true;
75
- })
76
- .on('addDir', async (pathname) => {
77
- if (!isReady) return;
78
- restart();
79
- })
80
- .on('unlinkDir', async (pathname) => {
81
- if (!isReady) return;
82
- restart();
66
+ const watcher = chokidar.watch('./storage/plugins/**/*', {
67
+ cwd: process.cwd(),
68
+ ignoreInitial: true,
69
+ ignored: /(^|[\/\\])\../, // 忽略隐藏文件
70
+ persistent: true,
71
+ depth: 1, // 只监听第一层目录
83
72
  });
84
73
 
74
+ watcher
75
+ .on('ready', () => {
76
+ isReady = true;
77
+ })
78
+ .on('addDir', async (pathname) => {
79
+ if (!isReady) return;
80
+ restart();
81
+ })
82
+ .on('unlinkDir', async (pathname) => {
83
+ if (!isReady) return;
84
+ restart();
85
+ });
86
+ }
87
+
85
88
  if (opts.port) {
86
89
  process.env.APP_PORT = opts.port;
87
90
  }