@wavemaker/angular-codegen 11.6.0-next.41251 → 11.6.0-next.41253

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.
@@ -29,6 +29,11 @@
29
29
  "assets": [
30
30
  "src/favicon.ico",
31
31
  "src/assets",
32
+ {
33
+ "glob": "print.css",
34
+ "input": "src/assets/",
35
+ "output": "."
36
+ },
32
37
  {
33
38
  "glob": "**/*",
34
39
  "input": "libraries/locales/",
@@ -187,7 +192,12 @@
187
192
  "tsConfig": "src/tsconfig.app.json",
188
193
  "assets": [
189
194
  "src/favicon.ico",
190
- "src/assets"
195
+ "src/assets",
196
+ {
197
+ "glob": "print.css",
198
+ "input": "src/assets/",
199
+ "output": "."
200
+ }
191
201
  ],
192
202
  "styles": [
193
203
  "src/styles.css",
@@ -0,0 +1,28 @@
1
+ const { spawnSync } = require('child_process');
2
+
3
+ const args = process.argv.slice(2);
4
+
5
+ const ngBuildArgs = ['build', ...args];
6
+ console.log("Build params - ", ngBuildArgs);
7
+
8
+ //Trigger angular build with the passed params
9
+ const ngBuildProcess = spawnSync('ng', ngBuildArgs, { stdio: 'inherit' });
10
+
11
+ if (ngBuildProcess.status === 0) {
12
+ console.log('ng build completed successfully!');
13
+ } else {
14
+ console.error('Error during ng build:', ngBuildProcess.error || ngBuildProcess.stderr);
15
+ process.exit(1);
16
+ }
17
+
18
+ const ngPostBuildArgs = ['build-scripts/post-build.js', ...args];
19
+ console.log("Post build params - ", ngPostBuildArgs);
20
+
21
+ const ngPostBuildProcess = spawnSync('node', ngPostBuildArgs, { stdio: 'inherit' });
22
+
23
+ if (ngPostBuildProcess.status === 0) {
24
+ console.log('ng post build completed successfully!');
25
+ } else {
26
+ console.error('Error during ng build:', ngPostBuildProcess.error || ngPostBuildProcess.stderr);
27
+ process.exit(1);
28
+ }
@@ -108,8 +108,10 @@ const addScriptForWMStylesPath = (wm_styles_path) => {
108
108
  );
109
109
  }
110
110
  }
111
+ }
112
+ const addPrintStylesPath = (print_styles_path) => {
111
113
  $("head").append(
112
- `<link rel="stylesheet" type="text/css" media="print" href="print.css"/>`
114
+ `<link rel="stylesheet" type="text/css" media="print" href="${print_styles_path}"/>`
113
115
  );
114
116
  }
115
117
 
@@ -289,6 +291,11 @@ const generateSha1 = (content) => {
289
291
  }
290
292
 
291
293
  addScriptForWMStylesPath(wm_styles_path);
294
+ addPrintStylesPath(`${deployUrl}/print.css`);
295
+
296
+ //this is required to download all the assets
297
+ $('head').append('<meta name="deployUrl" content="_cdnUrl_" />');
298
+
292
299
  const htmlContent = $.html();
293
300
  await writeFile(`./dist/index.html`, htmlContent);
294
301
 
@@ -36,7 +36,7 @@
36
36
  "@metrichor/jmespath": "^0.3.1",
37
37
  "@wavemaker/focus-trap": "^1.0.0",
38
38
  "@wavemaker/nvd3": "1.8.9",
39
- "@wavemaker/variables": "11.6.0-next.41251",
39
+ "@wavemaker/variables": "11.6.0-next.41253",
40
40
  "@ztree/ztree_v3": "^3.5.48",
41
41
  "angular-imask": "6.3.0",
42
42
  "angular2-websocket": "0.9.7",
@@ -5947,9 +5947,9 @@
5947
5947
  }
5948
5948
  },
5949
5949
  "node_modules/@wavemaker/variables": {
5950
- "version": "11.6.0-next.41251",
5951
- "resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-11.6.0-next.41251.tgz",
5952
- "integrity": "sha512-YrVGatqsQ10mQPaC825QCuo5lgmdWI/sgGhQQYpCL33b4OeECRawwN6MsOVypexBouIJzbrplgdKSwa7eoeUbA==",
5950
+ "version": "11.6.0-next.41253",
5951
+ "resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-11.6.0-next.41253.tgz",
5952
+ "integrity": "sha512-ElRsJ4AjKbCZsSwR25jA9FBp6nSs9qe3QcITW91ZtBUWZyaO3nNoke5hccKuvzAqE8RR40GeccuDHpR/aS4J6A==",
5953
5953
  "dependencies": {
5954
5954
  "@metrichor/jmespath": "^0.3.1",
5955
5955
  "he": "^1.2.0",
@@ -4,8 +4,8 @@
4
4
  "scripts": {
5
5
  "ng": "ng",
6
6
  "start": "./node_modules/.bin/ng serve",
7
- "build": "./node_modules/.bin/ng build",
8
- "postbuild": "node build-scripts/post-build.js",
7
+ "build": "node build-scripts/build.js",
8
+ "post-build": "node build-scripts/post-build.js",
9
9
  "test": "./node_modules/.bin/ng test",
10
10
  "test_components": "./node_modules/.bin/ng t @wm/components/base",
11
11
  "test_mobile": "./node_modules/.bin/ng t @wm/mobile/components/basic",
@@ -47,7 +47,7 @@
47
47
  "@metrichor/jmespath": "^0.3.1",
48
48
  "@wavemaker/focus-trap": "^1.0.0",
49
49
  "@wavemaker/nvd3": "1.8.9",
50
- "@wavemaker/variables": "11.6.0-next.41251",
50
+ "@wavemaker/variables": "11.6.0-next.41253",
51
51
  "@ztree/ztree_v3": "^3.5.48",
52
52
  "angular-imask": "6.3.0",
53
53
  "angular2-websocket": "0.9.7",
@@ -72,7 +72,7 @@
72
72
  "tslib": "2.4.1",
73
73
  "x2js": "^3.4.4",
74
74
  "zone.js": "~0.11.4",
75
- "@wavemaker/app-ng-runtime": "11.6.0-next.41251"
75
+ "@wavemaker/app-ng-runtime": "11.6.0-next.41253"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
@@ -0,0 +1,32 @@
1
+ body {margin:0; padding:0; line-height: 1.4em; word-spacing:1px; letter-spacing:0.2px; font: 13px Arial, Helvetica,"Lucida Grande", serif; color: #000;}
2
+
3
+ /*Header*/
4
+ h2 {color:#000; font-size:25px;}
5
+
6
+ /* Links */
7
+ a:link, a:visited {background: transparent; color:#333; text-decoration:none;}
8
+ a:link[href^="http://"]:after, a[href^="http://"]:visited:after {content: " (" attr(href) ") "; font-size: 11px;}
9
+ a[href^="http://"] {color:#000;}
10
+
11
+ /*Image*/
12
+ img, img a, .more-link a {border:none;}
13
+
14
+ /*Remove Element*/
15
+ .app-header, .app-top-nav, .app-footer, .app-left-panel, .app-right-panel {display: none !important;}
16
+
17
+ /*Remove Form Controls*/
18
+ .app-checkboxset, .app-button, .app-button-group, .app-menu, .app-composite-widget,
19
+ .form-group, .form-control,
20
+ .app-fileupload, .app-grid .table-footer
21
+ {display: none !important;}
22
+
23
+ /*Show all of the grid data*/
24
+ .app-grid .app-datagrid .app-datagrid-cell {
25
+ overflow: visible;
26
+ word-wrap: break-word;
27
+ }
28
+
29
+ /*Show Grid record data*/
30
+ .app-grid-layout .form-group {
31
+ display: block !important;
32
+ }
@@ -62,7 +62,7 @@ const buildAngularApp = (args) => {
62
62
  let ngBuildParams = updateDeployUrl(args.ngBuildParams);
63
63
  const NG_BUILD_MSG = 'NG BUILD MIGHT HAVE FAILED WITH HEAP OUT OF MEMORY, RE-EXECUTE THE BUILD BY INCREASING THE MAX-OLD-SPACE-SIZE ARGUMENT VALUE FOR BUILD.UI.NODE.ARGS PROPERTY IN DEPLOYMENT PROFILE';
64
64
  // Generating the angular build and post build process.
65
- executeSyncCmd('cd ' + args.appTarget + ' && node ' + args.nodeVMArgs + ' ./node_modules/@angular/cli/bin/ng build ' + ngBuildParams + ' && node build-scripts/post-build.js', null, MSG_NG_RUNTIME_LOG, false, NG_BUILD_MSG);
65
+ executeSyncCmd('cd ' + args.appTarget + ' && NODE_OPTIONS=' + args.nodeVMArgs.trim() + ' npm run build -- ' + ngBuildParams , null, MSG_NG_RUNTIME_LOG, false, NG_BUILD_MSG);
66
66
  }
67
67
 
68
68
 
@@ -32,6 +32,7 @@ const downloadNPMPackage = (packageInfo) => {
32
32
  const HOME_DIR = os.homedir();
33
33
  const PATH_NPM_PACKAGE = (packageInfo.baseDir || HOME_DIR + '/.wm/node_modules/') + packageInfo.name + '/' + packageInfo.version;
34
34
  const PATH_NPM_PACKAGE_SUCCESS = PATH_NPM_PACKAGE + '/.SUCCESS';
35
+ let isError = false;
35
36
 
36
37
  // To check global app runtime node modules.
37
38
  if (!isNPMPackageExist(PATH_NPM_PACKAGE_SUCCESS, packageInfo.successMsg)) {
@@ -44,10 +45,16 @@ const downloadNPMPackage = (packageInfo) => {
44
45
  }
45
46
 
46
47
  executeSyncCmd('cd ' + PATH_NPM_PACKAGE + ' && ' + npmInstallCMD, (errMsg) => {
48
+ isError = true;
47
49
  console.log(packageInfo.infoMsg + ' Something wrong with npm installation ', errMsg);
48
50
  }, packageInfo.infoMsg);
49
51
 
50
- fs.writeFileSync(PATH_NPM_PACKAGE_SUCCESS, packageInfo.successMsg);
52
+ //only create a .SUCCESS file when there is no error
53
+ if(!isError) {
54
+ isError = false;
55
+ fs.writeFileSync(PATH_NPM_PACKAGE_SUCCESS, packageInfo.successMsg);
56
+ }
57
+
51
58
  } else {
52
59
  console.log(packageInfo.infoMsg + ' Node packages already installed!');
53
60
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.6.0-next.41251",
3
+ "version": "11.6.0-next.41253",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {