@wavemaker/angular-codegen 11.14.2-rc.6311 → 11.15.0-rc.245

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.
@@ -8,7 +8,10 @@
8
8
  "allowJs": true
9
9
  },
10
10
  "exclude": [
11
- "test.ts",
12
- "**/*.spec.ts"
11
+ "**/*.spec.ts",
12
+ "app/extensions/formatters.js",
13
+ "environments/environment.*.ts",
14
+ "setup-jest.js",
15
+ "test.ts"
13
16
  ]
14
17
  }
@@ -15,7 +15,7 @@
15
15
  const fs = require('fs');
16
16
  const rimraf = require('rimraf');
17
17
  const { downloadNPMPackage } = require('./download-packages');
18
- const { generateRandomHash } = require('./src/wm-utils');
18
+ const { generateRandomHash, mergePackageJsonWithOverrideJson} = require('./src/wm-utils');
19
19
  const archiver = require('archiver');
20
20
  const path = require("path");
21
21
  const { executeSyncCmd, MSG_NG_RUNTIME_LOG, MSG_NG_RUNTIME_SUCCESS } = require('./build-util');
@@ -81,6 +81,17 @@ const processAngularAppPackage = async (sourcePath, targetPath, packageName, isO
81
81
 
82
82
  // Install dependencies
83
83
  const installPath = isOptimized ? sourcePath : targetPath;
84
+ try {
85
+ if (global.buildConfigObj.runInspection && !isOptimized && fs.existsSync(path.join(global.buildConfigObj.appSrc, "build-src/package-override.json")) && fs.existsSync(path.join(installPath, 'package.json'))) {
86
+ let packageJson = JSON.parse(fs.readFileSync(path.join(installPath, 'package.json'), 'utf8'));
87
+ packageJson = await mergePackageJsonWithOverrideJson(global.buildConfigObj.appSrc, packageJson);
88
+ fs.writeFileSync(path.join(installPath, 'package.json'), JSON.stringify(packageJson, null, 4));
89
+ console.log("Successfully updated generated-app package.json with package-override.json");
90
+ }
91
+ } catch (e) {
92
+ console.log("Failed to merge package-override.json into generated-app package.json: " + e);
93
+ }
94
+
84
95
  let npmCommnd = `npm install --prefix ${installPath}`
85
96
  // For windows platforms, npm install command needs to be executed in the same directory as package.json file
86
97
  if (os.platform() === 'win32') {
@@ -451,6 +462,14 @@ const buildAsWebComponent = async () => {
451
462
 
452
463
  const initBuild = async (buildConfigObj) => {
453
464
  global.randomHash = generateRandomHash();
465
+
466
+ if(buildConfigObj.runInspection && buildConfigObj.runInspection === 'true' && buildConfigObj.buildType === BUILD_TYPE.ANGULAR) {
467
+ buildConfigObj.optimizeUIBuild = false;
468
+ buildConfigObj.runInspection = true;
469
+ }
470
+ else {
471
+ buildConfigObj.runInspection = false;
472
+ }
454
473
  //making it global
455
474
  global.buildConfigObj = buildConfigObj;
456
475