node-opcua-common 2.51.0 → 2.52.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.
@@ -1,4 +1,7 @@
1
1
  /// <reference types="node" />
2
+ /**
3
+ * @module node-opcua-common
4
+ */
2
5
  import { EventEmitter } from "events";
3
6
  import { Certificate, PrivateKeyPEM } from "node-opcua-crypto";
4
7
  export interface ICertificateKeyPairProvider {
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OPCUASecureObject = void 0;
4
+ /**
5
+ * @module node-opcua-common
6
+ */
4
7
  const events_1 = require("events");
5
8
  const fs = require("fs");
6
9
  const node_opcua_assert_1 = require("node-opcua-assert");
@@ -1 +1 @@
1
- {"version":3,"file":"opcua_secure_object.js","sourceRoot":"","sources":["../source/opcua_secure_object.ts"],"names":[],"mappings":";;;AAIA,mCAAsC;AACtC,yBAAyB;AACzB,yDAA2C;AAC3C,yDAI2B;AAQ3B,SAAS,iBAAiB,CAAC,mBAA2B;IAClD,MAAM,GAAG,GAAG,IAAA,mCAAe,EAAC,mBAAmB,CAAC,CAAC;IACjD,OAAO,GAAG,CAAC;AACf,CAAC;AAED,SAAS,qBAAqB,CAAC,kBAA0B;IACrD,OAAO,IAAA,8BAAU,EAAC,kBAAkB,CAAC,CAAC;AAC1C,CAAC;AAOD;;;;;;;GAOG;AACH,MAAa,iBAAkB,SAAQ,qBAAY;IAS/C,YAAY,OAAkC;QAE1C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAE1B,IAAA,0BAAM,EAAC,OAAO,OAAO,CAAC,eAAe,KAAK,QAAQ,CAAC,CAAC;QACpD,IAAA,0BAAM,EAAC,OAAO,OAAO,CAAC,cAAc,KAAK,QAAQ,C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AW,CAAC;IAC5B,CAAC;IAEM,mBAAmB;QACtB,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;YACxB,IAAA,0BAAM,EAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,+BAA+B,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC;YACpG,IAAI,CAAC,gBAAgB,GAAG,iBAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAChE,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC7D,IAAI,CAAC,gBAAgB,GAAG,iBAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;gBAChE,MAAM,IAAI,KAAK,CAAC,iCAAiC,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC;aAC7E;SACJ;QACD,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAEM,aAAa;QAChB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACrB,IAAA,0BAAM,EAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC;YAC9F,IAAI,CAAC,aAAa,GAAG,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;SACnE;QACD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;CACJ;AAhDD,8CAgDC"}
package/package.json CHANGED
@@ -1,25 +1,25 @@
1
1
  {
2
2
  "name": "node-opcua-common",
3
- "version": "2.51.0",
3
+ "version": "2.52.0",
4
4
  "description": "pure nodejs OPCUA SDK - module -common",
5
5
  "scripts": {
6
6
  "test": "mocha",
7
7
  "clean": "node -e \"require('rimraf').sync('dist');\"",
8
8
  "build": "tsc -b",
9
- "lint": "tslint source/**/*.ts"
9
+ "lint": "eslint source/**/*.ts"
10
10
  },
11
11
  "main": "./dist/index.js",
12
12
  "types": "./dist/index.d.ts",
13
13
  "dependencies": {
14
- "node-opcua-assert": "2.51.0",
15
- "node-opcua-basic-types": "2.51.0",
14
+ "node-opcua-assert": "2.52.0",
15
+ "node-opcua-basic-types": "2.52.0",
16
16
  "node-opcua-crypto": "^1.7.4",
17
- "node-opcua-data-model": "2.51.0",
18
- "node-opcua-factory": "2.51.0",
19
- "node-opcua-nodeid": "2.51.0",
20
- "node-opcua-service-endpoints": "2.51.0",
21
- "node-opcua-service-secure-channel": "2.51.0",
22
- "node-opcua-types": "2.51.0"
17
+ "node-opcua-data-model": "2.52.0",
18
+ "node-opcua-factory": "2.52.0",
19
+ "node-opcua-nodeid": "2.52.0",
20
+ "node-opcua-service-endpoints": "2.52.0",
21
+ "node-opcua-service-secure-channel": "2.52.0",
22
+ "node-opcua-types": "2.52.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "16.7.10",
@@ -40,5 +40,5 @@
40
40
  "internet of things"
41
41
  ],
42
42
  "homepage": "http://node-opcua.github.io/",
43
- "gitHead": "75feb111daf7ec65fa0111e4fa5beb8987fd4945"
43
+ "gitHead": "3ec6296e8fd4df0e05b9d887f0b7dd20113a9ce1"
44
44
  }
@@ -1,15 +1,11 @@
1
1
  /**
2
2
  * @module node-opcua-common
3
3
  */
4
- import * as chalk from "chalk";
5
4
  import { EventEmitter } from "events";
6
5
  import * as fs from "fs";
6
+
7
7
  import { assert } from "node-opcua-assert";
8
- import {
9
- Certificate,
10
- PrivateKeyPEM, readCertificate,
11
- readKeyPem, split_der
12
- } from "node-opcua-crypto";
8
+ import { Certificate, PrivateKeyPEM, readCertificate, readKeyPem, split_der } from "node-opcua-crypto";
13
9
 
14
10
  export interface ICertificateKeyPairProvider {
15
11
  getCertificate(): Certificate;
@@ -40,7 +36,6 @@ export interface IOPCUASecureObjectOptions {
40
36
  * @constructor
41
37
  */
42
38
  export class OPCUASecureObject extends EventEmitter implements ICertificateKeyPairProvider {
43
-
44
39
  public readonly certificateFile: string;
45
40
  public readonly privateKeyFile: string;
46
41
 
@@ -49,7 +44,6 @@ export class OPCUASecureObject extends EventEmitter implements ICertificateKeyPa
49
44
  private privateKeyPEM: null | PrivateKeyPEM;
50
45
 
51
46
  constructor(options: IOPCUASecureObjectOptions) {
52
-
53
47
  super();
54
48
  this.certificate = null;
55
49
  this.certificateChain = null;
@@ -74,7 +68,7 @@ export class OPCUASecureObject extends EventEmitter implements ICertificateKeyPa
74
68
  if (!this.certificateChain) {
75
69
  assert(fs.existsSync(this.certificateFile), "Certificate file must exist :" + this.certificateFile);
76
70
  this.certificateChain = _load_certificate(this.certificateFile);
77
- if ( this.certificateChain && this.certificateChain.length ===0) {
71
+ if (this.certificateChain && this.certificateChain.length === 0) {
78
72
  this.certificateChain = _load_certificate(this.certificateFile);
79
73
  throw new Error("Invalid certificate length = 0 " + this.certificateFile);
80
74
  }
@@ -1,300 +0,0 @@
1
- 'use strict';
2
-
3
- const {
4
- Error,
5
- ObjectDefineProperty,
6
- WeakMap,
7
- } = primordials;
8
-
9
- const {
10
- tickInfo,
11
- promiseRejectEvents: {
12
- kPromiseRejectWithNoHandler,
13
- kPromiseHandlerAddedAfterReject,
14
- kPromiseResolveAfterResolved,
15
- kPromiseRejectAfterResolved
16
- },
17
- setPromiseRejectCallback
18
- } = internalBinding('task_queue');
19
-
20
- const {
21
- noSideEffectsToString,
22
- triggerUncaughtException
23
- } = internalBinding('errors');
24
-
25
- // *Must* match Environment::TickInfo::Fields in src/env.h.
26
- const kHasRejectionToWarn = 1;
27
-
28
- const maybeUnhandledPromises = new WeakMap();
29
- const pendingUnhandledRejections = [];
30
- const asyncHandledRejections = [];
31
- let lastPromiseId = 0;
32
-
33
- // --unhandled-rejections=none:
34
- // Emit 'unhandledRejection', but do not emit any warning.
35
- const kIgnoreUnhandledRejections = 0;
36
-
37
- // --unhandled-rejections=warn:
38
- // Emit 'unhandledRejection', then emit 'UnhandledPromiseRejectionWarning'.
39
- const kAlwaysWarnUnhandledRejections = 1;
40
-
41
- // --unhandled-rejections=strict:
42
- // Emit 'uncaughtException'. If it's not handled, print the error to stderr
43
- // and exit the process.
44
- // Otherwise, emit 'unhandledRejection'. If 'unhandledRejection' is not
45
- // handled, emit 'UnhandledPromiseRejectionWarning'.
46
- const kStrictUnhandledRejections = 2;
47
-
48
- // --unhandled-rejections=throw:
49
- // Emit 'unhandledRejection', if it's unhandled, emit
50
- // 'uncaughtException'. If it's not handled, print the error to stderr
51
- // and exit the process.
52
- const kThrowUnhandledRejections = 3;
53
-
54
- // --unhandled-rejections=warn-with-error-code:
55
- // Emit 'unhandledRejection', if it's unhandled, emit
56
- // 'UnhandledPromiseRejectionWarning', then set process exit code to 1.
57
-
58
- const kWarnWithErrorCodeUnhandledRejections = 4;
59
-
60
- // --unhandled-rejections is unset:
61
- // Emit 'unhandledRejection', if it's unhandled, emit
62
- // 'UnhandledPromiseRejectionWarning', then emit deprecation warning.
63
- const kDefaultUnhandledRejections = 5;
64
-
65
- let unhandledRejectionsMode;
66
-
67
- function setHasRejectionToWarn(value) {
68
- tickInfo[kHasRejectionToWarn] = value ? 1 : 0;
69
- }
70
-
71
- function hasRejectionToWarn() {
72
- return tickInfo[kHasRejectionToWarn] === 1;
73
- }
74
-
75
- function getUnhandledRejectionsMode() {
76
- const { getOptionValue } = require('internal/options');
77
- switch (getOptionValue('--unhandled-rejections')) {
78
- case 'none':
79
- return kIgnoreUnhandledRejections;
80
- case 'warn':
81
- return kAlwaysWarnUnhandledRejections;
82
- case 'strict':
83
- return kStrictUnhandledRejections;
84
- case 'throw':
85
- return kThrowUnhandledRejections;
86
- case 'warn-with-error-code':
87
- return kWarnWithErrorCodeUnhandledRejections;
88
- default:
89
- return kDefaultUnhandledRejections;
90
- }
91
- }
92
-
93
- function promiseRejectHandler(type, promise, reason) {
94
- if (unhandledRejectionsMode === undefined) {
95
- unhandledRejectionsMode = getUnhandledRejectionsMode();
96
- }
97
- switch (type) {
98
- case kPromiseRejectWithNoHandler:
99
- unhandledRejection(promise, reason);
100
- break;
101
- case kPromiseHandlerAddedAfterReject:
102
- handledRejection(promise);
103
- break;
104
- case kPromiseResolveAfterResolved:
105
- resolveError('resolve', promise, reason);
106
- break;
107
- case kPromiseRejectAfterResolved:
108
- resolveError('reject', promise, reason);
109
- break;
110
- }
111
- }
112
-
113
- function resolveError(type, promise, reason) {
114
- // We have to wrap this in a next tick. Otherwise the error could be caught by
115
- // the executed promise.
116
- process.nextTick(() => {
117
- process.emit('multipleResolves', type, promise, reason);
118
- });
119
- }
120
-
121
- function unhandledRejection(promise, reason) {
122
- maybeUnhandledPromises.set(promise, {
123
- reason,
124
- uid: ++lastPromiseId,
125
- warned: false
126
- });
127
- // This causes the promise to be referenced at least for one tick.
128
- pendingUnhandledRejections.push(promise);
129
- setHasRejectionToWarn(true);
130
- }
131
-
132
- function handledRejection(promise) {
133
- const promiseInfo = maybeUnhandledPromises.get(promise);
134
- if (promiseInfo !== undefined) {
135
- maybeUnhandledPromises.delete(promise);
136
- if (promiseInfo.warned) {
137
- const { uid } = promiseInfo;
138
- // Generate the warning object early to get a good stack trace.
139
- // eslint-disable-next-line no-restricted-syntax
140
- const warning = new Error('Promise rejection was handled ' +
141
- `asynchronously (rejection id: ${uid})`);
142
- warning.name = 'PromiseRejectionHandledWarning';
143
- warning.id = uid;
144
- asyncHandledRejections.push({ promise, warning });
145
- setHasRejectionToWarn(true);
146
- return;
147
- }
148
- }
149
- if (maybeUnhandledPromises.size === 0 && asyncHandledRejections.length === 0)
150
- setHasRejectionToWarn(false);
151
- }
152
-
153
- const unhandledRejectionErrName = 'UnhandledPromiseRejectionWarning';
154
- function emitUnhandledRejectionWarning(uid, reason) {
155
- const warning = getErrorWithoutStack(
156
- unhandledRejectionErrName,
157
- 'Unhandled promise rejection. This error originated either by ' +
158
- 'throwing inside of an async function without a catch block, ' +
159
- 'or by rejecting a promise which was not handled with .catch(). ' +
160
- 'To terminate the node process on unhandled promise ' +
161
- 'rejection, use the CLI flag `--unhandled-rejections=strict` (see ' +
162
- 'https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). ' +
163
- `(rejection id: ${uid})`
164
- );
165
- try {
166
- if (reason instanceof Error) {
167
- warning.stack = reason.stack;
168
- process.emitWarning(reason.stack, unhandledRejectionErrName);
169
- } else {
170
- process.emitWarning(
171
- noSideEffectsToString(reason), unhandledRejectionErrName);
172
- }
173
- } catch {}
174
-
175
- process.emitWarning(warning);
176
- }
177
-
178
- let deprecationWarned = false;
179
- function emitDeprecationWarning() {
180
- process.emitWarning(
181
- 'Unhandled promise rejections are deprecated. In the future, ' +
182
- 'promise rejections that are not handled will terminate the ' +
183
- 'Node.js process with a non-zero exit code.',
184
- 'DeprecationWarning', 'DEP0018');
185
- }
186
-
187
- // If this method returns true, we've executed user code or triggered
188
- // a warning to be emitted which requires the microtask and next tick
189
- // queues to be drained again.
190
- function processPromiseRejections() {
191
- let maybeScheduledTicksOrMicrotasks = asyncHandledRejections.length > 0;
192
-
193
- while (asyncHandledRejections.length > 0) {
194
- const { promise, warning } = asyncHandledRejections.shift();
195
- if (!process.emit('rejectionHandled', promise)) {
196
- process.emitWarning(warning);
197
- }
198
- }
199
-
200
- let len = pendingUnhandledRejections.length;
201
- while (len--) {
202
- const promise = pendingUnhandledRejections.shift();
203
- const promiseInfo = maybeUnhandledPromises.get(promise);
204
- if (promiseInfo === undefined) {
205
- continue;
206
- }
207
- promiseInfo.warned = true;
208
- const { reason, uid } = promiseInfo;
209
- switch (unhandledRejectionsMode) {
210
- case kStrictUnhandledRejections: {
211
- const err = reason instanceof Error ?
212
- reason : generateUnhandledRejectionError(reason);
213
- triggerUncaughtException(err, true /* fromPromise */);
214
- const handled = process.emit('unhandledRejection', reason, promise);
215
- if (!handled) emitUnhandledRejectionWarning(uid, reason);
216
- break;
217
- }
218
- case kIgnoreUnhandledRejections: {
219
- process.emit('unhandledRejection', reason, promise);
220
- break;
221
- }
222
- case kAlwaysWarnUnhandledRejections: {
223
- process.emit('unhandledRejection', reason, promise);
224
- emitUnhandledRejectionWarning(uid, reason);
225
- break;
226
- }
227
- case kThrowUnhandledRejections: {
228
- const handled = process.emit('unhandledRejection', reason, promise);
229
- if (!handled) {
230
- const err = reason instanceof Error ?
231
- reason : generateUnhandledRejectionError(reason);
232
- triggerUncaughtException(err, true /* fromPromise */);
233
- }
234
- break;
235
- }
236
- case kWarnWithErrorCodeUnhandledRejections: {
237
- const handled = process.emit('unhandledRejection', reason, promise);
238
- if (!handled) {
239
- emitUnhandledRejectionWarning(uid, reason);
240
- process.exitCode = 1;
241
- }
242
- break;
243
- }
244
- case kDefaultUnhandledRejections: {
245
- const handled = process.emit('unhandledRejection', reason, promise);
246
- if (!handled) {
247
- emitUnhandledRejectionWarning(uid, reason);
248
- if (!deprecationWarned) {
249
- emitDeprecationWarning();
250
- deprecationWarned = true;
251
- }
252
- }
253
- break;
254
- }
255
- }
256
- maybeScheduledTicksOrMicrotasks = true;
257
- }
258
- return maybeScheduledTicksOrMicrotasks ||
259
- pendingUnhandledRejections.length !== 0;
260
- }
261
-
262
- function getErrorWithoutStack(name, message) {
263
- // Reset the stack to prevent any overhead.
264
- const tmp = Error.stackTraceLimit;
265
- Error.stackTraceLimit = 0;
266
- // eslint-disable-next-line no-restricted-syntax
267
- const err = new Error(message);
268
- Error.stackTraceLimit = tmp;
269
- ObjectDefineProperty(err, 'name', {
270
- value: name,
271
- enumerable: false,
272
- writable: true,
273
- configurable: true,
274
- });
275
- return err;
276
- }
277
-
278
- function generateUnhandledRejectionError(reason) {
279
- const message =
280
- 'This error originated either by ' +
281
- 'throwing inside of an async function without a catch block, ' +
282
- 'or by rejecting a promise which was not handled with .catch().' +
283
- ' The promise rejected with the reason ' +
284
- `"${noSideEffectsToString(reason)}".`;
285
-
286
- const err = getErrorWithoutStack('UnhandledPromiseRejection', message);
287
- err.code = 'ERR_UNHANDLED_REJECTION';
288
- return err;
289
- }
290
-
291
- function listenForRejections() {
292
- setPromiseRejectCallback(promiseRejectHandler);
293
- }
294
-
295
- module.exports = {
296
- hasRejectionToWarn,
297
- setHasRejectionToWarn,
298
- listenForRejections,
299
- processPromiseRejections
300
- };