@qlever-llc/trellis 0.7.0-rc.5 → 0.7.0
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 +9 -8
- package/esm/_dnt.shims.d.ts +1 -2
- package/esm/_dnt.shims.d.ts.map +1 -1
- package/esm/auth/browser/login.d.ts +10 -2
- package/esm/auth/browser/login.d.ts.map +1 -1
- package/esm/auth/browser/login.js +37 -21
- package/esm/auth/browser.d.ts +4 -3
- package/esm/auth/browser.d.ts.map +1 -1
- package/esm/auth/browser.js +3 -2
- package/esm/auth/device_activation.d.ts +16 -4
- package/esm/auth/device_activation.d.ts.map +1 -1
- package/esm/auth/device_activation.js +37 -13
- package/esm/auth/mod.d.ts +4 -4
- package/esm/auth/mod.d.ts.map +1 -1
- package/esm/auth/mod.js +4 -4
- package/esm/auth/protocol.d.ts +330 -65
- package/esm/auth/protocol.d.ts.map +1 -1
- package/esm/auth/protocol.js +278 -206
- package/esm/auth/schemas.d.ts +67 -2
- package/esm/auth/schemas.d.ts.map +1 -1
- package/esm/auth/schemas.js +30 -5
- package/esm/auth/session_auth.d.ts +2 -3
- package/esm/auth/session_auth.d.ts.map +1 -1
- package/esm/auth/session_auth.js +24 -10
- package/esm/auth.d.ts +3 -0
- package/esm/auth.d.ts.map +1 -0
- package/esm/auth.js +2 -0
- package/esm/browser.d.ts +6 -0
- package/esm/browser.d.ts.map +1 -0
- package/esm/browser.js +5 -0
- package/esm/client.d.ts.map +1 -0
- package/esm/client_connect.d.ts +53 -0
- package/esm/client_connect.d.ts.map +1 -0
- package/esm/client_connect.js +338 -0
- package/esm/codec.d.ts.map +1 -0
- package/esm/contract.d.ts +20 -0
- package/esm/contract.d.ts.map +1 -0
- package/esm/contract.js +1 -0
- package/esm/contract_support/canonical.d.ts.map +1 -0
- package/esm/contract_support/mod.d.ts +622 -0
- package/esm/contract_support/mod.d.ts.map +1 -0
- package/esm/contract_support/mod.js +968 -0
- package/esm/contract_support/protocol.d.ts.map +1 -0
- package/esm/contract_support/protocol.js +145 -0
- package/esm/contract_support/runtime.d.ts +75 -0
- package/esm/contract_support/runtime.d.ts.map +1 -0
- package/esm/contract_support/schema_pointers.d.ts.map +1 -0
- package/esm/contracts.d.ts +5 -0
- package/esm/contracts.d.ts.map +1 -0
- package/esm/contracts.js +3 -0
- package/esm/device.d.ts +48 -0
- package/esm/device.d.ts.map +1 -0
- package/esm/device.js +288 -0
- package/esm/env.d.ts +2 -0
- package/esm/env.d.ts.map +1 -0
- package/esm/env.js +1 -0
- package/esm/errors/AuthError.d.ts +30 -0
- package/esm/errors/AuthError.d.ts.map +1 -0
- package/esm/errors/AuthError.js +76 -0
- package/esm/errors/KVError.d.ts.map +1 -0
- package/esm/errors/RemoteError.d.ts +53 -0
- package/esm/errors/RemoteError.d.ts.map +1 -0
- package/esm/errors/RemoteError.js +80 -0
- package/esm/errors/StoreError.d.ts.map +1 -0
- package/esm/errors/TransferError.d.ts.map +1 -0
- package/esm/errors/TrellisError.d.ts.map +1 -0
- package/esm/errors/ValidationError.d.ts.map +1 -0
- package/esm/errors/index.d.ts +178 -0
- package/esm/errors/index.d.ts.map +1 -0
- package/esm/errors/index.js +118 -0
- package/esm/globals.d.ts.map +1 -0
- package/esm/health.d.ts +5 -0
- package/esm/health.d.ts.map +1 -0
- package/esm/health.js +3 -0
- package/esm/helpers.d.ts +10 -0
- package/esm/helpers.d.ts.map +1 -0
- package/esm/helpers.js +38 -0
- package/esm/host/deno.d.ts +3 -0
- package/esm/host/deno.d.ts.map +1 -0
- package/esm/host/deno.js +2 -0
- package/esm/host/mod.d.ts +3 -0
- package/esm/host/mod.d.ts.map +1 -0
- package/esm/host/mod.js +2 -0
- package/esm/host/node.d.ts +3 -0
- package/esm/host/node.d.ts.map +1 -0
- package/esm/host/node.js +2 -0
- package/esm/index.d.ts +29 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +15 -0
- package/esm/kv.d.ts.map +1 -0
- package/esm/models/trellis/TrellisError.d.ts +20 -0
- package/esm/models/trellis/TrellisError.d.ts.map +1 -0
- package/esm/models/trellis/TrellisError.js +15 -0
- package/esm/operations.d.ts +103 -0
- package/esm/operations.d.ts.map +1 -0
- package/esm/operations.js +229 -0
- package/esm/runtime_transport.d.ts +21 -0
- package/esm/runtime_transport.d.ts.map +1 -0
- package/esm/runtime_transport.js +50 -0
- package/esm/sdk/core.d.ts +3 -0
- package/esm/sdk/core.d.ts.map +1 -0
- package/esm/sdk/core.js +2 -0
- package/esm/server/deno.d.ts +1 -1
- package/esm/server/deno.d.ts.map +1 -1
- package/esm/server/health.d.ts +78 -9
- package/esm/server/health.d.ts.map +1 -1
- package/esm/server/health.js +196 -11
- package/esm/server/health_rpc.d.ts +2 -1
- package/esm/server/health_rpc.d.ts.map +1 -1
- package/esm/server/health_rpc.js +6 -4
- package/esm/server/health_schemas.d.ts +51 -0
- package/esm/server/health_schemas.d.ts.map +1 -1
- package/esm/server/health_schemas.js +39 -3
- package/esm/server/mod.d.ts +7 -10
- package/esm/server/mod.d.ts.map +1 -1
- package/esm/server/mod.js +6 -7
- package/esm/server/node.d.ts +1 -1
- package/esm/server/node.d.ts.map +1 -1
- package/esm/server/service.d.ts +65 -13
- package/esm/server/service.d.ts.map +1 -1
- package/esm/server/service.js +299 -54
- package/esm/server/transfer.d.ts +21 -5
- package/esm/server/transfer.d.ts.map +1 -1
- package/esm/server/transfer.js +210 -25
- package/esm/server.d.ts +40 -0
- package/esm/server.d.ts.map +1 -0
- package/esm/server.js +807 -0
- package/esm/server_logger.d.ts.map +1 -0
- package/esm/store.d.ts +60 -0
- package/esm/store.d.ts.map +1 -0
- package/esm/store.js +371 -0
- package/esm/tasks.d.ts.map +1 -0
- package/esm/tracing.d.ts +5 -0
- package/esm/tracing.d.ts.map +1 -0
- package/esm/tracing.js +7 -0
- package/esm/transfer.d.ts +114 -0
- package/esm/transfer.d.ts.map +1 -0
- package/esm/transfer.js +353 -0
- package/esm/trellis.d.ts +314 -0
- package/esm/trellis.d.ts.map +1 -0
- package/esm/trellis.js +1049 -0
- package/package.json +32 -55
- package/script/generated/js/sdks/trellis-core/api.d.ts.map +1 -0
- package/script/generated/js/sdks/trellis-core/api.js +42 -0
- package/script/generated/js/sdks/trellis-core/contract.d.ts +8 -0
- package/script/generated/js/sdks/trellis-core/contract.d.ts.map +1 -0
- package/script/generated/js/sdks/trellis-core/contract.js +62 -0
- package/script/generated/js/sdks/trellis-core/mod.d.ts +6 -0
- package/script/generated/js/sdks/trellis-core/mod.d.ts.map +1 -0
- package/script/generated/js/sdks/trellis-core/mod.js +29 -0
- package/script/generated/js/sdks/trellis-core/schemas.d.ts +1237 -0
- package/script/generated/js/sdks/trellis-core/schemas.d.ts.map +1 -0
- package/script/generated/js/sdks/trellis-core/schemas.js +32 -0
- package/script/generated/js/sdks/trellis-core/types.d.ts +198 -0
- package/script/generated/js/sdks/trellis-core/types.d.ts.map +1 -0
- package/script/generated/js/sdks/trellis-core/types.js +5 -0
- package/script/js/packages/trellis/auth/browser/login.d.ts +35 -0
- package/script/js/packages/trellis/auth/browser/login.d.ts.map +1 -0
- package/script/js/packages/trellis/auth/browser/login.js +117 -0
- package/script/js/packages/trellis/auth/browser/portal.d.ts.map +1 -0
- package/script/js/packages/trellis/auth/browser/portal.js +40 -0
- package/script/js/packages/trellis/auth/browser/session.d.ts.map +1 -0
- package/script/js/packages/trellis/auth/browser/session.js +79 -0
- package/script/js/packages/trellis/auth/browser/storage.d.ts.map +1 -0
- package/script/js/packages/trellis/auth/browser.d.ts +13 -0
- package/script/js/packages/trellis/auth/browser.d.ts.map +1 -0
- package/script/js/packages/trellis/auth/browser.js +52 -0
- package/script/js/packages/trellis/auth/device_activation.d.ts +206 -0
- package/script/js/packages/trellis/auth/device_activation.d.ts.map +1 -0
- package/script/js/packages/trellis/auth/device_activation.js +357 -0
- package/script/js/packages/trellis/auth/keys.d.ts.map +1 -0
- package/script/js/packages/trellis/auth/keys.js +56 -0
- package/script/js/packages/trellis/auth/mod.d.ts +18 -0
- package/script/js/packages/trellis/auth/mod.d.ts.map +1 -0
- package/script/js/packages/trellis/auth/mod.js +217 -0
- package/script/js/packages/trellis/auth/proof.d.ts.map +1 -0
- package/script/js/packages/trellis/auth/proof.js +48 -0
- package/script/js/packages/trellis/auth/protocol.d.ts +1580 -0
- package/script/js/packages/trellis/auth/protocol.d.ts.map +1 -0
- package/script/js/packages/trellis/auth/protocol.js +808 -0
- package/script/js/packages/trellis/auth/schemas.d.ts +158 -0
- package/script/js/packages/trellis/auth/schemas.d.ts.map +1 -0
- package/script/js/packages/trellis/auth/schemas.js +92 -0
- package/script/js/packages/trellis/auth/session_auth.d.ts +19 -0
- package/script/js/packages/trellis/auth/session_auth.d.ts.map +1 -0
- package/script/js/packages/trellis/auth/session_auth.js +59 -0
- package/script/js/packages/trellis/auth/trellis_id.d.ts.map +1 -0
- package/script/js/packages/trellis/auth/trellis_id.js +8 -0
- package/script/js/packages/trellis/auth/types.d.ts.map +1 -0
- package/script/js/packages/trellis/auth/utils.d.ts.map +1 -0
- package/script/js/packages/trellis/auth.d.ts +2 -0
- package/script/js/packages/trellis/auth.d.ts.map +1 -0
- package/script/js/packages/trellis/auth.js +17 -0
- package/script/js/packages/trellis/client.d.ts.map +1 -0
- package/script/js/packages/trellis/client.js +67 -0
- package/script/js/packages/trellis/client_connect.d.ts +53 -0
- package/script/js/packages/trellis/client_connect.d.ts.map +1 -0
- package/script/js/packages/trellis/client_connect.js +342 -0
- package/script/js/packages/trellis/codec.d.ts.map +1 -0
- package/script/js/packages/trellis/codec.js +80 -0
- package/script/js/packages/trellis/contract.d.ts +20 -0
- package/script/js/packages/trellis/contract.d.ts.map +1 -0
- package/script/js/packages/trellis/contract.js +9 -0
- package/script/js/packages/trellis/contract_support/canonical.d.ts.map +1 -0
- package/script/js/packages/trellis/contract_support/mod.d.ts +622 -0
- package/script/js/packages/trellis/contract_support/mod.d.ts.map +1 -0
- package/script/js/packages/trellis/contract_support/mod.js +1001 -0
- package/script/js/packages/trellis/contract_support/protocol.d.ts.map +1 -0
- package/script/js/packages/trellis/contract_support/protocol.js +151 -0
- package/script/js/packages/trellis/contract_support/runtime.d.ts +75 -0
- package/script/js/packages/trellis/contract_support/runtime.d.ts.map +1 -0
- package/script/js/packages/trellis/contract_support/schema_pointers.d.ts.map +1 -0
- package/script/js/packages/trellis/contracts.d.ts +4 -0
- package/script/js/packages/trellis/contracts.d.ts.map +1 -0
- package/script/js/packages/trellis/contracts.js +24 -0
- package/script/js/packages/trellis/device.d.ts +48 -0
- package/script/js/packages/trellis/device.d.ts.map +1 -0
- package/script/js/packages/trellis/device.js +292 -0
- package/script/js/packages/trellis/errors/AuthError.d.ts +30 -0
- package/script/js/packages/trellis/errors/AuthError.d.ts.map +1 -0
- package/script/js/packages/trellis/errors/AuthError.js +83 -0
- package/script/js/packages/trellis/errors/KVError.d.ts.map +1 -0
- package/script/js/packages/trellis/errors/KVError.js +53 -0
- package/script/js/packages/trellis/errors/RemoteError.d.ts +53 -0
- package/script/js/packages/trellis/errors/RemoteError.d.ts.map +1 -0
- package/script/js/packages/trellis/errors/RemoteError.js +87 -0
- package/script/js/packages/trellis/errors/StoreError.d.ts.map +1 -0
- package/script/js/packages/trellis/errors/StoreError.js +48 -0
- package/script/js/packages/trellis/errors/TransferError.d.ts.map +1 -0
- package/script/js/packages/trellis/errors/TransferError.js +48 -0
- package/script/js/packages/trellis/errors/TrellisError.d.ts +16 -0
- package/script/js/packages/trellis/errors/TrellisError.d.ts.map +1 -0
- package/script/js/packages/trellis/errors/TrellisError.js +19 -0
- package/script/js/packages/trellis/errors/ValidationError.d.ts.map +1 -0
- package/script/js/packages/trellis/errors/ValidationError.js +84 -0
- package/script/js/packages/trellis/errors/index.d.ts +177 -0
- package/script/js/packages/trellis/errors/index.d.ts.map +1 -0
- package/script/js/packages/trellis/errors/index.js +136 -0
- package/script/js/packages/trellis/globals.d.ts.map +1 -0
- package/script/js/packages/trellis/health.d.ts +4 -0
- package/script/js/packages/trellis/health.d.ts.map +1 -0
- package/script/js/packages/trellis/health.js +18 -0
- package/script/js/packages/trellis/helpers.d.ts +10 -0
- package/script/js/packages/trellis/helpers.d.ts.map +1 -0
- package/script/js/packages/trellis/helpers.js +44 -0
- package/script/js/packages/trellis/index.d.ts +28 -0
- package/script/js/packages/trellis/index.d.ts.map +1 -0
- package/script/js/packages/trellis/index.js +81 -0
- package/script/js/packages/trellis/kv.d.ts.map +1 -0
- package/script/js/packages/trellis/kv.js +383 -0
- package/script/js/packages/trellis/models/trellis/TrellisError.d.ts +20 -0
- package/script/js/packages/trellis/models/trellis/TrellisError.d.ts.map +1 -0
- package/script/js/packages/trellis/models/trellis/TrellisError.js +21 -0
- package/script/js/packages/trellis/npm/src/_dnt.polyfills.d.ts +18 -0
- package/script/js/packages/trellis/npm/src/_dnt.polyfills.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/_dnt.shims.d.ts +5 -0
- package/script/js/packages/trellis/npm/src/_dnt.shims.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/_dnt.shims.js +65 -0
- package/script/js/packages/trellis/npm/src/auth/browser/login.d.ts +35 -0
- package/script/js/packages/trellis/npm/src/auth/browser/login.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/browser/login.js +117 -0
- package/script/js/packages/trellis/npm/src/auth/browser/portal.d.ts +11 -0
- package/script/js/packages/trellis/npm/src/auth/browser/portal.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/browser/portal.js +40 -0
- package/script/js/packages/trellis/npm/src/auth/browser/session.d.ts +19 -0
- package/script/js/packages/trellis/npm/src/auth/browser/session.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/browser/session.js +79 -0
- package/script/js/packages/trellis/npm/src/auth/browser/storage.d.ts +12 -0
- package/script/js/packages/trellis/npm/src/auth/browser/storage.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/browser/storage.js +67 -0
- package/script/js/packages/trellis/npm/src/auth/browser.d.ts +14 -0
- package/script/js/packages/trellis/npm/src/auth/browser.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/browser.js +53 -0
- package/script/js/packages/trellis/npm/src/auth/device_activation.d.ts +206 -0
- package/script/js/packages/trellis/npm/src/auth/device_activation.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/device_activation.js +357 -0
- package/script/js/packages/trellis/npm/src/auth/keys.d.ts +5 -0
- package/script/js/packages/trellis/npm/src/auth/keys.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/keys.js +56 -0
- package/script/js/packages/trellis/npm/src/auth/mod.d.ts +18 -0
- package/script/js/packages/trellis/npm/src/auth/mod.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/mod.js +217 -0
- package/script/js/packages/trellis/npm/src/auth/proof.d.ts +9 -0
- package/script/js/packages/trellis/npm/src/auth/proof.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/proof.js +48 -0
- package/script/js/packages/trellis/npm/src/auth/protocol.d.ts +1580 -0
- package/script/js/packages/trellis/npm/src/auth/protocol.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/protocol.js +808 -0
- package/script/js/packages/trellis/npm/src/auth/schemas.d.ts +158 -0
- package/script/js/packages/trellis/npm/src/auth/schemas.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/schemas.js +92 -0
- package/script/js/packages/trellis/npm/src/auth/session_auth.d.ts +19 -0
- package/script/js/packages/trellis/npm/src/auth/session_auth.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/session_auth.js +59 -0
- package/script/js/packages/trellis/npm/src/auth/trellis_id.d.ts +2 -0
- package/script/js/packages/trellis/npm/src/auth/trellis_id.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/trellis_id.js +8 -0
- package/script/js/packages/trellis/npm/src/auth/types.d.ts +8 -0
- package/script/js/packages/trellis/npm/src/auth/types.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/types.js +2 -0
- package/script/js/packages/trellis/npm/src/auth/utils.d.ts +11 -0
- package/script/js/packages/trellis/npm/src/auth/utils.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth/utils.js +77 -0
- package/script/js/packages/trellis/npm/src/auth.d.ts +3 -0
- package/script/js/packages/trellis/npm/src/auth.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/auth.js +18 -0
- package/script/js/packages/trellis/npm/src/browser.d.ts +6 -0
- package/script/js/packages/trellis/npm/src/browser.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/browser.js +21 -0
- package/script/js/packages/trellis/npm/src/client.d.ts +33 -0
- package/script/js/packages/trellis/npm/src/client.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/client.js +67 -0
- package/script/js/packages/trellis/npm/src/client_connect.d.ts +53 -0
- package/script/js/packages/trellis/npm/src/client_connect.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/client_connect.js +366 -0
- package/script/js/packages/trellis/npm/src/codec.d.ts +13 -0
- package/script/js/packages/trellis/npm/src/codec.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/codec.js +80 -0
- package/script/js/packages/trellis/npm/src/contract.d.ts +20 -0
- package/script/js/packages/trellis/npm/src/contract.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/contract.js +9 -0
- package/script/js/packages/trellis/npm/src/contract_support/canonical.d.ts +14 -0
- package/script/js/packages/trellis/npm/src/contract_support/canonical.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/contract_support/canonical.js +144 -0
- package/script/js/packages/trellis/npm/src/contract_support/mod.d.ts +622 -0
- package/script/js/packages/trellis/npm/src/contract_support/mod.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/contract_support/mod.js +1001 -0
- package/script/js/packages/trellis/npm/src/contract_support/protocol.d.ts +335 -0
- package/script/js/packages/trellis/npm/src/contract_support/protocol.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/contract_support/protocol.js +151 -0
- package/script/js/packages/trellis/npm/src/contract_support/runtime.d.ts +75 -0
- package/script/js/packages/trellis/npm/src/contract_support/runtime.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/contract_support/runtime.js +13 -0
- package/script/js/packages/trellis/npm/src/contract_support/schema_pointers.d.ts +18 -0
- package/script/js/packages/trellis/npm/src/contract_support/schema_pointers.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/contract_support/schema_pointers.js +63 -0
- package/script/js/packages/trellis/npm/src/contracts.d.ts +5 -0
- package/script/js/packages/trellis/npm/src/contracts.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/contracts.js +25 -0
- package/script/js/packages/trellis/npm/src/device.d.ts +48 -0
- package/script/js/packages/trellis/npm/src/device.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/device.js +292 -0
- package/script/js/packages/trellis/npm/src/env.d.ts +2 -0
- package/script/js/packages/trellis/npm/src/env.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/env.js +5 -0
- package/script/js/packages/trellis/npm/src/errors/AuthError.d.ts +30 -0
- package/script/js/packages/trellis/npm/src/errors/AuthError.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/errors/AuthError.js +83 -0
- package/script/js/packages/trellis/npm/src/errors/KVError.d.ts +31 -0
- package/script/js/packages/trellis/npm/src/errors/KVError.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/errors/KVError.js +53 -0
- package/script/js/packages/trellis/npm/src/errors/RemoteError.d.ts +53 -0
- package/script/js/packages/trellis/npm/src/errors/RemoteError.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/errors/RemoteError.js +87 -0
- package/script/js/packages/trellis/npm/src/errors/StoreError.d.ts +22 -0
- package/script/js/packages/trellis/npm/src/errors/StoreError.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/errors/StoreError.js +48 -0
- package/script/js/packages/trellis/npm/src/errors/TransferError.d.ts +22 -0
- package/script/js/packages/trellis/npm/src/errors/TransferError.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/errors/TransferError.js +48 -0
- package/script/js/packages/trellis/npm/src/errors/TrellisError.d.ts +16 -0
- package/script/js/packages/trellis/npm/src/errors/TrellisError.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/errors/TrellisError.js +19 -0
- package/script/js/packages/trellis/npm/src/errors/ValidationError.d.ts +51 -0
- package/script/js/packages/trellis/npm/src/errors/ValidationError.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/errors/ValidationError.js +84 -0
- package/script/js/packages/trellis/npm/src/errors/index.d.ts +178 -0
- package/script/js/packages/trellis/npm/src/errors/index.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/errors/index.js +137 -0
- package/script/js/packages/trellis/npm/src/globals.d.ts +10 -0
- package/script/js/packages/trellis/npm/src/globals.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/globals.js +19 -0
- package/script/js/packages/trellis/npm/src/health.d.ts +5 -0
- package/script/js/packages/trellis/npm/src/health.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/health.js +19 -0
- package/script/js/packages/trellis/npm/src/helpers.d.ts +10 -0
- package/script/js/packages/trellis/npm/src/helpers.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/helpers.js +44 -0
- package/script/js/packages/trellis/npm/src/host/deno.d.ts +3 -0
- package/script/js/packages/trellis/npm/src/host/deno.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/host/deno.js +18 -0
- package/script/js/packages/trellis/npm/src/host/mod.d.ts +3 -0
- package/script/js/packages/trellis/npm/src/host/mod.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/host/mod.js +18 -0
- package/script/js/packages/trellis/npm/src/host/node.d.ts +3 -0
- package/script/js/packages/trellis/npm/src/host/node.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/host/node.js +18 -0
- package/script/js/packages/trellis/npm/src/index.d.ts +29 -0
- package/script/js/packages/trellis/npm/src/index.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/index.js +82 -0
- package/script/js/packages/trellis/npm/src/kv.d.ts +72 -0
- package/script/js/packages/trellis/npm/src/kv.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/kv.js +383 -0
- package/script/js/packages/trellis/npm/src/models/trellis/TrellisError.d.ts +20 -0
- package/script/js/packages/trellis/npm/src/models/trellis/TrellisError.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/models/trellis/TrellisError.js +21 -0
- package/script/js/packages/trellis/npm/src/operations.d.ts +103 -0
- package/script/js/packages/trellis/npm/src/operations.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/operations.js +235 -0
- package/script/js/packages/trellis/npm/src/runtime_transport.d.ts +21 -0
- package/script/js/packages/trellis/npm/src/runtime_transport.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/runtime_transport.js +77 -0
- package/script/js/packages/trellis/npm/src/sdk/core.d.ts +3 -0
- package/script/js/packages/trellis/npm/src/sdk/core.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/sdk/core.js +20 -0
- package/script/js/packages/trellis/npm/src/server/deno.d.ts +2 -0
- package/script/js/packages/trellis/npm/src/server/deno.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/server/deno.js +6 -0
- package/script/js/packages/trellis/npm/src/server/health.d.ts +161 -0
- package/script/js/packages/trellis/npm/src/server/health.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/server/health.js +291 -0
- package/script/js/packages/trellis/npm/src/server/health_rpc.d.ts +17 -0
- package/script/js/packages/trellis/npm/src/server/health_rpc.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/server/health_rpc.js +28 -0
- package/script/js/packages/trellis/npm/src/server/health_schemas.d.ts +71 -0
- package/script/js/packages/trellis/npm/src/server/health_schemas.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/server/health_schemas.js +57 -0
- package/script/js/packages/trellis/npm/src/server/mod.d.ts +15 -0
- package/script/js/packages/trellis/npm/src/server/mod.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/server/mod.js +39 -0
- package/script/js/packages/trellis/npm/src/server/node.d.ts +2 -0
- package/script/js/packages/trellis/npm/src/server/node.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/server/node.js +6 -0
- package/script/js/packages/trellis/npm/src/server/runtime.d.ts +16 -0
- package/script/js/packages/trellis/npm/src/server/runtime.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/server/runtime.js +2 -0
- package/script/js/packages/trellis/npm/src/server/service.d.ts +205 -0
- package/script/js/packages/trellis/npm/src/server/service.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/server/service.js +654 -0
- package/script/js/packages/trellis/npm/src/server/subscription.d.ts +99 -0
- package/script/js/packages/trellis/npm/src/server/subscription.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/server/subscription.js +29 -0
- package/script/js/packages/trellis/npm/src/server/transfer.d.ts +57 -0
- package/script/js/packages/trellis/npm/src/server/transfer.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/server/transfer.js +607 -0
- package/script/js/packages/trellis/npm/src/server.d.ts +40 -0
- package/script/js/packages/trellis/npm/src/server.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/server.js +811 -0
- package/script/js/packages/trellis/npm/src/server_logger.d.ts +3 -0
- package/script/js/packages/trellis/npm/src/server_logger.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/server_logger.js +10 -0
- package/script/js/packages/trellis/npm/src/store.d.ts +60 -0
- package/script/js/packages/trellis/npm/src/store.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/store.js +377 -0
- package/script/js/packages/trellis/npm/src/tasks.d.ts +11 -0
- package/script/js/packages/trellis/npm/src/tasks.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/tasks.js +45 -0
- package/script/js/packages/trellis/npm/src/telemetry/carrier.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/telemetry/core.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/telemetry/env.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/telemetry/env.js +36 -0
- package/script/js/packages/trellis/npm/src/telemetry/init.d.ts +4 -0
- package/script/js/packages/trellis/npm/src/telemetry/init.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/telemetry/init.js +11 -0
- package/script/js/packages/trellis/npm/src/telemetry/mod.d.ts +10 -0
- package/script/js/packages/trellis/npm/src/telemetry/mod.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/telemetry/mod.js +26 -0
- package/script/js/packages/trellis/npm/src/telemetry/nats.d.ts +7 -0
- package/script/js/packages/trellis/npm/src/telemetry/nats.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/telemetry/result.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/telemetry/runtime.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/telemetry/runtime.js +60 -0
- package/script/js/packages/trellis/npm/src/telemetry/trace.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/telemetry/trace.js +31 -0
- package/script/js/packages/trellis/npm/src/telemetry/trellis.d.ts +2 -0
- package/script/js/packages/trellis/npm/src/telemetry/trellis.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/telemetry/trellis.js +7 -0
- package/script/js/packages/trellis/npm/src/tracing.d.ts +5 -0
- package/script/js/packages/trellis/npm/src/tracing.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/tracing.js +49 -0
- package/script/js/packages/trellis/npm/src/transfer.d.ts +114 -0
- package/script/js/packages/trellis/npm/src/transfer.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/transfer.js +363 -0
- package/script/js/packages/trellis/npm/src/trellis.d.ts +314 -0
- package/script/js/packages/trellis/npm/src/trellis.d.ts.map +1 -0
- package/script/js/packages/trellis/npm/src/trellis.js +1062 -0
- package/script/js/packages/trellis/operations.d.ts +103 -0
- package/script/js/packages/trellis/operations.d.ts.map +1 -0
- package/script/js/packages/trellis/operations.js +235 -0
- package/script/js/packages/trellis/runtime_transport.d.ts +21 -0
- package/script/js/packages/trellis/runtime_transport.d.ts.map +1 -0
- package/script/js/packages/trellis/runtime_transport.js +53 -0
- package/script/js/packages/trellis/sdk/core.d.ts +3 -0
- package/script/js/packages/trellis/sdk/core.d.ts.map +1 -0
- package/script/js/packages/trellis/sdk/core.js +20 -0
- package/script/js/packages/trellis/server/health.d.ts +170 -0
- package/script/js/packages/trellis/server/health.d.ts.map +1 -0
- package/script/js/packages/trellis/server/health.js +267 -0
- package/script/js/packages/trellis/server/health_schemas.d.ts +71 -0
- package/script/js/packages/trellis/server/health_schemas.d.ts.map +1 -0
- package/script/js/packages/trellis/server/health_schemas.js +57 -0
- package/script/js/packages/trellis/store.d.ts +60 -0
- package/script/js/packages/trellis/store.d.ts.map +1 -0
- package/script/js/packages/trellis/store.js +377 -0
- package/script/js/packages/trellis/tasks.d.ts.map +1 -0
- package/script/js/packages/trellis/tasks.js +45 -0
- package/script/js/packages/trellis/telemetry/carrier.d.ts +9 -0
- package/script/js/packages/trellis/telemetry/carrier.d.ts.map +1 -0
- package/script/js/packages/trellis/telemetry/carrier.js +25 -0
- package/script/js/packages/trellis/telemetry/core.d.ts +8 -0
- package/script/js/packages/trellis/telemetry/core.d.ts.map +1 -0
- package/script/js/packages/trellis/telemetry/core.js +24 -0
- package/script/js/packages/trellis/telemetry/env.d.ts +2 -0
- package/script/js/packages/trellis/telemetry/env.d.ts.map +1 -0
- package/script/js/packages/trellis/telemetry/init.d.ts.map +1 -0
- package/script/js/packages/trellis/telemetry/init.js +11 -0
- package/script/js/packages/trellis/telemetry/mod.d.ts.map +1 -0
- package/script/js/packages/trellis/telemetry/mod.js +26 -0
- package/script/js/packages/trellis/telemetry/nats.d.ts.map +1 -0
- package/script/js/packages/trellis/telemetry/nats.js +9 -0
- package/script/js/packages/trellis/telemetry/result.d.ts +2 -0
- package/script/js/packages/trellis/telemetry/result.d.ts.map +1 -0
- package/script/js/packages/trellis/telemetry/result.js +21 -0
- package/script/js/packages/trellis/telemetry/runtime.d.ts +2 -0
- package/script/js/packages/trellis/telemetry/runtime.d.ts.map +1 -0
- package/script/js/packages/trellis/telemetry/runtime.js +60 -0
- package/script/js/packages/trellis/telemetry/trace.d.ts +5 -0
- package/script/js/packages/trellis/telemetry/trace.d.ts.map +1 -0
- package/script/js/packages/trellis/telemetry/trace.js +31 -0
- package/script/js/packages/trellis/telemetry/trellis.d.ts.map +1 -0
- package/script/js/packages/trellis/telemetry/trellis.js +7 -0
- package/script/js/packages/trellis/tracing.d.ts +4 -0
- package/script/js/packages/trellis/tracing.d.ts.map +1 -0
- package/script/js/packages/trellis/tracing.js +46 -0
- package/script/js/packages/trellis/transfer.d.ts +114 -0
- package/script/js/packages/trellis/transfer.d.ts.map +1 -0
- package/script/js/packages/trellis/transfer.js +363 -0
- package/script/js/packages/trellis/trellis.d.ts +314 -0
- package/script/js/packages/trellis/trellis.d.ts.map +1 -0
- package/script/js/packages/trellis/trellis.js +1062 -0
- package/esm/contracts/canonical.d.ts.map +0 -1
- package/esm/contracts/mod.d.ts +0 -482
- package/esm/contracts/mod.d.ts.map +0 -1
- package/esm/contracts/mod.js +0 -558
- package/esm/contracts/protocol.d.ts.map +0 -1
- package/esm/contracts/protocol.js +0 -145
- package/esm/contracts/runtime.d.ts +0 -48
- package/esm/contracts/runtime.d.ts.map +0 -1
- package/esm/contracts/schema_pointers.d.ts.map +0 -1
- package/esm/trellis/_sdk/activity/_dnt.polyfills.d.ts +0 -12
- package/esm/trellis/_sdk/activity/_dnt.polyfills.d.ts.map +0 -1
- package/esm/trellis/_sdk/activity/_dnt.polyfills.js +0 -15
- package/esm/trellis/_sdk/activity/api.d.ts.map +0 -1
- package/esm/trellis/_sdk/activity/api.js +0 -43
- package/esm/trellis/_sdk/activity/contract.d.ts +0 -8
- package/esm/trellis/_sdk/activity/contract.d.ts.map +0 -1
- package/esm/trellis/_sdk/activity/contract.js +0 -59
- package/esm/trellis/_sdk/activity/mod.d.ts +0 -7
- package/esm/trellis/_sdk/activity/mod.d.ts.map +0 -1
- package/esm/trellis/_sdk/activity/mod.js +0 -5
- package/esm/trellis/_sdk/activity/package.json +0 -3
- package/esm/trellis/_sdk/activity/schemas.d.ts +0 -607
- package/esm/trellis/_sdk/activity/schemas.d.ts.map +0 -1
- package/esm/trellis/_sdk/activity/schemas.js +0 -33
- package/esm/trellis/_sdk/activity/types.d.ts +0 -96
- package/esm/trellis/_sdk/activity/types.d.ts.map +0 -1
- package/esm/trellis/_sdk/activity/types.js +0 -3
- package/esm/trellis/_sdk/auth/_dnt.polyfills.d.ts +0 -12
- package/esm/trellis/_sdk/auth/_dnt.polyfills.d.ts.map +0 -1
- package/esm/trellis/_sdk/auth/_dnt.polyfills.js +0 -15
- package/esm/trellis/_sdk/auth/api.d.ts +0 -10
- package/esm/trellis/_sdk/auth/api.d.ts.map +0 -1
- package/esm/trellis/_sdk/auth/api.js +0 -376
- package/esm/trellis/_sdk/auth/contract.d.ts +0 -28
- package/esm/trellis/_sdk/auth/contract.d.ts.map +0 -1
- package/esm/trellis/_sdk/auth/contract.js +0 -83
- package/esm/trellis/_sdk/auth/mod.d.ts +0 -7
- package/esm/trellis/_sdk/auth/mod.d.ts.map +0 -1
- package/esm/trellis/_sdk/auth/mod.js +0 -5
- package/esm/trellis/_sdk/auth/package.json +0 -3
- package/esm/trellis/_sdk/auth/schemas.d.ts +0 -10110
- package/esm/trellis/_sdk/auth/schemas.d.ts.map +0 -1
- package/esm/trellis/_sdk/auth/schemas.js +0 -325
- package/esm/trellis/_sdk/auth/types.d.ts +0 -1382
- package/esm/trellis/_sdk/auth/types.d.ts.map +0 -1
- package/esm/trellis/_sdk/auth/types.js +0 -3
- package/esm/trellis/_sdk/core/_dnt.polyfills.d.ts +0 -12
- package/esm/trellis/_sdk/core/_dnt.polyfills.d.ts.map +0 -1
- package/esm/trellis/_sdk/core/_dnt.polyfills.js +0 -15
- package/esm/trellis/_sdk/core/api.d.ts +0 -10
- package/esm/trellis/_sdk/core/api.d.ts.map +0 -1
- package/esm/trellis/_sdk/core/api.js +0 -36
- package/esm/trellis/_sdk/core/contract.d.ts +0 -8
- package/esm/trellis/_sdk/core/contract.d.ts.map +0 -1
- package/esm/trellis/_sdk/core/contract.js +0 -59
- package/esm/trellis/_sdk/core/mod.d.ts +0 -7
- package/esm/trellis/_sdk/core/mod.d.ts.map +0 -1
- package/esm/trellis/_sdk/core/mod.js +0 -5
- package/esm/trellis/_sdk/core/package.json +0 -3
- package/esm/trellis/_sdk/core/schemas.d.ts +0 -1266
- package/esm/trellis/_sdk/core/schemas.d.ts.map +0 -1
- package/esm/trellis/_sdk/core/schemas.js +0 -28
- package/esm/trellis/_sdk/core/types.d.ts +0 -193
- package/esm/trellis/_sdk/core/types.d.ts.map +0 -1
- package/esm/trellis/_sdk/core/types.js +0 -3
- package/esm/trellis/_sdk/state/_dnt.polyfills.d.ts +0 -12
- package/esm/trellis/_sdk/state/_dnt.polyfills.d.ts.map +0 -1
- package/esm/trellis/_sdk/state/_dnt.polyfills.js +0 -15
- package/esm/trellis/_sdk/state/api.d.ts +0 -10
- package/esm/trellis/_sdk/state/api.d.ts.map +0 -1
- package/esm/trellis/_sdk/state/api.js +0 -71
- package/esm/trellis/_sdk/state/contract.d.ts +0 -8
- package/esm/trellis/_sdk/state/contract.d.ts.map +0 -1
- package/esm/trellis/_sdk/state/contract.js +0 -59
- package/esm/trellis/_sdk/state/mod.d.ts +0 -7
- package/esm/trellis/_sdk/state/mod.d.ts.map +0 -1
- package/esm/trellis/_sdk/state/mod.js +0 -5
- package/esm/trellis/_sdk/state/package.json +0 -3
- package/esm/trellis/_sdk/state/schemas.d.ts +0 -1437
- package/esm/trellis/_sdk/state/schemas.d.ts.map +0 -1
- package/esm/trellis/_sdk/state/schemas.js +0 -62
- package/esm/trellis/_sdk/state/types.d.ts +0 -206
- package/esm/trellis/_sdk/state/types.d.ts.map +0 -1
- package/esm/trellis/_sdk/state/types.js +0 -3
- package/esm/trellis/auth/browser.d.ts +0 -3
- package/esm/trellis/auth/browser.d.ts.map +0 -1
- package/esm/trellis/auth/browser.js +0 -2
- package/esm/trellis/auth.d.ts +0 -3
- package/esm/trellis/auth.d.ts.map +0 -1
- package/esm/trellis/auth.js +0 -2
- package/esm/trellis/browser.d.ts +0 -6
- package/esm/trellis/browser.d.ts.map +0 -1
- package/esm/trellis/browser.js +0 -5
- package/esm/trellis/client.d.ts.map +0 -1
- package/esm/trellis/client_connect.d.ts +0 -53
- package/esm/trellis/client_connect.d.ts.map +0 -1
- package/esm/trellis/client_connect.js +0 -300
- package/esm/trellis/codec.d.ts.map +0 -1
- package/esm/trellis/contract.d.ts +0 -20
- package/esm/trellis/contract.d.ts.map +0 -1
- package/esm/trellis/contract.js +0 -4
- package/esm/trellis/contracts.d.ts +0 -5
- package/esm/trellis/contracts.d.ts.map +0 -1
- package/esm/trellis/contracts.js +0 -3
- package/esm/trellis/device.d.ts +0 -41
- package/esm/trellis/device.d.ts.map +0 -1
- package/esm/trellis/device.js +0 -209
- package/esm/trellis/env.d.ts +0 -2
- package/esm/trellis/env.d.ts.map +0 -1
- package/esm/trellis/env.js +0 -1
- package/esm/trellis/errors/AuthError.d.ts +0 -30
- package/esm/trellis/errors/AuthError.d.ts.map +0 -1
- package/esm/trellis/errors/AuthError.js +0 -76
- package/esm/trellis/errors/KVError.d.ts.map +0 -1
- package/esm/trellis/errors/RemoteError.d.ts +0 -47
- package/esm/trellis/errors/RemoteError.d.ts.map +0 -1
- package/esm/trellis/errors/RemoteError.js +0 -80
- package/esm/trellis/errors/StoreError.d.ts.map +0 -1
- package/esm/trellis/errors/TransferError.d.ts.map +0 -1
- package/esm/trellis/errors/TrellisError.d.ts.map +0 -1
- package/esm/trellis/errors/ValidationError.d.ts.map +0 -1
- package/esm/trellis/errors/index.d.ts +0 -47
- package/esm/trellis/errors/index.d.ts.map +0 -1
- package/esm/trellis/errors/index.js +0 -35
- package/esm/trellis/globals.d.ts.map +0 -1
- package/esm/trellis/helpers.d.ts +0 -13
- package/esm/trellis/helpers.d.ts.map +0 -1
- package/esm/trellis/helpers.js +0 -48
- package/esm/trellis/index.d.ts +0 -25
- package/esm/trellis/index.d.ts.map +0 -1
- package/esm/trellis/index.js +0 -13
- package/esm/trellis/kv.d.ts.map +0 -1
- package/esm/trellis/models/trellis/TrellisError.d.ts +0 -57
- package/esm/trellis/models/trellis/TrellisError.d.ts.map +0 -1
- package/esm/trellis/models/trellis/TrellisError.js +0 -20
- package/esm/trellis/operations.d.ts +0 -81
- package/esm/trellis/operations.d.ts.map +0 -1
- package/esm/trellis/operations.js +0 -206
- package/esm/trellis/runtime_transport.d.ts +0 -12
- package/esm/trellis/runtime_transport.d.ts.map +0 -1
- package/esm/trellis/runtime_transport.js +0 -35
- package/esm/trellis/sdk/activity.d.ts +0 -3
- package/esm/trellis/sdk/activity.d.ts.map +0 -1
- package/esm/trellis/sdk/activity.js +0 -2
- package/esm/trellis/sdk/auth.d.ts +0 -4
- package/esm/trellis/sdk/auth.d.ts.map +0 -1
- package/esm/trellis/sdk/auth.js +0 -3
- package/esm/trellis/sdk/core.d.ts +0 -4
- package/esm/trellis/sdk/core.d.ts.map +0 -1
- package/esm/trellis/sdk/core.js +0 -3
- package/esm/trellis/sdk/state.d.ts +0 -4
- package/esm/trellis/sdk/state.d.ts.map +0 -1
- package/esm/trellis/sdk/state.js +0 -3
- package/esm/trellis/server/deno.d.ts +0 -3
- package/esm/trellis/server/deno.d.ts.map +0 -1
- package/esm/trellis/server/deno.js +0 -2
- package/esm/trellis/server/health.d.ts +0 -5
- package/esm/trellis/server/health.d.ts.map +0 -1
- package/esm/trellis/server/health.js +0 -3
- package/esm/trellis/server/mod.d.ts +0 -3
- package/esm/trellis/server/mod.d.ts.map +0 -1
- package/esm/trellis/server/mod.js +0 -2
- package/esm/trellis/server/node.d.ts +0 -3
- package/esm/trellis/server/node.d.ts.map +0 -1
- package/esm/trellis/server/node.js +0 -2
- package/esm/trellis/server/runtime.d.ts +0 -4
- package/esm/trellis/server/runtime.d.ts.map +0 -1
- package/esm/trellis/server/runtime.js +0 -2
- package/esm/trellis/server.d.ts +0 -21
- package/esm/trellis/server.d.ts.map +0 -1
- package/esm/trellis/server.js +0 -536
- package/esm/trellis/server_logger.d.ts.map +0 -1
- package/esm/trellis/store.d.ts +0 -51
- package/esm/trellis/store.d.ts.map +0 -1
- package/esm/trellis/store.js +0 -310
- package/esm/trellis/tasks.d.ts.map +0 -1
- package/esm/trellis/tracing.d.ts +0 -5
- package/esm/trellis/tracing.d.ts.map +0 -1
- package/esm/trellis/tracing.js +0 -7
- package/esm/trellis/transfer.d.ts +0 -118
- package/esm/trellis/transfer.d.ts.map +0 -1
- package/esm/trellis/transfer.js +0 -357
- package/esm/trellis/trellis.d.ts +0 -210
- package/esm/trellis/trellis.d.ts.map +0 -1
- package/esm/trellis/trellis.js +0 -935
- package/script/auth/browser/login.d.ts +0 -27
- package/script/auth/browser/login.d.ts.map +0 -1
- package/script/auth/browser/login.js +0 -100
- package/script/auth/browser/portal.d.ts.map +0 -1
- package/script/auth/browser/portal.js +0 -40
- package/script/auth/browser/session.d.ts.map +0 -1
- package/script/auth/browser/session.js +0 -79
- package/script/auth/browser/storage.d.ts.map +0 -1
- package/script/auth/browser.d.ts +0 -13
- package/script/auth/browser.d.ts.map +0 -1
- package/script/auth/browser.js +0 -46
- package/script/auth/device_activation.d.ts +0 -194
- package/script/auth/device_activation.d.ts.map +0 -1
- package/script/auth/device_activation.js +0 -333
- package/script/auth/keys.d.ts.map +0 -1
- package/script/auth/keys.js +0 -56
- package/script/auth/mod.d.ts +0 -18
- package/script/auth/mod.d.ts.map +0 -1
- package/script/auth/mod.js +0 -180
- package/script/auth/proof.d.ts.map +0 -1
- package/script/auth/proof.js +0 -48
- package/script/auth/protocol.d.ts +0 -1315
- package/script/auth/protocol.d.ts.map +0 -1
- package/script/auth/protocol.js +0 -735
- package/script/auth/schemas.d.ts +0 -93
- package/script/auth/schemas.d.ts.map +0 -1
- package/script/auth/schemas.js +0 -67
- package/script/auth/session_auth.d.ts +0 -20
- package/script/auth/session_auth.d.ts.map +0 -1
- package/script/auth/session_auth.js +0 -45
- package/script/auth/trellis_id.d.ts.map +0 -1
- package/script/auth/trellis_id.js +0 -8
- package/script/auth/types.d.ts.map +0 -1
- package/script/auth/utils.d.ts.map +0 -1
- package/script/contracts/canonical.d.ts.map +0 -1
- package/script/contracts/mod.d.ts +0 -482
- package/script/contracts/mod.d.ts.map +0 -1
- package/script/contracts/mod.js +0 -583
- package/script/contracts/protocol.d.ts.map +0 -1
- package/script/contracts/protocol.js +0 -151
- package/script/contracts/runtime.d.ts +0 -48
- package/script/contracts/runtime.d.ts.map +0 -1
- package/script/contracts/schema_pointers.d.ts.map +0 -1
- package/script/telemetry/carrier.d.ts.map +0 -1
- package/script/telemetry/core.d.ts.map +0 -1
- package/script/telemetry/env.d.ts.map +0 -1
- package/script/telemetry/init.d.ts.map +0 -1
- package/script/telemetry/init.js +0 -11
- package/script/telemetry/mod.d.ts.map +0 -1
- package/script/telemetry/mod.js +0 -26
- package/script/telemetry/nats.d.ts.map +0 -1
- package/script/telemetry/result.d.ts.map +0 -1
- package/script/telemetry/runtime.d.ts.map +0 -1
- package/script/telemetry/runtime.js +0 -60
- package/script/telemetry/trace.d.ts.map +0 -1
- package/script/telemetry/trace.js +0 -31
- package/script/telemetry/trellis.d.ts.map +0 -1
- package/script/telemetry/trellis.js +0 -7
- package/script/trellis/_sdk/activity/_dnt.polyfills.d.ts +0 -12
- package/script/trellis/_sdk/activity/_dnt.polyfills.d.ts.map +0 -1
- package/script/trellis/_sdk/activity/api.d.ts +0 -10
- package/script/trellis/_sdk/activity/api.d.ts.map +0 -1
- package/script/trellis/_sdk/activity/api.js +0 -46
- package/script/trellis/_sdk/activity/contract.d.ts +0 -8
- package/script/trellis/_sdk/activity/contract.d.ts.map +0 -1
- package/script/trellis/_sdk/activity/contract.js +0 -62
- package/script/trellis/_sdk/activity/mod.d.ts +0 -7
- package/script/trellis/_sdk/activity/mod.d.ts.map +0 -1
- package/script/trellis/_sdk/activity/mod.js +0 -30
- package/script/trellis/_sdk/activity/package.json +0 -3
- package/script/trellis/_sdk/activity/schemas.d.ts +0 -607
- package/script/trellis/_sdk/activity/schemas.d.ts.map +0 -1
- package/script/trellis/_sdk/activity/schemas.js +0 -36
- package/script/trellis/_sdk/activity/types.d.ts +0 -96
- package/script/trellis/_sdk/activity/types.d.ts.map +0 -1
- package/script/trellis/_sdk/activity/types.js +0 -6
- package/script/trellis/_sdk/auth/_dnt.polyfills.d.ts +0 -12
- package/script/trellis/_sdk/auth/_dnt.polyfills.d.ts.map +0 -1
- package/script/trellis/_sdk/auth/_dnt.polyfills.js +0 -16
- package/script/trellis/_sdk/auth/api.d.ts +0 -10
- package/script/trellis/_sdk/auth/api.d.ts.map +0 -1
- package/script/trellis/_sdk/auth/api.js +0 -379
- package/script/trellis/_sdk/auth/contract.d.ts +0 -28
- package/script/trellis/_sdk/auth/contract.d.ts.map +0 -1
- package/script/trellis/_sdk/auth/contract.js +0 -86
- package/script/trellis/_sdk/auth/mod.d.ts +0 -7
- package/script/trellis/_sdk/auth/mod.d.ts.map +0 -1
- package/script/trellis/_sdk/auth/mod.js +0 -31
- package/script/trellis/_sdk/auth/package.json +0 -3
- package/script/trellis/_sdk/auth/schemas.d.ts +0 -10110
- package/script/trellis/_sdk/auth/schemas.d.ts.map +0 -1
- package/script/trellis/_sdk/auth/schemas.js +0 -328
- package/script/trellis/_sdk/auth/types.d.ts +0 -1382
- package/script/trellis/_sdk/auth/types.d.ts.map +0 -1
- package/script/trellis/_sdk/auth/types.js +0 -6
- package/script/trellis/_sdk/core/_dnt.polyfills.d.ts +0 -12
- package/script/trellis/_sdk/core/_dnt.polyfills.d.ts.map +0 -1
- package/script/trellis/_sdk/core/_dnt.polyfills.js +0 -16
- package/script/trellis/_sdk/core/api.d.ts +0 -10
- package/script/trellis/_sdk/core/api.d.ts.map +0 -1
- package/script/trellis/_sdk/core/api.js +0 -39
- package/script/trellis/_sdk/core/contract.d.ts +0 -8
- package/script/trellis/_sdk/core/contract.d.ts.map +0 -1
- package/script/trellis/_sdk/core/contract.js +0 -62
- package/script/trellis/_sdk/core/mod.d.ts +0 -7
- package/script/trellis/_sdk/core/mod.d.ts.map +0 -1
- package/script/trellis/_sdk/core/mod.js +0 -30
- package/script/trellis/_sdk/core/package.json +0 -3
- package/script/trellis/_sdk/core/schemas.d.ts +0 -1266
- package/script/trellis/_sdk/core/schemas.d.ts.map +0 -1
- package/script/trellis/_sdk/core/schemas.js +0 -31
- package/script/trellis/_sdk/core/types.d.ts +0 -193
- package/script/trellis/_sdk/core/types.d.ts.map +0 -1
- package/script/trellis/_sdk/core/types.js +0 -6
- package/script/trellis/_sdk/state/_dnt.polyfills.d.ts +0 -12
- package/script/trellis/_sdk/state/_dnt.polyfills.d.ts.map +0 -1
- package/script/trellis/_sdk/state/_dnt.polyfills.js +0 -16
- package/script/trellis/_sdk/state/api.d.ts +0 -10
- package/script/trellis/_sdk/state/api.d.ts.map +0 -1
- package/script/trellis/_sdk/state/api.js +0 -74
- package/script/trellis/_sdk/state/contract.d.ts +0 -8
- package/script/trellis/_sdk/state/contract.d.ts.map +0 -1
- package/script/trellis/_sdk/state/contract.js +0 -62
- package/script/trellis/_sdk/state/mod.d.ts +0 -7
- package/script/trellis/_sdk/state/mod.d.ts.map +0 -1
- package/script/trellis/_sdk/state/mod.js +0 -30
- package/script/trellis/_sdk/state/package.json +0 -3
- package/script/trellis/_sdk/state/schemas.d.ts +0 -1437
- package/script/trellis/_sdk/state/schemas.d.ts.map +0 -1
- package/script/trellis/_sdk/state/schemas.js +0 -65
- package/script/trellis/_sdk/state/types.d.ts +0 -206
- package/script/trellis/_sdk/state/types.d.ts.map +0 -1
- package/script/trellis/_sdk/state/types.js +0 -6
- package/script/trellis/auth.d.ts +0 -2
- package/script/trellis/auth.d.ts.map +0 -1
- package/script/trellis/auth.js +0 -17
- package/script/trellis/client.d.ts.map +0 -1
- package/script/trellis/client.js +0 -67
- package/script/trellis/client_connect.d.ts +0 -53
- package/script/trellis/client_connect.d.ts.map +0 -1
- package/script/trellis/client_connect.js +0 -304
- package/script/trellis/codec.d.ts.map +0 -1
- package/script/trellis/codec.js +0 -80
- package/script/trellis/contract.d.ts +0 -20
- package/script/trellis/contract.d.ts.map +0 -1
- package/script/trellis/contract.js +0 -7
- package/script/trellis/contracts.d.ts +0 -4
- package/script/trellis/contracts.d.ts.map +0 -1
- package/script/trellis/contracts.js +0 -20
- package/script/trellis/device.d.ts +0 -41
- package/script/trellis/device.d.ts.map +0 -1
- package/script/trellis/device.js +0 -213
- package/script/trellis/errors/AuthError.d.ts +0 -30
- package/script/trellis/errors/AuthError.d.ts.map +0 -1
- package/script/trellis/errors/AuthError.js +0 -83
- package/script/trellis/errors/KVError.d.ts.map +0 -1
- package/script/trellis/errors/KVError.js +0 -53
- package/script/trellis/errors/RemoteError.d.ts +0 -47
- package/script/trellis/errors/RemoteError.d.ts.map +0 -1
- package/script/trellis/errors/RemoteError.js +0 -87
- package/script/trellis/errors/StoreError.d.ts.map +0 -1
- package/script/trellis/errors/StoreError.js +0 -48
- package/script/trellis/errors/TransferError.d.ts.map +0 -1
- package/script/trellis/errors/TransferError.js +0 -48
- package/script/trellis/errors/TrellisError.d.ts +0 -16
- package/script/trellis/errors/TrellisError.d.ts.map +0 -1
- package/script/trellis/errors/TrellisError.js +0 -19
- package/script/trellis/errors/ValidationError.d.ts.map +0 -1
- package/script/trellis/errors/ValidationError.js +0 -84
- package/script/trellis/errors/index.d.ts +0 -46
- package/script/trellis/errors/index.d.ts.map +0 -1
- package/script/trellis/errors/index.js +0 -52
- package/script/trellis/globals.d.ts.map +0 -1
- package/script/trellis/helpers.d.ts +0 -12
- package/script/trellis/helpers.d.ts.map +0 -1
- package/script/trellis/helpers.js +0 -54
- package/script/trellis/index.d.ts +0 -24
- package/script/trellis/index.d.ts.map +0 -1
- package/script/trellis/index.js +0 -70
- package/script/trellis/kv.d.ts.map +0 -1
- package/script/trellis/kv.js +0 -383
- package/script/trellis/models/trellis/TrellisError.d.ts +0 -57
- package/script/trellis/models/trellis/TrellisError.d.ts.map +0 -1
- package/script/trellis/models/trellis/TrellisError.js +0 -26
- package/script/trellis/operations.d.ts +0 -81
- package/script/trellis/operations.d.ts.map +0 -1
- package/script/trellis/operations.js +0 -212
- package/script/trellis/runtime_transport.d.ts +0 -12
- package/script/trellis/runtime_transport.d.ts.map +0 -1
- package/script/trellis/runtime_transport.js +0 -37
- package/script/trellis/sdk/core.d.ts +0 -3
- package/script/trellis/sdk/core.d.ts.map +0 -1
- package/script/trellis/sdk/core.js +0 -20
- package/script/trellis/store.d.ts +0 -51
- package/script/trellis/store.d.ts.map +0 -1
- package/script/trellis/store.js +0 -316
- package/script/trellis/tasks.d.ts.map +0 -1
- package/script/trellis/tasks.js +0 -45
- package/script/trellis/tracing.d.ts +0 -4
- package/script/trellis/tracing.d.ts.map +0 -1
- package/script/trellis/tracing.js +0 -46
- package/script/trellis/transfer.d.ts +0 -118
- package/script/trellis/transfer.d.ts.map +0 -1
- package/script/trellis/transfer.js +0 -367
- package/script/trellis/trellis.d.ts +0 -210
- package/script/trellis/trellis.d.ts.map +0 -1
- package/script/trellis/trellis.js +0 -948
- /package/esm/{trellis/client.d.ts → client.d.ts} +0 -0
- /package/esm/{trellis/client.js → client.js} +0 -0
- /package/esm/{trellis/codec.d.ts → codec.d.ts} +0 -0
- /package/esm/{trellis/codec.js → codec.js} +0 -0
- /package/esm/{contracts → contract_support}/canonical.d.ts +0 -0
- /package/esm/{contracts → contract_support}/canonical.js +0 -0
- /package/esm/{contracts → contract_support}/protocol.d.ts +0 -0
- /package/esm/{contracts → contract_support}/runtime.js +0 -0
- /package/esm/{contracts → contract_support}/schema_pointers.d.ts +0 -0
- /package/esm/{contracts → contract_support}/schema_pointers.js +0 -0
- /package/esm/{trellis/errors → errors}/KVError.d.ts +0 -0
- /package/esm/{trellis/errors → errors}/KVError.js +0 -0
- /package/esm/{trellis/errors → errors}/StoreError.d.ts +0 -0
- /package/esm/{trellis/errors → errors}/StoreError.js +0 -0
- /package/esm/{trellis/errors → errors}/TransferError.d.ts +0 -0
- /package/esm/{trellis/errors → errors}/TransferError.js +0 -0
- /package/esm/{trellis/errors → errors}/TrellisError.d.ts +0 -0
- /package/esm/{trellis/errors → errors}/TrellisError.js +0 -0
- /package/esm/{trellis/errors → errors}/ValidationError.d.ts +0 -0
- /package/esm/{trellis/errors → errors}/ValidationError.js +0 -0
- /package/esm/{trellis/globals.d.ts → globals.d.ts} +0 -0
- /package/esm/{trellis/globals.js → globals.js} +0 -0
- /package/esm/{trellis/kv.d.ts → kv.d.ts} +0 -0
- /package/esm/{trellis/kv.js → kv.js} +0 -0
- /package/esm/{trellis/server_logger.d.ts → server_logger.d.ts} +0 -0
- /package/esm/{trellis/server_logger.js → server_logger.js} +0 -0
- /package/esm/{trellis/tasks.d.ts → tasks.d.ts} +0 -0
- /package/esm/{trellis/tasks.js → tasks.js} +0 -0
- /package/{esm/trellis/_sdk/activity → script/generated/js/sdks/trellis-core}/api.d.ts +0 -0
- /package/script/{auth → js/packages/trellis/auth}/browser/portal.d.ts +0 -0
- /package/script/{auth → js/packages/trellis/auth}/browser/session.d.ts +0 -0
- /package/script/{auth → js/packages/trellis/auth}/browser/storage.d.ts +0 -0
- /package/script/{auth → js/packages/trellis/auth}/browser/storage.js +0 -0
- /package/script/{auth → js/packages/trellis/auth}/keys.d.ts +0 -0
- /package/script/{auth → js/packages/trellis/auth}/proof.d.ts +0 -0
- /package/script/{auth → js/packages/trellis/auth}/trellis_id.d.ts +0 -0
- /package/script/{auth → js/packages/trellis/auth}/types.d.ts +0 -0
- /package/script/{auth → js/packages/trellis/auth}/types.js +0 -0
- /package/script/{auth → js/packages/trellis/auth}/utils.d.ts +0 -0
- /package/script/{auth → js/packages/trellis/auth}/utils.js +0 -0
- /package/script/{trellis → js/packages/trellis}/client.d.ts +0 -0
- /package/script/{trellis → js/packages/trellis}/codec.d.ts +0 -0
- /package/script/{contracts → js/packages/trellis/contract_support}/canonical.d.ts +0 -0
- /package/script/{contracts → js/packages/trellis/contract_support}/canonical.js +0 -0
- /package/script/{contracts → js/packages/trellis/contract_support}/protocol.d.ts +0 -0
- /package/script/{contracts → js/packages/trellis/contract_support}/runtime.js +0 -0
- /package/script/{contracts → js/packages/trellis/contract_support}/schema_pointers.d.ts +0 -0
- /package/script/{contracts → js/packages/trellis/contract_support}/schema_pointers.js +0 -0
- /package/script/{trellis → js/packages/trellis}/errors/KVError.d.ts +0 -0
- /package/script/{trellis → js/packages/trellis}/errors/StoreError.d.ts +0 -0
- /package/script/{trellis → js/packages/trellis}/errors/TransferError.d.ts +0 -0
- /package/script/{trellis → js/packages/trellis}/errors/ValidationError.d.ts +0 -0
- /package/script/{trellis → js/packages/trellis}/globals.d.ts +0 -0
- /package/script/{trellis → js/packages/trellis}/globals.js +0 -0
- /package/script/{trellis → js/packages/trellis}/kv.d.ts +0 -0
- /package/script/{trellis/_sdk/activity → js/packages/trellis/npm/src}/_dnt.polyfills.js +0 -0
- /package/script/{telemetry → js/packages/trellis/npm/src/telemetry}/carrier.d.ts +0 -0
- /package/script/{telemetry → js/packages/trellis/npm/src/telemetry}/carrier.js +0 -0
- /package/script/{telemetry → js/packages/trellis/npm/src/telemetry}/core.d.ts +0 -0
- /package/script/{telemetry → js/packages/trellis/npm/src/telemetry}/core.js +0 -0
- /package/script/{telemetry → js/packages/trellis/npm/src/telemetry}/env.d.ts +0 -0
- /package/script/{telemetry → js/packages/trellis/npm/src/telemetry}/nats.js +0 -0
- /package/script/{telemetry → js/packages/trellis/npm/src/telemetry}/result.d.ts +0 -0
- /package/script/{telemetry → js/packages/trellis/npm/src/telemetry}/result.js +0 -0
- /package/script/{telemetry → js/packages/trellis/npm/src/telemetry}/runtime.d.ts +0 -0
- /package/script/{telemetry → js/packages/trellis/npm/src/telemetry}/trace.d.ts +0 -0
- /package/script/{trellis → js/packages/trellis}/tasks.d.ts +0 -0
- /package/script/{telemetry → js/packages/trellis/telemetry}/env.js +0 -0
- /package/script/{telemetry → js/packages/trellis/telemetry}/init.d.ts +0 -0
- /package/script/{telemetry → js/packages/trellis/telemetry}/mod.d.ts +0 -0
- /package/script/{telemetry → js/packages/trellis/telemetry}/nats.d.ts +0 -0
- /package/script/{telemetry → js/packages/trellis/telemetry}/trellis.d.ts +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StoreError = exports.RemoteError = exports.KVError = exports.AuthError = exports.TrellisDevice = exports.TrellisClient = exports.Result = exports.ok = exports.isOk = exports.isErr = exports.err = exports.defineServiceContract = exports.definePortalContract = exports.defineDeviceContract = exports.defineCliContract = exports.defineAppContract = exports.defineError = exports.HealthRpcSchema = exports.HealthResponseSchema = exports.HealthInfoSchema = exports.HealthCheckResultSchema = exports.HealthHeartbeatServiceSchema = exports.HealthHeartbeatSchema = exports.HealthHeartbeatHeaderSchema = exports.ServiceHealth = exports.runServiceHealthCheck = exports.runHealthCheck = exports.runAllServiceHealthChecks = exports.runAllHealthChecks = exports.createHealthHeartbeat = exports.unwrapSchema = exports.schema = exports.isJsonValue = exports.digestJson = exports.CONTRACT_FORMAT_V1 = exports.CATALOG_FORMAT_V1 = exports.canonicalizeJson = exports.signBytes = exports.natsConnectSigForBindingToken = exports.loadSessionKey = exports.isBindSuccessResponse = exports.hasSessionKey = exports.getPublicSessionKey = exports.getOrCreateSessionKey = exports.generateSessionKey = exports.createRpcProof = exports.createAuth = exports.clearSessionKey = exports.bindSession = exports.bindFlow = void 0;
|
|
4
|
+
exports.Trellis = exports.OperationRef = exports.OperationInvoker = exports.controlSubject = exports.FileInfoSchema = exports.TypedStoreEntry = exports.TypedStore = exports.TypedKVEntry = exports.TypedKV = exports.ValidationError = exports.UnexpectedError = exports.TrellisError = exports.TransferError = void 0;
|
|
5
|
+
require("./_dnt.polyfills.js");
|
|
6
|
+
var auth_js_1 = require("./auth.js");
|
|
7
|
+
Object.defineProperty(exports, "bindFlow", { enumerable: true, get: function () { return auth_js_1.bindFlow; } });
|
|
8
|
+
Object.defineProperty(exports, "bindSession", { enumerable: true, get: function () { return auth_js_1.bindSession; } });
|
|
9
|
+
Object.defineProperty(exports, "clearSessionKey", { enumerable: true, get: function () { return auth_js_1.clearSessionKey; } });
|
|
10
|
+
Object.defineProperty(exports, "createAuth", { enumerable: true, get: function () { return auth_js_1.createAuth; } });
|
|
11
|
+
Object.defineProperty(exports, "createRpcProof", { enumerable: true, get: function () { return auth_js_1.createRpcProof; } });
|
|
12
|
+
Object.defineProperty(exports, "generateSessionKey", { enumerable: true, get: function () { return auth_js_1.generateSessionKey; } });
|
|
13
|
+
Object.defineProperty(exports, "getOrCreateSessionKey", { enumerable: true, get: function () { return auth_js_1.getOrCreateSessionKey; } });
|
|
14
|
+
Object.defineProperty(exports, "getPublicSessionKey", { enumerable: true, get: function () { return auth_js_1.getPublicSessionKey; } });
|
|
15
|
+
Object.defineProperty(exports, "hasSessionKey", { enumerable: true, get: function () { return auth_js_1.hasSessionKey; } });
|
|
16
|
+
Object.defineProperty(exports, "isBindSuccessResponse", { enumerable: true, get: function () { return auth_js_1.isBindSuccessResponse; } });
|
|
17
|
+
Object.defineProperty(exports, "loadSessionKey", { enumerable: true, get: function () { return auth_js_1.loadSessionKey; } });
|
|
18
|
+
Object.defineProperty(exports, "natsConnectSigForBindingToken", { enumerable: true, get: function () { return auth_js_1.natsConnectSigForBindingToken; } });
|
|
19
|
+
Object.defineProperty(exports, "signBytes", { enumerable: true, get: function () { return auth_js_1.signBytes; } });
|
|
20
|
+
var contracts_js_1 = require("./contracts.js");
|
|
21
|
+
Object.defineProperty(exports, "canonicalizeJson", { enumerable: true, get: function () { return contracts_js_1.canonicalizeJson; } });
|
|
22
|
+
Object.defineProperty(exports, "CATALOG_FORMAT_V1", { enumerable: true, get: function () { return contracts_js_1.CATALOG_FORMAT_V1; } });
|
|
23
|
+
Object.defineProperty(exports, "CONTRACT_FORMAT_V1", { enumerable: true, get: function () { return contracts_js_1.CONTRACT_FORMAT_V1; } });
|
|
24
|
+
Object.defineProperty(exports, "digestJson", { enumerable: true, get: function () { return contracts_js_1.digestJson; } });
|
|
25
|
+
Object.defineProperty(exports, "isJsonValue", { enumerable: true, get: function () { return contracts_js_1.isJsonValue; } });
|
|
26
|
+
Object.defineProperty(exports, "schema", { enumerable: true, get: function () { return contracts_js_1.schema; } });
|
|
27
|
+
Object.defineProperty(exports, "unwrapSchema", { enumerable: true, get: function () { return contracts_js_1.unwrapSchema; } });
|
|
28
|
+
var health_js_1 = require("./health.js");
|
|
29
|
+
Object.defineProperty(exports, "createHealthHeartbeat", { enumerable: true, get: function () { return health_js_1.createHealthHeartbeat; } });
|
|
30
|
+
Object.defineProperty(exports, "runAllHealthChecks", { enumerable: true, get: function () { return health_js_1.runAllHealthChecks; } });
|
|
31
|
+
Object.defineProperty(exports, "runAllServiceHealthChecks", { enumerable: true, get: function () { return health_js_1.runAllServiceHealthChecks; } });
|
|
32
|
+
Object.defineProperty(exports, "runHealthCheck", { enumerable: true, get: function () { return health_js_1.runHealthCheck; } });
|
|
33
|
+
Object.defineProperty(exports, "runServiceHealthCheck", { enumerable: true, get: function () { return health_js_1.runServiceHealthCheck; } });
|
|
34
|
+
Object.defineProperty(exports, "ServiceHealth", { enumerable: true, get: function () { return health_js_1.ServiceHealth; } });
|
|
35
|
+
Object.defineProperty(exports, "HealthHeartbeatHeaderSchema", { enumerable: true, get: function () { return health_js_1.HealthHeartbeatHeaderSchema; } });
|
|
36
|
+
Object.defineProperty(exports, "HealthHeartbeatSchema", { enumerable: true, get: function () { return health_js_1.HealthHeartbeatSchema; } });
|
|
37
|
+
Object.defineProperty(exports, "HealthHeartbeatServiceSchema", { enumerable: true, get: function () { return health_js_1.HealthHeartbeatServiceSchema; } });
|
|
38
|
+
Object.defineProperty(exports, "HealthCheckResultSchema", { enumerable: true, get: function () { return health_js_1.HealthCheckResultSchema; } });
|
|
39
|
+
Object.defineProperty(exports, "HealthInfoSchema", { enumerable: true, get: function () { return health_js_1.HealthInfoSchema; } });
|
|
40
|
+
Object.defineProperty(exports, "HealthResponseSchema", { enumerable: true, get: function () { return health_js_1.HealthResponseSchema; } });
|
|
41
|
+
Object.defineProperty(exports, "HealthRpcSchema", { enumerable: true, get: function () { return health_js_1.HealthRpcSchema; } });
|
|
42
|
+
var mod_js_1 = require("./contract_support/mod.js");
|
|
43
|
+
Object.defineProperty(exports, "defineError", { enumerable: true, get: function () { return mod_js_1.defineError; } });
|
|
44
|
+
var contract_js_1 = require("./contract.js");
|
|
45
|
+
Object.defineProperty(exports, "defineAppContract", { enumerable: true, get: function () { return contract_js_1.defineAppContract; } });
|
|
46
|
+
Object.defineProperty(exports, "defineCliContract", { enumerable: true, get: function () { return contract_js_1.defineCliContract; } });
|
|
47
|
+
Object.defineProperty(exports, "defineDeviceContract", { enumerable: true, get: function () { return contract_js_1.defineDeviceContract; } });
|
|
48
|
+
Object.defineProperty(exports, "definePortalContract", { enumerable: true, get: function () { return contract_js_1.definePortalContract; } });
|
|
49
|
+
Object.defineProperty(exports, "defineServiceContract", { enumerable: true, get: function () { return contract_js_1.defineServiceContract; } });
|
|
50
|
+
var result_1 = require("@qlever-llc/result");
|
|
51
|
+
Object.defineProperty(exports, "err", { enumerable: true, get: function () { return result_1.err; } });
|
|
52
|
+
Object.defineProperty(exports, "isErr", { enumerable: true, get: function () { return result_1.isErr; } });
|
|
53
|
+
Object.defineProperty(exports, "isOk", { enumerable: true, get: function () { return result_1.isOk; } });
|
|
54
|
+
Object.defineProperty(exports, "ok", { enumerable: true, get: function () { return result_1.ok; } });
|
|
55
|
+
Object.defineProperty(exports, "Result", { enumerable: true, get: function () { return result_1.Result; } });
|
|
56
|
+
var client_connect_js_1 = require("./client_connect.js");
|
|
57
|
+
Object.defineProperty(exports, "TrellisClient", { enumerable: true, get: function () { return client_connect_js_1.TrellisClient; } });
|
|
58
|
+
var device_js_1 = require("./device.js");
|
|
59
|
+
Object.defineProperty(exports, "TrellisDevice", { enumerable: true, get: function () { return device_js_1.TrellisDevice; } });
|
|
60
|
+
var index_js_1 = require("./errors/index.js");
|
|
61
|
+
Object.defineProperty(exports, "AuthError", { enumerable: true, get: function () { return index_js_1.AuthError; } });
|
|
62
|
+
Object.defineProperty(exports, "KVError", { enumerable: true, get: function () { return index_js_1.KVError; } });
|
|
63
|
+
Object.defineProperty(exports, "RemoteError", { enumerable: true, get: function () { return index_js_1.RemoteError; } });
|
|
64
|
+
Object.defineProperty(exports, "StoreError", { enumerable: true, get: function () { return index_js_1.StoreError; } });
|
|
65
|
+
Object.defineProperty(exports, "TransferError", { enumerable: true, get: function () { return index_js_1.TransferError; } });
|
|
66
|
+
Object.defineProperty(exports, "TrellisError", { enumerable: true, get: function () { return index_js_1.TrellisError; } });
|
|
67
|
+
Object.defineProperty(exports, "UnexpectedError", { enumerable: true, get: function () { return index_js_1.UnexpectedError; } });
|
|
68
|
+
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return index_js_1.ValidationError; } });
|
|
69
|
+
var kv_js_1 = require("./kv.js");
|
|
70
|
+
Object.defineProperty(exports, "TypedKV", { enumerable: true, get: function () { return kv_js_1.TypedKV; } });
|
|
71
|
+
Object.defineProperty(exports, "TypedKVEntry", { enumerable: true, get: function () { return kv_js_1.TypedKVEntry; } });
|
|
72
|
+
var store_js_1 = require("./store.js");
|
|
73
|
+
Object.defineProperty(exports, "TypedStore", { enumerable: true, get: function () { return store_js_1.TypedStore; } });
|
|
74
|
+
Object.defineProperty(exports, "TypedStoreEntry", { enumerable: true, get: function () { return store_js_1.TypedStoreEntry; } });
|
|
75
|
+
var transfer_js_1 = require("./transfer.js");
|
|
76
|
+
Object.defineProperty(exports, "FileInfoSchema", { enumerable: true, get: function () { return transfer_js_1.FileInfoSchema; } });
|
|
77
|
+
var operations_js_1 = require("./operations.js");
|
|
78
|
+
Object.defineProperty(exports, "controlSubject", { enumerable: true, get: function () { return operations_js_1.controlSubject; } });
|
|
79
|
+
Object.defineProperty(exports, "OperationInvoker", { enumerable: true, get: function () { return operations_js_1.OperationInvoker; } });
|
|
80
|
+
Object.defineProperty(exports, "OperationRef", { enumerable: true, get: function () { return operations_js_1.OperationRef; } });
|
|
81
|
+
var trellis_js_1 = require("./trellis.js");
|
|
82
|
+
Object.defineProperty(exports, "Trellis", { enumerable: true, get: function () { return trellis_js_1.Trellis; } });
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type KV, type KvEntry } from "@nats-io/kv";
|
|
2
|
+
import type { NatsConnection } from "@nats-io/nats-core/internal";
|
|
3
|
+
import { Result } from "@qlever-llc/result";
|
|
4
|
+
import type { StaticDecode, TSchema } from "typebox";
|
|
5
|
+
import { KVError, ValidationError } from "./errors/index.js";
|
|
6
|
+
/**
|
|
7
|
+
* Represents a watch event emitted when a KV entry changes.
|
|
8
|
+
*/
|
|
9
|
+
export type WatchEvent<S extends TSchema> = {
|
|
10
|
+
/** The type of change: "update" for new/modified values, "delete" for deletions */
|
|
11
|
+
type: "update" | "delete";
|
|
12
|
+
/** The key that changed */
|
|
13
|
+
key: string;
|
|
14
|
+
/** The new value (only present for update events) */
|
|
15
|
+
value?: StaticDecode<S>;
|
|
16
|
+
/** The revision number of this change */
|
|
17
|
+
revision: number;
|
|
18
|
+
/** The timestamp when this change occurred */
|
|
19
|
+
timestamp: Date;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Options for the watch() method.
|
|
23
|
+
*/
|
|
24
|
+
export type WatchOptions = {
|
|
25
|
+
/** If true, include delete events in the watch stream. Defaults to false. */
|
|
26
|
+
includeDeletes?: boolean;
|
|
27
|
+
};
|
|
28
|
+
export declare class TypedKV<S extends TSchema> {
|
|
29
|
+
readonly schema: S;
|
|
30
|
+
readonly kv: KV;
|
|
31
|
+
private constructor();
|
|
32
|
+
private static fromParts;
|
|
33
|
+
static open<S extends TSchema>(nats: NatsConnection, name: string, schema: S, options: {
|
|
34
|
+
history?: number;
|
|
35
|
+
ttl?: number;
|
|
36
|
+
bindOnly?: boolean;
|
|
37
|
+
maxValueBytes?: number;
|
|
38
|
+
}): Promise<Result<TypedKV<S>, KVError>>;
|
|
39
|
+
get(key: string): Promise<Result<TypedKVEntry<S>, KVError | ValidationError>>;
|
|
40
|
+
private serialize;
|
|
41
|
+
create(key: string, value: unknown): Promise<Result<void, KVError>>;
|
|
42
|
+
put(key: string, value: unknown): Promise<Result<void, KVError>>;
|
|
43
|
+
delete(key: string): Promise<Result<void, KVError>>;
|
|
44
|
+
keys(filter?: string | string[]): Promise<Result<AsyncIterable<string>, KVError>>;
|
|
45
|
+
status(): Promise<Result<{
|
|
46
|
+
values: number;
|
|
47
|
+
}, KVError>>;
|
|
48
|
+
}
|
|
49
|
+
export declare class TypedKVEntry<S extends TSchema> {
|
|
50
|
+
#private;
|
|
51
|
+
private schema;
|
|
52
|
+
private kv;
|
|
53
|
+
private entry;
|
|
54
|
+
constructor(schema: S, kv: KV, entry: KvEntry, value: unknown);
|
|
55
|
+
get value(): StaticDecode<S>;
|
|
56
|
+
static create<S extends TSchema>(schema: S, kv: KV, entry: KvEntry): Promise<Result<TypedKVEntry<S>, ValidationError>>;
|
|
57
|
+
get key(): string;
|
|
58
|
+
get revision(): number;
|
|
59
|
+
get createdAt(): Date;
|
|
60
|
+
/**
|
|
61
|
+
* Watch this KV entry for changes.
|
|
62
|
+
*
|
|
63
|
+
* @param callback - Function called when the entry changes
|
|
64
|
+
* @param opts - Watch options (e.g., includeDeletes)
|
|
65
|
+
* @returns A function to stop watching
|
|
66
|
+
*/
|
|
67
|
+
watch(callback: (event: WatchEvent<S>) => void, opts?: WatchOptions): Promise<() => void>;
|
|
68
|
+
merge(value: unknown, vcc?: boolean): Promise<Result<void, KVError | ValidationError>>;
|
|
69
|
+
put(value: unknown, vcc?: boolean): Promise<Result<void, KVError>>;
|
|
70
|
+
delete(vcc?: boolean): Promise<Result<void, KVError>>;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=kv.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kv.d.ts","sourceRoot":"","sources":["../../../../../../src/kv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,OAAO,EAAO,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAsD7D;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,OAAO,IAAI;IAC1C,mFAAmF;IACnF,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,qDAAqD;IACrD,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACxB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,SAAS,EAAE,IAAI,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,qBAAa,OAAO,CAAC,CAAC,SAAS,OAAO;IAElC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,EAAE,EAAE;IAFjB,OAAO;IAKP,OAAO,CAAC,MAAM,CAAC,SAAS;WAIX,IAAI,CAAC,CAAC,SAAS,OAAO,EACjC,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,CAAC,EACT,OAAO,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,GACA,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAkBjC,GAAG,CACP,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC,CAAC;IAqB9D,OAAO,CAAC,SAAS;IAIX,MAAM,CACV,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAW3B,GAAG,CACP,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAW3B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAWnD,IAAI,CACR,MAAM,GAAE,MAAM,GAAG,MAAM,EAAQ,GAC9B,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;IAU5C,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,CAAC,CAAC;CAQ7D;AAED,qBAAa,YAAY,CAAC,CAAC,SAAS,OAAO;;IAIvC,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,EAAE;IACV,OAAO,CAAC,KAAK;gBAFL,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,OAAO,EACtB,KAAK,EAAE,OAAO;IAKhB,IAAI,KAAK,IAAI,YAAY,CAAC,CAAC,CAAC,CAE3B;WAEY,MAAM,CAAC,CAAC,SAAS,OAAO,EACnC,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;IAKpD,IAAI,GAAG,WAEN;IAED,IAAI,QAAQ,WAEX;IAED,IAAI,SAAS,SAEZ;IAED;;;;;;OAMG;IACG,KAAK,CACT,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,EACxC,IAAI,CAAC,EAAE,YAAY,GAClB,OAAO,CAAC,MAAM,IAAI,CAAC;IAsDhB,KAAK,CACT,KAAK,EAAE,OAAO,EACd,GAAG,CAAC,EAAE,OAAO,GACZ,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,GAAG,eAAe,CAAC,CAAC;IAgB7C,GAAG,CACP,KAAK,EAAE,OAAO,EACd,GAAG,CAAC,EAAE,OAAO,GACZ,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAc3B,MAAM,CAAC,GAAG,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;CAY5D"}
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
26
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
27
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
28
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
29
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
30
|
+
};
|
|
31
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
32
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
33
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
34
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
35
|
+
};
|
|
36
|
+
var _TypedKVEntry_value;
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.TypedKVEntry = exports.TypedKV = void 0;
|
|
39
|
+
const kv_1 = require("@nats-io/kv");
|
|
40
|
+
const result_1 = require("@qlever-llc/result");
|
|
41
|
+
const value_1 = __importStar(require("typebox/value"));
|
|
42
|
+
const index_js_1 = require("./errors/index.js");
|
|
43
|
+
const helpers_js_1 = require("./helpers.js");
|
|
44
|
+
function externalizeValue(value) {
|
|
45
|
+
if (value instanceof Date) {
|
|
46
|
+
return value.toISOString();
|
|
47
|
+
}
|
|
48
|
+
if (Array.isArray(value)) {
|
|
49
|
+
return value.map(externalizeValue);
|
|
50
|
+
}
|
|
51
|
+
if (value !== null && typeof value === "object") {
|
|
52
|
+
const out = {};
|
|
53
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
54
|
+
if (entry !== undefined) {
|
|
55
|
+
out[key] = externalizeValue(entry);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return out;
|
|
59
|
+
}
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
function parseExternalValue(schema, value) {
|
|
63
|
+
if (value_1.default.HasCodec(schema)) {
|
|
64
|
+
return value_1.default.Decode(schema, value);
|
|
65
|
+
}
|
|
66
|
+
return value_1.default.Parse(schema, value);
|
|
67
|
+
}
|
|
68
|
+
function serializeValue(schema, value) {
|
|
69
|
+
return JSON.stringify(value_1.default.Parse(schema, externalizeValue(value)));
|
|
70
|
+
}
|
|
71
|
+
function serializeExternalValue(schema, value) {
|
|
72
|
+
return serializeValue(schema, value);
|
|
73
|
+
}
|
|
74
|
+
function isPlainObject(value) {
|
|
75
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
76
|
+
}
|
|
77
|
+
function mergeUnknown(target, source) {
|
|
78
|
+
if (!isPlainObject(target) || !isPlainObject(source)) {
|
|
79
|
+
return source;
|
|
80
|
+
}
|
|
81
|
+
const out = { ...target };
|
|
82
|
+
for (const [key, entry] of Object.entries(source)) {
|
|
83
|
+
if (entry === undefined)
|
|
84
|
+
continue;
|
|
85
|
+
out[key] = mergeUnknown(target[key], entry);
|
|
86
|
+
}
|
|
87
|
+
return out;
|
|
88
|
+
}
|
|
89
|
+
class TypedKV {
|
|
90
|
+
constructor(schema, kv) {
|
|
91
|
+
Object.defineProperty(this, "schema", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
configurable: true,
|
|
94
|
+
writable: true,
|
|
95
|
+
value: schema
|
|
96
|
+
});
|
|
97
|
+
Object.defineProperty(this, "kv", {
|
|
98
|
+
enumerable: true,
|
|
99
|
+
configurable: true,
|
|
100
|
+
writable: true,
|
|
101
|
+
value: kv
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
static fromParts(schema, kv) {
|
|
105
|
+
return new TypedKV(schema, kv);
|
|
106
|
+
}
|
|
107
|
+
static async open(nats, name, schema, options) {
|
|
108
|
+
try {
|
|
109
|
+
const kvm = new kv_1.Kvm(nats);
|
|
110
|
+
const kv = options.bindOnly
|
|
111
|
+
? await kvm.open(name)
|
|
112
|
+
: await kvm.create(name, {
|
|
113
|
+
history: options.history ?? 1,
|
|
114
|
+
ttl: options.ttl ?? 0,
|
|
115
|
+
...(options.maxValueBytes ? { maxValueSize: options.maxValueBytes } : {}),
|
|
116
|
+
});
|
|
117
|
+
const typedKv = TypedKV.fromParts(schema, kv);
|
|
118
|
+
return result_1.Result.ok(typedKv);
|
|
119
|
+
}
|
|
120
|
+
catch (cause) {
|
|
121
|
+
return result_1.Result.err(new index_js_1.KVError({ operation: "open", cause }));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
async get(key) {
|
|
125
|
+
let s;
|
|
126
|
+
try {
|
|
127
|
+
s = await this.kv.get((0, helpers_js_1.escapeKvKey)(key));
|
|
128
|
+
}
|
|
129
|
+
catch (cause) {
|
|
130
|
+
return result_1.Result.err(new index_js_1.KVError({ operation: "get", cause, context: { key } }));
|
|
131
|
+
}
|
|
132
|
+
if (!s) {
|
|
133
|
+
return result_1.Result.err(new index_js_1.KVError({
|
|
134
|
+
operation: "get",
|
|
135
|
+
context: { key, reason: "not found" },
|
|
136
|
+
}));
|
|
137
|
+
}
|
|
138
|
+
const result = await createTypedKvEntry(this.schema, this.kv, s);
|
|
139
|
+
return result;
|
|
140
|
+
}
|
|
141
|
+
serialize(value) {
|
|
142
|
+
return serializeExternalValue(this.schema, value);
|
|
143
|
+
}
|
|
144
|
+
async create(key, value) {
|
|
145
|
+
try {
|
|
146
|
+
await this.kv.create((0, helpers_js_1.escapeKvKey)(key), this.serialize(value));
|
|
147
|
+
return result_1.Result.ok(undefined);
|
|
148
|
+
}
|
|
149
|
+
catch (cause) {
|
|
150
|
+
return result_1.Result.err(new index_js_1.KVError({ operation: "create", cause, context: { key } }));
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
async put(key, value) {
|
|
154
|
+
try {
|
|
155
|
+
await this.kv.put((0, helpers_js_1.escapeKvKey)(key), this.serialize(value));
|
|
156
|
+
return result_1.Result.ok(undefined);
|
|
157
|
+
}
|
|
158
|
+
catch (cause) {
|
|
159
|
+
return result_1.Result.err(new index_js_1.KVError({ operation: "put", cause, context: { key } }));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
async delete(key) {
|
|
163
|
+
try {
|
|
164
|
+
await this.kv.delete((0, helpers_js_1.escapeKvKey)(key));
|
|
165
|
+
return result_1.Result.ok(undefined);
|
|
166
|
+
}
|
|
167
|
+
catch (cause) {
|
|
168
|
+
return result_1.Result.err(new index_js_1.KVError({ operation: "delete", cause, context: { key } }));
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
async keys(filter = ">") {
|
|
172
|
+
try {
|
|
173
|
+
return result_1.Result.ok(await this.kv.keys(filter));
|
|
174
|
+
}
|
|
175
|
+
catch (cause) {
|
|
176
|
+
return result_1.Result.err(new index_js_1.KVError({ operation: "keys", cause, context: { filter } }));
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
async status() {
|
|
180
|
+
try {
|
|
181
|
+
const status = await this.kv.status();
|
|
182
|
+
return result_1.Result.ok({ values: status.values });
|
|
183
|
+
}
|
|
184
|
+
catch (cause) {
|
|
185
|
+
return result_1.Result.err(new index_js_1.KVError({ operation: "status", cause }));
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
exports.TypedKV = TypedKV;
|
|
190
|
+
class TypedKVEntry {
|
|
191
|
+
constructor(schema, kv, entry, value) {
|
|
192
|
+
Object.defineProperty(this, "schema", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
configurable: true,
|
|
195
|
+
writable: true,
|
|
196
|
+
value: schema
|
|
197
|
+
});
|
|
198
|
+
Object.defineProperty(this, "kv", {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
configurable: true,
|
|
201
|
+
writable: true,
|
|
202
|
+
value: kv
|
|
203
|
+
});
|
|
204
|
+
Object.defineProperty(this, "entry", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
configurable: true,
|
|
207
|
+
writable: true,
|
|
208
|
+
value: entry
|
|
209
|
+
});
|
|
210
|
+
_TypedKVEntry_value.set(this, void 0);
|
|
211
|
+
__classPrivateFieldSet(this, _TypedKVEntry_value, value, "f");
|
|
212
|
+
}
|
|
213
|
+
get value() {
|
|
214
|
+
return __classPrivateFieldGet(this, _TypedKVEntry_value, "f");
|
|
215
|
+
}
|
|
216
|
+
static async create(schema, kv, entry) {
|
|
217
|
+
const result = await createTypedKvEntry(schema, kv, entry);
|
|
218
|
+
return result;
|
|
219
|
+
}
|
|
220
|
+
get key() {
|
|
221
|
+
return (0, helpers_js_1.decodeSubject)(this.entry.key);
|
|
222
|
+
}
|
|
223
|
+
get revision() {
|
|
224
|
+
return this.entry.revision;
|
|
225
|
+
}
|
|
226
|
+
get createdAt() {
|
|
227
|
+
return this.entry.created;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Watch this KV entry for changes.
|
|
231
|
+
*
|
|
232
|
+
* @param callback - Function called when the entry changes
|
|
233
|
+
* @param opts - Watch options (e.g., includeDeletes)
|
|
234
|
+
* @returns A function to stop watching
|
|
235
|
+
*/
|
|
236
|
+
async watch(callback, opts) {
|
|
237
|
+
const watcher = await this.kv.watch({
|
|
238
|
+
key: this.entry.key,
|
|
239
|
+
include: opts?.includeDeletes ? "history" : "updates",
|
|
240
|
+
});
|
|
241
|
+
const abortController = new AbortController();
|
|
242
|
+
// Start the async iteration in the background
|
|
243
|
+
(async () => {
|
|
244
|
+
for await (const entry of watcher) {
|
|
245
|
+
if (abortController.signal.aborted)
|
|
246
|
+
break;
|
|
247
|
+
if (entry.operation === "DEL" || entry.operation === "PURGE") {
|
|
248
|
+
if (opts?.includeDeletes) {
|
|
249
|
+
callback({
|
|
250
|
+
type: "delete",
|
|
251
|
+
key: (0, helpers_js_1.decodeSubject)(entry.key),
|
|
252
|
+
revision: entry.revision,
|
|
253
|
+
timestamp: entry.created,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
let validated;
|
|
259
|
+
try {
|
|
260
|
+
const json = entry.json();
|
|
261
|
+
validated = parseExternalValue(this.schema, json);
|
|
262
|
+
}
|
|
263
|
+
catch {
|
|
264
|
+
try {
|
|
265
|
+
await this.kv.delete(entry.key, {
|
|
266
|
+
previousSeq: entry.revision,
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
catch {
|
|
270
|
+
// Best-effort cleanup of invalid entries.
|
|
271
|
+
}
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
callback({
|
|
275
|
+
type: "update",
|
|
276
|
+
key: (0, helpers_js_1.decodeSubject)(entry.key),
|
|
277
|
+
value: validated,
|
|
278
|
+
revision: entry.revision,
|
|
279
|
+
timestamp: entry.created,
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
})();
|
|
284
|
+
return () => {
|
|
285
|
+
abortController.abort();
|
|
286
|
+
watcher.stop();
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
async merge(value, vcc) {
|
|
290
|
+
const mergedData = mergeUnknown(__classPrivateFieldGet(this, _TypedKVEntry_value, "f"), value);
|
|
291
|
+
const mergeResult = result_1.Result.try(() => serializeExternalValue(this.schema, mergedData));
|
|
292
|
+
if (mergeResult.isErr()) {
|
|
293
|
+
const cause = mergeResult.error.cause;
|
|
294
|
+
if (cause instanceof value_1.ParseError) {
|
|
295
|
+
const errors = value_1.default.Errors(this.schema, externalizeValue(mergedData));
|
|
296
|
+
return result_1.Result.err(new index_js_1.ValidationError({ errors, cause }));
|
|
297
|
+
}
|
|
298
|
+
return result_1.Result.err(new index_js_1.KVError({ operation: "merge", cause: mergeResult.error, context: { key: this.key } }));
|
|
299
|
+
}
|
|
300
|
+
return this.put(mergedData, vcc);
|
|
301
|
+
}
|
|
302
|
+
async put(value, vcc) {
|
|
303
|
+
const serialized = serializeValue(this.schema, value);
|
|
304
|
+
try {
|
|
305
|
+
await this.kv.put(this.entry.key, serialized, {
|
|
306
|
+
previousSeq: vcc ? this.entry.revision : undefined,
|
|
307
|
+
});
|
|
308
|
+
return result_1.Result.ok(undefined);
|
|
309
|
+
}
|
|
310
|
+
catch (cause) {
|
|
311
|
+
return result_1.Result.err(new index_js_1.KVError({ operation: "put", cause, context: { key: this.key } }));
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
async delete(vcc) {
|
|
315
|
+
try {
|
|
316
|
+
await this.kv.delete(this.entry.key, {
|
|
317
|
+
previousSeq: vcc ? this.entry.revision : undefined,
|
|
318
|
+
});
|
|
319
|
+
return result_1.Result.ok(undefined);
|
|
320
|
+
}
|
|
321
|
+
catch (cause) {
|
|
322
|
+
return result_1.Result.err(new index_js_1.KVError({ operation: "delete", cause, context: { key: this.key } }));
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
exports.TypedKVEntry = TypedKVEntry;
|
|
327
|
+
_TypedKVEntry_value = new WeakMap();
|
|
328
|
+
async function createTypedKvEntry(schema, kv, entry) {
|
|
329
|
+
async function deleteInvalidEntry(reason) {
|
|
330
|
+
try {
|
|
331
|
+
await kv.delete(entry.key, {
|
|
332
|
+
previousSeq: entry.revision,
|
|
333
|
+
});
|
|
334
|
+
return {
|
|
335
|
+
key: (0, helpers_js_1.decodeSubject)(entry.key),
|
|
336
|
+
revision: entry.revision,
|
|
337
|
+
invalidEntryDeleted: true,
|
|
338
|
+
invalidEntryReason: reason,
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
catch (cause) {
|
|
342
|
+
return {
|
|
343
|
+
key: (0, helpers_js_1.decodeSubject)(entry.key),
|
|
344
|
+
revision: entry.revision,
|
|
345
|
+
invalidEntryDeleted: false,
|
|
346
|
+
invalidEntryDeleteError: cause instanceof Error ? cause.message : String(cause),
|
|
347
|
+
invalidEntryReason: reason,
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
const jsonResult = result_1.Result.try(() => entry.json());
|
|
352
|
+
if (jsonResult.isErr()) {
|
|
353
|
+
const context = await deleteInvalidEntry(`decode failed: ${jsonResult.error.message}`);
|
|
354
|
+
return result_1.Result.err(new index_js_1.ValidationError({
|
|
355
|
+
errors: [{ path: "", message: `Failed to decode KV value: ${jsonResult.error.message}` }],
|
|
356
|
+
cause: jsonResult.error,
|
|
357
|
+
context,
|
|
358
|
+
}));
|
|
359
|
+
}
|
|
360
|
+
const json = jsonResult.take();
|
|
361
|
+
const parseResult = result_1.Result.try(() => {
|
|
362
|
+
if (value_1.default.HasCodec(schema)) {
|
|
363
|
+
return value_1.default.Decode(schema, json);
|
|
364
|
+
}
|
|
365
|
+
return value_1.default.Parse(schema, json);
|
|
366
|
+
});
|
|
367
|
+
if (parseResult.isErr()) {
|
|
368
|
+
const cause = parseResult.error.cause;
|
|
369
|
+
if (cause instanceof value_1.ParseError) {
|
|
370
|
+
const errors = value_1.default.Errors(schema, json);
|
|
371
|
+
const context = await deleteInvalidEntry("schema parse failed");
|
|
372
|
+
return result_1.Result.err(new index_js_1.ValidationError({ errors, cause, context }));
|
|
373
|
+
}
|
|
374
|
+
const context = await deleteInvalidEntry(parseResult.error.message);
|
|
375
|
+
return result_1.Result.err(new index_js_1.ValidationError({
|
|
376
|
+
errors: [{ path: "", message: parseResult.error.message }],
|
|
377
|
+
cause: parseResult.error,
|
|
378
|
+
context,
|
|
379
|
+
}));
|
|
380
|
+
}
|
|
381
|
+
const typedEntry = new TypedKVEntry(schema, kv, entry, parseResult.take());
|
|
382
|
+
return result_1.Result.ok(typedEntry);
|
|
383
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Type, { type StaticDecode } from "typebox";
|
|
2
|
+
/**
|
|
3
|
+
* Open transport schema for Trellis RPC error payloads.
|
|
4
|
+
*
|
|
5
|
+
* Error payloads must always carry the base error fields, but service-local contract
|
|
6
|
+
* errors may add arbitrary additional properties. The client validates declared local
|
|
7
|
+
* errors against their contract schema before reconstructing runtime `Error` instances.
|
|
8
|
+
*/
|
|
9
|
+
export declare const TrellisErrorDataSchema: Type.TObject<{
|
|
10
|
+
id: Type.TString;
|
|
11
|
+
type: Type.TString;
|
|
12
|
+
message: Type.TString;
|
|
13
|
+
context: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
|
|
14
|
+
traceId: Type.TOptional<Type.TString>;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Type for validated transport error data.
|
|
18
|
+
*/
|
|
19
|
+
export type TrellisErrorData = StaticDecode<typeof TrellisErrorDataSchema>;
|
|
20
|
+
//# sourceMappingURL=TrellisError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrellisError.d.ts","sourceRoot":"","sources":["../../../../../../../../src/models/trellis/TrellisError.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;EAMD,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TrellisErrorDataSchema = void 0;
|
|
7
|
+
const typebox_1 = __importDefault(require("typebox"));
|
|
8
|
+
/**
|
|
9
|
+
* Open transport schema for Trellis RPC error payloads.
|
|
10
|
+
*
|
|
11
|
+
* Error payloads must always carry the base error fields, but service-local contract
|
|
12
|
+
* errors may add arbitrary additional properties. The client validates declared local
|
|
13
|
+
* errors against their contract schema before reconstructing runtime `Error` instances.
|
|
14
|
+
*/
|
|
15
|
+
exports.TrellisErrorDataSchema = typebox_1.default.Object({
|
|
16
|
+
id: typebox_1.default.String(),
|
|
17
|
+
type: typebox_1.default.String(),
|
|
18
|
+
message: typebox_1.default.String(),
|
|
19
|
+
context: typebox_1.default.Optional(typebox_1.default.Record(typebox_1.default.String(), typebox_1.default.Unknown())),
|
|
20
|
+
traceId: typebox_1.default.Optional(typebox_1.default.String()),
|
|
21
|
+
}, { additionalProperties: true });
|