MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / artifactPaths

Function artifactPaths

packages/plugins/apps/src/vite.ts:15–24  ·  view source on GitHub ↗
(artifact: {
  readonly source: string;
  readonly wasm: Uint8Array;
})

Source from the content-addressed store, hash-verified

13 createHash("sha256").update(value).digest("hex").slice(0, 12);
14
15const artifactPaths = (artifact: {
16 readonly source: string;
17 readonly wasm: Uint8Array;
18}): {
19 readonly sourcePath: string;
20 readonly wasmPath: string;
21} => ({
22 sourcePath: `/assets/worker-bundler-source-${digest(artifact.source)}.js`,
23 wasmPath: `/assets/worker-bundler-esbuild-wasm-${digest(artifact.wasm)}.wasm`,
24});
25
26export const workerBundlerArtifact = (): Plugin => {
27 let command: "build" | "serve" = "build";

Callers 2

loadFunction · 0.85
closeBundleFunction · 0.85

Calls 1

digestFunction · 0.85

Tested by

no test coverage detected