@botpress/cli 3.3.0 ā 3.3.2
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.
- package/.turbo/turbo-build.log +10 -10
- package/dist/code-generation/plugin-implementation/plugin-implementation.js +3 -3
- package/dist/code-generation/plugin-implementation/plugin-implementation.js.map +1 -1
- package/package.json +3 -3
- package/templates/empty-bot/package.json +1 -1
- package/templates/empty-integration/package.json +1 -1
- package/templates/empty-plugin/.botpress/implementation/index.ts +3 -3
- package/templates/empty-plugin/package.json +1 -1
- package/templates/hello-world/package.json +1 -1
- package/templates/webhook-message/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/cli@3.3.
|
|
2
|
+
> @botpress/cli@3.3.2 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.
|
|
6
|
+
> @botpress/cli@3.3.2 bundle /home/runner/work/botpress/botpress/packages/cli
|
|
7
7
|
> ts-node -T build.ts
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
> @botpress/cli@3.3.
|
|
10
|
+
> @botpress/cli@3.3.2 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.
|
|
14
|
-
š¤ Botpress CLI v3.3.
|
|
15
|
-
š¤ Botpress CLI v3.3.
|
|
16
|
-
š¤ Botpress CLI v3.3.
|
|
17
|
-
[2K[1Gā Generating typings for integration hello-world...[2K[1Gā Generating typings for bot...[2K[1Gā Typings available at .botpress
|
|
13
|
+
š¤ Botpress CLI v3.3.2
|
|
14
|
+
š¤ Botpress CLI v3.3.2
|
|
15
|
+
š¤ Botpress CLI v3.3.2
|
|
16
|
+
š¤ Botpress CLI v3.3.2
|
|
18
17
|
[2K[1Gā Generating typings for integration empty-integration...[2K[1Gā Typings available at .botpress
|
|
19
|
-
[2K[1Gā Typings available at .botpress
|
|
20
18
|
[2K[1Gā Generating typings for plugin empty-plugin...[2K[1Gā Typings available at .botpress
|
|
21
|
-
|
|
19
|
+
[2K[1Gā Generating typings for integration hello-world...[2K[1Gā Typings available at .botpress
|
|
20
|
+
[2K[1Gā Generating typings for bot...[2K[1Gā Typings available at .botpress
|
|
21
|
+
š¤ Botpress CLI v3.3.2
|
|
22
22
|
[2K[1Gā Generating typings for integration webhook-message...[2K[1Gā 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]['*']
|
|
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.
|
|
3
|
+
"version": "3.3.2",
|
|
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.
|
|
26
|
-
"@bpinternal/const": "^0.0
|
|
25
|
+
"@botpress/sdk": "3.3.2",
|
|
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",
|
|
@@ -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]
|