Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mcaptcha/core-glue

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcaptcha/core-glue - npm Package Compare versions

Comparing version 0.1.0-alpha-2 to 0.1.0-alpha-3

2

dist/index.js

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.mcaptchaGlue=t():e.mcaptchaGlue=t()}(self,(function(){return(()=>{"use strict";var e={607:function(e,t){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationError=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.message="Provide either widget link or site key to display mCaptcha widget",t}return n(t,e),t}(Error);t.ConfigurationError=o;var r=function(){function e(e,t){var i=this;if(this.handle=function(e){console.log("message received from "+e.origin+" with data: "+e.data.token),new URL(e.origin).host==i.widgetLink.host?i.updateState(e.data.token):console.error("expected message from "+i.widgetLink.host+" but received message from "+e.origin+". Aborting.")},this.updateState=t,e.widgetLink&&e.siteKey)throw new o;if(e.widgetLink)this.widgetLink=e.widgetLink;else{if(!e.siteKey)throw new o;e.siteKey.instanceUrl?(this.widgetLink=e.siteKey.instanceUrl,this.widgetLink.pathname="/widget/",this.widgetLink.search="?sitekey="+e.siteKey.key):this.widgetLink=new URL("https://demo.mcaptcha.org/widget/?sitekey="+e.siteKey.key)}}return e.prototype.listen=function(){window.addEventListener("message",this.handle)},e.prototype.destroy=function(){window.removeEventListener("message",this.handle)},e}();t.default=r}},t={};return e[607](0,t),t})()}));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mcaptchaGlue=e():t.mcaptchaGlue=e()}(this,(function(){return(()=>{"use strict";var t={851:function(t,e){var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationError=void 0;var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.message="Provide either widget link or site key to display mCaptcha widget",e}return i(e,t),e}(Error);e.ConfigurationError=o;var r=function(){function t(t,e){var n=this;if(this.handle=function(t){console.log("message received from ".concat(t.origin," with data: ").concat(t.data.token)),new URL(t.origin).host==n.widgetLink.host?n.updateState(t.data.token):console.error("expected message from ".concat(n.widgetLink.host," but received message from ").concat(t.origin,". Aborting."))},this.updateState=e,t.widgetLink&&t.siteKey)throw new o;if(t.widgetLink)this.widgetLink=t.widgetLink;else{if(!t.siteKey)throw new o;t.siteKey.instanceUrl?(this.widgetLink=t.siteKey.instanceUrl,this.widgetLink.pathname="/widget/",this.widgetLink.search="?sitekey=".concat(t.siteKey.key)):this.widgetLink=new URL("https://demo.mcaptcha.org/widget/?sitekey=".concat(t.siteKey.key))}}return t.prototype.listen=function(){window.addEventListener("message",this.handle)},t.prototype.destroy=function(){window.removeEventListener("message",this.handle)},t}();e.default=r}},e={};return t[851](0,e),e})()}));
//# sourceMappingURL=index.js.map

@@ -5,3 +5,3 @@ {

"description": "internal library containig shared glue code",
"version": "0.1.0-alpha-2",
"version": "0.1.0-alpha-3",
"license": "(MIT OR Apache-2.0)",

@@ -63,3 +63,2 @@ "keywords": [

"jest": "^27.2.5",
"jest-fetch-mock": "^3.0.3",
"jsdom": "^18.0.0",

@@ -66,0 +65,0 @@ "rimraf": "^3.0.0",

@@ -6,2 +6,3 @@ <div align="center">

[![NPM](https://img.shields.io/npm/v/@mcaptcha/core-glue.svg)](https://www.npmjs.com/package/@mcaptcha/core-glue)
[![0.1.0](https://img.shields.io/badge/TypeScript_docs-master-2b7489)](https://mcaptcha.github.io/glue/core-glue)

@@ -8,0 +9,0 @@ ![Build)](<https://github.com/mCaptcha/glue/workflows/CI%20(Linux)/badge.svg>)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc