@botpress/cli 0.8.67 → 0.9.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 (37) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/dist/api/integration-body.js +10 -1
  3. package/dist/api/integration-body.js.map +2 -2
  4. package/dist/code-generation/integration-implementation.js +30 -11
  5. package/dist/code-generation/integration-implementation.js.map +2 -2
  6. package/dist/code-generation/integration-instance.js +48 -14
  7. package/dist/code-generation/integration-instance.js.map +2 -2
  8. package/dist/code-generation/integration-schemas/configuration-module.js +9 -6
  9. package/dist/code-generation/integration-schemas/configuration-module.js.map +2 -2
  10. package/dist/code-generation/integration-schemas/configurations-module.js +72 -0
  11. package/dist/code-generation/integration-schemas/configurations-module.js.map +7 -0
  12. package/dist/code-generation/map-integration.js +3 -2
  13. package/dist/code-generation/map-integration.js.map +2 -2
  14. package/dist/code-generation/typings.js.map +1 -1
  15. package/dist/command-implementations/deploy-command.js +7 -27
  16. package/dist/command-implementations/deploy-command.js.map +2 -2
  17. package/dist/command-implementations/dev-command.js +8 -3
  18. package/dist/command-implementations/dev-command.js.map +2 -2
  19. package/dist/command-implementations/project-command.js +26 -1
  20. package/dist/command-implementations/project-command.js.map +2 -2
  21. package/dist/utils/index.js +3 -0
  22. package/dist/utils/index.js.map +2 -2
  23. package/dist/utils/promise-utils.js +33 -0
  24. package/dist/utils/promise-utils.js.map +7 -0
  25. package/dist/utils/promise-utils.test.js +14 -0
  26. package/dist/utils/promise-utils.test.js.map +7 -0
  27. package/package.json +3 -3
  28. package/templates/echo-bot/package.json +2 -2
  29. package/templates/empty-integration/.botpress/implementation/configurations/index.ts +6 -0
  30. package/templates/empty-integration/.botpress/implementation/index.ts +3 -0
  31. package/templates/empty-integration/package.json +2 -2
  32. package/templates/hello-world/.botpress/implementation/configurations/index.ts +6 -0
  33. package/templates/hello-world/.botpress/implementation/index.ts +3 -0
  34. package/templates/hello-world/package.json +2 -2
  35. package/templates/webhook-message/.botpress/implementation/configurations/index.ts +6 -0
  36. package/templates/webhook-message/.botpress/implementation/index.ts +3 -0
  37. package/templates/webhook-message/package.json +2 -2
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var promise_utils_exports = {};
20
+ __export(promise_utils_exports, {
21
+ awaitRecord: () => awaitRecord
22
+ });
23
+ module.exports = __toCommonJS(promise_utils_exports);
24
+ const awaitRecord = async (record) => {
25
+ const keys = Object.keys(record);
26
+ const values = await Promise.all(Object.values(record));
27
+ return keys.reduce((acc, key, index) => ({ ...acc, [key]: values[index] }), {});
28
+ };
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ awaitRecord
32
+ });
33
+ //# sourceMappingURL=promise-utils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/promise-utils.ts"],
4
+ "sourcesContent": ["export const awaitRecord = async <T>(record: Record<string, Promise<T>>): Promise<Record<string, T>> => {\n const keys = Object.keys(record)\n const values = await Promise.all(Object.values(record))\n return keys.reduce((acc, key, index) => ({ ...acc, [key]: values[index] }), {})\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAc,OAAU,WAAmE;AACtG,QAAM,OAAO,OAAO,KAAK,MAAM;AAC/B,QAAM,SAAS,MAAM,QAAQ,IAAI,OAAO,OAAO,MAAM,CAAC;AACtD,SAAO,KAAK,OAAO,CAAC,KAAK,KAAK,WAAW,EAAE,GAAG,KAAK,CAAC,MAAM,OAAO,OAAO,IAAI,CAAC,CAAC;AAChF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var import_vitest = require("vitest");
3
+ var import_promise_utils = require("./promise-utils");
4
+ (0, import_vitest.test)("awaitRecord", async () => {
5
+ const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
6
+ const record = {
7
+ a: sleep(30).then(() => "a"),
8
+ b: sleep(20).then(() => "b"),
9
+ c: sleep(10).then(() => "c")
10
+ };
11
+ const result = await (0, import_promise_utils.awaitRecord)(record);
12
+ (0, import_vitest.expect)(result).toEqual({ a: "a", b: "b", c: "c" });
13
+ });
14
+ //# sourceMappingURL=promise-utils.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/promise-utils.test.ts"],
4
+ "sourcesContent": ["import { test, expect } from 'vitest'\nimport { awaitRecord } from './promise-utils'\n\ntest('awaitRecord', async () => {\n const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))\n const record = {\n a: sleep(30).then(() => 'a'),\n b: sleep(20).then(() => 'b'),\n c: sleep(10).then(() => 'c'),\n }\n const result = await awaitRecord(record)\n expect(result).toEqual({ a: 'a', b: 'b', c: 'c' })\n})\n"],
5
+ "mappings": ";AAAA,oBAA6B;AAC7B,2BAA4B;AAAA,IAE5B,oBAAK,eAAe,YAAY;AAC9B,QAAM,QAAQ,CAAC,OAAe,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,EAAE,CAAC;AAC9E,QAAM,SAAS;AAAA,IACb,GAAG,MAAM,EAAE,EAAE,KAAK,MAAM,GAAG;AAAA,IAC3B,GAAG,MAAM,EAAE,EAAE,KAAK,MAAM,GAAG;AAAA,IAC3B,GAAG,MAAM,EAAE,EAAE,KAAK,MAAM,GAAG;AAAA,EAC7B;AACA,QAAM,SAAS,UAAM,kCAAY,MAAM;AACvC,4BAAO,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC;AACnD,CAAC;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/cli",
3
- "version": "0.8.67",
3
+ "version": "0.9.1",
4
4
  "description": "Botpress CLI",
5
5
  "scripts": {
6
6
  "build": "pnpm run bundle && pnpm run template:gen",
@@ -20,8 +20,8 @@
20
20
  },
21
21
  "main": "dist/index.js",
22
22
  "dependencies": {
23
- "@botpress/client": "0.29.3",
24
- "@botpress/sdk": "0.11.0",
23
+ "@botpress/client": "0.29.4",
24
+ "@botpress/sdk": "0.11.1",
25
25
  "@bpinternal/const": "^0.0.20",
26
26
  "@bpinternal/tunnel": "^0.1.1",
27
27
  "@bpinternal/yargs-extra": "^0.0.3",
@@ -5,8 +5,8 @@
5
5
  },
6
6
  "private": true,
7
7
  "dependencies": {
8
- "@botpress/client": "0.29.3",
9
- "@botpress/sdk": "0.11.0"
8
+ "@botpress/client": "0.29.4",
9
+ "@botpress/sdk": "0.11.1"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@types/node": "^18.11.17",
@@ -0,0 +1,6 @@
1
+ /* tslint:disable */
2
+ // This file is generated
3
+ // Do not edit this file
4
+
5
+ export type Configurations = {
6
+ }
@@ -8,12 +8,14 @@
8
8
  import * as sdk from "@botpress/sdk"
9
9
 
10
10
  import type * as configuration from "./configuration/index"
11
+ import type * as configurations from "./configurations/index"
11
12
  import type * as actions from "./actions/index"
12
13
  import type * as channels from "./channels/index"
13
14
  import type * as events from "./events/index"
14
15
  import type * as states from "./states/index"
15
16
  import type * as entities from "./entities/index"
16
17
  export * as configuration from "./configuration/index"
18
+ export * as configurations from "./configurations/index"
17
19
  export * as actions from "./actions/index"
18
20
  export * as channels from "./channels/index"
19
21
  export * as events from "./events/index"
@@ -29,6 +31,7 @@ type TIntegration = {
29
31
  name: "empty-integration"
30
32
  version: "0.0.1"
31
33
  configuration: configuration.Configuration
34
+ configurations: configurations.Configurations
32
35
  actions: actions.Actions
33
36
  channels: channels.Channels
34
37
  events: events.Events
@@ -6,8 +6,8 @@
6
6
  },
7
7
  "private": true,
8
8
  "dependencies": {
9
- "@botpress/client": "0.29.3",
10
- "@botpress/sdk": "0.11.0"
9
+ "@botpress/client": "0.29.4",
10
+ "@botpress/sdk": "0.11.1"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/node": "^18.11.17",
@@ -0,0 +1,6 @@
1
+ /* tslint:disable */
2
+ // This file is generated
3
+ // Do not edit this file
4
+
5
+ export type Configurations = {
6
+ }
@@ -8,12 +8,14 @@
8
8
  import * as sdk from "@botpress/sdk"
9
9
 
10
10
  import type * as configuration from "./configuration/index"
11
+ import type * as configurations from "./configurations/index"
11
12
  import type * as actions from "./actions/index"
12
13
  import type * as channels from "./channels/index"
13
14
  import type * as events from "./events/index"
14
15
  import type * as states from "./states/index"
15
16
  import type * as entities from "./entities/index"
16
17
  export * as configuration from "./configuration/index"
18
+ export * as configurations from "./configurations/index"
17
19
  export * as actions from "./actions/index"
18
20
  export * as channels from "./channels/index"
19
21
  export * as events from "./events/index"
@@ -29,6 +31,7 @@ type TIntegration = {
29
31
  name: "hello-world"
30
32
  version: "0.0.1"
31
33
  configuration: configuration.Configuration
34
+ configurations: configurations.Configurations
32
35
  actions: actions.Actions
33
36
  channels: channels.Channels
34
37
  events: events.Events
@@ -6,8 +6,8 @@
6
6
  },
7
7
  "private": true,
8
8
  "dependencies": {
9
- "@botpress/client": "0.29.3",
10
- "@botpress/sdk": "0.11.0"
9
+ "@botpress/client": "0.29.4",
10
+ "@botpress/sdk": "0.11.1"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/node": "^18.11.17",
@@ -0,0 +1,6 @@
1
+ /* tslint:disable */
2
+ // This file is generated
3
+ // Do not edit this file
4
+
5
+ export type Configurations = {
6
+ }
@@ -8,12 +8,14 @@
8
8
  import * as sdk from "@botpress/sdk"
9
9
 
10
10
  import type * as configuration from "./configuration/index"
11
+ import type * as configurations from "./configurations/index"
11
12
  import type * as actions from "./actions/index"
12
13
  import type * as channels from "./channels/index"
13
14
  import type * as events from "./events/index"
14
15
  import type * as states from "./states/index"
15
16
  import type * as entities from "./entities/index"
16
17
  export * as configuration from "./configuration/index"
18
+ export * as configurations from "./configurations/index"
17
19
  export * as actions from "./actions/index"
18
20
  export * as channels from "./channels/index"
19
21
  export * as events from "./events/index"
@@ -29,6 +31,7 @@ type TIntegration = {
29
31
  name: "webhook-message"
30
32
  version: "0.0.1"
31
33
  configuration: configuration.Configuration
34
+ configurations: configurations.Configurations
32
35
  actions: actions.Actions
33
36
  channels: channels.Channels
34
37
  events: events.Events
@@ -6,8 +6,8 @@
6
6
  },
7
7
  "private": true,
8
8
  "dependencies": {
9
- "@botpress/client": "0.29.3",
10
- "@botpress/sdk": "0.11.0",
9
+ "@botpress/client": "0.29.4",
10
+ "@botpress/sdk": "0.11.1",
11
11
  "axios": "^1.6.8"
12
12
  },
13
13
  "devDependencies": {