@wavemaker/angular-codegen 11.14.0-rc.6276 → 11.14.1-rc.233

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,15 +1,15 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.14.0-rc.6276",
3
+ "version": "11.14.1-rc.233",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@wavemaker/angular-codegen",
9
- "version": "11.14.0-rc.6276",
9
+ "version": "11.14.1-rc.233",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
- "@wavemaker/angular-app": "11.14.0-rc.6276",
12
+ "@wavemaker/angular-app": "11.14.1-rc.233",
13
13
  "archiver": "^7.0.1",
14
14
  "cheerio": "1.0.0-rc.12",
15
15
  "decode-uri-component": "^0.2.0",
@@ -1340,8 +1340,8 @@
1340
1340
  }
1341
1341
  },
1342
1342
  "node_modules/@types/node": {
1343
- "version": "24.9.1",
1344
- "integrity": "sha512-QoiaXANRkSXK6p0Duvt56W208du4P9Uye9hWLWgGMDTEoKPhuenzNcC4vGUmrNkiOKTlIrBoyNQYNpSwfEZXSg==",
1343
+ "version": "24.9.2",
1344
+ "integrity": "sha512-uWN8YqxXxqFMX2RqGOrumsKeti4LlmIMIyV0lgut4jx7KQBcBiW6vkDtIBvHnHIquwNfJhk8v2OtmO8zXWHfPA==",
1345
1345
  "dev": true,
1346
1346
  "license": "MIT",
1347
1347
  "dependencies": {
@@ -1376,8 +1376,8 @@
1376
1376
  "license": "MIT"
1377
1377
  },
1378
1378
  "node_modules/@wavemaker/angular-app": {
1379
- "version": "11.14.0-rc.6276",
1380
- "integrity": "sha512-V5nOzUqHozYmllIjNiNZjc2D5vKK/tXziWTPm9kc7LghZkU5DS9KgE2MTv3/Y8fYSh7pkfJlwSRoXhvhGqRRvw==",
1379
+ "version": "11.14.1-rc.233",
1380
+ "integrity": "sha512-7GhBp01hqP81LvnZuDrwYejvD64GVFGTI80+WVVh0C3X+jfFzF/FclFtcFpriLxUt3efuDWSIv+cfOYepbSd+g==",
1381
1381
  "dependencies": {
1382
1382
  "@angular/animations": "18.2.13",
1383
1383
  "@angular/common": "18.2.13",
@@ -1394,13 +1394,14 @@
1394
1394
  "@fullcalendar/list": "6.1.18",
1395
1395
  "@fullcalendar/timegrid": "6.1.18",
1396
1396
  "@metrichor/jmespath": "0.3.1",
1397
- "@wavemaker/app-ng-runtime": "11.14.0-rc.6276",
1398
- "@wavemaker/custom-widgets-m3": "11.14.0-rc.6276",
1397
+ "@wavemaker/app-ng-runtime": "11.14.1-rc.233",
1398
+ "@wavemaker/custom-widgets-m3": "11.14.1-rc.233",
1399
1399
  "@wavemaker/focus-trap": "1.0.1",
1400
- "@wavemaker/foundation-css": "11.14.0-rc.6276",
1401
- "@wavemaker/nvd3": "1.8.13",
1402
- "@wavemaker/variables": "11.14.0-rc.6276",
1400
+ "@wavemaker/foundation-css": "11.14.1-rc.233",
1401
+ "@wavemaker/nvd3": "1.8.15",
1402
+ "@wavemaker/variables": "11.14.1-rc.233",
1403
1403
  "@ztree/ztree_v3": "3.5.48",
1404
+ "acorn": "^8.15.0",
1404
1405
  "angular-imask": "7.6.1",
1405
1406
  "angular2-websocket": "0.9.8",
1406
1407
  "d3": "7.8.5",
@@ -1433,8 +1434,8 @@
1433
1434
  }
1434
1435
  },
1435
1436
  "node_modules/@wavemaker/app-ng-runtime": {
1436
- "version": "11.14.0-rc.6276",
1437
- "integrity": "sha512-9o4yaIJUdG9NMS4hvPlbQTRhkRY34rXfYcrlv5RWYqBfU2antZDV9JMSNbpB0rFOGocVg1BUtQ4PfL9AQ/Nm7g==",
1437
+ "version": "11.14.1-rc.233",
1438
+ "integrity": "sha512-AEGyLKTSDXEf5sCu8naNP368hXkRBFwp/kV8HSbLIR9XKD6OWyQcgNCZLvGgUaFybxc1Lms125EmtI5/WY0lOA==",
1438
1439
  "license": "MIT",
1439
1440
  "engines": {
1440
1441
  "node": ">=18.16.1",
@@ -1442,8 +1443,8 @@
1442
1443
  }
1443
1444
  },
1444
1445
  "node_modules/@wavemaker/custom-widgets-m3": {
1445
- "version": "11.14.0-rc.6276",
1446
- "integrity": "sha512-F/X7m3ek4UJF+4MVGJ4SgfL0IdFBSq9zYwwvi/foIqJI+HJTUafi/HQK0DVQJq16YPDKii97HSOWSBLaybGXGg==",
1446
+ "version": "11.14.1-rc.233",
1447
+ "integrity": "sha512-SOhtdOAADY2sgUOvhksFo/vkaerlAQDjFlhKyBL6XEVjLIgULp9i2yngQHQsgdevPTbgmO+yqv+xV8VersuQfQ==",
1447
1448
  "license": "ISC"
1448
1449
  },
1449
1450
  "node_modules/@wavemaker/focus-trap": {
@@ -1456,24 +1457,24 @@
1456
1457
  }
1457
1458
  },
1458
1459
  "node_modules/@wavemaker/foundation-css": {
1459
- "version": "11.14.0-rc.6276",
1460
- "integrity": "sha512-j0pbtTE5GLLDjS2z6dZ5Dd9t27HjPxbwgiPYBE3yW4MfuS62qMVVAXt2Jy6D6jRtPwIEMS9f/VrlReUlSkeztg==",
1460
+ "version": "11.14.1-rc.233",
1461
+ "integrity": "sha512-v0gYTyA5h4SI+frlVHpMSatNlAijYaK6VcXZi2EYbCfvH6iL6ruYRK74bOQpxMIMmSp9BNpHj1Aluq4Wt8/KYg==",
1461
1462
  "license": "ISC",
1462
1463
  "dependencies": {
1463
1464
  "chroma-js": "^3.1.2"
1464
1465
  }
1465
1466
  },
1466
1467
  "node_modules/@wavemaker/nvd3": {
1467
- "version": "1.8.13",
1468
- "integrity": "sha512-+CnFQGSxFgoQ+Y2G92i+KnrSOSiTcjxOU3i5zfPlhl58F0XjzRVCC/GtCDC4u0P7HZSqAJLuY91dYNTnHhH6cA==",
1468
+ "version": "1.8.15",
1469
+ "integrity": "sha512-ufRoz09lG1vAMfc+Qc0TC912m/bTmzQYTCJpaQ0T525i6J3+tjmT7dLbTLxRlA1KTsRFRHTaLi410R8RCYMjRg==",
1469
1470
  "license": "Apache-2.0",
1470
1471
  "peerDependencies": {
1471
1472
  "d3": "7.8.5"
1472
1473
  }
1473
1474
  },
1474
1475
  "node_modules/@wavemaker/variables": {
1475
- "version": "11.14.0-rc.6276",
1476
- "integrity": "sha512-EmwtrlI2nM7NaMPzwBGipJ7YzKO9XhBGfEYzSI1A7zt7VWYDIr8YDNgDLVzLl34Qm32J5idkGqPSHxh7kBTcdQ==",
1476
+ "version": "11.14.1-rc.233",
1477
+ "integrity": "sha512-6Mueb13Qa5mlAqGoQ5sEgdBEZC2hQ+QvbqAtvKH1SEB/f+xpmqykKYMb/4SKK/eMZVAM/rLl/xzVcmtqzgDlSQ==",
1477
1478
  "license": "ISC",
1478
1479
  "dependencies": {
1479
1480
  "@metrichor/jmespath": "^0.3.1",
@@ -1542,7 +1543,6 @@
1542
1543
  "node_modules/acorn": {
1543
1544
  "version": "8.15.0",
1544
1545
  "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
1545
- "dev": true,
1546
1546
  "license": "MIT",
1547
1547
  "bin": {
1548
1548
  "acorn": "bin/acorn"
@@ -1909,8 +1909,8 @@
1909
1909
  "license": "MIT"
1910
1910
  },
1911
1911
  "node_modules/baseline-browser-mapping": {
1912
- "version": "2.8.20",
1913
- "integrity": "sha512-JMWsdF+O8Orq3EMukbUN1QfbLK9mX2CkUmQBcW2T0s8OmdAUL5LLM/6wFwSrqXzlXB13yhyK9gTKS1rIizOduQ==",
1912
+ "version": "2.8.23",
1913
+ "integrity": "sha512-616V5YX4bepJFzNyOfce5Fa8fDJMfoxzOIzDCZwaGL8MKVpFrXqfNUoIpRn9YMI5pXf/VKgzjB4htFMsFKKdiQ==",
1914
1914
  "dev": true,
1915
1915
  "license": "Apache-2.0",
1916
1916
  "bin": {
@@ -2190,8 +2190,8 @@
2190
2190
  }
2191
2191
  },
2192
2192
  "node_modules/caniuse-lite": {
2193
- "version": "1.0.30001751",
2194
- "integrity": "sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==",
2193
+ "version": "1.0.30001752",
2194
+ "integrity": "sha512-vKUk7beoukxE47P5gcVNKkDRzXdVofotshHwfR9vmpeFKxmI5PBpgOMC18LUJUA/DvJ70Y7RveasIBraqsyO/g==",
2195
2195
  "dev": true,
2196
2196
  "funding": [
2197
2197
  {
@@ -3277,8 +3277,8 @@
3277
3277
  "license": "MIT"
3278
3278
  },
3279
3279
  "node_modules/electron-to-chromium": {
3280
- "version": "1.5.240",
3281
- "integrity": "sha512-OBwbZjWgrCOH+g6uJsA2/7Twpas2OlepS9uvByJjR2datRDuKGYeD+nP8lBBks2qnB7bGJNHDUx7c/YLaT3QMQ==",
3280
+ "version": "1.5.244",
3281
+ "integrity": "sha512-OszpBN7xZX4vWMPJwB9illkN/znA8M36GQqQxi6MNy9axWxhOfJyZZJtSLQCpEFLHP2xK33BiWx9aIuIEXVCcw==",
3282
3282
  "dev": true,
3283
3283
  "license": "ISC"
3284
3284
  },
@@ -5777,8 +5777,8 @@
5777
5777
  "license": "MIT"
5778
5778
  },
5779
5779
  "node_modules/node-releases": {
5780
- "version": "2.0.26",
5781
- "integrity": "sha512-S2M9YimhSjBSvYnlr5/+umAnPHE++ODwt5e2Ij6FoX45HA/s4vHdkDx1eax2pAPeAOqu4s9b7ppahsyEFdVqQA==",
5780
+ "version": "2.0.27",
5781
+ "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==",
5782
5782
  "dev": true,
5783
5783
  "license": "MIT"
5784
5784
  },
package/package-lock.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.14.0-rc.6276",
3
+ "version": "11.14.1-rc.233",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@wavemaker/angular-codegen",
9
- "version": "11.14.0-rc.6276",
9
+ "version": "11.14.1-rc.233",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
- "@wavemaker/angular-app": "11.14.0-rc.6276",
12
+ "@wavemaker/angular-app": "11.14.1-rc.233",
13
13
  "archiver": "^7.0.1",
14
14
  "cheerio": "1.0.0-rc.12",
15
15
  "decode-uri-component": "^0.2.0",
@@ -1340,8 +1340,8 @@
1340
1340
  }
1341
1341
  },
1342
1342
  "node_modules/@types/node": {
1343
- "version": "24.9.1",
1344
- "integrity": "sha512-QoiaXANRkSXK6p0Duvt56W208du4P9Uye9hWLWgGMDTEoKPhuenzNcC4vGUmrNkiOKTlIrBoyNQYNpSwfEZXSg==",
1343
+ "version": "24.9.2",
1344
+ "integrity": "sha512-uWN8YqxXxqFMX2RqGOrumsKeti4LlmIMIyV0lgut4jx7KQBcBiW6vkDtIBvHnHIquwNfJhk8v2OtmO8zXWHfPA==",
1345
1345
  "dev": true,
1346
1346
  "license": "MIT",
1347
1347
  "dependencies": {
@@ -1376,8 +1376,8 @@
1376
1376
  "license": "MIT"
1377
1377
  },
1378
1378
  "node_modules/@wavemaker/angular-app": {
1379
- "version": "11.14.0-rc.6276",
1380
- "integrity": "sha512-V5nOzUqHozYmllIjNiNZjc2D5vKK/tXziWTPm9kc7LghZkU5DS9KgE2MTv3/Y8fYSh7pkfJlwSRoXhvhGqRRvw==",
1379
+ "version": "11.14.1-rc.233",
1380
+ "integrity": "sha512-7GhBp01hqP81LvnZuDrwYejvD64GVFGTI80+WVVh0C3X+jfFzF/FclFtcFpriLxUt3efuDWSIv+cfOYepbSd+g==",
1381
1381
  "dependencies": {
1382
1382
  "@angular/animations": "18.2.13",
1383
1383
  "@angular/common": "18.2.13",
@@ -1394,13 +1394,14 @@
1394
1394
  "@fullcalendar/list": "6.1.18",
1395
1395
  "@fullcalendar/timegrid": "6.1.18",
1396
1396
  "@metrichor/jmespath": "0.3.1",
1397
- "@wavemaker/app-ng-runtime": "11.14.0-rc.6276",
1398
- "@wavemaker/custom-widgets-m3": "11.14.0-rc.6276",
1397
+ "@wavemaker/app-ng-runtime": "11.14.1-rc.233",
1398
+ "@wavemaker/custom-widgets-m3": "11.14.1-rc.233",
1399
1399
  "@wavemaker/focus-trap": "1.0.1",
1400
- "@wavemaker/foundation-css": "11.14.0-rc.6276",
1401
- "@wavemaker/nvd3": "1.8.13",
1402
- "@wavemaker/variables": "11.14.0-rc.6276",
1400
+ "@wavemaker/foundation-css": "11.14.1-rc.233",
1401
+ "@wavemaker/nvd3": "1.8.15",
1402
+ "@wavemaker/variables": "11.14.1-rc.233",
1403
1403
  "@ztree/ztree_v3": "3.5.48",
1404
+ "acorn": "^8.15.0",
1404
1405
  "angular-imask": "7.6.1",
1405
1406
  "angular2-websocket": "0.9.8",
1406
1407
  "d3": "7.8.5",
@@ -1433,8 +1434,8 @@
1433
1434
  }
1434
1435
  },
1435
1436
  "node_modules/@wavemaker/app-ng-runtime": {
1436
- "version": "11.14.0-rc.6276",
1437
- "integrity": "sha512-9o4yaIJUdG9NMS4hvPlbQTRhkRY34rXfYcrlv5RWYqBfU2antZDV9JMSNbpB0rFOGocVg1BUtQ4PfL9AQ/Nm7g==",
1437
+ "version": "11.14.1-rc.233",
1438
+ "integrity": "sha512-AEGyLKTSDXEf5sCu8naNP368hXkRBFwp/kV8HSbLIR9XKD6OWyQcgNCZLvGgUaFybxc1Lms125EmtI5/WY0lOA==",
1438
1439
  "license": "MIT",
1439
1440
  "engines": {
1440
1441
  "node": ">=18.16.1",
@@ -1442,8 +1443,8 @@
1442
1443
  }
1443
1444
  },
1444
1445
  "node_modules/@wavemaker/custom-widgets-m3": {
1445
- "version": "11.14.0-rc.6276",
1446
- "integrity": "sha512-F/X7m3ek4UJF+4MVGJ4SgfL0IdFBSq9zYwwvi/foIqJI+HJTUafi/HQK0DVQJq16YPDKii97HSOWSBLaybGXGg==",
1446
+ "version": "11.14.1-rc.233",
1447
+ "integrity": "sha512-SOhtdOAADY2sgUOvhksFo/vkaerlAQDjFlhKyBL6XEVjLIgULp9i2yngQHQsgdevPTbgmO+yqv+xV8VersuQfQ==",
1447
1448
  "license": "ISC"
1448
1449
  },
1449
1450
  "node_modules/@wavemaker/focus-trap": {
@@ -1456,24 +1457,24 @@
1456
1457
  }
1457
1458
  },
1458
1459
  "node_modules/@wavemaker/foundation-css": {
1459
- "version": "11.14.0-rc.6276",
1460
- "integrity": "sha512-j0pbtTE5GLLDjS2z6dZ5Dd9t27HjPxbwgiPYBE3yW4MfuS62qMVVAXt2Jy6D6jRtPwIEMS9f/VrlReUlSkeztg==",
1460
+ "version": "11.14.1-rc.233",
1461
+ "integrity": "sha512-v0gYTyA5h4SI+frlVHpMSatNlAijYaK6VcXZi2EYbCfvH6iL6ruYRK74bOQpxMIMmSp9BNpHj1Aluq4Wt8/KYg==",
1461
1462
  "license": "ISC",
1462
1463
  "dependencies": {
1463
1464
  "chroma-js": "^3.1.2"
1464
1465
  }
1465
1466
  },
1466
1467
  "node_modules/@wavemaker/nvd3": {
1467
- "version": "1.8.13",
1468
- "integrity": "sha512-+CnFQGSxFgoQ+Y2G92i+KnrSOSiTcjxOU3i5zfPlhl58F0XjzRVCC/GtCDC4u0P7HZSqAJLuY91dYNTnHhH6cA==",
1468
+ "version": "1.8.15",
1469
+ "integrity": "sha512-ufRoz09lG1vAMfc+Qc0TC912m/bTmzQYTCJpaQ0T525i6J3+tjmT7dLbTLxRlA1KTsRFRHTaLi410R8RCYMjRg==",
1469
1470
  "license": "Apache-2.0",
1470
1471
  "peerDependencies": {
1471
1472
  "d3": "7.8.5"
1472
1473
  }
1473
1474
  },
1474
1475
  "node_modules/@wavemaker/variables": {
1475
- "version": "11.14.0-rc.6276",
1476
- "integrity": "sha512-EmwtrlI2nM7NaMPzwBGipJ7YzKO9XhBGfEYzSI1A7zt7VWYDIr8YDNgDLVzLl34Qm32J5idkGqPSHxh7kBTcdQ==",
1476
+ "version": "11.14.1-rc.233",
1477
+ "integrity": "sha512-6Mueb13Qa5mlAqGoQ5sEgdBEZC2hQ+QvbqAtvKH1SEB/f+xpmqykKYMb/4SKK/eMZVAM/rLl/xzVcmtqzgDlSQ==",
1477
1478
  "license": "ISC",
1478
1479
  "dependencies": {
1479
1480
  "@metrichor/jmespath": "^0.3.1",
@@ -1542,7 +1543,6 @@
1542
1543
  "node_modules/acorn": {
1543
1544
  "version": "8.15.0",
1544
1545
  "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
1545
- "dev": true,
1546
1546
  "license": "MIT",
1547
1547
  "bin": {
1548
1548
  "acorn": "bin/acorn"
@@ -1909,8 +1909,8 @@
1909
1909
  "license": "MIT"
1910
1910
  },
1911
1911
  "node_modules/baseline-browser-mapping": {
1912
- "version": "2.8.20",
1913
- "integrity": "sha512-JMWsdF+O8Orq3EMukbUN1QfbLK9mX2CkUmQBcW2T0s8OmdAUL5LLM/6wFwSrqXzlXB13yhyK9gTKS1rIizOduQ==",
1912
+ "version": "2.8.23",
1913
+ "integrity": "sha512-616V5YX4bepJFzNyOfce5Fa8fDJMfoxzOIzDCZwaGL8MKVpFrXqfNUoIpRn9YMI5pXf/VKgzjB4htFMsFKKdiQ==",
1914
1914
  "dev": true,
1915
1915
  "license": "Apache-2.0",
1916
1916
  "bin": {
@@ -2190,8 +2190,8 @@
2190
2190
  }
2191
2191
  },
2192
2192
  "node_modules/caniuse-lite": {
2193
- "version": "1.0.30001751",
2194
- "integrity": "sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==",
2193
+ "version": "1.0.30001752",
2194
+ "integrity": "sha512-vKUk7beoukxE47P5gcVNKkDRzXdVofotshHwfR9vmpeFKxmI5PBpgOMC18LUJUA/DvJ70Y7RveasIBraqsyO/g==",
2195
2195
  "dev": true,
2196
2196
  "funding": [
2197
2197
  {
@@ -3277,8 +3277,8 @@
3277
3277
  "license": "MIT"
3278
3278
  },
3279
3279
  "node_modules/electron-to-chromium": {
3280
- "version": "1.5.240",
3281
- "integrity": "sha512-OBwbZjWgrCOH+g6uJsA2/7Twpas2OlepS9uvByJjR2datRDuKGYeD+nP8lBBks2qnB7bGJNHDUx7c/YLaT3QMQ==",
3280
+ "version": "1.5.244",
3281
+ "integrity": "sha512-OszpBN7xZX4vWMPJwB9illkN/znA8M36GQqQxi6MNy9axWxhOfJyZZJtSLQCpEFLHP2xK33BiWx9aIuIEXVCcw==",
3282
3282
  "dev": true,
3283
3283
  "license": "ISC"
3284
3284
  },
@@ -5777,8 +5777,8 @@
5777
5777
  "license": "MIT"
5778
5778
  },
5779
5779
  "node_modules/node-releases": {
5780
- "version": "2.0.26",
5781
- "integrity": "sha512-S2M9YimhSjBSvYnlr5/+umAnPHE++ODwt5e2Ij6FoX45HA/s4vHdkDx1eax2pAPeAOqu4s9b7ppahsyEFdVqQA==",
5780
+ "version": "2.0.27",
5781
+ "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==",
5782
5782
  "dev": true,
5783
5783
  "license": "MIT"
5784
5784
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.14.0-rc.6276",
3
+ "version": "11.14.1-rc.233",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,7 +15,7 @@
15
15
  ".npmrc"
16
16
  ],
17
17
  "dependencies": {
18
- "@wavemaker/angular-app": "11.14.0-rc.6276",
18
+ "@wavemaker/angular-app": "11.14.1-rc.233",
19
19
  "archiver": "^7.0.1",
20
20
  "cheerio": "1.0.0-rc.12",
21
21
  "decode-uri-component": "^0.2.0",
@@ -1 +1 @@
1
- const path=require("path"),fs=require("fs"),{downloadNPMPackage:downloadNPMPackage}=require("../download-packages"),{isPrismProject:isPrismProject,DESIGN_TOKENS_DIR_NAME:DESIGN_TOKENS_DIR_NAME,OVERRIDE_TOKENS_PATH:OVERRIDE_TOKENS_PATH,APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH}=require("./wm-utils"),{getLegacyWmProjectProperties:getLegacyWmProjectProperties}=require("./project-meta"),groupFilesByMode=e=>{const s={default:[]};return fs.readdirSync(e).forEach(o=>{const t=path.join(e,o),r=fs.statSync(t);if(r.isDirectory()){const e=groupFilesByMode(t);for(const o in e)s[o]||(s[o]=[]),s[o].push(...e[o])}else if(r.isFile()&&".json"===path.extname(t)){const e=o.match(/\.([^.]+)\.json$/);if(e){const o=e[1];s[o]||(s[o]=[]),s[o].push(t)}else s.default.push(t)}}),s},generateModeConfigs=(e,s,o,t)=>{const r=o&&o.name||"css/variables",n=t&&t.name||"css/variables",i=[];for(const o in e){const t=e[o].flatMap(e=>{const o=e.replace(s+"/","");return[{destination:o.replace(/\.json$/,".css"),options:{outputReferences:!0,selector:":root"},format:r,filter:function(s){var o,t=(o=s["@"]&&s["@"].filePath?s["@"].filePath:s.filePath)&&-1!==o.indexOf("overrides")||s.filePath&&-1!==s.filePath.indexOf("overrides"),r=o&&(e.includes(o)||e.includes(s.filePath))&&!s.path.includes("appearances")&&!s.path.includes("states");return t&&r}},{destination:o.replace(/\.json$/,"variant.css"),options:{outputReferences:!0,selector:":root"},format:n,filter:s=>{let o;const t=(o=s["@"]&&s["@"].filePath?s["@"].filePath:s.filePath)&&-1!==o.indexOf("overrides"),r=o&&(e.includes(o)||e.includes(s.filePath))&&(s.path.includes("appearances")||s.path.includes("states"));return t&&r}}]});i.push({mode:o,files:t})}return i},accessFile=e=>{const s=path.dirname(e);fs.existsSync(s)||(fs.mkdirSync(s,{recursive:!0}),console.log(`Directory created: ${s}`)),fs.access(e,fs.constants.F_OK,s=>{if(s){console.log(`${e} does not exist. Creating file...`);const s=JSON.stringify({});fs.writeFile(e,s,s=>{if(s)throw s;console.log(`${e} was created successfully.`)})}})};async function setupSymlink(e,s){try{await fs.promises.mkdir(path.dirname(s),{recursive:!0});try{fs.existsSync(s)&&await fs.promises.unlink(s)}catch(e){console.error("Error removing existing symlink:",e)}const o="win32"===process.platform?"junction":"dir";await fs.promises.symlink(e,s,o),console.log("Symlink created successfully at:",s)}catch(e){console.error("Error creating symlink:",s,e)}}const getStyleDictionaryConfig=(e,s,o,t)=>{t.endsWith("/")||(t+="/");let r="";return{log:{verbosity:"verbose"},source:[r="default"===o?path.resolve(t,"src","main","webapp",OVERRIDE_TOKENS_PATH,"**","!(*.*).json"):path.resolve(t,"src","main","webapp",OVERRIDE_TOKENS_PATH,"**",`*.${o}.json`)],include:[path.join(s,"**","!(*.dark|*.light).json"),path.join(t,"src","main","webapp",OVERRIDE_TOKENS_PATH,"global","**","*.json")],platforms:{css:{transformGroup:"css",prefix:"--wm",files:e}}}};async function removeSymlink(e){const s=path.resolve(e);try{fs.lstatSync(s).isSymbolicLink()?(await fs.promises.unlink(s),console.log("Symlink removed successfully:",s)):console.warn("Not a symlink, skipping unlink:",s)}catch(e){console.error("Error during symlink removal:",e)}}async function getCustomFormatters(e,s){try{const o=await import(`${e}/node_modules/style-dictionary/lib/utils/index.js`),{usesReferences:t,getReferences:r}=o,n=await import(`${s}/node_modules/@wavemaker/foundation-css/src/utils/style-dictionary-utils.js`),{cssVarCalcMixFormatter:i,componentVariantsFormatter:a}=n,c="web";return{cssVarCalcMixFormatter:i(t,r),componentVariantsFormatter:a(t,r,c)}}catch(e){return console.error("Failed to load CssVarCalcMixFormatter:",e),null}}function processCSSFiles(e,s){for(const{destination:o}of e)try{if(o.endsWith(".css")&&fs.existsSync(o)){const e=fs.readFileSync(o,"utf-8"),t=/(:root\s*\{[^}]*\})/,r=path.basename(o).split(".");let n=e;if(3===r.length&&"light"!==r[1]){const o=r[0],t=r[1];s+=(n=e.replace(/:root/g,`:root[${o}='${t}']`))+"\n"}else{const o=s.match(t),r=e.match(t);if(o&&r){const e=o[1],t=r[1].replace(/:root\s*\{|\}/g,"").trim(),n=e.replace("}",`\n${t}\n}`);s=s.replace(e,n)}else s+=n+"\n"}fs.unlink(o,()=>{})}}catch(e){console.error(`\nStyle dictionary, Error processing file ${o}:`,e)}return s}const generateOverrideCSS=async(e,s,o)=>{e=e||{};const t=await getLegacyWmProjectProperties(s);if(isPrismProject(t)&&(e.generateOverrideCSS||"angular"===e.buildType)){const t=path.join(s+"/src/main/webapp/",OVERRIDE_TOKENS_PATH),r=s+`/src/main/webapp/${APP_OVERRIDE_CSS_PATH}`;if(accessFile(r),fs.existsSync(t)){console.log("CODEGEN ANGULAR APP: generating override css...");let n={scope:"",name:"style-dictionary",version:"4.1.0",packageJsonFile:"",successMsg:"STYLE DICTIONARY SUCCESS",infoMsg:"STYLE DICTIONARY PACKAGE : ",skipPackageVersion:!1};n.baseDir=o;const i=await downloadNPMPackage(n);let a={scope:"@wavemaker",name:"foundation-css",version:e.runtimeUIVersion,packageJsonFile:"",successMsg:"Foundation-CSS SUCCESS",infoMsg:"Foundation-CSS PACKAGE : "};a.baseDir=o;const c=await downloadNPMPackage(a);console.log("FOUNDATION_CSS_PATH",c,"SourceDir",s),await(async()=>{const e=await import(`${i}/node_modules/style-dictionary/lib/StyleDictionary.js`).then(e=>e.default),o=path.join(c,"/node_modules/@wavemaker/foundation-css/src/tokens/web"),{cssVarCalcMixFormatter:n,componentVariantsFormatter:a}=await getCustomFormatters(i,c);n&&a||(n||console.error("cssVarCalcMixFormatter failed to load."),a||console.error("cssVariantFormatter failed to load.")),n&&e.registerFormat(n),a&&e.registerFormat(a);const l=path.resolve(s,"src","main","webapp",DESIGN_TOKENS_DIR_NAME,"temp-tokens"),d=groupFilesByMode(t),f=generateModeConfigs(d,s,n,a);let m="";try{console.log("\nSetting up foundation tokens symlink..."),await setupSymlink(o,l);for(const{mode:o,files:t}of f){console.log(`\nBuilding CSS for mode: ${o}...`);try{const n=getStyleDictionaryConfig(t,l,o,s);console.log(n,o);const i=new e(n);await i.buildPlatform("css"),console.log(`Style Dictionary build completed for mode: ${o}`),m=processCSSFiles(t,m),fs.writeFileSync(r,m),console.log(`CSS overrides generated successfully for mode: ${o}`)}catch(e){console.error(`Error during Style Dictionary build for mode: ${o}`,e)}}console.log("CODEGEN ANGULAR APP: generating overrides success !")}catch(e){console.error("Error setting up symlink or processing modes:",e)}finally{await removeSymlink(l)}})()}}};module.exports={generateOverrideCSS:generateOverrideCSS};
1
+ const path=require("path"),fs=require("fs"),{downloadNPMPackage:downloadNPMPackage}=require("../download-packages"),{isPrismProject:isPrismProject,DESIGN_TOKENS_DIR_NAME:DESIGN_TOKENS_DIR_NAME,OVERRIDE_TOKENS_PATH:OVERRIDE_TOKENS_PATH,APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH}=require("./wm-utils"),{getLegacyWmProjectProperties:getLegacyWmProjectProperties}=require("./project-meta"),groupFilesByMode=e=>{const s={default:[]};return fs.readdirSync(e).forEach(o=>{const t=path.join(e,o),r=fs.statSync(t);if(r.isDirectory()){const e=groupFilesByMode(t);for(const o in e)s[o]||(s[o]=[]),s[o].push(...e[o])}else if(r.isFile()&&".json"===path.extname(t)){const e=o.match(/\.([^.]+)\.json$/);if(e){const o=e[1];s[o]||(s[o]=[]),s[o].push(t)}else s.default.push(t)}}),s},generateModeConfigs=(e,s,o,t)=>{const r=o&&o.name||"css/variables",n=t&&t.name||"css/variables",i=[];for(const o in e){const t=e[o].flatMap(e=>{const o=e.replace(s+"/","");return[{destination:o.replace(/\.json$/,".css"),options:{outputReferences:!0,selector:":root"},format:r,filter:function(s){var o;const t=e=>e?e.replace(/\\/g,"/"):e;o=t(o=s["@"]&&s["@"].filePath?s["@"].filePath:s.filePath),e=t(e);var r=o&&-1!==o.indexOf("overrides")||s.filePath&&-1!==s.filePath.indexOf("overrides"),n=o&&(e.includes(o)||e.includes(t(s.filePath)))&&!s.path.includes("appearances")&&!s.path.includes("states");return r&&n}},{destination:o.replace(/\.json$/,"variant.css"),options:{outputReferences:!0,selector:":root"},format:n,filter:s=>{let o;const t=(o=s["@"]&&s["@"].filePath?s["@"].filePath:s.filePath)&&-1!==o.indexOf("overrides"),r=o&&(e.includes(o)||e.includes(s.filePath))&&(s.path.includes("appearances")||s.path.includes("states"));return t&&r}}]});i.push({mode:o,files:t})}return i},accessFile=e=>{const s=path.dirname(e);fs.existsSync(s)||(fs.mkdirSync(s,{recursive:!0}),console.log(`Directory created: ${s}`)),fs.access(e,fs.constants.F_OK,s=>{if(s){console.log(`${e} does not exist. Creating file...`);const s=JSON.stringify({});fs.writeFile(e,s,s=>{if(s)throw s;console.log(`${e} was created successfully.`)})}})};async function setupSymlink(e,s){try{await fs.promises.mkdir(path.dirname(s),{recursive:!0});try{fs.existsSync(s)&&await fs.promises.unlink(s)}catch(e){console.error("Error removing existing symlink:",e)}const o="win32"===process.platform?"junction":"dir";await fs.promises.symlink(e,s,o),console.log("Symlink created successfully at:",s)}catch(e){console.error("Error creating symlink:",s,e)}}const getStyleDictionaryConfig=(e,s,o,t)=>{t.endsWith("/")||(t+="/");let r="";return{log:{verbosity:"verbose"},source:[r="default"===o?`${t}/src/main/webapp/${OVERRIDE_TOKENS_PATH}/**/!(*.*).json`:`${t}/src/main/webapp/${OVERRIDE_TOKENS_PATH}/**/*.${o}.json`],include:[path.join(s,"**","!(*.dark|*.light).json"),path.join(t,"src","main","webapp",OVERRIDE_TOKENS_PATH,"global","**","*.json")],platforms:{css:{transformGroup:"css",prefix:"--wm",files:e}}}};async function removeSymlink(e){const s=path.resolve(e);try{fs.lstatSync(s).isSymbolicLink()?(await fs.promises.unlink(s),console.log("Symlink removed successfully:",s)):console.warn("Not a symlink, skipping unlink:",s)}catch(e){console.error("Error during symlink removal:",e)}}async function getCustomFormatters(e,s){try{const o=await import(`${e}/node_modules/style-dictionary/lib/utils/index.js`),{usesReferences:t,getReferences:r}=o,n=await import(`${s}/node_modules/@wavemaker/foundation-css/src/utils/style-dictionary-utils.js`),{cssVarCalcMixFormatter:i,componentVariantsFormatter:a}=n,c="web";return{cssVarCalcMixFormatter:i(t,r),componentVariantsFormatter:a(t,r,c)}}catch(e){return console.error("Failed to load CssVarCalcMixFormatter:",e),null}}function processCSSFiles(e,s){for(const{destination:o}of e)try{if(o.endsWith(".css")&&fs.existsSync(o)){const e=fs.readFileSync(o,"utf-8"),t=/(:root\s*\{[^}]*\})/,r=path.basename(o).split(".");let n=e;if(3===r.length&&"light"!==r[1]){const o=r[0],t=r[1];s+=(n=e.replace(/:root/g,`:root[${o}='${t}']`))+"\n"}else{const o=s.match(t),r=e.match(t);if(o&&r){const e=o[1],t=r[1].replace(/:root\s*\{|\}/g,"").trim(),n=e.replace("}",`\n${t}\n}`);s=s.replace(e,n)}else s+=n+"\n"}fs.unlink(o,()=>{})}}catch(e){console.error(`\nStyle dictionary, Error processing file ${o}:`,e)}return s}const generateOverrideCSS=async(e,s,o)=>{e=e||{};const t=await getLegacyWmProjectProperties(s);if(isPrismProject(t)&&(e.generateOverrideCSS||"angular"===e.buildType)){const t=path.join(s+"/src/main/webapp/",OVERRIDE_TOKENS_PATH),r=s+`/src/main/webapp/${APP_OVERRIDE_CSS_PATH}`;if(accessFile(r),fs.existsSync(t)){console.log("CODEGEN ANGULAR APP: generating override css...");let n={scope:"",name:"style-dictionary",version:"4.1.0",packageJsonFile:"",successMsg:"STYLE DICTIONARY SUCCESS",infoMsg:"STYLE DICTIONARY PACKAGE : ",skipPackageVersion:!1};n.baseDir=o;const i=await downloadNPMPackage(n);let a={scope:"@wavemaker",name:"foundation-css",version:e.runtimeUIVersion,packageJsonFile:"",successMsg:"Foundation-CSS SUCCESS",infoMsg:"Foundation-CSS PACKAGE : "};a.baseDir=o;const c=await downloadNPMPackage(a);console.log("FOUNDATION_CSS_PATH",c,"SourceDir",s),await(async()=>{const e=await import(`${i}/node_modules/style-dictionary/lib/StyleDictionary.js`).then(e=>e.default),o=path.join(c,"/node_modules/@wavemaker/foundation-css/src/tokens/web"),{cssVarCalcMixFormatter:n,componentVariantsFormatter:a}=await getCustomFormatters(i,c);n&&a||(n||console.error("cssVarCalcMixFormatter failed to load."),a||console.error("cssVariantFormatter failed to load.")),n&&e.registerFormat(n),a&&e.registerFormat(a);const l=path.resolve(s,"src","main","webapp",DESIGN_TOKENS_DIR_NAME,"temp-tokens"),d=groupFilesByMode(t),f=generateModeConfigs(d,s,n,a);let m="";try{console.log("\nSetting up foundation tokens symlink..."),await setupSymlink(o,l);for(const{mode:o,files:t}of f){console.log(`\nBuilding CSS for mode: ${o}...`);try{const n=getStyleDictionaryConfig(t,l,o,s);console.log(n,o);const i=new e(n);await i.buildPlatform("css"),console.log(`Style Dictionary build completed for mode: ${o}`),m=processCSSFiles(t,m),fs.writeFileSync(r,m),console.log(`CSS overrides generated successfully for mode: ${o}`)}catch(e){console.error(`Error during Style Dictionary build for mode: ${o}`,e)}}console.log("CODEGEN ANGULAR APP: generating overrides success !")}catch(e){console.error("Error setting up symlink or processing modes:",e)}finally{await removeSymlink(l)}})()}}};module.exports={generateOverrideCSS:generateOverrideCSS};
@@ -1 +1 @@
1
- const{writeFile:writeFile,formatContents:formatContents,getComponentModuleName:getComponentModuleName,getComponentName:getComponentName}=require("./wm-utils"),{getHandlebarTemplate:getHandlebarTemplate}=require("./handlebar-helpers"),getLazyModulesInfo=(e=[],n,o)=>{const a=e.reduce((e,n)=>"PAGE"===n.type?e:`${e?`${e},`:""}\n ${n.name}: {\n loadComponent: () => import('src/app/partials/${n.name}/${n.name}.component').then(m => m.${getComponentName(n.name)}),\n }`,""),t=Array.from(n.keys()),[r,m]=t.reduce((e,n)=>{const[a,t]=e;return[`${a?`${a},`:""}\n ${n}: {\n loadComponent: () => import('src/app/prefabs/${n}/${n}.component').then(m => m.${getComponentName(n)}),\n }`,o[n].reduce((e,o)=>`${e?`${e},`:""}\n ${n}_${o.name}: {\n loadComponent: () => (\n import(\n 'src/app/prefabs/${n}/partials/${o.name}/${o.name}.component'\n ).then(m => m.${getComponentName(o.name)})\n )\n }`,t)]},["",""]);return{partialModulesInfo:a,prefabModulesInfo:r,prefabPartialInfo:m}},generateLazyModuleRoutes=async(e,n,o,a)=>{const t=getHandlebarTemplate("lazy-module-routes"),{partialModulesInfo:r,prefabModulesInfo:m,prefabPartialInfo:l}=getLazyModulesInfo(e,n,o),p=t({partialModulesInfo:r,prefabModulesInfo:m,prefabPartialInfo:l});await writeFile(`${a}/src/framework/util/lazy-module-routes.ts`,formatContents(p))};module.exports={generateLazyModuleRoutes:generateLazyModuleRoutes};
1
+ const{writeFile:writeFile,formatContents:formatContents,getComponentModuleName:getComponentModuleName,getComponentName:getComponentName,getSafeObjectKey:getSafeObjectKey}=require("./wm-utils"),{getHandlebarTemplate:getHandlebarTemplate}=require("./handlebar-helpers"),getLazyModulesInfo=(e=[],t,n)=>{const a=e.reduce((e,t)=>"PAGE"===t.type?e:`${e?`${e},`:""}\n ${getSafeObjectKey(t.name)}: {\n loadComponent: () => import('src/app/partials/${t.name}/${t.name}.component').then(m => m.${getComponentName(t.name)}),\n }`,""),o=Array.from(t.keys()),[r,m]=o.reduce((e,t)=>{const[a,o]=e;return[`${a?`${a},`:""}\n ${getSafeObjectKey(t)}: {\n loadComponent: () => import('src/app/prefabs/${t}/${t}.component').then(m => m.${getComponentName(t)}),\n }`,n[t].reduce((e,n)=>`${e?`${e},`:""}\n ${getSafeObjectKey(t+"_"+n.name)}: {\n loadComponent: () => (\n import(\n 'src/app/prefabs/${t}/partials/${n.name}/${n.name}.component'\n ).then(m => m.${getComponentName(n.name)})\n )\n }`,o)]},["",""]);return{partialModulesInfo:a,prefabModulesInfo:r,prefabPartialInfo:m}},generateLazyModuleRoutes=async(e,t,n,a)=>{const o=getHandlebarTemplate("lazy-module-routes"),{partialModulesInfo:r,prefabModulesInfo:m,prefabPartialInfo:l}=getLazyModulesInfo(e,t,n),p=o({partialModulesInfo:r,prefabModulesInfo:m,prefabPartialInfo:l});await writeFile(`${a}/src/framework/util/lazy-module-routes.ts`,formatContents(p))};module.exports={generateLazyModuleRoutes:generateLazyModuleRoutes};
package/src/wm-utils.js CHANGED
@@ -1 +1 @@
1
- const util=require("util"),fs=require("fs"),rimraf=require("rimraf"),decodeUriComponent=require("decode-uri-component"),upperFirst=require("lodash/upperFirst"),tar=require("tar-fs"),prettier=require("prettier"),js_beautify=require("js-beautify"),html_beautify=require("js-beautify").html,path=require("path"),defaultEslintConfig=require("./eslintrc_config"),mergeWith=require("lodash/mergeWith"),stat=util.promisify(fs.stat),createDir=util.promisify(fs.mkdir),createReadStream=util.promisify(fs.createReadStream),readFile=util.promisify(fs.readFile),writeFile=util.promisify(fs.writeFile),readDir=util.promisify(fs.readdir),rename=util.promisify(fs.rename),searchFileByName=(e,t,r)=>{if(!fs.existsSync(e))return;fs.readdirSync(e).forEach(i=>{const s=path.join(e,i);fs.lstatSync(s).isDirectory()?searchFileByName(s,t,r):t.test(s)&&r(s)})},deleteResource=async e=>stat(e).then(()=>new Promise((t,r)=>{rimraf(e,()=>t())}),()=>Promise.resolve()),getComponentName=e=>`${upperFirst(e)}Component`,getComponentModuleName=e=>`${upperFirst(e)}Module`,decodeURIComponent=e=>decodeUriComponent(e.replace(/\+/g," ")),createTar=(e,t)=>new Promise((r,i)=>{tar.pack(e).pipe(fs.createWriteStream(t)).on("finish",r)}),extractTar=(e,t)=>new Promise((r,i)=>{fs.createReadStream(e).pipe(tar.extract(t)).on("finish",r)}),getWebAppPath=e=>`${e}/src/main/webapp`,getLayoutsConfigPath=e=>`${getWebAppPath(e)}/layouts/layouts-config.json`,getLayoutsDirPath=e=>`${getWebAppPath(e)}/layouts`,getPagesDirPath=e=>`${getWebAppPath(e)}/pages`,getPagesConfigPath=e=>`${getWebAppPath(e)}/pages/pages-config.json`,getPrefabsDirPath=e=>`${getWebAppPath(e)}/WEB-INF/prefabs`,getPrefabConfigPath=(e,t)=>`${getPrefabsDirPath(e)}/${t}/webapp/config.json`,getPrefabPagesDirPath=(e,t)=>`${getPrefabsDirPath(e)}/${t}/webapp/pages`,getSecurityConfigPath=e=>`${e}/services/securityService/designtime/intercept-urls.json`,getRolesConfigPath=e=>`${e}/services/securityService/designtime/roles.json`,getAuthInfoFilePath=e=>`${e}/services/securityService/designtime/auth-info.json`,getAppJsFilePath=e=>`${getWebAppPath(e)}/app.js`,getAppVariablesFilePath=e=>`${getWebAppPath(e)}/app.variables.json`,getThemesConfigPropertiesFilePath=e=>`${getWebAppPath(e)}/themes/themes-config.json`,getWmProjectPropertiesFilePath=e=>`${e}/target/ui-resources/wmProperties.js`,getLegacyWmProjectPropertiesFilePath=e=>`${e}/.wmproject.properties`,getIndexHtmlPath=e=>`${getWebAppPath(e)}/index.html`;let codegenPath="./node_modules/@wavemaker/angular-codegen";const setCodegenPath=e=>{e&&(codegenPath=e)},getCodegenPath=()=>codegenPath,generateRandomHash=()=>Array.from(Array(20),()=>Math.floor(36*Math.random()).toString(36)).join(""),formatContents=(e="",t)=>"javascript"===t?js_beautify(e,{}):prettier.format(e,{semi:!1,parser:"typescript",tabWidth:4}),formatMarkup=(e="")=>html_beautify(e),isMobileProject=e=>"MOBILE"===e.platformType,isPrefabProject=e=>"PREFAB"===e.type,isPrismProject=e=>"PRISM"===e.template,readFileSync=(e,t)=>{let r=fs.readFileSync(e);return t?JSON.parse(r):r};function copyFileSync(e,t){try{fs.copyFileSync(e,t)}catch(t){console.error(`Error copying ${e}: ${t.message}`)}}function existsFileSync(e){try{return fs.existsSync(e)}catch(t){return console.error(`Error in checking file exist ${e}: ${t.message}`),!1}}function copyPrefabFiles(e,t){const r=path.resolve(`${e}`);if(fs.existsSync(r)){const e=fs.readdirSync(r).filter(e=>fs.statSync(path.join(r,e)).isDirectory());t=path.resolve(`${t}`),e.forEach(e=>{const i=path.join(r,e),s=path.join(i,"prefab-servicedefs.json");fs.existsSync(s)&&copyFileSync(s,path.join(t+"/src","servicedefs",`${e}-prefab-servicedefs.json`));const a=path.join(i,"webapp"),o=path.join(t+"/resources",e);fs.existsSync(a)&&copyDirWithExclusionsSync(a,o,["resources"]);const n=path.join(a,"resources"),c=path.join(t+"/resources",e+"/resources");fs.existsSync(n)&&copyDirWithExclusionsSync(n,c)})}}const copyDirWithExclusionsSync=(e,t,r=[])=>{fs.existsSync(t)||fs.mkdirSync(t,{recursive:!0});let i=[];try{i=fs.readdirSync(e,{withFileTypes:!0})}catch(e){if("ENOENT"!==e.code)throw e}for(const s of i){const i=path.join(e,s.name),a=path.join(t,s.name);r.includes(s.name)||(s.isDirectory()?copyDirWithExclusionsSync(i,a,r):fs.copyFileSync(i,a))}},initExpressionParser=()=>{const e=require("../dependencies/expression-parser.cjs"),t=require("../dependencies/pipe-provider.cjs");e.setPipeProvider(new t.PipeProvider({},{get:()=>{}},{}))},DESIGN_TOKENS_DIR_NAME="design-tokens",APP_OVERRIDE_CSS_PATH="design-tokens/app.override.css",OVERRIDE_TOKENS_PATH="design-tokens/overrides",updateEslintConfig=async(e,t)=>{let r,i;try{existsFileSync(path.join(e,"build-src","eslintrc-override.js"))?(r=require(path.join(e,"build-src","eslintrc-override.js")),(i=mergeWith({},defaultEslintConfig,r)).extends&&!i.extends.includes("eslint:recommended")&&i.extends.push("eslint:recommended"),Object.prototype.hasOwnProperty.call(i,"extraLintPaths")&&delete i.extraLintPaths,Object.prototype.hasOwnProperty.call(i,"ignoreCssPatterns")&&delete i.ignoreCssPatterns):i=mergeWith({},defaultEslintConfig),await fs.writeFileSync(path.join(t,".eslintrc.js"),`const config = ${JSON.stringify(i,null,4)};\n\nmodule.exports = config;`)}catch(e){console.log(`Error in updating eslint config: ${e.message}`)}};module.exports={stat:stat,createDir:createDir,createReadStream:createReadStream,readFile:readFile,writeFile:writeFile,deleteResource:deleteResource,getComponentName:getComponentName,getComponentModuleName:getComponentModuleName,decodeURIComponent:decodeURIComponent,createTar:createTar,extractTar:extractTar,readDir:readDir,rename:rename,searchFileByName:searchFileByName,updateEslintConfig:updateEslintConfig,existsFileSync:existsFileSync,getWebAppPath:getWebAppPath,getLayoutsConfigPath:getLayoutsConfigPath,getLayoutsDirPath:getLayoutsDirPath,getPagesDirPath:getPagesDirPath,getPagesConfigPath:getPagesConfigPath,getPrefabsDirPath:getPrefabsDirPath,getPrefabConfigPath:getPrefabConfigPath,getPrefabPagesDirPath:getPrefabPagesDirPath,getSecurityConfigPath:getSecurityConfigPath,getRolesConfigPath:getRolesConfigPath,getAuthInfoFilePath:getAuthInfoFilePath,getAppJsFilePath:getAppJsFilePath,getAppVariablesFilePath:getAppVariablesFilePath,getWmProjectPropertiesFilePath:getWmProjectPropertiesFilePath,getThemesConfigPropertiesFilePath:getThemesConfigPropertiesFilePath,getIndexHtmlPath:getIndexHtmlPath,formatContents:formatContents,formatMarkup:formatMarkup,isMobileProject:isMobileProject,isPrefabProject:isPrefabProject,isPrismProject:isPrismProject,readFileSync:readFileSync,getCodegenPath:getCodegenPath,setCodegenPath:setCodegenPath,initExpressionParser:initExpressionParser,copyFileSync:copyFileSync,copyPrefabFiles:copyPrefabFiles,generateRandomHash:generateRandomHash,copyDirWithExclusionsSync:copyDirWithExclusionsSync,DESIGN_TOKENS_DIR_NAME:"design-tokens",APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH,OVERRIDE_TOKENS_PATH:OVERRIDE_TOKENS_PATH,getLegacyWmProjectPropertiesFilePath:getLegacyWmProjectPropertiesFilePath};
1
+ const util=require("util"),fs=require("fs"),rimraf=require("rimraf"),decodeUriComponent=require("decode-uri-component"),upperFirst=require("lodash/upperFirst"),tar=require("tar-fs"),prettier=require("prettier"),js_beautify=require("js-beautify"),html_beautify=require("js-beautify").html,path=require("path"),defaultEslintConfig=require("./eslintrc_config"),mergeWith=require("lodash/mergeWith"),stat=util.promisify(fs.stat),createDir=util.promisify(fs.mkdir),createReadStream=util.promisify(fs.createReadStream),readFile=util.promisify(fs.readFile),writeFile=util.promisify(fs.writeFile),readDir=util.promisify(fs.readdir),rename=util.promisify(fs.rename),searchFileByName=(e,t,r)=>{if(!fs.existsSync(e))return;fs.readdirSync(e).forEach(i=>{const s=path.join(e,i);fs.lstatSync(s).isDirectory()?searchFileByName(s,t,r):t.test(s)&&r(s)})},deleteResource=async e=>stat(e).then(()=>new Promise((t,r)=>{rimraf(e,()=>t())}),()=>Promise.resolve()),getComponentName=e=>`${e.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join("")}Component`,getComponentModuleName=e=>`${e.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join("")}Module`,getSafeObjectKey=e=>/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(e)?e:`'${e}'`,decodeURIComponent=e=>decodeUriComponent(e.replace(/\+/g," ")),createTar=(e,t)=>new Promise((r,i)=>{tar.pack(e).pipe(fs.createWriteStream(t)).on("finish",r)}),extractTar=(e,t)=>new Promise((r,i)=>{fs.createReadStream(e).pipe(tar.extract(t)).on("finish",r)}),getWebAppPath=e=>`${e}/src/main/webapp`,getLayoutsConfigPath=e=>`${getWebAppPath(e)}/layouts/layouts-config.json`,getLayoutsDirPath=e=>`${getWebAppPath(e)}/layouts`,getPagesDirPath=e=>`${getWebAppPath(e)}/pages`,getPagesConfigPath=e=>`${getWebAppPath(e)}/pages/pages-config.json`,getPrefabsDirPath=e=>`${getWebAppPath(e)}/WEB-INF/prefabs`,getPrefabConfigPath=(e,t)=>`${getPrefabsDirPath(e)}/${t}/webapp/config.json`,getPrefabPagesDirPath=(e,t)=>`${getPrefabsDirPath(e)}/${t}/webapp/pages`,getSecurityConfigPath=e=>`${e}/services/securityService/designtime/intercept-urls.json`,getRolesConfigPath=e=>`${e}/services/securityService/designtime/roles.json`,getAuthInfoFilePath=e=>`${e}/services/securityService/designtime/auth-info.json`,getAppJsFilePath=e=>`${getWebAppPath(e)}/app.js`,getAppVariablesFilePath=e=>`${getWebAppPath(e)}/app.variables.json`,getThemesConfigPropertiesFilePath=e=>`${getWebAppPath(e)}/themes/themes-config.json`,getWmProjectPropertiesFilePath=e=>`${e}/target/ui-resources/wmProperties.js`,getLegacyWmProjectPropertiesFilePath=e=>`${e}/.wmproject.properties`,getIndexHtmlPath=e=>`${getWebAppPath(e)}/index.html`;let codegenPath="./node_modules/@wavemaker/angular-codegen";const setCodegenPath=e=>{e&&(codegenPath=e)},getCodegenPath=()=>codegenPath,generateRandomHash=()=>Array.from(Array(20),()=>Math.floor(36*Math.random()).toString(36)).join(""),formatContents=(e="",t)=>"javascript"===t?js_beautify(e,{}):prettier.format(e,{semi:!1,parser:"typescript",tabWidth:4}),formatMarkup=(e="")=>html_beautify(e),isMobileProject=e=>"MOBILE"===e.platformType,isPrefabProject=e=>"PREFAB"===e.type,isPrismProject=e=>"PRISM"===e.template,readFileSync=(e,t)=>{let r=fs.readFileSync(e);return t?JSON.parse(r):r};function copyFileSync(e,t){try{fs.copyFileSync(e,t)}catch(t){console.error(`Error copying ${e}: ${t.message}`)}}function existsFileSync(e){try{return fs.existsSync(e)}catch(t){return console.error(`Error in checking file exist ${e}: ${t.message}`),!1}}function copyPrefabFiles(e,t){const r=path.resolve(`${e}`);if(fs.existsSync(r)){const e=fs.readdirSync(r).filter(e=>fs.statSync(path.join(r,e)).isDirectory());t=path.resolve(`${t}`),e.forEach(e=>{const i=path.join(r,e),s=path.join(i,"prefab-servicedefs.json");fs.existsSync(s)&&copyFileSync(s,path.join(t+"/src","servicedefs",`${e}-prefab-servicedefs.json`));const a=path.join(i,"webapp"),o=path.join(t+"/resources",e);fs.existsSync(a)&&copyDirWithExclusionsSync(a,o,["resources"]);const n=path.join(a,"resources"),c=path.join(t+"/resources",e+"/resources");fs.existsSync(n)&&copyDirWithExclusionsSync(n,c)})}}const copyDirWithExclusionsSync=(e,t,r=[])=>{fs.existsSync(t)||fs.mkdirSync(t,{recursive:!0});let i=[];try{i=fs.readdirSync(e,{withFileTypes:!0})}catch(e){if("ENOENT"!==e.code)throw e}for(const s of i){const i=path.join(e,s.name),a=path.join(t,s.name);r.includes(s.name)||(s.isDirectory()?copyDirWithExclusionsSync(i,a,r):fs.copyFileSync(i,a))}},initExpressionParser=()=>{const e=require("../dependencies/expression-parser.cjs"),t=require("../dependencies/pipe-provider.cjs");e.setPipeProvider(new t.PipeProvider({},{get:()=>{}},{}))},DESIGN_TOKENS_DIR_NAME="design-tokens",APP_OVERRIDE_CSS_PATH="design-tokens/app.override.css",OVERRIDE_TOKENS_PATH="design-tokens/overrides",updateEslintConfig=async(e,t)=>{let r,i;try{existsFileSync(path.join(e,"build-src","eslintrc-override.js"))?(r=require(path.join(e,"build-src","eslintrc-override.js")),(i=mergeWith({},defaultEslintConfig,r)).extends&&!i.extends.includes("eslint:recommended")&&i.extends.push("eslint:recommended"),Object.prototype.hasOwnProperty.call(i,"extraLintPaths")&&delete i.extraLintPaths,Object.prototype.hasOwnProperty.call(i,"ignoreCssPatterns")&&delete i.ignoreCssPatterns):i=mergeWith({},defaultEslintConfig),await fs.writeFileSync(path.join(t,".eslintrc.js"),`const config = ${JSON.stringify(i,null,4)};\n\nmodule.exports = config;`)}catch(e){console.log(`Error in updating eslint config: ${e.message}`)}};module.exports={stat:stat,createDir:createDir,createReadStream:createReadStream,readFile:readFile,writeFile:writeFile,deleteResource:deleteResource,getComponentName:getComponentName,getComponentModuleName:getComponentModuleName,getSafeObjectKey:getSafeObjectKey,decodeURIComponent:decodeURIComponent,createTar:createTar,extractTar:extractTar,readDir:readDir,rename:rename,searchFileByName:searchFileByName,updateEslintConfig:updateEslintConfig,existsFileSync:existsFileSync,getWebAppPath:getWebAppPath,getLayoutsConfigPath:getLayoutsConfigPath,getLayoutsDirPath:getLayoutsDirPath,getPagesDirPath:getPagesDirPath,getPagesConfigPath:getPagesConfigPath,getPrefabsDirPath:getPrefabsDirPath,getPrefabConfigPath:getPrefabConfigPath,getPrefabPagesDirPath:getPrefabPagesDirPath,getSecurityConfigPath:getSecurityConfigPath,getRolesConfigPath:getRolesConfigPath,getAuthInfoFilePath:getAuthInfoFilePath,getAppJsFilePath:getAppJsFilePath,getAppVariablesFilePath:getAppVariablesFilePath,getWmProjectPropertiesFilePath:getWmProjectPropertiesFilePath,getThemesConfigPropertiesFilePath:getThemesConfigPropertiesFilePath,getIndexHtmlPath:getIndexHtmlPath,formatContents:formatContents,formatMarkup:formatMarkup,isMobileProject:isMobileProject,isPrefabProject:isPrefabProject,isPrismProject:isPrismProject,readFileSync:readFileSync,getCodegenPath:getCodegenPath,setCodegenPath:setCodegenPath,initExpressionParser:initExpressionParser,copyFileSync:copyFileSync,copyPrefabFiles:copyPrefabFiles,generateRandomHash:generateRandomHash,copyDirWithExclusionsSync:copyDirWithExclusionsSync,DESIGN_TOKENS_DIR_NAME:"design-tokens",APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH,OVERRIDE_TOKENS_PATH:OVERRIDE_TOKENS_PATH,getLegacyWmProjectPropertiesFilePath:getLegacyWmProjectPropertiesFilePath};