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

@obelisk/client

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@obelisk/client - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

21

lib/api/stream-endpoint.js

@@ -6,2 +6,3 @@ "use strict";

const util_1 = require("../util");
const operators_1 = require("rxjs/operators");
/**

@@ -51,8 +52,8 @@ * Endpoint class represents an IoT-stack API Endpoint.

const url = options ? this.addOptionsToUrl(this._url, options) : this._url;
const h = {
headers: { Authorization: 'Bearer ' + (this.client.tokens.rpt ? this.client.tokens.rpt.getToken() : '<no rpt present>') },
Transport: XMLHttpRequest
};
const eventsource = new event_source_polyfill_1.EventSourcePolyfill(url, h);
return rxjs_1.Observable.create((observer) => {
const h = {
headers: { Authorization: 'Bearer ' + (this.client.tokens.rpt ? this.client.tokens.rpt.getToken() : '<no rpt present>') },
Transport: XMLHttpRequest
};
const eventsource = new event_source_polyfill_1.EventSourcePolyfill(url, h);
if (util_1.Config.debug) {

@@ -69,4 +70,4 @@ // console.log(eventsource);

eventsource.onerror = function (event) {
eventsource.close();
if (eventsource.readyState === 0) {
eventsource.close();
observer.complete();

@@ -78,4 +79,8 @@ }

};
return () => eventsource.close();
});
return () => {
eventsource.close();
};
}).pipe(operators_1.finalize(() => {
eventsource.close();
}));
}

@@ -82,0 +87,0 @@ /**

{
"name": "@obelisk/client",
"version": "2.1.0",
"version": "2.1.1",
"description": "Typescript client to interact with Obelisk on a higher level than the regular ReST API calls.",

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

"event-source-polyfill": "^1.0.5",
"eventsource": "^1.0.7",
"rxjs": "6.x"

@@ -43,0 +44,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