UNPKG

node-opcua-transport

Version:

pure nodejs OPCUA SDK - module transport

79 lines 3.73 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); /*! * The MIT License (MIT) * Copyright (c) 2022-2025 Sterfive SAS - 833264583 RCS ORLEANS - France (https://www.sterfive.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. */ /** * @module node-opcua-transport/browser * * Browser-safe subset of `node-opcua-transport`. Selected automatically by * bundlers (esbuild, webpack, vite, rollup) via the `"browser"` condition in * this package's `exports` map. * * Excludes Node-only modules whose top-level `import "node:net" | "node:os"` * statements would otherwise crash a `platform: "browser"` bundle even though * the runtime never reaches them: * - `client_tcp_transport` — opens a `net.Socket` * - `default_client_transport_factory` — instantiates `ClientTCP_transport` * - `server_tcp_transport` — Node-side server endpoint * * Browser-side OPC UA transports (e.g. `ClientWS_transport` from * `node-opcua-client-browser`) extend `ClientTransportBase` from this entry, * implement their own `connect()`, and inherit the inherited HEL/ACK, * packet-assembly, and lifecycle machinery. * * ## Bundler configuration required * * Several files still re-exported here import `node:events` (e.g. * `tcp_transport.ts`, `message_builder_base.ts`). Browser bundlers do not * auto-polyfill `node:`-prefixed built-ins; consumers must alias them to * polyfill packages. Example (esbuild): * * alias: { * "node:events": "events", * "node:util": "util", * "node:buffer": "buffer" * } * * Transitively, `node-opcua-debug` and `node-opcua-utils` also need these * aliases. We deliberately do not declare the polyfills as dependencies of * the transport package — Node consumers would pay the install cost for no * benefit, and Node would prefer the npm port over its own built-in. */ __exportStar(require("./AcknowledgeMessage"), exports); __exportStar(require("./client_transport_base"), exports); __exportStar(require("./HelloMessage"), exports); __exportStar(require("./i_client_transport"), exports); __exportStar(require("./i_hello_ack_limits"), exports); __exportStar(require("./message_builder_base"), exports); __exportStar(require("./status_codes"), exports); __exportStar(require("./TCPErrorMessage"), exports); __exportStar(require("./tcp_transport"), exports); __exportStar(require("./tools"), exports); __exportStar(require("./utils"), exports); //# sourceMappingURL=index.browser.js.map