New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-opcua-schemas

Package Overview
Dependencies
Maintainers
0
Versions
219
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-schemas - npm Package Compare versions

Comparing version 2.133.0 to 2.134.0

32

dist/source/dynamic_extension_object.js

@@ -223,12 +223,28 @@ "use strict";

else {
const constructor = dataTypeFactory.getStructureInfoByTypeName(field.fieldType).constructor;
if (!constructor) {
throw new Error("Cannot instantiate an abstract dataType" + field.fieldType);
const hasStructure = dataTypeFactory.hasStructureByTypeName(field.fieldType);
// We could have a structure or a enumeration
if (!hasStructure) {
const enumeration = dataTypeFactory.getEnumeration(field.fieldType);
if (!enumeration) {
throw new Error("Cannot find" + field.fieldType + " as a structure or enumeration");
}
else {
if (field.isArray) {
const arr = value || [];
thisAny[name] = arr.map((x) => enumeration.typedEnum.get(x));
}
else {
thisAny[name] = enumeration.typedEnum.get(value);
}
}
}
if (field.isArray) {
const arr = value || [];
thisAny[name] = arr.map((x) => (constructor ? new constructor(x) : null));
}
else {
thisAny[name] = constructor ? new constructor(value) : null;
const constructor = dataTypeFactory.getStructureInfoByTypeName(field.fieldType).constructor;
if (field.isArray) {
const arr = value || [];
thisAny[name] = arr.map((x) => (constructor ? new constructor(x) : null));
}
else {
thisAny[name] = constructor ? new constructor(value) : null;
}
}

@@ -235,0 +251,0 @@ }

{
"name": "node-opcua-schemas",
"version": "2.133.0",
"version": "2.134.0",
"description": "pure nodejs OPCUA SDK - module schemas",

@@ -19,11 +19,11 @@ "main": "dist/source/index.js",

"node-opcua-debug": "2.133.0",
"node-opcua-extension-object": "2.133.0",
"node-opcua-factory": "2.133.0",
"node-opcua-extension-object": "2.134.0",
"node-opcua-factory": "2.134.0",
"node-opcua-nodeid": "2.133.0",
"node-opcua-variant": "2.133.0",
"node-opcua-variant": "2.134.0",
"node-opcua-xml2json": "2.133.0"
},
"devDependencies": {
"node-opcua-data-model": "2.133.0",
"node-opcua-packet-analyzer": "2.133.0",
"node-opcua-data-model": "2.134.0",
"node-opcua-packet-analyzer": "2.134.0",
"node-opcua-utils": "2.133.0"

@@ -46,3 +46,3 @@ },

"homepage": "http://node-opcua.github.io/",
"gitHead": "921bb04f2e7ce3109dd051ff27a2210edf700344",
"gitHead": "ccb34926a3c195f6a7e66fca58a2f101858e78be",
"files": [

@@ -49,0 +49,0 @@ "dist",

@@ -272,11 +272,25 @@ /**

} else {
const constructor = dataTypeFactory.getStructureInfoByTypeName(field.fieldType).constructor;
if (!constructor) {
throw new Error("Cannot instantiate an abstract dataType" + field.fieldType);
}
if (field.isArray) {
const arr = (value as unknown[]) || [];
thisAny[name] = arr.map((x: any) => (constructor ? new constructor(x) : null));
const hasStructure = dataTypeFactory.hasStructureByTypeName(field.fieldType);
// We could have a structure or a enumeration
if (!hasStructure) {
const enumeration = dataTypeFactory.getEnumeration(field.fieldType);
if (!enumeration) {
throw new Error("Cannot find" + field.fieldType + " as a structure or enumeration");
} else {
if (field.isArray) {
const arr = (value as unknown[]) || [];
thisAny[name] = arr.map((x: any) => enumeration.typedEnum.get(x));
} else {
thisAny[name] = enumeration.typedEnum.get(value as number | string);
}
}
} else {
thisAny[name] = constructor ? new constructor(value as Record<string, unknown>) : null;
const constructor = dataTypeFactory.getStructureInfoByTypeName(field.fieldType).constructor;
if (field.isArray) {
const arr = (value as unknown[]) || [];
thisAny[name] = arr.map((x: any) => (constructor ? new constructor(x) : null));
} else {
thisAny[name] = constructor ? new constructor(value as Record<string, unknown>) : null;
}
}

@@ -283,0 +297,0 @@ }

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