@opencode/util 2.0.15 → 2.0.17
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.
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner";
|
|
2
|
+
export declare class KilledBySignal extends Error {
|
|
3
|
+
readonly signal: NodeJS.Signals;
|
|
4
|
+
constructor(signal: NodeJS.Signals);
|
|
5
|
+
}
|
|
2
6
|
export declare const node: import("./effect/layer-node.js").Provider<ChildProcessSpawner, never, import("./effect/layer-node.js").Tag<"global">>;
|
|
3
7
|
export * as CrossSpawnSpawner from "./cross-spawn-spawner.js";
|
|
@@ -67,6 +67,13 @@ const toPlatformError = (method, err, command) => {
|
|
|
67
67
|
cause: err,
|
|
68
68
|
});
|
|
69
69
|
};
|
|
70
|
+
export class KilledBySignal extends Error {
|
|
71
|
+
signal;
|
|
72
|
+
constructor(signal) {
|
|
73
|
+
super(`Process interrupted due to receipt of signal: '${signal}'`);
|
|
74
|
+
this.signal = signal;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
70
77
|
const makeCrossSpawnSpawner = Effect.gen(function* () {
|
|
71
78
|
const fs = yield* FileSystem.FileSystem;
|
|
72
79
|
const path = yield* Path.Path;
|
|
@@ -377,7 +384,8 @@ const makeCrossSpawnSpawner = Effect.gen(function* () {
|
|
|
377
384
|
exitCode: Effect.flatMap(completion, ([code, signal]) => {
|
|
378
385
|
if (Predicate.isNotNull(code))
|
|
379
386
|
return Effect.succeed(ExitCode(code));
|
|
380
|
-
|
|
387
|
+
// Node reports a signal whenever the exit code is null.
|
|
388
|
+
return Effect.fail(toPlatformError("exitCode", new KilledBySignal(signal), command));
|
|
381
389
|
}),
|
|
382
390
|
kill: (opts) => stop(command, proc, closed, stopOutput, opts),
|
|
383
391
|
unref: Effect.sync(() => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/util",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.17",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -50,10 +50,14 @@
|
|
|
50
50
|
"@npmcli/arborist": "9.4.0",
|
|
51
51
|
"@npmcli/config": "10.8.1",
|
|
52
52
|
"@opentelemetry/api": "1.9.0",
|
|
53
|
-
"@opentelemetry/
|
|
54
|
-
"@opentelemetry/
|
|
55
|
-
"@opentelemetry/
|
|
56
|
-
"@opentelemetry/
|
|
53
|
+
"@opentelemetry/api-logs": "0.219.0",
|
|
54
|
+
"@opentelemetry/context-async-hooks": "2.8.0",
|
|
55
|
+
"@opentelemetry/exporter-trace-otlp-http": "0.219.0",
|
|
56
|
+
"@opentelemetry/resources": "2.8.0",
|
|
57
|
+
"@opentelemetry/sdk-logs": "0.219.0",
|
|
58
|
+
"@opentelemetry/sdk-metrics": "2.8.0",
|
|
59
|
+
"@opentelemetry/sdk-trace-base": "2.8.0",
|
|
60
|
+
"@opentelemetry/sdk-trace-node": "2.8.0",
|
|
57
61
|
"cross-spawn": "7.0.6",
|
|
58
62
|
"effect": "4.0.0-rc.112",
|
|
59
63
|
"glob": "13.0.5",
|