@architect/hydrate
Advanced tools
Comparing version 3.1.4 to 3.1.5
@@ -5,2 +5,15 @@ # Architect Hydrate changelog | ||
## [3.1.5] 2022-11-15 | ||
### Changed | ||
- Changed `hydrate.copy` API to copy files into all Lambdas, not just those with shared code enabled | ||
### Fixed | ||
- Fixed issue where `hydrate.copy` plugins breaking on projects that disabled or aren't using shared code; thanks @tbeseda! | ||
--- | ||
## [3.1.4] 2022-10-07 | ||
@@ -7,0 +20,0 @@ |
{ | ||
"name": "@architect/hydrate", | ||
"version": "3.1.4", | ||
"version": "3.1.5", | ||
"description": "Architect dependency hydrator and shared file manager", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -10,7 +10,6 @@ let { deepFrozenCopy } = require('@architect/utils') | ||
let { inv } = inventory | ||
let { lambdasBySrcDir } = inv | ||
let { lambdasBySrcDir, lambdaSrcDirs } = inv | ||
let { cwd } = inv._project | ||
let copyPlugins = inv.plugins?._methods?.hydrate?.copy | ||
let shared = inv.shared?.shared | ||
if (copyPlugins && shared.length) { | ||
if (copyPlugins && lambdaSrcDirs?.length) { | ||
let frozen = deepFrozenCopy(inventory) | ||
@@ -41,13 +40,11 @@ let { arc } = frozen.inv._project | ||
// Sure what's one more nested sequence of ops? | ||
series(shared.map(share => { | ||
series(lambdaSrcDirs.map(dir => { | ||
return function copier (callback) { | ||
if (paths.shared[share]) { | ||
let isNode = lambdasBySrcDir[share].config.runtime.startsWith('nodejs') | ||
let filename = target || basename(source) | ||
let nodeModules = join(share, 'node_modules', filename) | ||
let vendorDir = join(share, 'vendor', filename) | ||
let dest = isNode ? nodeModules : vendorDir | ||
cp(src, dest, params, callback) | ||
} | ||
else callback() | ||
let lambda = lambdasBySrcDir[dir] | ||
let isNode = lambda.config.runtime.startsWith('nodejs') | ||
let filename = target || basename(source) | ||
let nodeModules = join(lambda.src, 'node_modules', filename) | ||
let vendorDir = join(lambda.src, 'vendor', filename) | ||
let dest = isNode ? nodeModules : vendorDir | ||
cp(src, dest, params, callback) | ||
} | ||
@@ -54,0 +51,0 @@ }), function _done (err) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67101
1049