MCPcopy Create free account
hub / github.com/observablehq/framework / exec

Method exec

src/loader.ts:515–521  ·  view source on GitHub ↗
(output: WriteStream, options?: LoadOptions, effects?: LoadEffects)

Source from the content-addressed store, hash-verified

513 }
514
515 async exec(output: WriteStream, options?: LoadOptions, effects?: LoadEffects): Promise<void> {
516 const archivePath = join(this.root, await this.preload(options, effects));
517 const file = (await JSZip.loadAsync(await readFile(archivePath))).file(this.inflatePath);
518 if (!file) throw enoent(this.inflatePath);
519 const pipe = file.nodeStream().pipe(output);
520 await new Promise((resolve, reject) => pipe.on("error", reject).on("finish", resolve));
521 }
522}
523
524interface TarExtractorOptions extends ExtractorOptions {

Callers 8

build-test.tsFile · 0.45
positionLengthFunction · 0.45
loadFunction · 0.45
matchParamsFunction · 0.45
compilePatternFunction · 0.45
PreviewServerClass · 0.45
buildFunction · 0.45
execFunction · 0.45

Calls 2

enoentFunction · 0.85
fileMethod · 0.80

Tested by

no test coverage detected