@wavemaker/angular-codegen 12.0.0-next.1417127 → 12.0.0-next.1417132

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.
@@ -36,7 +36,7 @@
36
36
  "@metrichor/jmespath": "0.3.1",
37
37
  "@wavemaker/focus-trap": "1.0.1",
38
38
  "@wavemaker/nvd3": "1.8.12",
39
- "@wavemaker/variables": "12.0.0-next.1417127",
39
+ "@wavemaker/variables": "12.0.0-next.1417132",
40
40
  "@ztree/ztree_v3": "3.5.48",
41
41
  "angular-imask": "^7.6.1",
42
42
  "angular2-websocket": "0.9.7",
@@ -7577,9 +7577,9 @@
7577
7577
  }
7578
7578
  },
7579
7579
  "node_modules/@wavemaker/variables": {
7580
- "version": "12.0.0-next.1417127",
7581
- "resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-12.0.0-next.1417127.tgz",
7582
- "integrity": "sha512-wuGgh3aH2mH4Le3zCTKNmV3gV9vS2cT/kr4HIGtyfM5thVAp5DUSz2veYet5aclbgB9EcTw7cSP6QmnlU0lBbQ==",
7580
+ "version": "12.0.0-next.1417132",
7581
+ "resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-12.0.0-next.1417132.tgz",
7582
+ "integrity": "sha512-z7/FLQvNC+oeNwPuVfhKZTKCZefaXK0PASjFbxfFwKCrome60YFm3se1gfogJJRrAs2L8xsGnBUT2nK0U/ln5g==",
7583
7583
  "dependencies": {
7584
7584
  "@metrichor/jmespath": "^0.3.1",
7585
7585
  "he": "^1.2.0",
@@ -45,7 +45,7 @@
45
45
  "@metrichor/jmespath": "0.3.1",
46
46
  "@wavemaker/focus-trap": "1.0.1",
47
47
  "@wavemaker/nvd3": "1.8.12",
48
- "@wavemaker/variables": "12.0.0-next.1417127",
48
+ "@wavemaker/variables": "12.0.0-next.1417132",
49
49
  "@ztree/ztree_v3": "3.5.48",
50
50
  "angular-imask": "^7.6.1",
51
51
  "angular2-websocket": "0.9.7",
@@ -70,7 +70,7 @@
70
70
  "tslib": "2.4.1",
71
71
  "x2js": "3.4.4",
72
72
  "zone.js": "0.14.7",
73
- "@wavemaker/app-ng-runtime": "12.0.0-next.1417127"
73
+ "@wavemaker/app-ng-runtime": "12.0.0-next.1417132"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
@@ -7,7 +7,7 @@ import { environment } from './environments/environment';
7
7
  import initWmProjectProperties from './app/wm-project-properties';
8
8
  import { WMAppProperties } from './app/wmProperties';
9
9
 
10
- const _WM_APP_PROPERTIES = WMAppProperties
10
+ (window as any)._WM_APP_PROPERTIES = WMAppProperties
11
11
  initWmProjectProperties();
12
12
 
13
13
  if (environment.production) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "12.0.0-next.1417127",
3
+ "version": "12.0.0-next.1417132",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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,getWmProjectPropertiesFromTargetPath:getWmProjectPropertiesFromTargetPath}=require("./wm-utils"),{join:join}=require("path"),getWmProjectProperties=async e=>{let t=await readFile(getWmProjectPropertiesFilePath(e),"utf8");const r={};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=>r[e["@_key"]]=e.text?e.text:""),r},getWmProjectPropertiesFromTarget=async e=>{return await readFile(getWmProjectPropertiesFromTargetPath(e),"utf8")},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,r)=>{let a=null;JSON.parse(await readFile(getAuthInfoFilePath(e))).enforceSecurity&&(a=JSON.parse(await readFile(getSecurityConfigPath(e),"utf8"))),t(a)}),()=>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 r=await readFile(`${getPrefabPagesDirPath(e,t)}/pages-config.json`,"utf8");return r=JSON.parse(r).filter(e=>"partial"===e.type.toLowerCase()||"template"===e.type.toLowerCase()).map(e=>({...e,prefabName:t}))},getPrefabConfigsUsedInApp=async(e,t)=>{const r=new Map,a=getPrefabsDirPath(t);return stat(a).then(()=>new Promise(async(i,o)=>{for(const e of await readDir(a))(await stat(join(a,e))).isDirectory()&&r.set(e,await readFile(getPrefabConfigPath(t,e)));isPrefabProject(e)&&r.set("__self__",await readFile(`${t}/src/main/webapp/config.json`)),i(r)}),()=>Promise.resolve(r))};module.exports={getWmProjectProperties:getWmProjectProperties,getWmProjectPropertiesFromTarget:getWmProjectPropertiesFromTarget,getThemesConfigProperties:getThemesConfigProperties,getSecurityConfig:getSecurityConfig,getLayoutsConfig:getLayoutsConfig,getPagesConfig:getPagesConfig,getPrefabConfigsUsedInApp:getPrefabConfigsUsedInApp,getPrefabPartialsConfig:getPrefabPartialsConfig};
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,getWmProjectPropertiesFromTargetPath:getWmProjectPropertiesFromTargetPath}=require("./wm-utils"),{join:join}=require("path"),getWmProjectProperties=async e=>{let t=await readFile(getWmProjectPropertiesFilePath(e),"utf8");const r={};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=>r[e["@_key"]]=e.text?e.text:""),r},getWmProjectPropertiesFromTarget=async e=>{return await readFile(getWmProjectPropertiesFromTargetPath(),"utf8")},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,r)=>{let a=null;JSON.parse(await readFile(getAuthInfoFilePath(e))).enforceSecurity&&(a=JSON.parse(await readFile(getSecurityConfigPath(e),"utf8"))),t(a)}),()=>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 r=await readFile(`${getPrefabPagesDirPath(e,t)}/pages-config.json`,"utf8");return r=JSON.parse(r).filter(e=>"partial"===e.type.toLowerCase()||"template"===e.type.toLowerCase()).map(e=>({...e,prefabName:t}))},getPrefabConfigsUsedInApp=async(e,t)=>{const r=new Map,a=getPrefabsDirPath(t);return stat(a).then(()=>new Promise(async(i,o)=>{for(const e of await readDir(a))(await stat(join(a,e))).isDirectory()&&r.set(e,await readFile(getPrefabConfigPath(t,e)));isPrefabProject(e)&&r.set("__self__",await readFile(`${t}/src/main/webapp/config.json`)),i(r)}),()=>Promise.resolve(r))};module.exports={getWmProjectProperties:getWmProjectProperties,getWmProjectPropertiesFromTarget:getWmProjectPropertiesFromTarget,getThemesConfigProperties:getThemesConfigProperties,getSecurityConfig:getSecurityConfig,getLayoutsConfig:getLayoutsConfig,getPagesConfig:getPagesConfig,getPrefabConfigsUsedInApp:getPrefabConfigsUsedInApp,getPrefabPartialsConfig:getPrefabPartialsConfig};
@@ -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`,getWmProjectPropertiesFromTargetPath=e=>`${e}/target/ui-resources/wmProperties.js`,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,getWmProjectPropertiesFromTargetPath:getWmProjectPropertiesFromTargetPath,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`,getWmProjectPropertiesFromTargetPath=()=>"./target/ui-resources/wmProperties.js",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,getWmProjectPropertiesFromTargetPath:getWmProjectPropertiesFromTargetPath,getThemesConfigPropertiesFilePath:getThemesConfigPropertiesFilePath,getIndexHtmlPath:getIndexHtmlPath,formatContents:formatContents,formatMarkup:formatMarkup,isMobileProject:isMobileProject,isPrefabProject:isPrefabProject,readFileSync:readFileSync,getCodegenPath:getCodegenPath,setCodegenPath:setCodegenPath,initExpressionParser:initExpressionParser};