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

@vkontakte/superappkit

Package Overview
Dependencies
Maintainers
10
Versions
408
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vkontakte/superappkit - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0-beta.0

dist/common/bridge.d.ts

2

dist/index.js

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

function e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function n(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function t(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}let r=(e=21)=>{let n="",t=e;for(;t--;)n+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return n};function a(e){return Object.keys(e).map((function(n){var t=e[n];return n=encodeURIComponent(n),t=encodeURIComponent(t),"".concat(n,"=").concat(t)})).join("&")}function s(e){return e=e||Object.create(null),{on:function(n,t){(e[n]||(e[n]=[])).push(t)},off:function(n,t){e[n]&&e[n].splice(e[n].indexOf(t)>>>0,1)},emit:function(n,t){(e[n]||[]).slice().map((function(e){e(t)})),(e["*"]||[]).slice().map((function(e){e(n,t)}))}}}var c,p,u={appId:0,superAppToken:"",loginDomain:"login.vk.com",oauthDomain:"oauth.vk.com",connectDomain:"connect.vk.com",_debug:!1},d={},f={events:s(),init:function(e){if(!e.appId)throw new Error("appId required");u.appId=e.appId,u.superAppToken=e.superAppToken||"",u.loginDomain=e.loginDomain||"login.vk.com",u.oauthDomain=e.oauthDomain||"oauth.vk.com",u.connectDomain=e.connectDomain||"connect.vk.com",u._debug=!!e._debug},get:function(){return u},setSuperAppToken:function(e){u.superAppToken=e,f.events.emit("superAppToken",e)},onRequestSuperAppToken:function(e){d.superAppToken=e},_requestSuperAppToken:function(){var e;d.superAppToken&&(e=d.superAppToken()),e&&e.then((function(e){return f.setSuperAppToken(e)})).catch(console.error)},onAuth:function(e){d.auth=e},_requestAuth:function(){var e;d.auth&&(e=d.auth()),e&&e.then((function(e){return f.setSuperAppToken(e)})).catch(console.error)},onOpenApp:function(e){d.openApp=e},_openApp:function(e){d.openApp&&d.openApp(e.app)}},l=new(function(){function n(){e(this,n),o(this,"loginDomain",void 0),o(this,"oauthDomain",void 0),o(this,"connectDomain",void 0),o(this,"flags",null)}return t(n,[{key:"silentAuth",value:function(){var e=f.get(),n=e.loginDomain,t=e.appId,o=r(),i="https://".concat(n,"/?act=connect&app_id=").concat(t,"&response_type=").concat("silent_token","&uuid=").concat(o,"&v=").concat("0.0.2"),a=new XMLHttpRequest;return a.open("GET",i,!0),a.responseType="json",a.withCredentials=!0,new Promise((function(e,n){a.onload=function(){a.response?e({provider:"vk",payload:a.response}):n()},a.onerror=function(){n()},a.send()}))}},{key:"userVisibleAuth",value:function(){var e=f.get(),n=e.appId,t=e.connectDomain,o=r(),i=a({app_id:n,response_type:"silent_token",uuid:o,origin:location.protocol+"//"+location.host,v:"0.0.2"}),s="https://".concat(t,"/auth?").concat(i);this.flags&&(s="".concat(s,"#").concat(a(this.flags)));var c=screen.height/2-280,p=screen.width/2-410,u=window.open(s,"_blank","top=".concat(c,",left=").concat(p,",width=").concat(820,",height=").concat(560,",location"));return new Promise((function(e,n){var t=setInterval((function(){u||(window.removeEventListener("message",i),clearInterval(t),n())}),1e3);function i(r){if(r.source===u&&u){if(window.removeEventListener("message",i),clearInterval(t),".vk.com"!==r.origin.slice(r.origin.length-".vk.com".length))return u.close(),void n();if(r.data.action!=="vk_connect_response"+o)return u.close(),void n();var a=r.data.payload;u.close(),e({provider:"vk",payload:a})}}window.addEventListener("message",i)}))}}]),n}());!function(e){e.APP_HIDE="VKSDKMiniAppHide",e.RESIZE="VKSDKMiniAppResize"}(c||(c={})),function(e){e.SUPERAPP_TOKEN="VKSDKGeneralSuperAppToken",e.AUTH_NEEDED="VKSDKGeneralAuthNeeded",e.OPEN_APP="VKSDKGeneralOpenApp"}(p||(p={}));var h,g=function n(t){var r=this;e(this,n),o(this,"handler",(function(){return{}})),o(this,"config",void 0),o(this,"destroy",(function(){delete r.config,window.removeEventListener("message",r.handleMessage)})),o(this,"onMessage",(function(e){r.handler=e})),o(this,"sendMessage",(function(e){r.config.iframe.contentWindow.postMessage(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach((function(n){o(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({type:"vk-sak-sdk"},e),r.config.origin)})),o(this,"handleMessage",(function(e){r.config.origin&&e.origin===r.config.origin&&e.source===r.config.iframe.contentWindow&&e.data&&"vk-sak-sdk"===e.data.type&&(console.info("[received from ui]",e.data),r.handler(e.data))})),this.config=t,window.addEventListener("message",this.handleMessage)},m=function(){function n(t){var i=this;e(this,n),o(this,"iframe",void 0),o(this,"root",void 0),o(this,"bridge",void 0),o(this,"loading",void 0),o(this,"events",void 0),o(this,"config",void 0),o(this,"open",(function(){i.loading||i.preload().catch(console.error),i.root.style.display="block",i.loading.then((function(){i.handleResize()}),console.error)})),o(this,"hide",(function(){i.events.emit("hide"),i.root.style.display="none"})),o(this,"close",(function(){f.events.off("superAppToken",i.onSuperAppToken),i.root.remove(),i.bridge.destroy(),delete i.root,delete i.iframe,delete i.bridge,window.removeEventListener("resize",i.handleResize)})),o(this,"preload",(function(){var e=document.createElement("iframe"),n=window.innerHeight;return e.src=i.getMiniAppUrl(),e.style.border="none",e.style.width="100%",e.style.height="".concat(n,"px"),e.style.minHeight="".concat(n,"px"),i.iframe=e,i.root.appendChild(i.iframe),f.events.on("superAppToken",i.onSuperAppToken),i.bridge=new g({iframe:i.iframe,origin:"https://"+f.get().connectDomain}),i.bridge.onMessage(i.handleMessage),window.addEventListener("resize",i.handleResize),i.loading=new Promise((function(n){e.onload=function(){e.onload=null,n()}})),i.loading})),o(this,"onSuperAppToken",(function(e){i.bridge.sendMessage({handler:p.SUPERAPP_TOKEN,params:{result:e}})})),o(this,"handleMessage",(function(e){switch(e.handler){case c.APP_HIDE:i.hide();break;case p.SUPERAPP_TOKEN:f._requestSuperAppToken();break;case p.AUTH_NEEDED:f._requestAuth()}})),o(this,"handleResize",(function(){if(i.iframe){var e=innerWidth,n=innerHeight;i.iframe.style.height="".concat(n,"px"),i.iframe.style.minHeight="".concat(n,"px"),i.bridge.sendMessage({handler:c.RESIZE,params:{viewport_width:e,viewport_height:n}})}})),this.events=s(),this.config=t;var r=isFinite(this.config.zIndex)?this.config.zIndex:999999;this.root=document.createElement("div"),this.root.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: none;\n z-index: ".concat(r,";\n "),document.body.appendChild(this.root)}return t(n,[{key:"getMiniAppUrl",value:function(){var e=f.get(),n=e.connectDomain,t=e.appId,o=e.superAppToken,i=e._debug,r=a({app:this.config.app,host_app_id:t,debug:i?"1":"",localhost:i?"1":"",superapp_token:o});return"https://".concat(n,"/mini_app?").concat(r)}}]),n}();!function(e){e[e.UNKNOWN=1]="UNKNOWN",e[e.MISSING_PARAM=2]="MISSING_PARAM",e[e.CONNECTION_LOST=3]="CONNECTION_LOST",e[e.USER_DENIED=4]="USER_DENIED",e[e.INVALID_PARAMS=5]="INVALID_PARAMS",e[e.CUSTOM=6]="CUSTOM",e[e.OLD_MISSING_PARAM=100]="OLD_MISSING_PARAM"}(h||(h={}));var v,A=function(){return"No params passed for load app!"};!function(e){e.INIT="ConnectProfileInit"}(v||(v={}));var k=function n(){var t=this;e(this,n),o(this,"iframe",void 0),o(this,"config",void 0),o(this,"bridge",void 0),o(this,"iframeLoadPromise",void 0),o(this,"load",(function(e){if(!e.container)throw new Error("container is null");if(!e)throw new Error(A());return t.iframe||t.preload(e),t.iframeLoadPromise})),o(this,"remove",(function(){t.iframe&&t.iframe.parentNode&&t.iframe.parentNode.removeChild(t.iframe),t.destroy()})),o(this,"preload",(function(e){t.config=e;var n=document.createElement("iframe");n.style.border="none",n.style.width="100%",n.style.height="100%",n.style.minHeight="100%",e.container.appendChild(n),t.setup(n)})),o(this,"setup",(function(e){f.events.on("superAppToken",t.onSuperAppToken),e.src=t.getProfileUrl(),t.iframe=e,t.iframeLoadPromise=new Promise((function(n){e.onload=function(){return n(e)}})),t.bridge=new g({iframe:t.iframe,origin:"https://"+f.get().connectDomain}),t.bridge.onMessage(t.handleMessage)})),o(this,"destroy",(function(){f.events.off("superAppToken",t.onSuperAppToken),t.bridge.destroy(),delete t.iframe,delete t.iframeLoadPromise,delete t.bridge})),o(this,"onSuperAppToken",(function(e){if(e&&t.iframe){var n=t.iframe;t.destroy(),t.setup(n)}})),o(this,"handleMessage",(function(e){switch(e.handler){case v.INIT:t.handleInitApp().catch(console.error);break;case p.SUPERAPP_TOKEN:f._requestSuperAppToken();break;case p.AUTH_NEEDED:f._requestAuth();break;case p.OPEN_APP:f._openApp(e.params)}})),o(this,"handleInitApp",(function(){return Promise.resolve()})),o(this,"getProfileUrl",(function(){var e=f.get(),n=e.connectDomain,o=e.appId,i=e.superAppToken,r=e._debug,s=t.config.widgets,c=a({host_app_id:o,debug:r?"1":"",localhost:r?"1":"",superapp_token:i,widgets:s?s.join(","):""});return"https://".concat(n,"/super_profile?").concat(c)}))};export{f as Config,l as Connect,m as MiniApp,k as Profile};
function e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function n(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function t(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}let o=(e=21)=>{let n="",t=e;for(;t--;)n+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return n};function i(e){return Object.keys(e).map((function(n){var t=e[n];return n=encodeURIComponent(n),t=encodeURIComponent(t),"".concat(n,"=").concat(t)})).join("&")}function r(e){return e=e||Object.create(null),{on:function(n,t){(e[n]||(e[n]=[])).push(t)},off:function(n,t){e[n]&&e[n].splice(e[n].indexOf(t)>>>0,1)},emit:function(n,t){(e[n]||[]).slice().map((function(e){e(t)})),(e["*"]||[]).slice().map((function(e){e(n,t)}))}}}var a,s,p={appId:0,superAppToken:"",loginDomain:"login.vk.com",oauthDomain:"oauth.vk.com",connectDomain:"connect.vk.com",_debug:!1},c={},d={events:r(),init:function(e){if(!e.appId)throw new Error("appId required");p.appId=e.appId,p.superAppToken=e.superAppToken||"",p.loginDomain=e.loginDomain||"login.vk.com",p.oauthDomain=e.oauthDomain||"oauth.vk.com",p.connectDomain=e.connectDomain||"connect.vk.com",p._debug=!!e._debug},get:function(){return p},setSuperAppToken:function(e){p.superAppToken=e,d.events.emit("superAppToken",e)},onRequestSuperAppToken:function(e){c.superAppToken=e},_requestSuperAppToken:function(){var e;c.superAppToken&&(e=c.superAppToken()),e&&e.then((function(e){return d.setSuperAppToken(e)})).catch(console.error)},onAuth:function(e){c.auth=e},_requestAuth:function(){var e;c.auth&&(e=c.auth()),e&&e.then((function(e){return d.setSuperAppToken(e)})).catch(console.error)},onOpenApp:function(e){c.openApp=e},_openApp:function(e){c.openApp&&c.openApp(e.app)}},u=new function t(){var r=this;e(this,t),n(this,"flags",null),n(this,"silentAuth",(function(){var e=d.get(),n=e.loginDomain,t=e.appId,i=o(),r="https://".concat(n,"/?act=connect&app_id=").concat(t,"&response_type=").concat("silent_token","&uuid=").concat(i,"&v=").concat("0.0.2"),a=new XMLHttpRequest;return a.open("GET",r,!0),a.responseType="json",a.withCredentials=!0,new Promise((function(e,n){a.onload=function(){a.response?e({provider:"vk",payload:a.response}):n()},a.onerror=function(){n()},a.send()}))})),n(this,"userVisibleAuth",(function(){var e=d.get(),n=e.appId,t=e.connectDomain,a=o(),s=i({app_id:n,response_type:"silent_token",uuid:a,origin:location.protocol+"//"+location.host,v:"0.0.2"}),p="https://".concat(t,"/auth?").concat(s);r.flags&&(p="".concat(p,"#").concat(i(r.flags)));var c=screen.height/2-280,u=screen.width/2-410,f=window.open(p,"_blank","top=".concat(c,",left=").concat(u,",width=").concat(820,",height=").concat(560,",location"));return new Promise((function(e,n){var t=setInterval((function(){f||(window.removeEventListener("message",o),clearInterval(t),n())}),1e3);function o(i){if(i.source===f&&f){if(window.removeEventListener("message",o),clearInterval(t),".vk.com"!==i.origin.slice(i.origin.length-".vk.com".length))return f.close(),void n();if(i.data.action!=="vk_connect_response"+a)return f.close(),void n();var r=i.data.payload;f.close(),e({provider:"vk",payload:r})}}window.addEventListener("message",o)}))}))};!function(e){e.APP_HIDE="VKSDKMiniAppHide",e.APP_READY="VKSDKMiniAppReady",e.RESIZE="VKSDKMiniAppResize",e.APP_INIT_CONFIG="VKSDKMiniAppInitConfig"}(a||(a={})),function(e){e.SUPERAPP_TOKEN="VKSDKGeneralSuperAppToken",e.AUTH_NEEDED="VKSDKGeneralAuthNeeded",e.OPEN_APP="VKSDKGeneralOpenApp"}(s||(s={}));var f,l=function o(i){var r=this;e(this,o),n(this,"handler",(function(){return{}})),n(this,"config",void 0),n(this,"destroy",(function(){delete r.config,window.removeEventListener("message",r.handleMessage)})),n(this,"onMessage",(function(e){r.handler=e})),n(this,"sendMessage",(function(e){r.config.iframe.contentWindow.postMessage(function(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?t(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}({type:"vk-sak-sdk"},e),r.config.origin)})),n(this,"handleMessage",(function(e){r.config.origin&&e.origin===r.config.origin&&e.source===r.config.iframe.contentWindow&&e.data&&"vk-sak-sdk"===e.data.type&&(console.info("[received from ui]",e.data),r.handler(e.data))})),this.config=i,window.addEventListener("message",this.handleMessage)},h=function t(o){var p=this;e(this,t),n(this,"iframe",void 0),n(this,"bridge",void 0),n(this,"loading",void 0),n(this,"events",void 0),n(this,"params",void 0),n(this,"open",(function(){p.loading||p.preload().catch(console.error),p.iframe.style.display="block",p.loading.then((function(){p.handleResize()})).catch(console.error)})),n(this,"hide",(function(){p.events.emit("hide"),p.iframe.style.display="none"})),n(this,"close",(function(){d.events.off("superAppToken",p.onSuperAppToken),p.iframe.remove(),p.bridge.destroy(),delete p.iframe,delete p.bridge,window.removeEventListener("resize",p.handleResize)})),n(this,"preload",(function(){var e=document.createElement("iframe"),n=window.innerHeight,t=isFinite(p.params.zIndex)?p.params.zIndex:999999;return e.src=p.getMiniAppUrl(),e.style.cssText="\n display: none;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: ".concat(n,"px;\n min-height: ").concat(n,"px;\n border: none;\n z-index: ").concat(t,";\n "),p.iframe=e,document.body.appendChild(p.iframe),d.events.on("superAppToken",p.onSuperAppToken),p.bridge=new l({iframe:p.iframe,origin:"https://"+d.get().connectDomain}),p.bridge.onMessage(p.handleMessage),window.addEventListener("resize",p.handleResize),p.loading=new Promise((function(n){e.onload=function(){e.onload=null,n()}})),p.loading})),n(this,"onSuperAppToken",(function(e){p.bridge.sendMessage({handler:s.SUPERAPP_TOKEN,params:{result:e}})})),n(this,"handleMessage",(function(e){switch(e.handler){case a.APP_HIDE:p.hide();break;case a.APP_READY:p.handleUpdateConfig();break;case s.SUPERAPP_TOKEN:d._requestSuperAppToken();break;case s.AUTH_NEEDED:d._requestAuth()}})),n(this,"handleResize",(function(){if(p.iframe){var e=innerWidth,n=innerHeight;p.iframe.style.height="".concat(n,"px"),p.iframe.style.minHeight="".concat(n,"px"),p.bridge.sendMessage({handler:a.RESIZE,params:{viewport_width:e,viewport_height:n}})}})),n(this,"handleUpdateConfig",(function(){p.bridge.sendMessage({handler:a.APP_INIT_CONFIG,params:{fullMode:p.params.fullMode}})})),n(this,"getMiniAppUrl",(function(){var e=d.get(),n=e.connectDomain,t=e.appId,o=e.superAppToken,r=e._debug,a=i({app:p.params.app,host_app_id:t,debug:r?"1":"",localhost:r?"1":"",superapp_token:o});return"https://".concat(n,"/mini_app?").concat(a)})),this.events=r(),this.params=o};!function(e){e[e.UNKNOWN=1]="UNKNOWN",e[e.MISSING_PARAM=2]="MISSING_PARAM",e[e.CONNECTION_LOST=3]="CONNECTION_LOST",e[e.USER_DENIED=4]="USER_DENIED",e[e.INVALID_PARAMS=5]="INVALID_PARAMS",e[e.CUSTOM=6]="CUSTOM",e[e.OLD_MISSING_PARAM=100]="OLD_MISSING_PARAM"}(f||(f={}));var g,m=function(){return"No params passed for load app!"};!function(e){e.INIT="ConnectProfileInit"}(g||(g={}));var v=function t(){var o=this;e(this,t),n(this,"iframe",void 0),n(this,"config",void 0),n(this,"bridge",void 0),n(this,"iframeLoadPromise",void 0),n(this,"load",(function(e){if(!e.container)throw new Error("container is null");if(!e)throw new Error(m());return o.iframe||o.preload(e),o.iframeLoadPromise})),n(this,"remove",(function(){o.iframe&&o.iframe.parentNode&&o.iframe.parentNode.removeChild(o.iframe),o.destroy()})),n(this,"preload",(function(e){o.config=e;var n=document.createElement("iframe");n.style.border="none",n.style.width="100%",n.style.height="100%",n.style.minHeight="100%",e.container.appendChild(n),o.setup(n)})),n(this,"setup",(function(e){d.events.on("superAppToken",o.onSuperAppToken),e.src=o.getProfileUrl(),o.iframe=e,o.iframeLoadPromise=new Promise((function(n){e.onload=function(){return n(e)}})),o.bridge=new l({iframe:o.iframe,origin:"https://"+d.get().connectDomain}),o.bridge.onMessage(o.handleMessage)})),n(this,"destroy",(function(){d.events.off("superAppToken",o.onSuperAppToken),o.bridge.destroy(),delete o.iframe,delete o.iframeLoadPromise,delete o.bridge})),n(this,"onSuperAppToken",(function(e){if(e&&o.iframe){var n=o.iframe;o.destroy(),o.setup(n)}})),n(this,"handleMessage",(function(e){switch(e.handler){case g.INIT:o.handleInitApp().catch(console.error);break;case s.SUPERAPP_TOKEN:d._requestSuperAppToken();break;case s.AUTH_NEEDED:d._requestAuth();break;case s.OPEN_APP:d._openApp(e.params)}})),n(this,"handleInitApp",(function(){return Promise.resolve()})),n(this,"getProfileUrl",(function(){var e=d.get(),n=e.connectDomain,t=e.appId,r=e.superAppToken,a=e._debug,s=o.config.widgets,p=i({host_app_id:t,debug:a?"1":"",localhost:a?"1":"",superapp_token:r,widgets:s?s.join(","):""});return"https://".concat(n,"/super_profile?").concat(p)}))};export{d as Config,u as Connect,h as MiniApp,v as Profile};
{
"name": "@vkontakte/superappkit",
"version": "1.0.0",
"version": "1.1.0-beta.0",
"description": "VK SuperAppKit",
"main": "dist/index.js",
"types": "dist/src/index.d.ts",
"types": "dist/index.d.ts",
"scripts": {
"dev": "concurrently --kill-others \"rollup -c -w\" \"yarn types -w\"",
"types": "tsc --emitDeclarationOnly",
"build": "yarn clear && rollup -c && yarn types",
"eslint": "eslint --cache './**/*.{ts,tsx}'",
"build:ts": "rollup -c",
"build:types": "tsc -p tsconfig.types.json --emitDeclarationOnly",
"build:dev": "concurrently --kill-others \"yarn build:ts -w\" \"yarn build:types -w\"",
"build:prod": "yarn clear && cross-env NODE_ENV=production yarn build:ts && yarn build:types",
"test": "karma start karma.config.js",
"lint": "eslint --cache './**/*.{ts,tsx}'",
"lint-staged": "lint-staged",
"prepublishOnly": "rm -rf ./dist && yarn build",
"clear": "rm -rf dist",
"test": "karma start karma.config.js",
"prepublishOnly": "yarn test && yarn build:prod",
"publish-package": "yarn publish --non-interactive --access public"
},
"files": [
"dist/index.js",
"dist/src"
"dist"
],
"lint-staged": {
"./**/*.{ts,tsx}": [
"eslint --cache --",
"yarn lint",
"yarn test"

@@ -54,2 +54,3 @@ ]

"concurrently": "^5.1.0",
"cross-env": "^7.0.2",
"eslint": "^6.8.0",

@@ -56,0 +57,0 @@ "eslint-plugin-react": "^7.19.0",

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