@wavemaker/angular-codegen 11.7.0-rc.5586 → 11.7.0-rc.5592

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.
@@ -1,23 +1,18 @@
1
1
  const { spawnSync } = require('child_process');
2
2
  const path = require('path');
3
3
 
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
- console.log("Setting node options: ", process.env.NODE_OPTIONS);
8
- }
9
- const args = processArgs.slice(2);
4
+ const args = process.argv.slice(2);
5
+
10
6
  const ngBuildArgs = ['build', ...args];
11
- console.log("\x1b[33m", "Angular build params: ", ngBuildArgs);
7
+ console.log("Build params - ", ngBuildArgs);
12
8
 
13
9
  //Trigger angular build with the passed params
14
10
  const ngPath = path.resolve(process.cwd(), 'node_modules', '.bin', "ng");
15
- const ngBuildProcess = spawnSync(ngPath, ngBuildArgs, {stdio: 'inherit', shell: true});
11
+ const ngBuildProcess = spawnSync(ngPath, ngBuildArgs, { stdio: 'inherit', shell: true });
16
12
 
17
13
  if (ngBuildProcess.status === 0) {
18
14
  console.log('ng build completed successfully!');
19
15
  } else {
20
- // TODO: JS heap out of memory error handling
21
16
  console.error('Error during ng build:', ngBuildProcess.error || ngBuildProcess.stderr);
22
17
  process.exit(1);
23
18
  }