@botpress/cli 3.3.0 → 3.3.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,22 +1,22 @@
1
1
 
2
- > @botpress/cli@3.3.0 build /home/runner/work/botpress/botpress/packages/cli
2
+ > @botpress/cli@3.3.1 build /home/runner/work/botpress/botpress/packages/cli
3
3
  > pnpm run bundle && pnpm run template:gen
4
4
 
5
5
 
6
- > @botpress/cli@3.3.0 bundle /home/runner/work/botpress/botpress/packages/cli
6
+ > @botpress/cli@3.3.1 bundle /home/runner/work/botpress/botpress/packages/cli
7
7
  > ts-node -T build.ts
8
8
 
9
9
 
10
- > @botpress/cli@3.3.0 template:gen /home/runner/work/botpress/botpress/packages/cli
10
+ > @botpress/cli@3.3.1 template:gen /home/runner/work/botpress/botpress/packages/cli
11
11
  > pnpm -r --stream -F @bp-templates/* exec bp gen
12
12
 
13
- šŸ¤– Botpress CLI v3.3.0
14
- šŸ¤– Botpress CLI v3.3.0
15
- šŸ¤– Botpress CLI v3.3.0
16
- šŸ¤– Botpress CLI v3.3.0
17
- ā—‹ Generating typings for integration hello-world...ā—‹ Generating typings for bot...āœ“ Typings available at .botpress
13
+ šŸ¤– Botpress CLI v3.3.1
14
+ šŸ¤– Botpress CLI v3.3.1
15
+ šŸ¤– Botpress CLI v3.3.1
16
+ šŸ¤– Botpress CLI v3.3.1
17
+ ā—‹ Generating typings for bot...āœ“ Typings available at .botpress
18
18
  ā—‹ Generating typings for integration empty-integration...āœ“ Typings available at .botpress
19
+ ā—‹ Generating typings for integration hello-world...ā—‹ Generating typings for plugin empty-plugin...āœ“ Typings available at .botpress
19
20
  āœ“ Typings available at .botpress
20
- ā—‹ Generating typings for plugin empty-plugin...āœ“ Typings available at .botpress
21
- šŸ¤– Botpress CLI v3.3.0
21
+ šŸ¤– Botpress CLI v3.3.1
22
22
  ā—‹ Generating typings for integration webhook-message...āœ“ Typings available at .botpress
@@ -74,16 +74,16 @@ class PluginImplementationModule extends import_module.Module {
74
74
  " [K in keyof PluginHandlers['messageHandlers']]: NonNullable<PluginHandlers['messageHandlers'][K]>[number]",
75
75
  "}>",
76
76
  "export type HookHandlers = Required<{",
77
- " [H in keyof PluginHandlers['hookHandlers']]: {",
77
+ " [H in keyof PluginHandlers['hookHandlers']]: Required<{",
78
78
  " [K in keyof PluginHandlers['hookHandlers'][H]]: NonNullable<PluginHandlers['hookHandlers'][H][K]>[number]",
79
- " }",
79
+ " }>",
80
80
  "}>",
81
81
  "",
82
82
  "export type AnyMessageHandler = MessageHandlers['*']",
83
83
  "export type AnyEventHandler = EventHandlers['*']",
84
84
  "export type AnyActionHandler = ValueOf<PluginHandlers['actionHandlers']>",
85
85
  "export type AnyHookHanders = {",
86
- " [H in keyof HookHandlers]: HookHandlers[H]['*']",
86
+ " [H in keyof HookHandlers]: NonNullable<HookHandlers[H]['*']>",
87
87
  "}",
88
88
  "",
89
89
  "export type MessageHandlerProps = Parameters<AnyMessageHandler>[0]",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/code-generation/plugin-implementation/plugin-implementation.ts"],
4
- "sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport * as consts from '../consts'\nimport { Module } from '../module'\nimport { PluginTypingsModule } from './plugin-typings'\n\nexport class PluginImplementationModule extends Module {\n private _typingsModule: PluginTypingsModule\n\n public constructor(plugin: sdk.PluginDefinition) {\n super({\n exportName: 'Plugin',\n path: consts.INDEX_FILE,\n })\n\n this._typingsModule = new PluginTypingsModule(plugin)\n this._typingsModule.unshift('typings')\n this.pushDep(this._typingsModule)\n }\n\n public async getContent() {\n const typingsImport = this._typingsModule.import(this)\n\n return [\n consts.GENERATED_HEADER,\n 'import * as sdk from \"@botpress/sdk\"',\n `import * as ${this._typingsModule.name} from \"./${typingsImport}\"`,\n `export * from \"./${typingsImport}\"`,\n '',\n `type TPlugin = sdk.DefaultPlugin<${this._typingsModule.name}.${this._typingsModule.exportName}>`,\n '',\n 'export class Plugin extends sdk.Plugin<TPlugin> {}',\n '',\n 'export type PluginProps = sdk.PluginProps<TPlugin>',\n 'export type PluginRuntimeProps = sdk.PluginRuntimeProps<TPlugin>',\n '',\n '// extra types',\n '',\n 'type ValueOf<T> = T[keyof T]',\n 'type AsyncFunction = (...args: any[]) => Promise<any>',\n '',\n 'export type PluginHandlers = sdk.PluginHandlers<TPlugin>',\n '',\n 'export type EventHandlers = Required<{',\n \" [K in keyof PluginHandlers['eventHandlers']]: NonNullable<PluginHandlers['eventHandlers'][K]>[number]\",\n '}>',\n 'export type MessageHandlers = Required<{',\n \" [K in keyof PluginHandlers['messageHandlers']]: NonNullable<PluginHandlers['messageHandlers'][K]>[number]\",\n '}>',\n 'export type HookHandlers = Required<{',\n \" [H in keyof PluginHandlers['hookHandlers']]: {\",\n \" [K in keyof PluginHandlers['hookHandlers'][H]]: NonNullable<PluginHandlers['hookHandlers'][H][K]>[number]\",\n ' }',\n '}>',\n '',\n \"export type AnyMessageHandler = MessageHandlers['*']\",\n \"export type AnyEventHandler = EventHandlers['*']\",\n \"export type AnyActionHandler = ValueOf<PluginHandlers['actionHandlers']>\",\n 'export type AnyHookHanders = {',\n \" [H in keyof HookHandlers]: HookHandlers[H]['*']\",\n '}',\n '',\n 'export type MessageHandlerProps = Parameters<AnyMessageHandler>[0]',\n 'export type EventHandlerProps = Parameters<AnyEventHandler>[0]',\n 'export type ActionHandlerProps = Parameters<AnyActionHandler>[0]',\n 'export type HookHandlerProps = {',\n ' [H in keyof AnyHookHanders]: Parameters<NonNullable<AnyHookHanders[H]>>[0]',\n '}',\n '',\n \"export type Client = (MessageHandlerProps | EventHandlerProps)['client']\",\n 'export type ClientOperation = keyof {',\n ' [K in keyof Client as Client[K] extends AsyncFunction ? K : never]: null',\n '}',\n 'export type ClientInputs = {',\n ' [K in ClientOperation]: Parameters<Client[K]>[0]',\n '}',\n 'export type ClientOutputs = {',\n ' [K in ClientOperation]: Awaited<ReturnType<Client[K]>>',\n '}',\n ].join('\\n')\n }\n}\n"],
4
+ "sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport * as consts from '../consts'\nimport { Module } from '../module'\nimport { PluginTypingsModule } from './plugin-typings'\n\nexport class PluginImplementationModule extends Module {\n private _typingsModule: PluginTypingsModule\n\n public constructor(plugin: sdk.PluginDefinition) {\n super({\n exportName: 'Plugin',\n path: consts.INDEX_FILE,\n })\n\n this._typingsModule = new PluginTypingsModule(plugin)\n this._typingsModule.unshift('typings')\n this.pushDep(this._typingsModule)\n }\n\n public async getContent() {\n const typingsImport = this._typingsModule.import(this)\n\n return [\n consts.GENERATED_HEADER,\n 'import * as sdk from \"@botpress/sdk\"',\n `import * as ${this._typingsModule.name} from \"./${typingsImport}\"`,\n `export * from \"./${typingsImport}\"`,\n '',\n `type TPlugin = sdk.DefaultPlugin<${this._typingsModule.name}.${this._typingsModule.exportName}>`,\n '',\n 'export class Plugin extends sdk.Plugin<TPlugin> {}',\n '',\n 'export type PluginProps = sdk.PluginProps<TPlugin>',\n 'export type PluginRuntimeProps = sdk.PluginRuntimeProps<TPlugin>',\n '',\n '// extra types',\n '',\n 'type ValueOf<T> = T[keyof T]',\n 'type AsyncFunction = (...args: any[]) => Promise<any>',\n '',\n 'export type PluginHandlers = sdk.PluginHandlers<TPlugin>',\n '',\n 'export type EventHandlers = Required<{',\n \" [K in keyof PluginHandlers['eventHandlers']]: NonNullable<PluginHandlers['eventHandlers'][K]>[number]\",\n '}>',\n 'export type MessageHandlers = Required<{',\n \" [K in keyof PluginHandlers['messageHandlers']]: NonNullable<PluginHandlers['messageHandlers'][K]>[number]\",\n '}>',\n 'export type HookHandlers = Required<{',\n \" [H in keyof PluginHandlers['hookHandlers']]: Required<{\",\n \" [K in keyof PluginHandlers['hookHandlers'][H]]: NonNullable<PluginHandlers['hookHandlers'][H][K]>[number]\",\n ' }>',\n '}>',\n '',\n \"export type AnyMessageHandler = MessageHandlers['*']\",\n \"export type AnyEventHandler = EventHandlers['*']\",\n \"export type AnyActionHandler = ValueOf<PluginHandlers['actionHandlers']>\",\n 'export type AnyHookHanders = {',\n \" [H in keyof HookHandlers]: NonNullable<HookHandlers[H]['*']>\",\n '}',\n '',\n 'export type MessageHandlerProps = Parameters<AnyMessageHandler>[0]',\n 'export type EventHandlerProps = Parameters<AnyEventHandler>[0]',\n 'export type ActionHandlerProps = Parameters<AnyActionHandler>[0]',\n 'export type HookHandlerProps = {',\n ' [H in keyof AnyHookHanders]: Parameters<NonNullable<AnyHookHanders[H]>>[0]',\n '}',\n '',\n \"export type Client = (MessageHandlerProps | EventHandlerProps)['client']\",\n 'export type ClientOperation = keyof {',\n ' [K in keyof Client as Client[K] extends AsyncFunction ? K : never]: null',\n '}',\n 'export type ClientInputs = {',\n ' [K in ClientOperation]: Parameters<Client[K]>[0]',\n '}',\n 'export type ClientOutputs = {',\n ' [K in ClientOperation]: Awaited<ReturnType<Client[K]>>',\n '}',\n ].join('\\n')\n }\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,aAAwB;AACxB,oBAAuB;AACvB,4BAAoC;AAE7B,MAAM,mCAAmC,qBAAO;AAAA,EAC7C;AAAA,EAED,YAAY,QAA8B;AAC/C,UAAM;AAAA,MACJ,YAAY;AAAA,MACZ,MAAM,OAAO;AAAA,IACf,CAAC;AAED,SAAK,iBAAiB,IAAI,0CAAoB,MAAM;AACpD,SAAK,eAAe,QAAQ,SAAS;AACrC,SAAK,QAAQ,KAAK,cAAc;AAAA,EAClC;AAAA,EAEA,MAAa,aAAa;AACxB,UAAM,gBAAgB,KAAK,eAAe,OAAO,IAAI;AAErD,WAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MACA,eAAe,KAAK,eAAe,gBAAgB;AAAA,MACnD,oBAAoB;AAAA,MACpB;AAAA,MACA,oCAAoC,KAAK,eAAe,QAAQ,KAAK,eAAe;AAAA,MACpF;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACF;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/cli",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "Botpress CLI",
5
5
  "scripts": {
6
6
  "build": "pnpm run bundle && pnpm run template:gen",
@@ -22,8 +22,8 @@
22
22
  "@apidevtools/json-schema-ref-parser": "^11.7.0",
23
23
  "@botpress/chat": "0.5.1",
24
24
  "@botpress/client": "0.47.0",
25
- "@botpress/sdk": "3.3.0",
26
- "@bpinternal/const": "^0.0.20",
25
+ "@botpress/sdk": "3.3.1",
26
+ "@bpinternal/const": "^0.1.0",
27
27
  "@bpinternal/tunnel": "^0.1.1",
28
28
  "@bpinternal/yargs-extra": "^0.0.3",
29
29
  "@parcel/watcher": "^2.1.0",
@@ -6,7 +6,7 @@
6
6
  "private": true,
7
7
  "dependencies": {
8
8
  "@botpress/client": "0.47.0",
9
- "@botpress/sdk": "3.3.0"
9
+ "@botpress/sdk": "3.3.1"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@types/node": "^18.19.67",
@@ -7,7 +7,7 @@
7
7
  "private": true,
8
8
  "dependencies": {
9
9
  "@botpress/client": "0.47.0",
10
- "@botpress/sdk": "3.3.0"
10
+ "@botpress/sdk": "3.3.1"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/node": "^18.19.67",
@@ -27,16 +27,16 @@ export type MessageHandlers = Required<{
27
27
  [K in keyof PluginHandlers['messageHandlers']]: NonNullable<PluginHandlers['messageHandlers'][K]>[number]
28
28
  }>
29
29
  export type HookHandlers = Required<{
30
- [H in keyof PluginHandlers['hookHandlers']]: {
30
+ [H in keyof PluginHandlers['hookHandlers']]: Required<{
31
31
  [K in keyof PluginHandlers['hookHandlers'][H]]: NonNullable<PluginHandlers['hookHandlers'][H][K]>[number]
32
- }
32
+ }>
33
33
  }>
34
34
 
35
35
  export type AnyMessageHandler = MessageHandlers['*']
36
36
  export type AnyEventHandler = EventHandlers['*']
37
37
  export type AnyActionHandler = ValueOf<PluginHandlers['actionHandlers']>
38
38
  export type AnyHookHanders = {
39
- [H in keyof HookHandlers]: HookHandlers[H]['*']
39
+ [H in keyof HookHandlers]: NonNullable<HookHandlers[H]['*']>
40
40
  }
41
41
 
42
42
  export type MessageHandlerProps = Parameters<AnyMessageHandler>[0]
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "private": true,
8
8
  "dependencies": {
9
- "@botpress/sdk": "3.3.0"
9
+ "@botpress/sdk": "3.3.1"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@types/node": "^18.19.67",
@@ -7,7 +7,7 @@
7
7
  "private": true,
8
8
  "dependencies": {
9
9
  "@botpress/client": "0.47.0",
10
- "@botpress/sdk": "3.3.0"
10
+ "@botpress/sdk": "3.3.1"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/node": "^18.19.67",
@@ -7,7 +7,7 @@
7
7
  "private": true,
8
8
  "dependencies": {
9
9
  "@botpress/client": "0.47.0",
10
- "@botpress/sdk": "3.3.0",
10
+ "@botpress/sdk": "3.3.1",
11
11
  "axios": "^1.6.8"
12
12
  },
13
13
  "devDependencies": {