node-opcua-generator
Advanced tools
Comparing version 2.76.2 to 2.77.0
@@ -83,3 +83,3 @@ "use strict"; | ||
function get_class_TScript_filename_local(schemaName) { | ||
let schema = (0, node_opcua_factory_1.getStructuredTypeSchema)(schemaName); | ||
let schema = (0, node_opcua_factory_1.getStandardDataTypeFactory)().getStructuredTypeSchema(schemaName); | ||
if (!schema) { | ||
@@ -660,4 +660,4 @@ schema = generatedObjectSchema[schemaName]; | ||
{ | ||
write(` public static get schema(): StructuredTypeSchema { return schema${className}; }`); | ||
const possibleFields = (0, node_opcua_factory_1.extract_all_fields)(schema); | ||
write(` public static get schema(): IStructuredTypeSchema { return schema${className}; }`); | ||
const possibleFields = (0, node_opcua_factory_1.extractAllPossibleFields)(schema); | ||
write_possible_fields(write, className, possibleFields); | ||
@@ -690,3 +690,3 @@ // ------------------------------------------------------------------------- | ||
write_isValid(write, schema); | ||
write(` public get schema(): StructuredTypeSchema { return schema${className}; }`); | ||
write(` public get schema(): IStructuredTypeSchema { return schema${className}; }`); | ||
} | ||
@@ -761,3 +761,2 @@ write("}"); | ||
write(` registerClassDefinition,`); | ||
write(` getStructuredTypeSchema,`); | ||
write(` BaseUAObject,`); | ||
@@ -764,0 +763,0 @@ write(` getEnumeration`); |
@@ -221,3 +221,3 @@ "use strict"; | ||
registerClassDefinition, | ||
registerEnumeration, StructuredTypeSchema | ||
registerEnumeration, IStructuredTypeSchema | ||
} from "node-opcua-factory"; | ||
@@ -279,3 +279,3 @@ import { | ||
// make sure | ||
if (dataTypeFactory.hasStructuredType(structuredType.baseType)) { | ||
if (dataTypeFactory.hasStructureByTypeName(structuredType.baseType)) { | ||
processStructuredType(dataTypeFactory.getStructuredTypeSchema(structuredType.baseType)); | ||
@@ -300,3 +300,3 @@ } | ||
for (const structureType of [...dataTypeFactory.structuredTypesNames()].sort()) { | ||
if (!dataTypeFactory.hasStructuredType(structureType)) { | ||
if (!dataTypeFactory.hasStructureByTypeName(structureType)) { | ||
continue; | ||
@@ -303,0 +303,0 @@ } |
{ | ||
"name": "node-opcua-generator", | ||
"version": "2.76.2", | ||
"version": "2.77.0", | ||
"description": "pure nodejs OPCUA SDK - module -generator", | ||
@@ -11,3 +11,3 @@ "main": "./dist/index.js", | ||
"format": "prettier --write source test", | ||
"clean": "npx rimraf dist *.tsbuildinfo", | ||
"clean": "npx rimraf node_modules dist *.tsbuildinfo", | ||
"test": "mocha" | ||
@@ -17,16 +17,16 @@ }, | ||
"chalk": "4.1.2", | ||
"node-opcua-assert": "2.76.0", | ||
"node-opcua-constants": "2.74.0", | ||
"node-opcua-debug": "2.76.2", | ||
"node-opcua-factory": "2.76.2", | ||
"node-opcua-nodeid": "2.76.2", | ||
"node-opcua-schemas": "2.76.2", | ||
"node-opcua-utils": "2.76.0" | ||
"node-opcua-assert": "2.77.0", | ||
"node-opcua-constants": "2.77.0", | ||
"node-opcua-debug": "2.77.0", | ||
"node-opcua-factory": "2.77.0", | ||
"node-opcua-nodeid": "2.77.0", | ||
"node-opcua-schemas": "2.77.0", | ||
"node-opcua-utils": "2.77.0" | ||
}, | ||
"devDependencies": { | ||
"node-opcua-basic-types": "2.76.2", | ||
"node-opcua-binary-stream": "2.76.2", | ||
"node-opcua-extension-object": "2.76.2", | ||
"node-opcua-packet-analyzer": "2.76.2", | ||
"node-opcua-status-code": "2.76.2", | ||
"node-opcua-basic-types": "2.77.0", | ||
"node-opcua-binary-stream": "2.77.0", | ||
"node-opcua-extension-object": "2.77.0", | ||
"node-opcua-packet-analyzer": "2.77.0", | ||
"node-opcua-status-code": "2.77.0", | ||
"prettier": "^2.7.1", | ||
@@ -51,3 +51,3 @@ "should": "^13.2.3", | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "acb5ecaf1e1c71af3b63e80909d58447f3f298e7" | ||
"gitHead": "5c8d45772d786fa4ba59369dd26679353ab5482b" | ||
} |
@@ -16,6 +16,6 @@ /* istanbul ignore file */ | ||
check_schema_correctness, | ||
extract_all_fields, | ||
extractAllPossibleFields, | ||
FieldCategory, | ||
FieldType, | ||
getStructuredTypeSchema, | ||
getStandardDataTypeFactory, | ||
IStructuredTypeSchema | ||
@@ -98,3 +98,3 @@ } from "node-opcua-factory"; | ||
function get_class_TScript_filename_local(schemaName: string): string { | ||
let schema = getStructuredTypeSchema(schemaName); | ||
let schema = getStandardDataTypeFactory().getStructuredTypeSchema(schemaName); | ||
if (!schema) { | ||
@@ -715,4 +715,4 @@ schema = generatedObjectSchema[schemaName]; | ||
{ | ||
write(` public static get schema(): StructuredTypeSchema { return schema${className}; }`); | ||
const possibleFields = extract_all_fields(schema); | ||
write(` public static get schema(): IStructuredTypeSchema { return schema${className}; }`); | ||
const possibleFields = extractAllPossibleFields(schema); | ||
write_possible_fields(write, className, possibleFields); | ||
@@ -754,3 +754,3 @@ // ------------------------------------------------------------------------- | ||
write(` public get schema(): StructuredTypeSchema { return schema${className}; }`); | ||
write(` public get schema(): IStructuredTypeSchema { return schema${className}; }`); | ||
} | ||
@@ -845,3 +845,2 @@ write("}"); | ||
write(` registerClassDefinition,`); | ||
write(` getStructuredTypeSchema,`); | ||
write(` BaseUAObject,`); | ||
@@ -848,0 +847,0 @@ write(` getEnumeration`); |
@@ -23,3 +23,2 @@ /* eslint-disable max-statements */ | ||
getStandardDataTypeFactory, | ||
StructuredTypeSchema, | ||
DataTypeFactory, | ||
@@ -246,3 +245,3 @@ IStructuredTypeSchema | ||
registerClassDefinition, | ||
registerEnumeration, StructuredTypeSchema | ||
registerEnumeration, IStructuredTypeSchema | ||
} from "node-opcua-factory"; | ||
@@ -314,3 +313,3 @@ import { | ||
// make sure | ||
if (dataTypeFactory.hasStructuredType(structuredType.baseType)) { | ||
if (dataTypeFactory.hasStructureByTypeName(structuredType.baseType)) { | ||
processStructuredType(dataTypeFactory.getStructuredTypeSchema(structuredType.baseType)); | ||
@@ -337,3 +336,3 @@ } | ||
for (const structureType of [...dataTypeFactory.structuredTypesNames()].sort()) { | ||
if (!dataTypeFactory.hasStructuredType(structureType)) { | ||
if (!dataTypeFactory.hasStructureByTypeName(structureType)) { | ||
continue; | ||
@@ -340,0 +339,0 @@ } |
Sorry, the diff of this file is not supported yet
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
170448
2829
+ Addednode-opcua-assert@2.77.0(transitive)
+ Addednode-opcua-basic-types@2.77.0(transitive)
+ Addednode-opcua-binary-stream@2.77.0(transitive)
+ Addednode-opcua-buffer-utils@2.77.0(transitive)
+ Addednode-opcua-constants@2.77.0(transitive)
+ Addednode-opcua-data-model@2.77.0(transitive)
+ Addednode-opcua-date-time@2.77.0(transitive)
+ Addednode-opcua-debug@2.77.0(transitive)
+ Addednode-opcua-enum@2.77.0(transitive)
+ Addednode-opcua-extension-object@2.77.0(transitive)
+ Addednode-opcua-factory@2.77.0(transitive)
+ Addednode-opcua-guid@2.77.0(transitive)
+ Addednode-opcua-nodeid@2.77.0(transitive)
+ Addednode-opcua-schemas@2.77.0(transitive)
+ Addednode-opcua-status-code@2.77.0(transitive)
+ Addednode-opcua-utils@2.77.0(transitive)
+ Addednode-opcua-variant@2.77.0(transitive)
+ Addednode-opcua-xml2json@2.77.0(transitive)
- Removednode-opcua-assert@2.76.0(transitive)
- Removednode-opcua-basic-types@2.76.2(transitive)
- Removednode-opcua-binary-stream@2.76.2(transitive)
- Removednode-opcua-buffer-utils@2.76.2(transitive)
- Removednode-opcua-constants@2.74.0(transitive)
- Removednode-opcua-data-model@2.76.2(transitive)
- Removednode-opcua-date-time@2.76.2(transitive)
- Removednode-opcua-debug@2.76.2(transitive)
- Removednode-opcua-enum@2.76.2(transitive)
- Removednode-opcua-extension-object@2.76.2(transitive)
- Removednode-opcua-factory@2.76.2(transitive)
- Removednode-opcua-guid@2.76.2(transitive)
- Removednode-opcua-nodeid@2.76.2(transitive)
- Removednode-opcua-schemas@2.76.2(transitive)
- Removednode-opcua-status-code@2.76.2(transitive)
- Removednode-opcua-utils@2.76.0(transitive)
- Removednode-opcua-variant@2.76.2(transitive)
- Removednode-opcua-xml2json@2.76.2(transitive)
Updatednode-opcua-assert@2.77.0
Updatednode-opcua-constants@2.77.0
Updatednode-opcua-debug@2.77.0
Updatednode-opcua-factory@2.77.0
Updatednode-opcua-nodeid@2.77.0
Updatednode-opcua-schemas@2.77.0
Updatednode-opcua-utils@2.77.0