@byaga/cdk-patterns 0.11.3 → 0.11.4

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,6 +8,8 @@ const child_process_1 = require("child_process");
8
8
  const duration_1 = __importDefault(require("../../tools/duration"));
9
9
  const fs_extra_1 = require("fs-extra");
10
10
  const install_node_modules_1 = require("./install-node-modules");
11
+ const copy_files_1 = require("../copy-files");
12
+ const path_1 = require("path");
11
13
  /**
12
14
  * Builds TypeScript source code.
13
15
  * Ensures the build directory exists, installs necessary node modules, and compiles the TypeScript code.
@@ -27,6 +29,12 @@ function buildTypeScript(srcDir, buildDir) {
27
29
  cwd: srcDir,
28
30
  stdio: 'inherit'
29
31
  });
32
+ // Manually Move the package.json and install prod dependencies
33
+ (0, copy_files_1.copyFiles)([
34
+ (0, path_1.resolve)(srcDir, 'package.json'),
35
+ (0, path_1.resolve)(srcDir, 'package-lock.json'),
36
+ ], srcDir, buildDir);
37
+ (0, install_node_modules_1.installNodeModules)(buildDir, ['dev', 'optional', 'peer']);
30
38
  // Log the duration of the build process
31
39
  console.log('NPM Install Duration (ms)', done());
32
40
  }
@@ -21,7 +21,7 @@ function installNodeModules(dir, omit = []) {
21
21
  // Start measuring the duration of the `npm install` command
22
22
  const installComplete = (0, duration_1.default)();
23
23
  // Run the `npm install` command in the specified directory, omitting certain types of dependencies if specified
24
- (0, child_process_1.execSync)(`npm i${omit.join(' --omit=')} --quite`, {
24
+ (0, child_process_1.execSync)(`npm i${omit.map(o => ` --omit=${o}`).join('')} --quite`, {
25
25
  cwd: dir
26
26
  });
27
27
  // Log the duration of the `npm install` command
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byaga/cdk-patterns",
3
- "version": "0.11.3",
3
+ "version": "0.11.4",
4
4
  "description": "Collection of common patterns used when making AWS CloudFormation templates using CDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",