node-opcua-packet-analyzer
Advanced tools
Comparing version 2.102.0 to 2.104.0
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.analyze_object_binary_encoding = exports.analyseExtensionObject = exports.analyzePacket = 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"); | ||
@@ -37,3 +40,3 @@ const node_opcua_basic_types_1 = require("node-opcua-basic-types"); | ||
const strBuf = (0, node_opcua_utils_1.buffer_ellipsis)(buffer); | ||
return (chalk.cyan("s:") + f(start, 4) + chalk.cyan(" e:") + f(end, 4) + chalk.cyan(" n:") + f(n, 4) + " " + chalk.yellow(strBuf)); | ||
return (chalk_1.default.cyan("s:") + f(start, 4) + chalk_1.default.cyan(" e:") + f(end, 4) + chalk_1.default.cyan(" n:") + f(n, 4) + " " + chalk_1.default.yellow(strBuf)); | ||
} | ||
@@ -63,5 +66,5 @@ function make_tracer(buffer, padding, offset) { | ||
const length = (0, node_opcua_basic_types_1.decodeUInt32)(stream); | ||
display(chalk.green(" ExpandedNodId =") + " " + nodeId); | ||
display(chalk.green(" encoding mask =") + " " + encodingMask); | ||
display(chalk.green(" length =") + " " + length); | ||
display(chalk_1.default.green(" ExpandedNodId =") + " " + nodeId); | ||
display(chalk_1.default.green(" encoding mask =") + " " + encodingMask); | ||
display(chalk_1.default.green(" length =") + " " + length); | ||
analyzePacket(bufferExtract.subarray(stream.length), value.encodingDefaultBinary, padding + 2, start + stream.length); | ||
@@ -71,3 +74,3 @@ } | ||
tracer: { | ||
dump: (title, value) => display(title + " " + chalk.green(value.toString())), | ||
dump: (title, value) => display(title + " " + chalk_1.default.green(value.toString())), | ||
encoding_byte: (encodingMask, valueEnum, start, end) => { | ||
@@ -74,0 +77,0 @@ (0, node_opcua_assert_1.assert)(valueEnum); |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.compare_obj_by_encoding = void 0; | ||
const node_opcua_binary_stream_1 = require("node-opcua-binary-stream"); | ||
const should = require("should"); | ||
const persist = should; | ||
const should_1 = __importDefault(require("should")); | ||
const persist = should_1.default; | ||
function compare_obj_by_encoding(obj1, obj2) { | ||
@@ -8,0 +11,0 @@ function encoded(obj) { |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -6,3 +9,3 @@ exports.json_encode_decode_round_trip_test = exports.encode_decode_round_trip_test = void 0; | ||
// @ts-check | ||
const chalk = require("chalk"); | ||
const chalk_1 = __importDefault(require("chalk")); | ||
const node_opcua_binary_stream_1 = require("node-opcua-binary-stream"); | ||
@@ -12,3 +15,3 @@ const node_opcua_debug_1 = require("node-opcua-debug"); | ||
const node_opcua_test_helpers_1 = require("node-opcua-test-helpers"); | ||
const should = require("should"); | ||
const should_1 = __importDefault(require("should")); | ||
const source_1 = require("../source"); | ||
@@ -32,6 +35,6 @@ function dump_block_in_debug_mode(buffer, id, options) { | ||
function displayError(p, expected, actual) { | ||
console.log(chalk.yellow(" ---------------------------------- error in encode_decode_round_trip_test")); | ||
console.log(chalk.red(" key "), p); | ||
console.log(chalk.red(" expected "), JSON.stringify(expected)); | ||
console.log(chalk.cyan(" actual "), JSON.stringify(actual)); | ||
console.log(chalk_1.default.yellow(" ---------------------------------- error in encode_decode_round_trip_test")); | ||
console.log(chalk_1.default.red(" key "), p); | ||
console.log(chalk_1.default.red(" expected "), JSON.stringify(expected)); | ||
console.log(chalk_1.default.cyan(" actual "), JSON.stringify(actual)); | ||
} | ||
@@ -87,3 +90,3 @@ Object.keys(objReloaded).forEach((p) => { | ||
callback_buffer = callback_buffer || dump_block_in_debug_mode; | ||
should.exist(obj); | ||
should_1.default.exist(obj); | ||
const size = obj.binaryStoreSize(); | ||
@@ -109,3 +112,3 @@ const stream = new node_opcua_binary_stream_1.BinaryStream(Buffer.alloc(size)); | ||
callbackBuffer = callbackBuffer || dump_block_in_debug_mode; | ||
should.exist(obj); | ||
should_1.default.exist(obj); | ||
const json = JSON.stringify(obj); | ||
@@ -112,0 +115,0 @@ const objReloaded = JSON.parse(json); |
{ | ||
"name": "node-opcua-packet-analyzer", | ||
"version": "2.102.0", | ||
"version": "2.104.0", | ||
"description": "pure nodejs OPCUA SDK - module packet-analyzer", | ||
@@ -18,12 +18,12 @@ "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-debug": "2.99.0", | ||
"node-opcua-factory": "2.99.0", | ||
"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-debug": "2.104.0", | ||
"node-opcua-factory": "2.104.0", | ||
"node-opcua-utils": "2.104.0" | ||
}, | ||
"devDependencies": { | ||
"node-opcua-nodeid": "2.99.0", | ||
"node-opcua-test-helpers": "2.98.1", | ||
"node-opcua-nodeid": "2.104.0", | ||
"node-opcua-test-helpers": "2.104.0", | ||
"should": "^13.2.3" | ||
@@ -44,3 +44,3 @@ }, | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "07dcdd8e8c7f2b55544c6e23023093e35674829c", | ||
"gitHead": "3cd6d355e8b3c66822d08a3ca682659ea5d1a55d", | ||
"files": [ | ||
@@ -47,0 +47,0 @@ "dist", |
import { inspect, types } from "util"; | ||
import * as chalk from "chalk"; | ||
import chalk from "chalk"; | ||
import { assert } from "node-opcua-assert"; | ||
@@ -4,0 +4,0 @@ |
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
81503
600
+ Addednode-opcua-assert@2.104.0(transitive)
+ Addednode-opcua-basic-types@2.104.0(transitive)
+ Addednode-opcua-binary-stream@2.104.0(transitive)
+ Addednode-opcua-buffer-utils@2.104.0(transitive)
+ Addednode-opcua-date-time@2.104.0(transitive)
+ Addednode-opcua-debug@2.104.0(transitive)
+ Addednode-opcua-enum@2.104.0(transitive)
+ Addednode-opcua-factory@2.104.0(transitive)
+ Addednode-opcua-nodeid@2.104.0(transitive)
+ Addednode-opcua-status-code@2.104.0(transitive)
+ Addednode-opcua-utils@2.104.0(transitive)
- Removednode-opcua-assert@2.98.1(transitive)
- Removednode-opcua-basic-types@2.99.0(transitive)
- Removednode-opcua-binary-stream@2.98.1(transitive)
- Removednode-opcua-buffer-utils@2.98.1(transitive)
- Removednode-opcua-date-time@2.99.0(transitive)
- Removednode-opcua-debug@2.99.0(transitive)
- Removednode-opcua-enum@2.98.1(transitive)
- Removednode-opcua-factory@2.99.0(transitive)
- Removednode-opcua-nodeid@2.99.0(transitive)
- Removednode-opcua-status-code@2.98.1(transitive)
- Removednode-opcua-utils@2.98.1(transitive)
Updatednode-opcua-assert@2.104.0
Updatednode-opcua-debug@2.104.0
Updatednode-opcua-factory@2.104.0
Updatednode-opcua-utils@2.104.0