@wavemaker/angular-codegen 11.14.1-3.6306 → 11.14.1-32.647748
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.
- package/angular-app/dependency-report.html +1 -1
- package/angular-app/npm-shrinkwrap.json +2799 -2190
- package/angular-app/package-lock.json +2799 -2190
- package/angular-app/package.json +6 -6
- package/dependencies/custom-widgets-bundle.cjs.js +61 -63
- package/dependencies/expression-parser.cjs.js +2 -2
- package/dependencies/pipe-provider.cjs.js +2108 -1174
- package/dependencies/transpilation-web.cjs.js +1055 -588
- package/npm-shrinkwrap.json +410 -343
- package/package-lock.json +410 -343
- package/package.json +2 -2
- package/src/update-angular-json.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-codegen",
|
|
3
|
-
"version": "11.14.1-
|
|
3
|
+
"version": "11.14.1-32.647748",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
".npmrc"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@wavemaker/angular-app": "11.14.1-
|
|
18
|
+
"@wavemaker/angular-app": "11.14.1-32.647748",
|
|
19
19
|
"archiver": "^7.0.1",
|
|
20
20
|
"cheerio": "1.0.0-rc.12",
|
|
21
21
|
"decode-uri-component": "^0.2.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const cheerio=require("cheerio"),{writeFile:writeFile,readFileSync:readFileSync,readDir:readDir,isMobileProject:isMobileProject,isPrismProject:isPrismProject,APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH}=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/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"];if("string"==typeof e){let t=e.replace(/^(\.\/)/,"").replace(/\//g,"-").replace(/@/g,"");if(t=t.substring(0,t.lastIndexOf(".")),s.includes(e))return{input:e,inject:!1,bundleName:t}}return 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 r=a.options.scripts;const l=`${s+"/src/app/extensions"}`,u=await readDir(l);u.length&&i.push("./src/app/extensions/"+u[0]),a.options.scripts=[...t,...r,...i],await writeFile(n,JSON.stringify(o,null,4))},updateAngularJSON=async(e,s,t,i,n,o,a,r,l,u)=>{const c=`${s}/angular.json`;let p=readFileSync(c,!0);const d=p.projects["angular-app"].architect.build;a&&a.trim().length>0&&(d.configurations.production.deployUrl=a,d.configurations.development.deployUrl=a),d.configurations.production.outputPath=d.configurations.production.outputPath+"/"+global.randomHash,d.configurations.development.outputPath=d.configurations.development.outputPath+"/"+global.randomHash;let m=d.options.styles;if(isPrismProject(t)){const e=(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"))).findIndex(e=>"object"==typeof e&&e.input&&e.input.includes("app.css")),s="./node_modules/@wavemaker/foundation-css/foundation/foundation.css",t={input:`src/assets/${APP_OVERRIDE_CSS_PATH}`,inject:!1,bundleName:"wm-styles"};-1!==e?m.splice(e,0,s,t):m.push(s,t),d.options.styles=m}if(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`))});const g=d.options.assets,f=[],y=[{patterns:f,path:"angular/global"}];if("STATIC"===t.languageBundleSources)for(const e of Object.values(t.supportedLanguages))e.angular&&f.push(`${e.angular}.js`);y.forEach(({patterns:e=[],path:s})=>{let t="**/*";1==e.length?t=e[0]:e.length>1&&(t=`{${e.join(",")}}`),["libraries/locales","node_modules/@wavemaker/app-ng-runtime/locales"].forEach(e=>{(e=>{const s=g.find(s=>s.input===e.input&&s.output===e.output);s?s.glob=e.glob:g.push(e)})({glob:t,input:`${e}/${s}`,output:`/locales/${s}`})})}),d.options.assets=g,await setBuildCustomizations(p);const b=d.configurations.production,h=d.configurations.development;if(b.aot=!1!==r.aot,b.buildOptimizer=!1!==r.buildOptimizer,u){const e=d.options.assets;e.push("src/manifest.json"),e.push("src/wmsw-worker.js"),b.serviceWorker=h.serviceWorker=!0,b.ngswConfigPath=h.ngswConfigPath="ngsw-config.json",delete d.configurations.production.customWebpackConfig}await writeFile(c,JSON.stringify(p,null,4))};module.exports={updateAngularJSON:updateAngularJSON,addToScripts:addToScripts};
|
|
1
|
+
const cheerio=require("cheerio"),{writeFile:writeFile,readFileSync:readFileSync,readDir:readDir,isMobileProject:isMobileProject,isPrismProject:isPrismProject,APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH}=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/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"];if("string"==typeof e){let t=e.replace(/^(\.\/)/,"").replace(/\//g,"-").replace(/@/g,"");if(t=t.substring(0,t.lastIndexOf(".")),s.includes(e))return{input:e,inject:!1,bundleName:t}}return 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 r=a.options.scripts;const l=`${s+"/src/app/extensions"}`,u=await readDir(l);u.length&&i.push("./src/app/extensions/"+u[0]),a.options.scripts=[...t,...r,...i],await writeFile(n,JSON.stringify(o,null,4))},updateAngularJSON=async(e,s,t,i,n,o,a,r,l,u)=>{const c=`${s}/angular.json`;let p=readFileSync(c,!0);const d=p.projects["angular-app"].architect.build;a&&a.trim().length>0&&(d.configurations.production.deployUrl=a,d.configurations.development.deployUrl=a),d.configurations.production.outputPath=d.configurations.production.outputPath+"/"+global.randomHash,d.configurations.development.outputPath=d.configurations.development.outputPath+"/"+global.randomHash;let m=d.options.styles;if(isPrismProject(t)){const e=(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"))).findIndex(e=>"object"==typeof e&&e.input&&e.input.includes("app.css")),s="./node_modules/@wavemaker/foundation-css/foundation/foundation.css",t={input:`src/assets/${APP_OVERRIDE_CSS_PATH}`,inject:!1,bundleName:"wm-styles"};-1!==e?m.splice(e,0,s,t):m.push(s,t),d.options.styles=m}if(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`))});const g=d.options.assets,f=[],y=[{patterns:f,path:"angular/global"}];if("STATIC"===t.languageBundleSources)for(const e of Object.values(t.supportedLanguages||{}))e.angular&&f.push(`${e.angular}.js`);y.forEach(({patterns:e=[],path:s})=>{let t="**/*";1==e.length?t=e[0]:e.length>1&&(t=`{${e.join(",")}}`),["libraries/locales","node_modules/@wavemaker/app-ng-runtime/locales"].forEach(e=>{(e=>{const s=g.find(s=>s.input===e.input&&s.output===e.output);s?s.glob=e.glob:g.push(e)})({glob:t,input:`${e}/${s}`,output:`/locales/${s}`})})}),d.options.assets=g,await setBuildCustomizations(p);const b=d.configurations.production,h=d.configurations.development;if(b.aot=!1!==r.aot,b.buildOptimizer=!1!==r.buildOptimizer,u){const e=d.options.assets;e.push("src/manifest.json"),e.push("src/wmsw-worker.js"),b.serviceWorker=h.serviceWorker=!0,b.ngswConfigPath=h.ngswConfigPath="ngsw-config.json",delete d.configurations.production.customWebpackConfig}await writeFile(c,JSON.stringify(p,null,4))};module.exports={updateAngularJSON:updateAngularJSON,addToScripts:addToScripts};
|