@zukhruf/net 0.8.241 → 0.8.242
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 +15 -12
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @zukhruf/net
|
|
2
2
|
|
|
3
|
-
> **In build (backlog #6078).** The API on paper was approved on 2026-11-28, and it is built as the paper shows. It is on npm, and the test files of sdk-it, text2sql, finetuning, mteb, deepagents
|
|
3
|
+
> **In build (backlog #6078).** The API on paper was approved on 2026-11-28, and it is built as the paper shows. It is on npm, and the test files of sdk-it, text2sql, finetuning, mteb, deepagents, offers-evals, elt and context-compiler moved onto it, so `@zukhruf/testing/http` is gone; the other consumers move next (see [Who uses it](#who-uses-it)). Each decision is an accepted ADR, and each detail that the review decided is in [Decided in the review](#decided-in-the-review).
|
|
4
4
|
|
|
5
5
|
A server of this program that accepts connections, and that ends each one at its end. A `Server` says what to do with each connection. `server.serve(endpoint)` listens on a TCP port of the loopback address or on a pipe, and gives a `Serving`. The serving keeps each socket that it accepted. Its `close()` destroys each one and waits for its close, and its `shutdown(signal)` waits until each one ends by itself and closes the rest at the abort. `@zukhruf/net/http` is the same server for HTTP.
|
|
6
6
|
|
|
@@ -88,7 +88,7 @@ const answer = await fetch(`${site.origin}/`);
|
|
|
88
88
|
- `shutdown(signal)` ends each idle connection at once, and each other connection after its response, as Go's `Shutdown`.
|
|
89
89
|
- `options` are those of `http.createServer` (`keepAliveTimeout`, `highWaterMark`, ...) and `upgrade`, a listener of the `upgrade` event. docker's fake engine needs all three.
|
|
90
90
|
|
|
91
|
-
| `@zukhruf/testing/http
|
|
91
|
+
| `@zukhruf/testing/http`, removed (#6078) | `@zukhruf/net/http` |
|
|
92
92
|
| -------------------------------------------- | ---------------------------------------------------------- |
|
|
93
93
|
| `await new HttpServer().start(handler)` | `await new HttpServer(handler).serve(new TcpEndpoint())` |
|
|
94
94
|
| `handle.origin` | `serving.origin` |
|
|
@@ -115,16 +115,15 @@ The package has no error class of its own. A caller does not do a different next
|
|
|
115
115
|
|
|
116
116
|
## Who uses it
|
|
117
117
|
|
|
118
|
-
| Consumer
|
|
119
|
-
|
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
| ssh
|
|
126
|
-
|
|
|
127
|
-
| `@zukhruf/chaos` | `Proxy` is a handler that a `Server` serves | backlog #6078 |
|
|
118
|
+
| Consumer | How | Record |
|
|
119
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ------------- |
|
|
120
|
+
| 106 test files of elt (49), text2sql (20), sdk-it (18), finetuning (9), mteb (6), deepagents (2), context-compiler (1) and offers-evals (1) | `HttpServer` on a `TcpEndpoint` | backlog #6078 |
|
|
121
|
+
| docker's 12 test files of the engine | `HttpServer` on a `PipeEndpoint`, today `fakeEngine` | backlog #6078 |
|
|
122
|
+
| ssh's `client`, `config-dial-route` and `config-dial` tests | `Server` with no handler, today `startSilentServer` | backlog #6078 |
|
|
123
|
+
| 6 mutex and 3 single-flight test files | `Server` on a `PipeEndpoint`, today `standInServer` | backlog #6078 |
|
|
124
|
+
| ssh `control.test.ts`, `owner-death.test.ts` | `Server` with `allowHalfOpen`, today `listen` | backlog #6078 |
|
|
125
|
+
| 13 files of docker, ssh, testing and tools/eslint-rules | `serving.address.port`, today `portOf` | backlog #5947 |
|
|
126
|
+
| `@zukhruf/chaos` | `Proxy` is a handler that a `Server` serves | backlog #6078 |
|
|
128
127
|
|
|
129
128
|
## The same concepts in other systems
|
|
130
129
|
|
|
@@ -250,6 +249,10 @@ Each item is a detail that a caller sees. Ezz approved each proposal on 2026-11-
|
|
|
250
249
|
|
|
251
250
|
## Documentation
|
|
252
251
|
|
|
252
|
+
**Recipes**
|
|
253
|
+
|
|
254
|
+
- [Stand in for an HTTP API with a local server](./docs/recipes/stand-in-for-an-http-api.md)
|
|
255
|
+
|
|
253
256
|
**Decisions**
|
|
254
257
|
|
|
255
258
|
- [ADR 0001](./docs/adr/0001-a-base-package-above-pipes-owns-the-connections-that-a-server-accepts-and-testings-httpserver-converges-into-it.md): a base package above pipes owns the connections that a server accepts, and testing's HttpServer converges into it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zukhruf/net",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.242",
|
|
4
4
|
"description": "A server that accepts connections on a TCP port or a pipe and owns each socket: close destroys each one and waits for its close, shutdown waits until its signal aborts; @zukhruf/net/http serves HTTP the same way. After Go's net and net/http.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@zukhruf/fs": "^0.8.
|
|
53
|
-
"@zukhruf/parameterized-test": "^0.8.
|
|
54
|
-
"@zukhruf/pipes": "^0.8.
|
|
55
|
-
"@zukhruf/process": "^0.8.
|
|
52
|
+
"@zukhruf/fs": "^0.8.242",
|
|
53
|
+
"@zukhruf/parameterized-test": "^0.8.242",
|
|
54
|
+
"@zukhruf/pipes": "^0.8.242",
|
|
55
|
+
"@zukhruf/process": "^0.8.242"
|
|
56
56
|
}
|
|
57
57
|
}
|