@owlmeans/entrypoint 0.1.18-rc.6 → 0.1.18-rc.7

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/entrypoint",
4
- "version": "0.1.18-rc.6",
5
- "generatedAt": "2026-08-18T14:48:00.550Z",
4
+ "version": "0.1.18-rc.7",
5
+ "generatedAt": "2026-08-24T21:14:00.139Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -8,16 +8,16 @@ user-invocable: false
8
8
  # @owlmeans/entrypoint
9
9
 
10
10
  **Layer:** Core
11
- **Install:** `"@owlmeans/entrypoint": "^0.1.18-rc.6"` in `dependencies`
11
+ **Install:** `"@owlmeans/entrypoint": "^0.1.18-rc.7"` in `dependencies`
12
12
 
13
13
  ## Key Exports
14
14
 
15
15
  | Export | Description |
16
16
  |--------|-------------|
17
- | `entrypoint(...builders)` | Compose an entrypoint declaration from builders |
18
- | `guard(alias, ...gates)` | Attach a security guard |
19
- | `gate(alias, scopes[])` | Define an auth gate (used inside a guard) |
20
- | `filter(...validators)` | Attach request validators |
17
+ | `entrypoint(route, opts?)` | Declare an entrypoint on a route |
18
+ | `guard(alias, opts?)` | Require a guard; returns options, so it wraps rather than takes them |
19
+ | `gate(alias, params, opts?)` | Require a gate; passed as the `opts` of `guard(...)` |
20
+ | `filter(filter, opts?)` | Attach request validators |
21
21
  | `body(Schema)` | AJV body validator |
22
22
  | `params(Schema)` | URL params validator |
23
23
  | `query(Schema)` | Query string validator |
@@ -25,6 +25,20 @@ user-invocable: false
25
25
  | `EntrypointOutcome` | Enum: Ok, Accepted, Created, Finished |
26
26
  | Constants | Built-in entrypoint aliases |
27
27
 
28
+ `guard`, `gate` and `filter` are **options-object combinators, not variadic composers**. Each
29
+ returns a `CommonEntrypointOptions` and takes the next one as its final argument, so they nest:
30
+
31
+ ```typescript
32
+ entrypoint(
33
+ route(app.api.item.remove, '/:id', { parent: app.api.item, method: RouteMethod.DELETE }),
34
+ guard(DEFAULT_GUARD, gate(OIDC_GATE, ['item--delete@id']))
35
+ )
36
+ ```
37
+
38
+ Guards and gates are **inherited by child entrypoints** and enforced by the framework before a
39
+ handler runs — a handler that re-checks them is duplicating an enforced rule, and is wrong even
40
+ when it agrees.
41
+
28
42
  ## Subpath Exports
29
43
 
30
44
  - `./utils` — entrypoint construction helpers (`isEntrypoint`, `CreateEntrypointSignature`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/entrypoint",
3
- "version": "0.1.18-rc.6",
3
+ "version": "0.1.18-rc.7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {