@cbs-consulting/generator-btp 1.2.1 → 1.2.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.
@@ -40,13 +40,26 @@ export default class extends Generator {
40
40
  this.kind = kind;
41
41
  }
42
42
 
43
- writing() {
43
+ async writing() {
44
44
  if (this.kind === "cap") {
45
- this.composeWith(resolve(__dirname, "../cap/index.js"));
45
+ const { default: CapGenerator } = await import("../cap/index.js");
46
+ this.composeWith({
47
+ Generator: CapGenerator,
48
+ path: resolve(__dirname, "../cap"),
49
+ });
46
50
  } else if (this.kind === "ui5") {
47
- this.composeWith(resolve(__dirname, "../ui5/index.js"));
51
+ const { default: Ui5Generator } = await import("../ui5/index.js");
52
+ this.composeWith({
53
+ Generator: Ui5Generator,
54
+ path: resolve(__dirname, "../ui5"),
55
+ });
48
56
  } else if (this.kind === "devcontainer") {
49
- this.composeWith(resolve(__dirname, "../devcontainer/index.js"));
57
+ const { default: DevcontainerGenerator } =
58
+ await import("../devcontainer/index.js");
59
+ this.composeWith({
60
+ Generator: DevcontainerGenerator,
61
+ path: resolve(__dirname, "../devcontainer"),
62
+ });
50
63
  } else {
51
64
  this.log(chalk.red("Unknown selection"));
52
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cbs-consulting/generator-btp",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "type": "module",
5
5
  "description": "Yeoman generator for bootstrapping CAP/UI5 projects with TypeScript, ESLint, and other essential configurations",
6
6
  "main": "generators/app/index.js",