@botpress/cli 4.27.1 → 4.27.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 +11 -11
- package/dist/code-generation/bot-implementation/bot-typings/index.js +2 -1
- package/dist/code-generation/bot-implementation/bot-typings/index.js.map +2 -2
- package/dist/code-generation/module.js +1 -1
- package/dist/code-generation/module.js.map +2 -2
- package/dist/code-generation/plugin-implementation/plugin-typings/index.js +3 -2
- package/dist/code-generation/plugin-implementation/plugin-typings/index.js.map +2 -2
- package/dist/code-generation/strings.d.ts +1 -0
- package/dist/code-generation/strings.js +3 -0
- package/dist/code-generation/strings.js.map +2 -2
- package/package.json +2 -2
- package/templates/empty-bot/package.json +1 -1
- package/templates/empty-integration/package.json +1 -1
- 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,44 +1,44 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/cli@4.27.
|
|
2
|
+
> @botpress/cli@4.27.2 build /home/runner/work/botpress/botpress/packages/cli
|
|
3
3
|
> pnpm run build:types && pnpm run bundle && pnpm run template:gen
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @botpress/cli@4.27.
|
|
6
|
+
> @botpress/cli@4.27.2 build:types /home/runner/work/botpress/botpress/packages/cli
|
|
7
7
|
> tsc -p ./tsconfig.build.json
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
> @botpress/cli@4.27.
|
|
10
|
+
> @botpress/cli@4.27.2 bundle /home/runner/work/botpress/botpress/packages/cli
|
|
11
11
|
> ts-node -T build.ts
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
> @botpress/cli@4.27.
|
|
14
|
+
> @botpress/cli@4.27.2 template:gen /home/runner/work/botpress/botpress/packages/cli
|
|
15
15
|
> pnpm -r --stream -F @bp-templates/* exec bp gen
|
|
16
16
|
|
|
17
|
-
🤖 Botpress CLI v4.27.
|
|
17
|
+
🤖 Botpress CLI v4.27.2
|
|
18
18
|
● Checking if cli is up to date
|
|
19
|
-
🤖 Botpress CLI v4.27.
|
|
19
|
+
🤖 Botpress CLI v4.27.2
|
|
20
20
|
● Checking if cli is up to date
|
|
21
|
-
🤖 Botpress CLI v4.27.
|
|
21
|
+
🤖 Botpress CLI v4.27.2
|
|
22
22
|
● Checking if cli is up to date
|
|
23
|
-
🤖 Botpress CLI v4.27.1
|
|
24
|
-
● Checking if cli is up to date
|
|
25
|
-
● Checking if sdk is up to date
|
|
26
23
|
● Checking if sdk is up to date
|
|
27
24
|
● Checking if sdk is up to date
|
|
28
25
|
● Checking if sdk is up to date
|
|
29
26
|
○ Generating typings for bot...
|
|
30
27
|
✓ Typings available at .botpress
|
|
31
28
|
|
|
29
|
+
🤖 Botpress CLI v4.27.2
|
|
30
|
+
● Checking if cli is up to date
|
|
32
31
|
○ Generating typings for integration empty-integration...
|
|
33
32
|
✓ Typings available at .botpress
|
|
34
33
|
|
|
35
34
|
○ Generating typings for plugin empty-plugin...
|
|
35
|
+
● Checking if sdk is up to date
|
|
36
36
|
✓ Typings available at .botpress
|
|
37
37
|
|
|
38
38
|
○ Generating typings for integration hello-world...
|
|
39
39
|
✓ Typings available at .botpress
|
|
40
40
|
|
|
41
|
-
🤖 Botpress CLI v4.27.
|
|
41
|
+
🤖 Botpress CLI v4.27.2
|
|
42
42
|
● Checking if cli is up to date
|
|
43
43
|
● Checking if sdk is up to date
|
|
44
44
|
○ Generating typings for integration webhook-message...
|
|
@@ -34,6 +34,7 @@ module.exports = __toCommonJS(bot_typings_exports);
|
|
|
34
34
|
var consts = __toESM(require("../../consts"));
|
|
35
35
|
var import_integration_typings = require("../../integration-implementation/integration-typings");
|
|
36
36
|
var import_module = require("../../module");
|
|
37
|
+
var strings = __toESM(require("../../strings"));
|
|
37
38
|
var import_actions_module = require("./actions-module");
|
|
38
39
|
var import_events_module = require("./events-module");
|
|
39
40
|
var import_states_module = require("./states-module");
|
|
@@ -46,7 +47,7 @@ class BotIntegrationsModule extends import_module.ReExportTypeModule {
|
|
|
46
47
|
});
|
|
47
48
|
for (const [alias, integration] of Object.entries(bot.integrations ?? {})) {
|
|
48
49
|
const integrationModule = new import_integration_typings.IntegrationTypingsModule(integration.definition).setCustomTypeName(alias);
|
|
49
|
-
integrationModule.unshift(alias);
|
|
50
|
+
integrationModule.unshift(strings.dirName(alias));
|
|
50
51
|
this.pushDep(integrationModule);
|
|
51
52
|
}
|
|
52
53
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/code-generation/bot-implementation/bot-typings/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport * as consts from '../../consts'\nimport { IntegrationTypingsModule } from '../../integration-implementation/integration-typings'\nimport { Module, ReExportTypeModule } from '../../module'\nimport { ActionsModule } from './actions-module'\nimport { EventsModule } from './events-module'\nimport { StatesModule } from './states-module'\nimport { TablesModule } from './tables-module'\nimport { WorkflowsModule } from './workflows-module'\n\nclass BotIntegrationsModule extends ReExportTypeModule {\n public constructor(bot: sdk.BotDefinition) {\n super({\n exportName: 'Integrations',\n })\n\n for (const [alias, integration] of Object.entries(bot.integrations ?? {})) {\n const integrationModule = new IntegrationTypingsModule(integration.definition).setCustomTypeName(alias)\n integrationModule.unshift(alias)\n this.pushDep(integrationModule)\n }\n }\n}\n\ntype BotTypingsIndexDependencies = {\n integrationsModule: BotIntegrationsModule\n eventsModule: EventsModule\n statesModule: StatesModule\n actionsModule: ActionsModule\n tablesModule: TablesModule\n workflowsModule: WorkflowsModule\n}\n\nexport class BotTypingsModule extends Module {\n private _dependencies: BotTypingsIndexDependencies\n\n public constructor(bot: sdk.BotDefinition) {\n super({\n exportName: 'TBot',\n path: consts.INDEX_FILE,\n })\n\n const integrationsModule = new BotIntegrationsModule(bot)\n integrationsModule.unshift('integrations')\n this.pushDep(integrationsModule)\n\n const eventsModule = new EventsModule(bot.withPlugins.events ?? {})\n eventsModule.unshift('events')\n this.pushDep(eventsModule)\n\n const statesModule = new StatesModule(bot.withPlugins.states ?? {})\n statesModule.unshift('states')\n this.pushDep(statesModule)\n\n const tablesModule = new TablesModule(bot.withPlugins.tables ?? {})\n tablesModule.unshift('tables')\n this.pushDep(tablesModule)\n\n const actionsModule = new ActionsModule(bot.withPlugins.actions ?? {})\n actionsModule.unshift('actions')\n this.pushDep(actionsModule)\n\n const workflowsModule = new WorkflowsModule(bot.withPlugins.workflows ?? {})\n workflowsModule.unshift('workflows')\n this.pushDep(workflowsModule)\n\n this._dependencies = {\n integrationsModule,\n eventsModule,\n statesModule,\n actionsModule,\n tablesModule,\n workflowsModule,\n }\n }\n\n public async getContent() {\n const { integrationsModule, eventsModule, statesModule, actionsModule, tablesModule, workflowsModule } =\n this._dependencies\n\n const integrationsImport = integrationsModule.import(this)\n const eventsImport = eventsModule.import(this)\n const statesImport = statesModule.import(this)\n const actionsImport = actionsModule\n const tablesImport = tablesModule.import(this)\n const workflowsImport = workflowsModule\n\n return [\n consts.GENERATED_HEADER,\n `import * as ${integrationsModule.name} from './${integrationsImport}'`,\n `import * as ${eventsModule.name} from './${eventsModule.name}'`,\n `import * as ${statesModule.name} from './${statesModule.name}'`,\n `import * as ${actionsModule.name} from './${actionsImport.name}'`,\n `import * as ${tablesModule.name} from './${tablesImport}'`,\n `import * as ${workflowsModule.name} from './${workflowsImport.name}'`,\n '',\n `export * as ${integrationsModule.name} from './${integrationsImport}'`,\n `export * as ${eventsModule.name} from './${eventsImport}'`,\n `export * as ${statesModule.name} from './${statesImport}'`,\n `export * as ${actionsModule.name} from './${actionsImport.name}'`,\n `export * as ${tablesModule.name} from './${tablesImport}'`,\n `export * as ${workflowsModule.name} from './${workflowsImport.name}'`,\n '',\n 'export type TBot = {',\n ` integrations: ${integrationsModule.name}.${integrationsModule.exportName}`,\n ` events: ${eventsModule.name}.${eventsModule.exportName}`,\n ` states: ${statesModule.name}.${statesModule.exportName}`,\n ` actions: ${actionsModule.name}.${actionsModule.exportName}`,\n ` tables: ${tablesModule.name}.${tablesModule.exportName}`,\n ` workflows: ${workflowsModule.name}.${workflowsModule.exportName}`,\n '}',\n ].join('\\n')\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,aAAwB;AACxB,iCAAyC;AACzC,oBAA2C;AAC3C,4BAA8B;AAC9B,2BAA6B;AAC7B,2BAA6B;AAC7B,2BAA6B;AAC7B,8BAAgC;AAEhC,MAAM,8BAA8B,iCAAmB;AAAA,EAC9C,YAAY,KAAwB;AACzC,UAAM;AAAA,MACJ,YAAY;AAAA,IACd,CAAC;AAED,eAAW,CAAC,OAAO,WAAW,KAAK,OAAO,QAAQ,IAAI,gBAAgB,CAAC,CAAC,GAAG;AACzE,YAAM,oBAAoB,IAAI,oDAAyB,YAAY,UAAU,EAAE,kBAAkB,KAAK;AACtG,wBAAkB,QAAQ,KAAK;
|
|
4
|
+
"sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport * as consts from '../../consts'\nimport { IntegrationTypingsModule } from '../../integration-implementation/integration-typings'\nimport { Module, ReExportTypeModule } from '../../module'\nimport * as strings from '../../strings'\nimport { ActionsModule } from './actions-module'\nimport { EventsModule } from './events-module'\nimport { StatesModule } from './states-module'\nimport { TablesModule } from './tables-module'\nimport { WorkflowsModule } from './workflows-module'\n\nclass BotIntegrationsModule extends ReExportTypeModule {\n public constructor(bot: sdk.BotDefinition) {\n super({\n exportName: 'Integrations',\n })\n\n for (const [alias, integration] of Object.entries(bot.integrations ?? {})) {\n const integrationModule = new IntegrationTypingsModule(integration.definition).setCustomTypeName(alias)\n integrationModule.unshift(strings.dirName(alias))\n this.pushDep(integrationModule)\n }\n }\n}\n\ntype BotTypingsIndexDependencies = {\n integrationsModule: BotIntegrationsModule\n eventsModule: EventsModule\n statesModule: StatesModule\n actionsModule: ActionsModule\n tablesModule: TablesModule\n workflowsModule: WorkflowsModule\n}\n\nexport class BotTypingsModule extends Module {\n private _dependencies: BotTypingsIndexDependencies\n\n public constructor(bot: sdk.BotDefinition) {\n super({\n exportName: 'TBot',\n path: consts.INDEX_FILE,\n })\n\n const integrationsModule = new BotIntegrationsModule(bot)\n integrationsModule.unshift('integrations')\n this.pushDep(integrationsModule)\n\n const eventsModule = new EventsModule(bot.withPlugins.events ?? {})\n eventsModule.unshift('events')\n this.pushDep(eventsModule)\n\n const statesModule = new StatesModule(bot.withPlugins.states ?? {})\n statesModule.unshift('states')\n this.pushDep(statesModule)\n\n const tablesModule = new TablesModule(bot.withPlugins.tables ?? {})\n tablesModule.unshift('tables')\n this.pushDep(tablesModule)\n\n const actionsModule = new ActionsModule(bot.withPlugins.actions ?? {})\n actionsModule.unshift('actions')\n this.pushDep(actionsModule)\n\n const workflowsModule = new WorkflowsModule(bot.withPlugins.workflows ?? {})\n workflowsModule.unshift('workflows')\n this.pushDep(workflowsModule)\n\n this._dependencies = {\n integrationsModule,\n eventsModule,\n statesModule,\n actionsModule,\n tablesModule,\n workflowsModule,\n }\n }\n\n public async getContent() {\n const { integrationsModule, eventsModule, statesModule, actionsModule, tablesModule, workflowsModule } =\n this._dependencies\n\n const integrationsImport = integrationsModule.import(this)\n const eventsImport = eventsModule.import(this)\n const statesImport = statesModule.import(this)\n const actionsImport = actionsModule\n const tablesImport = tablesModule.import(this)\n const workflowsImport = workflowsModule\n\n return [\n consts.GENERATED_HEADER,\n `import * as ${integrationsModule.name} from './${integrationsImport}'`,\n `import * as ${eventsModule.name} from './${eventsModule.name}'`,\n `import * as ${statesModule.name} from './${statesModule.name}'`,\n `import * as ${actionsModule.name} from './${actionsImport.name}'`,\n `import * as ${tablesModule.name} from './${tablesImport}'`,\n `import * as ${workflowsModule.name} from './${workflowsImport.name}'`,\n '',\n `export * as ${integrationsModule.name} from './${integrationsImport}'`,\n `export * as ${eventsModule.name} from './${eventsImport}'`,\n `export * as ${statesModule.name} from './${statesImport}'`,\n `export * as ${actionsModule.name} from './${actionsImport.name}'`,\n `export * as ${tablesModule.name} from './${tablesImport}'`,\n `export * as ${workflowsModule.name} from './${workflowsImport.name}'`,\n '',\n 'export type TBot = {',\n ` integrations: ${integrationsModule.name}.${integrationsModule.exportName}`,\n ` events: ${eventsModule.name}.${eventsModule.exportName}`,\n ` states: ${statesModule.name}.${statesModule.exportName}`,\n ` actions: ${actionsModule.name}.${actionsModule.exportName}`,\n ` tables: ${tablesModule.name}.${tablesModule.exportName}`,\n ` workflows: ${workflowsModule.name}.${workflowsModule.exportName}`,\n '}',\n ].join('\\n')\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,aAAwB;AACxB,iCAAyC;AACzC,oBAA2C;AAC3C,cAAyB;AACzB,4BAA8B;AAC9B,2BAA6B;AAC7B,2BAA6B;AAC7B,2BAA6B;AAC7B,8BAAgC;AAEhC,MAAM,8BAA8B,iCAAmB;AAAA,EAC9C,YAAY,KAAwB;AACzC,UAAM;AAAA,MACJ,YAAY;AAAA,IACd,CAAC;AAED,eAAW,CAAC,OAAO,WAAW,KAAK,OAAO,QAAQ,IAAI,gBAAgB,CAAC,CAAC,GAAG;AACzE,YAAM,oBAAoB,IAAI,oDAAyB,YAAY,UAAU,EAAE,kBAAkB,KAAK;AACtG,wBAAkB,QAAQ,QAAQ,QAAQ,KAAK,CAAC;AAChD,WAAK,QAAQ,iBAAiB;AAAA,IAChC;AAAA,EACF;AACF;AAWO,MAAM,yBAAyB,qBAAO;AAAA,EACnC;AAAA,EAED,YAAY,KAAwB;AACzC,UAAM;AAAA,MACJ,YAAY;AAAA,MACZ,MAAM,OAAO;AAAA,IACf,CAAC;AAED,UAAM,qBAAqB,IAAI,sBAAsB,GAAG;AACxD,uBAAmB,QAAQ,cAAc;AACzC,SAAK,QAAQ,kBAAkB;AA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AAI,YAAY,YAAY;AAAA,MACxD,eAAe,gBAAgB,IAAI,YAAY,gBAAgB,IAAI;AAAA,MACnE;AAAA,MACA,eAAe,mBAAmB,IAAI,YAAY,kBAAkB;AAAA,MACpE,eAAe,aAAa,IAAI,YAAY,YAAY;AAAA,MACxD,eAAe,aAAa,IAAI,YAAY,YAAY;AAAA,MACxD,eAAe,cAAc,IAAI,YAAY,cAAc,IAAI;AAAA,MAC/D,eAAe,aAAa,IAAI,YAAY,YAAY;AAAA,MACxD,eAAe,gBAAgB,IAAI,YAAY,gBAAgB,IAAI;AAAA,MACnE;AAAA,MACA;AAAA,MACA,mBAAmB,mBAAmB,IAAI,IAAI,mBAAmB,UAAU;AAAA,MAC3E,aAAa,aAAa,IAAI,IAAI,aAAa,UAAU;AAAA,MACzD,aAAa,aAAa,IAAI,IAAI,aAAa,UAAU;AAAA,MACzD,cAAc,cAAc,IAAI,IAAI,cAAc,UAAU;AAAA,MAC5D,aAAa,aAAa,IAAI,IAAI,aAAa,UAAU;AAAA,MACzD,gBAAgB,gBAAgB,IAAI,IAAI,gBAAgB,UAAU;AAAA,MAClE;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -74,7 +74,7 @@ class Module {
|
|
|
74
74
|
return this._customTypeName ?? this.name;
|
|
75
75
|
}
|
|
76
76
|
get importAlias() {
|
|
77
|
-
return this.typeName.split(
|
|
77
|
+
return this.typeName.split(/\\|\//).map(strings.importAlias).join("__");
|
|
78
78
|
}
|
|
79
79
|
setCustomTypeName(alias) {
|
|
80
80
|
this._customTypeName = alias;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/code-generation/module.ts"],
|
|
4
|
-
"sourcesContent": ["import { posix as pathlib } from 'path'\nimport * as utils from '../utils'\nimport * as consts from './consts'\nimport * as strings from './strings'\nimport { File } from './typings'\n\nexport type ModuleProps = {\n path: string\n exportName: string\n}\n\nexport abstract class Module {\n private _localDependencies: Module[] = []\n private _customTypeName: string | undefined\n\n public get path(): string {\n return this._def.path.split(pathlib.sep).map(strings.fileName).join(pathlib.sep)\n }\n\n /**\n * @returns module name (equivalent to unescaped file name without extension)\n */\n public get name(): string {\n const path = this._def.path\n const basename = pathlib.basename(path)\n if (basename === consts.INDEX_FILE || basename === consts.INDEX_DECLARATION_FILE) {\n const dirPath = pathlib.dirname(path)\n const dirname = pathlib.basename(dirPath)\n return dirname\n }\n const withoutExtension = utils.path.rmExtension(basename)\n return withoutExtension\n }\n\n public get isDefaultExport(): boolean {\n return this._def.exportName === consts.DEFAULT_EXPORT_NAME\n }\n\n public get exportName(): string {\n return this._def.exportName\n }\n\n public get deps(): Module[] {\n return [...this._localDependencies]\n }\n\n public get typeName(): string {\n return this._customTypeName ?? this.name\n }\n\n public get importAlias(): string {\n return this.typeName.split(
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC;AACjC,YAAuB;AACvB,aAAwB;AACxB,cAAyB;AAQlB,MAAe,OAAO;AAAA,EA2CjB,YAAoB,MAAmB;AAAnB;AAAA,EAAoB;AAAA,EA1C1C,qBAA+B,CAAC;AAAA,EAChC;AAAA,EAER,IAAW,OAAe;AACxB,WAAO,KAAK,KAAK,KAAK,MAAM,YAAAA,MAAQ,GAAG,EAAE,IAAI,QAAQ,QAAQ,EAAE,KAAK,YAAAA,MAAQ,GAAG;AAAA,EACjF;AAAA;AAAA;AAAA;AAAA,EAKA,IAAW,OAAe;AACxB,UAAM,OAAO,KAAK,KAAK;AACvB,UAAM,WAAW,YAAAA,MAAQ,SAAS,IAAI;AACtC,QAAI,aAAa,OAAO,cAAc,aAAa,OAAO,wBAAwB;AAChF,YAAM,UAAU,YAAAA,MAAQ,QAAQ,IAAI;AACpC,YAAM,UAAU,YAAAA,MAAQ,SAAS,OAAO;AACxC,aAAO;AAAA,IACT;AACA,UAAM,mBAAmB,MAAM,KAAK,YAAY,QAAQ;AACxD,WAAO;AAAA,EACT;AAAA,EAEA,IAAW,kBAA2B;AACpC,WAAO,KAAK,KAAK,eAAe,OAAO;AAAA,EACzC;AAAA,EAEA,IAAW,aAAqB;AAC9B,WAAO,KAAK,KAAK;AAAA,EACnB;AAAA,EAEA,IAAW,OAAiB;AAC1B,WAAO,CAAC,GAAG,KAAK,kBAAkB;AAAA,EACpC;AAAA,EAEA,IAAW,WAAmB;AAC5B,WAAO,KAAK,mBAAmB,KAAK;AAAA,EACtC;AAAA,EAEA,IAAW,cAAsB;AAC/B,WAAO,KAAK,SAAS,MAAM,
|
|
4
|
+
"sourcesContent": ["import { posix as pathlib } from 'path'\nimport * as utils from '../utils'\nimport * as consts from './consts'\nimport * as strings from './strings'\nimport { File } from './typings'\n\nexport type ModuleProps = {\n path: string\n exportName: string\n}\n\nexport abstract class Module {\n private _localDependencies: Module[] = []\n private _customTypeName: string | undefined\n\n public get path(): string {\n return this._def.path.split(pathlib.sep).map(strings.fileName).join(pathlib.sep)\n }\n\n /**\n * @returns module name (equivalent to unescaped file name without extension)\n */\n public get name(): string {\n const path = this._def.path\n const basename = pathlib.basename(path)\n if (basename === consts.INDEX_FILE || basename === consts.INDEX_DECLARATION_FILE) {\n const dirPath = pathlib.dirname(path)\n const dirname = pathlib.basename(dirPath)\n return dirname\n }\n const withoutExtension = utils.path.rmExtension(basename)\n return withoutExtension\n }\n\n public get isDefaultExport(): boolean {\n return this._def.exportName === consts.DEFAULT_EXPORT_NAME\n }\n\n public get exportName(): string {\n return this._def.exportName\n }\n\n public get deps(): Module[] {\n return [...this._localDependencies]\n }\n\n public get typeName(): string {\n return this._customTypeName ?? this.name\n }\n\n public get importAlias(): string {\n return this.typeName.split(/\\\\|\\//).map(strings.importAlias).join('__')\n }\n\n protected constructor(private _def: ModuleProps) {}\n\n public abstract getContent(): Promise<string>\n\n public setCustomTypeName(alias: string): this {\n this._customTypeName = alias\n return this\n }\n\n public pushDep(...dependencies: Module[]): this {\n this._localDependencies.push(...dependencies)\n return this\n }\n\n public unshift(...basePath: string[]): this {\n this._def = {\n ...this._def,\n path: pathlib.join(...basePath, this._def.path),\n }\n this._localDependencies = this._localDependencies.map((d) => d.unshift(...basePath))\n return this\n }\n\n public async toFile(): Promise<File> {\n return {\n path: this.path,\n content: await this.getContent(),\n }\n }\n\n public async flatten(): Promise<File[]> {\n const self = await this.toFile()\n const allFiles: File[] = [self]\n for (const dep of this._localDependencies) {\n const depFiles = await dep.flatten()\n allFiles.push(...depFiles)\n }\n return allFiles\n }\n\n public import(base: Module): string {\n let relativePath = pathlib.relative(pathlib.dirname(base.path), this.path)\n relativePath = pathlib.join('.', relativePath)\n return utils.path.rmExtension(relativePath)\n }\n}\n\nexport class ReExportTypeModule extends Module {\n protected constructor(def: { exportName: string }) {\n super({\n ...def,\n path: consts.INDEX_FILE,\n })\n }\n\n public async getContent(): Promise<string> {\n let content = consts.GENERATED_HEADER\n\n for (const m of this.deps) {\n const { importAlias } = m\n const importFrom = m.import(this)\n content += `import * as ${importAlias} from \"./${importFrom}\";\\n`\n content += `export * as ${importAlias} from \"./${importFrom}\";\\n`\n }\n\n content += '\\n'\n\n content += `export type ${this.exportName} = {\\n`\n for (const { importAlias, typeName, exportName: exports } of this.deps) {\n content += ` \"${typeName}\": ${importAlias}.${exports};\\n`\n }\n content += '}'\n\n content += '\\n'\n\n return content\n }\n}\n\nexport class ReExportVariableModule extends Module {\n private _extraProps: Record<string, string> = {}\n\n protected constructor(def: { exportName: string; extraProps?: Record<string, string> }) {\n super({\n ...def,\n path: consts.INDEX_FILE,\n })\n this._extraProps = def.extraProps ?? {}\n }\n\n public async getContent(): Promise<string> {\n let content = consts.GENERATED_HEADER\n\n for (const m of this.deps) {\n const { importAlias } = m\n const importFrom = m.import(this)\n content += `import * as ${importAlias} from \"./${importFrom}\";\\n`\n content += `export * as ${importAlias} from \"./${importFrom}\";\\n`\n }\n\n content += '\\n'\n\n const depProps: Record<string, string> = Object.fromEntries(\n this.deps.map(({ name, exportName, importAlias }) => [name, `${importAlias}.${exportName}`])\n )\n\n const allProps = { ...depProps, ...this._extraProps }\n\n content += `export const ${this.exportName} = {\\n`\n for (const [key, value] of Object.entries(allProps)) {\n content += ` \"${key}\": ${value},\\n`\n }\n content += '}'\n\n content += '\\n'\n\n return content\n }\n}\n\nexport class SingleFileModule extends Module {\n private _content: string\n public constructor(def: ModuleProps & { content: string }) {\n super(def)\n this._content = def.content\n }\n\n public async getContent(): Promise<string> {\n return this._content\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC;AACjC,YAAuB;AACvB,aAAwB;AACxB,cAAyB;AAQlB,MAAe,OAAO;AAAA,EA2CjB,YAAoB,MAAmB;AAAnB;AAAA,EAAoB;AAAA,EA1C1C,qBAA+B,CAAC;AAAA,EAChC;AAAA,EAER,IAAW,OAAe;AACxB,WAAO,KAAK,KAAK,KAAK,MAAM,YAAAA,MAAQ,GAAG,EAAE,IAAI,QAAQ,QAAQ,EAAE,KAAK,YAAAA,MAAQ,GAAG;AAAA,EACjF;AAAA;AAAA;AAAA;AAAA,EAKA,IAAW,OAAe;AACxB,UAAM,OAAO,KAAK,KAAK;AACvB,UAAM,WAAW,YAAAA,MAAQ,SAAS,IAAI;AACtC,QAAI,aAAa,OAAO,cAAc,aAAa,OAAO,wBAAwB;AAChF,YAAM,UAAU,YAAAA,MAAQ,QAAQ,IAAI;AACpC,YAAM,UAAU,YAAAA,MAAQ,SAAS,OAAO;AACxC,aAAO;AAAA,IACT;AACA,UAAM,mBAAmB,MAAM,KAAK,YAAY,QAAQ;AACxD,WAAO;AAAA,EACT;AAAA,EAEA,IAAW,kBAA2B;AACpC,WAAO,KAAK,KAAK,eAAe,OAAO;AAAA,EACzC;AAAA,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MAAM,GAAG,WAAW,IAAI,UAAU,EAAE,CAAC;AAAA,IAC7F;AAEA,UAAM,WAAW,EAAE,GAAG,UAAU,GAAG,KAAK,YAAY;AAEpD,eAAW,gBAAgB,KAAK,UAAU;AAAA;AAC1C,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,QAAQ,GAAG;AACnD,iBAAW,MAAM,GAAG,MAAM,KAAK;AAAA;AAAA,IACjC;AACA,eAAW;AAEX,eAAW;AAEX,WAAO;AAAA,EACT;AACF;AAEO,MAAM,yBAAyB,OAAO;AAAA,EACnC;AAAA,EACD,YAAY,KAAwC;AACzD,UAAM,GAAG;AACT,SAAK,WAAW,IAAI;AAAA,EACtB;AAAA,EAEA,MAAa,aAA8B;AACzC,WAAO,KAAK;AAAA,EACd;AACF;",
|
|
6
6
|
"names": ["pathlib", "exports"]
|
|
7
7
|
}
|
|
@@ -35,6 +35,7 @@ var consts = __toESM(require("../../consts"));
|
|
|
35
35
|
var import_integration_typings = require("../../integration-implementation/integration-typings");
|
|
36
36
|
var import_interface_implementation = require("../../interface-implementation");
|
|
37
37
|
var import_module = require("../../module");
|
|
38
|
+
var strings = __toESM(require("../../strings"));
|
|
38
39
|
var import_actions_module = require("./actions-module");
|
|
39
40
|
var import_configuration_module = require("./configuration-module");
|
|
40
41
|
var import_events_module = require("./events-module");
|
|
@@ -48,7 +49,7 @@ class PluginIntegrationsModule extends import_module.ReExportTypeModule {
|
|
|
48
49
|
});
|
|
49
50
|
for (const [alias, integration] of Object.entries(plugin.integrations ?? {})) {
|
|
50
51
|
const integrationModule = new import_integration_typings.IntegrationTypingsModule(integration.definition);
|
|
51
|
-
integrationModule.unshift(alias);
|
|
52
|
+
integrationModule.unshift(strings.dirName(alias));
|
|
52
53
|
this.pushDep(integrationModule);
|
|
53
54
|
}
|
|
54
55
|
}
|
|
@@ -60,7 +61,7 @@ class PluginInterfacesModule extends import_module.ReExportTypeModule {
|
|
|
60
61
|
});
|
|
61
62
|
for (const [alias, intrface] of Object.entries(plugin.interfaces ?? {})) {
|
|
62
63
|
const interfaceModule = new import_interface_implementation.InterfaceTypingsModule(intrface.definition);
|
|
63
|
-
interfaceModule.unshift(alias);
|
|
64
|
+
interfaceModule.unshift(strings.dirName(alias));
|
|
64
65
|
this.pushDep(interfaceModule);
|
|
65
66
|
}
|
|
66
67
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/code-generation/plugin-implementation/plugin-typings/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport * as utils from '../../../utils'\nimport * as consts from '../../consts'\nimport { IntegrationTypingsModule } from '../../integration-implementation/integration-typings'\nimport { InterfaceTypingsModule } from '../../interface-implementation'\nimport { Module, ReExportTypeModule, SingleFileModule } from '../../module'\nimport { ActionsModule } from './actions-module'\nimport { DefaultConfigurationModule } from './configuration-module'\nimport { EventsModule } from './events-module'\nimport { StatesModule } from './states-module'\nimport { TablesModule } from './tables-module'\nimport { WorkflowsModule } from './workflows-module'\n\nclass PluginIntegrationsModule extends ReExportTypeModule {\n public constructor(plugin: sdk.PluginDefinition) {\n super({\n exportName: 'Integrations',\n })\n\n for (const [alias, integration] of Object.entries(plugin.integrations ?? {})) {\n const integrationModule = new IntegrationTypingsModule(integration.definition)\n integrationModule.unshift(alias)\n this.pushDep(integrationModule)\n }\n }\n}\n\nclass PluginInterfacesModule extends ReExportTypeModule {\n public constructor(plugin: sdk.PluginDefinition) {\n super({\n exportName: 'Interfaces',\n })\n\n for (const [alias, intrface] of Object.entries(plugin.interfaces ?? {})) {\n const interfaceModule = new InterfaceTypingsModule(intrface.definition)\n interfaceModule.unshift(alias)\n this.pushDep(interfaceModule)\n }\n }\n}\n\ntype PluginTypingsIndexDependencies = {\n integrationsModule: PluginIntegrationsModule\n interfacesModule: PluginInterfacesModule\n defaultConfigModule: DefaultConfigurationModule\n eventsModule: EventsModule\n statesModule: StatesModule\n actionsModule: ActionsModule\n tablesModule: TablesModule\n workflowsModule: WorkflowsModule\n}\n\ntype _assertPropsInPluginDefinition = utils.types.AssertKeyOf<'props', sdk.PluginDefinition>\nconst _isLocalPluginDefinition = (\n plugin: sdk.PluginDefinition | sdk.PluginPackage['definition']\n): plugin is sdk.PluginDefinition => {\n return 'props' in plugin\n}\n\nexport class PluginTypingsModule extends Module {\n private _dependencies: PluginTypingsIndexDependencies\n\n public constructor(private _plugin: sdk.PluginDefinition | sdk.PluginPackage['definition']) {\n super({\n exportName: 'TPlugin',\n path: consts.INDEX_FILE,\n })\n\n const integrationsModule = _isLocalPluginDefinition(_plugin)\n ? new PluginIntegrationsModule(_plugin)\n : new SingleFileModule({\n path: consts.INDEX_FILE,\n exportName: 'Integrations',\n content: 'export type Integrations = {}',\n })\n integrationsModule.unshift('integrations')\n this.pushDep(integrationsModule)\n\n const interfacesModule = _isLocalPluginDefinition(_plugin)\n ? new PluginInterfacesModule(_plugin)\n : new SingleFileModule({\n path: consts.INDEX_FILE,\n exportName: 'Interfaces',\n content: 'export type Interfaces = {}',\n })\n interfacesModule.unshift('interfaces')\n this.pushDep(interfacesModule)\n\n const defaultConfigModule = new DefaultConfigurationModule(_plugin.configuration)\n defaultConfigModule.unshift('configuration')\n this.pushDep(defaultConfigModule)\n\n const eventsModule = new EventsModule(_plugin.events ?? {})\n eventsModule.unshift('events')\n this.pushDep(eventsModule)\n\n const statesModule = new StatesModule(_plugin.states ?? {})\n statesModule.unshift('states')\n this.pushDep(statesModule)\n\n const actionsModule = new ActionsModule(_plugin.actions ?? {})\n actionsModule.unshift('actions')\n this.pushDep(actionsModule)\n\n const tablesModule = new TablesModule(_plugin.tables ?? {})\n tablesModule.unshift('tables')\n this.pushDep(tablesModule)\n\n const workflowsModule = new WorkflowsModule(_plugin.workflows ?? {})\n workflowsModule.unshift('workflows')\n this.pushDep(workflowsModule)\n\n this._dependencies = {\n integrationsModule,\n interfacesModule,\n defaultConfigModule,\n eventsModule,\n statesModule,\n actionsModule,\n tablesModule,\n workflowsModule,\n }\n }\n\n public async getContent() {\n const {\n integrationsModule,\n interfacesModule,\n defaultConfigModule,\n eventsModule,\n statesModule,\n actionsModule,\n tablesModule,\n workflowsModule,\n } = this._dependencies\n\n const integrationsImport = integrationsModule.import(this)\n const interfacesImport = interfacesModule.import(this)\n const defaultConfigImport = defaultConfigModule.import(this)\n const eventsImport = eventsModule.import(this)\n const statesImport = statesModule.import(this)\n const actionsImport = actionsModule\n const tablesImport = tablesModule.import(this)\n const workflowsImport = workflowsModule\n\n return [\n consts.GENERATED_HEADER,\n `import * as ${integrationsModule.name} from './${integrationsImport}'`,\n `import * as ${interfacesModule.name} from './${interfacesImport}'`,\n `import * as ${defaultConfigModule.name} from './${defaultConfigImport}'`,\n `import * as ${eventsModule.name} from './${eventsModule.name}'`,\n `import * as ${statesModule.name} from './${statesModule.name}'`,\n `import * as ${actionsModule.name} from './${actionsImport.name}'`,\n `import * as ${tablesModule.name} from './${tablesImport}'`,\n `import * as ${workflowsModule.name} from './${workflowsImport.name}'`,\n '',\n `export * as ${integrationsModule.name} from './${integrationsImport}'`,\n `export * as ${interfacesModule.name} from './${interfacesImport}'`,\n `export * as ${defaultConfigModule.name} from './${defaultConfigImport}'`,\n `export * as ${eventsModule.name} from './${eventsImport}'`,\n `export * as ${statesModule.name} from './${statesImport}'`,\n `export * as ${actionsModule.name} from './${actionsImport.name}'`,\n `export * as ${tablesModule.name} from './${tablesImport}'`,\n `export * as ${workflowsModule.name} from './${workflowsImport.name}'`,\n '',\n 'export type TPlugin = {',\n ` name: \"${this._plugin.name}\"`,\n ` version: \"${this._plugin.version}\"`,\n ` integrations: ${integrationsModule.name}.${integrationsModule.exportName}`,\n ` interfaces: ${interfacesModule.name}.${interfacesModule.exportName}`,\n ` configuration: ${defaultConfigModule.name}.${defaultConfigModule.exportName}`,\n ` events: ${eventsModule.name}.${eventsModule.exportName}`,\n ` states: ${statesModule.name}.${statesModule.exportName}`,\n ` actions: ${actionsModule.name}.${actionsModule.exportName}`,\n ` tables: ${tablesModule.name}.${tablesModule.exportName}`,\n ` workflows: ${workflowsModule.name}.${workflowsModule.exportName}`,\n '}',\n ].join('\\n')\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,aAAwB;AACxB,iCAAyC;AACzC,sCAAuC;AACvC,oBAA6D;AAC7D,4BAA8B;AAC9B,kCAA2C;AAC3C,2BAA6B;AAC7B,2BAA6B;AAC7B,2BAA6B;AAC7B,8BAAgC;AAEhC,MAAM,iCAAiC,iCAAmB;AAAA,EACjD,YAAY,QAA8B;AAC/C,UAAM;AAAA,MACJ,YAAY;AAAA,IACd,CAAC;AAED,eAAW,CAAC,OAAO,WAAW,KAAK,OAAO,QAAQ,OAAO,gBAAgB,CAAC,CAAC,GAAG;AAC5E,YAAM,oBAAoB,IAAI,oDAAyB,YAAY,UAAU;AAC7E,wBAAkB,QAAQ,KAAK;
|
|
4
|
+
"sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport * as utils from '../../../utils'\nimport * as consts from '../../consts'\nimport { IntegrationTypingsModule } from '../../integration-implementation/integration-typings'\nimport { InterfaceTypingsModule } from '../../interface-implementation'\nimport { Module, ReExportTypeModule, SingleFileModule } from '../../module'\nimport * as strings from '../../strings'\nimport { ActionsModule } from './actions-module'\nimport { DefaultConfigurationModule } from './configuration-module'\nimport { EventsModule } from './events-module'\nimport { StatesModule } from './states-module'\nimport { TablesModule } from './tables-module'\nimport { WorkflowsModule } from './workflows-module'\n\nclass PluginIntegrationsModule extends ReExportTypeModule {\n public constructor(plugin: sdk.PluginDefinition) {\n super({\n exportName: 'Integrations',\n })\n\n for (const [alias, integration] of Object.entries(plugin.integrations ?? {})) {\n const integrationModule = new IntegrationTypingsModule(integration.definition)\n integrationModule.unshift(strings.dirName(alias))\n this.pushDep(integrationModule)\n }\n }\n}\n\nclass PluginInterfacesModule extends ReExportTypeModule {\n public constructor(plugin: sdk.PluginDefinition) {\n super({\n exportName: 'Interfaces',\n })\n\n for (const [alias, intrface] of Object.entries(plugin.interfaces ?? {})) {\n const interfaceModule = new InterfaceTypingsModule(intrface.definition)\n interfaceModule.unshift(strings.dirName(alias))\n this.pushDep(interfaceModule)\n }\n }\n}\n\ntype PluginTypingsIndexDependencies = {\n integrationsModule: PluginIntegrationsModule\n interfacesModule: PluginInterfacesModule\n defaultConfigModule: DefaultConfigurationModule\n eventsModule: EventsModule\n statesModule: StatesModule\n actionsModule: ActionsModule\n tablesModule: TablesModule\n workflowsModule: WorkflowsModule\n}\n\ntype _assertPropsInPluginDefinition = utils.types.AssertKeyOf<'props', sdk.PluginDefinition>\nconst _isLocalPluginDefinition = (\n plugin: sdk.PluginDefinition | sdk.PluginPackage['definition']\n): plugin is sdk.PluginDefinition => {\n return 'props' in plugin\n}\n\nexport class PluginTypingsModule extends Module {\n private _dependencies: PluginTypingsIndexDependencies\n\n public constructor(private _plugin: sdk.PluginDefinition | sdk.PluginPackage['definition']) {\n super({\n exportName: 'TPlugin',\n path: consts.INDEX_FILE,\n })\n\n const integrationsModule = _isLocalPluginDefinition(_plugin)\n ? new PluginIntegrationsModule(_plugin)\n : new SingleFileModule({\n path: consts.INDEX_FILE,\n exportName: 'Integrations',\n content: 'export type Integrations = {}',\n })\n integrationsModule.unshift('integrations')\n this.pushDep(integrationsModule)\n\n const interfacesModule = _isLocalPluginDefinition(_plugin)\n ? new PluginInterfacesModule(_plugin)\n : new SingleFileModule({\n path: consts.INDEX_FILE,\n exportName: 'Interfaces',\n content: 'export type Interfaces = {}',\n })\n interfacesModule.unshift('interfaces')\n this.pushDep(interfacesModule)\n\n const defaultConfigModule = new DefaultConfigurationModule(_plugin.configuration)\n defaultConfigModule.unshift('configuration')\n this.pushDep(defaultConfigModule)\n\n const eventsModule = new EventsModule(_plugin.events ?? {})\n eventsModule.unshift('events')\n this.pushDep(eventsModule)\n\n const statesModule = new StatesModule(_plugin.states ?? {})\n statesModule.unshift('states')\n this.pushDep(statesModule)\n\n const actionsModule = new ActionsModule(_plugin.actions ?? {})\n actionsModule.unshift('actions')\n this.pushDep(actionsModule)\n\n const tablesModule = new TablesModule(_plugin.tables ?? {})\n tablesModule.unshift('tables')\n this.pushDep(tablesModule)\n\n const workflowsModule = new WorkflowsModule(_plugin.workflows ?? {})\n workflowsModule.unshift('workflows')\n this.pushDep(workflowsModule)\n\n this._dependencies = {\n integrationsModule,\n interfacesModule,\n defaultConfigModule,\n eventsModule,\n statesModule,\n actionsModule,\n tablesModule,\n workflowsModule,\n }\n }\n\n public async getContent() {\n const {\n integrationsModule,\n interfacesModule,\n defaultConfigModule,\n eventsModule,\n statesModule,\n actionsModule,\n tablesModule,\n workflowsModule,\n } = this._dependencies\n\n const integrationsImport = integrationsModule.import(this)\n const interfacesImport = interfacesModule.import(this)\n const defaultConfigImport = defaultConfigModule.import(this)\n const eventsImport = eventsModule.import(this)\n const statesImport = statesModule.import(this)\n const actionsImport = actionsModule\n const tablesImport = tablesModule.import(this)\n const workflowsImport = workflowsModule\n\n return [\n consts.GENERATED_HEADER,\n `import * as ${integrationsModule.name} from './${integrationsImport}'`,\n `import * as ${interfacesModule.name} from './${interfacesImport}'`,\n `import * as ${defaultConfigModule.name} from './${defaultConfigImport}'`,\n `import * as ${eventsModule.name} from './${eventsModule.name}'`,\n `import * as ${statesModule.name} from './${statesModule.name}'`,\n `import * as ${actionsModule.name} from './${actionsImport.name}'`,\n `import * as ${tablesModule.name} from './${tablesImport}'`,\n `import * as ${workflowsModule.name} from './${workflowsImport.name}'`,\n '',\n `export * as ${integrationsModule.name} from './${integrationsImport}'`,\n `export * as ${interfacesModule.name} from './${interfacesImport}'`,\n `export * as ${defaultConfigModule.name} from './${defaultConfigImport}'`,\n `export * as ${eventsModule.name} from './${eventsImport}'`,\n `export * as ${statesModule.name} from './${statesImport}'`,\n `export * as ${actionsModule.name} from './${actionsImport.name}'`,\n `export * as ${tablesModule.name} from './${tablesImport}'`,\n `export * as ${workflowsModule.name} from './${workflowsImport.name}'`,\n '',\n 'export type TPlugin = {',\n ` name: \"${this._plugin.name}\"`,\n ` version: \"${this._plugin.version}\"`,\n ` integrations: ${integrationsModule.name}.${integrationsModule.exportName}`,\n ` interfaces: ${interfacesModule.name}.${interfacesModule.exportName}`,\n ` configuration: ${defaultConfigModule.name}.${defaultConfigModule.exportName}`,\n ` events: ${eventsModule.name}.${eventsModule.exportName}`,\n ` states: ${statesModule.name}.${statesModule.exportName}`,\n ` actions: ${actionsModule.name}.${actionsModule.exportName}`,\n ` tables: ${tablesModule.name}.${tablesModule.exportName}`,\n ` workflows: ${workflowsModule.name}.${workflowsModule.exportName}`,\n '}',\n ].join('\\n')\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,aAAwB;AACxB,iCAAyC;AACzC,sCAAuC;AACvC,oBAA6D;AAC7D,cAAyB;AACzB,4BAA8B;AAC9B,kCAA2C;AAC3C,2BAA6B;AAC7B,2BAA6B;AAC7B,2BAA6B;AAC7B,8BAAgC;AAEhC,MAAM,iCAAiC,iCAAmB;AAAA,EACjD,YAAY,QAA8B;AAC/C,UAAM;AAAA,MACJ,YAAY;AAAA,IACd,CAAC;AAED,eAAW,CAAC,OAAO,WAAW,KAAK,OAAO,QAAQ,OAAO,gBAAgB,CAAC,CAAC,GAAG;AAC5E,YAAM,oBAAoB,IAAI,oDAAyB,YAAY,UAAU;AAC7E,wBAAkB,QAAQ,QAAQ,QAAQ,KAAK,CAAC;AAChD,WAAK,QAAQ,iBAAiB;AAAA,IAChC;AAAA,EACF;AACF;AAEA,MAAM,+BAA+B,iCAAmB;AAAA,EAC/C,YAAY,QAA8B;AAC/C,UAAM;AAAA,MACJ,YAAY;AAAA,IACd,CAAC;AAED,eAAW,CAAC,OAAO,QAAQ,KAAK,OAAO,QAAQ,OAAO,cAAc,CAAC,CAAC,GAAG;AACv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AY,kBAAkB;AAAA,MACpE,eAAe,iBAAiB,IAAI,YAAY,gBAAgB;AAAA,MAChE,eAAe,oBAAoB,IAAI,YAAY,mBAAmB;AAAA,MACtE,eAAe,aAAa,IAAI,YAAY,YAAY;AAAA,MACxD,eAAe,aAAa,IAAI,YAAY,YAAY;AAAA,MACxD,eAAe,cAAc,IAAI,YAAY,cAAc,IAAI;AAAA,MAC/D,eAAe,aAAa,IAAI,YAAY,YAAY;AAAA,MACxD,eAAe,gBAAgB,IAAI,YAAY,gBAAgB,IAAI;AAAA,MACnE;AAAA,MACA;AAAA,MACA,YAAY,KAAK,QAAQ,IAAI;AAAA,MAC7B,eAAe,KAAK,QAAQ,OAAO;AAAA,MACnC,mBAAmB,mBAAmB,IAAI,IAAI,mBAAmB,UAAU;AAAA,MAC3E,iBAAiB,iBAAiB,IAAI,IAAI,iBAAiB,UAAU;AAAA,MACrE,oBAAoB,oBAAoB,IAAI,IAAI,oBAAoB,UAAU;AAAA,MAC9E,aAAa,aAAa,IAAI,IAAI,aAAa,UAAU;AAAA,MACzD,aAAa,aAAa,IAAI,IAAI,aAAa,UAAU;AAAA,MACzD,cAAc,cAAc,IAAI,IAAI,cAAc,UAAU;AAAA,MAC5D,aAAa,aAAa,IAAI,IAAI,aAAa,UAAU;AAAA,MACzD,gBAAgB,gBAAgB,IAAI,IAAI,gBAAgB,UAAU;AAAA,MAClE;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,3 +2,4 @@ export declare const typeName: (name: string) => string;
|
|
|
2
2
|
export declare const importAlias: (name: string) => string;
|
|
3
3
|
export declare const varName: (name: string) => string;
|
|
4
4
|
export declare const fileName: (name: string) => string;
|
|
5
|
+
export declare const dirName: (name: string) => string;
|
|
@@ -28,6 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var strings_exports = {};
|
|
30
30
|
__export(strings_exports, {
|
|
31
|
+
dirName: () => dirName,
|
|
31
32
|
fileName: () => fileName,
|
|
32
33
|
importAlias: () => importAlias,
|
|
33
34
|
typeName: () => typeName,
|
|
@@ -110,8 +111,10 @@ const typeName = (name) => apply(name, utils.casing.to.pascalCase);
|
|
|
110
111
|
const importAlias = (name) => apply(name, utils.casing.to.camelCase, escapeTypescriptReserved);
|
|
111
112
|
const varName = (name) => apply(name, utils.casing.to.camelCase, escapeTypescriptReserved);
|
|
112
113
|
const fileName = (name) => apply(name, escapeFileNameSpecialChars);
|
|
114
|
+
const dirName = fileName;
|
|
113
115
|
// Annotate the CommonJS export names for ESM import in node:
|
|
114
116
|
0 && (module.exports = {
|
|
117
|
+
dirName,
|
|
115
118
|
fileName,
|
|
116
119
|
importAlias,
|
|
117
120
|
typeName,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/code-generation/strings.ts"],
|
|
4
|
-
"sourcesContent": ["import * as utils from '../utils'\ntype StrTransform = (str: string) => string\n\nconst TYPESCRIPT_RESERVED_TOKENS = new Set([\n 'break',\n 'as',\n 'any',\n 'case',\n 'implements',\n 'boolean',\n 'catch',\n 'interface',\n 'constructor',\n 'class',\n 'let',\n 'declare',\n 'const',\n 'package',\n 'get',\n 'continue',\n 'private',\n 'module',\n 'debugger',\n 'protected',\n 'require',\n 'default',\n 'public',\n 'number',\n 'delete',\n 'static',\n 'set',\n 'do',\n 'yield',\n 'string',\n 'else',\n 'symbol',\n 'enum',\n 'type',\n 'export',\n 'from',\n 'extends',\n 'of',\n 'false',\n 'finally',\n 'for',\n 'function',\n 'if',\n 'import',\n 'in',\n 'instanceof',\n 'new',\n 'null',\n 'return',\n 'super',\n 'switch',\n 'this',\n 'throw',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'while',\n 'with',\n])\n\nconst SPECIAL_FILE_NAME_CHARS = /[^a-zA-Z0-9_\\-\\.]/g\n\nconst escapeTypescriptReserved = (str: string): string => {\n if (TYPESCRIPT_RESERVED_TOKENS.has(str)) {\n return `_${str}`\n }\n return str\n}\n\nconst escapeFileNameSpecialChars = (str: string): string => str.replace(SPECIAL_FILE_NAME_CHARS, '-')\n\nconst apply = (str: string, ...transforms: StrTransform[]) => transforms.reduce((acc, transform) => transform(acc), str)\n\nexport const typeName = (name: string) => apply(name, utils.casing.to.pascalCase)\nexport const importAlias = (name: string) => apply(name, utils.casing.to.camelCase, escapeTypescriptReserved)\nexport const varName = (name: string) => apply(name, utils.casing.to.camelCase, escapeTypescriptReserved)\nexport const fileName = (name: string) => apply(name, escapeFileNameSpecialChars)\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AAGvB,MAAM,6BAA6B,oBAAI,IAAI;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,MAAM,0BAA0B;AAEhC,MAAM,2BAA2B,CAAC,QAAwB;AACxD,MAAI,2BAA2B,IAAI,GAAG,GAAG;AACvC,WAAO,IAAI,GAAG;AAAA,EAChB;AACA,SAAO;AACT;AAEA,MAAM,6BAA6B,CAAC,QAAwB,IAAI,QAAQ,yBAAyB,GAAG;AAEpG,MAAM,QAAQ,CAAC,QAAgB,eAA+B,WAAW,OAAO,CAAC,KAAK,cAAc,UAAU,GAAG,GAAG,GAAG;AAEhH,MAAM,WAAW,CAAC,SAAiB,MAAM,MAAM,MAAM,OAAO,GAAG,UAAU;AACzE,MAAM,cAAc,CAAC,SAAiB,MAAM,MAAM,MAAM,OAAO,GAAG,WAAW,wBAAwB;AACrG,MAAM,UAAU,CAAC,SAAiB,MAAM,MAAM,MAAM,OAAO,GAAG,WAAW,wBAAwB;AACjG,MAAM,WAAW,CAAC,SAAiB,MAAM,MAAM,0BAA0B;",
|
|
4
|
+
"sourcesContent": ["import * as utils from '../utils'\ntype StrTransform = (str: string) => string\n\nconst TYPESCRIPT_RESERVED_TOKENS = new Set([\n 'break',\n 'as',\n 'any',\n 'case',\n 'implements',\n 'boolean',\n 'catch',\n 'interface',\n 'constructor',\n 'class',\n 'let',\n 'declare',\n 'const',\n 'package',\n 'get',\n 'continue',\n 'private',\n 'module',\n 'debugger',\n 'protected',\n 'require',\n 'default',\n 'public',\n 'number',\n 'delete',\n 'static',\n 'set',\n 'do',\n 'yield',\n 'string',\n 'else',\n 'symbol',\n 'enum',\n 'type',\n 'export',\n 'from',\n 'extends',\n 'of',\n 'false',\n 'finally',\n 'for',\n 'function',\n 'if',\n 'import',\n 'in',\n 'instanceof',\n 'new',\n 'null',\n 'return',\n 'super',\n 'switch',\n 'this',\n 'throw',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'while',\n 'with',\n])\n\nconst SPECIAL_FILE_NAME_CHARS = /[^a-zA-Z0-9_\\-\\.]/g\n\nconst escapeTypescriptReserved = (str: string): string => {\n if (TYPESCRIPT_RESERVED_TOKENS.has(str)) {\n return `_${str}`\n }\n return str\n}\n\nconst escapeFileNameSpecialChars = (str: string): string => str.replace(SPECIAL_FILE_NAME_CHARS, '-')\n\nconst apply = (str: string, ...transforms: StrTransform[]) => transforms.reduce((acc, transform) => transform(acc), str)\n\nexport const typeName = (name: string) => apply(name, utils.casing.to.pascalCase)\nexport const importAlias = (name: string) => apply(name, utils.casing.to.camelCase, escapeTypescriptReserved)\nexport const varName = (name: string) => apply(name, utils.casing.to.camelCase, escapeTypescriptReserved)\nexport const fileName = (name: string) => apply(name, escapeFileNameSpecialChars)\nexport const dirName = fileName\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AAGvB,MAAM,6BAA6B,oBAAI,IAAI;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,MAAM,0BAA0B;AAEhC,MAAM,2BAA2B,CAAC,QAAwB;AACxD,MAAI,2BAA2B,IAAI,GAAG,GAAG;AACvC,WAAO,IAAI,GAAG;AAAA,EAChB;AACA,SAAO;AACT;AAEA,MAAM,6BAA6B,CAAC,QAAwB,IAAI,QAAQ,yBAAyB,GAAG;AAEpG,MAAM,QAAQ,CAAC,QAAgB,eAA+B,WAAW,OAAO,CAAC,KAAK,cAAc,UAAU,GAAG,GAAG,GAAG;AAEhH,MAAM,WAAW,CAAC,SAAiB,MAAM,MAAM,MAAM,OAAO,GAAG,UAAU;AACzE,MAAM,cAAc,CAAC,SAAiB,MAAM,MAAM,MAAM,OAAO,GAAG,WAAW,wBAAwB;AACrG,MAAM,UAAU,CAAC,SAAiB,MAAM,MAAM,MAAM,OAAO,GAAG,WAAW,wBAAwB;AACjG,MAAM,WAAW,CAAC,SAAiB,MAAM,MAAM,0BAA0B;AACzE,MAAM,UAAU;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botpress/cli",
|
|
3
|
-
"version": "4.27.
|
|
3
|
+
"version": "4.27.2",
|
|
4
4
|
"description": "Botpress CLI",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "pnpm run build:types && pnpm run bundle && pnpm run template:gen",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@apidevtools/json-schema-ref-parser": "^11.7.0",
|
|
28
28
|
"@botpress/chat": "0.5.4",
|
|
29
29
|
"@botpress/client": "1.27.2",
|
|
30
|
-
"@botpress/sdk": "4.20.
|
|
30
|
+
"@botpress/sdk": "4.20.2",
|
|
31
31
|
"@bpinternal/const": "^0.1.0",
|
|
32
32
|
"@bpinternal/tunnel": "^0.1.1",
|
|
33
33
|
"@bpinternal/verel": "^0.2.0",
|