@zucker-framework/gateway 1.0.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/LICENSE +201 -0
- package/NOTICE +22 -0
- package/THIRD_PARTY_NOTICES +4 -0
- package/dist/index.d.mts +304 -0
- package/dist/index.d.ts +304 -0
- package/dist/index.js +443 -0
- package/dist/index.mjs +412 -0
- package/package.json +40 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var index_exports = {};
|
|
23
|
+
__export(index_exports, {
|
|
24
|
+
AbstractDeviceGateway: () => AbstractDeviceGateway,
|
|
25
|
+
GatewayManager: () => GatewayManager,
|
|
26
|
+
GatewayModule: () => GatewayModule,
|
|
27
|
+
GatewayState: () => GatewayState,
|
|
28
|
+
HttpDeviceGateway: () => HttpDeviceGateway,
|
|
29
|
+
ProtocolRegistry: () => ProtocolRegistry,
|
|
30
|
+
SessionState: () => SessionState
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(index_exports);
|
|
33
|
+
|
|
34
|
+
// src/device-session.ts
|
|
35
|
+
var SessionState = /* @__PURE__ */ (function(SessionState2) {
|
|
36
|
+
SessionState2["CONNECTED"] = "connected";
|
|
37
|
+
SessionState2["CLOSED"] = "closed";
|
|
38
|
+
SessionState2["IDLE"] = "idle";
|
|
39
|
+
return SessionState2;
|
|
40
|
+
})({});
|
|
41
|
+
|
|
42
|
+
// src/codec.ts
|
|
43
|
+
var ProtocolRegistry = class {
|
|
44
|
+
static {
|
|
45
|
+
__name(this, "ProtocolRegistry");
|
|
46
|
+
}
|
|
47
|
+
protocols = /* @__PURE__ */ new Map();
|
|
48
|
+
register(protocol) {
|
|
49
|
+
this.protocols.set(protocol.id, protocol);
|
|
50
|
+
}
|
|
51
|
+
unregister(id) {
|
|
52
|
+
this.protocols.delete(id);
|
|
53
|
+
}
|
|
54
|
+
get(id) {
|
|
55
|
+
return this.protocols.get(id);
|
|
56
|
+
}
|
|
57
|
+
getAll() {
|
|
58
|
+
return Array.from(this.protocols.values());
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// src/device-gateway.ts
|
|
63
|
+
var import_common = require("@nestjs/common");
|
|
64
|
+
var import_things = require("@zucker-framework/things");
|
|
65
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
66
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
67
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
68
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
69
|
+
} else {
|
|
70
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
71
|
+
if (d = decorators[i]) {
|
|
72
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
77
|
+
}
|
|
78
|
+
__name(_ts_decorate, "_ts_decorate");
|
|
79
|
+
function _ts_metadata(metadataKey, metadataValue) {
|
|
80
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
81
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
__name(_ts_metadata, "_ts_metadata");
|
|
85
|
+
var GatewayState = /* @__PURE__ */ (function(GatewayState2) {
|
|
86
|
+
GatewayState2["STARTING"] = "starting";
|
|
87
|
+
GatewayState2["RUNNING"] = "running";
|
|
88
|
+
GatewayState2["PAUSED"] = "paused";
|
|
89
|
+
GatewayState2["STOPPED"] = "stopped";
|
|
90
|
+
return GatewayState2;
|
|
91
|
+
})({});
|
|
92
|
+
var AbstractDeviceGateway = class {
|
|
93
|
+
static {
|
|
94
|
+
__name(this, "AbstractDeviceGateway");
|
|
95
|
+
}
|
|
96
|
+
config;
|
|
97
|
+
protocol;
|
|
98
|
+
thingManager;
|
|
99
|
+
dataService;
|
|
100
|
+
logger;
|
|
101
|
+
sessions = /* @__PURE__ */ new Map();
|
|
102
|
+
state = "stopped";
|
|
103
|
+
constructor(config, protocol, thingManager, dataService) {
|
|
104
|
+
this.config = config;
|
|
105
|
+
this.protocol = protocol;
|
|
106
|
+
this.thingManager = thingManager;
|
|
107
|
+
this.dataService = dataService;
|
|
108
|
+
this.logger = new import_common.Logger(this.constructor.name);
|
|
109
|
+
}
|
|
110
|
+
getSessionCount() {
|
|
111
|
+
return this.sessions.size;
|
|
112
|
+
}
|
|
113
|
+
getSession(thingId) {
|
|
114
|
+
return this.sessions.get(thingId);
|
|
115
|
+
}
|
|
116
|
+
async sendDownstream(thingId, payload) {
|
|
117
|
+
const session = this.sessions.get(thingId);
|
|
118
|
+
if (!session || !session.isAlive()) {
|
|
119
|
+
throw new Error(`No active session for thing: ${thingId}`);
|
|
120
|
+
}
|
|
121
|
+
await session.send(payload);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* 处理设备连接 — 注册会话并触发上线
|
|
125
|
+
*/
|
|
126
|
+
async onSessionConnected(session) {
|
|
127
|
+
this.sessions.set(session.thingId, session);
|
|
128
|
+
await this.thingManager.updateState(session.thingId, import_things.ThingState.ONLINE);
|
|
129
|
+
this.logger.log(`Device connected: ${session.thingId} (session: ${session.sessionId})`);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* 处理设备断开 — 移除会话并触发离线
|
|
133
|
+
*/
|
|
134
|
+
async onSessionClosed(session) {
|
|
135
|
+
this.sessions.delete(session.thingId);
|
|
136
|
+
session.state = SessionState.CLOSED;
|
|
137
|
+
await this.thingManager.updateState(session.thingId, import_things.ThingState.OFFLINE);
|
|
138
|
+
this.logger.log(`Device disconnected: ${session.thingId}`);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* 处理上行原始消息 — 解码后路由到对应处理器
|
|
142
|
+
* 对应 jetlinks AbstractDeviceGateway.doMessage()
|
|
143
|
+
*/
|
|
144
|
+
async handleIncoming(context) {
|
|
145
|
+
const codec = this.protocol.getCodec(this.config.transport);
|
|
146
|
+
if (!codec) {
|
|
147
|
+
this.logger.warn(`No codec for transport: ${this.config.transport}`);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
let messages;
|
|
151
|
+
try {
|
|
152
|
+
messages = await codec.decode(context);
|
|
153
|
+
} catch (err) {
|
|
154
|
+
this.logger.error(`Decode error for device ${context.session.thingId}:`, err);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
for (const msg of messages) {
|
|
158
|
+
await this.routeMessage(msg);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* 将解码后的消息路由到业务处理 — 对应 jetlinks DeviceMessageBus.publish()
|
|
163
|
+
*/
|
|
164
|
+
async routeMessage(message) {
|
|
165
|
+
try {
|
|
166
|
+
switch (message.messageType) {
|
|
167
|
+
case "Online":
|
|
168
|
+
await this.thingManager.updateState(message.thingId, import_things.ThingState.ONLINE, message.timestamp);
|
|
169
|
+
break;
|
|
170
|
+
case "Offline":
|
|
171
|
+
await this.thingManager.updateState(message.thingId, import_things.ThingState.OFFLINE, message.timestamp);
|
|
172
|
+
break;
|
|
173
|
+
case "Register":
|
|
174
|
+
break;
|
|
175
|
+
case "ReportProperty":
|
|
176
|
+
await this.dataService.saveProperties(message);
|
|
177
|
+
break;
|
|
178
|
+
case "Event":
|
|
179
|
+
await this.dataService.saveEvent(message);
|
|
180
|
+
break;
|
|
181
|
+
case "FunctionReply":
|
|
182
|
+
case "ReadPropertyReply":
|
|
183
|
+
break;
|
|
184
|
+
default:
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
} catch (err) {
|
|
188
|
+
this.logger.error(`Failed to route message ${message.messageType} from ${message.thingId}:`, err);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* 关闭所有会话
|
|
193
|
+
*/
|
|
194
|
+
async closeAllSessions() {
|
|
195
|
+
const closing = Array.from(this.sessions.values()).map((s) => s.close().catch(() => {
|
|
196
|
+
}));
|
|
197
|
+
await Promise.all(closing);
|
|
198
|
+
this.sessions.clear();
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
AbstractDeviceGateway = _ts_decorate([
|
|
202
|
+
(0, import_common.Injectable)(),
|
|
203
|
+
_ts_metadata("design:type", Function),
|
|
204
|
+
_ts_metadata("design:paramtypes", [
|
|
205
|
+
typeof DeviceGatewayConfig === "undefined" ? Object : DeviceGatewayConfig,
|
|
206
|
+
typeof ProtocolSupport === "undefined" ? Object : ProtocolSupport,
|
|
207
|
+
typeof ThingManager === "undefined" ? Object : ThingManager,
|
|
208
|
+
typeof ThingsDataService === "undefined" ? Object : ThingsDataService
|
|
209
|
+
])
|
|
210
|
+
], AbstractDeviceGateway);
|
|
211
|
+
|
|
212
|
+
// src/http-gateway.ts
|
|
213
|
+
var import_common2 = require("@nestjs/common");
|
|
214
|
+
var import_network = require("@zucker-framework/network");
|
|
215
|
+
function _ts_decorate2(decorators, target, key, desc) {
|
|
216
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
217
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
218
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
219
|
+
} else {
|
|
220
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
221
|
+
if (d = decorators[i]) {
|
|
222
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
227
|
+
}
|
|
228
|
+
__name(_ts_decorate2, "_ts_decorate");
|
|
229
|
+
function _ts_metadata2(metadataKey, metadataValue) {
|
|
230
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
231
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
__name(_ts_metadata2, "_ts_metadata");
|
|
235
|
+
var HttpDeviceSession = class HttpDeviceSession2 {
|
|
236
|
+
static {
|
|
237
|
+
__name(this, "HttpDeviceSession");
|
|
238
|
+
}
|
|
239
|
+
sessionId;
|
|
240
|
+
thingId;
|
|
241
|
+
gatewayId;
|
|
242
|
+
transport = import_network.Transports.HTTP;
|
|
243
|
+
connectTime = Date.now();
|
|
244
|
+
lastPingTime = Date.now();
|
|
245
|
+
state = SessionState.CONNECTED;
|
|
246
|
+
sendFn;
|
|
247
|
+
constructor(thingId, gatewayId, sendFn) {
|
|
248
|
+
this.sessionId = `http-${thingId}-${Date.now()}`;
|
|
249
|
+
this.thingId = thingId;
|
|
250
|
+
this.gatewayId = gatewayId;
|
|
251
|
+
this.sendFn = sendFn;
|
|
252
|
+
}
|
|
253
|
+
async send(payload) {
|
|
254
|
+
await this.sendFn(payload);
|
|
255
|
+
}
|
|
256
|
+
async close() {
|
|
257
|
+
this.state = SessionState.CLOSED;
|
|
258
|
+
}
|
|
259
|
+
ping() {
|
|
260
|
+
this.lastPingTime = Date.now();
|
|
261
|
+
}
|
|
262
|
+
isAlive() {
|
|
263
|
+
return this.state === SessionState.CONNECTED;
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
var HttpDeviceGateway = class extends AbstractDeviceGateway {
|
|
267
|
+
static {
|
|
268
|
+
__name(this, "HttpDeviceGateway");
|
|
269
|
+
}
|
|
270
|
+
constructor(config, protocol, thingManager, dataService) {
|
|
271
|
+
super(config, protocol, thingManager, dataService);
|
|
272
|
+
}
|
|
273
|
+
async start() {
|
|
274
|
+
this.state = GatewayState.RUNNING;
|
|
275
|
+
this.logger.log(`HTTP gateway started: ${this.config.id}`);
|
|
276
|
+
}
|
|
277
|
+
async pause() {
|
|
278
|
+
this.state = GatewayState.PAUSED;
|
|
279
|
+
}
|
|
280
|
+
async shutdown() {
|
|
281
|
+
await this.closeAllSessions();
|
|
282
|
+
this.state = GatewayState.STOPPED;
|
|
283
|
+
this.logger.log(`HTTP gateway stopped: ${this.config.id}`);
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* 处理来自设备的 HTTP 请求
|
|
287
|
+
* 由 NestJS Controller 调用
|
|
288
|
+
*
|
|
289
|
+
* @param thingId 设备 ID(从路径参数或认证信息中提取)
|
|
290
|
+
* @param body 请求体
|
|
291
|
+
*/
|
|
292
|
+
async handleRequest(thingId, body) {
|
|
293
|
+
if (this.state !== GatewayState.RUNNING) {
|
|
294
|
+
throw new Error(`Gateway ${this.config.id} is not running`);
|
|
295
|
+
}
|
|
296
|
+
const session = new HttpDeviceSession(thingId, this.config.id, async () => {
|
|
297
|
+
});
|
|
298
|
+
await this.onSessionConnected(session);
|
|
299
|
+
try {
|
|
300
|
+
await this.handleIncoming({
|
|
301
|
+
payload: body,
|
|
302
|
+
session
|
|
303
|
+
});
|
|
304
|
+
} finally {
|
|
305
|
+
await this.onSessionClosed(session);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
HttpDeviceGateway = _ts_decorate2([
|
|
310
|
+
(0, import_common2.Injectable)(),
|
|
311
|
+
_ts_metadata2("design:type", Function),
|
|
312
|
+
_ts_metadata2("design:paramtypes", [
|
|
313
|
+
typeof DeviceGatewayConfig === "undefined" ? Object : DeviceGatewayConfig,
|
|
314
|
+
typeof ProtocolSupport === "undefined" ? Object : ProtocolSupport,
|
|
315
|
+
typeof ThingManager === "undefined" ? Object : ThingManager,
|
|
316
|
+
typeof ThingsDataService === "undefined" ? Object : ThingsDataService
|
|
317
|
+
])
|
|
318
|
+
], HttpDeviceGateway);
|
|
319
|
+
|
|
320
|
+
// src/gateway-manager.ts
|
|
321
|
+
var import_common3 = require("@nestjs/common");
|
|
322
|
+
function _ts_decorate3(decorators, target, key, desc) {
|
|
323
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
324
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
325
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
326
|
+
} else {
|
|
327
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
328
|
+
if (d = decorators[i]) {
|
|
329
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
334
|
+
}
|
|
335
|
+
__name(_ts_decorate3, "_ts_decorate");
|
|
336
|
+
function _ts_metadata3(metadataKey, metadataValue) {
|
|
337
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
338
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
__name(_ts_metadata3, "_ts_metadata");
|
|
342
|
+
var GatewayManager = class _GatewayManager {
|
|
343
|
+
static {
|
|
344
|
+
__name(this, "GatewayManager");
|
|
345
|
+
}
|
|
346
|
+
protocolRegistry;
|
|
347
|
+
logger = new import_common3.Logger(_GatewayManager.name);
|
|
348
|
+
gateways = /* @__PURE__ */ new Map();
|
|
349
|
+
constructor(protocolRegistry) {
|
|
350
|
+
this.protocolRegistry = protocolRegistry;
|
|
351
|
+
}
|
|
352
|
+
register(gateway) {
|
|
353
|
+
if (this.gateways.has(gateway.config.id)) {
|
|
354
|
+
throw new Error(`Gateway already registered: ${gateway.config.id}`);
|
|
355
|
+
}
|
|
356
|
+
this.gateways.set(gateway.config.id, gateway);
|
|
357
|
+
this.logger.log(`Gateway registered: ${gateway.config.id} (${gateway.config.name})`);
|
|
358
|
+
}
|
|
359
|
+
unregister(gatewayId) {
|
|
360
|
+
this.gateways.delete(gatewayId);
|
|
361
|
+
}
|
|
362
|
+
get(gatewayId) {
|
|
363
|
+
return this.gateways.get(gatewayId);
|
|
364
|
+
}
|
|
365
|
+
getAll() {
|
|
366
|
+
return Array.from(this.gateways.values());
|
|
367
|
+
}
|
|
368
|
+
/** 启动所有已注册的网关 */
|
|
369
|
+
async startAll() {
|
|
370
|
+
const results = await Promise.allSettled(Array.from(this.gateways.values()).map((g) => g.start()));
|
|
371
|
+
for (const [i, result] of results.entries()) {
|
|
372
|
+
const gateway = Array.from(this.gateways.values())[i];
|
|
373
|
+
if (result.status === "rejected") {
|
|
374
|
+
this.logger.error(`Failed to start gateway ${gateway?.config.id}:`, result.reason);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
/** 停止所有网关 */
|
|
379
|
+
async shutdownAll() {
|
|
380
|
+
await Promise.allSettled(Array.from(this.gateways.values()).map((g) => g.shutdown()));
|
|
381
|
+
}
|
|
382
|
+
/** 汇总统计 */
|
|
383
|
+
getSummary() {
|
|
384
|
+
const all = Array.from(this.gateways.values());
|
|
385
|
+
return {
|
|
386
|
+
total: all.length,
|
|
387
|
+
running: all.filter((g) => g.state === GatewayState.RUNNING).length,
|
|
388
|
+
stopped: all.filter((g) => g.state === GatewayState.STOPPED).length,
|
|
389
|
+
totalSessions: all.reduce((sum, g) => sum + g.getSessionCount(), 0)
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
GatewayManager = _ts_decorate3([
|
|
394
|
+
(0, import_common3.Injectable)(),
|
|
395
|
+
_ts_metadata3("design:type", Function),
|
|
396
|
+
_ts_metadata3("design:paramtypes", [
|
|
397
|
+
typeof ProtocolRegistry === "undefined" ? Object : ProtocolRegistry
|
|
398
|
+
])
|
|
399
|
+
], GatewayManager);
|
|
400
|
+
|
|
401
|
+
// src/gateway.module.ts
|
|
402
|
+
var import_common4 = require("@nestjs/common");
|
|
403
|
+
function _ts_decorate4(decorators, target, key, desc) {
|
|
404
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
405
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
406
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
407
|
+
} else {
|
|
408
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
409
|
+
if (d = decorators[i]) {
|
|
410
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
415
|
+
}
|
|
416
|
+
__name(_ts_decorate4, "_ts_decorate");
|
|
417
|
+
var GatewayModule = class {
|
|
418
|
+
static {
|
|
419
|
+
__name(this, "GatewayModule");
|
|
420
|
+
}
|
|
421
|
+
};
|
|
422
|
+
GatewayModule = _ts_decorate4([
|
|
423
|
+
(0, import_common4.Module)({
|
|
424
|
+
providers: [
|
|
425
|
+
ProtocolRegistry,
|
|
426
|
+
GatewayManager
|
|
427
|
+
],
|
|
428
|
+
exports: [
|
|
429
|
+
ProtocolRegistry,
|
|
430
|
+
GatewayManager
|
|
431
|
+
]
|
|
432
|
+
})
|
|
433
|
+
], GatewayModule);
|
|
434
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
435
|
+
0 && (module.exports = {
|
|
436
|
+
AbstractDeviceGateway,
|
|
437
|
+
GatewayManager,
|
|
438
|
+
GatewayModule,
|
|
439
|
+
GatewayState,
|
|
440
|
+
HttpDeviceGateway,
|
|
441
|
+
ProtocolRegistry,
|
|
442
|
+
SessionState
|
|
443
|
+
});
|