Skip to content

Commit

Permalink
Merge pull request #23 from chvarkov/develop
Browse files Browse the repository at this point in the history
Removed unused dev dependencies. Updated readme.
  • Loading branch information
chvarkov authored Dec 17, 2020
2 parents 8f89327 + 6596126 commit fd030eb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 65 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,13 @@ export class AppModule {

**Configuration options**

| Property | Type | Description |
|-------------------|--------------------------------------------------------|-------------|
| `secretKey` | string | **Required.** Google recaptcha secret key |
| `response` | (request) => string | **Required.** Function that returns response (recaptcha token) by request |
| `skipIf` | boolean \| (request) => boolean \| Promise\<boolean\> | Optional. Function that returns true if you allow the request to skip the recaptcha verification. Useful for involing other check methods (e.g. custom privileged API key) or for development or testing |
| `useRecaptchaNet` | boolean | Optional. If your server has trouble connecting to https://www.google.com. You can use https://recaptcha.net instead, just set true |
| `agent` | https.Agent | Optional. If you need to use an agent |

| Property | Description |
|-------------------|-------------|
| `secretKey` | **Required.**<br> Type: `string`<br> Google recaptcha secret key |
| `response` | **Required.**<br> Type: `(request) => string`<br> Function that returns response (recaptcha token) by request |
| `skipIf` | Optional.<br> Type: `boolean` \| `(request) => boolean \| Promise<boolean>` <br> Function that returns true if you allow the request to skip the recaptcha verification. Useful for involing other check methods (e.g. custom privileged API key) or for development or testing |
| `useRecaptchaNet` | Optional.<br> Type: `boolean`<br> If your server has trouble connecting to https://www.google.com. You can use https://recaptcha.net instead, just set true |
| `agent` | Optional.<br> Type: `https.Agent`<br> If you need to use an agent |

If you want import configs from your [ConfigService](https://docs.nestjs.com/techniques/configuration#getting-started) via [custom getter function](https://docs.nestjs.com/techniques/configuration#custom-getter-functions) that will return `GoogleRecaptchaModuleOptions` object.

Expand Down
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestlab/google-recaptcha",
"version": "1.1.10",
"version": "1.1.11",
"description": "Google recaptcha module for NestJS.",
"keywords": [
"nest",
Expand Down Expand Up @@ -41,17 +41,13 @@
"@nestjs/testing": "^6.11.11",
"@types/jest": "^24.9.1",
"@types/node": "^12.12.14",
"dts-bundle-webpack": "^1.0.2",
"jest": "^24.9.0",
"reflect-metadata": "^0.1.13",
"rxjs": "^6.5.4",
"ts-jest": "^24.2.0",
"ts-loader": "^8.0.0",
"ts-node": "^8.5.2",
"typescript": "^3.7.2",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
"webpack-node-externals": "^1.7.2"
"typescript": "^3.7.2"
},
"jest": {
"moduleFileExtensions": [
Expand Down
51 changes: 0 additions & 51 deletions webpack.config.js

This file was deleted.

0 comments on commit fd030eb

Please sign in to comment.