@wavemaker/angular-codegen 11.14.1-rc.240 → 11.14.1-rc.241
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 +182 -76
- package/angular-app/package-lock.json +182 -76
- package/angular-app/package.json +5 -5
- 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/package-lock.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-codegen",
|
|
3
|
-
"version": "11.14.1-rc.
|
|
3
|
+
"version": "11.14.1-rc.241",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@wavemaker/angular-codegen",
|
|
9
|
-
"version": "11.14.1-rc.
|
|
9
|
+
"version": "11.14.1-rc.241",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@wavemaker/angular-app": "11.14.1-rc.
|
|
12
|
+
"@wavemaker/angular-app": "11.14.1-rc.241",
|
|
13
13
|
"archiver": "^7.0.1",
|
|
14
14
|
"cheerio": "1.0.0-rc.12",
|
|
15
15
|
"decode-uri-component": "^0.2.0",
|
|
@@ -1376,8 +1376,8 @@
|
|
|
1376
1376
|
"license": "MIT"
|
|
1377
1377
|
},
|
|
1378
1378
|
"node_modules/@wavemaker/angular-app": {
|
|
1379
|
-
"version": "11.14.1-rc.
|
|
1380
|
-
"integrity": "sha512-
|
|
1379
|
+
"version": "11.14.1-rc.241",
|
|
1380
|
+
"integrity": "sha512-aTEMExpv6J7K91Q+myH3HDVWRbVPn/+ygjt35mbkorFzu5RCL3V0d78joPZ5dv+AIqf01rc9soTUTHRlLUNhow==",
|
|
1381
1381
|
"dependencies": {
|
|
1382
1382
|
"@angular/animations": "18.2.13",
|
|
1383
1383
|
"@angular/common": "18.2.13",
|
|
@@ -1394,12 +1394,12 @@
|
|
|
1394
1394
|
"@fullcalendar/list": "6.1.18",
|
|
1395
1395
|
"@fullcalendar/timegrid": "6.1.18",
|
|
1396
1396
|
"@metrichor/jmespath": "0.3.1",
|
|
1397
|
-
"@wavemaker/app-ng-runtime": "11.14.1-rc.
|
|
1398
|
-
"@wavemaker/custom-widgets-m3": "11.14.1-rc.
|
|
1397
|
+
"@wavemaker/app-ng-runtime": "11.14.1-rc.241",
|
|
1398
|
+
"@wavemaker/custom-widgets-m3": "11.14.1-rc.241",
|
|
1399
1399
|
"@wavemaker/focus-trap": "1.0.1",
|
|
1400
|
-
"@wavemaker/foundation-css": "11.14.1-rc.
|
|
1400
|
+
"@wavemaker/foundation-css": "11.14.1-rc.241",
|
|
1401
1401
|
"@wavemaker/nvd3": "1.8.16",
|
|
1402
|
-
"@wavemaker/variables": "11.14.1-rc.
|
|
1402
|
+
"@wavemaker/variables": "11.14.1-rc.241",
|
|
1403
1403
|
"@ztree/ztree_v3": "3.5.48",
|
|
1404
1404
|
"acorn": "^8.15.0",
|
|
1405
1405
|
"angular-imask": "7.6.1",
|
|
@@ -1434,8 +1434,8 @@
|
|
|
1434
1434
|
}
|
|
1435
1435
|
},
|
|
1436
1436
|
"node_modules/@wavemaker/app-ng-runtime": {
|
|
1437
|
-
"version": "11.14.1-rc.
|
|
1438
|
-
"integrity": "sha512-
|
|
1437
|
+
"version": "11.14.1-rc.241",
|
|
1438
|
+
"integrity": "sha512-FlRphpC20abWD7Ygkt1BM6apyNNglvK4X5F9T0WKcnV6lbqY9M7adkfdH73vQg4FFS2NKR+7RyuCvpxlnx0l6g==",
|
|
1439
1439
|
"license": "MIT",
|
|
1440
1440
|
"engines": {
|
|
1441
1441
|
"node": ">=18.16.1",
|
|
@@ -1443,8 +1443,8 @@
|
|
|
1443
1443
|
}
|
|
1444
1444
|
},
|
|
1445
1445
|
"node_modules/@wavemaker/custom-widgets-m3": {
|
|
1446
|
-
"version": "11.14.1-rc.
|
|
1447
|
-
"integrity": "sha512-
|
|
1446
|
+
"version": "11.14.1-rc.241",
|
|
1447
|
+
"integrity": "sha512-BnSNp6yZpLtJ3v40bBUMItEOCeBX+riO7/t8ePUQIbobUuMHu/Bg0MroLcb466PArG5dhw+jpAlAxfkB2sCXiw==",
|
|
1448
1448
|
"license": "ISC"
|
|
1449
1449
|
},
|
|
1450
1450
|
"node_modules/@wavemaker/focus-trap": {
|
|
@@ -1457,8 +1457,8 @@
|
|
|
1457
1457
|
}
|
|
1458
1458
|
},
|
|
1459
1459
|
"node_modules/@wavemaker/foundation-css": {
|
|
1460
|
-
"version": "11.14.1-rc.
|
|
1461
|
-
"integrity": "sha512-
|
|
1460
|
+
"version": "11.14.1-rc.241",
|
|
1461
|
+
"integrity": "sha512-Fu8qa8v0Ipvc+nzQJE6LpJP9jGIbl0KE7v8TLV0qNm6lnz+lDebW5w0Cz26WHHL1Q21teFQNYgmIg/9Wi0KEQg==",
|
|
1462
1462
|
"license": "ISC",
|
|
1463
1463
|
"dependencies": {
|
|
1464
1464
|
"chroma-js": "^3.1.2"
|
|
@@ -1473,8 +1473,8 @@
|
|
|
1473
1473
|
}
|
|
1474
1474
|
},
|
|
1475
1475
|
"node_modules/@wavemaker/variables": {
|
|
1476
|
-
"version": "11.14.1-rc.
|
|
1477
|
-
"integrity": "sha512-
|
|
1476
|
+
"version": "11.14.1-rc.241",
|
|
1477
|
+
"integrity": "sha512-AXsQyKkK9YnT2BSGvJRlAF9jkPjYx42CoVf5pFP+GbUPIsJu/wIg98fsTyBWMY/eNOMvJDWd9PUibSy1uozIFA==",
|
|
1478
1478
|
"license": "ISC",
|
|
1479
1479
|
"dependencies": {
|
|
1480
1480
|
"@metrichor/jmespath": "^0.3.1",
|
|
@@ -1909,8 +1909,8 @@
|
|
|
1909
1909
|
"license": "MIT"
|
|
1910
1910
|
},
|
|
1911
1911
|
"node_modules/baseline-browser-mapping": {
|
|
1912
|
-
"version": "2.8.
|
|
1913
|
-
"integrity": "sha512-
|
|
1912
|
+
"version": "2.8.31",
|
|
1913
|
+
"integrity": "sha512-a28v2eWrrRWPpJSzxc+mKwm0ZtVx/G8SepdQZDArnXYU/XS+IF6mp8aB/4E+hH1tyGCoDo3KlUCdlSxGDsRkAw==",
|
|
1914
1914
|
"dev": true,
|
|
1915
1915
|
"license": "Apache-2.0",
|
|
1916
1916
|
"bin": {
|
|
@@ -2190,8 +2190,8 @@
|
|
|
2190
2190
|
}
|
|
2191
2191
|
},
|
|
2192
2192
|
"node_modules/caniuse-lite": {
|
|
2193
|
-
"version": "1.0.
|
|
2194
|
-
"integrity": "sha512-
|
|
2193
|
+
"version": "1.0.30001757",
|
|
2194
|
+
"integrity": "sha512-r0nnL/I28Zi/yjk1el6ilj27tKcdjLsNqAOZr0yVjWPrSQyHgKI2INaEWw21bAQSv2LXRt1XuCS/GomNpWOxsQ==",
|
|
2195
2195
|
"dev": true,
|
|
2196
2196
|
"funding": [
|
|
2197
2197
|
{
|
|
@@ -3277,8 +3277,8 @@
|
|
|
3277
3277
|
"license": "MIT"
|
|
3278
3278
|
},
|
|
3279
3279
|
"node_modules/electron-to-chromium": {
|
|
3280
|
-
"version": "1.5.
|
|
3281
|
-
"integrity": "sha512-
|
|
3280
|
+
"version": "1.5.260",
|
|
3281
|
+
"integrity": "sha512-ov8rBoOBhVawpzdre+Cmz4FB+y66Eqrk6Gwqd8NGxuhv99GQ8XqMAr351KEkOt7gukXWDg6gJWEMKgL2RLMPtA==",
|
|
3282
3282
|
"dev": true,
|
|
3283
3283
|
"license": "ISC"
|
|
3284
3284
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-codegen",
|
|
3
|
-
"version": "11.14.1-rc.
|
|
3
|
+
"version": "11.14.1-rc.241",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
".npmrc"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@wavemaker/angular-app": "11.14.1-rc.
|
|
18
|
+
"@wavemaker/angular-app": "11.14.1-rc.241",
|
|
19
19
|
"archiver": "^7.0.1",
|
|
20
20
|
"cheerio": "1.0.0-rc.12",
|
|
21
21
|
"decode-uri-component": "^0.2.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const path=require("path"),fs=require("fs"),{downloadNPMPackage:downloadNPMPackage}=require("../download-packages"),{isPrismProject:isPrismProject,DESIGN_TOKENS_DIR_NAME:DESIGN_TOKENS_DIR_NAME,OVERRIDE_TOKENS_PATH:OVERRIDE_TOKENS_PATH,APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH}=require("./wm-utils"),{getLegacyWmProjectProperties:getLegacyWmProjectProperties}=require("./project-meta"),groupFilesByMode=e=>{const s={default:[]};return fs.readdirSync(e).forEach(o=>{const t=path.join(e,o),r=fs.statSync(t);if(r.isDirectory()){const e=groupFilesByMode(t);for(const o in e)s[o]||(s[o]=[]),s[o].push(...e[o])}else if(r.isFile()&&".json"===path.extname(t)){const e=o.match(/\.([^.]+)\.json$/);if(e){const o=e[1];s[o]||(s[o]=[]),s[o].push(t)}else s.default.push(t)}}),s},generateModeConfigs=(e,s,o,t)=>{const r=o&&o.name||"css/variables",n=t&&t.name||"css/variables",i=[];for(const o in e){const t=e[o].flatMap(e=>{const o=e.replace(s+"/","");return[{destination:o.replace(/\.json$/,".css"),options:{outputReferences:!0,selector:":root"},format:r,filter:function(s){var o;const t=e=>e?e.replace(/\\/g,"/"):e;o=t(o=s["@"]&&s["@"].filePath?s["@"].filePath:s.filePath),e=t(e);var r=o&&-1!==o.indexOf("overrides")||s.filePath&&-1!==s.filePath.indexOf("overrides"),n=o&&(e.includes(o)||e.includes(t(s.filePath)))&&!s.path.includes("appearances")&&!s.path.includes("states");return r&&n}},{destination:o.replace(/\.json$/,"variant.css"),options:{outputReferences:!0,selector:":root"},format:n,filter:s=>{let o;const t=(o=s["@"]&&s["@"].filePath?s["@"].filePath:s.filePath)&&-1!==o.indexOf("overrides"),r=o&&(e.includes(o)||e.includes(s.filePath))&&(s.path.includes("appearances")||s.path.includes("states"));return t&&r}}]});i.push({mode:o,files:t})}return i},accessFile=e=>{const s=path.dirname(e);fs.existsSync(s)||(fs.mkdirSync(s,{recursive:!0}),console.log(`Directory created: ${s}`)),fs.access(e,fs.constants.F_OK,s=>{if(s){console.log(`${e} does not exist. Creating file...`);const s=JSON.stringify({});fs.writeFile(e,s,s=>{if(s)throw s;console.log(`${e} was created successfully.`)})}})};async function setupSymlink(e,s){try{await fs.promises.mkdir(path.dirname(s),{recursive:!0});try{fs.existsSync(s)&&await fs.promises.unlink(s)}catch(e){console.error("Error removing existing symlink:",e)}const o="win32"===process.platform?"junction":"dir";await fs.promises.symlink(e,s,o),console.log("Symlink created successfully at:",s)}catch(e){console.error("Error creating symlink:",s,e)}}const getStyleDictionaryConfig=(e,s,o,t)=>{t.endsWith("/")||(t+="/");let r="";return{log:{verbosity:"verbose"},source:[r="default"===o?`${t}/src/main/webapp/${OVERRIDE_TOKENS_PATH}/**/!(*.*).json`:`${t}/src/main/webapp/${OVERRIDE_TOKENS_PATH}/**/*.${o}.json`],include:[
|
|
1
|
+
const path=require("path"),fs=require("fs"),{downloadNPMPackage:downloadNPMPackage}=require("../download-packages"),{isPrismProject:isPrismProject,DESIGN_TOKENS_DIR_NAME:DESIGN_TOKENS_DIR_NAME,OVERRIDE_TOKENS_PATH:OVERRIDE_TOKENS_PATH,APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH}=require("./wm-utils"),{getLegacyWmProjectProperties:getLegacyWmProjectProperties}=require("./project-meta"),groupFilesByMode=e=>{const s={default:[]};return fs.readdirSync(e).forEach(o=>{const t=path.join(e,o),r=fs.statSync(t);if(r.isDirectory()){const e=groupFilesByMode(t);for(const o in e)s[o]||(s[o]=[]),s[o].push(...e[o])}else if(r.isFile()&&".json"===path.extname(t)){const e=o.match(/\.([^.]+)\.json$/);if(e){const o=e[1];s[o]||(s[o]=[]),s[o].push(t)}else s.default.push(t)}}),s},generateModeConfigs=(e,s,o,t)=>{const r=o&&o.name||"css/variables",n=t&&t.name||"css/variables",i=[];for(const o in e){const t=e[o].flatMap(e=>{const o=e.replace(s+"/","");return[{destination:o.replace(/\.json$/,".css"),options:{outputReferences:!0,selector:":root"},format:r,filter:function(s){var o;const t=e=>e?e.replace(/\\/g,"/"):e;o=t(o=s["@"]&&s["@"].filePath?s["@"].filePath:s.filePath),e=t(e);var r=o&&-1!==o.indexOf("overrides")||s.filePath&&-1!==s.filePath.indexOf("overrides"),n=o&&(e.includes(o)||e.includes(t(s.filePath)))&&!s.path.includes("appearances")&&!s.path.includes("states");return r&&n}},{destination:o.replace(/\.json$/,"variant.css"),options:{outputReferences:!0,selector:":root"},format:n,filter:s=>{let o;const t=(o=s["@"]&&s["@"].filePath?s["@"].filePath:s.filePath)&&-1!==o.indexOf("overrides"),r=o&&(e.includes(o)||e.includes(s.filePath))&&(s.path.includes("appearances")||s.path.includes("states"));return t&&r}}]});i.push({mode:o,files:t})}return i},accessFile=e=>{const s=path.dirname(e);fs.existsSync(s)||(fs.mkdirSync(s,{recursive:!0}),console.log(`Directory created: ${s}`)),fs.access(e,fs.constants.F_OK,s=>{if(s){console.log(`${e} does not exist. Creating file...`);const s=JSON.stringify({});fs.writeFile(e,s,s=>{if(s)throw s;console.log(`${e} was created successfully.`)})}})};async function setupSymlink(e,s){try{await fs.promises.mkdir(path.dirname(s),{recursive:!0});try{fs.existsSync(s)&&await fs.promises.unlink(s)}catch(e){console.error("Error removing existing symlink:",e)}const o="win32"===process.platform?"junction":"dir";await fs.promises.symlink(e,s,o),console.log("Symlink created successfully at:",s)}catch(e){console.error("Error creating symlink:",s,e)}}const getStyleDictionaryConfig=(e,s,o,t)=>{t.endsWith("/")||(t+="/");let r="";return{log:{verbosity:"verbose"},source:[r="default"===o?`${t}/src/main/webapp/${OVERRIDE_TOKENS_PATH}/**/!(*.*).json`:`${t}/src/main/webapp/${OVERRIDE_TOKENS_PATH}/**/*.${o}.json`],include:[`${s.replace(/\\/g,"/")}/**/!(*.dark|*.light).json`,`${t.replace(/\\/g,"/")}/src/main/webapp/${OVERRIDE_TOKENS_PATH}/global/**/*.json`],platforms:{css:{transformGroup:"css",prefix:"--wm",files:e}}}};async function removeSymlink(e){const s=path.resolve(e);try{fs.lstatSync(s).isSymbolicLink()?(await fs.promises.unlink(s),console.log("Symlink removed successfully:",s)):console.warn("Not a symlink, skipping unlink:",s)}catch(e){console.error("Error during symlink removal:",e)}}async function getCustomFormatters(e,s){try{const o=await import(`${e}/node_modules/style-dictionary/lib/utils/index.js`),{usesReferences:t,getReferences:r}=o,n=await import(`${s}/node_modules/@wavemaker/foundation-css/src/utils/style-dictionary-utils.js`),{cssVarCalcMixFormatter:i,componentVariantsFormatter:a}=n,c="web";return{cssVarCalcMixFormatter:i(t,r),componentVariantsFormatter:a(t,r,c)}}catch(e){return console.error("Failed to load CssVarCalcMixFormatter:",e),null}}function processCSSFiles(e,s){for(const{destination:o}of e)try{if(o.endsWith(".css")&&fs.existsSync(o)){const e=fs.readFileSync(o,"utf-8"),t=/(:root\s*\{[^}]*\})/,r=path.basename(o).split(".");let n=e;if(3===r.length&&"light"!==r[1]){const o=r[0],t=r[1];s+=(n=e.replace(/:root/g,`:root[${o}='${t}']`))+"\n"}else{const o=s.match(t),r=e.match(t);if(o&&r){const e=o[1],t=r[1].replace(/:root\s*\{|\}/g,"").trim(),n=e.replace("}",`\n${t}\n}`);s=s.replace(e,n)}else s+=n+"\n"}fs.unlink(o,()=>{})}}catch(e){console.error(`\nStyle dictionary, Error processing file ${o}:`,e)}return s}const generateOverrideCSS=async(e,s,o)=>{e=e||{};const t=await getLegacyWmProjectProperties(s);if(isPrismProject(t)){const t=path.join(s+"/src/main/webapp/",OVERRIDE_TOKENS_PATH),r=s+`/src/main/webapp/${APP_OVERRIDE_CSS_PATH}`;if(accessFile(r),fs.existsSync(t)){console.log("CODEGEN ANGULAR APP: generating override css...");let n={scope:"",name:"style-dictionary",version:"4.1.0",packageJsonFile:"",successMsg:"STYLE DICTIONARY SUCCESS",infoMsg:"STYLE DICTIONARY PACKAGE : ",skipPackageVersion:!1};n.baseDir=o;const i=await downloadNPMPackage(n);let a={scope:"@wavemaker",name:"foundation-css",version:e.runtimeUIVersion,packageJsonFile:"",successMsg:"Foundation-CSS SUCCESS",infoMsg:"Foundation-CSS PACKAGE : "};a.baseDir=o;const c=await downloadNPMPackage(a);console.log("FOUNDATION_CSS_PATH",c,"SourceDir",s),await(async()=>{const e=await import(`${i}/node_modules/style-dictionary/lib/StyleDictionary.js`).then(e=>e.default),o=path.join(c,"/node_modules/@wavemaker/foundation-css/src/tokens/web"),{cssVarCalcMixFormatter:n,componentVariantsFormatter:a}=await getCustomFormatters(i,c);n&&a||(n||console.error("cssVarCalcMixFormatter failed to load."),a||console.error("cssVariantFormatter failed to load.")),n&&e.registerFormat(n),a&&e.registerFormat(a);const l=path.resolve(s,"src","main","webapp",DESIGN_TOKENS_DIR_NAME,"temp-tokens"),d=groupFilesByMode(t),f=generateModeConfigs(d,s,n,a);let m="";try{console.log("\nSetting up foundation tokens symlink..."),await setupSymlink(o,l);for(const{mode:o,files:t}of f){console.log(`\nBuilding CSS for mode: ${o}...`);try{const n=getStyleDictionaryConfig(t,l,o,s);console.log(n,o);const i=new e(n);await i.buildPlatform("css"),console.log(`Style Dictionary build completed for mode: ${o}`),m=processCSSFiles(t,m),fs.writeFileSync(r,m),console.log(`CSS overrides generated successfully for mode: ${o}`)}catch(e){console.error(`Error during Style Dictionary build for mode: ${o}`,e)}}console.log("CODEGEN ANGULAR APP: generating overrides success !")}catch(e){console.error("Error setting up symlink or processing modes:",e)}finally{await removeSymlink(l)}})()}}};module.exports={generateOverrideCSS:generateOverrideCSS};
|