@wavemaker/angular-codegen 11.10.4-rc.6085 → 11.10.5-next.27901
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 +37 -29
- package/angular-app/package-lock.json +37 -29
- package/angular-app/package.json +5 -5
- package/build-angular-app.js +3 -3
- package/dependencies/custom-widgets-bundle.cjs.js +2 -2
- package/dependencies/transpilation-mobile.cjs.js +3 -1
- package/dependencies/transpilation-web.cjs.js +3 -1
- package/npm-shrinkwrap.json +32 -24
- package/package-lock.json +32 -24
- package/package.json +2 -2
- package/src/codegen-cli.js +1 -1
- package/src/gen-app-override-css.js +1 -0
|
@@ -86497,7 +86497,9 @@ const rowActionAttrs = new Map([
|
|
|
86497
86497
|
['hyperlink.bind', 'hyperlink.bind'],
|
|
86498
86498
|
['target', 'target'],
|
|
86499
86499
|
['conditionalclass.bind', 'conditionalclass.bind'],
|
|
86500
|
-
['conditionalstyle.bind', 'conditionalstyle.bind']
|
|
86500
|
+
['conditionalstyle.bind', 'conditionalstyle.bind'],
|
|
86501
|
+
['expandtitle.bind', 'expandtitle.bind'],
|
|
86502
|
+
['collapsetitle.bind', 'collapsetitle.bind']
|
|
86501
86503
|
]);
|
|
86502
86504
|
const getRowActionAttrs = attrs => {
|
|
86503
86505
|
let tmpl = '';
|
|
@@ -97686,7 +97686,9 @@ const rowActionAttrs = new Map([
|
|
|
97686
97686
|
['hyperlink.bind', 'hyperlink.bind'],
|
|
97687
97687
|
['target', 'target'],
|
|
97688
97688
|
['conditionalclass.bind', 'conditionalclass.bind'],
|
|
97689
|
-
['conditionalstyle.bind', 'conditionalstyle.bind']
|
|
97689
|
+
['conditionalstyle.bind', 'conditionalstyle.bind'],
|
|
97690
|
+
['expandtitle.bind', 'expandtitle.bind'],
|
|
97691
|
+
['collapsetitle.bind', 'collapsetitle.bind']
|
|
97690
97692
|
]);
|
|
97691
97693
|
const getRowActionAttrs = attrs => {
|
|
97692
97694
|
let tmpl = '';
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-codegen",
|
|
3
|
-
"version": "11.10.
|
|
3
|
+
"version": "11.10.5-next.27901",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@wavemaker/angular-codegen",
|
|
9
|
-
"version": "11.10.
|
|
9
|
+
"version": "11.10.5-next.27901",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@wavemaker/angular-app": "11.10.
|
|
12
|
+
"@wavemaker/angular-app": "11.10.5-next.27901",
|
|
13
13
|
"archiver": "^7.0.1",
|
|
14
14
|
"cheerio": "1.0.0-rc.12",
|
|
15
15
|
"decode-uri-component": "^0.2.0",
|
|
@@ -1518,8 +1518,8 @@
|
|
|
1518
1518
|
}
|
|
1519
1519
|
},
|
|
1520
1520
|
"node_modules/@types/node": {
|
|
1521
|
-
"version": "22.13.
|
|
1522
|
-
"integrity": "sha512-
|
|
1521
|
+
"version": "22.13.11",
|
|
1522
|
+
"integrity": "sha512-iEUCUJoU0i3VnrCmgoWCXttklWcvoCIx4jzcP22fioIVSdTmjgoEvmAO/QPw6TcS9k5FrNgn4w7q5lGOd1CT5g==",
|
|
1523
1523
|
"license": "MIT",
|
|
1524
1524
|
"dependencies": {
|
|
1525
1525
|
"undici-types": "~6.20.0"
|
|
@@ -1552,8 +1552,8 @@
|
|
|
1552
1552
|
"license": "MIT"
|
|
1553
1553
|
},
|
|
1554
1554
|
"node_modules/@wavemaker/angular-app": {
|
|
1555
|
-
"version": "11.10.
|
|
1556
|
-
"integrity": "sha512
|
|
1555
|
+
"version": "11.10.5-next.27901",
|
|
1556
|
+
"integrity": "sha512-+1hgOlq7K/ARWCntD/65ymqDNB2CjBAuX7Blq4QlYm2K39iK/u8MRk4R5pu8ZWH0fUPHulvrRnOyPGWkF9cCxA==",
|
|
1557
1557
|
"dependencies": {
|
|
1558
1558
|
"@angular/animations": "18.2.13",
|
|
1559
1559
|
"@angular/common": "18.2.13",
|
|
@@ -1581,12 +1581,12 @@
|
|
|
1581
1581
|
"@awesome-cordova-plugins/vibration": "5.39.1",
|
|
1582
1582
|
"@babel/runtime": "7.14.8",
|
|
1583
1583
|
"@metrichor/jmespath": "0.3.1",
|
|
1584
|
-
"@wavemaker/app-ng-runtime": "11.10.
|
|
1585
|
-
"@wavemaker/custom-widgets-m3": "11.10.
|
|
1584
|
+
"@wavemaker/app-ng-runtime": "11.10.5-next.27901",
|
|
1585
|
+
"@wavemaker/custom-widgets-m3": "11.10.5-next.27901",
|
|
1586
1586
|
"@wavemaker/focus-trap": "1.0.1",
|
|
1587
|
-
"@wavemaker/foundation-css": "11.10.
|
|
1587
|
+
"@wavemaker/foundation-css": "11.10.5-next.27901",
|
|
1588
1588
|
"@wavemaker/nvd3": "1.8.12",
|
|
1589
|
-
"@wavemaker/variables": "11.10.
|
|
1589
|
+
"@wavemaker/variables": "11.10.5-next.27901",
|
|
1590
1590
|
"@ztree/ztree_v3": "3.5.48",
|
|
1591
1591
|
"angular-imask": "^7.6.1",
|
|
1592
1592
|
"angular2-websocket": "0.9.7",
|
|
@@ -1626,8 +1626,8 @@
|
|
|
1626
1626
|
}
|
|
1627
1627
|
},
|
|
1628
1628
|
"node_modules/@wavemaker/app-ng-runtime": {
|
|
1629
|
-
"version": "11.10.
|
|
1630
|
-
"integrity": "sha512-
|
|
1629
|
+
"version": "11.10.5-next.27901",
|
|
1630
|
+
"integrity": "sha512-r4MkdnNex8IQp4eq73rQ4pwhJypBCJwmNZcefD1flOTpdQsB2qNGNnOSv+Q9MCjgVW/zJpnqGxepSMXmtkH1vQ==",
|
|
1631
1631
|
"license": "MIT",
|
|
1632
1632
|
"engines": {
|
|
1633
1633
|
"node": ">=18.16.1",
|
|
@@ -1635,8 +1635,8 @@
|
|
|
1635
1635
|
}
|
|
1636
1636
|
},
|
|
1637
1637
|
"node_modules/@wavemaker/custom-widgets-m3": {
|
|
1638
|
-
"version": "11.10.
|
|
1639
|
-
"integrity": "sha512-
|
|
1638
|
+
"version": "11.10.5-next.27901",
|
|
1639
|
+
"integrity": "sha512-oM2xudUdYQVRTJvD0M03qMeELaR6b5UVRoulF4HKjIBG+sMTr+mBQpXvZqP+6flozNX73mJF41wMRbg/2qo4WA==",
|
|
1640
1640
|
"license": "ISC"
|
|
1641
1641
|
},
|
|
1642
1642
|
"node_modules/@wavemaker/focus-trap": {
|
|
@@ -1649,9 +1649,12 @@
|
|
|
1649
1649
|
}
|
|
1650
1650
|
},
|
|
1651
1651
|
"node_modules/@wavemaker/foundation-css": {
|
|
1652
|
-
"version": "11.10.
|
|
1653
|
-
"integrity": "sha512-
|
|
1654
|
-
"license": "ISC"
|
|
1652
|
+
"version": "11.10.5-next.27901",
|
|
1653
|
+
"integrity": "sha512-SugzI6JSROmyuleKIM4NTOKzuID8BQG9fVoduU/iyc+UswMT8qeRf9OmrV0dnohvIJ5pc5/tHCFhi2y9ZNv0aQ==",
|
|
1654
|
+
"license": "ISC",
|
|
1655
|
+
"dependencies": {
|
|
1656
|
+
"chroma-js": "^3.1.2"
|
|
1657
|
+
}
|
|
1655
1658
|
},
|
|
1656
1659
|
"node_modules/@wavemaker/nvd3": {
|
|
1657
1660
|
"version": "1.8.12",
|
|
@@ -1662,8 +1665,8 @@
|
|
|
1662
1665
|
}
|
|
1663
1666
|
},
|
|
1664
1667
|
"node_modules/@wavemaker/variables": {
|
|
1665
|
-
"version": "11.10.
|
|
1666
|
-
"integrity": "sha512
|
|
1668
|
+
"version": "11.10.5-next.27901",
|
|
1669
|
+
"integrity": "sha512-/iuJhF7rRsfDTHmTkUS31dcaOtQE8HlEd8G+7mOmhzb4FsAS+Km56cWvR3OU19610XZVC8IcdyQ/gT8pypTgqg==",
|
|
1667
1670
|
"license": "ISC",
|
|
1668
1671
|
"dependencies": {
|
|
1669
1672
|
"@metrichor/jmespath": "^0.3.1",
|
|
@@ -2340,8 +2343,8 @@
|
|
|
2340
2343
|
}
|
|
2341
2344
|
},
|
|
2342
2345
|
"node_modules/caniuse-lite": {
|
|
2343
|
-
"version": "1.0.
|
|
2344
|
-
"integrity": "sha512-
|
|
2346
|
+
"version": "1.0.30001707",
|
|
2347
|
+
"integrity": "sha512-3qtRjw/HQSMlDWf+X79N206fepf4SOOU6SQLMaq/0KkZLmSjPxAkBOQQ+FxbHKfHmYLZFfdWsO3KA90ceHPSnw==",
|
|
2345
2348
|
"dev": true,
|
|
2346
2349
|
"funding": [
|
|
2347
2350
|
{
|
|
@@ -2424,6 +2427,11 @@
|
|
|
2424
2427
|
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
|
|
2425
2428
|
"license": "ISC"
|
|
2426
2429
|
},
|
|
2430
|
+
"node_modules/chroma-js": {
|
|
2431
|
+
"version": "3.1.2",
|
|
2432
|
+
"integrity": "sha512-IJnETTalXbsLx1eKEgx19d5L6SRM7cH4vINw/99p/M11HCuXGRWL+6YmCm7FWFGIo6dtWuQoQi1dc5yQ7ESIHg==",
|
|
2433
|
+
"license": "(BSD-3-Clause AND Apache-2.0)"
|
|
2434
|
+
},
|
|
2427
2435
|
"node_modules/ci-info": {
|
|
2428
2436
|
"version": "3.9.0",
|
|
2429
2437
|
"integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==",
|
|
@@ -3414,8 +3422,8 @@
|
|
|
3414
3422
|
"license": "MIT"
|
|
3415
3423
|
},
|
|
3416
3424
|
"node_modules/electron-to-chromium": {
|
|
3417
|
-
"version": "1.5.
|
|
3418
|
-
"integrity": "sha512-
|
|
3425
|
+
"version": "1.5.123",
|
|
3426
|
+
"integrity": "sha512-refir3NlutEZqlKaBLK0tzlVLe5P2wDKS7UQt/3SpibizgsRAPOsqQC3ffw1nlv3ze5gjRQZYHoPymgVZkplFA==",
|
|
3419
3427
|
"dev": true,
|
|
3420
3428
|
"license": "ISC"
|
|
3421
3429
|
},
|
package/package-lock.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-codegen",
|
|
3
|
-
"version": "11.10.
|
|
3
|
+
"version": "11.10.5-next.27901",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@wavemaker/angular-codegen",
|
|
9
|
-
"version": "11.10.
|
|
9
|
+
"version": "11.10.5-next.27901",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@wavemaker/angular-app": "11.10.
|
|
12
|
+
"@wavemaker/angular-app": "11.10.5-next.27901",
|
|
13
13
|
"archiver": "^7.0.1",
|
|
14
14
|
"cheerio": "1.0.0-rc.12",
|
|
15
15
|
"decode-uri-component": "^0.2.0",
|
|
@@ -1518,8 +1518,8 @@
|
|
|
1518
1518
|
}
|
|
1519
1519
|
},
|
|
1520
1520
|
"node_modules/@types/node": {
|
|
1521
|
-
"version": "22.13.
|
|
1522
|
-
"integrity": "sha512-
|
|
1521
|
+
"version": "22.13.11",
|
|
1522
|
+
"integrity": "sha512-iEUCUJoU0i3VnrCmgoWCXttklWcvoCIx4jzcP22fioIVSdTmjgoEvmAO/QPw6TcS9k5FrNgn4w7q5lGOd1CT5g==",
|
|
1523
1523
|
"license": "MIT",
|
|
1524
1524
|
"dependencies": {
|
|
1525
1525
|
"undici-types": "~6.20.0"
|
|
@@ -1552,8 +1552,8 @@
|
|
|
1552
1552
|
"license": "MIT"
|
|
1553
1553
|
},
|
|
1554
1554
|
"node_modules/@wavemaker/angular-app": {
|
|
1555
|
-
"version": "11.10.
|
|
1556
|
-
"integrity": "sha512
|
|
1555
|
+
"version": "11.10.5-next.27901",
|
|
1556
|
+
"integrity": "sha512-+1hgOlq7K/ARWCntD/65ymqDNB2CjBAuX7Blq4QlYm2K39iK/u8MRk4R5pu8ZWH0fUPHulvrRnOyPGWkF9cCxA==",
|
|
1557
1557
|
"dependencies": {
|
|
1558
1558
|
"@angular/animations": "18.2.13",
|
|
1559
1559
|
"@angular/common": "18.2.13",
|
|
@@ -1581,12 +1581,12 @@
|
|
|
1581
1581
|
"@awesome-cordova-plugins/vibration": "5.39.1",
|
|
1582
1582
|
"@babel/runtime": "7.14.8",
|
|
1583
1583
|
"@metrichor/jmespath": "0.3.1",
|
|
1584
|
-
"@wavemaker/app-ng-runtime": "11.10.
|
|
1585
|
-
"@wavemaker/custom-widgets-m3": "11.10.
|
|
1584
|
+
"@wavemaker/app-ng-runtime": "11.10.5-next.27901",
|
|
1585
|
+
"@wavemaker/custom-widgets-m3": "11.10.5-next.27901",
|
|
1586
1586
|
"@wavemaker/focus-trap": "1.0.1",
|
|
1587
|
-
"@wavemaker/foundation-css": "11.10.
|
|
1587
|
+
"@wavemaker/foundation-css": "11.10.5-next.27901",
|
|
1588
1588
|
"@wavemaker/nvd3": "1.8.12",
|
|
1589
|
-
"@wavemaker/variables": "11.10.
|
|
1589
|
+
"@wavemaker/variables": "11.10.5-next.27901",
|
|
1590
1590
|
"@ztree/ztree_v3": "3.5.48",
|
|
1591
1591
|
"angular-imask": "^7.6.1",
|
|
1592
1592
|
"angular2-websocket": "0.9.7",
|
|
@@ -1626,8 +1626,8 @@
|
|
|
1626
1626
|
}
|
|
1627
1627
|
},
|
|
1628
1628
|
"node_modules/@wavemaker/app-ng-runtime": {
|
|
1629
|
-
"version": "11.10.
|
|
1630
|
-
"integrity": "sha512-
|
|
1629
|
+
"version": "11.10.5-next.27901",
|
|
1630
|
+
"integrity": "sha512-r4MkdnNex8IQp4eq73rQ4pwhJypBCJwmNZcefD1flOTpdQsB2qNGNnOSv+Q9MCjgVW/zJpnqGxepSMXmtkH1vQ==",
|
|
1631
1631
|
"license": "MIT",
|
|
1632
1632
|
"engines": {
|
|
1633
1633
|
"node": ">=18.16.1",
|
|
@@ -1635,8 +1635,8 @@
|
|
|
1635
1635
|
}
|
|
1636
1636
|
},
|
|
1637
1637
|
"node_modules/@wavemaker/custom-widgets-m3": {
|
|
1638
|
-
"version": "11.10.
|
|
1639
|
-
"integrity": "sha512-
|
|
1638
|
+
"version": "11.10.5-next.27901",
|
|
1639
|
+
"integrity": "sha512-oM2xudUdYQVRTJvD0M03qMeELaR6b5UVRoulF4HKjIBG+sMTr+mBQpXvZqP+6flozNX73mJF41wMRbg/2qo4WA==",
|
|
1640
1640
|
"license": "ISC"
|
|
1641
1641
|
},
|
|
1642
1642
|
"node_modules/@wavemaker/focus-trap": {
|
|
@@ -1649,9 +1649,12 @@
|
|
|
1649
1649
|
}
|
|
1650
1650
|
},
|
|
1651
1651
|
"node_modules/@wavemaker/foundation-css": {
|
|
1652
|
-
"version": "11.10.
|
|
1653
|
-
"integrity": "sha512-
|
|
1654
|
-
"license": "ISC"
|
|
1652
|
+
"version": "11.10.5-next.27901",
|
|
1653
|
+
"integrity": "sha512-SugzI6JSROmyuleKIM4NTOKzuID8BQG9fVoduU/iyc+UswMT8qeRf9OmrV0dnohvIJ5pc5/tHCFhi2y9ZNv0aQ==",
|
|
1654
|
+
"license": "ISC",
|
|
1655
|
+
"dependencies": {
|
|
1656
|
+
"chroma-js": "^3.1.2"
|
|
1657
|
+
}
|
|
1655
1658
|
},
|
|
1656
1659
|
"node_modules/@wavemaker/nvd3": {
|
|
1657
1660
|
"version": "1.8.12",
|
|
@@ -1662,8 +1665,8 @@
|
|
|
1662
1665
|
}
|
|
1663
1666
|
},
|
|
1664
1667
|
"node_modules/@wavemaker/variables": {
|
|
1665
|
-
"version": "11.10.
|
|
1666
|
-
"integrity": "sha512
|
|
1668
|
+
"version": "11.10.5-next.27901",
|
|
1669
|
+
"integrity": "sha512-/iuJhF7rRsfDTHmTkUS31dcaOtQE8HlEd8G+7mOmhzb4FsAS+Km56cWvR3OU19610XZVC8IcdyQ/gT8pypTgqg==",
|
|
1667
1670
|
"license": "ISC",
|
|
1668
1671
|
"dependencies": {
|
|
1669
1672
|
"@metrichor/jmespath": "^0.3.1",
|
|
@@ -2340,8 +2343,8 @@
|
|
|
2340
2343
|
}
|
|
2341
2344
|
},
|
|
2342
2345
|
"node_modules/caniuse-lite": {
|
|
2343
|
-
"version": "1.0.
|
|
2344
|
-
"integrity": "sha512-
|
|
2346
|
+
"version": "1.0.30001707",
|
|
2347
|
+
"integrity": "sha512-3qtRjw/HQSMlDWf+X79N206fepf4SOOU6SQLMaq/0KkZLmSjPxAkBOQQ+FxbHKfHmYLZFfdWsO3KA90ceHPSnw==",
|
|
2345
2348
|
"dev": true,
|
|
2346
2349
|
"funding": [
|
|
2347
2350
|
{
|
|
@@ -2424,6 +2427,11 @@
|
|
|
2424
2427
|
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
|
|
2425
2428
|
"license": "ISC"
|
|
2426
2429
|
},
|
|
2430
|
+
"node_modules/chroma-js": {
|
|
2431
|
+
"version": "3.1.2",
|
|
2432
|
+
"integrity": "sha512-IJnETTalXbsLx1eKEgx19d5L6SRM7cH4vINw/99p/M11HCuXGRWL+6YmCm7FWFGIo6dtWuQoQi1dc5yQ7ESIHg==",
|
|
2433
|
+
"license": "(BSD-3-Clause AND Apache-2.0)"
|
|
2434
|
+
},
|
|
2427
2435
|
"node_modules/ci-info": {
|
|
2428
2436
|
"version": "3.9.0",
|
|
2429
2437
|
"integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==",
|
|
@@ -3414,8 +3422,8 @@
|
|
|
3414
3422
|
"license": "MIT"
|
|
3415
3423
|
},
|
|
3416
3424
|
"node_modules/electron-to-chromium": {
|
|
3417
|
-
"version": "1.5.
|
|
3418
|
-
"integrity": "sha512-
|
|
3425
|
+
"version": "1.5.123",
|
|
3426
|
+
"integrity": "sha512-refir3NlutEZqlKaBLK0tzlVLe5P2wDKS7UQt/3SpibizgsRAPOsqQC3ffw1nlv3ze5gjRQZYHoPymgVZkplFA==",
|
|
3419
3427
|
"dev": true,
|
|
3420
3428
|
"license": "ISC"
|
|
3421
3429
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-codegen",
|
|
3
|
-
"version": "11.10.
|
|
3
|
+
"version": "11.10.5-next.27901",
|
|
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.10.
|
|
18
|
+
"@wavemaker/angular-app": "11.10.5-next.27901",
|
|
19
19
|
"archiver": "^7.0.1",
|
|
20
20
|
"cheerio": "1.0.0-rc.12",
|
|
21
21
|
"decode-uri-component": "^0.2.0",
|
package/src/codegen-cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const codegen=require("./codegen"),
|
|
1
|
+
const codegen=require("./codegen"),{setCodegenPath:setCodegenPath,deleteResource:deleteResource,isMobileProject:isMobileProject,initExpressionParser:initExpressionParser,isPrismProject:isPrismProject}=require("./wm-utils"),{initTemplates:initTemplates}=require("./handlebar-helpers"),{getWmProjectProperties:getWmProjectProperties}=require("./project-meta"),{generateOverrideCSS:generateOverrideCSS}=require("./gen-app-override-css"),create=async(e,t,r,a)=>{await codegen.createAppSkeleton(e,t,r,a)};global.window={navigator:{userAgent:"Node.js",userAgentData:{platform:"Node.js"}}};const generate=async(e,t,r,a,i,n,s)=>{await codegen.generateSources(e,t,r,a,i,n,s)},generateCodegenAngularApp=async(e,t,r,a,i,n,s,o,g,c)=>{await generateOverrideCSS(g,g&&g.appSrc||e,c);const p=await getWmProjectProperties(e);if(s=!isMobileProject(p)&&s,setCodegenPath(i),initTemplates(),initExpressionParser(),s){let t=e;e&&"/"!=e.charAt(e.length-1)&&(t+="/"),t+="target/ui-build/intermediate-app",await codegen.generateIntermediateApp(e,t),e=t}await create(e,t,i,p),await generate(e,t,r,a,n,s,o)},generatePage=async(e,t,r,a,i)=>{setCodegenPath(a),initTemplates(),initExpressionParser(),await codegen.generatePage(e,t,r,i)};module.exports={create:create,generateCodegenAngularApp:generateCodegenAngularApp,generatePage:generatePage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const path=require("path"),fs=require("fs"),{downloadNPMPackage:downloadNPMPackage}=require("../download-packages"),{isPrismProject:isPrismProject}=require("./wm-utils"),{getWmProjectProperties:getWmProjectProperties}=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:s=>e.includes(s.filePath)}});t.push({mode:o,files:n})}return t},accessFile=e=>{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/themes/overrides/**/!(*.*).json":`src/main/webapp/themes/overrides/**/*.${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 getWmProjectProperties(s);if(isPrismProject(r)&&(e.generateOverrideCSS||"angular"===e.buildType)){const r=path.join(s+"/src/main/webapp/themes","overrides"),t=s+"/src/main/webapp/themes/app.override.css";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=path.join("src","main","webapp","themes","temp-tokens"),l=groupFilesByMode(r),m=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 m){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};
|