@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @prosopo/types-database@5.4.0 build:cjs
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.42 kB │ gzip: 0.48 kB
47
- dist/cjs/index.cjs 2.52 kB │ gzip: 0.53 kB
48
- dist/cjs/types/client.cjs 6.94 kB │ gzip: 1.52 kB
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
- ✓ built in 67ms
51
+ ✓ built in 52ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/types-database@5.4.0 build:tsc
2
+ > @prosopo/types-database@5.4.1 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 10:39:37 PM - Projects in this build:
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
- 10:39:37 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/vite/NodejsPolarsNativeFilePlugin.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
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
- 10:39:37 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
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
- 10:39:37 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
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
- 10:39:37 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/logger.ts' is older than output '../logger/tsconfig.tsbuildinfo'
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
- 10:39:37 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
+ 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
- 10:39:37 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'
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
- 10:39:37 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
+ 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
- 10:39:37 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/index.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
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
- 10:39:37 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
+ 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
- 10:39:37 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/tsconfig.tsbuildinfo'
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
- 10:39:37 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/ruleRecord.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
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
- 10:39:37 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
41
+ 1:15:26 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
42
42
 
43
- 10:39:37 PM - Building project '/home/runner/work/captcha/captcha/packages/types-database/tsconfig.json'...
43
+ 1:15:26 PM - Building project '/home/runner/work/captcha/captcha/packages/types-database/tsconfig.json'...
44
44
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/types-database@5.4.0 build
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.0 build:cross-env
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.60 kB │ gzip: 0.38 kB
52
- dist/index.js 1.67 kB │ gzip: 0.40 kB
53
- dist/types/client.js 6.79 kB │ gzip: 1.56 kB
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
- ✓ built in 169ms
56
+ ✓ built in 85ms
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
 
@@ -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;
@@ -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 };