@jarkkojs/readseek-api 0.12.6 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -6
- package/dist/process.d.ts +0 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,11 +11,8 @@ npm install @jarkkojs/readseek-api
|
|
|
11
11
|
|
|
12
12
|
`@jarkkojs/readseek` installs the optional platform binary and provides the
|
|
13
13
|
`readseek` CLI. Linux packages supply `bin/readseek.AppImage`; macOS and Windows
|
|
14
|
-
supply native executables.
|
|
15
|
-
|
|
16
|
-
Custom process launchers should pass `readSeekProcessEnvironment()` as their
|
|
17
|
-
child environment. Installing the API also installs `@jarkkojs/readseek` and its
|
|
18
|
-
platform binary; plugins declare both packages directly.
|
|
14
|
+
supply native executables. Installing the API also installs `@jarkkojs/readseek`
|
|
15
|
+
and its platform binary; plugins declare both packages directly.
|
|
19
16
|
|
|
20
17
|
## Example
|
|
21
18
|
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,6 @@ export { READSEEK_BINARY_ENV, READSEEK_PLATFORM_PACKAGES, readSeekBinaryName, re
|
|
|
12
12
|
export { canonicalPathKey, expandUserPath, isSubPath, resolveScopedPath, resolveToCwd, } from "./path.ts";
|
|
13
13
|
export { cleanReadSeekErrorText } from "./error.ts";
|
|
14
14
|
export { parseReadSeekKdl } from "./output-kdl.ts";
|
|
15
|
-
export { DEFAULT_MAX_OUTPUT_BYTES, DEFAULT_READSEEK_TIMEOUT_MS, acceptsReadSeekExitCode, ensureSuccessfulStdout, failureFromProcessResult, parseSuccessfulKdl,
|
|
15
|
+
export { DEFAULT_MAX_OUTPUT_BYTES, DEFAULT_READSEEK_TIMEOUT_MS, acceptsReadSeekExitCode, ensureSuccessfulStdout, failureFromProcessResult, parseSuccessfulKdl, resolveProcessLimits, type ProcessRunOptions, type ProcessRunResult, } from "./process.ts";
|
|
16
16
|
export { runReadSeekNode, runReadSeekNodeKdl, runReadSeekNodeText, } from "./process-node.ts";
|
|
17
17
|
export { runReadSeekBun, runReadSeekBunKdl, runReadSeekBunText, } from "./process-bun.ts";
|
package/dist/index.js
CHANGED
|
@@ -2244,9 +2244,6 @@ function parseReadSeekKdl(text) {
|
|
|
2244
2244
|
// src/process.ts
|
|
2245
2245
|
var DEFAULT_READSEEK_TIMEOUT_MS = 120000;
|
|
2246
2246
|
var DEFAULT_MAX_OUTPUT_BYTES = 32 * 1024 * 1024;
|
|
2247
|
-
function readSeekProcessEnvironment() {
|
|
2248
|
-
return process.platform === "linux" ? { ...process.env, APPIMAGE_EXTRACT_AND_RUN: "1" } : process.env;
|
|
2249
|
-
}
|
|
2250
2247
|
function resolveProcessLimits(options = {}) {
|
|
2251
2248
|
return {
|
|
2252
2249
|
timeoutMs: options.timeoutMs ?? DEFAULT_READSEEK_TIMEOUT_MS,
|
|
@@ -2366,7 +2363,7 @@ async function runReadSeekNode(binaryPath, args, options = {}) {
|
|
|
2366
2363
|
try {
|
|
2367
2364
|
child = spawn(binaryPath, [...args], {
|
|
2368
2365
|
cwd: options.cwd,
|
|
2369
|
-
env:
|
|
2366
|
+
env: process.env,
|
|
2370
2367
|
shell: false,
|
|
2371
2368
|
stdio: [options.stdin === undefined ? "ignore" : "pipe", "pipe", "pipe"],
|
|
2372
2369
|
windowsHide: true
|
|
@@ -2456,7 +2453,7 @@ async function runReadSeekBun(binaryPath, args, options = {}) {
|
|
|
2456
2453
|
const stdin = options.stdin === undefined ? undefined : new TextEncoder().encode(options.stdin);
|
|
2457
2454
|
const spawnOptions = {
|
|
2458
2455
|
cwd: options.cwd,
|
|
2459
|
-
env:
|
|
2456
|
+
env: process.env,
|
|
2460
2457
|
stderr: "pipe",
|
|
2461
2458
|
stdin,
|
|
2462
2459
|
stdout: "pipe"
|
|
@@ -2563,7 +2560,6 @@ export {
|
|
|
2563
2560
|
presentShowResult,
|
|
2564
2561
|
readSeekBinaryName,
|
|
2565
2562
|
readSeekPlatformKey,
|
|
2566
|
-
readSeekProcessEnvironment,
|
|
2567
2563
|
renderCompactGuidelines,
|
|
2568
2564
|
renderFallbackToolDescription,
|
|
2569
2565
|
renderGrepOutput,
|
package/dist/process.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export declare const DEFAULT_READSEEK_TIMEOUT_MS = 120000;
|
|
2
2
|
export declare const DEFAULT_MAX_OUTPUT_BYTES: number;
|
|
3
|
-
/** Enable FUSE-free Linux execution without changing the host environment. */
|
|
4
|
-
export declare function readSeekProcessEnvironment(): NodeJS.ProcessEnv;
|
|
5
3
|
export type ProcessRunOptions = {
|
|
6
4
|
timeoutMs?: number;
|
|
7
5
|
signal?: AbortSignal;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jarkkojs/readseek-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Shared ReadSeek CLI contract, validation, argv builders, and bounded process runners",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"vitest": "^4.1.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@jarkkojs/readseek": "^0.
|
|
54
|
+
"@jarkkojs/readseek": "^0.13.1",
|
|
55
55
|
"@bgotink/kdl": "0.4.0",
|
|
56
56
|
"@sinclair/typebox": "0.34.52"
|
|
57
57
|
}
|