node-opcua-generator 2.113.0 → 2.114.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,15 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
35
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
36
27
  };
@@ -149,38 +140,37 @@ function writeStructuredTypeWithSchema(structuredType) {
149
140
  write(`});`);
150
141
  (0, factory_code_generator_1.writeStructuredType)(write, structuredType);
151
142
  }
152
- function generate(filename, generatedTypescriptFilename) {
153
- return __awaiter(this, void 0, void 0, function* () {
154
- const content = yield readFile(filename, "utf-8");
155
- const idProvider = {
156
- getDataTypeAndEncodingId(name) {
157
- const dataType = node_opcua_constants_1.DataTypeIds[name] || 0;
158
- const binEncoding = node_opcua_constants_1.ObjectIds[name + "_Encoding_DefaultBinary"] || 0;
159
- const xmlEncoding = node_opcua_constants_1.ObjectIds[name + "_Encoding_DefaultXml"] || 0;
160
- const jsonEncoding = node_opcua_constants_1.ObjectIds[name + "_Encoding_DefaultJson"] || 0;
161
- if (dataType === undefined) {
162
- return null;
163
- }
164
- const dataTypeNodeId = new node_opcua_nodeid_1.NodeId(node_opcua_nodeid_1.NodeId.NodeIdType.NUMERIC, dataType, 0);
165
- const binaryEncodingNodeId = new node_opcua_nodeid_1.NodeId(node_opcua_nodeid_1.NodeId.NodeIdType.NUMERIC, binEncoding, 0);
166
- const xmlEncodingNodeId = new node_opcua_nodeid_1.NodeId(node_opcua_nodeid_1.NodeId.NodeIdType.NUMERIC, xmlEncoding, 0);
167
- const jsonEncodingNodeId = new node_opcua_nodeid_1.NodeId(node_opcua_nodeid_1.NodeId.NodeIdType.NUMERIC, jsonEncoding, 0);
168
- const data = {
169
- binaryEncodingNodeId,
170
- dataTypeNodeId,
171
- jsonEncodingNodeId,
172
- xmlEncodingNodeId
173
- };
174
- // istanbul ignore next
175
- if (doDebug) {
176
- debugLog(" data=", chalk_1.default.cyan(name.padEnd(43, " ")), data.dataTypeNodeId.toString().padEnd(43, " "), data.binaryEncodingNodeId.toString().padEnd(43, " "));
177
- }
178
- return data;
143
+ async function generate(filename, generatedTypescriptFilename) {
144
+ const content = await readFile(filename, "utf-8");
145
+ const idProvider = {
146
+ getDataTypeAndEncodingId(name) {
147
+ const dataType = node_opcua_constants_1.DataTypeIds[name] || 0;
148
+ const binEncoding = node_opcua_constants_1.ObjectIds[name + "_Encoding_DefaultBinary"] || 0;
149
+ const xmlEncoding = node_opcua_constants_1.ObjectIds[name + "_Encoding_DefaultXml"] || 0;
150
+ const jsonEncoding = node_opcua_constants_1.ObjectIds[name + "_Encoding_DefaultJson"] || 0;
151
+ if (dataType === undefined) {
152
+ return null;
179
153
  }
180
- };
181
- const dataTypeFactory = new node_opcua_factory_1.DataTypeFactory([(0, node_opcua_factory_1.getStandardDataTypeFactory)()]);
182
- yield (0, node_opcua_schemas_1.parseBinaryXSDAsync)(content, idProvider, dataTypeFactory);
183
- write(`// tslint:disable:no-this-assignment
154
+ const dataTypeNodeId = new node_opcua_nodeid_1.NodeId(node_opcua_nodeid_1.NodeId.NodeIdType.NUMERIC, dataType, 0);
155
+ const binaryEncodingNodeId = new node_opcua_nodeid_1.NodeId(node_opcua_nodeid_1.NodeId.NodeIdType.NUMERIC, binEncoding, 0);
156
+ const xmlEncodingNodeId = new node_opcua_nodeid_1.NodeId(node_opcua_nodeid_1.NodeId.NodeIdType.NUMERIC, xmlEncoding, 0);
157
+ const jsonEncodingNodeId = new node_opcua_nodeid_1.NodeId(node_opcua_nodeid_1.NodeId.NodeIdType.NUMERIC, jsonEncoding, 0);
158
+ const data = {
159
+ binaryEncodingNodeId,
160
+ dataTypeNodeId,
161
+ jsonEncodingNodeId,
162
+ xmlEncodingNodeId
163
+ };
164
+ // istanbul ignore next
165
+ if (doDebug) {
166
+ debugLog(" data=", chalk_1.default.cyan(name.padEnd(43, " ")), data.dataTypeNodeId.toString().padEnd(43, " "), data.binaryEncodingNodeId.toString().padEnd(43, " "));
167
+ }
168
+ return data;
169
+ }
170
+ };
171
+ const dataTypeFactory = new node_opcua_factory_1.DataTypeFactory([(0, node_opcua_factory_1.getStandardDataTypeFactory)()]);
172
+ await (0, node_opcua_schemas_1.parseBinaryXSDAsync)(content, idProvider, dataTypeFactory);
173
+ write(`// tslint:disable:no-this-assignment
184
174
  // tslint:disable:max-classes-per-file
185
175
  // tslint:disable:no-empty-interface
186
176
  // tslint:disable:no-trailing-whitespace
@@ -260,87 +250,86 @@ import {
260
250
  decodeVariant, encodeVariant, Variant, VariantLike,
261
251
  VariantOptions
262
252
  } from "node-opcua-variant";`);
263
- write(``);
264
- // write(`export class DataTypeDefinition extends BaseUAObject {`);
265
- // write(` constructor(options: any) {`);
266
- // write(` options = options; // do not remove`);
267
- // write(` super();`);
268
- // write(` }`);
269
- // write(`}`);
270
- // write(``);
271
- const alreadyDone = {};
272
- /* tslint:disable:no-string-literal */
273
- alreadyDone["ExtensionObject"] = true;
274
- alreadyDone["NodeId"] = true;
275
- alreadyDone["ExpandedNodeId"] = true;
276
- alreadyDone["Variant"] = true;
277
- alreadyDone["XmlElement"] = true;
278
- alreadyDone["NodeIdType"] = true;
279
- alreadyDone["TwoByteNodeId"] = true;
280
- alreadyDone["FourByteNodeId"] = true;
281
- alreadyDone["NumericNodeId"] = true;
282
- alreadyDone["StringNodeId"] = true;
283
- alreadyDone["GuidNodeId"] = true;
284
- alreadyDone["ByteStringNodeId"] = true;
285
- alreadyDone["DiagnosticInfo"] = true;
286
- alreadyDone["Variant"] = true;
287
- alreadyDone["DataValue"] = true;
288
- alreadyDone["LocalizedText"] = true;
289
- alreadyDone["QualifiedName"] = true;
290
- alreadyDone["BrowseDirection"] = true;
291
- alreadyDone["TimestampsToReturn"] = true;
292
- function processEnumeratedType(enumerationSchema) {
293
- if (alreadyDone[enumerationSchema.name]) {
294
- return;
295
- }
296
- alreadyDone[enumerationSchema.name] = enumerationSchema;
297
- writeEnumeratedType(enumerationSchema);
253
+ write(``);
254
+ // write(`export class DataTypeDefinition extends BaseUAObject {`);
255
+ // write(` constructor(options: any) {`);
256
+ // write(` options = options; // do not remove`);
257
+ // write(` super();`);
258
+ // write(` }`);
259
+ // write(`}`);
260
+ // write(``);
261
+ const alreadyDone = {};
262
+ /* tslint:disable:no-string-literal */
263
+ alreadyDone["ExtensionObject"] = true;
264
+ alreadyDone["NodeId"] = true;
265
+ alreadyDone["ExpandedNodeId"] = true;
266
+ alreadyDone["Variant"] = true;
267
+ alreadyDone["XmlElement"] = true;
268
+ alreadyDone["NodeIdType"] = true;
269
+ alreadyDone["TwoByteNodeId"] = true;
270
+ alreadyDone["FourByteNodeId"] = true;
271
+ alreadyDone["NumericNodeId"] = true;
272
+ alreadyDone["StringNodeId"] = true;
273
+ alreadyDone["GuidNodeId"] = true;
274
+ alreadyDone["ByteStringNodeId"] = true;
275
+ alreadyDone["DiagnosticInfo"] = true;
276
+ alreadyDone["Variant"] = true;
277
+ alreadyDone["DataValue"] = true;
278
+ alreadyDone["LocalizedText"] = true;
279
+ alreadyDone["QualifiedName"] = true;
280
+ alreadyDone["BrowseDirection"] = true;
281
+ alreadyDone["TimestampsToReturn"] = true;
282
+ function processEnumeratedType(enumerationSchema) {
283
+ if (alreadyDone[enumerationSchema.name]) {
284
+ return;
298
285
  }
299
- function processStructuredType(structuredType) {
300
- if (alreadyDone[structuredType.name]) {
301
- return;
302
- }
303
- alreadyDone[structuredType.name] = structuredType;
304
- // make sure
305
- if (dataTypeFactory.hasStructureByTypeName(structuredType.baseType)) {
306
- processStructuredType(dataTypeFactory.getStructuredTypeSchema(structuredType.baseType));
286
+ alreadyDone[enumerationSchema.name] = enumerationSchema;
287
+ writeEnumeratedType(enumerationSchema);
288
+ }
289
+ function processStructuredType(structuredType) {
290
+ if (alreadyDone[structuredType.name]) {
291
+ return;
292
+ }
293
+ alreadyDone[structuredType.name] = structuredType;
294
+ // make sure
295
+ if (dataTypeFactory.hasStructureByTypeName(structuredType.baseType)) {
296
+ processStructuredType(dataTypeFactory.getStructuredTypeSchema(structuredType.baseType));
297
+ }
298
+ for (const field of structuredType.fields) {
299
+ if (field.category === node_opcua_factory_1.FieldCategory.complex) {
300
+ const fieldSchema = dataTypeFactory.getStructuredTypeSchema(field.fieldType);
301
+ processStructuredType(fieldSchema);
307
302
  }
308
- for (const field of structuredType.fields) {
309
- if (field.category === node_opcua_factory_1.FieldCategory.complex) {
310
- const fieldSchema = dataTypeFactory.getStructuredTypeSchema(field.fieldType);
311
- processStructuredType(fieldSchema);
312
- }
313
- if (field.category === node_opcua_factory_1.FieldCategory.enumeration) {
314
- const fieldSchema = dataTypeFactory.getEnumeration(field.fieldType);
315
- processEnumeratedType(fieldSchema);
316
- }
303
+ if (field.category === node_opcua_factory_1.FieldCategory.enumeration) {
304
+ const fieldSchema = dataTypeFactory.getEnumeration(field.fieldType);
305
+ processEnumeratedType(fieldSchema);
317
306
  }
318
- writeStructuredTypeWithSchema(structuredType);
319
307
  }
320
- //xx processStructuredType(dataTypeFactory.getStructuredTypeSchema("LocalizedText"));
321
- processStructuredType(dataTypeFactory.getStructuredTypeSchema("AxisInformation"));
322
- // processStructuredType(dataTypeFactory.getStructuredTypeSchema("DiagnosticInfo"));
323
- processStructuredType(dataTypeFactory.getStructuredTypeSchema("SimpleAttributeOperand"));
324
- for (const structureType of [...dataTypeFactory.structuredTypesNames()].sort()) {
325
- if (!dataTypeFactory.hasStructureByTypeName(structureType)) {
326
- continue;
327
- }
328
- processStructuredType(dataTypeFactory.getStructuredTypeSchema(structureType));
329
- // if (++i > 250) { break; }
308
+ writeStructuredTypeWithSchema(structuredType);
309
+ }
310
+ //xx processStructuredType(dataTypeFactory.getStructuredTypeSchema("LocalizedText"));
311
+ processStructuredType(dataTypeFactory.getStructuredTypeSchema("AxisInformation"));
312
+ // processStructuredType(dataTypeFactory.getStructuredTypeSchema("DiagnosticInfo"));
313
+ processStructuredType(dataTypeFactory.getStructuredTypeSchema("SimpleAttributeOperand"));
314
+ for (const structureType of [...dataTypeFactory.structuredTypesNames()].sort()) {
315
+ if (!dataTypeFactory.hasStructureByTypeName(structureType)) {
316
+ continue;
330
317
  }
331
- write(``);
332
- f.saveFormat(generatedTypescriptFilename, (code) => {
333
- return code;
334
- /*
335
- const options: prettier.Options = {
336
- bracketSpacing: true,
337
- insertPragma: true,
338
- parser: "typescript",
339
- printWidth: 120
340
- };
341
- return prettier.format(code, options).replace("\n", os.EOL);
342
- */
343
- });
318
+ processStructuredType(dataTypeFactory.getStructuredTypeSchema(structureType));
319
+ // if (++i > 250) { break; }
320
+ }
321
+ write(``);
322
+ f.saveFormat(generatedTypescriptFilename, (code) => {
323
+ return code;
324
+ /*
325
+ const options: prettier.Options = {
326
+ bracketSpacing: true,
327
+ insertPragma: true,
328
+ parser: "typescript",
329
+ printWidth: 120
330
+ };
331
+ return prettier.format(code, options).replace("\n", os.EOL);
332
+ */
344
333
  });
345
334
  }
346
335
  exports.generate = generate;
@@ -1 +1 @@
1
- {"version":3,"file":"generate_extension_object_code.js","sourceRoot":"","sources":["../source/generate_extension_object_code.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAmC;AACnC,0BAA0B;AAC1B;;GAEG;AACH,iCAAiC;AACjC,uCAAuC;AACvC,EAAE;AACF,uCAAyB;AACzB,kDAA0B;A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WAAW,GAAG,eAAe,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,CAAE,CAAC;oBACrE,qBAAqB,CAAC,WAAW,CAAC,CAAC;iBACtC;aACJ;YACD,6BAA6B,CAAC,cAAc,CAAC,CAAC;QAClD,CAAC;QAED,qFAAqF;QACrF,qBAAqB,CAAC,eAAe,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,CAAC,CAAC;QAClF,2FAA2F;QAC3F,qBAAqB,CAAC,eAAe,CAAC,uBAAuB,CAAC,wBAAwB,CAAC,CAAC,CAAC;QAEzF,KAAK,MAAM,aAAa,IAAI,CAAC,GAAG,eAAe,CAAC,oBAAoB,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE;YAC5E,IAAI,CAAC,eAAe,CAAC,sBAAsB,CAAC,aAAa,CAAC,EAAE;gBACxD,SAAS;aACZ;YACD,qBAAqB,CAAC,eAAe,CAAC,uBAAuB,CAAC,aAAa,CAAC,CAAC,CAAC;YAC9E,4BAA4B;SAC/B;QAED,KAAK,CAAC,EAAE,CAAC,CAAC;QACV,CAAC,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAC,IAAI,EAAE,EAAE;YAC/C,OAAO,IAAI,CAAC;YACZ;;;;;;;;kBAQM;QACV,CAAC,CAAC,CAAC;IACP,CAAC;CAAA;AArND,4BAqNC"}
1
+ {"version":3,"file":"generate_extension_object_code.js","sourceRoot":"","sources":["../source/generate_extension_object_code.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAmC;AACnC,0BAA0B;AAC1B;;GAEG;AACH,iCAAiC;AACjC,uCAAuC;AACvC,EAAE;AACF,uCAAyB;AACzB,kDAA0B;AAC1B,2DAA2D;AAC3D,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC;AAEjC,wCAAwC;AAExC,yDAA2C;AAC3C,+DAA8D;AAC9D,uDAAiE;AACjE,2DAM4B;AAC5B,yDAA2C;AAC3C,2DAA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Ae,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAClF,2FAA2F;IAC3F,qBAAqB,CAAC,eAAe,CAAC,uBAAuB,CAAC,wBAAwB,CAAC,CAAC,CAAC;IAEzF,KAAK,MAAM,aAAa,IAAI,CAAC,GAAG,eAAe,CAAC,oBAAoB,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE;QAC5E,IAAI,CAAC,eAAe,CAAC,sBAAsB,CAAC,aAAa,CAAC,EAAE;YACxD,SAAS;SACZ;QACD,qBAAqB,CAAC,eAAe,CAAC,uBAAuB,CAAC,aAAa,CAAC,CAAC,CAAC;QAC9E,4BAA4B;KAC/B;IAED,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,CAAC,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAC,IAAI,EAAE,EAAE;QAC/C,OAAO,IAAI,CAAC;QACZ;;;;;;;;cAQM;IACV,CAAC,CAAC,CAAC;AACP,CAAC;AArND,4BAqNC"}
package/dist/generator.js CHANGED
@@ -22,15 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
25
  Object.defineProperty(exports, "__esModule", { value: true });
35
26
  exports.unregisterObject = exports.registerObject = exports.generateTypeScriptCodeFromSchema = exports.generateCode = exports.verbose = void 0;
36
27
  /* istanbul ignore file */
@@ -97,91 +88,85 @@ function get_caller_source_filename() {
97
88
  const schemaFile = m[1];
98
89
  return schemaFile;
99
90
  }
100
- function generateCode(schemaName, localSchemaFile, generatedCodeFolder) {
101
- return __awaiter(this, void 0, void 0, function* () {
102
- const schemaTypescriptFile = schemaName + "_Schema.ts";
103
- const currentFolder = process.cwd();
104
- //
105
- const localSchemaFileExists = fs.existsSync(localSchemaFile);
106
- if (!localSchemaFileExists) {
107
- throw new Error(`Cannot find source file for schema ${schemaTypescriptFile}`);
108
- }
109
- if (!generatedCodeFolder) {
110
- generatedCodeFolder = path.join(currentFolder, "_generated_");
111
- }
112
- const generatedCodeFolderExists = fs.existsSync(generatedCodeFolder);
113
- if (!generatedCodeFolderExists) {
114
- yield mkdir(generatedCodeFolder);
91
+ async function generateCode(schemaName, localSchemaFile, generatedCodeFolder) {
92
+ const schemaTypescriptFile = schemaName + "_Schema.ts";
93
+ const currentFolder = process.cwd();
94
+ //
95
+ const localSchemaFileExists = fs.existsSync(localSchemaFile);
96
+ if (!localSchemaFileExists) {
97
+ throw new Error(`Cannot find source file for schema ${schemaTypescriptFile}`);
98
+ }
99
+ if (!generatedCodeFolder) {
100
+ generatedCodeFolder = path.join(currentFolder, "_generated_");
101
+ }
102
+ const generatedCodeFolderExists = fs.existsSync(generatedCodeFolder);
103
+ if (!generatedCodeFolderExists) {
104
+ await mkdir(generatedCodeFolder);
105
+ }
106
+ const generatedTypescriptSource = path.join(generatedCodeFolder, "_" + schemaName + ".ts");
107
+ const generatedSourceExists = fs.existsSync(generatedTypescriptSource);
108
+ let schemaFileIsNewer = false;
109
+ let codeGeneratorIsNewer = true;
110
+ if (generatedSourceExists) {
111
+ const generatedSourceMtime = new Date(fs.statSync(generatedTypescriptSource).mtime).getTime();
112
+ const schemaFileMtime = new Date(fs.statSync(localSchemaFile).mtime).getTime();
113
+ schemaFileIsNewer = generatedSourceMtime <= schemaFileMtime;
114
+ let codeGeneratorScript = path.join(__dirname, "factory_code_generator.ts");
115
+ if (!fs.existsSync(codeGeneratorScript)) {
116
+ codeGeneratorScript = path.join(__dirname, "factory_code_generator.js");
115
117
  }
116
- const generatedTypescriptSource = path.join(generatedCodeFolder, "_" + schemaName + ".ts");
117
- const generatedSourceExists = fs.existsSync(generatedTypescriptSource);
118
- let schemaFileIsNewer = false;
119
- let codeGeneratorIsNewer = true;
120
- if (generatedSourceExists) {
121
- const generatedSourceMtime = new Date(fs.statSync(generatedTypescriptSource).mtime).getTime();
122
- const schemaFileMtime = new Date(fs.statSync(localSchemaFile).mtime).getTime();
123
- schemaFileIsNewer = generatedSourceMtime <= schemaFileMtime;
124
- let codeGeneratorScript = path.join(__dirname, "factory_code_generator.ts");
125
- if (!fs.existsSync(codeGeneratorScript)) {
126
- codeGeneratorScript = path.join(__dirname, "factory_code_generator.js");
127
- }
128
- (0, node_opcua_assert_1.assert)(fs.existsSync(codeGeneratorScript), "cannot get code factory_code_generator" + codeGeneratorScript);
129
- const codeGeneratorScriptMtime = new Date(fs.statSync(codeGeneratorScript).mtime).getTime();
130
- codeGeneratorIsNewer = generatedSourceMtime <= codeGeneratorScriptMtime;
118
+ (0, node_opcua_assert_1.assert)(fs.existsSync(codeGeneratorScript), "cannot get code factory_code_generator" + codeGeneratorScript);
119
+ const codeGeneratorScriptMtime = new Date(fs.statSync(codeGeneratorScript).mtime).getTime();
120
+ codeGeneratorIsNewer = generatedSourceMtime <= codeGeneratorScriptMtime;
121
+ }
122
+ const generatedSourceIsOutdated = !generatedSourceExists || codeGeneratorIsNewer || schemaFileIsNewer;
123
+ if (generatedSourceIsOutdated) {
124
+ const module = await Promise.resolve(`${localSchemaFile}`).then(s => __importStar(require(s)));
125
+ const schema = module[schemaName + "_Schema"];
126
+ if (!schema) {
127
+ throw new Error(`module must export a Schema with name ${schemaName}_Schema in ${generatedTypescriptSource}`);
131
128
  }
132
- const generatedSourceIsOutdated = !generatedSourceExists || codeGeneratorIsNewer || schemaFileIsNewer;
133
- if (generatedSourceIsOutdated) {
134
- const module = yield Promise.resolve(`${localSchemaFile}`).then(s => __importStar(require(s)));
135
- const schema = module[schemaName + "_Schema"];
136
- if (!schema) {
137
- throw new Error(`module must export a Schema with name ${schemaName}_Schema in ${generatedTypescriptSource}`);
138
- }
139
- debugLog(" generated_source_is_outdated ", schemaName, " to ", generatedTypescriptSource);
140
- if (exports.verbose) {
141
- console.log(" generating ", schemaName, " in ", generatedTypescriptSource);
142
- }
143
- const localSchemaFile1 = path.join("../schemas", schemaName + "_schema");
144
- (0, factory_code_generator_1.produce_TScript_code)(schema, localSchemaFile1, generatedTypescriptSource);
129
+ debugLog(" generated_source_is_outdated ", schemaName, " to ", generatedTypescriptSource);
130
+ if (exports.verbose) {
131
+ console.log(" generating ", schemaName, " in ", generatedTypescriptSource);
145
132
  }
146
- });
133
+ const localSchemaFile1 = path.join("../schemas", schemaName + "_schema");
134
+ (0, factory_code_generator_1.produce_TScript_code)(schema, localSchemaFile1, generatedTypescriptSource);
135
+ }
147
136
  }
148
137
  exports.generateCode = generateCode;
149
- function generateTypeScriptCodeFromSchema(schemaName) {
150
- return __awaiter(this, void 0, void 0, function* () {
151
- const currentFolder = process.cwd();
152
- const schemaFilename = path.join(currentFolder, "schemas", schemaName + "_schema.ts");
153
- const generatedCodeFolder = path.join(process.cwd(), "_generated_");
154
- yield generateCode(schemaName, schemaFilename, generatedCodeFolder);
155
- });
138
+ async function generateTypeScriptCodeFromSchema(schemaName) {
139
+ const currentFolder = process.cwd();
140
+ const schemaFilename = path.join(currentFolder, "schemas", schemaName + "_schema.ts");
141
+ const generatedCodeFolder = path.join(process.cwd(), "_generated_");
142
+ await generateCode(schemaName, schemaFilename, generatedCodeFolder);
156
143
  }
157
144
  exports.generateTypeScriptCodeFromSchema = generateTypeScriptCodeFromSchema;
158
- function registerObject(schema, generateCodeFolder) {
159
- return __awaiter(this, void 0, void 0, function* () {
160
- if (!schema.split) {
161
- console.log("error !", schema);
162
- // xx process.exit(1);
163
- }
164
- // we expect <schema>|<hint>
165
- const hintSchema = schema.split("|");
166
- if (hintSchema.length === 1) {
167
- // no hint provided
168
- const callerFolder = get_caller_source_filename();
169
- const defaultHint = path.join(path.dirname(callerFolder), "schemas");
170
- hintSchema.unshift(defaultHint);
171
- generateCodeFolder = generateCodeFolder ? generateCodeFolder : path.join(path.dirname(callerFolder), "_generated_");
172
- }
173
- const folderHint = hintSchema[0];
174
- schema = hintSchema[1];
175
- const schemaName = schema + "_Schema";
176
- const schemaFile = path.join(folderHint, schema + "_schema.ts");
177
- const module = yield Promise.resolve(`${schemaFile}`).then(s => __importStar(require(s)));
178
- if (!module) {
179
- throw new Error("cannot find " + schemaFile);
180
- }
181
- const schemaObj = module[schemaName];
182
- yield generateCode(schemaName, schemaFile, generateCodeFolder);
183
- return null;
184
- });
145
+ async function registerObject(schema, generateCodeFolder) {
146
+ if (!schema.split) {
147
+ console.log("error !", schema);
148
+ // xx process.exit(1);
149
+ }
150
+ // we expect <schema>|<hint>
151
+ const hintSchema = schema.split("|");
152
+ if (hintSchema.length === 1) {
153
+ // no hint provided
154
+ const callerFolder = get_caller_source_filename();
155
+ const defaultHint = path.join(path.dirname(callerFolder), "schemas");
156
+ hintSchema.unshift(defaultHint);
157
+ generateCodeFolder = generateCodeFolder ? generateCodeFolder : path.join(path.dirname(callerFolder), "_generated_");
158
+ }
159
+ const folderHint = hintSchema[0];
160
+ schema = hintSchema[1];
161
+ const schemaName = schema + "_Schema";
162
+ const schemaFile = path.join(folderHint, schema + "_schema.ts");
163
+ const module = await Promise.resolve(`${schemaFile}`).then(s => __importStar(require(s)));
164
+ if (!module) {
165
+ throw new Error("cannot find " + schemaFile);
166
+ }
167
+ const schemaObj = module[schemaName];
168
+ await generateCode(schemaName, schemaFile, generateCodeFolder);
169
+ return null;
185
170
  }
186
171
  exports.registerObject = registerObject;
187
172
  function unregisterObject(schema, folder) {
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../source/generator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0BAA0B;AAC1B;;GAEG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CAAC,CAAC,CAAC,CAAC;IAEvB,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;IACtC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY,CAAC,CAAC;IAChE,MAAM,MAAM,GAAG,yBAAa,UAAU,uCAAC,CAAC;IACxC,IAAI,CAAC,MAAM,EAAE;QACT,MAAM,IAAI,KAAK,CAAC,cAAc,GAAG,UAAU,CAAC,CAAC;KAChD;IACD,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAErC,MAAM,YAAY,CAAC,UAAU,EAAE,UAAU,EAAE,kBAAkB,CAAC,CAAC;IAE/D,OAAO,IAAI,CAAC;AAChB,CAAC;AA9BD,wCA8BC;AAED,SAAgB,gBAAgB,CAAC,MAAwB,EAAE,MAAc;IACrE,MAAM,wBAAwB,GAAG,IAAA,mDAA0B,EAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACjF,IAAI,EAAE,CAAC,UAAU,CAAC,wBAAwB,CAAC,EAAE;QACzC,EAAE,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC;QACxC,IAAA,0BAAM,EAAC,CAAC,EAAE,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC,CAAC;KACpD;AACL,CAAC;AAND,4CAMC"}
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  /* istanbul ignore file */
13
4
  /**
@@ -16,11 +7,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
7
  // tslint:disable:no-console
17
8
  const generator_1 = require("./generator");
18
9
  console.log(process.argv);
19
- function main() {
20
- return __awaiter(this, void 0, void 0, function* () {
21
- const className = "LocalizedText";
22
- (0, generator_1.generateTypeScriptCodeFromSchema)(className);
23
- });
10
+ async function main() {
11
+ const className = "LocalizedText";
12
+ (0, generator_1.generateTypeScriptCodeFromSchema)(className);
24
13
  }
25
14
  main().then().catch();
26
15
  //# sourceMappingURL=opcua_code_generator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"opcua_code_generator.js","sourceRoot":"","sources":["../source/opcua_code_generator.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,0BAA0B;AAC1B;;GAEG;AACH,4BAA4B;AAC5B,2CAA+D;AAE/D,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE1B,SAAe,IAAI;;QACf,MAAM,SAAS,GAAG,eAAe,CAAC;QAClC,IAAA,4CAAgC,EAAC,SAAS,CAAC,CAAC;IAChD,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"opcua_code_generator.js","sourceRoot":"","sources":["../source/opcua_code_generator.ts"],"names":[],"mappings":";;AAAA,0BAA0B;AAC1B;;GAEG;AACH,4BAA4B;AAC5B,2CAA+D;AAE/D,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE1B,KAAK,UAAU,IAAI;IACf,MAAM,SAAS,GAAG,eAAe,CAAC;IAClC,IAAA,4CAAgC,EAAC,SAAS,CAAC,CAAC;AAChD,CAAC;AAED,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-opcua-generator",
3
- "version": "2.113.0",
3
+ "version": "2.114.0",
4
4
  "description": "pure nodejs OPCUA SDK - module generator",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -14,19 +14,19 @@
14
14
  "dependencies": {
15
15
  "chalk": "4.1.2",
16
16
  "node-opcua-assert": "2.105.0",
17
- "node-opcua-constants": "2.98.1",
18
- "node-opcua-debug": "2.113.0",
19
- "node-opcua-factory": "2.113.0",
20
- "node-opcua-nodeid": "2.113.0",
21
- "node-opcua-schemas": "2.113.0",
22
- "node-opcua-utils": "2.110.0"
17
+ "node-opcua-constants": "2.114.0",
18
+ "node-opcua-debug": "2.114.0",
19
+ "node-opcua-factory": "2.114.0",
20
+ "node-opcua-nodeid": "2.114.0",
21
+ "node-opcua-schemas": "2.114.0",
22
+ "node-opcua-utils": "2.114.0"
23
23
  },
24
24
  "devDependencies": {
25
- "node-opcua-basic-types": "2.113.0",
26
- "node-opcua-binary-stream": "2.110.0",
27
- "node-opcua-extension-object": "2.113.0",
28
- "node-opcua-packet-analyzer": "2.113.0",
29
- "node-opcua-status-code": "2.110.0",
25
+ "node-opcua-basic-types": "2.114.0",
26
+ "node-opcua-binary-stream": "2.114.0",
27
+ "node-opcua-extension-object": "2.114.0",
28
+ "node-opcua-packet-analyzer": "2.114.0",
29
+ "node-opcua-status-code": "2.114.0",
30
30
  "prettier": "^3.0.3",
31
31
  "should": "^13.2.3",
32
32
  "underscore": "^1.13.6"
@@ -46,7 +46,7 @@
46
46
  "internet of things"
47
47
  ],
48
48
  "homepage": "http://node-opcua.github.io/",
49
- "gitHead": "36db335391fedd39726990a1b37f7768da16466a",
49
+ "gitHead": "358d284a696c88e383eedac1ab75d950fb28ec35",
50
50
  "files": [
51
51
  "dist",
52
52
  "source"