@nocobase/cli 1.6.0-beta.8 → 1.6.0
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": "1.6.0
|
|
3
|
+
"version": "1.6.0",
|
|
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": "1.6.0
|
|
11
|
+
"@nocobase/app": "1.6.0",
|
|
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.19.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@nocobase/devtools": "1.6.0
|
|
28
|
+
"@nocobase/devtools": "1.6.0"
|
|
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": "
|
|
35
|
+
"gitHead": "7422d72a4e515a11300860028a26030ed5732135"
|
|
36
36
|
}
|
|
@@ -14,6 +14,14 @@ const { existsSync, mkdirSync, readFileSync, appendFileSync } = require('fs');
|
|
|
14
14
|
const { readFile, writeFile } = require('fs').promises;
|
|
15
15
|
const { createStoragePluginsSymlink, createDevPluginsSymlink } = require('@nocobase/utils/plugin-symlink');
|
|
16
16
|
|
|
17
|
+
function runPatchPackage() {
|
|
18
|
+
// run yarn patch-package
|
|
19
|
+
// console.log('patching third party packages...');
|
|
20
|
+
run('yarn', ['patch-package'], {
|
|
21
|
+
stdio: 'pipe',
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
17
25
|
function writeToExclude() {
|
|
18
26
|
const excludePath = resolve(process.cwd(), '.git', 'info', 'exclude');
|
|
19
27
|
const content = 'packages/pro-plugins/\n';
|
|
@@ -47,6 +55,7 @@ module.exports = (cli) => {
|
|
|
47
55
|
.allowUnknownOption()
|
|
48
56
|
.option('--skip-umi')
|
|
49
57
|
.action(async (options) => {
|
|
58
|
+
runPatchPackage();
|
|
50
59
|
writeToExclude();
|
|
51
60
|
generatePlugins();
|
|
52
61
|
generatePlaywrightPath(true);
|
package/src/commands/upgrade.js
CHANGED
|
@@ -52,8 +52,14 @@ module.exports = (cli) => {
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
const pkg = require('../../package.json');
|
|
55
|
+
let distTag = 'latest';
|
|
56
|
+
if (pkg.version.includes('alpha')) {
|
|
57
|
+
distTag = 'alpha';
|
|
58
|
+
} else if (pkg.version.includes('beta')) {
|
|
59
|
+
distTag = 'beta';
|
|
60
|
+
}
|
|
55
61
|
// get latest version
|
|
56
|
-
const { stdout } = await run('npm', ['info',
|
|
62
|
+
const { stdout } = await run('npm', ['info', `@nocobase/cli@${distTag}`, 'version'], {
|
|
57
63
|
stdio: 'pipe',
|
|
58
64
|
});
|
|
59
65
|
if (pkg.version === stdout) {
|
|
@@ -62,13 +68,7 @@ module.exports = (cli) => {
|
|
|
62
68
|
await rmAppDir();
|
|
63
69
|
return;
|
|
64
70
|
}
|
|
65
|
-
|
|
66
|
-
const latestY = 1 * stdout.split('.')[1];
|
|
67
|
-
if (options.next || currentY > latestY) {
|
|
68
|
-
await run('yarn', ['add', '@nocobase/cli@next', '@nocobase/devtools@next', '-W']);
|
|
69
|
-
} else {
|
|
70
|
-
await run('yarn', ['add', '@nocobase/cli', '@nocobase/devtools', '-W']);
|
|
71
|
-
}
|
|
71
|
+
await run('yarn', ['add', `@nocobase/cli@${distTag}`, `@nocobase/devtools@${distTag}`, '-W']);
|
|
72
72
|
await run('yarn', ['install']);
|
|
73
73
|
await downloadPro();
|
|
74
74
|
await runAppCommand('upgrade');
|