@botpress/cli 4.25.2 → 4.25.3

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,27 +1,27 @@
1
1
 
2
- > @botpress/cli@4.25.2 build /home/runner/work/botpress/botpress/packages/cli
2
+ > @botpress/cli@4.25.3 build /home/runner/work/botpress/botpress/packages/cli
3
3
  > pnpm run build:types && pnpm run bundle && pnpm run template:gen
4
4
 
5
5
 
6
- > @botpress/cli@4.25.2 build:types /home/runner/work/botpress/botpress/packages/cli
6
+ > @botpress/cli@4.25.3 build:types /home/runner/work/botpress/botpress/packages/cli
7
7
  > tsc -p ./tsconfig.build.json
8
8
 
9
9
 
10
- > @botpress/cli@4.25.2 bundle /home/runner/work/botpress/botpress/packages/cli
10
+ > @botpress/cli@4.25.3 bundle /home/runner/work/botpress/botpress/packages/cli
11
11
  > ts-node -T build.ts
12
12
 
13
13
 
14
- > @botpress/cli@4.25.2 template:gen /home/runner/work/botpress/botpress/packages/cli
14
+ > @botpress/cli@4.25.3 template:gen /home/runner/work/botpress/botpress/packages/cli
15
15
  > pnpm -r --stream -F @bp-templates/* exec bp gen
16
16
 
17
- 🤖 Botpress CLI v4.25.2
18
- 🤖 Botpress CLI v4.25.2
19
- 🤖 Botpress CLI v4.25.2
20
- 🤖 Botpress CLI v4.25.2
21
- ○ Generating typings for integration empty-integration...
17
+ 🤖 Botpress CLI v4.25.3
18
+ 🤖 Botpress CLI v4.25.3
19
+ 🤖 Botpress CLI v4.25.3
20
+ 🤖 Botpress CLI v4.25.3
21
+ ○ Generating typings for plugin empty-plugin...
22
22
  ✓ Typings available at .botpress
23
23
 
24
- ○ Generating typings for plugin empty-plugin...
24
+ ○ Generating typings for integration empty-integration...
25
25
  ✓ Typings available at .botpress
26
26
 
27
27
  ○ Generating typings for integration hello-world...
@@ -30,7 +30,7 @@
30
30
 
31
31
  ✓ Typings available at .botpress
32
32
 
33
- 🤖 Botpress CLI v4.25.2
33
+ 🤖 Botpress CLI v4.25.3
34
34
  ○ Generating typings for integration webhook-message...
35
35
  ✓ Typings available at .botpress
36
36
 
@@ -52,10 +52,11 @@ class BundleCommand extends import_project_command.ProjectCommand {
52
52
  line.started("Bundling bot...");
53
53
  await this._bundle(abs.outFileCJS, buildContext);
54
54
  } else if (projectType === "plugin") {
55
- line.started("Bundling plugin with platform node...");
56
- await this._bundle(abs.outFileCJS, buildContext);
57
- line.started("Bundling plugin with platform browser...");
58
- await this._bundle(abs.outFileESM, buildContext, { platform: "browser", format: "esm" });
55
+ line.started("Bundling plugin for node and browser platforms...");
56
+ await Promise.all([
57
+ this._bundle(abs.outFileCJS, buildContext),
58
+ this._bundle(abs.outFileESM, buildContext, { platform: "browser", format: "esm" })
59
+ ]);
59
60
  } else {
60
61
  throw new errors.UnsupportedProjectType();
61
62
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/command-implementations/bundle-command.ts"],
4
- "sourcesContent": ["import chalk from 'chalk'\nimport type commandDefinitions from '../command-definitions'\nimport * as errors from '../errors'\nimport * as utils from '../utils'\nimport { ProjectCommand } from './project-command'\n\nexport type BundleCommandDefinition = typeof commandDefinitions.bundle\nexport class BundleCommand extends ProjectCommand<BundleCommandDefinition> {\n public async run(buildContext?: utils.esbuild.BuildCodeContext): Promise<void> {\n const { projectType, resolveProjectDefinition } = this.readProjectDefinitionFromFS()\n\n const abs = this.projectPaths.abs\n const rel = this.projectPaths.rel('workDir')\n const line = this.logger.line()\n\n if (projectType === 'interface') {\n this.logger.success('Interface projects have no implementation to bundle.')\n } else if (projectType === 'integration') {\n const projectDef = await resolveProjectDefinition()\n const { name, __advanced } = projectDef.definition\n line.started(`Bundling integration ${chalk.bold(name)}...`)\n await this._bundle(abs.outFileCJS, buildContext, __advanced?.esbuild ?? {})\n } else if (projectType === 'bot') {\n line.started('Bundling bot...')\n await this._bundle(abs.outFileCJS, buildContext)\n } else if (projectType === 'plugin') {\n line.started('Bundling plugin with platform node...')\n await this._bundle(abs.outFileCJS, buildContext)\n\n line.started('Bundling plugin with platform browser...')\n await this._bundle(abs.outFileESM, buildContext, { platform: 'browser', format: 'esm' })\n } else {\n throw new errors.UnsupportedProjectType()\n }\n\n line.success(`Bundle available at ${chalk.grey(rel.outDir)}`)\n }\n\n private async _bundle(\n outfile: string,\n buildContext?: utils.esbuild.BuildCodeContext,\n props: Partial<utils.esbuild.BuildOptions> = {}\n ) {\n const abs = this.projectPaths.abs\n const context = buildContext ?? new utils.esbuild.BuildCodeContext()\n await context.rebuild(\n {\n outfile,\n absWorkingDir: abs.workDir,\n code: this._code,\n },\n {\n ...this._buildOptions,\n ...props,\n }\n )\n }\n\n private get _code() {\n const rel = this.projectPaths.rel('workDir')\n const unixPath = utils.path.toUnix(rel.entryPoint)\n const importFrom = utils.path.rmExtension(unixPath)\n return `import x from './${importFrom}'; export default x; export const handler = x.handler;`\n }\n\n private get _buildOptions(): Partial<utils.esbuild.BuildOptions> {\n return {\n logLevel: this.argv.verbose ? 'info' : 'silent',\n sourcemap: this.argv.sourceMap,\n minify: this.argv.minify,\n }\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,aAAwB;AACxB,YAAuB;AACvB,6BAA+B;AAGxB,MAAM,sBAAsB,sCAAwC;AAAA,EACzE,MAAa,IAAI,cAA8D;AAC7E,UAAM,EAAE,aAAa,yBAAyB,IAAI,KAAK,4BAA4B;AAEnF,UAAM,MAAM,KAAK,aAAa;AAC9B,UAAM,MAAM,KAAK,aAAa,IAAI,SAAS;AAC3C,UAAM,OAAO,KAAK,OAAO,KAAK;AAE9B,QAAI,gBAAgB,aAAa;AAC/B,WAAK,OAAO,QAAQ,sDAAsD;AAAA,IAC5E,WAAW,gBAAgB,eAAe;AACxC,YAAM,aAAa,MAAM,yBAAyB;AAClD,YAAM,EAAE,MAAM,WAAW,IAAI,WAAW;AACx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MACrB,QAAQ,KAAK,KAAK;AAAA,IACpB;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import chalk from 'chalk'\nimport type commandDefinitions from '../command-definitions'\nimport * as errors from '../errors'\nimport * as utils from '../utils'\nimport { ProjectCommand } from './project-command'\n\nexport type BundleCommandDefinition = typeof commandDefinitions.bundle\nexport class BundleCommand extends ProjectCommand<BundleCommandDefinition> {\n public async run(buildContext?: utils.esbuild.BuildCodeContext): Promise<void> {\n const { projectType, resolveProjectDefinition } = this.readProjectDefinitionFromFS()\n\n const abs = this.projectPaths.abs\n const rel = this.projectPaths.rel('workDir')\n const line = this.logger.line()\n\n if (projectType === 'interface') {\n this.logger.success('Interface projects have no implementation to bundle.')\n } else if (projectType === 'integration') {\n const projectDef = await resolveProjectDefinition()\n const { name, __advanced } = projectDef.definition\n line.started(`Bundling integration ${chalk.bold(name)}...`)\n await this._bundle(abs.outFileCJS, buildContext, __advanced?.esbuild ?? {})\n } else if (projectType === 'bot') {\n line.started('Bundling bot...')\n await this._bundle(abs.outFileCJS, buildContext)\n } else if (projectType === 'plugin') {\n line.started('Bundling plugin for node and browser platforms...')\n await Promise.all([\n this._bundle(abs.outFileCJS, buildContext),\n this._bundle(abs.outFileESM, buildContext, { platform: 'browser', format: 'esm' }),\n ])\n } else {\n throw new errors.UnsupportedProjectType()\n }\n\n line.success(`Bundle available at ${chalk.grey(rel.outDir)}`)\n }\n\n private async _bundle(\n outfile: string,\n buildContext?: utils.esbuild.BuildCodeContext,\n props: Partial<utils.esbuild.BuildOptions> = {}\n ) {\n const abs = this.projectPaths.abs\n const context = buildContext ?? new utils.esbuild.BuildCodeContext()\n await context.rebuild(\n {\n outfile,\n absWorkingDir: abs.workDir,\n code: this._code,\n },\n {\n ...this._buildOptions,\n ...props,\n }\n )\n }\n\n private get _code() {\n const rel = this.projectPaths.rel('workDir')\n const unixPath = utils.path.toUnix(rel.entryPoint)\n const importFrom = utils.path.rmExtension(unixPath)\n return `import x from './${importFrom}'; export default x; export const handler = x.handler;`\n }\n\n private get _buildOptions(): Partial<utils.esbuild.BuildOptions> {\n return {\n logLevel: this.argv.verbose ? 'info' : 'silent',\n sourcemap: this.argv.sourceMap,\n minify: this.argv.minify,\n }\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,aAAwB;AACxB,YAAuB;AACvB,6BAA+B;AAGxB,MAAM,sBAAsB,sCAAwC;AAAA,EACzE,MAAa,IAAI,cAA8D;AAC7E,UAAM,EAAE,aAAa,yBAAyB,IAAI,KAAK,4BAA4B;AAEnF,UAAM,MAAM,KAAK,aAAa;AAC9B,UAAM,MAAM,KAAK,aAAa,IAAI,SAAS;AAC3C,UAAM,OAAO,KAAK,OAAO,KAAK;AAE9B,QAAI,gBAAgB,aAAa;AAC/B,WAAK,OAAO,QAAQ,sDAAsD;AAAA,IAC5E,WAAW,gBAAgB,eAAe;AACxC,YAAM,aAAa,MAAM,yBAAyB;AAClD,YAAM,EAAE,MAAM,WAAW,IAAI,WAAW;AACxC,WAAK,QAAQ,wBAAwB,aAAAA,QAAM,KAAK,IAAI,CAAC,KAAK;AAC1D,YAAM,KAAK,QAAQ,IAAI,YAAY,cAAc,YAAY,WAAW,CAAC,CAAC;AAAA,IAC5E,WAAW,gBAAgB,OAAO;AAChC,WAAK,QAAQ,iBAAiB;AAC9B,YAAM,KAAK,QAAQ,IAAI,YAAY,YAAY;AAAA,IACjD,WAAW,gBAAgB,UAAU;AACnC,WAAK,QAAQ,mDAAmD;AAChE,YAAM,QAAQ,IAAI;AAAA,QAChB,KAAK,QAAQ,IAAI,YAAY,YAAY;AAAA,QACzC,KAAK,QAAQ,IAAI,YAAY,cAAc,EAAE,UAAU,WAAW,QAAQ,MAAM,CAAC;AAAA,MACnF,CAAC;AAAA,IACH,OAAO;AACL,YAAM,IAAI,OAAO,uBAAuB;AAAA,IAC1C;AAEA,SAAK,QAAQ,uBAAuB,aAAAA,QAAM,KAAK,IAAI,MAAM,CAAC,EAAE;AAAA,EAC9D;AAAA,EAEA,MAAc,QACZ,SACA,cACA,QAA6C,CAAC,GAC9C;AACA,UAAM,MAAM,KAAK,aAAa;AAC9B,UAAM,UAAU,gBAAgB,IAAI,MAAM,QAAQ,iBAAiB;AACnE,UAAM,QAAQ;AAAA,MACZ;AAAA,QACE;AAAA,QACA,eAAe,IAAI;AAAA,QACnB,MAAM,KAAK;AAAA,MACb;AAAA,MACA;AAAA,QACE,GAAG,KAAK;AAAA,QACR,GAAG;AAAA,MACL;AAAA,IACF;AAAA,EACF;AAAA,EAEA,IAAY,QAAQ;AAClB,UAAM,MAAM,KAAK,aAAa,IAAI,SAAS;AAC3C,UAAM,WAAW,MAAM,KAAK,OAAO,IAAI,UAAU;AACjD,UAAM,aAAa,MAAM,KAAK,YAAY,QAAQ;AAClD,WAAO,oBAAoB,UAAU;AAAA,EACvC;AAAA,EAEA,IAAY,gBAAqD;AAC/D,WAAO;AAAA,MACL,UAAU,KAAK,KAAK,UAAU,SAAS;AAAA,MACvC,WAAW,KAAK,KAAK;AAAA,MACrB,QAAQ,KAAK,KAAK;AAAA,IACpB;AAAA,EACF;AACF;",
6
6
  "names": ["chalk"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/cli",
3
- "version": "4.25.2",
3
+ "version": "4.25.3",
4
4
  "description": "Botpress CLI",
5
5
  "scripts": {
6
6
  "build": "pnpm run build:types && pnpm run bundle && pnpm run template:gen",