@dudousxd/nestjs-authz-codegen 0.3.0 → 0.4.0

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,30 @@
1
1
  # @dudousxd/nestjs-authz-codegen
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Back on the 0.x line. The 1.x and 2.x versions were published by accident: a release-tooling peer cascade bumped this package to a major, not an API decision. 0.4.0 contains everything those versions shipped (console `authorize` support, tenancy, Node 24+ `engines`) with no other change. Upgrade from 1.x/2.x to 0.4.0; those versions are deprecated.
8
+
9
+ ## 2.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - [#74](https://github.com/DavideCarvalho/nestjs-authz/pull/74) [`35421dc`](https://github.com/DavideCarvalho/nestjs-authz/commit/35421dc5b09bd271d5087d26e8536191ef6ba342) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - **Breaking:** require Node.js 24 or newer (`engines.node` is now `>=24`; it was `>=22`, and `>=20` for `-client` and `-react`). CI tests on Node 24 and 26. No API changes: see the Upgrading page in the docs.
14
+
15
+ ## 1.0.0
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [[`750a6b3`](https://github.com/DavideCarvalho/nestjs-authz/commit/750a6b3f80deea3803dec8df5f9f8cf67a046ac1)]:
20
+ - @dudousxd/nestjs-authz@0.10.0
21
+
22
+ ## 0.3.1
23
+
24
+ ### Patch Changes
25
+
26
+ - [#70](https://github.com/DavideCarvalho/nestjs-authz/pull/70) [`416f0bd`](https://github.com/DavideCarvalho/nestjs-authz/commit/416f0bd7d9340f6f3314017d4925cb89834c4342) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - README fixes: the codegen README no longer describes the removed `PostPolicy` → `Post` name guess and lists `@PolicyFor` among the names that must not be aliased; the core README covers the dropped `DecisionProvider` deny message and the expected boot error under `unannotated: 'allow'`.
27
+
3
28
  ## 0.3.0
4
29
 
5
30
  ### Minor Changes
package/README.md CHANGED
@@ -51,7 +51,7 @@ How each form maps to a client ability:
51
51
 
52
52
  | Decorator | Client ability |
53
53
  | --- | --- |
54
- | `@Can(PostPolicy, 'update', byId(Post))` | `update` on `Post` (from `byId`, else the policy's `@PolicyFor` link, else `PostPolicy` → `Post`) |
54
+ | `@Can(PostPolicy, 'update', byId(Post))` | `update` on `Post` (from `byId`, else the policy's `@PolicyFor` link; with neither, no resource) |
55
55
  | `@Can(PermissionPolicy, 'has', permission('posts.publish'))`, `@Permission('posts.publish')` | `posts.publish` |
56
56
  | `@Can(GatePolicy, 'allows', ability('access-admin'))` | `access-admin` |
57
57
  | `@Roles(...)`, `@Can(RolePolicy, ...)` | none (roles are not client abilities) |
@@ -120,7 +120,7 @@ async can(@Body() body: { ability: string; resource?: { type: string; id?: strin
120
120
 
121
121
  ## Caveats
122
122
 
123
- Decorators are discovered by their **canonical names** — import `@Can` / `@Policy` under their real
124
- names. An aliased import (`import { Can as Authorize } from '@dudousxd/nestjs-authz'`) is NOT
125
- discovered, because codegen matches the decorator identifier (`Can` / `Policy`) syntactically and
126
- does not resolve aliases.
123
+ Decorators are discovered by their **canonical names** — import `@Can`, `@Permission`, `@Policy`
124
+ and `@PolicyFor` under their real names. An aliased import
125
+ (`import { Can as Authorize } from '@nestjs/authorization'`) is NOT discovered, because codegen
126
+ matches the decorator identifier syntactically and does not resolve aliases.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dudousxd/nestjs-authz-codegen",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "nestjs-codegen extension for @dudousxd/nestjs-authz — discovers @Can abilities and emits a typed can() into your generated client.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,7 +38,7 @@
38
38
  "CHANGELOG.md"
39
39
  ],
40
40
  "peerDependencies": {
41
- "@dudousxd/nestjs-authz": ">=0.9.0 <0.10.0",
41
+ "@dudousxd/nestjs-authz": ">=0.10.0",
42
42
  "@dudousxd/nestjs-authz-client": ">=0.0.0",
43
43
  "@dudousxd/nestjs-codegen": ">=0.4.0"
44
44
  },
@@ -52,11 +52,11 @@
52
52
  "ts-morph": "28.0.0",
53
53
  "typescript": "5.9.3",
54
54
  "vitest": "3.2.7",
55
- "@dudousxd/nestjs-authz-client": "^0.2.2",
56
- "@dudousxd/nestjs-authz": "^0.9.1"
55
+ "@dudousxd/nestjs-authz": "^0.11.0",
56
+ "@dudousxd/nestjs-authz-client": "^0.3.0"
57
57
  },
58
58
  "engines": {
59
- "node": ">=22"
59
+ "node": ">=24"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "tsc -p tsconfig.json --incremental false",