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

node-opcua-transport

Package Overview
Dependencies
Maintainers
1
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-transport - npm Package Compare versions

Comparing version 2.103.0 to 2.104.0

2

dist/source/AcknowledgeMessage.js

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

}
exports.AcknowledgeMessage = AcknowledgeMessage;
AcknowledgeMessage.possibleFields = [

@@ -79,3 +80,2 @@ "protocolVersion",

AcknowledgeMessage.schema = schemaAcknowledgeMessage;
exports.AcknowledgeMessage = AcknowledgeMessage;
//# sourceMappingURL=AcknowledgeMessage.js.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -7,10 +33,10 @@ exports.ClientTCP_transport = void 0;

*/
const os = require("os");
const os = __importStar(require("os"));
const net_1 = require("net");
const util_1 = require("util");
const chalk = require("chalk");
const chalk_1 = __importDefault(require("chalk"));
const node_opcua_assert_1 = require("node-opcua-assert");
const node_opcua_binary_stream_1 = require("node-opcua-binary-stream");
const node_opcua_chunkmanager_1 = require("node-opcua-chunkmanager");
const debug = require("node-opcua-debug");
const debug = __importStar(require("node-opcua-debug"));
const tcp_transport_1 = require("./tcp_transport");

@@ -125,3 +151,3 @@ const tools_1 = require("./tools");

/* istanbul ignore next */
doDebug && debugLog(chalk.cyan("ClientTCP_transport#connect(endpointUrl = " + endpointUrl + ")"));
doDebug && debugLog(chalk_1.default.cyan("ClientTCP_transport#connect(endpointUrl = " + endpointUrl + ")"));
let socket = null;

@@ -188,3 +214,3 @@ try {

/* istanbul ignore next */
doDebug && debugLog(chalk.cyan("ClientTCP_transport#connect - _on_socket_error_for_connect"), err.message);
doDebug && debugLog(chalk_1.default.cyan("ClientTCP_transport#connect - _on_socket_error_for_connect"), err.message);
(0, node_opcua_assert_1.assert)(util_1.types.isNativeError(err));

@@ -197,3 +223,3 @@ _remove_connect_listeners();

doDebug &&
debugLog(chalk.cyan("ClientTCP_transport#connect -> _on_socket_end_for_connect Socket has been closed by server"));
debugLog(chalk_1.default.cyan("ClientTCP_transport#connect -> _on_socket_end_for_connect Socket has been closed by server"));
};

@@ -301,2 +327,3 @@ const _remove_connect_listeners = () => {

}
exports.ClientTCP_transport = ClientTCP_transport;
ClientTCP_transport.defaultMaxChunk = 0; // 0 - no limits

@@ -306,3 +333,2 @@ ClientTCP_transport.defaultMaxMessageSize = 0; // 0 - no limits

ClientTCP_transport.defaultSendBufferSize = 1024 * 64 * 10; // 8192 min,
exports.ClientTCP_transport = ClientTCP_transport;
//# sourceMappingURL=client_tcp_transport.js.map

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

}
exports.HelloMessage = HelloMessage;
HelloMessage.possibleFields = [

@@ -95,3 +96,2 @@ "protocolVersion",

];
exports.HelloMessage = HelloMessage;
//# sourceMappingURL=HelloMessage.js.map

@@ -241,6 +241,6 @@ "use strict";

}
exports.MessageBuilderBase = MessageBuilderBase;
MessageBuilderBase.defaultMaxChunkCount = 1000;
MessageBuilderBase.defaultMaxMessageSize = 1024 * 64 * 1024; // 64Mo
MessageBuilderBase.defaultMaxChunkSize = 1024 * 8;
exports.MessageBuilderBase = MessageBuilderBase;
//# sourceMappingURL=message_builder_base.js.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServerTCP_transport = void 0;
const util_1 = require("util");
const chalk = require("chalk");
const chalk_1 = __importDefault(require("chalk"));
const node_opcua_assert_1 = require("node-opcua-assert");
// opcua requires
const debug = require("node-opcua-debug");
const debug = __importStar(require("node-opcua-debug"));
const node_opcua_binary_stream_1 = require("node-opcua-binary-stream");

@@ -80,3 +106,3 @@ const node_opcua_chunkmanager_1 = require("node-opcua-chunkmanager");

// istanbul ignore next
debugLog && debugLog(chalk.cyan("init socket"));
debugLog && debugLog(chalk_1.default.cyan("init socket"));
(0, node_opcua_assert_1.assert)(!this._socket, "init already called!");

@@ -91,3 +117,3 @@ (0, node_opcua_assert_1.assert)(typeof callback === "function", "expecting a valid callback ");

// closes the TransportConnection gracefully.
doDebug && debugLog(this.name, chalk.cyan("_abortWithError", statusCode.toString(), extraErrorDescription));
doDebug && debugLog(this.name, chalk_1.default.cyan("_abortWithError", statusCode.toString(), extraErrorDescription));
/* istanbul ignore next */

@@ -157,3 +183,3 @@ if (this._aborted) {

(0, node_opcua_chunkmanager_1.verify_message_chunk)(messageChunk);
debugLog("server send: " + chalk.yellow("ACK"));
debugLog("server send: " + chalk_1.default.yellow("ACK"));
debugLog("server send: " + hexDump(messageChunk));

@@ -167,3 +193,3 @@ debugLog("acknowledgeMessage=", acknowledgeMessage);

// istanbul ignore next
doDebug && debugLog(chalk.cyan("_install_HEL_message_receiver "));
doDebug && debugLog(chalk_1.default.cyan("_install_HEL_message_receiver "));
this._install_one_time_message_receiver((err, data) => {

@@ -181,3 +207,3 @@ if (err) {

// istanbul ignore next
doDebug && debugLog(chalk.cyan("_on_HEL_message"));
doDebug && debugLog(chalk_1.default.cyan("_on_HEL_message"));
(0, node_opcua_assert_1.assert)(!this._helloReceived);

@@ -188,3 +214,3 @@ const stream = new node_opcua_binary_stream_1.BinaryStream(data);

if (doDebug) {
debugLog("SERVER received " + chalk.yellow(msgType));
debugLog("SERVER received " + chalk_1.default.yellow(msgType));
debugLog("SERVER received " + hexDump(data));

@@ -231,3 +257,3 @@ }

/* istanbul ignore next*/
doDebug && debugLog(chalk.red("BadCommunicationError ") + "Expecting 'HEL' message to initiate communication");
doDebug && debugLog(chalk_1.default.red("BadCommunicationError ") + "Expecting 'HEL' message to initiate communication");
this._abortWithError(node_opcua_status_code_1.StatusCodes.BadCommunicationError, "Expecting 'HEL' message to initiate communication", callback);

@@ -237,4 +263,4 @@ }

}
exports.ServerTCP_transport = ServerTCP_transport;
ServerTCP_transport.throttleTime = 1000;
exports.ServerTCP_transport = ServerTCP_transport;
//# sourceMappingURL=server_tcp_transport.js.map
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,3 +12,3 @@ exports.TCP_transport = exports.getFakeTransport = exports.setFakeTransport = void 0;

const events_1 = require("events");
const chalk = require("chalk");
const chalk_1 = __importDefault(require("chalk"));
const node_opcua_assert_1 = require("node-opcua-assert");

@@ -252,4 +255,4 @@ const node_opcua_debug_1 = require("node-opcua-debug");

if (doDebug) {
debugLog(chalk.red(" sendErrorMessage ") + chalk.cyan(statusCode.toString()));
debugLog(chalk.red(" extraErrorDescription ") + chalk.cyan(extraErrorDescription));
debugLog(chalk_1.default.red(" sendErrorMessage ") + chalk_1.default.cyan(statusCode.toString()));
debugLog(chalk_1.default.red(" extraErrorDescription ") + chalk_1.default.cyan(extraErrorDescription));
}

@@ -372,3 +375,3 @@ const reason = `${statusCode.toString()}:${extraErrorDescription || ""}`;

if (doDebug) {
debugLog(chalk.red(` SOCKET CLOSE ${this.name}: `), chalk.yellow("had_error ="), chalk.cyan(hadError.toString()));
debugLog(chalk_1.default.red(` SOCKET CLOSE ${this.name}: `), chalk_1.default.yellow("had_error ="), chalk_1.default.cyan(hadError.toString()));
}

@@ -407,3 +410,3 @@ this.dispose();

// istanbul ignore next
doDebug && debugLog(chalk.red(` SOCKET END : ${this.name}`), "is disconnecting ", this.isDisconnecting());
doDebug && debugLog(chalk_1.default.red(` SOCKET END : ${this.name}`), "is disconnecting ", this.isDisconnecting());
if (this.isDisconnecting()) {

@@ -413,3 +416,3 @@ return;

//
debugLog(chalk.red(" Transport Connection ended") + " " + this.name);
debugLog(chalk_1.default.red(" Transport Connection ended") + " " + this.name);
const err = new Error(this.name + ": socket has been disconnected by third party");

@@ -423,3 +426,3 @@ debugLog(" bytesRead = ", this.bytesRead);

// istanbul ignore next
debugLog(chalk.red(` _on_socket_error: ${this.name}`), chalk.yellow(err.message));
debugLog(chalk_1.default.red(` _on_socket_error: ${this.name}`), chalk_1.default.yellow(err.message));
// node The "close" event will be called directly following this event.

@@ -434,4 +437,4 @@ // this._emitClose(err);

}
exports.TCP_transport = TCP_transport;
TCP_transport.registry = new node_opcua_object_registry_1.ObjectRegistry();
exports.TCP_transport = TCP_transport;
//# sourceMappingURL=tcp_transport.js.map

@@ -45,4 +45,4 @@ "use strict";

}
exports.TCPErrorMessage = TCPErrorMessage;
TCPErrorMessage.possibleFields = ["statusCode", "reason"];
exports.TCPErrorMessage = TCPErrorMessage;
//# sourceMappingURL=TCPErrorMessage.js.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -7,3 +30,3 @@ exports.writeTCPMessageHeader = exports.is_valid_endpointUrl = exports.parseEndpointUrl = exports.packTcpMessage = exports.decodeMessage = void 0;

*/
const url = require("url");
const url = __importStar(require("url"));
const node_opcua_assert_1 = require("node-opcua-assert");

@@ -10,0 +33,0 @@ const node_opcua_binary_stream_1 = require("node-opcua-binary-stream");

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.FakeServer = void 0;
const events_1 = require("events");
const net = require("net");
const net = __importStar(require("net"));
const node_opcua_assert_1 = require("node-opcua-assert");

@@ -7,0 +30,0 @@ class FakeServer extends events_1.EventEmitter {

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

this._timeoutId = null;
HalfComChannel;
this.timeout = 0;

@@ -50,0 +51,0 @@ this._disconnectOtherParty();

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TransportPairSocket = void 0;
const net = require("net");
const net = __importStar(require("net"));
const fake_server_1 = require("./fake_server");

@@ -26,5 +49,6 @@ class TransportPairSocket {

shutdown(done) {
this.client.end();
this._server.shutdown((err) => {
done(err);
this.client.end(() => {
this._server.shutdown((err) => {
done(err);
});
});

@@ -31,0 +55,0 @@ }

{
"name": "node-opcua-transport",
"version": "2.103.0",
"version": "2.104.0",
"description": "pure nodejs OPCUA SDK - module transport",

@@ -16,18 +16,18 @@ "main": "./dist/source/index.js",

"chalk": "4.1.2",
"node-opcua-assert": "2.98.1",
"node-opcua-basic-types": "2.99.0",
"node-opcua-binary-stream": "2.98.1",
"node-opcua-buffer-utils": "2.98.1",
"node-opcua-chunkmanager": "2.99.0",
"node-opcua-debug": "2.99.0",
"node-opcua-factory": "2.99.0",
"node-opcua-object-registry": "2.99.0",
"node-opcua-packet-assembler": "2.99.0",
"node-opcua-status-code": "2.98.1",
"node-opcua-utils": "2.98.1"
"node-opcua-assert": "2.104.0",
"node-opcua-basic-types": "2.104.0",
"node-opcua-binary-stream": "2.104.0",
"node-opcua-buffer-utils": "2.104.0",
"node-opcua-chunkmanager": "2.104.0",
"node-opcua-debug": "2.104.0",
"node-opcua-factory": "2.104.0",
"node-opcua-object-registry": "2.104.0",
"node-opcua-packet-assembler": "2.104.0",
"node-opcua-status-code": "2.104.0",
"node-opcua-utils": "2.104.0"
},
"devDependencies": {
"node-opcua-leak-detector": "2.99.0",
"node-opcua-leak-detector": "2.104.0",
"should": "^13.2.3",
"sinon": "^15.0.3"
"sinon": "^15.1.0"
},

@@ -49,3 +49,3 @@ "author": "Etienne Rossignon",

"homepage": "http://node-opcua.github.io/",
"gitHead": "e206cac2daf39bd07e5ac6cbd744f966bb54759e",
"gitHead": "3cd6d355e8b3c66822d08a3ca682659ea5d1a55d",
"files": [

@@ -52,0 +52,0 @@ "dist",

@@ -7,3 +7,3 @@ /**

import { types } from "util";
import * as chalk from "chalk";
import chalk from "chalk";

@@ -10,0 +10,0 @@ import { assert } from "node-opcua-assert";

@@ -8,3 +8,3 @@ /**

import { types } from "util";
import * as chalk from "chalk";
import chalk from "chalk";
import { assert } from "node-opcua-assert";

@@ -11,0 +11,0 @@

@@ -6,3 +6,3 @@ /* eslint-disable @typescript-eslint/ban-types */

import { EventEmitter } from "events";
import * as chalk from "chalk";
import chalk from "chalk";

@@ -9,0 +9,0 @@ import { assert } from "node-opcua-assert";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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