node-opcua-address-space 2.128.0 → 2.130.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.
@@ -3,5 +3,4 @@ export declare const mini_nodeset = "mini.Nodeset2.xml";
3
3
  export declare const empty_nodeset = "fixture_empty_nodeset2.xml";
4
4
  export declare const get_mini_nodeset_filename: () => string;
5
5
  export declare const get_empty_nodeset_filename: () => string;
6
- export declare function getMiniAddressSpace(callback: (err: Error | null, addressSpace?: AddressSpace) => void): void;
7
6
  export declare function getMiniAddressSpace(): Promise<AddressSpace>;
@@ -15,23 +15,12 @@ const get_mini_nodeset_filename = () => (0, get_address_space_fixture_1.getAddre
15
15
  exports.get_mini_nodeset_filename = get_mini_nodeset_filename;
16
16
  const get_empty_nodeset_filename = () => (0, get_address_space_fixture_1.getAddressSpaceFixture)(exports.empty_nodeset);
17
17
  exports.get_empty_nodeset_filename = get_empty_nodeset_filename;
18
- // tslint:disable:no-var-requires
19
- // tslint:disable:max-line-length
20
- const thenify = require("thenify");
21
- function getMiniAddressSpace(...args) {
22
- const callback = args[0];
18
+ async function getMiniAddressSpace() {
23
19
  const addressSpace = __1.AddressSpace.create();
24
20
  // register namespace 1 (our namespace);
25
21
  const serverNamespace = addressSpace.registerNamespace("http://MYNAMESPACE");
26
22
  (0, node_opcua_assert_1.assert)(serverNamespace.index === 1);
27
- (0, nodeJS_1.generateAddressSpace)(addressSpace, (0, exports.get_mini_nodeset_filename)(), {}, (err) => {
28
- // istanbul ignore next
29
- if (err) {
30
- // tslint:disable:no-console
31
- console.log("err =", err);
32
- }
33
- callback(err || null, addressSpace);
34
- });
23
+ await (0, nodeJS_1.generateAddressSpace)(addressSpace, (0, exports.get_mini_nodeset_filename)(), {});
24
+ return addressSpace;
35
25
  }
36
- module.exports.getMiniAddressSpace = thenify.withCallback(module.exports.getMiniAddressSpace);
37
26
  //# sourceMappingURL=get_mini_address_space.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get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AO,CAAC,YAAY,CAAE,MAAM,CAAC,OAAe,CAAC,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"get_mini_address_space.js","sourceRoot":"","sources":["../test_helpers/get_mini_address_space.ts"],"names":[],"mappings":";;;AAgBA,kDASC;AAzBD;;GAEG;AACH,yDAA2C;AAE3C,0BAAkC;AAClC,sCAAiD;AAEjD,2EAAqE;AAExD,QAAA,YAAY,GAAG,mBAAmB,CAAC;AACnC,QAAA,aAAa,GAAG,4BAA4B,CAAC;AAEnD,MAAM,yBAAyB,GAAG,GAAW,EAAE,CAAC,IAAA,kDAAsB,EAAC,oBAAY,CAAC,CAAC;AAA/E,QAAA,yBAAyB,6BAAsD;AACrF,MAAM,0BAA0B,GAAG,GAAW,EAAE,CAAC,IAAA,kDAAsB,EAAC,qBAAa,CAAC,CAAC;AAAjF,QAAA,0BAA0B,8BAAuD;AAEvF,KAAK,UAAU,mBAAmB;IACrC,MAAM,YAAY,GAAG,gBAAY,CAAC,MAAM,EAAE,CAAC;IAE3C,wCAAwC;IACxC,MAAM,eAAe,GAAG,YAAY,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IAC7E,IAAA,0BAAM,EAAC,eAAe,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;IAEpC,MAAM,IAAA,6BAAoB,EAAC,YAAY,EAAE,IAAA,iCAAyB,GAAE,EAAE,EAAE,CAAC,CAAC;IAC1E,OAAO,YAAY,CAAC;AACxB,CAAC"}
@@ -1,6 +1,4 @@
1
1
  import { IAddressSpace } from "node-opcua-address-space-base";
2
2
  import { NodeSetLoaderOptions } from "../source/interfaces/nodeset_loader_options";
3
3
  export declare function readNodeSet2XmlFile(xmlFile: string): Promise<string>;
4
- export declare function generateAddressSpace(addressSpace: IAddressSpace, xmlFiles: string | string[], callback: (err?: Error) => void): void;
5
- export declare function generateAddressSpace(addressSpace: IAddressSpace, xmlFiles: string | string[], options: NodeSetLoaderOptions | undefined, callback: (err?: Error) => void): void;
6
4
  export declare function generateAddressSpace(addressSpace: IAddressSpace, xmlFiles: string | string[], options?: NodeSetLoaderOptions): Promise<void>;
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.readNodeSet2XmlFile = readNodeSet2XmlFile;
7
7
  exports.generateAddressSpace = generateAddressSpace;
8
8
  const fs_1 = __importDefault(require("fs"));
9
- const util_1 = require("util");
10
9
  const node_opcua_debug_1 = require("node-opcua-debug");
11
10
  const __1 = require("..");
12
11
  const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
@@ -23,22 +22,7 @@ async function readNodeSet2XmlFile(xmlFile) {
23
22
  const xmlData = await fs_1.default.promises.readFile(xmlFile, "utf-8");
24
23
  return xmlData;
25
24
  }
26
- function generateAddressSpace(...args) {
27
- const addressSpace = args[0];
28
- const xmlFiles = args[1];
29
- if (args.length === 4) {
30
- const options = args[2];
31
- const callback = args[3];
32
- (0, util_1.callbackify)(__1.generateAddressSpaceRaw)(addressSpace, xmlFiles, readNodeSet2XmlFile, options || {}, callback);
33
- }
34
- else {
35
- const options = {};
36
- const callback = args[2];
37
- (0, util_1.callbackify)(__1.generateAddressSpaceRaw)(addressSpace, xmlFiles, readNodeSet2XmlFile, options, callback);
38
- }
25
+ async function generateAddressSpace(addressSpace, xmlFiles, options) {
26
+ await (0, __1.generateAddressSpaceRaw)(addressSpace, xmlFiles, readNodeSet2XmlFile, options || {});
39
27
  }
40
- // tslint:disable:no-var-requires
41
- // tslint:disable:max-line-length
42
- const thenify = require("thenify");
43
- module.exports.generateAddressSpace = thenify.withCallback(module.exports.generateAddressSpace);
44
28
  //# sourceMappingURL=generate_address_space.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate_address_space.js","sourceRoot":"","sources":["../source_nodejs/generate_address_space.ts"],"names":[],"mappings":";;;;;AAaA,kDAUC;AAiBD,oDAcC;AAtDD,4CAAoB;AACpB,+BAAmC;AAEnC,uDAAgF;AAGhF,0BAA6C;AAG7C,MAAM,O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AAmB,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;AAC9F,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-opcua-address-space",
3
- "version": "2.128.0",
3
+ "version": "2.130.0",
4
4
  "description": "pure nodejs OPCUA SDK - module address-space",
5
5
  "main": "./dist/src/index_current.js",
6
6
  "types": "./dist/source/index.d.ts",
@@ -16,41 +16,41 @@
16
16
  "c": "mocha --version"
17
17
  },
18
18
  "dependencies": {
19
- "@types/lodash": "4.17.6",
19
+ "@types/lodash": "4.17.7",
20
20
  "@types/semver": "^7.5.8",
21
21
  "async": "^3.2.5",
22
22
  "chalk": "4.1.2",
23
23
  "dequeue": "^1.0.5",
24
24
  "lodash": "4.17.21",
25
- "node-opcua-address-space-base": "2.128.0",
25
+ "node-opcua-address-space-base": "2.129.0",
26
26
  "node-opcua-assert": "2.120.0",
27
27
  "node-opcua-basic-types": "2.128.0",
28
28
  "node-opcua-binary-stream": "2.128.0",
29
- "node-opcua-client-dynamic-extension-object": "2.128.0",
29
+ "node-opcua-client-dynamic-extension-object": "2.130.0",
30
30
  "node-opcua-constants": "2.125.0",
31
- "node-opcua-crypto": "4.8.0",
32
- "node-opcua-data-access": "2.128.0",
31
+ "node-opcua-crypto": "4.9.2",
32
+ "node-opcua-data-access": "2.129.0",
33
33
  "node-opcua-data-model": "2.128.0",
34
- "node-opcua-data-value": "2.128.0",
34
+ "node-opcua-data-value": "2.129.0",
35
35
  "node-opcua-date-time": "2.128.0",
36
36
  "node-opcua-debug": "2.128.0",
37
37
  "node-opcua-enum": "2.128.0",
38
38
  "node-opcua-extension-object": "2.128.0",
39
39
  "node-opcua-factory": "2.128.0",
40
40
  "node-opcua-nodeid": "2.128.0",
41
- "node-opcua-nodeset-ua": "2.128.0",
41
+ "node-opcua-nodeset-ua": "2.129.0",
42
42
  "node-opcua-numeric-range": "2.128.0",
43
43
  "node-opcua-object-registry": "2.128.0",
44
- "node-opcua-pseudo-session": "2.128.0",
45
- "node-opcua-service-browse": "2.128.0",
46
- "node-opcua-service-call": "2.128.0",
47
- "node-opcua-service-history": "2.128.0",
48
- "node-opcua-service-translate-browse-path": "2.128.0",
49
- "node-opcua-service-write": "2.128.0",
44
+ "node-opcua-pseudo-session": "2.130.0",
45
+ "node-opcua-service-browse": "2.129.0",
46
+ "node-opcua-service-call": "2.129.0",
47
+ "node-opcua-service-history": "2.129.0",
48
+ "node-opcua-service-translate-browse-path": "2.129.0",
49
+ "node-opcua-service-write": "2.129.0",
50
50
  "node-opcua-status-code": "2.128.0",
51
- "node-opcua-types": "2.128.0",
51
+ "node-opcua-types": "2.129.0",
52
52
  "node-opcua-utils": "2.128.0",
53
- "node-opcua-variant": "2.128.0",
53
+ "node-opcua-variant": "2.129.0",
54
54
  "node-opcua-xml2json": "2.128.0",
55
55
  "semver": "^7.6.2",
56
56
  "set-prototype-of": "^1.0.0",
@@ -62,8 +62,8 @@
62
62
  "node-opcua-leak-detector": "2.128.0",
63
63
  "node-opcua-nodesets": "2.121.0",
64
64
  "node-opcua-packet-analyzer": "2.128.0",
65
- "node-opcua-service-filter": "2.128.0",
66
- "node-opcua-test-fixtures": "2.128.0",
65
+ "node-opcua-service-filter": "2.129.0",
66
+ "node-opcua-test-fixtures": "2.129.0",
67
67
  "source-map-support": "^0.5.21"
68
68
  },
69
69
  "author": "Etienne Rossignon",
@@ -81,7 +81,7 @@
81
81
  "internet of things"
82
82
  ],
83
83
  "homepage": "http://node-opcua.github.io/",
84
- "gitHead": "67a73af6b831d8651a0e66ceb295f159cab4386b",
84
+ "gitHead": "94bf9012b03dbd4325cd122ce04edfa5466875bc",
85
85
  "files": [
86
86
  "dist",
87
87
  "distHelpers",
@@ -1,5 +1,4 @@
1
1
  import fs from "fs";
2
- import { callbackify } from "util";
3
2
 
4
3
  import { checkDebugFlag, make_debugLog, make_errorLog } from "node-opcua-debug";
5
4
  import { IAddressSpace } from "node-opcua-address-space-base";
@@ -22,39 +21,12 @@ export async function readNodeSet2XmlFile(xmlFile: string): Promise<string> {
22
21
  const xmlData = await fs.promises.readFile(xmlFile, "utf-8");
23
22
  return xmlData;
24
23
  }
25
- export function generateAddressSpace(
26
- addressSpace: IAddressSpace,
27
- xmlFiles: string | string[],
28
- callback: (err?: Error) => void
29
- ): void;
30
- export function generateAddressSpace(
31
- addressSpace: IAddressSpace,
32
- xmlFiles: string | string[],
33
- options: NodeSetLoaderOptions | undefined,
34
- callback: (err?: Error) => void
35
- ): void;
36
- export function generateAddressSpace(
24
+
25
+ export async function generateAddressSpace(
37
26
  addressSpace: IAddressSpace,
38
27
  xmlFiles: string | string[],
39
28
  options?: NodeSetLoaderOptions
40
- ): Promise<void>;
41
- export function generateAddressSpace(
42
- ... args: any[]
43
- ): any {
44
- const addressSpace = args[0] as IAddressSpace;
45
- const xmlFiles = args[1] as string | string[];
46
- if (args.length === 4) {
47
- const options = args[2] as NodeSetLoaderOptions | undefined;
48
- const callback = args[3] as (err?: Error) => void;
49
- callbackify(generateAddressSpaceRaw)(addressSpace, xmlFiles, readNodeSet2XmlFile, options ||{}, callback!);
50
- } else {
51
- const options = {};
52
- const callback = args[2] as (err?: Error) => void;
53
- callbackify(generateAddressSpaceRaw)(addressSpace, xmlFiles, readNodeSet2XmlFile, options, callback!);
54
- }
29
+ ): Promise<void>
30
+ {
31
+ await generateAddressSpaceRaw(addressSpace, xmlFiles, readNodeSet2XmlFile, options || {});
55
32
  }
56
-
57
- // tslint:disable:no-var-requires
58
- // tslint:disable:max-line-length
59
- const thenify = require("thenify");
60
- (module.exports as any).generateAddressSpace = thenify.withCallback((module.exports as any).generateAddressSpace);