@wavemaker/angular-codegen 11.11.6-rc.6191 → 11.11.7-rc.218
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 +170 -109
- package/angular-app/package-lock.json +170 -109
- package/angular-app/package.json +5 -5
- package/angular-app/src/assets/styles/css/wm-style.css +1 -1
- package/dependencies/pipe-provider.cjs.js +16 -1
- package/dependencies/transpilation-web.cjs.js +1 -1
- package/npm-shrinkwrap.json +56 -55
- package/package-lock.json +56 -55
- package/package.json +2 -2
- package/src/wm-utils.js +1 -1
package/package-lock.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-codegen",
|
|
3
|
-
"version": "11.11.
|
|
3
|
+
"version": "11.11.7-rc.218",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@wavemaker/angular-codegen",
|
|
9
|
-
"version": "11.11.
|
|
9
|
+
"version": "11.11.7-rc.218",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@wavemaker/angular-app": "11.11.
|
|
12
|
+
"@wavemaker/angular-app": "11.11.7-rc.218",
|
|
13
13
|
"archiver": "^7.0.1",
|
|
14
14
|
"cheerio": "1.0.0-rc.12",
|
|
15
15
|
"decode-uri-component": "^0.2.0",
|
|
@@ -391,13 +391,13 @@
|
|
|
391
391
|
}
|
|
392
392
|
},
|
|
393
393
|
"node_modules/@babel/helpers": {
|
|
394
|
-
"version": "7.
|
|
395
|
-
"integrity": "sha512
|
|
394
|
+
"version": "7.28.2",
|
|
395
|
+
"integrity": "sha512-/V9771t+EgXz62aCcyofnQhGM8DQACbRhvzKFsXKC9QM+5MadF8ZmIm0crDMaz3+o0h0zXfJnd4EhbYbxsrcFw==",
|
|
396
396
|
"dev": true,
|
|
397
397
|
"license": "MIT",
|
|
398
398
|
"dependencies": {
|
|
399
399
|
"@babel/template": "^7.27.2",
|
|
400
|
-
"@babel/types": "^7.
|
|
400
|
+
"@babel/types": "^7.28.2"
|
|
401
401
|
},
|
|
402
402
|
"engines": {
|
|
403
403
|
"node": ">=6.9.0"
|
|
@@ -637,8 +637,8 @@
|
|
|
637
637
|
}
|
|
638
638
|
},
|
|
639
639
|
"node_modules/@babel/runtime-corejs3": {
|
|
640
|
-
"version": "7.28.
|
|
641
|
-
"integrity": "sha512-
|
|
640
|
+
"version": "7.28.2",
|
|
641
|
+
"integrity": "sha512-FVFaVs2/dZgD3Y9ZD+AKNKjyGKzwu0C54laAXWUXgLcVXcCX6YZ6GhK2cp7FogSN2OA0Fu+QT8dP3FUdo9ShSQ==",
|
|
642
642
|
"license": "MIT",
|
|
643
643
|
"dependencies": {
|
|
644
644
|
"core-js-pure": "^3.43.0"
|
|
@@ -703,8 +703,8 @@
|
|
|
703
703
|
"license": "MIT"
|
|
704
704
|
},
|
|
705
705
|
"node_modules/@babel/types": {
|
|
706
|
-
"version": "7.28.
|
|
707
|
-
"integrity": "sha512-
|
|
706
|
+
"version": "7.28.2",
|
|
707
|
+
"integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==",
|
|
708
708
|
"dev": true,
|
|
709
709
|
"license": "MIT",
|
|
710
710
|
"dependencies": {
|
|
@@ -1328,12 +1328,12 @@
|
|
|
1328
1328
|
}
|
|
1329
1329
|
},
|
|
1330
1330
|
"node_modules/@types/babel__traverse": {
|
|
1331
|
-
"version": "7.
|
|
1332
|
-
"integrity": "sha512-
|
|
1331
|
+
"version": "7.28.0",
|
|
1332
|
+
"integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==",
|
|
1333
1333
|
"dev": true,
|
|
1334
1334
|
"license": "MIT",
|
|
1335
1335
|
"dependencies": {
|
|
1336
|
-
"@babel/types": "^7.
|
|
1336
|
+
"@babel/types": "^7.28.2"
|
|
1337
1337
|
}
|
|
1338
1338
|
},
|
|
1339
1339
|
"node_modules/@types/graceful-fs": {
|
|
@@ -1367,11 +1367,11 @@
|
|
|
1367
1367
|
}
|
|
1368
1368
|
},
|
|
1369
1369
|
"node_modules/@types/node": {
|
|
1370
|
-
"version": "24.
|
|
1371
|
-
"integrity": "sha512-
|
|
1370
|
+
"version": "24.2.1",
|
|
1371
|
+
"integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==",
|
|
1372
1372
|
"license": "MIT",
|
|
1373
1373
|
"dependencies": {
|
|
1374
|
-
"undici-types": "~7.
|
|
1374
|
+
"undici-types": "~7.10.0"
|
|
1375
1375
|
}
|
|
1376
1376
|
},
|
|
1377
1377
|
"node_modules/@types/prettier": {
|
|
@@ -1401,8 +1401,8 @@
|
|
|
1401
1401
|
"license": "MIT"
|
|
1402
1402
|
},
|
|
1403
1403
|
"node_modules/@wavemaker/angular-app": {
|
|
1404
|
-
"version": "11.11.
|
|
1405
|
-
"integrity": "sha512-
|
|
1404
|
+
"version": "11.11.7-rc.218",
|
|
1405
|
+
"integrity": "sha512-3ETA7LiZM5e9jC/eQud08OlalZJea672KIAHyiBZMsl4d9jeyDavR5PrXPc/Mr+B7yBV8eJeJyPYuV1Li+PnSg==",
|
|
1406
1406
|
"dependencies": {
|
|
1407
1407
|
"@angular/animations": "18.2.13",
|
|
1408
1408
|
"@angular/common": "18.2.13",
|
|
@@ -1420,12 +1420,12 @@
|
|
|
1420
1420
|
"@fullcalendar/list": "6.1.15",
|
|
1421
1421
|
"@fullcalendar/timegrid": "6.1.15",
|
|
1422
1422
|
"@metrichor/jmespath": "0.3.1",
|
|
1423
|
-
"@wavemaker/app-ng-runtime": "11.11.
|
|
1424
|
-
"@wavemaker/custom-widgets-m3": "11.11.
|
|
1423
|
+
"@wavemaker/app-ng-runtime": "11.11.7-rc.218",
|
|
1424
|
+
"@wavemaker/custom-widgets-m3": "11.11.7-rc.218",
|
|
1425
1425
|
"@wavemaker/focus-trap": "1.0.1",
|
|
1426
|
-
"@wavemaker/foundation-css": "11.11.
|
|
1426
|
+
"@wavemaker/foundation-css": "11.11.7-rc.218",
|
|
1427
1427
|
"@wavemaker/nvd3": "1.8.13",
|
|
1428
|
-
"@wavemaker/variables": "11.11.
|
|
1428
|
+
"@wavemaker/variables": "11.11.7-rc.218",
|
|
1429
1429
|
"@ztree/ztree_v3": "3.5.48",
|
|
1430
1430
|
"angular-imask": "^7.6.1",
|
|
1431
1431
|
"angular2-websocket": "0.9.7",
|
|
@@ -1464,8 +1464,8 @@
|
|
|
1464
1464
|
}
|
|
1465
1465
|
},
|
|
1466
1466
|
"node_modules/@wavemaker/app-ng-runtime": {
|
|
1467
|
-
"version": "11.11.
|
|
1468
|
-
"integrity": "sha512-
|
|
1467
|
+
"version": "11.11.7-rc.218",
|
|
1468
|
+
"integrity": "sha512-ObZddyu1S9JzSY9Gl6hJETAax7nadwLDQVftgxflx//TWUELJGMoTJ0aGuwW7fx0C8yLtDJrXASUz2zrSbNUSw==",
|
|
1469
1469
|
"license": "MIT",
|
|
1470
1470
|
"engines": {
|
|
1471
1471
|
"node": ">=18.16.1",
|
|
@@ -1473,8 +1473,8 @@
|
|
|
1473
1473
|
}
|
|
1474
1474
|
},
|
|
1475
1475
|
"node_modules/@wavemaker/custom-widgets-m3": {
|
|
1476
|
-
"version": "11.11.
|
|
1477
|
-
"integrity": "sha512-
|
|
1476
|
+
"version": "11.11.7-rc.218",
|
|
1477
|
+
"integrity": "sha512-Wz9K+pGcH1us0cKSifek80a6fr71ixJu00P7vDoAVOAaJvHxNTGqXAlFcZs0bDcTD6sSIrLg+p7SPnC0NH6K0Q==",
|
|
1478
1478
|
"license": "ISC"
|
|
1479
1479
|
},
|
|
1480
1480
|
"node_modules/@wavemaker/focus-trap": {
|
|
@@ -1487,8 +1487,8 @@
|
|
|
1487
1487
|
}
|
|
1488
1488
|
},
|
|
1489
1489
|
"node_modules/@wavemaker/foundation-css": {
|
|
1490
|
-
"version": "11.11.
|
|
1491
|
-
"integrity": "sha512-
|
|
1490
|
+
"version": "11.11.7-rc.218",
|
|
1491
|
+
"integrity": "sha512-NmY8JIJ/7fevltIdbFfWoDZjknTBlgcDFVuklJYRtSRva8XMrXZZyqIYb7NLYGL2kqRqN+tqZJbTitF0LSjflA==",
|
|
1492
1492
|
"license": "ISC",
|
|
1493
1493
|
"dependencies": {
|
|
1494
1494
|
"chroma-js": "^3.1.2"
|
|
@@ -1503,8 +1503,8 @@
|
|
|
1503
1503
|
}
|
|
1504
1504
|
},
|
|
1505
1505
|
"node_modules/@wavemaker/variables": {
|
|
1506
|
-
"version": "11.11.
|
|
1507
|
-
"integrity": "sha512-
|
|
1506
|
+
"version": "11.11.7-rc.218",
|
|
1507
|
+
"integrity": "sha512-A/DLR+LAq/TFh882nsJck0/S9GZREmRtA2pVKskgdSNGdqllsJizWcqP6vfYuppcBLEAtxWCPSm8nPA7GWnfUw==",
|
|
1508
1508
|
"license": "ISC",
|
|
1509
1509
|
"dependencies": {
|
|
1510
1510
|
"@metrichor/jmespath": "^0.3.1",
|
|
@@ -1858,8 +1858,8 @@
|
|
|
1858
1858
|
}
|
|
1859
1859
|
},
|
|
1860
1860
|
"node_modules/babel-preset-current-node-syntax": {
|
|
1861
|
-
"version": "1.
|
|
1862
|
-
"integrity": "sha512-
|
|
1861
|
+
"version": "1.2.0",
|
|
1862
|
+
"integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==",
|
|
1863
1863
|
"dev": true,
|
|
1864
1864
|
"license": "MIT",
|
|
1865
1865
|
"dependencies": {
|
|
@@ -1880,7 +1880,7 @@
|
|
|
1880
1880
|
"@babel/plugin-syntax-top-level-await": "^7.14.5"
|
|
1881
1881
|
},
|
|
1882
1882
|
"peerDependencies": {
|
|
1883
|
-
"@babel/core": "^7.0.0"
|
|
1883
|
+
"@babel/core": "^7.0.0 || ^8.0.0-0"
|
|
1884
1884
|
}
|
|
1885
1885
|
},
|
|
1886
1886
|
"node_modules/babel-preset-jest": {
|
|
@@ -1905,8 +1905,8 @@
|
|
|
1905
1905
|
"license": "MIT"
|
|
1906
1906
|
},
|
|
1907
1907
|
"node_modules/bare-events": {
|
|
1908
|
-
"version": "2.6.
|
|
1909
|
-
"integrity": "sha512-
|
|
1908
|
+
"version": "2.6.1",
|
|
1909
|
+
"integrity": "sha512-AuTJkq9XmE6Vk0FJVNq5QxETrSA/vKHarWVBG5l/JbdCL1prJemiyJqUS0jrlXO0MftuPq4m3YVYhoNc5+aE/g==",
|
|
1910
1910
|
"license": "Apache-2.0",
|
|
1911
1911
|
"optional": true
|
|
1912
1912
|
},
|
|
@@ -2036,8 +2036,8 @@
|
|
|
2036
2036
|
"license": "BSD-2-Clause"
|
|
2037
2037
|
},
|
|
2038
2038
|
"node_modules/browserslist": {
|
|
2039
|
-
"version": "4.25.
|
|
2040
|
-
"integrity": "sha512-
|
|
2039
|
+
"version": "4.25.2",
|
|
2040
|
+
"integrity": "sha512-0si2SJK3ooGzIawRu61ZdPCO1IncZwS8IzuX73sPZsXW6EQ/w/DAfPyKI8l1ETTCr2MnvqWitmlCUxgdul45jA==",
|
|
2041
2041
|
"dev": true,
|
|
2042
2042
|
"funding": [
|
|
2043
2043
|
{
|
|
@@ -2055,8 +2055,8 @@
|
|
|
2055
2055
|
],
|
|
2056
2056
|
"license": "MIT",
|
|
2057
2057
|
"dependencies": {
|
|
2058
|
-
"caniuse-lite": "^1.0.
|
|
2059
|
-
"electron-to-chromium": "^1.5.
|
|
2058
|
+
"caniuse-lite": "^1.0.30001733",
|
|
2059
|
+
"electron-to-chromium": "^1.5.199",
|
|
2060
2060
|
"node-releases": "^2.0.19",
|
|
2061
2061
|
"update-browserslist-db": "^1.1.3"
|
|
2062
2062
|
},
|
|
@@ -2212,8 +2212,8 @@
|
|
|
2212
2212
|
}
|
|
2213
2213
|
},
|
|
2214
2214
|
"node_modules/caniuse-lite": {
|
|
2215
|
-
"version": "1.0.
|
|
2216
|
-
"integrity": "sha512-
|
|
2215
|
+
"version": "1.0.30001733",
|
|
2216
|
+
"integrity": "sha512-e4QKw/O2Kavj2VQTKZWrwzkt3IxOmIlU6ajRb6LP64LHpBo1J67k2Hi4Vu/TgJWsNtynurfS0uK3MaUTCPfu5Q==",
|
|
2217
2217
|
"dev": true,
|
|
2218
2218
|
"funding": [
|
|
2219
2219
|
{
|
|
@@ -2563,8 +2563,8 @@
|
|
|
2563
2563
|
}
|
|
2564
2564
|
},
|
|
2565
2565
|
"node_modules/core-js-pure": {
|
|
2566
|
-
"version": "3.
|
|
2567
|
-
"integrity": "sha512-
|
|
2566
|
+
"version": "3.45.0",
|
|
2567
|
+
"integrity": "sha512-OtwjqcDpY2X/eIIg1ol/n0y/X8A9foliaNt1dSK0gV3J2/zw+89FcNG3mPK+N8YWts4ZFUPxnrAzsxs/lf8yDA==",
|
|
2568
2568
|
"hasInstallScript": true,
|
|
2569
2569
|
"license": "MIT",
|
|
2570
2570
|
"funding": {
|
|
@@ -3307,8 +3307,8 @@
|
|
|
3307
3307
|
"license": "MIT"
|
|
3308
3308
|
},
|
|
3309
3309
|
"node_modules/electron-to-chromium": {
|
|
3310
|
-
"version": "1.5.
|
|
3311
|
-
"integrity": "sha512-
|
|
3310
|
+
"version": "1.5.199",
|
|
3311
|
+
"integrity": "sha512-3gl0S7zQd88kCAZRO/DnxtBKuhMO4h0EaQIN3YgZfV6+pW+5+bf2AdQeHNESCoaQqo/gjGVYEf2YM4O5HJQqpQ==",
|
|
3312
3312
|
"dev": true,
|
|
3313
3313
|
"license": "ISC"
|
|
3314
3314
|
},
|
|
@@ -3720,14 +3720,15 @@
|
|
|
3720
3720
|
}
|
|
3721
3721
|
},
|
|
3722
3722
|
"node_modules/form-data": {
|
|
3723
|
-
"version": "3.0.
|
|
3724
|
-
"integrity": "sha512-
|
|
3723
|
+
"version": "3.0.4",
|
|
3724
|
+
"integrity": "sha512-f0cRzm6dkyVYV3nPoooP8XlccPQukegwhAnpoLcXy+X+A8KfpGOoXwDr9FLZd3wzgLaBGQBE3lY93Zm/i1JvIQ==",
|
|
3725
3725
|
"dev": true,
|
|
3726
3726
|
"license": "MIT",
|
|
3727
3727
|
"dependencies": {
|
|
3728
3728
|
"asynckit": "^0.4.0",
|
|
3729
3729
|
"combined-stream": "^1.0.8",
|
|
3730
3730
|
"es-set-tostringtag": "^2.1.0",
|
|
3731
|
+
"hasown": "^2.0.2",
|
|
3731
3732
|
"mime-types": "^2.1.35"
|
|
3732
3733
|
},
|
|
3733
3734
|
"engines": {
|
|
@@ -4612,7 +4613,7 @@
|
|
|
4612
4613
|
},
|
|
4613
4614
|
"node_modules/jest-cli/node_modules/y18n": {
|
|
4614
4615
|
"version": "5.0.8",
|
|
4615
|
-
"integrity": "
|
|
4616
|
+
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
|
|
4616
4617
|
"dev": true,
|
|
4617
4618
|
"license": "ISC",
|
|
4618
4619
|
"engines": {
|
|
@@ -5885,8 +5886,8 @@
|
|
|
5885
5886
|
}
|
|
5886
5887
|
},
|
|
5887
5888
|
"node_modules/nwsapi": {
|
|
5888
|
-
"version": "2.2.
|
|
5889
|
-
"integrity": "sha512
|
|
5889
|
+
"version": "2.2.21",
|
|
5890
|
+
"integrity": "sha512-o6nIY3qwiSXl7/LuOU0Dmuctd34Yay0yeuZRLFmDPrrdHpXKFndPj3hM+YEPVHYC5fx2otBx4Ilc/gyYSAUaIA==",
|
|
5890
5891
|
"dev": true,
|
|
5891
5892
|
"license": "MIT"
|
|
5892
5893
|
},
|
|
@@ -7583,8 +7584,8 @@
|
|
|
7583
7584
|
}
|
|
7584
7585
|
},
|
|
7585
7586
|
"node_modules/undici-types": {
|
|
7586
|
-
"version": "7.
|
|
7587
|
-
"integrity": "sha512-
|
|
7587
|
+
"version": "7.10.0",
|
|
7588
|
+
"integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==",
|
|
7588
7589
|
"license": "MIT"
|
|
7589
7590
|
},
|
|
7590
7591
|
"node_modules/universalify": {
|
|
@@ -7672,12 +7673,12 @@
|
|
|
7672
7673
|
}
|
|
7673
7674
|
},
|
|
7674
7675
|
"node_modules/v8-to-istanbul/node_modules/source-map": {
|
|
7675
|
-
"version": "0.7.
|
|
7676
|
-
"integrity": "sha512-
|
|
7676
|
+
"version": "0.7.6",
|
|
7677
|
+
"integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==",
|
|
7677
7678
|
"dev": true,
|
|
7678
7679
|
"license": "BSD-3-Clause",
|
|
7679
7680
|
"engines": {
|
|
7680
|
-
"node": ">=
|
|
7681
|
+
"node": ">= 12"
|
|
7681
7682
|
}
|
|
7682
7683
|
},
|
|
7683
7684
|
"node_modules/vary": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-codegen",
|
|
3
|
-
"version": "11.11.
|
|
3
|
+
"version": "11.11.7-rc.218",
|
|
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.
|
|
18
|
+
"@wavemaker/angular-app": "11.11.7-rc.218",
|
|
19
19
|
"archiver": "^7.0.1",
|
|
20
20
|
"cheerio": "1.0.0-rc.12",
|
|
21
21
|
"decode-uri-component": "^0.2.0",
|
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)&©FileSync(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)&©DirWithExclusionsSync(a,o,["resources"]);const n=path.join(a,"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 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="themes",APP_OVERRIDE_CSS_PATH="themes/app.override.css",OVERRIDE_TOKENS_PATH="themes/overrides",updateEslintConfig=async(e,t)=>{let r,i;try{existsFileSync(path.join(e,"src","main","webapp","resources","files","eslintrc-override.js"))?(r=require(path.join(e,"src","main","webapp","resources","files","eslintrc-override.js")),(i=mergeWith({},defaultEslintConfig,r)).extends&&!i.extends.includes("eslint:recommended")&&i.extends.push("eslint:recommended"),await fs.writeFileSync(path.join(t,"resources","files","eslintrc-override.js"),`const config = ${JSON.stringify(i,null,4)};\n\nmodule.exports = config;`)):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:"themes",APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH,OVERRIDE_TOKENS_PATH:"themes/overrides",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=>`${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)&©FileSync(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)&©DirWithExclusionsSync(a,o,["resources"]);const n=path.join(a,"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 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="themes",APP_OVERRIDE_CSS_PATH="themes/app.override.css",OVERRIDE_TOKENS_PATH="themes/overrides",updateEslintConfig=async(e,t)=>{let r,i;try{existsFileSync(path.join(e,"src","main","webapp","resources","files","eslintrc-override.js"))?(r=require(path.join(e,"src","main","webapp","resources","files","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,await fs.writeFileSync(path.join(t,"resources","files","eslintrc-override.js"),`const config = ${JSON.stringify(i,null,4)};\n\nmodule.exports = config;`)):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:"themes",APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH,OVERRIDE_TOKENS_PATH:"themes/overrides",getLegacyWmProjectPropertiesFilePath:getLegacyWmProjectPropertiesFilePath};
|