@ultimat3/action 31.38.1 → 31.40.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/package.json +9 -9
- package/src/errors.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/action",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.40.0",
|
|
4
4
|
"description": "The action primitive: one declaration projected to route, OpenAPI, client, MCP tool, job handle, tests",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ultimate",
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"test": "bun test"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@ultimat3/cache": "31.
|
|
52
|
-
"@ultimat3/core": "31.
|
|
53
|
-
"@ultimat3/db": "31.
|
|
54
|
-
"@ultimat3/entity": "31.
|
|
55
|
-
"@ultimat3/http": "31.
|
|
56
|
-
"@ultimat3/policy": "31.
|
|
57
|
-
"@ultimat3/schema": "31.
|
|
58
|
-
"@ultimat3/storage": "31.
|
|
51
|
+
"@ultimat3/cache": "31.40.0",
|
|
52
|
+
"@ultimat3/core": "31.40.0",
|
|
53
|
+
"@ultimat3/db": "31.40.0",
|
|
54
|
+
"@ultimat3/entity": "31.40.0",
|
|
55
|
+
"@ultimat3/http": "31.40.0",
|
|
56
|
+
"@ultimat3/policy": "31.40.0",
|
|
57
|
+
"@ultimat3/schema": "31.40.0",
|
|
58
|
+
"@ultimat3/storage": "31.40.0"
|
|
59
59
|
}
|
|
60
60
|
}
|
package/src/errors.ts
CHANGED
|
@@ -120,13 +120,14 @@ export class ActionPathDuplicateError extends UltimateError {
|
|
|
120
120
|
* the `can('<the action name>')` this used to emit was a snippet that could not compile, and
|
|
121
121
|
* `assertPermission` would refuse it once the app declared its own set. Same split
|
|
122
122
|
* `@ultimat3/policy`'s own `policyMissing()` makes, and the same repair `X_QUERY_POLICY_MISSING` took.
|
|
123
|
+
* The public choice is `allow('public')`: `allow()` takes a label, never a permission.
|
|
123
124
|
*/
|
|
124
125
|
export class ActionPolicyMissingError extends UltimateError {
|
|
125
126
|
constructor(name: string) {
|
|
126
127
|
super({
|
|
127
128
|
code: 'X_ACTION_POLICY_MISSING',
|
|
128
129
|
cause: `action "${name}" was registered without a policy`,
|
|
129
|
-
fix: `policy: can('<resource>:<verb>') // in the action() that exports "${name}": a permission your definePermissions() call declares, never the action's own name — or allow('
|
|
130
|
+
fix: `policy: can('<resource>:<verb>') // in the action() that exports "${name}": a permission your definePermissions() call declares, never the action's own name — or policy: allow('public') when the operation is genuinely public (allow() takes a label, never a permission)`,
|
|
130
131
|
});
|
|
131
132
|
}
|
|
132
133
|
}
|