node-opcua-transport
Advanced tools
Comparing version 2.117.0 to 2.118.0
"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) { | ||
@@ -33,3 +10,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
*/ | ||
const os = __importStar(require("os")); | ||
const os_1 = __importDefault(require("os")); | ||
const net_1 = require("net"); | ||
@@ -41,3 +18,3 @@ const util_1 = require("util"); | ||
const node_opcua_chunkmanager_1 = require("node-opcua-chunkmanager"); | ||
const debug = __importStar(require("node-opcua-debug")); | ||
const node_opcua_debug_1 = require("node-opcua-debug"); | ||
const tcp_transport_1 = require("./tcp_transport"); | ||
@@ -49,7 +26,7 @@ const tools_1 = require("./tools"); | ||
const utils_1 = require("./utils"); | ||
const doDebug = debug.checkDebugFlag(__filename); | ||
const debugLog = debug.make_debugLog(__filename); | ||
const warningLog = debug.make_warningLog(__filename); | ||
const errorLog = debug.make_errorLog(__filename); | ||
const gHostname = os.hostname(); | ||
const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename); | ||
const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename); | ||
const warningLog = (0, node_opcua_debug_1.make_warningLog)(__filename); | ||
const errorLog = (0, node_opcua_debug_1.make_errorLog)(__filename); | ||
const gHostname = os_1.default.hostname(); | ||
function createClientSocket(endpointUrl, timeout) { | ||
@@ -56,0 +33,0 @@ // create a socket based on Url |
"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) { | ||
@@ -30,2 +7,7 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
exports.ServerTCP_transport = void 0; | ||
/** | ||
* @module node-opcua-transport | ||
*/ | ||
// tslint:disable:class-name | ||
// system | ||
const util_1 = require("util"); | ||
@@ -35,3 +17,3 @@ const chalk_1 = __importDefault(require("chalk")); | ||
// opcua requires | ||
const debug = __importStar(require("node-opcua-debug")); | ||
const node_opcua_debug_1 = require("node-opcua-debug"); | ||
const node_opcua_binary_stream_1 = require("node-opcua-binary-stream"); | ||
@@ -46,7 +28,6 @@ const node_opcua_chunkmanager_1 = require("node-opcua-chunkmanager"); | ||
const utils_1 = require("./utils"); | ||
const hexDump = debug.hexDump; | ||
const debugLog = debug.make_debugLog("TRANSPORT"); | ||
const errorLog = debug.make_errorLog("TRANSPORT"); | ||
const warningLog = debug.make_warningLog("TRANSPORT"); | ||
const doDebug = debug.checkDebugFlag("TRANSPORT"); | ||
const debugLog = (0, node_opcua_debug_1.make_debugLog)("TRANSPORT"); | ||
const errorLog = (0, node_opcua_debug_1.make_errorLog)("TRANSPORT"); | ||
const warningLog = (0, node_opcua_debug_1.make_warningLog)("TRANSPORT"); | ||
const doDebug = (0, node_opcua_debug_1.checkDebugFlag)("TRANSPORT"); | ||
function clamp_value(value, minVal, maxVal) { | ||
@@ -184,3 +165,3 @@ (0, node_opcua_assert_1.assert)(minVal < maxVal); | ||
debugLog("server send: " + chalk_1.default.yellow("ACK")); | ||
debugLog("server send: " + hexDump(messageChunk)); | ||
debugLog("server send: " + (0, node_opcua_debug_1.hexDump)(messageChunk)); | ||
debugLog("acknowledgeMessage=", acknowledgeMessage); | ||
@@ -213,3 +194,3 @@ } | ||
debugLog("SERVER received " + chalk_1.default.yellow(msgType)); | ||
debugLog("SERVER received " + hexDump(data)); | ||
debugLog("SERVER received " + (0, node_opcua_debug_1.hexDump)(data)); | ||
} | ||
@@ -216,0 +197,0 @@ if (msgType === "HEL") { |
@@ -6,3 +6,3 @@ /// <reference types="node" /> | ||
*/ | ||
import * as url from "url"; | ||
import url from "url"; | ||
import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream"; | ||
@@ -9,0 +9,0 @@ import { BaseUAObject } from "node-opcua-factory"; |
"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 }; | ||
}; | ||
@@ -30,3 +10,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
*/ | ||
const url = __importStar(require("url")); | ||
const url_1 = __importDefault(require("url")); | ||
const node_opcua_assert_1 = require("node-opcua-assert"); | ||
@@ -77,3 +57,3 @@ const node_opcua_binary_stream_1 = require("node-opcua-binary-stream"); | ||
function parseEndpointUrl(endpointUrl) { | ||
const _url = url.parse(endpointUrl); | ||
const _url = url_1.default.parse(endpointUrl); | ||
if (!_url.protocol || !_url.hostname) { | ||
@@ -80,0 +60,0 @@ throw new Error("Invalid endpoint url " + endpointUrl); |
@@ -5,3 +5,3 @@ /// <reference types="node" /> | ||
import { EventEmitter } from "events"; | ||
import * as net from "net"; | ||
import net from "net"; | ||
import { ISocketLike } from "../source"; | ||
@@ -8,0 +8,0 @@ export declare class FakeServer extends EventEmitter { |
"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 }; | ||
}; | ||
@@ -28,3 +8,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
const events_1 = require("events"); | ||
const net = __importStar(require("net")); | ||
const net_1 = __importDefault(require("net")); | ||
const node_opcua_assert_1 = require("node-opcua-assert"); | ||
@@ -36,3 +16,3 @@ class FakeServer extends events_1.EventEmitter { | ||
this.url = "opc.tcp://localhost:" + port; | ||
this.tcpServer = new net.Server(); | ||
this.tcpServer = new net_1.default.Server(); | ||
this._serverSocket = undefined; | ||
@@ -39,0 +19,0 @@ this.tcpServer.on("connection", (socket) => { |
/// <reference types="node" /> | ||
import * as net from "net"; | ||
import net from "net"; | ||
import { ISocketLike } from "../source"; | ||
@@ -4,0 +4,0 @@ import { ITransportPair } from "./ITransportPair"; |
"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.TransportPairSocket = void 0; | ||
const net = __importStar(require("net")); | ||
const net_1 = __importDefault(require("net")); | ||
const fake_server_1 = require("./fake_server"); | ||
@@ -33,3 +13,3 @@ class TransportPairSocket { | ||
this._server = new fake_server_1.FakeServer({ port }); | ||
this.client = new net.Socket(); | ||
this.client = new net_1.default.Socket(); | ||
this.client.connect(port, (err) => { | ||
@@ -36,0 +16,0 @@ /** */ |
{ | ||
"name": "node-opcua-transport", | ||
"version": "2.117.0", | ||
"version": "2.118.0", | ||
"description": "pure nodejs OPCUA SDK - module transport", | ||
@@ -17,10 +17,10 @@ "main": "./dist/source/index.js", | ||
"node-opcua-assert": "2.105.0", | ||
"node-opcua-basic-types": "2.117.0", | ||
"node-opcua-basic-types": "2.118.0", | ||
"node-opcua-binary-stream": "2.117.0", | ||
"node-opcua-buffer-utils": "2.117.0", | ||
"node-opcua-chunkmanager": "2.117.0", | ||
"node-opcua-debug": "2.117.0", | ||
"node-opcua-factory": "2.117.0", | ||
"node-opcua-object-registry": "2.117.0", | ||
"node-opcua-packet-assembler": "2.117.0", | ||
"node-opcua-chunkmanager": "2.118.0", | ||
"node-opcua-debug": "2.118.0", | ||
"node-opcua-factory": "2.118.0", | ||
"node-opcua-object-registry": "2.118.0", | ||
"node-opcua-packet-assembler": "2.118.0", | ||
"node-opcua-status-code": "2.117.0", | ||
@@ -30,3 +30,3 @@ "node-opcua-utils": "2.117.0" | ||
"devDependencies": { | ||
"node-opcua-leak-detector": "2.117.0", | ||
"node-opcua-leak-detector": "2.118.0", | ||
"should": "^13.2.3", | ||
@@ -50,3 +50,3 @@ "sinon": "^17.0.1" | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "99ed7589a203923985c25be8907b36485c798bbe", | ||
"gitHead": "6210aaa97b43554e3982113041963b2720e50a95", | ||
"files": [ | ||
@@ -53,0 +53,0 @@ "dist", |
/** | ||
* @module node-opcua-transport | ||
*/ | ||
import * as os from "os"; | ||
import os from "os"; | ||
import { createConnection } from "net"; | ||
@@ -13,4 +13,3 @@ import { types } from "util"; | ||
import { ErrorCallback } from "node-opcua-status-code"; | ||
import * as debug from "node-opcua-debug"; | ||
import { checkDebugFlag, make_debugLog, make_errorLog, make_warningLog } from "node-opcua-debug"; | ||
import { getFakeTransport, ISocketLike, TCP_transport } from "./tcp_transport"; | ||
@@ -24,6 +23,6 @@ import { decodeMessage, packTcpMessage, parseEndpointUrl } from "./tools"; | ||
const doDebug = debug.checkDebugFlag(__filename); | ||
const debugLog = debug.make_debugLog(__filename); | ||
const warningLog = debug.make_warningLog(__filename); | ||
const errorLog = debug.make_errorLog(__filename); | ||
const doDebug = checkDebugFlag(__filename); | ||
const debugLog = make_debugLog(__filename); | ||
const warningLog = make_warningLog(__filename); | ||
const errorLog = make_errorLog(__filename); | ||
const gHostname = os.hostname(); | ||
@@ -30,0 +29,0 @@ |
@@ -6,3 +6,2 @@ /** | ||
// system | ||
import { Socket } from "net"; | ||
import { types } from "util"; | ||
@@ -13,3 +12,3 @@ import chalk from "chalk"; | ||
// opcua requires | ||
import * as debug from "node-opcua-debug"; | ||
import{ checkDebugFlag, hexDump, make_debugLog, make_errorLog, make_warningLog } from "node-opcua-debug"; | ||
import { BinaryStream } from "node-opcua-binary-stream"; | ||
@@ -27,7 +26,6 @@ import { verify_message_chunk } from "node-opcua-chunkmanager"; | ||
const hexDump = debug.hexDump; | ||
const debugLog = debug.make_debugLog("TRANSPORT"); | ||
const errorLog = debug.make_errorLog("TRANSPORT"); | ||
const warningLog = debug.make_warningLog("TRANSPORT"); | ||
const doDebug = debug.checkDebugFlag("TRANSPORT"); | ||
const debugLog = make_debugLog("TRANSPORT"); | ||
const errorLog = make_errorLog("TRANSPORT"); | ||
const warningLog = make_warningLog("TRANSPORT"); | ||
const doDebug = checkDebugFlag("TRANSPORT"); | ||
@@ -34,0 +32,0 @@ function clamp_value(value: number, minVal: number, maxVal: number): number { |
/** | ||
* @module node-opcua-transport | ||
*/ | ||
import * as url from "url"; | ||
import url from "url"; | ||
@@ -6,0 +6,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
358592
4986
+ Addednode-opcua-basic-types@2.118.0(transitive)
+ Addednode-opcua-chunkmanager@2.118.0(transitive)
+ Addednode-opcua-date-time@2.118.0(transitive)
+ Addednode-opcua-debug@2.118.0(transitive)
+ Addednode-opcua-factory@2.118.0(transitive)
+ Addednode-opcua-nodeid@2.118.0(transitive)
+ Addednode-opcua-object-registry@2.118.0(transitive)
+ Addednode-opcua-packet-assembler@2.118.0(transitive)
- Removednode-opcua-basic-types@2.117.0(transitive)
- Removednode-opcua-chunkmanager@2.117.0(transitive)
- Removednode-opcua-date-time@2.117.0(transitive)
- Removednode-opcua-debug@2.117.0(transitive)
- Removednode-opcua-factory@2.117.0(transitive)
- Removednode-opcua-nodeid@2.117.0(transitive)
- Removednode-opcua-object-registry@2.117.0(transitive)
- Removednode-opcua-packet-assembler@2.117.0(transitive)
Updatednode-opcua-debug@2.118.0
Updatednode-opcua-factory@2.118.0