@wavemaker/angular-codegen 12.0.0-next.45030 → 12.0.0-next.45032
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.
@@ -34,10 +34,11 @@
|
|
34
34
|
"@awesome-cordova-plugins/vibration": "5.39.1",
|
35
35
|
"@babel/runtime": "7.14.8",
|
36
36
|
"@metrichor/jmespath": "0.3.1",
|
37
|
-
"@wavemaker/custom-widgets-m3": "12.0.0-next.
|
37
|
+
"@wavemaker/custom-widgets-m3": "12.0.0-next.45032",
|
38
38
|
"@wavemaker/focus-trap": "1.0.1",
|
39
|
+
"@wavemaker/foundation-css": "12.0.0-next.45032",
|
39
40
|
"@wavemaker/nvd3": "1.8.11",
|
40
|
-
"@wavemaker/variables": "12.0.0-next.
|
41
|
+
"@wavemaker/variables": "12.0.0-next.45032",
|
41
42
|
"@ztree/ztree_v3": "3.5.48",
|
42
43
|
"angular-imask": "^7.6.1",
|
43
44
|
"angular2-websocket": "0.9.7",
|
@@ -6436,9 +6437,9 @@
|
|
6436
6437
|
}
|
6437
6438
|
},
|
6438
6439
|
"node_modules/@wavemaker/custom-widgets-m3": {
|
6439
|
-
"version": "12.0.0-next.
|
6440
|
-
"resolved": "https://registry.npmjs.org/@wavemaker/custom-widgets-m3/-/custom-widgets-m3-12.0.0-next.
|
6441
|
-
"integrity": "sha512-
|
6440
|
+
"version": "12.0.0-next.45032",
|
6441
|
+
"resolved": "https://registry.npmjs.org/@wavemaker/custom-widgets-m3/-/custom-widgets-m3-12.0.0-next.45032.tgz",
|
6442
|
+
"integrity": "sha512-fFHqzOX6vtSFzvYW0EYYdEoZWVIKOgM42CNQEqbYvcPfJLXjbgUnRdCGJyqQFudtD2mijF7Oa5HX6bCKLvGDRg=="
|
6442
6443
|
},
|
6443
6444
|
"node_modules/@wavemaker/focus-trap": {
|
6444
6445
|
"version": "1.0.1",
|
@@ -6449,6 +6450,11 @@
|
|
6449
6450
|
"yarn": "^1.22.19"
|
6450
6451
|
}
|
6451
6452
|
},
|
6453
|
+
"node_modules/@wavemaker/foundation-css": {
|
6454
|
+
"version": "12.0.0-next.45032",
|
6455
|
+
"resolved": "https://registry.npmjs.org/@wavemaker/foundation-css/-/foundation-css-12.0.0-next.45032.tgz",
|
6456
|
+
"integrity": "sha512-5LZdUFpueTpU2zY4OJClLuFCrmJ5LzOeAuUlQfoIL3QIKFDCRDlafHZPa5XumQkwZG23QcK5qzFP5VIwl+XyzQ=="
|
6457
|
+
},
|
6452
6458
|
"node_modules/@wavemaker/nvd3": {
|
6453
6459
|
"version": "1.8.11",
|
6454
6460
|
"resolved": "https://registry.npmjs.org/@wavemaker/nvd3/-/nvd3-1.8.11.tgz",
|
@@ -6458,9 +6464,9 @@
|
|
6458
6464
|
}
|
6459
6465
|
},
|
6460
6466
|
"node_modules/@wavemaker/variables": {
|
6461
|
-
"version": "12.0.0-next.
|
6462
|
-
"resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-12.0.0-next.
|
6463
|
-
"integrity": "sha512-
|
6467
|
+
"version": "12.0.0-next.45032",
|
6468
|
+
"resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-12.0.0-next.45032.tgz",
|
6469
|
+
"integrity": "sha512-HnxpDnuTTzc9R9vRoeejOqMLgfo55XVc7IiQaXfPspoXkyID7XNR3ohCVIDBDVn/bXAwktYS92lsRCkMdUnBKQ==",
|
6464
6470
|
"dependencies": {
|
6465
6471
|
"@metrichor/jmespath": "^0.3.1",
|
6466
6472
|
"he": "^1.2.0",
|
@@ -45,8 +45,9 @@
|
|
45
45
|
"@metrichor/jmespath": "0.3.1",
|
46
46
|
"@wavemaker/focus-trap": "1.0.1",
|
47
47
|
"@wavemaker/nvd3": "1.8.11",
|
48
|
-
"@wavemaker/
|
49
|
-
"@wavemaker/
|
48
|
+
"@wavemaker/foundation-css": "12.0.0-next.45032",
|
49
|
+
"@wavemaker/custom-widgets-m3": "12.0.0-next.45032",
|
50
|
+
"@wavemaker/variables": "12.0.0-next.45032",
|
50
51
|
"@ztree/ztree_v3": "3.5.48",
|
51
52
|
"angular-imask": "^7.6.1",
|
52
53
|
"angular2-websocket": "0.9.7",
|
@@ -71,7 +72,7 @@
|
|
71
72
|
"tslib": "2.4.1",
|
72
73
|
"x2js": "3.4.4",
|
73
74
|
"zone.js": "0.14.7",
|
74
|
-
"@wavemaker/app-ng-runtime": "12.0.0-next.
|
75
|
+
"@wavemaker/app-ng-runtime": "12.0.0-next.45032"
|
75
76
|
},
|
76
77
|
"devDependencies": {
|
77
78
|
"@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
|
angular-codegen/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const{getIndexHtmlPath:getIndexHtmlPath,readFile:readFile,writeFile:writeFile,isMobileProject:isMobileProject,createDir:createDir}=require("./wm-utils"),{addToScripts:addToScripts}=require("./update-angular-json"),cheerio=require("cheerio"),prettier=require("prettier"),isResourceJS=e=>/^resources\/./.test(e),generateIndexHtml=async(e,r,t,i,s)=>{const n=await readFile(getIndexHtmlPath(e),"utf8"),o=cheerio.load(n);let a=[],c=[],l=!1,m=0,p=[];const d=["application/ld+json"];await createDir(r+"/resources/wm-inline",{recursive:!0}),o("script").each((e,r)=>{p.push(r)});for(const e of p){let t=o(e).attr("src");if(t)!l&&t.includes("wm-libs.min.js")&&(l=!0),isResourceJS(t)&&(l?c.push(t):a.push(t),o(e).remove());else if(!d.includes(o(e).attr("type"))){t=`resources/wm-inline/wm-inline-${++m}.js`;try{await writeFile(`${r}/${t}`,o(e).html()),l?c.push(t):a.push(t),o(e).remove()}catch(e){console.log(`WM-CODEGEN | Error in inline script generation | ${e}`)}}}await addToScripts(e,r,a,c),o('script[src$="/wm-loader.min.js"]').remove(),o('script[src$="/wm-libs.min.js"]').remove(),o('script[src$="/wm-mobileloader.min.js"]').remove(),o("body").append(o('script[src$="/wmProperties.js"]'));const h=o('meta[name="description"]');h.attr("content")||h.attr("content","App built on wavemaker"),i&&i.endsWith("/")&&(i=i.substr(0,i.length-1)),isMobileProject(t)&&o("body").append(o('script[src="cordova.js"]')),o('link[href$="/wm-style.css"]').remove(),o('link[href="print.css"]').remove(),o('link[theme="wmtheme"]').remove(),o('link[href$="wm-responsive.css"]').remove(),o('link[href^="themes"][href$="style.css"]').remove(),o('link[href="app.css"]').remove(),o("*").contents().each(function(){8===this.nodeType&&o(this).remove()});process.env.APPMETRICS_ENABLED,process.env.APPMETRICS_SERVER_URL;i?o('meta[name="cdnUrl"]').attr("content",i+"/"):o('meta[name="cdnUrl"]').remove(),o('link[href^="favicon."]').attr("rel","icon"),s&&(o("head").append('<meta name="theme-color" content="#2c3049" />'),o("head").append('<link rel="manifest" href="manifest.json">'),o("head").append('<link rel="apple-touch-icon" href="ng-bundle/assets/icons/icon-192x192.png">')),await writeFile(`${r}/src/index.html`,prettier.format(o.html(),{htmlWhitespaceSensitivity:"ignore",parser:"html",tabWidth:4}))};module.exports={generateIndexHtml:generateIndexHtml};
|
1
|
+
const{getIndexHtmlPath:getIndexHtmlPath,readFile:readFile,writeFile:writeFile,isMobileProject:isMobileProject,createDir:createDir}=require("./wm-utils"),{addToScripts:addToScripts}=require("./update-angular-json"),cheerio=require("cheerio"),prettier=require("prettier"),isResourceJS=e=>/^resources\/./.test(e),generateIndexHtml=async(e,r,t,i,s)=>{const n=await readFile(getIndexHtmlPath(e),"utf8"),o=cheerio.load(n);let a=[],c=[],l=!1,m=0,p=[];const d=["application/ld+json"];await createDir(r+"/resources/wm-inline",{recursive:!0}),o("script").each((e,r)=>{p.push(r)});for(const e of p){let t=o(e).attr("src");if(t)!l&&t.includes("wm-libs.min.js")&&(l=!0),isResourceJS(t)&&(l?c.push(t):a.push(t),o(e).remove());else if(!d.includes(o(e).attr("type"))){t=`resources/wm-inline/wm-inline-${++m}.js`;try{await writeFile(`${r}/${t}`,o(e).html()),l?c.push(t):a.push(t),o(e).remove()}catch(e){console.log(`WM-CODEGEN | Error in inline script generation | ${e}`)}}}await addToScripts(e,r,a,c),o('script[src$="/wm-loader.min.js"]').remove(),o('script[src$="/wm-libs.min.js"]').remove(),o('script[src$="/wm-mobileloader.min.js"]').remove(),o("body").append(o('script[src$="/wmProperties.js"]'));const h=o('meta[name="description"]');h.attr("content")||h.attr("content","App built on wavemaker"),i&&i.endsWith("/")&&(i=i.substr(0,i.length-1)),isMobileProject(t)&&o("body").append(o('script[src="cordova.js"]')),o('link[href$="/wm-style.css"]').remove(),o('link[href="print.css"]').remove(),o('link[theme="wmtheme"]').remove(),o('link[href$="wm-responsive.css"]').remove(),o('link[href^="themes"][href$="style.css"]').remove(),o('link[href="app.css"]').remove(),o('link[href$="foundation.css"]').remove(),o("*").contents().each(function(){8===this.nodeType&&o(this).remove()});process.env.APPMETRICS_ENABLED,process.env.APPMETRICS_SERVER_URL;i?o('meta[name="cdnUrl"]').attr("content",i+"/"):o('meta[name="cdnUrl"]').remove(),o('link[href^="favicon."]').attr("rel","icon"),s&&(o("head").append('<meta name="theme-color" content="#2c3049" />'),o("head").append('<link rel="manifest" href="manifest.json">'),o("head").append('<link rel="apple-touch-icon" href="ng-bundle/assets/icons/icon-192x192.png">')),await writeFile(`${r}/src/index.html`,prettier.format(o.html(),{htmlWhitespaceSensitivity:"ignore",parser:"html",tabWidth:4}))};module.exports={generateIndexHtml:generateIndexHtml};
|
@@ -1 +1 @@
|
|
1
|
-
const cheerio=require("cheerio"),{writeFile:writeFile,readFileSync:readFileSync,readDir:readDir,isMobileProject:isMobileProject}=require("./wm-utils"),markScriptsAsLazy=e=>{const s=["./node_modules/d3/dist/d3.min.js","./node_modules/@wavemaker/nvd3/build/nv.d3.min.js","./node_modules/fullcalendar/main.min.js","./node_modules/summernote/dist/summernote-lite.min.js",global._WM_PACKAGE_PATH+"/scripts/datatable/datatable.js","./node_modules/jquery-ui/ui/widgets/sortable.js","./node_modules/jquery-ui/ui/widgets/droppable.js","./node_modules/jquery-ui/ui/widgets/resizable.js","./node_modules/hammerjs/hammer.min.js","./node_modules/iscroll/build/iscroll.js"];let t=e.replace(/^(\.\/)/,"").replace(/\//g,"-").replace(/@/g,"");return t=t.substring(0,t.lastIndexOf(".")),t+="-NOHASH",s.includes(e)?{input:e,inject:!1,bundleName:t}:e},setBuildCustomizations=async e=>{const s=e.projects["angular-app"].architect.build,t=s.options.scripts;s.options.scripts=t.map(e=>markScriptsAsLazy(e))},addToScripts=async(e,s,t=[],i=[])=>{const n=`${s}/angular.json`;let o=readFileSync(n,!0);const a=o.projects["angular-app"].architect.build;let
|
1
|
+
const cheerio=require("cheerio"),{writeFile:writeFile,readFileSync:readFileSync,readDir:readDir,isMobileProject:isMobileProject}=require("./wm-utils"),markScriptsAsLazy=e=>{const s=["./node_modules/d3/dist/d3.min.js","./node_modules/@wavemaker/nvd3/build/nv.d3.min.js","./node_modules/fullcalendar/main.min.js","./node_modules/summernote/dist/summernote-lite.min.js",global._WM_PACKAGE_PATH+"/scripts/datatable/datatable.js","./node_modules/jquery-ui/ui/widgets/sortable.js","./node_modules/jquery-ui/ui/widgets/droppable.js","./node_modules/jquery-ui/ui/widgets/resizable.js","./node_modules/hammerjs/hammer.min.js","./node_modules/iscroll/build/iscroll.js"];let t=e.replace(/^(\.\/)/,"").replace(/\//g,"-").replace(/@/g,"");return t=t.substring(0,t.lastIndexOf(".")),t+="-NOHASH",s.includes(e)?{input:e,inject:!1,bundleName:t}:e},setBuildCustomizations=async e=>{const s=e.projects["angular-app"].architect.build,t=s.options.scripts;s.options.scripts=t.map(e=>markScriptsAsLazy(e))},addToScripts=async(e,s,t=[],i=[])=>{const n=`${s}/angular.json`;let o=readFileSync(n,!0);const a=o.projects["angular-app"].architect.build;let l=a.options.scripts;const r=`${s+"/src/app/extensions"}`,c=await readDir(r);c.length&&i.push("./src/app/extensions/"+c[0]),a.options.scripts=[...t,...l,...i],await writeFile(n,JSON.stringify(o,null,4))},updateAngularJSON=async(e,s,t,i,n,o,a,l,r,c)=>{const u=`${s}/angular.json`;let d=readFileSync(u,!0);const p=d.projects["angular-app"].architect.build;a&&a.trim().length>0&&(p.options.deployUrl=a);let m=p.options.styles;if((m=m.filter(e=>"string"==typeof e?!(e.includes("src/assets/styles/css/wm-style.css")||e.includes("src/assets/styles/css/wm-responsive.css")):"object"!=typeof e||!e.input||!e.input.includes("src/assets/themes/material/style.css"))).push("./node_modules/@wavemaker/foundation-css/foundation/foundation.css"),p.options.styles=m,isMobileProject(t)){const e=m.findIndex(e=>{let s="object"==typeof e;if(s){return(s?e.input:e).includes("themes")}return!1}),s=m[e].input;m[e].bundleName="wm-android-styles",m[e].input=m[e].input.replace(new RegExp("/[a-z]*/style.css$"),`/${i.activeTheme}/android/style.css`);const t=Object.assign({},m[e]);t.input=s.replace(new RegExp("/[a-z]*/style.css$"),`/${i.activeTheme}/ios/style.css`),t.bundleName="wm-ios-styles",m.push(t);const n=m.findIndex(e=>{let s="object"==typeof e;if(s){return"src/assets/app.css"===(s?e.input:e)}return!1});m[n].bundleName="wm-android-styles";const o=Object.assign({},m[n]);o.bundleName="wm-ios-styles",m.push(o)}m.forEach((e,s)=>{let t="object"==typeof e,n=t?e.input:e;!n.includes("themes")||n.includes("/android/")||n.includes("/ios/")||(t?m[s].input=n.replace(new RegExp("/[a-z]*/style.css$"),`/${i.activeTheme}/style.css`):m[s]=n.replace(new RegExp("/[a-z]*/style.css$"),`/${i.activeTheme}/style.css`))}),await setBuildCustomizations(d);const y=p.configurations.production;if(y.aot=!1!==l.aot,y.buildOptimizer=!1!==l.buildOptimizer,c){const e=p.options.assets;e.push("src/manifest.json"),e.push("src/wmsw-worker.js"),y.serviceWorker=!0,y.ngswConfigPath="ngsw-config.json",delete p.options.customWebpackConfig}await writeFile(u,JSON.stringify(d,null,4))};module.exports={updateAngularJSON:updateAngularJSON,addToScripts:addToScripts};
|