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

node-opcua-schemas

Package Overview
Dependencies
Maintainers
1
Versions
216
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.6.0-alpha.6 to 2.6.0-alpha.7

30

dist/source/dynamic_extension_object.js

@@ -369,3 +369,3 @@ "use strict";

if (Object.keys(options).length === 0) {
this[switchFieldName] = 0xFFFFFFFF;
this[switchFieldName] = 0x00;
return;

@@ -387,3 +387,3 @@ }

if (typeof switchValue !== "number") {
throw new Error("Invalid switchValue " + switchValue);
throw new Error("Invalid switchValue " + switchFieldName + " value = " + switchValue);
}

@@ -477,2 +477,3 @@ stream.writeUInt32(switchValue);

function createDynamicObjectConstructor(schema, dataTypeFactory) {
var _a;
const schemaPriv = schema;

@@ -496,13 +497,18 @@ if (schemaPriv.$Constructor) {

try {
BaseClass = getOrCreateConstructor(schema.baseType, dataTypeFactory);
if (!BaseClass) {
throw new Error("Cannot find base class : " + schema.baseType);
const baseSchema = dataTypeFactory.getStructuredTypeSchema(schema.baseType);
schema._baseSchema = baseSchema;
if (((_a = baseSchema.encodingDefaultBinary) === null || _a === void 0 ? void 0 : _a.value) === 0) {
}
if (BaseClass.possibleFields) {
possibleFields = BaseClass.possibleFields.concat(possibleFields);
else {
BaseClass = getOrCreateConstructor(schema.baseType, dataTypeFactory);
if (!BaseClass) {
throw new Error("Cannot find base class : " + schema.baseType);
}
if (BaseClass.possibleFields) {
possibleFields = BaseClass.possibleFields.concat(possibleFields);
}
schema._baseSchema = BaseClass.schema;
}
schema._baseSchema = BaseClass.schema;
}
catch (err) {
console.log("createDynamicObjectConstructor err= ", err.message);
}

@@ -523,2 +529,8 @@ }

}
encode(stream) {
super.encode(stream);
}
decode(stream) {
super.decode(stream);
}
}

@@ -525,0 +537,0 @@ EXTENSION.encodingDefaultXml = new node_opcua_nodeid_1.ExpandedNodeId(node_opcua_nodeid_1.NodeIdType.NUMERIC, 0, 0);

{
"name": "node-opcua-schemas",
"version": "2.6.0-alpha.6",
"version": "2.6.0-alpha.7",
"description": "pure nodejs OPCUA SDK - module -schemas",

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

"node-opcua-binary-stream": "^2.6.0-alpha.1",
"node-opcua-data-model": "^2.6.0-alpha.1",
"node-opcua-data-model": "^2.6.0-alpha.7",
"node-opcua-debug": "^2.6.0-alpha.1",
"node-opcua-enum": "^2.6.0-alpha.1",
"node-opcua-extension-object": "^2.6.0-alpha.1",
"node-opcua-factory": "^2.6.0-alpha.1",
"node-opcua-extension-object": "^2.6.0-alpha.7",
"node-opcua-factory": "^2.6.0-alpha.7",
"node-opcua-nodeid": "^2.6.0-alpha.1",
"node-opcua-utils": "^2.6.0-alpha.1",
"node-opcua-variant": "^2.6.0-alpha.6",
"node-opcua-xml2json": "^2.6.0-alpha.1",
"node-opcua-variant": "^2.6.0-alpha.7",
"node-opcua-xml2json": "^2.6.0-alpha.7",
"thenify": "^3.3.0"
},
"devDependencies": {
"node-opcua-packet-analyzer": "^2.6.0-alpha.1"
"node-opcua-packet-analyzer": "^2.6.0-alpha.7"
},

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

"homepage": "http://node-opcua.github.io/",
"gitHead": "8c187b05d678baf80703dec448e9d9ed1813ba16"
"gitHead": "6af0c6f183dcb96ddc5a2befc98851d0960c5fd0"
}

@@ -518,3 +518,3 @@ /**

if (Object.keys(options).length === 0) {
(this as any)[switchFieldName] = 0xFFFFFFFF;
(this as any)[switchFieldName] = 0x00;
return;

@@ -541,3 +541,3 @@ }

if (typeof switchValue !== "number") {
throw new Error("Invalid switchValue " + switchValue);
throw new Error("Invalid switchValue " + switchFieldName + " value = " + switchValue);
}

@@ -567,3 +567,2 @@ stream.writeUInt32(switchValue);

public decode(stream: BinaryStream): void {
const factory: DataTypeFactory = (this.schema as any).$$factory;

@@ -689,13 +688,19 @@

try {
BaseClass = getOrCreateConstructor(schema.baseType, dataTypeFactory);
if (!BaseClass) {
throw new Error("Cannot find base class : " + schema.baseType);
const baseSchema = dataTypeFactory.getStructuredTypeSchema(schema.baseType);
schema._baseSchema = baseSchema;
if (baseSchema.encodingDefaultBinary?.value === 0) {
// is abstract
} else {
BaseClass = getOrCreateConstructor(schema.baseType, dataTypeFactory);
if (!BaseClass) {
throw new Error("Cannot find base class : " + schema.baseType);
}
if ((BaseClass as any).possibleFields) {
possibleFields = (BaseClass as any).possibleFields.concat(possibleFields);
}
schema._baseSchema = BaseClass.schema;
}
if ((BaseClass as any).possibleFields) {
possibleFields = (BaseClass as any).possibleFields.concat(possibleFields);
}
schema._baseSchema = BaseClass.schema;
} catch (err) {
console.log("createDynamicObjectConstructor err= ", err.message);
// xx console.log("createDynamicObjectConstructor err= ", err.message);
}

@@ -724,2 +729,8 @@ }

public encode(stream: BinaryStream) {
super.encode(stream);
}
public decode(stream: BinaryStream): void {
super.decode(stream);
}
}

@@ -726,0 +737,0 @@

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