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,76 @@
|
|
|
1
|
+
export class ActorClientError extends Error {}
|
|
2
|
+
|
|
3
|
+
export class InternalError extends ActorClientError {}
|
|
4
|
+
|
|
5
|
+
export class ManagerError extends ActorClientError {
|
|
6
|
+
constructor(error: string, opts?: ErrorOptions) {
|
|
7
|
+
super(`Manager error: ${error}`, opts);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class MalformedResponseMessage extends ActorClientError {
|
|
12
|
+
constructor(cause?: unknown) {
|
|
13
|
+
super(`Malformed response message: ${cause}`, { cause });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class ActorError extends ActorClientError {
|
|
18
|
+
__type = "ActorError";
|
|
19
|
+
|
|
20
|
+
constructor(
|
|
21
|
+
public readonly group: string,
|
|
22
|
+
public readonly code: string,
|
|
23
|
+
message: string,
|
|
24
|
+
public readonly metadata?: unknown,
|
|
25
|
+
) {
|
|
26
|
+
super(message);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export class HttpRequestError extends ActorClientError {
|
|
31
|
+
constructor(message: string, opts?: { cause?: unknown }) {
|
|
32
|
+
super(`HTTP request error: ${message}`, { cause: opts?.cause });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class ActorConnDisposed extends ActorClientError {
|
|
37
|
+
constructor() {
|
|
38
|
+
super("Attempting to interact with a disposed actor connection.");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Checks if an error code indicates a scheduling error that may have more details.
|
|
44
|
+
*/
|
|
45
|
+
export function isSchedulingError(group: string, code: string): boolean {
|
|
46
|
+
return (
|
|
47
|
+
group === "guard" &&
|
|
48
|
+
(code === "actor_ready_timeout" || code === "actor_runner_failed")
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Error thrown when actor scheduling fails.
|
|
54
|
+
* Provides detailed information about why the actor failed to start.
|
|
55
|
+
*/
|
|
56
|
+
export class ActorSchedulingError extends ActorError {
|
|
57
|
+
public readonly actorId: string;
|
|
58
|
+
public readonly details: unknown;
|
|
59
|
+
|
|
60
|
+
constructor(
|
|
61
|
+
group: string,
|
|
62
|
+
code: string,
|
|
63
|
+
actorId: string,
|
|
64
|
+
details: unknown,
|
|
65
|
+
) {
|
|
66
|
+
super(
|
|
67
|
+
group,
|
|
68
|
+
code,
|
|
69
|
+
`Actor failed to start (${actorId}): ${JSON.stringify(details)}`,
|
|
70
|
+
{ actorId, details },
|
|
71
|
+
);
|
|
72
|
+
this.name = "ActorSchedulingError";
|
|
73
|
+
this.actorId = actorId;
|
|
74
|
+
this.details = details;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { injectDevtools } from "@/devtools-loader";
|
|
2
|
+
import type { Registry } from "@/registry";
|
|
3
|
+
import { RemoteManagerDriver } from "@/remote-manager-driver/mod";
|
|
4
|
+
import {
|
|
5
|
+
type Client,
|
|
6
|
+
type ClientConfigInput,
|
|
7
|
+
createClientWithDriver,
|
|
8
|
+
} from "./client";
|
|
9
|
+
import { ClientConfigSchema } from "./config";
|
|
10
|
+
|
|
11
|
+
export type { ActorDefinition, AnyActorDefinition } from "@/actor/definition";
|
|
12
|
+
export type { Encoding } from "@/actor/protocol/serde";
|
|
13
|
+
export {
|
|
14
|
+
ActorClientError,
|
|
15
|
+
ActorConnDisposed,
|
|
16
|
+
ActorError,
|
|
17
|
+
InternalError,
|
|
18
|
+
MalformedResponseMessage,
|
|
19
|
+
ManagerError,
|
|
20
|
+
} from "@/client/errors";
|
|
21
|
+
export type { CreateRequest } from "@/manager/protocol/query";
|
|
22
|
+
export { KEYS as KV_KEYS } from "../actor/instance/keys";
|
|
23
|
+
export type { ActorActionFunction } from "./actor-common";
|
|
24
|
+
export type {
|
|
25
|
+
ActorConn,
|
|
26
|
+
ActorConnStatus,
|
|
27
|
+
ConnectionStateCallback,
|
|
28
|
+
EventUnsubscribe,
|
|
29
|
+
StatusChangeCallback,
|
|
30
|
+
} from "./actor-conn";
|
|
31
|
+
export { ActorConnRaw } from "./actor-conn";
|
|
32
|
+
export type { ActorHandle } from "./actor-handle";
|
|
33
|
+
export { ActorHandleRaw } from "./actor-handle";
|
|
34
|
+
export type {
|
|
35
|
+
ActorAccessor,
|
|
36
|
+
Client,
|
|
37
|
+
ClientRaw,
|
|
38
|
+
CreateOptions,
|
|
39
|
+
ExtractActorsFromRegistry,
|
|
40
|
+
ExtractRegistryFromClient,
|
|
41
|
+
GetOptions,
|
|
42
|
+
GetWithIdOptions,
|
|
43
|
+
QueryOptions,
|
|
44
|
+
Region,
|
|
45
|
+
} from "./client";
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Creates a client with the actor accessor proxy.
|
|
49
|
+
*/
|
|
50
|
+
export function createClient<A extends Registry<any>>(
|
|
51
|
+
endpointOrConfig?: string | ClientConfigInput,
|
|
52
|
+
): Client<A> {
|
|
53
|
+
// Parse config
|
|
54
|
+
const configInput =
|
|
55
|
+
endpointOrConfig === undefined
|
|
56
|
+
? {}
|
|
57
|
+
: typeof endpointOrConfig === "string"
|
|
58
|
+
? { endpoint: endpointOrConfig }
|
|
59
|
+
: endpointOrConfig;
|
|
60
|
+
const config = ClientConfigSchema.parse(configInput);
|
|
61
|
+
|
|
62
|
+
// Create client
|
|
63
|
+
const driver = new RemoteManagerDriver(config);
|
|
64
|
+
|
|
65
|
+
if (config.devtools) {
|
|
66
|
+
injectDevtools(config);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return createClientWithDriver<A>(driver, config);
|
|
70
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import * as cbor from "cbor-x";
|
|
2
|
+
import type { Encoding } from "@/actor/protocol/serde";
|
|
3
|
+
import { HEADER_CONN_PARAMS, HEADER_ENCODING } from "@/driver-helpers/mod";
|
|
4
|
+
import type * as protocol from "@/schemas/client-protocol/mod";
|
|
5
|
+
import {
|
|
6
|
+
CURRENT_VERSION as CLIENT_PROTOCOL_CURRENT_VERSION,
|
|
7
|
+
HTTP_QUEUE_SEND_REQUEST_VERSIONED,
|
|
8
|
+
HTTP_QUEUE_SEND_RESPONSE_VERSIONED,
|
|
9
|
+
} from "@/schemas/client-protocol/versioned";
|
|
10
|
+
import {
|
|
11
|
+
type HttpQueueSendRequest as HttpQueueSendRequestJson,
|
|
12
|
+
HttpQueueSendRequestSchema,
|
|
13
|
+
type HttpQueueSendResponse as HttpQueueSendResponseJson,
|
|
14
|
+
HttpQueueSendResponseSchema,
|
|
15
|
+
} from "@/schemas/client-protocol-zod/mod";
|
|
16
|
+
import { bufferToArrayBuffer } from "@/utils";
|
|
17
|
+
import { sendHttpRequest } from "./utils";
|
|
18
|
+
|
|
19
|
+
export interface QueueSender {
|
|
20
|
+
send(
|
|
21
|
+
name: string,
|
|
22
|
+
body: unknown,
|
|
23
|
+
options: QueueSendWaitOptions,
|
|
24
|
+
): Promise<QueueSendResult>;
|
|
25
|
+
send(
|
|
26
|
+
name: string,
|
|
27
|
+
body: unknown,
|
|
28
|
+
options?: QueueSendNoWaitOptions,
|
|
29
|
+
): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface QueueSendWaitOptions {
|
|
33
|
+
wait: true;
|
|
34
|
+
timeout?: number;
|
|
35
|
+
signal?: AbortSignal;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface QueueSendNoWaitOptions {
|
|
39
|
+
wait?: false;
|
|
40
|
+
timeout?: never;
|
|
41
|
+
signal?: AbortSignal;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type QueueSendOptions = QueueSendWaitOptions | QueueSendNoWaitOptions;
|
|
45
|
+
|
|
46
|
+
export interface QueueSendResult {
|
|
47
|
+
status: "completed" | "timedOut";
|
|
48
|
+
response?: unknown;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface QueueSenderOptions {
|
|
52
|
+
encoding: Encoding;
|
|
53
|
+
params: unknown;
|
|
54
|
+
customFetch: (request: Request) => Promise<Response>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function createQueueSender(senderOptions: QueueSenderOptions): QueueSender {
|
|
58
|
+
async function send(
|
|
59
|
+
name: string,
|
|
60
|
+
body: unknown,
|
|
61
|
+
options: QueueSendWaitOptions,
|
|
62
|
+
): Promise<QueueSendResult>;
|
|
63
|
+
async function send(
|
|
64
|
+
name: string,
|
|
65
|
+
body: unknown,
|
|
66
|
+
options?: QueueSendNoWaitOptions,
|
|
67
|
+
): Promise<void>;
|
|
68
|
+
async function send(
|
|
69
|
+
name: string,
|
|
70
|
+
body: unknown,
|
|
71
|
+
options?: QueueSendOptions,
|
|
72
|
+
): Promise<QueueSendResult | void> {
|
|
73
|
+
const wait = options?.wait ?? false;
|
|
74
|
+
const timeout = options?.timeout;
|
|
75
|
+
|
|
76
|
+
const result = await sendHttpRequest<
|
|
77
|
+
protocol.HttpQueueSendRequest,
|
|
78
|
+
protocol.HttpQueueSendResponse,
|
|
79
|
+
HttpQueueSendRequestJson,
|
|
80
|
+
HttpQueueSendResponseJson,
|
|
81
|
+
{ body: unknown; wait?: boolean; timeout?: number; name?: string },
|
|
82
|
+
QueueSendResult
|
|
83
|
+
>({
|
|
84
|
+
url: `http://actor/queue/${encodeURIComponent(name)}`,
|
|
85
|
+
method: "POST",
|
|
86
|
+
headers: {
|
|
87
|
+
[HEADER_ENCODING]: senderOptions.encoding,
|
|
88
|
+
...(senderOptions.params !== undefined
|
|
89
|
+
? {
|
|
90
|
+
[HEADER_CONN_PARAMS]: JSON.stringify(
|
|
91
|
+
senderOptions.params,
|
|
92
|
+
),
|
|
93
|
+
}
|
|
94
|
+
: {}),
|
|
95
|
+
},
|
|
96
|
+
body: { body, wait, timeout },
|
|
97
|
+
encoding: senderOptions.encoding,
|
|
98
|
+
customFetch: senderOptions.customFetch,
|
|
99
|
+
signal: options?.signal,
|
|
100
|
+
requestVersion: CLIENT_PROTOCOL_CURRENT_VERSION,
|
|
101
|
+
requestVersionedDataHandler: HTTP_QUEUE_SEND_REQUEST_VERSIONED,
|
|
102
|
+
responseVersion: CLIENT_PROTOCOL_CURRENT_VERSION,
|
|
103
|
+
responseVersionedDataHandler:
|
|
104
|
+
HTTP_QUEUE_SEND_RESPONSE_VERSIONED,
|
|
105
|
+
requestZodSchema: HttpQueueSendRequestSchema,
|
|
106
|
+
responseZodSchema: HttpQueueSendResponseSchema,
|
|
107
|
+
requestToJson: (value): HttpQueueSendRequestJson => ({
|
|
108
|
+
...value,
|
|
109
|
+
name,
|
|
110
|
+
}),
|
|
111
|
+
requestToBare: (value): protocol.HttpQueueSendRequest => ({
|
|
112
|
+
name: value.name ?? name,
|
|
113
|
+
body: bufferToArrayBuffer(cbor.encode(value.body)),
|
|
114
|
+
wait: value.wait ?? false,
|
|
115
|
+
timeout: value.timeout !== undefined ? BigInt(value.timeout) : null,
|
|
116
|
+
}),
|
|
117
|
+
responseFromJson: (json): QueueSendResult => {
|
|
118
|
+
if (json.response === undefined) {
|
|
119
|
+
return { status: json.status as "completed" | "timedOut" };
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
status: json.status as "completed" | "timedOut",
|
|
123
|
+
response: json.response,
|
|
124
|
+
};
|
|
125
|
+
},
|
|
126
|
+
responseFromBare: (bare): QueueSendResult => {
|
|
127
|
+
if (bare.response === null || bare.response === undefined) {
|
|
128
|
+
return { status: bare.status as "completed" | "timedOut" };
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
status: bare.status as "completed" | "timedOut",
|
|
132
|
+
response: cbor.decode(new Uint8Array(bare.response)),
|
|
133
|
+
};
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
if (wait) {
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return {
|
|
144
|
+
send,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import invariant from "invariant";
|
|
2
|
+
import { PATH_WEBSOCKET_PREFIX } from "@/common/actor-router-consts";
|
|
3
|
+
import { deconstructError } from "@/common/utils";
|
|
4
|
+
import { HEADER_CONN_PARAMS, type ManagerDriver } from "@/driver-helpers/mod";
|
|
5
|
+
import type { ActorQuery } from "@/manager/protocol/query";
|
|
6
|
+
import { queryActor } from "./actor-query";
|
|
7
|
+
import { ActorError } from "./errors";
|
|
8
|
+
import { logger } from "./log";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Shared implementation for raw HTTP fetch requests
|
|
12
|
+
*/
|
|
13
|
+
export async function rawHttpFetch(
|
|
14
|
+
driver: ManagerDriver,
|
|
15
|
+
actorQuery: ActorQuery,
|
|
16
|
+
params: unknown,
|
|
17
|
+
input: string | URL | Request,
|
|
18
|
+
init?: RequestInit,
|
|
19
|
+
): Promise<Response> {
|
|
20
|
+
// Extract path and merge init options
|
|
21
|
+
let path: string;
|
|
22
|
+
let mergedInit: RequestInit = init || {};
|
|
23
|
+
|
|
24
|
+
if (typeof input === "string") {
|
|
25
|
+
path = input;
|
|
26
|
+
} else if (input instanceof URL) {
|
|
27
|
+
path = input.pathname + input.search;
|
|
28
|
+
} else if (input instanceof Request) {
|
|
29
|
+
// Extract path from Request URL
|
|
30
|
+
const url = new URL(input.url);
|
|
31
|
+
path = url.pathname + url.search;
|
|
32
|
+
// Merge Request properties with init
|
|
33
|
+
const requestHeaders = new Headers(input.headers);
|
|
34
|
+
const initHeaders = new Headers(init?.headers || {});
|
|
35
|
+
|
|
36
|
+
// Merge headers - init headers override request headers
|
|
37
|
+
const mergedHeaders = new Headers(requestHeaders);
|
|
38
|
+
initHeaders.forEach((value, key) => {
|
|
39
|
+
mergedHeaders.set(key, value);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
mergedInit = {
|
|
43
|
+
method: input.method,
|
|
44
|
+
body: input.body,
|
|
45
|
+
mode: input.mode,
|
|
46
|
+
credentials: input.credentials,
|
|
47
|
+
redirect: input.redirect,
|
|
48
|
+
referrer: input.referrer,
|
|
49
|
+
referrerPolicy: input.referrerPolicy,
|
|
50
|
+
integrity: input.integrity,
|
|
51
|
+
keepalive: input.keepalive,
|
|
52
|
+
signal: input.signal,
|
|
53
|
+
...mergedInit, // init overrides Request properties
|
|
54
|
+
headers: mergedHeaders, // headers must be set after spread to ensure proper merge
|
|
55
|
+
};
|
|
56
|
+
// Add duplex if body is present
|
|
57
|
+
if (mergedInit.body) {
|
|
58
|
+
(mergedInit as any).duplex = "half";
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
throw new TypeError("Invalid input type for fetch");
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
try {
|
|
65
|
+
// Get the actor ID
|
|
66
|
+
const { actorId } = await queryActor(undefined, actorQuery, driver);
|
|
67
|
+
logger().debug({ msg: "found actor for raw http", actorId });
|
|
68
|
+
invariant(actorId, "Missing actor ID");
|
|
69
|
+
|
|
70
|
+
// Build the URL with normalized path
|
|
71
|
+
const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
|
|
72
|
+
const url = new URL(`http://actor/request/${normalizedPath}`);
|
|
73
|
+
|
|
74
|
+
// Forward conn params if provided
|
|
75
|
+
const proxyRequestHeaders = new Headers(mergedInit.headers);
|
|
76
|
+
if (params) {
|
|
77
|
+
proxyRequestHeaders.set(HEADER_CONN_PARAMS, JSON.stringify(params));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Forward the request to the actor
|
|
81
|
+
const proxyRequest = new Request(url, {
|
|
82
|
+
...mergedInit,
|
|
83
|
+
headers: proxyRequestHeaders,
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
return driver.sendRequest(actorId, proxyRequest);
|
|
87
|
+
} catch (err) {
|
|
88
|
+
// Standardize to ClientActorError instead of the native backend error
|
|
89
|
+
const { group, code, message, metadata } = deconstructError(
|
|
90
|
+
err,
|
|
91
|
+
logger(),
|
|
92
|
+
{},
|
|
93
|
+
true,
|
|
94
|
+
);
|
|
95
|
+
throw new ActorError(group, code, message, metadata);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Shared implementation for raw WebSocket connections
|
|
101
|
+
*/
|
|
102
|
+
export async function rawWebSocket(
|
|
103
|
+
driver: ManagerDriver,
|
|
104
|
+
actorQuery: ActorQuery,
|
|
105
|
+
params: unknown,
|
|
106
|
+
path?: string,
|
|
107
|
+
// TODO: Supportp rotocols
|
|
108
|
+
protocols?: string | string[],
|
|
109
|
+
): Promise<any> {
|
|
110
|
+
// TODO: Do we need encoding in rawWebSocket?
|
|
111
|
+
const encoding = "bare";
|
|
112
|
+
|
|
113
|
+
// Get the actor ID
|
|
114
|
+
const { actorId } = await queryActor(undefined, actorQuery, driver);
|
|
115
|
+
logger().debug({ msg: "found actor for action", actorId });
|
|
116
|
+
invariant(actorId, "Missing actor ID");
|
|
117
|
+
|
|
118
|
+
// Parse path and query parameters
|
|
119
|
+
let pathPortion = "";
|
|
120
|
+
let queryPortion = "";
|
|
121
|
+
if (path) {
|
|
122
|
+
const queryIndex = path.indexOf("?");
|
|
123
|
+
if (queryIndex !== -1) {
|
|
124
|
+
pathPortion = path.substring(0, queryIndex);
|
|
125
|
+
queryPortion = path.substring(queryIndex); // includes the '?'
|
|
126
|
+
} else {
|
|
127
|
+
pathPortion = path;
|
|
128
|
+
}
|
|
129
|
+
// Remove leading slash if present
|
|
130
|
+
if (pathPortion.startsWith("/")) {
|
|
131
|
+
pathPortion = pathPortion.slice(1);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const fullPath = `${PATH_WEBSOCKET_PREFIX}${pathPortion}${queryPortion}`;
|
|
136
|
+
|
|
137
|
+
logger().debug({
|
|
138
|
+
msg: "opening websocket",
|
|
139
|
+
actorId,
|
|
140
|
+
encoding,
|
|
141
|
+
path: fullPath,
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// Open WebSocket
|
|
145
|
+
const ws = await driver.openWebSocket(fullPath, actorId, encoding, params);
|
|
146
|
+
|
|
147
|
+
// Node & browser WebSocket types are incompatible
|
|
148
|
+
return ws as any;
|
|
149
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//import { exec as execCallback } from "node:child_process";
|
|
2
|
+
//import { setupLogging } from "@/common//log";
|
|
3
|
+
//import type { ClientOptions } from "./client";
|
|
4
|
+
//import { InternalError } from "./errors";
|
|
5
|
+
//import { Client } from "./mod.ts";
|
|
6
|
+
//
|
|
7
|
+
///**
|
|
8
|
+
// * Uses the Rivet CLI to read the manager endpoint to connect to. This allows
|
|
9
|
+
// * for writing tests that run locally without hardcoding the manager endpoint.
|
|
10
|
+
// */
|
|
11
|
+
//export async function readEndpointFromCli(): Promise<string> {
|
|
12
|
+
// // Read endpoint
|
|
13
|
+
// const cliPath = process.env.RIVET_CLI_PATH ?? "rivet";
|
|
14
|
+
//
|
|
15
|
+
// try {
|
|
16
|
+
// const { stdout, stderr } = await new Promise<{
|
|
17
|
+
// stdout: string;
|
|
18
|
+
// stderr: string;
|
|
19
|
+
// }>((resolve, reject) => {
|
|
20
|
+
// execCallback(`${cliPath} manager endpoint`, (error, stdout, stderr) => {
|
|
21
|
+
// if (error) reject(error);
|
|
22
|
+
// else resolve({ stdout, stderr });
|
|
23
|
+
// });
|
|
24
|
+
// });
|
|
25
|
+
//
|
|
26
|
+
// if (stderr) {
|
|
27
|
+
// throw new Error(stderr);
|
|
28
|
+
// }
|
|
29
|
+
//
|
|
30
|
+
// // Decode output
|
|
31
|
+
// return stdout.trim();
|
|
32
|
+
// } catch (error) {
|
|
33
|
+
// throw new InternalError(`Read endpoint failed: ${error}`);
|
|
34
|
+
// }
|
|
35
|
+
//}
|
|
36
|
+
//
|
|
37
|
+
//export class TestClient extends Client {
|
|
38
|
+
// public constructor(opts?: ClientOptions) {
|
|
39
|
+
// // Setup logging automatically
|
|
40
|
+
// setupLogging();
|
|
41
|
+
//
|
|
42
|
+
// super(readEndpointFromCli(), opts);
|
|
43
|
+
// }
|
|
44
|
+
//}
|