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

@evergis/api

Package Overview
Dependencies
Maintainers
5
Versions
330
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evergis/api - npm Package Compare versions

Comparing version 0.1.13 to 0.1.14

1

es/layers/EvergisDynamicLayer.d.ts

@@ -11,2 +11,3 @@ import { DynamicLayer } from '@evergis/sgis/es/layers/DynamicLayer';

getUrl(bbox: Bbox, resolution: number): string;
private subscribeRedraw;
}

@@ -13,0 +14,0 @@ export declare type EvergisDynamicLayerParams = {

@@ -8,2 +8,3 @@ import { DynamicLayer } from '@evergis/sgis/es/layers/DynamicLayer';

this._style = configuration.style;
this.subscribeRedraw(api);
}

@@ -28,3 +29,12 @@ set style(value) {

}
subscribeRedraw(api) {
const tag = `service_update_${this.name.replace(/\//g, '_')}`;
api.notification.subscribe(tag).then(() => {
api.notification.on(tag, () => {
this.forceUpdate();
this.redraw();
});
});
}
}
//# sourceMappingURL=EvergisDynamicLayer.js.map

@@ -8,2 +8,3 @@ import { NotificationService } from '../__generated__/NotificationService';

private ws?;
private wsUrl?;
constructor(info: ServiceInfoDc, http: IHttpClient);

@@ -15,2 +16,3 @@ on<Data, Result>(tag: string, handler: NotificationHandler<Data, Result>): void;

connectWs(url: string, sessionId?: string): void;
private connect;
private onWsConnected;

@@ -17,0 +19,0 @@ private onWsClosed;

20

es/services/Notification.js

@@ -11,2 +11,3 @@ import { NotificationService } from '../__generated__/NotificationService';

console.log('WebSocket connection closed.');
this.connect();
};

@@ -47,8 +48,17 @@ this.onWsMessage = (event) => {

connectWs(url, sessionId) {
const wsUrl = url.replace('http://', 'ws://').replace('https://', 'wss://');
this.ws = new WebSocket(wsUrl + '?_sb=' + encodeURIComponent(sessionId || ''));
this.ws.onopen = this.onWsConnected;
this.ws.onclose = this.onWsClosed;
this.ws.onmessage = this.onWsMessage;
const urlWithWsScheme = url
.replace('http://', 'ws://')
.replace('https://', 'wss://');
this.wsUrl =
urlWithWsScheme + '?_sb=' + encodeURIComponent(sessionId || '');
this.connect();
}
connect() {
if (this.wsUrl) {
this.ws = new WebSocket(this.wsUrl);
this.ws.onopen = this.onWsConnected;
this.ws.onclose = this.onWsClosed;
this.ws.onmessage = this.onWsMessage;
}
}
}

@@ -55,0 +65,0 @@ export class NotificationEvent {

{
"name": "@evergis/api",
"version": "0.1.13",
"version": "0.1.14",
"license": "ISC",

@@ -5,0 +5,0 @@ "author": "everpoint",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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