npm.io
0.10.7 • Published 4d ago

@jarkkojs/readseek-api

Licence
Apache-2.0
Version
0.10.7
Deps
0
Vulns
0
Weekly
0

@jarkkojs/readseek-api

Shared ReadSeek contracts, validation, argument builders, binary resolution, and bounded Node/Bun process runners.

Install

npm install @jarkkojs/readseek-api

@jarkkojs/readseek installs the optional platform binary and provides the readseek CLI. Linux packages supply bin/readseek.AppImage; macOS and Windows supply native executables. The CLI and Node/Bun runners set APPIMAGE_EXTRACT_AND_RUN=1 for Linux child processes, so FUSE is not required. Custom process launchers should pass readSeekProcessEnvironment() as their child environment. Installing the API also installs @jarkkojs/readseek and its platform binary; plugins declare both packages directly.

Example

import {
  buildInspectArgs,
  resolveReadSeekBinaryFromPackages,
  resolveReadSeekBinaryOverride,
  runReadSeekNodeKdl,
} from "@jarkkojs/readseek-api";

const binary =
  resolveReadSeekBinaryOverride() ?? resolveReadSeekBinaryFromPackages();
const args = buildInspectArgs({ path: "src/index.ts", select: "map" });
const result = await runReadSeekNodeKdl(binary, args);

For PDF assets, buildExtractArgs requires an asset:ID selector and destination file path. It rejects "-" as the destination so binary data is never returned on stdout.

Licensing

@jarkkojs/readseek-api is licensed under the Apache 2.0 license. See LICENSE for more information.

Keywords