@nocobase/cli 0.16.0-alpha.4 → 0.16.0-alpha.6
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 +4 -4
- package/src/util.js +7 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/cli",
|
|
3
|
-
"version": "0.16.0-alpha.
|
|
3
|
+
"version": "0.16.0-alpha.6",
|
|
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.16.0-alpha.
|
|
11
|
+
"@nocobase/app": "0.16.0-alpha.6",
|
|
12
12
|
"@types/fs-extra": "^11.0.1",
|
|
13
13
|
"@umijs/utils": "3.5.20",
|
|
14
14
|
"chalk": "^4.1.1",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"tsx": "^3.12.7"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@nocobase/devtools": "0.16.0-alpha.
|
|
26
|
+
"@nocobase/devtools": "0.16.0-alpha.6"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
30
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
31
31
|
"directory": "packages/core/cli"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "e8ad2328a8f85289cb19a7994d3fd726c7ae1720"
|
|
34
34
|
}
|
package/src/util.js
CHANGED
|
@@ -2,7 +2,7 @@ const net = require('net');
|
|
|
2
2
|
const chalk = require('chalk');
|
|
3
3
|
const execa = require('execa');
|
|
4
4
|
const fg = require('fast-glob');
|
|
5
|
-
const { dirname, join, resolve } = require('path');
|
|
5
|
+
const { dirname, join, resolve, sep } = require('path');
|
|
6
6
|
const { readFile, writeFile } = require('fs').promises;
|
|
7
7
|
const { existsSync, mkdirSync, cpSync, writeFileSync } = require('fs');
|
|
8
8
|
|
|
@@ -54,8 +54,8 @@ exports.nodeCheck = () => {
|
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
-
exports.run = (command,
|
|
58
|
-
return execa(command,
|
|
57
|
+
exports.run = (command, args, options = {}) => {
|
|
58
|
+
return execa(command, args, {
|
|
59
59
|
shell: true,
|
|
60
60
|
stdio: 'inherit',
|
|
61
61
|
...options,
|
|
@@ -189,7 +189,10 @@ exports.genTsConfigPaths = function genTsConfigPaths() {
|
|
|
189
189
|
packages.forEach((packageFile) => {
|
|
190
190
|
const packageJsonName = require(packageFile).name;
|
|
191
191
|
const packageDir = dirname(packageFile);
|
|
192
|
-
const relativePath = packageDir
|
|
192
|
+
const relativePath = packageDir
|
|
193
|
+
.slice(cwdLength + 1)
|
|
194
|
+
.split(sep)
|
|
195
|
+
.join('/');
|
|
193
196
|
paths[packageJsonName] = [`${relativePath}/src`];
|
|
194
197
|
paths[`${packageJsonName}/client`] = [`${relativePath}/src/client`];
|
|
195
198
|
});
|