Socket
Socket
Sign inDemoInstall

angular-captcha

Package Overview
Dependencies
0
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.0 to 2.0.0

2

package.json
{
"name": "angular-captcha",
"version": "1.4.0",
"version": "2.0.0",
"description": "BotDetect Captcha Angular Module (TypeScript / Angular 2+)",

@@ -5,0 +5,0 @@ "scripts": {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@angular/core");
var http_1 = require("@angular/http");
var http_1 = require("@angular/common/http");
var captcha_component_1 = require("./captcha.component");

@@ -6,0 +6,0 @@ var captcha_service_1 = require("./captcha.service");

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":4,"metadata":{"BotDetectCaptchaModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/http","name":"HttpModule"}],"declarations":[{"__symbolic":"reference","module":"./captcha-endpoint.pipe","name":"CaptchaEndpointPipe"},{"__symbolic":"reference","module":"./captcha.component","name":"CaptchaComponent"},{"__symbolic":"reference","module":"./correct-captcha.directive","name":"CorrectCaptchaDirective"}],"exports":[{"__symbolic":"reference","module":"./captcha.component","name":"CaptchaComponent"},{"__symbolic":"reference","module":"./correct-captcha.directive","name":"CorrectCaptchaDirective"}]}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"BotDetectCaptchaModule"},"providers":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideBotDetectCaptcha"},"arguments":[{"__symbolic":"reference","name":"config"}]}]}},"forChild":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"BotDetectCaptchaModule"},"providers":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideBotDetectCaptcha"},"arguments":[{"__symbolic":"reference","name":"config"}]}]}}}},"provideBotDetectCaptcha":{"__symbolic":"function","parameters":["config"],"value":[{"provide":{"__symbolic":"reference","module":"./config","name":"CAPTCHA_SETTINGS"},"useValue":{"__symbolic":"reference","name":"config"}},{"__symbolic":"reference","module":"./captcha-endpoint.pipe","name":"CaptchaEndpointPipe"},{"__symbolic":"reference","module":"./captcha.service","name":"CaptchaService"},{"__symbolic":"reference","module":"./captcha-helper.service","name":"CaptchaHelperService"}]}}}]
[{"__symbolic":"module","version":4,"metadata":{"BotDetectCaptchaModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule"}],"declarations":[{"__symbolic":"reference","module":"./captcha-endpoint.pipe","name":"CaptchaEndpointPipe"},{"__symbolic":"reference","module":"./captcha.component","name":"CaptchaComponent"},{"__symbolic":"reference","module":"./correct-captcha.directive","name":"CorrectCaptchaDirective"}],"exports":[{"__symbolic":"reference","module":"./captcha.component","name":"CaptchaComponent"},{"__symbolic":"reference","module":"./correct-captcha.directive","name":"CorrectCaptchaDirective"}]}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"BotDetectCaptchaModule"},"providers":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideBotDetectCaptcha"},"arguments":[{"__symbolic":"reference","name":"config"}]}]}},"forChild":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"BotDetectCaptchaModule"},"providers":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideBotDetectCaptcha"},"arguments":[{"__symbolic":"reference","name":"config"}]}]}}}},"provideBotDetectCaptcha":{"__symbolic":"function","parameters":["config"],"value":[{"provide":{"__symbolic":"reference","module":"./config","name":"CAPTCHA_SETTINGS"},"useValue":{"__symbolic":"reference","name":"config"}},{"__symbolic":"reference","module":"./captcha-endpoint.pipe","name":"CaptchaEndpointPipe"},{"__symbolic":"reference","module":"./captcha.service","name":"CaptchaService"},{"__symbolic":"reference","module":"./captcha-helper.service","name":"CaptchaHelperService"}]}}}]
import { PipeTransform } from '@angular/core';
export declare class CaptchaEndpointPipe implements PipeTransform {
/**
* Strip '/' character from the end of the given path.
*/
transform(value: string): string;
}

@@ -7,11 +7,6 @@ "use strict";

}
/**
* Strip '/' character from the end of the given path.
*/
/**
* Strip '/' character from the end of the given path.
*/
CaptchaEndpointPipe.prototype.transform = /**
* Strip '/' character from the end of the given path.
*/
// Strip '/' character from the end of the given path.
// Strip '/' character from the end of the given path.
CaptchaEndpointPipe.prototype.transform =
// Strip '/' character from the end of the given path.
function (value) {

@@ -18,0 +13,0 @@ return value.trim().replace(/\/+$/g, '');

@@ -1,6 +0,6 @@

import { Http } from '@angular/http';
import { HttpClient } from '@angular/common/http';
export declare class CaptchaHelperService {
private http;
constructor(http: Http);
constructor(http: HttpClient);
getScript(url: string, onLoadSuccess: () => void): void;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@angular/core");
var http_1 = require("@angular/http");
var http_1 = require("@angular/common/http");
var CaptchaHelperService = /** @class */ (function () {

@@ -14,4 +14,3 @@ function CaptchaHelperService(http) {

function (url, onLoadSuccess) {
this.http.get(url)
.map(function (response) { return response.text(); })
this.http.get(url, { responseType: 'text' })
.subscribe(function (scriptString) {

@@ -18,0 +17,0 @@ var f = new Function(scriptString);

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":4,"metadata":{"CaptchaHelperService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/http","name":"Http"}]}],"getScript":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":4,"metadata":{"CaptchaHelperService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient"}]}],"getScript":[{"__symbolic":"method"}]}}}}]

@@ -1,2 +0,2 @@

import { Http } from '@angular/http';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs/Rx';

@@ -10,3 +10,3 @@ import { CaptchaEndpointPipe } from './captcha-endpoint.pipe';

private _styleName;
constructor(http: Http, captchaEndpointPipe: CaptchaEndpointPipe, config: CaptchaSettings);
constructor(http: HttpClient, captchaEndpointPipe: CaptchaEndpointPipe, config: CaptchaSettings);
styleName: string;

@@ -16,3 +16,3 @@ readonly captchaEndpoint: string;

getHtml(): Observable<string>;
validate(captchaCode: string): Observable<string>;
validate(captchaCode: string): Observable<any>;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@angular/core");
var http_1 = require("@angular/http");
var http_1 = require("@angular/common/http");
var Rx_1 = require("rxjs/Rx");

@@ -54,5 +54,4 @@ var captcha_endpoint_pipe_1 = require("./captcha-endpoint.pipe");

var url = this.captchaEndpoint + '?get=html&c=' + this.styleName;
return this.http.get(url)
.map(function (response) { return response.text().replace(/<script.*<\/script>/g, ''); })
.catch(function (error) { return Rx_1.Observable.throw(error.json().error); });
return this.http.get(url, { responseType: 'text' })
.map(function (response) { return response.replace(/<script.*<\/script>/g, ''); });
};

@@ -68,5 +67,3 @@ // UI validate captcha.

var url = this.botdetectInstance.validationUrl + '&i=' + captchaCode;
return this.http.get(url)
.map(function (response) { return response.json(); })
.catch(function (error) { return Rx_1.Observable.throw(error.json().error); });
return this.http.get(url);
};

@@ -73,0 +70,0 @@ return CaptchaService;

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":4,"metadata":{"CaptchaService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"./config","name":"CAPTCHA_SETTINGS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/http","name":"Http"},{"__symbolic":"reference","module":"./captcha-endpoint.pipe","name":"CaptchaEndpointPipe"},{"__symbolic":"reference","module":"./captcha-settings.interface","name":"CaptchaSettings"}]}],"getHtml":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":4,"metadata":{"CaptchaService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"./config","name":"CAPTCHA_SETTINGS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient"},{"__symbolic":"reference","module":"./captcha-endpoint.pipe","name":"CaptchaEndpointPipe"},{"__symbolic":"reference","module":"./captcha-settings.interface","name":"CaptchaSettings"}]}],"getHtml":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}]}}}}]

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc