@cloudbase/cli 2.3.0 → 2.3.2
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/.editorconfig +9 -9
- package/.eslintignore +7 -7
- package/.eslintrc +35 -35
- package/.prettierrc.js +29 -29
- package/.vscode/launch.json +26 -26
- package/LICENSE +5 -5
- package/README.md +35 -35
- package/bin/cloudbase.js +6 -6
- package/bin/tcb.js +332 -332
- package/changelog.md +6 -6
- package/jest.config.js +17 -17
- package/lib/commands/account/login.js +14 -14
- package/lib/commands/storage/storage.js +1 -1
- package/lib/env/login.js +7 -7
- package/lib/utils/checkTcbrEnv.js +21 -21
- package/package.json +2 -2
- package/post-install.js +61 -61
- package/runtime/nodejs/bootstrap.js +255 -255
- package/runtime/nodejs/runtime.js +183 -183
- package/templates/html/loginFail.html +90 -90
- package/templates/html/loginSuccess.html +86 -86
- package/templates/server/node/_gitignore +54 -54
- package/templates/server/node/cloudbaserc.json +10 -10
- package/templates/server/node/index.js +5 -5
- package/templates/server/node/package.json +9 -9
- package/tsconfig.json +19 -19
- package/tsconfig.test.json +13 -13
package/.editorconfig
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
root = true
|
|
2
|
-
|
|
3
|
-
[!{node_modules}/**]
|
|
4
|
-
end_of_line = lf
|
|
5
|
-
charset = utf-8
|
|
6
|
-
|
|
7
|
-
[{*.js,*.ts,*.html,*.json,*.gql,*.graqhql}]
|
|
8
|
-
indent_style = space
|
|
9
|
-
indent_size = 4
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[!{node_modules}/**]
|
|
4
|
+
end_of_line = lf
|
|
5
|
+
charset = utf-8
|
|
6
|
+
|
|
7
|
+
[{*.js,*.ts,*.html,*.json,*.gql,*.graqhql}]
|
|
8
|
+
indent_style = space
|
|
9
|
+
indent_size = 4
|
|
10
10
|
|
package/.eslintignore
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
server_node_modules/
|
|
2
|
-
deps/
|
|
3
|
-
addons/
|
|
4
|
-
lib/
|
|
5
|
-
types/
|
|
6
|
-
node_modules
|
|
7
|
-
bin/
|
|
1
|
+
server_node_modules/
|
|
2
|
+
deps/
|
|
3
|
+
addons/
|
|
4
|
+
lib/
|
|
5
|
+
types/
|
|
6
|
+
node_modules
|
|
7
|
+
bin/
|
|
8
8
|
functions/
|
package/.eslintrc
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": ["alloy", "alloy/typescript"],
|
|
3
|
-
"rules": {
|
|
4
|
-
"no-console": "off",
|
|
5
|
-
"no-unused-vars": "off",
|
|
6
|
-
"no-implicit-coercion": [2, { "number": false }],
|
|
7
|
-
"quotes": [
|
|
8
|
-
"error",
|
|
9
|
-
"single",
|
|
10
|
-
{
|
|
11
|
-
"avoidEscape": true
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"semi": ["error", "never"],
|
|
15
|
-
"max-params": "off",
|
|
16
|
-
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
17
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
18
|
-
"@typescript-eslint/interface-name-prefix": "off",
|
|
19
|
-
"@typescript-eslint/no-explicit-any": "off"
|
|
20
|
-
},
|
|
21
|
-
"env": {
|
|
22
|
-
"es6": true,
|
|
23
|
-
"node": true,
|
|
24
|
-
"jest": true
|
|
25
|
-
},
|
|
26
|
-
"parser": "@typescript-eslint/parser",
|
|
27
|
-
"overrides": [
|
|
28
|
-
{
|
|
29
|
-
"files": ["*.js"],
|
|
30
|
-
"rules": {
|
|
31
|
-
"@typescript-eslint/no-var-requires": "off"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": ["alloy", "alloy/typescript"],
|
|
3
|
+
"rules": {
|
|
4
|
+
"no-console": "off",
|
|
5
|
+
"no-unused-vars": "off",
|
|
6
|
+
"no-implicit-coercion": [2, { "number": false }],
|
|
7
|
+
"quotes": [
|
|
8
|
+
"error",
|
|
9
|
+
"single",
|
|
10
|
+
{
|
|
11
|
+
"avoidEscape": true
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"semi": ["error", "never"],
|
|
15
|
+
"max-params": "off",
|
|
16
|
+
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
17
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
18
|
+
"@typescript-eslint/interface-name-prefix": "off",
|
|
19
|
+
"@typescript-eslint/no-explicit-any": "off"
|
|
20
|
+
},
|
|
21
|
+
"env": {
|
|
22
|
+
"es6": true,
|
|
23
|
+
"node": true,
|
|
24
|
+
"jest": true
|
|
25
|
+
},
|
|
26
|
+
"parser": "@typescript-eslint/parser",
|
|
27
|
+
"overrides": [
|
|
28
|
+
{
|
|
29
|
+
"files": ["*.js"],
|
|
30
|
+
"rules": {
|
|
31
|
+
"@typescript-eslint/no-var-requires": "off"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
package/.prettierrc.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
// 一行最多 100 字符
|
|
3
|
-
printWidth: 100,
|
|
4
|
-
// 使用 4 个空格缩进
|
|
5
|
-
tabWidth: 4,
|
|
6
|
-
// 不使用缩进符,而使用空格
|
|
7
|
-
useTabs: false,
|
|
8
|
-
// 行尾无分号
|
|
9
|
-
semi: false,
|
|
10
|
-
// 使用单引号
|
|
11
|
-
singleQuote: true,
|
|
12
|
-
// 对象的 key 仅在必要时用引号
|
|
13
|
-
quoteProps: 'as-needed',
|
|
14
|
-
// 末尾不需要逗号
|
|
15
|
-
trailingComma: 'none',
|
|
16
|
-
// 大括号内的首尾需要空格
|
|
17
|
-
bracketSpacing: true,
|
|
18
|
-
// 每个文件格式化的范围是文件的全部内容
|
|
19
|
-
rangeStart: 0,
|
|
20
|
-
rangeEnd: Infinity,
|
|
21
|
-
// 不需要写文件开头的 @prettier
|
|
22
|
-
requirePragma: false,
|
|
23
|
-
// 不需要自动在文件开头插入 @prettier
|
|
24
|
-
insertPragma: false,
|
|
25
|
-
// 使用默认的折行标准
|
|
26
|
-
proseWrap: 'preserve',
|
|
27
|
-
// 换行符使用 lf
|
|
28
|
-
endOfLine: 'lf'
|
|
29
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
// 一行最多 100 字符
|
|
3
|
+
printWidth: 100,
|
|
4
|
+
// 使用 4 个空格缩进
|
|
5
|
+
tabWidth: 4,
|
|
6
|
+
// 不使用缩进符,而使用空格
|
|
7
|
+
useTabs: false,
|
|
8
|
+
// 行尾无分号
|
|
9
|
+
semi: false,
|
|
10
|
+
// 使用单引号
|
|
11
|
+
singleQuote: true,
|
|
12
|
+
// 对象的 key 仅在必要时用引号
|
|
13
|
+
quoteProps: 'as-needed',
|
|
14
|
+
// 末尾不需要逗号
|
|
15
|
+
trailingComma: 'none',
|
|
16
|
+
// 大括号内的首尾需要空格
|
|
17
|
+
bracketSpacing: true,
|
|
18
|
+
// 每个文件格式化的范围是文件的全部内容
|
|
19
|
+
rangeStart: 0,
|
|
20
|
+
rangeEnd: Infinity,
|
|
21
|
+
// 不需要写文件开头的 @prettier
|
|
22
|
+
requirePragma: false,
|
|
23
|
+
// 不需要自动在文件开头插入 @prettier
|
|
24
|
+
insertPragma: false,
|
|
25
|
+
// 使用默认的折行标准
|
|
26
|
+
proseWrap: 'preserve',
|
|
27
|
+
// 换行符使用 lf
|
|
28
|
+
endOfLine: 'lf'
|
|
29
|
+
}
|
package/.vscode/launch.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
{
|
|
2
|
-
// 使用 IntelliSense 了解相关属性。
|
|
3
|
-
// 悬停以查看现有属性的描述。
|
|
4
|
-
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"name": "Debug: lowcode watch",
|
|
9
|
-
"program": "${workspaceFolder}/bin/tcb.js",
|
|
10
|
-
"request": "launch",
|
|
11
|
-
"skipFiles": [
|
|
12
|
-
"<node_internals>/**"
|
|
13
|
-
],
|
|
14
|
-
"args": ["lowcode", "watch"],
|
|
15
|
-
"type": "node"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"type": "node",
|
|
19
|
-
"request": "launch",
|
|
20
|
-
"name": "Debug: cloudbase logout",
|
|
21
|
-
"program": "${workspaceFolder}/bin/cloudbase.js",
|
|
22
|
-
"args": ["open"],
|
|
23
|
-
"outFiles": ["${workspaceFolder}/lib/**/*.js"]
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
}
|
|
1
|
+
{
|
|
2
|
+
// 使用 IntelliSense 了解相关属性。
|
|
3
|
+
// 悬停以查看现有属性的描述。
|
|
4
|
+
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Debug: lowcode watch",
|
|
9
|
+
"program": "${workspaceFolder}/bin/tcb.js",
|
|
10
|
+
"request": "launch",
|
|
11
|
+
"skipFiles": [
|
|
12
|
+
"<node_internals>/**"
|
|
13
|
+
],
|
|
14
|
+
"args": ["lowcode", "watch"],
|
|
15
|
+
"type": "node"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "node",
|
|
19
|
+
"request": "launch",
|
|
20
|
+
"name": "Debug: cloudbase logout",
|
|
21
|
+
"program": "${workspaceFolder}/bin/cloudbase.js",
|
|
22
|
+
"args": ["open"],
|
|
23
|
+
"outFiles": ["${workspaceFolder}/lib/**/*.js"]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
ISC License (ISC)
|
|
2
|
-
Copyright <2019> <Tencent Cloud Base>
|
|
3
|
-
|
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
|
5
|
-
|
|
1
|
+
ISC License (ISC)
|
|
2
|
+
Copyright <2019> <Tencent Cloud Base>
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
|
5
|
+
|
|
6
6
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# CloudBase 命令行工具 
|
|
2
|
-
|
|
3
|
-
CloudBase CLI 是一个开源的命令行界面交互工具,用于帮助用户快速、方便的部署项目,管理云开发资源。
|
|
4
|
-
|
|
5
|
-
## 安装 CloudBase CLI
|
|
6
|
-
|
|
7
|
-
### npm
|
|
8
|
-
|
|
9
|
-
```shell
|
|
10
|
-
npm install -g @cloudbase/cli
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
### yarn
|
|
14
|
-
|
|
15
|
-
```shell
|
|
16
|
-
yarn global add @cloudbase/cli
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
安装完成后,你可以使用 `cloudbase -v` 验证是否安装成功,如果输出了类似下面的版本号,则表明 CloudBase CLI 被成功安装到您的计算机中。
|
|
20
|
-
|
|
21
|
-
```text
|
|
22
|
-
0.6.0
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## CloudBase CLI 运行要求
|
|
26
|
-
|
|
27
|
-
**Node.js 8.6.0+**
|
|
28
|
-
|
|
29
|
-
## 文档
|
|
30
|
-
|
|
31
|
-
请访问[教程与文档](https://docs.cloudbase.net/cli/intro.html)了解详细的使用方法。
|
|
32
|
-
|
|
33
|
-
## 意见反馈
|
|
34
|
-
|
|
35
|
-
您可以到 GitHub Repo 新建一个 [issue](https://github.com/TencentCloudBase/cloudbase-cli/issues) 反馈您在使用过程中遇到的问题或建议。
|
|
1
|
+
# CloudBase 命令行工具 
|
|
2
|
+
|
|
3
|
+
CloudBase CLI 是一个开源的命令行界面交互工具,用于帮助用户快速、方便的部署项目,管理云开发资源。
|
|
4
|
+
|
|
5
|
+
## 安装 CloudBase CLI
|
|
6
|
+
|
|
7
|
+
### npm
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
npm install -g @cloudbase/cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### yarn
|
|
14
|
+
|
|
15
|
+
```shell
|
|
16
|
+
yarn global add @cloudbase/cli
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
安装完成后,你可以使用 `cloudbase -v` 验证是否安装成功,如果输出了类似下面的版本号,则表明 CloudBase CLI 被成功安装到您的计算机中。
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
0.6.0
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## CloudBase CLI 运行要求
|
|
26
|
+
|
|
27
|
+
**Node.js 8.6.0+**
|
|
28
|
+
|
|
29
|
+
## 文档
|
|
30
|
+
|
|
31
|
+
请访问[教程与文档](https://docs.cloudbase.net/cli/intro.html)了解详细的使用方法。
|
|
32
|
+
|
|
33
|
+
## 意见反馈
|
|
34
|
+
|
|
35
|
+
您可以到 GitHub Repo 新建一个 [issue](https://github.com/TencentCloudBase/cloudbase-cli/issues) 反馈您在使用过程中遇到的问题或建议。
|
package/bin/cloudbase.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const chalk = require('chalk')
|
|
3
|
-
|
|
4
|
-
console.log(chalk.bold.yellowBright('\n', `Tip: cloudbase 命令可以简写为 tcb`), '\n')
|
|
5
|
-
|
|
6
|
-
require('./tcb').main()
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const chalk = require('chalk')
|
|
3
|
+
|
|
4
|
+
console.log(chalk.bold.yellowBright('\n', `Tip: cloudbase 命令可以简写为 tcb`), '\n')
|
|
5
|
+
|
|
6
|
+
require('./tcb').main()
|