@cloudbase/cli 2.1.6 → 2.2.0-alpha.1

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.
@@ -1,4 +1,6 @@
1
1
  import { Command } from '../common';
2
+ import { Logger } from '../../decorators';
3
+ import { ICommandContext } from '../../types';
2
4
  export declare class LowCodeWatch extends Command {
3
5
  get options(): {
4
6
  cmd: string;
@@ -12,3 +14,26 @@ export declare class LowCodeWatch extends Command {
12
14
  };
13
15
  execute(ctx: any, options: any): Promise<void>;
14
16
  }
17
+ export declare class LowCodeBuildApp extends Command {
18
+ get options(): {
19
+ cmd: string;
20
+ childCmd: string;
21
+ options: any[];
22
+ desc: string;
23
+ requiredEnvId: boolean;
24
+ };
25
+ execute(ctx: ICommandContext, log: Logger, options: any): Promise<void>;
26
+ }
27
+ export declare class LowCodeDeployApp extends Command {
28
+ get options(): {
29
+ cmd: string;
30
+ childCmd: string;
31
+ options: {
32
+ flags: string;
33
+ desc: string;
34
+ }[];
35
+ desc: string;
36
+ requiredEnvId: boolean;
37
+ };
38
+ execute(ctx: ICommandContext, log: Logger, options: any): Promise<void>;
39
+ }
@@ -11,7 +11,7 @@ export declare class LowCodeCreateComps extends Command {
11
11
  desc: string;
12
12
  requiredEnvId: boolean;
13
13
  };
14
- execute(params: any, log?: Logger): Promise<void>;
14
+ execute(opts: any, params: any, isPrivateEnv: boolean, config: any, log?: Logger): Promise<void>;
15
15
  }
16
16
  export declare class LowCodeBuildComps extends Command {
17
17
  get options(): {
@@ -6,5 +6,6 @@ export declare enum ParamTypes {
6
6
  EnvId = "__EnvId__",
7
7
  Config = "__Config__",
8
8
  ArgsOptions = "__ArgsOptions__",
9
- ArgsParams = "__ArgsParams__"
9
+ ArgsParams = "__ArgsParams__",
10
+ IsPrivateEnv = "__ISPrivateEnv__"
10
11
  }
@@ -5,3 +5,4 @@ export declare const ArgsOptions: () => (target: any, key: string | symbol, inde
5
5
  export declare const ArgsParams: () => (target: any, key: string | symbol, index: number) => void;
6
6
  export declare const EnvId: () => (target: any, key: string | symbol, index: number) => void;
7
7
  export declare const Config: () => (target: any, key: string | symbol, index: number) => void;
8
+ export declare const IsPrivateEnv: () => (target: any, key: string | symbol, index: number) => void;
package/types/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import 'reflect-metadata';
2
2
  import './commands';
3
3
  export { smartDeploy } from './commands';
4
+ export { registerCommands } from './commands/common';
package/types/types.d.ts CHANGED
@@ -6,6 +6,7 @@ export interface ICommandContext {
6
6
  config: ICloudBaseConfig;
7
7
  options: any;
8
8
  params: string[];
9
+ hasPrivateSettings: boolean;
9
10
  }
10
11
  declare global {
11
12
  namespace NodeJS {
@@ -8,4 +8,18 @@ export interface IArgs {
8
8
  [x: string]: unknown;
9
9
  }
10
10
  export declare const getArgs: () => Arguments<IArgs>;
11
- export declare const getCloudBaseConfig: (configPath?: string) => Promise<ICloudBaseConfig>;
11
+ declare type IPrivateCloudBaseRcSettings = ICloudBaseRcSettings & Required<Pick<ICloudBaseRcSettings, 'privateSettings'>>;
12
+ export declare function checkPrivateSettingsExisted(config: ICloudBaseRcSettings): config is IPrivateCloudBaseRcSettings;
13
+ declare type IAbsUrl = `http://${string}` | `https://${string}`;
14
+ export interface IPrivateSettings {
15
+ secretID: string;
16
+ secretKey: string;
17
+ editorEntrypoint: IAbsUrl;
18
+ cliApiEntrypoint: IAbsUrl;
19
+ privateUin: string;
20
+ }
21
+ export interface ICloudBaseRcSettings extends ICloudBaseConfig {
22
+ privateSettings?: IPrivateSettings;
23
+ }
24
+ export declare const getCloudBaseConfig: (configPath?: string) => Promise<ICloudBaseRcSettings>;
25
+ export {};
@@ -14,6 +14,7 @@ export declare class Logger {
14
14
  warn(msg: string): void;
15
15
  error(msg: string): void;
16
16
  verbose(...args: any): void;
17
+ debug(...args: any): void;
17
18
  genClickableLink(link: string): string;
18
19
  printClickableLink(link: string): void;
19
20
  time(label: string, fn: Promise<any> | (() => Promise<any>)): Promise<any>;
@@ -1,84 +0,0 @@
1
- # Logs
2
- logs
3
- *.log
4
- npm-debug.log*
5
- yarn-debug.log*
6
- yarn-error.log*
7
- package-lock.json
8
- yarn.lock
9
-
10
- # Runtime data
11
- pids
12
- *.pid
13
- *.seed
14
- *.pid.lock
15
-
16
- # Directory for instrumented libs generated by jscoverage/JSCover
17
- lib-cov
18
-
19
- # Coverage directory used by tools like istanbul
20
- coverage
21
-
22
- # nyc test coverage
23
- .nyc_output
24
-
25
- # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26
- .grunt
27
-
28
- # Bower dependency directory (https://bower.io/)
29
- bower_components
30
-
31
- # node-waf configuration
32
- .lock-wscript
33
-
34
- # Compiled binary addons (https://nodejs.org/api/addons.html)
35
- build/Release
36
-
37
- # Dependency directories
38
- node_modules/
39
- jspm_packages/
40
-
41
- # TypeScript v1 declaration files
42
- typings/
43
-
44
- # Optional npm cache directory
45
- .npm
46
-
47
- # Optional eslint cache
48
- .eslintcache
49
-
50
- # Optional REPL history
51
- .node_repl_history
52
-
53
- # Output of 'npm pack'
54
- *.tgz
55
-
56
- # Yarn Integrity file
57
- .yarn-integrity
58
-
59
- # dotenv environment variables file
60
- .env
61
-
62
- # next.js build output
63
- .next
64
-
65
- dist
66
-
67
- example/**/tcb.json
68
-
69
- node_modules
70
-
71
- .idea
72
- .vscode/*
73
- !.vscode/launch.json
74
-
75
- # Test api Key
76
- test/api-key.js
77
-
78
- pkg/
79
-
80
- .DS_Store
81
-
82
- # Build files
83
- /lib
84
- /types
@@ -1,86 +0,0 @@
1
- # Logs
2
- logs
3
- *.log
4
- npm-debug.log*
5
- yarn-debug.log*
6
- yarn-error.log*
7
- package-lock.json
8
- yarn.lock
9
-
10
- # Runtime data
11
- pids
12
- *.pid
13
- *.seed
14
- *.pid.lock
15
-
16
- # Directory for instrumented libs generated by jscoverage/JSCover
17
- lib-cov
18
-
19
- # Coverage directory used by tools like istanbul
20
- coverage
21
-
22
- # nyc test coverage
23
- .nyc_output
24
-
25
- # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26
- .grunt
27
-
28
- # Bower dependency directory (https://bower.io/)
29
- bower_components
30
-
31
- # node-waf configuration
32
- .lock-wscript
33
-
34
- # Compiled binary addons (https://nodejs.org/api/addons.html)
35
- build/Release
36
-
37
- # Dependency directories
38
- node_modules/
39
- jspm_packages/
40
-
41
- # TypeScript v1 declaration files
42
- typings/
43
-
44
- # Optional npm cache directory
45
- .npm
46
-
47
- # Optional eslint cache
48
- .eslintcache
49
-
50
- # Optional REPL history
51
- .node_repl_history
52
-
53
- # Output of 'npm pack'
54
- *.tgz
55
-
56
- # Yarn Integrity file
57
- .yarn-integrity
58
-
59
- # dotenv environment variables file
60
- .env
61
-
62
- # next.js build output
63
- .next
64
-
65
- dist
66
-
67
- example/**/tcb.json
68
-
69
- node_modules
70
-
71
- .idea
72
- .vscode/*
73
- !.vscode/launch.json
74
-
75
- # Test api Key
76
- test/api-key.js
77
-
78
- pkg/
79
-
80
- .DS_Store
81
-
82
- # Build files
83
- /lib
84
- /types
85
-
86
- .history
@@ -1,93 +0,0 @@
1
- {
2
- "name": "@cloudbase/cli",
3
- <<<<<<< HEAD
4
- "version": "2.1.2-alpha.0",
5
- =======
6
- "version": "2.1.5",
7
- >>>>>>> c1054e8baafd1fb731d944fb7b4b18be210bb03d
8
- "description": "cli tool for cloudbase",
9
- "main": "lib/index.js",
10
- "scripts": {
11
- "build": "rimraf lib types && tsc",
12
- "watch": "rimraf lib types && tsc -w",
13
- "dev": "rimraf lib types && tsc -w",
14
- "eslint": "eslint \"./**/*.ts\"",
15
- "test": "jest --runInBand --forceExit --detectOpenHandles --coverage --verbose --testTimeout=10000",
16
- "tsc": "tsc",
17
- "pkg": "pkg ./bin/cloudbase.js --out-path ./pkg",
18
- "postinstall": "node ./post-install.js || exit 0",
19
- "prepublishOnly": "npm run build"
20
- },
21
- "repository": {
22
- "type": "git",
23
- "url": "https://github.com/TencentCloudBase/cloud-base-cli.git"
24
- },
25
- "bin": {
26
- "tcb": "bin/tcb.js",
27
- "cloudbase": "bin/cloudbase.js"
28
- },
29
- "husky": {
30
- "hooks": {
31
- "pre-commit": "npm run build"
32
- }
33
- },
34
- "author": "cwuyiqing@gmail.com",
35
- "license": "ISC",
36
- "dependencies": {
37
- "@cloudbase/cloud-api": "^0.5.5",
38
- "@cloudbase/framework-core": "^1.9.6",
39
- "@cloudbase/lowcode-cli": "^0.16.0",
40
- "@cloudbase/manager-node": "4.0.1",
41
- "@cloudbase/toolbox": "^0.7.3",
42
- "@sentry/node": "^5.10.2",
43
- "address": "^1.1.2",
44
- "chalk": "^2.4.2",
45
- "cli-table3": "^0.5.1",
46
- "commander": "7",
47
- "del": "^5.1.0",
48
- "didyoumean": "^1.2.2",
49
- "enquirer": "^2.3.6",
50
- "execa": "^4.0.3",
51
- "fs-extra": "^8.1.0",
52
- "https-proxy-agent": "^5.0.1",
53
- "inquirer": "^6.5.0",
54
- "lodash": "^4.17.21",
55
- "log-symbols": "^3.0.0",
56
- "lowdb": "^1.0.0",
57
- "make-dir": "^3.0.0",
58
- "node-fetch": "^2.6.0",
59
- "open": "^7.0.0",
60
- "ora": "^4.0.2",
61
- "portfinder": "^1.0.28",
62
- "progress": "^2.0.3",
63
- "query-string": "^6.8.1",
64
- "reflect-metadata": "^0.1.13",
65
- "semver": "^7.3.7",
66
- "tar-fs": "^2.0.1",
67
- "terminal-link": "^2.1.1",
68
- "unzipper": "^0.10.10",
69
- "update-notifier": "^4.0.0",
70
- "xdg-basedir": "^4.0.0",
71
- "yargs": "^16.2.0",
72
- "yargs-parser": "^21.0.1"
73
- },
74
- "devDependencies": {
75
- "@types/jest": "^27",
76
- "@types/koa__router": "^8.0.11",
77
- "@types/lodash": "^4.14.182",
78
- "@types/node": "^12.12.38",
79
- "@types/node-fetch": "^2.5.4",
80
- "@types/react": "^17.0.37",
81
- "@types/semver": "^7.3.9",
82
- "@types/webpack-dev-server": "^3.11.1",
83
- "@typescript-eslint/eslint-plugin": "^4.8.1",
84
- "@typescript-eslint/parser": "^4.8.1",
85
- "eslint": "^7.14.0",
86
- "eslint-config-alloy": "^3.8.2",
87
- "husky": "^3.0.9",
88
- "jest": "^27",
89
- "rimraf": "^3.0.2",
90
- "ts-jest": "^27",
91
- "typescript": "^4.7.2"
92
- }
93
- }
@@ -1,89 +0,0 @@
1
- {
2
- "name": "@cloudbase/cli",
3
- "version": "2.1.5",
4
- "description": "cli tool for cloudbase",
5
- "main": "lib/index.js",
6
- "scripts": {
7
- "build": "rimraf lib types && tsc",
8
- "watch": "rimraf lib types && tsc -w",
9
- "dev": "rimraf lib types && tsc -w",
10
- "eslint": "eslint \"./**/*.ts\"",
11
- "test": "jest --runInBand --forceExit --detectOpenHandles --coverage --verbose --testTimeout=10000",
12
- "tsc": "tsc",
13
- "pkg": "pkg ./bin/cloudbase.js --out-path ./pkg",
14
- "postinstall": "node ./post-install.js || exit 0",
15
- "prepublishOnly": "npm run build"
16
- },
17
- "repository": {
18
- "type": "git",
19
- "url": "https://github.com/TencentCloudBase/cloud-base-cli.git"
20
- },
21
- "bin": {
22
- "tcb": "bin/tcb.js",
23
- "cloudbase": "bin/cloudbase.js"
24
- },
25
- "husky": {
26
- "hooks": {
27
- "pre-commit": "npm run build"
28
- }
29
- },
30
- "author": "cwuyiqing@gmail.com",
31
- "license": "ISC",
32
- "dependencies": {
33
- "@cloudbase/cloud-api": "^0.5.5",
34
- "@cloudbase/framework-core": "^1.9.6",
35
- "@cloudbase/lowcode-cli": "^0.16.0",
36
- "@cloudbase/manager-node": "4.0.1",
37
- "@cloudbase/toolbox": "^0.7.3",
38
- "@sentry/node": "^5.10.2",
39
- "address": "^1.1.2",
40
- "chalk": "^2.4.2",
41
- "cli-table3": "^0.5.1",
42
- "commander": "7",
43
- "del": "^5.1.0",
44
- "didyoumean": "^1.2.2",
45
- "enquirer": "^2.3.6",
46
- "execa": "^4.0.3",
47
- "fs-extra": "^8.1.0",
48
- "https-proxy-agent": "^5.0.1",
49
- "inquirer": "^6.5.0",
50
- "lodash": "^4.17.21",
51
- "log-symbols": "^3.0.0",
52
- "lowdb": "^1.0.0",
53
- "make-dir": "^3.0.0",
54
- "node-fetch": "^2.6.0",
55
- "open": "^7.0.0",
56
- "ora": "^4.0.2",
57
- "portfinder": "^1.0.28",
58
- "progress": "^2.0.3",
59
- "query-string": "^6.8.1",
60
- "reflect-metadata": "^0.1.13",
61
- "semver": "^7.3.7",
62
- "tar-fs": "^2.0.1",
63
- "terminal-link": "^2.1.1",
64
- "unzipper": "^0.10.10",
65
- "update-notifier": "^4.0.0",
66
- "xdg-basedir": "^4.0.0",
67
- "yargs": "^16.2.0",
68
- "yargs-parser": "^21.0.1"
69
- },
70
- "devDependencies": {
71
- "@types/jest": "^27",
72
- "@types/koa__router": "^8.0.11",
73
- "@types/lodash": "^4.14.182",
74
- "@types/node": "^12.12.38",
75
- "@types/node-fetch": "^2.5.4",
76
- "@types/react": "^17.0.37",
77
- "@types/semver": "^7.3.9",
78
- "@types/webpack-dev-server": "^3.11.1",
79
- "@typescript-eslint/eslint-plugin": "^4.8.1",
80
- "@typescript-eslint/parser": "^4.8.1",
81
- "eslint": "^7.14.0",
82
- "eslint-config-alloy": "^3.8.2",
83
- "husky": "^3.0.9",
84
- "jest": "^27",
85
- "rimraf": "^3.0.2",
86
- "ts-jest": "^27",
87
- "typescript": "^4.7.2"
88
- }
89
- }
@@ -1,89 +0,0 @@
1
- {
2
- "name": "@cloudbase/cli",
3
- "version": "2.1.6",
4
- "description": "cli tool for cloudbase",
5
- "main": "lib/index.js",
6
- "scripts": {
7
- "build": "rimraf lib types && tsc",
8
- "watch": "rimraf lib types && tsc -w",
9
- "dev": "rimraf lib types && tsc -w",
10
- "eslint": "eslint \"./**/*.ts\"",
11
- "test": "jest --runInBand --forceExit --detectOpenHandles --coverage --verbose --testTimeout=10000",
12
- "tsc": "tsc",
13
- "pkg": "pkg ./bin/cloudbase.js --out-path ./pkg",
14
- "postinstall": "node ./post-install.js || exit 0",
15
- "prepublishOnly": "npm run build"
16
- },
17
- "repository": {
18
- "type": "git",
19
- "url": "https://github.com/TencentCloudBase/cloud-base-cli.git"
20
- },
21
- "bin": {
22
- "tcb": "bin/tcb.js",
23
- "cloudbase": "bin/cloudbase.js"
24
- },
25
- "husky": {
26
- "hooks": {
27
- "pre-commit": "npm run build"
28
- }
29
- },
30
- "author": "cwuyiqing@gmail.com",
31
- "license": "ISC",
32
- "dependencies": {
33
- "@cloudbase/cloud-api": "^0.5.5",
34
- "@cloudbase/framework-core": "^1.9.6",
35
- "@cloudbase/lowcode-cli": "^0.16.0",
36
- "@cloudbase/manager-node": "4.0.1",
37
- "@cloudbase/toolbox": "^0.7.3",
38
- "@sentry/node": "^5.10.2",
39
- "address": "^1.1.2",
40
- "chalk": "^2.4.2",
41
- "cli-table3": "^0.5.1",
42
- "commander": "7",
43
- "del": "^5.1.0",
44
- "didyoumean": "^1.2.2",
45
- "enquirer": "^2.3.6",
46
- "execa": "^4.0.3",
47
- "fs-extra": "^8.1.0",
48
- "https-proxy-agent": "^5.0.1",
49
- "inquirer": "^6.5.0",
50
- "lodash": "^4.17.21",
51
- "log-symbols": "^3.0.0",
52
- "lowdb": "^1.0.0",
53
- "make-dir": "^3.0.0",
54
- "node-fetch": "^2.6.0",
55
- "open": "^7.0.0",
56
- "ora": "^4.0.2",
57
- "portfinder": "^1.0.28",
58
- "progress": "^2.0.3",
59
- "query-string": "^6.8.1",
60
- "reflect-metadata": "^0.1.13",
61
- "semver": "^7.3.7",
62
- "tar-fs": "^2.0.1",
63
- "terminal-link": "^2.1.1",
64
- "unzipper": "^0.10.10",
65
- "update-notifier": "^4.0.0",
66
- "xdg-basedir": "^4.0.0",
67
- "yargs": "^16.2.0",
68
- "yargs-parser": "^21.0.1"
69
- },
70
- "devDependencies": {
71
- "@types/jest": "^27",
72
- "@types/koa__router": "^8.0.11",
73
- "@types/lodash": "^4.14.182",
74
- "@types/node": "^12.12.38",
75
- "@types/node-fetch": "^2.5.4",
76
- "@types/react": "^17.0.37",
77
- "@types/semver": "^7.3.9",
78
- "@types/webpack-dev-server": "^3.11.1",
79
- "@typescript-eslint/eslint-plugin": "^4.8.1",
80
- "@typescript-eslint/parser": "^4.8.1",
81
- "eslint": "^7.14.0",
82
- "eslint-config-alloy": "^3.8.2",
83
- "husky": "^3.0.9",
84
- "jest": "^27",
85
- "rimraf": "^3.0.2",
86
- "ts-jest": "^27",
87
- "typescript": "^4.7.2"
88
- }
89
- }
@@ -1,89 +0,0 @@
1
- {
2
- "name": "@cloudbase/cli",
3
- "version": "2.1.6",
4
- "description": "cli tool for cloudbase",
5
- "main": "lib/index.js",
6
- "scripts": {
7
- "build": "rimraf lib types && tsc",
8
- "watch": "rimraf lib types && tsc -w",
9
- "dev": "rimraf lib types && tsc -w",
10
- "eslint": "eslint \"./**/*.ts\"",
11
- "test": "jest --runInBand --forceExit --detectOpenHandles --coverage --verbose --testTimeout=10000",
12
- "tsc": "tsc",
13
- "pkg": "pkg ./bin/cloudbase.js --out-path ./pkg",
14
- "postinstall": "node ./post-install.js || exit 0",
15
- "prepublishOnly": "npm run build"
16
- },
17
- "repository": {
18
- "type": "git",
19
- "url": "https://github.com/TencentCloudBase/cloud-base-cli.git"
20
- },
21
- "bin": {
22
- "tcb": "bin/tcb.js",
23
- "cloudbase": "bin/cloudbase.js"
24
- },
25
- "husky": {
26
- "hooks": {
27
- "pre-commit": "npm run build"
28
- }
29
- },
30
- "author": "cwuyiqing@gmail.com",
31
- "license": "ISC",
32
- "dependencies": {
33
- "@cloudbase/cloud-api": "^0.5.5",
34
- "@cloudbase/framework-core": "^1.9.6",
35
- "@cloudbase/lowcode-cli": "^0.16.2",
36
- "@cloudbase/manager-node": "4.0.1",
37
- "@cloudbase/toolbox": "^0.7.3",
38
- "@sentry/node": "^5.10.2",
39
- "address": "^1.1.2",
40
- "chalk": "^2.4.2",
41
- "cli-table3": "^0.5.1",
42
- "commander": "7",
43
- "del": "^5.1.0",
44
- "didyoumean": "^1.2.2",
45
- "enquirer": "^2.3.6",
46
- "execa": "^4.0.3",
47
- "fs-extra": "^8.1.0",
48
- "https-proxy-agent": "^5.0.1",
49
- "inquirer": "^6.5.0",
50
- "lodash": "^4.17.21",
51
- "log-symbols": "^3.0.0",
52
- "lowdb": "^1.0.0",
53
- "make-dir": "^3.0.0",
54
- "node-fetch": "^2.6.0",
55
- "open": "^7.0.0",
56
- "ora": "^4.0.2",
57
- "portfinder": "^1.0.28",
58
- "progress": "^2.0.3",
59
- "query-string": "^6.8.1",
60
- "reflect-metadata": "^0.1.13",
61
- "semver": "^7.3.7",
62
- "tar-fs": "^2.0.1",
63
- "terminal-link": "^2.1.1",
64
- "unzipper": "^0.10.10",
65
- "update-notifier": "^4.0.0",
66
- "xdg-basedir": "^4.0.0",
67
- "yargs": "^16.2.0",
68
- "yargs-parser": "^21.0.1"
69
- },
70
- "devDependencies": {
71
- "@types/jest": "^27",
72
- "@types/koa__router": "^8.0.11",
73
- "@types/lodash": "^4.14.182",
74
- "@types/node": "^12.12.38",
75
- "@types/node-fetch": "^2.5.4",
76
- "@types/react": "^17.0.37",
77
- "@types/semver": "^7.3.9",
78
- "@types/webpack-dev-server": "^3.11.1",
79
- "@typescript-eslint/eslint-plugin": "^4.8.1",
80
- "@typescript-eslint/parser": "^4.8.1",
81
- "eslint": "^7.14.0",
82
- "eslint-config-alloy": "^3.8.2",
83
- "husky": "^3.0.9",
84
- "jest": "^27",
85
- "rimraf": "^3.0.2",
86
- "ts-jest": "^27",
87
- "typescript": "^4.7.2"
88
- }
89
- }