@procedures/mark 0.17.2 → 0.17.3
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 +29 -0
- package/README.md +15 -2
- package/dist/.tsbuildinfo +1 -1
- package/dist/args.d.ts +1 -1
- package/dist/args.d.ts.map +1 -1
- package/dist/args.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +15 -5
- package/dist/cli.js.map +1 -1
- package/dist/manifest.json +3 -3
- package/dist/server-mode.d.ts +5 -0
- package/dist/server-mode.d.ts.map +1 -1
- package/dist/server-mode.js +5 -0
- package/dist/server-mode.js.map +1 -1
- package/package.json +49 -49
- package/src/args.ts +2 -1
- package/src/cli.ts +15 -5
- package/src/server-mode.ts +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @procedures/mark
|
|
2
2
|
|
|
3
|
+
## 0.17.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 636f098: New: the procedures host answers the health probes of its service (CLI-9, decision D5). The probes come from `probeHandler()` and `probeServer()` of `@mark1russell7/service/http`. This change is additive, thus it is a PATCH of the client group (decision D13).
|
|
8
|
+
|
|
9
|
+
- Each listener of `createProcedureHost()` answers `GET /_probes/startup`, `/_probes/readiness` and `/_probes/liveness` from the health of the service. The answer is 200, or 503 with `Retry-After` during the startup and the shutdown. `/_probes/readiness/<controller>` gives the readiness of one controller.
|
|
10
|
+
- The probes need no token and pass no browser check. They give only the status. They mount before the faces, thus a probe path never reaches a procedure. Each other path goes to the faces with the token and the browser checks, as before.
|
|
11
|
+
- A listener does not answer the report of the service (`/_probes/report`), because it names the checks and the dependencies. The procedure `host.health` gives the details with the token.
|
|
12
|
+
- The probes of a listener stop when the intake stops. Thus the listener still closes at the stop of the intake, and a new connection is refused, as before. `probes: { until: "close transports" }` keeps the listener open through the drain: the probes answer 503, and each other request gets 503 with `Retry-After`.
|
|
13
|
+
- The new option `probes` of `createProcedureHost()`: `{ prefix, until }` changes the prefix and the last stage, and `false` turns the probes off. `HOST_PROBE_PREFIX` is `/_probes`. `host.info.probes()` gives the base URL of the probes on each listener.
|
|
14
|
+
- The new option `probes` of `runProcedureHost()`: `{ port, host, prefix, retryAfter }` declares a probe server on a port of its own (`svc.healthServer(probeServer(...))`). It starts first and closes last, thus its probes answer through the whole drain. It also answers `/report`. The listeners of the host then answer no probes, unless the host options give `probes`. `probes()` of the result gives the base URL of each place that answers the probes.
|
|
15
|
+
- The new flag `--probe-port <port>` of `procedure-server`, `mark serve` and `mark --server` gives the probe server, on the address of `--host`. `mark` refuses it without `--server` before a command, as it refuses `--port`. The startup prints the URL of the probes.
|
|
16
|
+
|
|
17
|
+
Deprecated: at the timeout of 15 s, `server.start` gives `success: true` with the message "still loading" while the process still starts. From the next MINOR of the client group, a start that is not ready at the timeout gives `success: false`, with the PID of the process that still starts. Read the readiness probe or `mark server status` for the state.
|
|
18
|
+
|
|
19
|
+
The site, MiniMongo, Graph and jarvis: no change. A host with a listener now also answers the paths under `/_probes`. Before, these paths got 404.
|
|
20
|
+
- Updated dependencies [636f098]
|
|
21
|
+
- @procedures/peer@0.17.3
|
|
22
|
+
- @procedures/server@0.17.3
|
|
23
|
+
- @procedures/lib@0.17.3
|
|
24
|
+
- @procedures/mcp-dev-tools@0.17.3
|
|
25
|
+
- @procedures/client@0.17.3
|
|
26
|
+
- @procedures/cli-run@0.17.3
|
|
27
|
+
- @procedures/pnpm@0.17.3
|
|
28
|
+
- @procedures/procedure@0.17.3
|
|
29
|
+
- @procedures/shell@0.17.3
|
|
30
|
+
- @procedures/vitest@0.17.3
|
|
31
|
+
|
|
3
32
|
## 0.17.2
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -130,9 +130,9 @@ The package provides a `mark` binary for command-line usage.
|
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
132
|
mark [global options] <path...> [positional...] [--options]
|
|
133
|
-
mark serve [--procedures pkgs] [--port N] [--token T | --no-token] [--expose patterns] [--events topics] [--fs-root folder]
|
|
133
|
+
mark serve [--procedures pkgs] [--port N] [--token T | --no-token] [--expose patterns] [--events topics] [--fs-root folder] [--probe-port N]
|
|
134
134
|
mark mcp [--bundles list] [--tool-timeout ms] [--read-only] [--http port] [--fs-root folder] [--debug]
|
|
135
|
-
mark --server [--port N] [--host H] [--transport http|websocket|both] [--events topics]
|
|
135
|
+
mark --server [--port N] [--host H] [--transport http|websocket|both] [--events topics] [--probe-port N]
|
|
136
136
|
mark -i
|
|
137
137
|
mark --fs-root <folder> <command | --server | -i | serve | mcp>
|
|
138
138
|
```
|
|
@@ -167,6 +167,19 @@ mark --server --transport both --events "orders.*"
|
|
|
167
167
|
mark serve --procedures ./my-procedures.js --events orders.created --events audit.created
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
+
#### The health probes of the hosts
|
|
171
|
+
|
|
172
|
+
`mark --server` and `mark serve` answer the probes of their service (CLI-9, decision D5). The probes give only the status, and they need no token.
|
|
173
|
+
|
|
174
|
+
- By default, each listener answers `GET /_probes/startup`, `/_probes/readiness` and `/_probes/liveness`. The answer is 200, or 503 with `Retry-After`. The probes stop when the listener closes at the stop of the intake.
|
|
175
|
+
- `--probe-port <port>` moves the probes to a port of their own, on the address of `--host`: `/startup`, `/readiness`, `/liveness` and `/report`. The listeners then answer no probes.
|
|
176
|
+
- The startup prints the URL of the probes.
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
curl http://127.0.0.1:3000/_probes/readiness
|
|
180
|
+
mark --server --probe-port 9090
|
|
181
|
+
```
|
|
182
|
+
|
|
170
183
|
#### The root of the files
|
|
171
184
|
|
|
172
185
|
`--fs-root <folder>` confines each procedure to the folder (roadmap R33). Each procedure keeps its paths in the folder, or `mark` refuses it. It applies to each mode and host of `mark`:
|