@procedures/mark 0.46.0 → 0.47.2
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 +79 -12
- package/README.md +7 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -1
- package/dist/bin.js +6 -1
- package/dist/bin.js.map +1 -1
- package/dist/cli.d.ts +8 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +44 -4
- package/dist/cli.js.map +1 -1
- package/dist/compile-cache.d.ts +31 -0
- package/dist/compile-cache.d.ts.map +1 -0
- package/dist/compile-cache.js +45 -0
- package/dist/compile-cache.js.map +1 -0
- package/dist/ecosystem.d.ts +26 -2
- package/dist/ecosystem.d.ts.map +1 -1
- package/dist/ecosystem.js +106 -8
- package/dist/ecosystem.js.map +1 -1
- package/dist/manifest-build.js +3 -2
- package/dist/manifest-build.js.map +1 -1
- package/dist/manifest.d.ts +17 -6
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +15 -8
- package/dist/manifest.js.map +1 -1
- package/dist/manifest.json +1054 -120
- package/dist/print.d.ts.map +1 -1
- package/dist/print.js +9 -1
- package/dist/print.js.map +1 -1
- package/package.json +52 -52
- package/src/bin.ts +7 -1
- package/src/cli.ts +44 -4
- package/src/compile-cache.ts +51 -0
- package/src/ecosystem.ts +115 -8
- package/src/manifest-build.ts +3 -2
- package/src/manifest.ts +27 -8
- package/src/print.ts +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
# @procedures/mark
|
|
2
2
|
|
|
3
|
+
## 0.47.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [0650616]
|
|
8
|
+
- Updated dependencies [ae1e3fd]
|
|
9
|
+
- Updated dependencies [f1ece74]
|
|
10
|
+
- @procedures/client@0.47.2
|
|
11
|
+
- @procedures/cli-kit@0.47.2
|
|
12
|
+
- @procedures/cli-run@0.47.2
|
|
13
|
+
- @procedures/fs@0.47.2
|
|
14
|
+
- @procedures/lib@0.47.2
|
|
15
|
+
- @procedures/pnpm@0.47.2
|
|
16
|
+
- @procedures/procedure@0.47.2
|
|
17
|
+
- @procedures/peer@0.47.2
|
|
18
|
+
- @procedures/shell@0.47.2
|
|
19
|
+
- @procedures/vitest@0.47.2
|
|
20
|
+
- @procedures/mcp-dev-tools@0.47.2
|
|
21
|
+
- @procedures/server@0.47.2
|
|
22
|
+
|
|
23
|
+
## 0.47.1
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [f845c6d]
|
|
28
|
+
- @procedures/client@0.47.1
|
|
29
|
+
- @procedures/lib@0.47.1
|
|
30
|
+
- @procedures/cli-kit@0.47.1
|
|
31
|
+
- @procedures/cli-run@0.47.1
|
|
32
|
+
- @procedures/fs@0.47.1
|
|
33
|
+
- @procedures/pnpm@0.47.1
|
|
34
|
+
- @procedures/procedure@0.47.1
|
|
35
|
+
- @procedures/peer@0.47.1
|
|
36
|
+
- @procedures/shell@0.47.1
|
|
37
|
+
- @procedures/vitest@0.47.1
|
|
38
|
+
- @procedures/mcp-dev-tools@0.47.1
|
|
39
|
+
- @procedures/server@0.47.1
|
|
40
|
+
|
|
41
|
+
## 0.47.0
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- ff06c60: O90: the `mark` executable enables the compile cache of Node.js before it loads the CLI. The cache folder is `mark/compile-cache` in the cache folder of the user. In CI, one call took 1019 ms with no cache and 754 ms with a warm cache. `NODE_COMPILE_CACHE` and `NODE_DISABLE_COMPILE_CACHE` still control the cache.
|
|
46
|
+
- d987202: A call of `mark` loads only the packages of its path (roadmap O93). `ProcedureRegistry` gets an optional resolver, `resolve(path)` and `loadAll()`. `createLazyRegistry()` makes a registry that loads a package at the first lookup of one of its paths. A procedure that reads or writes the registry gets each package first. The manifest of `mark` (version 3) has the packages of each command. The packages `ws` and `cli-table3` load at their first use. The sync methods of the registry and the eager registries do not change.
|
|
47
|
+
- e913014: Each module imports zod with `import * as z from "zod"`, not `import { z } from "zod"`. With the old form, an esbuild bundle got each locale of zod: 264 kB of minified code (esbuild metafile of the journey worker of the site). The Vite build of the site gives the same worker files with both forms. The procedure scaffolder writes the new form in `types.ts`. The API and the behavior stay the same.
|
|
48
|
+
- Updated dependencies [c9125a8]
|
|
49
|
+
- Updated dependencies [335728b]
|
|
50
|
+
- Updated dependencies [d987202]
|
|
51
|
+
- Updated dependencies [45a737f]
|
|
52
|
+
- Updated dependencies [d77e9e8]
|
|
53
|
+
- Updated dependencies [e913014]
|
|
54
|
+
- Updated dependencies [2f0c7b0]
|
|
55
|
+
- Updated dependencies [ad70c38]
|
|
56
|
+
- Updated dependencies [47819c6]
|
|
57
|
+
- @procedures/client@0.47.0
|
|
58
|
+
- @procedures/cli-kit@0.47.0
|
|
59
|
+
- @procedures/cli-run@0.47.0
|
|
60
|
+
- @procedures/fs@0.47.0
|
|
61
|
+
- @procedures/lib@0.47.0
|
|
62
|
+
- @procedures/peer@0.47.0
|
|
63
|
+
- @procedures/pnpm@0.47.0
|
|
64
|
+
- @procedures/procedure@0.47.0
|
|
65
|
+
- @procedures/server@0.47.0
|
|
66
|
+
- @procedures/shell@0.47.0
|
|
67
|
+
- @procedures/vitest@0.47.0
|
|
68
|
+
- @procedures/mcp-dev-tools@0.47.0
|
|
69
|
+
|
|
3
70
|
## 0.46.0
|
|
4
71
|
|
|
5
72
|
### Patch Changes
|
|
@@ -317,8 +384,8 @@
|
|
|
317
384
|
- A host whose `expose`, policy or limit pattern names such a path in text uses the encoded form, for example `collections.e2e%2Etabs.*`.
|
|
318
385
|
- An `mcpExclude` entry, an `expose` deny entry or a limit entry in the old raw form, for example `collections.e2e.tabs.drop`, does not match. The check compares the encoded key, so the procedure becomes visible, or the limit does not apply. Write each such entry in the encoded form, for example `collections.e2e%2Etabs.drop`.
|
|
319
386
|
- A subscriber of a dotted collection uses `collectionChangeTopic(name)`. The raw topic `collections.a.b` is the topic of the partition `b` of `a`.
|
|
320
|
-
-
|
|
321
|
-
-
|
|
387
|
+
- An app: read the collection of a topic with `collectionTopicPartition(topic)`, not with a pattern, for example `/^collections\.([^.]+)\./`.
|
|
388
|
+
- Other apps: no change, if their collection names have no `.` and no `%`.
|
|
322
389
|
|
|
323
390
|
### Patch Changes
|
|
324
391
|
|
|
@@ -335,7 +402,7 @@
|
|
|
335
402
|
|
|
336
403
|
Migration:
|
|
337
404
|
|
|
338
|
-
-
|
|
405
|
+
- Apps: no change at this time. The deprecated names work until the next MINOR.
|
|
339
406
|
- Before the next MINOR, replace `zodAdapter<T>(schema)` with `schema`. To keep the check of a schema against a type, write `const schema: z.ZodType<T> = ...`.
|
|
340
407
|
- Before the next MINOR, replace `typedAnySchema<T>()` and `outputSchema<T>()` with `typed<T>()`.
|
|
341
408
|
- A parse-only object (`{ parse }`) in `zodAdapter` becomes a Standard Schema with a `~standard` property.
|
|
@@ -742,9 +809,9 @@
|
|
|
742
809
|
- A script that starts `mark server create` as a server in the foreground: start `mark --server` or `procedure-server` in its place.
|
|
743
810
|
- A program that calls `run()`, `main()` or `executeArgs()` of `@procedures/mark`: no change. It keeps its process. Give `ownsProcess: true` to give the process to the runner, as the bin does.
|
|
744
811
|
- The site: no change. It does not start `mark`.
|
|
745
|
-
-
|
|
746
|
-
-
|
|
747
|
-
-
|
|
812
|
+
- An app: no change. Its dev host starts through `runProcedureHost()`, not through `mark`.
|
|
813
|
+
- An app: no change. It does not start `mark`.
|
|
814
|
+
- An app: no change, unless one of its scripts reads the exit code of an interrupted `mark` command. Then apply the first step.
|
|
748
815
|
|
|
749
816
|
### Patch Changes
|
|
750
817
|
|
|
@@ -825,9 +892,9 @@
|
|
|
825
892
|
|
|
826
893
|
- A host with more than 256 clients at one time: give a larger `maxSessions`, or `maxSessions: Infinity` for no limit. Give it in `faces.http` of `createMcpHost()`, in `mcpFace()`, or with `mark mcp --http <port> --max-sessions <n>`.
|
|
827
894
|
- A host that keeps more than 1000 tasks: give a larger `maxStored`, or `maxStored: Infinity`, in `tasks` of the host or in `new McpTaskStore()`.
|
|
828
|
-
- The site and
|
|
829
|
-
-
|
|
830
|
-
-
|
|
895
|
+
- The site and an app: no change. They have no MCP host.
|
|
896
|
+
- An app: no change. Its `mcpFace()` on the procedures host gets the limit of 256 sessions, and its MCP host over stdio has no HTTP face. To keep no limit, give `mcpFace({ maxSessions: Infinity })`.
|
|
897
|
+
- An app: no change. Its MCP host has only stdio and SDK faces, and it has no tasks.
|
|
831
898
|
- polite-crawler-mcp: no change for the sessions, because it sets `maxSessions: 32`. Its `McpTaskStore` gets the limit of 1000 stored tasks. Before, 32 sessions of 100 tasks bounded the store at 3200 tasks. To keep that bound, give `new McpTaskStore({ maxStored: 3200 })`.
|
|
832
899
|
- polite-crawler-mcp also gives the deprecated option `mount: true`, which has no effect. Remove it when it moves to the new range.
|
|
833
900
|
|
|
@@ -958,7 +1025,7 @@
|
|
|
958
1025
|
|
|
959
1026
|
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.
|
|
960
1027
|
|
|
961
|
-
|
|
1028
|
+
Apps: no change. A host with a listener now also answers the paths under `/_probes`. Before, these paths got 404.
|
|
962
1029
|
- Updated dependencies [636f098]
|
|
963
1030
|
- @procedures/peer@0.17.3
|
|
964
1031
|
- @procedures/server@0.17.3
|
|
@@ -1088,7 +1155,7 @@
|
|
|
1088
1155
|
- The listener of the Streamable HTTP face: the options `port`, `host` and `server` of `HttpTransportOptions`, and `McpHttpTransport.listen()`. Give `mount: true`, and mount `McpHost.handleHttp` on a listener of the service.
|
|
1089
1156
|
- `startDevToolsServer()` of `@procedures/mcp-dev-tools`. Use `runDevToolsServer()`.
|
|
1090
1157
|
|
|
1091
|
-
Migration for the next MINOR: the site uses none of them.
|
|
1158
|
+
Migration for the next MINOR: the site uses none of them. One app uses none of them. Another app mounts `mcpFace()` on its host, and its stdio host keeps `createMcpHost()` with `stdio`: no change. A third app uses `createMcpHost()` with stdio and SDK faces: no change. A host with `faces.http: { port }` moves to `faces.http: { mount: true }` and a listener of the service.
|
|
1092
1159
|
- Updated dependencies [85999c1]
|
|
1093
1160
|
- Updated dependencies [fc968f6]
|
|
1094
1161
|
- Updated dependencies [dc7a462]
|
|
@@ -1230,7 +1297,7 @@
|
|
|
1230
1297
|
|
|
1231
1298
|
Migration steps:
|
|
1232
1299
|
|
|
1233
|
-
-
|
|
1300
|
+
- Apps: no change is necessary. They do not start these entries.
|
|
1234
1301
|
- A script that starts `procedure-server` or `mark serve` and stops it with a signal: no change is necessary. Wait for the exit, in 10 s at most.
|
|
1235
1302
|
- A program that embeds the server outside a service: use `startServer()`, which starts it as a peer, and `peer.stop()`.
|
|
1236
1303
|
|
package/README.md
CHANGED
|
@@ -95,6 +95,12 @@ node packages/mark/dist/cli.js --help
|
|
|
95
95
|
- Node.js >= 22.0.0
|
|
96
96
|
- pnpm (the version of the workspace `packageManager` field)
|
|
97
97
|
|
|
98
|
+
### The compile cache
|
|
99
|
+
|
|
100
|
+
The `mark` executable enables the compile cache of Node.js (22.1 and later) before it loads the CLI. The second and later runs read the compiled code from the cache. In CI, one `mark` call took 1019 ms with no cache and 754 ms with a warm cache. The first run after an install, or after a change of a file, writes the cache and takes approximately 170 ms more.
|
|
101
|
+
|
|
102
|
+
The cache folder is `mark/compile-cache` in the cache folder of the user: `$XDG_CACHE_HOME` or `~/.cache` on Linux, `~/Library/Caches` on macOS and `%LOCALAPPDATA%` on Windows. Set `NODE_COMPILE_CACHE=<folder>` to use a different folder, or `NODE_DISABLE_COMPILE_CACHE=1` to turn the cache off. If the folder cannot be written, `mark` runs with no cache.
|
|
103
|
+
|
|
98
104
|
## Execution Flow
|
|
99
105
|
|
|
100
106
|
```mermaid
|
|
@@ -492,7 +498,7 @@ A package that does not load gives one warning line. A package that is not built
|
|
|
492
498
|
**Example register.js:**
|
|
493
499
|
```typescript
|
|
494
500
|
import { defineProcedure } from "@procedures/client";
|
|
495
|
-
import
|
|
501
|
+
import * as z from "zod";
|
|
496
502
|
|
|
497
503
|
const libNew = defineProcedure({
|
|
498
504
|
path: ["lib", "new"],
|