From 65961265806257c750fad1ff8e6a223aa8dacf3a Mon Sep 17 00:00:00 2001 From: chvarkov Date: Thu, 17 Dec 2020 16:51:32 +0300 Subject: [PATCH] Removed unused dev dependencies. Updated readme. --- README.md | 15 +++++++------- package.json | 8 ++------ webpack.config.js | 51 ----------------------------------------------- 3 files changed, 9 insertions(+), 65 deletions(-) delete mode 100644 webpack.config.js diff --git a/README.md b/README.md index 8b535f8..217df05 100644 --- a/README.md +++ b/README.md @@ -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\ | 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.**
Type: `string`
Google recaptcha secret key | +| `response` | **Required.**
Type: `(request) => string`
Function that returns response (recaptcha token) by request | +| `skipIf` | Optional.
Type: `boolean` \| `(request) => boolean \| Promise`
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.
Type: `boolean`
If your server has trouble connecting to https://www.google.com. You can use https://recaptcha.net instead, just set true | +| `agent` | Optional.
Type: `https.Agent`
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. diff --git a/package.json b/package.json index f582697..a7eb5bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nestlab/google-recaptcha", - "version": "1.1.10", + "version": "1.1.11", "description": "Google recaptcha module for NestJS.", "keywords": [ "nest", @@ -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": [ diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 39af133..0000000 --- a/webpack.config.js +++ /dev/null @@ -1,51 +0,0 @@ -const path = require('path'); -const NodeExternals = require('webpack-node-externals'); -const DtsBundleWebpack = require('dts-bundle-webpack'); - -module.exports = () => { - return { - entry: ['./src/index.ts'], - target: 'node', - externals: [ - NodeExternals({ - whitelist: ['./src/index.ts'], - }), - ], - node: { - __dirname: false, - __filename: false, - }, - module: { - rules: [ - { - test: /.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/, - }, - ], - }, - mode: 'development', - resolve: { - extensions: ['.tsx', '.ts', '.js'], - }, - plugins: [ - // new DtsBundleWebpack({ - // name: 'package-name', - // main: 'dist/index.d.ts', - // baseDir: 'dist', - // out: 'index.d.ts', - // externals: false, - // removeSource: true, - // outputAsModuleFolder: true, - // headerText: ` Package ${require('./package').name} ` - // }) - ], - watchOptions: { - ignored: '**/*.log', - }, - output: { - path: path.join(__dirname, 'dist'), - filename: 'index.js', - }, - }; -};