@cbs-consulting/generator-btp 1.2.2 → 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.
@@ -3,9 +3,6 @@ import chalk from "chalk";
3
3
  import yosay from "yosay";
4
4
  import { resolve, dirname } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
- import CapGenerator from "../cap/index.js";
7
- import Ui5Generator from "../ui5/index.js";
8
- import DevcontainerGenerator from "../devcontainer/index.js";
9
6
 
10
7
  const __filename = fileURLToPath(import.meta.url);
11
8
  const __dirname = dirname(__filename);
@@ -43,18 +40,22 @@ export default class extends Generator {
43
40
  this.kind = kind;
44
41
  }
45
42
 
46
- writing() {
43
+ async writing() {
47
44
  if (this.kind === "cap") {
45
+ const { default: CapGenerator } = await import("../cap/index.js");
48
46
  this.composeWith({
49
47
  Generator: CapGenerator,
50
48
  path: resolve(__dirname, "../cap"),
51
49
  });
52
50
  } else if (this.kind === "ui5") {
51
+ const { default: Ui5Generator } = await import("../ui5/index.js");
53
52
  this.composeWith({
54
53
  Generator: Ui5Generator,
55
54
  path: resolve(__dirname, "../ui5"),
56
55
  });
57
56
  } else if (this.kind === "devcontainer") {
57
+ const { default: DevcontainerGenerator } =
58
+ await import("../devcontainer/index.js");
58
59
  this.composeWith({
59
60
  Generator: DevcontainerGenerator,
60
61
  path: resolve(__dirname, "../devcontainer"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cbs-consulting/generator-btp",
3
- "version": "1.2.2",
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",