@wavemaker/angular-codegen 11.4.0-next.1417011 → 11.4.0-next.1417013
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.
@@ -5960,9 +5960,9 @@
|
|
5960
5960
|
}
|
5961
5961
|
},
|
5962
5962
|
"@wavemaker/variables": {
|
5963
|
-
"version": "11.4.0-next.
|
5964
|
-
"resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-11.4.0-next.
|
5965
|
-
"integrity": "sha512-
|
5963
|
+
"version": "11.4.0-next.1417013",
|
5964
|
+
"resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-11.4.0-next.1417013.tgz",
|
5965
|
+
"integrity": "sha512-x0qic8U1qJhbjmGbXtJuJ73o/PQugdbcAl2vZ07TgkPGzNlKECH+1lt6Nk9bLGmntv4qhChwFWNWRvRRk1nNcA==",
|
5966
5966
|
"requires": {
|
5967
5967
|
"@metrichor/jmespath": "^0.3.1",
|
5968
5968
|
"he": "^1.2.0",
|
@@ -47,7 +47,7 @@
|
|
47
47
|
"@metrichor/jmespath": "^0.3.1",
|
48
48
|
"@wavemaker.com/nvd3": "1.0.0",
|
49
49
|
"@wavemaker/focus-trap": "^1.0.0",
|
50
|
-
"@wavemaker/variables": "11.4.0-next.
|
50
|
+
"@wavemaker/variables": "11.4.0-next.1417013",
|
51
51
|
"angular-imask": "6.0.4",
|
52
52
|
"angular2-websocket": "0.9.7",
|
53
53
|
"core-js": "2.5.4",
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"tslib": "^2.0.0",
|
72
72
|
"x2js": "3.2.6",
|
73
73
|
"zone.js": "~0.11.4",
|
74
|
-
"@wavemaker/app-ng-runtime": "11.4.0-next.
|
74
|
+
"@wavemaker/app-ng-runtime": "11.4.0-next.1417013"
|
75
75
|
},
|
76
76
|
"devDependencies": {
|
77
77
|
"@ampproject/rollup-plugin-closure-compiler": "0.8.5",
|
angular-codegen/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const parser=require("fast-xml-parser"),{readFile:readFile,readDir:readDir,stat:stat,isPrefabProject:isPrefabProject,getWmProjectPropertiesFilePath:getWmProjectPropertiesFilePath,getThemesConfigPropertiesFilePath:getThemesConfigPropertiesFilePath,getAuthInfoFilePath:getAuthInfoFilePath,getSecurityConfigPath:getSecurityConfigPath,getLayoutsConfigPath:getLayoutsConfigPath,getPagesConfigPath:getPagesConfigPath,getPrefabsDirPath:getPrefabsDirPath,getPrefabPagesDirPath:getPrefabPagesDirPath,getPrefabConfigPath:getPrefabConfigPath}=require("./wm-utils"),{join:join}=require("path"),getWmProjectProperties=async e=>{let t=await readFile(getWmProjectPropertiesFilePath(e),"utf8");const a={};return parser.parse(t,{textNodeName:"text",ignoreAttributes:!1,ignoreNameSpace:!1,allowBooleanAttributes:!1,parseNodeValue:!0,parseAttributeValue:!1,trimValues:!0,parseTrueNumberOnly:!1,arrayMode:!1,stopNodes:["parse-me-as-string"]},!0).properties.entry.forEach(e=>a[e["@_key"]]=e.text?e.text:""),a},getThemesConfigProperties=async e=>{
|
1
|
+
const parser=require("fast-xml-parser"),{readFile:readFile,readDir:readDir,stat:stat,isPrefabProject:isPrefabProject,getWmProjectPropertiesFilePath:getWmProjectPropertiesFilePath,getThemesConfigPropertiesFilePath:getThemesConfigPropertiesFilePath,getAuthInfoFilePath:getAuthInfoFilePath,getSecurityConfigPath:getSecurityConfigPath,getLayoutsConfigPath:getLayoutsConfigPath,getPagesConfigPath:getPagesConfigPath,getPrefabsDirPath:getPrefabsDirPath,getPrefabPagesDirPath:getPrefabPagesDirPath,getPrefabConfigPath:getPrefabConfigPath}=require("./wm-utils"),{join:join}=require("path"),getWmProjectProperties=async e=>{let t=await readFile(getWmProjectPropertiesFilePath(e),"utf8");const a={};return parser.parse(t,{textNodeName:"text",ignoreAttributes:!1,ignoreNameSpace:!1,allowBooleanAttributes:!1,parseNodeValue:!0,parseAttributeValue:!1,trimValues:!0,parseTrueNumberOnly:!1,arrayMode:!1,stopNodes:["parse-me-as-string"]},!0).properties.entry.forEach(e=>a[e["@_key"]]=e.text?e.text:""),a},getThemesConfigProperties=async e=>{const t=await readFile(getThemesConfigPropertiesFilePath(e),"utf8");return JSON.parse(t)},getSecurityConfig=async e=>stat(getAuthInfoFilePath(e)).then(()=>new Promise(async(t,a)=>{let r=null;JSON.parse(await readFile(getAuthInfoFilePath(e))).enforceSecurity&&(r=JSON.parse(await readFile(getSecurityConfigPath(e),"utf8"))),t(r)}),()=>Promise.resolve(null)),getLayoutsConfig=async e=>{let t=await readFile(getLayoutsConfigPath(e),"utf8");return t=JSON.parse(t)},getPagesConfig=async e=>{let t=await readFile(getPagesConfigPath(e),"utf8");return t=JSON.parse(t)},getPrefabPartialsConfig=async(e,t)=>{let a=await readFile(`${getPrefabPagesDirPath(e,t)}/pages-config.json`,"utf8");return a=JSON.parse(a).filter(e=>"partial"===e.type.toLowerCase()||"template"===e.type.toLowerCase()).map(e=>({...e,prefabName:t}))},getPrefabConfigsUsedInApp=async(e,t)=>{const a=new Map,r=getPrefabsDirPath(t);return stat(r).then(()=>new Promise(async(i,s)=>{for(const e of await readDir(r))(await stat(join(r,e))).isDirectory()&&a.set(e,await readFile(getPrefabConfigPath(t,e)));isPrefabProject(e)&&a.set("__self__",await readFile(`${t}/src/main/webapp/config.json`)),i(a)}),()=>Promise.resolve(a))};module.exports={getWmProjectProperties:getWmProjectProperties,getThemesConfigProperties:getThemesConfigProperties,getSecurityConfig:getSecurityConfig,getLayoutsConfig:getLayoutsConfig,getPagesConfig:getPagesConfig,getPrefabConfigsUsedInApp:getPrefabConfigsUsedInApp,getPrefabPartialsConfig:getPrefabPartialsConfig};
|
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/
|
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};
|