@prosopo/server 0.2.16 → 0.2.19

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.
Files changed (2) hide show
  1. package/README.md +2 -6
  2. package/package.json +17 -13
package/README.md CHANGED
@@ -15,8 +15,8 @@ npm install @prosopo/server --save
15
15
  Simply import the `ProsopoServer` class and instantiate it with your Procaptcha API key.
16
16
 
17
17
  ```typescript
18
- import {ApiParams, ProcaptchaResponse} from '@prosopo/types'
19
- import {ProsopoServer} from '@prosopo/server'
18
+ import { ApiParams, ProcaptchaResponse } from '@prosopo/types'
19
+ import { ProsopoServer } from '@prosopo/server'
20
20
 
21
21
  async function getProsopoServer() {
22
22
  const config = getProsopoConfig()
@@ -27,11 +27,9 @@ async function getProsopoServer() {
27
27
  }
28
28
 
29
29
  async function protectedFunction(server: ProsopoServer, payload: ProcaptchaResponse) {
30
-
31
30
  if (await server.isVerified(payload[ApiParams.procaptchaResponse])) {
32
31
  // perform CAPTCHA protected action
33
32
  }
34
-
35
33
  }
36
34
 
37
35
  const payload = getPayloadFromRequest() // your request payload
@@ -40,8 +38,6 @@ getProsopoServer().then((server) => {
40
38
  // ...
41
39
  })
42
40
  })
43
-
44
-
45
41
  ```
46
42
 
47
43
  The full example can be seen [here](https://github.com/prosopo/captcha/blob/main/demos/client-example-server/src/app.ts).
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@prosopo/server",
3
- "version": "0.2.16",
3
+ "version": "0.2.19",
4
4
  "description": "NodeJS package for server side communication with the prosopo captcha client",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
7
7
  "engines": {
8
- "node": ">=16",
9
- "npm": "8.9"
8
+ "node": ">=18",
9
+ "npm": ">=9"
10
10
  },
11
11
  "exports": {
12
12
  ".": {
@@ -18,8 +18,12 @@
18
18
  "clean": "tsc --build --clean",
19
19
  "build": "tsc --build --verbose tsconfig.json",
20
20
  "build:cjs": "npx vite --config vite.cjs.config.ts build",
21
- "lint": "npx eslint .",
22
- "lint:fix": "npx eslint . --fix --config ../../.eslintrc.js"
21
+ "eslint": "npx eslint . --no-error-on-unmatched-pattern --ignore-path ../../.eslintignore",
22
+ "eslint:fix": "npm run eslint -- --fix",
23
+ "prettier": "npx prettier . --check --no-error-on-unmatched-pattern --ignore-path ../../.eslintignore",
24
+ "prettier:fix": "npm run prettier -- --write",
25
+ "lint": "npm run eslint && npm run prettier",
26
+ "lint:fix": "npm run eslint:fix && npm run prettier:fix"
23
27
  },
24
28
  "repository": {
25
29
  "type": "git",
@@ -33,14 +37,14 @@
33
37
  "homepage": "https://github.com/prosopo/captcha#readme",
34
38
  "sideEffects": false,
35
39
  "dependencies": {
36
- "@polkadot/api": "10.10.1",
37
- "@polkadot/keyring": "12.5.1",
38
- "@polkadot/rpc-provider": "10.10.1",
39
- "@polkadot/types": "10.10.1",
40
- "@prosopo/api": "0.2.16",
41
- "@prosopo/contract": "0.2.16",
42
- "@prosopo/captcha-contract": "0.2.16",
43
- "@prosopo/types": "0.2.16"
40
+ "@polkadot/api": "10.11.1",
41
+ "@polkadot/keyring": "12.6.1",
42
+ "@polkadot/rpc-provider": "10.11.1",
43
+ "@polkadot/types": "10.11.1",
44
+ "@prosopo/api": "0.2.19",
45
+ "@prosopo/contract": "0.2.19",
46
+ "@prosopo/captcha-contract": "0.2.19",
47
+ "@prosopo/types": "0.2.19"
44
48
  },
45
49
  "devDependencies": {
46
50
  "tslib": "2.6.2",