lightclaw2 0.0.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 +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/src/channel.d.ts +11 -0
- package/dist/src/channel.d.ts.map +1 -0
- package/dist/src/channel.js +255 -0
- package/dist/src/channel.js.map +1 -0
- package/dist/src/config.d.ts +29 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +99 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/dedup.d.ts +7 -0
- package/dist/src/dedup.d.ts.map +1 -0
- package/dist/src/dedup.js +52 -0
- package/dist/src/dedup.js.map +1 -0
- package/dist/src/gateway.d.ts +16 -0
- package/dist/src/gateway.d.ts.map +1 -0
- package/dist/src/gateway.js +283 -0
- package/dist/src/gateway.js.map +1 -0
- package/dist/src/inbound.d.ts +18 -0
- package/dist/src/inbound.d.ts.map +1 -0
- package/dist/src/inbound.js +252 -0
- package/dist/src/inbound.js.map +1 -0
- package/dist/src/media.d.ts +12 -0
- package/dist/src/media.d.ts.map +1 -0
- package/dist/src/media.js +87 -0
- package/dist/src/media.js.map +1 -0
- package/dist/src/outbound.d.ts +28 -0
- package/dist/src/outbound.d.ts.map +1 -0
- package/dist/src/outbound.js +172 -0
- package/dist/src/outbound.js.map +1 -0
- package/dist/src/runtime.d.ts +4 -0
- package/dist/src/runtime.d.ts.map +1 -0
- package/dist/src/runtime.js +11 -0
- package/dist/src/runtime.js.map +1 -0
- package/dist/src/session-history.d.ts +88 -0
- package/dist/src/session-history.d.ts.map +1 -0
- package/dist/src/session-history.js +545 -0
- package/dist/src/session-history.js.map +1 -0
- package/dist/src/socket-handlers.d.ts +21 -0
- package/dist/src/socket-handlers.d.ts.map +1 -0
- package/dist/src/socket-handlers.js +120 -0
- package/dist/src/socket-handlers.js.map +1 -0
- package/dist/src/socket-registry.d.ts +53 -0
- package/dist/src/socket-registry.d.ts.map +1 -0
- package/dist/src/socket-registry.js +115 -0
- package/dist/src/socket-registry.js.map +1 -0
- package/dist/src/types.d.ts +100 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +10 -0
- package/dist/src/types.js.map +1 -0
- package/node_modules/@socket.io/component-emitter/LICENSE +24 -0
- package/node_modules/@socket.io/component-emitter/Readme.md +79 -0
- package/node_modules/@socket.io/component-emitter/lib/cjs/index.d.ts +179 -0
- package/node_modules/@socket.io/component-emitter/lib/cjs/index.js +176 -0
- package/node_modules/@socket.io/component-emitter/lib/cjs/package.json +4 -0
- package/node_modules/@socket.io/component-emitter/lib/esm/index.d.ts +179 -0
- package/node_modules/@socket.io/component-emitter/lib/esm/index.js +169 -0
- package/node_modules/@socket.io/component-emitter/lib/esm/package.json +4 -0
- package/node_modules/@socket.io/component-emitter/package.json +28 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/engine.io-client/LICENSE +22 -0
- package/node_modules/engine.io-client/README.md +331 -0
- package/node_modules/engine.io-client/build/cjs/browser-entrypoint.d.ts +3 -0
- package/node_modules/engine.io-client/build/cjs/browser-entrypoint.js +4 -0
- package/node_modules/engine.io-client/build/cjs/contrib/has-cors.d.ts +1 -0
- package/node_modules/engine.io-client/build/cjs/contrib/has-cors.js +14 -0
- package/node_modules/engine.io-client/build/cjs/contrib/parseqs.d.ts +15 -0
- package/node_modules/engine.io-client/build/cjs/contrib/parseqs.js +38 -0
- package/node_modules/engine.io-client/build/cjs/contrib/parseuri.d.ts +1 -0
- package/node_modules/engine.io-client/build/cjs/contrib/parseuri.js +67 -0
- package/node_modules/engine.io-client/build/cjs/globals.d.ts +4 -0
- package/node_modules/engine.io-client/build/cjs/globals.js +26 -0
- package/node_modules/engine.io-client/build/cjs/globals.node.d.ts +21 -0
- package/node_modules/engine.io-client/build/cjs/globals.node.js +97 -0
- package/node_modules/engine.io-client/build/cjs/index.d.ts +15 -0
- package/node_modules/engine.io-client/build/cjs/index.js +32 -0
- package/node_modules/engine.io-client/build/cjs/package.json +10 -0
- package/node_modules/engine.io-client/build/cjs/socket.d.ts +482 -0
- package/node_modules/engine.io-client/build/cjs/socket.js +765 -0
- package/node_modules/engine.io-client/build/cjs/transport.d.ts +106 -0
- package/node_modules/engine.io-client/build/cjs/transport.js +153 -0
- package/node_modules/engine.io-client/build/cjs/transports/index.d.ts +8 -0
- package/node_modules/engine.io-client/build/cjs/transports/index.js +11 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling-fetch.d.ts +15 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling-fetch.js +60 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.d.ts +108 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.js +285 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.d.ts +11 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.js +44 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling.d.ts +52 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling.js +165 -0
- package/node_modules/engine.io-client/build/cjs/transports/websocket.d.ts +36 -0
- package/node_modules/engine.io-client/build/cjs/transports/websocket.js +136 -0
- package/node_modules/engine.io-client/build/cjs/transports/websocket.node.d.ts +14 -0
- package/node_modules/engine.io-client/build/cjs/transports/websocket.node.js +68 -0
- package/node_modules/engine.io-client/build/cjs/transports/webtransport.d.ts +18 -0
- package/node_modules/engine.io-client/build/cjs/transports/webtransport.js +94 -0
- package/node_modules/engine.io-client/build/cjs/util.d.ts +7 -0
- package/node_modules/engine.io-client/build/cjs/util.js +65 -0
- package/node_modules/engine.io-client/build/esm/browser-entrypoint.d.ts +3 -0
- package/node_modules/engine.io-client/build/esm/browser-entrypoint.js +2 -0
- package/node_modules/engine.io-client/build/esm/contrib/has-cors.d.ts +1 -0
- package/node_modules/engine.io-client/build/esm/contrib/has-cors.js +11 -0
- package/node_modules/engine.io-client/build/esm/contrib/parseqs.d.ts +15 -0
- package/node_modules/engine.io-client/build/esm/contrib/parseqs.js +34 -0
- package/node_modules/engine.io-client/build/esm/contrib/parseuri.d.ts +1 -0
- package/node_modules/engine.io-client/build/esm/contrib/parseuri.js +64 -0
- package/node_modules/engine.io-client/build/esm/globals.d.ts +4 -0
- package/node_modules/engine.io-client/build/esm/globals.js +22 -0
- package/node_modules/engine.io-client/build/esm/globals.node.d.ts +21 -0
- package/node_modules/engine.io-client/build/esm/globals.node.js +91 -0
- package/node_modules/engine.io-client/build/esm/index.d.ts +15 -0
- package/node_modules/engine.io-client/build/esm/index.js +15 -0
- package/node_modules/engine.io-client/build/esm/package.json +10 -0
- package/node_modules/engine.io-client/build/esm/socket.d.ts +482 -0
- package/node_modules/engine.io-client/build/esm/socket.js +727 -0
- package/node_modules/engine.io-client/build/esm/transport.d.ts +106 -0
- package/node_modules/engine.io-client/build/esm/transport.js +142 -0
- package/node_modules/engine.io-client/build/esm/transports/index.d.ts +8 -0
- package/node_modules/engine.io-client/build/esm/transports/index.js +8 -0
- package/node_modules/engine.io-client/build/esm/transports/polling-fetch.d.ts +15 -0
- package/node_modules/engine.io-client/build/esm/transports/polling-fetch.js +56 -0
- package/node_modules/engine.io-client/build/esm/transports/polling-xhr.d.ts +108 -0
- package/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +271 -0
- package/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.d.ts +11 -0
- package/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.js +17 -0
- package/node_modules/engine.io-client/build/esm/transports/polling.d.ts +52 -0
- package/node_modules/engine.io-client/build/esm/transports/polling.js +145 -0
- package/node_modules/engine.io-client/build/esm/transports/websocket.d.ts +36 -0
- package/node_modules/engine.io-client/build/esm/transports/websocket.js +125 -0
- package/node_modules/engine.io-client/build/esm/transports/websocket.node.d.ts +14 -0
- package/node_modules/engine.io-client/build/esm/transports/websocket.node.js +41 -0
- package/node_modules/engine.io-client/build/esm/transports/webtransport.d.ts +18 -0
- package/node_modules/engine.io-client/build/esm/transports/webtransport.js +80 -0
- package/node_modules/engine.io-client/build/esm/util.d.ts +7 -0
- package/node_modules/engine.io-client/build/esm/util.js +59 -0
- package/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.d.ts +3 -0
- package/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.js +2 -0
- package/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.d.ts +1 -0
- package/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.js +11 -0
- package/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.d.ts +15 -0
- package/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.js +34 -0
- package/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.d.ts +1 -0
- package/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.js +64 -0
- package/node_modules/engine.io-client/build/esm-debug/globals.d.ts +4 -0
- package/node_modules/engine.io-client/build/esm-debug/globals.js +22 -0
- package/node_modules/engine.io-client/build/esm-debug/globals.node.d.ts +21 -0
- package/node_modules/engine.io-client/build/esm-debug/globals.node.js +91 -0
- package/node_modules/engine.io-client/build/esm-debug/index.d.ts +15 -0
- package/node_modules/engine.io-client/build/esm-debug/index.js +15 -0
- package/node_modules/engine.io-client/build/esm-debug/package.json +10 -0
- package/node_modules/engine.io-client/build/esm-debug/socket.d.ts +482 -0
- package/node_modules/engine.io-client/build/esm-debug/socket.js +756 -0
- package/node_modules/engine.io-client/build/esm-debug/transport.d.ts +106 -0
- package/node_modules/engine.io-client/build/esm-debug/transport.js +145 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/index.d.ts +8 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/index.js +8 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-fetch.d.ts +15 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-fetch.js +56 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.d.ts +108 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.js +276 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.d.ts +11 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.js +17 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling.d.ts +52 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling.js +158 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/websocket.d.ts +36 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/websocket.js +128 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/websocket.node.d.ts +14 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/websocket.node.js +41 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/webtransport.d.ts +18 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/webtransport.js +87 -0
- package/node_modules/engine.io-client/build/esm-debug/util.d.ts +7 -0
- package/node_modules/engine.io-client/build/esm-debug/util.js +59 -0
- package/node_modules/engine.io-client/dist/engine.io.esm.min.js +7 -0
- package/node_modules/engine.io-client/dist/engine.io.esm.min.js.map +1 -0
- package/node_modules/engine.io-client/dist/engine.io.js +3064 -0
- package/node_modules/engine.io-client/dist/engine.io.js.map +1 -0
- package/node_modules/engine.io-client/dist/engine.io.min.js +7 -0
- package/node_modules/engine.io-client/dist/engine.io.min.js.map +1 -0
- package/node_modules/engine.io-client/node_modules/ws/LICENSE +20 -0
- package/node_modules/engine.io-client/node_modules/ws/README.md +548 -0
- package/node_modules/engine.io-client/node_modules/ws/browser.js +8 -0
- package/node_modules/engine.io-client/node_modules/ws/index.js +13 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/constants.js +18 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/receiver.js +706 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/sender.js +602 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/websocket-server.js +550 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/websocket.js +1388 -0
- package/node_modules/engine.io-client/node_modules/ws/package.json +69 -0
- package/node_modules/engine.io-client/node_modules/ws/wrapper.mjs +8 -0
- package/node_modules/engine.io-client/package.json +95 -0
- package/node_modules/engine.io-parser/LICENSE +22 -0
- package/node_modules/engine.io-parser/Readme.md +158 -0
- package/node_modules/engine.io-parser/build/cjs/commons.d.ts +14 -0
- package/node_modules/engine.io-parser/build/cjs/commons.js +19 -0
- package/node_modules/engine.io-parser/build/cjs/contrib/base64-arraybuffer.d.ts +2 -0
- package/node_modules/engine.io-parser/build/cjs/contrib/base64-arraybuffer.js +48 -0
- package/node_modules/engine.io-parser/build/cjs/decodePacket.browser.d.ts +2 -0
- package/node_modules/engine.io-parser/build/cjs/decodePacket.browser.js +66 -0
- package/node_modules/engine.io-parser/build/cjs/decodePacket.d.ts +2 -0
- package/node_modules/engine.io-parser/build/cjs/decodePacket.js +59 -0
- package/node_modules/engine.io-parser/build/cjs/encodePacket.browser.d.ts +4 -0
- package/node_modules/engine.io-parser/build/cjs/encodePacket.browser.js +72 -0
- package/node_modules/engine.io-parser/build/cjs/encodePacket.d.ts +3 -0
- package/node_modules/engine.io-parser/build/cjs/encodePacket.js +38 -0
- package/node_modules/engine.io-parser/build/cjs/index.d.ts +9 -0
- package/node_modules/engine.io-parser/build/cjs/index.js +164 -0
- package/node_modules/engine.io-parser/build/cjs/package.json +8 -0
- package/node_modules/engine.io-parser/build/esm/commons.d.ts +14 -0
- package/node_modules/engine.io-parser/build/esm/commons.js +14 -0
- package/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.d.ts +2 -0
- package/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js +43 -0
- package/node_modules/engine.io-parser/build/esm/decodePacket.browser.d.ts +2 -0
- package/node_modules/engine.io-parser/build/esm/decodePacket.browser.js +62 -0
- package/node_modules/engine.io-parser/build/esm/decodePacket.d.ts +2 -0
- package/node_modules/engine.io-parser/build/esm/decodePacket.js +55 -0
- package/node_modules/engine.io-parser/build/esm/encodePacket.browser.d.ts +4 -0
- package/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +68 -0
- package/node_modules/engine.io-parser/build/esm/encodePacket.d.ts +3 -0
- package/node_modules/engine.io-parser/build/esm/encodePacket.js +33 -0
- package/node_modules/engine.io-parser/build/esm/index.d.ts +9 -0
- package/node_modules/engine.io-parser/build/esm/index.js +156 -0
- package/node_modules/engine.io-parser/build/esm/package.json +8 -0
- package/node_modules/engine.io-parser/package.json +46 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/socket.io-client/LICENSE +21 -0
- package/node_modules/socket.io-client/README.md +29 -0
- package/node_modules/socket.io-client/build/cjs/browser-entrypoint.d.ts +2 -0
- package/node_modules/socket.io-client/build/cjs/browser-entrypoint.js +4 -0
- package/node_modules/socket.io-client/build/cjs/contrib/backo2.d.ts +12 -0
- package/node_modules/socket.io-client/build/cjs/contrib/backo2.js +69 -0
- package/node_modules/socket.io-client/build/cjs/index.d.ts +29 -0
- package/node_modules/socket.io-client/build/cjs/index.js +76 -0
- package/node_modules/socket.io-client/build/cjs/manager.d.ts +295 -0
- package/node_modules/socket.io-client/build/cjs/manager.js +416 -0
- package/node_modules/socket.io-client/build/cjs/on.d.ts +2 -0
- package/node_modules/socket.io-client/build/cjs/on.js +9 -0
- package/node_modules/socket.io-client/build/cjs/socket.d.ts +593 -0
- package/node_modules/socket.io-client/build/cjs/socket.js +909 -0
- package/node_modules/socket.io-client/build/cjs/url.d.ts +33 -0
- package/node_modules/socket.io-client/build/cjs/url.js +69 -0
- package/node_modules/socket.io-client/build/esm/browser-entrypoint.d.ts +2 -0
- package/node_modules/socket.io-client/build/esm/browser-entrypoint.js +2 -0
- package/node_modules/socket.io-client/build/esm/contrib/backo2.d.ts +12 -0
- package/node_modules/socket.io-client/build/esm/contrib/backo2.js +66 -0
- package/node_modules/socket.io-client/build/esm/index.d.ts +29 -0
- package/node_modules/socket.io-client/build/esm/index.js +58 -0
- package/node_modules/socket.io-client/build/esm/manager.d.ts +295 -0
- package/node_modules/socket.io-client/build/esm/manager.js +367 -0
- package/node_modules/socket.io-client/build/esm/on.d.ts +2 -0
- package/node_modules/socket.io-client/build/esm/on.js +6 -0
- package/node_modules/socket.io-client/build/esm/package.json +5 -0
- package/node_modules/socket.io-client/build/esm/socket.d.ts +593 -0
- package/node_modules/socket.io-client/build/esm/socket.js +880 -0
- package/node_modules/socket.io-client/build/esm/url.d.ts +33 -0
- package/node_modules/socket.io-client/build/esm/url.js +59 -0
- package/node_modules/socket.io-client/build/esm-debug/browser-entrypoint.d.ts +2 -0
- package/node_modules/socket.io-client/build/esm-debug/browser-entrypoint.js +2 -0
- package/node_modules/socket.io-client/build/esm-debug/contrib/backo2.d.ts +12 -0
- package/node_modules/socket.io-client/build/esm-debug/contrib/backo2.js +66 -0
- package/node_modules/socket.io-client/build/esm-debug/index.d.ts +29 -0
- package/node_modules/socket.io-client/build/esm-debug/index.js +62 -0
- package/node_modules/socket.io-client/build/esm-debug/manager.d.ts +295 -0
- package/node_modules/socket.io-client/build/esm-debug/manager.js +386 -0
- package/node_modules/socket.io-client/build/esm-debug/on.d.ts +2 -0
- package/node_modules/socket.io-client/build/esm-debug/on.js +6 -0
- package/node_modules/socket.io-client/build/esm-debug/package.json +5 -0
- package/node_modules/socket.io-client/build/esm-debug/socket.d.ts +593 -0
- package/node_modules/socket.io-client/build/esm-debug/socket.js +902 -0
- package/node_modules/socket.io-client/build/esm-debug/url.d.ts +33 -0
- package/node_modules/socket.io-client/build/esm-debug/url.js +63 -0
- package/node_modules/socket.io-client/dist/socket.io.esm.min.js +7 -0
- package/node_modules/socket.io-client/dist/socket.io.esm.min.js.map +1 -0
- package/node_modules/socket.io-client/dist/socket.io.js +4955 -0
- package/node_modules/socket.io-client/dist/socket.io.js.map +1 -0
- package/node_modules/socket.io-client/dist/socket.io.min.js +7 -0
- package/node_modules/socket.io-client/dist/socket.io.min.js.map +1 -0
- package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js +7 -0
- package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js.map +1 -0
- package/node_modules/socket.io-client/package.json +101 -0
- package/node_modules/socket.io-parser/LICENSE +20 -0
- package/node_modules/socket.io-parser/Readme.md +81 -0
- package/node_modules/socket.io-parser/build/cjs/binary.d.ts +20 -0
- package/node_modules/socket.io-parser/build/cjs/binary.js +87 -0
- package/node_modules/socket.io-parser/build/cjs/index.d.ts +91 -0
- package/node_modules/socket.io-parser/build/cjs/index.js +359 -0
- package/node_modules/socket.io-parser/build/cjs/is-binary.d.ts +7 -0
- package/node_modules/socket.io-parser/build/cjs/is-binary.js +54 -0
- package/node_modules/socket.io-parser/build/cjs/package.json +3 -0
- package/node_modules/socket.io-parser/build/esm/binary.d.ts +20 -0
- package/node_modules/socket.io-parser/build/esm/binary.js +83 -0
- package/node_modules/socket.io-parser/build/esm/index.d.ts +91 -0
- package/node_modules/socket.io-parser/build/esm/index.js +348 -0
- package/node_modules/socket.io-parser/build/esm/is-binary.d.ts +7 -0
- package/node_modules/socket.io-parser/build/esm/is-binary.js +50 -0
- package/node_modules/socket.io-parser/build/esm/package.json +3 -0
- package/node_modules/socket.io-parser/build/esm-debug/binary.d.ts +20 -0
- package/node_modules/socket.io-parser/build/esm-debug/binary.js +83 -0
- package/node_modules/socket.io-parser/build/esm-debug/index.d.ts +91 -0
- package/node_modules/socket.io-parser/build/esm-debug/index.js +353 -0
- package/node_modules/socket.io-parser/build/esm-debug/is-binary.d.ts +7 -0
- package/node_modules/socket.io-parser/build/esm-debug/is-binary.js +50 -0
- package/node_modules/socket.io-parser/build/esm-debug/package.json +3 -0
- package/node_modules/socket.io-parser/package.json +44 -0
- package/node_modules/xmlhttprequest-ssl/LICENSE +22 -0
- package/node_modules/xmlhttprequest-ssl/README.md +67 -0
- package/node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js +689 -0
- package/node_modules/xmlhttprequest-ssl/package.json +40 -0
- package/openclaw.plugin.json +17 -0
- package/package.json +61 -0
- package/skills/lightclaw-cron/SKILL.md +381 -0
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import { Emitter } from "@socket.io/component-emitter";
|
|
2
|
+
import { deconstructPacket, reconstructPacket } from "./binary.js";
|
|
3
|
+
import { isBinary, hasBinary } from "./is-binary.js";
|
|
4
|
+
import debugModule from "debug"; // debug()
|
|
5
|
+
const debug = debugModule("socket.io-parser"); // debug()
|
|
6
|
+
/**
|
|
7
|
+
* These strings must not be used as event names, as they have a special meaning.
|
|
8
|
+
*/
|
|
9
|
+
const RESERVED_EVENTS = [
|
|
10
|
+
"connect", // used on the client side
|
|
11
|
+
"connect_error", // used on the client side
|
|
12
|
+
"disconnect", // used on both sides
|
|
13
|
+
"disconnecting", // used on the server side
|
|
14
|
+
"newListener", // used by the Node.js EventEmitter
|
|
15
|
+
"removeListener", // used by the Node.js EventEmitter
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* Protocol version.
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export const protocol = 5;
|
|
23
|
+
export var PacketType;
|
|
24
|
+
(function (PacketType) {
|
|
25
|
+
PacketType[PacketType["CONNECT"] = 0] = "CONNECT";
|
|
26
|
+
PacketType[PacketType["DISCONNECT"] = 1] = "DISCONNECT";
|
|
27
|
+
PacketType[PacketType["EVENT"] = 2] = "EVENT";
|
|
28
|
+
PacketType[PacketType["ACK"] = 3] = "ACK";
|
|
29
|
+
PacketType[PacketType["CONNECT_ERROR"] = 4] = "CONNECT_ERROR";
|
|
30
|
+
PacketType[PacketType["BINARY_EVENT"] = 5] = "BINARY_EVENT";
|
|
31
|
+
PacketType[PacketType["BINARY_ACK"] = 6] = "BINARY_ACK";
|
|
32
|
+
})(PacketType || (PacketType = {}));
|
|
33
|
+
/**
|
|
34
|
+
* A socket.io Encoder instance
|
|
35
|
+
*/
|
|
36
|
+
export class Encoder {
|
|
37
|
+
/**
|
|
38
|
+
* Encoder constructor
|
|
39
|
+
*
|
|
40
|
+
* @param {function} replacer - custom replacer to pass down to JSON.parse
|
|
41
|
+
*/
|
|
42
|
+
constructor(replacer) {
|
|
43
|
+
this.replacer = replacer;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Encode a packet as a single string if non-binary, or as a
|
|
47
|
+
* buffer sequence, depending on packet type.
|
|
48
|
+
*
|
|
49
|
+
* @param {Object} obj - packet object
|
|
50
|
+
*/
|
|
51
|
+
encode(obj) {
|
|
52
|
+
debug("encoding packet %j", obj);
|
|
53
|
+
if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {
|
|
54
|
+
if (hasBinary(obj)) {
|
|
55
|
+
return this.encodeAsBinary({
|
|
56
|
+
type: obj.type === PacketType.EVENT
|
|
57
|
+
? PacketType.BINARY_EVENT
|
|
58
|
+
: PacketType.BINARY_ACK,
|
|
59
|
+
nsp: obj.nsp,
|
|
60
|
+
data: obj.data,
|
|
61
|
+
id: obj.id,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return [this.encodeAsString(obj)];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Encode packet as string.
|
|
69
|
+
*/
|
|
70
|
+
encodeAsString(obj) {
|
|
71
|
+
// first is type
|
|
72
|
+
let str = "" + obj.type;
|
|
73
|
+
// attachments if we have them
|
|
74
|
+
if (obj.type === PacketType.BINARY_EVENT ||
|
|
75
|
+
obj.type === PacketType.BINARY_ACK) {
|
|
76
|
+
str += obj.attachments + "-";
|
|
77
|
+
}
|
|
78
|
+
// if we have a namespace other than `/`
|
|
79
|
+
// we append it followed by a comma `,`
|
|
80
|
+
if (obj.nsp && "/" !== obj.nsp) {
|
|
81
|
+
str += obj.nsp + ",";
|
|
82
|
+
}
|
|
83
|
+
// immediately followed by the id
|
|
84
|
+
if (null != obj.id) {
|
|
85
|
+
str += obj.id;
|
|
86
|
+
}
|
|
87
|
+
// json data
|
|
88
|
+
if (null != obj.data) {
|
|
89
|
+
str += JSON.stringify(obj.data, this.replacer);
|
|
90
|
+
}
|
|
91
|
+
debug("encoded %j as %s", obj, str);
|
|
92
|
+
return str;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Encode packet as 'buffer sequence' by removing blobs, and
|
|
96
|
+
* deconstructing packet into object with placeholders and
|
|
97
|
+
* a list of buffers.
|
|
98
|
+
*/
|
|
99
|
+
encodeAsBinary(obj) {
|
|
100
|
+
const deconstruction = deconstructPacket(obj);
|
|
101
|
+
const pack = this.encodeAsString(deconstruction.packet);
|
|
102
|
+
const buffers = deconstruction.buffers;
|
|
103
|
+
buffers.unshift(pack); // add packet info to beginning of data list
|
|
104
|
+
return buffers; // write all the buffers
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* A socket.io Decoder instance
|
|
109
|
+
*
|
|
110
|
+
* @return {Object} decoder
|
|
111
|
+
*/
|
|
112
|
+
export class Decoder extends Emitter {
|
|
113
|
+
/**
|
|
114
|
+
* Decoder constructor
|
|
115
|
+
*
|
|
116
|
+
* @param {function} reviver - custom reviver to pass down to JSON.stringify
|
|
117
|
+
*/
|
|
118
|
+
constructor(reviver) {
|
|
119
|
+
super();
|
|
120
|
+
this.reviver = reviver;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Decodes an encoded packet string into packet JSON.
|
|
124
|
+
*
|
|
125
|
+
* @param {String} obj - encoded packet
|
|
126
|
+
*/
|
|
127
|
+
add(obj) {
|
|
128
|
+
let packet;
|
|
129
|
+
if (typeof obj === "string") {
|
|
130
|
+
if (this.reconstructor) {
|
|
131
|
+
throw new Error("got plaintext data when reconstructing a packet");
|
|
132
|
+
}
|
|
133
|
+
packet = this.decodeString(obj);
|
|
134
|
+
const isBinaryEvent = packet.type === PacketType.BINARY_EVENT;
|
|
135
|
+
if (isBinaryEvent || packet.type === PacketType.BINARY_ACK) {
|
|
136
|
+
packet.type = isBinaryEvent ? PacketType.EVENT : PacketType.ACK;
|
|
137
|
+
// binary packet's json
|
|
138
|
+
this.reconstructor = new BinaryReconstructor(packet);
|
|
139
|
+
// no attachments, labeled binary but no binary data to follow
|
|
140
|
+
if (packet.attachments === 0) {
|
|
141
|
+
super.emitReserved("decoded", packet);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
// non-binary full packet
|
|
146
|
+
super.emitReserved("decoded", packet);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else if (isBinary(obj) || obj.base64) {
|
|
150
|
+
// raw binary data
|
|
151
|
+
if (!this.reconstructor) {
|
|
152
|
+
throw new Error("got binary data when not reconstructing a packet");
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
packet = this.reconstructor.takeBinaryData(obj);
|
|
156
|
+
if (packet) {
|
|
157
|
+
// received final buffer
|
|
158
|
+
this.reconstructor = null;
|
|
159
|
+
super.emitReserved("decoded", packet);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
throw new Error("Unknown type: " + obj);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Decode a packet String (JSON data)
|
|
169
|
+
*
|
|
170
|
+
* @param {String} str
|
|
171
|
+
* @return {Object} packet
|
|
172
|
+
*/
|
|
173
|
+
decodeString(str) {
|
|
174
|
+
let i = 0;
|
|
175
|
+
// look up type
|
|
176
|
+
const p = {
|
|
177
|
+
type: Number(str.charAt(0)),
|
|
178
|
+
};
|
|
179
|
+
if (PacketType[p.type] === undefined) {
|
|
180
|
+
throw new Error("unknown packet type " + p.type);
|
|
181
|
+
}
|
|
182
|
+
// look up attachments if type binary
|
|
183
|
+
if (p.type === PacketType.BINARY_EVENT ||
|
|
184
|
+
p.type === PacketType.BINARY_ACK) {
|
|
185
|
+
const start = i + 1;
|
|
186
|
+
while (str.charAt(++i) !== "-" && i != str.length) { }
|
|
187
|
+
const buf = str.substring(start, i);
|
|
188
|
+
if (buf != Number(buf) || str.charAt(i) !== "-") {
|
|
189
|
+
throw new Error("Illegal attachments");
|
|
190
|
+
}
|
|
191
|
+
p.attachments = Number(buf);
|
|
192
|
+
}
|
|
193
|
+
// look up namespace (if any)
|
|
194
|
+
if ("/" === str.charAt(i + 1)) {
|
|
195
|
+
const start = i + 1;
|
|
196
|
+
while (++i) {
|
|
197
|
+
const c = str.charAt(i);
|
|
198
|
+
if ("," === c)
|
|
199
|
+
break;
|
|
200
|
+
if (i === str.length)
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
p.nsp = str.substring(start, i);
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
p.nsp = "/";
|
|
207
|
+
}
|
|
208
|
+
// look up id
|
|
209
|
+
const next = str.charAt(i + 1);
|
|
210
|
+
if ("" !== next && Number(next) == next) {
|
|
211
|
+
const start = i + 1;
|
|
212
|
+
while (++i) {
|
|
213
|
+
const c = str.charAt(i);
|
|
214
|
+
if (null == c || Number(c) != c) {
|
|
215
|
+
--i;
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
if (i === str.length)
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
p.id = Number(str.substring(start, i + 1));
|
|
222
|
+
}
|
|
223
|
+
// look up json data
|
|
224
|
+
if (str.charAt(++i)) {
|
|
225
|
+
const payload = this.tryParse(str.substr(i));
|
|
226
|
+
if (Decoder.isPayloadValid(p.type, payload)) {
|
|
227
|
+
p.data = payload;
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
throw new Error("invalid payload");
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
debug("decoded %s as %j", str, p);
|
|
234
|
+
return p;
|
|
235
|
+
}
|
|
236
|
+
tryParse(str) {
|
|
237
|
+
try {
|
|
238
|
+
return JSON.parse(str, this.reviver);
|
|
239
|
+
}
|
|
240
|
+
catch (e) {
|
|
241
|
+
return false;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
static isPayloadValid(type, payload) {
|
|
245
|
+
switch (type) {
|
|
246
|
+
case PacketType.CONNECT:
|
|
247
|
+
return isObject(payload);
|
|
248
|
+
case PacketType.DISCONNECT:
|
|
249
|
+
return payload === undefined;
|
|
250
|
+
case PacketType.CONNECT_ERROR:
|
|
251
|
+
return typeof payload === "string" || isObject(payload);
|
|
252
|
+
case PacketType.EVENT:
|
|
253
|
+
case PacketType.BINARY_EVENT:
|
|
254
|
+
return (Array.isArray(payload) &&
|
|
255
|
+
(typeof payload[0] === "number" ||
|
|
256
|
+
(typeof payload[0] === "string" &&
|
|
257
|
+
RESERVED_EVENTS.indexOf(payload[0]) === -1)));
|
|
258
|
+
case PacketType.ACK:
|
|
259
|
+
case PacketType.BINARY_ACK:
|
|
260
|
+
return Array.isArray(payload);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Deallocates a parser's resources
|
|
265
|
+
*/
|
|
266
|
+
destroy() {
|
|
267
|
+
if (this.reconstructor) {
|
|
268
|
+
this.reconstructor.finishedReconstruction();
|
|
269
|
+
this.reconstructor = null;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* A manager of a binary event's 'buffer sequence'. Should
|
|
275
|
+
* be constructed whenever a packet of type BINARY_EVENT is
|
|
276
|
+
* decoded.
|
|
277
|
+
*
|
|
278
|
+
* @param {Object} packet
|
|
279
|
+
* @return {BinaryReconstructor} initialized reconstructor
|
|
280
|
+
*/
|
|
281
|
+
class BinaryReconstructor {
|
|
282
|
+
constructor(packet) {
|
|
283
|
+
this.packet = packet;
|
|
284
|
+
this.buffers = [];
|
|
285
|
+
this.reconPack = packet;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Method to be called when binary data received from connection
|
|
289
|
+
* after a BINARY_EVENT packet.
|
|
290
|
+
*
|
|
291
|
+
* @param {Buffer | ArrayBuffer} binData - the raw binary data received
|
|
292
|
+
* @return {null | Object} returns null if more binary data is expected or
|
|
293
|
+
* a reconstructed packet object if all buffers have been received.
|
|
294
|
+
*/
|
|
295
|
+
takeBinaryData(binData) {
|
|
296
|
+
this.buffers.push(binData);
|
|
297
|
+
if (this.buffers.length === this.reconPack.attachments) {
|
|
298
|
+
// done with buffer list
|
|
299
|
+
const packet = reconstructPacket(this.reconPack, this.buffers);
|
|
300
|
+
this.finishedReconstruction();
|
|
301
|
+
return packet;
|
|
302
|
+
}
|
|
303
|
+
return null;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Cleans up binary packet reconstruction variables.
|
|
307
|
+
*/
|
|
308
|
+
finishedReconstruction() {
|
|
309
|
+
this.reconPack = null;
|
|
310
|
+
this.buffers = [];
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
function isNamespaceValid(nsp) {
|
|
314
|
+
return typeof nsp === "string";
|
|
315
|
+
}
|
|
316
|
+
// see https://caniuse.com/mdn-javascript_builtins_number_isinteger
|
|
317
|
+
const isInteger = Number.isInteger ||
|
|
318
|
+
function (value) {
|
|
319
|
+
return (typeof value === "number" &&
|
|
320
|
+
isFinite(value) &&
|
|
321
|
+
Math.floor(value) === value);
|
|
322
|
+
};
|
|
323
|
+
function isAckIdValid(id) {
|
|
324
|
+
return id === undefined || isInteger(id);
|
|
325
|
+
}
|
|
326
|
+
// see https://stackoverflow.com/questions/8511281/check-if-a-value-is-an-object-in-javascript
|
|
327
|
+
function isObject(value) {
|
|
328
|
+
return Object.prototype.toString.call(value) === "[object Object]";
|
|
329
|
+
}
|
|
330
|
+
function isDataValid(type, payload) {
|
|
331
|
+
switch (type) {
|
|
332
|
+
case PacketType.CONNECT:
|
|
333
|
+
return payload === undefined || isObject(payload);
|
|
334
|
+
case PacketType.DISCONNECT:
|
|
335
|
+
return payload === undefined;
|
|
336
|
+
case PacketType.EVENT:
|
|
337
|
+
return (Array.isArray(payload) &&
|
|
338
|
+
(typeof payload[0] === "number" ||
|
|
339
|
+
(typeof payload[0] === "string" &&
|
|
340
|
+
RESERVED_EVENTS.indexOf(payload[0]) === -1)));
|
|
341
|
+
case PacketType.ACK:
|
|
342
|
+
return Array.isArray(payload);
|
|
343
|
+
case PacketType.CONNECT_ERROR:
|
|
344
|
+
return typeof payload === "string" || isObject(payload);
|
|
345
|
+
default:
|
|
346
|
+
return false;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
export function isPacketValid(packet) {
|
|
350
|
+
return (isNamespaceValid(packet.nsp) &&
|
|
351
|
+
isAckIdValid(packet.id) &&
|
|
352
|
+
isDataValid(packet.type, packet.data));
|
|
353
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const withNativeArrayBuffer = typeof ArrayBuffer === "function";
|
|
2
|
+
const isView = (obj) => {
|
|
3
|
+
return typeof ArrayBuffer.isView === "function"
|
|
4
|
+
? ArrayBuffer.isView(obj)
|
|
5
|
+
: obj.buffer instanceof ArrayBuffer;
|
|
6
|
+
};
|
|
7
|
+
const toString = Object.prototype.toString;
|
|
8
|
+
const withNativeBlob = typeof Blob === "function" ||
|
|
9
|
+
(typeof Blob !== "undefined" &&
|
|
10
|
+
toString.call(Blob) === "[object BlobConstructor]");
|
|
11
|
+
const withNativeFile = typeof File === "function" ||
|
|
12
|
+
(typeof File !== "undefined" &&
|
|
13
|
+
toString.call(File) === "[object FileConstructor]");
|
|
14
|
+
/**
|
|
15
|
+
* Returns true if obj is a Buffer, an ArrayBuffer, a Blob or a File.
|
|
16
|
+
*
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
export function isBinary(obj) {
|
|
20
|
+
return ((withNativeArrayBuffer && (obj instanceof ArrayBuffer || isView(obj))) ||
|
|
21
|
+
(withNativeBlob && obj instanceof Blob) ||
|
|
22
|
+
(withNativeFile && obj instanceof File));
|
|
23
|
+
}
|
|
24
|
+
export function hasBinary(obj, toJSON) {
|
|
25
|
+
if (!obj || typeof obj !== "object") {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
if (Array.isArray(obj)) {
|
|
29
|
+
for (let i = 0, l = obj.length; i < l; i++) {
|
|
30
|
+
if (hasBinary(obj[i])) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
if (isBinary(obj)) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
if (obj.toJSON &&
|
|
40
|
+
typeof obj.toJSON === "function" &&
|
|
41
|
+
arguments.length === 1) {
|
|
42
|
+
return hasBinary(obj.toJSON(), true);
|
|
43
|
+
}
|
|
44
|
+
for (const key in obj) {
|
|
45
|
+
if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "socket.io-parser",
|
|
3
|
+
"version": "4.2.5",
|
|
4
|
+
"description": "socket.io protocol parser",
|
|
5
|
+
"homepage": "https://github.com/socketio/socket.io/tree/main/packages/socket.io-client#readme",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/socketio/socket.io.git"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/socketio/socket.io/issues"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"build/"
|
|
15
|
+
],
|
|
16
|
+
"main": "./build/cjs/index.js",
|
|
17
|
+
"module": "./build/esm/index.js",
|
|
18
|
+
"types": "./build/esm/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
"import": {
|
|
21
|
+
"node": "./build/esm-debug/index.js",
|
|
22
|
+
"development": "./build/esm-debug/index.js",
|
|
23
|
+
"default": "./build/esm/index.js"
|
|
24
|
+
},
|
|
25
|
+
"require": "./build/cjs/index.js"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@socket.io/component-emitter": "~3.1.0",
|
|
29
|
+
"debug": "~4.4.1"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"compile": "rimraf ./build && tsc && tsc -p tsconfig.esm.json && ./postcompile.sh",
|
|
33
|
+
"test": "npm run format:check && npm run compile && if test \"$BROWSERS\" = \"1\" ; then npm run test:browser; else npm run test:node; fi",
|
|
34
|
+
"test:node": "mocha --reporter dot --bail test/index.js",
|
|
35
|
+
"test:browser": "wdio",
|
|
36
|
+
"format:fix": "prettier --write --parser typescript '*.js' 'lib/**/*.ts' 'test/**/*.js'",
|
|
37
|
+
"format:check": "prettier --check --parser typescript '*.js' 'lib/**/*.ts' 'test/**/*.js'",
|
|
38
|
+
"prepack": "npm run compile"
|
|
39
|
+
},
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=10.0.0"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2010 passive.ly LLC
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
|
4
|
+
obtaining a copy of this software and associated documentation
|
|
5
|
+
files (the "Software"), to deal in the Software without
|
|
6
|
+
restriction, including without limitation the rights to use,
|
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the
|
|
9
|
+
Software is furnished to do so, subject to the following
|
|
10
|
+
conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be
|
|
13
|
+
included in all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# node-XMLHttpRequest #
|
|
2
|
+
|
|
3
|
+
Fork of [node-XMLHttpRequest](https://github.com/driverdan/node-XMLHttpRequest) by [driverdan](http://driverdan.com). Forked and published to npm because a [pull request](https://github.com/rase-/node-XMLHttpRequest/commit/a6b6f296e0a8278165c2d0270d9840b54d5eeadd) is not being created and merged. Changes made by [rase-](https://github.com/rase-/node-XMLHttpRequest/tree/add/ssl-support) are needed for [engine.io-client](https://github.com/Automattic/engine.io-client).
|
|
4
|
+
|
|
5
|
+
## Usage ##
|
|
6
|
+
|
|
7
|
+
Here's how to include the module in your project and use as the browser-based
|
|
8
|
+
XHR object.
|
|
9
|
+
|
|
10
|
+
var XMLHttpRequest = require("xmlhttprequest-ssl").XMLHttpRequest;
|
|
11
|
+
var xhr = new XMLHttpRequest();
|
|
12
|
+
|
|
13
|
+
Note: use the lowercase string "xmlhttprequest-ssl" in your require(). On
|
|
14
|
+
case-sensitive systems (eg Linux) using uppercase letters won't work.
|
|
15
|
+
# Original README #
|
|
16
|
+
|
|
17
|
+
## Usage ##
|
|
18
|
+
|
|
19
|
+
Here's how to include the module in your project and use as the browser-based
|
|
20
|
+
XHR object.
|
|
21
|
+
|
|
22
|
+
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
|
|
23
|
+
var xhr = new XMLHttpRequest();
|
|
24
|
+
|
|
25
|
+
Note: use the lowercase string "xmlhttprequest" in your require(). On
|
|
26
|
+
case-sensitive systems (eg Linux) using uppercase letters won't work.
|
|
27
|
+
|
|
28
|
+
## Versions ##
|
|
29
|
+
|
|
30
|
+
Version 2.0.0 introduces a potentially breaking change concerning local file system requests.
|
|
31
|
+
If these requests fail this library now returns the `errno` (or -1) as the response status code instead of
|
|
32
|
+
returning status code 0.
|
|
33
|
+
|
|
34
|
+
Prior to 1.4.0 version numbers were arbitrary. From 1.4.0 on they conform to
|
|
35
|
+
the standard major.minor.bugfix. 1.x shouldn't necessarily be considered
|
|
36
|
+
stable just because it's above 0.x.
|
|
37
|
+
|
|
38
|
+
Since the XMLHttpRequest API is stable this library's API is stable as
|
|
39
|
+
well. Major version numbers indicate significant core code changes.
|
|
40
|
+
Minor versions indicate minor core code changes or better conformity to
|
|
41
|
+
the W3C spec.
|
|
42
|
+
|
|
43
|
+
## License ##
|
|
44
|
+
|
|
45
|
+
MIT license. See LICENSE for full details.
|
|
46
|
+
|
|
47
|
+
## Supports ##
|
|
48
|
+
|
|
49
|
+
* Async and synchronous requests
|
|
50
|
+
* GET, POST, PUT, and DELETE requests
|
|
51
|
+
* All spec methods (open, send, abort, getRequestHeader,
|
|
52
|
+
getAllRequestHeaders, event methods)
|
|
53
|
+
* Requests to all domains
|
|
54
|
+
|
|
55
|
+
## Known Issues / Missing Features ##
|
|
56
|
+
|
|
57
|
+
For a list of open issues or to report your own visit the [github issues
|
|
58
|
+
page](https://github.com/driverdan/node-XMLHttpRequest/issues).
|
|
59
|
+
|
|
60
|
+
* Local file access may have unexpected results for non-UTF8 files
|
|
61
|
+
* Synchronous requests don't set headers properly
|
|
62
|
+
* Synchronous requests freeze node while waiting for response (But that's what you want, right? Stick with async!).
|
|
63
|
+
* Some events are missing, such as abort
|
|
64
|
+
* getRequestHeader is case-sensitive
|
|
65
|
+
* Cookies aren't persisted between requests
|
|
66
|
+
* Missing XML support
|
|
67
|
+
* Missing basic auth
|