@pega/dx-component-builder-sdk 0.1.41 → 0.1.42

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/util.js +11 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/dx-component-builder-sdk",
3
- "version": "0.1.41",
3
+ "version": "0.1.42",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
package/src/util.js CHANGED
@@ -583,6 +583,17 @@ export const showVersion = () => {
583
583
  const pData = require("@pega/dx-component-builder-sdk/package.json");
584
584
 
585
585
  console.log(chalk.green("DX Component Builder - SDK v" + pData.version));
586
+
587
+ // do a check of node version, it should be 18 or greater
588
+ const arNodeVersion = process.versions.node.split(".");
589
+
590
+ const nodeMajorVersion = parseInt(arNodeVersion[0]);
591
+ const nodeMinorVersion = parseInt(arNodeVersion[1]);
592
+
593
+ if (nodeMajorVersion < 18) {
594
+ console.log(chalk.redBright("DX Component Builder - SDK requires node v18 or greater, current version: " + process.version));
595
+ process.exit(1);
596
+ }
586
597
  }
587
598
 
588
599
  export const getOOTBComponents = async () => {