@vectorx/xhs-cloud-cli 0.6.0 → 1.0.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.
Files changed (52) hide show
  1. package/bin/rcb.js +47 -157
  2. package/lib/commands/agent/dev.js +3 -0
  3. package/lib/commands/auth/login.js +13 -0
  4. package/lib/commands/env/create.js +156 -0
  5. package/lib/commands/env/index.js +20 -0
  6. package/lib/commands/env/info.js +106 -0
  7. package/lib/commands/env/list.js +93 -0
  8. package/lib/commands/env/set.js +129 -0
  9. package/lib/commands/fun/deploy.js +182 -0
  10. package/lib/commands/fun/dev.js +183 -0
  11. package/lib/commands/fun/index.js +20 -0
  12. package/lib/commands/fun/list.js +77 -0
  13. package/lib/commands/fun/new.js +125 -0
  14. package/lib/commands/index.js +2 -0
  15. package/lib/constants/cmd.js +9 -9
  16. package/lib/core/base.js +75 -1
  17. package/lib/decorators/auth.js +6 -0
  18. package/lib/decorators/captureError.js +1 -0
  19. package/lib/main.js +6 -0
  20. package/package.json +7 -6
  21. package/templates/ai-cloud-functions-example/.env.template +1 -0
  22. package/templates/ai-cloud-functions-example/README.md +277 -0
  23. package/templates/ai-cloud-functions-example/agent-cloudbase-functions.json +83 -0
  24. package/templates/ai-cloud-functions-example/package.json +10 -0
  25. package/templates/ai-cloud-functions-example/src/binary/index.js +207 -0
  26. package/templates/ai-cloud-functions-example/src/context/context-service.js +94 -0
  27. package/templates/ai-cloud-functions-example/src/context/index.js +57 -0
  28. package/templates/ai-cloud-functions-example/src/env/index.js +264 -0
  29. package/templates/ai-cloud-functions-example/src/form/index.js +138 -0
  30. package/templates/ai-cloud-functions-example/src/index.js +0 -0
  31. package/templates/ai-cloud-functions-example/src/json/index.js +194 -0
  32. package/templates/ai-cloud-functions-example/src/multipart/index.js +189 -0
  33. package/templates/ai-cloud-functions-example/src/text/index.js +319 -0
  34. package/templates/ai-cloud-functions-example/src/user/index.js +82 -0
  35. package/templates/chatbox-agent/project.config.json +2 -2
  36. package/templates/cloudfunction-template/.env.template +2 -0
  37. package/templates/cloudfunction-template/agent-cloudbase-functions.json +17 -0
  38. package/templates/cloudfunction-template/package.json +11 -0
  39. package/templates/cloudfunction-template/project.config.json +5 -0
  40. package/templates/cloudfunction-template/src/echo.js +27 -0
  41. package/templates/cloudfunction-template/src/index.js +34 -0
  42. package/types/commands/env/create.d.ts +19 -0
  43. package/types/commands/env/index.d.ts +4 -0
  44. package/types/commands/env/info.d.ts +14 -0
  45. package/types/commands/env/list.d.ts +11 -0
  46. package/types/commands/env/set.d.ts +14 -0
  47. package/types/commands/fun/deploy.d.ts +14 -0
  48. package/types/commands/fun/dev.d.ts +14 -0
  49. package/types/commands/fun/index.d.ts +4 -0
  50. package/types/commands/fun/list.d.ts +14 -0
  51. package/types/commands/fun/new.d.ts +16 -0
  52. package/types/commands/index.d.ts +2 -0
@@ -0,0 +1,19 @@
1
+ import type { Logger } from "@vectorx/cloud-toolkit";
2
+ import { Command } from "../../core/base";
3
+ interface EnvCreateOptions {
4
+ name?: string;
5
+ description?: string;
6
+ }
7
+ export declare class EnvCreateCommand extends Command {
8
+ execute(rawOptions: EnvCreateOptions, log: Logger): Promise<void>;
9
+ get options(): {
10
+ cmd: string;
11
+ childCmd: string;
12
+ desc: string;
13
+ options: {
14
+ flags: string;
15
+ desc: string;
16
+ }[];
17
+ };
18
+ }
19
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from "./list";
2
+ export * from "./info";
3
+ export * from "./set";
4
+ export * from "./create";
@@ -0,0 +1,14 @@
1
+ import type { Logger } from "@vectorx/cloud-toolkit";
2
+ import { Command } from "../../core/base";
3
+ export declare class EnvInfoCommand extends Command {
4
+ execute(options: any, log: Logger): Promise<void>;
5
+ get options(): {
6
+ cmd: string;
7
+ childCmd: string;
8
+ desc: string;
9
+ options: {
10
+ flags: string;
11
+ desc: string;
12
+ }[];
13
+ };
14
+ }
@@ -0,0 +1,11 @@
1
+ import type { Logger } from "@vectorx/cloud-toolkit";
2
+ import { Command } from "../../core/base";
3
+ export declare class EnvListCommand extends Command {
4
+ execute(_options: any, log: Logger): Promise<void>;
5
+ get options(): {
6
+ cmd: string;
7
+ childCmd: string;
8
+ desc: string;
9
+ options: any[];
10
+ };
11
+ }
@@ -0,0 +1,14 @@
1
+ import type { Logger } from "@vectorx/cloud-toolkit";
2
+ import { Command } from "../../core/base";
3
+ export declare class EnvSetCommand extends Command {
4
+ execute(options: any, log: Logger): Promise<void>;
5
+ get options(): {
6
+ cmd: string;
7
+ childCmd: string;
8
+ desc: string;
9
+ options: {
10
+ flags: string;
11
+ desc: string;
12
+ }[];
13
+ };
14
+ }
@@ -0,0 +1,14 @@
1
+ import type { Logger } from "@vectorx/cloud-toolkit";
2
+ import { Command } from "../../core/base";
3
+ export declare class FunDeployCommand extends Command {
4
+ execute(options: any, log: Logger): Promise<void>;
5
+ get options(): {
6
+ cmd: string;
7
+ childCmd: string;
8
+ desc: string;
9
+ options: {
10
+ flags: string;
11
+ desc: string;
12
+ }[];
13
+ };
14
+ }
@@ -0,0 +1,14 @@
1
+ import type { Logger } from "@vectorx/cloud-toolkit";
2
+ import { Command } from "../../core/base";
3
+ export declare class FunDevCommand extends Command {
4
+ execute(options: any, log: Logger): Promise<void>;
5
+ get options(): {
6
+ cmd: string;
7
+ childCmd: string;
8
+ desc: string;
9
+ options: {
10
+ flags: string;
11
+ desc: string;
12
+ }[];
13
+ };
14
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./dev";
2
+ export * from "./list";
3
+ export * from "./deploy";
4
+ export * from "./new";
@@ -0,0 +1,14 @@
1
+ import type { Logger } from "@vectorx/cloud-toolkit";
2
+ import { Command } from "../../core/base";
3
+ export declare class FunListCommand extends Command {
4
+ execute(options: any, log: Logger): Promise<void>;
5
+ get options(): {
6
+ cmd: string;
7
+ childCmd: string;
8
+ desc: string;
9
+ options: {
10
+ flags: string;
11
+ desc: string;
12
+ }[];
13
+ };
14
+ }
@@ -0,0 +1,16 @@
1
+ import type { Logger } from "@vectorx/cloud-toolkit";
2
+ import { Command } from "../../core/base";
3
+ export declare class FunNewCommand extends Command {
4
+ execute(options: any, log: Logger): Promise<void>;
5
+ private copyTemplate;
6
+ get options(): {
7
+ cmd: string;
8
+ childCmd: string;
9
+ desc: string;
10
+ usage: string;
11
+ options: {
12
+ flags: string;
13
+ desc: string;
14
+ }[];
15
+ };
16
+ }
@@ -1,2 +1,4 @@
1
1
  export * from "./auth";
2
2
  export * from "./agent";
3
+ export * from "./fun";
4
+ export * from "./env";