@nocobase/cli 0.21.0-alpha.11 → 0.21.0-alpha.12

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/nocobase.conf.tpl CHANGED
@@ -45,7 +45,7 @@ server {
45
45
  }
46
46
 
47
47
  location ^~ {{publicPath}}api/ {
48
- proxy_pass http://127.0.0.1:{{apiPort}}{{publicPath}}api/;
48
+ proxy_pass http://127.0.0.1:{{apiPort}};
49
49
  proxy_http_version 1.1;
50
50
  proxy_set_header Upgrade $http_upgrade;
51
51
  proxy_set_header Connection 'upgrade';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/cli",
3
- "version": "0.21.0-alpha.11",
3
+ "version": "0.21.0-alpha.12",
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": "0.21.0-alpha.11",
11
+ "@nocobase/app": "0.21.0-alpha.12",
12
12
  "@types/fs-extra": "^11.0.1",
13
13
  "@umijs/utils": "3.5.20",
14
14
  "chalk": "^4.1.1",
@@ -25,12 +25,12 @@
25
25
  "tsx": "^4.6.2"
26
26
  },
27
27
  "devDependencies": {
28
- "@nocobase/devtools": "0.21.0-alpha.11"
28
+ "@nocobase/devtools": "0.21.0-alpha.12"
29
29
  },
30
30
  "repository": {
31
31
  "type": "git",
32
32
  "url": "git+https://github.com/nocobase/nocobase.git",
33
33
  "directory": "packages/core/cli"
34
34
  },
35
- "gitHead": "69fe8a6d75864a3ba98c5a6d3ebfe43a585d4cd3"
35
+ "gitHead": "dd6229634ae442894b0f0666a00ba4a3888b8985"
36
36
  }
@@ -1,9 +1,19 @@
1
1
  const { Command } = require('commander');
2
2
  const { isDev, run, postCheck, runInstall, promptForTs } = require('../util');
3
- const { existsSync, unlink } = require('fs');
3
+ const { existsSync, rmSync } = require('fs');
4
4
  const { resolve } = require('path');
5
5
  const chalk = require('chalk');
6
6
 
7
+ function deleteSockFiles() {
8
+ const { SOCKET_PATH, PM2_HOME } = process.env;
9
+ if (existsSync(PM2_HOME)) {
10
+ rmSync(PM2_HOME, { recursive: true });
11
+ }
12
+ if (existsSync(SOCKET_PATH)) {
13
+ rmSync(SOCKET_PATH);
14
+ }
15
+ }
16
+
7
17
  /**
8
18
  *
9
19
  * @param {Command} cli
@@ -41,6 +51,7 @@ module.exports = (cli) => {
41
51
  return;
42
52
  }
43
53
  await postCheck(opts);
54
+ deleteSockFiles();
44
55
  if (opts.daemon) {
45
56
  run('pm2', ['start', `${APP_PACKAGE_ROOT}/lib/index.js`, '--', ...process.argv.slice(2)]);
46
57
  } else {