@reventlessdev/rescript-node 2.0.0-alpha.5 → 2.0.0-alpha.6
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/NodeProcess.res +24 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 2.0.0-alpha.6 (2026-08-14)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **local:** let the seed tools address a platform, not a guessed file ([98862ad](https://github.com/ReventlessDev/reventless-core/commit/98862adaa4111f605553e4a78bc52a8a488a4ef3))
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
# 2.0.0-alpha.5 (2026-08-13)
|
|
7
14
|
|
|
8
15
|
### Features
|
package/package.json
CHANGED
package/src/NodeProcess.res
CHANGED
|
@@ -21,6 +21,30 @@ external chdir: string => unit = "chdir"
|
|
|
21
21
|
@val @scope("process")
|
|
22
22
|
external exit: int => unit = "exit"
|
|
23
23
|
|
|
24
|
+
@val @scope("process")
|
|
25
|
+
external pid: int = "pid"
|
|
26
|
+
|
|
27
|
+
/** Signalling another process — or, with signal `0`, asking whether it is still
|
|
28
|
+
there without disturbing it. Throws when the pid is gone (`ESRCH`) or not
|
|
29
|
+
ours to signal (`EPERM`), so a liveness check is a `try`. */
|
|
30
|
+
@val @scope("process")
|
|
31
|
+
external kill: (int, int) => unit = "kill"
|
|
32
|
+
|
|
33
|
+
/** `process.on` for the two shutdown paths a CLI has to clean up on.
|
|
34
|
+
|
|
35
|
+
Split into an `exit` binding and a signal binding because the handlers are
|
|
36
|
+
not interchangeable: `exit` fires with the exit code and may only do
|
|
37
|
+
synchronous work, while a signal handler receives the signal name and fires
|
|
38
|
+
*before* the process is committed to leaving — code that registers one and
|
|
39
|
+
expects the other's timing gets a cleanup that never runs. Signals are a
|
|
40
|
+
polyvariant so a typo is a compile error rather than a handler that is never
|
|
41
|
+
called. */
|
|
42
|
+
@val @scope("process")
|
|
43
|
+
external onExit: (@as("exit") _, int => unit) => unit = "on"
|
|
44
|
+
|
|
45
|
+
@val @scope("process")
|
|
46
|
+
external onSignal: ([#SIGINT | #SIGTERM | #SIGHUP], unit => unit) => unit = "on"
|
|
47
|
+
|
|
24
48
|
/** The standard streams. `write`, `isTTY`, `pause` and `unref` are what the
|
|
25
49
|
interactive prompts in this repository reach for; the type is abstract so it
|
|
26
50
|
can also be handed to `readline.createInterface`. */
|