@prosopo/cli 3.5.0 → 3.5.8

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.
@@ -72,7 +72,12 @@ const commandSiteKeyRegister = (pair, config, cmdArgs) => {
72
72
  disallowWebView: false,
73
73
  contextAware: {
74
74
  enabled: false,
75
- threshold: types.contextAwareThresholdDefault
75
+ contexts: {
76
+ [types.ContextType.Default]: {
77
+ type: types.ContextType.Default,
78
+ threshold: types.contextAwareThresholdDefault
79
+ }
80
+ }
76
81
  }
77
82
  });
78
83
  logger.info(() => ({
@@ -75,11 +75,7 @@ const commandSiteKeyRegisterApi = (pair, authAccount, config, cmdArgs) => {
75
75
  domains: domains || [],
76
76
  powDifficulty: pow_difficulty,
77
77
  imageThreshold: image_threshold,
78
- disallowWebView: false,
79
- contextAware: {
80
- enabled: false,
81
- threshold: types.contextAwareThresholdDefault
82
- }
78
+ disallowWebView: false
83
79
  },
84
80
  timestamp,
85
81
  signature
@@ -85,6 +85,9 @@ function getConfig(captchaSolutionsConfig, captchaServeConfig, who = "PROVIDER",
85
85
  },
86
86
  clientListScheduler: {
87
87
  schedule: process.env.CLIENT_LIST_SCHEDULE
88
+ },
89
+ clientEntropyScheduler: {
90
+ schedule: process.env.CLIENT_ENTROPY_SCHEDULE
88
91
  }
89
92
  },
90
93
  lRules: getLRules(),
@@ -1,7 +1,7 @@
1
1
  import { getLogger, LogLevel } from "@prosopo/common";
2
2
  import { ProviderEnvironment } from "@prosopo/env";
3
3
  import { Tasks } from "@prosopo/provider";
4
- import { CaptchaTypeSpec, Tier, contextAwareThresholdDefault } from "@prosopo/types";
4
+ import { CaptchaTypeSpec, Tier, ContextType, contextAwareThresholdDefault } from "@prosopo/types";
5
5
  import { z } from "zod";
6
6
  import { validateSiteKey } from "./validators.js";
7
7
  const SiteKeyRegisterCommandArgsSpec = z.object({
@@ -70,7 +70,12 @@ const commandSiteKeyRegister = (pair, config, cmdArgs) => {
70
70
  disallowWebView: false,
71
71
  contextAware: {
72
72
  enabled: false,
73
- threshold: contextAwareThresholdDefault
73
+ contexts: {
74
+ [ContextType.Default]: {
75
+ type: ContextType.Default,
76
+ threshold: contextAwareThresholdDefault
77
+ }
78
+ }
74
79
  }
75
80
  });
76
81
  logger.info(() => ({
@@ -1,7 +1,7 @@
1
1
  import { ProviderApi } from "@prosopo/api";
2
2
  import { getLogger, LogLevel } from "@prosopo/common";
3
3
  import { ProviderEnvironment } from "@prosopo/env";
4
- import { contextAwareThresholdDefault, CaptchaTypeSpec, Tier } from "@prosopo/types";
4
+ import { CaptchaTypeSpec, Tier } from "@prosopo/types";
5
5
  import { u8aToHex } from "@prosopo/util";
6
6
  import { z } from "zod";
7
7
  import { SiteKeyRegisterCommandArgsSpec } from "./siteKeyRegister.js";
@@ -74,11 +74,7 @@ const commandSiteKeyRegisterApi = (pair, authAccount, config, cmdArgs) => {
74
74
  domains: domains || [],
75
75
  powDifficulty: pow_difficulty,
76
76
  imageThreshold: image_threshold,
77
- disallowWebView: false,
78
- contextAware: {
79
- enabled: false,
80
- threshold: contextAwareThresholdDefault
81
- }
77
+ disallowWebView: false
82
78
  },
83
79
  timestamp,
84
80
  signature
@@ -83,6 +83,9 @@ function getConfig(captchaSolutionsConfig, captchaServeConfig, who = "PROVIDER",
83
83
  },
84
84
  clientListScheduler: {
85
85
  schedule: process.env.CLIENT_LIST_SCHEDULE
86
+ },
87
+ clientEntropyScheduler: {
88
+ schedule: process.env.CLIENT_ENTROPY_SCHEDULE
86
89
  }
87
90
  },
88
91
  lRules: getLRules(),
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@prosopo/cli",
3
- "version": "3.5.0",
3
+ "version": "3.5.8",
4
4
  "description": "CLI for Prosopo Provider",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "type": "module",
8
8
  "engines": {
9
- "node": ">=v20.0.0",
10
- "npm": ">=10.6.0"
9
+ "node": "^24",
10
+ "npm": "^11"
11
11
  },
12
12
  "exports": {
13
13
  ".": {
@@ -31,20 +31,19 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@polkadot/types-codec": "16.4.9",
34
- "@prosopo/api": "3.1.33",
35
- "@prosopo/api-express-router": "3.0.34",
36
- "@prosopo/common": "3.1.22",
37
- "@prosopo/config": "3.1.22",
38
- "@prosopo/dotenv": "3.0.27",
39
- "@prosopo/env": "3.2.22",
40
- "@prosopo/keyring": "2.8.36",
41
- "@prosopo/locale": "3.1.22",
42
- "@prosopo/provider": "3.13.0",
43
- "@prosopo/types": "3.6.0",
44
- "@prosopo/user-access-policy": "3.5.28",
45
- "@prosopo/util": "3.2.0",
46
- "@prosopo/util-crypto": "13.5.24",
47
- "@prosopo/workspace": "3.1.15",
34
+ "@prosopo/api": "3.1.37",
35
+ "@prosopo/api-express-router": "3.0.40",
36
+ "@prosopo/common": "3.1.26",
37
+ "@prosopo/dotenv": "3.0.31",
38
+ "@prosopo/env": "3.2.28",
39
+ "@prosopo/keyring": "2.8.40",
40
+ "@prosopo/locale": "3.1.26",
41
+ "@prosopo/provider": "3.13.7",
42
+ "@prosopo/types": "3.6.4",
43
+ "@prosopo/user-access-policy": "3.5.32",
44
+ "@prosopo/util": "3.2.4",
45
+ "@prosopo/util-crypto": "13.5.28",
46
+ "@prosopo/workspace": "3.1.19",
48
47
  "cors": "2.8.5",
49
48
  "cron-parser": "4.9.0",
50
49
  "dotenv": "16.4.5",
@@ -53,6 +52,7 @@
53
52
  "zod": "3.23.8"
54
53
  },
55
54
  "devDependencies": {
55
+ "@prosopo/config": "3.1.26",
56
56
  "@polkadot-api/substrate-client": "0.1.4",
57
57
  "@types/cors": "2.8.17",
58
58
  "@types/node": "22.10.2",