@zenstackhq/runtime 3.0.0-beta.5 → 3.0.0-beta.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenstackhq/runtime",
3
- "version": "3.0.0-beta.5",
3
+ "version": "3.0.0-beta.6",
4
4
  "description": "ZenStack Runtime",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -65,7 +65,7 @@
65
65
  "ulid": "^3.0.0",
66
66
  "uuid": "^11.0.5",
67
67
  "zod-validation-error": "^4.0.1",
68
- "@zenstackhq/common-helpers": "3.0.0-beta.5"
68
+ "@zenstackhq/common-helpers": "3.0.0-beta.6"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "better-sqlite3": "^12.2.0",
@@ -87,12 +87,12 @@
87
87
  "@types/toposort": "^2.0.7",
88
88
  "tsx": "^4.19.2",
89
89
  "zod": "~3.25.0",
90
- "@zenstackhq/eslint-config": "3.0.0-beta.5",
91
- "@zenstackhq/language": "3.0.0-beta.5",
92
- "@zenstackhq/testtools": "3.0.0-beta.5",
93
- "@zenstackhq/sdk": "3.0.0-beta.5",
94
- "@zenstackhq/vitest-config": "3.0.0-beta.5",
95
- "@zenstackhq/typescript-config": "3.0.0-beta.5"
90
+ "@zenstackhq/eslint-config": "3.0.0-beta.6",
91
+ "@zenstackhq/sdk": "3.0.0-beta.6",
92
+ "@zenstackhq/language": "3.0.0-beta.6",
93
+ "@zenstackhq/testtools": "3.0.0-beta.6",
94
+ "@zenstackhq/vitest-config": "3.0.0-beta.6",
95
+ "@zenstackhq/typescript-config": "3.0.0-beta.6"
96
96
  },
97
97
  "scripts": {
98
98
  "build": "tsc --project tsconfig.build.json --noEmit && tsup-node && pnpm test:generate",
@@ -1,43 +0,0 @@
1
- /**
2
- * Defines an access policy that allows a set of operations when the given condition is true.
3
- *
4
- * @param operation: comma-separated list of "create", "read", "update", "delete". Use "all" to denote all operations.
5
- * @param condition: a boolean expression that controls if the operation should be allowed.
6
- */
7
- attribute @@allow(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'delete'", "'all'"]), _ condition: Boolean)
8
-
9
- /**
10
- * Defines an access policy that allows the annotated field to be read or updated.
11
- * You can pass a third argument as `true` to make it override the model-level policies.
12
- *
13
- * @param operation: comma-separated list of "create", "read", "update", "delete". Use "all" to denote all operations.
14
- * @param condition: a boolean expression that controls if the operation should be allowed.
15
- * @param override: a boolean value that controls if the field-level policy should override the model-level policy.
16
- */
17
- attribute @allow(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'delete'", "'all'"]), _ condition: Boolean, _ override: Boolean?)
18
-
19
- /**
20
- * Defines an access policy that denies a set of operations when the given condition is true.
21
- *
22
- * @param operation: comma-separated list of "create", "read", "update", "delete". Use "all" to denote all operations.
23
- * @param condition: a boolean expression that controls if the operation should be denied.
24
- */
25
- attribute @@deny(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'delete'", "'all'"]), _ condition: Boolean)
26
-
27
- /**
28
- * Defines an access policy that denies the annotated field to be read or updated.
29
- *
30
- * @param operation: comma-separated list of "create", "read", "update", "delete". Use "all" to denote all operations.
31
- * @param condition: a boolean expression that controls if the operation should be denied.
32
- */
33
- attribute @deny(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'delete'", "'all'"]), _ condition: Boolean)
34
-
35
- /**
36
- * Checks if the current user can perform the given operation on the given field.
37
- *
38
- * @param field: The field to check access for
39
- * @param operation: The operation to check access for. Can be "read", "create", "update", or "delete". If the operation is not provided,
40
- * it defaults the operation of the containing policy rule.
41
- */
42
- function check(field: Any, operation: String?): Boolean {
43
- } @@@expressionContext([AccessPolicy])