@botpress/cli 0.9.6 ā 0.11.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.
- package/.turbo/turbo-build.log +8 -8
- package/dist/code-generation/integration-implementation.js +17 -17
- package/dist/code-generation/integration-implementation.js.map +2 -2
- package/dist/code-generation/integration-instance.js +18 -18
- package/dist/code-generation/integration-instance.js.map +2 -2
- package/dist/code-generation/integration-schemas/channels-module.js +6 -6
- package/dist/code-generation/integration-schemas/channels-module.js.map +2 -2
- package/dist/command-definitions.js +2 -1
- package/dist/command-definitions.js.map +2 -2
- package/dist/command-implementations/index.js +3 -1
- package/dist/command-implementations/index.js.map +2 -2
- package/dist/command-implementations/lint-command.js +59 -0
- package/dist/command-implementations/lint-command.js.map +7 -0
- package/dist/config.js +5 -1
- package/dist/config.js.map +2 -2
- package/dist/errors.js.map +2 -2
- package/dist/integration-ref.test.js +2 -3
- package/dist/integration-ref.test.js.map +2 -2
- package/dist/linter/integration-linter.js +73 -0
- package/dist/linter/integration-linter.js.map +7 -0
- package/dist/linter/integration-linter.test.js +180 -0
- package/dist/linter/integration-linter.test.js.map +7 -0
- package/dist/linter/rulesets/integration.ruleset.js +354 -0
- package/dist/linter/rulesets/integration.ruleset.js.map +7 -0
- package/dist/linter/rulesets/integration.ruleset.test.js +825 -0
- package/dist/linter/rulesets/integration.ruleset.test.js.map +7 -0
- package/dist/linter/spectral-functions.js +36 -0
- package/dist/linter/spectral-functions.js.map +7 -0
- package/dist/logger/base-logger.js.map +2 -2
- package/dist/logger/index.js.map +2 -2
- package/dist/utils/cache-utils.js.map +2 -2
- package/dist/utils/event-emitter.js +6 -6
- package/dist/utils/event-emitter.js.map +2 -2
- package/dist/utils/file-watcher.js +7 -7
- package/dist/utils/file-watcher.js.map +2 -2
- package/dist/utils/prompt-utils.js.map +2 -2
- package/dist/utils/tunnel-utils.js.map +2 -2
- package/e2e/index.ts +1 -1
- package/package.json +5 -2
- package/templates/echo-bot/package.json +1 -1
- package/templates/empty-integration/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,20 +1,20 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/cli@0.
|
|
2
|
+
> @botpress/cli@0.11.0 build /home/runner/work/botpress/botpress/packages/cli
|
|
3
3
|
> pnpm run bundle && pnpm run template:gen
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @botpress/cli@0.
|
|
6
|
+
> @botpress/cli@0.11.0 bundle /home/runner/work/botpress/botpress/packages/cli
|
|
7
7
|
> ts-node -T build.ts
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
> @botpress/cli@0.
|
|
10
|
+
> @botpress/cli@0.11.0 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 v0.
|
|
14
|
-
š¤ Botpress CLI v0.
|
|
15
|
-
š¤ Botpress CLI v0.
|
|
16
|
-
š¤ Botpress CLI v0.
|
|
13
|
+
š¤ Botpress CLI v0.11.0
|
|
14
|
+
š¤ Botpress CLI v0.11.0
|
|
15
|
+
š¤ Botpress CLI v0.11.0
|
|
16
|
+
š¤ Botpress CLI v0.11.0
|
|
17
17
|
ā No typings to generate for bot projects
|
|
18
|
-
[2K[1Gā Generating typings for integration
|
|
18
|
+
[2K[1Gā Generating typings for integration webhook-message...[2K[1Gā Generating typings for integration hello-world...[2K[1Gā Generating typings for integration empty-integration...[2K[1Gā Typings available at .botpress
|
|
19
19
|
[2K[1Gā Typings available at .botpress
|
|
20
20
|
[2K[1Gā Typings available at .botpress
|
|
@@ -32,16 +32,16 @@ var import_events_module = require("./integration-schemas/events-module");
|
|
|
32
32
|
var import_states_module = require("./integration-schemas/states-module");
|
|
33
33
|
var import_module = require("./module");
|
|
34
34
|
class IntegrationImplementationIndexModule extends import_module.Module {
|
|
35
|
-
constructor(
|
|
35
|
+
constructor(_integration, _defaultConfigModule, _configurationsModule, _actionsModule, _channelsModule, _eventsModule, _statesModule, _entitiesModule, def) {
|
|
36
36
|
super(def);
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
this.
|
|
43
|
-
this.
|
|
44
|
-
this.
|
|
37
|
+
this._integration = _integration;
|
|
38
|
+
this._defaultConfigModule = _defaultConfigModule;
|
|
39
|
+
this._configurationsModule = _configurationsModule;
|
|
40
|
+
this._actionsModule = _actionsModule;
|
|
41
|
+
this._channelsModule = _channelsModule;
|
|
42
|
+
this._eventsModule = _eventsModule;
|
|
43
|
+
this._statesModule = _statesModule;
|
|
44
|
+
this._entitiesModule = _entitiesModule;
|
|
45
45
|
}
|
|
46
46
|
static async create(integration) {
|
|
47
47
|
const defaultConfigModule = await import_configuration_module.DefaultConfigurationModule.create(integration.configuration ?? { schema: {} });
|
|
@@ -85,14 +85,14 @@ class IntegrationImplementationIndexModule extends import_module.Module {
|
|
|
85
85
|
get content() {
|
|
86
86
|
let content = import_const.GENERATED_HEADER;
|
|
87
87
|
const {
|
|
88
|
-
defaultConfigModule,
|
|
89
|
-
configurationsModule,
|
|
90
|
-
actionsModule,
|
|
91
|
-
channelsModule,
|
|
92
|
-
eventsModule,
|
|
93
|
-
statesModule,
|
|
94
|
-
entitiesModule,
|
|
95
|
-
integration
|
|
88
|
+
_defaultConfigModule: defaultConfigModule,
|
|
89
|
+
_configurationsModule: configurationsModule,
|
|
90
|
+
_actionsModule: actionsModule,
|
|
91
|
+
_channelsModule: channelsModule,
|
|
92
|
+
_eventsModule: eventsModule,
|
|
93
|
+
_statesModule: statesModule,
|
|
94
|
+
_entitiesModule: entitiesModule,
|
|
95
|
+
_integration: integration
|
|
96
96
|
} = this;
|
|
97
97
|
const defaultConfigImport = defaultConfigModule.import(this);
|
|
98
98
|
const configurationsImport = configurationsModule.import(this);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/code-generation/integration-implementation.ts"],
|
|
4
|
-
"sourcesContent": ["import { GENERATED_HEADER, INDEX_FILE } from './const'\nimport { stringifySingleLine } from './generators'\nimport { ActionsModule } from './integration-schemas/actions-module'\nimport { ChannelsModule } from './integration-schemas/channels-module'\nimport { DefaultConfigurationModule } from './integration-schemas/configuration-module'\nimport { ConfigurationsModule } from './integration-schemas/configurations-module'\nimport { EntitiesModule } from './integration-schemas/entities-module'\nimport { EventsModule } from './integration-schemas/events-module'\nimport { StatesModule } from './integration-schemas/states-module'\nimport { Module, ModuleDef } from './module'\nimport * as types from './typings'\n\nexport class IntegrationImplementationIndexModule extends Module {\n public static async create(integration: types.IntegrationDefinition): Promise<IntegrationImplementationIndexModule> {\n const defaultConfigModule = await DefaultConfigurationModule.create(integration.configuration ?? { schema: {} })\n defaultConfigModule.unshift('configuration')\n\n const configurationsModule = await ConfigurationsModule.create(integration.configurations ?? {})\n configurationsModule.unshift('configurations')\n\n const actionsModule = await ActionsModule.create(integration.actions ?? {})\n actionsModule.unshift('actions')\n\n const channelsModule = await ChannelsModule.create(integration.channels ?? {})\n channelsModule.unshift('channels')\n\n const eventsModule = await EventsModule.create(integration.events ?? {})\n eventsModule.unshift('events')\n\n const statesModule = await StatesModule.create(integration.states ?? {})\n statesModule.unshift('states')\n\n const entitiesModule = await EntitiesModule.create(integration.entities ?? {})\n entitiesModule.unshift('entities')\n\n const inst = new IntegrationImplementationIndexModule(\n integration,\n defaultConfigModule,\n configurationsModule,\n actionsModule,\n channelsModule,\n eventsModule,\n statesModule,\n entitiesModule,\n {\n path: INDEX_FILE,\n exportName: 'Integration',\n content: '',\n }\n )\n\n inst.pushDep(defaultConfigModule)\n inst.pushDep(configurationsModule)\n inst.pushDep(actionsModule)\n inst.pushDep(channelsModule)\n inst.pushDep(eventsModule)\n inst.pushDep(statesModule)\n inst.pushDep(entitiesModule)\n return inst\n }\n\n private constructor(\n private
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA6C;AAC7C,wBAAoC;AACpC,4BAA8B;AAC9B,6BAA+B;AAC/B,kCAA2C;AAC3C,mCAAqC;AACrC,6BAA+B;AAC/B,2BAA6B;AAC7B,2BAA6B;AAC7B,oBAAkC;AAG3B,MAAM,6CAA6C,qBAAO;AAAA,EAiDvD,YACE,
|
|
4
|
+
"sourcesContent": ["import { GENERATED_HEADER, INDEX_FILE } from './const'\nimport { stringifySingleLine } from './generators'\nimport { ActionsModule } from './integration-schemas/actions-module'\nimport { ChannelsModule } from './integration-schemas/channels-module'\nimport { DefaultConfigurationModule } from './integration-schemas/configuration-module'\nimport { ConfigurationsModule } from './integration-schemas/configurations-module'\nimport { EntitiesModule } from './integration-schemas/entities-module'\nimport { EventsModule } from './integration-schemas/events-module'\nimport { StatesModule } from './integration-schemas/states-module'\nimport { Module, ModuleDef } from './module'\nimport * as types from './typings'\n\nexport class IntegrationImplementationIndexModule extends Module {\n public static async create(integration: types.IntegrationDefinition): Promise<IntegrationImplementationIndexModule> {\n const defaultConfigModule = await DefaultConfigurationModule.create(integration.configuration ?? { schema: {} })\n defaultConfigModule.unshift('configuration')\n\n const configurationsModule = await ConfigurationsModule.create(integration.configurations ?? {})\n configurationsModule.unshift('configurations')\n\n const actionsModule = await ActionsModule.create(integration.actions ?? {})\n actionsModule.unshift('actions')\n\n const channelsModule = await ChannelsModule.create(integration.channels ?? {})\n channelsModule.unshift('channels')\n\n const eventsModule = await EventsModule.create(integration.events ?? {})\n eventsModule.unshift('events')\n\n const statesModule = await StatesModule.create(integration.states ?? {})\n statesModule.unshift('states')\n\n const entitiesModule = await EntitiesModule.create(integration.entities ?? {})\n entitiesModule.unshift('entities')\n\n const inst = new IntegrationImplementationIndexModule(\n integration,\n defaultConfigModule,\n configurationsModule,\n actionsModule,\n channelsModule,\n eventsModule,\n statesModule,\n entitiesModule,\n {\n path: INDEX_FILE,\n exportName: 'Integration',\n content: '',\n }\n )\n\n inst.pushDep(defaultConfigModule)\n inst.pushDep(configurationsModule)\n inst.pushDep(actionsModule)\n inst.pushDep(channelsModule)\n inst.pushDep(eventsModule)\n inst.pushDep(statesModule)\n inst.pushDep(entitiesModule)\n return inst\n }\n\n private constructor(\n private _integration: types.IntegrationDefinition,\n private _defaultConfigModule: DefaultConfigurationModule,\n private _configurationsModule: ConfigurationsModule,\n private _actionsModule: ActionsModule,\n private _channelsModule: ChannelsModule,\n private _eventsModule: EventsModule,\n private _statesModule: StatesModule,\n private _entitiesModule: EntitiesModule,\n def: ModuleDef\n ) {\n super(def)\n }\n\n public override get content(): string {\n let content = GENERATED_HEADER\n\n const {\n _defaultConfigModule: defaultConfigModule,\n _configurationsModule: configurationsModule,\n _actionsModule: actionsModule,\n _channelsModule: channelsModule,\n _eventsModule: eventsModule,\n _statesModule: statesModule,\n _entitiesModule: entitiesModule,\n _integration: integration,\n } = this\n\n const defaultConfigImport = defaultConfigModule.import(this)\n const configurationsImport = configurationsModule.import(this)\n const actionsImport = actionsModule.import(this)\n const channelsImport = channelsModule.import(this)\n const eventsImport = eventsModule.import(this)\n const statesImport = statesModule.import(this)\n const entitiesImport = entitiesModule.import(this)\n\n content += [\n GENERATED_HEADER,\n 'import * as sdk from \"@botpress/sdk\"',\n '',\n `import type * as ${defaultConfigModule.name} from \"./${defaultConfigImport}\"`,\n `import type * as ${configurationsModule.name} from \"./${configurationsImport}\"`,\n `import type * as ${actionsModule.name} from \"./${actionsImport}\"`,\n `import type * as ${channelsModule.name} from \"./${channelsImport}\"`,\n `import type * as ${eventsModule.name} from \"./${eventsImport}\"`,\n `import type * as ${statesModule.name} from \"./${statesImport}\"`,\n `import type * as ${entitiesModule.name} from \"./${entitiesImport}\"`,\n `export * as ${defaultConfigModule.name} from \"./${defaultConfigImport}\"`,\n `export * as ${configurationsModule.name} from \"./${configurationsImport}\"`,\n `export * as ${actionsModule.name} from \"./${actionsImport}\"`,\n `export * as ${channelsModule.name} from \"./${channelsImport}\"`,\n `export * as ${eventsModule.name} from \"./${eventsImport}\"`,\n `export * as ${statesModule.name} from \"./${statesImport}\"`,\n `export * as ${entitiesModule.name} from \"./${entitiesImport}\"`,\n '',\n '// type utils',\n 'type Cast<X, Y> = X extends Y ? X : Y',\n 'type ValueOf<T> = T[keyof T]',\n 'type AsyncFunction = (...args: any[]) => Promise<any>',\n '',\n 'type TIntegration = {',\n ` name: \"${integration.name}\"`,\n ` version: \"${integration.version}\"`,\n ` configuration: ${defaultConfigModule.name}.${defaultConfigModule.exports}`,\n ` configurations: ${configurationsModule.name}.${configurationsModule.exports}`,\n ` actions: ${actionsModule.name}.${actionsModule.exports}`,\n ` channels: ${channelsModule.name}.${channelsModule.exports}`,\n ` events: ${eventsModule.name}.${eventsModule.exports}`,\n ` states: ${statesModule.name}.${statesModule.exports}`,\n ` user: ${stringifySingleLine(integration.user)}`,\n ` entities: ${entitiesModule.name}.${entitiesModule.exports}`,\n '}',\n '',\n 'export type IntegrationProps = sdk.IntegrationProps<TIntegration>',\n '',\n 'export class Integration extends sdk.Integration<TIntegration> {}',\n '',\n 'export type Client = sdk.IntegrationSpecificClient<TIntegration>',\n '',\n '// extra types',\n '',\n \"export type HandlerProps = Parameters<IntegrationProps['handler']>[0]\",\n '',\n 'export type ActionProps = {',\n \" [K in keyof IntegrationProps['actions']]: Parameters<IntegrationProps['actions'][K]>[0]\",\n '}',\n 'export type AnyActionProps = ValueOf<ActionProps>',\n '',\n 'export type MessageProps = {',\n \" [TChannel in keyof IntegrationProps['channels']]: {\",\n \" [TMessage in keyof IntegrationProps['channels'][TChannel]['messages']]: Parameters<\",\n \" IntegrationProps['channels'][TChannel]['messages'][TMessage]\",\n ' >[0]',\n ' }',\n '}',\n 'export type AnyMessageProps = ValueOf<ValueOf<MessageProps>>',\n '',\n \"export type Context = HandlerProps['ctx']\",\n \"export type Logger = HandlerProps['logger']\",\n '',\n 'export type AckFunctions = {',\n ' [TChannel in keyof MessageProps]: {',\n \" [TMessage in keyof MessageProps[TChannel]]: Cast<MessageProps[TChannel][TMessage], AnyMessageProps>['ack']\",\n ' }',\n '}',\n 'export type AnyAckFunction = ValueOf<ValueOf<AckFunctions>>',\n '',\n 'export type ClientOperation = ValueOf<{',\n ' [K in keyof Client as Client[K] extends AsyncFunction ? K : never]: K',\n '}>',\n 'export type ClientRequests = {',\n ' [K in ClientOperation]: Parameters<Client[K]>[0]',\n '}',\n 'export type ClientResponses = {',\n ' [K in ClientOperation]: Awaited<ReturnType<Client[K]>>',\n '}',\n ].join('\\n')\n\n return content\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA6C;AAC7C,wBAAoC;AACpC,4BAA8B;AAC9B,6BAA+B;AAC/B,kCAA2C;AAC3C,mCAAqC;AACrC,6BAA+B;AAC/B,2BAA6B;AAC7B,2BAA6B;AAC7B,oBAAkC;AAG3B,MAAM,6CAA6C,qBAAO;AAAA,EAiDvD,YACE,cACA,sBACA,uBACA,gBACA,iBACA,eACA,eACA,iBACR,KACA;AACA,UAAM,GAAG;AAVD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,EAIV;AAAA,EA5DA,aAAoB,OAAO,aAAyF;AAClH,UAAM,sBAAsB,MAAM,uDAA2B,OAAO,YAAY,iBAAiB,EAAE,QAAQ,CAAC,EAAE,CAAC;AAC/G,wBAAoB,QAAQ,eAAe;AAE3C,UAAM,uBAAuB,MAAM,kDAAqB,OAAO,YAAY,kBAAkB,CAAC,CAAC;AAC/F,yBAAqB,QAAQ,gBAAgB;AAE7C,UAAM,gBAAgB,MAAM,oCAAc,OAAO,YAAY,WAAW,CAAC,CAAC;AAC1E,kBAAc,QAAQ,SAAS;AAE/B,UAAM,iBAAiB,MAAM,sCAAe,OAAO,YAAY,YAAY,CAAC,CAAC;AAC7E,mBAAe,QAAQ,UAAU;AAEj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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;AAEX,WAAO;AAAA,EACT;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -33,16 +33,16 @@ var import_events_module = require("./integration-schemas/events-module");
|
|
|
33
33
|
var import_states_module = require("./integration-schemas/states-module");
|
|
34
34
|
var import_module = require("./module");
|
|
35
35
|
class IntegrationInstanceIndexModule extends import_module.Module {
|
|
36
|
-
constructor(
|
|
36
|
+
constructor(_integration, _defaultConfigModule, _configurationsModule, _actionsModule, _channelsModule, _eventsModule, _statesModule, _entitiesModule, def) {
|
|
37
37
|
super(def);
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
this.
|
|
43
|
-
this.
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
38
|
+
this._integration = _integration;
|
|
39
|
+
this._defaultConfigModule = _defaultConfigModule;
|
|
40
|
+
this._configurationsModule = _configurationsModule;
|
|
41
|
+
this._actionsModule = _actionsModule;
|
|
42
|
+
this._channelsModule = _channelsModule;
|
|
43
|
+
this._eventsModule = _eventsModule;
|
|
44
|
+
this._statesModule = _statesModule;
|
|
45
|
+
this._entitiesModule = _entitiesModule;
|
|
46
46
|
}
|
|
47
47
|
static async create(integration) {
|
|
48
48
|
const { name } = integration;
|
|
@@ -87,14 +87,14 @@ class IntegrationInstanceIndexModule extends import_module.Module {
|
|
|
87
87
|
}
|
|
88
88
|
get content() {
|
|
89
89
|
const {
|
|
90
|
-
defaultConfigModule,
|
|
91
|
-
configurationsModule,
|
|
92
|
-
actionsModule,
|
|
93
|
-
channelsModule,
|
|
94
|
-
eventsModule,
|
|
95
|
-
statesModule,
|
|
96
|
-
entitiesModule,
|
|
97
|
-
integration
|
|
90
|
+
_defaultConfigModule: defaultConfigModule,
|
|
91
|
+
_configurationsModule: configurationsModule,
|
|
92
|
+
_actionsModule: actionsModule,
|
|
93
|
+
_channelsModule: channelsModule,
|
|
94
|
+
_eventsModule: eventsModule,
|
|
95
|
+
_statesModule: statesModule,
|
|
96
|
+
_entitiesModule: entitiesModule,
|
|
97
|
+
_integration: integration
|
|
98
98
|
} = this;
|
|
99
99
|
const defaultConfigImport = defaultConfigModule.import(this);
|
|
100
100
|
const configurationsImport = configurationsModule.import(this);
|
|
@@ -153,7 +153,7 @@ class IntegrationInstanceIndexModule extends import_module.Module {
|
|
|
153
153
|
` channels: ${channelsModule.name}.${channelsModule.exports}`,
|
|
154
154
|
` events: ${eventsModule.name}.${eventsModule.exports}`,
|
|
155
155
|
` states: ${statesModule.name}.${statesModule.exports}`,
|
|
156
|
-
` user: ${(0, import_generators.stringifySingleLine)(this.
|
|
156
|
+
` user: ${(0, import_generators.stringifySingleLine)(this._integration.user)}`,
|
|
157
157
|
` entities: ${entitiesModule.name}.${entitiesModule.exports}`,
|
|
158
158
|
"}",
|
|
159
159
|
"",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/code-generation/integration-instance.ts"],
|
|
4
|
-
"sourcesContent": ["import { casing } from '../utils'\nimport { GENERATED_HEADER, INDEX_FILE } from './const'\nimport { stringifySingleLine } from './generators'\nimport { ActionsModule } from './integration-schemas/actions-module'\nimport { ChannelsModule } from './integration-schemas/channels-module'\nimport { DefaultConfigurationModule } from './integration-schemas/configuration-module'\nimport { ConfigurationsModule } from './integration-schemas/configurations-module'\nimport { EntitiesModule } from './integration-schemas/entities-module'\nimport { EventsModule } from './integration-schemas/events-module'\nimport { StatesModule } from './integration-schemas/states-module'\nimport { Module, ModuleDef } from './module'\nimport * as types from './typings'\n\nexport class IntegrationInstanceIndexModule extends Module {\n public static async create(integration: types.IntegrationDefinition): Promise<IntegrationInstanceIndexModule> {\n const { name } = integration\n\n const defaultConfigModule = await DefaultConfigurationModule.create(integration.configuration ?? { schema: {} })\n defaultConfigModule.unshift('configuration')\n\n const configurationsModule = await ConfigurationsModule.create(integration.configurations ?? {})\n configurationsModule.unshift('configurations')\n\n const actionsModule = await ActionsModule.create(integration.actions ?? {})\n actionsModule.unshift('actions')\n\n const channelsModule = await ChannelsModule.create(integration.channels ?? {})\n channelsModule.unshift('channels')\n\n const eventsModule = await EventsModule.create(integration.events ?? {})\n eventsModule.unshift('events')\n\n const statesModule = await StatesModule.create(integration.states ?? {})\n statesModule.unshift('states')\n\n const entitiesModule = await EntitiesModule.create(integration.entities ?? {})\n entitiesModule.unshift('entities')\n\n const exportName = casing.to.pascalCase(name)\n\n const inst = new IntegrationInstanceIndexModule(\n integration,\n defaultConfigModule,\n configurationsModule,\n actionsModule,\n channelsModule,\n eventsModule,\n statesModule,\n entitiesModule,\n {\n path: INDEX_FILE,\n content: '',\n exportName,\n }\n )\n\n inst.pushDep(defaultConfigModule)\n inst.pushDep(configurationsModule)\n inst.pushDep(actionsModule)\n inst.pushDep(channelsModule)\n inst.pushDep(eventsModule)\n inst.pushDep(statesModule)\n inst.pushDep(entitiesModule)\n\n return inst\n }\n\n private constructor(\n private
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAuB;AACvB,mBAA6C;AAC7C,wBAAoC;AACpC,4BAA8B;AAC9B,6BAA+B;AAC/B,kCAA2C;AAC3C,mCAAqC;AACrC,6BAA+B;AAC/B,2BAA6B;AAC7B,2BAA6B;AAC7B,oBAAkC;AAG3B,MAAM,uCAAuC,qBAAO;AAAA,EAsDjD,YACE,
|
|
4
|
+
"sourcesContent": ["import { casing } from '../utils'\nimport { GENERATED_HEADER, INDEX_FILE } from './const'\nimport { stringifySingleLine } from './generators'\nimport { ActionsModule } from './integration-schemas/actions-module'\nimport { ChannelsModule } from './integration-schemas/channels-module'\nimport { DefaultConfigurationModule } from './integration-schemas/configuration-module'\nimport { ConfigurationsModule } from './integration-schemas/configurations-module'\nimport { EntitiesModule } from './integration-schemas/entities-module'\nimport { EventsModule } from './integration-schemas/events-module'\nimport { StatesModule } from './integration-schemas/states-module'\nimport { Module, ModuleDef } from './module'\nimport * as types from './typings'\n\nexport class IntegrationInstanceIndexModule extends Module {\n public static async create(integration: types.IntegrationDefinition): Promise<IntegrationInstanceIndexModule> {\n const { name } = integration\n\n const defaultConfigModule = await DefaultConfigurationModule.create(integration.configuration ?? { schema: {} })\n defaultConfigModule.unshift('configuration')\n\n const configurationsModule = await ConfigurationsModule.create(integration.configurations ?? {})\n configurationsModule.unshift('configurations')\n\n const actionsModule = await ActionsModule.create(integration.actions ?? {})\n actionsModule.unshift('actions')\n\n const channelsModule = await ChannelsModule.create(integration.channels ?? {})\n channelsModule.unshift('channels')\n\n const eventsModule = await EventsModule.create(integration.events ?? {})\n eventsModule.unshift('events')\n\n const statesModule = await StatesModule.create(integration.states ?? {})\n statesModule.unshift('states')\n\n const entitiesModule = await EntitiesModule.create(integration.entities ?? {})\n entitiesModule.unshift('entities')\n\n const exportName = casing.to.pascalCase(name)\n\n const inst = new IntegrationInstanceIndexModule(\n integration,\n defaultConfigModule,\n configurationsModule,\n actionsModule,\n channelsModule,\n eventsModule,\n statesModule,\n entitiesModule,\n {\n path: INDEX_FILE,\n content: '',\n exportName,\n }\n )\n\n inst.pushDep(defaultConfigModule)\n inst.pushDep(configurationsModule)\n inst.pushDep(actionsModule)\n inst.pushDep(channelsModule)\n inst.pushDep(eventsModule)\n inst.pushDep(statesModule)\n inst.pushDep(entitiesModule)\n\n return inst\n }\n\n private constructor(\n private _integration: types.IntegrationDefinition,\n private _defaultConfigModule: DefaultConfigurationModule,\n private _configurationsModule: ConfigurationsModule,\n private _actionsModule: ActionsModule,\n private _channelsModule: ChannelsModule,\n private _eventsModule: EventsModule,\n private _statesModule: StatesModule,\n private _entitiesModule: EntitiesModule,\n def: ModuleDef\n ) {\n super(def)\n }\n\n public override get content(): string {\n const {\n _defaultConfigModule: defaultConfigModule,\n _configurationsModule: configurationsModule,\n _actionsModule: actionsModule,\n _channelsModule: channelsModule,\n _eventsModule: eventsModule,\n _statesModule: statesModule,\n _entitiesModule: entitiesModule,\n _integration: integration,\n } = this\n\n const defaultConfigImport = defaultConfigModule.import(this)\n const configurationsImport = configurationsModule.import(this)\n const actionsImport = actionsModule.import(this)\n const channelsImport = channelsModule.import(this)\n const eventsImport = eventsModule.import(this)\n const statesImport = statesModule.import(this)\n const entitiesImport = entitiesModule.import(this)\n\n const { name, version, id } = integration\n const className = casing.to.pascalCase(name)\n const propsName = `${className}Props`\n const configName = `${className}Config`\n\n const integrationId = id === null ? 'null' : `'${id}'`\n\n const lines = [\n GENERATED_HEADER,\n \"import type { IntegrationInstance } from '@botpress/sdk'\",\n '',\n `import type * as ${defaultConfigModule.name} from \"./${defaultConfigImport}\"`,\n `import type * as ${configurationsModule.name} from \"./${configurationsImport}\"`,\n `import type * as ${actionsModule.name} from \"./${actionsImport}\"`,\n `import type * as ${channelsModule.name} from \"./${channelsImport}\"`,\n `import type * as ${eventsModule.name} from \"./${eventsImport}\"`,\n `import type * as ${statesModule.name} from \"./${statesImport}\"`,\n `import type * as ${entitiesModule.name} from \"./${entitiesImport}\"`,\n `export * as ${defaultConfigModule.name} from \"./${defaultConfigImport}\"`,\n `export * as ${configurationsModule.name} from \"./${configurationsImport}\"`,\n `export * as ${actionsModule.name} from \"./${actionsImport}\"`,\n `export * as ${channelsModule.name} from \"./${channelsImport}\"`,\n `export * as ${eventsModule.name} from \"./${eventsImport}\"`,\n `export * as ${statesModule.name} from \"./${statesImport}\"`,\n `export * as ${entitiesModule.name} from \"./${entitiesImport}\"`,\n '',\n '// type utils',\n 'type ValueOf<T> = T[keyof T]',\n '',\n `export type ${configName} = {`,\n ' configType?: null',\n ` config?: ${defaultConfigModule.name}.${defaultConfigModule.exports}`,\n '} | ValueOf<{',\n ` [K in keyof ${configurationsModule.name}.${configurationsModule.exports}]: {`,\n ' configType: K',\n ` config?: ${configurationsModule.name}.${configurationsModule.exports}[K]`,\n ' }',\n '}>',\n '',\n `export type ${propsName} = {`,\n ' enabled?: boolean',\n `} & ${configName}`,\n '',\n `export type T${className} = {`,\n ` name: '${name}'`,\n ` version: '${version}'`,\n ` configuration: ${defaultConfigModule.name}.${defaultConfigModule.exports}`,\n ` configurations: ${configurationsModule.name}.${configurationsModule.exports}`,\n ` actions: ${actionsModule.name}.${actionsModule.exports}`,\n ` channels: ${channelsModule.name}.${channelsModule.exports}`,\n ` events: ${eventsModule.name}.${eventsModule.exports}`,\n ` states: ${statesModule.name}.${statesModule.exports}`,\n ` user: ${stringifySingleLine(this._integration.user)}`,\n ` entities: ${entitiesModule.name}.${entitiesModule.exports}`,\n '}',\n '',\n `export class ${className} implements IntegrationInstance<T${className}> {`,\n '',\n ` public readonly name = '${name}'`,\n ` public readonly version = '${version}'`,\n ` public readonly id = ${integrationId}`,\n '',\n ' public readonly enabled?: boolean',\n ` public readonly configurationType?: ${configName}['configType']`,\n ` public readonly configuration?: ${configName}['config']`,\n '',\n ` constructor(props?: ${propsName}) {`,\n ' this.enabled = props?.enabled',\n ' this.configurationType = props?.configType',\n ' this.configuration = props?.config',\n ' }',\n '}',\n ]\n\n return `${GENERATED_HEADER}\\n${lines.join('\\n')}`\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAuB;AACvB,mBAA6C;AAC7C,wBAAoC;AACpC,4BAA8B;AAC9B,6BAA+B;AAC/B,kCAA2C;AAC3C,mCAAqC;AACrC,6BAA+B;AAC/B,2BAA6B;AAC7B,2BAA6B;AAC7B,oBAAkC;AAG3B,MAAM,uCAAuC,qBAAO;AAAA,EAsDjD,YACE,cACA,sBACA,uBACA,gBACA,iBACA,eACA,eACA,iBACR,KACA;AACA,UAAM,GAAG;A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A;AAAA,MACA;AAAA,MACA;AAAA,MACA,eAAe;AAAA,MACf;AAAA,MACA,cAAc,oBAAoB,QAAQ,oBAAoB;AAAA,MAC9D;AAAA,MACA,iBAAiB,qBAAqB,QAAQ,qBAAqB;AAAA,MACnE;AAAA,MACA,gBAAgB,qBAAqB,QAAQ,qBAAqB;AAAA,MAClE;AAAA,MACA;AAAA,MACA;AAAA,MACA,eAAe;AAAA,MACf;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MACA,gBAAgB;AAAA,MAChB,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,oBAAoB,oBAAoB,QAAQ,oBAAoB;AAAA,MACpE,qBAAqB,qBAAqB,QAAQ,qBAAqB;AAAA,MACvE,cAAc,cAAc,QAAQ,cAAc;AAAA,MAClD,eAAe,eAAe,QAAQ,eAAe;AAAA,MACrD,aAAa,aAAa,QAAQ,aAAa;AAAA,MAC/C,aAAa,aAAa,QAAQ,aAAa;AAAA,MAC/C,eAAW,uCAAoB,KAAK,aAAa,IAAI;AAAA,MACrD,eAAe,eAAe,QAAQ,eAAe;AAAA,MACrD;AAAA,MACA;AAAA,MACA,gBAAgB,6CAA6C;AAAA,MAC7D;AAAA,MACA,6BAA6B;AAAA,MAC7B,gCAAgC;AAAA,MAChC,0BAA0B;AAAA,MAC1B;AAAA,MACA;AAAA,MACA,yCAAyC;AAAA,MACzC,qCAAqC;AAAA,MACrC;AAAA,MACA,yBAAyB;AAAA,MACzB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAEA,WAAO,GAAG;AAAA,EAAqB,MAAM,KAAK,IAAI;AAAA,EAChD;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -62,10 +62,10 @@ class MessagesModule extends import_module.ReExportTypeModule {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
class ChannelModule extends import_module.Module {
|
|
65
|
-
constructor(
|
|
65
|
+
constructor(_messageModules, _channel, def) {
|
|
66
66
|
super(def);
|
|
67
|
-
this.
|
|
68
|
-
this.
|
|
67
|
+
this._messageModules = _messageModules;
|
|
68
|
+
this._channel = _channel;
|
|
69
69
|
}
|
|
70
70
|
static async create(channelName, channel) {
|
|
71
71
|
const messagesModule = await MessagesModule.create(channel);
|
|
@@ -80,7 +80,7 @@ class ChannelModule extends import_module.Module {
|
|
|
80
80
|
return inst;
|
|
81
81
|
}
|
|
82
82
|
get content() {
|
|
83
|
-
const { messageModules } = this;
|
|
83
|
+
const { _messageModules: messageModules } = this;
|
|
84
84
|
const messageImport = messageModules.import(this);
|
|
85
85
|
return [
|
|
86
86
|
import_const.GENERATED_HEADER,
|
|
@@ -89,8 +89,8 @@ class ChannelModule extends import_module.Module {
|
|
|
89
89
|
"",
|
|
90
90
|
`export type ${this.exports} = {`,
|
|
91
91
|
` messages: ${messageModules.exports}`,
|
|
92
|
-
` message: ${(0, import_generators.stringifySingleLine)(this.
|
|
93
|
-
` conversation: ${(0, import_generators.stringifySingleLine)(this.
|
|
92
|
+
` message: ${(0, import_generators.stringifySingleLine)(this._channel.message)}`,
|
|
93
|
+
` conversation: ${(0, import_generators.stringifySingleLine)(this._channel.conversation)}`,
|
|
94
94
|
"}"
|
|
95
95
|
].join("\n");
|
|
96
96
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/code-generation/integration-schemas/channels-module.ts"],
|
|
4
|
-
"sourcesContent": ["import bluebird from 'bluebird'\nimport { GENERATED_HEADER, INDEX_FILE } from '../const'\nimport { jsonSchemaToTypeScriptType, stringifySingleLine } from '../generators'\nimport { Module, ModuleDef, ReExportTypeModule } from '../module'\nimport * as strings from '../strings'\nimport type * as types from '../typings'\n\nexport class MessageModule extends Module {\n public static async create(name: string, message: types.MessageDefinition): Promise<MessageModule> {\n const schema = message.schema\n const exportName = strings.typeName(name)\n const def: ModuleDef = {\n path: `${name}.ts`,\n exportName,\n content: await jsonSchemaToTypeScriptType(schema, exportName),\n }\n return new MessageModule(def)\n }\n}\n\nexport class MessagesModule extends ReExportTypeModule {\n public static async create(channel: types.ChannelDefinition): Promise<MessagesModule> {\n const messages = channel.messages ?? {}\n const messageModules = await bluebird.map(Object.entries(messages), ([messageName, message]) =>\n MessageModule.create(messageName, message)\n )\n\n const inst = new MessagesModule({\n exportName: strings.typeName('messages'),\n })\n inst.pushDep(...messageModules)\n return inst\n }\n}\n\nexport class ChannelModule extends Module {\n public static async create(channelName: string, channel: types.ChannelDefinition): Promise<ChannelModule> {\n const messagesModule = await MessagesModule.create(channel)\n messagesModule.unshift('messages')\n\n const exportName = strings.typeName(channelName)\n const inst = new ChannelModule(messagesModule, channel, {\n path: INDEX_FILE,\n exportName,\n content: '',\n })\n\n inst.pushDep(messagesModule)\n return inst\n }\n\n private constructor(private
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqB;AACrB,mBAA6C;AAC7C,wBAAgE;AAChE,oBAAsD;AACtD,cAAyB;AAGlB,MAAM,sBAAsB,qBAAO;AAAA,EACxC,aAAoB,OAAO,MAAc,SAA0D;AACjG,UAAM,SAAS,QAAQ;AACvB,UAAM,aAAa,QAAQ,SAAS,IAAI;AACxC,UAAM,MAAiB;AAAA,MACrB,MAAM,GAAG;AAAA,MACT;AAAA,MACA,SAAS,UAAM,8CAA2B,QAAQ,UAAU;AAAA,IAC9D;AACA,WAAO,IAAI,cAAc,GAAG;AAAA,EAC9B;AACF;AAEO,MAAM,uBAAuB,iCAAmB;AAAA,EACrD,aAAoB,OAAO,SAA2D;AACpF,UAAM,WAAW,QAAQ,YAAY,CAAC;AACtC,UAAM,iBAAiB,MAAM,gBAAAA,QAAS;AAAA,MAAI,OAAO,QAAQ,QAAQ;AAAA,MAAG,CAAC,CAAC,aAAa,OAAO,MACxF,cAAc,OAAO,aAAa,OAAO;AAAA,IAC3C;AAEA,UAAM,OAAO,IAAI,eAAe;AAAA,MAC9B,YAAY,QAAQ,SAAS,UAAU;AAAA,IACzC,CAAC;AACD,SAAK,QAAQ,GAAG,cAAc;AAC9B,WAAO;AAAA,EACT;AACF;AAEO,MAAM,sBAAsB,qBAAO;AAAA,EAgBhC,
|
|
4
|
+
"sourcesContent": ["import bluebird from 'bluebird'\nimport { GENERATED_HEADER, INDEX_FILE } from '../const'\nimport { jsonSchemaToTypeScriptType, stringifySingleLine } from '../generators'\nimport { Module, ModuleDef, ReExportTypeModule } from '../module'\nimport * as strings from '../strings'\nimport type * as types from '../typings'\n\nexport class MessageModule extends Module {\n public static async create(name: string, message: types.MessageDefinition): Promise<MessageModule> {\n const schema = message.schema\n const exportName = strings.typeName(name)\n const def: ModuleDef = {\n path: `${name}.ts`,\n exportName,\n content: await jsonSchemaToTypeScriptType(schema, exportName),\n }\n return new MessageModule(def)\n }\n}\n\nexport class MessagesModule extends ReExportTypeModule {\n public static async create(channel: types.ChannelDefinition): Promise<MessagesModule> {\n const messages = channel.messages ?? {}\n const messageModules = await bluebird.map(Object.entries(messages), ([messageName, message]) =>\n MessageModule.create(messageName, message)\n )\n\n const inst = new MessagesModule({\n exportName: strings.typeName('messages'),\n })\n inst.pushDep(...messageModules)\n return inst\n }\n}\n\nexport class ChannelModule extends Module {\n public static async create(channelName: string, channel: types.ChannelDefinition): Promise<ChannelModule> {\n const messagesModule = await MessagesModule.create(channel)\n messagesModule.unshift('messages')\n\n const exportName = strings.typeName(channelName)\n const inst = new ChannelModule(messagesModule, channel, {\n path: INDEX_FILE,\n exportName,\n content: '',\n })\n\n inst.pushDep(messagesModule)\n return inst\n }\n\n private constructor(\n private _messageModules: MessageModule,\n private _channel: types.ChannelDefinition,\n def: ModuleDef\n ) {\n super(def)\n }\n\n public override get content() {\n const { _messageModules: messageModules } = this\n const messageImport = messageModules.import(this)\n\n return [\n GENERATED_HEADER,\n `import { ${messageModules.exports} } from './${messageImport}'`,\n `export * from './${messageImport}'`,\n '',\n `export type ${this.exports} = {`,\n ` messages: ${messageModules.exports}`,\n ` message: ${stringifySingleLine(this._channel.message)}`,\n ` conversation: ${stringifySingleLine(this._channel.conversation)}`,\n '}',\n ].join('\\n')\n }\n}\n\nexport class ChannelsModule extends ReExportTypeModule {\n public static async create(channels: Record<string, types.ChannelDefinition>): Promise<ChannelsModule> {\n const channelModules = await bluebird.map(Object.entries(channels), async ([channelName, channel]) => {\n const mod = await ChannelModule.create(channelName, channel)\n return mod.unshift(channelName)\n })\n\n const exportName = strings.typeName('channels')\n const inst = new ChannelsModule({ exportName })\n inst.pushDep(...channelModules)\n return inst\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqB;AACrB,mBAA6C;AAC7C,wBAAgE;AAChE,oBAAsD;AACtD,cAAyB;AAGlB,MAAM,sBAAsB,qBAAO;AAAA,EACxC,aAAoB,OAAO,MAAc,SAA0D;AACjG,UAAM,SAAS,QAAQ;AACvB,UAAM,aAAa,QAAQ,SAAS,IAAI;AACxC,UAAM,MAAiB;AAAA,MACrB,MAAM,GAAG;AAAA,MACT;AAAA,MACA,SAAS,UAAM,8CAA2B,QAAQ,UAAU;AAAA,IAC9D;AACA,WAAO,IAAI,cAAc,GAAG;AAAA,EAC9B;AACF;AAEO,MAAM,uBAAuB,iCAAmB;AAAA,EACrD,aAAoB,OAAO,SAA2D;AACpF,UAAM,WAAW,QAAQ,YAAY,CAAC;AACtC,UAAM,iBAAiB,MAAM,gBAAAA,QAAS;AAAA,MAAI,OAAO,QAAQ,QAAQ;AAAA,MAAG,CAAC,CAAC,aAAa,OAAO,MACxF,cAAc,OAAO,aAAa,OAAO;AAAA,IAC3C;AAEA,UAAM,OAAO,IAAI,eAAe;AAAA,MAC9B,YAAY,QAAQ,SAAS,UAAU;AAAA,IACzC,CAAC;AACD,SAAK,QAAQ,GAAG,cAAc;AAC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F;",
|
|
6
6
|
"names": ["bluebird"]
|
|
7
7
|
}
|
|
@@ -64,7 +64,8 @@ var command_definitions_default = {
|
|
|
64
64
|
serve: { description: "Serve your project locally", schema: config.schemas.serve },
|
|
65
65
|
deploy: { description: "Deploy your project to the cloud", schema: config.schemas.deploy },
|
|
66
66
|
add: { description: "Install an integration in your bot", schema: config.schemas.add },
|
|
67
|
-
dev: { description: "Run your project in dev mode", schema: config.schemas.dev }
|
|
67
|
+
dev: { description: "Run your project in dev mode", schema: config.schemas.dev },
|
|
68
|
+
lint: { description: "EXPERIMENTAL: Lint an integration definition", schema: config.schemas.lint }
|
|
68
69
|
};
|
|
69
70
|
// Annotate the CommonJS export names for ESM import in node:
|
|
70
71
|
0 && (module.exports = {});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/command-definitions.ts"],
|
|
4
|
-
"sourcesContent": ["import type { DefinitionTree } from './command-tree'\nimport * as config from './config'\n\nexport default {\n login: { description: 'Login to Botpress Cloud', schema: config.schemas.login },\n logout: { description: 'Logout of Botpress Cloud', schema: config.schemas.logout },\n bots: {\n description: 'Bot related commands',\n subcommands: {\n create: { description: 'Create new bot', schema: config.schemas.createBot, alias: 'new' },\n get: { description: 'Get bot', schema: config.schemas.getBot },\n delete: { description: 'Delete bot', schema: config.schemas.deleteBot, alias: 'rm' },\n list: { description: 'List bots', schema: config.schemas.listBots, alias: 'ls' },\n },\n },\n integrations: {\n description: 'Integration related commands',\n subcommands: {\n get: { description: 'Get integration', schema: config.schemas.getIntegration },\n delete: { description: 'Delete integration', schema: config.schemas.deleteIntegration, alias: 'rm' },\n list: { description: 'List integrations', schema: config.schemas.listIntegrations, alias: 'ls' },\n },\n },\n interfaces: {\n description: 'Interface related commands',\n subcommands: {\n get: { description: 'Get interface', schema: config.schemas.getInterface },\n delete: { description: 'Delete interface', schema: config.schemas.deleteInterface, alias: 'rm' },\n list: { description: 'List interfaces', schema: config.schemas.listInterfaces, alias: 'ls' },\n },\n },\n init: { description: 'Initialize a new project', schema: config.schemas.init },\n generate: { description: 'Generate typings for intellisense', schema: config.schemas.generate, alias: 'gen' },\n bundle: { description: 'Bundle a botpress project', schema: config.schemas.bundle },\n build: { description: 'Generate typings and bundle a botpress project', schema: config.schemas.build },\n read: { description: 'Read and parse an integration definition', schema: config.schemas.read },\n serve: { description: 'Serve your project locally', schema: config.schemas.serve },\n deploy: { description: 'Deploy your project to the cloud', schema: config.schemas.deploy },\n add: { description: 'Install an integration in your bot', schema: config.schemas.add },\n dev: { description: 'Run your project in dev mode', schema: config.schemas.dev },\n} satisfies DefinitionTree\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,aAAwB;AAExB,IAAO,8BAAQ;AAAA,EACb,OAAO,EAAE,aAAa,2BAA2B,QAAQ,OAAO,QAAQ,MAAM;AAAA,EAC9E,QAAQ,EAAE,aAAa,4BAA4B,QAAQ,OAAO,QAAQ,OAAO;AAAA,EACjF,MAAM;AAAA,IACJ,aAAa;AAAA,IACb,aAAa;AAAA,MACX,QAAQ,EAAE,aAAa,kBAAkB,QAAQ,OAAO,QAAQ,WAAW,OAAO,MAAM;AAAA,MACxF,KAAK,EAAE,aAAa,WAAW,QAAQ,OAAO,QAAQ,OAAO;AAAA,MAC7D,QAAQ,EAAE,aAAa,cAAc,QAAQ,OAAO,QAAQ,WAAW,OAAO,KAAK;AAAA,MACnF,MAAM,EAAE,aAAa,aAAa,QAAQ,OAAO,QAAQ,UAAU,OAAO,KAAK;AAAA,IACjF;AAAA,EACF;AAAA,EACA,cAAc;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,MACX,KAAK,EAAE,aAAa,mBAAmB,QAAQ,OAAO,QAAQ,eAAe;AAAA,MAC7E,QAAQ,EAAE,aAAa,sBAAsB,QAAQ,OAAO,QAAQ,mBAAmB,OAAO,KAAK;AAAA,MACnG,MAAM,EAAE,aAAa,qBAAqB,QAAQ,OAAO,QAAQ,kBAAkB,OAAO,KAAK;AAAA,IACjG;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,aAAa;AAAA,IACb,aAAa;AAAA,MACX,KAAK,EAAE,aAAa,iBAAiB,QAAQ,OAAO,QAAQ,aAAa;AAAA,MACzE,QAAQ,EAAE,aAAa,oBAAoB,QAAQ,OAAO,QAAQ,iBAAiB,OAAO,KAAK;AAAA,MAC/F,MAAM,EAAE,aAAa,mBAAmB,QAAQ,OAAO,QAAQ,gBAAgB,OAAO,KAAK;AAAA,IAC7F;AAAA,EACF;AAAA,EACA,MAAM,EAAE,aAAa,4BAA4B,QAAQ,OAAO,QAAQ,KAAK;AAAA,EAC7E,UAAU,EAAE,aAAa,qCAAqC,QAAQ,OAAO,QAAQ,UAAU,OAAO,MAAM;AAAA,EAC5G,QAAQ,EAAE,aAAa,6BAA6B,QAAQ,OAAO,QAAQ,OAAO;AAAA,EAClF,OAAO,EAAE,aAAa,kDAAkD,QAAQ,OAAO,QAAQ,MAAM;AAAA,EACrG,MAAM,EAAE,aAAa,4CAA4C,QAAQ,OAAO,QAAQ,KAAK;AAAA,EAC7F,OAAO,EAAE,aAAa,8BAA8B,QAAQ,OAAO,QAAQ,MAAM;AAAA,EACjF,QAAQ,EAAE,aAAa,oCAAoC,QAAQ,OAAO,QAAQ,OAAO;AAAA,EACzF,KAAK,EAAE,aAAa,sCAAsC,QAAQ,OAAO,QAAQ,IAAI;AAAA,EACrF,KAAK,EAAE,aAAa,gCAAgC,QAAQ,OAAO,QAAQ,IAAI;
|
|
4
|
+
"sourcesContent": ["import type { DefinitionTree } from './command-tree'\nimport * as config from './config'\n\nexport default {\n login: { description: 'Login to Botpress Cloud', schema: config.schemas.login },\n logout: { description: 'Logout of Botpress Cloud', schema: config.schemas.logout },\n bots: {\n description: 'Bot related commands',\n subcommands: {\n create: { description: 'Create new bot', schema: config.schemas.createBot, alias: 'new' },\n get: { description: 'Get bot', schema: config.schemas.getBot },\n delete: { description: 'Delete bot', schema: config.schemas.deleteBot, alias: 'rm' },\n list: { description: 'List bots', schema: config.schemas.listBots, alias: 'ls' },\n },\n },\n integrations: {\n description: 'Integration related commands',\n subcommands: {\n get: { description: 'Get integration', schema: config.schemas.getIntegration },\n delete: { description: 'Delete integration', schema: config.schemas.deleteIntegration, alias: 'rm' },\n list: { description: 'List integrations', schema: config.schemas.listIntegrations, alias: 'ls' },\n },\n },\n interfaces: {\n description: 'Interface related commands',\n subcommands: {\n get: { description: 'Get interface', schema: config.schemas.getInterface },\n delete: { description: 'Delete interface', schema: config.schemas.deleteInterface, alias: 'rm' },\n list: { description: 'List interfaces', schema: config.schemas.listInterfaces, alias: 'ls' },\n },\n },\n init: { description: 'Initialize a new project', schema: config.schemas.init },\n generate: { description: 'Generate typings for intellisense', schema: config.schemas.generate, alias: 'gen' },\n bundle: { description: 'Bundle a botpress project', schema: config.schemas.bundle },\n build: { description: 'Generate typings and bundle a botpress project', schema: config.schemas.build },\n read: { description: 'Read and parse an integration definition', schema: config.schemas.read },\n serve: { description: 'Serve your project locally', schema: config.schemas.serve },\n deploy: { description: 'Deploy your project to the cloud', schema: config.schemas.deploy },\n add: { description: 'Install an integration in your bot', schema: config.schemas.add },\n dev: { description: 'Run your project in dev mode', schema: config.schemas.dev },\n lint: { description: 'EXPERIMENTAL: Lint an integration definition', schema: config.schemas.lint },\n} satisfies DefinitionTree\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,aAAwB;AAExB,IAAO,8BAAQ;AAAA,EACb,OAAO,EAAE,aAAa,2BAA2B,QAAQ,OAAO,QAAQ,MAAM;AAAA,EAC9E,QAAQ,EAAE,aAAa,4BAA4B,QAAQ,OAAO,QAAQ,OAAO;AAAA,EACjF,MAAM;AAAA,IACJ,aAAa;AAAA,IACb,aAAa;AAAA,MACX,QAAQ,EAAE,aAAa,kBAAkB,QAAQ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E,aAAa,8BAA8B,QAAQ,OAAO,QAAQ,MAAM;AAAA,EACjF,QAAQ,EAAE,aAAa,oCAAoC,QAAQ,OAAO,QAAQ,OAAO;AAAA,EACzF,KAAK,EAAE,aAAa,sCAAsC,QAAQ,OAAO,QAAQ,IAAI;AAAA,EACrF,KAAK,EAAE,aAAa,gCAAgC,QAAQ,OAAO,QAAQ,IAAI;AAAA,EAC/E,MAAM,EAAE,aAAa,gDAAgD,QAAQ,OAAO,QAAQ,KAAK;AACnG;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -40,6 +40,7 @@ var import_gen_command = require("./gen-command");
|
|
|
40
40
|
var import_init_command = require("./init-command");
|
|
41
41
|
var integrations = __toESM(require("./integration-commands"));
|
|
42
42
|
var interfaces = __toESM(require("./interface-commands"));
|
|
43
|
+
var import_lint_command = require("./lint-command");
|
|
43
44
|
var import_login_command = require("./login-command");
|
|
44
45
|
var import_logout_command = require("./logout-command");
|
|
45
46
|
var import_read_command = require("./read-command");
|
|
@@ -82,7 +83,8 @@ var command_implementations_default = {
|
|
|
82
83
|
serve: getHandler(import_serve_command.ServeCommand),
|
|
83
84
|
deploy: getHandler(import_deploy_command.DeployCommand),
|
|
84
85
|
add: getHandler(import_add_command.AddCommand),
|
|
85
|
-
dev: getHandler(import_dev_command.DevCommand)
|
|
86
|
+
dev: getHandler(import_dev_command.DevCommand),
|
|
87
|
+
lint: getHandler(import_lint_command.LintCommand)
|
|
86
88
|
};
|
|
87
89
|
// Annotate the CommonJS export names for ESM import in node:
|
|
88
90
|
0 && (module.exports = {});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/command-implementations/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { ApiClient } from '../api/client'\nimport type commandDefinitions from '../command-definitions'\nimport type { ImplementationTree } from '../command-tree'\nimport { Logger } from '../logger'\nimport type { CommandArgv } from '../typings'\nimport * as utils from '../utils'\nimport { AddCommand } from './add-command'\nimport type { BaseCommand } from './base-command'\nimport * as bots from './bot-commands'\nimport { BuildCommand } from './build-command'\nimport { BundleCommand } from './bundle-command'\nimport { DeployCommand } from './deploy-command'\nimport { DevCommand } from './dev-command'\nimport { GenerateCommand } from './gen-command'\nimport type { GlobalCommand, GlobalCommandDefinition } from './global-command'\nimport { InitCommand } from './init-command'\nimport * as integrations from './integration-commands'\nimport * as interfaces from './interface-commands'\nimport { LoginCommand } from './login-command'\nimport { LogoutCommand } from './logout-command'\nimport { ReadCommand } from './read-command'\nimport { ServeCommand } from './serve-command'\n\ntype GlobalCtor<C extends GlobalCommandDefinition> = new (\n ...args: ConstructorParameters<typeof GlobalCommand<C>>\n) => BaseCommand<C>\n\nconst getHandler =\n <C extends GlobalCommandDefinition>(cls: GlobalCtor<C>) =>\n async (argv: CommandArgv<C>) => {\n const logger = new Logger(argv)\n const prompt = new utils.prompt.CLIPrompt(argv, logger)\n return new cls(ApiClient, prompt, logger, argv).handler()\n }\n\nexport default {\n login: getHandler(LoginCommand),\n logout: getHandler(LogoutCommand),\n bots: {\n subcommands: {\n create: getHandler(bots.CreateBotCommand),\n get: getHandler(bots.GetBotCommand),\n delete: getHandler(bots.DeleteBotCommand),\n list: getHandler(bots.ListBotsCommand),\n },\n },\n integrations: {\n subcommands: {\n get: getHandler(integrations.GetIntegrationCommand),\n list: getHandler(integrations.ListIntegrationsCommand),\n delete: getHandler(integrations.DeleteIntegrationCommand),\n },\n },\n interfaces: {\n subcommands: {\n get: getHandler(interfaces.GetInterfaceCommand),\n list: getHandler(interfaces.ListInterfacesCommand),\n delete: getHandler(interfaces.DeleteInterfaceCommand),\n },\n },\n init: getHandler(InitCommand),\n generate: getHandler(GenerateCommand),\n bundle: getHandler(BundleCommand),\n build: getHandler(BuildCommand),\n read: getHandler(ReadCommand),\n serve: getHandler(ServeCommand),\n deploy: getHandler(DeployCommand),\n add: getHandler(AddCommand),\n dev: getHandler(DevCommand),\n} satisfies ImplementationTree<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,+BAAW;AAAA,EAC5B,UAAU,WAAW,kCAAe;AAAA,EACpC,QAAQ,WAAW,mCAAa;AAAA,EAChC,OAAO,WAAW,iCAAY;AAAA,EAC9B,MAAM,WAAW,+BAAW;AAAA,EAC5B,OAAO,WAAW,iCAAY;AAAA,EAC9B,QAAQ,WAAW,mCAAa;AAAA,EAChC,KAAK,WAAW,6BAAU;AAAA,EAC1B,KAAK,WAAW,6BAAU;
|
|
4
|
+
"sourcesContent": ["import { ApiClient } from '../api/client'\nimport type commandDefinitions from '../command-definitions'\nimport type { ImplementationTree } from '../command-tree'\nimport { Logger } from '../logger'\nimport type { CommandArgv } from '../typings'\nimport * as utils from '../utils'\nimport { AddCommand } from './add-command'\nimport type { BaseCommand } from './base-command'\nimport * as bots from './bot-commands'\nimport { BuildCommand } from './build-command'\nimport { BundleCommand } from './bundle-command'\nimport { DeployCommand } from './deploy-command'\nimport { DevCommand } from './dev-command'\nimport { GenerateCommand } from './gen-command'\nimport type { GlobalCommand, GlobalCommandDefinition } from './global-command'\nimport { InitCommand } from './init-command'\nimport * as integrations from './integration-commands'\nimport * as interfaces from './interface-commands'\nimport { LintCommand } from './lint-command'\nimport { LoginCommand } from './login-command'\nimport { LogoutCommand } from './logout-command'\nimport { ReadCommand } from './read-command'\nimport { ServeCommand } from './serve-command'\n\ntype GlobalCtor<C extends GlobalCommandDefinition> = new (\n ...args: ConstructorParameters<typeof GlobalCommand<C>>\n) => BaseCommand<C>\n\nconst getHandler =\n <C extends GlobalCommandDefinition>(cls: GlobalCtor<C>) =>\n async (argv: CommandArgv<C>) => {\n const logger = new Logger(argv)\n const prompt = new utils.prompt.CLIPrompt(argv, logger)\n return new cls(ApiClient, prompt, logger, argv).handler()\n }\n\nexport default {\n login: getHandler(LoginCommand),\n logout: getHandler(LogoutCommand),\n bots: {\n subcommands: {\n create: getHandler(bots.CreateBotCommand),\n get: getHandler(bots.GetBotCommand),\n delete: getHandler(bots.DeleteBotCommand),\n list: getHandler(bots.ListBotsCommand),\n },\n },\n integrations: {\n subcommands: {\n get: getHandler(integrations.GetIntegrationCommand),\n list: getHandler(integrations.ListIntegrationsCommand),\n delete: getHandler(integrations.DeleteIntegrationCommand),\n },\n },\n interfaces: {\n subcommands: {\n get: getHandler(interfaces.GetInterfaceCommand),\n list: getHandler(interfaces.ListInterfacesCommand),\n delete: getHandler(interfaces.DeleteInterfaceCommand),\n },\n },\n init: getHandler(InitCommand),\n generate: getHandler(GenerateCommand),\n bundle: getHandler(BundleCommand),\n build: getHandler(BuildCommand),\n read: getHandler(ReadCommand),\n serve: getHandler(ServeCommand),\n deploy: getHandler(DeployCommand),\n add: getHandler(AddCommand),\n dev: getHandler(DevCommand),\n lint: getHandler(LintCommand),\n} satisfies ImplementationTree<typeof commandDefinitions>\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA0B;AAG1B,oBAAuB;AAEvB,YAAuB;AACvB,yBAA2B;AAE3B,WAAsB;AACtB,2BAA6B;AAC7B,4BAA8B;AAC9B,4BAA8B;AAC9B,yBAA2B;AAC3B,yBAAgC;AAEhC,0BAA4B;AAC5B,mBAA8B;AAC9B,iBAA4B;AAC5B,0BAA4B;AAC5B,2BAA6B;AAC7B,4BAA8B;AAC9B,0BAA4B;AAC5B,2BAA6B;AAM7B,MAAM,aACJ,CAAoC,QACpC,OAAO,SAAyB;AAC9B,QAAM,SAAS,IAAI,qBAAO,IAAI;AAC9B,QAAM,SAAS,IAAI,MAAM,OAAO,UAAU,MAAM,MAAM;AACtD,SAAO,IAAI,IAAI,yBAAW,QAAQ,QAAQ,IAAI,EAAE,QAAQ;AAC1D;AAEF,IAAO,kCAAQ;AAAA,EACb,OAAO,WAAW,iCAAY;AAAA,EAC9B,QAAQ,WAAW,mCAAa;AAAA,EAChC,MAAM;AAAA,IACJ,aAAa;AAAA,MACX,QAAQ,WAAW,KAAK,gBAAgB;AAAA,MACxC,KAAK,WAAW,KAAK,aAAa;AAAA,MAClC,QAAQ,WAAW,KAAK,gBAAgB;AAAA,MACxC,MAAM,WAAW,KAAK,eAAe;AAAA,IACvC;AAAA,EACF;AAAA,EACA,cAAc;AAAA,IACZ,aAAa;AAAA,MACX,KAAK,WAAW,aAAa,qBAAqB;AAAA,MAClD,MAAM,WAAW,aAAa,uBAAuB;AAAA,MACrD,QAAQ,WAAW,aAAa,wBAAwB;AAAA,IAC1D;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,aAAa;AAAA,MACX,KAAK,WAAW,WAAW,mBAAmB;AAAA,MAC9C,MAAM,WAAW,WAAW,qBAAqB;AAAA,MACjD,QAAQ,WAAW,WAAW,sBAAsB;AAAA,IACtD;AAAA,EACF;AAAA,EACA,MAAM,WAAW,+BAAW;AAAA,EAC5B,UAAU,WAAW,kCAAe;AAAA,EACpC,QAAQ,WAAW,mCAAa;AAAA,EAChC,OAAO,WAAW,iCAAY;AAAA,EAC9B,MAAM,WAAW,+BAAW;AAAA,EAC5B,OAAO,WAAW,iCAAY;AAAA,EAC9B,QAAQ,WAAW,mCAAa;AAAA,EAChC,KAAK,WAAW,6BAAU;AAAA,EAC1B,KAAK,WAAW,6BAAU;AAAA,EAC1B,MAAM,WAAW,+BAAW;AAC9B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var lint_command_exports = {};
|
|
26
|
+
__export(lint_command_exports, {
|
|
27
|
+
LintCommand: () => LintCommand
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(lint_command_exports);
|
|
30
|
+
var import_integration_body = require("../api/integration-body");
|
|
31
|
+
var errors = __toESM(require("../errors"));
|
|
32
|
+
var import_integration_linter = require("../linter/integration-linter");
|
|
33
|
+
var import_project_command = require("./project-command");
|
|
34
|
+
class LintCommand extends import_project_command.ProjectCommand {
|
|
35
|
+
async run() {
|
|
36
|
+
const projectDef = await this.readProjectDefinitionFromFS();
|
|
37
|
+
switch (projectDef.type) {
|
|
38
|
+
case "integration":
|
|
39
|
+
return this._runLintForIntegration(projectDef.definition);
|
|
40
|
+
case "bot":
|
|
41
|
+
throw new errors.BotpressCLIError("Bot linting is not yet implemented");
|
|
42
|
+
case "interface":
|
|
43
|
+
throw new errors.BotpressCLIError("Interface linting is not yet implemented");
|
|
44
|
+
default:
|
|
45
|
+
throw new errors.BotpressCLIError("Unsupported project type");
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async _runLintForIntegration(definition) {
|
|
49
|
+
const parsedIntegrationDefinition = (0, import_integration_body.prepareCreateIntegrationBody)(definition);
|
|
50
|
+
const linter = new import_integration_linter.IntegrationLinter(parsedIntegrationDefinition);
|
|
51
|
+
await linter.lint();
|
|
52
|
+
linter.logResults(this.logger);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
LintCommand
|
|
58
|
+
});
|
|
59
|
+
//# sourceMappingURL=lint-command.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/command-implementations/lint-command.ts"],
|
|
4
|
+
"sourcesContent": ["import { IntegrationDefinition } from '@botpress/sdk'\nimport { prepareCreateIntegrationBody } from '../api/integration-body'\nimport type commandDefinitions from '../command-definitions'\nimport * as errors from '../errors'\nimport { IntegrationLinter } from '../linter/integration-linter'\nimport { ProjectCommand } from './project-command'\n\nexport type LintCommandDefinition = typeof commandDefinitions.lint\nexport class LintCommand extends ProjectCommand<LintCommandDefinition> {\n public async run(): Promise<void> {\n const projectDef = await this.readProjectDefinitionFromFS()\n\n switch (projectDef.type) {\n case 'integration':\n return this._runLintForIntegration(projectDef.definition)\n case 'bot':\n throw new errors.BotpressCLIError('Bot linting is not yet implemented')\n case 'interface':\n throw new errors.BotpressCLIError('Interface linting is not yet implemented')\n default:\n throw new errors.BotpressCLIError('Unsupported project type')\n }\n }\n\n private async _runLintForIntegration(definition: IntegrationDefinition): Promise<void> {\n const parsedIntegrationDefinition = prepareCreateIntegrationBody(definition)\n const linter = new IntegrationLinter(parsedIntegrationDefinition)\n\n await linter.lint()\n linter.logResults(this.logger)\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,8BAA6C;AAE7C,aAAwB;AACxB,gCAAkC;AAClC,6BAA+B;AAGxB,MAAM,oBAAoB,sCAAsC;AAAA,EACrE,MAAa,MAAqB;AAChC,UAAM,aAAa,MAAM,KAAK,4BAA4B;AAE1D,YAAQ,WAAW,MAAM;AAAA,MACvB,KAAK;AACH,eAAO,KAAK,uBAAuB,WAAW,UAAU;AAAA,MAC1D,KAAK;AACH,cAAM,IAAI,OAAO,iBAAiB,oCAAoC;AAAA,MACxE,KAAK;AACH,cAAM,IAAI,OAAO,iBAAiB,0CAA0C;AAAA,MAC9E;AACE,cAAM,IAAI,OAAO,iBAAiB,0BAA0B;AAAA,IAChE;AAAA,EACF;AAAA,EAEA,MAAc,uBAAuB,YAAkD;AACrF,UAAM,kCAA8B,sDAA6B,UAAU;AAC3E,UAAM,SAAS,IAAI,4CAAkB,2BAA2B;AAEhE,UAAM,OAAO,KAAK;AAClB,WAAO,WAAW,KAAK,MAAM;AAAA,EAC/B;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/config.js
CHANGED
|
@@ -254,6 +254,9 @@ const initSchema = {
|
|
|
254
254
|
type: { type: "string", choices: ["bot", "integration"] },
|
|
255
255
|
name: { type: "string", description: "The name of the project" }
|
|
256
256
|
};
|
|
257
|
+
const lintSchema = {
|
|
258
|
+
...projectSchema
|
|
259
|
+
};
|
|
257
260
|
const schemas = {
|
|
258
261
|
global: globalSchema,
|
|
259
262
|
project: projectSchema,
|
|
@@ -279,7 +282,8 @@ const schemas = {
|
|
|
279
282
|
serve: serveSchema,
|
|
280
283
|
deploy: deploySchema,
|
|
281
284
|
add: addSchema,
|
|
282
|
-
dev: devSchema
|
|
285
|
+
dev: devSchema,
|
|
286
|
+
lint: lintSchema
|
|
283
287
|
};
|
|
284
288
|
// Annotate the CommonJS export names for ESM import in node:
|
|
285
289
|
0 && (module.exports = {
|
package/dist/config.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/config.ts"],
|
|
4
|
-
"sourcesContent": ["import * as consts from './consts'\nimport type { CommandOption, CommandSchema } from './typings'\n\n// command options\n\nconst port = {\n type: 'number',\n description: 'The port to use',\n} satisfies CommandOption\n\nconst workDir = {\n type: 'string',\n description: 'The path to the project',\n default: process.cwd(),\n} satisfies CommandOption\n\nconst noBuild = {\n type: 'boolean',\n description: 'Skip the build step',\n default: false,\n} satisfies CommandOption\n\nconst apiUrl = {\n type: 'string',\n description: 'The URL of the Botpress server',\n} satisfies CommandOption\n\nconst token = {\n type: 'string',\n description: 'You Personal Access Token ',\n} satisfies CommandOption\n\nconst workspaceId = {\n type: 'string',\n description: 'The Workspace Id to deploy to',\n} satisfies CommandOption\n\nconst secrets = {\n type: 'string',\n description: 'Values for the integration secrets',\n array: true,\n default: [],\n} satisfies CommandOption\n\nconst botRef = {\n type: 'string',\n description: 'The bot ID. Bot Name is not supported.',\n demandOption: true,\n positional: true,\n idx: 0,\n} satisfies CommandOption\n\nconst integrationRef = {\n type: 'string',\n description: 'The integration ID or name with optional version. Ex: teams or teams@0.2.0',\n demandOption: true,\n positional: true,\n idx: 0,\n} satisfies CommandOption\n\nconst interfaceRef = {\n ...integrationRef,\n description: 'The interface ID or name with optional version. Ex: teams or teams@0.2.0',\n} satisfies CommandOption\n\nconst sourceMap = { type: 'boolean', description: 'Generate sourcemaps', default: false } satisfies CommandOption\n\nconst minify = { type: 'boolean', description: 'Minify the bundled code', default: true } satisfies CommandOption\n\nconst dev = {\n type: 'boolean',\n description: 'List only dev bots / dev integrations',\n default: false,\n} satisfies CommandOption\n\nconst isPublic = {\n type: 'boolean',\n description: 'Weither or not to deploy the integration publicly',\n default: false,\n} satisfies CommandOption\n\n// base schemas\n\nconst globalSchema = {\n verbose: {\n type: 'boolean',\n description: 'Enable verbose logging',\n alias: 'v',\n default: false,\n },\n confirm: {\n type: 'boolean',\n description: 'Confirm all prompts',\n alias: 'y',\n default: false,\n },\n json: {\n type: 'boolean',\n description: 'Prevent logging anything else than raw json in stdout. Useful for piping output to other tools',\n default: false,\n },\n botpressHome: {\n type: 'string',\n description: 'The path to the Botpress home directory',\n default: consts.defaultBotpressHome,\n },\n} satisfies CommandSchema\n\nconst projectSchema = {\n ...globalSchema,\n entryPoint: { type: 'string', description: 'The entry point of the project', default: consts.defaultEntrypoint },\n outDir: { type: 'string', description: 'The output directory', default: consts.defaultOutputFolder },\n workDir,\n} satisfies CommandSchema\n\nconst credentialsSchema = {\n apiUrl,\n workspaceId,\n token,\n} satisfies CommandSchema\n\nconst secretsSchema = {\n secrets,\n} satisfies CommandSchema\n\n// command schemas\n\nconst generateSchema = {\n ...projectSchema,\n} satisfies CommandSchema\n\nconst bundleSchema = {\n ...projectSchema,\n sourceMap,\n minify,\n} satisfies CommandSchema\n\nconst buildSchema = {\n ...projectSchema,\n sourceMap,\n minify,\n} satisfies CommandSchema\n\nconst readSchema = {\n ...projectSchema,\n} satisfies CommandSchema\n\nconst serveSchema = {\n ...projectSchema,\n ...secretsSchema,\n port,\n} satisfies CommandSchema\n\nconst deploySchema = {\n ...projectSchema,\n ...credentialsSchema,\n ...secretsSchema,\n botId: { type: 'string', description: 'The bot ID to deploy. Only used when deploying a bot' },\n noBuild,\n createNewBot: { type: 'boolean', description: 'Create a new bot when deploying. Only used when deploying a bot' },\n sourceMap,\n minify,\n public: isPublic,\n allowDeprecated: {\n type: 'boolean',\n description: 'Allow deprecated features in the project',\n default: false,\n },\n} satisfies CommandSchema\n\nconst devSchema = {\n ...projectSchema,\n ...credentialsSchema,\n ...secretsSchema,\n sourceMap,\n minify,\n port,\n tunnelUrl: {\n type: 'string',\n description: 'The tunnel HTTP URL to use',\n default: consts.defaultTunnelUrl,\n },\n} satisfies CommandSchema\n\nconst addSchema = {\n ...projectSchema,\n ...credentialsSchema,\n integrationRef,\n} satisfies CommandSchema\n\nconst loginSchema = {\n ...globalSchema,\n token,\n workspaceId,\n apiUrl: { ...apiUrl, default: consts.defaultBotpressApiUrl },\n} satisfies CommandSchema\n\nconst logoutSchema = {\n ...globalSchema,\n} satisfies CommandSchema\n\nconst createBotSchema = {\n ...globalSchema,\n ...credentialsSchema,\n name: { type: 'string', description: 'The name of the bot to create' },\n ifNotExists: {\n type: 'boolean',\n description: 'Do not create if a bot with the same name already exists',\n default: false,\n },\n} satisfies CommandSchema\n\nconst getBotSchema = {\n ...globalSchema,\n ...credentialsSchema,\n botRef,\n} satisfies CommandSchema\n\nconst deleteBotSchema = {\n ...globalSchema,\n ...credentialsSchema,\n botRef,\n} satisfies CommandSchema\n\nconst listBotsSchema = {\n ...globalSchema,\n ...credentialsSchema,\n dev,\n} satisfies CommandSchema\n\nconst getIntegrationSchema = {\n ...globalSchema,\n ...credentialsSchema,\n integrationRef,\n} satisfies CommandSchema\n\nconst listIntegrationsSchema = {\n ...globalSchema,\n ...credentialsSchema,\n name: { type: 'string', description: 'The name filter when listing integrations' },\n versionNumber: { type: 'string', description: 'The version filter when listing integrations' },\n dev,\n} satisfies CommandSchema\n\nconst deleteIntegrationSchema = {\n ...globalSchema,\n ...credentialsSchema,\n integrationRef,\n} satisfies CommandSchema\n\nconst getInterfaceSchema = {\n ...globalSchema,\n ...credentialsSchema,\n interfaceRef,\n} satisfies CommandSchema\n\nconst listInterfacesSchema = {\n ...globalSchema,\n ...credentialsSchema,\n} satisfies CommandSchema\n\nconst deleteInterfaceSchema = {\n ...globalSchema,\n ...credentialsSchema,\n interfaceRef,\n} satisfies CommandSchema\n\nconst initSchema = {\n ...globalSchema,\n workDir,\n type: { type: 'string', choices: ['bot', 'integration'] as const },\n name: { type: 'string', description: 'The name of the project' },\n} satisfies CommandSchema\n\n// exports\n\nexport const schemas = {\n global: globalSchema,\n project: projectSchema,\n credentials: credentialsSchema,\n secrets: secretsSchema,\n\n login: loginSchema,\n logout: logoutSchema,\n createBot: createBotSchema,\n getBot: getBotSchema,\n deleteBot: deleteBotSchema,\n listBots: listBotsSchema,\n getIntegration: getIntegrationSchema,\n listIntegrations: listIntegrationsSchema,\n deleteIntegration: deleteIntegrationSchema,\n getInterface: getInterfaceSchema,\n listInterfaces: listInterfacesSchema,\n deleteInterface: deleteInterfaceSchema,\n init: initSchema,\n generate: generateSchema,\n bundle: bundleSchema,\n build: buildSchema,\n read: readSchema,\n serve: serveSchema,\n deploy: deploySchema,\n add: addSchema,\n dev: devSchema,\n} as const\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAAwB;AAKxB,MAAM,OAAO;AAAA,EACX,MAAM;AAAA,EACN,aAAa;AACf;AAEA,MAAM,UAAU;AAAA,EACd,MAAM;AAAA,EACN,aAAa;AAAA,EACb,SAAS,QAAQ,IAAI;AACvB;AAEA,MAAM,UAAU;AAAA,EACd,MAAM;AAAA,EACN,aAAa;AAAA,EACb,SAAS;AACX;AAEA,MAAM,SAAS;AAAA,EACb,MAAM;AAAA,EACN,aAAa;AACf;AAEA,MAAM,QAAQ;AAAA,EACZ,MAAM;AAAA,EACN,aAAa;AACf;AAEA,MAAM,cAAc;AAAA,EAClB,MAAM;AAAA,EACN,aAAa;AACf;AAEA,MAAM,UAAU;AAAA,EACd,MAAM;AAAA,EACN,aAAa;AAAA,EACb,OAAO;AAAA,EACP,SAAS,CAAC;AACZ;AAEA,MAAM,SAAS;AAAA,EACb,MAAM;AAAA,EACN,aAAa;AAAA,EACb,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,KAAK;AACP;AAEA,MAAM,iBAAiB;AAAA,EACrB,MAAM;AAAA,EACN,aAAa;AAAA,EACb,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,KAAK;AACP;AAEA,MAAM,eAAe;AAAA,EACnB,GAAG;AAAA,EACH,aAAa;AACf;AAEA,MAAM,YAAY,EAAE,MAAM,WAAW,aAAa,uBAAuB,SAAS,MAAM;AAExF,MAAM,SAAS,EAAE,MAAM,WAAW,aAAa,2BAA2B,SAAS,KAAK;AAExF,MAAM,MAAM;AAAA,EACV,MAAM;AAAA,EACN,aAAa;AAAA,EACb,SAAS;AACX;AAEA,MAAM,WAAW;AAAA,EACf,MAAM;AAAA,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ACzB,GAAG;AAAA,EACH,GAAG;AAAA,EACH;AACF;AAEA,MAAM,uBAAuB;AAAA,EAC3B,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,wBAAwB;AAAA,EAC5B,GAAG;AAAA,EACH,GAAG;AAAA,EACH;AACF;AAEA,MAAM,aAAa;AAAA,EACjB,GAAG;AAAA,EACH;AAAA,EACA,MAAM,EAAE,MAAM,UAAU,SAAS,CAAC,OAAO,aAAa,EAAW;AAAA,EACjE,MAAM,EAAE,MAAM,UAAU,aAAa,0BAA0B;AACjE;AAIO,MAAM,UAAU;AAAA,EACrB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,aAAa;AAAA,EACb,SAAS;AAAA,EAET,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,MAAM;AAAA,EACN,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,KAAK;
|
|
4
|
+
"sourcesContent": ["import * as consts from './consts'\nimport type { CommandOption, CommandSchema } from './typings'\n\n// command options\n\nconst port = {\n type: 'number',\n description: 'The port to use',\n} satisfies CommandOption\n\nconst workDir = {\n type: 'string',\n description: 'The path to the project',\n default: process.cwd(),\n} satisfies CommandOption\n\nconst noBuild = {\n type: 'boolean',\n description: 'Skip the build step',\n default: false,\n} satisfies CommandOption\n\nconst apiUrl = {\n type: 'string',\n description: 'The URL of the Botpress server',\n} satisfies CommandOption\n\nconst token = {\n type: 'string',\n description: 'You Personal Access Token ',\n} satisfies CommandOption\n\nconst workspaceId = {\n type: 'string',\n description: 'The Workspace Id to deploy to',\n} satisfies CommandOption\n\nconst secrets = {\n type: 'string',\n description: 'Values for the integration secrets',\n array: true,\n default: [],\n} satisfies CommandOption\n\nconst botRef = {\n type: 'string',\n description: 'The bot ID. Bot Name is not supported.',\n demandOption: true,\n positional: true,\n idx: 0,\n} satisfies CommandOption\n\nconst integrationRef = {\n type: 'string',\n description: 'The integration ID or name with optional version. Ex: teams or teams@0.2.0',\n demandOption: true,\n positional: true,\n idx: 0,\n} satisfies CommandOption\n\nconst interfaceRef = {\n ...integrationRef,\n description: 'The interface ID or name with optional version. Ex: teams or teams@0.2.0',\n} satisfies CommandOption\n\nconst sourceMap = { type: 'boolean', description: 'Generate sourcemaps', default: false } satisfies CommandOption\n\nconst minify = { type: 'boolean', description: 'Minify the bundled code', default: true } satisfies CommandOption\n\nconst dev = {\n type: 'boolean',\n description: 'List only dev bots / dev integrations',\n default: false,\n} satisfies CommandOption\n\nconst isPublic = {\n type: 'boolean',\n description: 'Weither or not to deploy the integration publicly',\n default: false,\n} satisfies CommandOption\n\n// base schemas\n\nconst globalSchema = {\n verbose: {\n type: 'boolean',\n description: 'Enable verbose logging',\n alias: 'v',\n default: false,\n },\n confirm: {\n type: 'boolean',\n description: 'Confirm all prompts',\n alias: 'y',\n default: false,\n },\n json: {\n type: 'boolean',\n description: 'Prevent logging anything else than raw json in stdout. Useful for piping output to other tools',\n default: false,\n },\n botpressHome: {\n type: 'string',\n description: 'The path to the Botpress home directory',\n default: consts.defaultBotpressHome,\n },\n} satisfies CommandSchema\n\nconst projectSchema = {\n ...globalSchema,\n entryPoint: { type: 'string', description: 'The entry point of the project', default: consts.defaultEntrypoint },\n outDir: { type: 'string', description: 'The output directory', default: consts.defaultOutputFolder },\n workDir,\n} satisfies CommandSchema\n\nconst credentialsSchema = {\n apiUrl,\n workspaceId,\n token,\n} satisfies CommandSchema\n\nconst secretsSchema = {\n secrets,\n} satisfies CommandSchema\n\n// command schemas\n\nconst generateSchema = {\n ...projectSchema,\n} satisfies CommandSchema\n\nconst bundleSchema = {\n ...projectSchema,\n sourceMap,\n minify,\n} satisfies CommandSchema\n\nconst buildSchema = {\n ...projectSchema,\n sourceMap,\n minify,\n} satisfies CommandSchema\n\nconst readSchema = {\n ...projectSchema,\n} satisfies CommandSchema\n\nconst serveSchema = {\n ...projectSchema,\n ...secretsSchema,\n port,\n} satisfies CommandSchema\n\nconst deploySchema = {\n ...projectSchema,\n ...credentialsSchema,\n ...secretsSchema,\n botId: { type: 'string', description: 'The bot ID to deploy. Only used when deploying a bot' },\n noBuild,\n createNewBot: { type: 'boolean', description: 'Create a new bot when deploying. Only used when deploying a bot' },\n sourceMap,\n minify,\n public: isPublic,\n allowDeprecated: {\n type: 'boolean',\n description: 'Allow deprecated features in the project',\n default: false,\n },\n} satisfies CommandSchema\n\nconst devSchema = {\n ...projectSchema,\n ...credentialsSchema,\n ...secretsSchema,\n sourceMap,\n minify,\n port,\n tunnelUrl: {\n type: 'string',\n description: 'The tunnel HTTP URL to use',\n default: consts.defaultTunnelUrl,\n },\n} satisfies CommandSchema\n\nconst addSchema = {\n ...projectSchema,\n ...credentialsSchema,\n integrationRef,\n} satisfies CommandSchema\n\nconst loginSchema = {\n ...globalSchema,\n token,\n workspaceId,\n apiUrl: { ...apiUrl, default: consts.defaultBotpressApiUrl },\n} satisfies CommandSchema\n\nconst logoutSchema = {\n ...globalSchema,\n} satisfies CommandSchema\n\nconst createBotSchema = {\n ...globalSchema,\n ...credentialsSchema,\n name: { type: 'string', description: 'The name of the bot to create' },\n ifNotExists: {\n type: 'boolean',\n description: 'Do not create if a bot with the same name already exists',\n default: false,\n },\n} satisfies CommandSchema\n\nconst getBotSchema = {\n ...globalSchema,\n ...credentialsSchema,\n botRef,\n} satisfies CommandSchema\n\nconst deleteBotSchema = {\n ...globalSchema,\n ...credentialsSchema,\n botRef,\n} satisfies CommandSchema\n\nconst listBotsSchema = {\n ...globalSchema,\n ...credentialsSchema,\n dev,\n} satisfies CommandSchema\n\nconst getIntegrationSchema = {\n ...globalSchema,\n ...credentialsSchema,\n integrationRef,\n} satisfies CommandSchema\n\nconst listIntegrationsSchema = {\n ...globalSchema,\n ...credentialsSchema,\n name: { type: 'string', description: 'The name filter when listing integrations' },\n versionNumber: { type: 'string', description: 'The version filter when listing integrations' },\n dev,\n} satisfies CommandSchema\n\nconst deleteIntegrationSchema = {\n ...globalSchema,\n ...credentialsSchema,\n integrationRef,\n} satisfies CommandSchema\n\nconst getInterfaceSchema = {\n ...globalSchema,\n ...credentialsSchema,\n interfaceRef,\n} satisfies CommandSchema\n\nconst listInterfacesSchema = {\n ...globalSchema,\n ...credentialsSchema,\n} satisfies CommandSchema\n\nconst deleteInterfaceSchema = {\n ...globalSchema,\n ...credentialsSchema,\n interfaceRef,\n} satisfies CommandSchema\n\nconst initSchema = {\n ...globalSchema,\n workDir,\n type: { type: 'string', choices: ['bot', 'integration'] as const },\n name: { type: 'string', description: 'The name of the project' },\n} satisfies CommandSchema\n\nconst lintSchema = {\n ...projectSchema,\n} satisfies CommandSchema\n\n// exports\n\nexport const schemas = {\n global: globalSchema,\n project: projectSchema,\n credentials: credentialsSchema,\n secrets: secretsSchema,\n\n login: loginSchema,\n logout: logoutSchema,\n createBot: createBotSchema,\n getBot: getBotSchema,\n deleteBot: deleteBotSchema,\n listBots: listBotsSchema,\n getIntegration: getIntegrationSchema,\n listIntegrations: listIntegrationsSchema,\n deleteIntegration: deleteIntegrationSchema,\n getInterface: getInterfaceSchema,\n listInterfaces: listInterfacesSchema,\n deleteInterface: deleteInterfaceSchema,\n init: initSchema,\n generate: generateSchema,\n bundle: bundleSchema,\n build: buildSchema,\n read: readSchema,\n serve: serveSchema,\n deploy: deploySchema,\n add: addSchema,\n dev: devSchema,\n lint: lintSchema,\n} as const\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAAwB;AAKxB,MAAM,OAAO;AAAA,EACX,MAAM;AAAA,EACN,aAAa;AACf;AAEA,MAAM,UA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