@wavemaker/angular-codegen 11.12.1-rc.221 → 11.13.0-2.647474
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/angular.json +62 -95
- package/angular-app/build-scripts/index-html-transform-ng-serve.ts +20 -0
- package/angular-app/build-scripts/post-build.js +2 -2
- package/angular-app/dependency-report.html +1 -1
- package/angular-app/npm-shrinkwrap.json +1711 -1243
- package/angular-app/package-lock.json +1711 -1243
- package/angular-app/package.json +8 -9
- package/angular-app/proxy.conf.js +14 -0
- package/angular-app/src/assets/styles/css/font/summernote.eot +0 -0
- package/angular-app/src/assets/styles/css/font/summernote.ttf +0 -0
- package/angular-app/src/assets/styles/css/font/summernote.woff +0 -0
- package/angular-app/src/assets/styles/css/font/summernote.woff2 +0 -0
- package/angular-app/src/assets/styles/css/wm-style.css +1 -1
- package/dependencies/custom-widgets-bundle.cjs.js +43 -37
- package/dependencies/expression-parser.cjs.js +145 -89
- package/dependencies/pipe-provider.cjs.js +1448 -806
- package/dependencies/transpilation-web.cjs.js +748 -438
- package/npm-shrinkwrap.json +434 -347
- package/package-lock.json +434 -347
- package/package.json +2 -2
- package/src/gen-index-html.js +1 -1
- 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.
|
|
3
|
+
"version": "11.13.0-2.647474",
|
|
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.
|
|
18
|
+
"@wavemaker/angular-app": "11.13.0-2.647474",
|
|
19
19
|
"archiver": "^7.0.1",
|
|
20
20
|
"cheerio": "1.0.0-rc.12",
|
|
21
21
|
"decode-uri-component": "^0.2.0",
|
package/src/gen-index-html.js
CHANGED
|
@@ -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,n,s)=>{const o=await readFile(getIndexHtmlPath(e),"utf8"),a=cheerio.load(o);let c=[],l=[],m=!1,p=0,
|
|
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,n,s)=>{const o=await readFile(getIndexHtmlPath(e),"utf8"),a=cheerio.load(o);let c=[],l=[],m=!1,p=0,h=[];const d=["application/ld+json"];await createDir(r+"/resources/wm-inline",{recursive:!0}),a("script").each((e,r)=>{h.push(r)});for(const e of h){let t=a(e).attr("src");if(t)!m&&t.includes("wm-libs.min.js")&&(m=!0),isResourceJS(t)&&(m?l.push(t):c.push(t),a(e).remove());else if(!d.includes(a(e).attr("type"))){t=`resources/wm-inline/wm-inline-${++p}.js`;try{await writeFile(`${r}/${t}`,a(e).html()),m?l.push(t):c.push(t),a(e).remove()}catch(e){console.log(`WM-CODEGEN | Error in inline script generation | ${e}`)}}}await addToScripts(e,r,c,l),a('script[src$="/wm-loader.min.js"]').remove(),a('script[src$="/wm-libs.min.js"]').remove(),a('script[src$="/wm-loader.js"]').remove(),a('script[src$="/wm-libs.js"]').remove();const u=a('meta[name="description"]');u.attr("content")||u.attr("content","App built on wavemaker"),a('link[href$="/wm-style.css"]').remove(),a('link[href="print.css"]').remove(),a('link[theme="wmtheme"]').remove(),a('link[href$="wm-responsive.css"]').remove(),a('link[href^="themes"][href$="style.css"]').remove(),a('link[href="app.css"]').remove(),a('link[href$="foundation.css"]').remove(),a('link[href$="app.override.css"]').remove(),a("*").contents().each(function(){8===this.nodeType&&a(this).remove()});process.env.APPMETRICS_ENABLED,process.env.APPMETRICS_SERVER_URL;i?a('meta[name="cdnUrl"]').attr("content",i):a('meta[name="cdnUrl"]').remove(),s&&a("head").append('<meta name="apiUrl" content="'+s+'" />'),a('link[href^="favicon."]').attr("rel","icon"),n&&(a("head").append('<meta name="theme-color" content="#2c3049" />'),a("head").append('<link rel="manifest" href="manifest.json">'),a("head").append('<link rel="apple-touch-icon" href="ng-bundle/assets/icons/icon-192x192.png">')),await writeFile(`${r}/src/index.html`,prettier.format(a.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,APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH}=require("./wm-utils"),markScriptsAsLazy=
|
|
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)&&((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"))).push("./node_modules/@wavemaker/foundation-css/foundation/foundation.css"),m.push({input:`src/assets/${APP_OVERRIDE_CSS_PATH}`,inject:!1,bundleName:"wm-styles"}),d.options.styles=m),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 h=d.configurations.production,b=d.configurations.development;if(h.aot=!1!==r.aot,h.buildOptimizer=!1!==r.buildOptimizer,u){const e=d.options.assets;e.push("src/manifest.json"),e.push("src/wmsw-worker.js"),h.serviceWorker=b.serviceWorker=!0,h.ngswConfigPath=b.ngswConfigPath="ngsw-config.json",delete d.configurations.production.customWebpackConfig}await writeFile(c,JSON.stringify(p,null,4))};module.exports={updateAngularJSON:updateAngularJSON,addToScripts:addToScripts};
|