MCPcopy Create free account
hub / github.com/Noumena-Network/code / loadEmbeddedSharp

Function loadEmbeddedSharp

src/shims/sharp/loadEmbeddedSharp.cjs:8–24  ·  view source on GitHub ↗
(runtimeAssets)

Source from the content-addressed store, hash-verified

6// dependency through a relative rpath ($ORIGIN / @loader_path) that only lines
7// up when the two files keep their original relative positions.
8function 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
26module.exports = loadEmbeddedSharp;

Callers 3

loadBindingFunction · 0.85
loadBindingFunction · 0.85
loadBindingFunction · 0.85

Calls 1

Tested by

no test coverage detected