node-opcua-transport 2.170.0 → 2.173.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/source/client_tcp_transport.d.ts +4 -39
- package/dist/source/client_tcp_transport.js +7 -158
- package/dist/source/client_tcp_transport.js.map +1 -1
- package/dist/source/client_transport_base.d.ts +64 -0
- package/dist/source/client_transport_base.js +183 -0
- package/dist/source/client_transport_base.js.map +1 -0
- package/dist/source/default_client_transport_factory.d.ts +12 -0
- package/dist/source/default_client_transport_factory.js +20 -0
- package/dist/source/default_client_transport_factory.js.map +1 -0
- package/dist/source/i_client_transport.d.ts +90 -0
- package/dist/source/i_client_transport.js +6 -0
- package/dist/source/i_client_transport.js.map +1 -0
- package/dist/source/index.browser.d.ts +62 -0
- package/dist/source/index.browser.js +79 -0
- package/dist/source/index.browser.js.map +1 -0
- package/dist/source/index.d.ts +3 -0
- package/dist/source/index.js +3 -0
- package/dist/source/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +33 -13
- package/source/client_tcp_transport.ts +16 -217
- package/source/client_transport_base.ts +238 -0
- package/source/default_client_transport_factory.ts +19 -0
- package/source/i_client_transport.ts +134 -0
- package/source/index.browser.ts +62 -0
- package/source/index.ts +3 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
* Copyright (c) 2022-2025 Sterfive SAS - 833264583 RCS ORLEANS - France (https://www.sterfive.com)
|
|
4
|
+
*
|
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
* this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
* the Software without restriction, including without limitation the rights to
|
|
8
|
+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
* subject to the following conditions:
|
|
11
|
+
*
|
|
12
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
* copies or substantial portions of the Software.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* @module node-opcua-transport/browser
|
|
17
|
+
*
|
|
18
|
+
* Browser-safe subset of `node-opcua-transport`. Selected automatically by
|
|
19
|
+
* bundlers (esbuild, webpack, vite, rollup) via the `"browser"` condition in
|
|
20
|
+
* this package's `exports` map.
|
|
21
|
+
*
|
|
22
|
+
* Excludes Node-only modules whose top-level `import "node:net" | "node:os"`
|
|
23
|
+
* statements would otherwise crash a `platform: "browser"` bundle even though
|
|
24
|
+
* the runtime never reaches them:
|
|
25
|
+
* - `client_tcp_transport` — opens a `net.Socket`
|
|
26
|
+
* - `default_client_transport_factory` — instantiates `ClientTCP_transport`
|
|
27
|
+
* - `server_tcp_transport` — Node-side server endpoint
|
|
28
|
+
*
|
|
29
|
+
* Browser-side OPC UA transports (e.g. `ClientWS_transport` from
|
|
30
|
+
* `node-opcua-client-browser`) extend `ClientTransportBase` from this entry,
|
|
31
|
+
* implement their own `connect()`, and inherit the inherited HEL/ACK,
|
|
32
|
+
* packet-assembly, and lifecycle machinery.
|
|
33
|
+
*
|
|
34
|
+
* ## Bundler configuration required
|
|
35
|
+
*
|
|
36
|
+
* Several files still re-exported here import `node:events` (e.g.
|
|
37
|
+
* `tcp_transport.ts`, `message_builder_base.ts`). Browser bundlers do not
|
|
38
|
+
* auto-polyfill `node:`-prefixed built-ins; consumers must alias them to
|
|
39
|
+
* polyfill packages. Example (esbuild):
|
|
40
|
+
*
|
|
41
|
+
* alias: {
|
|
42
|
+
* "node:events": "events",
|
|
43
|
+
* "node:util": "util",
|
|
44
|
+
* "node:buffer": "buffer"
|
|
45
|
+
* }
|
|
46
|
+
*
|
|
47
|
+
* Transitively, `node-opcua-debug` and `node-opcua-utils` also need these
|
|
48
|
+
* aliases. We deliberately do not declare the polyfills as dependencies of
|
|
49
|
+
* the transport package — Node consumers would pay the install cost for no
|
|
50
|
+
* benefit, and Node would prefer the npm port over its own built-in.
|
|
51
|
+
*/
|
|
52
|
+
export * from "./AcknowledgeMessage";
|
|
53
|
+
export * from "./client_transport_base";
|
|
54
|
+
export * from "./HelloMessage";
|
|
55
|
+
export * from "./i_client_transport";
|
|
56
|
+
export * from "./i_hello_ack_limits";
|
|
57
|
+
export * from "./message_builder_base";
|
|
58
|
+
export * from "./status_codes";
|
|
59
|
+
export * from "./TCPErrorMessage";
|
|
60
|
+
export * from "./tcp_transport";
|
|
61
|
+
export * from "./tools";
|
|
62
|
+
export * from "./utils";
|
package/source/index.ts
CHANGED
|
@@ -25,7 +25,10 @@
|
|
|
25
25
|
*/
|
|
26
26
|
export * from "./AcknowledgeMessage";
|
|
27
27
|
export * from "./client_tcp_transport";
|
|
28
|
+
export * from "./client_transport_base";
|
|
29
|
+
export * from "./default_client_transport_factory";
|
|
28
30
|
export * from "./HelloMessage";
|
|
31
|
+
export * from "./i_client_transport";
|
|
29
32
|
export * from "./i_hello_ack_limits";
|
|
30
33
|
export * from "./message_builder_base";
|
|
31
34
|
export * from "./server_tcp_transport";
|