node-opcua-server 2.132.0 → 2.134.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.
Files changed (40) hide show
  1. package/dist/base_server.d.ts +0 -11
  2. package/dist/base_server.js +0 -11
  3. package/dist/base_server.js.map +1 -1
  4. package/dist/filter/extract_event_fields.d.ts +1 -1
  5. package/dist/filter/extract_event_fields.js +1 -1
  6. package/dist/monitored_item.d.ts +2 -6
  7. package/dist/monitored_item.js +2 -6
  8. package/dist/monitored_item.js.map +1 -1
  9. package/dist/opcua_server.d.ts +3 -23
  10. package/dist/opcua_server.js +8 -26
  11. package/dist/opcua_server.js.map +1 -1
  12. package/dist/register_server_manager.d.ts +0 -4
  13. package/dist/register_server_manager.js +2 -6
  14. package/dist/register_server_manager.js.map +1 -1
  15. package/dist/server_end_point.d.ts +1 -17
  16. package/dist/server_end_point.js +3 -22
  17. package/dist/server_end_point.js.map +1 -1
  18. package/dist/server_engine.d.ts +8 -24
  19. package/dist/server_engine.js +52 -58
  20. package/dist/server_engine.js.map +1 -1
  21. package/dist/server_publish_engine.d.ts +0 -1
  22. package/dist/server_publish_engine.js +0 -1
  23. package/dist/server_publish_engine.js.map +1 -1
  24. package/dist/server_session.d.ts +0 -6
  25. package/dist/server_session.js +0 -6
  26. package/dist/server_session.js.map +1 -1
  27. package/dist/server_subscription.d.ts +2 -1
  28. package/dist/server_subscription.js +2 -1
  29. package/dist/server_subscription.js.map +1 -1
  30. package/package.json +43 -43
  31. package/source/base_server.ts +0 -11
  32. package/source/filter/extract_event_fields.ts +1 -1
  33. package/source/monitored_item.ts +2 -6
  34. package/source/opcua_server.ts +3 -30
  35. package/source/register_server_manager.ts +1 -5
  36. package/source/server_end_point.ts +3 -22
  37. package/source/server_engine.ts +515 -499
  38. package/source/server_publish_engine.ts +0 -1
  39. package/source/server_session.ts +0 -6
  40. package/source/server_subscription.ts +2 -1
@@ -2,10 +2,6 @@
2
2
  /**
3
3
  * @module node-opcua-server
4
4
  */
5
- // tslint:disable:no-console
6
- // tslint:disable:max-line-length
7
- // tslint:disable:unified-signatures
8
-
9
5
  import { randomBytes } from "crypto";
10
6
  import { EventEmitter } from "events";
11
7
  import { callbackify, types } from "util";
@@ -44,7 +40,7 @@ import {
44
40
  } from "node-opcua-address-space";
45
41
  import { getDefaultCertificateManager, OPCUACertificateManager } from "node-opcua-certificate-manager";
46
42
  import { ServerState } from "node-opcua-common";
47
- import { Certificate, exploreCertificate, Nonce } from "node-opcua-crypto";
43
+ import { Certificate, exploreCertificate, Nonce } from "node-opcua-crypto/web";
48
44
  import {
49
45
  AttributeIds,
50
46
  filterDiagnosticOperationLevel,
@@ -422,12 +418,7 @@ function monitoredItem_read_and_record_value(
422
418
  }
423
419
 
424
420
  /*== private
425
- * @method monitoredItem_read_and_record_value_async
426
421
  * this method applies to Variable Values attribute
427
- * @param self
428
- * @param oldValue
429
- * @param node
430
- * @param itemToMonitor
431
422
  * @private
432
423
  */
433
424
  function monitoredItem_read_and_record_value_async(
@@ -928,11 +919,6 @@ export interface OPCUAServerOptions extends OPCUABaseServerOptions, OPCUAServerE
928
919
  * @default false
929
920
  */
930
921
  skipOwnNamespace?: boolean;
931
-
932
- /**
933
- * @private
934
- * @optional
935
- */
936
922
  transportSettings?: IServerTransportSettings;
937
923
  }
938
924
 
@@ -1303,7 +1289,6 @@ export class OPCUAServer extends OPCUABaseServer {
1303
1289
 
1304
1290
  /**
1305
1291
  * Initiate the server by starting all its endpoints
1306
- * @async
1307
1292
  */
1308
1293
  public start(): Promise<void>;
1309
1294
  public start(done: () => void): void;
@@ -1341,8 +1326,6 @@ export class OPCUAServer extends OPCUABaseServer {
1341
1326
 
1342
1327
  /**
1343
1328
  * shutdown all server endpoints
1344
- * @method shutdown
1345
- * @async
1346
1329
  * @param timeout the timeout (in ms) before the server is actually shutdown
1347
1330
  *
1348
1331
  * @example
@@ -1472,7 +1455,7 @@ export class OPCUAServer extends OPCUABaseServer {
1472
1455
 
1473
1456
  /**
1474
1457
  * create and register a new session
1475
- * @internal
1458
+ * @private
1476
1459
  */
1477
1460
  protected createSession(options: CreateSessionOption): ServerSession {
1478
1461
  /* istanbul ignore next */
@@ -1484,7 +1467,6 @@ export class OPCUAServer extends OPCUABaseServer {
1484
1467
 
1485
1468
  /**
1486
1469
  * retrieve a session by authentication token
1487
- * @internal
1488
1470
  * @private
1489
1471
  */
1490
1472
  public getSession(authenticationToken: NodeId, activeOnly?: boolean): ServerSession | null {
@@ -1496,7 +1478,7 @@ export class OPCUAServer extends OPCUABaseServer {
1496
1478
  * @param channel
1497
1479
  * @param clientCertificate
1498
1480
  * @param clientNonce
1499
- * @internal
1481
+ * @private
1500
1482
  */
1501
1483
  protected computeServerSignature(
1502
1484
  channel: ServerSecureChannelLayer,
@@ -1511,7 +1493,6 @@ export class OPCUAServer extends OPCUABaseServer {
1511
1493
  * @param session
1512
1494
  * @param channel
1513
1495
  * @param clientSignature
1514
- * @internal
1515
1496
  */
1516
1497
  protected verifyClientSignature(
1517
1498
  session: ServerSession,
@@ -2086,7 +2067,6 @@ export class OPCUAServer extends OPCUABaseServer {
2086
2067
  // reject requests sent via the old SecureChannel.
2087
2068
  /**
2088
2069
  *
2089
- * @method _on_ActivateSessionRequest
2090
2070
  * @private
2091
2071
  *
2092
2072
  *
@@ -2288,7 +2268,6 @@ export class OPCUAServer extends OPCUABaseServer {
2288
2268
 
2289
2269
  /**
2290
2270
  * ensure that action is performed on a valid session object,
2291
- * @method _apply_on_SessionObject
2292
2271
  * @param ResponseClass the constructor of the response Class
2293
2272
  * @param message
2294
2273
  * @param channel
@@ -2518,7 +2497,6 @@ export class OPCUAServer extends OPCUABaseServer {
2518
2497
  await this.engine.closeSession(authenticationToken, deleteSubscriptions, reason);
2519
2498
  }
2520
2499
  /**
2521
- * @method _on_CloseSessionRequest
2522
2500
  * @param message
2523
2501
  * @param channel
2524
2502
  * @private
@@ -2569,7 +2547,6 @@ export class OPCUAServer extends OPCUABaseServer {
2569
2547
 
2570
2548
  // browse services
2571
2549
  /**
2572
- * @method _on_BrowseRequest
2573
2550
  * @param message
2574
2551
  * @param channel
2575
2552
  * @private
@@ -2646,10 +2623,6 @@ export class OPCUAServer extends OPCUABaseServer {
2646
2623
  }
2647
2624
 
2648
2625
  /**
2649
- * @method _on_BrowseNextRequest
2650
- * @param message
2651
- * @param channel
2652
- * @private
2653
2626
  */
2654
2627
  protected _on_BrowseNextRequest(message: Message, channel: ServerSecureChannelLayer): void {
2655
2628
  const request = message.request as BrowseNextRequest;
@@ -25,7 +25,7 @@ import {
25
25
  RegisterServerResponse
26
26
  } from "node-opcua-service-discovery";
27
27
  import { ApplicationType, EndpointDescription, MdnsDiscoveryConfiguration, RegisteredServerOptions } from "node-opcua-types";
28
- import { exploreCertificate } from "node-opcua-crypto";
28
+ import { exploreCertificate } from "node-opcua-crypto/web";
29
29
  import { OPCUACertificateManager } from "node-opcua-certificate-manager";
30
30
  import { IRegisterServerManager } from "./i_register_server_manager";
31
31
 
@@ -290,10 +290,6 @@ let g_registeringClientCounter = 0;
290
290
  *
291
291
  *
292
292
  * (LDS => Local Discovery Server)
293
- * @param options
294
- * @param options.server {OPCUAServer}
295
- * @param options.discoveryServerEndpointUrl {String}
296
- * @constructor
297
293
  */
298
294
  export class RegisterServerManager extends EventEmitter implements IRegisterServerManager {
299
295
  public discoveryServerEndpointUrl: string;
@@ -11,7 +11,7 @@ import async from "async";
11
11
 
12
12
  import { assert } from "node-opcua-assert";
13
13
  import { OPCUACertificateManager } from "node-opcua-certificate-manager";
14
- import { Certificate, PrivateKey, makePrivateKeyThumbPrint, makeSHA1Thumbprint, split_der } from "node-opcua-crypto";
14
+ import { Certificate, PrivateKey, makeSHA1Thumbprint, split_der } from "node-opcua-crypto/web";
15
15
  import { checkDebugFlag, make_debugLog, make_errorLog, make_warningLog } from "node-opcua-debug";
16
16
  import { getFullyQualifiedDomainName, resolveFullyQualifiedDomainName } from "node-opcua-hostname";
17
17
  import {
@@ -307,8 +307,7 @@ export class OPCUAServerEndPoint extends EventEmitter implements ServerSecureCha
307
307
  }
308
308
 
309
309
  public toString(): string {
310
- const privateKeyThumpPrint = makePrivateKeyThumbPrint(this.getPrivateKey());
311
-
310
+
312
311
  const txt =
313
312
  " end point" +
314
313
  this._counter +
@@ -317,9 +316,7 @@ export class OPCUAServerEndPoint extends EventEmitter implements ServerSecureCha
317
316
  " l = " +
318
317
  this._endpoints.length +
319
318
  " " +
320
- makeSHA1Thumbprint(this.getCertificateChain()).toString("hex") +
321
- " " +
322
- privateKeyThumpPrint.toString("hex");
319
+ makeSHA1Thumbprint(this.getCertificateChain()).toString("hex")
323
320
  return txt;
324
321
  }
325
322
 
@@ -356,10 +353,6 @@ export class OPCUAServerEndPoint extends EventEmitter implements ServerSecureCha
356
353
  }
357
354
 
358
355
  /**
359
- * @method getEndpointDescription
360
- * @param securityMode
361
- * @param securityPolicy
362
- * @return endpoint_description {EndpointDescription|null}
363
356
  */
364
357
  public getEndpointDescription(
365
358
  securityMode: MessageSecurityMode,
@@ -504,8 +497,6 @@ export class OPCUAServerEndPoint extends EventEmitter implements ServerSecureCha
504
497
  }
505
498
 
506
499
  /**
507
- * @method listen
508
- * @async
509
500
  */
510
501
  public listen(callback: (err?: Error) => void): void {
511
502
  assert(typeof callback === "function");
@@ -585,8 +576,6 @@ export class OPCUAServerEndPoint extends EventEmitter implements ServerSecureCha
585
576
  }
586
577
 
587
578
  /**
588
- * @method shutdown
589
- * @async
590
579
  */
591
580
  public shutdown(callback: (err?: Error) => void): void {
592
581
  debugLog("OPCUAServerEndPoint#shutdown ");
@@ -617,9 +606,6 @@ export class OPCUAServerEndPoint extends EventEmitter implements ServerSecureCha
617
606
  }
618
607
 
619
608
  /**
620
- * @method start
621
- * @async
622
- * @param callback
623
609
  */
624
610
  public start(callback: (err?: Error) => void): void {
625
611
  assert(typeof callback === "function");
@@ -824,8 +810,6 @@ export class OPCUAServerEndPoint extends EventEmitter implements ServerSecureCha
824
810
  }
825
811
 
826
812
  /**
827
- * @method _registerChannel
828
- * @param channel
829
813
  * @private
830
814
  */
831
815
  private _registerChannel(channel: ServerSecureChannelLayer) {
@@ -854,9 +838,6 @@ export class OPCUAServerEndPoint extends EventEmitter implements ServerSecureCha
854
838
  }
855
839
 
856
840
  /**
857
- * @method _unregisterChannel
858
- * @param channel
859
- * @private
860
841
  */
861
842
  private _unregisterChannel(channel: ServerSecureChannelLayer): void {
862
843
  debugLog("_un-registerChannel channel.hashKey", channel.hashKey);