@wavemaker/angular-codegen 11.11.0-rc.6109 → 11.11.0-rc.6113
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.
- package/angular-app/dependency-report.html +1 -1
- package/angular-app/npm-shrinkwrap.json +43 -43
- package/angular-app/package-lock.json +43 -43
- package/angular-app/package.json +5 -5
- package/angular-app/src/assets/styles/css/wm-style.css +1 -1
- package/npm-shrinkwrap.json +23 -23
- package/package-lock.json +23 -23
- package/package.json +2 -2
- package/src/gen-app-override-css.js +1 -1
- package/src/project-meta.js +1 -1
- package/src/wm-utils.js +1 -1
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-codegen",
|
|
3
|
-
"version": "11.11.0-rc.
|
|
3
|
+
"version": "11.11.0-rc.6113",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@wavemaker/angular-codegen",
|
|
9
|
-
"version": "11.11.0-rc.
|
|
9
|
+
"version": "11.11.0-rc.6113",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@wavemaker/angular-app": "11.11.0-rc.
|
|
12
|
+
"@wavemaker/angular-app": "11.11.0-rc.6113",
|
|
13
13
|
"archiver": "^7.0.1",
|
|
14
14
|
"cheerio": "1.0.0-rc.12",
|
|
15
15
|
"decode-uri-component": "^0.2.0",
|
|
@@ -1377,8 +1377,8 @@
|
|
|
1377
1377
|
}
|
|
1378
1378
|
},
|
|
1379
1379
|
"node_modules/@types/node": {
|
|
1380
|
-
"version": "22.14.
|
|
1381
|
-
"integrity": "sha512-
|
|
1380
|
+
"version": "22.14.1",
|
|
1381
|
+
"integrity": "sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw==",
|
|
1382
1382
|
"license": "MIT",
|
|
1383
1383
|
"dependencies": {
|
|
1384
1384
|
"undici-types": "~6.21.0"
|
|
@@ -1411,8 +1411,8 @@
|
|
|
1411
1411
|
"license": "MIT"
|
|
1412
1412
|
},
|
|
1413
1413
|
"node_modules/@wavemaker/angular-app": {
|
|
1414
|
-
"version": "11.11.0-rc.
|
|
1415
|
-
"integrity": "sha512-
|
|
1414
|
+
"version": "11.11.0-rc.6113",
|
|
1415
|
+
"integrity": "sha512-3+/MagAmJlvENF+977+mzA7GQOsrc+O+k2WY3LQAeoxFgTngJ+l4GclBEM0b7ORCVsIY+XQsFEMdolTh4aOhxw==",
|
|
1416
1416
|
"dependencies": {
|
|
1417
1417
|
"@angular/animations": "18.2.13",
|
|
1418
1418
|
"@angular/common": "18.2.13",
|
|
@@ -1430,12 +1430,12 @@
|
|
|
1430
1430
|
"@fullcalendar/list": "6.1.15",
|
|
1431
1431
|
"@fullcalendar/timegrid": "6.1.15",
|
|
1432
1432
|
"@metrichor/jmespath": "0.3.1",
|
|
1433
|
-
"@wavemaker/app-ng-runtime": "11.11.0-rc.
|
|
1434
|
-
"@wavemaker/custom-widgets-m3": "11.11.0-rc.
|
|
1433
|
+
"@wavemaker/app-ng-runtime": "11.11.0-rc.6113",
|
|
1434
|
+
"@wavemaker/custom-widgets-m3": "11.11.0-rc.6113",
|
|
1435
1435
|
"@wavemaker/focus-trap": "1.0.1",
|
|
1436
|
-
"@wavemaker/foundation-css": "11.11.0-rc.
|
|
1436
|
+
"@wavemaker/foundation-css": "11.11.0-rc.6113",
|
|
1437
1437
|
"@wavemaker/nvd3": "1.8.12",
|
|
1438
|
-
"@wavemaker/variables": "11.11.0-rc.
|
|
1438
|
+
"@wavemaker/variables": "11.11.0-rc.6113",
|
|
1439
1439
|
"@ztree/ztree_v3": "3.5.48",
|
|
1440
1440
|
"angular-imask": "^7.6.1",
|
|
1441
1441
|
"angular2-websocket": "0.9.7",
|
|
@@ -1474,8 +1474,8 @@
|
|
|
1474
1474
|
}
|
|
1475
1475
|
},
|
|
1476
1476
|
"node_modules/@wavemaker/app-ng-runtime": {
|
|
1477
|
-
"version": "11.11.0-rc.
|
|
1478
|
-
"integrity": "sha512-
|
|
1477
|
+
"version": "11.11.0-rc.6113",
|
|
1478
|
+
"integrity": "sha512-PptnqVDPl7iGDoYCTizKOYkv/T3V/9js7Q3whm9Lk/78AIox9E2FI5ibz2oUkja1ax3wY4TLltBIw53ZHdXRdw==",
|
|
1479
1479
|
"license": "MIT",
|
|
1480
1480
|
"engines": {
|
|
1481
1481
|
"node": ">=18.16.1",
|
|
@@ -1483,8 +1483,8 @@
|
|
|
1483
1483
|
}
|
|
1484
1484
|
},
|
|
1485
1485
|
"node_modules/@wavemaker/custom-widgets-m3": {
|
|
1486
|
-
"version": "11.11.0-rc.
|
|
1487
|
-
"integrity": "sha512-
|
|
1486
|
+
"version": "11.11.0-rc.6113",
|
|
1487
|
+
"integrity": "sha512-VPFP9bBd0VSG6jqLluZY2F6ywxwmsRwWenKuqS7EZB91wsZWPnCsDIYk/jiwUjMA/WaociXzIVYdduXBpjybSA==",
|
|
1488
1488
|
"license": "ISC"
|
|
1489
1489
|
},
|
|
1490
1490
|
"node_modules/@wavemaker/focus-trap": {
|
|
@@ -1497,8 +1497,8 @@
|
|
|
1497
1497
|
}
|
|
1498
1498
|
},
|
|
1499
1499
|
"node_modules/@wavemaker/foundation-css": {
|
|
1500
|
-
"version": "11.11.0-rc.
|
|
1501
|
-
"integrity": "sha512-
|
|
1500
|
+
"version": "11.11.0-rc.6113",
|
|
1501
|
+
"integrity": "sha512-onEb5g4zJKArlGNvQHV+PcvcZF/liAeyYGYI0FBHqLlJcl+TaFlhmGdp4d/jdlDXYWRuNRgKX6tTBru5TUYgEg==",
|
|
1502
1502
|
"license": "ISC",
|
|
1503
1503
|
"dependencies": {
|
|
1504
1504
|
"chroma-js": "^3.1.2"
|
|
@@ -1513,8 +1513,8 @@
|
|
|
1513
1513
|
}
|
|
1514
1514
|
},
|
|
1515
1515
|
"node_modules/@wavemaker/variables": {
|
|
1516
|
-
"version": "11.11.0-rc.
|
|
1517
|
-
"integrity": "sha512-
|
|
1516
|
+
"version": "11.11.0-rc.6113",
|
|
1517
|
+
"integrity": "sha512-FXKZKgepGXBe1aYxwOVVB1cf2tYW8z0z+5T84CrjencJGb/zOS49R9mZgjQQHUw3SDuUyXj6RGJhZhjdqAvqtQ==",
|
|
1518
1518
|
"license": "ISC",
|
|
1519
1519
|
"dependencies": {
|
|
1520
1520
|
"@metrichor/jmespath": "^0.3.1",
|
|
@@ -2191,8 +2191,8 @@
|
|
|
2191
2191
|
}
|
|
2192
2192
|
},
|
|
2193
2193
|
"node_modules/caniuse-lite": {
|
|
2194
|
-
"version": "1.0.
|
|
2195
|
-
"integrity": "sha512-
|
|
2194
|
+
"version": "1.0.30001714",
|
|
2195
|
+
"integrity": "sha512-mtgapdwDLSSBnCI3JokHM7oEQBLxiJKVRtg10AxM1AyeiKcM96f0Mkbqeq+1AbiCtvMcHRulAAEMu693JrSWqg==",
|
|
2196
2196
|
"dev": true,
|
|
2197
2197
|
"funding": [
|
|
2198
2198
|
{
|
|
@@ -3270,8 +3270,8 @@
|
|
|
3270
3270
|
"license": "MIT"
|
|
3271
3271
|
},
|
|
3272
3272
|
"node_modules/electron-to-chromium": {
|
|
3273
|
-
"version": "1.5.
|
|
3274
|
-
"integrity": "sha512-
|
|
3273
|
+
"version": "1.5.138",
|
|
3274
|
+
"integrity": "sha512-FWlQc52z1dXqm+9cCJ2uyFgJkESd+16j6dBEjsgDNuHjBpuIzL8/lRc0uvh1k8RNI6waGo6tcy2DvwkTBJOLDg==",
|
|
3275
3275
|
"dev": true,
|
|
3276
3276
|
"license": "ISC"
|
|
3277
3277
|
},
|
package/package-lock.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-codegen",
|
|
3
|
-
"version": "11.11.0-rc.
|
|
3
|
+
"version": "11.11.0-rc.6113",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@wavemaker/angular-codegen",
|
|
9
|
-
"version": "11.11.0-rc.
|
|
9
|
+
"version": "11.11.0-rc.6113",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@wavemaker/angular-app": "11.11.0-rc.
|
|
12
|
+
"@wavemaker/angular-app": "11.11.0-rc.6113",
|
|
13
13
|
"archiver": "^7.0.1",
|
|
14
14
|
"cheerio": "1.0.0-rc.12",
|
|
15
15
|
"decode-uri-component": "^0.2.0",
|
|
@@ -1377,8 +1377,8 @@
|
|
|
1377
1377
|
}
|
|
1378
1378
|
},
|
|
1379
1379
|
"node_modules/@types/node": {
|
|
1380
|
-
"version": "22.14.
|
|
1381
|
-
"integrity": "sha512-
|
|
1380
|
+
"version": "22.14.1",
|
|
1381
|
+
"integrity": "sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw==",
|
|
1382
1382
|
"license": "MIT",
|
|
1383
1383
|
"dependencies": {
|
|
1384
1384
|
"undici-types": "~6.21.0"
|
|
@@ -1411,8 +1411,8 @@
|
|
|
1411
1411
|
"license": "MIT"
|
|
1412
1412
|
},
|
|
1413
1413
|
"node_modules/@wavemaker/angular-app": {
|
|
1414
|
-
"version": "11.11.0-rc.
|
|
1415
|
-
"integrity": "sha512-
|
|
1414
|
+
"version": "11.11.0-rc.6113",
|
|
1415
|
+
"integrity": "sha512-3+/MagAmJlvENF+977+mzA7GQOsrc+O+k2WY3LQAeoxFgTngJ+l4GclBEM0b7ORCVsIY+XQsFEMdolTh4aOhxw==",
|
|
1416
1416
|
"dependencies": {
|
|
1417
1417
|
"@angular/animations": "18.2.13",
|
|
1418
1418
|
"@angular/common": "18.2.13",
|
|
@@ -1430,12 +1430,12 @@
|
|
|
1430
1430
|
"@fullcalendar/list": "6.1.15",
|
|
1431
1431
|
"@fullcalendar/timegrid": "6.1.15",
|
|
1432
1432
|
"@metrichor/jmespath": "0.3.1",
|
|
1433
|
-
"@wavemaker/app-ng-runtime": "11.11.0-rc.
|
|
1434
|
-
"@wavemaker/custom-widgets-m3": "11.11.0-rc.
|
|
1433
|
+
"@wavemaker/app-ng-runtime": "11.11.0-rc.6113",
|
|
1434
|
+
"@wavemaker/custom-widgets-m3": "11.11.0-rc.6113",
|
|
1435
1435
|
"@wavemaker/focus-trap": "1.0.1",
|
|
1436
|
-
"@wavemaker/foundation-css": "11.11.0-rc.
|
|
1436
|
+
"@wavemaker/foundation-css": "11.11.0-rc.6113",
|
|
1437
1437
|
"@wavemaker/nvd3": "1.8.12",
|
|
1438
|
-
"@wavemaker/variables": "11.11.0-rc.
|
|
1438
|
+
"@wavemaker/variables": "11.11.0-rc.6113",
|
|
1439
1439
|
"@ztree/ztree_v3": "3.5.48",
|
|
1440
1440
|
"angular-imask": "^7.6.1",
|
|
1441
1441
|
"angular2-websocket": "0.9.7",
|
|
@@ -1474,8 +1474,8 @@
|
|
|
1474
1474
|
}
|
|
1475
1475
|
},
|
|
1476
1476
|
"node_modules/@wavemaker/app-ng-runtime": {
|
|
1477
|
-
"version": "11.11.0-rc.
|
|
1478
|
-
"integrity": "sha512-
|
|
1477
|
+
"version": "11.11.0-rc.6113",
|
|
1478
|
+
"integrity": "sha512-PptnqVDPl7iGDoYCTizKOYkv/T3V/9js7Q3whm9Lk/78AIox9E2FI5ibz2oUkja1ax3wY4TLltBIw53ZHdXRdw==",
|
|
1479
1479
|
"license": "MIT",
|
|
1480
1480
|
"engines": {
|
|
1481
1481
|
"node": ">=18.16.1",
|
|
@@ -1483,8 +1483,8 @@
|
|
|
1483
1483
|
}
|
|
1484
1484
|
},
|
|
1485
1485
|
"node_modules/@wavemaker/custom-widgets-m3": {
|
|
1486
|
-
"version": "11.11.0-rc.
|
|
1487
|
-
"integrity": "sha512-
|
|
1486
|
+
"version": "11.11.0-rc.6113",
|
|
1487
|
+
"integrity": "sha512-VPFP9bBd0VSG6jqLluZY2F6ywxwmsRwWenKuqS7EZB91wsZWPnCsDIYk/jiwUjMA/WaociXzIVYdduXBpjybSA==",
|
|
1488
1488
|
"license": "ISC"
|
|
1489
1489
|
},
|
|
1490
1490
|
"node_modules/@wavemaker/focus-trap": {
|
|
@@ -1497,8 +1497,8 @@
|
|
|
1497
1497
|
}
|
|
1498
1498
|
},
|
|
1499
1499
|
"node_modules/@wavemaker/foundation-css": {
|
|
1500
|
-
"version": "11.11.0-rc.
|
|
1501
|
-
"integrity": "sha512-
|
|
1500
|
+
"version": "11.11.0-rc.6113",
|
|
1501
|
+
"integrity": "sha512-onEb5g4zJKArlGNvQHV+PcvcZF/liAeyYGYI0FBHqLlJcl+TaFlhmGdp4d/jdlDXYWRuNRgKX6tTBru5TUYgEg==",
|
|
1502
1502
|
"license": "ISC",
|
|
1503
1503
|
"dependencies": {
|
|
1504
1504
|
"chroma-js": "^3.1.2"
|
|
@@ -1513,8 +1513,8 @@
|
|
|
1513
1513
|
}
|
|
1514
1514
|
},
|
|
1515
1515
|
"node_modules/@wavemaker/variables": {
|
|
1516
|
-
"version": "11.11.0-rc.
|
|
1517
|
-
"integrity": "sha512-
|
|
1516
|
+
"version": "11.11.0-rc.6113",
|
|
1517
|
+
"integrity": "sha512-FXKZKgepGXBe1aYxwOVVB1cf2tYW8z0z+5T84CrjencJGb/zOS49R9mZgjQQHUw3SDuUyXj6RGJhZhjdqAvqtQ==",
|
|
1518
1518
|
"license": "ISC",
|
|
1519
1519
|
"dependencies": {
|
|
1520
1520
|
"@metrichor/jmespath": "^0.3.1",
|
|
@@ -2191,8 +2191,8 @@
|
|
|
2191
2191
|
}
|
|
2192
2192
|
},
|
|
2193
2193
|
"node_modules/caniuse-lite": {
|
|
2194
|
-
"version": "1.0.
|
|
2195
|
-
"integrity": "sha512-
|
|
2194
|
+
"version": "1.0.30001714",
|
|
2195
|
+
"integrity": "sha512-mtgapdwDLSSBnCI3JokHM7oEQBLxiJKVRtg10AxM1AyeiKcM96f0Mkbqeq+1AbiCtvMcHRulAAEMu693JrSWqg==",
|
|
2196
2196
|
"dev": true,
|
|
2197
2197
|
"funding": [
|
|
2198
2198
|
{
|
|
@@ -3270,8 +3270,8 @@
|
|
|
3270
3270
|
"license": "MIT"
|
|
3271
3271
|
},
|
|
3272
3272
|
"node_modules/electron-to-chromium": {
|
|
3273
|
-
"version": "1.5.
|
|
3274
|
-
"integrity": "sha512-
|
|
3273
|
+
"version": "1.5.138",
|
|
3274
|
+
"integrity": "sha512-FWlQc52z1dXqm+9cCJ2uyFgJkESd+16j6dBEjsgDNuHjBpuIzL8/lRc0uvh1k8RNI6waGo6tcy2DvwkTBJOLDg==",
|
|
3275
3275
|
"dev": true,
|
|
3276
3276
|
"license": "ISC"
|
|
3277
3277
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-codegen",
|
|
3
|
-
"version": "11.11.0-rc.
|
|
3
|
+
"version": "11.11.0-rc.6113",
|
|
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.11.0-rc.
|
|
18
|
+
"@wavemaker/angular-app": "11.11.0-rc.6113",
|
|
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"),{
|
|
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 r=path.join(e,o),t=fs.statSync(r);if(t.isDirectory()){const e=groupFilesByMode(r);for(const o in e)s[o]||(s[o]=[]),s[o].push(...e[o])}else if(t.isFile()&&".json"===path.extname(r)){const e=o.match(/\.([^.]+)\.json$/);if(e){const o=e[1];s[o]||(s[o]=[]),s[o].push(r)}else s.default.push(r)}}),s},generateModeConfigs=(e,s,o)=>{const r=o&&o.name||"css/variables",t=[];for(const o in e){const n=e[o].map(e=>{return{destination:e.replace(s+"/","").replace(/\.json$/,".css"),options:{outputReferences:!0,selector:":root"},format:r,filter:function(s){var o,r=(o=s["@"]&&s["@"].filePath?s["@"].filePath:s.filePath)&&-1!==o.indexOf("overrides")||s.filePath&&-1!==s.filePath.indexOf("overrides"),t=o&&(e.includes(o)||e.includes(s.filePath));return r&&t}}});t.push({mode:o,files:n})}return t},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)=>{let r="";return{source:[r="default"===o?`src/main/webapp/${OVERRIDE_TOKENS_PATH}/**/!(*.*).json`:`src/main/webapp/${OVERRIDE_TOKENS_PATH}/**/*.${o}.json`],include:[path.join(s,"**","!(*.dark|*.light).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 getCssVarCalcMixFormatter(e,s){try{const o=await import(`${e}/node_modules/style-dictionary/lib/utils/index.js`),{usesReferences:r,getReferences:t}=o,{cssVarCalcMixFormatter:n}=await import(`${s}/node_modules/@wavemaker/foundation-css/utils/style-dictionary-utils.js`);return n(r,t)}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"),r=/(:root\s*\{[^}]*\})/,t=path.basename(o).split(".");let n=e;if(3===t.length&&"light"!==t[1]){const o=t[0],r=t[1];s+=(n=e.replace(/:root/g,`:root[${o}='${r}']`))+"\n"}else{const o=s.match(r),t=e.match(r);if(o&&t){const e=o[1],r=t[1].replace(/:root\s*\{|\}/g,"").trim(),n=e.replace("}",`\n${r}\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)=>{const r=await getLegacyWmProjectProperties(s);if(isPrismProject(r)&&(e.generateOverrideCSS||"angular"===e.buildType)){const r=path.join(s+"/src/main/webapp/",OVERRIDE_TOKENS_PATH),t=s+`/src/main/webapp/${APP_OVERRIDE_CSS_PATH}`;if(accessFile(t),fs.existsSync(r)){console.log("CODEGEN ANGULAR APP: generating override css...");let n={scope:"@wavemaker",name:"style-dictionary",version:e.runtimeUIVersion,packageJsonFile:"",successMsg:"STYLE DICTIONARY SUCCESS",infoMsg:"STYLE DICTIONARY PACKAGE : ",skipPackageVersion:!0};n.baseDir=o;const i=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=downloadNPMPackage(a);console.log("FOUNDATION_CSS_PATH",c),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/tokens"),n=await getCssVarCalcMixFormatter(i,c);n&&e.registerFormat(n);const a=`src/main/webapp/${DESIGN_TOKENS_DIR_NAME}/temp-tokens`,l=groupFilesByMode(r),f=generateModeConfigs(l,s,n);let d="";try{console.log("\nSetting up foundation tokens symlink..."),await setupSymlink(o,a);for(const{mode:s,files:o}of f){console.log(`\nBuilding CSS for mode: ${s}...`);try{const r=getStyleDictionaryConfig(o,a,s);console.log(r,s);const n=new e(r);await n.buildPlatform("css"),console.log(`Style Dictionary build completed for mode: ${s}`),d=processCSSFiles(o,d),fs.writeFileSync(t,d),console.log(`CSS overrides generated successfully for mode: ${s}`)}catch(e){console.error(`Error during Style Dictionary build for mode: ${s}`,e)}}console.log("CODEGEN ANGULAR APP: generating overrides success !")}catch(e){console.error("Error setting up symlink or processing modes:",e)}finally{await removeSymlink(a)}})()}}};module.exports={generateOverrideCSS:generateOverrideCSS};
|
package/src/project-meta.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const parser=require("fast-xml-parser"),{readFile:readFile,readDir:readDir,stat:stat,isPrefabProject:isPrefabProject,getWmProjectPropertiesFilePath:getWmProjectPropertiesFilePath,getThemesConfigPropertiesFilePath:getThemesConfigPropertiesFilePath,getAuthInfoFilePath:getAuthInfoFilePath,getSecurityConfigPath:getSecurityConfigPath,getLayoutsConfigPath:getLayoutsConfigPath,getPagesConfigPath:getPagesConfigPath,getPrefabsDirPath:getPrefabsDirPath,getPrefabPagesDirPath:getPrefabPagesDirPath,getPrefabConfigPath:getPrefabConfigPath}=require("./wm-utils"),{join:join}=require("path"),getWmProjectProperties=async e=>{const t=getWmProjectPropertiesFilePath(e);try{const e=require(t);if(e.WMAppProperties)return e.WMAppProperties;throw new Error("WMAppProperties not found in the provided file.")}catch(e){console.error("Error loading the WMAppProperties file:",e)}},getThemesConfigProperties=async e=>{const t=await readFile(getThemesConfigPropertiesFilePath(e),"utf8");return JSON.parse(t)},getSecurityConfig=async e=>stat(getAuthInfoFilePath(e)).then(()=>new Promise(async(t,r)=>{let a=null;JSON.parse(await readFile(getAuthInfoFilePath(e))).enforceSecurity&&(a=JSON.parse(await readFile(getSecurityConfigPath(e),"utf8"))),t(a)}),()=>Promise.resolve(null)),getAuthInfoConfig=async e=>{let t=await readFile(getAuthInfoFilePath(e),"utf8");return(t=JSON.parse(t)).enforceSecurity?t:null},getLayoutsConfig=async e=>{let t=await readFile(getLayoutsConfigPath(e),"utf8");return t=JSON.parse(t)},getPagesConfig=async e=>{let t=await readFile(getPagesConfigPath(e),"utf8");return t=JSON.parse(t)},getPrefabPartialsConfig=async(e,t)=>{let r=await readFile(`${getPrefabPagesDirPath(e,t)}/pages-config.json`,"utf8");return r=JSON.parse(r).filter(e=>"partial"===e.type.toLowerCase()||"template"===e.type.toLowerCase()).map(e=>({...e,prefabName:t}))},getPrefabConfigsUsedInApp=async(e,t)=>{const r=new Map,a=getPrefabsDirPath(t);return stat(a).then(()=>new Promise(async(i,o)=>{for(const e of await readDir(a))(await stat(join(a,e))).isDirectory()&&r.set(e,await readFile(getPrefabConfigPath(t,e)));isPrefabProject(e)&&r.set("__self__",await readFile(`${t}/src/main/webapp/config.json`)),i(r)}),()=>Promise.resolve(r))};module.exports={getWmProjectProperties:getWmProjectProperties,getThemesConfigProperties:getThemesConfigProperties,getSecurityConfig:getSecurityConfig,getLayoutsConfig:getLayoutsConfig,getPagesConfig:getPagesConfig,getPrefabConfigsUsedInApp:getPrefabConfigsUsedInApp,getPrefabPartialsConfig:getPrefabPartialsConfig,getAuthInfoConfig:getAuthInfoConfig};
|
|
1
|
+
const parser=require("fast-xml-parser"),{readFile:readFile,readDir:readDir,stat:stat,isPrefabProject:isPrefabProject,getWmProjectPropertiesFilePath:getWmProjectPropertiesFilePath,getThemesConfigPropertiesFilePath:getThemesConfigPropertiesFilePath,getAuthInfoFilePath:getAuthInfoFilePath,getSecurityConfigPath:getSecurityConfigPath,getLayoutsConfigPath:getLayoutsConfigPath,getPagesConfigPath:getPagesConfigPath,getPrefabsDirPath:getPrefabsDirPath,getPrefabPagesDirPath:getPrefabPagesDirPath,getPrefabConfigPath:getPrefabConfigPath,getLegacyWmProjectPropertiesFilePath:getLegacyWmProjectPropertiesFilePath}=require("./wm-utils"),{join:join}=require("path"),getWmProjectProperties=async e=>{const t=getWmProjectPropertiesFilePath(e);try{const e=require(t);if(e.WMAppProperties)return e.WMAppProperties;throw new Error("WMAppProperties not found in the provided file.")}catch(e){console.error("Error loading the WMAppProperties file:",e)}},getLegacyWmProjectProperties=async e=>{let t=await readFile(getLegacyWmProjectPropertiesFilePath(e),"utf8");const r={};return parser.parse(t,{textNodeName:"text",ignoreAttributes:!1,ignoreNameSpace:!1,allowBooleanAttributes:!1,parseNodeValue:!0,parseAttributeValue:!1,trimValues:!0,parseTrueNumberOnly:!1,arrayMode:!1,stopNodes:["parse-me-as-string"]},!0).properties.entry.forEach(e=>r[e["@_key"]]=e.text?e.text:""),r},getThemesConfigProperties=async e=>{const t=await readFile(getThemesConfigPropertiesFilePath(e),"utf8");return JSON.parse(t)},getSecurityConfig=async e=>stat(getAuthInfoFilePath(e)).then(()=>new Promise(async(t,r)=>{let a=null;JSON.parse(await readFile(getAuthInfoFilePath(e))).enforceSecurity&&(a=JSON.parse(await readFile(getSecurityConfigPath(e),"utf8"))),t(a)}),()=>Promise.resolve(null)),getAuthInfoConfig=async e=>{let t=await readFile(getAuthInfoFilePath(e),"utf8");return(t=JSON.parse(t)).enforceSecurity?t:null},getLayoutsConfig=async e=>{let t=await readFile(getLayoutsConfigPath(e),"utf8");return t=JSON.parse(t)},getPagesConfig=async e=>{let t=await readFile(getPagesConfigPath(e),"utf8");return t=JSON.parse(t)},getPrefabPartialsConfig=async(e,t)=>{let r=await readFile(`${getPrefabPagesDirPath(e,t)}/pages-config.json`,"utf8");return r=JSON.parse(r).filter(e=>"partial"===e.type.toLowerCase()||"template"===e.type.toLowerCase()).map(e=>({...e,prefabName:t}))},getPrefabConfigsUsedInApp=async(e,t)=>{const r=new Map,a=getPrefabsDirPath(t);return stat(a).then(()=>new Promise(async(i,o)=>{for(const e of await readDir(a))(await stat(join(a,e))).isDirectory()&&r.set(e,await readFile(getPrefabConfigPath(t,e)));isPrefabProject(e)&&r.set("__self__",await readFile(`${t}/src/main/webapp/config.json`)),i(r)}),()=>Promise.resolve(r))};module.exports={getWmProjectProperties:getWmProjectProperties,getThemesConfigProperties:getThemesConfigProperties,getSecurityConfig:getSecurityConfig,getLayoutsConfig:getLayoutsConfig,getPagesConfig:getPagesConfig,getPrefabConfigsUsedInApp:getPrefabConfigsUsedInApp,getPrefabPartialsConfig:getPrefabPartialsConfig,getAuthInfoConfig:getAuthInfoConfig,getLegacyWmProjectProperties:getLegacyWmProjectProperties};
|
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"),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 a=path.join(e,i);fs.lstatSync(a).isDirectory()?searchFileByName(a,t,r):t.test(a)&&r(a)})},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`,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 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),a=path.join(i,"prefab-servicedefs.json");fs.existsSync(a)&©FileSync(a,path.join(t+"/src","servicedefs",`${e}-prefab-servicedefs.json`));const s=path.join(i,"webapp"),o=path.join(t+"/resources",e);fs.existsSync(s)&©DirWithExclusionsSync(s,o,["resources"]);const n=path.join(s,"resources"),c=path.join(t+"/resources",e+"/resources");fs.existsSync(n)&©DirWithExclusionsSync(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 a of i){const i=path.join(e,a.name),s=path.join(t,a.name);r.includes(a.name)||(a.isDirectory()?copyDirWithExclusionsSync(i,s,r):fs.copyFileSync(i,s))}},initExpressionParser=()=>{const e=require("../dependencies/expression-parser.cjs"),t=require("../dependencies/pipe-provider.cjs");e.setPipeProvider(new t.PipeProvider({},{get:()=>{}},{}))},DESIGN_TOKENS_DIR_NAME="themes",APP_OVERRIDE_CSS_PATH="themes/app.override.css",OVERRIDE_TOKENS_PATH="themes/overrides";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,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:"themes",APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH,OVERRIDE_TOKENS_PATH:"themes/overrides"};
|
|
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"),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 a=path.join(e,i);fs.lstatSync(a).isDirectory()?searchFileByName(a,t,r):t.test(a)&&r(a)})},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 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),a=path.join(i,"prefab-servicedefs.json");fs.existsSync(a)&©FileSync(a,path.join(t+"/src","servicedefs",`${e}-prefab-servicedefs.json`));const s=path.join(i,"webapp"),o=path.join(t+"/resources",e);fs.existsSync(s)&©DirWithExclusionsSync(s,o,["resources"]);const n=path.join(s,"resources"),c=path.join(t+"/resources",e+"/resources");fs.existsSync(n)&©DirWithExclusionsSync(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 a of i){const i=path.join(e,a.name),s=path.join(t,a.name);r.includes(a.name)||(a.isDirectory()?copyDirWithExclusionsSync(i,s,r):fs.copyFileSync(i,s))}},initExpressionParser=()=>{const e=require("../dependencies/expression-parser.cjs"),t=require("../dependencies/pipe-provider.cjs");e.setPipeProvider(new t.PipeProvider({},{get:()=>{}},{}))},DESIGN_TOKENS_DIR_NAME="themes",APP_OVERRIDE_CSS_PATH="themes/app.override.css",OVERRIDE_TOKENS_PATH="themes/overrides";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,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:"themes",APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH,OVERRIDE_TOKENS_PATH:"themes/overrides",getLegacyWmProjectPropertiesFilePath:getLegacyWmProjectPropertiesFilePath};
|