node-opcua-samples 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.
- package/dist/get_endpoints.js +111 -122
- package/dist/get_endpoints.js.map +1 -1
- package/dist/mini_server.js +28 -39
- package/dist/mini_server.js.map +1 -1
- package/dist/mini_server_on_port_0.js +15 -26
- package/dist/mini_server_on_port_0.js.map +1 -1
- package/dist/server_with_changing_password.js +34 -45
- package/dist/server_with_changing_password.js.map +1 -1
- package/dist/server_with_push_certificate.js +49 -60
- package/dist/server_with_push_certificate.js.map +1 -1
- package/dist/simple_client_ts.js +571 -598
- package/dist/simple_client_ts.js.map +1 -1
- package/dist/simple_findservers.js +25 -36
- package/dist/simple_findservers.js.map +1 -1
- package/dist/simple_secure_server.js +85 -96
- package/dist/simple_secure_server.js.map +1 -1
- package/dist/simple_server_with_custom_extension_objects.js +52 -63
- package/dist/simple_server_with_custom_extension_objects.js.map +1 -1
- package/dist/stressing_client.js +16 -27
- package/dist/stressing_client.js.map +1 -1
- package/dist/tiny_client.js +4 -13
- package/dist/tiny_client.js.map +1 -1
- package/package.json +14 -14
package/dist/stressing_client.js
CHANGED
|
@@ -1,38 +1,27 @@
|
|
|
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
|
// tslint:disable:no-console
|
|
13
4
|
const util_1 = require("util");
|
|
14
5
|
const node_opcua_1 = require("node-opcua");
|
|
15
6
|
const endpointUrl = "opc.tcp://localhost:26543";
|
|
16
|
-
function main() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
console.log("err", err.message);
|
|
31
|
-
}
|
|
7
|
+
async function main() {
|
|
8
|
+
let counter = 1;
|
|
9
|
+
while (true) {
|
|
10
|
+
const client = node_opcua_1.OPCUAClient.create({ endpointMustExist: false });
|
|
11
|
+
client.on("backoff", (retryCount, delay) => console.log(" backoff", retryCount, delay));
|
|
12
|
+
try {
|
|
13
|
+
await client.connect(endpointUrl);
|
|
14
|
+
const session = await client.createSession();
|
|
15
|
+
await session.close();
|
|
16
|
+
await client.disconnect();
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
if (util_1.types.isNativeError(err)) {
|
|
20
|
+
console.log("err", err.message);
|
|
32
21
|
}
|
|
33
|
-
console.log(" Connected = ", counter++);
|
|
34
22
|
}
|
|
35
|
-
|
|
23
|
+
console.log(" Connected = ", counter++);
|
|
24
|
+
}
|
|
36
25
|
}
|
|
37
26
|
main();
|
|
38
27
|
//# sourceMappingURL=stressing_client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stressing_client.js","sourceRoot":"","sources":["../bin/stressing_client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stressing_client.js","sourceRoot":"","sources":["../bin/stressing_client.ts"],"names":[],"mappings":";;AAAA,4BAA4B;AAC5B,+BAA6B;AAC7B,2CAAyC;AAEzC,MAAM,WAAW,GAAG,2BAA2B,CAAC;AAEhD,KAAK,UAAU,IAAI;IACf,IAAI,OAAO,GAAG,CAAC,CAAC;IAEhB,OAAO,IAAI,EAAE;QACT,MAAM,MAAM,GAAG,wBAAW,CAAC,MAAM,CAAC,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC,CAAC;QAChE,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,UAAkB,EAAE,KAAa,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;QAE3G,IAAI;YACA,MAAM,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YAClC,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,aAAa,EAAE,CAAC;YAC7C,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;YACtB,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;SAC7B;QAAC,OAAO,GAAG,EAAE;YACV,IAAI,YAAK,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE;gBAC1B,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;aACnC;SACJ;QAED,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,OAAO,EAAE,CAAC,CAAC;KAC3C;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/dist/tiny_client.js
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
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
|
process.env.NODEOPCUADEBUG = "CLIENT{TRACE};TRANSPORT{CHUNK-HELACK}";
|
|
13
4
|
const node_opcua_1 = require("node-opcua");
|
|
14
|
-
(() =>
|
|
5
|
+
(async () => {
|
|
15
6
|
const client = node_opcua_1.OPCUAClient.create({
|
|
16
7
|
requestedSessionTimeout: 1000,
|
|
17
8
|
transportSettings: {
|
|
@@ -26,8 +17,8 @@ const node_opcua_1 = require("node-opcua");
|
|
|
26
17
|
maxRetry: 2
|
|
27
18
|
}
|
|
28
19
|
});
|
|
29
|
-
|
|
20
|
+
await client.connect("opc.tcp://localhost:48010");
|
|
30
21
|
// await client.connect("opc.tcp://localhost:53530");
|
|
31
|
-
|
|
32
|
-
})
|
|
22
|
+
await client.disconnect();
|
|
23
|
+
})();
|
|
33
24
|
//# sourceMappingURL=tiny_client.js.map
|
package/dist/tiny_client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiny_client.js","sourceRoot":"","sources":["../bin/tiny_client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tiny_client.js","sourceRoot":"","sources":["../bin/tiny_client.ts"],"names":[],"mappings":";;AAAA,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,uCAAuC,CAAC;AACrE,2CAAyC;AAEzC,CAAC,KAAK,IAAI,EAAE;IACR,MAAM,MAAM,GAAG,wBAAW,CAAC,MAAM,CAAC;QAC9B,uBAAuB,EAAE,IAAI;QAC7B,iBAAiB,EAAE;YACf,aAAa,EAAE,CAAC;YAChB,cAAc,EAAE,CAAC,GAAG,IAAI;YACxB,iBAAiB,EAAE,CAAC,GAAG,IAAI;YAC3B,cAAc,EAAE,CAAC,GAAG,IAAI;SAC3B;QACD,kBAAkB,EAAE;YAChB,YAAY,EAAE,EAAE;YAChB,QAAQ,EAAE,GAAG;YACb,QAAQ,EAAE,CAAC;SACd;KACJ,CAAC,CAAC;IAEH,MAAM,MAAM,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAClD,qDAAqD;IAErD,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;AAC9B,CAAC,CAAC,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-samples",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.114.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module samples",
|
|
5
5
|
"bin": {
|
|
6
6
|
"simple_client": "./dist/simple_client_ts.js",
|
|
@@ -16,27 +16,27 @@
|
|
|
16
16
|
"clean": "npx rimraf certificates"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@types/bcryptjs": "^2.4.
|
|
19
|
+
"@types/bcryptjs": "^2.4.4",
|
|
20
20
|
"@types/underscore": "^1.11.9",
|
|
21
|
-
"@types/yargs": "17.0.
|
|
21
|
+
"@types/yargs": "17.0.26",
|
|
22
22
|
"bcryptjs": "^2.4.3",
|
|
23
23
|
"chalk": "4.1.2",
|
|
24
24
|
"easy-table": "^1.2.0",
|
|
25
25
|
"env-paths": "2.2.1",
|
|
26
26
|
"exit": "^0.1.2",
|
|
27
|
-
"node-opcua": "2.
|
|
28
|
-
"node-opcua-address-space": "2.
|
|
29
|
-
"node-opcua-address-space-for-conformance-testing": "2.
|
|
27
|
+
"node-opcua": "2.114.0",
|
|
28
|
+
"node-opcua-address-space": "2.114.0",
|
|
29
|
+
"node-opcua-address-space-for-conformance-testing": "2.114.0",
|
|
30
30
|
"node-opcua-assert": "2.105.0",
|
|
31
|
-
"node-opcua-client-crawler": "2.
|
|
32
|
-
"node-opcua-client-proxy": "2.
|
|
31
|
+
"node-opcua-client-crawler": "2.114.0",
|
|
32
|
+
"node-opcua-client-proxy": "2.114.0",
|
|
33
33
|
"node-opcua-crypto": "4.5.0",
|
|
34
|
-
"node-opcua-packet-analyzer": "2.
|
|
34
|
+
"node-opcua-packet-analyzer": "2.114.0",
|
|
35
35
|
"node-opcua-pki": "4.7.0",
|
|
36
|
-
"node-opcua-server-configuration": "2.
|
|
37
|
-
"node-opcua-utils": "2.
|
|
38
|
-
"node-opcua-vendor-diagnostic": "2.
|
|
39
|
-
"sprintf-js": "^1.1.
|
|
36
|
+
"node-opcua-server-configuration": "2.114.0",
|
|
37
|
+
"node-opcua-utils": "2.114.0",
|
|
38
|
+
"node-opcua-vendor-diagnostic": "2.114.0",
|
|
39
|
+
"sprintf-js": "^1.1.3",
|
|
40
40
|
"treeify": "^1.1.0",
|
|
41
41
|
"underscore": "^1.13.6",
|
|
42
42
|
"yargs": "15.4.1"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"internet of things"
|
|
57
57
|
],
|
|
58
58
|
"homepage": "http://node-opcua.github.io/",
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "358d284a696c88e383eedac1ab75d950fb28ec35",
|
|
60
60
|
"files": [
|
|
61
61
|
"dist"
|
|
62
62
|
]
|