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

node-opcua-client-dynamic-extension-object

Package Overview
Dependencies
Maintainers
1
Versions
201
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-client-dynamic-extension-object - npm Package Compare versions

Comparing version 2.5.0-alpha.4 to 2.5.0-alpha.5

0

dist/client_dynamic_extension_object.d.ts

@@ -0,0 +0,0 @@ import { StructuredTypeSchema } from "node-opcua-factory";

4

dist/client_dynamic_extension_object.js

@@ -461,5 +461,5 @@ "use strict";

// tslint:disable:no-console
console.log("node-id :", dataTypeNodeId.toString());
console.log("node-id :", dataTypeNodeId ? dataTypeNodeId.toString() : null);
console.log("nodeClass :", node_opcua_data_model_1.NodeClass[nodeClass.value.value]);
console.log("browseName :", browseName.value.value.toString());
console.log("browseName :", browseName.toString());
console.log(result1.toString());

@@ -466,0 +466,0 @@ throw new Error("getDataTypeDefinition invalid HasEncoding reference");

@@ -0,0 +0,0 @@ import { ConstructorFunc, DataTypeFactory } from "node-opcua-factory";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { DataValue } from "node-opcua-data-value";

@@ -32,4 +32,9 @@ "use strict";

// count number of Opaque Structures
const dataValuesToFix = dataValues.filter((dataValue) => dataValue.value.dataType === node_opcua_variant_1.DataType.ExtensionObject &&
dataValue.value.value instanceof node_opcua_extension_object_1.OpaqueStructure);
const dataValuesToFix = dataValues.filter((dataValue) => dataValue.value && dataValue.value.dataType === node_opcua_variant_1.DataType.ExtensionObject &&
((dataValue.value.arrayType === node_opcua_variant_1.VariantArrayType.Scalar
&& dataValue.value.value instanceof node_opcua_extension_object_1.OpaqueStructure)
||
(dataValue.value.arrayType !== node_opcua_variant_1.VariantArrayType.Scalar
&& dataValue.value.value && dataValue.value.value.length >= 0
&& dataValue.value.value[0] instanceof node_opcua_extension_object_1.OpaqueStructure)));
if (dataValuesToFix.length === 0) {

@@ -41,3 +46,3 @@ return;

const promises = dataValuesToFix.map((dataValue) => __awaiter(this, void 0, void 0, function* () {
resolve_dynamic_extension_object_1.resolveDynamicExtensionObject(dataValue.value, extraDataTypeManager);
return yield resolve_dynamic_extension_object_1.resolveDynamicExtensionObject(dataValue.value, extraDataTypeManager);
}));

@@ -44,0 +49,0 @@ yield Promise.all(promises);

import { Variant } from "node-opcua-variant";
import { ExtraDataTypeManager } from "./extra_data_type_manager";
export declare function resolveDynamicExtensionObject(variant: Variant, dataTypeManager: ExtraDataTypeManager): Promise<void>;

@@ -37,5 +37,2 @@ "use strict";

variant.value = variant.value.map((v) => {
if (!(v instanceof node_opcua_extension_object_1.OpaqueStructure)) {
return v;
}
const obj = resolveDynamicExtensionObjectV(v, dataTypeManager);

@@ -42,0 +39,0 @@ return obj;

{
"name": "node-opcua-client-dynamic-extension-object",
"version": "2.5.0-alpha.4",
"version": "2.5.0-alpha.5",
"description": "pure nodejs OPCUA SDK - module client-dynamic-extension-object",

@@ -15,15 +15,15 @@ "main": "./dist/index.js",

"node-opcua-binary-stream": "^2.5.0-alpha.4",
"node-opcua-data-model": "^2.5.0-alpha.4",
"node-opcua-data-value": "^2.5.0-alpha.4",
"node-opcua-data-model": "^2.5.0-alpha.5",
"node-opcua-data-value": "^2.5.0-alpha.5",
"node-opcua-debug": "^2.5.0-alpha.4",
"node-opcua-extension-object": "^2.5.0-alpha.4",
"node-opcua-factory": "^2.5.0-alpha.4",
"node-opcua-extension-object": "^2.5.0-alpha.5",
"node-opcua-factory": "^2.5.0-alpha.5",
"node-opcua-nodeid": "^2.5.0-alpha.4",
"node-opcua-pseudo-session": "^2.5.0-alpha.4",
"node-opcua-schemas": "^2.5.0-alpha.4",
"node-opcua-service-browse": "^2.5.0-alpha.4",
"node-opcua-service-translate-browse-path": "^2.5.0-alpha.4",
"node-opcua-pseudo-session": "^2.5.0-alpha.5",
"node-opcua-schemas": "^2.5.0-alpha.5",
"node-opcua-service-browse": "^2.5.0-alpha.5",
"node-opcua-service-translate-browse-path": "^2.5.0-alpha.5",
"node-opcua-status-code": "^2.5.0-alpha.4",
"node-opcua-types": "^2.5.0-alpha.4",
"node-opcua-variant": "^2.5.0-alpha.4"
"node-opcua-types": "^2.5.0-alpha.5",
"node-opcua-variant": "^2.5.0-alpha.5"
},

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

"homepage": "http://node-opcua.github.io/",
"gitHead": "67068530aea80ae818cd8ee05be517194e706523"
"gitHead": "07dcdd8e8c7f2b55544c6e23023093e35674829c"
}

@@ -601,5 +601,5 @@ // tslint:disable: no-console

// tslint:disable:no-console
console.log("node-id :", dataTypeNodeId.toString());
console.log("node-id :", dataTypeNodeId ? dataTypeNodeId.toString() : null);
console.log("nodeClass :", NodeClass[nodeClass.value.value]);
console.log("browseName :", browseName.value.value.toString());
console.log("browseName :", browseName.toString());
console.log(result1.toString());

@@ -606,0 +606,0 @@ throw new Error("getDataTypeDefinition invalid HasEncoding reference");

@@ -0,0 +0,0 @@ /**

import { DataValue } from "node-opcua-data-value";
import { OpaqueStructure } from "node-opcua-extension-object";
import { IBasicSession } from "node-opcua-pseudo-session";
import { DataType } from "node-opcua-variant";
import { DataType, VariantArrayType } from "node-opcua-variant";

@@ -29,4 +29,13 @@ import { populateDataTypeManager } from "./client_dynamic_extension_object";

const dataValuesToFix = dataValues.filter((dataValue: DataValue) =>
dataValue.value.dataType === DataType.ExtensionObject &&
dataValue.value.value instanceof OpaqueStructure);
dataValue.value && dataValue.value.dataType === DataType.ExtensionObject &&
(
(dataValue.value.arrayType === VariantArrayType.Scalar
&& dataValue.value.value instanceof OpaqueStructure)
||
(dataValue.value.arrayType !== VariantArrayType.Scalar
&& dataValue.value.value && dataValue.value.value.length >= 0
&& dataValue.value.value[0] instanceof OpaqueStructure)
)
);
if (dataValuesToFix.length === 0) {

@@ -39,6 +48,7 @@ return;

const promises = dataValuesToFix.map(async (dataValue: DataValue) => {
resolveDynamicExtensionObject(dataValue.value, extraDataTypeManager);
});
const promises = dataValuesToFix.map(
async (dataValue: DataValue) => {
return await resolveDynamicExtensionObject(dataValue.value, extraDataTypeManager)
});
await Promise.all(promises);
}

@@ -36,8 +36,4 @@ import { BinaryStream } from "node-opcua-binary-stream";

if (variant.value instanceof Array) {
variant.value = (variant.value as any[]).map((v: any) => {
if (!(v instanceof OpaqueStructure)) {
return v;
}
const obj = resolveDynamicExtensionObjectV(v as OpaqueStructure, dataTypeManager);
variant.value = (variant.value as OpaqueStructure[]).map((v: OpaqueStructure) => {
const obj = resolveDynamicExtensionObjectV(v, dataTypeManager);
return obj;

@@ -44,0 +40,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

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