@cloudbase/cli 2.0.14 → 2.1.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.
Files changed (58) hide show
  1. package/.history/.gitignore_20220624162613 +84 -0
  2. package/.history/.gitignore_20220627114054 +86 -0
  3. package/.history/package_20220711204706.json +88 -0
  4. package/.history/package_20220711204818.json +88 -0
  5. package/.history/package_20220712151717.json +88 -0
  6. package/.history/package_20220712212537.json +88 -0
  7. package/.history/package_20220722205058.json +88 -0
  8. package/.history/package_20220726110155.json +88 -0
  9. package/.history/package_20220726110201.json +88 -0
  10. package/.history/package_20220728110905.json +88 -0
  11. package/.history/package_20220728110936.json +88 -0
  12. package/.history/package_20220728111531.json +89 -0
  13. package/.history/package_20220728111810.json +89 -0
  14. package/.history/package_20220729165237.json +89 -0
  15. package/.history/package_20220729165240.json +89 -0
  16. package/.history/package_20220802111854.json +89 -0
  17. package/.history/package_20220802112025.json +89 -0
  18. package/.history/src/commands/lowcode/app_20220728111717.ts +52 -0
  19. package/.history/src/commands/lowcode/app_20220728112031.ts +34 -0
  20. package/.history/src/commands/lowcode/app_20220729172854.ts +34 -0
  21. package/.history/src/index_20220624162613.ts +13 -0
  22. package/.history/src/index_20220627113609.ts +15 -0
  23. package/.history/src/index_20220627114102.ts +13 -0
  24. package/.vscode/launch.json +10 -0
  25. package/bin/cloudbase.js +0 -0
  26. package/bin/tcb.js +5 -5
  27. package/lib/commands/account/login.js +3 -6
  28. package/lib/commands/env/index.js +0 -1
  29. package/lib/commands/lowcode/app.js +2 -2
  30. package/lib/commands/run/index.js +0 -1
  31. package/lib/commands/run/service/deploy.js +2 -1
  32. package/lib/commands/run/service/index.js +0 -1
  33. package/lib/constant.js +15 -1
  34. package/lib/env/index.js +1 -11
  35. package/lib/run/index.js +0 -1
  36. package/lib/run/service/common.js +11 -4
  37. package/lib/run/service/config.js +2 -3
  38. package/lib/run/service/index.js +0 -1
  39. package/lib/run/service/update.js +1 -1
  40. package/package.json +2 -2
  41. package/types/commands/env/index.d.ts +0 -1
  42. package/types/commands/run/index.d.ts +0 -1
  43. package/types/commands/run/service/index.d.ts +0 -1
  44. package/types/env/index.d.ts +0 -6
  45. package/types/run/index.d.ts +0 -1
  46. package/types/run/service/common.d.ts +4 -0
  47. package/types/run/service/index.d.ts +0 -1
  48. package/.vscode/settings.json +0 -3
  49. package/lib/commands/env/create.js +0 -115
  50. package/lib/commands/run/create.js +0 -162
  51. package/lib/commands/run/service/create.js +0 -148
  52. package/lib/run/create.js +0 -19
  53. package/lib/run/service/create.js +0 -67
  54. package/types/commands/env/create.d.ts +0 -12
  55. package/types/commands/run/create.d.ts +0 -13
  56. package/types/commands/run/service/create.d.ts +0 -13
  57. package/types/run/create.d.ts +0 -2
  58. package/types/run/service/create.d.ts +0 -7
@@ -1,67 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.createTcbrService = exports.createCloudRunServer = exports.describeCloudRunServerDetail = void 0;
16
- const utils_1 = require("../../utils");
17
- const _1 = require(".");
18
- const inquirer_1 = __importDefault(require("inquirer"));
19
- const toolbox_1 = require("@cloudbase/toolbox");
20
- const describeCloudRunServerDetail = (options) => __awaiter(void 0, void 0, void 0, function* () {
21
- return yield (0, utils_1.callTcbrApi)('DescribeCloudRunServerDetail', {
22
- EnvId: options.envId,
23
- ServerName: options.serviceName,
24
- });
25
- });
26
- exports.describeCloudRunServerDetail = describeCloudRunServerDetail;
27
- function createCloudRunServer(serviceConfigOptions) {
28
- return __awaiter(this, void 0, void 0, function* () {
29
- return (0, utils_1.callTcbrApi)('CreateCloudRunServer', serviceConfigOptions);
30
- });
31
- }
32
- exports.createCloudRunServer = createCloudRunServer;
33
- function createTcbrService(options) {
34
- var _a;
35
- return __awaiter(this, void 0, void 0, function* () {
36
- const newServiceOptions = yield (0, _1.tcbrServiceOptions)(options, false, false);
37
- if (!options.noConfirm) {
38
- const { confirm } = yield inquirer_1.default.prompt([
39
- {
40
- type: 'confirm',
41
- name: 'confirm',
42
- message: '确定要创建服务吗?',
43
- }
44
- ]);
45
- if (!confirm) {
46
- return;
47
- }
48
- }
49
- const createRes = yield createCloudRunServer(newServiceOptions);
50
- const taskId = (_a = createRes.data) === null || _a === void 0 ? void 0 : _a.TaskId;
51
- if (options.json) {
52
- console.log(JSON.stringify(createRes, null, 2));
53
- }
54
- if (process.argv.includes('--verbose')) {
55
- yield (0, _1.getLogs)({
56
- envId: options.envId,
57
- taskId,
58
- serviceName: options.serviceName
59
- });
60
- console.log(`本次任务的 TaskID: ${taskId}`);
61
- }
62
- else {
63
- toolbox_1.logger.success('创建服务成功, 本次任务的 TaskID: ' + taskId);
64
- }
65
- });
66
- }
67
- exports.createTcbrService = createTcbrService;
@@ -1,12 +0,0 @@
1
- import { Command } from '../common';
2
- export declare class CreateCommand extends Command {
3
- get options(): {
4
- cmd: string;
5
- childCmd: string;
6
- deprecateCmd: string;
7
- options: any[];
8
- desc: string;
9
- requiredEnvId: boolean;
10
- };
11
- execute(params: any): Promise<void>;
12
- }
@@ -1,13 +0,0 @@
1
- import { Command } from '../common';
2
- export declare class CreateRun extends Command {
3
- get options(): {
4
- cmd: string;
5
- childCmd: string;
6
- options: {
7
- flags: string;
8
- desc: string;
9
- }[];
10
- desc: string;
11
- };
12
- execute(envId: any, options: any): Promise<void>;
13
- }
@@ -1,13 +0,0 @@
1
- import { Command } from '../../common';
2
- export declare class CreateServiceTcbr extends Command {
3
- get options(): {
4
- cmd: string;
5
- childCmd: string;
6
- options: {
7
- flags: string;
8
- desc: string;
9
- }[];
10
- desc: string;
11
- };
12
- execute(options: any): Promise<void>;
13
- }
@@ -1,2 +0,0 @@
1
- import { ICreateRunOptions } from '../types';
2
- export declare const createRun: (options: ICreateRunOptions) => Promise<any>;
@@ -1,7 +0,0 @@
1
- import { ITcbrServiceOptions } from '../../types';
2
- export declare const describeCloudRunServerDetail: (options: {
3
- envId: string;
4
- serviceName: string;
5
- }) => Promise<any>;
6
- export declare function createCloudRunServer(serviceConfigOptions: Record<string, any>): Promise<any>;
7
- export declare function createTcbrService(options: ITcbrServiceOptions): Promise<void>;