@prosopo/user-access-policy 3.12.7 → 3.12.9
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/.turbo/turbo-build$colon$cjs.log +45 -41
- package/.turbo/turbo-build$colon$tsc.log +14 -14
- package/.turbo/turbo-build.log +46 -42
- package/CHANGELOG.md +40 -0
- package/dist/.export.js +7 -21
- package/dist/_virtual/_rolldown/runtime.js +3 -0
- package/dist/api/.export.js +2 -9
- package/dist/api/accessRulesApiClient.js +1 -1
- package/dist/api/delete/.export.js +2 -1
- package/dist/api/delete/deleteAllRules.js +22 -24
- package/dist/api/delete/deleteRuleGroups.js +39 -51
- package/dist/api/delete/deleteRules.js +37 -41
- package/dist/api/read/.export.js +2 -1
- package/dist/api/read/fetchRules.js +34 -42
- package/dist/api/read/findRuleIds.js +35 -48
- package/dist/api/read/getMissingIds.js +36 -40
- package/dist/api/ruleApiRoutes.js +62 -120
- package/dist/api/rulesApiClient.js +51 -87
- package/dist/api/write/.export.js +2 -1
- package/dist/api/write/insertRules.js +84 -102
- package/dist/api/write/rehashRules.js +48 -56
- package/dist/cjs/.export.cjs +21 -23
- package/dist/cjs/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/cjs/api/.export.cjs +6 -10
- package/dist/cjs/api/accessRulesApiClient.cjs +0 -0
- package/dist/cjs/api/delete/.export.cjs +0 -1
- package/dist/cjs/api/delete/deleteAllRules.cjs +22 -24
- package/dist/cjs/api/delete/deleteRuleGroups.cjs +39 -51
- package/dist/cjs/api/delete/deleteRules.cjs +41 -42
- package/dist/cjs/api/read/.export.cjs +0 -1
- package/dist/cjs/api/read/fetchRules.cjs +34 -41
- package/dist/cjs/api/read/findRuleIds.cjs +37 -48
- package/dist/cjs/api/read/getMissingIds.cjs +36 -39
- package/dist/cjs/api/ruleApiRoutes.cjs +69 -125
- package/dist/cjs/api/rulesApiClient.cjs +54 -90
- package/dist/cjs/api/write/.export.cjs +0 -1
- package/dist/cjs/api/write/insertRules.cjs +85 -103
- package/dist/cjs/api/write/rehashRules.cjs +48 -56
- package/dist/cjs/classifyOs.cjs +46 -26
- package/dist/cjs/mongoose/.export.cjs +2 -3
- package/dist/cjs/mongoose/mongooseRuleSchema.cjs +97 -36
- package/dist/cjs/redis/.export.cjs +4 -5
- package/dist/cjs/redis/reader/redisAggregate.cjs +59 -84
- package/dist/cjs/redis/reader/redisRulesQuery.cjs +74 -116
- package/dist/cjs/redis/reader/redisRulesReader.cjs +322 -503
- package/dist/cjs/redis/reader/redisRulesSplitQuery.cjs +94 -72
- package/dist/cjs/redis/redisClient.cjs +53 -58
- package/dist/cjs/redis/redisRuleIndex.cjs +93 -49
- package/dist/cjs/redis/redisRulesStorage.cjs +21 -30
- package/dist/cjs/redis/redisRulesWriter.cjs +86 -112
- package/dist/cjs/rule.cjs +8 -7
- package/dist/cjs/ruleInput/.export.cjs +7 -8
- package/dist/cjs/ruleInput/policyInput.cjs +36 -39
- package/dist/cjs/ruleInput/ruleInput.cjs +37 -42
- package/dist/cjs/ruleInput/userScopeInput.cjs +47 -55
- package/dist/cjs/ruleRecord.cjs +15 -22
- package/dist/cjs/rulesStorage.cjs +7 -6
- package/dist/cjs/transformRule.cjs +36 -70
- package/dist/classifyOs.js +48 -29
- package/dist/mongoose/.export.js +2 -3
- package/dist/mongoose/mongooseRuleSchema.js +99 -38
- package/dist/redis/.export.js +3 -5
- package/dist/redis/reader/redisAggregate.js +60 -86
- package/dist/redis/reader/redisRulesQuery.js +75 -118
- package/dist/redis/reader/redisRulesReader.js +312 -487
- package/dist/redis/reader/redisRulesSplitQuery.js +96 -75
- package/dist/redis/redisClient.js +54 -62
- package/dist/redis/redisRuleIndex.js +93 -58
- package/dist/redis/redisRulesStorage.js +21 -30
- package/dist/redis/redisRulesWriter.js +82 -113
- package/dist/rule.js +10 -10
- package/dist/ruleInput/.export.js +3 -7
- package/dist/ruleInput/policyInput.d.ts +52 -1
- package/dist/ruleInput/policyInput.d.ts.map +1 -1
- package/dist/ruleInput/policyInput.js +35 -41
- package/dist/ruleInput/policyInput.js.map +1 -1
- package/dist/ruleInput/ruleInput.d.ts.map +1 -1
- package/dist/ruleInput/ruleInput.js +36 -44
- package/dist/ruleInput/ruleInput.js.map +1 -1
- package/dist/ruleInput/userScopeInput.js +44 -55
- package/dist/ruleRecord.js +17 -27
- package/dist/rulesStorage.js +9 -8
- package/dist/tests/policyInput.unit.test.js +50 -1
- package/dist/tests/policyInput.unit.test.js.map +1 -1
- package/dist/tests/redis/redisRulesStorage.integration.test.js +22 -3
- package/dist/tests/redis/redisRulesStorage.integration.test.js.map +1 -1
- package/dist/transformRule.js +34 -73
- package/dist/transformRule.js.map +1 -1
- package/entries.ts +25 -6
- package/package.json +13 -12
- package/src/ruleInput/policyInput.ts +45 -2
- package/src/ruleInput/ruleInput.ts +10 -3
- package/src/tests/policyInput.unit.test.ts +69 -1
- package/src/tests/redis/redisRulesStorage.integration.test.ts +191 -148
- package/src/transformRule.ts +2 -2
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/user-access-policy@3.12.
|
|
2
|
+
> @prosopo/user-access-policy@3.12.9 build:cjs
|
|
3
3
|
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
4
|
|
|
5
5
|
ViteCommonJSConfig: .
|
|
@@ -29,45 +29,49 @@ ViteCommonJSConfig: .
|
|
|
29
29
|
'@prosopo/api'
|
|
30
30
|
]
|
|
31
31
|
}
|
|
32
|
-
[
|
|
32
|
+
[33mThe plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the [1mresolve.tsconfigPaths[22m option. You can remove the plugin and set [1mresolve.tsconfigPaths: true[22m in your Vite config instead.[39m
|
|
33
|
+
[36mvite v8.1.5 [32mbuilding ssr environment for production...[36m[39m
|
|
33
34
|
Bundle build started
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
[32m✓[39m 35 modules transformed.
|
|
35
|
+
[2K
|
|
36
|
+
✓ 37 modules transformed.
|
|
37
37
|
rendering chunks...
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
38
|
+
computing gzip size...
|
|
39
|
+
dist/cjs/api/accessRulesApiClient.cjs 0.00 kB │ gzip: 0.02 kB
|
|
40
|
+
dist/cjs/api/delete/.export.cjs 0.00 kB │ gzip: 0.02 kB
|
|
41
|
+
dist/cjs/api/read/.export.cjs 0.00 kB │ gzip: 0.02 kB
|
|
42
|
+
dist/cjs/api/write/.export.cjs 0.00 kB │ gzip: 0.02 kB
|
|
43
|
+
dist/cjs/mongoose/.export.cjs 0.25 kB │ gzip: 0.16 kB
|
|
44
|
+
dist/cjs/rulesStorage.cjs 0.34 kB │ gzip: 0.22 kB
|
|
45
|
+
dist/cjs/redis/.export.cjs 0.40 kB │ gzip: 0.18 kB
|
|
46
|
+
dist/cjs/rule.cjs 0.45 kB │ gzip: 0.26 kB
|
|
47
|
+
dist/cjs/api/.export.cjs 0.53 kB │ gzip: 0.21 kB
|
|
48
|
+
dist/cjs/ruleInput/.export.cjs 0.57 kB │ gzip: 0.20 kB
|
|
49
|
+
dist/cjs/api/delete/deleteAllRules.cjs 0.79 kB │ gzip: 0.41 kB
|
|
50
|
+
dist/cjs/ruleRecord.cjs 0.83 kB │ gzip: 0.35 kB
|
|
51
|
+
dist/cjs/_virtual/_rolldown/runtime.cjs 1.00 kB │ gzip: 0.50 kB
|
|
52
|
+
dist/cjs/api/read/getMissingIds.cjs 1.12 kB │ gzip: 0.51 kB
|
|
53
|
+
dist/cjs/api/read/fetchRules.cjs 1.22 kB │ gzip: 0.54 kB
|
|
54
|
+
dist/cjs/redis/redisRulesStorage.cjs 1.41 kB │ gzip: 0.49 kB
|
|
55
|
+
dist/cjs/api/delete/deleteRuleGroups.cjs 1.43 kB │ gzip: 0.65 kB
|
|
56
|
+
dist/cjs/api/write/rehashRules.cjs 1.48 kB │ gzip: 0.56 kB
|
|
57
|
+
dist/cjs/api/delete/deleteRules.cjs 1.52 kB │ gzip: 0.65 kB
|
|
58
|
+
dist/cjs/mongoose/mongooseRuleSchema.cjs 1.52 kB │ gzip: 0.42 kB
|
|
59
|
+
dist/cjs/.export.cjs 1.55 kB │ gzip: 0.39 kB
|
|
60
|
+
dist/cjs/api/read/findRuleIds.cjs 1.58 kB │ gzip: 0.66 kB
|
|
61
|
+
dist/cjs/redis/redisClient.cjs 1.92 kB │ gzip: 0.72 kB
|
|
62
|
+
dist/cjs/classifyOs.cjs 2.04 kB │ gzip: 1.05 kB
|
|
63
|
+
dist/cjs/ruleInput/policyInput.cjs 2.09 kB │ gzip: 0.79 kB
|
|
64
|
+
dist/cjs/ruleInput/ruleInput.cjs 2.24 kB │ gzip: 0.67 kB
|
|
65
|
+
dist/cjs/ruleInput/userScopeInput.cjs 2.44 kB │ gzip: 0.77 kB
|
|
66
|
+
dist/cjs/api/rulesApiClient.cjs 2.53 kB │ gzip: 0.68 kB
|
|
67
|
+
dist/cjs/redis/reader/redisAggregate.cjs 2.57 kB │ gzip: 1.04 kB
|
|
68
|
+
dist/cjs/transformRule.cjs 2.90 kB │ gzip: 1.03 kB
|
|
69
|
+
dist/cjs/redis/redisRuleIndex.cjs 3.03 kB │ gzip: 0.81 kB
|
|
70
|
+
dist/cjs/api/write/insertRules.cjs 3.12 kB │ gzip: 1.09 kB
|
|
71
|
+
dist/cjs/redis/redisRulesWriter.cjs 3.50 kB │ gzip: 1.15 kB
|
|
72
|
+
dist/cjs/api/ruleApiRoutes.cjs 4.14 kB │ gzip: 1.06 kB
|
|
73
|
+
dist/cjs/redis/reader/redisRulesSplitQuery.cjs 4.27 kB │ gzip: 1.92 kB
|
|
74
|
+
dist/cjs/redis/reader/redisRulesQuery.cjs 4.49 kB │ gzip: 1.51 kB
|
|
75
|
+
dist/cjs/redis/reader/redisRulesReader.cjs 11.61 kB │ gzip: 2.81 kB
|
|
76
|
+
|
|
77
|
+
[32m✓ built in 114ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/user-access-policy@3.12.
|
|
2
|
+
> @prosopo/user-access-policy@3.12.9 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
8:59:16 PM - Projects in this build:
|
|
6
6
|
* ../../dev/config/tsconfig.json
|
|
7
7
|
* ../locale/tsconfig.json
|
|
8
8
|
* ../util/tsconfig.json
|
|
@@ -15,27 +15,27 @@
|
|
|
15
15
|
* ../api/tsconfig.json
|
|
16
16
|
* tsconfig.json
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
8:59:16 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
8:59:16 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
8:59:16 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
8:59:16 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
8:59:16 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
8:59:16 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/provider/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
8:59:16 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/tests/utils/batches.unit.test.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
8:59:16 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/apiRoutes.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
8:59:16 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
8:59:16 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
8:59:16 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
8:59:16 PM - Building project '/home/runner/work/captcha/captcha/packages/user-access-policy/tsconfig.json'...
|
|
41
41
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/user-access-policy@3.12.
|
|
2
|
+
> @prosopo/user-access-policy@3.12.9 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/user-access-policy@3.12.
|
|
6
|
+
> @prosopo/user-access-policy@3.12.9 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -25,6 +25,7 @@ ViteEsmConfig: .
|
|
|
25
25
|
'@prosopo/common',
|
|
26
26
|
'@prosopo/locale',
|
|
27
27
|
'@prosopo/logger',
|
|
28
|
+
[33mThe plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the [1mresolve.tsconfigPaths[22m option. You can remove the plugin and set [1mresolve.tsconfigPaths: true[22m in your Vite config instead.[39m
|
|
28
29
|
'@prosopo/util',
|
|
29
30
|
'@prosopo/types',
|
|
30
31
|
'@prosopo/util-crypto',
|
|
@@ -33,45 +34,48 @@ ViteEsmConfig: .
|
|
|
33
34
|
'@prosopo/api'
|
|
34
35
|
]
|
|
35
36
|
}
|
|
36
|
-
[36mvite
|
|
37
|
+
[36mvite v8.1.5 [32mbuilding ssr environment for production...[36m[39m
|
|
37
38
|
Bundle build started
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
[32m✓[39m 35 modules transformed.
|
|
39
|
+
[2K
|
|
40
|
+
✓ 37 modules transformed.
|
|
41
41
|
rendering chunks...
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
42
|
+
computing gzip size...
|
|
43
|
+
dist/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
|
|
44
|
+
dist/api/accessRulesApiClient.js 0.05 kB │ gzip: 0.07 kB
|
|
45
|
+
dist/api/delete/.export.js 0.05 kB │ gzip: 0.07 kB
|
|
46
|
+
dist/api/read/.export.js 0.05 kB │ gzip: 0.07 kB
|
|
47
|
+
dist/api/write/.export.js 0.05 kB │ gzip: 0.07 kB
|
|
48
|
+
dist/mongoose/.export.js 0.14 kB │ gzip: 0.11 kB
|
|
49
|
+
dist/redis/.export.js 0.24 kB │ gzip: 0.14 kB
|
|
50
|
+
dist/rulesStorage.js 0.29 kB │ gzip: 0.19 kB
|
|
51
|
+
dist/ruleInput/.export.js 0.30 kB │ gzip: 0.14 kB
|
|
52
|
+
dist/api/.export.js 0.31 kB │ gzip: 0.16 kB
|
|
53
|
+
dist/rule.js 0.36 kB │ gzip: 0.23 kB
|
|
54
|
+
dist/ruleRecord.js 0.66 kB │ gzip: 0.33 kB
|
|
55
|
+
dist/api/delete/deleteAllRules.js 0.73 kB │ gzip: 0.37 kB
|
|
56
|
+
dist/.export.js 0.91 kB │ gzip: 0.29 kB
|
|
57
|
+
dist/api/read/getMissingIds.js 1.02 kB │ gzip: 0.48 kB
|
|
58
|
+
dist/api/read/fetchRules.js 1.07 kB │ gzip: 0.49 kB
|
|
59
|
+
dist/redis/redisRulesStorage.js 1.22 kB │ gzip: 0.45 kB
|
|
60
|
+
dist/api/delete/deleteRuleGroups.js 1.32 kB │ gzip: 0.61 kB
|
|
61
|
+
dist/api/delete/deleteRules.js 1.36 kB │ gzip: 0.58 kB
|
|
62
|
+
dist/api/read/findRuleIds.js 1.39 kB │ gzip: 0.60 kB
|
|
63
|
+
dist/api/write/rehashRules.js 1.42 kB │ gzip: 0.53 kB
|
|
64
|
+
dist/mongoose/mongooseRuleSchema.js 1.47 kB │ gzip: 0.40 kB
|
|
65
|
+
dist/ruleInput/ruleInput.js 1.76 kB │ gzip: 0.62 kB
|
|
66
|
+
dist/redis/redisClient.js 1.78 kB │ gzip: 0.68 kB
|
|
67
|
+
dist/ruleInput/policyInput.js 1.84 kB │ gzip: 0.73 kB
|
|
68
|
+
dist/classifyOs.js 1.98 kB │ gzip: 1.03 kB
|
|
69
|
+
dist/ruleInput/userScopeInput.js 2.09 kB │ gzip: 0.67 kB
|
|
70
|
+
dist/api/rulesApiClient.js 2.12 kB │ gzip: 0.62 kB
|
|
71
|
+
dist/redis/reader/redisAggregate.js 2.35 kB │ gzip: 0.99 kB
|
|
72
|
+
dist/transformRule.js 2.40 kB │ gzip: 0.94 kB
|
|
73
|
+
dist/redis/redisRuleIndex.js 2.44 kB │ gzip: 0.73 kB
|
|
74
|
+
dist/api/write/insertRules.js 2.87 kB │ gzip: 1.03 kB
|
|
75
|
+
dist/redis/redisRulesWriter.js 3.03 kB │ gzip: 1.07 kB
|
|
76
|
+
dist/api/ruleApiRoutes.js 3.68 kB │ gzip: 0.99 kB
|
|
77
|
+
dist/redis/reader/redisRulesSplitQuery.js 4.18 kB │ gzip: 1.89 kB
|
|
78
|
+
dist/redis/reader/redisRulesQuery.js 4.30 kB │ gzip: 1.47 kB
|
|
79
|
+
dist/redis/reader/redisRulesReader.js 10.19 kB │ gzip: 2.68 kB
|
|
80
|
+
|
|
81
|
+
[32m✓ built in 102ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# @prosopo/user-access-policy
|
|
2
2
|
|
|
3
|
+
## 3.12.9
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- e14fce6: chore(deps): bump vite to 6.4.3 and mongoose to 8.24.1, and adjust types for the mongoose 8.24 Document/ObjectId changes
|
|
7
|
+
- Updated dependencies [a58d007]
|
|
8
|
+
- Updated dependencies [2c47bb7]
|
|
9
|
+
- Updated dependencies [0e1171c]
|
|
10
|
+
- Updated dependencies [103318c]
|
|
11
|
+
- Updated dependencies [270a8d8]
|
|
12
|
+
- Updated dependencies [e14fce6]
|
|
13
|
+
- @prosopo/api-route@2.6.53
|
|
14
|
+
- @prosopo/util@3.3.5
|
|
15
|
+
- @prosopo/types@4.10.0
|
|
16
|
+
- @prosopo/api@3.5.20
|
|
17
|
+
- @prosopo/common@3.1.48
|
|
18
|
+
- @prosopo/redis-client@1.0.30
|
|
19
|
+
- @prosopo/logger@2.0.4
|
|
20
|
+
|
|
21
|
+
## 3.12.8
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- c61dfb5: fix(access-policy): reject Block+captchaType at schema level; add follow-up test coverage
|
|
25
|
+
|
|
26
|
+
**Fix.** The `sanitizeAccessPolicy` helper silently strips `captchaType` and `solvedImagesCount` from Block policies at write time, which meant operators writing e.g. `--block --ip X --captchaType image` got a rule that actually blocked EVERY captcha type for that IP — not just image. Same root cause as the Block+deferToVerify request-time 400 bug (see #2885). Rejecting at input surfaces the mismatch loudly with a message that points the operator at Restrict:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Block policies cannot pin a captchaType — Block always applies to every
|
|
30
|
+
captcha type. Use a Restrict policy if you want to narrow the effect to
|
|
31
|
+
one captcha type.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`accessPolicyInput` now has a `superRefine` that rejects Block+captchaType and Block+solvedImagesCount. The read path still accepts the legacy shape (records written before the refinement landed can still be parsed by the reader). The `addUserAccessPolicy` script was updated to only emit those fields for Restrict, so its `--block` path no longer 400s.
|
|
35
|
+
|
|
36
|
+
**Follow-up tests added** — closing the gaps flagged in the previous session:
|
|
37
|
+
|
|
38
|
+
- **Coord threading lands on the puzzle record** (`puzzleTasks.unit.test.ts`) — extends the verify-puzzle-solution suite to encode a real salt with `(158, 42)`, submit, and assert `coords[0][0] === [158, 42]` on the persisted record. Guards against a regression that drops the salt decode or writes `[0, 0]` — the whole point of the puzzle DM threading PR (#2873).
|
|
39
|
+
- **DM deny reason lands on the pow commitment** (`powTasks.unit.test.ts`) — pow's existing "should deny when decision machine returns deny" test only asserted `verified:false`; now also asserts the DM's reason string is persisted on the commitment.
|
|
40
|
+
- **checkForHardBlock wins over DM deny at verify** (`puzzleTasks.unit.test.ts`) — stubs `checkForHardBlock` to match, stubs the DM to also deny with a distinguishable reason, asserts the commitment carries `ACCESS_POLICY_BLOCK` and that the DM was never consulted. Locks in the ordering that the audit trail depends on.
|
|
41
|
+
- **Rule expiry** (`redisRulesStorage.integration.test.ts`) — inserts a rule with a 2 s TTL, waits past expiry, asserts the Redis hash is gone and the RediSearch index no longer counts it. The existing "inserts time limited rule" test only verified the TTL was set, not that expired rules stop matching.
|
|
42
|
+
|
|
3
43
|
## 3.12.7
|
|
4
44
|
### Patch Changes
|
|
5
45
|
|
package/dist/.export.js
CHANGED
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { makeAccessRuleHash, transformAccessRuleIntoRecord, transformAccessRuleRecordIntoRule } from "./transformRule.js";
|
|
3
|
-
import { AccessPolicyType } from "./rule.js";
|
|
4
|
-
import { OS_NAMES, classifyOs } from "./classifyOs.js";
|
|
1
|
+
import "./_virtual/_rolldown/runtime.js";
|
|
5
2
|
import { FilterScopeMatch } from "./rulesStorage.js";
|
|
6
|
-
import {
|
|
7
|
-
import { accessRuleInput } from "./ruleInput/ruleInput.js";
|
|
3
|
+
import { AccessPolicyType } from "./rule.js";
|
|
8
4
|
import { accessPolicyInput, policyScopeInput } from "./ruleInput/policyInput.js";
|
|
9
5
|
import { userScopeInput } from "./ruleInput/userScopeInput.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
accessRuleInput,
|
|
16
|
-
classifyOs,
|
|
17
|
-
getUserScopeRecordFromAccessRuleRecord,
|
|
18
|
-
makeAccessRuleHash,
|
|
19
|
-
policyScopeInput,
|
|
20
|
-
transformAccessRuleIntoRecord,
|
|
21
|
-
transformAccessRuleRecordIntoRule,
|
|
22
|
-
userScopeInput,
|
|
23
|
-
userScopeRecordFields
|
|
24
|
-
};
|
|
6
|
+
import { accessRuleInput } from "./ruleInput/ruleInput.js";
|
|
7
|
+
import { makeAccessRuleHash, transformAccessRuleIntoRecord, transformAccessRuleRecordIntoRule } from "./transformRule.js";
|
|
8
|
+
import { OS_NAMES, classifyOs } from "./classifyOs.js";
|
|
9
|
+
import { getUserScopeRecordFromAccessRuleRecord, userScopeRecordFields } from "./ruleRecord.js";
|
|
10
|
+
export { AccessPolicyType, FilterScopeMatch, OS_NAMES, accessPolicyInput, accessRuleInput, classifyOs, getUserScopeRecordFromAccessRuleRecord, makeAccessRuleHash, policyScopeInput, transformAccessRuleIntoRecord, transformAccessRuleRecordIntoRule, userScopeInput, userScopeRecordFields };
|
package/dist/api/.export.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "./read/.export.js";
|
|
3
|
-
import "./write/.export.js";
|
|
1
|
+
import "../_virtual/_rolldown/runtime.js";
|
|
4
2
|
import { AccessRuleApiRoutes, accessRuleApiPaths, getExpressApiRuleRateLimits } from "./ruleApiRoutes.js";
|
|
5
3
|
import { AccessRulesApiClient } from "./rulesApiClient.js";
|
|
6
|
-
export {
|
|
7
|
-
AccessRuleApiRoutes,
|
|
8
|
-
AccessRulesApiClient,
|
|
9
|
-
accessRuleApiPaths,
|
|
10
|
-
getExpressApiRuleRateLimits
|
|
11
|
-
};
|
|
4
|
+
export { AccessRuleApiRoutes, AccessRulesApiClient, accessRuleApiPaths, getExpressApiRuleRateLimits };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
export {};
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
+
import "../../_virtual/_rolldown/runtime.js";
|
|
1
2
|
import { ApiEndpointResponseStatus } from "@prosopo/api-route";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
DeleteAllRulesEndpoint
|
|
3
|
+
//#region src/api/delete/deleteAllRules.ts
|
|
4
|
+
var DeleteAllRulesEndpoint = class {
|
|
5
|
+
constructor(accessRulesStorage, logger) {
|
|
6
|
+
this.accessRulesStorage = accessRulesStorage;
|
|
7
|
+
this.logger = logger;
|
|
8
|
+
}
|
|
9
|
+
getRequestArgsSchema() {}
|
|
10
|
+
async processRequest(logger) {
|
|
11
|
+
const log = logger ?? this.logger;
|
|
12
|
+
const deletedCount = await this.accessRulesStorage.deleteAllRules();
|
|
13
|
+
log.info(() => ({
|
|
14
|
+
msg: "Endpoint deleted all access rules",
|
|
15
|
+
data: { deletedCount }
|
|
16
|
+
}));
|
|
17
|
+
return {
|
|
18
|
+
status: ApiEndpointResponseStatus.SUCCESS,
|
|
19
|
+
data: { deleted_count: deletedCount }
|
|
20
|
+
};
|
|
21
|
+
}
|
|
26
22
|
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { DeleteAllRulesEndpoint };
|
|
@@ -1,53 +1,41 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { z } from "zod";
|
|
1
|
+
import "../../_virtual/_rolldown/runtime.js";
|
|
3
2
|
import { FilterScopeMatch } from "../../rulesStorage.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
uniqueRuleIds
|
|
41
|
-
}
|
|
42
|
-
}));
|
|
43
|
-
return {
|
|
44
|
-
status: ApiEndpointResponseStatus.SUCCESS,
|
|
45
|
-
data: {
|
|
46
|
-
deleted_count: uniqueRuleIds.length
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
export {
|
|
52
|
-
DeleteRuleGroupsEndpoint
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { ApiEndpointResponseStatus } from "@prosopo/api-route";
|
|
5
|
+
//#region src/api/delete/deleteRuleGroups.ts
|
|
6
|
+
var DeleteRuleGroupsEndpoint = class {
|
|
7
|
+
constructor(accessRulesStorage, logger) {
|
|
8
|
+
this.accessRulesStorage = accessRulesStorage;
|
|
9
|
+
this.logger = logger;
|
|
10
|
+
}
|
|
11
|
+
getRequestArgsSchema() {
|
|
12
|
+
return z.array(z.object({
|
|
13
|
+
clientIds: z.string().array(),
|
|
14
|
+
groupId: z.string()
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
async processRequest(args, logger) {
|
|
18
|
+
const log = logger ?? this.logger;
|
|
19
|
+
const foundRuleIdPromises = args.flatMap((ruleToDelete) => ruleToDelete.clientIds.map((clientId) => this.accessRulesStorage.findRuleIds({
|
|
20
|
+
policyScope: { clientId },
|
|
21
|
+
policyScopeMatch: FilterScopeMatch.Exact,
|
|
22
|
+
groupId: ruleToDelete.groupId
|
|
23
|
+
})));
|
|
24
|
+
const ruleIds = (await Promise.all(foundRuleIdPromises)).flat();
|
|
25
|
+
const uniqueRuleIds = [...new Set(ruleIds)];
|
|
26
|
+
if (uniqueRuleIds.length > 0) await this.accessRulesStorage.deleteRules(uniqueRuleIds);
|
|
27
|
+
log.info(() => ({
|
|
28
|
+
msg: "Endpoint deleted rule groups",
|
|
29
|
+
data: {
|
|
30
|
+
args,
|
|
31
|
+
uniqueRuleIds
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
return {
|
|
35
|
+
status: ApiEndpointResponseStatus.SUCCESS,
|
|
36
|
+
data: { deleted_count: uniqueRuleIds.length }
|
|
37
|
+
};
|
|
38
|
+
}
|
|
53
39
|
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { DeleteRuleGroupsEndpoint };
|
|
@@ -1,44 +1,40 @@
|
|
|
1
|
+
import "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { accessRulesFilterInput, getAccessRuleFiltersFromInput } from "../../ruleInput/ruleInput.js";
|
|
3
|
+
import { z } from "zod";
|
|
1
4
|
import { ApiEndpointResponseStatus } from "@prosopo/api-route";
|
|
2
5
|
import { executeBatchesSequentially } from "@prosopo/common";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
status: ApiEndpointResponseStatus.SUCCESS,
|
|
36
|
-
data: {
|
|
37
|
-
deleted_count: deletedCount
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
export {
|
|
43
|
-
DeleteRulesEndpoint
|
|
6
|
+
//#region src/api/delete/deleteRules.ts
|
|
7
|
+
var DeleteRulesEndpoint = class {
|
|
8
|
+
constructor(accessRulesStorage, logger) {
|
|
9
|
+
this.accessRulesStorage = accessRulesStorage;
|
|
10
|
+
this.logger = logger;
|
|
11
|
+
}
|
|
12
|
+
getRequestArgsSchema() {
|
|
13
|
+
return z.array(accessRulesFilterInput);
|
|
14
|
+
}
|
|
15
|
+
async processRequest(args, logger) {
|
|
16
|
+
const log = logger ?? this.logger;
|
|
17
|
+
let deletedCount = 0;
|
|
18
|
+
for (const rulesFilterInput of args) await executeBatchesSequentially(getAccessRuleFiltersFromInput(rulesFilterInput), async (ruleFilter) => {
|
|
19
|
+
const ruleIds = await this.accessRulesStorage.findRuleIds(ruleFilter);
|
|
20
|
+
const uniqueRuleIds = [...new Set(ruleIds)];
|
|
21
|
+
if (uniqueRuleIds.length > 0) {
|
|
22
|
+
await this.accessRulesStorage.deleteRules(uniqueRuleIds);
|
|
23
|
+
deletedCount += uniqueRuleIds.length;
|
|
24
|
+
log.info(() => ({
|
|
25
|
+
msg: "Endpoint deleted rules",
|
|
26
|
+
data: {
|
|
27
|
+
rulesFilterInput,
|
|
28
|
+
uniqueRuleIds
|
|
29
|
+
}
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
status: ApiEndpointResponseStatus.SUCCESS,
|
|
35
|
+
data: { deleted_count: deletedCount }
|
|
36
|
+
};
|
|
37
|
+
}
|
|
44
38
|
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { DeleteRulesEndpoint };
|
package/dist/api/read/.export.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
export {};
|