@cogitojs/cogito-identity
Advanced tools
Comparing version 0.2.11 to 0.2.12
@@ -29,38 +29,16 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } | ||
value: function () { | ||
var _getInfo = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee(_ref2) { | ||
var properties, request, response; | ||
return regeneratorRuntime.wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
properties = _ref2.properties; | ||
request = this.createRequest('getIdentityInfo', { | ||
properties: properties | ||
}); | ||
_context.next = 4; | ||
return this.channel.send(request); | ||
var _getInfo = _asyncToGenerator(function* (_ref2) { | ||
var properties = _ref2.properties; | ||
var request = this.createRequest('getIdentityInfo', { | ||
properties: properties | ||
}); | ||
var response = yield this.channel.send(request); | ||
case 4: | ||
response = _context.sent; | ||
if (response.error) { | ||
throw new Error(response.error.message); | ||
} else { | ||
return response.result; | ||
} | ||
}); | ||
if (!response.error) { | ||
_context.next = 9; | ||
break; | ||
} | ||
throw new Error(response.error.message); | ||
case 9: | ||
return _context.abrupt("return", response.result); | ||
case 10: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee, this); | ||
})); | ||
return function getInfo(_x) { | ||
@@ -67,0 +45,0 @@ return _getInfo.apply(this, arguments); |
{ | ||
"name": "@cogitojs/cogito-identity", | ||
"version": "0.2.11", | ||
"version": "0.2.12", | ||
"description": "Supports getting identity info from the Cogito app", | ||
@@ -5,0 +5,0 @@ "homepage": "https://cogito.mobi", |
@@ -148,38 +148,16 @@ (function (global, factory) { | ||
value: function () { | ||
var _getInfo = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee(_ref2) { | ||
var properties, request, response; | ||
return regeneratorRuntime.wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
properties = _ref2.properties; | ||
request = this.createRequest('getIdentityInfo', { | ||
properties: properties | ||
}); | ||
_context.next = 4; | ||
return this.channel.send(request); | ||
var _getInfo = _asyncToGenerator(function* (_ref2) { | ||
var properties = _ref2.properties; | ||
var request = this.createRequest('getIdentityInfo', { | ||
properties: properties | ||
}); | ||
var response = yield this.channel.send(request); | ||
case 4: | ||
response = _context.sent; | ||
if (response.error) { | ||
throw new Error(response.error.message); | ||
} else { | ||
return response.result; | ||
} | ||
}); | ||
if (!response.error) { | ||
_context.next = 9; | ||
break; | ||
} | ||
throw new Error(response.error.message); | ||
case 9: | ||
return _context.abrupt("return", response.result); | ||
case 10: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee, this); | ||
})); | ||
return function getInfo(_x) { | ||
@@ -186,0 +164,0 @@ return _getInfo.apply(this, arguments); |
@@ -1,1 +0,1 @@ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("crypto")):"function"==typeof define&&define.amd?define(["exports","crypto"],r):r(e["cogito-identity"]={},e.crypto)}(this,function(e,r){"use strict";function n(e,r,n,t,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?r(s):Promise.resolve(s).then(t,o)}function t(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}r=r&&r.hasOwnProperty("default")?r.default:r;for(var o=function(){return r.randomBytes(16)},i=[],a=0;a<256;++a)i[a]=(a+256).toString(16).substr(1);var u=function(e,r){var n=r||0,t=i;return[t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]]].join("")};var s,c,f,l=function(e,r,n){var t=r&&n||0;"string"==typeof e&&(r="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,r)for(var a=0;a<16;++a)r[t+a]=i[a];return r||u(i)},p=function(){function e(r){var n=r.channel;!function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e),this.channel=n}var r,o,i,a,u;return r=e,(o=[{key:"getInfo",value:(a=regeneratorRuntime.mark(function e(r){var n,t,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.properties,t=this.createRequest("getIdentityInfo",{properties:n}),e.next=4,this.channel.send(t);case 4:if(!(o=e.sent).error){e.next=9;break}throw new Error(o.error.message);case 9:return e.abrupt("return",o.result);case 10:case"end":return e.stop()}},e,this)}),u=function(){var e=this,r=arguments;return new Promise(function(t,o){var i=a.apply(e,r);function u(e){n(i,t,o,u,s,"next",e)}function s(e){n(i,t,o,u,s,"throw",e)}u(void 0)})},function(e){return u.apply(this,arguments)})},{key:"createRequest",value:function(e,r){return{jsonrpc:"2.0",id:this.newRequestId(),method:e,params:r}}},{key:"newRequestId",value:function(){return l()}}])&&t(r.prototype,o),i&&t(r,i),e}();f={Username:"username",EthereumAddress:"ethereumAddress"},(c="Property")in(s=p)?Object.defineProperty(s,c,{value:f,enumerable:!0,configurable:!0,writable:!0}):s[c]=f,e.CogitoIdentity=p,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("crypto")):"function"==typeof define&&define.amd?define(["exports","crypto"],r):r(e["cogito-identity"]={},e.crypto)}(this,function(e,r){"use strict";function n(e,r,n,t,o,i,u){try{var a=e[i](u),f=a.value}catch(e){return void n(e)}a.done?r(f):Promise.resolve(f).then(t,o)}function t(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}r=r&&r.hasOwnProperty("default")?r.default:r;for(var o=function(){return r.randomBytes(16)},i=[],u=0;u<256;++u)i[u]=(u+256).toString(16).substr(1);var a=function(e,r){var n=r||0,t=i;return[t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]]].join("")};var f,s,c,l=function(e,r,n){var t=r&&n||0;"string"==typeof e&&(r="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,r)for(var u=0;u<16;++u)r[t+u]=i[u];return r||a(i)},d=function(){function e(r){var n=r.channel;!function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e),this.channel=n}var r,o,i,u,a;return r=e,(o=[{key:"getInfo",value:(u=function*(e){var r=e.properties,n=this.createRequest("getIdentityInfo",{properties:r}),t=yield this.channel.send(n);if(t.error)throw new Error(t.error.message);return t.result},a=function(){var e=this,r=arguments;return new Promise(function(t,o){var i=u.apply(e,r);function a(e){n(i,t,o,a,f,"next",e)}function f(e){n(i,t,o,a,f,"throw",e)}a(void 0)})},function(e){return a.apply(this,arguments)})},{key:"createRequest",value:function(e,r){return{jsonrpc:"2.0",id:this.newRequestId(),method:e,params:r}}},{key:"newRequestId",value:function(){return l()}}])&&t(r.prototype,o),i&&t(r,i),e}();c={Username:"username",EthereumAddress:"ethereumAddress"},(s="Property")in(f=d)?Object.defineProperty(f,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):f[s]=c,e.CogitoIdentity=d,Object.defineProperty(e,"__esModule",{value:!0})}); |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
12
19057
422
1