@nestlab/google-recaptcha
Advanced tools
Comparing version 3.1.2 to 3.1.3
import { ErrorCode } from '../enums/error-code'; | ||
import { VerifyResponseEnterprise } from '../interfaces/verify-response-enterprise'; | ||
import { VerifyResponseEnterpriseRiskAnalysis } from '../interfaces/verify-response-enterprise'; | ||
import { LiteralObject } from '@nestjs/common'; | ||
@@ -22,3 +22,3 @@ export interface RecaptchaVerificationResultOptions<Res> { | ||
getResponse(): Res; | ||
getEnterpriseRiskAnalytics(): VerifyResponseEnterprise | null; | ||
getEnterpriseRiskAnalytics(): VerifyResponseEnterpriseRiskAnalysis | null; | ||
} |
{ | ||
"name": "@nestlab/google-recaptcha", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "Google recaptcha module for NestJS.", | ||
@@ -28,3 +28,4 @@ "keywords": [ | ||
"test": "jest --silent=false", | ||
"test:cov": "jest --coverage" | ||
"test:cov": "jest --coverage", | ||
"test:coveralls": "jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" | ||
}, | ||
@@ -63,2 +64,3 @@ "repository": { | ||
"@typescript-eslint/parser": "^5.33.1", | ||
"coveralls": "^3.1.1", | ||
"eslint": "^8.22.0", | ||
@@ -68,2 +70,3 @@ "jest": "^28.1.3", | ||
"rxjs": "^7.5.6", | ||
"supertest": "^6.2.4", | ||
"ts-jest": "^28.0.8", | ||
@@ -70,0 +73,0 @@ "ts-loader": "^9.3.1", |
# Google recaptcha module | ||
[![NPM Version](https://img.shields.io/npm/v/@nestlab/google-recaptcha.svg)](https://www.npmjs.com/package/@nestlab/google-recaptcha) | ||
[![Licence](https://img.shields.io/npm/l/@nestlab/google-recaptcha.svg)](https://github.com/chvarkov/google-recaptcha/blob/master/LICENSE) | ||
[![NPM Downloads](https://img.shields.io/npm/dm/@nestlab/google-recaptcha.svg)](https://www.npmjs.com/package/@nestlab/google-recaptcha) | ||
[![Circle CI build](https://img.shields.io/circleci/build/github/chvarkov/google-recaptcha/master)](https://github.com/chvarkov/google-recaptcha/tree/master) | ||
[![Coverage Status](https://coveralls.io/repos/github/chvarkov/google-recaptcha/badge.svg?branch=master)](https://coveralls.io/github/chvarkov/google-recaptcha?branch=develop) | ||
@@ -3,0 +8,0 @@ The [NestJS](https://docs.nestjs.com/) module to protect your endpoints via [google recaptcha](https://www.google.com/recaptcha/about/). |
@@ -27,7 +27,6 @@ "use strict"; | ||
resolve() { | ||
var _a; | ||
if (this.options.secretKey) { | ||
return this.googleRecaptchaValidator; | ||
} | ||
if ((_a = Object.keys(this.options.enterprise || {})) === null || _a === void 0 ? void 0 : _a.length) { | ||
if (Object.keys(this.options.enterprise || {}).length) { | ||
return this.googleRecaptchaEnterpriseValidator; | ||
@@ -34,0 +33,0 @@ } |
@@ -26,2 +26,3 @@ "use strict"; | ||
const google_recaptcha_context_1 = require("../../enums/google-recaptcha-context"); | ||
const rxjs_1 = require("rxjs"); | ||
let GoogleRecaptchaValidator = class GoogleRecaptchaValidator extends abstract_google_recaptcha_validator_1.AbstractGoogleRecaptchaValidator { | ||
@@ -71,4 +72,3 @@ constructor(http, logger, options) { | ||
} | ||
return this.http.post(url, body, config) | ||
.toPromise() | ||
return (0, rxjs_1.firstValueFrom)(this.http.post(url, body, config)) | ||
.then(res => res.data) | ||
@@ -75,0 +75,0 @@ .then(data => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105522
343
21
1189