lightclawbot 1.1.2 → 1.2.0-beta.1
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/README.md +0 -1
- package/dist/index.js +38 -31
- package/dist/setup-entry.js +32 -0
- package/dist/src/channel.js +166 -253
- package/dist/src/channel.setup.js +16 -0
- package/dist/src/config.js +31 -124
- package/dist/src/dedup.js +0 -1
- package/dist/src/download-tool.js +0 -1
- package/dist/src/file-storage.js +2 -2
- package/dist/src/gateway.js +224 -178
- package/dist/src/history/cron-utils.js +0 -1
- package/dist/src/history/index.js +0 -1
- package/dist/src/history/message-parser.js +0 -1
- package/dist/src/history/session-reader.js +3 -1
- package/dist/src/history/session-store.js +0 -1
- package/dist/src/history/text-processing.js +0 -1
- package/dist/src/history/types.js +0 -1
- package/dist/src/inbound.js +165 -234
- package/dist/src/media.js +0 -1
- package/dist/src/messaging.js +65 -0
- package/dist/src/outbound.js +129 -45
- package/dist/src/runtime.js +9 -11
- package/dist/src/setup-core.js +27 -0
- package/dist/src/shared.js +141 -0
- package/dist/src/socket/handlers.js +72 -49
- package/dist/src/socket/index.js +0 -1
- package/dist/src/socket/native-socket.js +385 -0
- package/dist/src/socket/registry.js +0 -1
- package/dist/src/socket/reliable-emitter.js +188 -50
- package/dist/src/streaming/delta-tracker.js +140 -0
- package/dist/src/streaming/index.js +12 -0
- package/dist/src/streaming/stream-reply-sink.js +387 -0
- package/dist/src/streaming/types.js +4 -0
- package/dist/src/tools.js +13 -0
- package/dist/src/types.js +22 -2
- package/dist/src/upload-tool.js +0 -1
- package/dist/src/utils/account.js +73 -0
- package/dist/src/utils/common.js +48 -0
- package/dist/src/utils/index.js +2 -0
- package/node_modules/ws/index.js +22 -0
- package/node_modules/{engine.io-client/node_modules/ws → ws}/lib/constants.js +1 -0
- package/node_modules/{engine.io-client/node_modules/ws → ws}/lib/permessage-deflate.js +6 -6
- package/node_modules/{engine.io-client/node_modules/ws → ws}/lib/websocket-server.js +10 -6
- package/node_modules/{engine.io-client/node_modules/ws → ws}/lib/websocket.js +19 -14
- package/node_modules/{engine.io-client/node_modules/ws → ws}/package.json +4 -3
- package/node_modules/ws/wrapper.mjs +21 -0
- package/openclaw.plugin.json +0 -7
- package/package.json +8 -5
- package/dist/index.d.ts +0 -24
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/public/data/scripts/manifest.json +0 -11
- package/dist/public/data/scripts/preflight.9af62b39.sh +0 -191
- package/dist/public/data/scripts/preflight.sh +0 -191
- package/dist/src/channel.d.ts +0 -11
- package/dist/src/channel.d.ts.map +0 -1
- package/dist/src/channel.js.map +0 -1
- package/dist/src/config.d.ts +0 -129
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js.map +0 -1
- package/dist/src/dedup.d.ts +0 -12
- package/dist/src/dedup.d.ts.map +0 -1
- package/dist/src/dedup.js.map +0 -1
- package/dist/src/download-tool.d.ts +0 -32
- package/dist/src/download-tool.d.ts.map +0 -1
- package/dist/src/download-tool.js.map +0 -1
- package/dist/src/file-storage.d.ts +0 -74
- package/dist/src/file-storage.d.ts.map +0 -1
- package/dist/src/file-storage.js.map +0 -1
- package/dist/src/format-urls.d.ts +0 -26
- package/dist/src/format-urls.d.ts.map +0 -1
- package/dist/src/format-urls.js +0 -53
- package/dist/src/format-urls.js.map +0 -1
- package/dist/src/gateway.d.ts +0 -16
- package/dist/src/gateway.d.ts.map +0 -1
- package/dist/src/gateway.js.map +0 -1
- package/dist/src/history/cron-utils.d.ts +0 -76
- package/dist/src/history/cron-utils.d.ts.map +0 -1
- package/dist/src/history/cron-utils.js.map +0 -1
- package/dist/src/history/index.d.ts +0 -20
- package/dist/src/history/index.d.ts.map +0 -1
- package/dist/src/history/index.js.map +0 -1
- package/dist/src/history/message-parser.d.ts +0 -52
- package/dist/src/history/message-parser.d.ts.map +0 -1
- package/dist/src/history/message-parser.js.map +0 -1
- package/dist/src/history/session-reader.d.ts +0 -58
- package/dist/src/history/session-reader.d.ts.map +0 -1
- package/dist/src/history/session-reader.js.map +0 -1
- package/dist/src/history/session-store.d.ts +0 -42
- package/dist/src/history/session-store.d.ts.map +0 -1
- package/dist/src/history/session-store.js.map +0 -1
- package/dist/src/history/text-processing.d.ts +0 -41
- package/dist/src/history/text-processing.d.ts.map +0 -1
- package/dist/src/history/text-processing.js.map +0 -1
- package/dist/src/history/types.d.ts +0 -134
- package/dist/src/history/types.d.ts.map +0 -1
- package/dist/src/history/types.js.map +0 -1
- package/dist/src/inbound.d.ts +0 -18
- package/dist/src/inbound.d.ts.map +0 -1
- package/dist/src/inbound.js.map +0 -1
- package/dist/src/media.d.ts +0 -12
- package/dist/src/media.d.ts.map +0 -1
- package/dist/src/media.js.map +0 -1
- package/dist/src/outbound.d.ts +0 -28
- package/dist/src/outbound.d.ts.map +0 -1
- package/dist/src/outbound.js.map +0 -1
- package/dist/src/runtime.d.ts +0 -4
- package/dist/src/runtime.d.ts.map +0 -1
- package/dist/src/runtime.js.map +0 -1
- package/dist/src/socket/handlers.d.ts +0 -26
- package/dist/src/socket/handlers.d.ts.map +0 -1
- package/dist/src/socket/handlers.js.map +0 -1
- package/dist/src/socket/index.d.ts +0 -11
- package/dist/src/socket/index.d.ts.map +0 -1
- package/dist/src/socket/index.js.map +0 -1
- package/dist/src/socket/registry.d.ts +0 -59
- package/dist/src/socket/registry.d.ts.map +0 -1
- package/dist/src/socket/registry.js.map +0 -1
- package/dist/src/socket/reliable-emitter.d.ts +0 -79
- package/dist/src/socket/reliable-emitter.d.ts.map +0 -1
- package/dist/src/socket/reliable-emitter.js.map +0 -1
- package/dist/src/types.d.ts +0 -112
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js.map +0 -1
- package/dist/src/upload-tool.d.ts +0 -27
- package/dist/src/upload-tool.d.ts.map +0 -1
- package/dist/src/upload-tool.js.map +0 -1
- package/node_modules/@socket.io/component-emitter/LICENSE +0 -24
- package/node_modules/@socket.io/component-emitter/Readme.md +0 -79
- package/node_modules/@socket.io/component-emitter/lib/cjs/index.d.ts +0 -179
- package/node_modules/@socket.io/component-emitter/lib/cjs/index.js +0 -176
- package/node_modules/@socket.io/component-emitter/lib/cjs/package.json +0 -4
- package/node_modules/@socket.io/component-emitter/lib/esm/index.d.ts +0 -179
- package/node_modules/@socket.io/component-emitter/lib/esm/index.js +0 -169
- package/node_modules/@socket.io/component-emitter/lib/esm/package.json +0 -4
- package/node_modules/@socket.io/component-emitter/package.json +0 -28
- package/node_modules/debug/LICENSE +0 -20
- package/node_modules/debug/README.md +0 -481
- package/node_modules/debug/package.json +0 -64
- package/node_modules/debug/src/browser.js +0 -272
- package/node_modules/debug/src/common.js +0 -292
- package/node_modules/debug/src/index.js +0 -10
- package/node_modules/debug/src/node.js +0 -263
- package/node_modules/engine.io-client/LICENSE +0 -22
- package/node_modules/engine.io-client/README.md +0 -331
- package/node_modules/engine.io-client/build/cjs/browser-entrypoint.d.ts +0 -3
- package/node_modules/engine.io-client/build/cjs/browser-entrypoint.js +0 -4
- package/node_modules/engine.io-client/build/cjs/contrib/has-cors.d.ts +0 -1
- package/node_modules/engine.io-client/build/cjs/contrib/has-cors.js +0 -14
- package/node_modules/engine.io-client/build/cjs/contrib/parseqs.d.ts +0 -15
- package/node_modules/engine.io-client/build/cjs/contrib/parseqs.js +0 -38
- package/node_modules/engine.io-client/build/cjs/contrib/parseuri.d.ts +0 -1
- package/node_modules/engine.io-client/build/cjs/contrib/parseuri.js +0 -67
- package/node_modules/engine.io-client/build/cjs/globals.d.ts +0 -4
- package/node_modules/engine.io-client/build/cjs/globals.js +0 -26
- package/node_modules/engine.io-client/build/cjs/globals.node.d.ts +0 -21
- package/node_modules/engine.io-client/build/cjs/globals.node.js +0 -97
- package/node_modules/engine.io-client/build/cjs/index.d.ts +0 -15
- package/node_modules/engine.io-client/build/cjs/index.js +0 -32
- package/node_modules/engine.io-client/build/cjs/package.json +0 -10
- package/node_modules/engine.io-client/build/cjs/socket.d.ts +0 -482
- package/node_modules/engine.io-client/build/cjs/socket.js +0 -765
- package/node_modules/engine.io-client/build/cjs/transport.d.ts +0 -106
- package/node_modules/engine.io-client/build/cjs/transport.js +0 -153
- package/node_modules/engine.io-client/build/cjs/transports/index.d.ts +0 -8
- package/node_modules/engine.io-client/build/cjs/transports/index.js +0 -11
- package/node_modules/engine.io-client/build/cjs/transports/polling-fetch.d.ts +0 -15
- package/node_modules/engine.io-client/build/cjs/transports/polling-fetch.js +0 -60
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.d.ts +0 -108
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.js +0 -285
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.d.ts +0 -11
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.js +0 -44
- package/node_modules/engine.io-client/build/cjs/transports/polling.d.ts +0 -52
- package/node_modules/engine.io-client/build/cjs/transports/polling.js +0 -165
- package/node_modules/engine.io-client/build/cjs/transports/websocket.d.ts +0 -36
- package/node_modules/engine.io-client/build/cjs/transports/websocket.js +0 -136
- package/node_modules/engine.io-client/build/cjs/transports/websocket.node.d.ts +0 -14
- package/node_modules/engine.io-client/build/cjs/transports/websocket.node.js +0 -68
- package/node_modules/engine.io-client/build/cjs/transports/webtransport.d.ts +0 -18
- package/node_modules/engine.io-client/build/cjs/transports/webtransport.js +0 -94
- package/node_modules/engine.io-client/build/cjs/util.d.ts +0 -7
- package/node_modules/engine.io-client/build/cjs/util.js +0 -65
- package/node_modules/engine.io-client/build/esm/browser-entrypoint.d.ts +0 -3
- package/node_modules/engine.io-client/build/esm/browser-entrypoint.js +0 -2
- package/node_modules/engine.io-client/build/esm/contrib/has-cors.d.ts +0 -1
- package/node_modules/engine.io-client/build/esm/contrib/has-cors.js +0 -11
- package/node_modules/engine.io-client/build/esm/contrib/parseqs.d.ts +0 -15
- package/node_modules/engine.io-client/build/esm/contrib/parseqs.js +0 -34
- package/node_modules/engine.io-client/build/esm/contrib/parseuri.d.ts +0 -1
- package/node_modules/engine.io-client/build/esm/contrib/parseuri.js +0 -64
- package/node_modules/engine.io-client/build/esm/globals.d.ts +0 -4
- package/node_modules/engine.io-client/build/esm/globals.js +0 -22
- package/node_modules/engine.io-client/build/esm/globals.node.d.ts +0 -21
- package/node_modules/engine.io-client/build/esm/globals.node.js +0 -91
- package/node_modules/engine.io-client/build/esm/index.d.ts +0 -15
- package/node_modules/engine.io-client/build/esm/index.js +0 -15
- package/node_modules/engine.io-client/build/esm/package.json +0 -10
- package/node_modules/engine.io-client/build/esm/socket.d.ts +0 -482
- package/node_modules/engine.io-client/build/esm/socket.js +0 -727
- package/node_modules/engine.io-client/build/esm/transport.d.ts +0 -106
- package/node_modules/engine.io-client/build/esm/transport.js +0 -142
- package/node_modules/engine.io-client/build/esm/transports/index.d.ts +0 -8
- package/node_modules/engine.io-client/build/esm/transports/index.js +0 -8
- package/node_modules/engine.io-client/build/esm/transports/polling-fetch.d.ts +0 -15
- package/node_modules/engine.io-client/build/esm/transports/polling-fetch.js +0 -56
- package/node_modules/engine.io-client/build/esm/transports/polling-xhr.d.ts +0 -108
- package/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +0 -271
- package/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.d.ts +0 -11
- package/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.js +0 -17
- package/node_modules/engine.io-client/build/esm/transports/polling.d.ts +0 -52
- package/node_modules/engine.io-client/build/esm/transports/polling.js +0 -145
- package/node_modules/engine.io-client/build/esm/transports/websocket.d.ts +0 -36
- package/node_modules/engine.io-client/build/esm/transports/websocket.js +0 -125
- package/node_modules/engine.io-client/build/esm/transports/websocket.node.d.ts +0 -14
- package/node_modules/engine.io-client/build/esm/transports/websocket.node.js +0 -41
- package/node_modules/engine.io-client/build/esm/transports/webtransport.d.ts +0 -18
- package/node_modules/engine.io-client/build/esm/transports/webtransport.js +0 -80
- package/node_modules/engine.io-client/build/esm/util.d.ts +0 -7
- package/node_modules/engine.io-client/build/esm/util.js +0 -59
- package/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.d.ts +0 -3
- package/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.js +0 -2
- package/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.d.ts +0 -1
- package/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.js +0 -11
- package/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.d.ts +0 -15
- package/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.js +0 -34
- package/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.d.ts +0 -1
- package/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.js +0 -64
- package/node_modules/engine.io-client/build/esm-debug/globals.d.ts +0 -4
- package/node_modules/engine.io-client/build/esm-debug/globals.js +0 -22
- package/node_modules/engine.io-client/build/esm-debug/globals.node.d.ts +0 -21
- package/node_modules/engine.io-client/build/esm-debug/globals.node.js +0 -91
- package/node_modules/engine.io-client/build/esm-debug/index.d.ts +0 -15
- package/node_modules/engine.io-client/build/esm-debug/index.js +0 -15
- package/node_modules/engine.io-client/build/esm-debug/package.json +0 -10
- package/node_modules/engine.io-client/build/esm-debug/socket.d.ts +0 -482
- package/node_modules/engine.io-client/build/esm-debug/socket.js +0 -756
- package/node_modules/engine.io-client/build/esm-debug/transport.d.ts +0 -106
- package/node_modules/engine.io-client/build/esm-debug/transport.js +0 -145
- package/node_modules/engine.io-client/build/esm-debug/transports/index.d.ts +0 -8
- package/node_modules/engine.io-client/build/esm-debug/transports/index.js +0 -8
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-fetch.d.ts +0 -15
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-fetch.js +0 -56
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.d.ts +0 -108
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.js +0 -276
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.d.ts +0 -11
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.js +0 -17
- package/node_modules/engine.io-client/build/esm-debug/transports/polling.d.ts +0 -52
- package/node_modules/engine.io-client/build/esm-debug/transports/polling.js +0 -158
- package/node_modules/engine.io-client/build/esm-debug/transports/websocket.d.ts +0 -36
- package/node_modules/engine.io-client/build/esm-debug/transports/websocket.js +0 -128
- package/node_modules/engine.io-client/build/esm-debug/transports/websocket.node.d.ts +0 -14
- package/node_modules/engine.io-client/build/esm-debug/transports/websocket.node.js +0 -41
- package/node_modules/engine.io-client/build/esm-debug/transports/webtransport.d.ts +0 -18
- package/node_modules/engine.io-client/build/esm-debug/transports/webtransport.js +0 -87
- package/node_modules/engine.io-client/build/esm-debug/util.d.ts +0 -7
- package/node_modules/engine.io-client/build/esm-debug/util.js +0 -59
- package/node_modules/engine.io-client/dist/engine.io.esm.min.js +0 -7
- package/node_modules/engine.io-client/dist/engine.io.esm.min.js.map +0 -1
- package/node_modules/engine.io-client/dist/engine.io.js +0 -3064
- package/node_modules/engine.io-client/dist/engine.io.js.map +0 -1
- package/node_modules/engine.io-client/dist/engine.io.min.js +0 -7
- package/node_modules/engine.io-client/dist/engine.io.min.js.map +0 -1
- package/node_modules/engine.io-client/node_modules/ws/index.js +0 -13
- package/node_modules/engine.io-client/node_modules/ws/wrapper.mjs +0 -8
- package/node_modules/engine.io-client/package.json +0 -95
- package/node_modules/engine.io-parser/LICENSE +0 -22
- package/node_modules/engine.io-parser/Readme.md +0 -158
- package/node_modules/engine.io-parser/build/cjs/commons.d.ts +0 -14
- package/node_modules/engine.io-parser/build/cjs/commons.js +0 -19
- package/node_modules/engine.io-parser/build/cjs/contrib/base64-arraybuffer.d.ts +0 -2
- package/node_modules/engine.io-parser/build/cjs/contrib/base64-arraybuffer.js +0 -48
- package/node_modules/engine.io-parser/build/cjs/decodePacket.browser.d.ts +0 -2
- package/node_modules/engine.io-parser/build/cjs/decodePacket.browser.js +0 -66
- package/node_modules/engine.io-parser/build/cjs/decodePacket.d.ts +0 -2
- package/node_modules/engine.io-parser/build/cjs/decodePacket.js +0 -59
- package/node_modules/engine.io-parser/build/cjs/encodePacket.browser.d.ts +0 -4
- package/node_modules/engine.io-parser/build/cjs/encodePacket.browser.js +0 -72
- package/node_modules/engine.io-parser/build/cjs/encodePacket.d.ts +0 -3
- package/node_modules/engine.io-parser/build/cjs/encodePacket.js +0 -38
- package/node_modules/engine.io-parser/build/cjs/index.d.ts +0 -9
- package/node_modules/engine.io-parser/build/cjs/index.js +0 -164
- package/node_modules/engine.io-parser/build/cjs/package.json +0 -8
- package/node_modules/engine.io-parser/build/esm/commons.d.ts +0 -14
- package/node_modules/engine.io-parser/build/esm/commons.js +0 -14
- package/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.d.ts +0 -2
- package/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js +0 -43
- package/node_modules/engine.io-parser/build/esm/decodePacket.browser.d.ts +0 -2
- package/node_modules/engine.io-parser/build/esm/decodePacket.browser.js +0 -62
- package/node_modules/engine.io-parser/build/esm/decodePacket.d.ts +0 -2
- package/node_modules/engine.io-parser/build/esm/decodePacket.js +0 -55
- package/node_modules/engine.io-parser/build/esm/encodePacket.browser.d.ts +0 -4
- package/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +0 -68
- package/node_modules/engine.io-parser/build/esm/encodePacket.d.ts +0 -3
- package/node_modules/engine.io-parser/build/esm/encodePacket.js +0 -33
- package/node_modules/engine.io-parser/build/esm/index.d.ts +0 -9
- package/node_modules/engine.io-parser/build/esm/index.js +0 -156
- package/node_modules/engine.io-parser/build/esm/package.json +0 -8
- package/node_modules/engine.io-parser/package.json +0 -46
- package/node_modules/ms/index.js +0 -162
- package/node_modules/ms/license.md +0 -21
- package/node_modules/ms/package.json +0 -38
- package/node_modules/ms/readme.md +0 -59
- package/node_modules/socket.io-client/LICENSE +0 -21
- package/node_modules/socket.io-client/README.md +0 -29
- package/node_modules/socket.io-client/build/cjs/browser-entrypoint.d.ts +0 -2
- package/node_modules/socket.io-client/build/cjs/browser-entrypoint.js +0 -4
- package/node_modules/socket.io-client/build/cjs/contrib/backo2.d.ts +0 -12
- package/node_modules/socket.io-client/build/cjs/contrib/backo2.js +0 -69
- package/node_modules/socket.io-client/build/cjs/index.d.ts +0 -29
- package/node_modules/socket.io-client/build/cjs/index.js +0 -76
- package/node_modules/socket.io-client/build/cjs/manager.d.ts +0 -295
- package/node_modules/socket.io-client/build/cjs/manager.js +0 -416
- package/node_modules/socket.io-client/build/cjs/on.d.ts +0 -2
- package/node_modules/socket.io-client/build/cjs/on.js +0 -9
- package/node_modules/socket.io-client/build/cjs/socket.d.ts +0 -593
- package/node_modules/socket.io-client/build/cjs/socket.js +0 -909
- package/node_modules/socket.io-client/build/cjs/url.d.ts +0 -33
- package/node_modules/socket.io-client/build/cjs/url.js +0 -69
- package/node_modules/socket.io-client/build/esm/browser-entrypoint.d.ts +0 -2
- package/node_modules/socket.io-client/build/esm/browser-entrypoint.js +0 -2
- package/node_modules/socket.io-client/build/esm/contrib/backo2.d.ts +0 -12
- package/node_modules/socket.io-client/build/esm/contrib/backo2.js +0 -66
- package/node_modules/socket.io-client/build/esm/index.d.ts +0 -29
- package/node_modules/socket.io-client/build/esm/index.js +0 -58
- package/node_modules/socket.io-client/build/esm/manager.d.ts +0 -295
- package/node_modules/socket.io-client/build/esm/manager.js +0 -367
- package/node_modules/socket.io-client/build/esm/on.d.ts +0 -2
- package/node_modules/socket.io-client/build/esm/on.js +0 -6
- package/node_modules/socket.io-client/build/esm/package.json +0 -5
- package/node_modules/socket.io-client/build/esm/socket.d.ts +0 -593
- package/node_modules/socket.io-client/build/esm/socket.js +0 -880
- package/node_modules/socket.io-client/build/esm/url.d.ts +0 -33
- package/node_modules/socket.io-client/build/esm/url.js +0 -59
- package/node_modules/socket.io-client/build/esm-debug/browser-entrypoint.d.ts +0 -2
- package/node_modules/socket.io-client/build/esm-debug/browser-entrypoint.js +0 -2
- package/node_modules/socket.io-client/build/esm-debug/contrib/backo2.d.ts +0 -12
- package/node_modules/socket.io-client/build/esm-debug/contrib/backo2.js +0 -66
- package/node_modules/socket.io-client/build/esm-debug/index.d.ts +0 -29
- package/node_modules/socket.io-client/build/esm-debug/index.js +0 -62
- package/node_modules/socket.io-client/build/esm-debug/manager.d.ts +0 -295
- package/node_modules/socket.io-client/build/esm-debug/manager.js +0 -386
- package/node_modules/socket.io-client/build/esm-debug/on.d.ts +0 -2
- package/node_modules/socket.io-client/build/esm-debug/on.js +0 -6
- package/node_modules/socket.io-client/build/esm-debug/package.json +0 -5
- package/node_modules/socket.io-client/build/esm-debug/socket.d.ts +0 -593
- package/node_modules/socket.io-client/build/esm-debug/socket.js +0 -902
- package/node_modules/socket.io-client/build/esm-debug/url.d.ts +0 -33
- package/node_modules/socket.io-client/build/esm-debug/url.js +0 -63
- package/node_modules/socket.io-client/dist/socket.io.esm.min.js +0 -7
- package/node_modules/socket.io-client/dist/socket.io.esm.min.js.map +0 -1
- package/node_modules/socket.io-client/dist/socket.io.js +0 -4955
- package/node_modules/socket.io-client/dist/socket.io.js.map +0 -1
- package/node_modules/socket.io-client/dist/socket.io.min.js +0 -7
- package/node_modules/socket.io-client/dist/socket.io.min.js.map +0 -1
- package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js +0 -7
- package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js.map +0 -1
- package/node_modules/socket.io-client/package.json +0 -101
- package/node_modules/socket.io-parser/LICENSE +0 -20
- package/node_modules/socket.io-parser/Readme.md +0 -81
- package/node_modules/socket.io-parser/build/cjs/binary.d.ts +0 -20
- package/node_modules/socket.io-parser/build/cjs/binary.js +0 -87
- package/node_modules/socket.io-parser/build/cjs/index.d.ts +0 -101
- package/node_modules/socket.io-parser/build/cjs/index.js +0 -367
- package/node_modules/socket.io-parser/build/cjs/is-binary.d.ts +0 -7
- package/node_modules/socket.io-parser/build/cjs/is-binary.js +0 -54
- package/node_modules/socket.io-parser/build/cjs/package.json +0 -3
- package/node_modules/socket.io-parser/build/esm/binary.d.ts +0 -20
- package/node_modules/socket.io-parser/build/esm/binary.js +0 -83
- package/node_modules/socket.io-parser/build/esm/index.d.ts +0 -101
- package/node_modules/socket.io-parser/build/esm/index.js +0 -356
- package/node_modules/socket.io-parser/build/esm/is-binary.d.ts +0 -7
- package/node_modules/socket.io-parser/build/esm/is-binary.js +0 -50
- package/node_modules/socket.io-parser/build/esm/package.json +0 -3
- package/node_modules/socket.io-parser/build/esm-debug/binary.d.ts +0 -20
- package/node_modules/socket.io-parser/build/esm-debug/binary.js +0 -83
- package/node_modules/socket.io-parser/build/esm-debug/index.d.ts +0 -101
- package/node_modules/socket.io-parser/build/esm-debug/index.js +0 -361
- package/node_modules/socket.io-parser/build/esm-debug/is-binary.d.ts +0 -7
- package/node_modules/socket.io-parser/build/esm-debug/is-binary.js +0 -50
- package/node_modules/socket.io-parser/build/esm-debug/package.json +0 -3
- package/node_modules/socket.io-parser/package.json +0 -44
- package/node_modules/xmlhttprequest-ssl/LICENSE +0 -22
- package/node_modules/xmlhttprequest-ssl/README.md +0 -67
- package/node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js +0 -689
- package/node_modules/xmlhttprequest-ssl/package.json +0 -40
- /package/node_modules/{engine.io-client/node_modules/ws → ws}/LICENSE +0 -0
- /package/node_modules/{engine.io-client/node_modules/ws → ws}/README.md +0 -0
- /package/node_modules/{engine.io-client/node_modules/ws → ws}/browser.js +0 -0
- /package/node_modules/{engine.io-client/node_modules/ws → ws}/lib/buffer-util.js +0 -0
- /package/node_modules/{engine.io-client/node_modules/ws → ws}/lib/event-target.js +0 -0
- /package/node_modules/{engine.io-client/node_modules/ws → ws}/lib/extension.js +0 -0
- /package/node_modules/{engine.io-client/node_modules/ws → ws}/lib/limiter.js +0 -0
- /package/node_modules/{engine.io-client/node_modules/ws → ws}/lib/receiver.js +0 -0
- /package/node_modules/{engine.io-client/node_modules/ws → ws}/lib/sender.js +0 -0
- /package/node_modules/{engine.io-client/node_modules/ws → ws}/lib/stream.js +0 -0
- /package/node_modules/{engine.io-client/node_modules/ws → ws}/lib/subprotocol.js +0 -0
- /package/node_modules/{engine.io-client/node_modules/ws → ws}/lib/validation.js +0 -0
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2014-present Guillermo Rauch and Socket.IO contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# socket.io-client
|
|
3
|
-
|
|
4
|
-
[](https://github.com/socketio/socket.io-client/actions)
|
|
5
|
-
[](https://www.npmjs.com/package/socket.io-client)
|
|
6
|
-

|
|
7
|
-
[](http://slack.socket.io)
|
|
8
|
-
|
|
9
|
-
[](https://saucelabs.com/u/socket)
|
|
10
|
-
|
|
11
|
-
## Documentation
|
|
12
|
-
|
|
13
|
-
Please see the documentation [here](https://socket.io/docs/v4/client-initialization/).
|
|
14
|
-
|
|
15
|
-
The source code of the website can be found [here](https://github.com/socketio/socket.io-website). Contributions are welcome!
|
|
16
|
-
|
|
17
|
-
## Debug / logging
|
|
18
|
-
|
|
19
|
-
In order to see all the client debug output, run the following command on the browser console – including the desired scope – and reload your app page:
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
localStorage.debug = '*';
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
And then, filter by the scopes you're interested in. See also: https://socket.io/docs/v4/logging-and-debugging/
|
|
26
|
-
|
|
27
|
-
## License
|
|
28
|
-
|
|
29
|
-
[MIT](/LICENSE)
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Initialize backoff timer with `opts`.
|
|
3
|
-
*
|
|
4
|
-
* - `min` initial timeout in milliseconds [100]
|
|
5
|
-
* - `max` max timeout [10000]
|
|
6
|
-
* - `jitter` [0]
|
|
7
|
-
* - `factor` [2]
|
|
8
|
-
*
|
|
9
|
-
* @param {Object} opts
|
|
10
|
-
* @api public
|
|
11
|
-
*/
|
|
12
|
-
export declare function Backoff(opts: any): void;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Initialize backoff timer with `opts`.
|
|
4
|
-
*
|
|
5
|
-
* - `min` initial timeout in milliseconds [100]
|
|
6
|
-
* - `max` max timeout [10000]
|
|
7
|
-
* - `jitter` [0]
|
|
8
|
-
* - `factor` [2]
|
|
9
|
-
*
|
|
10
|
-
* @param {Object} opts
|
|
11
|
-
* @api public
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.Backoff = Backoff;
|
|
15
|
-
function Backoff(opts) {
|
|
16
|
-
opts = opts || {};
|
|
17
|
-
this.ms = opts.min || 100;
|
|
18
|
-
this.max = opts.max || 10000;
|
|
19
|
-
this.factor = opts.factor || 2;
|
|
20
|
-
this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;
|
|
21
|
-
this.attempts = 0;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Return the backoff duration.
|
|
25
|
-
*
|
|
26
|
-
* @return {Number}
|
|
27
|
-
* @api public
|
|
28
|
-
*/
|
|
29
|
-
Backoff.prototype.duration = function () {
|
|
30
|
-
var ms = this.ms * Math.pow(this.factor, this.attempts++);
|
|
31
|
-
if (this.jitter) {
|
|
32
|
-
var rand = Math.random();
|
|
33
|
-
var deviation = Math.floor(rand * this.jitter * ms);
|
|
34
|
-
ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation;
|
|
35
|
-
}
|
|
36
|
-
return Math.min(ms, this.max) | 0;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Reset the number of attempts.
|
|
40
|
-
*
|
|
41
|
-
* @api public
|
|
42
|
-
*/
|
|
43
|
-
Backoff.prototype.reset = function () {
|
|
44
|
-
this.attempts = 0;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Set the minimum duration
|
|
48
|
-
*
|
|
49
|
-
* @api public
|
|
50
|
-
*/
|
|
51
|
-
Backoff.prototype.setMin = function (min) {
|
|
52
|
-
this.ms = min;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Set the maximum duration
|
|
56
|
-
*
|
|
57
|
-
* @api public
|
|
58
|
-
*/
|
|
59
|
-
Backoff.prototype.setMax = function (max) {
|
|
60
|
-
this.max = max;
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Set the jitter
|
|
64
|
-
*
|
|
65
|
-
* @api public
|
|
66
|
-
*/
|
|
67
|
-
Backoff.prototype.setJitter = function (jitter) {
|
|
68
|
-
this.jitter = jitter;
|
|
69
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Manager, ManagerOptions } from "./manager.js";
|
|
2
|
-
import { DisconnectDescription, Socket, SocketOptions } from "./socket.js";
|
|
3
|
-
/**
|
|
4
|
-
* Looks up an existing `Manager` for multiplexing.
|
|
5
|
-
* If the user summons:
|
|
6
|
-
*
|
|
7
|
-
* `io('http://localhost/a');`
|
|
8
|
-
* `io('http://localhost/b');`
|
|
9
|
-
*
|
|
10
|
-
* We reuse the existing instance based on same scheme/port/host,
|
|
11
|
-
* and we initialize sockets for each namespace.
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
declare function lookup(opts?: Partial<ManagerOptions & SocketOptions>): Socket;
|
|
16
|
-
declare function lookup(uri?: string, opts?: Partial<ManagerOptions & SocketOptions>): Socket;
|
|
17
|
-
/**
|
|
18
|
-
* Protocol version.
|
|
19
|
-
*
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
export { protocol } from "socket.io-parser";
|
|
23
|
-
/**
|
|
24
|
-
* Expose constructors for standalone build.
|
|
25
|
-
*
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
export { DisconnectDescription, Manager, ManagerOptions, Socket, SocketOptions, lookup as io, lookup as connect, lookup as default, };
|
|
29
|
-
export { Fetch, NodeXHR, XHR, NodeWebSocket, WebSocket, WebTransport, } from "engine.io-client";
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.WebTransport = exports.WebSocket = exports.NodeWebSocket = exports.XHR = exports.NodeXHR = exports.Fetch = exports.Socket = exports.Manager = exports.protocol = void 0;
|
|
7
|
-
exports.io = lookup;
|
|
8
|
-
exports.connect = lookup;
|
|
9
|
-
exports.default = lookup;
|
|
10
|
-
const url_js_1 = require("./url.js");
|
|
11
|
-
const manager_js_1 = require("./manager.js");
|
|
12
|
-
Object.defineProperty(exports, "Manager", { enumerable: true, get: function () { return manager_js_1.Manager; } });
|
|
13
|
-
const socket_js_1 = require("./socket.js");
|
|
14
|
-
Object.defineProperty(exports, "Socket", { enumerable: true, get: function () { return socket_js_1.Socket; } });
|
|
15
|
-
const debug_1 = __importDefault(require("debug")); // debug()
|
|
16
|
-
const debug = (0, debug_1.default)("socket.io-client"); // debug()
|
|
17
|
-
/**
|
|
18
|
-
* Managers cache.
|
|
19
|
-
*/
|
|
20
|
-
const cache = {};
|
|
21
|
-
function lookup(uri, opts) {
|
|
22
|
-
if (typeof uri === "object") {
|
|
23
|
-
opts = uri;
|
|
24
|
-
uri = undefined;
|
|
25
|
-
}
|
|
26
|
-
opts = opts || {};
|
|
27
|
-
const parsed = (0, url_js_1.url)(uri, opts.path || "/socket.io");
|
|
28
|
-
const source = parsed.source;
|
|
29
|
-
const id = parsed.id;
|
|
30
|
-
const path = parsed.path;
|
|
31
|
-
const sameNamespace = cache[id] && path in cache[id]["nsps"];
|
|
32
|
-
const newConnection = opts.forceNew ||
|
|
33
|
-
opts["force new connection"] ||
|
|
34
|
-
false === opts.multiplex ||
|
|
35
|
-
sameNamespace;
|
|
36
|
-
let io;
|
|
37
|
-
if (newConnection) {
|
|
38
|
-
debug("ignoring socket cache for %s", source);
|
|
39
|
-
io = new manager_js_1.Manager(source, opts);
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
if (!cache[id]) {
|
|
43
|
-
debug("new io instance for %s", source);
|
|
44
|
-
cache[id] = new manager_js_1.Manager(source, opts);
|
|
45
|
-
}
|
|
46
|
-
io = cache[id];
|
|
47
|
-
}
|
|
48
|
-
if (parsed.query && !opts.query) {
|
|
49
|
-
opts.query = parsed.queryKey;
|
|
50
|
-
}
|
|
51
|
-
return io.socket(parsed.path, opts);
|
|
52
|
-
}
|
|
53
|
-
// so that "lookup" can be used both as a function (e.g. `io(...)`) and as a
|
|
54
|
-
// namespace (e.g. `io.connect(...)`), for backward compatibility
|
|
55
|
-
Object.assign(lookup, {
|
|
56
|
-
Manager: manager_js_1.Manager,
|
|
57
|
-
Socket: socket_js_1.Socket,
|
|
58
|
-
io: lookup,
|
|
59
|
-
connect: lookup,
|
|
60
|
-
});
|
|
61
|
-
/**
|
|
62
|
-
* Protocol version.
|
|
63
|
-
*
|
|
64
|
-
* @public
|
|
65
|
-
*/
|
|
66
|
-
var socket_io_parser_1 = require("socket.io-parser");
|
|
67
|
-
Object.defineProperty(exports, "protocol", { enumerable: true, get: function () { return socket_io_parser_1.protocol; } });
|
|
68
|
-
var engine_io_client_1 = require("engine.io-client");
|
|
69
|
-
Object.defineProperty(exports, "Fetch", { enumerable: true, get: function () { return engine_io_client_1.Fetch; } });
|
|
70
|
-
Object.defineProperty(exports, "NodeXHR", { enumerable: true, get: function () { return engine_io_client_1.NodeXHR; } });
|
|
71
|
-
Object.defineProperty(exports, "XHR", { enumerable: true, get: function () { return engine_io_client_1.XHR; } });
|
|
72
|
-
Object.defineProperty(exports, "NodeWebSocket", { enumerable: true, get: function () { return engine_io_client_1.NodeWebSocket; } });
|
|
73
|
-
Object.defineProperty(exports, "WebSocket", { enumerable: true, get: function () { return engine_io_client_1.WebSocket; } });
|
|
74
|
-
Object.defineProperty(exports, "WebTransport", { enumerable: true, get: function () { return engine_io_client_1.WebTransport; } });
|
|
75
|
-
|
|
76
|
-
module.exports = lookup;
|
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
import { Socket as Engine, SocketOptions as EngineOptions } from "engine.io-client";
|
|
2
|
-
import { Socket, SocketOptions, DisconnectDescription } from "./socket.js";
|
|
3
|
-
import { Packet } from "socket.io-parser";
|
|
4
|
-
import { DefaultEventsMap, EventsMap, Emitter } from "@socket.io/component-emitter";
|
|
5
|
-
export interface ManagerOptions extends EngineOptions {
|
|
6
|
-
/**
|
|
7
|
-
* Should we force a new Manager for this connection?
|
|
8
|
-
* @default false
|
|
9
|
-
*/
|
|
10
|
-
forceNew: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Should we multiplex our connection (reuse existing Manager) ?
|
|
13
|
-
* @default true
|
|
14
|
-
*/
|
|
15
|
-
multiplex: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* The path to get our client file from, in the case of the server
|
|
18
|
-
* serving it
|
|
19
|
-
* @default '/socket.io'
|
|
20
|
-
*/
|
|
21
|
-
path: string;
|
|
22
|
-
/**
|
|
23
|
-
* Should we allow reconnections?
|
|
24
|
-
* @default true
|
|
25
|
-
*/
|
|
26
|
-
reconnection: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* How many reconnection attempts should we try?
|
|
29
|
-
* @default Infinity
|
|
30
|
-
*/
|
|
31
|
-
reconnectionAttempts: number;
|
|
32
|
-
/**
|
|
33
|
-
* The time delay in milliseconds between reconnection attempts
|
|
34
|
-
* @default 1000
|
|
35
|
-
*/
|
|
36
|
-
reconnectionDelay: number;
|
|
37
|
-
/**
|
|
38
|
-
* The max time delay in milliseconds between reconnection attempts
|
|
39
|
-
* @default 5000
|
|
40
|
-
*/
|
|
41
|
-
reconnectionDelayMax: number;
|
|
42
|
-
/**
|
|
43
|
-
* Used in the exponential backoff jitter when reconnecting
|
|
44
|
-
* @default 0.5
|
|
45
|
-
*/
|
|
46
|
-
randomizationFactor: number;
|
|
47
|
-
/**
|
|
48
|
-
* The timeout in milliseconds for our connection attempt
|
|
49
|
-
* @default 20000
|
|
50
|
-
*/
|
|
51
|
-
timeout: number;
|
|
52
|
-
/**
|
|
53
|
-
* Should we automatically connect?
|
|
54
|
-
* @default true
|
|
55
|
-
*/
|
|
56
|
-
autoConnect: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* the parser to use. Defaults to an instance of the Parser that ships with socket.io.
|
|
59
|
-
*/
|
|
60
|
-
parser: any;
|
|
61
|
-
}
|
|
62
|
-
interface ManagerReservedEvents {
|
|
63
|
-
open: () => void;
|
|
64
|
-
error: (err: Error) => void;
|
|
65
|
-
ping: () => void;
|
|
66
|
-
packet: (packet: Packet) => void;
|
|
67
|
-
close: (reason: string, description?: DisconnectDescription) => void;
|
|
68
|
-
reconnect_failed: () => void;
|
|
69
|
-
reconnect_attempt: (attempt: number) => void;
|
|
70
|
-
reconnect_error: (err: Error) => void;
|
|
71
|
-
reconnect: (attempt: number) => void;
|
|
72
|
-
}
|
|
73
|
-
export declare class Manager<ListenEvents extends EventsMap = DefaultEventsMap, EmitEvents extends EventsMap = ListenEvents> extends Emitter<{}, {}, ManagerReservedEvents> {
|
|
74
|
-
/**
|
|
75
|
-
* The Engine.IO client instance
|
|
76
|
-
*
|
|
77
|
-
* @public
|
|
78
|
-
*/
|
|
79
|
-
engine: Engine;
|
|
80
|
-
/**
|
|
81
|
-
* @private
|
|
82
|
-
*/
|
|
83
|
-
_autoConnect: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* @private
|
|
86
|
-
*/
|
|
87
|
-
_readyState: "opening" | "open" | "closed";
|
|
88
|
-
/**
|
|
89
|
-
* @private
|
|
90
|
-
*/
|
|
91
|
-
_reconnecting: boolean;
|
|
92
|
-
private readonly uri;
|
|
93
|
-
opts: Partial<ManagerOptions>;
|
|
94
|
-
private nsps;
|
|
95
|
-
private subs;
|
|
96
|
-
private backoff;
|
|
97
|
-
private setTimeoutFn;
|
|
98
|
-
private clearTimeoutFn;
|
|
99
|
-
private _reconnection;
|
|
100
|
-
private _reconnectionAttempts;
|
|
101
|
-
private _reconnectionDelay;
|
|
102
|
-
private _randomizationFactor;
|
|
103
|
-
private _reconnectionDelayMax;
|
|
104
|
-
private _timeout;
|
|
105
|
-
private encoder;
|
|
106
|
-
private decoder;
|
|
107
|
-
private skipReconnect;
|
|
108
|
-
/**
|
|
109
|
-
* `Manager` constructor.
|
|
110
|
-
*
|
|
111
|
-
* @param uri - engine instance or engine uri/opts
|
|
112
|
-
* @param opts - options
|
|
113
|
-
* @public
|
|
114
|
-
*/
|
|
115
|
-
constructor(opts: Partial<ManagerOptions>);
|
|
116
|
-
constructor(uri?: string, opts?: Partial<ManagerOptions>);
|
|
117
|
-
constructor(uri?: string | Partial<ManagerOptions>, opts?: Partial<ManagerOptions>);
|
|
118
|
-
/**
|
|
119
|
-
* Sets the `reconnection` config.
|
|
120
|
-
*
|
|
121
|
-
* @param {Boolean} v - true/false if it should automatically reconnect
|
|
122
|
-
* @return {Manager} self or value
|
|
123
|
-
* @public
|
|
124
|
-
*/
|
|
125
|
-
reconnection(v: boolean): this;
|
|
126
|
-
reconnection(): boolean;
|
|
127
|
-
reconnection(v?: boolean): this | boolean;
|
|
128
|
-
/**
|
|
129
|
-
* Sets the reconnection attempts config.
|
|
130
|
-
*
|
|
131
|
-
* @param {Number} v - max reconnection attempts before giving up
|
|
132
|
-
* @return {Manager} self or value
|
|
133
|
-
* @public
|
|
134
|
-
*/
|
|
135
|
-
reconnectionAttempts(v: number): this;
|
|
136
|
-
reconnectionAttempts(): number;
|
|
137
|
-
reconnectionAttempts(v?: number): this | number;
|
|
138
|
-
/**
|
|
139
|
-
* Sets the delay between reconnections.
|
|
140
|
-
*
|
|
141
|
-
* @param {Number} v - delay
|
|
142
|
-
* @return {Manager} self or value
|
|
143
|
-
* @public
|
|
144
|
-
*/
|
|
145
|
-
reconnectionDelay(v: number): this;
|
|
146
|
-
reconnectionDelay(): number;
|
|
147
|
-
reconnectionDelay(v?: number): this | number;
|
|
148
|
-
/**
|
|
149
|
-
* Sets the randomization factor
|
|
150
|
-
*
|
|
151
|
-
* @param v - the randomization factor
|
|
152
|
-
* @return self or value
|
|
153
|
-
* @public
|
|
154
|
-
*/
|
|
155
|
-
randomizationFactor(v: number): this;
|
|
156
|
-
randomizationFactor(): number;
|
|
157
|
-
randomizationFactor(v?: number): this | number;
|
|
158
|
-
/**
|
|
159
|
-
* Sets the maximum delay between reconnections.
|
|
160
|
-
*
|
|
161
|
-
* @param v - delay
|
|
162
|
-
* @return self or value
|
|
163
|
-
* @public
|
|
164
|
-
*/
|
|
165
|
-
reconnectionDelayMax(v: number): this;
|
|
166
|
-
reconnectionDelayMax(): number;
|
|
167
|
-
reconnectionDelayMax(v?: number): this | number;
|
|
168
|
-
/**
|
|
169
|
-
* Sets the connection timeout. `false` to disable
|
|
170
|
-
*
|
|
171
|
-
* @param v - connection timeout
|
|
172
|
-
* @return self or value
|
|
173
|
-
* @public
|
|
174
|
-
*/
|
|
175
|
-
timeout(v: number | boolean): this;
|
|
176
|
-
timeout(): number | boolean;
|
|
177
|
-
timeout(v?: number | boolean): this | number | boolean;
|
|
178
|
-
/**
|
|
179
|
-
* Starts trying to reconnect if reconnection is enabled and we have not
|
|
180
|
-
* started reconnecting yet
|
|
181
|
-
*
|
|
182
|
-
* @private
|
|
183
|
-
*/
|
|
184
|
-
private maybeReconnectOnOpen;
|
|
185
|
-
/**
|
|
186
|
-
* Sets the current transport `socket`.
|
|
187
|
-
*
|
|
188
|
-
* @param {Function} fn - optional, callback
|
|
189
|
-
* @return self
|
|
190
|
-
* @public
|
|
191
|
-
*/
|
|
192
|
-
open(fn?: (err?: Error) => void): this;
|
|
193
|
-
/**
|
|
194
|
-
* Alias for open()
|
|
195
|
-
*
|
|
196
|
-
* @return self
|
|
197
|
-
* @public
|
|
198
|
-
*/
|
|
199
|
-
connect(fn?: (err?: Error) => void): this;
|
|
200
|
-
/**
|
|
201
|
-
* Called upon transport open.
|
|
202
|
-
*
|
|
203
|
-
* @private
|
|
204
|
-
*/
|
|
205
|
-
private onopen;
|
|
206
|
-
/**
|
|
207
|
-
* Called upon a ping.
|
|
208
|
-
*
|
|
209
|
-
* @private
|
|
210
|
-
*/
|
|
211
|
-
private onping;
|
|
212
|
-
/**
|
|
213
|
-
* Called with data.
|
|
214
|
-
*
|
|
215
|
-
* @private
|
|
216
|
-
*/
|
|
217
|
-
private ondata;
|
|
218
|
-
/**
|
|
219
|
-
* Called when parser fully decodes a packet.
|
|
220
|
-
*
|
|
221
|
-
* @private
|
|
222
|
-
*/
|
|
223
|
-
private ondecoded;
|
|
224
|
-
/**
|
|
225
|
-
* Called upon socket error.
|
|
226
|
-
*
|
|
227
|
-
* @private
|
|
228
|
-
*/
|
|
229
|
-
private onerror;
|
|
230
|
-
/**
|
|
231
|
-
* Creates a new socket for the given `nsp`.
|
|
232
|
-
*
|
|
233
|
-
* @return {Socket}
|
|
234
|
-
* @public
|
|
235
|
-
*/
|
|
236
|
-
socket(nsp: string, opts?: Partial<SocketOptions>): Socket;
|
|
237
|
-
/**
|
|
238
|
-
* Called upon a socket close.
|
|
239
|
-
*
|
|
240
|
-
* @param socket
|
|
241
|
-
* @private
|
|
242
|
-
*/
|
|
243
|
-
_destroy(socket: Socket): void;
|
|
244
|
-
/**
|
|
245
|
-
* Writes a packet.
|
|
246
|
-
*
|
|
247
|
-
* @param packet
|
|
248
|
-
* @private
|
|
249
|
-
*/
|
|
250
|
-
_packet(packet: Partial<Packet & {
|
|
251
|
-
query: string;
|
|
252
|
-
options: any;
|
|
253
|
-
}>): void;
|
|
254
|
-
/**
|
|
255
|
-
* Clean up transport subscriptions and packet buffer.
|
|
256
|
-
*
|
|
257
|
-
* @private
|
|
258
|
-
*/
|
|
259
|
-
private cleanup;
|
|
260
|
-
/**
|
|
261
|
-
* Close the current socket.
|
|
262
|
-
*
|
|
263
|
-
* @private
|
|
264
|
-
*/
|
|
265
|
-
_close(): void;
|
|
266
|
-
/**
|
|
267
|
-
* Alias for close()
|
|
268
|
-
*
|
|
269
|
-
* @private
|
|
270
|
-
*/
|
|
271
|
-
private disconnect;
|
|
272
|
-
/**
|
|
273
|
-
* Called when:
|
|
274
|
-
*
|
|
275
|
-
* - the low-level engine is closed
|
|
276
|
-
* - the parser encountered a badly formatted packet
|
|
277
|
-
* - all sockets are disconnected
|
|
278
|
-
*
|
|
279
|
-
* @private
|
|
280
|
-
*/
|
|
281
|
-
private onclose;
|
|
282
|
-
/**
|
|
283
|
-
* Attempt a reconnection.
|
|
284
|
-
*
|
|
285
|
-
* @private
|
|
286
|
-
*/
|
|
287
|
-
private reconnect;
|
|
288
|
-
/**
|
|
289
|
-
* Called upon successful reconnect.
|
|
290
|
-
*
|
|
291
|
-
* @private
|
|
292
|
-
*/
|
|
293
|
-
private onreconnect;
|
|
294
|
-
}
|
|
295
|
-
export {};
|