@botpress/cli 0.4.8 → 0.4.10
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/dist/code-generation/integration-schemas/configuration-module.js +8 -1
- package/dist/code-generation/integration-schemas/configuration-module.js.map +2 -2
- package/dist/code-generation/typings.js.map +1 -1
- package/dist/command-implementations/deploy-command.js +32 -3
- package/dist/command-implementations/deploy-command.js.map +2 -2
- package/package.json +3 -3
- package/templates/echo-bot/package.json +2 -2
- package/templates/empty-integration/package.json +2 -2
|
@@ -26,7 +26,14 @@ var import_generators = require("../generators");
|
|
|
26
26
|
var import_module = require("../module");
|
|
27
27
|
class ConfigurationModule extends import_module.Module {
|
|
28
28
|
static async create(configuration) {
|
|
29
|
-
const schema = configuration
|
|
29
|
+
const { schema } = configuration;
|
|
30
|
+
if (!schema) {
|
|
31
|
+
return new ConfigurationModule({
|
|
32
|
+
path: import_const.INDEX_FILE,
|
|
33
|
+
exportName: "Configuration",
|
|
34
|
+
content: "export type Configuration = Record<string, never>;"
|
|
35
|
+
});
|
|
36
|
+
}
|
|
30
37
|
const name = "configuration";
|
|
31
38
|
return new ConfigurationModule({
|
|
32
39
|
path: import_const.INDEX_FILE,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/code-generation/integration-schemas/configuration-module.ts"],
|
|
4
|
-
"sourcesContent": ["import { INDEX_FILE } from '../const'\nimport { jsonSchemaToTypeScriptType } from '../generators'\nimport { Module } from '../module'\nimport type * as types from '../typings'\n\nexport class ConfigurationModule extends Module {\n public static async create(configuration: types.ConfigurationDefinition): Promise<ConfigurationModule> {\n const schema = configuration
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2B;AAC3B,wBAA2C;AAC3C,oBAAuB;AAGhB,MAAM,4BAA4B,qBAAO;AAAA,EAC9C,aAAoB,OAAO,eAA4E;AACrG,UAAM,SAAS,
|
|
4
|
+
"sourcesContent": ["import { INDEX_FILE } from '../const'\nimport { jsonSchemaToTypeScriptType } from '../generators'\nimport { Module } from '../module'\nimport type * as types from '../typings'\n\nexport class ConfigurationModule extends Module {\n public static async create(configuration: types.ConfigurationDefinition): Promise<ConfigurationModule> {\n const { schema } = configuration\n if (!schema) {\n return new ConfigurationModule({\n path: INDEX_FILE,\n exportName: 'Configuration',\n content: 'export type Configuration = Record<string, never>;',\n })\n }\n\n const name = 'configuration'\n return new ConfigurationModule({\n path: INDEX_FILE,\n exportName: 'Configuration',\n content: await jsonSchemaToTypeScriptType(schema, name),\n })\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2B;AAC3B,wBAA2C;AAC3C,oBAAuB;AAGhB,MAAM,4BAA4B,qBAAO;AAAA,EAC9C,aAAoB,OAAO,eAA4E;AACrG,UAAM,EAAE,OAAO,IAAI;AACnB,QAAI,CAAC,QAAQ;AACX,aAAO,IAAI,oBAAoB;AAAA,QAC7B,MAAM;AAAA,QACN,YAAY;AAAA,QACZ,SAAS;AAAA,MACX,CAAC;AAAA,IACH;AAEA,UAAM,OAAO;AACb,WAAO,IAAI,oBAAoB;AAAA,MAC7B,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,SAAS,UAAM,8CAA2B,QAAQ,IAAI;AAAA,IACxD,CAAC;AAAA,EACH;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/code-generation/typings.ts"],
|
|
4
|
-
"sourcesContent": ["import { Integration } from '@botpress/client'\n\nexport type File = { path: string; content: string }\n\nexport type IntegrationDefinition = Pick<\n Integration,\n 'name' | 'version' | '
|
|
4
|
+
"sourcesContent": ["import { Integration } from '@botpress/client'\n\nexport type File = { path: string; content: string }\n\nexport type IntegrationDefinition = Pick<\n Integration,\n 'name' | 'version' | 'channels' | 'states' | 'events' | 'actions' | 'user'\n> & {\n id: string | null\n configuration: Omit<Integration['configuration'], 'identifier'>\n}\n\ntype Def<T> = NonNullable<T>\n\nexport type ConfigurationDefinition = Def<IntegrationDefinition['configuration']>\nexport type ChannelDefinition = Def<IntegrationDefinition['channels']>[string]\nexport type MessageDefinition = Def<ChannelDefinition['messages']>[string]\nexport type ActionDefinition = Def<IntegrationDefinition['actions']>[string]\nexport type EventDefinition = Def<IntegrationDefinition['events']>[string]\nexport type StateDefinition = Def<IntegrationDefinition['states']>[string]\nexport type UserDefinition = Def<IntegrationDefinition['user']>\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -61,9 +61,18 @@ class DeployCommand extends import_project_command.ProjectCommand {
|
|
|
61
61
|
for (const [secretName, secretValue] of Object.entries(secrets)) {
|
|
62
62
|
code = code.replace(new RegExp(`process\\.env\\.${secretName}`, "g"), `"${secretValue}"`);
|
|
63
63
|
}
|
|
64
|
-
const {
|
|
64
|
+
const {
|
|
65
|
+
name,
|
|
66
|
+
version,
|
|
67
|
+
icon: iconRelativeFilePath,
|
|
68
|
+
readme: readmeRelativeFilePath,
|
|
69
|
+
identifier,
|
|
70
|
+
configuration
|
|
71
|
+
} = integrationDef;
|
|
65
72
|
const iconFileContent = await this._readMediaFile("icon", iconRelativeFilePath);
|
|
66
73
|
const readmeFileContent = await this._readMediaFile("readme", readmeRelativeFilePath);
|
|
74
|
+
const identifierExtractScriptFileContent = await this._readFile(identifier?.extractScript);
|
|
75
|
+
const identifierLinkTemplateFileContent = await this._readFile(configuration?.identifier?.linkTemplateScript);
|
|
67
76
|
const integration = await api.findIntegration({ type: "name", name, version });
|
|
68
77
|
if (integration && !integration.workspaceId) {
|
|
69
78
|
throw new errors.BotpressCLIError(
|
|
@@ -82,11 +91,22 @@ class DeployCommand extends import_project_command.ProjectCommand {
|
|
|
82
91
|
this.logger.log("Aborted");
|
|
83
92
|
return;
|
|
84
93
|
}
|
|
94
|
+
const integrationDefinition = this.prepareIntegrationDefinition(integrationDef);
|
|
85
95
|
const createBody = {
|
|
86
|
-
...
|
|
96
|
+
...integrationDefinition,
|
|
97
|
+
code,
|
|
87
98
|
icon: iconFileContent,
|
|
88
99
|
readme: readmeFileContent,
|
|
89
|
-
|
|
100
|
+
configuration: {
|
|
101
|
+
...integrationDefinition.configuration,
|
|
102
|
+
identifier: {
|
|
103
|
+
...integrationDefinition.configuration?.identifier ?? {},
|
|
104
|
+
linkTemplateScript: identifierLinkTemplateFileContent
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
identifier: {
|
|
108
|
+
extractScript: identifierExtractScriptFileContent
|
|
109
|
+
}
|
|
90
110
|
};
|
|
91
111
|
const line = this.logger.line();
|
|
92
112
|
line.started(`Deploying integration ${import_chalk.default.bold(integrationDef.name)} v${integrationDef.version}...`);
|
|
@@ -108,6 +128,15 @@ class DeployCommand extends import_project_command.ProjectCommand {
|
|
|
108
128
|
}
|
|
109
129
|
line.success("Integration deployed");
|
|
110
130
|
}
|
|
131
|
+
_readFile = async (filePath) => {
|
|
132
|
+
if (!filePath) {
|
|
133
|
+
return void 0;
|
|
134
|
+
}
|
|
135
|
+
const absoluteFilePath = utils.path.absoluteFrom(this.projectPaths.abs.workDir, filePath);
|
|
136
|
+
return fs.promises.readFile(absoluteFilePath, "utf-8").catch((thrown) => {
|
|
137
|
+
throw errors.BotpressCLIError.wrap(thrown, `Could not read file "${absoluteFilePath}"`);
|
|
138
|
+
});
|
|
139
|
+
};
|
|
111
140
|
_readMediaFile = async (filePurpose, filePath) => {
|
|
112
141
|
if (!filePath) {
|
|
113
142
|
return void 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/command-implementations/deploy-command.ts"],
|
|
4
|
-
"sourcesContent": ["import type * as bpclient from '@botpress/client'\nimport type * as bpsdk from '@botpress/sdk'\nimport chalk from 'chalk'\nimport * as fs from 'fs'\nimport { prepareUpdateBotBody } from '../api/bot-body'\nimport type { ApiClient } from '../api/client'\nimport { prepareUpdateIntegrationBody, CreateIntegrationBody } from '../api/integration-body'\nimport type commandDefinitions from '../command-definitions'\nimport * as consts from '../consts'\nimport * as errors from '../errors'\nimport * as utils from '../utils'\nimport { BuildCommand } from './build-command'\nimport { ProjectCommand } from './project-command'\n\nexport type DeployCommandDefinition = typeof commandDefinitions.deploy\nexport class DeployCommand extends ProjectCommand<DeployCommandDefinition> {\n public async run(): Promise<void> {\n const api = await this.ensureLoginAndCreateClient(this.argv)\n if (api.url !== consts.defaultBotpressApiUrl) {\n this.logger.log(`Using custom url ${api.url}`)\n }\n\n if (!this.argv.noBuild) {\n await this._runBuild() // This ensures the bundle is always synced with source code\n }\n\n const integrationDef = await this.readIntegrationDefinitionFromFS()\n if (integrationDef) {\n return this._deployIntegration(api, integrationDef)\n }\n return this._deployBot(api, this.argv.botId, this.argv.createNewBot)\n }\n\n private async _runBuild() {\n return new BuildCommand(this.api, this.prompt, this.logger, this.argv).run()\n }\n\n private async _deployIntegration(api: ApiClient, integrationDef: bpsdk.IntegrationDefinition) {\n const outfile = this.projectPaths.abs.outFile\n let code = await fs.promises.readFile(outfile, 'utf-8')\n\n const secrets = await this.promptSecrets(integrationDef, this.argv)\n // TODO: provide these secrets to the backend by API and remove this string replacement hack\n for (const [secretName, secretValue] of Object.entries(secrets)) {\n code = code.replace(new RegExp(`process\\\\.env\\\\.${secretName}`, 'g'), `\"${secretValue}\"`)\n }\n\n const {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAAkB;AAClB,SAAoB;AACpB,sBAAqC;AAErC,8BAAoE;AAEpE,aAAwB;AACxB,aAAwB;AACxB,YAAuB;AACvB,2BAA6B;AAC7B,6BAA+B;AAGxB,MAAM,sBAAsB,sCAAwC;AAAA,EACzE,MAAa,MAAqB;AAChC,UAAM,MAAM,MAAM,KAAK,2BAA2B,KAAK,IAAI;AAC3D,QAAI,IAAI,QAAQ,OAAO,uBAAuB;AAC5C,WAAK,OAAO,IAAI,oBAAoB,IAAI,KAAK;AAAA,IAC/C;AAEA,QAAI,CAAC,KAAK,KAAK,SAAS;AACtB,YAAM,KAAK,UAAU;AAAA,IACvB;AAEA,UAAM,iBAAiB,MAAM,KAAK,gCAAgC;AAClE,QAAI,gBAAgB;AAClB,aAAO,KAAK,mBAAmB,KAAK,cAAc;AAAA,IACpD;AACA,WAAO,KAAK,WAAW,KAAK,KAAK,KAAK,OAAO,KAAK,KAAK,YAAY;AAAA,EACrE;AAAA,EAEA,MAAc,YAAY;AACxB,WAAO,IAAI,kCAAa,KAAK,KAAK,KAAK,QAAQ,KAAK,QAAQ,KAAK,IAAI,EAAE,IAAI;AAAA,EAC7E;AAAA,EAEA,MAAc,mBAAmB,KAAgB,gBAA6C;AAC5F,UAAM,UAAU,KAAK,aAAa,IAAI;AACtC,QAAI,OAAO,MAAM,GAAG,SAAS,SAAS,SAAS,OAAO;AAEtD,UAAM,UAAU,MAAM,KAAK,cAAc,gBAAgB,KAAK,IAAI;AAElE,eAAW,CAAC,YAAY,WAAW,KAAK,OAAO,QAAQ,OAAO,GAAG;AAC/D,aAAO,KAAK,QAAQ,IAAI,OAAO,mBAAmB,cAAc,GAAG,GAAG,IAAI,cAAc;AAAA,IAC1F;AAEA,UAAM,
|
|
4
|
+
"sourcesContent": ["import type * as bpclient from '@botpress/client'\nimport type * as bpsdk from '@botpress/sdk'\nimport chalk from 'chalk'\nimport * as fs from 'fs'\nimport { prepareUpdateBotBody } from '../api/bot-body'\nimport type { ApiClient } from '../api/client'\nimport { prepareUpdateIntegrationBody, CreateIntegrationBody } from '../api/integration-body'\nimport type commandDefinitions from '../command-definitions'\nimport * as consts from '../consts'\nimport * as errors from '../errors'\nimport * as utils from '../utils'\nimport { BuildCommand } from './build-command'\nimport { ProjectCommand } from './project-command'\n\nexport type DeployCommandDefinition = typeof commandDefinitions.deploy\nexport class DeployCommand extends ProjectCommand<DeployCommandDefinition> {\n public async run(): Promise<void> {\n const api = await this.ensureLoginAndCreateClient(this.argv)\n if (api.url !== consts.defaultBotpressApiUrl) {\n this.logger.log(`Using custom url ${api.url}`)\n }\n\n if (!this.argv.noBuild) {\n await this._runBuild() // This ensures the bundle is always synced with source code\n }\n\n const integrationDef = await this.readIntegrationDefinitionFromFS()\n if (integrationDef) {\n return this._deployIntegration(api, integrationDef)\n }\n return this._deployBot(api, this.argv.botId, this.argv.createNewBot)\n }\n\n private async _runBuild() {\n return new BuildCommand(this.api, this.prompt, this.logger, this.argv).run()\n }\n\n private async _deployIntegration(api: ApiClient, integrationDef: bpsdk.IntegrationDefinition) {\n const outfile = this.projectPaths.abs.outFile\n let code = await fs.promises.readFile(outfile, 'utf-8')\n\n const secrets = await this.promptSecrets(integrationDef, this.argv)\n // TODO: provide these secrets to the backend by API and remove this string replacement hack\n for (const [secretName, secretValue] of Object.entries(secrets)) {\n code = code.replace(new RegExp(`process\\\\.env\\\\.${secretName}`, 'g'), `\"${secretValue}\"`)\n }\n\n const {\n name,\n version,\n icon: iconRelativeFilePath,\n readme: readmeRelativeFilePath,\n identifier,\n configuration,\n } = integrationDef\n\n const iconFileContent = await this._readMediaFile('icon', iconRelativeFilePath)\n const readmeFileContent = await this._readMediaFile('readme', readmeRelativeFilePath)\n const identifierExtractScriptFileContent = await this._readFile(identifier?.extractScript)\n const identifierLinkTemplateFileContent = await this._readFile(configuration?.identifier?.linkTemplateScript)\n\n const integration = await api.findIntegration({ type: 'name', name, version })\n if (integration && !integration.workspaceId) {\n throw new errors.BotpressCLIError(\n `Public integration ${integrationDef.name} v${integrationDef.version} is already deployed in another workspace.`\n )\n }\n\n let message: string\n if (integration) {\n this.logger.warn('Integration already exists. If you decide to deploy, it will overwrite the existing one.')\n message = `Are you sure you want to override integration ${integrationDef.name} v${integrationDef.version}?`\n } else {\n message = `Are you sure you want to deploy integration ${integrationDef.name} v${integrationDef.version}?`\n }\n\n const confirm = await this.prompt.confirm(message)\n if (!confirm) {\n this.logger.log('Aborted')\n return\n }\n\n const integrationDefinition = this.prepareIntegrationDefinition(integrationDef)\n\n const createBody: CreateIntegrationBody = {\n ...integrationDefinition,\n code,\n icon: iconFileContent,\n readme: readmeFileContent,\n configuration: {\n ...integrationDefinition.configuration,\n identifier: {\n ...(integrationDefinition.configuration?.identifier ?? {}),\n linkTemplateScript: identifierLinkTemplateFileContent,\n },\n },\n identifier: {\n extractScript: identifierExtractScriptFileContent,\n },\n }\n\n const line = this.logger.line()\n line.started(`Deploying integration ${chalk.bold(integrationDef.name)} v${integrationDef.version}...`)\n if (integration) {\n const updateBody = prepareUpdateIntegrationBody(\n {\n id: integration.id,\n ...createBody,\n },\n integration\n )\n\n await api.client.updateIntegration(updateBody).catch((thrown) => {\n throw errors.BotpressCLIError.wrap(thrown, `Could not update integration \"${integrationDef.name}\"`)\n })\n } else {\n await api.client.createIntegration(createBody).catch((thrown) => {\n throw errors.BotpressCLIError.wrap(thrown, `Could not create integration \"${integrationDef.name}\"`)\n })\n }\n line.success('Integration deployed')\n }\n\n private _readFile = async (filePath: string | undefined): Promise<string | undefined> => {\n if (!filePath) {\n return undefined\n }\n\n const absoluteFilePath = utils.path.absoluteFrom(this.projectPaths.abs.workDir, filePath)\n return fs.promises.readFile(absoluteFilePath, 'utf-8').catch((thrown) => {\n throw errors.BotpressCLIError.wrap(thrown, `Could not read file \"${absoluteFilePath}\"`)\n })\n }\n\n private _readMediaFile = async (\n filePurpose: 'icon' | 'readme',\n filePath: string | undefined\n ): Promise<string | undefined> => {\n if (!filePath) {\n return undefined\n }\n\n const absoluteFilePath = utils.path.absoluteFrom(this.projectPaths.abs.workDir, filePath)\n return fs.promises.readFile(absoluteFilePath, 'base64').catch((thrown) => {\n throw errors.BotpressCLIError.wrap(thrown, `Could not read ${filePurpose} file \"${absoluteFilePath}\"`)\n })\n }\n\n private async _deployBot(api: ApiClient, argvBotId: string | undefined, argvCreateNew: boolean | undefined) {\n const outfile = this.projectPaths.abs.outFile\n const code = await fs.promises.readFile(outfile, 'utf-8')\n const { default: botImpl } = utils.require.requireJsFile<{ default: bpsdk.Bot }>(outfile)\n\n let bot: bpclient.Bot\n if (argvBotId && argvCreateNew) {\n throw new errors.BotpressCLIError('Cannot specify both --botId and --createNew')\n } else if (argvCreateNew) {\n const confirm = await this.prompt.confirm('Are you sure you want to create a new bot ?')\n if (!confirm) {\n this.logger.log('Aborted')\n return\n }\n\n bot = await this._createNewBot(api)\n } else {\n bot = await this._getExistingBot(api, argvBotId)\n\n const confirm = await this.prompt.confirm(`Are you sure you want to deploy the bot \"${bot.name}\"?`)\n if (!confirm) {\n this.logger.log('Aborted')\n return\n }\n }\n\n const line = this.logger.line()\n line.started(`Deploying bot ${chalk.bold(bot.name)}...`)\n\n const updateBotBody = prepareUpdateBotBody(\n {\n id: bot.id,\n code,\n ...this.prepareBot(botImpl),\n ...(await this.prepareBotIntegrationInstances(botImpl, api)),\n },\n bot\n )\n\n const { bot: updatedBot } = await api.client.updateBot(updateBotBody).catch((thrown) => {\n throw errors.BotpressCLIError.wrap(thrown, `Could not update bot \"${bot.name}\"`)\n })\n line.success('Bot deployed')\n this.displayWebhookUrls(updatedBot)\n }\n\n private async _createNewBot(api: ApiClient): Promise<bpclient.Bot> {\n const line = this.logger.line()\n const { bot: createdBot } = await api.client.createBot({}).catch((thrown) => {\n throw errors.BotpressCLIError.wrap(thrown, 'Could not create bot')\n })\n line.success(`Bot created with ID \"${createdBot.id}\" and name \"${createdBot.name}\"`)\n await this.projectCache.set('botId', createdBot.id)\n return createdBot\n }\n\n private async _getExistingBot(api: ApiClient, botId: string | undefined): Promise<bpclient.Bot> {\n const promptedBotId = await this.projectCache.sync('botId', botId, async (defaultId) => {\n const userBots = await api\n .listAllPages(api.client.listBots, (r) => r.bots)\n .catch((thrown) => {\n throw errors.BotpressCLIError.wrap(thrown, 'Could not fetch existing bots')\n })\n\n if (!userBots.length) {\n throw new errors.NoBotsFoundError()\n }\n\n const initial = userBots.find((bot) => bot.id === defaultId)\n\n const prompted = await this.prompt.select('Which bot do you want to deploy?', {\n initial: initial && { title: initial.name, value: initial.id },\n choices: userBots.map((bot) => ({ title: bot.name, value: bot.id })),\n })\n\n if (!prompted) {\n throw new errors.ParamRequiredError('Bot Id')\n }\n\n return prompted\n })\n\n const { bot: fetchedBot } = await api.client.getBot({ id: promptedBotId }).catch((thrown) => {\n throw errors.BotpressCLIError.wrap(thrown, 'Could not get bot info')\n })\n\n return fetchedBot\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAAkB;AAClB,SAAoB;AACpB,sBAAqC;AAErC,8BAAoE;AAEpE,aAAwB;AACxB,aAAwB;AACxB,YAAuB;AACvB,2BAA6B;AAC7B,6BAA+B;AAGxB,MAAM,sBAAsB,sCAAwC;AAAA,EACzE,MAAa,MAAqB;AAChC,UAAM,MAAM,MAAM,KAAK,2BAA2B,KAAK,IAAI;AAC3D,QAAI,IAAI,QAAQ,OAAO,uBAAuB;AAC5C,WAAK,OAAO,IAAI,oBAAoB,IAAI,KAAK;AAAA,IAC/C;AAEA,QAAI,CAAC,KAAK,KAAK,SAAS;AACtB,YAAM,KAAK,UAAU;AAAA,IACvB;AAEA,UAAM,iBAAiB,MAAM,KAAK,gCAAgC;AAClE,QAAI,gBAAgB;AAClB,aAAO,KAAK,mBAAmB,KAAK,cAAc;AAAA,IACpD;AACA,WAAO,KAAK,WAAW,KAAK,KAAK,KAAK,OAAO,KAAK,KAAK,YAAY;AAAA,EACrE;AAAA,EAEA,MAAc,YAAY;AACxB,WAAO,IAAI,kCAAa,KAAK,KAAK,KAAK,QAAQ,KAAK,QAAQ,KAAK,IAAI,EAAE,IAAI;AAAA,EAC7E;AA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IAAI,OAAO,mBAAmB,QAAQ;AAAA,MAC9C;AAEA,aAAO;AAAA,IACT,CAAC;AAED,UAAM,EAAE,KAAK,WAAW,IAAI,MAAM,IAAI,OAAO,OAAO,EAAE,IAAI,cAAc,CAAC,EAAE,MAAM,CAAC,WAAW;AAC3F,YAAM,OAAO,iBAAiB,KAAK,QAAQ,wBAAwB;AAAA,IACrE,CAAC;AAED,WAAO;AAAA,EACT;AACF;",
|
|
6
6
|
"names": ["chalk"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botpress/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.10",
|
|
4
4
|
"description": "Botpress CLI",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "pnpm run bundle && pnpm run template:gen",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"main": "dist/index.js",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@botpress/client": "0.
|
|
23
|
+
"@botpress/client": "0.6.3",
|
|
24
24
|
"@bpinternal/tunnel": "^0.1.0",
|
|
25
25
|
"@bpinternal/yargs-extra": "^0.0.3",
|
|
26
26
|
"@bpinternal/zod-to-json-schema": "^3.21.4",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"zod": "^3.20.6"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@botpress/sdk": "0.4.
|
|
50
|
+
"@botpress/sdk": "0.4.10",
|
|
51
51
|
"@bpinternal/log4bot": "^0.0.4",
|
|
52
52
|
"@types/bluebird": "^3.5.38",
|
|
53
53
|
"@types/json-schema": "^7.0.11",
|