@hediet/linkrpc-infra 0.0.2 → 0.0.3-next.20260921.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.
Files changed (2) hide show
  1. package/README.md +11 -3
  2. package/package.json +9 -4
package/README.md CHANGED
@@ -61,15 +61,23 @@ core `materializeJsonSchema` helper; they are not automatically enforced by
61
61
  these structural validators. Review importer diagnostics before treating an
62
62
  approximation as an exact protocol model.
63
63
 
64
- An endpoint can register several interfaces and bind each to an external prefix
65
- with `connection.bindBare(definition, { prefix })`. Bundle client addressing
66
- once with the core `bareInterfaceTarget` helper:
64
+ Bundle an interface with its external prefix using the core
65
+ `bareInterfaceTarget` helper. The same target supplies incoming routing at
66
+ registration time and outgoing client addressing:
67
67
 
68
68
  ```ts
69
69
  const cdpRuntime = bareInterfaceTarget(cdpRuntimeInterface, { prefix: 'Runtime.' });
70
+ const registration = connection.register(cdpRuntime, handlers);
70
71
  const runtime = connection.get(cdpRuntime);
71
72
  ```
72
73
 
74
+ Registration installs the implementation and its bare route together;
75
+ `registration.dispose()` removes both. Native interface-qualified addressing
76
+ remains available. To mount the implementation under a named service, pass
77
+ `{ serviceId: 'browser-1' }` as the third registration argument, or use
78
+ `connection.service('browser-1').register(cdpRuntime, handlers)`. Prefixes
79
+ remain unique across the whole connection, not per service.
80
+
73
81
  The immutable target contains the interface, bare-addressing mode, and prefix;
74
82
  it does not change the interface schema or hash. The existing
75
83
  `connection.getBare(definition, { prefix })` API remains available. A CDP
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hediet/linkrpc-infra",
3
- "version": "0.0.2",
3
+ "version": "0.0.3-next.20260921.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -23,7 +23,7 @@
23
23
  "sideEffects": false,
24
24
  "peerDependencies": {
25
25
  "zod": "^4.4.3",
26
- "@hediet/linkrpc": "0.0.2"
26
+ "@hediet/linkrpc": "0.0.3-next.20260921.2"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/node": "^20.0.0",
@@ -32,7 +32,7 @@
32
32
  "vitest": "^3.0.0",
33
33
  "vscode-json-languageserver": "1.3.4",
34
34
  "zod": "^4.4.3",
35
- "@hediet/linkrpc": "0.0.2"
35
+ "@hediet/linkrpc": "0.0.3-next.20260921.2"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "tsdown",
@@ -41,5 +41,10 @@
41
41
  "test:generated-interop": "vitest --run test/protocols/contracts/contracts.test.ts test/protocols/generatedInterop.crossLanguage.test.ts test/protocols/typedErrors.crossLanguage.test.ts test/protocols/protocolInterop.live.test.ts",
42
42
  "test:typed-errors-interop": "vitest --run test/protocols/typedErrors.crossLanguage.test.ts",
43
43
  "test:watch": "vitest"
44
+ },
45
+ "gitHead": "b2c0900b9a4223c06d2d438e7063211950c3b2e8",
46
+ "gitDirty": false,
47
+ "publishConfig": {
48
+ "tag": "next"
44
49
  }
45
- }
50
+ }