@oh-my-pi/pi-utils 17.3.0 → 17.3.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.
@@ -78,7 +78,7 @@ export declare class ChildProcess<In extends InMask = InMask> {
78
78
  /** Returns the truncated stderr tail (last 32KB). */
79
79
  peekStderr(): string;
80
80
  nothrow(): this;
81
- kill(reason?: Exception): void;
81
+ kill(reason?: Exception, gracefulMs?: number): void;
82
82
  text(): Promise<string>;
83
83
  blob(): Promise<Blob>;
84
84
  json(): Promise<unknown>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-utils",
4
- "version": "17.3.0",
4
+ "version": "17.3.1",
5
5
  "description": "Shared utilities for pi packages",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
@@ -31,7 +31,7 @@
31
31
  "fmt": "biome format --write ."
32
32
  },
33
33
  "dependencies": {
34
- "@oh-my-pi/pi-natives": "17.3.0"
34
+ "@oh-my-pi/pi-natives": "17.3.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/bun": "^1.3.14"
package/src/ptree.ts CHANGED
@@ -217,11 +217,11 @@ export class ChildProcess<In extends InMask = InMask> {
217
217
  return this;
218
218
  }
219
219
 
220
- kill(reason?: Exception) {
220
+ kill(reason?: Exception, gracefulMs?: number) {
221
221
  if (reason && !this.#exitReasonPending) this.#exitReasonPending = reason;
222
222
  if (!this.proc.killed)
223
223
  void Process.fromPid(this.proc.pid)
224
- ?.terminate()
224
+ ?.terminate(gracefulMs === undefined ? undefined : { gracefulMs })
225
225
  ?.catch(e => void e);
226
226
  }
227
227