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,451 @@
|
|
|
1
|
+
import { ConnectionFailedError, InstanceCrashedError, NoInstanceRunningError, } from '../core/domain/errors/connection-error.js';
|
|
2
|
+
import { NoOpClientLogger } from './no-op-client-logger.js';
|
|
3
|
+
import { FileInstanceDiscovery } from './file-instance-discovery.js';
|
|
4
|
+
import { TransportClient } from './socket-io-client.js';
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// Constants
|
|
7
|
+
// ============================================================================
|
|
8
|
+
const DEFAULT_MAX_RETRIES = 8;
|
|
9
|
+
const DEFAULT_RETRY_DELAY_MS = 150;
|
|
10
|
+
const DEFAULT_WARMUP_TIMEOUT_MS = 1000;
|
|
11
|
+
const DEFAULT_CONNECT_TIMEOUT_MS = 5000;
|
|
12
|
+
const WARMUP_SETTLE_DELAY_MS = 100;
|
|
13
|
+
const SANDBOX_ERROR_MULTIPLIER = 2;
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// TransportClientFactory
|
|
16
|
+
// ============================================================================
|
|
17
|
+
/**
|
|
18
|
+
* Factory for creating connected Socket.IO clients.
|
|
19
|
+
* Follows Dependency Inversion Principle - depends on abstractions (IInstanceDiscovery, IClientLogger).
|
|
20
|
+
*
|
|
21
|
+
* Responsibilities:
|
|
22
|
+
* - Instance discovery (via injected IInstanceDiscovery)
|
|
23
|
+
* - Connection establishment with retry logic
|
|
24
|
+
* - HTTP warm-up for sandbox environments
|
|
25
|
+
* - Error translation to user-friendly messages
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* // Basic usage
|
|
30
|
+
* const factory = new TransportClientFactory()
|
|
31
|
+
* const { client, projectRoot } = await factory.connect()
|
|
32
|
+
*
|
|
33
|
+
* // With custom dependencies (DIP)
|
|
34
|
+
* const factory = new TransportClientFactory({
|
|
35
|
+
* discovery: new CustomDiscovery(),
|
|
36
|
+
* logger: myLogger,
|
|
37
|
+
* })
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export class TransportClientFactory {
|
|
41
|
+
#discovery;
|
|
42
|
+
#logger;
|
|
43
|
+
#maxRetries;
|
|
44
|
+
#retryDelayMs;
|
|
45
|
+
#warmUpTimeoutMs;
|
|
46
|
+
#connectTimeoutMs;
|
|
47
|
+
#warmUpSettleDelayMs;
|
|
48
|
+
constructor(config) {
|
|
49
|
+
// Inject dependencies or use defaults (DIP)
|
|
50
|
+
this.#discovery = config?.discovery ?? new FileInstanceDiscovery();
|
|
51
|
+
this.#logger = config?.logger ?? new NoOpClientLogger();
|
|
52
|
+
// Configuration with defaults
|
|
53
|
+
this.#maxRetries = config?.maxRetries ?? DEFAULT_MAX_RETRIES;
|
|
54
|
+
this.#retryDelayMs = config?.retryDelayMs ?? DEFAULT_RETRY_DELAY_MS;
|
|
55
|
+
this.#warmUpTimeoutMs = config?.warmUpTimeoutMs ?? DEFAULT_WARMUP_TIMEOUT_MS;
|
|
56
|
+
this.#connectTimeoutMs = config?.connectTimeoutMs ?? DEFAULT_CONNECT_TIMEOUT_MS;
|
|
57
|
+
this.#warmUpSettleDelayMs = config?.warmUpSettleDelayMs ?? WARMUP_SETTLE_DELAY_MS;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Discovers a running instance and connects to it.
|
|
61
|
+
*
|
|
62
|
+
* @param fromDir - Directory to start discovery from (default: cwd)
|
|
63
|
+
* @returns Connected client and project root
|
|
64
|
+
* @throws NoInstanceRunningError - No .brv directory found
|
|
65
|
+
* @throws InstanceCrashedError - Instance found but process dead
|
|
66
|
+
* @throws ConnectionFailedError - Instance found but connection failed
|
|
67
|
+
*/
|
|
68
|
+
async connect(fromDir = process.cwd()) {
|
|
69
|
+
this.log(`Discovering instance from ${fromDir}`);
|
|
70
|
+
const result = await this.#discovery.discover(fromDir);
|
|
71
|
+
if (!result.found) {
|
|
72
|
+
throw result.reason === 'instance_crashed' ? new InstanceCrashedError() : new NoInstanceRunningError();
|
|
73
|
+
}
|
|
74
|
+
const { instance, projectRoot } = result;
|
|
75
|
+
const url = instance.getTransportUrl();
|
|
76
|
+
this.log(`Instance discovered: pid=${instance.pid}, port=${instance.port}, projectRoot=${projectRoot}`);
|
|
77
|
+
const client = await this.connectWithRetry(url, instance.port);
|
|
78
|
+
return Object.freeze({ client, projectRoot });
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Connects to the instance with retry logic.
|
|
82
|
+
* Includes HTTP warm-up to trigger sandbox permission requests.
|
|
83
|
+
*/
|
|
84
|
+
async connectWithRetry(url, port) {
|
|
85
|
+
let lastError;
|
|
86
|
+
// HTTP warm-up for sandbox environments
|
|
87
|
+
this.log(`Attempting HTTP warm-up to ${url}`);
|
|
88
|
+
await this.httpWarmUp(url);
|
|
89
|
+
await this.delay(this.#warmUpSettleDelayMs);
|
|
90
|
+
// Connection retry loop
|
|
91
|
+
for (let attempt = 1; attempt <= this.#maxRetries; attempt++) {
|
|
92
|
+
const client = new TransportClient({
|
|
93
|
+
logger: this.#logger,
|
|
94
|
+
connectTimeoutMs: this.#connectTimeoutMs,
|
|
95
|
+
});
|
|
96
|
+
try {
|
|
97
|
+
this.log(`Connection attempt ${attempt}/${this.#maxRetries} to ${url}`);
|
|
98
|
+
await client.connect(url);
|
|
99
|
+
this.log(`Connected to instance, clientId=${client.getClientId()}`);
|
|
100
|
+
return client;
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
// Cleanup on failure
|
|
104
|
+
await this.safeDisconnect(client);
|
|
105
|
+
lastError = error instanceof Error ? error : new Error(String(error));
|
|
106
|
+
const isSandboxError = this.isSandboxError(lastError);
|
|
107
|
+
this.log(`Connection attempt ${attempt} failed: ${lastError.message}, isSandboxError=${isSandboxError}`);
|
|
108
|
+
// Wait before retry (except on last attempt)
|
|
109
|
+
if (attempt < this.#maxRetries) {
|
|
110
|
+
const delayMs = this.calculateRetryDelay(attempt, isSandboxError);
|
|
111
|
+
await this.delay(delayMs);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
throw new ConnectionFailedError(port, lastError);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Attempts HTTP warm-up to trigger sandbox network permission.
|
|
119
|
+
* Returns true if warm-up succeeded (status 2xx), false otherwise.
|
|
120
|
+
*/
|
|
121
|
+
async httpWarmUp(url) {
|
|
122
|
+
try {
|
|
123
|
+
const controller = new AbortController();
|
|
124
|
+
const timeoutId = setTimeout(() => controller.abort(), this.#warmUpTimeoutMs);
|
|
125
|
+
const response = await fetch(`${url}/socket.io/?EIO=4&transport=polling`, {
|
|
126
|
+
method: 'GET',
|
|
127
|
+
signal: controller.signal,
|
|
128
|
+
}).catch((error) => {
|
|
129
|
+
this.log(`HTTP warm-up fetch error: ${error.message}`);
|
|
130
|
+
return null;
|
|
131
|
+
});
|
|
132
|
+
clearTimeout(timeoutId);
|
|
133
|
+
if (response?.ok) {
|
|
134
|
+
this.log(`HTTP warm-up succeeded with status: ${response.status}`);
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
if (response) {
|
|
138
|
+
this.log(`HTTP warm-up completed with non-OK status: ${response.status}`);
|
|
139
|
+
}
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
144
|
+
this.log(`HTTP warm-up failed: ${errorMessage}`);
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Safely disconnects a client, ignoring errors.
|
|
150
|
+
*/
|
|
151
|
+
async safeDisconnect(client) {
|
|
152
|
+
try {
|
|
153
|
+
await client.disconnect();
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
// Ignore disconnect errors during cleanup
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Checks if an error is likely a sandbox-related network error.
|
|
161
|
+
*/
|
|
162
|
+
isSandboxError(error) {
|
|
163
|
+
const message = error.message.toLowerCase();
|
|
164
|
+
return (message.includes('websocket error') ||
|
|
165
|
+
message.includes('network') ||
|
|
166
|
+
message.includes('connection failed') ||
|
|
167
|
+
message.includes('econnrefused'));
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Calculates retry delay with exponential backoff for sandbox errors.
|
|
171
|
+
*/
|
|
172
|
+
calculateRetryDelay(attempt, isSandboxError) {
|
|
173
|
+
const baseDelay = isSandboxError ? this.#retryDelayMs * SANDBOX_ERROR_MULTIPLIER : this.#retryDelayMs;
|
|
174
|
+
return baseDelay * attempt;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Promise-based delay.
|
|
178
|
+
*/
|
|
179
|
+
delay(ms) {
|
|
180
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Logs a debug message.
|
|
184
|
+
*/
|
|
185
|
+
log(message) {
|
|
186
|
+
this.#logger.debug(`[TransportClientFactory] ${message}`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
// ============================================================================
|
|
190
|
+
// Singleton Client Manager (Encapsulated Global State)
|
|
191
|
+
// ============================================================================
|
|
192
|
+
/**
|
|
193
|
+
* Manages singleton instances for transport client.
|
|
194
|
+
* Encapsulates global state following OOP principles.
|
|
195
|
+
*
|
|
196
|
+
* @remarks
|
|
197
|
+
* This class provides explicit dependency management instead of hidden module-level state.
|
|
198
|
+
* - All state is encapsulated within the class instance
|
|
199
|
+
* - Supports multiple instances for testing scenarios
|
|
200
|
+
* - Thread-safe connection management via promise deduplication
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```typescript
|
|
204
|
+
* // Default singleton usage
|
|
205
|
+
* const manager = SingletonClientManager.getInstance()
|
|
206
|
+
* const { client } = await manager.getConnectedClient()
|
|
207
|
+
*
|
|
208
|
+
* // Testing with isolated instance
|
|
209
|
+
* const testManager = new SingletonClientManager()
|
|
210
|
+
* testManager.reset()
|
|
211
|
+
* ```
|
|
212
|
+
*/
|
|
213
|
+
export class SingletonClientManager {
|
|
214
|
+
static #instance;
|
|
215
|
+
#factory;
|
|
216
|
+
#discovery;
|
|
217
|
+
#cachedConnection;
|
|
218
|
+
#connectingPromise;
|
|
219
|
+
#factoryConfig;
|
|
220
|
+
/**
|
|
221
|
+
* Creates a new singleton manager instance.
|
|
222
|
+
* @param factoryConfig - Optional configuration for the factory
|
|
223
|
+
*/
|
|
224
|
+
constructor(factoryConfig) {
|
|
225
|
+
this.#factoryConfig = factoryConfig;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Gets the global singleton instance.
|
|
229
|
+
* Creates one if it doesn't exist.
|
|
230
|
+
*/
|
|
231
|
+
static getInstance() {
|
|
232
|
+
if (!SingletonClientManager.#instance) {
|
|
233
|
+
SingletonClientManager.#instance = new SingletonClientManager();
|
|
234
|
+
}
|
|
235
|
+
return SingletonClientManager.#instance;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Resets the global singleton instance.
|
|
239
|
+
* Primarily for testing.
|
|
240
|
+
*/
|
|
241
|
+
static resetInstance() {
|
|
242
|
+
SingletonClientManager.#instance = undefined;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Gets or creates the singleton factory.
|
|
246
|
+
* @param config - Configuration (only used on first call)
|
|
247
|
+
*/
|
|
248
|
+
getFactory(config) {
|
|
249
|
+
if (!this.#factory) {
|
|
250
|
+
this.#factory = new TransportClientFactory(config ?? this.#factoryConfig);
|
|
251
|
+
}
|
|
252
|
+
return this.#factory;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Gets or creates the singleton discovery.
|
|
256
|
+
*/
|
|
257
|
+
getDiscovery() {
|
|
258
|
+
if (!this.#discovery) {
|
|
259
|
+
this.#discovery = new FileInstanceDiscovery();
|
|
260
|
+
}
|
|
261
|
+
return this.#discovery;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Gets the singleton connected client, connecting if necessary.
|
|
265
|
+
* Thread-safe: concurrent calls share the same connection attempt.
|
|
266
|
+
*
|
|
267
|
+
* @param fromDir - Directory to start discovery from (default: cwd)
|
|
268
|
+
* @returns Connected client and project root
|
|
269
|
+
* @throws NoInstanceRunningError - No .brv directory found
|
|
270
|
+
* @throws InstanceCrashedError - Instance found but process dead
|
|
271
|
+
* @throws ConnectionFailedError - Instance found but connection failed
|
|
272
|
+
*/
|
|
273
|
+
async getConnectedClient(fromDir = process.cwd()) {
|
|
274
|
+
// Return cached if connected
|
|
275
|
+
if (this.#cachedConnection?.client.getState() === 'connected') {
|
|
276
|
+
return this.#cachedConnection;
|
|
277
|
+
}
|
|
278
|
+
// Wait for in-progress connection (race condition prevention)
|
|
279
|
+
if (this.#connectingPromise) {
|
|
280
|
+
return this.#connectingPromise;
|
|
281
|
+
}
|
|
282
|
+
// Start new connection
|
|
283
|
+
this.#connectingPromise = (async () => {
|
|
284
|
+
try {
|
|
285
|
+
this.#cachedConnection = undefined;
|
|
286
|
+
const factory = this.getFactory();
|
|
287
|
+
this.#cachedConnection = await factory.connect(fromDir);
|
|
288
|
+
return this.#cachedConnection;
|
|
289
|
+
}
|
|
290
|
+
finally {
|
|
291
|
+
this.#connectingPromise = undefined;
|
|
292
|
+
}
|
|
293
|
+
})();
|
|
294
|
+
return this.#connectingPromise;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Disconnects and clears the singleton client.
|
|
298
|
+
*/
|
|
299
|
+
async disconnectClient() {
|
|
300
|
+
if (this.#cachedConnection) {
|
|
301
|
+
await this.#cachedConnection.client.disconnect();
|
|
302
|
+
this.#cachedConnection = undefined;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Checks if the transport server is running without attempting to connect.
|
|
307
|
+
* Non-throwing alternative to connect().
|
|
308
|
+
*
|
|
309
|
+
* @param fromDir - Directory to start discovery from (default: cwd)
|
|
310
|
+
* @returns ServerStatus indicating whether server is running and why if not
|
|
311
|
+
*/
|
|
312
|
+
async checkServerStatus(fromDir = process.cwd()) {
|
|
313
|
+
const discovery = this.getDiscovery();
|
|
314
|
+
const result = await discovery.discover(fromDir);
|
|
315
|
+
if (!result.found) {
|
|
316
|
+
return Object.freeze({
|
|
317
|
+
reason: result.reason === 'instance_crashed' ? 'instance_crashed' : 'no_instance',
|
|
318
|
+
running: false,
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
return Object.freeze({
|
|
322
|
+
instance: result.instance,
|
|
323
|
+
projectRoot: result.projectRoot,
|
|
324
|
+
running: true,
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Resets all singleton state.
|
|
329
|
+
* Primarily for testing.
|
|
330
|
+
*/
|
|
331
|
+
reset() {
|
|
332
|
+
this.#cachedConnection = undefined;
|
|
333
|
+
this.#connectingPromise = undefined;
|
|
334
|
+
this.#factory = undefined;
|
|
335
|
+
this.#discovery = undefined;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Gets the cached connection if available.
|
|
339
|
+
* Returns undefined if not connected.
|
|
340
|
+
*/
|
|
341
|
+
get cachedConnection() {
|
|
342
|
+
return this.#cachedConnection;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Checks if a connection attempt is in progress.
|
|
346
|
+
*/
|
|
347
|
+
get isConnecting() {
|
|
348
|
+
return this.#connectingPromise !== undefined;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
// ============================================================================
|
|
352
|
+
// Backward-Compatible Module Functions
|
|
353
|
+
// ============================================================================
|
|
354
|
+
/**
|
|
355
|
+
* Gets or creates the singleton factory.
|
|
356
|
+
* @param config - Configuration (only used on first call)
|
|
357
|
+
*/
|
|
358
|
+
export function getTransportClientFactory(config) {
|
|
359
|
+
return SingletonClientManager.getInstance().getFactory(config);
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Creates a new factory instance (non-singleton).
|
|
363
|
+
* @deprecated Use connectToTransport() for simpler API
|
|
364
|
+
*/
|
|
365
|
+
export function createTransportClientFactory(config) {
|
|
366
|
+
return new TransportClientFactory(config);
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Connects to ByteRover transport server (simplified API).
|
|
370
|
+
* Auto-discovers .brv directory by walking up from fromDir.
|
|
371
|
+
*
|
|
372
|
+
* @param fromDir - Directory to start discovery from (default: cwd)
|
|
373
|
+
* @param config - Optional factory configuration
|
|
374
|
+
* @returns Connected client and project root
|
|
375
|
+
* @throws NoInstanceRunningError - No .brv directory found
|
|
376
|
+
* @throws InstanceCrashedError - Instance found but process dead
|
|
377
|
+
* @throws ConnectionFailedError - Instance found but connection failed
|
|
378
|
+
*
|
|
379
|
+
* @example
|
|
380
|
+
* ```typescript
|
|
381
|
+
* // Simple connection
|
|
382
|
+
* const {client, projectRoot} = await connectToTransport()
|
|
383
|
+
*
|
|
384
|
+
* // With custom directory
|
|
385
|
+
* const {client} = await connectToTransport('/path/to/project')
|
|
386
|
+
*
|
|
387
|
+
* // With custom config
|
|
388
|
+
* const {client} = await connectToTransport(undefined, { logger: myLogger })
|
|
389
|
+
* ```
|
|
390
|
+
*/
|
|
391
|
+
export async function connectToTransport(fromDir, config) {
|
|
392
|
+
const factory = new TransportClientFactory(config);
|
|
393
|
+
return factory.connect(fromDir);
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Checks if the transport server is running without attempting to connect.
|
|
397
|
+
* Non-throwing alternative to connectToTransport().
|
|
398
|
+
*
|
|
399
|
+
* @param fromDir - Directory to start discovery from (default: cwd)
|
|
400
|
+
* @returns ServerStatus indicating whether server is running and why if not
|
|
401
|
+
*
|
|
402
|
+
* @example
|
|
403
|
+
* ```typescript
|
|
404
|
+
* const status = await checkServerStatus()
|
|
405
|
+
* if (status.running) {
|
|
406
|
+
* const { client } = await getConnectedClient()
|
|
407
|
+
* } else {
|
|
408
|
+
* console.log(`Server not running: ${status.reason}`)
|
|
409
|
+
* }
|
|
410
|
+
* ```
|
|
411
|
+
*/
|
|
412
|
+
export async function checkServerStatus(fromDir = process.cwd()) {
|
|
413
|
+
return SingletonClientManager.getInstance().checkServerStatus(fromDir);
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Gets the singleton connected client, connecting if necessary.
|
|
417
|
+
* Thread-safe: concurrent calls share the same connection attempt.
|
|
418
|
+
*
|
|
419
|
+
* @param fromDir - Directory to start discovery from (default: cwd)
|
|
420
|
+
* @returns Connected client and project root
|
|
421
|
+
* @throws NoInstanceRunningError - No .brv directory found
|
|
422
|
+
* @throws InstanceCrashedError - Instance found but process dead
|
|
423
|
+
* @throws ConnectionFailedError - Instance found but connection failed
|
|
424
|
+
*
|
|
425
|
+
* @example
|
|
426
|
+
* ```typescript
|
|
427
|
+
* // Concurrent calls share the same connection
|
|
428
|
+
* const [result1, result2] = await Promise.all([
|
|
429
|
+
* getConnectedClient(),
|
|
430
|
+
* getConnectedClient(),
|
|
431
|
+
* ])
|
|
432
|
+
* console.log(result1.client === result2.client) // true
|
|
433
|
+
* ```
|
|
434
|
+
*/
|
|
435
|
+
export async function getConnectedClient(fromDir = process.cwd()) {
|
|
436
|
+
return SingletonClientManager.getInstance().getConnectedClient(fromDir);
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Disconnects and clears the singleton client.
|
|
440
|
+
*/
|
|
441
|
+
export async function disconnectClient() {
|
|
442
|
+
return SingletonClientManager.getInstance().disconnectClient();
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Resets all singleton instances. Primarily for testing.
|
|
446
|
+
*/
|
|
447
|
+
export function resetSingletons() {
|
|
448
|
+
SingletonClientManager.getInstance().reset();
|
|
449
|
+
SingletonClientManager.resetInstance();
|
|
450
|
+
}
|
|
451
|
+
//# sourceMappingURL=client-factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-factory.js","sourceRoot":"","sources":["../../infra/client-factory.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,2CAA2C,CAAA;AAClD,OAAO,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAC,qBAAqB,EAAC,MAAM,8BAA8B,CAAA;AAClE,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAA;AAyDrD,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,MAAM,mBAAmB,GAAG,CAAC,CAAA;AAC7B,MAAM,sBAAsB,GAAG,GAAG,CAAA;AAClC,MAAM,yBAAyB,GAAG,IAAI,CAAA;AACtC,MAAM,0BAA0B,GAAG,IAAI,CAAA;AACvC,MAAM,sBAAsB,GAAG,GAAG,CAAA;AAClC,MAAM,wBAAwB,GAAG,CAAC,CAAA;AAElC,+EAA+E;AAC/E,yBAAyB;AACzB,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,sBAAsB;IACxB,UAAU,CAAoB;IAC9B,OAAO,CAAe;IACtB,WAAW,CAAQ;IACnB,aAAa,CAAQ;IACrB,gBAAgB,CAAQ;IACxB,iBAAiB,CAAQ;IACzB,oBAAoB,CAAQ;IAErC,YAAY,MAAqC;QAC/C,4CAA4C;QAC5C,IAAI,CAAC,UAAU,GAAG,MAAM,EAAE,SAAS,IAAI,IAAI,qBAAqB,E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AO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;AACjC,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,UAAkB,OAAO,CAAC,GAAG,EAAE;IACrE,OAAO,sBAAsB,CAAC,WAAW,EAAE,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAA;AACxE,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,UAAkB,OAAO,CAAC,GAAG,EAAE;IACtE,OAAO,sBAAsB,CAAC,WAAW,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAA;AACzE,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,OAAO,sBAAsB,CAAC,WAAW,EAAE,CAAC,gBAAgB,EAAE,CAAA;AAChE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,sBAAsB,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAA;IAC5C,sBAAsB,CAAC,aAAa,EAAE,CAAA;AACxC,CAAC"}
|
package/node_modules/@campfirein/brv-transport-client/dist/infra/connection-state-manager.d.ts
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { ConnectionState, ConnectionStateHandler, IConnectionStateManager } from '../core/interfaces/i-connection-state.js';
|
|
2
|
+
import type { IClientLogger } from '../core/interfaces/i-client-logger.js';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for ConnectionStateManager.
|
|
5
|
+
*/
|
|
6
|
+
export type ConnectionStateManagerConfig = {
|
|
7
|
+
/** Initial connection state (default: 'disconnected') */
|
|
8
|
+
readonly initialState?: ConnectionState;
|
|
9
|
+
/** Logger for debugging (default: NoOpClientLogger) */
|
|
10
|
+
readonly logger?: IClientLogger;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Manages connection state and notifies subscribers of state changes.
|
|
14
|
+
* Implements Observer Pattern for state change notifications.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* - State handlers persist across state changes until explicitly unsubscribed
|
|
18
|
+
* - Each handler receives the new state when it changes
|
|
19
|
+
* - Handlers are called synchronously in registration order
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const stateManager = new ConnectionStateManager()
|
|
24
|
+
*
|
|
25
|
+
* const unsubscribe = stateManager.onStateChange((state) => {
|
|
26
|
+
* console.log('State changed to:', state)
|
|
27
|
+
* })
|
|
28
|
+
*
|
|
29
|
+
* stateManager.setState('connecting') // Logs: "State changed to: connecting"
|
|
30
|
+
* stateManager.setState('connected') // Logs: "State changed to: connected"
|
|
31
|
+
*
|
|
32
|
+
* unsubscribe()
|
|
33
|
+
* stateManager.setState('disconnected') // No log (unsubscribed)
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare class ConnectionStateManager implements IConnectionStateManager {
|
|
37
|
+
#private;
|
|
38
|
+
constructor(config?: ConnectionStateManagerConfig);
|
|
39
|
+
/**
|
|
40
|
+
* Gets the current connection state.
|
|
41
|
+
* @returns Current connection state
|
|
42
|
+
*/
|
|
43
|
+
getState(): ConnectionState;
|
|
44
|
+
/**
|
|
45
|
+
* Updates the connection state and notifies handlers.
|
|
46
|
+
* Only notifies if the state actually changed.
|
|
47
|
+
* @throws {InvalidStateTransitionError} If the transition is not allowed
|
|
48
|
+
*/
|
|
49
|
+
setState(newState: ConnectionState): void;
|
|
50
|
+
/**
|
|
51
|
+
* Registers a handler for connection state changes.
|
|
52
|
+
* @returns Unsubscribe function
|
|
53
|
+
*/
|
|
54
|
+
onStateChange(handler: ConnectionStateHandler): () => void;
|
|
55
|
+
/**
|
|
56
|
+
* Clears all state handlers.
|
|
57
|
+
*/
|
|
58
|
+
clearHandlers(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Checks if transition to a new state is valid from current state.
|
|
61
|
+
* @param newState - The target state
|
|
62
|
+
* @returns True if transition is allowed
|
|
63
|
+
*/
|
|
64
|
+
canTransitionTo(newState: ConnectionState): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Checks if currently connected.
|
|
67
|
+
* @returns True if state is 'connected'
|
|
68
|
+
*/
|
|
69
|
+
isConnected(): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Checks if currently connecting.
|
|
72
|
+
* @returns True if state is 'connecting'
|
|
73
|
+
*/
|
|
74
|
+
isConnecting(): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Checks if currently disconnected.
|
|
77
|
+
* @returns True if state is 'disconnected'
|
|
78
|
+
*/
|
|
79
|
+
isDisconnected(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Checks if currently reconnecting.
|
|
82
|
+
* @returns True if state is 'reconnecting'
|
|
83
|
+
*/
|
|
84
|
+
isReconnecting(): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Notifies all handlers of the state change.
|
|
87
|
+
*/
|
|
88
|
+
private notifyHandlers;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=connection-state-manager.d.ts.map
|
package/node_modules/@campfirein/brv-transport-client/dist/infra/connection-state-manager.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-state-manager.d.ts","sourceRoot":"","sources":["../../infra/connection-state-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,0CAA0C,CAAA;AACjD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uCAAuC,CAAA;AAexE;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC,yDAAyD;IACzD,QAAQ,CAAC,YAAY,CAAC,EAAE,eAAe,CAAA;IACvC,uDAAuD;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAA;CAChC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,sBAAuB,YAAW,uBAAuB;;gBAKxD,MAAM,CAAC,EAAE,4BAA4B;IAKjD;;;OAGG;IACI,QAAQ,IAAI,eAAe;IAIlC;;;;OAIG;IACI,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAoBhD;;;OAGG;IACI,aAAa,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,IAAI;IAOjE;;OAEG;IACI,aAAa,IAAI,IAAI;IAI5B;;;;OAIG;IACI,eAAe,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO;IAK1D;;;OAGG;IACI,WAAW,IAAI,OAAO;IAI7B;;;OAGG;IACI,YAAY,IAAI,OAAO;IAI9B;;;OAGG;IACI,cAAc,IAAI,OAAO;IAIhC;;;OAGG;IACI,cAAc,IAAI,OAAO;IAIhC;;OAEG;IACH,OAAO,CAAC,cAAc;CAWvB"}
|