@prosopo/cli 3.6.66 → 3.6.67

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/cli@3.6.66 build:cjs
2
+ > @prosopo/cli@3.6.67 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ViteCommonJSConfig: .
@@ -80,4 +80,4 @@ rendering chunks...
80
80
  dist/cjs/commands/siteKeyRegister.cjs 3.81 kB
81
81
  dist/cjs/prosopo.config.cjs 5.29 kB
82
82
  dist/cjs/RateLimiter.cjs 5.48 kB
83
- ✓ built in 258ms
83
+ ✓ built in 189ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/cli@3.6.66 build:tsc
2
+ > @prosopo/cli@3.6.67 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 4:36:14 PM - Projects in this build:
5
+ 11:59:04 AM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../locale/tsconfig.json
8
8
  * ../util/tsconfig.json
@@ -28,53 +28,53 @@
28
28
  * ../../dev/workspace/tsconfig.json
29
29
  * tsconfig.json
30
30
 
31
- 4:36:14 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/index.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
31
+ 11:59:04 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'
32
32
 
33
- 4:36:14 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
33
+ 11:59:04 AM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
34
34
 
35
- 4:36:14 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
35
+ 11:59:04 AM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
36
36
 
37
- 4:36:14 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'
37
+ 11:59:04 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'
38
38
 
39
- 4:36:14 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/keyring/keyring/types.ts' is older than output '../types/tsconfig.tsbuildinfo'
39
+ 11:59:04 AM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/provider/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
40
40
 
41
- 4:36:14 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
41
+ 11:59:04 AM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
42
42
 
43
- 4:36:14 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
43
+ 11:59:04 AM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
44
44
 
45
- 4:36:14 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
45
+ 11:59:04 AM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/error.ts' is older than output '../common/tsconfig.tsbuildinfo'
46
46
 
47
- 4:36:14 PM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/env.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
47
+ 11:59:04 AM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/env.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
48
48
 
49
- 4:36:14 PM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/IpInfoService.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
49
+ 11:59:04 AM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/IpInfoService.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
50
50
 
51
- 4:36:14 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'
51
+ 11:59:04 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'
52
52
 
53
- 4:36:14 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'
53
+ 11:59:04 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'
54
54
 
55
- 4:36:14 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/rule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
55
+ 11:59:04 AM - 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'
56
56
 
57
- 4:36:14 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/index.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
57
+ 11:59:04 AM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/types/captcha.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
58
58
 
59
- 4:36:14 PM - Project '../database/tsconfig.json' is up to date because newest input '../database/src/tests/mongoGlobalSetup.ts' is older than output '../database/tsconfig.tsbuildinfo'
59
+ 11:59:04 AM - Project '../database/tsconfig.json' is up to date because newest input '../database/src/tests/unit/redisCacheEscalation.unit.test.ts' is older than output '../database/tsconfig.tsbuildinfo'
60
60
 
61
- 4:36:14 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
61
+ 11:59:04 AM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
62
62
 
63
- 4:36:14 PM - Project '../types-env/tsconfig.json' is up to date because newest input '../types-env/src/env.ts' is older than output '../types-env/tsconfig.tsbuildinfo'
63
+ 11:59:04 AM - Project '../types-env/tsconfig.json' is up to date because newest input '../types-env/src/env.ts' is older than output '../types-env/tsconfig.tsbuildinfo'
64
64
 
65
- 4:36:14 PM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/index.ts' is older than output '../env/tsconfig.tsbuildinfo'
65
+ 11:59:04 AM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/index.ts' is older than output '../env/tsconfig.tsbuildinfo'
66
66
 
67
- 4:36:14 PM - Project '../api-express-router/tsconfig.json' is up to date because newest input '../api-express-router/src/middlewares/requestLoggerMiddleware.ts' is older than output '../api-express-router/tsconfig.tsbuildinfo'
67
+ 11:59:04 AM - Project '../api-express-router/tsconfig.json' is up to date because newest input '../api-express-router/src/apiExpressRouterFactory.ts' is older than output '../api-express-router/tsconfig.tsbuildinfo'
68
68
 
69
- 4:36:14 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/tests/mocks/data/captchas.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
69
+ 11:59:04 AM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/index.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
70
70
 
71
- 4:36:14 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/balancer.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
71
+ 11:59:04 AM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/balancer.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
72
72
 
73
- 4:36:14 PM - Project '../provider/tsconfig.json' is up to date because newest input '../provider/src/utils/dns.ts' is older than output '../provider/tsconfig.tsbuildinfo'
73
+ 11:59:04 AM - Project '../provider/tsconfig.json' is up to date because newest input '../provider/src/util.ts' is older than output '../provider/tsconfig.tsbuildinfo'
74
74
 
75
- 4:36:14 PM - Project '../../dev/workspace/tsconfig.json' is up to date because newest input '../../dev/workspace/src/index.ts' is older than output '../../dev/workspace/tsconfig.tsbuildinfo'
75
+ 11:59:04 AM - Project '../../dev/workspace/tsconfig.json' is up to date because newest input '../../dev/workspace/src/index.ts' is older than output '../../dev/workspace/tsconfig.tsbuildinfo'
76
76
 
77
- 4:36:14 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
77
+ 11:59:04 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
78
78
 
79
- 4:36:14 PM - Building project '/home/runner/work/captcha/captcha/packages/cli/tsconfig.json'...
79
+ 11:59:04 AM - Building project '/home/runner/work/captcha/captcha/packages/cli/tsconfig.json'...
80
80
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/cli@3.6.66 build
2
+ > @prosopo/cli@3.6.67 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/cli@3.6.66 build:cross-env
6
+ > @prosopo/cli@3.6.67 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -83,4 +83,4 @@ rendering chunks...
83
83
  dist/commands/siteKeyRegister.js 3.67 kB
84
84
  dist/prosopo.config.js 4.91 kB
85
85
  dist/RateLimiter.js 5.25 kB
86
- ✓ built in 189ms
86
+ ✓ built in 366ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @prosopo/cli
2
2
 
3
+ ## 3.6.67
4
+ ### Patch Changes
5
+
6
+ - Updated dependencies [6b17995]
7
+ - Updated dependencies [b394cc5]
8
+ - @prosopo/provider@4.15.7
9
+ - @prosopo/env@3.6.14
10
+
3
11
  ## 3.6.66
4
12
  ### Patch Changes
5
13
 
@@ -1782,7 +1782,7 @@ function zr(e, t, r) {
1782
1782
  throw new Error(`Index ${t} smaller than 0`);
1783
1783
  return e[t];
1784
1784
  }
1785
- const DMe = typeof process < "u" ? "3.6.66" : void 0, xve = DMe || "dev", q6 = new Array(256), Lve = new Array(256 * 256);
1785
+ const DMe = typeof process < "u" ? "3.6.67" : void 0, xve = DMe || "dev", q6 = new Array(256), Lve = new Array(256 * 256);
1786
1786
  for (let e = 0; e < 256; e++)
1787
1787
  q6[e] = e.toString(16).padStart(2, "0");
1788
1788
  for (let e = 0; e < 256; e++) {
@@ -101455,12 +101455,10 @@ async function bIe(e, t, r, n) {
101455
101455
  domain: i
101456
101456
  })), !1;
101457
101457
  }
101458
- if (o.redirectResult.tlsError)
101459
- return n.warn(() => ({
101460
- msg: "Email domain has TLS error",
101461
- domain: i
101462
- })), !0;
101463
- if (o.redirectResult.redirectUrl) {
101458
+ if (o.redirectResult.tlsError && n.info(() => ({
101459
+ msg: "Email domain apex has TLS error — observed, not treated as spam",
101460
+ domain: i
101461
+ })), o.redirectResult.redirectUrl) {
101464
101462
  const a = o.redirectResult.redirectUrl, u = Ont(a).toLowerCase().trim();
101465
101463
  n.info(() => ({
101466
101464
  msg: "Email domain has HTTP redirect",
@@ -103818,7 +103816,7 @@ const Nit = (e) => {
103818
103816
  if (!e.comparison)
103819
103817
  return { action: Ii.Allow };
103820
103818
  const n = [], i = Object.values(t.actions).filter(
103821
- (_) => _ === Ii.Reject
103819
+ (I) => I === Ii.Reject
103822
103820
  ), s = e.comparison.ip1Details?.country, o = e.comparison.ip2Details?.country, a = e.comparison.ip1Details?.countryCode, u = e.comparison.ip2Details?.countryCode;
103823
103821
  let c = t, l;
103824
103822
  a && t.countryOverrides?.[a] && (l = t.countryOverrides[a]), u && t.countryOverrides?.[u] && (l = t.countryOverrides[u]), l && (c = {
@@ -103835,66 +103833,71 @@ const Nit = (e) => {
103835
103833
  action: c.actions.countryChangeAction,
103836
103834
  message: `Country changed from ${s} to ${o}`
103837
103835
  });
103838
- const f = e.comparison.ip1Details?.city, d = e.comparison.ip2Details?.city;
103839
- if (f !== d && n.push({
103836
+ const f = e.comparison.ip1Details?.provider, d = e.comparison.ip2Details?.provider, h = e.comparison.ip1Details?.connectionType, p = e.comparison.ip2Details?.connectionType, g = !e.comparison.differentProviders && !!f && f !== "Unknown" && a === u && h !== "datacenter" && p !== "datacenter";
103837
+ g && r.info(() => ({
103838
+ msg: "Skipping city and distance IP validation rules for same trusted provider",
103839
+ data: {
103840
+ provider: f,
103841
+ countryCode: a
103842
+ }
103843
+ }));
103844
+ const m = e.comparison.ip1Details?.city, y = e.comparison.ip2Details?.city;
103845
+ !g && m !== y && n.push({
103840
103846
  met: !0,
103841
103847
  action: c.actions.cityChangeAction,
103842
- message: `City changed from ${f} to ${d}`
103843
- }), e.comparison.differentProviders) {
103844
- const _ = e.comparison.ip1Details?.provider, S = e.comparison.ip2Details?.provider;
103845
- n.push({
103846
- met: !0,
103847
- action: c.actions.ispChangeAction,
103848
- message: `ISP changed from ${_} to ${S}`
103849
- });
103850
- }
103851
- const h = e.comparison.distanceKm;
103852
- h !== void 0 && h > c.distanceThresholdKm && n.push({
103848
+ message: `City changed from ${m} to ${y}`
103849
+ }), e.comparison.differentProviders && n.push({
103850
+ met: !0,
103851
+ action: c.actions.ispChangeAction,
103852
+ message: `ISP changed from ${f} to ${d}`
103853
+ });
103854
+ const E = e.comparison.distanceKm;
103855
+ !g && E !== void 0 && E > c.distanceThresholdKm && n.push({
103853
103856
  met: !0,
103854
103857
  action: c.actions.distanceExceedAction,
103855
- message: `IP addresses are ${h.toFixed(2)}km apart (>${c.distanceThresholdKm}km limit)`
103858
+ message: `IP addresses are ${E.toFixed(2)}km apart (>${c.distanceThresholdKm}km limit)`
103856
103859
  });
103857
- const p = e.comparison.ip2Details?.abuserScore;
103858
- p !== void 0 && p > c.abuseScoreThreshold && n.push({
103860
+ const _ = e.comparison.ip2Details?.abuserScore;
103861
+ _ !== void 0 && _ > c.abuseScoreThreshold && n.push({
103859
103862
  met: !0,
103860
103863
  action: c.actions.abuseScoreExceedAction,
103861
- message: `Abuse score ${p.toFixed(4)} exceeds threshold ${c.abuseScoreThreshold}`
103864
+ message: `Abuse score ${_.toFixed(4)} exceeds threshold ${c.abuseScoreThreshold}`
103862
103865
  });
103863
- const g = e.comparison.ip1Details?.abuserScore;
103864
- if (g !== void 0 && g > c.abuseScoreThreshold && n.push({
103866
+ const S = e.comparison.ip1Details?.abuserScore;
103867
+ if (S !== void 0 && S > c.abuseScoreThreshold && n.push({
103865
103868
  met: !0,
103866
103869
  action: c.actions.abuseScoreExceedAction,
103867
- message: `Abuse score ${g.toFixed(4)} exceeds threshold ${c.abuseScoreThreshold}`
103870
+ message: `Abuse score ${S.toFixed(4)} exceeds threshold ${c.abuseScoreThreshold}`
103868
103871
  }), n.length === 0)
103869
103872
  return { action: Ii.Allow };
103870
- const m = [];
103871
- let y = Ii.Allow, E = !1;
103873
+ const O = [];
103874
+ let v = Ii.Allow, C = !1;
103872
103875
  if (c.requireAllConditions) {
103873
- const _ = n.filter(
103874
- (S) => S.action === Ii.Reject
103876
+ const I = n.filter(
103877
+ (R) => R.action === Ii.Reject
103875
103878
  );
103876
- _.length > 0 && _.length >= i.length && (y = Ii.Reject);
103877
- for (const S of n)
103878
- (S.action === Ii.Reject || S.action === Ii.Flag) && m.push(S.message);
103879
+ I.length > 0 && I.length >= i.length && (v = Ii.Reject);
103880
+ for (const R of n)
103881
+ (R.action === Ii.Reject || R.action === Ii.Flag) && O.push(R.message);
103879
103882
  } else
103880
- for (const _ of n) {
103881
- if (_.action === Ii.Reject) {
103882
- y = Ii.Reject, m.push(_.message);
103883
+ for (const I of n) {
103884
+ if (I.action === Ii.Reject) {
103885
+ v = Ii.Reject, O.push(I.message);
103883
103886
  break;
103884
103887
  }
103885
- _.action === Ii.Flag && (y = Ii.Flag, E = !0), m.push(_.message);
103888
+ I.action === Ii.Flag && (v = Ii.Flag, C = !0), O.push(I.message);
103886
103889
  }
103887
103890
  return r.info(() => ({
103888
- msg: `IP validation rules evaluated: ${y}`,
103891
+ msg: `IP validation rules evaluated: ${v}`,
103889
103892
  data: {
103890
103893
  conditions: n,
103891
- finalAction: y,
103894
+ finalAction: v,
103892
103895
  requireAllConditions: c.requireAllConditions
103893
103896
  }
103894
103897
  })), {
103895
- action: y,
103896
- errorMessage: m.length > 0 ? m.join("; ") : void 0,
103897
- shouldFlag: E
103898
+ action: v,
103899
+ errorMessage: O.length > 0 ? O.join("; ") : void 0,
103900
+ shouldFlag: C
103898
103901
  };
103899
103902
  }, rH = async (e, t, r, n, i, s) => {
103900
103903
  if (i?.forceConsistentIp === !0 && s && s !== e)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/cli",
3
- "version": "3.6.66",
3
+ "version": "3.6.67",
4
4
  "description": "CLI for Prosopo Provider",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -36,10 +36,10 @@
36
36
  "@prosopo/common": "3.1.46",
37
37
  "@prosopo/logger": "2.0.3",
38
38
  "@prosopo/dotenv": "3.0.49",
39
- "@prosopo/env": "3.6.13",
39
+ "@prosopo/env": "3.6.14",
40
40
  "@prosopo/keyring": "2.9.57",
41
41
  "@prosopo/locale": "3.2.7",
42
- "@prosopo/provider": "4.15.6",
42
+ "@prosopo/provider": "4.15.7",
43
43
  "@prosopo/types": "4.9.9",
44
44
  "@prosopo/util": "3.3.4",
45
45
  "@prosopo/workspace": "3.1.20",