@wavemaker/angular-codegen 12.0.0-next.45139 → 12.0.0-next.45142
Sign up to get free protection for your applications and to get access to all the features.
@@ -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.45142",
|
38
38
|
"@wavemaker/focus-trap": "1.0.1",
|
39
|
-
"@wavemaker/foundation-css": "12.0.0-next.
|
39
|
+
"@wavemaker/foundation-css": "12.0.0-next.45142",
|
40
40
|
"@wavemaker/nvd3": "1.8.12",
|
41
|
-
"@wavemaker/variables": "12.0.0-next.
|
41
|
+
"@wavemaker/variables": "12.0.0-next.45142",
|
42
42
|
"@ztree/ztree_v3": "3.5.48",
|
43
43
|
"angular-imask": "^7.6.1",
|
44
44
|
"angular2-websocket": "0.9.7",
|
@@ -6835,9 +6835,9 @@
|
|
6835
6835
|
}
|
6836
6836
|
},
|
6837
6837
|
"node_modules/@wavemaker/custom-widgets-m3": {
|
6838
|
-
"version": "12.0.0-next.
|
6839
|
-
"resolved": "https://registry.npmjs.org/@wavemaker/custom-widgets-m3/-/custom-widgets-m3-12.0.0-next.
|
6840
|
-
"integrity": "sha512-
|
6838
|
+
"version": "12.0.0-next.45142",
|
6839
|
+
"resolved": "https://registry.npmjs.org/@wavemaker/custom-widgets-m3/-/custom-widgets-m3-12.0.0-next.45142.tgz",
|
6840
|
+
"integrity": "sha512-MOKmIVDRfVBlhMbOxpPwBwK6Lppg9PWfmfj59U3Ta8Gatjy+zGJ9U6oeropaWrBbrHZ/E5e54Zf6htQ6/SA5tw=="
|
6841
6841
|
},
|
6842
6842
|
"node_modules/@wavemaker/focus-trap": {
|
6843
6843
|
"version": "1.0.1",
|
@@ -6849,9 +6849,9 @@
|
|
6849
6849
|
}
|
6850
6850
|
},
|
6851
6851
|
"node_modules/@wavemaker/foundation-css": {
|
6852
|
-
"version": "12.0.0-next.
|
6853
|
-
"resolved": "https://registry.npmjs.org/@wavemaker/foundation-css/-/foundation-css-12.0.0-next.
|
6854
|
-
"integrity": "sha512-
|
6852
|
+
"version": "12.0.0-next.45142",
|
6853
|
+
"resolved": "https://registry.npmjs.org/@wavemaker/foundation-css/-/foundation-css-12.0.0-next.45142.tgz",
|
6854
|
+
"integrity": "sha512-0qLXAbFo80VsbwJOKIZMC4OYsDVqELgfyeeN07GjxoKTFKASXnS6/JqrOSBSFwbwsKiO4QU3mTRi5CqMGFa7CA=="
|
6855
6855
|
},
|
6856
6856
|
"node_modules/@wavemaker/nvd3": {
|
6857
6857
|
"version": "1.8.12",
|
@@ -6862,9 +6862,9 @@
|
|
6862
6862
|
}
|
6863
6863
|
},
|
6864
6864
|
"node_modules/@wavemaker/variables": {
|
6865
|
-
"version": "12.0.0-next.
|
6866
|
-
"resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-12.0.0-next.
|
6867
|
-
"integrity": "sha512-
|
6865
|
+
"version": "12.0.0-next.45142",
|
6866
|
+
"resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-12.0.0-next.45142.tgz",
|
6867
|
+
"integrity": "sha512-JOk/9OYXgCinHgacSdnNoRfXTiYasJ/Xy9A7zOUzON2SgbZQmERZAqsMpTRi6tXWKu5P5fcABEpda9rmqdIqAw==",
|
6868
6868
|
"dependencies": {
|
6869
6869
|
"@metrichor/jmespath": "^0.3.1",
|
6870
6870
|
"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.45142",
|
48
|
+
"@wavemaker/custom-widgets-m3": "12.0.0-next.45142",
|
49
49
|
"@wavemaker/nvd3": "1.8.12",
|
50
|
-
"@wavemaker/variables": "12.0.0-next.
|
50
|
+
"@wavemaker/variables": "12.0.0-next.45142",
|
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.45142"
|
76
76
|
},
|
77
77
|
"devDependencies": {
|
78
78
|
"@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
|
angular-codegen/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const cheerio=require("cheerio"),{writeFile:writeFile,readFileSync:readFileSync,readDir:readDir,isMobileProject:isMobileProject}=require("./wm-utils"),markScriptsAsLazy=
|
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};
|
angular-codegen/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"),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(a=>{const i=path.join(e,a);fs.lstatSync(i).isDirectory()?searchFileByName(i,t,r):t.test(i)&&r(i)})},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,a)=>{tar.pack(e).pipe(fs.createWriteStream(t)).on("finish",r)}),extractTar=(e,t)=>new Promise((r,a)=>{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}/.wmproject.properties`,getIndexHtmlPath=e=>`${getWebAppPath(e)}/index.html`;let codegenPath="./node_modules/@wavemaker/angular-codegen";const setCodegenPath=e=>{e&&(codegenPath=e)},getCodegenPath=()=>codegenPath,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,readFileSync=(e,t)=>{let r=fs.readFileSync(e);return t?JSON.parse(r):r},initExpressionParser=()=>{const e=require("../dependencies/expression-parser.cjs"),t=require("../dependencies/pipe-provider.cjs");e.setPipeProvider(new t.PipeProvider({},{get:()=>{}},{}))};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,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,readFileSync:readFileSync,getCodegenPath:getCodegenPath,setCodegenPath:setCodegenPath,initExpressionParser:initExpressionParser};
|
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"),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(a=>{const i=path.join(e,a);fs.lstatSync(i).isDirectory()?searchFileByName(i,t,r):t.test(i)&&r(i)})},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,a)=>{tar.pack(e).pipe(fs.createWriteStream(t)).on("finish",r)}),extractTar=(e,t)=>new Promise((r,a)=>{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}/.wmproject.properties`,getIndexHtmlPath=e=>`${getWebAppPath(e)}/index.html`;let codegenPath="./node_modules/@wavemaker/angular-codegen";const setCodegenPath=e=>{e&&(codegenPath=e)},getCodegenPath=()=>codegenPath,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},initExpressionParser=()=>{const e=require("../dependencies/expression-parser.cjs"),t=require("../dependencies/pipe-provider.cjs");e.setPipeProvider(new t.PipeProvider({},{get:()=>{}},{}))};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,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};
|