@nocobase/cli 0.11.1-alpha.3 → 0.11.1-alpha.5
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 +5 -4
- package/src/commands/dev.js +7 -5
- package/src/util.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/cli",
|
|
3
|
-
"version": "0.11.1-alpha.
|
|
3
|
+
"version": "0.11.1-alpha.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -18,15 +18,16 @@
|
|
|
18
18
|
"fs-extra": "^11.1.1",
|
|
19
19
|
"pm2": "^5.2.0",
|
|
20
20
|
"portfinder": "^1.0.28",
|
|
21
|
-
"serve": "^13.0.2"
|
|
21
|
+
"serve": "^13.0.2",
|
|
22
|
+
"tsx": "^3.12.7"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
|
-
"@nocobase/devtools": "0.11.1-alpha.
|
|
25
|
+
"@nocobase/devtools": "0.11.1-alpha.5"
|
|
25
26
|
},
|
|
26
27
|
"repository": {
|
|
27
28
|
"type": "git",
|
|
28
29
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
29
30
|
"directory": "packages/core/cli"
|
|
30
31
|
},
|
|
31
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "1dcfd15a7d95a40b0a2f60e1de19ec574066fb20"
|
|
32
33
|
}
|
package/src/commands/dev.js
CHANGED
|
@@ -55,13 +55,13 @@ module.exports = (cli) => {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
await runAppCommand('install', ['--silent']);
|
|
58
|
-
|
|
59
|
-
// await runAppCommand('db:sync');
|
|
60
|
-
// }
|
|
58
|
+
|
|
61
59
|
if (server || !client) {
|
|
62
60
|
console.log('starting server', serverPort);
|
|
61
|
+
|
|
63
62
|
const argv = [
|
|
64
|
-
'
|
|
63
|
+
'watch',
|
|
64
|
+
'--tsconfig',
|
|
65
65
|
'./tsconfig.server.json',
|
|
66
66
|
'-r',
|
|
67
67
|
'tsconfig-paths/register',
|
|
@@ -74,8 +74,9 @@ module.exports = (cli) => {
|
|
|
74
74
|
if (opts.dbSync) {
|
|
75
75
|
argv.push('--db-sync');
|
|
76
76
|
}
|
|
77
|
+
|
|
77
78
|
const runDevServer = () => {
|
|
78
|
-
run('
|
|
79
|
+
run('tsx', argv, {
|
|
79
80
|
env: {
|
|
80
81
|
APP_PORT: serverPort,
|
|
81
82
|
},
|
|
@@ -91,6 +92,7 @@ module.exports = (cli) => {
|
|
|
91
92
|
|
|
92
93
|
runDevServer();
|
|
93
94
|
}
|
|
95
|
+
|
|
94
96
|
if (client || !server) {
|
|
95
97
|
console.log('starting client', 1 * clientPort);
|
|
96
98
|
run('umi', ['dev'], {
|
package/src/util.js
CHANGED
|
@@ -106,7 +106,7 @@ exports.runInstall = async () => {
|
|
|
106
106
|
|
|
107
107
|
if (exports.isDev()) {
|
|
108
108
|
const argv = [
|
|
109
|
-
'
|
|
109
|
+
'--tsconfig',
|
|
110
110
|
'./tsconfig.server.json',
|
|
111
111
|
'-r',
|
|
112
112
|
'tsconfig-paths/register',
|
|
@@ -114,7 +114,7 @@ exports.runInstall = async () => {
|
|
|
114
114
|
'install',
|
|
115
115
|
'-s',
|
|
116
116
|
];
|
|
117
|
-
await exports.run('
|
|
117
|
+
await exports.run('tsx', argv);
|
|
118
118
|
} else if (isProd()) {
|
|
119
119
|
const file = `./packages/${APP_PACKAGE_ROOT}/server/lib/index.js`;
|
|
120
120
|
const argv = [file, 'install', '-s'];
|
|
@@ -127,7 +127,7 @@ exports.runAppCommand = async (command, args = []) => {
|
|
|
127
127
|
|
|
128
128
|
if (exports.isDev()) {
|
|
129
129
|
const argv = [
|
|
130
|
-
'
|
|
130
|
+
'--tsconfig',
|
|
131
131
|
'./tsconfig.server.json',
|
|
132
132
|
'-r',
|
|
133
133
|
'tsconfig-paths/register',
|
|
@@ -135,7 +135,7 @@ exports.runAppCommand = async (command, args = []) => {
|
|
|
135
135
|
command,
|
|
136
136
|
...args,
|
|
137
137
|
];
|
|
138
|
-
await exports.run('
|
|
138
|
+
await exports.run('tsx', argv);
|
|
139
139
|
} else if (isProd()) {
|
|
140
140
|
const argv = [`./packages/${APP_PACKAGE_ROOT}/server/lib/index.js`, command, ...args];
|
|
141
141
|
await exports.run('node', argv);
|