@prosopo/types-database 4.11.16 → 4.11.17

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@4.11.16 build:cjs
2
+ > @prosopo/types-database@4.11.17 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ViteCommonJSConfig: .
@@ -31,19 +31,22 @@ ViteCommonJSConfig: .
31
31
  '@prosopo/api'
32
32
  ]
33
33
  }
34
- vite v6.4.1 building SSR bundle for production...
34
+ The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead.
35
+ vite v8.1.5 building ssr environment for production...
35
36
  Bundle build started
36
- transforming...
37
- Build end
38
- ✓ 9 modules transformed.
37
+ 
38
+ ✓ 10 modules transformed.
39
39
  rendering chunks...
40
- dist/cjs/types/mongo.cjs  0.01 kB
41
- dist/cjs/types/userAgent.cjs  0.01 kB
42
- dist/cjs/types/bannedDomain.cjs  0.35 kB
43
- dist/cjs/types/spamEmailDomain.cjs  0.36 kB
44
- dist/cjs/types/captcha.cjs  1.01 kB
45
- dist/cjs/types/index.cjs  2.15 kB
46
- dist/cjs/index.cjs  2.15 kB
47
- dist/cjs/types/client.cjs  6.27 kB
48
- dist/cjs/types/provider.cjs 26.24 kB
49
- ✓ built in 198ms
40
+ computing gzip size...
41
+ dist/cjs/types/mongo.cjs 0.00 kB │ gzip: 0.02 kB
42
+ dist/cjs/types/userAgent.cjs 0.00 kB │ gzip: 0.02 kB
43
+ dist/cjs/types/bannedDomain.cjs 0.28 kB │ gzip: 0.18 kB
44
+ dist/cjs/types/spamEmailDomain.cjs 0.30 kB │ gzip: 0.18 kB
45
+ dist/cjs/types/captcha.cjs 0.99 kB │ gzip: 0.27 kB
46
+ dist/cjs/_virtual/_rolldown/runtime.cjs 1.00 kB │ gzip: 0.50 kB
47
+ dist/cjs/types/index.cjs 2.25 kB │ gzip: 0.43 kB
48
+ dist/cjs/index.cjs 2.35 kB │ gzip: 0.49 kB
49
+ dist/cjs/types/client.cjs 6.35 kB │ gzip: 1.48 kB
50
+ dist/cjs/types/provider.cjs 22.96 kB │ gzip: 3.04 kB
51
+
52
+ ✓ built in 48ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/types-database@4.11.16 build:tsc
2
+ > @prosopo/types-database@4.11.17 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 9:05:31 AM - Projects in this build:
5
+ 8:59: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
- 9:05:31 AM - 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
+ 8:59: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
- 9:05:31 AM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
21
+ 8:59: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
- 9:05:31 AM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
23
+ 8:59: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
- 9:05:32 AM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
25
+ 8:59: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
- 9:05:32 AM - 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
+ 8:59: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
- 9:05:32 AM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
29
+ 8:59:26 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/provider/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
30
30
 
31
- 9:05:32 AM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/utils/batches.ts' is older than output '../common/tsconfig.tsbuildinfo'
31
+ 8:59:26 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'
32
32
 
33
- 9:05:32 AM - 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
+ 8:59: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
- 9:05:32 AM - 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
+ 8:59: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
- 9:05:32 AM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
37
+ 8:59:26 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
38
38
 
39
- 9:05:32 AM - 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
+ 8:59:26 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'
40
40
 
41
- 9:05:32 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
41
+ 8:59:26 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
42
42
 
43
- 9:05:32 AM - Building project '/home/runner/work/captcha/captcha/packages/types-database/tsconfig.json'...
43
+ 8:59: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@4.11.16 build
2
+ > @prosopo/types-database@4.11.17 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/types-database@4.11.16 build:cross-env
6
+ > @prosopo/types-database@4.11.17 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -35,19 +35,22 @@ ViteEsmConfig: .
35
35
  '@prosopo/api'
36
36
  ]
37
37
  }
38
- vite v6.4.1 building SSR bundle for production...
38
+ The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead.
39
+ vite v8.1.5 building ssr environment for production...
39
40
  Bundle build started
40
- transforming...
41
- Build end
42
- ✓ 9 modules transformed.
41
+ 
42
+ ✓ 10 modules transformed.
43
43
  rendering chunks...
44
- dist/types/mongo.js  0.00 kB
45
- dist/types/userAgent.js  0.00 kB
46
- dist/types/bannedDomain.js  0.23 kB
47
- dist/types/spamEmailDomain.js  0.24 kB
48
- dist/types/captcha.js  0.81 kB
49
- dist/types/index.js  1.58 kB
50
- dist/index.js  1.59 kB
51
- dist/types/client.js  6.29 kB
52
- dist/types/provider.js 25.38 kB
53
- ✓ built in 271ms
44
+ computing gzip size...
45
+ dist/types/mongo.js 0.01 kB │ gzip: 0.03 kB
46
+ dist/types/userAgent.js 0.01 kB │ gzip: 0.03 kB
47
+ dist/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
48
+ dist/types/bannedDomain.js 0.27 kB │ gzip: 0.18 kB
49
+ dist/types/spamEmailDomain.js 0.28 kB │ gzip: 0.18 kB
50
+ dist/types/captcha.js 0.82 kB │ gzip: 0.25 kB
51
+ dist/types/index.js 1.48 kB │ gzip: 0.34 kB
52
+ dist/index.js 1.55 kB │ gzip: 0.37 kB
53
+ dist/types/client.js 6.11 kB │ gzip: 1.47 kB
54
+ dist/types/provider.js 21.87 kB │ gzip: 3.02 kB
55
+
56
+ ✓ built in 59ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @prosopo/types-database
2
2
 
3
+ ## 4.11.17
4
+ ### Patch Changes
5
+
6
+ - 103318c: feat(traffic-filter): add `datacenterNameDenylist` alongside the existing allowlist
7
+
8
+ Operators can now name datacenter / provider / ASN organisations they want
9
+ force-included in the datacenter block, mirroring the shape of
10
+ `datacenterNameAllowlist`. Denylist entries take precedence over the
11
+ `providerType === "isp"` short-circuit and over the allowlist for the same
12
+ name, so operators can opt named providers back into the datacenter rule when
13
+ upstream classifies them as ISP.
14
+
15
+ Same case-insensitive / whitespace-trimmed matching, same three name sources
16
+ (`datacenterName`, `providerName`, `asnOrganization`), same
17
+ `MAX_DATACENTER_ALLOWLIST_ENTRIES` / `MAX_DATACENTER_ALLOWLIST_ENTRY_LENGTH`
18
+ validators. Missing or empty denylist preserves existing behaviour.
19
+
20
+ Wired through the mongoose `ClientSettings.trafficFilter` schema, the zod
21
+ `TrafficFilterSchema`, `checkTrafficFilter`, and `enrichDnsEvent.countDc` so
22
+ the denylist is honoured on both the primary rule and the DNS-asymmetry
23
+ scoring. Unit tests cover the ISP-bypass override, the allowlist-precedence
24
+ edge case, category-suppression interaction, and the extras path.
25
+ - 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
26
+ - Updated dependencies [0e1171c]
27
+ - Updated dependencies [103318c]
28
+ - Updated dependencies [270a8d8]
29
+ - Updated dependencies [e14fce6]
30
+ - @prosopo/locale@3.2.8
31
+ - @prosopo/types@4.10.0
32
+ - @prosopo/common@3.1.48
33
+ - @prosopo/user-access-policy@3.12.9
34
+ - @prosopo/logger@2.0.4
35
+
3
36
  ## 4.11.16
4
37
  ### Patch Changes
5
38
 
@@ -0,0 +1,3 @@
1
+ import "node:module";
2
+ //#endregion
3
+ export {};
@@ -0,0 +1,23 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
23
+ exports.__toESM = __toESM;
@@ -1,34 +1,32 @@
1
- "use strict";
2
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- require("./types/index.cjs");
4
- const provider = require("./types/provider.cjs");
5
- const client = require("./types/client.cjs");
6
- const captcha = require("./types/captcha.cjs");
7
- const spamEmailDomain = require("./types/spamEmailDomain.cjs");
8
- const bannedDomain = require("./types/bannedDomain.cjs");
9
- exports.CaptchaRecordSchema = provider.CaptchaRecordSchema;
10
- exports.ClientContextEntropyRecordSchema = provider.ClientContextEntropyRecordSchema;
11
- exports.ClientRecordSchema = provider.ClientRecordSchema;
12
- exports.CompositeIpAddressRecordSchemaObj = provider.CompositeIpAddressRecordSchemaObj;
13
- exports.DatasetRecordSchema = provider.DatasetRecordSchema;
14
- exports.DecisionMachineArtifactRecordSchema = provider.DecisionMachineArtifactRecordSchema;
15
- exports.DetectorRecordSchema = provider.DetectorRecordSchema;
16
- exports.PoWCaptchaRecordSchema = provider.PoWCaptchaRecordSchema;
17
- exports.PuzzleCaptchaRecordSchema = provider.PuzzleCaptchaRecordSchema;
18
- exports.ScheduledTaskRecordSchema = provider.ScheduledTaskRecordSchema;
19
- exports.ScheduledTaskSchema = provider.ScheduledTaskSchema;
20
- exports.SessionRecordSchema = provider.SessionRecordSchema;
21
- exports.SolutionRecordSchema = provider.SolutionRecordSchema;
22
- exports.UserCommitmentRecordSchema = provider.UserCommitmentRecordSchema;
23
- exports.UserSolutionRecordSchema = provider.UserSolutionRecordSchema;
24
- exports.AccountSchema = client.AccountSchema;
25
- exports.IPValidationRulesSchema = client.IPValidationRulesSchema;
26
- exports.TableNames = client.TableNames;
27
- exports.UserDataSchema = client.UserDataSchema;
28
- exports.UserSettingsSchema = client.UserSettingsSchema;
29
- exports.StoredPoWCaptchaRecordSchema = captcha.StoredPoWCaptchaRecordSchema;
30
- exports.StoredPuzzleCaptchaRecordSchema = captcha.StoredPuzzleCaptchaRecordSchema;
31
- exports.StoredSessionRecordSchema = captcha.StoredSessionRecordSchema;
32
- exports.StoredUserCommitmentRecordSchema = captcha.StoredUserCommitmentRecordSchema;
33
- exports.SpamEmailDomainRecordSchema = spamEmailDomain.SpamEmailDomainRecordSchema;
34
- exports.BannedDomainRecordSchema = bannedDomain.BannedDomainRecordSchema;
2
+ const require_client = require("./types/client.cjs");
3
+ const require_provider = require("./types/provider.cjs");
4
+ const require_captcha = require("./types/captcha.cjs");
5
+ const require_spamEmailDomain = require("./types/spamEmailDomain.cjs");
6
+ const require_bannedDomain = require("./types/bannedDomain.cjs");
7
+ exports.AccountSchema = require_client.AccountSchema;
8
+ exports.BannedDomainRecordSchema = require_bannedDomain.BannedDomainRecordSchema;
9
+ exports.CaptchaRecordSchema = require_provider.CaptchaRecordSchema;
10
+ exports.ClientContextEntropyRecordSchema = require_provider.ClientContextEntropyRecordSchema;
11
+ exports.ClientRecordSchema = require_provider.ClientRecordSchema;
12
+ exports.CompositeIpAddressRecordSchemaObj = require_provider.CompositeIpAddressRecordSchemaObj;
13
+ exports.DatasetRecordSchema = require_provider.DatasetRecordSchema;
14
+ exports.DecisionMachineArtifactRecordSchema = require_provider.DecisionMachineArtifactRecordSchema;
15
+ exports.DetectorRecordSchema = require_provider.DetectorRecordSchema;
16
+ exports.IPValidationRulesSchema = require_client.IPValidationRulesSchema;
17
+ exports.PoWCaptchaRecordSchema = require_provider.PoWCaptchaRecordSchema;
18
+ exports.PuzzleCaptchaRecordSchema = require_provider.PuzzleCaptchaRecordSchema;
19
+ exports.ScheduledTaskRecordSchema = require_provider.ScheduledTaskRecordSchema;
20
+ exports.ScheduledTaskSchema = require_provider.ScheduledTaskSchema;
21
+ exports.SessionRecordSchema = require_provider.SessionRecordSchema;
22
+ exports.SolutionRecordSchema = require_provider.SolutionRecordSchema;
23
+ exports.SpamEmailDomainRecordSchema = require_spamEmailDomain.SpamEmailDomainRecordSchema;
24
+ exports.StoredPoWCaptchaRecordSchema = require_captcha.StoredPoWCaptchaRecordSchema;
25
+ exports.StoredPuzzleCaptchaRecordSchema = require_captcha.StoredPuzzleCaptchaRecordSchema;
26
+ exports.StoredSessionRecordSchema = require_captcha.StoredSessionRecordSchema;
27
+ exports.StoredUserCommitmentRecordSchema = require_captcha.StoredUserCommitmentRecordSchema;
28
+ exports.TableNames = require_client.TableNames;
29
+ exports.UserCommitmentRecordSchema = require_provider.UserCommitmentRecordSchema;
30
+ exports.UserDataSchema = require_client.UserDataSchema;
31
+ exports.UserSettingsSchema = require_client.UserSettingsSchema;
32
+ exports.UserSolutionRecordSchema = require_provider.UserSolutionRecordSchema;
@@ -1,8 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const mongoose = require("mongoose");
4
- const BannedDomainRecordSchema = new mongoose.Schema({
5
- domain: { type: String, required: true, unique: true }
6
- });
1
+ //#region src/types/bannedDomain.ts
2
+ var BannedDomainRecordSchema = new (require("mongoose")).Schema({ domain: {
3
+ type: String,
4
+ required: true,
5
+ unique: true
6
+ } });
7
7
  BannedDomainRecordSchema.index({ domain: 1 });
8
+ //#endregion
8
9
  exports.BannedDomainRecordSchema = BannedDomainRecordSchema;
@@ -1,20 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const mongoose = require("mongoose");
4
- const provider = require("./provider.cjs");
5
- const StoredSessionRecordSchema = provider.SessionRecordSchema;
6
- const StoredUserCommitmentRecordSchema = new mongoose.Schema({
7
- ...provider.UserCommitmentRecordSchema.obj
8
- });
1
+ const require_provider = require("./provider.cjs");
2
+ let mongoose = require("mongoose");
3
+ //#region src/types/captcha.ts
4
+ var StoredSessionRecordSchema = require_provider.SessionRecordSchema;
5
+ var StoredUserCommitmentRecordSchema = new mongoose.Schema({ ...require_provider.UserCommitmentRecordSchema.obj });
9
6
  StoredUserCommitmentRecordSchema.index({ sessionId: 1 });
10
- const StoredPoWCaptchaRecordSchema = new mongoose.Schema({
11
- ...provider.PoWCaptchaRecordSchema.obj
12
- });
7
+ var StoredPoWCaptchaRecordSchema = new mongoose.Schema({ ...require_provider.PoWCaptchaRecordSchema.obj });
13
8
  StoredPoWCaptchaRecordSchema.index({ sessionId: 1 });
14
- const StoredPuzzleCaptchaRecordSchema = new mongoose.Schema({
15
- ...provider.PuzzleCaptchaRecordSchema.obj
16
- });
9
+ var StoredPuzzleCaptchaRecordSchema = new mongoose.Schema({ ...require_provider.PuzzleCaptchaRecordSchema.obj });
17
10
  StoredPuzzleCaptchaRecordSchema.index({ sessionId: 1 });
11
+ //#endregion
18
12
  exports.StoredPoWCaptchaRecordSchema = StoredPoWCaptchaRecordSchema;
19
13
  exports.StoredPuzzleCaptchaRecordSchema = StoredPuzzleCaptchaRecordSchema;
20
14
  exports.StoredSessionRecordSchema = StoredSessionRecordSchema;