@webpieces/ipc-bridge 0.4.979 → 0.4.980
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 +20 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -54,3 +54,23 @@ One connection has one dispatcher containing multiple APIs. Duplicate registrati
|
|
|
54
54
|
`createScoped(Api, scope)` accepts an `IpcControllerScope<T>` whose `create(context)` supplies the implementation for that invocation. Inject a `clients.withContext(context)` proxy into this controller when it calls back or invokes another API. Concurrent calls have separate context objects and do not overwrite a global async context.
|
|
55
55
|
|
|
56
56
|
A host may register receivers and create client proxies on both ends of the same connection. `IpcConnection` owns transport parse/send failures and disposal; see the connection and logging contracts above for the transport and logging contracts, error ownership, security responsibilities and downstream native lifecycle tests.
|
|
57
|
+
|
|
58
|
+
## Build-time guard rules (`@webpieces/code-rules`)
|
|
59
|
+
|
|
60
|
+
Four code rules keep an application's bridge honest at the build gate (issue #1389). They ship in
|
|
61
|
+
`@webpieces/code-rules` (delivered by `@webpieces/webpieces-tooling`) and are configured in the code-rules
|
|
62
|
+
owner file (`.webpieces-config/rules/code-rules.json` or wherever `rulePacks` points). Every path, module
|
|
63
|
+
and refusal list is required config — no rule supplies a value of its own.
|
|
64
|
+
|
|
65
|
+
| Rule | Scope | Checks |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| `ipc-boundary` | per file (`NEW_AND_MODIFIED_FILES` / `MODIFIED_PROJECTS` / `RUN_EVERY_TIME`) | `@webpieces/ipc-bridge` and its factories only in `compositionFiles`; raw `IpcConnection`/`IpcRequest`/… and WebView delivery only in `transportFiles` (and `bootstrapFiles` for discovery); retired modules/identifiers, handwritten wire-client class names and `.spec-support` imports refused everywhere |
|
|
68
|
+
| `ipc-contract-shape` | per file, `contractPaths` only | `@WpInternal` on every directional API, `@WpIpcEndpoint` + `@MaskLog` on every method, one required named DTO, a `Promise` return, unique ids, no host/endpoint imports, the contract project's `requiredProjectTags` |
|
|
69
|
+
| `ipc-pairing` | the IPC project set (`MODIFIED_PROJECTS` / `RUN_EVERY_TIME`) | a generated `createClient(Api)` at every sender, exactly one `create`/`createScoped(Api, …)` at the receiver whose controller extends the same API, no handwritten dispatch map, and the optional wire table agrees with the decorators |
|
|
70
|
+
| `ipc-protocol-fingerprint` | the IPC project set | the committed `{ protocol, fingerprint }` manifest matches the contract (ids, kinds, wire rows, resolved DTO shapes, normalized decorator/mask/validator source), and a wire change raises the version constant relative to the branch base. Re-record with `pnpm wp-ipc-record-protocol` |
|
|
71
|
+
|
|
72
|
+
None of them builds a TypeScript program over the repository. The two per-file rules parse one file at a
|
|
73
|
+
time; the only type-checked program (`ipc-pairing`, `ipc-protocol-fingerprint`) is rooted at the
|
|
74
|
+
`contractPaths` files alone, so memory follows the contract library, not the repo. The field-by-field
|
|
75
|
+
reference is the doc comment on each config class in
|
|
76
|
+
`packages/tooling/code-rules/src/configs/ipc-configs.ts`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webpieces/ipc-bridge",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.980",
|
|
4
4
|
"description": "Portable typed duplex IPC client and server factories for browser, React Native and Node",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@webpieces/core-util": "0.4.
|
|
25
|
+
"@webpieces/core-util": "0.4.980"
|
|
26
26
|
}
|
|
27
27
|
}
|