• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

node-opcua / node-opcua / 25697702997 / 1
92%
master: 92%

Build:
DEFAULT BRANCH: master
Ran 11 May 2026 09:59PM UTC
Files 1219
Run time 57s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 May 2026 09:13PM UTC coverage: 92.188% (-0.002%) from 92.19%
25697702997.1

push

github

erossignon
feat(secure-channel): add transportFactory option to ClientSecureChannelLayerOptions

Follow-up to the IClientTransport / IClientTransportFactory /
defaultClientTransportFactory exports added in #<PR1>. Wires the factory
through ClientSecureChannelLayer so consumers can substitute the
transport implementation without forking node-opcua-secure-channel.

Purely additive: when transportFactory is omitted, behaviour is
byte-for-byte identical to before — the constructor falls back to
defaultClientTransportFactory, which calls new ClientTCP_transport(...)
exactly where it was called before.

Changes in client_secure_channel_layer.ts (~54 insertions, 10 deletions):

- Import rewrite: swap `ClientTCP_transport` for the factory+interface
  set from node-opcua-transport. ClientTCP_transport is no longer
  referenced in this file.
- New optional field on ClientSecureChannelLayerOptions:
  `transportFactory?: IClientTransportFactory`, with JSDoc covering the
  three use cases (browser WebSocket transport, test doubles, tracing
  wrappers).
- Private field `#transportFactory: IClientTransportFactory` stored in
  the constructor with `options.transportFactory ||
  defaultClientTransportFactory`.
- Type widening on two internal fields: `#_transport` and
  `#_pending_transport` are now `IClientTransport | undefined`.
- Construction site swap in #create:
  `new ClientTCP_transport(settings)` →
  `this.#transportFactory.create(settings)`. Debug-log string updated
  from "creating ClientTCP_transport" to "creating transport".
- `getTransport()` return type widens to `IClientTransport | undefined`
  with added JSDoc telling test callers that need `._socket` access to
  narrow with `as ClientTCP_transport`. Safe when built with the default
  factory.
- Four internal-method parameter types updated (`#_on_connection`,
  `#_backoff_completion`, `#_connect`, `#_establish_connection`): each
  `transport: ClientTCP_transport` → `transport: IClientTransport`.
  Pure type change... (continued)

18608 of 22119 branches covered (84.13%)

162960 of 176769 relevant lines covered (92.19%)

469528.23 hits per line

Source Files on job 25697702997.1
  • Tree
  • List 1219
  • Changed 3
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 25697702997
  • ad871778 on github
  • Prev Job for on master (#25657787434.1)
  • Next Job for on master (#25742810475.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc