node-opcua-server-configuration 2.130.0 → 2.132.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/README.md +39 -4
- package/package.json +20 -20
package/README.md
CHANGED
|
@@ -1,12 +1,47 @@
|
|
|
1
|
-
node-opcua-server-configuration
|
|
2
|
-
===============================
|
|
3
|
-
|
|
4
|
-
an implementation of a OPC UA stack fully written in javascript and nodejs
|
|
1
|
+
# node-opcua-server-configuration
|
|
5
2
|
|
|
3
|
+
an implementation of an OPC UA stack fully written in javascript and nodejs
|
|
6
4
|
|
|
7
5
|
see http://node-opcua.github.io/
|
|
8
6
|
|
|
9
7
|
an implementation of ServerConfiguration object inside node-opcua servers
|
|
10
8
|
|
|
9
|
+
```javascript
|
|
10
|
+
import { OPCUAClient, NodeId } from "node-opcua-client";
|
|
11
|
+
import { node-opcua-server-configuration } from "node-opcua-server-configuration";
|
|
12
|
+
|
|
13
|
+
const client = OPCUAClient.create({
|
|
14
|
+
securityMode: MessageSecurityMode.SignAndEncrypt,
|
|
15
|
+
securityPolicy: SecurityPolicy.Basic256Sha256,
|
|
16
|
+
});
|
|
17
|
+
await client.withSessionAsync({
|
|
18
|
+
endpointUrl: "opc.tcp://localhost:4840",
|
|
19
|
+
userIdentityToken: {
|
|
20
|
+
type: UserTokenType.UserName,
|
|
21
|
+
userName: "admin",
|
|
22
|
+
password: process.env.ADMIN_PASSWORD
|
|
23
|
+
};
|
|
24
|
+
}, async session() {
|
|
25
|
+
|
|
26
|
+
const pushCertificateSession = new ClientPushCertificateManagement(session);
|
|
27
|
+
|
|
28
|
+
// get a certificate signing request from the OPCUA server
|
|
29
|
+
const response = await pm.createSigningRequest(
|
|
30
|
+
"DefaultApplicationGroup", NodeId.nullNodeId, "CN=MyApplication");
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
// call your own CA to sign the certificate
|
|
34
|
+
const certificateFull = await produceCertificate(response.certificateSigningRequest);
|
|
11
35
|
|
|
36
|
+
// now update the certificate of the server
|
|
37
|
+
const response2 = await pushCertificateSession.updateCertificate(
|
|
38
|
+
"DefaultApplicationGroup",
|
|
39
|
+
NodeId.nullNodeId,
|
|
40
|
+
certificate,
|
|
41
|
+
issuerCertificates
|
|
42
|
+
);
|
|
43
|
+
// apply the new certificate
|
|
44
|
+
await pushCertificateSession.applyChanges();
|
|
12
45
|
|
|
46
|
+
});
|
|
47
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-server-configuration",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.132.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module server-configuration",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc -b",
|
|
@@ -14,34 +14,34 @@
|
|
|
14
14
|
"@types/bcryptjs": "^2.4.6",
|
|
15
15
|
"bcryptjs": "^2.4.3",
|
|
16
16
|
"chalk": "4.1.2",
|
|
17
|
-
"memfs": "^4.
|
|
18
|
-
"node-opcua-address-space": "2.
|
|
19
|
-
"node-opcua-address-space-base": "2.
|
|
17
|
+
"memfs": "^4.11.1",
|
|
18
|
+
"node-opcua-address-space": "2.132.0",
|
|
19
|
+
"node-opcua-address-space-base": "2.132.0",
|
|
20
20
|
"node-opcua-assert": "2.120.0",
|
|
21
|
-
"node-opcua-basic-types": "2.
|
|
21
|
+
"node-opcua-basic-types": "2.132.0",
|
|
22
22
|
"node-opcua-binary-stream": "2.128.0",
|
|
23
|
-
"node-opcua-certificate-manager": "2.
|
|
24
|
-
"node-opcua-client": "2.
|
|
25
|
-
"node-opcua-common": "2.
|
|
23
|
+
"node-opcua-certificate-manager": "2.131.0",
|
|
24
|
+
"node-opcua-client": "2.132.0",
|
|
25
|
+
"node-opcua-common": "2.132.0",
|
|
26
26
|
"node-opcua-constants": "2.125.0",
|
|
27
|
-
"node-opcua-crypto": "4.9.
|
|
28
|
-
"node-opcua-data-model": "2.
|
|
27
|
+
"node-opcua-crypto": "4.9.4",
|
|
28
|
+
"node-opcua-data-model": "2.132.0",
|
|
29
29
|
"node-opcua-debug": "2.128.0",
|
|
30
|
-
"node-opcua-file-transfer": "2.
|
|
30
|
+
"node-opcua-file-transfer": "2.132.0",
|
|
31
31
|
"node-opcua-hostname": "2.128.0",
|
|
32
32
|
"node-opcua-nodeid": "2.128.0",
|
|
33
|
-
"node-opcua-pki": "4.
|
|
34
|
-
"node-opcua-pseudo-session": "2.
|
|
35
|
-
"node-opcua-secure-channel": "2.
|
|
36
|
-
"node-opcua-server": "2.
|
|
37
|
-
"node-opcua-service-translate-browse-path": "2.
|
|
33
|
+
"node-opcua-pki": "4.13.1",
|
|
34
|
+
"node-opcua-pseudo-session": "2.132.0",
|
|
35
|
+
"node-opcua-secure-channel": "2.132.0",
|
|
36
|
+
"node-opcua-server": "2.132.0",
|
|
37
|
+
"node-opcua-service-translate-browse-path": "2.132.0",
|
|
38
38
|
"node-opcua-status-code": "2.128.0",
|
|
39
|
-
"node-opcua-types": "2.
|
|
40
|
-
"node-opcua-variant": "2.
|
|
39
|
+
"node-opcua-types": "2.132.0",
|
|
40
|
+
"node-opcua-variant": "2.132.0",
|
|
41
41
|
"rimraf": "3.0.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"node-opcua-data-value": "2.
|
|
44
|
+
"node-opcua-data-value": "2.132.0",
|
|
45
45
|
"node-opcua-leak-detector": "2.128.0",
|
|
46
46
|
"node-opcua-nodesets": "2.121.0"
|
|
47
47
|
},
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"internet of things"
|
|
61
61
|
],
|
|
62
62
|
"homepage": "http://node-opcua.github.io/",
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "5fab0f1eac0e59abf94bab9034035aec44890456",
|
|
64
64
|
"files": [
|
|
65
65
|
"dist",
|
|
66
66
|
"source"
|