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