node-opcua-schemas
Advanced tools
Comparing version 2.15.0 to 2.16.0
@@ -304,37 +304,40 @@ "use strict"; | ||
const _private = new WeakMap(); | ||
class DynamicExtensionObject extends node_opcua_extension_object_1.ExtensionObject { | ||
constructor(options, schema, factory) { | ||
node_opcua_assert_1.assert(schema, "expecting a schema here "); | ||
node_opcua_assert_1.assert(factory, "expecting a typeDic"); | ||
super(options); | ||
options = options || {}; | ||
_private.set(this, { schema, factory }); | ||
node_opcua_factory_1.check_options_correctness_against_schema(this, this.schema, options); | ||
initializeFields(this, options, this.schema, factory); | ||
} | ||
encode(stream) { | ||
super.encode(stream); | ||
encodeFields(this, this.schema, stream); | ||
} | ||
decode(stream) { | ||
super.decode(stream); | ||
decodeFields(this, this.schema, stream, _private.get(this).factory); | ||
} | ||
get schema() { | ||
const r = _private.get(this); | ||
if (!r) { | ||
console.log("cannot find private stuff for", this.constructor.name); | ||
console.log(new Error()); | ||
let DynamicExtensionObject = /** @class */ (() => { | ||
class DynamicExtensionObject extends node_opcua_extension_object_1.ExtensionObject { | ||
constructor(options, schema, factory) { | ||
node_opcua_assert_1.assert(schema, "expecting a schema here "); | ||
node_opcua_assert_1.assert(factory, "expecting a typeDic"); | ||
super(options); | ||
options = options || {}; | ||
_private.set(this, { schema, factory }); | ||
node_opcua_factory_1.check_options_correctness_against_schema(this, this.schema, options); | ||
initializeFields(this, options, this.schema, factory); | ||
} | ||
return r.schema; | ||
encode(stream) { | ||
super.encode(stream); | ||
encodeFields(this, this.schema, stream); | ||
} | ||
decode(stream) { | ||
super.decode(stream); | ||
decodeFields(this, this.schema, stream, _private.get(this).factory); | ||
} | ||
get schema() { | ||
const r = _private.get(this); | ||
if (!r) { | ||
console.log("cannot find private stuff for", this.constructor.name); | ||
console.log(new Error()); | ||
} | ||
return r.schema; | ||
} | ||
toJSON() { | ||
const pojo = {}; | ||
encodeToJson(this, this.schema, pojo); | ||
return pojo; | ||
} | ||
} | ||
toJSON() { | ||
const pojo = {}; | ||
encodeToJson(this, this.schema, pojo); | ||
return pojo; | ||
} | ||
} | ||
DynamicExtensionObject.schema = node_opcua_extension_object_1.ExtensionObject.schema; | ||
DynamicExtensionObject.possibleFields = []; | ||
return DynamicExtensionObject; | ||
})(); | ||
exports.DynamicExtensionObject = DynamicExtensionObject; | ||
DynamicExtensionObject.schema = node_opcua_extension_object_1.ExtensionObject.schema; | ||
DynamicExtensionObject.possibleFields = []; | ||
// tslint:disable-next-line:max-classes-per-file | ||
@@ -507,10 +510,13 @@ class UnionBaseClass extends node_opcua_factory_1.BaseUAObject { | ||
// tslint:disable-next-line:max-classes-per-file | ||
class UNION extends UnionBaseClass { | ||
constructor(options) { | ||
super(options, schema, factory); | ||
node_opcua_assert_1.assert(this.schema === schema); | ||
let UNION = /** @class */ (() => { | ||
class UNION extends UnionBaseClass { | ||
constructor(options) { | ||
super(options, schema, factory); | ||
node_opcua_assert_1.assert(this.schema === schema); | ||
} | ||
} | ||
} | ||
UNION.possibleFields = possibleFields; | ||
UNION.schema = schema; | ||
UNION.possibleFields = possibleFields; | ||
UNION.schema = schema; | ||
return UNION; | ||
})(); | ||
// to do : may be remove DataType suffix here ? | ||
@@ -561,25 +567,28 @@ Object.defineProperty(UNION, "name", { value: schema.name }); | ||
// tslint:disable-next-line:max-classes-per-file | ||
class EXTENSION extends BaseClass { | ||
constructor(options, schema2, factory2) { | ||
super(options, schema2 ? schema2 : schema, factory2 ? factory2 : dataTypeFactory); | ||
let EXTENSION = /** @class */ (() => { | ||
class EXTENSION extends BaseClass { | ||
constructor(options, schema2, factory2) { | ||
super(options, schema2 ? schema2 : schema, factory2 ? factory2 : dataTypeFactory); | ||
} | ||
toString() { | ||
return super.toString(); | ||
} | ||
toJSON() { | ||
const pojo = {}; | ||
encodeToJson(this, this.schema, pojo); | ||
return pojo; | ||
} | ||
encode(stream) { | ||
super.encode(stream); | ||
} | ||
decode(stream) { | ||
super.decode(stream); | ||
} | ||
} | ||
toString() { | ||
return super.toString(); | ||
} | ||
toJSON() { | ||
const pojo = {}; | ||
encodeToJson(this, this.schema, pojo); | ||
return pojo; | ||
} | ||
encode(stream) { | ||
super.encode(stream); | ||
} | ||
decode(stream) { | ||
super.decode(stream); | ||
} | ||
} | ||
EXTENSION.encodingDefaultXml = new node_opcua_nodeid_1.ExpandedNodeId(node_opcua_nodeid_1.NodeIdType.NUMERIC, 0, 0); | ||
EXTENSION.encodingDefaultBinary = new node_opcua_nodeid_1.ExpandedNodeId(node_opcua_nodeid_1.NodeIdType.NUMERIC, 0, 0); | ||
EXTENSION.possibleFields = possibleFields; | ||
EXTENSION.schema = schema; | ||
EXTENSION.encodingDefaultXml = new node_opcua_nodeid_1.ExpandedNodeId(node_opcua_nodeid_1.NodeIdType.NUMERIC, 0, 0); | ||
EXTENSION.encodingDefaultBinary = new node_opcua_nodeid_1.ExpandedNodeId(node_opcua_nodeid_1.NodeIdType.NUMERIC, 0, 0); | ||
EXTENSION.possibleFields = possibleFields; | ||
EXTENSION.schema = schema; | ||
return EXTENSION; | ||
})(); | ||
// to do : may be remove DataType suffix here ? | ||
@@ -586,0 +595,0 @@ Object.defineProperty(EXTENSION, "name", { value: schema.name }); |
{ | ||
"name": "node-opcua-schemas", | ||
"version": "2.15.0", | ||
"version": "2.16.0", | ||
"description": "pure nodejs OPCUA SDK - module -schemas", | ||
@@ -13,17 +13,17 @@ "main": "dist/source/index.js", | ||
"dependencies": { | ||
"node-opcua-assert": "2.10.0", | ||
"node-opcua-binary-stream": "2.11.0", | ||
"node-opcua-data-model": "2.13.0", | ||
"node-opcua-debug": "2.10.0", | ||
"node-opcua-enum": "2.10.0", | ||
"node-opcua-extension-object": "2.13.0", | ||
"node-opcua-factory": "2.13.0", | ||
"node-opcua-nodeid": "2.11.0", | ||
"node-opcua-utils": "2.13.0", | ||
"node-opcua-variant": "2.15.0", | ||
"node-opcua-xml2json": "2.15.0", | ||
"node-opcua-assert": "2.16.0", | ||
"node-opcua-binary-stream": "2.16.0", | ||
"node-opcua-data-model": "2.16.0", | ||
"node-opcua-debug": "2.16.0", | ||
"node-opcua-enum": "2.16.0", | ||
"node-opcua-extension-object": "2.16.0", | ||
"node-opcua-factory": "2.16.0", | ||
"node-opcua-nodeid": "2.16.0", | ||
"node-opcua-utils": "2.16.0", | ||
"node-opcua-variant": "2.16.0", | ||
"node-opcua-xml2json": "2.16.0", | ||
"thenify": "^3.3.1" | ||
}, | ||
"devDependencies": { | ||
"node-opcua-packet-analyzer": "2.13.0" | ||
"node-opcua-packet-analyzer": "2.16.0" | ||
}, | ||
@@ -45,3 +45,3 @@ "author": "Etienne Rossignon", | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "d92ce0bdee1ed90c2b38ee20420f091fe9bf7365" | ||
"gitHead": "9fa7d50952a7c39ff6790888a2bd6f32fe46836d" | ||
} |
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
154869
2565
+ Addednode-opcua-assert@2.16.0(transitive)
+ Addednode-opcua-basic-types@2.16.0(transitive)
+ Addednode-opcua-binary-stream@2.16.0(transitive)
+ Addednode-opcua-buffer-utils@2.16.0(transitive)
+ Addednode-opcua-constants@2.16.0(transitive)
+ Addednode-opcua-data-model@2.16.0(transitive)
+ Addednode-opcua-date-time@2.16.0(transitive)
+ Addednode-opcua-debug@2.16.0(transitive)
+ Addednode-opcua-enum@2.16.0(transitive)
+ Addednode-opcua-extension-object@2.16.0(transitive)
+ Addednode-opcua-factory@2.16.0(transitive)
+ Addednode-opcua-guid@2.16.0(transitive)
+ Addednode-opcua-nodeid@2.16.0(transitive)
+ Addednode-opcua-status-code@2.16.0(transitive)
+ Addednode-opcua-utils@2.16.0(transitive)
+ Addednode-opcua-variant@2.16.0(transitive)
+ Addednode-opcua-xml2json@2.16.0(transitive)
- Removednode-opcua-assert@2.10.0(transitive)
- Removednode-opcua-basic-types@2.13.0(transitive)
- Removednode-opcua-binary-stream@2.11.0(transitive)
- Removednode-opcua-buffer-utils@2.10.0(transitive)
- Removednode-opcua-constants@2.9.0(transitive)
- Removednode-opcua-data-model@2.13.0(transitive)
- Removednode-opcua-date-time@2.11.0(transitive)
- Removednode-opcua-debug@2.10.0(transitive)
- Removednode-opcua-enum@2.10.0(transitive)
- Removednode-opcua-extension-object@2.13.0(transitive)
- Removednode-opcua-factory@2.13.0(transitive)
- Removednode-opcua-guid@2.10.0(transitive)
- Removednode-opcua-nodeid@2.11.0(transitive)
- Removednode-opcua-status-code@2.11.0(transitive)
- Removednode-opcua-utils@2.13.0(transitive)
- Removednode-opcua-variant@2.15.0(transitive)
- Removednode-opcua-xml2json@2.15.0(transitive)
Updatednode-opcua-assert@2.16.0
Updatednode-opcua-data-model@2.16.0
Updatednode-opcua-debug@2.16.0
Updatednode-opcua-enum@2.16.0
Updatednode-opcua-factory@2.16.0
Updatednode-opcua-nodeid@2.16.0
Updatednode-opcua-utils@2.16.0
Updatednode-opcua-variant@2.16.0
Updatednode-opcua-xml2json@2.16.0