@wavemaker/angular-codegen 12.0.0-next.45752 → 12.0.0-next.47809
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.
- {angular-codegen → package}/angular-app/angular.json +52 -19
- {angular-codegen → package}/angular-app/build-scripts/build.js +1 -0
- {angular-codegen → package}/angular-app/build-scripts/post-build.js +16 -110
- package/angular-app/dependency-report.html +124 -0
- package/angular-app/generate-dependency-report.js +240 -0
- package/angular-app/npm-shrinkwrap.json +25765 -0
- {angular-codegen → package}/angular-app/package-lock.json +13848 -9419
- {angular-codegen → package}/angular-app/package.json +61 -45
- package/angular-app/src/app/lazy-load-scripts.resolve.ts +13 -0
- package/angular-app/src/assets/styles/css/wm-style.css +1 -0
- package/angular-app/src/framework/services/customwidget-config-provider.service.ts +13 -0
- package/angular-app/src/framework/util/page-util.ts +7 -0
- {angular-codegen → package}/angular-app/src/index.html +1 -1
- package/angular-app/src/main.ts +61 -0
- {angular-codegen → package}/angular-app/src/setup-jest.js +4 -1
- angular-codegen/angular-app/tsconfig.web-app.json → package/angular-app/tsconfig.json +15 -23
- package/angular-app/tsconfig.web-app.json +81 -0
- {angular-codegen → package}/angular-app/wm-custom-webpack.config.js +18 -0
- package/build-angular-app.js +501 -0
- package/dependencies/app.component.html +40 -0
- package/dependencies/custom-widgets-bundle.cjs.js +415 -0
- {angular-codegen → package}/dependencies/expression-parser.cjs.js +13920 -17378
- {angular-codegen → package}/dependencies/pipe-provider.cjs.js +60097 -46994
- {angular-codegen → package}/dependencies/transpilation-web.cjs.js +31302 -24536
- package/download-packages.js +149 -0
- {angular-codegen → package}/generate-angular-app.js +3 -1
- package/npm-shrinkwrap.json +8121 -0
- package/package-lock.json +8121 -0
- {angular-codegen → package}/package.json +10 -4
- package/src/codegen-args-cli.js +1 -0
- package/src/codegen-cli.js +1 -0
- package/src/codegen.js +1 -0
- package/src/copy-utils.js +1 -0
- package/src/eslintrc_config.js +1 -0
- package/src/gen-app-codegen-module.js +1 -0
- package/src/gen-app-override-css.js +1 -0
- package/src/gen-app-routes.js +1 -0
- package/src/gen-app-skeleton.js +1 -0
- package/src/gen-components.js +1 -0
- package/src/gen-customwidget-config.js +1 -0
- package/src/gen-index-html.js +1 -0
- package/src/gen-layouts.js +1 -0
- package/src/handlebar-helpers.js +1 -0
- package/src/pages-util.js +1 -0
- package/src/project-meta.js +1 -0
- package/src/update-angular-json.js +1 -0
- package/src/wm-utils.js +1 -0
- {angular-codegen → package}/templates/app-routes.ts.hbs +2 -2
- package/templates/app.config.ts.hbs +128 -0
- {angular-codegen → package}/templates/app.module.ts.hbs +5 -3
- package/templates/component.config.ts.hbs +1 -0
- package/templates/customwidget/customwidget-config.ts.hbs +6 -0
- package/templates/customwidget/customwidget.component.script.js.hbs +3 -0
- package/templates/customwidget/customwidget.component.ts.hbs +43 -0
- {angular-codegen → package}/templates/layout/layout.component.ts.hbs +26 -4
- package/templates/page/page.component.ts.hbs +76 -0
- {angular-codegen → package}/templates/page/page.module.ts.hbs +12 -1
- angular-codegen/angular-app/src/app/lazy-load-scripts.resolve.ts +0 -20
- angular-codegen/angular-app/src/assets/styles/css/wm-style.css +0 -1
- angular-codegen/angular-app/src/framework/util/page-util.ts +0 -5
- angular-codegen/angular-app/src/main.ts +0 -30
- angular-codegen/angular-app/tsconfig.json +0 -131
- angular-codegen/build-angular-app.js +0 -79
- angular-codegen/dependencies/app.component.html +0 -28
- angular-codegen/dependencies/transpilation-mobile.cjs.js +0 -94054
- angular-codegen/download-packages.js +0 -69
- angular-codegen/package-lock.json +0 -5746
- angular-codegen/src/codegen-args-cli.js +0 -1
- angular-codegen/src/codegen-cli.js +0 -1
- angular-codegen/src/codegen.js +0 -1
- angular-codegen/src/gen-app-codegen-module.js +0 -1
- angular-codegen/src/gen-app-routes.js +0 -1
- angular-codegen/src/gen-app-skeleton.js +0 -1
- angular-codegen/src/gen-components.js +0 -1
- angular-codegen/src/gen-index-html.js +0 -1
- angular-codegen/src/gen-layouts.js +0 -1
- angular-codegen/src/handlebar-helpers.js +0 -1
- angular-codegen/src/pages-util.js +0 -1
- angular-codegen/src/project-meta.js +0 -1
- angular-codegen/src/update-angular-json.js +0 -1
- angular-codegen/src/wm-utils.js +0 -1
- angular-codegen/templates/page/page.component.ts.hbs +0 -45
- {angular-codegen → package}/.npmrc +0 -0
- {angular-codegen → package}/angular-app/.npmrc +0 -0
- {angular-codegen → package}/angular-app/build-scripts/index-html-transform.js +0 -0
- {angular-codegen → package}/angular-app/build-scripts/optimize-css.gulpfile.js +0 -0
- {angular-codegen → package}/angular-app/build-scripts/update-version.js +0 -0
- {angular-codegen → package}/angular-app/src/.browserslistrc +0 -0
- {angular-codegen → package}/angular-app/src/app/app-codegen.module.ts +0 -0
- {angular-codegen → package}/angular-app/src/app/app.component.css +0 -0
- {angular-codegen → package}/angular-app/src/app/app.component.script.js +0 -0
- {angular-codegen → package}/angular-app/src/app/app.component.variables.ts +0 -0
- {angular-codegen → package}/angular-app/src/app/app.routes.ts +0 -0
- {angular-codegen → package}/angular-app/src/app/prefabs/prefab-config.js +0 -0
- {angular-codegen → package}/angular-app/src/app/wm-project-properties.ts +0 -0
- {angular-codegen → package}/angular-app/src/assets/.gitkeep +0 -0
- {angular-codegen → package}/angular-app/src/assets/print.css +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/bootstrap.css.map +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/font/summernote.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/font/summernote.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/font/summernote.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_222222_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_2e83ff_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_444444_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_454545_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_555555_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_777620_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_777777_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_888888_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_cc0000_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_cd0a0a_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_ffffff_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/wm-responsive.css +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/FontAwesome.otf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.svg +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.woff2 +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.svg +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.woff2 +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wavicon.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wavicon.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wavicon.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/live-sync-icon.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/live-sync-touch-icon.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/loader.gif +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/spinner-small.gif +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/ui-icons.png +0 -0
- {angular-codegen → package}/angular-app/src/environments/environment.dev.ts +0 -0
- {angular-codegen → package}/angular-app/src/environments/environment.prod.ts +0 -0
- {angular-codegen → package}/angular-app/src/environments/environment.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/angular1.polyfills.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/app-extension.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/app-js-provider.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/app-variables-provider.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/component-ref-provider.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/lazy-component-ref-provider.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/prefab-config-provider.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/util/lazy-module-routes.ts +0 -0
- {angular-codegen → package}/angular-app/src/polyfills.ts +0 -0
- {angular-codegen → package}/angular-app/src/styles.css +0 -0
- {angular-codegen → package}/angular-app/src/tsconfig.app.json +0 -0
- {angular-codegen → package}/angular-app/src/tslint.json +0 -0
- {angular-codegen → package}/build-util.js +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-128x128.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-144x144.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-152x152.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-192x192.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-384x384.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-512x512.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-72x72.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-96x96.png +0 -0
- {angular-codegen → package}/pwa-assets/manifest.json +0 -0
- {angular-codegen → package}/pwa-assets/ngsw-config.json +0 -0
- {angular-codegen → package}/pwa-assets/wmsw-worker.js +0 -0
- {angular-codegen → package}/src/expr-parser-utils.js +0 -0
- {angular-codegen → package}/src/gen-app-js.js +0 -0
- {angular-codegen → package}/src/gen-app-prefabs-module.js +0 -0
- {angular-codegen → package}/src/gen-app-variables.js +0 -0
- {angular-codegen → package}/src/gen-lazy-module-routes.js +0 -0
- {angular-codegen → package}/src/gen-prefabs.js +0 -0
- {angular-codegen → package}/src/gen-pwa-files.js +0 -0
- {angular-codegen → package}/src/gen-tsconfig.js +0 -0
- {angular-codegen → package}/src/gen-wm-project-properties.js +0 -0
- {angular-codegen → package}/templates/app-codegen.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/app-prefabs.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/app.component.script.js.hbs +0 -0
- {angular-codegen → package}/templates/component.expressions.ts.hbs +0 -0
- {angular-codegen → package}/templates/component.variables.ts.hbs +0 -0
- {angular-codegen → package}/templates/expr-vs-fn.hbs +0 -0
- {angular-codegen → package}/templates/layout/layout.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/lazy-module-routes.ts.hbs +0 -0
- {angular-codegen → package}/templates/page/page.component.script.js.hbs +0 -0
- {angular-codegen → package}/templates/partial/partial.component.script.js.hbs +0 -0
- {angular-codegen → package}/templates/partial/partial.component.ts.hbs +0 -0
- {angular-codegen → package}/templates/partial/partial.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/prefab/prefab-config.ts.hbs +0 -0
- {angular-codegen → package}/templates/prefab/prefab.component.script.js.hbs +0 -0
- {angular-codegen → package}/templates/prefab/prefab.component.ts.hbs +0 -0
- {angular-codegen → package}/templates/prefab/prefab.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/wm-project-properties.ts.hbs +0 -0
@@ -21,28 +21,37 @@
|
|
21
21
|
"outputPath": "dist/ng-bundle",
|
22
22
|
"index": {
|
23
23
|
"input": "src/index.html",
|
24
|
-
"output": "
|
24
|
+
"output": "../../index.html"
|
25
25
|
},
|
26
26
|
"main": "src/main.ts",
|
27
27
|
"polyfills": "src/polyfills.ts",
|
28
28
|
"tsConfig": "src/tsconfig.app.json",
|
29
29
|
"assets": [
|
30
30
|
"src/favicon.ico",
|
31
|
+
"src/favicon.png",
|
31
32
|
"src/assets",
|
32
33
|
{
|
33
|
-
"glob": "
|
34
|
-
"input": "
|
35
|
-
"output": "
|
34
|
+
"glob": "**/*",
|
35
|
+
"input": "libraries/locales/moment-timezone",
|
36
|
+
"output": "/locales/moment-timezone"
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"glob": "**/*",
|
40
|
+
"input": "node_modules/@wavemaker/app-ng-runtime/locales/moment-timezone",
|
41
|
+
"output": "/locales/moment-timezone"
|
36
42
|
},
|
37
43
|
{
|
38
44
|
"glob": "**/*",
|
39
|
-
"input": "
|
40
|
-
"output": "/
|
45
|
+
"input": "src/servicedefs",
|
46
|
+
"output": "/servicedefs/"
|
41
47
|
},
|
42
48
|
{
|
43
49
|
"glob": "**/*",
|
44
|
-
"input": "
|
45
|
-
"output": "/
|
50
|
+
"input": "resources",
|
51
|
+
"output": "/resources/",
|
52
|
+
"ignore": [
|
53
|
+
"**/*.txt"
|
54
|
+
]
|
46
55
|
}
|
47
56
|
],
|
48
57
|
"styles": [
|
@@ -58,12 +67,18 @@
|
|
58
67
|
"input": "src/assets/app.css",
|
59
68
|
"inject": false,
|
60
69
|
"bundleName": "wm-styles"
|
70
|
+
},
|
71
|
+
{
|
72
|
+
"input": "src/assets/print.css",
|
73
|
+
"inject": false,
|
74
|
+
"bundleName": "print"
|
61
75
|
}
|
62
76
|
],
|
63
77
|
"scripts": [
|
64
78
|
"./node_modules/d3/dist/d3.min.js",
|
65
79
|
"./node_modules/@wavemaker/nvd3/build/nv.d3.min.js",
|
66
80
|
"./node_modules/jquery/dist/jquery.min.js",
|
81
|
+
"./node_modules/lodash/lodash.min.js",
|
67
82
|
"./node_modules/jquery-ui/ui/disable-selection.js",
|
68
83
|
"./node_modules/jquery-ui/ui/version.js",
|
69
84
|
"./node_modules/jquery-ui/ui/widget.js",
|
@@ -78,9 +93,6 @@
|
|
78
93
|
"./node_modules/@wavemaker/app-ng-runtime/scripts/datatable/datatable.js",
|
79
94
|
"./node_modules/@wavemaker/app-ng-runtime/scripts/swipey/swipey.jquery.plugin.js",
|
80
95
|
"./node_modules/@wavemaker/app-ng-runtime/scripts/jquery.ui.touch-punch/jquery.ui.touch-punch.min.js",
|
81
|
-
"./node_modules/moment/min/moment.min.js",
|
82
|
-
"./node_modules/moment-timezone/builds/moment-timezone.min.js",
|
83
|
-
"./node_modules/fullcalendar/main.min.js",
|
84
96
|
"./node_modules/summernote/dist/summernote-lite.min.js",
|
85
97
|
"./node_modules/hammerjs/hammer.min.js",
|
86
98
|
"./node_modules/iscroll/build/iscroll.js",
|
@@ -187,20 +199,32 @@
|
|
187
199
|
"tsConfig": "src/tsconfig.app.json",
|
188
200
|
"assets": [
|
189
201
|
"src/favicon.ico",
|
202
|
+
"src/favicon.png",
|
190
203
|
"src/assets",
|
191
204
|
{
|
192
|
-
"glob": "
|
193
|
-
"input": "src/
|
194
|
-
"output": "
|
205
|
+
"glob": "**/*",
|
206
|
+
"input": "src/servicedefs",
|
207
|
+
"output": "/servicedefs/"
|
208
|
+
},
|
209
|
+
{
|
210
|
+
"glob": "**/*",
|
211
|
+
"input": "src/resources",
|
212
|
+
"output": "/resources/"
|
195
213
|
}
|
196
214
|
],
|
197
215
|
"styles": [
|
198
216
|
"src/styles.css",
|
199
217
|
"src/assets/styles/css/wm-style.css",
|
200
218
|
"src/assets/themes/material/style.css",
|
201
|
-
"src/assets/app.css"
|
219
|
+
"src/assets/app.css",
|
220
|
+
{
|
221
|
+
"input": "src/assets/print.css",
|
222
|
+
"inject": false,
|
223
|
+
"bundleName": "print"
|
224
|
+
}
|
202
225
|
],
|
203
226
|
"scripts": [
|
227
|
+
"./node_modules/x2js/x2js.js",
|
204
228
|
"./node_modules/d3/dist/d3.min.js",
|
205
229
|
"./node_modules/@wavemaker/nvd3/build/nv.d3.min.js",
|
206
230
|
"./node_modules/jquery/dist/jquery.min.js",
|
@@ -215,9 +239,6 @@
|
|
215
239
|
"./node_modules/jquery-ui/ui/widgets/sortable.js",
|
216
240
|
"./node_modules/jquery-ui/ui/widgets/droppable.js",
|
217
241
|
"./libraries/scripts/datatable/datatable.js",
|
218
|
-
"./node_modules/moment/min/moment.min.js",
|
219
|
-
"./node_modules/moment-timezone/builds/moment-timezone.min.js",
|
220
|
-
"./node_modules/fullcalendar/main.min.js",
|
221
242
|
"./node_modules/summernote/dist/summernote-lite.min.js",
|
222
243
|
"./node_modules/hammerjs/hammer.min.js",
|
223
244
|
"./node_modules/iscroll/build/iscroll.js",
|
@@ -257,11 +278,23 @@
|
|
257
278
|
"options": {
|
258
279
|
"buildTarget": "angular-app:build"
|
259
280
|
}
|
281
|
+
},
|
282
|
+
"lint": {
|
283
|
+
"builder": "@angular-eslint/builder:lint",
|
284
|
+
"options": {
|
285
|
+
"lintFilePatterns": [
|
286
|
+
"src/**/*.ts",
|
287
|
+
"src/**/*.html"
|
288
|
+
]
|
289
|
+
}
|
260
290
|
}
|
261
291
|
}
|
262
292
|
}
|
263
293
|
},
|
264
294
|
"cli": {
|
265
|
-
"analytics": "fe5e8f46-2dff-4044-b3b8-8a1307278ce6"
|
295
|
+
"analytics": "fe5e8f46-2dff-4044-b3b8-8a1307278ce6",
|
296
|
+
"schematicCollections": [
|
297
|
+
"@angular-eslint/schematics"
|
298
|
+
]
|
266
299
|
}
|
267
300
|
}
|
@@ -6,6 +6,7 @@ if (processArgs.findIndex(arg => arg.startsWith('--max-old-space-size')) !== -1)
|
|
6
6
|
process.env.NODE_OPTIONS = processArgs.pop();
|
7
7
|
console.log("Setting node options: ", process.env.NODE_OPTIONS);
|
8
8
|
}
|
9
|
+
|
9
10
|
const args = processArgs.slice(2);
|
10
11
|
const ngBuildArgs = ['build', ...args];
|
11
12
|
console.log("\x1b[33m", "Angular build params: ", ngBuildArgs);
|
@@ -6,94 +6,11 @@ const copyFile = util.promisify(fs.copyFile);
|
|
6
6
|
const exec = util.promisify(require('child_process').exec);
|
7
7
|
const cheerio = require(`cheerio`);
|
8
8
|
const crypto = require(`crypto`);
|
9
|
-
|
10
|
-
const copyCssFiles = (hash, updatedFilenames) => {
|
11
|
-
const filename = 'wm-styles.css';
|
12
|
-
const updatedFilename = `wm-styles.${hash}.css`
|
13
|
-
copyFile(`${opPath}/${filename}`, `${opPath}/${updatedFilename}`);
|
14
|
-
updatedFilenames[filename] = updatedFilename;
|
15
|
-
// copyFile(`${opPath}/wm-styles.br.css`,`${opPath}/wm-styles.${hash}.br.css`);
|
16
|
-
// copyFile(`${opPath}/wm-styles.gzip.css`,`${opPath}/wm-styles.${hash}.gzip.css`);
|
17
|
-
};
|
18
|
-
const copyMobileCssFiles = (hash, fileName) => {
|
19
|
-
// const name = filePath.split('.css')[0];
|
20
|
-
copyFile(`${opPath}/${fileName}.css`, `${opPath}/${fileName}.${hash}.css`);
|
21
|
-
// copyFile(`${opPath}/wm-styles.br.css`,`${opPath}/wm-styles.${hash}.br.css`);
|
22
|
-
// copyFile(`${opPath}/wm-styles.gzip.css`,`${opPath}/wm-styles.${hash}.gzip.css`);
|
23
|
-
};
|
24
|
-
const generateHash = async (filepath) => {
|
25
|
-
const cssContent = await readFile(filepath);
|
26
|
-
let hash = crypto.createHash('md5');
|
27
|
-
hash.update(cssContent);
|
28
|
-
return hash.digest('hex');
|
29
|
-
};
|
30
|
-
const generateHashForScripts = (updatedFilenames) => {
|
31
|
-
//from angular 12(IVY), scripts array in angular json, doesn't allow `@` symbol in the name/value
|
32
|
-
//so removed `@` from wavemaker.com in the file name and adding it back in the post-build.js file
|
33
|
-
const scriptsMap = {};
|
34
|
-
return new Promise(resolve => {
|
35
|
-
fs.readdir(opPath, (err, items) => {
|
36
|
-
const promises = items.map(i => {
|
37
|
-
const nohashIndex = i.indexOf('-NOHASH.js');
|
38
|
-
if (nohashIndex > 0) {
|
39
|
-
const key = i.substring(0, nohashIndex);
|
40
|
-
return generateHash(`${opPath}/${i}`).then(hash => {
|
41
|
-
const filename = `${key}-NOHASH.js`;
|
42
|
-
const updatedFilename = `${key}.${hash}.js`
|
43
|
-
scriptsMap[`${key}.js`] = updatedFilename;
|
44
|
-
updatedFilenames[filename] = updatedFilename;
|
45
|
-
return Promise.all([
|
46
|
-
copyFile(`${opPath}/${filename}`, `${opPath}/${updatedFilename}`),
|
47
|
-
// copyFile(`${opPath}/${key}-NOHASH.br.js`, `${opPath}/${key}.${hash}.br.js`),
|
48
|
-
// copyFile(`${opPath}/${key}-NOHASH.gzip.js`, `${opPath}/${key}.${hash}.gzip.js`)
|
49
|
-
]);
|
50
|
-
});
|
51
|
-
}
|
52
|
-
});
|
53
|
-
Promise.all(promises).then(() => {
|
54
|
-
return writeFile(`${opPath}/path_mapping.json`, JSON.stringify(scriptsMap, null, 2));
|
55
|
-
}).then(resolve);
|
56
|
-
});
|
57
|
-
});
|
58
|
-
};
|
59
|
-
let isMobileProject = false;
|
9
|
+
|
60
10
|
let isProdBuild;
|
61
11
|
let isDevBuild;
|
62
12
|
let $;
|
63
13
|
|
64
|
-
const setMobileProjectType = (angularJson) => {
|
65
|
-
let styles = angularJson['projects']['angular-app']['architect']['build']['options']['styles'];
|
66
|
-
const androidStyles = styles.find((style) => {
|
67
|
-
let isObject = typeof (style) === 'object';
|
68
|
-
if (isObject) {
|
69
|
-
return style.bundleName === 'wm-android-styles';
|
70
|
-
}
|
71
|
-
return false;
|
72
|
-
});
|
73
|
-
isMobileProject = androidStyles ? true : false;
|
74
|
-
return isMobileProject;
|
75
|
-
}
|
76
|
-
const addMobileSpecificStyles = async (deployUrl) => {
|
77
|
-
if (isDevBuild) {
|
78
|
-
$("body").append(
|
79
|
-
`<script type="text/javascript" defer="true" src="${deployUrl}wm-android-styles.js"></script>`
|
80
|
-
);
|
81
|
-
}
|
82
|
-
|
83
|
-
if (isProdBuild) {
|
84
|
-
let hash = await generateHash(`${opPath}/wm-android-styles.css`);
|
85
|
-
copyMobileCssFiles(hash, 'wm-android-styles');
|
86
|
-
$("head").append(
|
87
|
-
`<link rel="stylesheet" theme="wmtheme" href="${deployUrl}wm-android-styles.${hash}.css" >`
|
88
|
-
);
|
89
|
-
hash = await generateHash(`${opPath}/wm-ios-styles.css`);
|
90
|
-
copyMobileCssFiles(hash, 'wm-ios-styles');
|
91
|
-
$("head").append(
|
92
|
-
`<link rel="stylesheet" theme="wmtheme" href="${deployUrl}wm-ios-styles.${hash}.css" >`
|
93
|
-
);
|
94
|
-
}
|
95
|
-
}
|
96
|
-
|
97
14
|
const addScriptForWMStylesPath = (wm_styles_path) => {
|
98
15
|
// wm_styles_path will not be present for mobile apps
|
99
16
|
if (wm_styles_path) {
|
@@ -201,10 +118,10 @@ const updatePwaAssets = (deployUrl, updatedFileNames, updatedFileHashes) => {
|
|
201
118
|
deployUrl = deployUrl === "_cdnUrl_" ? 'ng-bundle/' : deployUrl;
|
202
119
|
|
203
120
|
// copy service worker and its config to root directory
|
204
|
-
fs.copyFileSync(
|
205
|
-
fs.copyFileSync(
|
206
|
-
fs.copyFileSync(
|
207
|
-
fs.copyFileSync(
|
121
|
+
fs.copyFileSync(`./dist/ng-bundle/${global.randomHash}/ngsw-worker.js`, './dist/ngsw-worker.js');
|
122
|
+
fs.copyFileSync(`./dist/ng-bundle/${global.randomHash}/wmsw-worker.js`, './dist/wmsw-worker.js');
|
123
|
+
fs.copyFileSync(`./dist/ng-bundle/${global.randomHash}/ngsw.json`, ngswPath);
|
124
|
+
fs.copyFileSync(`./dist/ng-bundle/${global.randomHash}/manifest.json`, manifestPath);
|
208
125
|
|
209
126
|
// update the icons url in manifest.json
|
210
127
|
const manifest = JSON.parse(fs.readFileSync(manifestPath).toString());
|
@@ -248,17 +165,12 @@ const generateSha1 = (content) => {
|
|
248
165
|
const angularJson = require(`${process.cwd()}/angular.json`);
|
249
166
|
const build = angularJson['projects']['angular-app']['architect']['build'];
|
250
167
|
let deployUrl = args['deploy-url'] || build['options']['deployUrl'];
|
251
|
-
|
168
|
+
global.randomHash = deployUrl.split('/')[1];
|
169
|
+
let outputPath = global.opPath = args['output-path'] || build['options']['outputPath']
|
252
170
|
const contents = await readFile(`./dist/index.html`, `utf8`);
|
253
171
|
$ = cheerio.load(contents);
|
254
|
-
|
255
|
-
|
256
|
-
isProdBuild = fs.existsSync(`${process.cwd()}/dist/ng-bundle/wm-styles.css`);
|
257
|
-
isDevBuild = fs.existsSync(`${process.cwd()}/dist/ng-bundle/wm-styles.js`);
|
258
|
-
} else {
|
259
|
-
isDevBuild = fs.existsSync(`${process.cwd()}/dist/ng-bundle/wm-android-styles.js`);
|
260
|
-
isProdBuild = fs.existsSync(`${process.cwd()}/dist/ng-bundle/wm-android-styles.css`);
|
261
|
-
}
|
172
|
+
isProdBuild = fs.existsSync(`${process.cwd()}/${outputPath}/wm-styles.css`);
|
173
|
+
isDevBuild = fs.existsSync(`${process.cwd()}/${outputPath}/wm-styles.js`);
|
262
174
|
|
263
175
|
if (isProdBuild) {
|
264
176
|
const isOptimizeCss = $('meta[optimizecss]').length;
|
@@ -275,18 +187,12 @@ const generateSha1 = (content) => {
|
|
275
187
|
const updatedFileHashes = {}
|
276
188
|
let wm_styles_path;
|
277
189
|
|
278
|
-
if (
|
279
|
-
|
190
|
+
if (isDevBuild) {
|
191
|
+
wm_styles_path = `${deployUrl}wm-styles.js`;
|
280
192
|
} else {
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
const fileName = 'wm-styles';
|
285
|
-
const hash = await generateHash(`${opPath}/${fileName}.css`);
|
286
|
-
copyCssFiles(hash, updatedFilenames);
|
287
|
-
const updatedFileName = `${fileName}.${hash}.css`
|
288
|
-
wm_styles_path = `${deployUrl}${updatedFileName}`;
|
289
|
-
}
|
193
|
+
const fileName = 'wm-styles';
|
194
|
+
const updatedFileName = `${fileName}.css`
|
195
|
+
wm_styles_path = `${deployUrl}${updatedFileName}`;
|
290
196
|
}
|
291
197
|
|
292
198
|
addScriptForWMStylesPath(wm_styles_path);
|
@@ -294,12 +200,12 @@ const generateSha1 = (content) => {
|
|
294
200
|
|
295
201
|
//this is required to download all the assets
|
296
202
|
$('head').append(`<meta name="deployUrl" content=${deployUrl} />`);
|
203
|
+
$('script[src$="services/application/wmProperties.js"]').remove();
|
204
|
+
$('link[href$="favicon.png"]').attr('href', `${deployUrl}favicon.png`);
|
297
205
|
|
298
206
|
const htmlContent = $.html();
|
299
207
|
await writeFile(`./dist/index.html`, htmlContent);
|
300
208
|
|
301
|
-
await generateHashForScripts(updatedFilenames);
|
302
|
-
|
303
209
|
if (serviceWorkerEnabled) {
|
304
210
|
// re-generate hash for index.html since its been modified
|
305
211
|
updatedFileHashes['index.html'] = generateSha1(htmlContent);
|
@@ -0,0 +1,124 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE html>
|
3
|
+
<html lang="en">
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<title>Angular Dependencies Report</title>
|
8
|
+
<style>
|
9
|
+
body {
|
10
|
+
font-family: Arial, sans-serif;
|
11
|
+
line-height: 1.6;
|
12
|
+
margin: 0;
|
13
|
+
padding: 20px;
|
14
|
+
color: #333;
|
15
|
+
}
|
16
|
+
.header {
|
17
|
+
background: #f4f4f4;
|
18
|
+
padding: 20px;
|
19
|
+
margin-bottom: 20px;
|
20
|
+
border-radius: 4px;
|
21
|
+
}
|
22
|
+
.section {
|
23
|
+
margin-bottom: 30px;
|
24
|
+
}
|
25
|
+
table {
|
26
|
+
width: 100%;
|
27
|
+
border-collapse: collapse;
|
28
|
+
margin-bottom: 20px;
|
29
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
|
30
|
+
}
|
31
|
+
th, td {
|
32
|
+
border: 1px solid #ddd;
|
33
|
+
padding: 12px;
|
34
|
+
text-align: left;
|
35
|
+
}
|
36
|
+
th {
|
37
|
+
background-color: #f8f8f8;
|
38
|
+
font-weight: bold;
|
39
|
+
}
|
40
|
+
tr:nth-child(even) {
|
41
|
+
background-color: #f9f9f9;
|
42
|
+
}
|
43
|
+
tr:hover {
|
44
|
+
background-color: #f5f5f5;
|
45
|
+
}
|
46
|
+
.dependency-type {
|
47
|
+
font-size: 1.2em;
|
48
|
+
color: #666;
|
49
|
+
font-weight: bold;
|
50
|
+
margin: 20px 0 10px;
|
51
|
+
padding-bottom: 5px;
|
52
|
+
border-bottom: 2px solid #eee;
|
53
|
+
}
|
54
|
+
.transitive {
|
55
|
+
margin-left: 20px;
|
56
|
+
border-left: 3px solid #eee;
|
57
|
+
padding-left: 20px;
|
58
|
+
}
|
59
|
+
.license-count {
|
60
|
+
font-weight: bold;
|
61
|
+
color: #2196F3;
|
62
|
+
}
|
63
|
+
.timestamp {
|
64
|
+
color: #666;
|
65
|
+
font-style: italic;
|
66
|
+
}
|
67
|
+
</style>
|
68
|
+
</head>
|
69
|
+
<body>
|
70
|
+
<div class="header">
|
71
|
+
<h1>Angular Project Dependencies Report</h1>
|
72
|
+
<p class="timestamp">Generated on: 8/12/2025, 1:22:29 PM</p>
|
73
|
+
</div>
|
74
|
+
|
75
|
+
<div class="section">
|
76
|
+
<h2>Project Dependencies Overview</h2>
|
77
|
+
|
78
|
+
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<div class="section">
|
82
|
+
<h2>Transitive Dependencies</h2>
|
83
|
+
|
84
|
+
<div class="dependency-type">Transitive Dependencies</div>
|
85
|
+
<table>
|
86
|
+
<tr>
|
87
|
+
<th>Package</th>
|
88
|
+
<th>Version</th>
|
89
|
+
<th>License</th>
|
90
|
+
<th>Repository</th>
|
91
|
+
</tr>
|
92
|
+
|
93
|
+
<tr>
|
94
|
+
<td></td>
|
95
|
+
<td>wavemaker/angular-app</td>
|
96
|
+
<td>UNKNOWN</td>
|
97
|
+
<td>N/A</td>
|
98
|
+
</tr>
|
99
|
+
|
100
|
+
</table>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<div class="section">
|
105
|
+
<h2>License Summary</h2>
|
106
|
+
|
107
|
+
<table>
|
108
|
+
<tr>
|
109
|
+
<th>License</th>
|
110
|
+
<th>Count</th>
|
111
|
+
<th>Packages</th>
|
112
|
+
</tr>
|
113
|
+
|
114
|
+
<tr>
|
115
|
+
<td>UNKNOWN</td>
|
116
|
+
<td class="license-count">1</td>
|
117
|
+
<td></td>
|
118
|
+
</tr>
|
119
|
+
|
120
|
+
</table>
|
121
|
+
|
122
|
+
</div>
|
123
|
+
</body>
|
124
|
+
</html>
|