@procedures/server 0.52.2 → 0.53.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.
- package/CHANGELOG.md +57 -0
- package/README.md +6 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/host.d.ts +26 -0
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +22 -2
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/procedures/server.start.d.ts +2 -0
- package/dist/procedures/server.start.d.ts.map +1 -1
- package/dist/procedures/server.start.js +7 -5
- package/dist/procedures/server.start.js.map +1 -1
- package/dist/procedures/server.status.d.ts.map +1 -1
- package/dist/procedures/server.status.js +1 -4
- package/dist/procedures/server.status.js.map +1 -1
- package/package.json +6 -6
- package/src/host.ts +45 -2
- package/src/index.ts +2 -0
- package/src/procedures/server.start.ts +7 -5
- package/src/procedures/server.status.ts +1 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# @procedures/server
|
|
2
2
|
|
|
3
|
+
## 0.53.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [84f0c78]
|
|
8
|
+
- Updated dependencies [abf290c]
|
|
9
|
+
- @procedures/client@0.53.1
|
|
10
|
+
- @procedures/fs@0.53.1
|
|
11
|
+
- @procedures/peer@0.53.1
|
|
12
|
+
|
|
13
|
+
## 0.53.0
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- The packages use the new versions of their dependencies of the owner: `@mark1russell7/service` `^0.8.3`, `@mark1russell7/coeval` `^0.26.1` and `@mark1russell7/docker-sqlite` `^0.3.0`. The range of `@mark1russell7/collections` stays `^0.5.0`: its version 0.7.0 and later remove names that `@procedures/collections` exports.
|
|
18
|
+
- 556d0a8: The packages use `@mark1russell7/service` `^0.8.2` in place of `^0.6.0`. Version 0.7.0 adds the refusal cause `capacity`, and version 0.8.0 refuses a listen backlog of 0. Version 0.8.2 adds the call context of OpenTelemetry. The types `Clock` and `Cancel` of `@mark1russell7/service/clock` do not change: their home is `@mark1russell7/algebra/clock`, and the entry gives them again.
|
|
19
|
+
|
|
20
|
+
A refusal of a call limit with the cause `capacity` gives `RATE_LIMITED` that is not retryable and has no `retry-after`. A take of one unit does not get this cause, because each policy holds 1 unit or more.
|
|
21
|
+
- Updated dependencies [bc98f77]
|
|
22
|
+
- Updated dependencies [11d9084]
|
|
23
|
+
- Updated dependencies [d28ccb5]
|
|
24
|
+
- Updated dependencies [735cfcf]
|
|
25
|
+
- Updated dependencies [0da2c6d]
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
- Updated dependencies [556d0a8]
|
|
28
|
+
- @procedures/client@0.53.0
|
|
29
|
+
- @procedures/peer@0.53.0
|
|
30
|
+
- @procedures/fs@0.53.0
|
|
31
|
+
|
|
32
|
+
## 0.52.5
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- 36adc69: `runProcedureHost()` takes the option `telemetry`: a function that starts the telemetry SDK of the app. The host starts it before the dependencies and the listeners, and gives `{ stopOnSignals: false }`. The phase `flush the output` stops it last. The cap of the phase limits the wait. The new exports are `TELEMETRY_FLUSH_PHASE`, `HostTelemetry` and `HostTelemetryOptions`.
|
|
37
|
+
- Updated dependencies [25a5f44]
|
|
38
|
+
- @procedures/client@0.52.5
|
|
39
|
+
- @procedures/fs@0.52.5
|
|
40
|
+
- @procedures/peer@0.52.5
|
|
41
|
+
|
|
42
|
+
## 0.52.4
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- 79cd1ee: The procedures `server.start` and `server.status` get the folder `~/.mark` and the folder of the lockfiles from `getMarkDir()` and `getServersDir()` of `@procedures/peer/lockfile`. Before, each of the two files made its own copy of the path. The paths do not change.
|
|
47
|
+
- @procedures/client@0.52.4
|
|
48
|
+
- @procedures/fs@0.52.4
|
|
49
|
+
- @procedures/peer@0.52.4
|
|
50
|
+
|
|
51
|
+
## 0.52.3
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- Updated dependencies [db1bcaa]
|
|
56
|
+
- @procedures/client@0.52.3
|
|
57
|
+
- @procedures/fs@0.52.3
|
|
58
|
+
- @procedures/peer@0.52.3
|
|
59
|
+
|
|
3
60
|
## 0.52.2
|
|
4
61
|
|
|
5
62
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -337,11 +337,16 @@ await life.done; // the runner ends the process after the stop in stages
|
|
|
337
337
|
- **The lockfile.** `lockfile` makes the lockfile a dependency of the service. The startup writes it before the listeners start, and the shutdown removes it after the listeners close.
|
|
338
338
|
- **The probes.** Each listener of the host answers the probes under `/_probes` (CLI-9). `probes: { port, host, prefix, retryAfter }` moves them to a probe server on a port of its own (decision D5). `probes()` of the result gives the base URL of each place that answers them.
|
|
339
339
|
- **The parts of the app.** `declare(svc, host)` gives the builder of the service to the app before `run()` (CLI-62). The app declares its transports, dependencies, checks and phase work with the methods of the builder. `describe()` shows them, and the runner starts and stops them with the host. The example follows this list.
|
|
340
|
+
- **The telemetry.** `telemetry` starts the telemetry SDK of the app before the dependencies and the listeners (CLI-130). The phase `flush the output` stops it last. The example after the list shows it.
|
|
340
341
|
- **Outside a service.** `startServer()` starts the same server as a peer, for a test or an app that has its own lifecycle.
|
|
341
342
|
|
|
342
343
|
```typescript
|
|
344
|
+
import { startNodeTelemetry } from "@mark1russell7/otel-ts/node";
|
|
345
|
+
|
|
343
346
|
const { host, life } = await runProcedureHost({
|
|
344
347
|
name: "app-dev",
|
|
348
|
+
// The host gives { stopOnSignals: false }: the runner owns the signals
|
|
349
|
+
telemetry: (options) => startNodeTelemetry({ serviceName: "app-dev", ...options }),
|
|
345
350
|
mode: "foreground",
|
|
346
351
|
// The calls wait for the readiness of the dependency of the app (CLI-45)
|
|
347
352
|
host: { name: "app", registry, policy, controller: { requires: ["mongo"] }, listen },
|
|
@@ -361,6 +366,7 @@ const { host, life } = await runProcedureHost({
|
|
|
361
366
|
- The parts of the app come after the parts of the host. Thus the server of the host starts before a transport of the app. A listener of the app can mount `host.handler`.
|
|
362
367
|
- The lockfile comes after the dependencies of the app. It connects last, and it closes first.
|
|
363
368
|
- Without `declare`, the service has only the parts of the host.
|
|
369
|
+
- The cap of the phase `flush the output` limits the wait for the telemetry: 1 s in `localDev` and `daemon`. The host refuses `telemetry` with a profile that has no such phase.
|
|
364
370
|
|
|
365
371
|
#### The logger
|
|
366
372
|
|