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

node-opcua-factory

Package Overview
Dependencies
Maintainers
1
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-factory - npm Package Compare versions

Comparing version 2.6.0-alpha.1 to 2.6.0-alpha.7

4

dist/datatype_factory.js

@@ -120,3 +120,5 @@ "use strict";

}
console.log(Object.keys(this._structureTypeConstructorByNameMap).join(" "));
if (doDebug) {
console.log(Object.keys(this._structureTypeConstructorByNameMap).join(" "));
}
throw new Error("Cannot find StructureType constructor for " + typeName + " - it may be abstract, or it could be a basic type");

@@ -123,0 +125,0 @@ }

@@ -16,3 +16,3 @@ import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";

export declare function getBuildInType(name: string): BasicTypeDefinition;
export declare function findBuiltInType(dataTypeName: any): BasicTypeDefinition;
export declare function findBuiltInType(dataTypeName: string): BasicTypeDefinition;
export declare function getTypeMap(): Map<string, BasicTypeSchema>;

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

function findBuiltInType(dataTypeName) {
if (dataTypeName.name) {
dataTypeName = dataTypeName.toString();
}
node_opcua_assert_1.assert(typeof dataTypeName === "string", "findBuiltInType : expecting a string " + dataTypeName);

@@ -207,0 +204,0 @@ const t = _defaultTypeMap.get(dataTypeName);

@@ -20,2 +20,3 @@ import { FieldType, StructuredTypeOptions, TypeSchemaBase } from "./types";

constructor(options: StructuredTypeOptions);
toString(): string;
}

@@ -22,0 +23,0 @@ export declare function get_base_schema(schema: StructuredTypeSchema): StructuredTypeSchema | null;

@@ -95,2 +95,21 @@ "use strict";

}
toString() {
var _a, _b, _c;
const str = [];
str.push("name = " + this.name);
str.push("baseType = " + this.baseType);
str.push("id = " + this.id.toString());
str.push("bitFields = " + (this.bitFields ? this.bitFields.map((b) => b.name).join(" ") : undefined));
str.push("dataTypeNodeId = " + (this.dataTypeNodeId ? this.dataTypeNodeId.toString() : undefined));
str.push("documentation = " + this.documentation);
str.push("encodingDefaultBinary = " + ((_a = this.encodingDefaultBinary) === null || _a === void 0 ? void 0 : _a.toString()));
str.push("encodingDefaultXml = " + ((_b = this.encodingDefaultXml) === null || _b === void 0 ? void 0 : _b.toString()));
str.push("encodingDefaultJson = " + ((_c = this.encodingDefaultJson) === null || _c === void 0 ? void 0 : _c.toString()));
for (const f of this.fields) {
str.push(" field = " + f.name.padEnd(30) + " isArray= " + (f.isArray ? true : false) + " " + f.fieldType.toString().padEnd(30) +
(f.switchBit !== undefined ? (" switchBit " + f.switchBit) : "") +
(f.switchValue !== undefined ? " switchValue " + f.switchValue : ""));
}
return str.join("\n");
}
}

@@ -97,0 +116,0 @@ exports.StructuredTypeSchema = StructuredTypeSchema;

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

for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
}
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -14,0 +14,0 @@ __exportStar(require("./constructor_type"), exports);

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

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

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

@@ -159,3 +159,5 @@ /**

}
console.log(Object.keys(this._structureTypeConstructorByNameMap).join(" "));
if (doDebug) {
console.log(Object.keys(this._structureTypeConstructorByNameMap).join(" "));
}
throw new Error("Cannot find StructureType constructor for " + typeName + " - it may be abstract, or it could be a basic type");

@@ -162,0 +164,0 @@ }

@@ -439,3 +439,3 @@ /**

if (this.schema && this.schema.hasOwnProperty("toString")) {
if (this. schema && this.schema.hasOwnProperty("toString")) {
return this.schema.toString.apply(this, arguments as any);

@@ -442,0 +442,0 @@ } else {

@@ -166,2 +166,3 @@ /**

registerBasicType({ name: "Date", subType: "DateTime" });
// registerBasicType({ name: "Counter", subType: "UInt32" });

@@ -168,0 +169,0 @@ // registerBasicType({ name: "IntegerId", subType: "UInt32" });

@@ -36,2 +36,3 @@ /**

// tslint:disable:no-empty

@@ -340,7 +341,3 @@ // tslint:enable:no-unused-variable

*/
export function findBuiltInType(dataTypeName: any): BasicTypeDefinition {
// coerce string or Qualified Name to string
if (dataTypeName.name) {
dataTypeName = dataTypeName.toString();
}
export function findBuiltInType(dataTypeName: string): BasicTypeDefinition {
assert(typeof dataTypeName === "string", "findBuiltInType : expecting a string " + dataTypeName);

@@ -347,0 +344,0 @@ const t = _defaultTypeMap.get(dataTypeName) as BasicTypeDefinition;

@@ -149,2 +149,22 @@ /**

}
public toString() {
const str: string[] = [];
str.push("name = " + this.name);
str.push("baseType = " + this.baseType);
str.push("id = " + this.id.toString());
str.push("bitFields = " + (this.bitFields ? this.bitFields.map((b) => b.name).join(" ") : undefined));
str.push("dataTypeNodeId = " + (this.dataTypeNodeId ? this.dataTypeNodeId.toString() : undefined));
str.push("documentation = " + this.documentation);
str.push("encodingDefaultBinary = " + this.encodingDefaultBinary?.toString());
str.push("encodingDefaultXml = " + this.encodingDefaultXml?.toString());
str.push("encodingDefaultJson = " + this.encodingDefaultJson?.toString());
for (const f of this.fields) {
str.push(" field = " + f.name.padEnd(30) + " isArray= " + (f.isArray ? true : false) + " " + f.fieldType.toString().padEnd(30) +
(f.switchBit !== undefined ? (" switchBit " + f.switchBit) : "") +
(f.switchValue !== undefined ? " switchValue " + f.switchValue : ""));
}
return str.join("\n");
}
}

@@ -151,0 +171,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

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