@wavemaker/angular-codegen 12.0.0-next.45225 → 12.0.0-next.45228
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.
- angular-codegen/angular-app/package-lock.json +12 -12
- angular-codegen/angular-app/package.json +4 -4
- angular-codegen/download-packages.js +1 -2
- angular-codegen/package.json +1 -1
- angular-codegen/src/codegen-cli.js +1 -1
- angular-codegen/src/gen-index-html.js +1 -1
- angular-codegen/src/update-angular-json.js +1 -1
@@ -34,11 +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.45228",
|
38
38
|
"@wavemaker/focus-trap": "1.0.1",
|
39
|
-
"@wavemaker/foundation-css": "12.0.0-next.
|
39
|
+
"@wavemaker/foundation-css": "12.0.0-next.45228",
|
40
40
|
"@wavemaker/nvd3": "1.8.12",
|
41
|
-
"@wavemaker/variables": "12.0.0-next.
|
41
|
+
"@wavemaker/variables": "12.0.0-next.45228",
|
42
42
|
"@ztree/ztree_v3": "3.5.48",
|
43
43
|
"angular-imask": "^7.6.1",
|
44
44
|
"angular2-websocket": "0.9.7",
|
@@ -7305,9 +7305,9 @@
|
|
7305
7305
|
}
|
7306
7306
|
},
|
7307
7307
|
"node_modules/@wavemaker/custom-widgets-m3": {
|
7308
|
-
"version": "12.0.0-next.
|
7309
|
-
"resolved": "https://registry.npmjs.org/@wavemaker/custom-widgets-m3/-/custom-widgets-m3-12.0.0-next.
|
7310
|
-
"integrity": "sha512-
|
7308
|
+
"version": "12.0.0-next.45228",
|
7309
|
+
"resolved": "https://registry.npmjs.org/@wavemaker/custom-widgets-m3/-/custom-widgets-m3-12.0.0-next.45228.tgz",
|
7310
|
+
"integrity": "sha512-WnHukmLAyfmE6dgu7buatEhTwVgFVjBK6w7PJYqkPjEQrUY+Qme8ms5Kl5W8f0IbOhqXQcaJlToPXeeDt2KN2g=="
|
7311
7311
|
},
|
7312
7312
|
"node_modules/@wavemaker/focus-trap": {
|
7313
7313
|
"version": "1.0.1",
|
@@ -7319,9 +7319,9 @@
|
|
7319
7319
|
}
|
7320
7320
|
},
|
7321
7321
|
"node_modules/@wavemaker/foundation-css": {
|
7322
|
-
"version": "12.0.0-next.
|
7323
|
-
"resolved": "https://registry.npmjs.org/@wavemaker/foundation-css/-/foundation-css-12.0.0-next.
|
7324
|
-
"integrity": "sha512-
|
7322
|
+
"version": "12.0.0-next.45228",
|
7323
|
+
"resolved": "https://registry.npmjs.org/@wavemaker/foundation-css/-/foundation-css-12.0.0-next.45228.tgz",
|
7324
|
+
"integrity": "sha512-HQcyZESxuoYU1K9L66lFMM2J7KboUjPv01OWuMQCySziyyHROzSf3vBCHONobXRFCCpYHBqGcfvJSLR8lJY79g=="
|
7325
7325
|
},
|
7326
7326
|
"node_modules/@wavemaker/nvd3": {
|
7327
7327
|
"version": "1.8.12",
|
@@ -7332,9 +7332,9 @@
|
|
7332
7332
|
}
|
7333
7333
|
},
|
7334
7334
|
"node_modules/@wavemaker/variables": {
|
7335
|
-
"version": "12.0.0-next.
|
7336
|
-
"resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-12.0.0-next.
|
7337
|
-
"integrity": "sha512-
|
7335
|
+
"version": "12.0.0-next.45228",
|
7336
|
+
"resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-12.0.0-next.45228.tgz",
|
7337
|
+
"integrity": "sha512-435Uro9MxJ9xYlHGYwW79VtWC2dL+R64+BzfcfBLuHl6pKOhM0YHrlY8Gur9A4DGkPliQ1y5+RkyOtP8sBiIzg==",
|
7338
7338
|
"dependencies": {
|
7339
7339
|
"@metrichor/jmespath": "^0.3.1",
|
7340
7340
|
"he": "^1.2.0",
|
@@ -44,10 +44,10 @@
|
|
44
44
|
"@babel/runtime": "7.14.8",
|
45
45
|
"@metrichor/jmespath": "0.3.1",
|
46
46
|
"@wavemaker/focus-trap": "1.0.1",
|
47
|
-
"@wavemaker/foundation-css": "12.0.0-next.
|
48
|
-
"@wavemaker/custom-widgets-m3": "12.0.0-next.
|
47
|
+
"@wavemaker/foundation-css": "12.0.0-next.45228",
|
48
|
+
"@wavemaker/custom-widgets-m3": "12.0.0-next.45228",
|
49
49
|
"@wavemaker/nvd3": "1.8.12",
|
50
|
-
"@wavemaker/variables": "12.0.0-next.
|
50
|
+
"@wavemaker/variables": "12.0.0-next.45228",
|
51
51
|
"@ztree/ztree_v3": "3.5.48",
|
52
52
|
"angular-imask": "^7.6.1",
|
53
53
|
"angular2-websocket": "0.9.7",
|
@@ -72,7 +72,7 @@
|
|
72
72
|
"tslib": "2.4.1",
|
73
73
|
"x2js": "3.4.4",
|
74
74
|
"zone.js": "0.14.7",
|
75
|
-
"@wavemaker/app-ng-runtime": "12.0.0-next.
|
75
|
+
"@wavemaker/app-ng-runtime": "12.0.0-next.45228"
|
76
76
|
},
|
77
77
|
"devDependencies": {
|
78
78
|
"@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
|
@@ -41,8 +41,7 @@ const downloadNPMPackage = (packageInfo) => {
|
|
41
41
|
if (packageInfo.packageJsonFile && fs.existsSync(packageInfo.packageJsonFile)) {
|
42
42
|
fs.copyFileSync(packageInfo.packageJsonFile, PATH_NPM_PACKAGE + '/package.json');
|
43
43
|
} else {
|
44
|
-
npmInstallCMD = 'npm init -y && ' +
|
45
|
-
console.log(npmInstallCMD);
|
44
|
+
npmInstallCMD = 'npm init -y && ' + npmInstallCMD + packageInfo.scope + '/' + packageInfo.name + '@' + packageInfo.version;
|
46
45
|
}
|
47
46
|
|
48
47
|
executeSyncCmd('cd ' + PATH_NPM_PACKAGE + ' && ' + npmInstallCMD, (errMsg) => {
|
angular-codegen/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const codegen=require("./codegen"),
|
1
|
+
const codegen=require("./codegen"),{setCodegenPath:setCodegenPath,deleteResource:deleteResource,isMobileProject:isMobileProject,initExpressionParser:initExpressionParser}=require("./wm-utils"),{initTemplates:initTemplates}=require("./handlebar-helpers"),{getWmProjectProperties:getWmProjectProperties}=require("./project-meta"),create=async(e,t,r)=>{await codegen.createAppSkeleton(e,t,r)},generate=async(e,t,r,a,n,i)=>{await codegen.generateSources(e,t,r,a,n,i)},generateCodegenAngularApp=async(e,t,r,a,n,i,o)=>{const s=await getWmProjectProperties(e);if(o=!isMobileProject(s)&&o,setCodegenPath(n),initTemplates(),initExpressionParser(),o){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,n),await generate(e,t,r,a,i,o)},generatePage=async(e,t,r,a,n)=>{setCodegenPath(a),initTemplates(),initExpressionParser(),await codegen.generatePage(e,t,r,n)};module.exports={create:create,generateCodegenAngularApp:generateCodegenAngularApp,generatePage:generatePage};
|
@@ -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('link[href$="foundation.css"]').remove(),o(
|
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,isPrismProject:isPrismProject}=require("./wm-utils"),markScriptsAsLazy=s=>{const e=["./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=s.replace(/^(\.\/)/,"").replace(/\//g,"-").replace(/@/g,"");return t=t.substring(0,t.lastIndexOf(".")),t+="-NOHASH",e.includes(s)?{input:s,inject:!1,bundleName:t}:s},setBuildCustomizations=async s=>{const e=s.projects["angular-app"].architect.build,t=e.options.scripts;e.options.scripts=t.map(s=>markScriptsAsLazy(s))},addToScripts=async(s,e,t=[],i=[])=>{const n=`${e}/angular.json`;let o=readFileSync(n,!0);const r=o.projects["angular-app"].architect.build;let a=r.options.scripts;const l=`${e+"/src/app/extensions"}`,c=await readDir(l);c.length&&i.push("./src/app/extensions/"+c[0]),r.options.scripts=[...t,...a,...i],await writeFile(n,JSON.stringify(o,null,4))},updateAngularJSON=async(s,e,t,i,n,o,r,a,l,c)=>{const u=`${e}/angular.json`;let d=readFileSync(u,!0);const p=d.projects["angular-app"].architect.build;r&&r.trim().length>0&&(p.options.deployUrl=r);let m=p.options.styles;if(isPrismProject(t)&&((m=m.filter(s=>"string"==typeof s?!(s.includes("src/assets/styles/css/wm-style.css")||s.includes("src/assets/styles/css/wm-responsive.css")):"object"!=typeof s||!s.input||!s.input.includes("src/assets/themes/material/style.css"))).push("./node_modules/@wavemaker/foundation-css/foundation/foundation.css"),
|
1
|
+
const cheerio=require("cheerio"),{writeFile:writeFile,readFileSync:readFileSync,readDir:readDir,isMobileProject:isMobileProject,isPrismProject:isPrismProject}=require("./wm-utils"),markScriptsAsLazy=s=>{const e=["./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=s.replace(/^(\.\/)/,"").replace(/\//g,"-").replace(/@/g,"");return t=t.substring(0,t.lastIndexOf(".")),t+="-NOHASH",e.includes(s)?{input:s,inject:!1,bundleName:t}:s},setBuildCustomizations=async s=>{const e=s.projects["angular-app"].architect.build,t=e.options.scripts;e.options.scripts=t.map(s=>markScriptsAsLazy(s))},addToScripts=async(s,e,t=[],i=[])=>{const n=`${e}/angular.json`;let o=readFileSync(n,!0);const r=o.projects["angular-app"].architect.build;let a=r.options.scripts;const l=`${e+"/src/app/extensions"}`,c=await readDir(l);c.length&&i.push("./src/app/extensions/"+c[0]),r.options.scripts=[...t,...a,...i],await writeFile(n,JSON.stringify(o,null,4))},updateAngularJSON=async(s,e,t,i,n,o,r,a,l,c)=>{const u=`${e}/angular.json`;let d=readFileSync(u,!0);const p=d.projects["angular-app"].architect.build;r&&r.trim().length>0&&(p.options.deployUrl=r);let m=p.options.styles;if(isPrismProject(t)&&((m=m.filter(s=>"string"==typeof s?!(s.includes("src/assets/styles/css/wm-style.css")||s.includes("src/assets/styles/css/wm-responsive.css")):"object"!=typeof s||!s.input||!s.input.includes("src/assets/themes/material/style.css"))).push("./node_modules/@wavemaker/foundation-css/foundation/foundation.css"),p.options.styles=m),isMobileProject(t)){const s=m.findIndex(s=>{let e="object"==typeof s;if(e){return(e?s.input:s).includes("themes")}return!1}),e=m[s].input;m[s].bundleName="wm-android-styles",m[s].input=m[s].input.replace(new RegExp("/[a-z]*/style.css$"),`/${i.activeTheme}/android/style.css`);const t=Object.assign({},m[s]);t.input=e.replace(new RegExp("/[a-z]*/style.css$"),`/${i.activeTheme}/ios/style.css`),t.bundleName="wm-ios-styles",m.push(t);const n=m.findIndex(s=>{let e="object"==typeof s;if(e){return"src/assets/app.css"===(e?s.input:s)}return!1});m[n].bundleName="wm-android-styles";const o=Object.assign({},m[n]);o.bundleName="wm-ios-styles",m.push(o)}m.forEach((s,e)=>{let t="object"==typeof s,n=t?s.input:s;!n.includes("themes")||n.includes("/android/")||n.includes("/ios/")||(t?m[e].input=n.replace(new RegExp("/[a-z]*/style.css$"),`/${i.activeTheme}/style.css`):m[e]=n.replace(new RegExp("/[a-z]*/style.css$"),`/${i.activeTheme}/style.css`))}),await setBuildCustomizations(d);const y=p.configurations.production;if(y.aot=!1!==a.aot,y.buildOptimizer=!1!==a.buildOptimizer,c){const s=p.options.assets;s.push("src/manifest.json"),s.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};
|