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

Function fileMap

packages/plugins/apps/src/pipeline/publish.ts:89–93  ·  view source on GitHub ↗
(files: readonly PublishFile[])

Source from the content-addressed store, hash-verified

87};
88
89const fileMap = (files: readonly PublishFile[]): ReadonlyMap<string, string> => {
90 const out = new Map<string, string>();
91 for (const file of files) out.set(file.path, textDecoder.decode(file.bytes));
92 return out;
93};
94
95const sourceRef = (path: string, source: string): Effect.Effect<ModuleSourceRef> =>
96 sha256Hex(source).pipe(Effect.map((sourceHash) => ({ path, sourceHash })));

Callers 1

publishFunction · 0.85

Calls 1

setMethod · 0.80

Tested by

no test coverage detected