@hardwarebridge/client 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/dist/index.d.ts +349 -0
- package/dist/index.esm.js +438 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +442 -0
- package/dist/index.js.map +1 -0
- package/dist/index.umd.js +448 -0
- package/dist/index.umd.js.map +1 -0
- package/package.json +78 -0
- package/src/__tests__/hardware-bridge-client.test.ts +248 -0
- package/src/__tests__/types.test.ts +153 -0
- package/src/__tests__/websocket-client.test.ts +198 -0
- package/src/core/hardware-bridge-client.ts +306 -0
- package/src/core/websocket-client.ts +337 -0
- package/src/index.ts +37 -0
- package/src/types.ts +187 -0
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.HardwareBridgeClient = {}));
|
|
5
|
+
})(this, (function (exports) { 'use strict';
|
|
6
|
+
|
|
7
|
+
class WebSocketClient {
|
|
8
|
+
constructor(config, options = {}) {
|
|
9
|
+
this.ws = null;
|
|
10
|
+
this.connectionListeners = [];
|
|
11
|
+
this.messageListeners = [];
|
|
12
|
+
this.deviceEventListeners = [];
|
|
13
|
+
this.reconnectTimer = null;
|
|
14
|
+
this.pingTimer = null;
|
|
15
|
+
this.messageId = 0;
|
|
16
|
+
this.pendingRequests = new Map();
|
|
17
|
+
this.config = config;
|
|
18
|
+
this.options = {
|
|
19
|
+
autoReconnect: true,
|
|
20
|
+
reconnectInterval: 5000,
|
|
21
|
+
maxReconnectAttempts: 10,
|
|
22
|
+
timeout: 30000,
|
|
23
|
+
debug: false,
|
|
24
|
+
protocols: ['jsonrpc-2.0'],
|
|
25
|
+
...options
|
|
26
|
+
};
|
|
27
|
+
this.connectionState = {
|
|
28
|
+
connected: false,
|
|
29
|
+
connecting: false,
|
|
30
|
+
reconnectAttempts: 0
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
onConnectionStateChange(listener) {
|
|
34
|
+
this.connectionListeners.push(listener);
|
|
35
|
+
}
|
|
36
|
+
onMessage(listener) {
|
|
37
|
+
this.messageListeners.push(listener);
|
|
38
|
+
}
|
|
39
|
+
onDeviceEvent(listener) {
|
|
40
|
+
this.deviceEventListeners.push(listener);
|
|
41
|
+
}
|
|
42
|
+
get isConnected() {
|
|
43
|
+
return this.connectionState.connected;
|
|
44
|
+
}
|
|
45
|
+
get isConnecting() {
|
|
46
|
+
return this.connectionState.connecting;
|
|
47
|
+
}
|
|
48
|
+
getConnectionStatus() {
|
|
49
|
+
if (this.connectionState.connecting)
|
|
50
|
+
return 'connecting';
|
|
51
|
+
if (this.connectionState.connected)
|
|
52
|
+
return 'connected';
|
|
53
|
+
if (this.connectionState.reconnectAttempts > 0)
|
|
54
|
+
return 'reconnecting';
|
|
55
|
+
return 'disconnected';
|
|
56
|
+
}
|
|
57
|
+
async connect() {
|
|
58
|
+
if (this.isConnected || this.isConnecting) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
this.updateConnectionState({ connecting: true });
|
|
62
|
+
try {
|
|
63
|
+
await this.createWebSocket();
|
|
64
|
+
this.updateConnectionState({
|
|
65
|
+
connected: true,
|
|
66
|
+
connecting: false,
|
|
67
|
+
reconnectAttempts: 0,
|
|
68
|
+
lastConnectionTime: new Date()
|
|
69
|
+
});
|
|
70
|
+
this.startPingTimer();
|
|
71
|
+
this.log('Connected to WebSocket server');
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
this.updateConnectionState({ connecting: false, error: error.message });
|
|
75
|
+
this.log('Failed to connect to WebSocket server', error);
|
|
76
|
+
if (this.options.autoReconnect) {
|
|
77
|
+
this.scheduleReconnect();
|
|
78
|
+
}
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
disconnect() {
|
|
83
|
+
this.log('Disconnecting from WebSocket server');
|
|
84
|
+
this.cleanup();
|
|
85
|
+
if (this.ws) {
|
|
86
|
+
this.ws.close(1000, 'Client disconnect');
|
|
87
|
+
this.ws = null;
|
|
88
|
+
}
|
|
89
|
+
this.updateConnectionState({
|
|
90
|
+
connected: false,
|
|
91
|
+
connecting: false,
|
|
92
|
+
error: undefined
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
async sendRequest(method, params) {
|
|
96
|
+
if (!this.isConnected) {
|
|
97
|
+
throw new Error('WebSocket client is not connected');
|
|
98
|
+
}
|
|
99
|
+
const id = ++this.messageId;
|
|
100
|
+
const request = {
|
|
101
|
+
jsonrpc: '2.0',
|
|
102
|
+
method,
|
|
103
|
+
params,
|
|
104
|
+
id
|
|
105
|
+
};
|
|
106
|
+
return new Promise((resolve, reject) => {
|
|
107
|
+
const timeout = setTimeout(() => {
|
|
108
|
+
this.pendingRequests.delete(id);
|
|
109
|
+
reject(new Error(`Request timeout: ${method}`));
|
|
110
|
+
}, this.options.timeout);
|
|
111
|
+
this.pendingRequests.set(id, { resolve, reject, timeout });
|
|
112
|
+
try {
|
|
113
|
+
this.sendMessage(request);
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
clearTimeout(timeout);
|
|
117
|
+
this.pendingRequests.delete(id);
|
|
118
|
+
reject(error);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
sendNotification(method, params) {
|
|
123
|
+
if (!this.isConnected) {
|
|
124
|
+
throw new Error('WebSocket client is not connected');
|
|
125
|
+
}
|
|
126
|
+
const notification = {
|
|
127
|
+
jsonrpc: '2.0',
|
|
128
|
+
method,
|
|
129
|
+
params
|
|
130
|
+
};
|
|
131
|
+
this.sendMessage(notification);
|
|
132
|
+
}
|
|
133
|
+
async createWebSocket() {
|
|
134
|
+
return new Promise((resolve, reject) => {
|
|
135
|
+
try {
|
|
136
|
+
const protocols = this.options.protocols || [];
|
|
137
|
+
const ws = new WebSocket(this.config.url, protocols);
|
|
138
|
+
ws.onopen = () => {
|
|
139
|
+
this.log('WebSocket connection opened');
|
|
140
|
+
resolve();
|
|
141
|
+
};
|
|
142
|
+
ws.onclose = (event) => {
|
|
143
|
+
this.log(`WebSocket connection closed: ${event.code} ${event.reason}`);
|
|
144
|
+
this.handleDisconnect();
|
|
145
|
+
};
|
|
146
|
+
ws.onerror = (error) => {
|
|
147
|
+
this.log('WebSocket error', error);
|
|
148
|
+
reject(new Error('WebSocket connection failed'));
|
|
149
|
+
};
|
|
150
|
+
ws.onmessage = (event) => {
|
|
151
|
+
this.handleMessage(event.data);
|
|
152
|
+
};
|
|
153
|
+
this.ws = ws;
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
reject(error);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
handleMessage(data) {
|
|
161
|
+
try {
|
|
162
|
+
const message = JSON.parse(data);
|
|
163
|
+
if (message.jsonrpc !== '2.0') {
|
|
164
|
+
this.log('Invalid JSON-RPC message received', message);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
// Handle responses to requests
|
|
168
|
+
if (message.id !== undefined && message.id !== null) {
|
|
169
|
+
const pendingRequest = this.pendingRequests.get(message.id);
|
|
170
|
+
if (pendingRequest) {
|
|
171
|
+
clearTimeout(pendingRequest.timeout);
|
|
172
|
+
this.pendingRequests.delete(message.id);
|
|
173
|
+
if (message.error) {
|
|
174
|
+
pendingRequest.reject(new Error(`JSON-RPC Error ${message.error.code}: ${message.error.message}`));
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
pendingRequest.resolve(message.result);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
// Handle notifications and broadcast messages
|
|
182
|
+
if (message.id === undefined || message.id === null) {
|
|
183
|
+
// Notify message listeners
|
|
184
|
+
this.messageListeners.forEach(listener => listener(message));
|
|
185
|
+
// Handle device events (check if it's a notification with method and params)
|
|
186
|
+
const notification = message;
|
|
187
|
+
if (notification.method === 'device.event' && notification.params) {
|
|
188
|
+
const deviceEvent = notification.params;
|
|
189
|
+
this.deviceEventListeners.forEach(listener => listener(deviceEvent));
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
this.log('Error parsing WebSocket message', error);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
handleDisconnect() {
|
|
198
|
+
this.cleanup();
|
|
199
|
+
this.updateConnectionState({
|
|
200
|
+
connected: false,
|
|
201
|
+
connecting: false
|
|
202
|
+
});
|
|
203
|
+
if (this.options.autoReconnect) {
|
|
204
|
+
this.scheduleReconnect();
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
scheduleReconnect() {
|
|
208
|
+
if (this.reconnectTimer) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const currentState = this.connectionState;
|
|
212
|
+
if (currentState.reconnectAttempts >= (this.options.maxReconnectAttempts || 10)) {
|
|
213
|
+
this.log('Max reconnection attempts reached');
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
const nextAttempt = currentState.reconnectAttempts + 1;
|
|
217
|
+
this.log(`Scheduling reconnection attempt ${nextAttempt}`);
|
|
218
|
+
this.reconnectTimer = setTimeout(() => {
|
|
219
|
+
this.reconnectTimer = null;
|
|
220
|
+
this.updateConnectionState({ reconnectAttempts: nextAttempt });
|
|
221
|
+
this.connect().catch(() => {
|
|
222
|
+
// Reconnection failed, will be handled by scheduleReconnect
|
|
223
|
+
});
|
|
224
|
+
}, this.options.reconnectInterval);
|
|
225
|
+
}
|
|
226
|
+
startPingTimer() {
|
|
227
|
+
if (this.pingTimer) {
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
// Send ping every 30 seconds to keep connection alive
|
|
231
|
+
this.pingTimer = setInterval(() => {
|
|
232
|
+
if (this.isConnected) {
|
|
233
|
+
try {
|
|
234
|
+
this.sendNotification('ping');
|
|
235
|
+
}
|
|
236
|
+
catch (error) {
|
|
237
|
+
this.log('Ping failed', error);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}, 30000);
|
|
241
|
+
}
|
|
242
|
+
cleanup() {
|
|
243
|
+
// Clear timers
|
|
244
|
+
if (this.reconnectTimer) {
|
|
245
|
+
clearTimeout(this.reconnectTimer);
|
|
246
|
+
this.reconnectTimer = null;
|
|
247
|
+
}
|
|
248
|
+
if (this.pingTimer) {
|
|
249
|
+
clearInterval(this.pingTimer);
|
|
250
|
+
this.pingTimer = null;
|
|
251
|
+
}
|
|
252
|
+
// Clear pending requests
|
|
253
|
+
for (const request of this.pendingRequests.values()) {
|
|
254
|
+
clearTimeout(request.timeout);
|
|
255
|
+
request.reject(new Error('Connection closed'));
|
|
256
|
+
}
|
|
257
|
+
this.pendingRequests.clear();
|
|
258
|
+
}
|
|
259
|
+
sendMessage(message) {
|
|
260
|
+
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
261
|
+
throw new Error('WebSocket is not open');
|
|
262
|
+
}
|
|
263
|
+
const data = JSON.stringify(message);
|
|
264
|
+
this.ws.send(data);
|
|
265
|
+
this.log(`Sent message: ${message.method}`);
|
|
266
|
+
}
|
|
267
|
+
updateConnectionState(updates) {
|
|
268
|
+
this.connectionState = { ...this.connectionState, ...updates };
|
|
269
|
+
this.connectionListeners.forEach(listener => listener(this.connectionState));
|
|
270
|
+
}
|
|
271
|
+
log(message, data) {
|
|
272
|
+
if (this.options.debug) {
|
|
273
|
+
console.log(`[HardwareBridge] ${message}`, data);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
dispose() {
|
|
277
|
+
this.log('Disposing WebSocket client');
|
|
278
|
+
this.disconnect();
|
|
279
|
+
this.connectionListeners = [];
|
|
280
|
+
this.messageListeners = [];
|
|
281
|
+
this.deviceEventListeners = [];
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
class HardwareBridgeClient {
|
|
286
|
+
constructor(config, options = {}) {
|
|
287
|
+
this.options = {
|
|
288
|
+
autoReconnect: true,
|
|
289
|
+
reconnectInterval: 5000,
|
|
290
|
+
maxReconnectAttempts: 10,
|
|
291
|
+
timeout: 30000,
|
|
292
|
+
debug: false,
|
|
293
|
+
...options
|
|
294
|
+
};
|
|
295
|
+
this.wsClient = new WebSocketClient(config, this.options);
|
|
296
|
+
this.setupEventHandlers();
|
|
297
|
+
}
|
|
298
|
+
setupEventHandlers() {
|
|
299
|
+
// Forward device events
|
|
300
|
+
this.wsClient.onDeviceEvent((event) => {
|
|
301
|
+
this.onDeviceEvent(event);
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
// Connection Management
|
|
305
|
+
async connect() {
|
|
306
|
+
return this.wsClient.connect();
|
|
307
|
+
}
|
|
308
|
+
disconnect() {
|
|
309
|
+
this.wsClient.disconnect();
|
|
310
|
+
}
|
|
311
|
+
get isConnected() {
|
|
312
|
+
return this.wsClient.isConnected;
|
|
313
|
+
}
|
|
314
|
+
get isConnecting() {
|
|
315
|
+
return this.wsClient.isConnecting;
|
|
316
|
+
}
|
|
317
|
+
getConnectionStatus() {
|
|
318
|
+
return this.wsClient.getConnectionStatus();
|
|
319
|
+
}
|
|
320
|
+
onConnectionStateChange(listener) {
|
|
321
|
+
this.wsClient.onConnectionStateChange((state) => {
|
|
322
|
+
listener(state.connected);
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
// Device Discovery
|
|
326
|
+
async enumerateDevices() {
|
|
327
|
+
const result = await this.wsClient.sendRequest('devices.enumerate');
|
|
328
|
+
return result.devices;
|
|
329
|
+
}
|
|
330
|
+
async getDevice(deviceId) {
|
|
331
|
+
return this.wsClient.sendRequest('devices.get', { deviceId });
|
|
332
|
+
}
|
|
333
|
+
async watchDevices() {
|
|
334
|
+
return this.wsClient.sendRequest('devices.watch');
|
|
335
|
+
}
|
|
336
|
+
async unwatchDevices() {
|
|
337
|
+
return this.wsClient.sendRequest('devices.unwatch');
|
|
338
|
+
}
|
|
339
|
+
// Printer Operations
|
|
340
|
+
async print(deviceId, data, format = 'raw') {
|
|
341
|
+
return this.wsClient.sendRequest('printer.print', {
|
|
342
|
+
deviceId,
|
|
343
|
+
data,
|
|
344
|
+
format
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
async getPrinterStatus(deviceId) {
|
|
348
|
+
return this.wsClient.sendRequest('printer.getStatus', { deviceId });
|
|
349
|
+
}
|
|
350
|
+
async getPrinterCapabilities(deviceId) {
|
|
351
|
+
return this.wsClient.sendRequest('printer.getCapabilities', { deviceId });
|
|
352
|
+
}
|
|
353
|
+
// Serial Port Operations
|
|
354
|
+
async openSerialPort(deviceId, config) {
|
|
355
|
+
return this.wsClient.sendRequest('serial.open', {
|
|
356
|
+
deviceId,
|
|
357
|
+
...config
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
async closeSerialPort(deviceId) {
|
|
361
|
+
return this.wsClient.sendRequest('serial.close', { deviceId });
|
|
362
|
+
}
|
|
363
|
+
async sendSerialData(deviceId, data) {
|
|
364
|
+
return this.wsClient.sendRequest('serial.send', { deviceId, data });
|
|
365
|
+
}
|
|
366
|
+
async receiveSerialData(deviceId, maxBytes = 1024, timeout = 10000) {
|
|
367
|
+
return this.wsClient.sendRequest('serial.receive', { deviceId, maxBytes, timeout });
|
|
368
|
+
}
|
|
369
|
+
async getSerialPortStatus(deviceId) {
|
|
370
|
+
return this.wsClient.sendRequest('serial.getStatus', { deviceId });
|
|
371
|
+
}
|
|
372
|
+
// USB HID Operations
|
|
373
|
+
async openUsbDevice(deviceId) {
|
|
374
|
+
return this.wsClient.sendRequest('usb.open', { deviceId });
|
|
375
|
+
}
|
|
376
|
+
async closeUsbDevice(deviceId) {
|
|
377
|
+
return this.wsClient.sendRequest('usb.close', { deviceId });
|
|
378
|
+
}
|
|
379
|
+
async sendUsbReport(deviceId, reportId, data) {
|
|
380
|
+
return this.wsClient.sendRequest('usb.sendReport', { deviceId, reportId, data });
|
|
381
|
+
}
|
|
382
|
+
async receiveUsbReport(deviceId, reportId, timeout = 5000) {
|
|
383
|
+
return this.wsClient.sendRequest('usb.receiveReport', { deviceId, reportId, timeout });
|
|
384
|
+
}
|
|
385
|
+
async getUsbDeviceStatus(deviceId) {
|
|
386
|
+
return this.wsClient.sendRequest('usb.getStatus', { deviceId });
|
|
387
|
+
}
|
|
388
|
+
// Queue Management
|
|
389
|
+
async getQueueStatus() {
|
|
390
|
+
return this.wsClient.sendRequest('queue.getStatus');
|
|
391
|
+
}
|
|
392
|
+
async getQueueJobs(deviceId, status, limit = 100) {
|
|
393
|
+
return this.wsClient.sendRequest('queue.getJobs', { deviceId, status, limit });
|
|
394
|
+
}
|
|
395
|
+
async cancelQueueJob(jobId) {
|
|
396
|
+
return this.wsClient.sendRequest('queue.cancelJob', { jobId });
|
|
397
|
+
}
|
|
398
|
+
// System Information
|
|
399
|
+
async getSystemInfo() {
|
|
400
|
+
return this.wsClient.sendRequest('system.getInfo');
|
|
401
|
+
}
|
|
402
|
+
async getSystemHealth() {
|
|
403
|
+
return this.wsClient.sendRequest('system.getHealth');
|
|
404
|
+
}
|
|
405
|
+
// Event Handlers
|
|
406
|
+
onDeviceEvent(event) {
|
|
407
|
+
// This can be overridden by subclasses or used to emit events
|
|
408
|
+
console.log('Device event:', event);
|
|
409
|
+
}
|
|
410
|
+
// Utility Methods
|
|
411
|
+
async waitForConnection(timeout = 30000) {
|
|
412
|
+
return new Promise((resolve, reject) => {
|
|
413
|
+
if (this.isConnected) {
|
|
414
|
+
resolve();
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
const timeoutId = setTimeout(() => {
|
|
418
|
+
reject(new Error('Connection timeout'));
|
|
419
|
+
}, timeout);
|
|
420
|
+
const checkConnection = () => {
|
|
421
|
+
if (this.isConnected) {
|
|
422
|
+
clearTimeout(timeoutId);
|
|
423
|
+
resolve();
|
|
424
|
+
}
|
|
425
|
+
else {
|
|
426
|
+
setTimeout(checkConnection, 100);
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
checkConnection();
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
dispose() {
|
|
433
|
+
this.wsClient.dispose();
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
// Core exports
|
|
438
|
+
// Version
|
|
439
|
+
const VERSION = '1.0.0';
|
|
440
|
+
// Default export
|
|
441
|
+
// Default export removed due to TypeScript compilation issues
|
|
442
|
+
|
|
443
|
+
exports.HardwareBridgeClient = HardwareBridgeClient;
|
|
444
|
+
exports.VERSION = VERSION;
|
|
445
|
+
exports.WebSocketClient = WebSocketClient;
|
|
446
|
+
|
|
447
|
+
}));
|
|
448
|
+
//# sourceMappingURL=index.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../src/core/websocket-client.ts","../src/core/hardware-bridge-client.ts","../src/index.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";;;;;;UAUa,eAAe,CAAA;QAa1B,WAAA,CAAY,MAAwB,EAAE,OAAA,GAAyB,EAAE,EAAA;YAZzD,IAAA,CAAA,EAAE,GAAqB,IAAI;YAI3B,IAAA,CAAA,mBAAmB,GAA4C,EAAE;YACjE,IAAA,CAAA,gBAAgB,GAA8C,EAAE;YAChE,IAAA,CAAA,oBAAoB,GAAwC,EAAE;YAC9D,IAAA,CAAA,cAAc,GAAQ,IAAI;YAC1B,IAAA,CAAA,SAAS,GAAQ,IAAI;YACrB,IAAA,CAAA,SAAS,GAAG,CAAC;IACb,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,GAAG,EAA0E;IAGzG,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM;YACpB,IAAI,CAAC,OAAO,GAAG;IACb,YAAA,aAAa,EAAE,IAAI;IACnB,YAAA,iBAAiB,EAAE,IAAI;IACvB,YAAA,oB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AC,QAAQ,CAAC,WAAW,CAAC,kBAAkB,CAAC;QACtD;;IAGA,IAAA,aAAa,CAAC,KAAkB,EAAA;;IAE9B,QAAA,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,KAAK,CAAC;QACrC;;IAGA,IAAA,MAAM,iBAAiB,CAAC,OAAA,GAAkB,KAAK,EAAA;YAC7C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;IACrC,YAAA,IAAI,IAAI,CAAC,WAAW,EAAE;IACpB,gBAAA,OAAO,EAAE;oBACT;gBACF;IAEA,YAAA,MAAM,SAAS,GAAG,UAAU,CAAC,MAAK;IAChC,gBAAA,MAAM,CAAC,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;gBACzC,CAAC,EAAE,OAAO,CAAC;gBAEX,MAAM,eAAe,GAAG,MAAK;IAC3B,gBAAA,IAAI,IAAI,CAAC,WAAW,EAAE;wBACpB,YAAY,CAAC,SAAS,CAAC;IACvB,oBAAA,OAAO,EAAE;oBACX;yBAAO;IACL,oBAAA,UAAU,CAAC,eAAe,EAAE,GAAG,CAAC;oBAClC;IACF,YAAA,CAAC;IAED,YAAA,eAAe,EAAE;IACnB,QAAA,CAAC,CAAC;QACJ;QAEA,OAAO,GAAA;IACL,QAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;QACzB;IACD;;ICjTD;IAgCA;AACO,UAAM,OAAO,GAAG;IAEvB;IACA;;;;;;;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hardwarebridge/client",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "TypeScript client library for Hardware Bridge WebSocket service",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.esm.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.esm.js",
|
|
12
|
+
"require": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"src"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "rollup -c",
|
|
22
|
+
"build:watch": "rollup -c -w",
|
|
23
|
+
"test": "NODE_OPTIONS='--experimental-vm-modules' jest",
|
|
24
|
+
"test:watch": "NODE_OPTIONS='--experimental-vm-modules' jest --watch",
|
|
25
|
+
"test:coverage": "NODE_OPTIONS='--experimental-vm-modules' jest --coverage",
|
|
26
|
+
"lint": "eslint src",
|
|
27
|
+
"lint:fix": "eslint src --fix",
|
|
28
|
+
"clean": "rimraf dist",
|
|
29
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"websocket",
|
|
33
|
+
"hardware",
|
|
34
|
+
"printer",
|
|
35
|
+
"serial",
|
|
36
|
+
"usb",
|
|
37
|
+
"hid",
|
|
38
|
+
"typescript",
|
|
39
|
+
"rxjs"
|
|
40
|
+
],
|
|
41
|
+
"author": "Hardware Bridge Team",
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"rxjs": "^7.0.0",
|
|
45
|
+
"ws": "^8.18.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@eslint/js": "^9.39.2",
|
|
49
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
|
50
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
51
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
52
|
+
"@types/jest": "^29.5.14",
|
|
53
|
+
"@types/node": "^22.10.7",
|
|
54
|
+
"@types/ws": "^8.18.0",
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^8.21.0",
|
|
56
|
+
"@typescript-eslint/parser": "^8.21.0",
|
|
57
|
+
"eslint": "^9.18.0",
|
|
58
|
+
"jest": "^30.0.0",
|
|
59
|
+
"rimraf": "^6.0.1",
|
|
60
|
+
"rollup": "^4.32.0",
|
|
61
|
+
"rollup-plugin-dts": "^6.1.0",
|
|
62
|
+
"ts-jest": "^29.1.1",
|
|
63
|
+
"tslib": "^2.6.2",
|
|
64
|
+
"typescript": "^5.2.2",
|
|
65
|
+
"typescript-eslint": "^8.53.1"
|
|
66
|
+
},
|
|
67
|
+
"peerDependencies": {
|
|
68
|
+
"rxjs": "^7.0.0"
|
|
69
|
+
},
|
|
70
|
+
"repository": {
|
|
71
|
+
"type": "git",
|
|
72
|
+
"url": "https://github.com/hardwarebridge/client.git"
|
|
73
|
+
},
|
|
74
|
+
"bugs": {
|
|
75
|
+
"url": "https://github.com/hardwarebridge/client/issues"
|
|
76
|
+
},
|
|
77
|
+
"homepage": "https://github.com/hardwarebridge/client#readme"
|
|
78
|
+
}
|