New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@perspect3vism/ad4m-connect

Package Overview
Dependencies
Maintainers
5
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@perspect3vism/ad4m-connect - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1-prerelease

2

dist/utils.js

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

var a=(e,t,o)=>new Promise((n,s)=>{var c=r=>{try{l(o.next(r))}catch(u){s(u)}},p=r=>{try{l(o.throw(r))}catch(u){s(u)}},l=r=>r.done?n(r.value):Promise.resolve(r.value).then(c,p);l((o=o.apply(e,t)).next())});var i="0.7.0";function b(){let e=new AbortController;return setTimeout(()=>e.abort(),20),e}function w(e,t=5e3){return a(this,null,function*(){return Promise.race([new Promise((o,n)=>{let s=new WebSocket(e);s.onopen=()=>{o(s)},s.onerror=c=>{n(c)}}),new Promise((o,n)=>{setTimeout(()=>{n(new Error("WebSocket connection timed out"))},t)})])})}function j(e){return a(this,null,function*(){try{let t=yield fetch(`http://localhost:${e}/graphql/`,{signal:b().signal,mode:"no-cors"});if(t.status===400||t.status===0)return e;throw new Error(`Could not connect to port ${e}`)}catch(t){throw new Error(`Could not connect to port ${e}`)}})}function v(){return new Promise((e,t)=>{let o=document.querySelector("ad4m-connect"),n=o==null?void 0:o.getAd4mClient();n?e(n):t("No Ad4mClient found")})}function y(e){let t=document.querySelector("ad4m-connect");t==null||t.addEventListener("authstatechange",o=>{e(o.detail)})}function S(){let e=navigator.userAgent,t="";return e.search("Windows")!==-1?t="Windows":e.search("Mac")!==-1?t="MacOS":e.search("X11")!==-1&&e.search("Linux")===-1?t="UNIX":e.search("Linux")!==-1&&e.search("X11")!==-1&&(t="Linux"),t}function d(){try{localStorage.setItem("test",""),localStorage.removeItem("test")}catch(e){return!1}return!0}function x(e,t){d()&&localStorage.setItem(`${i}/${e}`,t)}function A(e){return d()?localStorage.getItem(`${i}/${e}`):null}function C(e){d()&&localStorage.removeItem(`${i}/${e}`)}export{j as checkPort,w as connectWebSocket,S as detectOS,v as getAd4mClient,A as getForVersion,y as onAuthStateChanged,C as removeForVersion,x as setForVersion};
var a=(e,t,o)=>new Promise((n,s)=>{var c=r=>{try{l(o.next(r))}catch(u){s(u)}},p=r=>{try{l(o.throw(r))}catch(u){s(u)}},l=r=>r.done?n(r.value):Promise.resolve(r.value).then(c,p);l((o=o.apply(e,t)).next())});var i="0.7.1-prerelease";function b(){let e=new AbortController;return setTimeout(()=>e.abort(),20),e}function w(e,t=5e3){return a(this,null,function*(){return Promise.race([new Promise((o,n)=>{let s=new WebSocket(e);s.onopen=()=>{o(s)},s.onerror=c=>{n(c)}}),new Promise((o,n)=>{setTimeout(()=>{n(new Error("WebSocket connection timed out"))},t)})])})}function j(e){return a(this,null,function*(){try{let t=yield fetch(`http://localhost:${e}/graphql/`,{signal:b().signal,mode:"no-cors"});if(t.status===400||t.status===0)return e;throw new Error(`Could not connect to port ${e}`)}catch(t){throw new Error(`Could not connect to port ${e}`)}})}function v(){return new Promise((e,t)=>{let o=document.querySelector("ad4m-connect"),n=o==null?void 0:o.getAd4mClient();n?e(n):t("No Ad4mClient found")})}function y(e){let t=document.querySelector("ad4m-connect");t==null||t.addEventListener("authstatechange",o=>{e(o.detail)})}function S(){let e=navigator.userAgent,t="";return e.search("Windows")!==-1?t="Windows":e.search("Mac")!==-1?t="MacOS":e.search("X11")!==-1&&e.search("Linux")===-1?t="UNIX":e.search("Linux")!==-1&&e.search("X11")!==-1&&(t="Linux"),t}function d(){try{localStorage.setItem("test",""),localStorage.removeItem("test")}catch(e){return!1}return!0}function x(e,t){d()&&localStorage.setItem(`${i}/${e}`,t)}function A(e){return d()?localStorage.getItem(`${i}/${e}`):null}function C(e){d()&&localStorage.removeItem(`${i}/${e}`)}export{j as checkPort,w as connectWebSocket,S as detectOS,v as getAd4mClient,A as getForVersion,y as onAuthStateChanged,C as removeForVersion,x as setForVersion};
{
"name": "@perspect3vism/ad4m-connect",
"version": "0.7.0",
"version": "0.7.1-prerelease",
"description": "Lib for handling everything needed to setup a connection to a local or remote ad4m-executor",

@@ -52,3 +52,3 @@ "license": "CAL-1.0",

"@apollo/client": "3.7.10",
"@perspect3vism/ad4m": "link:../core",
"@perspect3vism/ad4m": "*",
"esbuild": "^0.15.5",

@@ -55,0 +55,0 @@ "esbuild-plugin-lit": "^0.0.10",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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