@prosopo/types-database 5.4.0 → 5.4.1
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 +5 -5
- package/.turbo/turbo-build$colon$tsc.log +15 -15
- package/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +26 -0
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/types/client.cjs +58 -0
- package/dist/cjs/types/index.cjs +1 -0
- package/dist/index.js +2 -2
- package/dist/types/client.d.ts +501 -4
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/client.js +58 -1
- package/dist/types/client.js.map +1 -1
- package/dist/types/index.js +2 -2
- package/dist/types/schemas.test.js +44 -1
- package/dist/types/schemas.test.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/types-database@5.4.
|
|
2
|
+
> @prosopo/types-database@5.4.1 build:cjs
|
|
3
3
|
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
4
|
|
|
5
5
|
ViteCommonJSConfig: .
|
|
@@ -43,9 +43,9 @@ dist/cjs/types/userAgent.cjs 0.00 kB │ gzip: 0.02 kB
|
|
|
43
43
|
dist/cjs/types/bannedDomain.cjs 0.23 kB │ gzip: 0.16 kB
|
|
44
44
|
dist/cjs/types/spamEmailDomain.cjs 0.25 kB │ gzip: 0.17 kB
|
|
45
45
|
dist/cjs/types/captcha.cjs 0.99 kB │ gzip: 0.27 kB
|
|
46
|
-
dist/cjs/types/index.cjs 2.
|
|
47
|
-
dist/cjs/index.cjs 2.
|
|
48
|
-
dist/cjs/types/client.cjs
|
|
46
|
+
dist/cjs/types/index.cjs 2.50 kB │ gzip: 0.49 kB
|
|
47
|
+
dist/cjs/index.cjs 2.60 kB │ gzip: 0.54 kB
|
|
48
|
+
dist/cjs/types/client.cjs 7.86 kB │ gzip: 1.65 kB
|
|
49
49
|
dist/cjs/types/provider.cjs 28.98 kB │ gzip: 4.55 kB
|
|
50
50
|
|
|
51
|
-
[32m✓ built in
|
|
51
|
+
[32m✓ built in 52ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/types-database@5.4.
|
|
2
|
+
> @prosopo/types-database@5.4.1 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
1:15:26 PM - Projects in this build:
|
|
6
6
|
* ../../dev/config/tsconfig.json
|
|
7
7
|
* ../locale/tsconfig.json
|
|
8
8
|
* ../util/tsconfig.json
|
|
@@ -16,29 +16,29 @@
|
|
|
16
16
|
* ../user-access-policy/tsconfig.json
|
|
17
17
|
* tsconfig.json
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
1:15:26 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'
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
1:15:26 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
1:15:26 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
1:15:26 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
1:15:26 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'
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
1:15:26 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
1:15:26 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/utils/batches.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
1:15:26 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'
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
1:15:26 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'
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
1:15:26 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
1:15:26 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/transformRule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
1:15:26 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
1:15:26 PM - Building project '/home/runner/work/captcha/captcha/packages/types-database/tsconfig.json'...
|
|
44
44
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/types-database@5.4.
|
|
2
|
+
> @prosopo/types-database@5.4.1 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/types-database@5.4.
|
|
6
|
+
> @prosopo/types-database@5.4.1 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -48,9 +48,9 @@ dist/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
|
|
|
48
48
|
dist/types/bannedDomain.js 0.22 kB │ gzip: 0.17 kB
|
|
49
49
|
dist/types/spamEmailDomain.js 0.23 kB │ gzip: 0.17 kB
|
|
50
50
|
dist/types/captcha.js 0.82 kB │ gzip: 0.25 kB
|
|
51
|
-
dist/types/index.js 1.
|
|
52
|
-
dist/index.js 1.
|
|
53
|
-
dist/types/client.js
|
|
51
|
+
dist/types/index.js 1.65 kB │ gzip: 0.39 kB
|
|
52
|
+
dist/index.js 1.72 kB │ gzip: 0.42 kB
|
|
53
|
+
dist/types/client.js 7.66 kB │ gzip: 1.68 kB
|
|
54
54
|
dist/types/provider.js 27.83 kB │ gzip: 4.52 kB
|
|
55
55
|
|
|
56
|
-
[32m✓ built in
|
|
56
|
+
[32m✓ built in 85ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @prosopo/types-database
|
|
2
2
|
|
|
3
|
+
## 5.4.1
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- b6918c0: fix: declare the puzzle render settings on the mongoose user-settings schema
|
|
7
|
+
|
|
8
|
+
`UserSettingsSchema` never declared the `puzzle` block that
|
|
9
|
+
`ClientSettingsSchema` has carried since the puzzle render tunables shipped.
|
|
10
|
+
Mongoose is strict by default, so every site-wide override — decoy count,
|
|
11
|
+
decoy edge/body shading, hole darken, decoy hole darken, piece scale — round
|
|
12
|
+
tripped through zod, reached the database and was silently dropped on write.
|
|
13
|
+
The same omission on `TrafficCategoryPolicySchema` did the same to the
|
|
14
|
+
per-category puzzle overrides a traffic-filter challenge can carry.
|
|
15
|
+
|
|
16
|
+
Identical failure mode to `frictionlessTypes`, which carries the comment
|
|
17
|
+
explaining it. Bounds mirror the zod field schemas, and the block has no
|
|
18
|
+
default so an unconfigured site stays free of an empty subdocument rather
|
|
19
|
+
than gaining one on every save.
|
|
20
|
+
- Updated dependencies [6f57ee9]
|
|
21
|
+
- Updated dependencies [6f57ee9]
|
|
22
|
+
- Updated dependencies [e22d5fb]
|
|
23
|
+
- Updated dependencies [d288371]
|
|
24
|
+
- @prosopo/user-access-policy@3.13.0
|
|
25
|
+
- @prosopo/types@5.7.0
|
|
26
|
+
- @prosopo/common@3.1.54
|
|
27
|
+
- @prosopo/logger@2.0.9
|
|
28
|
+
|
|
3
29
|
## 5.4.0
|
|
4
30
|
### Minor Changes
|
|
5
31
|
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -16,6 +16,7 @@ exports.DecisionMachineArtifactRecordSchema = require_provider.DecisionMachineAr
|
|
|
16
16
|
exports.IPValidationRulesSchema = require_client.IPValidationRulesSchema;
|
|
17
17
|
exports.PoWCaptchaRecordSchema = require_provider.PoWCaptchaRecordSchema;
|
|
18
18
|
exports.PuzzleCaptchaRecordSchema = require_provider.PuzzleCaptchaRecordSchema;
|
|
19
|
+
exports.PuzzleRenderSettingsSchema = require_client.PuzzleRenderSettingsSchema;
|
|
19
20
|
exports.SESSION_PROJECTION = require_provider.SESSION_PROJECTION;
|
|
20
21
|
exports.ScheduledTaskRecordSchema = require_provider.ScheduledTaskRecordSchema;
|
|
21
22
|
exports.ScheduledTaskSchema = require_provider.ScheduledTaskSchema;
|
|
@@ -70,6 +70,55 @@ var IPValidationRulesSchema = new mongoose.Schema({
|
|
|
70
70
|
default: void 0
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
|
+
var PuzzleRenderSettingsSchema = new mongoose.Schema({
|
|
74
|
+
decoyCount: {
|
|
75
|
+
type: Number,
|
|
76
|
+
min: 0,
|
|
77
|
+
max: 200,
|
|
78
|
+
required: false
|
|
79
|
+
},
|
|
80
|
+
decoyEdgeDarkness: {
|
|
81
|
+
type: Number,
|
|
82
|
+
min: 0,
|
|
83
|
+
max: 40,
|
|
84
|
+
required: false
|
|
85
|
+
},
|
|
86
|
+
decoyBodyBrightness: {
|
|
87
|
+
type: Number,
|
|
88
|
+
min: -20,
|
|
89
|
+
max: 20,
|
|
90
|
+
required: false
|
|
91
|
+
},
|
|
92
|
+
decoyHoleDarken: {
|
|
93
|
+
type: Number,
|
|
94
|
+
min: 0,
|
|
95
|
+
max: 1,
|
|
96
|
+
required: false
|
|
97
|
+
},
|
|
98
|
+
holeDarken: {
|
|
99
|
+
type: Number,
|
|
100
|
+
min: 0,
|
|
101
|
+
max: 1,
|
|
102
|
+
required: false
|
|
103
|
+
},
|
|
104
|
+
pieceScale: {
|
|
105
|
+
type: new mongoose.Schema({
|
|
106
|
+
min: {
|
|
107
|
+
type: Number,
|
|
108
|
+
min: .05,
|
|
109
|
+
max: .95,
|
|
110
|
+
required: false
|
|
111
|
+
},
|
|
112
|
+
max: {
|
|
113
|
+
type: Number,
|
|
114
|
+
min: .05,
|
|
115
|
+
max: .95,
|
|
116
|
+
required: false
|
|
117
|
+
}
|
|
118
|
+
}, { _id: false }),
|
|
119
|
+
required: false
|
|
120
|
+
}
|
|
121
|
+
}, { _id: false });
|
|
73
122
|
var TrafficCategoryPolicySchema = new mongoose.Schema({
|
|
74
123
|
action: {
|
|
75
124
|
type: String,
|
|
@@ -92,6 +141,10 @@ var TrafficCategoryPolicySchema = new mongoose.Schema({
|
|
|
92
141
|
puzzleTolerance: {
|
|
93
142
|
type: Number,
|
|
94
143
|
required: false
|
|
144
|
+
},
|
|
145
|
+
puzzle: {
|
|
146
|
+
type: PuzzleRenderSettingsSchema,
|
|
147
|
+
required: false
|
|
95
148
|
}
|
|
96
149
|
}, { _id: false });
|
|
97
150
|
var UserSettingsSchema = new mongoose.Schema({
|
|
@@ -147,6 +200,10 @@ var UserSettingsSchema = new mongoose.Schema({
|
|
|
147
200
|
type: Number,
|
|
148
201
|
required: false
|
|
149
202
|
},
|
|
203
|
+
puzzle: {
|
|
204
|
+
type: PuzzleRenderSettingsSchema,
|
|
205
|
+
required: false
|
|
206
|
+
},
|
|
150
207
|
ipValidationRules: IPValidationRulesSchema,
|
|
151
208
|
domains: {
|
|
152
209
|
type: [String],
|
|
@@ -327,6 +384,7 @@ var TableNames = /* @__PURE__ */ function(TableNames) {
|
|
|
327
384
|
//#endregion
|
|
328
385
|
exports.AccountSchema = AccountSchema;
|
|
329
386
|
exports.IPValidationRulesSchema = IPValidationRulesSchema;
|
|
387
|
+
exports.PuzzleRenderSettingsSchema = PuzzleRenderSettingsSchema;
|
|
330
388
|
exports.TableNames = TableNames;
|
|
331
389
|
exports.TrafficCategoryPolicySchema = TrafficCategoryPolicySchema;
|
|
332
390
|
exports.UserDataSchema = UserDataSchema;
|
package/dist/cjs/types/index.cjs
CHANGED
|
@@ -15,6 +15,7 @@ exports.DecisionMachineArtifactRecordSchema = require_provider.DecisionMachineAr
|
|
|
15
15
|
exports.IPValidationRulesSchema = require_client.IPValidationRulesSchema;
|
|
16
16
|
exports.PoWCaptchaRecordSchema = require_provider.PoWCaptchaRecordSchema;
|
|
17
17
|
exports.PuzzleCaptchaRecordSchema = require_provider.PuzzleCaptchaRecordSchema;
|
|
18
|
+
exports.PuzzleRenderSettingsSchema = require_client.PuzzleRenderSettingsSchema;
|
|
18
19
|
exports.SESSION_PROJECTION = require_provider.SESSION_PROJECTION;
|
|
19
20
|
exports.ScheduledTaskRecordSchema = require_provider.ScheduledTaskRecordSchema;
|
|
20
21
|
exports.ScheduledTaskSchema = require_provider.ScheduledTaskSchema;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { AccountSchema, IPValidationRulesSchema, TableNames, TrafficCategoryPolicySchema, UserDataSchema, UserSettingsSchema } from "./types/client.js";
|
|
2
|
+
import { AccountSchema, IPValidationRulesSchema, PuzzleRenderSettingsSchema, TableNames, TrafficCategoryPolicySchema, UserDataSchema, UserSettingsSchema } from "./types/client.js";
|
|
3
3
|
import { CaptchaRecordSchema, ClientContextEntropyRecordSchema, ClientMetaDataRecordSchemaObj, ClientRecordSchema, CompositeIpAddressRecordSchemaObj, DatasetRecordSchema, DecisionMachineArtifactRecordSchema, PoWCaptchaRecordSchema, PuzzleCaptchaRecordSchema, SESSION_PROJECTION, ScheduledTaskRecordSchema, ScheduledTaskSchema, SessionRecordSchema, SolutionRecordSchema, UserCommitmentRecordSchema, UserSolutionRecordSchema } from "./types/provider.js";
|
|
4
4
|
import { StoredPoWCaptchaRecordSchema, StoredPuzzleCaptchaRecordSchema, StoredSessionRecordSchema, StoredUserCommitmentRecordSchema } from "./types/captcha.js";
|
|
5
5
|
import { SpamEmailDomainRecordSchema } from "./types/spamEmailDomain.js";
|
|
6
6
|
import { BannedDomainRecordSchema } from "./types/bannedDomain.js";
|
|
7
|
-
export { AccountSchema, BannedDomainRecordSchema, CaptchaRecordSchema, ClientContextEntropyRecordSchema, ClientMetaDataRecordSchemaObj, ClientRecordSchema, CompositeIpAddressRecordSchemaObj, DatasetRecordSchema, DecisionMachineArtifactRecordSchema, IPValidationRulesSchema, PoWCaptchaRecordSchema, PuzzleCaptchaRecordSchema, SESSION_PROJECTION, ScheduledTaskRecordSchema, ScheduledTaskSchema, SessionRecordSchema, SolutionRecordSchema, SpamEmailDomainRecordSchema, StoredPoWCaptchaRecordSchema, StoredPuzzleCaptchaRecordSchema, StoredSessionRecordSchema, StoredUserCommitmentRecordSchema, TableNames, TrafficCategoryPolicySchema, UserCommitmentRecordSchema, UserDataSchema, UserSettingsSchema, UserSolutionRecordSchema };
|
|
7
|
+
export { AccountSchema, BannedDomainRecordSchema, CaptchaRecordSchema, ClientContextEntropyRecordSchema, ClientMetaDataRecordSchemaObj, ClientRecordSchema, CompositeIpAddressRecordSchemaObj, DatasetRecordSchema, DecisionMachineArtifactRecordSchema, IPValidationRulesSchema, PoWCaptchaRecordSchema, PuzzleCaptchaRecordSchema, PuzzleRenderSettingsSchema, SESSION_PROJECTION, ScheduledTaskRecordSchema, ScheduledTaskSchema, SessionRecordSchema, SolutionRecordSchema, SpamEmailDomainRecordSchema, StoredPoWCaptchaRecordSchema, StoredPuzzleCaptchaRecordSchema, StoredSessionRecordSchema, StoredUserCommitmentRecordSchema, TableNames, TrafficCategoryPolicySchema, UserCommitmentRecordSchema, UserDataSchema, UserSettingsSchema, UserSolutionRecordSchema };
|