rivetkit 2.0.2 → 2.0.4-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/dist/browser/client.d.ts +2485 -0
- package/dist/browser/client.js +5182 -0
- package/dist/browser/client.js.map +1 -0
- package/dist/browser/inspector/client.d.ts +130 -0
- package/dist/browser/inspector/client.js +2854 -0
- package/dist/browser/inspector/client.js.map +1 -0
- package/dist/browser/v3-DnYObHH3.d.ts +279 -0
- package/dist/inspector.tar.gz +0 -0
- package/dist/schemas/actor-inspector/v1.ts +784 -0
- package/dist/schemas/actor-inspector/v2.ts +796 -0
- package/dist/schemas/actor-inspector/v3.ts +899 -0
- package/dist/schemas/actor-persist/v1.ts +225 -0
- package/dist/schemas/actor-persist/v2.ts +268 -0
- package/dist/schemas/actor-persist/v3.ts +280 -0
- package/dist/schemas/actor-persist/v4.ts +406 -0
- package/dist/schemas/client-protocol/v1.ts +441 -0
- package/dist/schemas/client-protocol/v2.ts +438 -0
- package/dist/schemas/client-protocol/v3.ts +554 -0
- package/dist/schemas/file-system-driver/v1.ts +108 -0
- package/dist/schemas/file-system-driver/v2.ts +142 -0
- package/dist/schemas/file-system-driver/v3.ts +167 -0
- package/dist/schemas/persist/v1.ts +781 -0
- package/dist/schemas/transport/v1.ts +697 -0
- package/dist/tsup/actor/errors.cjs +106 -0
- package/dist/tsup/actor/errors.cjs.map +1 -0
- package/dist/tsup/actor/errors.d.cts +188 -0
- package/dist/tsup/actor/errors.d.ts +188 -0
- package/dist/tsup/actor/errors.js +106 -0
- package/dist/tsup/actor/errors.js.map +1 -0
- package/dist/tsup/actor-router-consts-D29T1Z-K.d.cts +24 -0
- package/dist/tsup/actor-router-consts-D29T1Z-K.d.ts +24 -0
- package/dist/tsup/chunk-325TLXJT.js +1060 -0
- package/dist/tsup/chunk-325TLXJT.js.map +1 -0
- package/dist/tsup/chunk-424PT5DM.js +23 -0
- package/dist/tsup/chunk-424PT5DM.js.map +1 -0
- package/dist/tsup/chunk-4JVIG3SS.cjs +6289 -0
- package/dist/tsup/chunk-4JVIG3SS.cjs.map +1 -0
- package/dist/tsup/chunk-6LJAZ5R4.cjs +96 -0
- package/dist/tsup/chunk-6LJAZ5R4.cjs.map +1 -0
- package/dist/tsup/chunk-6XU3FMCB.cjs +534 -0
- package/dist/tsup/chunk-6XU3FMCB.cjs.map +1 -0
- package/dist/tsup/chunk-7HTNH26M.js +509 -0
- package/dist/tsup/chunk-7HTNH26M.js.map +1 -0
- package/dist/tsup/chunk-AUVH72RE.cjs +5977 -0
- package/dist/tsup/chunk-AUVH72RE.cjs.map +1 -0
- package/dist/tsup/chunk-D4BYUPNQ.js +645 -0
- package/dist/tsup/chunk-D4BYUPNQ.js.map +1 -0
- package/dist/tsup/chunk-HDQ2JUQT.cjs +23 -0
- package/dist/tsup/chunk-HDQ2JUQT.cjs.map +1 -0
- package/dist/tsup/chunk-HHXX2VRM.js +6289 -0
- package/dist/tsup/chunk-HHXX2VRM.js.map +1 -0
- package/dist/tsup/chunk-JEAEA2PB.js +49 -0
- package/dist/tsup/chunk-JEAEA2PB.js.map +1 -0
- package/dist/tsup/chunk-JYSEG3VF.cjs +642 -0
- package/dist/tsup/chunk-JYSEG3VF.cjs.map +1 -0
- package/dist/tsup/chunk-K6DGYILQ.js +2657 -0
- package/dist/tsup/chunk-K6DGYILQ.js.map +1 -0
- package/dist/tsup/chunk-KJSYAUOM.js +96 -0
- package/dist/tsup/chunk-KJSYAUOM.js.map +1 -0
- package/dist/tsup/chunk-L47L3ZWJ.cjs +509 -0
- package/dist/tsup/chunk-L47L3ZWJ.cjs.map +1 -0
- package/dist/tsup/chunk-LXUQ667X.js +2006 -0
- package/dist/tsup/chunk-LXUQ667X.js.map +1 -0
- package/dist/tsup/chunk-MXNPAB5W.js +5977 -0
- package/dist/tsup/chunk-MXNPAB5W.js.map +1 -0
- package/dist/tsup/chunk-N4KRDJ56.js +72 -0
- package/dist/tsup/chunk-N4KRDJ56.js.map +1 -0
- package/dist/tsup/chunk-NIYZDWMW.cjs +2006 -0
- package/dist/tsup/chunk-NIYZDWMW.cjs.map +1 -0
- package/dist/tsup/chunk-PQZHDKRW.cjs +1060 -0
- package/dist/tsup/chunk-PQZHDKRW.cjs.map +1 -0
- package/dist/tsup/chunk-PVOE6BU7.cjs +1050 -0
- package/dist/tsup/chunk-PVOE6BU7.cjs.map +1 -0
- package/dist/tsup/chunk-Q4UD2GA4.cjs +1810 -0
- package/dist/tsup/chunk-Q4UD2GA4.cjs.map +1 -0
- package/dist/tsup/chunk-QUD664YZ.js +1810 -0
- package/dist/tsup/chunk-QUD664YZ.js.map +1 -0
- package/dist/tsup/chunk-RTOCTWME.js +1050 -0
- package/dist/tsup/chunk-RTOCTWME.js.map +1 -0
- package/dist/tsup/chunk-SAZZ4SB2.cjs +2657 -0
- package/dist/tsup/chunk-SAZZ4SB2.cjs.map +1 -0
- package/dist/tsup/chunk-SR3KQE7Q.cjs +72 -0
- package/dist/tsup/chunk-SR3KQE7Q.cjs.map +1 -0
- package/dist/tsup/chunk-V2GHLYC6.cjs +49 -0
- package/dist/tsup/chunk-V2GHLYC6.cjs.map +1 -0
- package/dist/tsup/chunk-V3WG7XTW.cjs +645 -0
- package/dist/tsup/chunk-V3WG7XTW.cjs.map +1 -0
- package/dist/tsup/chunk-VKVNIQRQ.js +257 -0
- package/dist/tsup/chunk-VKVNIQRQ.js.map +1 -0
- package/dist/tsup/chunk-WMPW7JYC.js +642 -0
- package/dist/tsup/chunk-WMPW7JYC.js.map +1 -0
- package/dist/tsup/chunk-Z7HNQ2WF.js +534 -0
- package/dist/tsup/chunk-Z7HNQ2WF.js.map +1 -0
- package/dist/tsup/chunk-ZFY5J2EP.cjs +257 -0
- package/dist/tsup/chunk-ZFY5J2EP.cjs.map +1 -0
- package/dist/tsup/client/mod.cjs +33 -0
- package/dist/tsup/client/mod.cjs.map +1 -0
- package/dist/tsup/client/mod.d.cts +64 -0
- package/dist/tsup/client/mod.d.ts +64 -0
- package/dist/tsup/client/mod.js +33 -0
- package/dist/tsup/client/mod.js.map +1 -0
- package/dist/tsup/common/log.cjs +21 -0
- package/dist/tsup/common/log.cjs.map +1 -0
- package/dist/tsup/common/log.d.cts +34 -0
- package/dist/tsup/common/log.d.ts +34 -0
- package/dist/tsup/common/log.js +21 -0
- package/dist/tsup/common/log.js.map +1 -0
- package/dist/tsup/common/websocket.cjs +10 -0
- package/dist/tsup/common/websocket.cjs.map +1 -0
- package/dist/tsup/common/websocket.d.cts +3 -0
- package/dist/tsup/common/websocket.d.ts +3 -0
- package/dist/tsup/common/websocket.js +10 -0
- package/dist/tsup/common/websocket.js.map +1 -0
- package/dist/tsup/config-BiNoIHRs.d.cts +80 -0
- package/dist/tsup/config-BiNoIHRs.d.ts +80 -0
- package/dist/tsup/config-P3XujgRr.d.ts +2594 -0
- package/dist/tsup/config-_gfywqqI.d.cts +2594 -0
- package/dist/tsup/context-Bxd8Cx4H.d.cts +75 -0
- package/dist/tsup/context-uNA4TRn3.d.ts +75 -0
- package/dist/tsup/db/drizzle/mod.cjs +49 -0
- package/dist/tsup/db/drizzle/mod.cjs.map +1 -0
- package/dist/tsup/db/drizzle/mod.d.cts +17 -0
- package/dist/tsup/db/drizzle/mod.d.ts +17 -0
- package/dist/tsup/db/drizzle/mod.js +49 -0
- package/dist/tsup/db/drizzle/mod.js.map +1 -0
- package/dist/tsup/db/mod.cjs +9 -0
- package/dist/tsup/db/mod.cjs.map +1 -0
- package/dist/tsup/db/mod.d.cts +9 -0
- package/dist/tsup/db/mod.d.ts +9 -0
- package/dist/tsup/db/mod.js +9 -0
- package/dist/tsup/db/mod.js.map +1 -0
- package/dist/tsup/driver-BcLvZcKl.d.cts +13 -0
- package/dist/tsup/driver-CPGHKXyh.d.ts +13 -0
- package/dist/tsup/driver-helpers/mod.cjs +53 -0
- package/dist/tsup/driver-helpers/mod.cjs.map +1 -0
- package/dist/tsup/driver-helpers/mod.d.cts +47 -0
- package/dist/tsup/driver-helpers/mod.d.ts +47 -0
- package/dist/tsup/driver-helpers/mod.js +53 -0
- package/dist/tsup/driver-helpers/mod.js.map +1 -0
- package/dist/tsup/driver-test-suite/mod.cjs +4974 -0
- package/dist/tsup/driver-test-suite/mod.cjs.map +1 -0
- package/dist/tsup/driver-test-suite/mod.d.cts +73 -0
- package/dist/tsup/driver-test-suite/mod.d.ts +73 -0
- package/dist/tsup/driver-test-suite/mod.js +4974 -0
- package/dist/tsup/driver-test-suite/mod.js.map +1 -0
- package/dist/tsup/inspector/mod.cjs +164 -0
- package/dist/tsup/inspector/mod.cjs.map +1 -0
- package/dist/tsup/inspector/mod.d.cts +130 -0
- package/dist/tsup/inspector/mod.d.ts +130 -0
- package/dist/tsup/inspector/mod.js +164 -0
- package/dist/tsup/inspector/mod.js.map +1 -0
- package/dist/tsup/keys-CydblqMh.d.cts +13 -0
- package/dist/tsup/keys-CydblqMh.d.ts +13 -0
- package/dist/tsup/mod.cjs +82 -0
- package/dist/tsup/mod.cjs.map +1 -0
- package/dist/tsup/mod.d.cts +126 -0
- package/dist/tsup/mod.d.ts +126 -0
- package/dist/tsup/mod.js +82 -0
- package/dist/tsup/mod.js.map +1 -0
- package/dist/tsup/serve-test-suite/mod.cjs +2601 -0
- package/dist/tsup/serve-test-suite/mod.cjs.map +1 -0
- package/dist/tsup/serve-test-suite/mod.d.cts +9 -0
- package/dist/tsup/serve-test-suite/mod.d.ts +9 -0
- package/dist/tsup/serve-test-suite/mod.js +2601 -0
- package/dist/tsup/serve-test-suite/mod.js.map +1 -0
- package/dist/tsup/test/mod.cjs +90 -0
- package/dist/tsup/test/mod.cjs.map +1 -0
- package/dist/tsup/test/mod.d.cts +26 -0
- package/dist/tsup/test/mod.d.ts +26 -0
- package/dist/tsup/test/mod.js +90 -0
- package/dist/tsup/test/mod.js.map +1 -0
- package/dist/tsup/utils-fwx3o3K9.d.cts +18 -0
- package/dist/tsup/utils-fwx3o3K9.d.ts +18 -0
- package/dist/tsup/utils.cjs +43 -0
- package/dist/tsup/utils.cjs.map +1 -0
- package/dist/tsup/utils.d.cts +148 -0
- package/dist/tsup/utils.d.ts +148 -0
- package/dist/tsup/utils.js +43 -0
- package/dist/tsup/utils.js.map +1 -0
- package/dist/tsup/v3-DnYObHH3.d.cts +279 -0
- package/dist/tsup/v3-DnYObHH3.d.ts +279 -0
- package/dist/tsup/workflow/mod.cjs +16 -0
- package/dist/tsup/workflow/mod.cjs.map +1 -0
- package/dist/tsup/workflow/mod.d.cts +25 -0
- package/dist/tsup/workflow/mod.d.ts +25 -0
- package/dist/tsup/workflow/mod.js +16 -0
- package/dist/tsup/workflow/mod.js.map +1 -0
- package/package.json +293 -5
- package/src/actor/config.ts +1221 -0
- package/src/actor/conn/driver.ts +61 -0
- package/src/actor/conn/drivers/http.ts +17 -0
- package/src/actor/conn/drivers/raw-request.ts +24 -0
- package/src/actor/conn/drivers/raw-websocket.ts +65 -0
- package/src/actor/conn/drivers/websocket.ts +144 -0
- package/src/actor/conn/mod.ts +288 -0
- package/src/actor/conn/persisted.ts +81 -0
- package/src/actor/conn/state-manager.ts +196 -0
- package/src/actor/contexts/action.ts +47 -0
- package/src/actor/contexts/base/actor.ts +347 -0
- package/src/actor/contexts/base/conn-init.ts +68 -0
- package/src/actor/contexts/base/conn.ts +73 -0
- package/src/actor/contexts/before-action-response.ts +42 -0
- package/src/actor/contexts/before-connect.ts +31 -0
- package/src/actor/contexts/connect.ts +42 -0
- package/src/actor/contexts/create-conn-state.ts +32 -0
- package/src/actor/contexts/create-vars.ts +39 -0
- package/src/actor/contexts/create.ts +39 -0
- package/src/actor/contexts/destroy.ts +42 -0
- package/src/actor/contexts/disconnect.ts +43 -0
- package/src/actor/contexts/index.ts +33 -0
- package/src/actor/contexts/request.ts +80 -0
- package/src/actor/contexts/run.ts +47 -0
- package/src/actor/contexts/sleep.ts +42 -0
- package/src/actor/contexts/state-change.ts +42 -0
- package/src/actor/contexts/wake.ts +42 -0
- package/src/actor/contexts/websocket.ts +80 -0
- package/src/actor/database.ts +13 -0
- package/src/actor/definition.ts +64 -0
- package/src/actor/driver.ts +114 -0
- package/src/actor/errors.ts +556 -0
- package/src/actor/instance/connection-manager.ts +574 -0
- package/src/actor/instance/event-manager.ts +314 -0
- package/src/actor/instance/keys.ts +146 -0
- package/src/actor/instance/kv.ts +241 -0
- package/src/actor/instance/mod.ts +1658 -0
- package/src/actor/instance/persisted.ts +67 -0
- package/src/actor/instance/queue-manager.ts +603 -0
- package/src/actor/instance/queue.ts +345 -0
- package/src/actor/instance/schedule-manager.ts +392 -0
- package/src/actor/instance/state-manager.ts +542 -0
- package/src/actor/instance/traces-driver.ts +128 -0
- package/src/actor/keys.test.ts +275 -0
- package/src/actor/keys.ts +89 -0
- package/src/actor/log.ts +6 -0
- package/src/actor/mod.ts +110 -0
- package/src/actor/protocol/old.ts +416 -0
- package/src/actor/protocol/serde.ts +222 -0
- package/src/actor/router-endpoints.ts +400 -0
- package/src/actor/router-websocket-endpoints.test.ts +54 -0
- package/src/actor/router-websocket-endpoints.ts +405 -0
- package/src/actor/router.ts +380 -0
- package/src/actor/schedule.ts +17 -0
- package/src/actor/schema.ts +291 -0
- package/src/actor/utils.test.ts +48 -0
- package/src/actor/utils.ts +158 -0
- package/src/client/actor-common.ts +32 -0
- package/src/client/actor-conn.ts +1262 -0
- package/src/client/actor-handle.ts +344 -0
- package/src/client/actor-query.ts +112 -0
- package/src/client/client.ts +558 -0
- package/src/client/config.ts +151 -0
- package/src/client/errors.ts +76 -0
- package/src/client/log.ts +5 -0
- package/src/client/mod.browser.ts +2 -0
- package/src/client/mod.ts +70 -0
- package/src/client/queue.ts +146 -0
- package/src/client/raw-utils.ts +149 -0
- package/src/client/test.ts +44 -0
- package/src/client/utils.ts +252 -0
- package/src/common/actor-router-consts.ts +59 -0
- package/src/common/cors.ts +57 -0
- package/src/common/eventsource-interface.ts +47 -0
- package/src/common/eventsource.ts +44 -0
- package/src/common/inline-websocket-adapter.ts +154 -0
- package/src/common/log-levels.ts +27 -0
- package/src/common/log.ts +229 -0
- package/src/common/logfmt.ts +221 -0
- package/src/common/network.ts +2 -0
- package/src/common/router.ts +174 -0
- package/src/common/utils.ts +339 -0
- package/src/common/websocket-interface.ts +7 -0
- package/src/common/websocket.ts +43 -0
- package/src/db/config.ts +100 -0
- package/src/db/drizzle/mod.ts +226 -0
- package/src/db/drizzle/sqlite-core.ts +22 -0
- package/src/db/mod.ts +125 -0
- package/src/db/shared.ts +92 -0
- package/src/db/sqlite-vfs.ts +12 -0
- package/src/devtools-loader/index.ts +33 -0
- package/src/devtools-loader/log.ts +5 -0
- package/src/driver-helpers/mod.ts +33 -0
- package/src/driver-helpers/utils.ts +54 -0
- package/src/driver-test-suite/log.ts +5 -0
- package/src/driver-test-suite/mod.ts +293 -0
- package/src/driver-test-suite/test-inline-client-driver.ts +307 -0
- package/src/driver-test-suite/tests/access-control.ts +218 -0
- package/src/driver-test-suite/tests/action-features.ts +203 -0
- package/src/driver-test-suite/tests/actor-conn-hibernation.ts +152 -0
- package/src/driver-test-suite/tests/actor-conn-state.ts +300 -0
- package/src/driver-test-suite/tests/actor-conn.ts +596 -0
- package/src/driver-test-suite/tests/actor-db-raw.ts +73 -0
- package/src/driver-test-suite/tests/actor-db.ts +477 -0
- package/src/driver-test-suite/tests/actor-destroy.ts +294 -0
- package/src/driver-test-suite/tests/actor-driver.ts +18 -0
- package/src/driver-test-suite/tests/actor-error-handling.ts +150 -0
- package/src/driver-test-suite/tests/actor-handle.ts +312 -0
- package/src/driver-test-suite/tests/actor-inline-client.ts +163 -0
- package/src/driver-test-suite/tests/actor-inspector.ts +264 -0
- package/src/driver-test-suite/tests/actor-kv.ts +65 -0
- package/src/driver-test-suite/tests/actor-metadata.ts +116 -0
- package/src/driver-test-suite/tests/actor-onstatechange.ts +95 -0
- package/src/driver-test-suite/tests/actor-queue.ts +325 -0
- package/src/driver-test-suite/tests/actor-run.ts +181 -0
- package/src/driver-test-suite/tests/actor-schedule.ts +97 -0
- package/src/driver-test-suite/tests/actor-sleep.ts +415 -0
- package/src/driver-test-suite/tests/actor-state.ts +54 -0
- package/src/driver-test-suite/tests/actor-stateless.ts +70 -0
- package/src/driver-test-suite/tests/actor-vars.ts +97 -0
- package/src/driver-test-suite/tests/actor-workflow.ts +118 -0
- package/src/driver-test-suite/tests/manager-driver.ts +388 -0
- package/src/driver-test-suite/tests/raw-http-direct-registry.ts +227 -0
- package/src/driver-test-suite/tests/raw-http-request-properties.ts +454 -0
- package/src/driver-test-suite/tests/raw-http.ts +359 -0
- package/src/driver-test-suite/tests/raw-websocket-direct-registry.ts +393 -0
- package/src/driver-test-suite/tests/raw-websocket.ts +513 -0
- package/src/driver-test-suite/tests/request-access.ts +240 -0
- package/src/driver-test-suite/utils.ts +80 -0
- package/src/drivers/default.ts +38 -0
- package/src/drivers/engine/actor-driver.ts +1027 -0
- package/src/drivers/engine/config.ts +43 -0
- package/src/drivers/engine/log.ts +5 -0
- package/src/drivers/engine/mod.ts +36 -0
- package/src/drivers/file-system/actor.ts +102 -0
- package/src/drivers/file-system/global-state.ts +1445 -0
- package/src/drivers/file-system/kv-limits.ts +70 -0
- package/src/drivers/file-system/log.ts +5 -0
- package/src/drivers/file-system/manager.ts +300 -0
- package/src/drivers/file-system/mod.ts +78 -0
- package/src/drivers/file-system/sqlite-runtime.ts +210 -0
- package/src/drivers/file-system/utils.ts +125 -0
- package/src/engine-process/constants.ts +2 -0
- package/src/engine-process/log.ts +5 -0
- package/src/engine-process/mod.ts +464 -0
- package/src/globals.d.ts +35 -0
- package/src/inspector/actor-inspector.ts +352 -0
- package/src/inspector/config.ts +49 -0
- package/src/inspector/handler.ts +273 -0
- package/src/inspector/log.ts +5 -0
- package/src/inspector/mod.browser.ts +8 -0
- package/src/inspector/mod.ts +4 -0
- package/src/inspector/serve-ui.ts +40 -0
- package/src/inspector/transport.ts +18 -0
- package/src/inspector/utils.ts +32 -0
- package/src/manager/driver.ts +106 -0
- package/src/manager/gateway.ts +668 -0
- package/src/manager/log.ts +5 -0
- package/src/manager/mod.ts +2 -0
- package/src/manager/protocol/mod.ts +22 -0
- package/src/manager/protocol/query.ts +85 -0
- package/src/manager/router-schema.ts +22 -0
- package/src/manager/router.ts +660 -0
- package/src/manager-api/actors.ts +83 -0
- package/src/manager-api/common.ts +4 -0
- package/src/mod.ts +24 -0
- package/src/registry/config/driver.ts +21 -0
- package/src/registry/config/index.ts +510 -0
- package/src/registry/config/legacy-runner.ts +157 -0
- package/src/registry/config/runner.ts +21 -0
- package/src/registry/config/serverless.ts +94 -0
- package/src/registry/index.ts +194 -0
- package/src/registry/log.ts +5 -0
- package/src/remote-manager-driver/actor-http-client.ts +84 -0
- package/src/remote-manager-driver/actor-websocket-client.ts +81 -0
- package/src/remote-manager-driver/api-endpoints.ts +159 -0
- package/src/remote-manager-driver/api-utils.ts +69 -0
- package/src/remote-manager-driver/log.ts +5 -0
- package/src/remote-manager-driver/metadata.ts +64 -0
- package/src/remote-manager-driver/mod.ts +414 -0
- package/src/remote-manager-driver/ws-proxy.ts +189 -0
- package/src/schemas/actor-inspector/mod.ts +1 -0
- package/src/schemas/actor-inspector/versioned.ts +233 -0
- package/src/schemas/actor-persist/mod.ts +1 -0
- package/src/schemas/actor-persist/versioned.ts +217 -0
- package/src/schemas/client-protocol/mod.ts +1 -0
- package/src/schemas/client-protocol/versioned.ts +330 -0
- package/src/schemas/client-protocol-zod/mod.ts +118 -0
- package/src/schemas/file-system-driver/mod.ts +1 -0
- package/src/schemas/file-system-driver/versioned.ts +135 -0
- package/src/schemas/persist/mod.ts +1 -0
- package/src/schemas/transport/mod.ts +1 -0
- package/src/serde.ts +138 -0
- package/src/serve-test-suite/mod.ts +148 -0
- package/src/serverless/configure.ts +82 -0
- package/src/serverless/log.ts +5 -0
- package/src/serverless/router.test.ts +299 -0
- package/src/serverless/router.ts +215 -0
- package/src/test/log.ts +5 -0
- package/src/test/mod.ts +99 -0
- package/src/utils/crypto.ts +24 -0
- package/src/utils/endpoint-parser.test.ts +202 -0
- package/src/utils/endpoint-parser.ts +124 -0
- package/src/utils/env-vars.ts +78 -0
- package/src/utils/node.ts +178 -0
- package/src/utils/router.ts +83 -0
- package/src/utils/serve.ts +212 -0
- package/src/utils.test.ts +34 -0
- package/src/utils.ts +437 -0
- package/src/workflow/constants.ts +2 -0
- package/src/workflow/context.ts +597 -0
- package/src/workflow/driver.ts +194 -0
- package/src/workflow/inspector.ts +268 -0
- package/src/workflow/mod.ts +128 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import * as cbor from "cbor-x";
|
|
2
|
+
import type { Context as HonoContext, HonoRequest } from "hono";
|
|
3
|
+
import type { AnyConn } from "@/actor/conn/mod";
|
|
4
|
+
import { ActionContext } from "@/actor/contexts";
|
|
5
|
+
import * as errors from "@/actor/errors";
|
|
6
|
+
import type { AnyActorInstance } from "@/actor/instance/mod";
|
|
7
|
+
import { type Encoding, EncodingSchema } from "@/actor/protocol/serde";
|
|
8
|
+
import { hasSchemaConfigKey } from "@/actor/schema";
|
|
9
|
+
import {
|
|
10
|
+
HEADER_ACTOR_QUERY,
|
|
11
|
+
HEADER_CONN_PARAMS,
|
|
12
|
+
HEADER_ENCODING,
|
|
13
|
+
WS_PROTOCOL_CONN_PARAMS,
|
|
14
|
+
WS_PROTOCOL_ENCODING,
|
|
15
|
+
} from "@/common/actor-router-consts";
|
|
16
|
+
import { stringifyError } from "@/common/utils";
|
|
17
|
+
import type { RegistryConfig } from "@/registry/config";
|
|
18
|
+
import type * as protocol from "@/schemas/client-protocol/mod";
|
|
19
|
+
import {
|
|
20
|
+
CURRENT_VERSION as CLIENT_PROTOCOL_CURRENT_VERSION,
|
|
21
|
+
HTTP_ACTION_REQUEST_VERSIONED,
|
|
22
|
+
HTTP_ACTION_RESPONSE_VERSIONED,
|
|
23
|
+
HTTP_QUEUE_SEND_REQUEST_VERSIONED,
|
|
24
|
+
HTTP_QUEUE_SEND_RESPONSE_VERSIONED,
|
|
25
|
+
} from "@/schemas/client-protocol/versioned";
|
|
26
|
+
import {
|
|
27
|
+
type HttpActionRequest as HttpActionRequestJson,
|
|
28
|
+
HttpActionRequestSchema,
|
|
29
|
+
type HttpActionResponse as HttpActionResponseJson,
|
|
30
|
+
HttpActionResponseSchema,
|
|
31
|
+
type HttpQueueSendRequest as HttpQueueSendRequestJson,
|
|
32
|
+
HttpQueueSendRequestSchema,
|
|
33
|
+
type HttpQueueSendResponse as HttpQueueSendResponseJson,
|
|
34
|
+
HttpQueueSendResponseSchema,
|
|
35
|
+
} from "@/schemas/client-protocol-zod/mod";
|
|
36
|
+
import {
|
|
37
|
+
contentTypeForEncoding,
|
|
38
|
+
deserializeWithEncoding,
|
|
39
|
+
serializeWithEncoding,
|
|
40
|
+
} from "@/serde";
|
|
41
|
+
import { bufferToArrayBuffer, getEnvUniversal } from "@/utils";
|
|
42
|
+
import { createHttpDriver } from "./conn/drivers/http";
|
|
43
|
+
import { createRawRequestDriver } from "./conn/drivers/raw-request";
|
|
44
|
+
import type { ActorDriver } from "./driver";
|
|
45
|
+
import { loggerWithoutContext } from "./log";
|
|
46
|
+
|
|
47
|
+
export interface ActionOpts {
|
|
48
|
+
req?: HonoRequest;
|
|
49
|
+
params: unknown;
|
|
50
|
+
actionName: string;
|
|
51
|
+
actionArgs: unknown[];
|
|
52
|
+
actorId: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface ActionOutput {
|
|
56
|
+
output: unknown;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface ConnsMessageOpts {
|
|
60
|
+
req?: HonoRequest;
|
|
61
|
+
connId: string;
|
|
62
|
+
message: protocol.ToServer;
|
|
63
|
+
actorId: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface FetchOpts {
|
|
67
|
+
request: Request;
|
|
68
|
+
actorId: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface QueueSendOpts {
|
|
72
|
+
req?: HonoRequest;
|
|
73
|
+
name: string;
|
|
74
|
+
body: unknown;
|
|
75
|
+
wait?: boolean;
|
|
76
|
+
timeout?: number;
|
|
77
|
+
actorId: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Creates an action handler
|
|
82
|
+
*/
|
|
83
|
+
export async function handleAction(
|
|
84
|
+
c: HonoContext,
|
|
85
|
+
config: RegistryConfig,
|
|
86
|
+
actorDriver: ActorDriver,
|
|
87
|
+
actionName: string,
|
|
88
|
+
actorId: string,
|
|
89
|
+
) {
|
|
90
|
+
const encoding = getRequestEncoding(c.req);
|
|
91
|
+
const parameters = getRequestConnParams(c.req);
|
|
92
|
+
|
|
93
|
+
// Validate incoming request
|
|
94
|
+
const arrayBuffer = await c.req.arrayBuffer();
|
|
95
|
+
|
|
96
|
+
// Check message size
|
|
97
|
+
if (arrayBuffer.byteLength > config.maxIncomingMessageSize) {
|
|
98
|
+
throw new errors.IncomingMessageTooLong();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const request = deserializeWithEncoding(
|
|
102
|
+
encoding,
|
|
103
|
+
new Uint8Array(arrayBuffer),
|
|
104
|
+
HTTP_ACTION_REQUEST_VERSIONED,
|
|
105
|
+
HttpActionRequestSchema,
|
|
106
|
+
// JSON: args is already the decoded value (raw object/array)
|
|
107
|
+
(json: HttpActionRequestJson) => json.args,
|
|
108
|
+
// BARE/CBOR: args is ArrayBuffer that needs CBOR-decoding
|
|
109
|
+
(bare: protocol.HttpActionRequest) =>
|
|
110
|
+
cbor.decode(new Uint8Array(bare.args)),
|
|
111
|
+
);
|
|
112
|
+
const actionArgs = request;
|
|
113
|
+
|
|
114
|
+
// Invoke the action
|
|
115
|
+
let output: unknown | undefined;
|
|
116
|
+
let outputReady = false;
|
|
117
|
+
const maxAttempts = 3;
|
|
118
|
+
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
119
|
+
let actor: AnyActorInstance | undefined;
|
|
120
|
+
let conn: AnyConn | undefined;
|
|
121
|
+
try {
|
|
122
|
+
actor = await actorDriver.loadActor(actorId);
|
|
123
|
+
|
|
124
|
+
actor.rLog.debug({ msg: "handling action", actionName, encoding });
|
|
125
|
+
|
|
126
|
+
// Create conn
|
|
127
|
+
conn = await actor.connectionManager.prepareAndConnectConn(
|
|
128
|
+
createHttpDriver(),
|
|
129
|
+
parameters,
|
|
130
|
+
c.req.raw,
|
|
131
|
+
c.req.path,
|
|
132
|
+
c.req.header(),
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
// Call action
|
|
136
|
+
const ctx = new ActionContext(actor, conn);
|
|
137
|
+
output = await actor.executeAction(ctx, actionName, actionArgs);
|
|
138
|
+
outputReady = true;
|
|
139
|
+
break;
|
|
140
|
+
} catch (error) {
|
|
141
|
+
const shouldRetry =
|
|
142
|
+
error instanceof errors.InternalError &&
|
|
143
|
+
error.message === "Actor is stopping" &&
|
|
144
|
+
attempt < maxAttempts - 1;
|
|
145
|
+
if (shouldRetry) {
|
|
146
|
+
await new Promise((resolve) => setTimeout(resolve, 25));
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
throw error;
|
|
150
|
+
} finally {
|
|
151
|
+
if (conn) {
|
|
152
|
+
conn.disconnect();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (!outputReady) {
|
|
157
|
+
throw new errors.InternalError("Action did not complete");
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Send response
|
|
161
|
+
const serialized = serializeWithEncoding(
|
|
162
|
+
encoding,
|
|
163
|
+
output,
|
|
164
|
+
HTTP_ACTION_RESPONSE_VERSIONED,
|
|
165
|
+
CLIENT_PROTOCOL_CURRENT_VERSION,
|
|
166
|
+
HttpActionResponseSchema,
|
|
167
|
+
// JSON: output is the raw value (will be serialized by jsonStringifyCompat)
|
|
168
|
+
(value): HttpActionResponseJson => ({ output: value }),
|
|
169
|
+
// BARE/CBOR: output needs to be CBOR-encoded to ArrayBuffer
|
|
170
|
+
(value): protocol.HttpActionResponse => ({
|
|
171
|
+
output: bufferToArrayBuffer(cbor.encode(value)),
|
|
172
|
+
}),
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
// Check outgoing message size
|
|
176
|
+
const messageSize =
|
|
177
|
+
serialized instanceof Uint8Array
|
|
178
|
+
? serialized.byteLength
|
|
179
|
+
: serialized.length;
|
|
180
|
+
if (messageSize > config.maxOutgoingMessageSize) {
|
|
181
|
+
throw new errors.OutgoingMessageTooLong();
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// TODO: Remove any, Hono is being a dumbass
|
|
185
|
+
return c.body(serialized as Uint8Array as any, 200, {
|
|
186
|
+
"Content-Type": contentTypeForEncoding(encoding),
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export async function handleQueueSend(
|
|
191
|
+
c: HonoContext,
|
|
192
|
+
config: RegistryConfig,
|
|
193
|
+
actorDriver: ActorDriver,
|
|
194
|
+
actorId: string,
|
|
195
|
+
queueName?: string,
|
|
196
|
+
) {
|
|
197
|
+
const encoding = getRequestEncoding(c.req);
|
|
198
|
+
const params = getRequestConnParams(c.req);
|
|
199
|
+
const arrayBuffer = await c.req.arrayBuffer();
|
|
200
|
+
|
|
201
|
+
if (arrayBuffer.byteLength > config.maxIncomingMessageSize) {
|
|
202
|
+
throw new errors.IncomingMessageTooLong();
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const request = deserializeWithEncoding(
|
|
206
|
+
encoding,
|
|
207
|
+
new Uint8Array(arrayBuffer),
|
|
208
|
+
HTTP_QUEUE_SEND_REQUEST_VERSIONED,
|
|
209
|
+
HttpQueueSendRequestSchema,
|
|
210
|
+
(json: HttpQueueSendRequestJson) => json,
|
|
211
|
+
(bare: protocol.HttpQueueSendRequest) => ({
|
|
212
|
+
name: bare.name ?? undefined,
|
|
213
|
+
body: cbor.decode(new Uint8Array(bare.body)),
|
|
214
|
+
wait: bare.wait ?? undefined,
|
|
215
|
+
timeout:
|
|
216
|
+
bare.timeout !== null && bare.timeout !== undefined
|
|
217
|
+
? Number(bare.timeout)
|
|
218
|
+
: undefined,
|
|
219
|
+
}),
|
|
220
|
+
);
|
|
221
|
+
|
|
222
|
+
const name = queueName ?? request.name;
|
|
223
|
+
if (!name) {
|
|
224
|
+
throw new errors.InvalidRequest("missing queue name");
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
const actor = await actorDriver.loadActor(actorId);
|
|
228
|
+
if (!hasSchemaConfigKey(actor.config.queues, name)) {
|
|
229
|
+
actor.rLog.warn({
|
|
230
|
+
msg: "ignoring incoming queue message for undefined queue",
|
|
231
|
+
queueName: name,
|
|
232
|
+
hasQueueConfig: actor.config.queues !== undefined,
|
|
233
|
+
});
|
|
234
|
+
const ignoredResponse = serializeWithEncoding(
|
|
235
|
+
encoding,
|
|
236
|
+
{ status: "completed" as const, response: undefined },
|
|
237
|
+
HTTP_QUEUE_SEND_RESPONSE_VERSIONED,
|
|
238
|
+
CLIENT_PROTOCOL_CURRENT_VERSION,
|
|
239
|
+
HttpQueueSendResponseSchema,
|
|
240
|
+
(value): HttpQueueSendResponseJson => ({
|
|
241
|
+
status: value.status,
|
|
242
|
+
response: value.response,
|
|
243
|
+
}),
|
|
244
|
+
(value): protocol.HttpQueueSendResponse => ({
|
|
245
|
+
status: value.status,
|
|
246
|
+
response:
|
|
247
|
+
value.response !== undefined
|
|
248
|
+
? bufferToArrayBuffer(cbor.encode(value.response))
|
|
249
|
+
: null,
|
|
250
|
+
}),
|
|
251
|
+
);
|
|
252
|
+
return c.body(ignoredResponse as Uint8Array as any, 200, {
|
|
253
|
+
"Content-Type": contentTypeForEncoding(encoding),
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
const conn = await actor.connectionManager.prepareAndConnectConn(
|
|
258
|
+
createHttpDriver(),
|
|
259
|
+
params,
|
|
260
|
+
c.req.raw,
|
|
261
|
+
c.req.path,
|
|
262
|
+
c.req.header(),
|
|
263
|
+
);
|
|
264
|
+
let result: { status: "completed" | "timedOut"; response?: unknown } = {
|
|
265
|
+
status: "completed",
|
|
266
|
+
};
|
|
267
|
+
try {
|
|
268
|
+
const ctx = new ActionContext(actor, conn);
|
|
269
|
+
await actor.assertCanPublish(ctx, name);
|
|
270
|
+
|
|
271
|
+
if (request.wait) {
|
|
272
|
+
result = await actor.queueManager.enqueueAndWait(
|
|
273
|
+
name,
|
|
274
|
+
request.body,
|
|
275
|
+
request.timeout,
|
|
276
|
+
);
|
|
277
|
+
} else {
|
|
278
|
+
await actor.queueManager.enqueue(name, request.body);
|
|
279
|
+
}
|
|
280
|
+
} finally {
|
|
281
|
+
conn.disconnect();
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
const response = serializeWithEncoding(
|
|
285
|
+
encoding,
|
|
286
|
+
result,
|
|
287
|
+
HTTP_QUEUE_SEND_RESPONSE_VERSIONED,
|
|
288
|
+
CLIENT_PROTOCOL_CURRENT_VERSION,
|
|
289
|
+
HttpQueueSendResponseSchema,
|
|
290
|
+
(value): HttpQueueSendResponseJson => ({
|
|
291
|
+
status: value.status,
|
|
292
|
+
response: value.response,
|
|
293
|
+
}),
|
|
294
|
+
(value): protocol.HttpQueueSendResponse => ({
|
|
295
|
+
status: value.status,
|
|
296
|
+
response:
|
|
297
|
+
value.response !== undefined
|
|
298
|
+
? bufferToArrayBuffer(cbor.encode(value.response))
|
|
299
|
+
: null,
|
|
300
|
+
}),
|
|
301
|
+
);
|
|
302
|
+
|
|
303
|
+
return c.body(response as Uint8Array as any, 200, {
|
|
304
|
+
"Content-Type": contentTypeForEncoding(encoding),
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export async function handleRawRequest(
|
|
309
|
+
c: HonoContext,
|
|
310
|
+
req: Request,
|
|
311
|
+
actorDriver: ActorDriver,
|
|
312
|
+
actorId: string,
|
|
313
|
+
): Promise<Response> {
|
|
314
|
+
const actor = await actorDriver.loadActor(actorId);
|
|
315
|
+
const parameters = getRequestConnParams(c.req);
|
|
316
|
+
|
|
317
|
+
// Track connection outside of scope for cleanup
|
|
318
|
+
let createdConn: AnyConn | undefined;
|
|
319
|
+
|
|
320
|
+
try {
|
|
321
|
+
const conn = await actor.connectionManager.prepareAndConnectConn(
|
|
322
|
+
createRawRequestDriver(),
|
|
323
|
+
parameters,
|
|
324
|
+
req,
|
|
325
|
+
c.req.path,
|
|
326
|
+
c.req.header(),
|
|
327
|
+
);
|
|
328
|
+
|
|
329
|
+
createdConn = conn;
|
|
330
|
+
|
|
331
|
+
return await actor.handleRawRequest(conn, req);
|
|
332
|
+
} finally {
|
|
333
|
+
// Clean up the connection after the request completes
|
|
334
|
+
if (createdConn) {
|
|
335
|
+
createdConn.disconnect();
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Helper to get the connection encoding from a request
|
|
341
|
+
//
|
|
342
|
+
// Defaults to JSON if not provided so we can support vanilla curl requests easily.
|
|
343
|
+
export function getRequestEncoding(req: HonoRequest): Encoding {
|
|
344
|
+
const encodingParam = req.header(HEADER_ENCODING);
|
|
345
|
+
if (!encodingParam) {
|
|
346
|
+
return "json";
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
const result = EncodingSchema.safeParse(encodingParam);
|
|
350
|
+
if (!result.success) {
|
|
351
|
+
throw new errors.InvalidEncoding(encodingParam as string);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
return result.data;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Determines whether internal errors should be exposed to the client.
|
|
359
|
+
* Returns true if RIVET_EXPOSE_ERRORS=1 or NODE_ENV=development.
|
|
360
|
+
*/
|
|
361
|
+
export function getRequestExposeInternalError(_req: Request): boolean {
|
|
362
|
+
return (
|
|
363
|
+
getEnvUniversal("RIVET_EXPOSE_ERRORS") === "1" ||
|
|
364
|
+
getEnvUniversal("NODE_ENV") === "development"
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export function getRequestQuery(c: HonoContext): unknown {
|
|
369
|
+
// Get query parameters for actor lookup
|
|
370
|
+
const queryParam = c.req.header(HEADER_ACTOR_QUERY);
|
|
371
|
+
if (!queryParam) {
|
|
372
|
+
loggerWithoutContext().error({ msg: "missing query parameter" });
|
|
373
|
+
throw new errors.InvalidRequest("missing query");
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// Parse the query JSON and validate with schema
|
|
377
|
+
try {
|
|
378
|
+
const parsed = JSON.parse(queryParam);
|
|
379
|
+
return parsed;
|
|
380
|
+
} catch (error) {
|
|
381
|
+
loggerWithoutContext().error({ msg: "invalid query json", error });
|
|
382
|
+
throw new errors.InvalidQueryJSON(error);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// Helper to get connection parameters for the request
|
|
387
|
+
export function getRequestConnParams(req: HonoRequest): unknown {
|
|
388
|
+
const paramsParam = req.header(HEADER_CONN_PARAMS);
|
|
389
|
+
if (!paramsParam) {
|
|
390
|
+
return null;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
try {
|
|
394
|
+
return JSON.parse(paramsParam);
|
|
395
|
+
} catch (err) {
|
|
396
|
+
throw new errors.InvalidParams(
|
|
397
|
+
`Invalid params JSON: ${stringifyError(err)}`,
|
|
398
|
+
);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { describe, expect, test } from "vitest";
|
|
2
|
+
import {
|
|
3
|
+
PATH_WEBSOCKET_BASE,
|
|
4
|
+
PATH_WEBSOCKET_PREFIX,
|
|
5
|
+
} from "@/common/actor-router-consts";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Unit tests for WebSocket path routing logic.
|
|
9
|
+
*
|
|
10
|
+
* These tests verify the path matching behavior in routeWebSocket
|
|
11
|
+
* without needing a full actor setup.
|
|
12
|
+
*
|
|
13
|
+
* NOTE: The driver-file-system end-to-end tests pass because the driver
|
|
14
|
+
* correctly strips query parameters before calling routeWebSocket
|
|
15
|
+
* (see FileSystemManagerDriver.openWebSocket). However, the bug still
|
|
16
|
+
* exists in routeWebSocket itself and could be triggered by other callers
|
|
17
|
+
* (e.g., engine driver's runnerWebSocket which passes requestPath directly).
|
|
18
|
+
*/
|
|
19
|
+
describe("websocket path routing", () => {
|
|
20
|
+
// Helper that replicates the routing logic from routeWebSocket
|
|
21
|
+
// After fix: strips query params before comparing
|
|
22
|
+
function matchesWebSocketPath(requestPath: string): boolean {
|
|
23
|
+
const requestPathWithoutQuery = requestPath.split("?")[0];
|
|
24
|
+
return (
|
|
25
|
+
requestPathWithoutQuery === PATH_WEBSOCKET_BASE ||
|
|
26
|
+
requestPathWithoutQuery.startsWith(PATH_WEBSOCKET_PREFIX)
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
test("should match base websocket path without query", () => {
|
|
31
|
+
expect(matchesWebSocketPath("/websocket")).toBe(true);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
test("should match websocket path with trailing slash", () => {
|
|
35
|
+
expect(matchesWebSocketPath("/websocket/")).toBe(true);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test("should match websocket path with subpath", () => {
|
|
39
|
+
expect(matchesWebSocketPath("/websocket/foo")).toBe(true);
|
|
40
|
+
expect(matchesWebSocketPath("/websocket/foo/bar")).toBe(true);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
test("should match websocket path with subpath and query", () => {
|
|
44
|
+
// This works because "/websocket/foo?query" starts with "/websocket/"
|
|
45
|
+
expect(matchesWebSocketPath("/websocket/foo?query=value")).toBe(true);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// FIX: Query parameters are now stripped before routing comparison.
|
|
49
|
+
// This ensures /websocket?query correctly routes to the websocket handler.
|
|
50
|
+
test("should match base websocket path with query parameters", () => {
|
|
51
|
+
expect(matchesWebSocketPath("/websocket?token=abc")).toBe(true);
|
|
52
|
+
expect(matchesWebSocketPath("/websocket?foo=bar&baz=123")).toBe(true);
|
|
53
|
+
});
|
|
54
|
+
});
|