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

@truework/credentials

Package Overview
Dependencies
Maintainers
6
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@truework/credentials - npm Package Compare versions

Comparing version 0.6.1 to 0.7.0

.nyc_output/1f1f9c96-8e56-4bc3-8f34-2c9e0017d6e9.json

2

.nyc_output/processinfo/index.json

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

{"processes":{"5b6102d5-18f3-4ffd-91f1-b623da19f303":{"parent":null,"children":["8dff54a6-91a5-454e-8f9e-e534b4e9f0b4","d3a5516c-4b95-4a0b-8234-1afa6ab2fb8d","d737aa36-782b-4906-84a2-d96f5aa96108"]},"8dff54a6-91a5-454e-8f9e-e534b4e9f0b4":{"parent":"5b6102d5-18f3-4ffd-91f1-b623da19f303","externalId":"src/__tests__/events.test.ts","children":[]},"d3a5516c-4b95-4a0b-8234-1afa6ab2fb8d":{"parent":"5b6102d5-18f3-4ffd-91f1-b623da19f303","externalId":"src/__tests__/frame.test.ts","children":[]},"d737aa36-782b-4906-84a2-d96f5aa96108":{"parent":"5b6102d5-18f3-4ffd-91f1-b623da19f303","externalId":"src/__tests__/index.test.ts","children":[]}},"files":{"/home/runner/work/truework.js/truework.js/packages/credentials/src/index.ts":["8dff54a6-91a5-454e-8f9e-e534b4e9f0b4","d737aa36-782b-4906-84a2-d96f5aa96108"],"/home/runner/work/truework.js/truework.js/packages/credentials/src/events.ts":["8dff54a6-91a5-454e-8f9e-e534b4e9f0b4","d737aa36-782b-4906-84a2-d96f5aa96108"],"/home/runner/work/truework.js/truework.js/packages/credentials/src/frame.ts":["8dff54a6-91a5-454e-8f9e-e534b4e9f0b4","d3a5516c-4b95-4a0b-8234-1afa6ab2fb8d","d737aa36-782b-4906-84a2-d96f5aa96108"],"/home/runner/work/truework.js/truework.js/packages/credentials/src/utils.ts":["8dff54a6-91a5-454e-8f9e-e534b4e9f0b4","d737aa36-782b-4906-84a2-d96f5aa96108"]},"externalIds":{"src/__tests__/events.test.ts":{"root":"8dff54a6-91a5-454e-8f9e-e534b4e9f0b4","children":[]},"src/__tests__/frame.test.ts":{"root":"d3a5516c-4b95-4a0b-8234-1afa6ab2fb8d","children":[]},"src/__tests__/index.test.ts":{"root":"d737aa36-782b-4906-84a2-d96f5aa96108","children":[]}}}
{"processes":{"1f1f9c96-8e56-4bc3-8f34-2c9e0017d6e9":{"parent":"f0f52aa2-d4af-4f95-a13c-0c0615d537ee","externalId":"src/__tests__/events.test.ts","children":[]},"511da6fd-67a4-4337-bd33-1fd731f464bb":{"parent":"f0f52aa2-d4af-4f95-a13c-0c0615d537ee","externalId":"src/__tests__/frame.test.ts","children":[]},"cd4b8fe3-ba5b-476a-9993-a15a06323792":{"parent":"f0f52aa2-d4af-4f95-a13c-0c0615d537ee","externalId":"src/__tests__/index.test.ts","children":[]},"f0f52aa2-d4af-4f95-a13c-0c0615d537ee":{"parent":null,"children":["1f1f9c96-8e56-4bc3-8f34-2c9e0017d6e9","511da6fd-67a4-4337-bd33-1fd731f464bb","cd4b8fe3-ba5b-476a-9993-a15a06323792"]}},"files":{"/home/runner/work/truework.js/truework.js/packages/credentials/src/index.ts":["1f1f9c96-8e56-4bc3-8f34-2c9e0017d6e9","cd4b8fe3-ba5b-476a-9993-a15a06323792"],"/home/runner/work/truework.js/truework.js/packages/credentials/src/events.ts":["1f1f9c96-8e56-4bc3-8f34-2c9e0017d6e9","cd4b8fe3-ba5b-476a-9993-a15a06323792"],"/home/runner/work/truework.js/truework.js/packages/credentials/src/frame.ts":["1f1f9c96-8e56-4bc3-8f34-2c9e0017d6e9","511da6fd-67a4-4337-bd33-1fd731f464bb","cd4b8fe3-ba5b-476a-9993-a15a06323792"],"/home/runner/work/truework.js/truework.js/packages/credentials/src/utils.ts":["1f1f9c96-8e56-4bc3-8f34-2c9e0017d6e9","cd4b8fe3-ba5b-476a-9993-a15a06323792"]},"externalIds":{"src/__tests__/events.test.ts":{"root":"1f1f9c96-8e56-4bc3-8f34-2c9e0017d6e9","children":[]},"src/__tests__/frame.test.ts":{"root":"511da6fd-67a4-4337-bd33-1fd731f464bb","children":[]},"src/__tests__/index.test.ts":{"root":"cd4b8fe3-ba5b-476a-9993-a15a06323792","children":[]}}}

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

!function(e,n){for(var t in n)e[t]=n[t]}(exports,function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=1)}([function(e){e.exports=JSON.parse('{"name":"@truework/credentials","version":"0.6.1","description":"The embeddable Truework Credentials experience.","author":"truework-team","main":"build/index.js","types":"build/src/index.d.ts","scripts":{"build":"webpack --mode production && pnpm typegen","watch":"webpack -w --mode development","typegen":"pnpm exec tsc --emitDeclarationOnly","typecheck":"pnpm exec tsc --noEmit","test":"TJS_FRAME_ORIGIN=http://localhost:4002 tap --ts --no-check-coverage --test-regex .*test\\\\.tsx?"},"devDependencies":{"@babel/core":"^7.15.0","@babel/preset-env":"^7.15.0","@babel/preset-typescript":"^7.15.0","@tsconfig/create-react-app":"^1.0.2","@types/jsdom":"^16.2.13","@types/proxyquire":"^1.3.28","@types/tap":"^15.0.5","babel-loader":"^8.2.2","core-js":"^3.21.1","jsdom":"^17.0.0","proxyquire":"^2.1.3","regenerator-runtime":"^0.13.9","tap":"^15.0.9","ts-node":"^10.2.1","typescript":"^4.3.5","webpack":"^4.46.0","webpack-cli":"^4.8.0"}}')},function(e,n,t){"use strict";t.r(n),t.d(n,"EventType",(function(){return r})),t.d(n,"createEmitter",(function(){return f})),t.d(n,"createEvents",(function(){return l})),t.d(n,"Env",(function(){return i})),t.d(n,"FrameOrigin",(function(){return c})),t.d(n,"MessageTypes",(function(){return u})),t.d(n,"ErrorCode",(function(){return s})),t.d(n,"version",(function(){return C})),t.d(n,"origins",(function(){return P})),t.d(n,"ConfigurationError",(function(){return _})),t.d(n,"init",(function(){return T}));var r,o,i,c,u,s,a=t(0);function f(){var e={};return{clear:function(){e={}},emit:function(n,t){e[n]&&e[n].forEach((function(e){return e(t)})),e["*"]&&e["*"].forEach((function(e){return e(t)}))},on:function(n,t){return e[n]=e[n]?e[n].concat(t):[t],function(){e[n].splice(e[n].indexOf(t),1)}}}}function l(){var e=f();return{emitOpen:function(){e.emit(r.Open)},emitClose:function(){e.emit(r.Close)},emitSuccess:function(){e.emit(r.Success)},emitError:function(n){e.emit(r.Error,n)},onOpen:function(n){return e.on(r.Open,n)},onClose:function(n){return e.on(r.Close,n)},onSuccess:function(n){return e.on(r.Success,n)},onError:function(n){return e.on(r.Error,n)}}}function p(e){var n=e.src,t=document.createElement("iframe");return t.src=n,t.setAttribute("sandbox","allow-scripts allow-forms allow-same-origin allow-popups"),t.style.position="fixed",t.style.top="0",t.style.bottom="0",t.style.left="0",t.style.right="0",t.style.zIndex="999999999",t.style.border="0",t.style.padding="0",t.style.margin="0",t.width="100%",t.height="100%",t}function d(e){return new Promise((function(n,t){e.onload=n,e.onerror=t,document.body.appendChild(e)}))}function y(e,n,t){var r;null===(r=e.contentWindow)||void 0===r||r.postMessage(t,n)}function b(e){document.body.removeChild(e)}function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,n,t,r,o,i,c){try{var u=e[i](c),s=u.value}catch(e){return void t(e)}u.done?n(s):Promise.resolve(s).then(r,o)}function h(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function c(e){v(i,r,o,c,u,"next",e)}function u(e){v(i,r,o,c,u,"throw",e)}c(void 0)}))}}function w(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function g(e,n){if(n&&("object"===m(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function O(e){var n="function"==typeof Map?new Map:void 0;return(O=function(e){if(null===e||(t=e,-1===Function.toString.call(t).indexOf("[native code]")))return e;var t;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return x(e,arguments,j(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),S(r,e)})(e)}function x(e,n,t){return(x=E()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&S(o,t.prototype),o}).apply(null,arguments)}function E(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function S(e,n){return(S=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}!function(e){e.Open="open",e.Close="close",e.Success="success",e.Error="error"}(r||(r={})),function(e){e.Production="production",e.Sandbox="sandbox"}(i||(i={})),function(e){e.Production="https://js.truework.com/frames/credentials/v1/index.html",e.Sandbox="https://js.truework.com/frames/credentials/v1/index.html"}(c||(c={})),function(e){e.Bootstrap="bootstrap",e.Open="open",e.Close="close",e.Success="success",e.Error="error"}(u||(u={})),function(e){e[e.Critical=0]="Critical",e[e.Error=1]="Error"}(s||(s={}));var C="@truework/credentials@0.6.1@",P=(k(o={},i.Production,c.Production),k(o,i.Sandbox,c.Sandbox),o),_=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&S(e,n)}(o,e);var n,t,r=(n=o,t=E(),function(){var e,r=j(n);if(t){var o=j(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return g(this,e)});function o(){return w(this,o),r.apply(this,arguments)}return o}(O(Error));function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.publishableKey,t=e.sessionToken,r=e.env;if(!n)throw new _("".concat(a.name," — missing publishableKey"));if(!t)throw new _("".concat(a.name," — missing sessionToken"));if(r||(r=i.Production),!Object.values(i).includes(r))throw new _("".concat(a.name," — invalid environment ").concat(r));var o=P[r],c=p({src:o}),f=l();return f.onError((function(e){e.code===s.Critical&&b(c)})),window.addEventListener("message",(function(e){var n=e.data;switch(n.type){case u.Open:f.emitOpen();break;case u.Close:f.emitClose(),b(c);break;case u.Success:f.emitSuccess();break;case u.Error:f.emitError(n)}})),{open:function(){return h(regeneratorRuntime.mark((function e(){var i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,d(c);case 3:y(c,o,{type:u.Bootstrap,publishableKey:n,sessionToken:t,env:r,packageVersion:C,bundleVersion:null===(i=window)||void 0===i||null===(a=i.Truework)||void 0===a?void 0:a.version}),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),f.emitError({code:s.Critical});case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))()},close:function(){y(c,o,{type:u.Close})},onOpen:function(e){return f.onOpen(e)},onClose:function(e){return f.onClose(e)},onSuccess:function(e){return f.onSuccess(e)},onError:function(e){return f.onError(e)}}}}]));
!function(e,n){for(var t in n)e[t]=n[t]}(exports,function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=1)}([function(e){e.exports=JSON.parse('{"name":"@truework/credentials","version":"0.7.0","description":"The embeddable Truework Credentials experience.","author":"truework-team","main":"build/index.js","types":"build/src/index.d.ts","scripts":{"build":"webpack --mode production && pnpm typegen","watch":"webpack -w --mode development","typegen":"pnpm exec tsc --emitDeclarationOnly","typecheck":"pnpm exec tsc --noEmit","test":"TJS_FRAME_ORIGIN=http://localhost:4002 tap --ts --no-check-coverage --test-regex .*test\\\\.tsx?"},"devDependencies":{"@babel/core":"^7.15.0","@babel/preset-env":"^7.15.0","@babel/preset-typescript":"^7.15.0","@tsconfig/create-react-app":"^1.0.2","@types/jsdom":"^16.2.13","@types/node":"^17.0.31","@types/proxyquire":"^1.3.28","@types/tap":"^15.0.5","babel-loader":"^8.2.2","core-js":"^3.21.1","jsdom":"^17.0.0","proxyquire":"^2.1.3","regenerator-runtime":"^0.13.9","tap":"^15.0.9","ts-node":"^10.2.1","typescript":"^4.3.5","webpack":"^4.46.0","webpack-cli":"^4.8.0"}}')},function(e,n,t){"use strict";t.r(n),t.d(n,"EventType",(function(){return r})),t.d(n,"createEmitter",(function(){return f})),t.d(n,"createEvents",(function(){return l})),t.d(n,"Env",(function(){return i})),t.d(n,"FrameOrigin",(function(){return c})),t.d(n,"MessageTypes",(function(){return u})),t.d(n,"ErrorCode",(function(){return s})),t.d(n,"version",(function(){return C})),t.d(n,"origins",(function(){return _})),t.d(n,"ConfigurationError",(function(){return T})),t.d(n,"init",(function(){return R}));var r,o,i,c,u,s,a=t(0);function f(){var e={};return{clear:function(){e={}},emit:function(n,t){e[n]&&e[n].forEach((function(e){return e(t)})),e["*"]&&e["*"].forEach((function(e){return e(t)}))},on:function(n,t){return e[n]=e[n]?e[n].concat(t):[t],function(){e[n].splice(e[n].indexOf(t),1)}}}}function l(){var e=f();return{emitOpen:function(){e.emit(r.Open)},emitClose:function(){e.emit(r.Close)},emitSuccess:function(){e.emit(r.Success)},emitError:function(n){e.emit(r.Error,n)},onOpen:function(n){return e.on(r.Open,n)},onClose:function(n){return e.on(r.Close,n)},onSuccess:function(n){return e.on(r.Success,n)},onError:function(n){return e.on(r.Error,n)}}}function p(e){var n=e.src,t=document.createElement("iframe");return t.src=n,t.setAttribute("sandbox","allow-scripts allow-forms allow-same-origin allow-popups"),t.style.position="fixed",t.style.top="0",t.style.bottom="0",t.style.left="0",t.style.right="0",t.style.zIndex="999999999",t.style.border="0",t.style.padding="0",t.style.margin="0",t.width="100%",t.height="100%",t}function d(e){return new Promise((function(n,t){e.onload=n,e.onerror=t,document.body.appendChild(e)}))}function y(e,n,t){var r;null===(r=e.contentWindow)||void 0===r||r.postMessage(t,n)}function b(e){document.body.removeChild(e)}function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,n,t,r,o,i,c){try{var u=e[i](c),s=u.value}catch(e){return void t(e)}u.done?n(s):Promise.resolve(s).then(r,o)}function w(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function c(e){v(i,r,o,c,u,"next",e)}function u(e){v(i,r,o,c,u,"throw",e)}c(void 0)}))}}function h(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function O(e,n){if(n&&("object"===m(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function x(e){var n="function"==typeof Map?new Map:void 0;return(x=function(e){if(null===e||(t=e,-1===Function.toString.call(t).indexOf("[native code]")))return e;var t;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return E(e,arguments,k(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),j(r,e)})(e)}function E(e,n,t){return(E=S()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&j(o,t.prototype),o}).apply(null,arguments)}function S(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function j(e,n){return(j=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}!function(e){e.Open="open",e.Close="close",e.Success="success",e.Error="error"}(r||(r={})),function(e){e.Production="production",e.Sandbox="sandbox"}(i||(i={})),function(e){e.Production="https://js.truework.com/frames/credentials/v1/index.html",e.Sandbox="https://js.truework.com/frames/credentials/v1/index.html"}(c||(c={})),function(e){e.Bootstrap="bootstrap",e.Open="open",e.Close="close",e.Success="success",e.Error="error"}(u||(u={})),function(e){e[e.Critical=0]="Critical",e[e.Error=1]="Error"}(s||(s={}));var C="@truework/credentials@0.7.0@",_=(P(o={},i.Production,c.Production),P(o,i.Sandbox,c.Sandbox),o),T=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&j(e,n)}(u,e);var n,t,r,o,i,c=(n=u,t=S(),function(){var e,r=k(n);if(t){var o=k(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return O(this,e)});function u(){return g(this,u),c.apply(this,arguments)}return r=u,o&&h(r.prototype,o),i&&h(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}(x(Error));function R(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.publishableKey,t=e.sessionToken,r=e.env;if(!n)throw new T("".concat(a.name," — missing publishableKey"));if(!t)throw new T("".concat(a.name," — missing sessionToken"));if(r||(r=i.Production),!Object.values(i).includes(r))throw new T("".concat(a.name," — invalid environment ").concat(r));var o=_[r],c=p({src:o}),f=l(),m=function e(n){var t=n.data;switch(t.type){case u.Open:f.emitOpen();break;case u.Close:f.emitClose(),b(c),window.removeEventListener("message",e);break;case u.Success:f.emitSuccess();break;case u.Error:f.emitError(t)}};return f.onError((function(e){e.code===s.Critical&&(b(c),window.removeEventListener("message",m))})),window.addEventListener("message",m),{open:function(){return w(regeneratorRuntime.mark((function e(){var i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,d(c);case 3:y(c,o,{type:u.Bootstrap,publishableKey:n,sessionToken:t,env:r,packageVersion:C,bundleVersion:null===(i=window)||void 0===i||null===(a=i.Truework)||void 0===a?void 0:a.version}),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),f.emitError({code:s.Critical});case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))()},close:function(){y(c,o,{type:u.Close})},onOpen:function(e){return f.onOpen(e)},onClose:function(e){return f.onClose(e)},onSuccess:function(e){return f.onSuccess(e)},onError:function(e){return f.onError(e)}}}}]));
# @truework/credentials
## 0.7.0
### Minor Changes
- 99d33b4: Setting up event handlers from scratch with each TJS invocation to handle (n) hook firing problem
## 0.6.1

@@ -4,0 +10,0 @@

{
"name": "@truework/credentials",
"version": "0.6.1",
"version": "0.7.0",
"description": "The embeddable Truework Credentials experience.",

@@ -14,2 +14,3 @@ "author": "truework-team",

"@types/jsdom": "^16.2.13",
"@types/node": "^17.0.31",
"@types/proxyquire": "^1.3.28",

@@ -16,0 +17,0 @@ "@types/tap": "^15.0.5",

@@ -60,4 +60,3 @@ import pkg from '../package.json'

// @ts-ignore
export const version: string = process.env.VERSION
export const version: string = process.env.VERSION as string

@@ -87,9 +86,3 @@ export const origins = {

events.onError((data) => {
if (data.code === ErrorCode.Critical) {
removeFrame(frame)
}
})
window.addEventListener('message', ({ data }: MessageEvent<Messages>) => {
const messageEventHandler = ({ data }: MessageEvent<Messages>) => {
switch (data.type) {

@@ -102,2 +95,3 @@ case MessageTypes.Open:

removeFrame(frame)
window.removeEventListener('message', messageEventHandler)
break

@@ -111,4 +105,13 @@ case MessageTypes.Success:

}
}
events.onError((data) => {
if (data.code === ErrorCode.Critical) {
removeFrame(frame)
window.removeEventListener('message', messageEventHandler)
}
})
window.addEventListener('message', messageEventHandler)
return {

@@ -115,0 +118,0 @@ // what other methods could be useful to have here? validation?

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