(runtimeAssets)
| 6 | // dependency through a relative rpath ($ORIGIN / @loader_path) that only lines |
| 7 | // up when the two files keep their original relative positions. |
| 8 | function loadEmbeddedSharp(runtimeAssets) { |
| 9 | const materialized = materializeEmbeddedAssetGroup( |
| 10 | `sharp-${runtimeAssets.slug}`, |
| 11 | [ |
| 12 | { |
| 13 | embeddedPath: runtimeAssets.addonPath, |
| 14 | relativePath: runtimeAssets.addonRelativePath, |
| 15 | }, |
| 16 | { |
| 17 | embeddedPath: runtimeAssets.libvipsPath, |
| 18 | relativePath: runtimeAssets.libvipsRelativePath, |
| 19 | }, |
| 20 | ], |
| 21 | ); |
| 22 | |
| 23 | return require(materialized.paths[runtimeAssets.addonRelativePath]); |
| 24 | } |
| 25 | |
| 26 | module.exports = loadEmbeddedSharp; |
no test coverage detected