@wavemaker/angular-codegen 11.7.0-next.24863 → 11.7.0-next.26327

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,18 +1,23 @@
1
1
  const { spawnSync } = require('child_process');
2
2
  const path = require('path');
3
3
 
4
- const args = process.argv.slice(2);
5
-
4
+ let processArgs = process.argv;
5
+ if (processArgs.findIndex(arg => arg.startsWith('--max-old-space-size')) !== -1) {
6
+ process.env.NODE_OPTIONS = processArgs.pop();
7
+ }
8
+ const args = processArgs.slice(2);
6
9
  const ngBuildArgs = ['build', ...args];
7
10
  console.log("Build params - ", ngBuildArgs);
11
+ console.log("Setting node options - ", process.env.NODE_OPTIONS);
8
12
 
9
13
  //Trigger angular build with the passed params
10
14
  const ngPath = path.resolve(process.cwd(), 'node_modules', '.bin', "ng");
11
- const ngBuildProcess = spawnSync(ngPath, ngBuildArgs, { stdio: 'inherit', shell: true });
15
+ const ngBuildProcess = spawnSync(ngPath, ngBuildArgs, {stdio: 'inherit', shell: true});
12
16
 
13
17
  if (ngBuildProcess.status === 0) {
14
18
  console.log('ng build completed successfully!');
15
19
  } else {
20
+ // TODO: JS heap out of memory error handling
16
21
  console.error('Error during ng build:', ngBuildProcess.error || ngBuildProcess.stderr);
17
22
  process.exit(1);
18
23
  }
@@ -35,8 +35,8 @@
35
35
  "@babel/runtime": "^7.14.8",
36
36
  "@metrichor/jmespath": "^0.3.1",
37
37
  "@wavemaker/focus-trap": "^1.0.0",
38
- "@wavemaker/nvd3": "1.8.9",
39
- "@wavemaker/variables": "11.7.0-next.24863",
38
+ "@wavemaker/nvd3": "1.8.10",
39
+ "@wavemaker/variables": "11.7.0-next.26327",
40
40
  "@ztree/ztree_v3": "^3.5.48",
41
41
  "angular-imask": "7.4.0",
42
42
  "angular2-websocket": "0.9.7",
@@ -5681,17 +5681,17 @@
5681
5681
  }
5682
5682
  },
5683
5683
  "node_modules/@wavemaker/nvd3": {
5684
- "version": "1.8.9",
5685
- "resolved": "https://registry.npmjs.org/@wavemaker/nvd3/-/nvd3-1.8.9.tgz",
5686
- "integrity": "sha512-J3uleu0akL+Kvw5j9EcP6JRRtkqHl3p1CBqKywiOYeR86+dao415i3V3xMbI8wHKAjIgf54mqIb9qR7M+74xjw==",
5684
+ "version": "1.8.10",
5685
+ "resolved": "https://registry.npmjs.org/@wavemaker/nvd3/-/nvd3-1.8.10.tgz",
5686
+ "integrity": "sha512-wZ7cXSNnTfL97afyKFYTOVu5xNUlrBPYtj89rTM5eSU9xSAxP6W0Z0zPWr233OfvfcmCt02E/OBgAg56lp4Bew==",
5687
5687
  "peerDependencies": {
5688
5688
  "d3": "7.8.5"
5689
5689
  }
5690
5690
  },
5691
5691
  "node_modules/@wavemaker/variables": {
5692
- "version": "11.7.0-next.24863",
5693
- "resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-11.7.0-next.24863.tgz",
5694
- "integrity": "sha512-HPHKzUaWFCIzTD0NTdzlMjIGdTJM06xxhdgdv+f4gLKZU1v8EadEx/DxRiuYGi1Lp4igAK+gAwaOu07sNU8YEA==",
5692
+ "version": "11.7.0-next.26327",
5693
+ "resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-11.7.0-next.26327.tgz",
5694
+ "integrity": "sha512-d9chZVGHIigWUmmpJYXYlK9teZiPWzRPHOuPOVOyBat0JYHxNOHjJo3ZKlV6Eu0qc8/j62Kp+tAaV3crs9yUaw==",
5695
5695
  "dependencies": {
5696
5696
  "@metrichor/jmespath": "^0.3.1",
5697
5697
  "he": "^1.2.0",
@@ -46,8 +46,8 @@
46
46
  "@babel/runtime": "^7.14.8",
47
47
  "@metrichor/jmespath": "^0.3.1",
48
48
  "@wavemaker/focus-trap": "^1.0.0",
49
- "@wavemaker/nvd3": "1.8.9",
50
- "@wavemaker/variables": "11.7.0-next.24863",
49
+ "@wavemaker/nvd3": "1.8.10",
50
+ "@wavemaker/variables": "11.7.0-next.26327",
51
51
  "@ztree/ztree_v3": "^3.5.48",
52
52
  "angular-imask": "7.4.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.13.3",
75
- "@wavemaker/app-ng-runtime": "11.7.0-next.24863"
75
+ "@wavemaker/app-ng-runtime": "11.7.0-next.26327"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
@@ -20,12 +20,13 @@ const { executeSyncCmd, MSG_NG_RUNTIME_LOG, MSG_NG_RUNTIME_SUCCESS } = require(
20
20
  /**
21
21
  * @TODO: This is a temporary workaround to extract deploy-url from 'ngBuildParams', need to be replaced in future.
22
22
  */
23
- const updateDeployUrl = (ngBuildParams) => {
24
- let buildArgs = ngBuildParams.split(' ');
23
+ const updateDeployUrl = (args) => {
24
+ let buildArgs = args.ngBuildParams.split(' ');
25
25
  const deployParam = buildArgs.find(i => i.startsWith("--deploy-url="));
26
26
  if(!deployParam) {
27
27
  buildArgs.push("--deploy-url=ng-bundle/");
28
28
  }
29
+ buildArgs.push(args.nodeVMArgs);
29
30
  return ngBuildParams = buildArgs.join(" ");
30
31
  };
31
32
 
@@ -59,10 +60,10 @@ const buildAngularApp = (args) => {
59
60
  process.exit(err.code || err.pid);
60
61
  }
61
62
 
62
- let ngBuildParams = updateDeployUrl(args.ngBuildParams);
63
+ let ngBuildParams = updateDeployUrl(args);
63
64
  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
65
  // Generating the angular build and post build process.
65
- executeSyncCmd('cd ' + args.appTarget + ' && node ' + args.nodeVMArgs.trim() + ' ./build-scripts/build.js ' + ngBuildParams , null, MSG_NG_RUNTIME_LOG, false, NG_BUILD_MSG);
66
+ executeSyncCmd('cd ' + args.appTarget + ' && node ./build-scripts/build.js ' + ngBuildParams, null, MSG_NG_RUNTIME_LOG, false, NG_BUILD_MSG);
66
67
  }
67
68
 
68
69
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.7.0-next.24863",
3
+ "version": "11.7.0-next.26327",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {