byterover-cli 1.7.0 → 1.7.2
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 +7 -5
- package/dist/agent/infra/sandbox/local-sandbox.js +9 -2
- package/node_modules/@campfirein/brv-transport-client/README.md +409 -0
- package/node_modules/@campfirein/brv-transport-client/dist/constants.d.ts +19 -0
- package/node_modules/@campfirein/brv-transport-client/dist/constants.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/constants.js +24 -0
- package/node_modules/@campfirein/brv-transport-client/dist/constants.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/entities/instance-info.d.ts +77 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/entities/instance-info.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/entities/instance-info.js +135 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/entities/instance-info.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/connection-error.d.ts +63 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/connection-error.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/connection-error.js +104 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/connection-error.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/transport-error.d.ts +177 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/transport-error.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/transport-error.js +319 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/transport-error.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/event-names.d.ts +216 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/event-names.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/event-names.js +172 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/event-names.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/index.d.ts +22 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/index.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/index.js +23 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/index.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/types.d.ts +47 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/types.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/types.js +7 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/types.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/common.d.ts +31 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/common.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/common.js +49 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/common.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/event-name-validator.d.ts +21 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/event-name-validator.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/event-name-validator.js +30 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/event-name-validator.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/index.d.ts +9 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/index.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/index.js +9 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/index.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/room-name-validator.d.ts +21 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/room-name-validator.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/room-name-validator.js +30 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/room-name-validator.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/url-validator.d.ts +29 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/url-validator.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/url-validator.js +61 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/url-validator.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory.d.ts +44 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-logger.d.ts +45 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-logger.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-logger.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-logger.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client.d.ts +170 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-connection-state.d.ts +78 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-connection-state.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-connection-state.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-connection-state.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-event-dispatcher.d.ts +33 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-event-dispatcher.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-event-dispatcher.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-event-dispatcher.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-force-reconnect-manager.d.ts +42 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-force-reconnect-manager.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-force-reconnect-manager.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-force-reconnect-manager.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-discovery.d.ts +45 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-discovery.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-discovery.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-discovery.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-reader.d.ts +19 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-reader.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-reader.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-reader.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-reconnection-strategy.d.ts +27 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-reconnection-strategy.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-reconnection-strategy.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-reconnection-strategy.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-room-manager.d.ts +32 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-room-manager.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-room-manager.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-room-manager.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket-provider.d.ts +45 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket-provider.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket-provider.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket-provider.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket.d.ts +56 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-wake-detector.d.ts +35 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-wake-detector.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-wake-detector.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-wake-detector.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/index.d.ts +65 -0
- package/node_modules/@campfirein/brv-transport-client/dist/index.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/index.js +73 -0
- package/node_modules/@campfirein/brv-transport-client/dist/index.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/client-factory.d.ts +283 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/client-factory.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/client-factory.js +451 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/client-factory.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/connection-state-manager.d.ts +90 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/connection-state-manager.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/connection-state-manager.js +142 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/connection-state-manager.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/event-dispatcher.d.ts +168 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/event-dispatcher.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/event-dispatcher.js +265 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/event-dispatcher.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-discovery.d.ts +32 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-discovery.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-discovery.js +85 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-discovery.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-reader.d.ts +16 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-reader.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-reader.js +47 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-reader.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/force-reconnect-manager.d.ts +102 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/force-reconnect-manager.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/force-reconnect-manager.js +161 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/force-reconnect-manager.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/no-op-client-logger.d.ts +17 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/no-op-client-logger.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/no-op-client-logger.js +24 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/no-op-client-logger.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/process-utils.d.ts +17 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/process-utils.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/process-utils.js +40 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/process-utils.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/reconnection-strategy.d.ts +136 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/reconnection-strategy.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/reconnection-strategy.js +174 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/reconnection-strategy.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/room-manager.d.ts +122 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/room-manager.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/room-manager.js +306 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/room-manager.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/index.d.ts +14 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/index.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/index.js +28 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/index.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/schemas.d.ts +953 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/schemas.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/schemas.js +476 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/schemas.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/types.d.ts +221 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/types.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/types.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/types.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/socket-io-client.d.ts +283 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/socket-io-client.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/socket-io-client.js +668 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/socket-io-client.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/utils/deep-freeze.d.ts +25 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/utils/deep-freeze.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/utils/deep-freeze.js +54 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/utils/deep-freeze.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/wake-detector.d.ts +72 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/wake-detector.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/wake-detector.js +130 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/wake-detector.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/package.json +62 -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/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 +2968 -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/debug/LICENSE +20 -0
- package/node_modules/engine.io-client/node_modules/debug/README.md +481 -0
- package/node_modules/engine.io-client/node_modules/debug/package.json +60 -0
- package/node_modules/engine.io-client/node_modules/debug/src/browser.js +271 -0
- package/node_modules/engine.io-client/node_modules/debug/src/common.js +274 -0
- package/node_modules/engine.io-client/node_modules/debug/src/index.js +10 -0
- package/node_modules/engine.io-client/node_modules/debug/src/node.js +263 -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 +12 -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 +514 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/receiver.js +704 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/sender.js +497 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/stream.js +159 -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 +130 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/websocket-server.js +540 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/websocket.js +1338 -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 +910 -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 +882 -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 +903 -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 +4908 -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/node_modules/debug/LICENSE +20 -0
- package/node_modules/socket.io-client/node_modules/debug/README.md +481 -0
- package/node_modules/socket.io-client/node_modules/debug/package.json +60 -0
- package/node_modules/socket.io-client/node_modules/debug/src/browser.js +271 -0
- package/node_modules/socket.io-client/node_modules/debug/src/common.js +274 -0
- package/node_modules/socket.io-client/node_modules/debug/src/index.js +10 -0
- package/node_modules/socket.io-client/node_modules/debug/src/node.js +263 -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 +88 -0
- package/node_modules/socket.io-parser/build/cjs/index.d.ts +90 -0
- package/node_modules/socket.io-parser/build/cjs/index.js +321 -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 +55 -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 +90 -0
- package/node_modules/socket.io-parser/build/esm/index.js +311 -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 +90 -0
- package/node_modules/socket.io-parser/build/esm-debug/index.js +316 -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/node_modules/debug/LICENSE +20 -0
- package/node_modules/socket.io-parser/node_modules/debug/README.md +481 -0
- package/node_modules/socket.io-parser/node_modules/debug/package.json +60 -0
- package/node_modules/socket.io-parser/node_modules/debug/src/browser.js +271 -0
- package/node_modules/socket.io-parser/node_modules/debug/src/common.js +274 -0
- package/node_modules/socket.io-parser/node_modules/debug/src/index.js +10 -0
- package/node_modules/socket.io-parser/node_modules/debug/src/node.js +263 -0
- package/node_modules/socket.io-parser/package.json +58 -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/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +208 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/package.json +118 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5136 -0
- package/node_modules/zod/src/v4/classic/checks.ts +30 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +66 -0
- package/node_modules/zod/src/v4/classic/errors.ts +75 -0
- package/node_modules/zod/src/v4/classic/external.ts +50 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +33 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1594 -0
- package/node_modules/zod/src/v4/core/checks.ts +1283 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +134 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +424 -0
- package/node_modules/zod/src/v4/core/function.ts +176 -0
- package/node_modules/zod/src/v4/core/index.ts +15 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
- package/node_modules/zod/src/v4/core/parse.ts +94 -0
- package/node_modules/zod/src/v4/core/regexes.ts +135 -0
- package/node_modules/zod/src/v4/core/registries.ts +96 -0
- package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
- package/node_modules/zod/src/v4/core/util.ts +775 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +125 -0
- package/node_modules/zod/src/v4/locales/az.ts +121 -0
- package/node_modules/zod/src/v4/locales/be.ts +184 -0
- package/node_modules/zod/src/v4/locales/ca.ts +127 -0
- package/node_modules/zod/src/v4/locales/cs.ts +142 -0
- package/node_modules/zod/src/v4/locales/de.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +127 -0
- package/node_modules/zod/src/v4/locales/eo.ts +125 -0
- package/node_modules/zod/src/v4/locales/es.ts +125 -0
- package/node_modules/zod/src/v4/locales/fa.ts +134 -0
- package/node_modules/zod/src/v4/locales/fi.ts +131 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
- package/node_modules/zod/src/v4/locales/fr.ts +124 -0
- package/node_modules/zod/src/v4/locales/he.ts +125 -0
- package/node_modules/zod/src/v4/locales/hu.ts +126 -0
- package/node_modules/zod/src/v4/locales/id.ts +125 -0
- package/node_modules/zod/src/v4/locales/index.ts +39 -0
- package/node_modules/zod/src/v4/locales/it.ts +125 -0
- package/node_modules/zod/src/v4/locales/ja.ts +122 -0
- package/node_modules/zod/src/v4/locales/kh.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +131 -0
- package/node_modules/zod/src/v4/locales/mk.ts +127 -0
- package/node_modules/zod/src/v4/locales/ms.ts +124 -0
- package/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/zod/src/v4/locales/no.ts +124 -0
- package/node_modules/zod/src/v4/locales/ota.ts +125 -0
- package/node_modules/zod/src/v4/locales/pl.ts +126 -0
- package/node_modules/zod/src/v4/locales/ps.ts +133 -0
- package/node_modules/zod/src/v4/locales/pt.ts +123 -0
- package/node_modules/zod/src/v4/locales/ru.ts +184 -0
- package/node_modules/zod/src/v4/locales/sl.ts +126 -0
- package/node_modules/zod/src/v4/locales/sv.ts +127 -0
- package/node_modules/zod/src/v4/locales/ta.ts +125 -0
- package/node_modules/zod/src/v4/locales/th.ts +126 -0
- package/node_modules/zod/src/v4/locales/tr.ts +121 -0
- package/node_modules/zod/src/v4/locales/ua.ts +126 -0
- package/node_modules/zod/src/v4/locales/ur.ts +126 -0
- package/node_modules/zod/src/v4/locales/vi.ts +125 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
- package/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +62 -0
- package/node_modules/zod/src/v4/mini/parse.ts +1 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
- package/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +111 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3775 -0
- package/node_modules/zod/v3/types.d.cts +1031 -0
- package/node_modules/zod/v3/types.d.ts +1031 -0
- package/node_modules/zod/v3/types.js +3693 -0
- package/node_modules/zod/v4/classic/checks.cjs +32 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +57 -0
- package/node_modules/zod/v4/classic/compat.d.cts +46 -0
- package/node_modules/zod/v4/classic/compat.d.ts +46 -0
- package/node_modules/zod/v4/classic/compat.js +27 -0
- package/node_modules/zod/v4/classic/errors.cjs +67 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +41 -0
- package/node_modules/zod/v4/classic/external.cjs +70 -0
- package/node_modules/zod/v4/classic/external.d.cts +13 -0
- package/node_modules/zod/v4/classic/external.d.ts +13 -0
- package/node_modules/zod/v4/classic/external.js +18 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/parse.cjs +32 -0
- package/node_modules/zod/v4/classic/parse.d.cts +23 -0
- package/node_modules/zod/v4/classic/parse.d.ts +23 -0
- package/node_modules/zod/v4/classic/parse.js +6 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
- package/node_modules/zod/v4/classic/schemas.js +1006 -0
- package/node_modules/zod/v4/core/api.cjs +1039 -0
- package/node_modules/zod/v4/core/api.d.cts +284 -0
- package/node_modules/zod/v4/core/api.d.ts +284 -0
- package/node_modules/zod/v4/core/api.js +906 -0
- package/node_modules/zod/v4/core/checks.cjs +591 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +565 -0
- package/node_modules/zod/v4/core/core.cjs +67 -0
- package/node_modules/zod/v4/core/core.d.cts +49 -0
- package/node_modules/zod/v4/core/core.d.ts +49 -0
- package/node_modules/zod/v4/core/core.js +61 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +226 -0
- package/node_modules/zod/v4/core/errors.d.cts +208 -0
- package/node_modules/zod/v4/core/errors.d.ts +208 -0
- package/node_modules/zod/v4/core/errors.js +195 -0
- package/node_modules/zod/v4/core/function.cjs +102 -0
- package/node_modules/zod/v4/core/function.d.cts +52 -0
- package/node_modules/zod/v4/core/function.d.ts +52 -0
- package/node_modules/zod/v4/core/function.js +75 -0
- package/node_modules/zod/v4/core/index.cjs +44 -0
- package/node_modules/zod/v4/core/index.d.cts +15 -0
- package/node_modules/zod/v4/core/index.d.ts +15 -0
- package/node_modules/zod/v4/core/index.js +15 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/parse.cjs +87 -0
- package/node_modules/zod/v4/core/parse.d.cts +25 -0
- package/node_modules/zod/v4/core/parse.d.ts +25 -0
- package/node_modules/zod/v4/core/parse.js +57 -0
- package/node_modules/zod/v4/core/regexes.cjs +103 -0
- package/node_modules/zod/v4/core/regexes.d.cts +62 -0
- package/node_modules/zod/v4/core/regexes.d.ts +62 -0
- package/node_modules/zod/v4/core/regexes.js +95 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +1748 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
- package/node_modules/zod/v4/core/schemas.js +1717 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.js +849 -0
- package/node_modules/zod/v4/core/util.cjs +539 -0
- package/node_modules/zod/v4/core/util.d.cts +183 -0
- package/node_modules/zod/v4/core/util.d.ts +183 -0
- package/node_modules/zod/v4/core/util.js +493 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +142 -0
- package/node_modules/zod/v4/locales/ar.d.cts +4 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +116 -0
- package/node_modules/zod/v4/locales/az.cjs +141 -0
- package/node_modules/zod/v4/locales/az.d.cts +4 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +115 -0
- package/node_modules/zod/v4/locales/be.cjs +190 -0
- package/node_modules/zod/v4/locales/be.d.cts +4 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +164 -0
- package/node_modules/zod/v4/locales/ca.cjs +144 -0
- package/node_modules/zod/v4/locales/ca.d.cts +4 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +118 -0
- package/node_modules/zod/v4/locales/cs.cjs +161 -0
- package/node_modules/zod/v4/locales/cs.d.cts +4 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +135 -0
- package/node_modules/zod/v4/locales/de.cjs +142 -0
- package/node_modules/zod/v4/locales/de.d.cts +4 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +116 -0
- package/node_modules/zod/v4/locales/en.cjs +145 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +5 -0
- package/node_modules/zod/v4/locales/en.js +117 -0
- package/node_modules/zod/v4/locales/eo.cjs +144 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +5 -0
- package/node_modules/zod/v4/locales/eo.js +116 -0
- package/node_modules/zod/v4/locales/es.cjs +143 -0
- package/node_modules/zod/v4/locales/es.d.cts +4 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +117 -0
- package/node_modules/zod/v4/locales/fa.cjs +148 -0
- package/node_modules/zod/v4/locales/fa.d.cts +4 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +122 -0
- package/node_modules/zod/v4/locales/fi.cjs +148 -0
- package/node_modules/zod/v4/locales/fi.d.cts +4 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +122 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +117 -0
- package/node_modules/zod/v4/locales/fr.cjs +142 -0
- package/node_modules/zod/v4/locales/fr.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +116 -0
- package/node_modules/zod/v4/locales/he.cjs +143 -0
- package/node_modules/zod/v4/locales/he.d.cts +4 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +117 -0
- package/node_modules/zod/v4/locales/hu.cjs +143 -0
- package/node_modules/zod/v4/locales/hu.d.cts +4 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +117 -0
- package/node_modules/zod/v4/locales/id.cjs +142 -0
- package/node_modules/zod/v4/locales/id.d.cts +4 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +116 -0
- package/node_modules/zod/v4/locales/index.cjs +84 -0
- package/node_modules/zod/v4/locales/index.d.cts +39 -0
- package/node_modules/zod/v4/locales/index.d.ts +39 -0
- package/node_modules/zod/v4/locales/index.js +39 -0
- package/node_modules/zod/v4/locales/it.cjs +143 -0
- package/node_modules/zod/v4/locales/it.d.cts +4 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +117 -0
- package/node_modules/zod/v4/locales/ja.cjs +141 -0
- package/node_modules/zod/v4/locales/ja.d.cts +4 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +115 -0
- package/node_modules/zod/v4/locales/kh.cjs +143 -0
- package/node_modules/zod/v4/locales/kh.d.cts +4 -0
- package/node_modules/zod/v4/locales/kh.d.ts +4 -0
- package/node_modules/zod/v4/locales/kh.js +117 -0
- package/node_modules/zod/v4/locales/ko.cjs +147 -0
- package/node_modules/zod/v4/locales/ko.d.cts +4 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +121 -0
- package/node_modules/zod/v4/locales/mk.cjs +144 -0
- package/node_modules/zod/v4/locales/mk.d.cts +4 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +118 -0
- package/node_modules/zod/v4/locales/ms.cjs +142 -0
- package/node_modules/zod/v4/locales/ms.d.cts +4 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +116 -0
- package/node_modules/zod/v4/locales/nl.cjs +143 -0
- package/node_modules/zod/v4/locales/nl.d.cts +4 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +117 -0
- package/node_modules/zod/v4/locales/no.cjs +142 -0
- package/node_modules/zod/v4/locales/no.d.cts +4 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +116 -0
- package/node_modules/zod/v4/locales/ota.cjs +143 -0
- package/node_modules/zod/v4/locales/ota.d.cts +4 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +117 -0
- package/node_modules/zod/v4/locales/pl.cjs +143 -0
- package/node_modules/zod/v4/locales/pl.d.cts +4 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +117 -0
- package/node_modules/zod/v4/locales/ps.cjs +148 -0
- package/node_modules/zod/v4/locales/ps.d.cts +4 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +122 -0
- package/node_modules/zod/v4/locales/pt.cjs +142 -0
- package/node_modules/zod/v4/locales/pt.d.cts +4 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +116 -0
- package/node_modules/zod/v4/locales/ru.cjs +190 -0
- package/node_modules/zod/v4/locales/ru.d.cts +4 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +164 -0
- package/node_modules/zod/v4/locales/sl.cjs +143 -0
- package/node_modules/zod/v4/locales/sl.d.cts +4 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +117 -0
- package/node_modules/zod/v4/locales/sv.cjs +144 -0
- package/node_modules/zod/v4/locales/sv.d.cts +4 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +118 -0
- package/node_modules/zod/v4/locales/ta.cjs +143 -0
- package/node_modules/zod/v4/locales/ta.d.cts +4 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +143 -0
- package/node_modules/zod/v4/locales/th.d.cts +4 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +117 -0
- package/node_modules/zod/v4/locales/tr.cjs +143 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +5 -0
- package/node_modules/zod/v4/locales/tr.js +115 -0
- package/node_modules/zod/v4/locales/ua.cjs +143 -0
- package/node_modules/zod/v4/locales/ua.d.cts +4 -0
- package/node_modules/zod/v4/locales/ua.d.ts +4 -0
- package/node_modules/zod/v4/locales/ua.js +117 -0
- package/node_modules/zod/v4/locales/ur.cjs +143 -0
- package/node_modules/zod/v4/locales/ur.d.cts +4 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +117 -0
- package/node_modules/zod/v4/locales/vi.cjs +142 -0
- package/node_modules/zod/v4/locales/vi.d.cts +4 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +116 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +116 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +117 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +47 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +17 -0
- package/node_modules/zod/v4/mini/external.cjs +62 -0
- package/node_modules/zod/v4/mini/external.d.cts +11 -0
- package/node_modules/zod/v4/mini/external.d.ts +11 -0
- package/node_modules/zod/v4/mini/external.js +13 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +60 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +30 -0
- package/node_modules/zod/v4/mini/parse.cjs +8 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +839 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
- package/node_modules/zod/v4/mini/schemas.js +732 -0
- package/node_modules/zod/v4-mini/index.cjs +17 -0
- package/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/node_modules/zod/v4-mini/index.js +1 -0
- package/oclif.manifest.json +1 -1
- package/package.json +6 -2
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { InvalidStateTransitionError } from '../core/domain/errors/transport-error.js';
|
|
2
|
+
import { NoOpClientLogger } from './no-op-client-logger.js';
|
|
3
|
+
/**
|
|
4
|
+
* Valid state transitions for the connection state machine.
|
|
5
|
+
* Each state can only transition to specific next states.
|
|
6
|
+
*/
|
|
7
|
+
const VALID_TRANSITIONS = {
|
|
8
|
+
disconnected: ['connecting'],
|
|
9
|
+
connecting: ['connected', 'disconnected'],
|
|
10
|
+
connected: ['reconnecting', 'disconnected'],
|
|
11
|
+
reconnecting: ['connected', 'disconnected'],
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Manages connection state and notifies subscribers of state changes.
|
|
15
|
+
* Implements Observer Pattern for state change notifications.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* - State handlers persist across state changes until explicitly unsubscribed
|
|
19
|
+
* - Each handler receives the new state when it changes
|
|
20
|
+
* - Handlers are called synchronously in registration order
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const stateManager = new ConnectionStateManager()
|
|
25
|
+
*
|
|
26
|
+
* const unsubscribe = stateManager.onStateChange((state) => {
|
|
27
|
+
* console.log('State changed to:', state)
|
|
28
|
+
* })
|
|
29
|
+
*
|
|
30
|
+
* stateManager.setState('connecting') // Logs: "State changed to: connecting"
|
|
31
|
+
* stateManager.setState('connected') // Logs: "State changed to: connected"
|
|
32
|
+
*
|
|
33
|
+
* unsubscribe()
|
|
34
|
+
* stateManager.setState('disconnected') // No log (unsubscribed)
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export class ConnectionStateManager {
|
|
38
|
+
#handlers = new Set();
|
|
39
|
+
#logger;
|
|
40
|
+
#state;
|
|
41
|
+
constructor(config) {
|
|
42
|
+
this.#state = config?.initialState ?? 'disconnected';
|
|
43
|
+
this.#logger = config?.logger ?? new NoOpClientLogger();
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Gets the current connection state.
|
|
47
|
+
* @returns Current connection state
|
|
48
|
+
*/
|
|
49
|
+
getState() {
|
|
50
|
+
return this.#state;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Updates the connection state and notifies handlers.
|
|
54
|
+
* Only notifies if the state actually changed.
|
|
55
|
+
* @throws {InvalidStateTransitionError} If the transition is not allowed
|
|
56
|
+
*/
|
|
57
|
+
setState(newState) {
|
|
58
|
+
if (this.#state === newState) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
// Validate transition
|
|
62
|
+
const validNext = VALID_TRANSITIONS[this.#state];
|
|
63
|
+
if (!validNext.includes(newState)) {
|
|
64
|
+
const error = new InvalidStateTransitionError(this.#state, newState);
|
|
65
|
+
this.#logger.error(`[ConnectionStateManager] Invalid transition: ${this.#state} -> ${newState}`);
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
const previousState = this.#state;
|
|
69
|
+
this.#state = newState;
|
|
70
|
+
this.#logger.debug(`[ConnectionStateManager] State change: ${previousState} -> ${newState}`);
|
|
71
|
+
this.notifyHandlers(newState);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Registers a handler for connection state changes.
|
|
75
|
+
* @returns Unsubscribe function
|
|
76
|
+
*/
|
|
77
|
+
onStateChange(handler) {
|
|
78
|
+
this.#handlers.add(handler);
|
|
79
|
+
return () => {
|
|
80
|
+
this.#handlers.delete(handler);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Clears all state handlers.
|
|
85
|
+
*/
|
|
86
|
+
clearHandlers() {
|
|
87
|
+
this.#handlers.clear();
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Checks if transition to a new state is valid from current state.
|
|
91
|
+
* @param newState - The target state
|
|
92
|
+
* @returns True if transition is allowed
|
|
93
|
+
*/
|
|
94
|
+
canTransitionTo(newState) {
|
|
95
|
+
const validNext = VALID_TRANSITIONS[this.#state];
|
|
96
|
+
return validNext.includes(newState);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Checks if currently connected.
|
|
100
|
+
* @returns True if state is 'connected'
|
|
101
|
+
*/
|
|
102
|
+
isConnected() {
|
|
103
|
+
return this.#state === 'connected';
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Checks if currently connecting.
|
|
107
|
+
* @returns True if state is 'connecting'
|
|
108
|
+
*/
|
|
109
|
+
isConnecting() {
|
|
110
|
+
return this.#state === 'connecting';
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Checks if currently disconnected.
|
|
114
|
+
* @returns True if state is 'disconnected'
|
|
115
|
+
*/
|
|
116
|
+
isDisconnected() {
|
|
117
|
+
return this.#state === 'disconnected';
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Checks if currently reconnecting.
|
|
121
|
+
* @returns True if state is 'reconnecting'
|
|
122
|
+
*/
|
|
123
|
+
isReconnecting() {
|
|
124
|
+
return this.#state === 'reconnecting';
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Notifies all handlers of the state change.
|
|
128
|
+
*/
|
|
129
|
+
notifyHandlers(newState) {
|
|
130
|
+
for (const handler of this.#handlers) {
|
|
131
|
+
try {
|
|
132
|
+
handler(newState);
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
// Log but don't throw - one handler failing shouldn't break others
|
|
136
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
137
|
+
this.#logger.debug(`[ConnectionStateManager] Handler error: ${errorMsg}`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=connection-state-manager.js.map
|
package/node_modules/@campfirein/brv-transport-client/dist/infra/connection-state-manager.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-state-manager.js","sourceRoot":"","sources":["../../infra/connection-state-manager.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,2BAA2B,EAAC,MAAM,0CAA0C,CAAA;AACpF,OAAO,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAA;AAEzD;;;GAGG;AACH,MAAM,iBAAiB,GAA+C;IACpE,YAAY,EAAE,CAAC,YAAY,CAAC;IAC5B,UAAU,EAAE,CAAC,WAAW,EAAE,cAAc,CAAC;IACzC,SAAS,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC;IAC3C,YAAY,EAAE,CAAC,WAAW,EAAE,cAAc,CAAC;CAC5C,CAAA;AAYD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,sBAAsB;IACxB,SAAS,GAAgC,IAAI,GAAG,EAAE,CAAA;IAClD,OAAO,CAAe;IAC/B,MAAM,CAAiB;IAEvB,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,EAAE,YAAY,IAAI,cAAc,CAAA;QACpD,IAAI,CAAC,OAAO,GAAG,MAAM,EAAE,MAAM,IAAI,IAAI,gBAAgB,EAAE,CAAA;IACzD,CAAC;IAED;;;OAGG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,QAAyB;QACvC,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC7B,OAAM;QACR,CAAC;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AY,CAAA;IACrC,CAAC;IAED;;;OAGG;IACI,cAAc;QACnB,OAAO,IAAI,CAAC,MAAM,KAAK,cAAc,CAAA;IACvC,CAAC;IAED;;;OAGG;IACI,cAAc;QACnB,OAAO,IAAI,CAAC,MAAM,KAAK,cAAc,CAAA;IACvC,CAAC;IAED;;OAEG;IACK,cAAc,CAAC,QAAyB;QAC9C,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACrC,IAAI,CAAC;gBACH,OAAO,CAAC,QAAQ,CAAC,CAAA;YACnB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,mEAAmE;gBACnE,MAAM,QAAQ,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;gBACvE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,2CAA2C,QAAQ,EAAE,CAAC,CAAA;YAC3E,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type { EventHandler, IEventDispatcher } from '../core/interfaces/i-event-dispatcher.js';
|
|
2
|
+
import type { IClientLogger } from '../core/interfaces/i-client-logger.js';
|
|
3
|
+
import type { ISocketProvider } from '../core/interfaces/i-socket-provider.js';
|
|
4
|
+
/**
|
|
5
|
+
* Callback for handler errors.
|
|
6
|
+
* Called when an event handler throws an exception.
|
|
7
|
+
*/
|
|
8
|
+
export type HandlerErrorCallback = (event: string, error: Error, data: unknown) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Callback for callback errors (meta-error handler).
|
|
11
|
+
* Called when onHandlerError callback itself throws an exception.
|
|
12
|
+
*/
|
|
13
|
+
export type CallbackErrorCallback = (callbackError: Error, originalEvent: string, originalError: Error) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Configuration for EventDispatcher.
|
|
16
|
+
*/
|
|
17
|
+
export type EventDispatcherConfig = {
|
|
18
|
+
/** Logger for debugging (default: NoOpClientLogger) */
|
|
19
|
+
readonly logger?: IClientLogger;
|
|
20
|
+
/** Socket provider for accessing the socket instance (required) */
|
|
21
|
+
readonly socketProvider: ISocketProvider;
|
|
22
|
+
/**
|
|
23
|
+
* Callback for handler errors.
|
|
24
|
+
* Called when an event handler throws an exception, providing observability
|
|
25
|
+
* for production debugging. Errors are still logged but this callback
|
|
26
|
+
* allows custom error handling (e.g., reporting to error tracking service).
|
|
27
|
+
*/
|
|
28
|
+
readonly onHandlerError?: HandlerErrorCallback;
|
|
29
|
+
/**
|
|
30
|
+
* Callback for callback errors (meta-error handler).
|
|
31
|
+
* Called when onHandlerError callback itself throws an exception.
|
|
32
|
+
* Provides visibility into error tracking service failures.
|
|
33
|
+
*/
|
|
34
|
+
readonly onCallbackError?: CallbackErrorCallback;
|
|
35
|
+
/**
|
|
36
|
+
* Maximum number of pending once handlers to queue before connection.
|
|
37
|
+
* Prevents memory leaks when connection never succeeds.
|
|
38
|
+
* Default: 100
|
|
39
|
+
*/
|
|
40
|
+
readonly maxPendingOnceHandlers?: number;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Manages event subscriptions and dispatching.
|
|
44
|
+
* Implements Observer Pattern with support for persistent and one-time handlers.
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* - Handlers can be registered before socket connection is established
|
|
48
|
+
* - Pending handlers are queued and registered when setSocket() is called
|
|
49
|
+
* - Persistent handlers survive reconnects until explicitly unsubscribed
|
|
50
|
+
* - One-time handlers are removed after first invocation
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```typescript
|
|
54
|
+
* const dispatcher = new EventDispatcher()
|
|
55
|
+
*
|
|
56
|
+
* // Register handler before connection
|
|
57
|
+
* const unsubscribe = dispatcher.on('message', (data) => {
|
|
58
|
+
* console.log('Received:', data)
|
|
59
|
+
* })
|
|
60
|
+
*
|
|
61
|
+
* // Later, after connection established
|
|
62
|
+
* dispatcher.setSocket(socket)
|
|
63
|
+
* dispatcher.registerPendingHandlers()
|
|
64
|
+
*
|
|
65
|
+
* // Cleanup
|
|
66
|
+
* unsubscribe()
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export declare class EventDispatcher implements IEventDispatcher {
|
|
70
|
+
#private;
|
|
71
|
+
private static readonly DEFAULT_MAX_PENDING_ONCE_HANDLERS;
|
|
72
|
+
constructor(config: EventDispatcherConfig);
|
|
73
|
+
/**
|
|
74
|
+
* Gets the current socket from the provider.
|
|
75
|
+
* @returns Socket instance or undefined if not connected
|
|
76
|
+
*/
|
|
77
|
+
private get socket();
|
|
78
|
+
/**
|
|
79
|
+
* Gets the count of registered event types.
|
|
80
|
+
* @returns Number of registered event types
|
|
81
|
+
*/
|
|
82
|
+
getEventCount(): number;
|
|
83
|
+
/**
|
|
84
|
+
* Registers a persistent event handler.
|
|
85
|
+
* Handler persists until explicitly unsubscribed.
|
|
86
|
+
*
|
|
87
|
+
* @param event - Event name to listen for
|
|
88
|
+
* @param handler - Function to call when event is received
|
|
89
|
+
* @returns Unsubscribe function
|
|
90
|
+
* @throws InvalidEventNameError if event name is invalid
|
|
91
|
+
*
|
|
92
|
+
* @remarks
|
|
93
|
+
* BOUNDARY CAST: Socket.IO delivers unknown data; caller specifies T via generic.
|
|
94
|
+
* Type guard not possible for generic T at runtime.
|
|
95
|
+
*/
|
|
96
|
+
on<T = unknown>(event: string, handler: EventHandler<T>): () => void;
|
|
97
|
+
/**
|
|
98
|
+
* Registers a one-time event handler.
|
|
99
|
+
* Handler is removed after first invocation.
|
|
100
|
+
*
|
|
101
|
+
* @param event - Event name to listen for
|
|
102
|
+
* @param handler - Function to call when event is received
|
|
103
|
+
* @throws InvalidEventNameError if event name is invalid
|
|
104
|
+
*/
|
|
105
|
+
once<T = unknown>(event: string, handler: EventHandler<T>): void;
|
|
106
|
+
/**
|
|
107
|
+
* Registers all pending handlers on the socket.
|
|
108
|
+
* Called after successful connection.
|
|
109
|
+
*/
|
|
110
|
+
registerPendingHandlers(): void;
|
|
111
|
+
/**
|
|
112
|
+
* Clears all socket event listeners.
|
|
113
|
+
* Used before re-registering to prevent listener accumulation.
|
|
114
|
+
*/
|
|
115
|
+
clearSocketListeners(): void;
|
|
116
|
+
/**
|
|
117
|
+
* Clears all handlers and pending handlers.
|
|
118
|
+
* Used during disconnect cleanup.
|
|
119
|
+
*/
|
|
120
|
+
clearAllHandlers(): void;
|
|
121
|
+
/**
|
|
122
|
+
* Clears only pending once handlers.
|
|
123
|
+
* Useful for explicit cleanup when connection attempts fail repeatedly.
|
|
124
|
+
*/
|
|
125
|
+
clearPendingOnceHandlers(): void;
|
|
126
|
+
/**
|
|
127
|
+
* Gets the count of pending once handlers.
|
|
128
|
+
*/
|
|
129
|
+
get pendingOnceHandlerCount(): number;
|
|
130
|
+
/**
|
|
131
|
+
* Registers a socket listener for an event if not already registered.
|
|
132
|
+
*/
|
|
133
|
+
private registerSocketEventIfNeeded;
|
|
134
|
+
/**
|
|
135
|
+
* Wraps a handler with error handling.
|
|
136
|
+
* Centralized wrapper to ensure consistent error handling across all handler types.
|
|
137
|
+
*
|
|
138
|
+
* @param event - Event name for error reporting
|
|
139
|
+
* @param handler - Original handler to wrap
|
|
140
|
+
* @param handlerType - Type of handler for error reporting
|
|
141
|
+
* @returns Wrapped handler with try/catch error handling
|
|
142
|
+
*/
|
|
143
|
+
private wrapHandlerWithErrorHandling;
|
|
144
|
+
/**
|
|
145
|
+
* Creates a wrapped once handler with error handling.
|
|
146
|
+
* Ensures consistent error handling behavior between on() and once() handlers.
|
|
147
|
+
*
|
|
148
|
+
* @param event - Event name for error reporting
|
|
149
|
+
* @param handler - Original handler to wrap
|
|
150
|
+
* @returns Wrapped handler with try/catch error handling
|
|
151
|
+
*/
|
|
152
|
+
private createWrappedOnceHandler;
|
|
153
|
+
/**
|
|
154
|
+
* Handles errors thrown by event handlers.
|
|
155
|
+
* Centralizes error handling logic for both persistent and once handlers.
|
|
156
|
+
*
|
|
157
|
+
* @param event - Event name for error reporting
|
|
158
|
+
* @param error - The error thrown by the handler
|
|
159
|
+
* @param data - The event data that was passed to the handler
|
|
160
|
+
* @param handlerType - Type of handler ('persistent' or 'once') for logging
|
|
161
|
+
*/
|
|
162
|
+
private handleHandlerError;
|
|
163
|
+
/**
|
|
164
|
+
* Removes socket listener for an event.
|
|
165
|
+
*/
|
|
166
|
+
private removeSocketEventListener;
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=event-dispatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-dispatcher.d.ts","sourceRoot":"","sources":["../../infra/event-dispatcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,YAAY,EAAE,gBAAgB,EAAC,MAAM,0CAA0C,CAAA;AAC5F,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uCAAuC,CAAA;AACxE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yCAAyC,CAAA;AAkB5E;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;AAEvF;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,KAAK,IAAI,CAAA;AAE/G;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,uDAAuD;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAA;IAC/B,mEAAmE;IACnE,QAAQ,CAAC,cAAc,EAAE,eAAe,CAAA;IACxC;;;;;OAKG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,oBAAoB,CAAA;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,qBAAqB,CAAA;IAChD;;;;OAIG;IACH,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAA;CACzC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,eAAgB,YAAW,gBAAgB;;IACtD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iCAAiC,CAAM;gBAWnD,MAAM,EAAE,qBAAqB;IAQzC;;;OAGG;IACH,OAAO,KAAK,MAAM,GAEjB;IAED;;;OAGG;IACI,aAAa,IAAI,MAAM;IAI9B;;;;;;;;;;;;OAYG;IACI,EAAE,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IA2B3E;;;;;;;OAOG;IACI,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI;IAiBvE;;;OAGG;IACI,uBAAuB,IAAI,IAAI;IAetC;;;OAGG;IACI,oBAAoB,IAAI,IAAI;IAUnC;;;OAGG;IACI,gBAAgB,IAAI,IAAI;IAM/B;;;OAGG;IACI,wBAAwB,IAAI,IAAI;IAIvC;;OAEG;IACH,IAAW,uBAAuB,IAAI,MAAM,CAE3C;IAED;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAoBnC;;;;;;;;OAQG;IACH,OAAO,CAAC,4BAA4B;IAcpC;;;;;;;OAOG;IACH,OAAO,CAAC,wBAAwB;IAIhC;;;;;;;;OAQG;IACH,OAAO,CAAC,kBAAkB;IA6B1B;;OAEG;IACH,OAAO,CAAC,yBAAyB;CAMlC"}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { NoOpClientLogger } from './no-op-client-logger.js';
|
|
2
|
+
import { MaxPendingOnceHandlersExceededError } from '../core/domain/errors/transport-error.js';
|
|
3
|
+
import { validateEventName } from '../core/domain/validators/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Manages event subscriptions and dispatching.
|
|
6
|
+
* Implements Observer Pattern with support for persistent and one-time handlers.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* - Handlers can be registered before socket connection is established
|
|
10
|
+
* - Pending handlers are queued and registered when setSocket() is called
|
|
11
|
+
* - Persistent handlers survive reconnects until explicitly unsubscribed
|
|
12
|
+
* - One-time handlers are removed after first invocation
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const dispatcher = new EventDispatcher()
|
|
17
|
+
*
|
|
18
|
+
* // Register handler before connection
|
|
19
|
+
* const unsubscribe = dispatcher.on('message', (data) => {
|
|
20
|
+
* console.log('Received:', data)
|
|
21
|
+
* })
|
|
22
|
+
*
|
|
23
|
+
* // Later, after connection established
|
|
24
|
+
* dispatcher.setSocket(socket)
|
|
25
|
+
* dispatcher.registerPendingHandlers()
|
|
26
|
+
*
|
|
27
|
+
* // Cleanup
|
|
28
|
+
* unsubscribe()
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export class EventDispatcher {
|
|
32
|
+
static DEFAULT_MAX_PENDING_ONCE_HANDLERS = 100;
|
|
33
|
+
#logger;
|
|
34
|
+
#socketProvider;
|
|
35
|
+
#onHandlerError;
|
|
36
|
+
#onCallbackError;
|
|
37
|
+
#maxPendingOnceHandlers;
|
|
38
|
+
#eventHandlers = new Map();
|
|
39
|
+
#registeredSocketEvents = new Set();
|
|
40
|
+
#pendingOnceHandlers = [];
|
|
41
|
+
constructor(config) {
|
|
42
|
+
this.#logger = config.logger ?? new NoOpClientLogger();
|
|
43
|
+
this.#socketProvider = config.socketProvider;
|
|
44
|
+
this.#onHandlerError = config.onHandlerError;
|
|
45
|
+
this.#onCallbackError = config.onCallbackError;
|
|
46
|
+
this.#maxPendingOnceHandlers = config.maxPendingOnceHandlers ?? EventDispatcher.DEFAULT_MAX_PENDING_ONCE_HANDLERS;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Gets the current socket from the provider.
|
|
50
|
+
* @returns Socket instance or undefined if not connected
|
|
51
|
+
*/
|
|
52
|
+
get socket() {
|
|
53
|
+
return this.#socketProvider.getSocket();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Gets the count of registered event types.
|
|
57
|
+
* @returns Number of registered event types
|
|
58
|
+
*/
|
|
59
|
+
getEventCount() {
|
|
60
|
+
return this.#eventHandlers.size;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Registers a persistent event handler.
|
|
64
|
+
* Handler persists until explicitly unsubscribed.
|
|
65
|
+
*
|
|
66
|
+
* @param event - Event name to listen for
|
|
67
|
+
* @param handler - Function to call when event is received
|
|
68
|
+
* @returns Unsubscribe function
|
|
69
|
+
* @throws InvalidEventNameError if event name is invalid
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* BOUNDARY CAST: Socket.IO delivers unknown data; caller specifies T via generic.
|
|
73
|
+
* Type guard not possible for generic T at runtime.
|
|
74
|
+
*/
|
|
75
|
+
on(event, handler) {
|
|
76
|
+
validateEventName(event);
|
|
77
|
+
// Get or create handler set for this event
|
|
78
|
+
if (!this.#eventHandlers.has(event)) {
|
|
79
|
+
this.#eventHandlers.set(event, new Set());
|
|
80
|
+
}
|
|
81
|
+
// Wrap handler to match StoredEventHandler signature
|
|
82
|
+
const wrappedHandler = (data) => handler(data);
|
|
83
|
+
const handlers = this.#eventHandlers.get(event);
|
|
84
|
+
handlers.add(wrappedHandler);
|
|
85
|
+
// Register socket listener if connected and not already registered
|
|
86
|
+
this.registerSocketEventIfNeeded(event);
|
|
87
|
+
// Return unsubscribe function
|
|
88
|
+
return () => {
|
|
89
|
+
handlers.delete(wrappedHandler);
|
|
90
|
+
// Clean up if no handlers remain for this event
|
|
91
|
+
if (handlers.size === 0) {
|
|
92
|
+
this.#eventHandlers.delete(event);
|
|
93
|
+
this.removeSocketEventListener(event);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Registers a one-time event handler.
|
|
99
|
+
* Handler is removed after first invocation.
|
|
100
|
+
*
|
|
101
|
+
* @param event - Event name to listen for
|
|
102
|
+
* @param handler - Function to call when event is received
|
|
103
|
+
* @throws InvalidEventNameError if event name is invalid
|
|
104
|
+
*/
|
|
105
|
+
once(event, handler) {
|
|
106
|
+
validateEventName(event);
|
|
107
|
+
const wrappedHandler = (data) => handler(data);
|
|
108
|
+
if (!this.socket?.connected) {
|
|
109
|
+
// Queue for registration after connect, respecting max limit to prevent memory leaks
|
|
110
|
+
if (this.#pendingOnceHandlers.length >= this.#maxPendingOnceHandlers) {
|
|
111
|
+
throw new MaxPendingOnceHandlersExceededError(event, this.#maxPendingOnceHandlers);
|
|
112
|
+
}
|
|
113
|
+
this.#pendingOnceHandlers.push({ event, handler: wrappedHandler });
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
this.socket.once(event, this.createWrappedOnceHandler(event, wrappedHandler));
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Registers all pending handlers on the socket.
|
|
120
|
+
* Called after successful connection.
|
|
121
|
+
*/
|
|
122
|
+
registerPendingHandlers() {
|
|
123
|
+
// Register persistent handlers
|
|
124
|
+
for (const event of this.#eventHandlers.keys()) {
|
|
125
|
+
this.registerSocketEventIfNeeded(event);
|
|
126
|
+
}
|
|
127
|
+
// Register and clear once handlers
|
|
128
|
+
if (this.socket && this.#pendingOnceHandlers.length > 0) {
|
|
129
|
+
for (const { event, handler } of this.#pendingOnceHandlers) {
|
|
130
|
+
this.socket.once(event, this.createWrappedOnceHandler(event, handler));
|
|
131
|
+
}
|
|
132
|
+
this.#pendingOnceHandlers.length = 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Clears all socket event listeners.
|
|
137
|
+
* Used before re-registering to prevent listener accumulation.
|
|
138
|
+
*/
|
|
139
|
+
clearSocketListeners() {
|
|
140
|
+
if (!this.socket)
|
|
141
|
+
return;
|
|
142
|
+
for (const event of this.#registeredSocketEvents) {
|
|
143
|
+
this.socket.off(event);
|
|
144
|
+
}
|
|
145
|
+
this.#registeredSocketEvents.clear();
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Clears all handlers and pending handlers.
|
|
149
|
+
* Used during disconnect cleanup.
|
|
150
|
+
*/
|
|
151
|
+
clearAllHandlers() {
|
|
152
|
+
this.#eventHandlers.clear();
|
|
153
|
+
this.#pendingOnceHandlers.length = 0;
|
|
154
|
+
this.#registeredSocketEvents.clear();
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Clears only pending once handlers.
|
|
158
|
+
* Useful for explicit cleanup when connection attempts fail repeatedly.
|
|
159
|
+
*/
|
|
160
|
+
clearPendingOnceHandlers() {
|
|
161
|
+
this.#pendingOnceHandlers.length = 0;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Gets the count of pending once handlers.
|
|
165
|
+
*/
|
|
166
|
+
get pendingOnceHandlerCount() {
|
|
167
|
+
return this.#pendingOnceHandlers.length;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Registers a socket listener for an event if not already registered.
|
|
171
|
+
*/
|
|
172
|
+
registerSocketEventIfNeeded(event) {
|
|
173
|
+
if (!this.socket || this.#registeredSocketEvents.has(event)) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
// Register dispatch listener on socket
|
|
177
|
+
this.socket.on(event, (data) => {
|
|
178
|
+
const handlers = this.#eventHandlers.get(event);
|
|
179
|
+
if (handlers) {
|
|
180
|
+
// Execute all persistent handlers with consistent error handling
|
|
181
|
+
for (const h of handlers) {
|
|
182
|
+
// Use centralized error handling wrapper for consistency
|
|
183
|
+
this.wrapHandlerWithErrorHandling(event, h, 'persistent')(data);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
this.#registeredSocketEvents.add(event);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Wraps a handler with error handling.
|
|
191
|
+
* Centralized wrapper to ensure consistent error handling across all handler types.
|
|
192
|
+
*
|
|
193
|
+
* @param event - Event name for error reporting
|
|
194
|
+
* @param handler - Original handler to wrap
|
|
195
|
+
* @param handlerType - Type of handler for error reporting
|
|
196
|
+
* @returns Wrapped handler with try/catch error handling
|
|
197
|
+
*/
|
|
198
|
+
wrapHandlerWithErrorHandling(event, handler, handlerType) {
|
|
199
|
+
return (data) => {
|
|
200
|
+
try {
|
|
201
|
+
handler(data);
|
|
202
|
+
}
|
|
203
|
+
catch (error) {
|
|
204
|
+
this.handleHandlerError(event, error, data, handlerType);
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Creates a wrapped once handler with error handling.
|
|
210
|
+
* Ensures consistent error handling behavior between on() and once() handlers.
|
|
211
|
+
*
|
|
212
|
+
* @param event - Event name for error reporting
|
|
213
|
+
* @param handler - Original handler to wrap
|
|
214
|
+
* @returns Wrapped handler with try/catch error handling
|
|
215
|
+
*/
|
|
216
|
+
createWrappedOnceHandler(event, handler) {
|
|
217
|
+
return this.wrapHandlerWithErrorHandling(event, handler, 'once');
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Handles errors thrown by event handlers.
|
|
221
|
+
* Centralizes error handling logic for both persistent and once handlers.
|
|
222
|
+
*
|
|
223
|
+
* @param event - Event name for error reporting
|
|
224
|
+
* @param error - The error thrown by the handler
|
|
225
|
+
* @param data - The event data that was passed to the handler
|
|
226
|
+
* @param handlerType - Type of handler ('persistent' or 'once') for logging
|
|
227
|
+
*/
|
|
228
|
+
handleHandlerError(event, error, data, handlerType) {
|
|
229
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
230
|
+
const typeLabel = handlerType === 'once' ? 'Once handler' : 'Handler';
|
|
231
|
+
this.#logger.debug(`[EventDispatcher] ${typeLabel} error for '${event}': ${err.message}`);
|
|
232
|
+
// Call error callback if provided (for observability/error tracking)
|
|
233
|
+
if (this.#onHandlerError) {
|
|
234
|
+
try {
|
|
235
|
+
this.#onHandlerError(event, err, data);
|
|
236
|
+
}
|
|
237
|
+
catch (callbackError) {
|
|
238
|
+
// Prevent callback errors from breaking the event loop
|
|
239
|
+
const callbackErr = callbackError instanceof Error ? callbackError : new Error(String(callbackError));
|
|
240
|
+
this.#logger.warn(`[EventDispatcher] onHandlerError callback threw: ${callbackErr.message}`);
|
|
241
|
+
// Notify via meta-callback for visibility into callback failures
|
|
242
|
+
if (this.#onCallbackError) {
|
|
243
|
+
try {
|
|
244
|
+
this.#onCallbackError(callbackErr, event, err);
|
|
245
|
+
}
|
|
246
|
+
catch (metaCallbackError) {
|
|
247
|
+
// Last resort - log the error so it's not completely silent
|
|
248
|
+
const metaErr = metaCallbackError instanceof Error ? metaCallbackError : new Error(String(metaCallbackError));
|
|
249
|
+
this.#logger.warn(`[EventDispatcher] onCallbackError callback also threw: ${metaErr.message}`);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Removes socket listener for an event.
|
|
257
|
+
*/
|
|
258
|
+
removeSocketEventListener(event) {
|
|
259
|
+
if (this.socket && this.#registeredSocketEvents.has(event)) {
|
|
260
|
+
this.socket.off(event);
|
|
261
|
+
this.#registeredSocketEvents.delete(event);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
//# sourceMappingURL=event-dispatcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-dispatcher.js","sourceRoot":"","sources":["../../infra/event-dispatcher.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAC,mCAAmC,EAAC,MAAM,0CAA0C,CAAA;AAC5F,OAAO,EAAC,iBAAiB,EAAC,MAAM,oCAAoC,CAAA;AAwDpE;;;;;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G,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED;;OAEG;IACK,yBAAyB,CAAC,KAAa;QAC7C,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3D,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YACtB,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QAC5C,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { DiscoveryResult, IInstanceDiscovery } from '../core/interfaces/i-instance-discovery.js';
|
|
2
|
+
import type { IInstanceReader } from '../core/interfaces/i-instance-reader.js';
|
|
3
|
+
/**
|
|
4
|
+
* File-based implementation of IInstanceDiscovery.
|
|
5
|
+
*
|
|
6
|
+
* Implements walk-up directory tree algorithm to find running instances.
|
|
7
|
+
*/
|
|
8
|
+
export declare class FileInstanceDiscovery implements IInstanceDiscovery {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(instanceReader?: IInstanceReader);
|
|
11
|
+
/**
|
|
12
|
+
* Discovers a running instance starting from the given directory.
|
|
13
|
+
*
|
|
14
|
+
* Walk-up algorithm:
|
|
15
|
+
* 1. Start from `fromDir`
|
|
16
|
+
* 2. Check if .brv/instance.json exists
|
|
17
|
+
* 3. If yes, verify pid is alive
|
|
18
|
+
* 4. If no, walk up to parent directory
|
|
19
|
+
* 5. Repeat until root or found
|
|
20
|
+
*/
|
|
21
|
+
discover(fromDir: string): Promise<DiscoveryResult>;
|
|
22
|
+
/**
|
|
23
|
+
* Finds the project root by walking up from a directory.
|
|
24
|
+
* Returns the directory containing .brv/ or undefined if not found.
|
|
25
|
+
*/
|
|
26
|
+
findProjectRoot(fromDir: string): Promise<string | undefined>;
|
|
27
|
+
/**
|
|
28
|
+
* Checks if a directory exists.
|
|
29
|
+
*/
|
|
30
|
+
private directoryExists;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=file-instance-discovery.d.ts.map
|
package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-discovery.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-instance-discovery.d.ts","sourceRoot":"","sources":["../../infra/file-instance-discovery.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,eAAe,EAAE,kBAAkB,EAAC,MAAM,4CAA4C,CAAA;AACnG,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yCAAyC,CAAA;AAM5E;;;;GAIG;AACH,qBAAa,qBAAsB,YAAW,kBAAkB;;gBAGlD,cAAc,CAAC,EAAE,eAAe;IAI5C;;;;;;;;;OASG;IACG,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAyBzD;;;OAGG;IACG,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IA8BnE;;OAEG;YACW,eAAe;CAQ9B"}
|