@botpress/cli 4.10.2 → 4.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,32 +1,32 @@
1
1
 
2
- > @botpress/cli@4.10.2 build /home/runner/work/botpress/botpress/packages/cli
2
+ > @botpress/cli@4.11.1 build /home/runner/work/botpress/botpress/packages/cli
3
3
  > pnpm run bundle && pnpm run template:gen
4
4
 
5
5
 
6
- > @botpress/cli@4.10.2 bundle /home/runner/work/botpress/botpress/packages/cli
6
+ > @botpress/cli@4.11.1 bundle /home/runner/work/botpress/botpress/packages/cli
7
7
  > ts-node -T build.ts
8
8
 
9
9
 
10
- > @botpress/cli@4.10.2 template:gen /home/runner/work/botpress/botpress/packages/cli
10
+ > @botpress/cli@4.11.1 template:gen /home/runner/work/botpress/botpress/packages/cli
11
11
  > pnpm -r --stream -F @bp-templates/* exec bp gen
12
12
 
13
- 🤖 Botpress CLI v4.10.2
14
- 🤖 Botpress CLI v4.10.2
15
- 🤖 Botpress CLI v4.10.2
16
- 🤖 Botpress CLI v4.10.2
17
- ○ Generating typings for bot...
13
+ 🤖 Botpress CLI v4.11.1
14
+ 🤖 Botpress CLI v4.11.1
15
+ 🤖 Botpress CLI v4.11.1
16
+ 🤖 Botpress CLI v4.11.1
17
+ ○ Generating typings for integration empty-integration...
18
18
  ✓ Typings available at .botpress
19
19
 
20
20
  ○ Generating typings for integration hello-world...
21
+ ○ Generating typings for bot...
21
22
  ○ Generating typings for plugin empty-plugin...
22
23
  ✓ Typings available at .botpress
23
24
 
24
25
  ✓ Typings available at .botpress
25
26
 
26
- ○ Generating typings for integration empty-integration...
27
27
  ✓ Typings available at .botpress
28
28
 
29
- 🤖 Botpress CLI v4.10.2
29
+ 🤖 Botpress CLI v4.11.1
30
30
  ○ Generating typings for integration webhook-message...
31
31
  ✓ Typings available at .botpress
32
32
 
@@ -70,7 +70,7 @@ const prepareCreateIntegrationBody = async (integration) => ({
70
70
  schema: await utils.schema.mapZodToJsonSchema(entity)
71
71
  })) : void 0,
72
72
  attributes: integration.attributes,
73
- messageStatusChangeNotificationsEnabled: "__advanced" in integration ? integration.__advanced?.messageStatusChangeNotificationsEnabled : void 0
73
+ extraOperations: "__advanced" in integration ? integration.__advanced?.extraOperations : void 0
74
74
  });
75
75
  const prepareUpdateIntegrationBody = (localIntegration, remoteIntegration) => {
76
76
  const actions = utils.attributes.prepareAttributeUpdateBody({
@@ -96,7 +96,7 @@ const prepareUpdateIntegrationBody = (localIntegration, remoteIntegration) => {
96
96
  const readme = localIntegration.readme;
97
97
  const icon = localIntegration.icon;
98
98
  const attributes = utils.records.setNullOnMissingValues(localIntegration.attributes, remoteIntegration.attributes);
99
- const messageStatusChangeNotificationsEnabled = localIntegration.messageStatusChangeNotificationsEnabled;
99
+ const extraOperations = localIntegration.extraOperations;
100
100
  return {
101
101
  ..._maybeRemoveVrlScripts(localIntegration, remoteIntegration),
102
102
  actions,
@@ -110,7 +110,7 @@ const prepareUpdateIntegrationBody = (localIntegration, remoteIntegration) => {
110
110
  readme,
111
111
  icon,
112
112
  attributes,
113
- messageStatusChangeNotificationsEnabled
113
+ extraOperations
114
114
  };
115
115
  };
116
116
  const _maybeRemoveVrlScripts = (localIntegration, remoteIntegration) => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/api/integration-body.ts"],
4
- "sourcesContent": ["import * as client from '@botpress/client'\nimport * as sdk from '@botpress/sdk'\nimport * as utils from '../utils'\nimport * as types from './types'\n\nexport const prepareCreateIntegrationBody = async (\n integration: sdk.IntegrationDefinition | sdk.IntegrationPackage['definition']\n): Promise<types.CreateIntegrationRequestBody> => ({\n name: integration.name,\n version: integration.version,\n title: 'title' in integration ? integration.title : undefined,\n description: 'description' in integration ? integration.description : undefined,\n user: integration.user,\n events: integration.events\n ? await utils.records.mapValuesAsync(integration.events, async (event) => ({\n ...event,\n schema: await utils.schema.mapZodToJsonSchema(event),\n }))\n : undefined,\n actions: integration.actions\n ? await utils.records.mapValuesAsync(integration.actions, async (action) => ({\n ...action,\n input: {\n ...action.input,\n schema: await utils.schema.mapZodToJsonSchema(action.input),\n },\n output: {\n ...action.output,\n schema: await utils.schema.mapZodToJsonSchema(action.output),\n },\n }))\n : undefined,\n channels: integration.channels\n ? await utils.records.mapValuesAsync(integration.channels, async (channel) => ({\n ...channel,\n messages: await utils.records.mapValuesAsync(channel.messages, async (message) => ({\n ...message,\n schema: await utils.schema.mapZodToJsonSchema(message),\n })),\n }))\n : undefined,\n states: integration.states\n ? await utils.records.mapValuesAsync(integration.states, async (state) => ({\n ...state,\n schema: await utils.schema.mapZodToJsonSchema(state),\n }))\n : undefined,\n entities: integration.entities\n ? await utils.records.mapValuesAsync(integration.entities, async (entity) => ({\n ...entity,\n schema: await utils.schema.mapZodToJsonSchema(entity),\n }))\n : undefined,\n attributes: integration.attributes,\n messageStatusChangeNotificationsEnabled:\n '__advanced' in integration ? integration.__advanced?.messageStatusChangeNotificationsEnabled : undefined,\n})\n\ntype UpdateIntegrationChannelsBody = NonNullable<types.UpdateIntegrationRequestBody['channels']>\ntype UpdateIntegrationChannelBody = UpdateIntegrationChannelsBody[string]\ntype Channels = client.Integration['channels']\ntype Channel = client.Integration['channels'][string]\nexport const prepareUpdateIntegrationBody = (\n localIntegration: types.UpdateIntegrationRequestBody,\n remoteIntegration: client.Integration\n): types.UpdateIntegrationRequestBody => {\n const actions = utils.attributes.prepareAttributeUpdateBody({\n localItems: utils.records.setNullOnMissingValues(localIntegration.actions, remoteIntegration.actions),\n remoteItems: remoteIntegration.actions,\n })\n const events = utils.attributes.prepareAttributeUpdateBody({\n localItems: utils.records.setNullOnMissingValues(localIntegration.events, remoteIntegration.events),\n remoteItems: remoteIntegration.events,\n })\n const states = utils.records.setNullOnMissingValues(localIntegration.states, remoteIntegration.states)\n const entities = utils.records.setNullOnMissingValues(localIntegration.entities, remoteIntegration.entities)\n const user = {\n ...localIntegration.user,\n tags: utils.records.setNullOnMissingValues(localIntegration.user?.tags, remoteIntegration.user?.tags),\n }\n\n const channels = _prepareUpdateIntegrationChannelsBody(localIntegration.channels ?? {}, remoteIntegration.channels)\n\n const interfaces = utils.records.setNullOnMissingValues(localIntegration.interfaces, remoteIntegration.interfaces)\n\n const configurations = utils.records.setNullOnMissingValues(\n localIntegration.configurations,\n remoteIntegration.configurations\n )\n\n const readme = localIntegration.readme\n const icon = localIntegration.icon\n\n const attributes = utils.records.setNullOnMissingValues(localIntegration.attributes, remoteIntegration.attributes)\n\n const messageStatusChangeNotificationsEnabled = localIntegration.messageStatusChangeNotificationsEnabled\n return {\n ..._maybeRemoveVrlScripts(localIntegration, remoteIntegration),\n actions,\n events,\n states,\n entities,\n user,\n channels,\n interfaces,\n configurations,\n readme,\n icon,\n attributes,\n messageStatusChangeNotificationsEnabled,\n }\n}\n\nconst _maybeRemoveVrlScripts = (\n localIntegration: types.UpdateIntegrationRequestBody,\n remoteIntegration: client.Integration\n): types.UpdateIntegrationRequestBody => {\n const newIntegration = structuredClone(localIntegration)\n\n if (\n remoteIntegration.configuration?.identifier?.linkTemplateScript &&\n !localIntegration.configuration?.identifier?.linkTemplateScript\n ) {\n newIntegration.configuration ??= remoteIntegration.configuration\n newIntegration.configuration.identifier ??= remoteIntegration.configuration.identifier\n newIntegration.configuration.identifier.linkTemplateScript = null\n newIntegration.configuration.identifier.required = false\n }\n\n if (remoteIntegration.identifier.extractScript && !localIntegration.identifier?.extractScript) {\n newIntegration.identifier ??= remoteIntegration.identifier\n newIntegration.identifier.extractScript = null\n }\n\n if (remoteIntegration.identifier.fallbackHandlerScript && !localIntegration.identifier?.fallbackHandlerScript) {\n newIntegration.identifier ??= remoteIntegration.identifier\n newIntegration.identifier.fallbackHandlerScript = null\n }\n\n for (const configName of Object.keys(localIntegration.configurations ?? {})) {\n if (\n remoteIntegration.configurations[configName]?.identifier.linkTemplateScript &&\n !localIntegration.configurations?.[configName]?.identifier?.linkTemplateScript\n ) {\n newIntegration.configurations ??= remoteIntegration.configurations\n newIntegration.configurations[configName] ??= remoteIntegration.configurations[configName]\n newIntegration.configurations[configName].identifier ??= remoteIntegration.configurations[configName].identifier\n newIntegration.configurations[configName].identifier.linkTemplateScript = null\n newIntegration.configurations[configName].identifier.required = false\n }\n }\n\n return newIntegration\n}\n\nconst _prepareUpdateIntegrationChannelsBody = (\n localChannels: UpdateIntegrationChannelsBody,\n remoteChannels: Channels\n): UpdateIntegrationChannelsBody => {\n const channelBody: UpdateIntegrationChannelsBody = {}\n\n const zipped = utils.records.zipObjects(localChannels, remoteChannels)\n for (const [channelName, [localChannel, remoteChannel]] of Object.entries(zipped)) {\n if (localChannel && remoteChannel) {\n // channel has to be updated\n channelBody[channelName] = _prepareUpdateIntegrationChannelBody(localChannel, remoteChannel)\n } else if (localChannel) {\n // channel has to be created\n channelBody[channelName] = localChannel\n continue\n } else if (remoteChannel) {\n // channel has to be deleted\n channelBody[channelName] = null\n continue\n }\n }\n\n return channelBody\n}\n\nconst _prepareUpdateIntegrationChannelBody = (\n localChannel: UpdateIntegrationChannelBody,\n remoteChannel: Channel\n): UpdateIntegrationChannelBody => ({\n ...localChannel,\n messages: utils.records.setNullOnMissingValues(localChannel?.messages, remoteChannel.messages),\n message: {\n ...localChannel?.message,\n tags: utils.records.setNullOnMissingValues(localChannel?.message?.tags, remoteChannel.message.tags),\n },\n conversation: {\n ...localChannel?.conversation,\n tags: utils.records.setNullOnMissingValues(localChannel?.conversation?.tags, remoteChannel.conversation.tags),\n },\n})\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,YAAuB;AAGhB,MAAM,+BAA+B,OAC1C,iBACiD;AAAA,EACjD,MAAM,YAAY;AAAA,EAClB,SAAS,YAAY;AAAA,EACrB,OAAO,WAAW,cAAc,YAAY,QAAQ;AAAA,EACpD,aAAa,iBAAiB,cAAc,YAAY,cAAc;AAAA,EACtE,MAAM,YAAY;AAAA,EACl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AAW,cAAc;AAEvB,kBAAY,WAAW,IAAI;AAC3B;AAAA,IACF,WAAW,eAAe;AAExB,kBAAY,WAAW,IAAI;AAC3B;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEA,MAAM,uCAAuC,CAC3C,cACA,mBACkC;AAAA,EAClC,GAAG;AAAA,EACH,UAAU,MAAM,QAAQ,uBAAuB,cAAc,UAAU,cAAc,QAAQ;AAAA,EAC7F,SAAS;AAAA,IACP,GAAG,cAAc;AAAA,IACjB,MAAM,MAAM,QAAQ,uBAAuB,cAAc,SAAS,MAAM,cAAc,QAAQ,IAAI;AAAA,EACpG;AAAA,EACA,cAAc;AAAA,IACZ,GAAG,cAAc;AAAA,IACjB,MAAM,MAAM,QAAQ,uBAAuB,cAAc,cAAc,MAAM,cAAc,aAAa,IAAI;AAAA,EAC9G;AACF;",
4
+ "sourcesContent": ["import * as client from '@botpress/client'\nimport * as sdk from '@botpress/sdk'\nimport * as utils from '../utils'\nimport * as types from './types'\n\nexport const prepareCreateIntegrationBody = async (\n integration: sdk.IntegrationDefinition | sdk.IntegrationPackage['definition']\n): Promise<types.CreateIntegrationRequestBody> => ({\n name: integration.name,\n version: integration.version,\n title: 'title' in integration ? integration.title : undefined,\n description: 'description' in integration ? integration.description : undefined,\n user: integration.user,\n events: integration.events\n ? await utils.records.mapValuesAsync(integration.events, async (event) => ({\n ...event,\n schema: await utils.schema.mapZodToJsonSchema(event),\n }))\n : undefined,\n actions: integration.actions\n ? await utils.records.mapValuesAsync(integration.actions, async (action) => ({\n ...action,\n input: {\n ...action.input,\n schema: await utils.schema.mapZodToJsonSchema(action.input),\n },\n output: {\n ...action.output,\n schema: await utils.schema.mapZodToJsonSchema(action.output),\n },\n }))\n : undefined,\n channels: integration.channels\n ? await utils.records.mapValuesAsync(integration.channels, async (channel) => ({\n ...channel,\n messages: await utils.records.mapValuesAsync(channel.messages, async (message) => ({\n ...message,\n schema: await utils.schema.mapZodToJsonSchema(message),\n })),\n }))\n : undefined,\n states: integration.states\n ? await utils.records.mapValuesAsync(integration.states, async (state) => ({\n ...state,\n schema: await utils.schema.mapZodToJsonSchema(state),\n }))\n : undefined,\n entities: integration.entities\n ? await utils.records.mapValuesAsync(integration.entities, async (entity) => ({\n ...entity,\n schema: await utils.schema.mapZodToJsonSchema(entity),\n }))\n : undefined,\n attributes: integration.attributes,\n extraOperations: '__advanced' in integration ? integration.__advanced?.extraOperations : undefined,\n})\n\ntype UpdateIntegrationChannelsBody = NonNullable<types.UpdateIntegrationRequestBody['channels']>\ntype UpdateIntegrationChannelBody = UpdateIntegrationChannelsBody[string]\ntype Channels = client.Integration['channels']\ntype Channel = client.Integration['channels'][string]\nexport const prepareUpdateIntegrationBody = (\n localIntegration: types.UpdateIntegrationRequestBody,\n remoteIntegration: client.Integration\n): types.UpdateIntegrationRequestBody => {\n const actions = utils.attributes.prepareAttributeUpdateBody({\n localItems: utils.records.setNullOnMissingValues(localIntegration.actions, remoteIntegration.actions),\n remoteItems: remoteIntegration.actions,\n })\n const events = utils.attributes.prepareAttributeUpdateBody({\n localItems: utils.records.setNullOnMissingValues(localIntegration.events, remoteIntegration.events),\n remoteItems: remoteIntegration.events,\n })\n const states = utils.records.setNullOnMissingValues(localIntegration.states, remoteIntegration.states)\n const entities = utils.records.setNullOnMissingValues(localIntegration.entities, remoteIntegration.entities)\n const user = {\n ...localIntegration.user,\n tags: utils.records.setNullOnMissingValues(localIntegration.user?.tags, remoteIntegration.user?.tags),\n }\n\n const channels = _prepareUpdateIntegrationChannelsBody(localIntegration.channels ?? {}, remoteIntegration.channels)\n\n const interfaces = utils.records.setNullOnMissingValues(localIntegration.interfaces, remoteIntegration.interfaces)\n\n const configurations = utils.records.setNullOnMissingValues(\n localIntegration.configurations,\n remoteIntegration.configurations\n )\n\n const readme = localIntegration.readme\n const icon = localIntegration.icon\n\n const attributes = utils.records.setNullOnMissingValues(localIntegration.attributes, remoteIntegration.attributes)\n\n const extraOperations = localIntegration.extraOperations\n return {\n ..._maybeRemoveVrlScripts(localIntegration, remoteIntegration),\n actions,\n events,\n states,\n entities,\n user,\n channels,\n interfaces,\n configurations,\n readme,\n icon,\n attributes,\n extraOperations,\n }\n}\n\nconst _maybeRemoveVrlScripts = (\n localIntegration: types.UpdateIntegrationRequestBody,\n remoteIntegration: client.Integration\n): types.UpdateIntegrationRequestBody => {\n const newIntegration = structuredClone(localIntegration)\n\n if (\n remoteIntegration.configuration?.identifier?.linkTemplateScript &&\n !localIntegration.configuration?.identifier?.linkTemplateScript\n ) {\n newIntegration.configuration ??= remoteIntegration.configuration\n newIntegration.configuration.identifier ??= remoteIntegration.configuration.identifier\n newIntegration.configuration.identifier.linkTemplateScript = null\n newIntegration.configuration.identifier.required = false\n }\n\n if (remoteIntegration.identifier.extractScript && !localIntegration.identifier?.extractScript) {\n newIntegration.identifier ??= remoteIntegration.identifier\n newIntegration.identifier.extractScript = null\n }\n\n if (remoteIntegration.identifier.fallbackHandlerScript && !localIntegration.identifier?.fallbackHandlerScript) {\n newIntegration.identifier ??= remoteIntegration.identifier\n newIntegration.identifier.fallbackHandlerScript = null\n }\n\n for (const configName of Object.keys(localIntegration.configurations ?? {})) {\n if (\n remoteIntegration.configurations[configName]?.identifier.linkTemplateScript &&\n !localIntegration.configurations?.[configName]?.identifier?.linkTemplateScript\n ) {\n newIntegration.configurations ??= remoteIntegration.configurations\n newIntegration.configurations[configName] ??= remoteIntegration.configurations[configName]\n newIntegration.configurations[configName].identifier ??= remoteIntegration.configurations[configName].identifier\n newIntegration.configurations[configName].identifier.linkTemplateScript = null\n newIntegration.configurations[configName].identifier.required = false\n }\n }\n\n return newIntegration\n}\n\nconst _prepareUpdateIntegrationChannelsBody = (\n localChannels: UpdateIntegrationChannelsBody,\n remoteChannels: Channels\n): UpdateIntegrationChannelsBody => {\n const channelBody: UpdateIntegrationChannelsBody = {}\n\n const zipped = utils.records.zipObjects(localChannels, remoteChannels)\n for (const [channelName, [localChannel, remoteChannel]] of Object.entries(zipped)) {\n if (localChannel && remoteChannel) {\n // channel has to be updated\n channelBody[channelName] = _prepareUpdateIntegrationChannelBody(localChannel, remoteChannel)\n } else if (localChannel) {\n // channel has to be created\n channelBody[channelName] = localChannel\n continue\n } else if (remoteChannel) {\n // channel has to be deleted\n channelBody[channelName] = null\n continue\n }\n }\n\n return channelBody\n}\n\nconst _prepareUpdateIntegrationChannelBody = (\n localChannel: UpdateIntegrationChannelBody,\n remoteChannel: Channel\n): UpdateIntegrationChannelBody => ({\n ...localChannel,\n messages: utils.records.setNullOnMissingValues(localChannel?.messages, remoteChannel.messages),\n message: {\n ...localChannel?.message,\n tags: utils.records.setNullOnMissingValues(localChannel?.message?.tags, remoteChannel.message.tags),\n },\n conversation: {\n ...localChannel?.conversation,\n tags: utils.records.setNullOnMissingValues(localChannel?.conversation?.tags, remoteChannel.conversation.tags),\n },\n})\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,YAAuB;AAGhB,MAAM,+BAA+B,OAC1C,iBACiD;AAAA,EACjD,MAAM,YAAY;AAAA,EAClB,SAAS,YAAY;AAAA,EACrB,OAAO,WAAW,cAAc,YAAY,QAAQ;AAAA,EACpD,aAAa,iBAAiB,cAAc,YAAY,cAAc;AAAA,EACtE,MAAM,YAAY;AAAA,EAClB,QAAQ,YAAY,SAChB,MAAM,MAAM,QAAQ,eAAe,YAAY,QAAQ,OAAO,WAAW;AAAA,IACvE,GAAG;AAAA,IACH,QAAQ,MAAM,MAAM,OAAO,mBAAmB,KAAK;AAAA,EACrD,EAAE,IACF;AAAA,EACJ,SAAS,YAAY,UACjB,MAAM,MAAM,QAAQ,eAAe,YAAY,SAAS,OAAO,YAAY;AAAA,IACzE,GAAG;AAAA,IACH,OAAO;AAAA,MACL,GAAG,OAAO;AAAA,MACV,QAAQ,MAAM,MAAM,OAAO,mBAAmB,OAAO,KAAK;AAAA,IAC5D;AAAA,IACA,QAAQ;AAAA,MACN,GAAG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,cAAc;AAAA,IACZ,GAAG,cAAc;AAAA,IACjB,MAAM,MAAM,QAAQ,uBAAuB,cAAc,cAAc,MAAM,cAAc,aAAa,IAAI;AAAA,EAC9G;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/code-generation/plugin-implementation/plugin-typings/configuration-module.ts"],
4
- "sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport { INDEX_FILE } from '../../consts'\nimport { zuiSchemaToTypeScriptType } from '../../generators'\nimport { Module } from '../../module'\nimport * as strings from '../../strings'\n\nexport class DefaultConfigurationModule extends Module {\n public constructor(private _configuration: sdk.BotConfigurationDefinition | undefined) {\n const name = 'configuration'\n const exportName = strings.typeName(name)\n super({\n path: INDEX_FILE,\n exportName,\n })\n }\n\n public async getContent() {\n if (!this._configuration) {\n return ['/** Default Configuration of the Plugin */', 'export type Configuration = Record<string, never>;'].join(\n '\\n'\n )\n }\n return zuiSchemaToTypeScriptType(this._configuration.schema, this.exportName)\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA2B;AAC3B,wBAA0C;AAC1C,oBAAuB;AACvB,cAAyB;AAElB,MAAM,mCAAmC,qBAAO;AAAA,EAC9C,YAAoB,gBAA4D;AACrF,UAAM,OAAO;AACb,UAAM,aAAa,QAAQ,SAAS,IAAI;AACxC,UAAM;AAAA,MACJ,MAAM;AAAA,MACN;AAAA,IACF,CAAC;AANwB;AAAA,EAO3B;AAAA,EAEA,MAAa,aAAa;AACxB,QAAI,CAAC,KAAK,gBAAgB;AACxB,aAAO,CAAC,8CAA8C,oDAAoD,EAAE;AAAA,QAC1G;AAAA,MACF;AAAA,IACF;AACA,eAAO,6CAA0B,KAAK,eAAe,QAAQ,KAAK,UAAU;AAAA,EAC9E;AACF;",
4
+ "sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport { INDEX_FILE } from '../../consts'\nimport { zuiSchemaToTypeScriptType } from '../../generators'\nimport { Module } from '../../module'\nimport * as strings from '../../strings'\n\nexport class DefaultConfigurationModule extends Module {\n public constructor(private _configuration: sdk.PluginDefinition['configuration']) {\n const name = 'configuration'\n const exportName = strings.typeName(name)\n super({\n path: INDEX_FILE,\n exportName,\n })\n }\n\n public async getContent() {\n if (!this._configuration) {\n return ['/** Default Configuration of the Plugin */', 'export type Configuration = Record<string, never>;'].join(\n '\\n'\n )\n }\n return zuiSchemaToTypeScriptType(this._configuration.schema, this.exportName)\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA2B;AAC3B,wBAA0C;AAC1C,oBAAuB;AACvB,cAAyB;AAElB,MAAM,mCAAmC,qBAAO;AAAA,EAC9C,YAAoB,gBAAuD;AAChF,UAAM,OAAO;AACb,UAAM,aAAa,QAAQ,SAAS,IAAI;AACxC,UAAM;AAAA,MACJ,MAAM;AAAA,MACN;AAAA,IACF,CAAC;AANwB;AAAA,EAO3B;AAAA,EAEA,MAAa,aAAa;AACxB,QAAI,CAAC,KAAK,gBAAgB;AACxB,aAAO,CAAC,8CAA8C,oDAAoD,EAAE;AAAA,QAC1G;AAAA,MACF;AAAA,IACF;AACA,eAAO,6CAA0B,KAAK,eAAe,QAAQ,KAAK,UAAU;AAAA,EAC9E;AACF;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/cli",
3
- "version": "4.10.2",
3
+ "version": "4.11.1",
4
4
  "description": "Botpress CLI",
5
5
  "scripts": {
6
6
  "build": "pnpm run bundle && pnpm run template:gen",
@@ -21,8 +21,8 @@
21
21
  "dependencies": {
22
22
  "@apidevtools/json-schema-ref-parser": "^11.7.0",
23
23
  "@botpress/chat": "0.5.1",
24
- "@botpress/client": "1.16.1",
25
- "@botpress/sdk": "4.13.0",
24
+ "@botpress/client": "1.17.1",
25
+ "@botpress/sdk": "4.14.1",
26
26
  "@bpinternal/const": "^0.1.0",
27
27
  "@bpinternal/tunnel": "^0.1.1",
28
28
  "@bpinternal/yargs-extra": "^0.0.3",
@@ -5,8 +5,8 @@
5
5
  },
6
6
  "private": true,
7
7
  "dependencies": {
8
- "@botpress/client": "1.16.1",
9
- "@botpress/sdk": "4.13.0"
8
+ "@botpress/client": "1.17.1",
9
+ "@botpress/sdk": "4.14.1"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@types/node": "^18.19.67",
@@ -6,8 +6,8 @@
6
6
  },
7
7
  "private": true,
8
8
  "dependencies": {
9
- "@botpress/client": "1.16.1",
10
- "@botpress/sdk": "4.13.0"
9
+ "@botpress/client": "1.17.1",
10
+ "@botpress/sdk": "4.14.1"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/node": "^18.19.67",
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "private": true,
8
8
  "dependencies": {
9
- "@botpress/sdk": "4.13.0"
9
+ "@botpress/sdk": "4.14.1"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@types/node": "^18.19.67",
@@ -6,8 +6,8 @@
6
6
  },
7
7
  "private": true,
8
8
  "dependencies": {
9
- "@botpress/client": "1.16.1",
10
- "@botpress/sdk": "4.13.0"
9
+ "@botpress/client": "1.17.1",
10
+ "@botpress/sdk": "4.14.1"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/node": "^18.19.67",
@@ -6,8 +6,8 @@
6
6
  },
7
7
  "private": true,
8
8
  "dependencies": {
9
- "@botpress/client": "1.16.1",
10
- "@botpress/sdk": "4.13.0",
9
+ "@botpress/client": "1.17.1",
10
+ "@botpress/sdk": "4.14.1",
11
11
  "axios": "^1.6.8"
12
12
  },
13
13
  "devDependencies": {