@blade-hq/agent-client 2612.0.0-beta.12 → 2612.0.0-beta.13
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/{chunk-DKK3IGAV.js → chunk-KPS6X6QX.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/internal.js +1 -1
- package/node_modules/engine.io-client/build/cjs/globals.node.d.ts +2 -3
- package/node_modules/engine.io-client/build/cjs/index.d.ts +3 -3
- package/node_modules/engine.io-client/build/cjs/index.js +1 -4
- package/node_modules/engine.io-client/build/cjs/socket.d.ts +39 -82
- package/node_modules/engine.io-client/build/cjs/socket.js +151 -218
- package/node_modules/engine.io-client/build/cjs/transport.d.ts +1 -1
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.d.ts +4 -4
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.js +2 -2
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.js +17 -7
- package/node_modules/engine.io-client/build/cjs/transports/websocket.node.js +17 -7
- package/node_modules/engine.io-client/build/esm/globals.node.d.ts +2 -3
- package/node_modules/engine.io-client/build/esm/index.d.ts +3 -3
- package/node_modules/engine.io-client/build/esm/index.js +1 -2
- package/node_modules/engine.io-client/build/esm/socket.d.ts +39 -82
- package/node_modules/engine.io-client/build/esm/socket.js +141 -206
- package/node_modules/engine.io-client/build/esm/transport.d.ts +1 -1
- package/node_modules/engine.io-client/build/esm/transports/polling-xhr.d.ts +4 -4
- package/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +2 -2
- package/node_modules/engine.io-client/build/esm-debug/globals.node.d.ts +2 -3
- package/node_modules/engine.io-client/build/esm-debug/index.d.ts +3 -3
- package/node_modules/engine.io-client/build/esm-debug/index.js +1 -2
- package/node_modules/engine.io-client/build/esm-debug/socket.d.ts +39 -82
- package/node_modules/engine.io-client/build/esm-debug/socket.js +150 -215
- package/node_modules/engine.io-client/build/esm-debug/transport.d.ts +1 -1
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.d.ts +4 -4
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.js +2 -2
- package/node_modules/engine.io-client/dist/engine.io.esm.min.js +3 -3
- package/node_modules/engine.io-client/dist/engine.io.esm.min.js.map +1 -1
- package/node_modules/engine.io-client/dist/engine.io.js +164 -239
- package/node_modules/engine.io-client/dist/engine.io.js.map +1 -1
- package/node_modules/engine.io-client/dist/engine.io.min.js +3 -3
- package/node_modules/engine.io-client/dist/engine.io.min.js.map +1 -1
- package/node_modules/engine.io-client/package.json +2 -2
- package/node_modules/socket.io-parser/build/cjs/binary.js +4 -1
- package/node_modules/socket.io-parser/build/cjs/index.d.ts +14 -4
- package/node_modules/socket.io-parser/build/cjs/index.js +18 -11
- package/node_modules/socket.io-parser/build/esm/binary.js +4 -1
- package/node_modules/socket.io-parser/build/esm/index.d.ts +14 -4
- package/node_modules/socket.io-parser/build/esm/index.js +14 -10
- package/node_modules/socket.io-parser/build/esm-debug/binary.js +4 -1
- package/node_modules/socket.io-parser/build/esm-debug/index.d.ts +14 -4
- package/node_modules/socket.io-parser/build/esm-debug/index.js +14 -10
- package/node_modules/socket.io-parser/package.json +1 -1
- package/node_modules/ws/index.js +15 -6
- package/node_modules/ws/lib/constants.js +1 -0
- package/node_modules/ws/lib/permessage-deflate.js +9 -7
- package/node_modules/ws/lib/receiver.js +37 -0
- package/node_modules/ws/lib/sender.js +6 -1
- package/node_modules/ws/lib/websocket-server.js +18 -6
- package/node_modules/ws/lib/websocket.js +50 -17
- package/node_modules/ws/package.json +8 -3
- package/node_modules/ws/wrapper.mjs +14 -1
- package/package.json +4 -4
- package/public-api.md +1 -1
- /package/dist/{chunk-DKK3IGAV.js.map → chunk-KPS6X6QX.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/version.ts
|
|
2
2
|
var SDK_NAME = "agent-client";
|
|
3
|
-
var SDK_VERSION = true ? "2612.0.0-beta.
|
|
3
|
+
var SDK_VERSION = true ? "2612.0.0-beta.13" : "1.1.1";
|
|
4
4
|
|
|
5
5
|
// src/auth-login.ts
|
|
6
6
|
function isAuthCallbackMessage(value) {
|
|
@@ -8264,4 +8264,4 @@ export {
|
|
|
8264
8264
|
createSocket,
|
|
8265
8265
|
BladeClient
|
|
8266
8266
|
};
|
|
8267
|
-
//# sourceMappingURL=chunk-
|
|
8267
|
+
//# sourceMappingURL=chunk-KPS6X6QX.js.map
|
package/dist/index.js
CHANGED
package/dist/internal.js
CHANGED
|
@@ -2,7 +2,7 @@ export declare const nextTick: (callback: Function, ...args: any[]) => void;
|
|
|
2
2
|
export declare const globalThisShim: typeof globalThis;
|
|
3
3
|
export declare const defaultBinaryType = "nodebuffer";
|
|
4
4
|
export declare function createCookieJar(): CookieJar;
|
|
5
|
-
interface Cookie {
|
|
5
|
+
export interface Cookie {
|
|
6
6
|
name: string;
|
|
7
7
|
value: string;
|
|
8
8
|
expires?: Date;
|
|
@@ -14,8 +14,7 @@ export declare function parse(setCookieString: string): Cookie;
|
|
|
14
14
|
export declare class CookieJar {
|
|
15
15
|
private _cookies;
|
|
16
16
|
parseCookies(values: string[]): void;
|
|
17
|
-
get cookies():
|
|
17
|
+
get cookies(): MapIterator<[string, Cookie]>;
|
|
18
18
|
addCookies(xhr: any): void;
|
|
19
19
|
appendCookies(headers: Headers): void;
|
|
20
20
|
}
|
|
21
|
-
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Socket } from "./socket.js";
|
|
2
2
|
export { Socket };
|
|
3
|
-
export { SocketOptions,
|
|
3
|
+
export { HandshakeData, SocketOptions, SocketReservedEvents, WriteOptions, TransportCtor, TransportName, } from "./socket.js";
|
|
4
4
|
export declare const protocol: number;
|
|
5
|
-
export { Transport, TransportError } from "./transport.js";
|
|
5
|
+
export { Transport, TransportError, TransportReservedEvents, } from "./transport.js";
|
|
6
6
|
export { transports } from "./transports/index.js";
|
|
7
7
|
export { installTimerFunctions } from "./util.js";
|
|
8
8
|
export { parse } from "./contrib/parseuri.js";
|
|
9
|
-
export { nextTick } from "./globals.node.js";
|
|
9
|
+
export { Cookie, nextTick } from "./globals.node.js";
|
|
10
10
|
export { Fetch } from "./transports/polling-fetch.js";
|
|
11
11
|
export { XHR as NodeXHR } from "./transports/polling-xhr.node.js";
|
|
12
12
|
export { XHR } from "./transports/polling-xhr.js";
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebTransport = exports.WebSocket = exports.NodeWebSocket = exports.XHR = exports.NodeXHR = exports.Fetch = exports.nextTick = exports.parse = exports.installTimerFunctions = exports.transports = exports.TransportError = exports.Transport = exports.protocol = exports.
|
|
3
|
+
exports.WebTransport = exports.WebSocket = exports.NodeWebSocket = exports.XHR = exports.NodeXHR = exports.Fetch = exports.nextTick = exports.parse = exports.installTimerFunctions = exports.transports = exports.TransportError = exports.Transport = exports.protocol = exports.Socket = void 0;
|
|
4
4
|
const socket_js_1 = require("./socket.js");
|
|
5
5
|
Object.defineProperty(exports, "Socket", { enumerable: true, get: function () { return socket_js_1.Socket; } });
|
|
6
|
-
var socket_js_2 = require("./socket.js");
|
|
7
|
-
Object.defineProperty(exports, "SocketWithoutUpgrade", { enumerable: true, get: function () { return socket_js_2.SocketWithoutUpgrade; } });
|
|
8
|
-
Object.defineProperty(exports, "SocketWithUpgrade", { enumerable: true, get: function () { return socket_js_2.SocketWithUpgrade; } });
|
|
9
6
|
exports.protocol = socket_js_1.Socket.protocol;
|
|
10
7
|
var transport_js_1 = require("./transport.js");
|
|
11
8
|
Object.defineProperty(exports, "Transport", { enumerable: true, get: function () { return transport_js_1.Transport; } });
|
|
@@ -64,7 +64,20 @@ export interface SocketOptions {
|
|
|
64
64
|
*
|
|
65
65
|
* @default ['polling','websocket', 'webtransport']
|
|
66
66
|
*/
|
|
67
|
-
transports?:
|
|
67
|
+
transports?: TransportName[] | TransportCtor[];
|
|
68
|
+
/**
|
|
69
|
+
* A list of low-level transport implementations to use instead of the defaults.
|
|
70
|
+
*
|
|
71
|
+
* The order of the array determines the order in which transports are tried.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* import { Fetch, WebSocket } from "engine.io-client";
|
|
75
|
+
*
|
|
76
|
+
* const socket = new Socket({
|
|
77
|
+
* transportImplementations: [Fetch, WebSocket]
|
|
78
|
+
* });
|
|
79
|
+
*/
|
|
80
|
+
transportImplementations?: TransportCtor[];
|
|
68
81
|
/**
|
|
69
82
|
* Whether all the transports should be tested, instead of just the first one.
|
|
70
83
|
*
|
|
@@ -197,20 +210,18 @@ export interface SocketOptions {
|
|
|
197
210
|
*/
|
|
198
211
|
protocols?: string | string[];
|
|
199
212
|
}
|
|
200
|
-
type
|
|
213
|
+
export type TransportName = "polling" | "websocket" | "webtransport" | (string & {});
|
|
214
|
+
export type TransportCtor = {
|
|
201
215
|
new (o: any): Transport;
|
|
202
216
|
};
|
|
203
|
-
|
|
204
|
-
transports: TransportCtor[];
|
|
205
|
-
};
|
|
206
|
-
interface HandshakeData {
|
|
217
|
+
export interface HandshakeData {
|
|
207
218
|
sid: string;
|
|
208
219
|
upgrades: string[];
|
|
209
220
|
pingInterval: number;
|
|
210
221
|
pingTimeout: number;
|
|
211
222
|
maxPayload: number;
|
|
212
223
|
}
|
|
213
|
-
interface SocketReservedEvents {
|
|
224
|
+
export interface SocketReservedEvents {
|
|
214
225
|
open: () => void;
|
|
215
226
|
handshake: (data: HandshakeData) => void;
|
|
216
227
|
packet: (packet: Packet) => void;
|
|
@@ -229,43 +240,38 @@ interface SocketReservedEvents {
|
|
|
229
240
|
close: (reason: string, description?: CloseDetails | Error) => void;
|
|
230
241
|
}
|
|
231
242
|
type SocketState = "opening" | "open" | "closing" | "closed";
|
|
232
|
-
interface WriteOptions {
|
|
243
|
+
export interface WriteOptions {
|
|
233
244
|
compress?: boolean;
|
|
234
245
|
}
|
|
235
246
|
/**
|
|
236
247
|
* This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
|
|
237
|
-
* with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
|
|
248
|
+
* with one of the available low-level transports, like HTTP long-polling, WebSocket, or WebTransport.
|
|
238
249
|
*
|
|
239
|
-
* This class comes
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
* In order to allow tree-shaking, there are no transports included, that's why the `transports` option is mandatory.
|
|
250
|
+
* This class comes with an upgrade mechanism, which means that once the connection is established with the first
|
|
251
|
+
* low-level transport, it will try to upgrade to a better transport.
|
|
243
252
|
*
|
|
244
253
|
* @example
|
|
245
|
-
* import {
|
|
254
|
+
* import { Socket } from "engine.io-client";
|
|
246
255
|
*
|
|
247
|
-
* const socket = new
|
|
248
|
-
* transports: [WebSocket]
|
|
249
|
-
* });
|
|
256
|
+
* const socket = new Socket();
|
|
250
257
|
*
|
|
251
258
|
* socket.on("open", () => {
|
|
252
259
|
* socket.send("hello");
|
|
253
260
|
* });
|
|
254
261
|
*
|
|
255
|
-
* @see SocketWithUpgrade
|
|
256
|
-
* @see Socket
|
|
257
262
|
*/
|
|
258
|
-
export declare class
|
|
263
|
+
export declare class Socket extends Emitter<Record<never, never>, Record<never, never>, SocketReservedEvents> {
|
|
259
264
|
id: string;
|
|
260
265
|
transport: Transport;
|
|
261
266
|
binaryType: BinaryType;
|
|
262
267
|
readyState: SocketState;
|
|
263
268
|
writeBuffer: Packet[];
|
|
264
|
-
protected readonly opts:
|
|
265
|
-
protected readonly transports:
|
|
269
|
+
protected readonly opts: SocketOptions;
|
|
270
|
+
protected readonly transports: TransportName[];
|
|
266
271
|
protected upgrading: boolean;
|
|
267
272
|
protected setTimeoutFn: typeof setTimeout;
|
|
268
273
|
private _prevBufferLen;
|
|
274
|
+
private _upgrades;
|
|
269
275
|
private _pingInterval;
|
|
270
276
|
private _pingTimeout;
|
|
271
277
|
private _maxPayload?;
|
|
@@ -294,7 +300,9 @@ export declare class SocketWithoutUpgrade extends Emitter<Record<never, never>,
|
|
|
294
300
|
* @param {String|Object} uri - uri or options
|
|
295
301
|
* @param {Object} opts - options
|
|
296
302
|
*/
|
|
297
|
-
constructor(
|
|
303
|
+
constructor();
|
|
304
|
+
constructor(uri: string, opts?: SocketOptions);
|
|
305
|
+
constructor(opts: SocketOptions);
|
|
298
306
|
/**
|
|
299
307
|
* Creates transport of the given type.
|
|
300
308
|
*
|
|
@@ -315,6 +323,13 @@ export declare class SocketWithoutUpgrade extends Emitter<Record<never, never>,
|
|
|
315
323
|
* @private
|
|
316
324
|
*/
|
|
317
325
|
protected setTransport(transport: Transport): void;
|
|
326
|
+
/**
|
|
327
|
+
* Probes a transport.
|
|
328
|
+
*
|
|
329
|
+
* @param {String} name - transport name
|
|
330
|
+
* @private
|
|
331
|
+
*/
|
|
332
|
+
private _probe;
|
|
318
333
|
/**
|
|
319
334
|
* Called when connection is deemed open.
|
|
320
335
|
*
|
|
@@ -390,7 +405,7 @@ export declare class SocketWithoutUpgrade extends Emitter<Record<never, never>,
|
|
|
390
405
|
/**
|
|
391
406
|
* Sends a packet.
|
|
392
407
|
*
|
|
393
|
-
* @param {String} type
|
|
408
|
+
* @param {String} type - packet type.
|
|
394
409
|
* @param {String} data.
|
|
395
410
|
* @param {Object} options.
|
|
396
411
|
* @param {Function} fn - callback function.
|
|
@@ -413,41 +428,6 @@ export declare class SocketWithoutUpgrade extends Emitter<Record<never, never>,
|
|
|
413
428
|
* @private
|
|
414
429
|
*/
|
|
415
430
|
private _onClose;
|
|
416
|
-
}
|
|
417
|
-
/**
|
|
418
|
-
* This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
|
|
419
|
-
* with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
|
|
420
|
-
*
|
|
421
|
-
* This class comes with an upgrade mechanism, which means that once the connection is established with the first
|
|
422
|
-
* low-level transport, it will try to upgrade to a better transport.
|
|
423
|
-
*
|
|
424
|
-
* In order to allow tree-shaking, there are no transports included, that's why the `transports` option is mandatory.
|
|
425
|
-
*
|
|
426
|
-
* @example
|
|
427
|
-
* import { SocketWithUpgrade, WebSocket } from "engine.io-client";
|
|
428
|
-
*
|
|
429
|
-
* const socket = new SocketWithUpgrade({
|
|
430
|
-
* transports: [WebSocket]
|
|
431
|
-
* });
|
|
432
|
-
*
|
|
433
|
-
* socket.on("open", () => {
|
|
434
|
-
* socket.send("hello");
|
|
435
|
-
* });
|
|
436
|
-
*
|
|
437
|
-
* @see SocketWithoutUpgrade
|
|
438
|
-
* @see Socket
|
|
439
|
-
*/
|
|
440
|
-
export declare class SocketWithUpgrade extends SocketWithoutUpgrade {
|
|
441
|
-
private _upgrades;
|
|
442
|
-
onOpen(): void;
|
|
443
|
-
/**
|
|
444
|
-
* Probes a transport.
|
|
445
|
-
*
|
|
446
|
-
* @param {String} name - transport name
|
|
447
|
-
* @private
|
|
448
|
-
*/
|
|
449
|
-
private _probe;
|
|
450
|
-
onHandshake(data: HandshakeData): void;
|
|
451
431
|
/**
|
|
452
432
|
* Filters upgrades, returning only those matching client transports.
|
|
453
433
|
*
|
|
@@ -456,27 +436,4 @@ export declare class SocketWithUpgrade extends SocketWithoutUpgrade {
|
|
|
456
436
|
*/
|
|
457
437
|
private _filterUpgrades;
|
|
458
438
|
}
|
|
459
|
-
/**
|
|
460
|
-
* This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
|
|
461
|
-
* with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
|
|
462
|
-
*
|
|
463
|
-
* This class comes with an upgrade mechanism, which means that once the connection is established with the first
|
|
464
|
-
* low-level transport, it will try to upgrade to a better transport.
|
|
465
|
-
*
|
|
466
|
-
* @example
|
|
467
|
-
* import { Socket } from "engine.io-client";
|
|
468
|
-
*
|
|
469
|
-
* const socket = new Socket();
|
|
470
|
-
*
|
|
471
|
-
* socket.on("open", () => {
|
|
472
|
-
* socket.send("hello");
|
|
473
|
-
* });
|
|
474
|
-
*
|
|
475
|
-
* @see SocketWithoutUpgrade
|
|
476
|
-
* @see SocketWithUpgrade
|
|
477
|
-
*/
|
|
478
|
-
export declare class Socket extends SocketWithUpgrade {
|
|
479
|
-
constructor(uri?: string, opts?: SocketOptions);
|
|
480
|
-
constructor(opts: SocketOptions);
|
|
481
|
-
}
|
|
482
439
|
export {};
|