@nocobase/cli 2.0.0-alpha.4 → 2.0.0-alpha.41
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.
|
|
3
|
+
"version": "2.0.0-alpha.41",
|
|
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.
|
|
11
|
+
"@nocobase/app": "2.0.0-alpha.41",
|
|
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.
|
|
30
|
+
"@nocobase/devtools": "2.0.0-alpha.41"
|
|
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": "
|
|
37
|
+
"gitHead": "889e81eef0280c2e45571bd0a4b2db6aa004f8c1"
|
|
38
38
|
}
|
package/src/commands/perf.js
CHANGED
|
@@ -53,8 +53,8 @@ module.exports = (cli) => {
|
|
|
53
53
|
dotenv.config({ path: envFilePath, override: true });
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
if (!process.env.
|
|
57
|
-
throw new Error('Please set
|
|
56
|
+
if (!process.env.TARGET_ORIGIN) {
|
|
57
|
+
throw new Error('Please set TARGET_ORIGIN in environment variables or in .env.perf file');
|
|
58
58
|
}
|
|
59
59
|
const args = command.args.filter((arg) => arg !== file);
|
|
60
60
|
await run(`k6`, ['run', f, ...(args.length ? ['--', ...args] : [])]);
|
package/src/commands/pkg.js
CHANGED
|
@@ -93,10 +93,18 @@ class Package {
|
|
|
93
93
|
if (await fs.exists(file)) {
|
|
94
94
|
return true;
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
async isDepPackage() {
|
|
100
|
+
const pkg1 = path.resolve(process.cwd(), 'node_modules', this.packageName, 'package.json');
|
|
101
|
+
const pkg2 = path.resolve(process.cwd(), process.env.PLUGIN_STORAGE_PATH, this.packageName, 'package.json');
|
|
102
|
+
if ((await fs.exists(pkg1)) && (await fs.exists(pkg2))) {
|
|
103
|
+
const readPath1 = fs.realpathSync(pkg1);
|
|
104
|
+
const readPath2 = fs.realpathSync(pkg2);
|
|
105
|
+
if (readPath1 !== readPath2) {
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
100
108
|
}
|
|
101
109
|
return false;
|
|
102
110
|
}
|
|
@@ -117,6 +125,10 @@ class Package {
|
|
|
117
125
|
console.log(chalk.yellowBright(`Skipped: ${this.packageName} is dev package`));
|
|
118
126
|
return;
|
|
119
127
|
}
|
|
128
|
+
if (await this.isDepPackage()) {
|
|
129
|
+
console.log(chalk.yellowBright(`Skipped: ${this.packageName} is dependency package`));
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
120
132
|
if (await this.isDownloaded(options.version)) {
|
|
121
133
|
return;
|
|
122
134
|
}
|
package/src/commands/test.js
CHANGED
|
@@ -54,7 +54,7 @@ function addTestCommand(name, cli) {
|
|
|
54
54
|
const first = paths?.[0];
|
|
55
55
|
if (!process.env.TEST_ENV && first) {
|
|
56
56
|
const key = first.split(path.sep).join('/');
|
|
57
|
-
if (key.includes('/client/') || key.includes('/flow-engine/')) {
|
|
57
|
+
if (key.includes('/client/') || key.includes('/client-v2/') || key.includes('/flow-engine/')) {
|
|
58
58
|
process.env.TEST_ENV = 'client-side';
|
|
59
59
|
} else {
|
|
60
60
|
process.env.TEST_ENV = 'server-side';
|