@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/package-lock.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.11.6-rc.6191",
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.6-rc.6191",
9
+ "version": "11.11.7-rc.218",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
- "@wavemaker/angular-app": "11.11.6-rc.6191",
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.27.6",
395
- "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==",
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.27.6"
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.0",
641
- "integrity": "sha512-nlIXnSqLcBij8K8TtkxbBJgfzfvi75V1pAKSM7dUXejGw12vJAqez74jZrHTsJ3Z+Aczc5Q/6JgNjKRMsVU44g==",
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.0",
707
- "integrity": "sha512-jYnje+JyZG5YThjHiF28oT4SIZLnYOcSBb6+SDaFIyzDVSkXQmQQYclJ2R+YxcdmK0AX6x1E5OQNtuh3jHDrUg==",
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.20.7",
1332
- "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==",
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.20.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.0.13",
1371
- "integrity": "sha512-Qm9OYVOFHFYg3wJoTSrz80hoec5Lia/dPp84do3X7dZvLikQvM1YpmvTBEdIr/e+U8HTkFjLHLnl78K/qjf+jQ==",
1370
+ "version": "24.2.1",
1371
+ "integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==",
1372
1372
  "license": "MIT",
1373
1373
  "dependencies": {
1374
- "undici-types": "~7.8.0"
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.6-rc.6191",
1405
- "integrity": "sha512-HPVukYBOZshhGlyMDHdRMcvhkdspdkfZj06vbpbLvCkqroUI4hCiPKrGYuzSC+y9Hdj9hbiM+z+FXrjbp0ejQQ==",
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.6-rc.6191",
1424
- "@wavemaker/custom-widgets-m3": "11.11.6-rc.6191",
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.6-rc.6191",
1426
+ "@wavemaker/foundation-css": "11.11.7-rc.218",
1427
1427
  "@wavemaker/nvd3": "1.8.13",
1428
- "@wavemaker/variables": "11.11.6-rc.6191",
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.6-rc.6191",
1468
- "integrity": "sha512-MfWYBi9x6veqn6cZnsHGUnDy2mYJ3K/qM4f0Tbjc8pwRP+10paQRIN8j/j228BSz464qldE8LLATqykZD5HMhA==",
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.6-rc.6191",
1477
- "integrity": "sha512-Kj/pIXoBW+2nb90MboaTQwiZphwUaOIZNaDOwryScCcavF3t9Cpxy8nlDyutjLYioJ03L0vOLLd5iyC9x+CgRA==",
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.6-rc.6191",
1491
- "integrity": "sha512-KdvzrQGwf0oMVQqYndSVRz/NErz+VOYDjQ5SPorpaPRebB/fC+/6v386mnZPby0u54zXwIG2L4zL2ZiXfs4+tw==",
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.6-rc.6191",
1507
- "integrity": "sha512-hG3phowz5Fz+0T1hvrAr2IP0uYoiLow4KQFbDDZGAaJz2nNSfjKbCrmZTgOCN7rZIvgRVmcgVKudEdyGetI+ng==",
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.1.0",
1862
- "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==",
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.0",
1909
- "integrity": "sha512-EKZ5BTXYExaNqi3I3f9RtEsaI/xBSGjE0XZCZilPzFAV/goswFHuPd9jEZlPIZ/iNZJwDSao9qRiScySz7MbQg==",
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.1",
2040
- "integrity": "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==",
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.30001726",
2059
- "electron-to-chromium": "^1.5.173",
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.30001727",
2216
- "integrity": "sha512-pB68nIHmbN6L/4C6MH1DokyR3bYqFwjaSs/sWDHGj4CTcFtQUQMuJftVwWkXq7mNWOybD3KhUv3oWHoGxgP14Q==",
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.44.0",
2567
- "integrity": "sha512-gvMQAGB4dfVUxpYD0k3Fq8J+n5bB6Ytl15lqlZrOIXFzxOhtPaObfkQGHtMRdyjIf7z2IeNULwi1jEwyS+ltKQ==",
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.182",
3311
- "integrity": "sha512-Lv65Btwv9W4J9pyODI6EWpdnhfvrve/us5h1WspW8B2Fb0366REPtY3hX7ounk1CkV/TBjWCEvCBBbYbmV0qCA==",
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.3",
3724
- "integrity": "sha512-q5YBMeWy6E2Un0nMGWMgI65MAKtaylxfNJGJxpGh45YDciZB4epbWpaAfImil6CPAPTYB4sh0URQNDRIZG5F2w==",
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": "sha1-f0k00PfKjFb5UxSTndzS3ZHOHVU=",
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.20",
5889
- "integrity": "sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==",
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.8.0",
7587
- "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",
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.4",
7676
- "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==",
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": ">= 8"
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.6-rc.6191",
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.6-rc.6191",
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)&&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="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)&&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="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};