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

dslink-js

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dslink-js - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

17

js/src/requester/request/list.js

@@ -44,2 +44,17 @@ "use strict";

this.changes.add(change);
if (change.startsWith('$')) {
if (!this.node.configs.has(change)) {
this.node.configs.set(change, this.node.profile.configs.get(change));
}
}
else if (change.startsWith('@')) {
if (!this.node.attributes.has(change)) {
this.node.attributes.set(change, this.node.profile.attributes.get(change));
}
}
else {
if (!this.node.children.has(change)) {
this.node.children.set(change, this.node.profile.children.get(change));
}
}
}

@@ -216,3 +231,3 @@ }

}
if (this.request.streamStatus === interfaces_1.StreamStatus.closed) {
if (this.request && this.request.streamStatus === interfaces_1.StreamStatus.closed) {
this.stream.close();

@@ -219,0 +234,0 @@ }

7

js/src/requester/requester.js

@@ -103,7 +103,6 @@ "use strict";

}
getNodeValue(path, timeoutMs = 0) {
subscribeOnce(path, timeoutMs = 0) {
return new Promise((resolve, reject) => {
let listener;
let timer;
listener = this.subscribe(path, (update) => {
let listener = this.subscribe(path, (update) => {
resolve(update);

@@ -131,3 +130,3 @@ if (listener != null) {

}
getRemoteNode(path) {
listOnce(path) {
return new Promise((resolve, reject) => {

@@ -134,0 +133,0 @@ let sub = this.list(path, (update) => {

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

this._updating = false;
this._cached = false;
this.isClosed = false;

@@ -47,2 +48,5 @@ this._onStartListen = onStartListen;

this._updating = false;
if (!this._cached) {
this._value = undefined;
}
}

@@ -49,0 +53,0 @@ close() {

{
"name": "dslink-js",
"license": "Apache-2.0",
"version": "0.0.4",
"version": "0.0.5",
"repository": {

@@ -25,3 +25,3 @@ "type": "git",

"typescript": "^3.1.6",
"dslink-js": "^0.0.3"
"dslink-js": "file:./"
},

@@ -28,0 +28,0 @@ "dependencies": {

@@ -165,3 +165,3 @@ import {Requester} from "../requester";

if (!defPath.startsWith('/')) {
let base: object = this.node.configs.get('$base');
let base: any = this.node.configs.get('$base');
if (typeof base === 'string') {

@@ -203,2 +203,15 @@ defPath = `${base}/defs/profile/${defPath}`;

this.changes.add(change);
if (change.startsWith('$')) {
if (!this.node.configs.has(change)) {
this.node.configs.set(change, this.node.profile.configs.get(change));
}
} else if (change.startsWith('@')) {
if (!this.node.attributes.has(change)) {
this.node.attributes.set(change, this.node.profile.attributes.get(change));
}
} else {
if (!this.node.children.has(change)) {
this.node.children.set(change, this.node.profile.children.get(change));
}
}
}

@@ -220,3 +233,3 @@ }

}
if (this.request.streamStatus === StreamStatus.closed) {
if (this.request && this.request.streamStatus === StreamStatus.closed) {
this.stream.close();

@@ -223,0 +236,0 @@ }

@@ -129,7 +129,6 @@ import {RequesterUpdate, RequestUpdater} from "./interface";

getNodeValue(path: string, timeoutMs: number = 0): Promise<ValueUpdate> {
subscribeOnce(path: string, timeoutMs: number = 0): Promise<ValueUpdate> {
return new Promise((resolve, reject) => {
let listener: ReqSubscribeListener;
let timer: any;
listener = this.subscribe(path, (update: ValueUpdate) => {
let listener = this.subscribe(path, (update: ValueUpdate) => {
resolve(update);

@@ -159,3 +158,3 @@

getRemoteNode(path: string): Promise<RemoteNode> {
listOnce(path: string): Promise<RemoteNode> {
return new Promise((resolve, reject) => {

@@ -162,0 +161,0 @@ let sub = this.list(path, (update) => {

@@ -10,2 +10,3 @@ import {RequesterListUpdate} from "../requester/request/list";

_value: T;
_cached = false;

@@ -60,2 +61,5 @@ _onStartListen: () => void;

this._updating = false;
if (!this._cached) {
this._value = undefined;
}
}

@@ -69,3 +73,3 @@

this._listeners.clear();
if (this._onClose){
if (this._onClose) {
this._onClose();

@@ -72,0 +76,0 @@ }

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

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