@nocobase/cli 1.0.0-alpha.2 → 1.0.0-alpha.4
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 +20 -13
- package/package.json +4 -4
- package/src/cli.js +9 -0
- package/src/commands/build.js +9 -0
- package/src/commands/clean.js +9 -0
- package/src/commands/create-nginx-conf.js +9 -0
- package/src/commands/create-plugin.js +9 -0
- package/src/commands/dev.js +9 -0
- package/src/commands/doc.js +9 -0
- package/src/commands/e2e.js +9 -0
- package/src/commands/global.js +9 -0
- package/src/commands/index.js +9 -0
- package/src/commands/p-test.js +9 -0
- package/src/commands/pm2.js +9 -0
- package/src/commands/postinstall.js +9 -0
- package/src/commands/start.js +9 -0
- package/src/commands/tar.js +9 -0
- package/src/commands/test-coverage.js +9 -0
- package/src/commands/test.js +9 -0
- package/src/commands/umi.js +9 -0
- package/src/commands/upgrade.js +9 -0
- package/src/index.js +9 -0
- package/src/plugin-generator.js +9 -0
- package/src/util.js +9 -0
package/nocobase.conf.tpl
CHANGED
|
@@ -30,6 +30,26 @@ server {
|
|
|
30
30
|
autoindex off;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
location {{publicPath}}static/plugins/ {
|
|
34
|
+
alias {{cwd}}/node_modules/;
|
|
35
|
+
expires 365d;
|
|
36
|
+
add_header Cache-Control "public";
|
|
37
|
+
access_log off;
|
|
38
|
+
autoindex off;
|
|
39
|
+
|
|
40
|
+
location ~ ^/static/plugins/@([^/]+)/([^/]+)/dist/client/(.*)$ {
|
|
41
|
+
allow all;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
location ~ ^/static/plugins/([^/]+)/dist/client/(.*)$ {
|
|
45
|
+
allow all;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
location ~ ^/static/plugins/(.*)$ {
|
|
49
|
+
deny all;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
33
53
|
location {{publicPath}} {
|
|
34
54
|
alias {{cwd}}/node_modules/@nocobase/app/dist/client/;
|
|
35
55
|
try_files $uri $uri/ /index.html;
|
|
@@ -58,19 +78,6 @@ server {
|
|
|
58
78
|
send_timeout 600;
|
|
59
79
|
}
|
|
60
80
|
|
|
61
|
-
location ^~ {{publicPath}}static/plugins/ {
|
|
62
|
-
proxy_pass http://127.0.0.1:{{apiPort}}{{publicPath}}static/plugins/;
|
|
63
|
-
proxy_http_version 1.1;
|
|
64
|
-
proxy_set_header Upgrade $http_upgrade;
|
|
65
|
-
proxy_set_header Connection 'upgrade';
|
|
66
|
-
proxy_set_header Host $host;
|
|
67
|
-
proxy_cache_bypass $http_upgrade;
|
|
68
|
-
proxy_connect_timeout 600;
|
|
69
|
-
proxy_send_timeout 600;
|
|
70
|
-
proxy_read_timeout 600;
|
|
71
|
-
send_timeout 600;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
81
|
location {{publicPath}}ws {
|
|
75
82
|
proxy_pass http://127.0.0.1:{{apiPort}}{{publicPath}}ws;
|
|
76
83
|
proxy_http_version 1.1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/cli",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.4",
|
|
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.0.0-alpha.
|
|
11
|
+
"@nocobase/app": "1.0.0-alpha.4",
|
|
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": "1.0.0-alpha.
|
|
28
|
+
"@nocobase/devtools": "1.0.0-alpha.4"
|
|
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": "7a7005ce3bddf33498580a6486c45b5d9ea64ffb"
|
|
36
36
|
}
|
package/src/cli.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const { Command } = require('commander');
|
|
2
11
|
const commands = require('./commands');
|
|
3
12
|
|
package/src/commands/build.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const { resolve } = require('path');
|
|
2
11
|
const { Command } = require('commander');
|
|
3
12
|
const { run, nodeCheck, isPackageValid, buildIndexHtml } = require('../util');
|
package/src/commands/clean.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const chalk = require('chalk');
|
|
2
11
|
const { Command } = require('commander');
|
|
3
12
|
const { run, isDev } = require('../util');
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const { resolve } = require('path');
|
|
2
11
|
const { Command } = require('commander');
|
|
3
12
|
const { readFileSync, writeFileSync } = require('fs');
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const { resolve } = require('path');
|
|
2
11
|
const { Command } = require('commander');
|
|
3
12
|
const { PluginGenerator } = require('../plugin-generator');
|
package/src/commands/dev.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const chalk = require('chalk');
|
|
2
11
|
const { Command } = require('commander');
|
|
3
12
|
const { runAppCommand, runInstall, run, postCheck, nodeCheck, promptForTs } = require('../util');
|
package/src/commands/doc.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const { Command } = require('commander');
|
|
2
11
|
const { resolve, isAbsolute } = require('path');
|
|
3
12
|
const { run, isDev } = require('../util');
|
package/src/commands/e2e.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const { Command } = require('commander');
|
|
2
11
|
const { run, isPortReachable } = require('../util');
|
|
3
12
|
const { execSync } = require('node:child_process');
|
package/src/commands/global.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const { Command } = require('commander');
|
|
2
11
|
const { run, isDev, isProd, promptForTs } = require('../util');
|
|
3
12
|
|
package/src/commands/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const { Command } = require('commander');
|
|
2
11
|
const { isPackageValid, generateAppDir } = require('../util');
|
|
3
12
|
|
package/src/commands/p-test.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const execa = require('execa');
|
|
2
11
|
const { resolve } = require('path');
|
|
3
12
|
const pAll = require('p-all');
|
package/src/commands/pm2.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const chalk = require('chalk');
|
|
2
11
|
const { Command } = require('commander');
|
|
3
12
|
const { run, isDev } = require('../util');
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const { Command } = require('commander');
|
|
2
11
|
const { run, isDev, isPackageValid, generatePlaywrightPath } = require('../util');
|
|
3
12
|
const { resolve } = require('path');
|
package/src/commands/start.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const { Command } = require('commander');
|
|
2
11
|
const { isDev, run, postCheck, runInstall, promptForTs } = require('../util');
|
|
3
12
|
const { existsSync, rmSync } = require('fs');
|
package/src/commands/tar.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const { resolve } = require('path');
|
|
2
11
|
const { Command } = require('commander');
|
|
3
12
|
const { run, nodeCheck, isPackageValid } = require('../util');
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const { run } = require('../util');
|
|
2
11
|
const fg = require('fast-glob');
|
|
3
12
|
|
package/src/commands/test.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const { Command } = require('commander');
|
|
2
11
|
const { run } = require('../util');
|
|
3
12
|
const path = require('path');
|
package/src/commands/umi.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const chalk = require('chalk');
|
|
2
11
|
const { Command } = require('commander');
|
|
3
12
|
const { run, isDev } = require('../util');
|
package/src/commands/upgrade.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const chalk = require('chalk');
|
|
2
11
|
const { Command } = require('commander');
|
|
3
12
|
const { resolve } = require('path');
|
package/src/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const util = require('./util');
|
|
2
11
|
|
|
3
12
|
module.exports = {
|
package/src/plugin-generator.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const chalk = require('chalk');
|
|
2
11
|
const { existsSync } = require('fs');
|
|
3
12
|
const { join, resolve } = require('path');
|
package/src/util.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
const net = require('net');
|
|
2
11
|
const chalk = require('chalk');
|
|
3
12
|
const execa = require('execa');
|