@abide/abide 0.125.1 → 0.125.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @abide/abide
2
2
 
3
+ ## 0.125.2
4
+
5
+ ### Patch Changes
6
+
7
+ - d1029ab: A `Middleware` whose `Extra` asks for `args` fits a keyed handler again — 16.86. 0.125.1's plain rung array inferred the handler's `Args` off the rung's `args: () => unknown` as well as off the `Keyed`, and refused the handler.
8
+
3
9
  ## 0.125.1
4
10
 
5
11
  ### Patch Changes
package/docs/REGISTRY.md CHANGED
@@ -268,7 +268,7 @@ type Reached = { readonly [REACHED]: true }
268
268
  | Name | Signature | Meaning | Rules |
269
269
  | --- | --- | --- | --- |
270
270
  | `description` | `string` | The human description carried onto every generated surface. | 16.28 |
271
- | `middleware` | `{ [At in keyof Answers]: (next: (ctx?: { request: Request; args: () => Args }) => Promise<Reached>, ctx: { request: Request; args: () => Args }) => Answers[At] \| Promise<Answers[At]> } \| readonly ((next: (ctx?: { request: Request; args: () => Args }) => Promise<Reached>, ctx: { request: Request; args: () => Args }) => unknown)[]` | The rungs run per call. | 16.8, 16.11, 16.12, 16.16, 16.17, 16.18, 16.19, 16.20, 16.86 |
271
+ | `middleware` | `{ [At in keyof Answers]: (next: (ctx?: { request: Request; args: () => Args }) => Promise<Reached>, ctx: { request: Request; args: () => Args }) => Answers[At] \| Promise<Answers[At]> } \| readonly ((next: (ctx?: { request: Request; args: () => NoInfer<Args> }) => Promise<Reached>, ctx: { request: Request; args: () => NoInfer<Args> }) => unknown)[]` | The rungs run per call. | 16.8, 16.11, 16.12, 16.16, 16.17, 16.18, 16.19, 16.20, 16.86 |
272
272
  | `timeout` | `number` | How long the call may go without progress. | 16.22, 16.58, 16.59, 16.60, 16.61, 16.77 |
273
273
  | `clients` | `Clients` | Which surfaces carry this handler. | 16.37, 20.3 |
274
274
  | `crossOrigin` | `boolean \| string[]` | Whether other origins may call it, or follow it over the mux. | 16.24, 18.2, 21.19 |
package/docs/abide.md CHANGED
@@ -8528,7 +8528,7 @@ Reactive primitives: what is written in place rather than imported.
8528
8528
  | Name | Signature | Meaning | Rules |
8529
8529
  | --- | --- | --- | --- |
8530
8530
  | `description` | `string` | The human description carried onto every generated surface. | [16.28](/rulebook#16.28) |
8531
- | `middleware` | `{ [At in keyof Answers]: (next: (ctx?: { request: Request; args: () => Args }) => Promise<Reached>, ctx: { request: Request; args: () => Args }) => Answers[At] \| Promise<Answers[At]> } \| readonly ((next: (ctx?: { request: Request; args: () => Args }) => Promise<Reached>, ctx: { request: Request; args: () => Args }) => unknown)[]` | The rungs run per call. | [16.8](/rulebook#16.8), [16.11](/rulebook#16.11), [16.12](/rulebook#16.12), [16.16](/rulebook#16.16), [16.17](/rulebook#16.17), [16.18](/rulebook#16.18), [16.19](/rulebook#16.19), [16.20](/rulebook#16.20), [16.86](/rulebook#16.86) |
8531
+ | `middleware` | `{ [At in keyof Answers]: (next: (ctx?: { request: Request; args: () => Args }) => Promise<Reached>, ctx: { request: Request; args: () => Args }) => Answers[At] \| Promise<Answers[At]> } \| readonly ((next: (ctx?: { request: Request; args: () => NoInfer<Args> }) => Promise<Reached>, ctx: { request: Request; args: () => NoInfer<Args> }) => unknown)[]` | The rungs run per call. | [16.8](/rulebook#16.8), [16.11](/rulebook#16.11), [16.12](/rulebook#16.12), [16.16](/rulebook#16.16), [16.17](/rulebook#16.17), [16.18](/rulebook#16.18), [16.19](/rulebook#16.19), [16.20](/rulebook#16.20), [16.86](/rulebook#16.86) |
8532
8532
  | `timeout` | `number` | How long the call may go without progress. | [16.22](/rulebook#16.22), [16.58](/rulebook#16.58), [16.59](/rulebook#16.59), [16.60](/rulebook#16.60), [16.61](/rulebook#16.61), [16.77](/rulebook#16.77) |
8533
8533
  | `clients` | `Clients` | Which surfaces carry this handler. | [16.37](/rulebook#16.37), [20.3](/rulebook#20.3) |
8534
8534
  | `crossOrigin` | `boolean \| string[]` | Whether other origins may call it, or follow it over the mux. | [16.24](/rulebook#16.24), [18.2](/rulebook#18.2), [21.19](/rulebook#21.19) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abide/abide",
3
- "version": "0.125.1",
3
+ "version": "0.125.2",
4
4
  "type": "module",
5
5
  "description": "Isomorphic type-safe framework for reactive async interfaces for humans and machines",
6
6
  "license": "MIT",
package/src/shared/rpc.ts CHANGED
@@ -223,11 +223,13 @@ export type RpcOptions<
223
223
  *
224
224
  * The plain array arm is the context a list built by a GENERIC helper is typed in: the mapped
225
225
  * arm is over `Answers`, still being inferred, so the helper's own `Args` read nothing there and
226
- * are `unknown`. It adds no refusal of its own — `Answers` is still read off the list.
226
+ * are `unknown`. It adds no refusal of its own — `Answers` is still read off the list — and
227
+ * no `Args` either: a `Middleware` asking `args: () => unknown` of its context would otherwise
228
+ * widen a keyed handler's to `unknown`, which its `Keyed` then refuses.
227
229
  */
228
230
  middleware?:
229
231
  | { [At in keyof Answers]: HandlerRung<Args, Answers[At]> }
230
- | readonly HandlerRung<Args, unknown>[]
232
+ | readonly HandlerRung<NoInfer<Args>, unknown>[]
231
233
  timeout?: number
232
234
  clients?: Clients
233
235
  crossOrigin?: boolean | string[]