@reventlessdev/rescript-node 2.0.0-alpha.17 → 2.0.0-alpha.18
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/NodeReadline.res +17 -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.18 (2026-09-28)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **node:** readline's line and close events, and its own prompt ([ce2d0fa](https://github.com/ReventlessDev/reventless-core/commit/ce2d0faf929d44c88705e20009674254a49f15d7))
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
# 2.0.0-alpha.17 (2026-09-28)
|
|
7
14
|
|
|
8
15
|
### Features
|
package/package.json
CHANGED
package/src/NodeReadline.res
CHANGED
|
@@ -16,5 +16,22 @@ external createInterface: options => t = "createInterface"
|
|
|
16
16
|
@send
|
|
17
17
|
external question: (t, string) => promise<string> = "question"
|
|
18
18
|
|
|
19
|
+
/** The prompt {!prompt} writes, and redraws when a terminal refreshes the line. */
|
|
20
|
+
@send
|
|
21
|
+
external setPrompt: (t, string) => unit = "setPrompt"
|
|
22
|
+
|
|
23
|
+
@send
|
|
24
|
+
external prompt: t => unit = "prompt"
|
|
25
|
+
|
|
26
|
+
/** Every line read, as it arrives, whether or not a {!question} is waiting for it.
|
|
27
|
+
Piped input arrives all at once, before a second question could listen, so a
|
|
28
|
+
prompt that asks several questions reads them from here. */
|
|
29
|
+
@send
|
|
30
|
+
external onLine: (t, @as("line") _, string => unit) => unit = "on"
|
|
31
|
+
|
|
32
|
+
/** Input has ended (the pipe closed, or Ctrl-D), or the interface was closed. */
|
|
33
|
+
@send
|
|
34
|
+
external onClose: (t, @as("close") _, unit => unit) => unit = "on"
|
|
35
|
+
|
|
19
36
|
@send
|
|
20
37
|
external close: t => unit = "close"
|