@qlever-llc/trellis 0.5.1 → 0.6.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 +16 -2
- package/esm/_dnt.polyfills.d.ts +11 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/_dnt.polyfills.js +14 -0
- package/esm/_dnt.shims.d.ts +6 -0
- package/esm/_dnt.shims.d.ts.map +1 -0
- package/esm/_dnt.shims.js +61 -0
- package/esm/auth/browser/login.d.ts +27 -0
- package/esm/auth/browser/login.d.ts.map +1 -0
- package/esm/auth/browser/login.js +94 -0
- package/esm/auth/browser/portal.d.ts +11 -0
- package/esm/auth/browser/portal.d.ts.map +1 -0
- package/esm/auth/browser/portal.js +33 -0
- package/esm/auth/browser/session.d.ts +19 -0
- package/esm/auth/browser/session.d.ts.map +1 -0
- package/esm/auth/browser/session.js +65 -0
- package/esm/auth/browser/storage.d.ts +12 -0
- package/esm/auth/browser/storage.d.ts.map +1 -0
- package/esm/auth/browser/storage.js +61 -0
- package/esm/auth/browser.d.ts +13 -0
- package/esm/auth/browser.d.ts.map +1 -0
- package/esm/auth/browser.js +11 -0
- package/esm/auth/keys.d.ts +5 -0
- package/esm/auth/keys.d.ts.map +1 -0
- package/esm/auth/keys.js +50 -0
- package/esm/auth/mod.d.ts +18 -0
- package/esm/auth/mod.d.ts.map +1 -0
- package/esm/auth/mod.js +17 -0
- package/esm/auth/proof.d.ts +9 -0
- package/esm/auth/proof.d.ts.map +1 -0
- package/esm/auth/proof.js +43 -0
- package/esm/auth/protocol.d.ts +1212 -0
- package/esm/auth/protocol.d.ts.map +1 -0
- package/esm/auth/protocol.js +682 -0
- package/esm/auth/schemas.d.ts +93 -0
- package/esm/auth/schemas.d.ts.map +1 -0
- package/esm/auth/schemas.js +64 -0
- package/esm/auth/session_auth.d.ts +20 -0
- package/esm/auth/session_auth.d.ts.map +1 -0
- package/esm/auth/session_auth.js +42 -0
- package/esm/auth/trellis_id.d.ts +2 -0
- package/esm/auth/trellis_id.d.ts.map +1 -0
- package/esm/auth/trellis_id.js +5 -0
- package/esm/auth/types.d.ts +8 -0
- package/esm/auth/types.d.ts.map +1 -0
- package/esm/auth/types.js +1 -0
- package/esm/auth/utils.d.ts +11 -0
- package/esm/auth/utils.d.ts.map +1 -0
- package/esm/auth/utils.js +68 -0
- package/esm/auth/workload_activation.d.ts +192 -0
- package/esm/auth/workload_activation.d.ts.map +1 -0
- package/esm/auth/workload_activation.js +290 -0
- package/esm/contracts/canonical.d.ts +14 -0
- package/esm/contracts/canonical.d.ts.map +1 -0
- package/esm/contracts/canonical.js +135 -0
- package/esm/contracts/mod.d.ts +462 -0
- package/esm/contracts/mod.d.ts.map +1 -0
- package/esm/contracts/mod.js +532 -0
- package/esm/contracts/protocol.d.ts +301 -0
- package/esm/contracts/protocol.d.ts.map +1 -0
- package/esm/contracts/protocol.js +130 -0
- package/esm/contracts/runtime.d.ts +48 -0
- package/esm/contracts/runtime.d.ts.map +1 -0
- package/esm/contracts/runtime.js +9 -0
- package/esm/contracts/schema_pointers.d.ts +18 -0
- package/esm/contracts/schema_pointers.d.ts.map +1 -0
- package/esm/contracts/schema_pointers.js +59 -0
- package/esm/server/deno.d.ts +7 -0
- package/esm/server/deno.d.ts.map +1 -0
- package/esm/server/deno.js +16 -0
- package/esm/server/health.d.ts +92 -0
- package/esm/server/health.d.ts.map +1 -0
- package/esm/server/health.js +74 -0
- package/esm/server/health_rpc.d.ts +16 -0
- package/esm/server/health_rpc.d.ts.map +1 -0
- package/esm/server/health_rpc.js +23 -0
- package/esm/server/health_schemas.d.ts +20 -0
- package/esm/server/health_schemas.d.ts.map +1 -0
- package/esm/server/health_schemas.js +18 -0
- package/esm/server/mod.d.ts +17 -0
- package/esm/server/mod.d.ts.map +1 -0
- package/esm/server/mod.js +17 -0
- package/esm/server/node.d.ts +7 -0
- package/esm/server/node.d.ts.map +1 -0
- package/esm/server/node.js +16 -0
- package/esm/server/runtime.d.ts +16 -0
- package/esm/server/runtime.d.ts.map +1 -0
- package/esm/server/runtime.js +1 -0
- package/esm/server/service.d.ts +121 -0
- package/esm/server/service.d.ts.map +1 -0
- package/esm/server/service.js +256 -0
- package/esm/server/subscription.d.ts +99 -0
- package/esm/server/subscription.d.ts.map +1 -0
- package/esm/server/subscription.js +25 -0
- package/esm/telemetry/carrier.d.ts +9 -0
- package/esm/telemetry/carrier.d.ts.map +1 -0
- package/esm/telemetry/carrier.js +20 -0
- package/esm/telemetry/core.d.ts +8 -0
- package/esm/telemetry/core.d.ts.map +1 -0
- package/esm/telemetry/core.js +14 -0
- package/esm/telemetry/env.d.ts +2 -0
- package/esm/telemetry/env.d.ts.map +1 -0
- package/esm/telemetry/env.js +10 -0
- package/esm/telemetry/mod.d.ts +11 -0
- package/esm/telemetry/mod.d.ts.map +1 -0
- package/esm/telemetry/mod.js +7 -0
- package/esm/telemetry/nats.d.ts +7 -0
- package/esm/telemetry/nats.d.ts.map +1 -0
- package/esm/telemetry/nats.js +6 -0
- package/esm/telemetry/result.d.ts +2 -0
- package/esm/telemetry/result.d.ts.map +1 -0
- package/esm/telemetry/result.js +18 -0
- package/esm/telemetry/runtime.d.ts +2 -0
- package/esm/telemetry/runtime.d.ts.map +1 -0
- package/esm/telemetry/runtime.js +53 -0
- package/esm/telemetry/trace.d.ts +5 -0
- package/esm/telemetry/trace.d.ts.map +1 -0
- package/esm/telemetry/trace.js +26 -0
- package/esm/telemetry/trellis.d.ts +3 -0
- package/esm/telemetry/trellis.d.ts.map +1 -0
- package/esm/telemetry/trellis.js +7 -0
- package/esm/trellis/_sdk/activity/_dnt.polyfills.d.ts +12 -0
- package/esm/trellis/_sdk/activity/_dnt.polyfills.d.ts.map +1 -0
- package/esm/trellis/_sdk/activity/_dnt.polyfills.js +15 -0
- package/esm/trellis/_sdk/activity/api.d.ts +10 -0
- package/esm/trellis/_sdk/activity/api.d.ts.map +1 -0
- package/esm/trellis/_sdk/activity/api.js +43 -0
- package/esm/trellis/_sdk/activity/contract.d.ts +8 -0
- package/esm/trellis/_sdk/activity/contract.d.ts.map +1 -0
- package/esm/trellis/_sdk/activity/contract.js +59 -0
- package/esm/trellis/_sdk/activity/mod.d.ts +7 -0
- package/esm/trellis/_sdk/activity/mod.d.ts.map +1 -0
- package/esm/trellis/_sdk/activity/mod.js +5 -0
- package/esm/trellis/_sdk/activity/package.json +3 -0
- package/esm/trellis/_sdk/activity/schemas.d.ts +607 -0
- package/esm/trellis/_sdk/activity/schemas.d.ts.map +1 -0
- package/esm/trellis/_sdk/activity/schemas.js +33 -0
- package/esm/trellis/_sdk/activity/types.d.ts +96 -0
- package/esm/trellis/_sdk/activity/types.d.ts.map +1 -0
- package/esm/trellis/_sdk/activity/types.js +3 -0
- package/esm/trellis/_sdk/auth/_dnt.polyfills.d.ts +12 -0
- package/esm/trellis/_sdk/auth/_dnt.polyfills.d.ts.map +1 -0
- package/esm/trellis/_sdk/auth/_dnt.polyfills.js +15 -0
- package/esm/trellis/_sdk/auth/api.d.ts +10 -0
- package/esm/trellis/_sdk/auth/api.d.ts.map +1 -0
- package/esm/trellis/_sdk/auth/api.js +354 -0
- package/esm/trellis/_sdk/auth/contract.d.ts +28 -0
- package/esm/trellis/_sdk/auth/contract.d.ts.map +1 -0
- package/esm/trellis/_sdk/auth/contract.js +83 -0
- package/esm/trellis/_sdk/auth/mod.d.ts +7 -0
- package/esm/trellis/_sdk/auth/mod.d.ts.map +1 -0
- package/esm/trellis/_sdk/auth/mod.js +5 -0
- package/esm/trellis/_sdk/auth/package.json +3 -0
- package/esm/trellis/_sdk/auth/schemas.d.ts +8967 -0
- package/esm/trellis/_sdk/auth/schemas.d.ts.map +1 -0
- package/esm/trellis/_sdk/auth/schemas.js +306 -0
- package/esm/trellis/_sdk/auth/types.d.ts +1232 -0
- package/esm/trellis/_sdk/auth/types.d.ts.map +1 -0
- package/esm/trellis/_sdk/auth/types.js +3 -0
- package/esm/trellis/_sdk/core/_dnt.polyfills.d.ts +12 -0
- package/esm/trellis/_sdk/core/_dnt.polyfills.d.ts.map +1 -0
- package/esm/trellis/_sdk/core/_dnt.polyfills.js +15 -0
- package/esm/trellis/_sdk/core/api.d.ts +10 -0
- package/esm/trellis/_sdk/core/api.d.ts.map +1 -0
- package/esm/trellis/_sdk/core/api.js +36 -0
- package/esm/trellis/_sdk/core/contract.d.ts +8 -0
- package/esm/trellis/_sdk/core/contract.d.ts.map +1 -0
- package/esm/trellis/_sdk/core/contract.js +59 -0
- package/esm/trellis/_sdk/core/mod.d.ts +7 -0
- package/esm/trellis/_sdk/core/mod.d.ts.map +1 -0
- package/esm/trellis/_sdk/core/mod.js +5 -0
- package/esm/trellis/_sdk/core/package.json +3 -0
- package/esm/trellis/_sdk/core/schemas.d.ts +1144 -0
- package/esm/trellis/_sdk/core/schemas.d.ts.map +1 -0
- package/esm/trellis/_sdk/core/schemas.js +28 -0
- package/esm/trellis/_sdk/core/types.d.ts +176 -0
- package/esm/trellis/_sdk/core/types.d.ts.map +1 -0
- package/esm/trellis/_sdk/core/types.js +3 -0
- package/esm/trellis/auth/browser.d.ts +3 -0
- package/esm/trellis/auth/browser.d.ts.map +1 -0
- package/esm/trellis/auth/browser.js +2 -0
- package/esm/trellis/auth.d.ts +3 -0
- package/esm/trellis/auth.d.ts.map +1 -0
- package/esm/trellis/auth.js +2 -0
- package/esm/trellis/browser.d.ts +2 -7
- package/esm/trellis/browser.d.ts.map +1 -1
- package/esm/trellis/browser.js +2 -7
- package/esm/trellis/client.d.ts +6 -4
- package/esm/trellis/client.d.ts.map +1 -1
- package/esm/trellis/client.js +28 -1
- package/esm/trellis/codec.d.ts +4 -3
- package/esm/trellis/codec.d.ts.map +1 -1
- package/esm/trellis/codec.js +15 -2
- package/esm/trellis/contract.d.ts +11 -0
- package/esm/trellis/contract.d.ts.map +1 -0
- package/esm/trellis/contract.js +15 -0
- package/esm/trellis/contracts.d.ts +5 -0
- package/esm/trellis/contracts.d.ts.map +1 -0
- package/esm/trellis/contracts.js +3 -0
- package/esm/trellis/env.d.ts +1 -1
- package/esm/trellis/env.d.ts.map +1 -1
- package/esm/trellis/env.js +1 -1
- package/esm/trellis/errors/AuthError.d.ts +1 -1
- package/esm/trellis/errors/AuthError.d.ts.map +1 -1
- package/esm/trellis/errors/AuthError.js +11 -0
- package/esm/trellis/errors/RemoteError.d.ts +3 -3
- package/esm/trellis/errors/RemoteError.d.ts.map +1 -1
- package/esm/trellis/errors/RemoteError.js +3 -3
- package/esm/trellis/errors/TrellisError.d.ts +1 -1
- package/esm/trellis/errors/TrellisError.js +1 -1
- package/esm/trellis/errors/index.d.ts +2 -1
- package/esm/trellis/errors/index.d.ts.map +1 -1
- package/esm/trellis/errors/index.js +3 -2
- package/esm/trellis/globals.d.ts +9 -1
- package/esm/trellis/globals.d.ts.map +1 -1
- package/esm/trellis/globals.js +16 -8
- package/esm/trellis/helpers.d.ts +2 -1
- package/esm/trellis/helpers.d.ts.map +1 -1
- package/esm/trellis/helpers.js +1 -0
- package/esm/trellis/index.d.ts +13 -5
- package/esm/trellis/index.d.ts.map +1 -1
- package/esm/trellis/index.js +8 -3
- package/esm/trellis/kv.d.ts +10 -7
- package/esm/trellis/kv.d.ts.map +1 -1
- package/esm/trellis/kv.js +57 -34
- package/esm/trellis/models/trellis/TrellisError.d.ts +1 -1
- package/esm/trellis/models/trellis/TrellisError.js +1 -1
- package/esm/trellis/operations.d.ts +81 -0
- package/esm/trellis/operations.d.ts.map +1 -0
- package/esm/trellis/operations.js +206 -0
- package/esm/trellis/sdk/activity.d.ts +3 -0
- package/esm/trellis/sdk/activity.d.ts.map +1 -0
- package/esm/trellis/sdk/activity.js +2 -0
- package/esm/trellis/sdk/auth.d.ts +4 -0
- package/esm/trellis/sdk/auth.d.ts.map +1 -0
- package/esm/trellis/sdk/auth.js +3 -0
- package/esm/trellis/sdk/core.d.ts +4 -0
- package/esm/trellis/sdk/core.d.ts.map +1 -0
- package/esm/trellis/sdk/core.js +3 -0
- package/esm/trellis/server/deno.d.ts +3 -0
- package/esm/trellis/server/deno.d.ts.map +1 -0
- package/esm/trellis/server/deno.js +2 -0
- package/esm/trellis/server/health.d.ts +5 -0
- package/esm/trellis/server/health.d.ts.map +1 -0
- package/esm/trellis/server/health.js +3 -0
- package/esm/trellis/server/mod.d.ts +3 -0
- package/esm/trellis/server/mod.d.ts.map +1 -0
- package/esm/trellis/server/mod.js +2 -0
- package/esm/trellis/server/node.d.ts +3 -0
- package/esm/trellis/server/node.d.ts.map +1 -0
- package/esm/trellis/server/node.js +2 -0
- package/esm/trellis/server/runtime.d.ts +4 -0
- package/esm/trellis/server/runtime.d.ts.map +1 -0
- package/esm/trellis/server/runtime.js +2 -0
- package/esm/trellis/server.d.ts +21 -0
- package/esm/trellis/server.d.ts.map +1 -0
- package/esm/trellis/server.js +536 -0
- package/esm/trellis/server_logger.d.ts +3 -0
- package/esm/trellis/server_logger.d.ts.map +1 -0
- package/esm/trellis/server_logger.js +7 -0
- package/esm/trellis/tasks.d.ts +3 -3
- package/esm/trellis/tasks.d.ts.map +1 -1
- package/esm/trellis/tasks.js +1 -1
- package/esm/trellis/tracing.d.ts +2 -2
- package/esm/trellis/tracing.d.ts.map +1 -1
- package/esm/trellis/tracing.js +2 -2
- package/esm/trellis/trellis.d.ts +167 -78
- package/esm/trellis/trellis.d.ts.map +1 -1
- package/esm/trellis/trellis.js +281 -87
- package/esm/trellis/workload.d.ts +45 -0
- package/esm/trellis/workload.d.ts.map +1 -0
- package/esm/trellis/workload.js +144 -0
- package/package.json +63 -4
- package/script/auth/browser/login.d.ts +27 -0
- package/script/auth/browser/login.d.ts.map +1 -0
- package/script/auth/browser/login.js +100 -0
- package/script/auth/browser/portal.d.ts +11 -0
- package/script/auth/browser/portal.d.ts.map +1 -0
- package/script/auth/browser/portal.js +40 -0
- package/script/auth/browser/session.d.ts +19 -0
- package/script/auth/browser/session.d.ts.map +1 -0
- package/script/auth/browser/session.js +79 -0
- package/script/auth/browser/storage.d.ts +12 -0
- package/script/auth/browser/storage.d.ts.map +1 -0
- package/script/auth/browser/storage.js +67 -0
- package/script/auth/browser.d.ts +13 -0
- package/script/auth/browser.d.ts.map +1 -0
- package/script/auth/browser.js +46 -0
- package/script/auth/keys.d.ts +5 -0
- package/script/auth/keys.d.ts.map +1 -0
- package/script/auth/keys.js +56 -0
- package/script/auth/mod.d.ts +18 -0
- package/script/auth/mod.d.ts.map +1 -0
- package/script/auth/mod.js +172 -0
- package/script/auth/proof.d.ts +9 -0
- package/script/auth/proof.d.ts.map +1 -0
- package/script/auth/proof.js +48 -0
- package/script/auth/protocol.d.ts +1212 -0
- package/script/auth/protocol.d.ts.map +1 -0
- package/script/auth/protocol.js +687 -0
- package/script/auth/schemas.d.ts +93 -0
- package/script/auth/schemas.d.ts.map +1 -0
- package/script/auth/schemas.js +67 -0
- package/script/auth/session_auth.d.ts +20 -0
- package/script/auth/session_auth.d.ts.map +1 -0
- package/script/auth/session_auth.js +45 -0
- package/script/auth/trellis_id.d.ts +2 -0
- package/script/auth/trellis_id.d.ts.map +1 -0
- package/script/auth/trellis_id.js +8 -0
- package/script/auth/types.d.ts +8 -0
- package/script/auth/types.d.ts.map +1 -0
- package/script/auth/utils.d.ts +11 -0
- package/script/auth/utils.d.ts.map +1 -0
- package/script/auth/utils.js +77 -0
- package/script/auth/workload_activation.d.ts +192 -0
- package/script/auth/workload_activation.d.ts.map +1 -0
- package/script/auth/workload_activation.js +308 -0
- package/script/contracts/canonical.d.ts +14 -0
- package/script/contracts/canonical.d.ts.map +1 -0
- package/script/contracts/canonical.js +144 -0
- package/script/contracts/mod.d.ts +462 -0
- package/script/contracts/mod.d.ts.map +1 -0
- package/script/contracts/mod.js +555 -0
- package/script/contracts/protocol.d.ts +301 -0
- package/script/contracts/protocol.d.ts.map +1 -0
- package/script/contracts/protocol.js +136 -0
- package/script/contracts/runtime.d.ts +48 -0
- package/script/contracts/runtime.d.ts.map +1 -0
- package/script/contracts/runtime.js +13 -0
- package/script/contracts/schema_pointers.d.ts +18 -0
- package/script/contracts/schema_pointers.d.ts.map +1 -0
- package/script/contracts/schema_pointers.js +63 -0
- package/script/telemetry/carrier.d.ts +9 -0
- package/script/telemetry/carrier.d.ts.map +1 -0
- package/script/telemetry/carrier.js +25 -0
- package/script/telemetry/core.d.ts +8 -0
- package/script/telemetry/core.d.ts.map +1 -0
- package/script/telemetry/core.js +24 -0
- package/script/telemetry/env.d.ts +2 -0
- package/script/telemetry/env.d.ts.map +1 -0
- package/script/telemetry/env.js +12 -0
- package/script/telemetry/mod.d.ts +11 -0
- package/script/telemetry/mod.d.ts.map +1 -0
- package/script/telemetry/mod.js +29 -0
- package/script/telemetry/nats.d.ts +7 -0
- package/script/telemetry/nats.d.ts.map +1 -0
- package/script/telemetry/nats.js +9 -0
- package/script/telemetry/result.d.ts +2 -0
- package/script/telemetry/result.d.ts.map +1 -0
- package/script/telemetry/result.js +21 -0
- package/script/telemetry/runtime.d.ts +2 -0
- package/script/telemetry/runtime.d.ts.map +1 -0
- package/script/telemetry/runtime.js +79 -0
- package/script/telemetry/trace.d.ts +5 -0
- package/script/telemetry/trace.d.ts.map +1 -0
- package/script/telemetry/trace.js +31 -0
- package/script/telemetry/trellis.d.ts +3 -0
- package/script/telemetry/trellis.d.ts.map +1 -0
- package/script/telemetry/trellis.js +14 -0
- package/script/trellis/_sdk/activity/_dnt.polyfills.d.ts +12 -0
- package/script/trellis/_sdk/activity/_dnt.polyfills.d.ts.map +1 -0
- package/script/trellis/_sdk/activity/_dnt.polyfills.js +16 -0
- package/script/trellis/_sdk/activity/api.d.ts +10 -0
- package/script/trellis/_sdk/activity/api.d.ts.map +1 -0
- package/script/trellis/_sdk/activity/api.js +46 -0
- package/script/trellis/_sdk/activity/contract.d.ts +8 -0
- package/script/trellis/_sdk/activity/contract.d.ts.map +1 -0
- package/script/trellis/_sdk/activity/contract.js +62 -0
- package/script/trellis/_sdk/activity/mod.d.ts +7 -0
- package/script/trellis/_sdk/activity/mod.d.ts.map +1 -0
- package/script/trellis/_sdk/activity/mod.js +30 -0
- package/script/trellis/_sdk/activity/package.json +3 -0
- package/script/trellis/_sdk/activity/schemas.d.ts +607 -0
- package/script/trellis/_sdk/activity/schemas.d.ts.map +1 -0
- package/script/trellis/_sdk/activity/schemas.js +36 -0
- package/script/trellis/_sdk/activity/types.d.ts +96 -0
- package/script/trellis/_sdk/activity/types.d.ts.map +1 -0
- package/script/trellis/_sdk/activity/types.js +6 -0
- package/script/trellis/_sdk/auth/_dnt.polyfills.d.ts +12 -0
- package/script/trellis/_sdk/auth/_dnt.polyfills.d.ts.map +1 -0
- package/script/trellis/_sdk/auth/_dnt.polyfills.js +16 -0
- package/script/trellis/_sdk/auth/api.d.ts +10 -0
- package/script/trellis/_sdk/auth/api.d.ts.map +1 -0
- package/script/trellis/_sdk/auth/api.js +357 -0
- package/script/trellis/_sdk/auth/contract.d.ts +28 -0
- package/script/trellis/_sdk/auth/contract.d.ts.map +1 -0
- package/script/trellis/_sdk/auth/contract.js +86 -0
- package/script/trellis/_sdk/auth/mod.d.ts +7 -0
- package/script/trellis/_sdk/auth/mod.d.ts.map +1 -0
- package/script/trellis/_sdk/auth/mod.js +31 -0
- package/script/trellis/_sdk/auth/package.json +3 -0
- package/script/trellis/_sdk/auth/schemas.d.ts +8967 -0
- package/script/trellis/_sdk/auth/schemas.d.ts.map +1 -0
- package/script/trellis/_sdk/auth/schemas.js +309 -0
- package/script/trellis/_sdk/auth/types.d.ts +1232 -0
- package/script/trellis/_sdk/auth/types.d.ts.map +1 -0
- package/script/trellis/_sdk/auth/types.js +6 -0
- package/script/trellis/_sdk/core/_dnt.polyfills.d.ts +12 -0
- package/script/trellis/_sdk/core/_dnt.polyfills.d.ts.map +1 -0
- package/script/trellis/_sdk/core/_dnt.polyfills.js +16 -0
- package/script/trellis/_sdk/core/api.d.ts +10 -0
- package/script/trellis/_sdk/core/api.d.ts.map +1 -0
- package/script/trellis/_sdk/core/api.js +39 -0
- package/script/trellis/_sdk/core/contract.d.ts +8 -0
- package/script/trellis/_sdk/core/contract.d.ts.map +1 -0
- package/script/trellis/_sdk/core/contract.js +62 -0
- package/script/trellis/_sdk/core/mod.d.ts +7 -0
- package/script/trellis/_sdk/core/mod.d.ts.map +1 -0
- package/script/trellis/_sdk/core/mod.js +30 -0
- package/script/trellis/_sdk/core/package.json +3 -0
- package/script/trellis/_sdk/core/schemas.d.ts +1144 -0
- package/script/trellis/_sdk/core/schemas.d.ts.map +1 -0
- package/script/trellis/_sdk/core/schemas.js +31 -0
- package/script/trellis/_sdk/core/types.d.ts +176 -0
- package/script/trellis/_sdk/core/types.d.ts.map +1 -0
- package/script/trellis/_sdk/core/types.js +6 -0
- package/script/trellis/auth.d.ts +2 -0
- package/script/trellis/auth.d.ts.map +1 -0
- package/script/trellis/auth.js +17 -0
- package/script/trellis/client.d.ts +8 -6
- package/script/trellis/client.d.ts.map +1 -1
- package/script/trellis/client.js +54 -3
- package/script/trellis/codec.d.ts +5 -4
- package/script/trellis/codec.d.ts.map +1 -1
- package/script/trellis/codec.js +31 -17
- package/script/trellis/contract.d.ts +11 -0
- package/script/trellis/contract.d.ts.map +1 -0
- package/script/trellis/contract.js +18 -0
- package/script/trellis/contracts.d.ts +4 -0
- package/script/trellis/contracts.d.ts.map +1 -0
- package/script/trellis/contracts.js +20 -0
- package/script/trellis/errors/AuthError.d.ts +2 -2
- package/script/trellis/errors/AuthError.d.ts.map +1 -1
- package/script/trellis/errors/AuthError.js +13 -2
- package/script/trellis/errors/KVError.d.ts +1 -1
- package/script/trellis/errors/KVError.d.ts.map +1 -1
- package/script/trellis/errors/KVError.js +2 -2
- package/script/trellis/errors/RemoteError.d.ts +4 -4
- package/script/trellis/errors/RemoteError.d.ts.map +1 -1
- package/script/trellis/errors/RemoteError.js +11 -11
- package/script/trellis/errors/TrellisError.d.ts +1 -1
- package/script/trellis/errors/TrellisError.d.ts.map +1 -1
- package/script/trellis/errors/TrellisError.js +2 -2
- package/script/trellis/errors/ValidationError.d.ts +1 -1
- package/script/trellis/errors/ValidationError.d.ts.map +1 -1
- package/script/trellis/errors/ValidationError.js +2 -2
- package/script/trellis/errors/index.d.ts +14 -14
- package/script/trellis/errors/index.d.ts.map +1 -1
- package/script/trellis/errors/index.js +31 -31
- package/script/trellis/globals.d.ts +9 -1
- package/script/trellis/globals.d.ts.map +1 -1
- package/script/trellis/globals.js +16 -8
- package/script/trellis/helpers.d.ts +1 -1
- package/script/trellis/helpers.d.ts.map +1 -1
- package/script/trellis/index.d.ts +17 -10
- package/script/trellis/index.d.ts.map +1 -1
- package/script/trellis/index.js +57 -22
- package/script/trellis/kv.d.ts +11 -8
- package/script/trellis/kv.d.ts.map +1 -1
- package/script/trellis/kv.js +91 -68
- package/script/trellis/models/trellis/TrellisError.d.ts +1 -1
- package/script/trellis/models/trellis/TrellisError.d.ts.map +1 -1
- package/script/trellis/models/trellis/TrellisError.js +8 -8
- package/script/trellis/operations.d.ts +81 -0
- package/script/trellis/operations.d.ts.map +1 -0
- package/script/trellis/operations.js +212 -0
- package/script/trellis/sdk/core.d.ts +3 -0
- package/script/trellis/sdk/core.d.ts.map +1 -0
- package/script/trellis/sdk/core.js +20 -0
- package/script/trellis/tasks.d.ts +3 -3
- package/script/trellis/tasks.d.ts.map +1 -1
- package/script/trellis/tasks.js +5 -5
- package/script/trellis/tracing.d.ts +2 -3
- package/script/trellis/tracing.d.ts.map +1 -1
- package/script/trellis/tracing.js +17 -20
- package/script/trellis/trellis.d.ts +169 -80
- package/script/trellis/trellis.d.ts.map +1 -1
- package/script/trellis/trellis.js +379 -177
- package/script/trellis/workload.d.ts +45 -0
- package/script/trellis/workload.d.ts.map +1 -0
- package/script/trellis/workload.js +172 -0
- package/script/_dnt.polyfills.d.ts +0 -7
- package/script/_dnt.polyfills.d.ts.map +0 -1
- package/script/trellis/browser.d.ts +0 -11
- package/script/trellis/browser.d.ts.map +0 -1
- package/script/trellis/browser.js +0 -21
- package/script/trellis/env.d.ts +0 -2
- package/script/trellis/env.d.ts.map +0 -1
- package/script/trellis/env.js +0 -5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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BV,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SCHEMAS = void 0;
|
|
4
|
+
// Generated from ./generated/contracts/manifests/trellis.core@v1.json
|
|
5
|
+
exports.SCHEMAS = {
|
|
6
|
+
schemas: {
|
|
7
|
+
"TrellisBindingsGetRequest": { "additionalProperties": false, "properties": { "contractId": { "minLength": 1, "type": "string" }, "digest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } }, "type": "object" },
|
|
8
|
+
"TrellisBindingsGetResponse": { "additionalProperties": false, "properties": { "binding": { "additionalProperties": false, "properties": { "contractId": { "minLength": 1, "type": "string" }, "digest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "resources": { "properties": { "jobs": { "additionalProperties": false, "properties": { "namespace": { "minLength": 1, "type": "string" }, "queues": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "ackWaitMs": { "minimum": 1, "type": "integer" }, "backoffMs": { "items": { "minimum": 0, "type": "integer" }, "type": "array" }, "concurrency": { "minimum": 1, "type": "integer" }, "consumerName": { "minLength": 1, "type": "string" }, "defaultDeadlineMs": { "minimum": 1, "type": "integer" }, "dlq": { "type": "boolean" }, "logs": { "type": "boolean" }, "maxDeliver": { "minimum": 1, "type": "integer" }, "payload": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "progress": { "type": "boolean" }, "publishPrefix": { "minLength": 1, "type": "string" }, "queueType": { "minLength": 1, "type": "string" }, "result": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "workSubject": { "minLength": 1, "type": "string" } }, "required": ["queueType", "publishPrefix", "workSubject", "consumerName", "payload", "maxDeliver", "backoffMs", "ackWaitMs", "progress", "logs", "dlq", "concurrency"], "type": "object" } }, "type": "object" } }, "required": ["namespace", "queues"], "type": "object" }, "kv": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "bucket": { "minLength": 1, "type": "string" }, "history": { "minimum": 1, "type": "integer" }, "maxValueBytes": { "minimum": 1, "type": "integer" }, "ttlMs": { "minimum": 0, "type": "integer" } }, "required": ["bucket", "history", "ttlMs"], "type": "object" } }, "type": "object" }, "streams": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "discard": { "minLength": 1, "type": "string" }, "maxAgeMs": { "minimum": 0, "type": "integer" }, "maxBytes": { "type": "integer" }, "maxMsgs": { "type": "integer" }, "name": { "minLength": 1, "type": "string" }, "numReplicas": { "minimum": 1, "type": "integer" }, "retention": { "minLength": 1, "type": "string" }, "sources": { "items": { "additionalProperties": false, "properties": { "filterSubject": { "minLength": 1, "type": "string" }, "fromAlias": { "minLength": 1, "type": "string" }, "streamName": { "minLength": 1, "type": "string" }, "subjectTransformDest": { "minLength": 1, "type": "string" } }, "required": ["fromAlias", "streamName"], "type": "object" }, "type": "array" }, "storage": { "minLength": 1, "type": "string" }, "subjects": { "items": { "minLength": 1, "type": "string" }, "minItems": 1, "type": "array" } }, "required": ["name", "subjects"], "type": "object" } }, "type": "object" } }, "type": "object" } }, "required": ["contractId", "digest", "resources"], "type": "object" } }, "type": "object" },
|
|
9
|
+
"TrellisCatalogRequest": { "additionalProperties": false, "properties": {}, "type": "object" },
|
|
10
|
+
"TrellisCatalogResponse": { "additionalProperties": false, "properties": { "catalog": { "additionalProperties": false, "properties": { "contracts": { "items": { "additionalProperties": false, "properties": { "description": { "minLength": 1, "type": "string" }, "digest": { "type": "string" }, "displayName": { "minLength": 1, "type": "string" }, "id": { "type": "string" } }, "required": ["id", "digest", "displayName", "description"], "type": "object" }, "type": "array" }, "format": { "const": "trellis.catalog.v1", "type": "string" } }, "required": ["format", "contracts"], "type": "object" } }, "required": ["catalog"], "type": "object" },
|
|
11
|
+
"TrellisContractGetRequest": { "additionalProperties": false, "properties": { "digest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } }, "required": ["digest"], "type": "object" },
|
|
12
|
+
"TrellisContractGetResponse": { "additionalProperties": false, "properties": { "contract": { "properties": { "description": { "minLength": 1, "type": "string" }, "displayName": { "minLength": 1, "type": "string" }, "errors": { "patternProperties": { "^.*$": { "type": "object" } }, "type": "object" }, "events": { "patternProperties": { "^.*$": { "type": "object" } }, "type": "object" }, "format": { "const": "trellis.contract.v1", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "resources": { "properties": { "jobs": { "additionalProperties": false, "properties": { "queues": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "ackWaitMs": { "minimum": 1, "type": "integer" }, "backoffMs": { "items": { "minimum": 0, "type": "integer" }, "type": "array" }, "concurrency": { "minimum": 1, "type": "integer" }, "defaultDeadlineMs": { "minimum": 1, "type": "integer" }, "dlq": { "type": "boolean" }, "logs": { "type": "boolean" }, "maxDeliver": { "minimum": 1, "type": "integer" }, "payload": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "progress": { "type": "boolean" }, "result": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" } }, "required": ["payload"], "type": "object" } }, "type": "object" } }, "required": ["queues"], "type": "object" }, "kv": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "history": { "default": 1, "minimum": 1, "type": "integer" }, "maxValueBytes": { "minimum": 1, "type": "integer" }, "purpose": { "minLength": 1, "type": "string" }, "required": { "default": true, "type": "boolean" }, "ttlMs": { "default": 0, "minimum": 0, "type": "integer" } }, "required": ["purpose"], "type": "object" } }, "type": "object" }, "streams": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "discard": { "minLength": 1, "type": "string" }, "maxAgeMs": { "minimum": 0, "type": "integer" }, "maxBytes": { "type": "integer" }, "maxMsgs": { "type": "integer" }, "numReplicas": { "minimum": 1, "type": "integer" }, "purpose": { "minLength": 1, "type": "string" }, "required": { "default": true, "type": "boolean" }, "retention": { "minLength": 1, "type": "string" }, "sources": { "items": { "additionalProperties": false, "properties": { "filterSubject": { "minLength": 1, "type": "string" }, "fromAlias": { "minLength": 1, "type": "string" }, "subjectTransformDest": { "minLength": 1, "type": "string" } }, "required": ["fromAlias"], "type": "object" }, "type": "array" }, "storage": { "minLength": 1, "type": "string" }, "subjects": { "items": { "minLength": 1, "type": "string" }, "minItems": 1, "type": "array" } }, "required": ["purpose", "subjects"], "type": "object" } }, "type": "object" } }, "type": "object" }, "rpc": { "patternProperties": { "^.*$": { "type": "object" } }, "type": "object" }, "schemas": { "patternProperties": { "^.*$": { "anyOf": [{ "type": "object" }, { "type": "boolean" }] } }, "type": "object" }, "subjects": { "patternProperties": { "^.*$": { "type": "object" } }, "type": "object" }, "uses": { "patternProperties": { "^.*$": { "type": "object" } }, "type": "object" } }, "required": ["format", "id", "displayName", "description"], "type": "object" } }, "required": ["contract"], "type": "object" },
|
|
13
|
+
},
|
|
14
|
+
rpc: {
|
|
15
|
+
"Trellis.Bindings.Get": {
|
|
16
|
+
input: { "additionalProperties": false, "properties": { "contractId": { "minLength": 1, "type": "string" }, "digest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } }, "type": "object" },
|
|
17
|
+
output: { "additionalProperties": false, "properties": { "binding": { "additionalProperties": false, "properties": { "contractId": { "minLength": 1, "type": "string" }, "digest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "resources": { "properties": { "jobs": { "additionalProperties": false, "properties": { "namespace": { "minLength": 1, "type": "string" }, "queues": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "ackWaitMs": { "minimum": 1, "type": "integer" }, "backoffMs": { "items": { "minimum": 0, "type": "integer" }, "type": "array" }, "concurrency": { "minimum": 1, "type": "integer" }, "consumerName": { "minLength": 1, "type": "string" }, "defaultDeadlineMs": { "minimum": 1, "type": "integer" }, "dlq": { "type": "boolean" }, "logs": { "type": "boolean" }, "maxDeliver": { "minimum": 1, "type": "integer" }, "payload": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "progress": { "type": "boolean" }, "publishPrefix": { "minLength": 1, "type": "string" }, "queueType": { "minLength": 1, "type": "string" }, "result": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "workSubject": { "minLength": 1, "type": "string" } }, "required": ["queueType", "publishPrefix", "workSubject", "consumerName", "payload", "maxDeliver", "backoffMs", "ackWaitMs", "progress", "logs", "dlq", "concurrency"], "type": "object" } }, "type": "object" } }, "required": ["namespace", "queues"], "type": "object" }, "kv": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "bucket": { "minLength": 1, "type": "string" }, "history": { "minimum": 1, "type": "integer" }, "maxValueBytes": { "minimum": 1, "type": "integer" }, "ttlMs": { "minimum": 0, "type": "integer" } }, "required": ["bucket", "history", "ttlMs"], "type": "object" } }, "type": "object" }, "streams": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "discard": { "minLength": 1, "type": "string" }, "maxAgeMs": { "minimum": 0, "type": "integer" }, "maxBytes": { "type": "integer" }, "maxMsgs": { "type": "integer" }, "name": { "minLength": 1, "type": "string" }, "numReplicas": { "minimum": 1, "type": "integer" }, "retention": { "minLength": 1, "type": "string" }, "sources": { "items": { "additionalProperties": false, "properties": { "filterSubject": { "minLength": 1, "type": "string" }, "fromAlias": { "minLength": 1, "type": "string" }, "streamName": { "minLength": 1, "type": "string" }, "subjectTransformDest": { "minLength": 1, "type": "string" } }, "required": ["fromAlias", "streamName"], "type": "object" }, "type": "array" }, "storage": { "minLength": 1, "type": "string" }, "subjects": { "items": { "minLength": 1, "type": "string" }, "minItems": 1, "type": "array" } }, "required": ["name", "subjects"], "type": "object" } }, "type": "object" } }, "type": "object" } }, "required": ["contractId", "digest", "resources"], "type": "object" } }, "type": "object" },
|
|
18
|
+
},
|
|
19
|
+
"Trellis.Catalog": {
|
|
20
|
+
input: { "additionalProperties": false, "properties": {}, "type": "object" },
|
|
21
|
+
output: { "additionalProperties": false, "properties": { "catalog": { "additionalProperties": false, "properties": { "contracts": { "items": { "additionalProperties": false, "properties": { "description": { "minLength": 1, "type": "string" }, "digest": { "type": "string" }, "displayName": { "minLength": 1, "type": "string" }, "id": { "type": "string" } }, "required": ["id", "digest", "displayName", "description"], "type": "object" }, "type": "array" }, "format": { "const": "trellis.catalog.v1", "type": "string" } }, "required": ["format", "contracts"], "type": "object" } }, "required": ["catalog"], "type": "object" },
|
|
22
|
+
},
|
|
23
|
+
"Trellis.Contract.Get": {
|
|
24
|
+
input: { "additionalProperties": false, "properties": { "digest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } }, "required": ["digest"], "type": "object" },
|
|
25
|
+
output: { "additionalProperties": false, "properties": { "contract": { "properties": { "description": { "minLength": 1, "type": "string" }, "displayName": { "minLength": 1, "type": "string" }, "errors": { "patternProperties": { "^.*$": { "type": "object" } }, "type": "object" }, "events": { "patternProperties": { "^.*$": { "type": "object" } }, "type": "object" }, "format": { "const": "trellis.contract.v1", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "resources": { "properties": { "jobs": { "additionalProperties": false, "properties": { "queues": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "ackWaitMs": { "minimum": 1, "type": "integer" }, "backoffMs": { "items": { "minimum": 0, "type": "integer" }, "type": "array" }, "concurrency": { "minimum": 1, "type": "integer" }, "defaultDeadlineMs": { "minimum": 1, "type": "integer" }, "dlq": { "type": "boolean" }, "logs": { "type": "boolean" }, "maxDeliver": { "minimum": 1, "type": "integer" }, "payload": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "progress": { "type": "boolean" }, "result": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" } }, "required": ["payload"], "type": "object" } }, "type": "object" } }, "required": ["queues"], "type": "object" }, "kv": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "history": { "default": 1, "minimum": 1, "type": "integer" }, "maxValueBytes": { "minimum": 1, "type": "integer" }, "purpose": { "minLength": 1, "type": "string" }, "required": { "default": true, "type": "boolean" }, "ttlMs": { "default": 0, "minimum": 0, "type": "integer" } }, "required": ["purpose"], "type": "object" } }, "type": "object" }, "streams": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "discard": { "minLength": 1, "type": "string" }, "maxAgeMs": { "minimum": 0, "type": "integer" }, "maxBytes": { "type": "integer" }, "maxMsgs": { "type": "integer" }, "numReplicas": { "minimum": 1, "type": "integer" }, "purpose": { "minLength": 1, "type": "string" }, "required": { "default": true, "type": "boolean" }, "retention": { "minLength": 1, "type": "string" }, "sources": { "items": { "additionalProperties": false, "properties": { "filterSubject": { "minLength": 1, "type": "string" }, "fromAlias": { "minLength": 1, "type": "string" }, "subjectTransformDest": { "minLength": 1, "type": "string" } }, "required": ["fromAlias"], "type": "object" }, "type": "array" }, "storage": { "minLength": 1, "type": "string" }, "subjects": { "items": { "minLength": 1, "type": "string" }, "minItems": 1, "type": "array" } }, "required": ["purpose", "subjects"], "type": "object" } }, "type": "object" } }, "type": "object" }, "rpc": { "patternProperties": { "^.*$": { "type": "object" } }, "type": "object" }, "schemas": { "patternProperties": { "^.*$": { "anyOf": [{ "type": "object" }, { "type": "boolean" }] } }, "type": "object" }, "subjects": { "patternProperties": { "^.*$": { "type": "object" } }, "type": "object" }, "uses": { "patternProperties": { "^.*$": { "type": "object" } }, "type": "object" } }, "required": ["format", "id", "displayName", "description"], "type": "object" } }, "required": ["contract"], "type": "object" },
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
operations: {},
|
|
29
|
+
events: {},
|
|
30
|
+
subjects: {},
|
|
31
|
+
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
export declare const CONTRACT_ID: "trellis.core@v1";
|
|
2
|
+
export declare const CONTRACT_DIGEST: "xlft4L4KCEHr-8RswThhuNJoYc6zP0H-6GdXxWrcYg0";
|
|
3
|
+
export type TrellisBindingsGetInput = {
|
|
4
|
+
contractId?: string;
|
|
5
|
+
digest?: string;
|
|
6
|
+
};
|
|
7
|
+
export type TrellisBindingsGetOutput = {
|
|
8
|
+
binding?: {
|
|
9
|
+
contractId: string;
|
|
10
|
+
digest: string;
|
|
11
|
+
resources: {
|
|
12
|
+
jobs?: {
|
|
13
|
+
namespace: string;
|
|
14
|
+
queues: {
|
|
15
|
+
[k: string]: {
|
|
16
|
+
ackWaitMs: number;
|
|
17
|
+
backoffMs: Array<number>;
|
|
18
|
+
concurrency: number;
|
|
19
|
+
consumerName: string;
|
|
20
|
+
defaultDeadlineMs?: number;
|
|
21
|
+
dlq: boolean;
|
|
22
|
+
logs: boolean;
|
|
23
|
+
maxDeliver: number;
|
|
24
|
+
payload: {
|
|
25
|
+
schema: string;
|
|
26
|
+
};
|
|
27
|
+
progress: boolean;
|
|
28
|
+
publishPrefix: string;
|
|
29
|
+
queueType: string;
|
|
30
|
+
result?: {
|
|
31
|
+
schema: string;
|
|
32
|
+
};
|
|
33
|
+
workSubject: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
kv?: {
|
|
38
|
+
[k: string]: {
|
|
39
|
+
bucket: string;
|
|
40
|
+
history: number;
|
|
41
|
+
maxValueBytes?: number;
|
|
42
|
+
ttlMs: number;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
streams?: {
|
|
46
|
+
[k: string]: {
|
|
47
|
+
discard?: string;
|
|
48
|
+
maxAgeMs?: number;
|
|
49
|
+
maxBytes?: number;
|
|
50
|
+
maxMsgs?: number;
|
|
51
|
+
name: string;
|
|
52
|
+
numReplicas?: number;
|
|
53
|
+
retention?: string;
|
|
54
|
+
sources?: Array<{
|
|
55
|
+
filterSubject?: string;
|
|
56
|
+
fromAlias: string;
|
|
57
|
+
streamName: string;
|
|
58
|
+
subjectTransformDest?: string;
|
|
59
|
+
}>;
|
|
60
|
+
storage?: string;
|
|
61
|
+
subjects: Array<string>;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export type TrellisCatalogInput = {};
|
|
68
|
+
export type TrellisCatalogOutput = {
|
|
69
|
+
catalog: {
|
|
70
|
+
contracts: Array<{
|
|
71
|
+
description: string;
|
|
72
|
+
digest: string;
|
|
73
|
+
displayName: string;
|
|
74
|
+
id: string;
|
|
75
|
+
}>;
|
|
76
|
+
format: "trellis.catalog.v1";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export type TrellisContractGetInput = {
|
|
80
|
+
digest: string;
|
|
81
|
+
};
|
|
82
|
+
export type TrellisContractGetOutput = {
|
|
83
|
+
contract: {
|
|
84
|
+
description: string;
|
|
85
|
+
displayName: string;
|
|
86
|
+
errors?: {
|
|
87
|
+
[k: string]: {};
|
|
88
|
+
};
|
|
89
|
+
events?: {
|
|
90
|
+
[k: string]: {};
|
|
91
|
+
};
|
|
92
|
+
format: "trellis.contract.v1";
|
|
93
|
+
id: string;
|
|
94
|
+
resources?: {
|
|
95
|
+
jobs?: {
|
|
96
|
+
queues: {
|
|
97
|
+
[k: string]: {
|
|
98
|
+
ackWaitMs?: number;
|
|
99
|
+
backoffMs?: Array<number>;
|
|
100
|
+
concurrency?: number;
|
|
101
|
+
defaultDeadlineMs?: number;
|
|
102
|
+
dlq?: boolean;
|
|
103
|
+
logs?: boolean;
|
|
104
|
+
maxDeliver?: number;
|
|
105
|
+
payload: {
|
|
106
|
+
schema: string;
|
|
107
|
+
};
|
|
108
|
+
progress?: boolean;
|
|
109
|
+
result?: {
|
|
110
|
+
schema: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
kv?: {
|
|
116
|
+
[k: string]: {
|
|
117
|
+
history?: number;
|
|
118
|
+
maxValueBytes?: number;
|
|
119
|
+
purpose: string;
|
|
120
|
+
required?: boolean;
|
|
121
|
+
ttlMs?: number;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
streams?: {
|
|
125
|
+
[k: string]: {
|
|
126
|
+
discard?: string;
|
|
127
|
+
maxAgeMs?: number;
|
|
128
|
+
maxBytes?: number;
|
|
129
|
+
maxMsgs?: number;
|
|
130
|
+
numReplicas?: number;
|
|
131
|
+
purpose: string;
|
|
132
|
+
required?: boolean;
|
|
133
|
+
retention?: string;
|
|
134
|
+
sources?: Array<{
|
|
135
|
+
filterSubject?: string;
|
|
136
|
+
fromAlias: string;
|
|
137
|
+
subjectTransformDest?: string;
|
|
138
|
+
}>;
|
|
139
|
+
storage?: string;
|
|
140
|
+
subjects: Array<string>;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
rpc?: {
|
|
145
|
+
[k: string]: {};
|
|
146
|
+
};
|
|
147
|
+
schemas?: {
|
|
148
|
+
[k: string]: ({} | boolean);
|
|
149
|
+
};
|
|
150
|
+
subjects?: {
|
|
151
|
+
[k: string]: {};
|
|
152
|
+
};
|
|
153
|
+
uses?: {
|
|
154
|
+
[k: string]: {};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
export interface RpcMap {
|
|
159
|
+
"Trellis.Bindings.Get": {
|
|
160
|
+
input: TrellisBindingsGetInput;
|
|
161
|
+
output: TrellisBindingsGetOutput;
|
|
162
|
+
};
|
|
163
|
+
"Trellis.Catalog": {
|
|
164
|
+
input: TrellisCatalogInput;
|
|
165
|
+
output: TrellisCatalogOutput;
|
|
166
|
+
};
|
|
167
|
+
"Trellis.Contract.Get": {
|
|
168
|
+
input: TrellisContractGetInput;
|
|
169
|
+
output: TrellisContractGetOutput;
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
export interface EventMap {
|
|
173
|
+
}
|
|
174
|
+
export interface SubjectMap {
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW,mBAA6B,CAAC;AACtD,eAAO,MAAM,eAAe,+CAAyD,CAAC;AAEtF,MAAM,MAAM,uBAAuB,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAAE,CAAC;AAChF,MAAM,MAAM,wBAAwB,GAAG;IAAE,OAAO,CAAC,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE;YAAE,IAAI,CAAC,EAAE;gBAAE,SAAS,EAAE,MAAM,CAAC;gBAAC,MAAM,EAAE;oBAAE,CAAC,CAAC,EAAE,MAAM,GAAG;wBAAE,SAAS,EAAE,MAAM,CAAC;wBAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;wBAAC,WAAW,EAAE,MAAM,CAAC;wBAAC,YAAY,EAAE,MAAM,CAAC;wBAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;wBAAC,GAAG,EAAE,OAAO,CAAC;wBAAC,IAAI,EAAE,OAAO,CAAC;wBAAC,UAAU,EAAE,MAAM,CAAC;wBAAC,OAAO,EAAE;4BAAE,MAAM,EAAE,MAAM,CAAC;yBAAE,CAAC;wBAAC,QAAQ,EAAE,OAAO,CAAC;wBAAC,aAAa,EAAE,MAAM,CAAC;wBAAC,SAAS,EAAE,MAAM,CAAC;wBAAC,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EAAE;QAAE,KAAK,EAAE,uBAAuB,CAAC;QAAC,MAAM,EAAE,wBAAwB,CAAC;KAAE,CAAC;IAC9F,iBAAiB,EAAE;QAAE,KAAK,EAAE,mBAAmB,CAAC;QAAC,MAAM,EAAE,oBAAoB,CAAC;KAAE,CAAC;IACjF,sBAAsB,EAAE;QAAE,KAAK,EAAE,uBAAuB,CAAC;QAAC,MAAM,EAAE,wBAAwB,CAAC;KAAE,CAAC;CAC/F;AAED,MAAM,WAAW,QAAQ;CACxB;AAED,MAAM,WAAW,UAAU;CAC1B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONTRACT_DIGEST = exports.CONTRACT_ID = void 0;
|
|
4
|
+
// Generated from ./generated/contracts/manifests/trellis.core@v1.json
|
|
5
|
+
exports.CONTRACT_ID = "trellis.core@v1";
|
|
6
|
+
exports.CONTRACT_DIGEST = "xlft4L4KCEHr-8RswThhuNJoYc6zP0H-6GdXxWrcYg0";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../auth.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("../auth/mod.ts"), exports);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { NatsConnection } from "@nats-io/nats-core";
|
|
2
|
-
import type { TrellisAPI } from "
|
|
3
|
-
import type {
|
|
4
|
-
import type { TrellisAuth } from "./trellis.
|
|
5
|
-
import { Trellis } from "./trellis.
|
|
2
|
+
import type { TrellisAPI } from "./contracts.ts";
|
|
3
|
+
import type { LoggerLike } from "./globals.ts";
|
|
4
|
+
import type { TrellisAuth } from "./trellis.ts";
|
|
5
|
+
import { Trellis } from "./trellis.ts";
|
|
6
6
|
type NoResponderRetryOpts = {
|
|
7
7
|
maxAttempts?: number;
|
|
8
8
|
baseDelayMs?: number;
|
|
@@ -13,19 +13,21 @@ export type ClientOpts = {
|
|
|
13
13
|
* Defaults to "client".
|
|
14
14
|
*/
|
|
15
15
|
name?: string;
|
|
16
|
-
log?:
|
|
16
|
+
log?: LoggerLike;
|
|
17
17
|
timeout?: number;
|
|
18
18
|
stream?: string;
|
|
19
19
|
noResponderRetry?: NoResponderRetryOpts;
|
|
20
20
|
};
|
|
21
21
|
type ClientContract<TApi> = {
|
|
22
22
|
API: {
|
|
23
|
-
|
|
23
|
+
owned?: TApi;
|
|
24
|
+
trellis?: TApi;
|
|
24
25
|
};
|
|
25
26
|
};
|
|
26
27
|
/**
|
|
27
28
|
* Create a Trellis client typed from a contract module's derived outbound surface.
|
|
28
29
|
*/
|
|
29
30
|
export declare function createClient<TApi extends TrellisAPI>(contract: ClientContract<TApi>, nats: NatsConnection, auth: TrellisAuth, opts?: ClientOpts): Trellis<TApi>;
|
|
31
|
+
export declare function createCoreClient(nats: NatsConnection, auth: TrellisAuth, opts?: ClientOpts): Promise<Trellis<TrellisAPI>>;
|
|
30
32
|
export {};
|
|
31
33
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAavC,KAAK,oBAAoB,GAAG;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;CACzC,CAAC;AAEF,KAAK,cAAc,CAAC,IAAI,IAAI;IAC1B,GAAG,EAAE;QACH,KAAK,CAAC,EAAE,IAAI,CAAC;QACb,OAAO,CAAC,EAAE,IAAI,CAAC;KAChB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,SAAS,UAAU,EAClD,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,EAC9B,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,WAAW,EACjB,IAAI,CAAC,EAAE,UAAU,GAChB,OAAO,CAAC,IAAI,CAAC,CAkBf;AAqBD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,WAAW,EACjB,IAAI,CAAC,EAAE,UAAU,GAChB,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAc9B"}
|
package/script/trellis/client.js
CHANGED
|
@@ -1,16 +1,67 @@
|
|
|
1
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
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.createClient = createClient;
|
|
4
|
-
|
|
27
|
+
exports.createCoreClient = createCoreClient;
|
|
28
|
+
const trellis_ts_1 = require("./trellis.ts");
|
|
5
29
|
/**
|
|
6
30
|
* Create a Trellis client typed from a contract module's derived outbound surface.
|
|
7
31
|
*/
|
|
8
32
|
function createClient(contract, nats, auth, opts) {
|
|
9
|
-
|
|
33
|
+
const api = contract.API.trellis ?? contract.API.owned;
|
|
34
|
+
if (!api) {
|
|
35
|
+
throw new Error("Contract is missing an owned or trellis API view");
|
|
36
|
+
}
|
|
37
|
+
return new trellis_ts_1.Trellis(opts?.name ?? "client", nats, auth, {
|
|
10
38
|
log: opts?.log,
|
|
11
39
|
timeout: opts?.timeout,
|
|
12
40
|
stream: opts?.stream,
|
|
13
41
|
noResponderRetry: opts?.noResponderRetry,
|
|
14
|
-
api
|
|
42
|
+
api,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
async function loadCoreApi() {
|
|
46
|
+
try {
|
|
47
|
+
const mod = await Promise.resolve().then(() => __importStar(require("./sdk/core.ts")));
|
|
48
|
+
const api = mod.core?.API.trellis ?? mod.API?.trellis;
|
|
49
|
+
if (api) {
|
|
50
|
+
return api;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
throw new Error("Failed to load the Trellis core SDK. Generate the core SDK first or use createClient(contract, ...) with an explicit contract API.", { cause: error });
|
|
55
|
+
}
|
|
56
|
+
throw new Error("Failed to load the Trellis core SDK API surface. Use createClient(contract, ...) with an explicit contract API if you do not need the generated core SDK.");
|
|
57
|
+
}
|
|
58
|
+
async function createCoreClient(nats, auth, opts) {
|
|
59
|
+
const api = await loadCoreApi();
|
|
60
|
+
return new trellis_ts_1.Trellis(opts?.name ?? "client", nats, auth, {
|
|
61
|
+
log: opts?.log,
|
|
62
|
+
timeout: opts?.timeout,
|
|
63
|
+
stream: opts?.stream,
|
|
64
|
+
noResponderRetry: opts?.noResponderRetry,
|
|
65
|
+
api,
|
|
15
66
|
});
|
|
16
67
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { type InferSchemaType, type SchemaLike } from "
|
|
2
|
-
import { Result } from "@qlever-llc/
|
|
1
|
+
import { type InferSchemaType, type SchemaLike } from "./contracts.ts";
|
|
2
|
+
import { Result } from "@qlever-llc/result";
|
|
3
3
|
import type { StaticDecode, TSchema } from "typebox";
|
|
4
|
-
import { UnexpectedError, ValidationError } from "./errors/index.
|
|
4
|
+
import { UnexpectedError, ValidationError } from "./errors/index.ts";
|
|
5
5
|
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
6
6
|
[key: string]: JsonValue;
|
|
7
7
|
};
|
|
8
8
|
export declare function parse<T extends TSchema>(schema: T, data: JsonValue): Result<StaticDecode<T>, ValidationError | UnexpectedError>;
|
|
9
9
|
export declare function parseSchema<S extends SchemaLike>(schema: S, data: JsonValue): Result<InferSchemaType<S>, ValidationError | UnexpectedError>;
|
|
10
|
+
export declare function parseUnknownSchema(schema: SchemaLike, data: JsonValue): Result<unknown, ValidationError | UnexpectedError>;
|
|
10
11
|
export declare function encode<T extends TSchema>(schema: T, data: unknown): Result<string, ValidationError | UnexpectedError>;
|
|
11
|
-
export declare function encodeSchema
|
|
12
|
+
export declare function encodeSchema(schema: SchemaLike, data: unknown): Result<string, ValidationError | UnexpectedError>;
|
|
12
13
|
//# sourceMappingURL=codec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../../codec.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,UAAU,EAEhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAErE,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX;IACA,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,CAAC;AAUJ,wBAAgB,KAAK,CAAC,CAAC,SAAS,OAAO,EACrC,MAAM,EAAE,CAAC,EACT,IAAI,EAAE,SAAS,GACd,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,eAAe,GAAG,eAAe,CAAC,CAU5D;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,UAAU,EAC9C,MAAM,EAAE,CAAC,EACT,IAAI,EAAE,SAAS,GACd,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,GAAG,eAAe,CAAC,CAW/D;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,SAAS,GACd,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,eAAe,CAAC,CAWpD;AAED,wBAAgB,MAAM,CAAC,CAAC,SAAS,OAAO,EACtC,MAAM,EAAE,CAAC,EACT,IAAI,EAAE,OAAO,GACZ,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAAC,CAUnD;AAED,wBAAgB,YAAY,CAC1B,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,OAAO,GACZ,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAAC,CAWnD"}
|
package/script/trellis/codec.js
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parse = parse;
|
|
4
4
|
exports.parseSchema = parseSchema;
|
|
5
|
+
exports.parseUnknownSchema = parseUnknownSchema;
|
|
5
6
|
exports.encode = encode;
|
|
6
7
|
exports.encodeSchema = encodeSchema;
|
|
7
|
-
const
|
|
8
|
-
const
|
|
8
|
+
const contracts_ts_1 = require("./contracts.ts");
|
|
9
|
+
const result_1 = require("@qlever-llc/result");
|
|
9
10
|
const value_1 = require("typebox/value");
|
|
10
|
-
const
|
|
11
|
+
const index_ts_1 = require("./errors/index.ts");
|
|
11
12
|
function parseWithSchema(schema, data) {
|
|
12
13
|
return value_1.Value.Parse(schema, data);
|
|
13
14
|
}
|
|
@@ -16,51 +17,64 @@ function encodeWithSchema(schema, data) {
|
|
|
16
17
|
}
|
|
17
18
|
function parse(schema, data) {
|
|
18
19
|
try {
|
|
19
|
-
return
|
|
20
|
+
return result_1.Result.ok(parseWithSchema(schema, data));
|
|
20
21
|
}
|
|
21
22
|
catch (cause) {
|
|
22
23
|
if (cause instanceof value_1.ParseError) {
|
|
23
24
|
const errors = value_1.Value.Errors(schema, data);
|
|
24
|
-
return
|
|
25
|
+
return result_1.Result.err(new index_ts_1.ValidationError({ errors, cause }));
|
|
25
26
|
}
|
|
26
|
-
return
|
|
27
|
+
return result_1.Result.err(new index_ts_1.UnexpectedError({ cause }));
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
function parseSchema(schema, data) {
|
|
30
|
-
const raw = (0,
|
|
31
|
+
const raw = (0, contracts_ts_1.unwrapSchema)(schema);
|
|
31
32
|
try {
|
|
32
|
-
return
|
|
33
|
+
return result_1.Result.ok(parseWithSchema(raw, data));
|
|
33
34
|
}
|
|
34
35
|
catch (cause) {
|
|
35
36
|
if (cause instanceof value_1.ParseError) {
|
|
36
37
|
const errors = value_1.Value.Errors(raw, data);
|
|
37
|
-
return
|
|
38
|
+
return result_1.Result.err(new index_ts_1.ValidationError({ errors, cause }));
|
|
38
39
|
}
|
|
39
|
-
return
|
|
40
|
+
return result_1.Result.err(new index_ts_1.UnexpectedError({ cause }));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function parseUnknownSchema(schema, data) {
|
|
44
|
+
const raw = (0, contracts_ts_1.unwrapSchema)(schema);
|
|
45
|
+
try {
|
|
46
|
+
return result_1.Result.ok(parseWithSchema(raw, data));
|
|
47
|
+
}
|
|
48
|
+
catch (cause) {
|
|
49
|
+
if (cause instanceof value_1.ParseError) {
|
|
50
|
+
const errors = value_1.Value.Errors(raw, data);
|
|
51
|
+
return result_1.Result.err(new index_ts_1.ValidationError({ errors, cause }));
|
|
52
|
+
}
|
|
53
|
+
return result_1.Result.err(new index_ts_1.UnexpectedError({ cause }));
|
|
40
54
|
}
|
|
41
55
|
}
|
|
42
56
|
function encode(schema, data) {
|
|
43
57
|
try {
|
|
44
|
-
return
|
|
58
|
+
return result_1.Result.ok(encodeWithSchema(schema, data));
|
|
45
59
|
}
|
|
46
60
|
catch (cause) {
|
|
47
61
|
if (cause instanceof value_1.EncodeError) {
|
|
48
62
|
const errors = value_1.Value.Errors(schema, data);
|
|
49
|
-
return
|
|
63
|
+
return result_1.Result.err(new index_ts_1.ValidationError({ errors, cause }));
|
|
50
64
|
}
|
|
51
|
-
return
|
|
65
|
+
return result_1.Result.err(new index_ts_1.UnexpectedError({ cause }));
|
|
52
66
|
}
|
|
53
67
|
}
|
|
54
68
|
function encodeSchema(schema, data) {
|
|
55
|
-
const raw = (0,
|
|
69
|
+
const raw = (0, contracts_ts_1.unwrapSchema)(schema);
|
|
56
70
|
try {
|
|
57
|
-
return
|
|
71
|
+
return result_1.Result.ok(encodeWithSchema(raw, data));
|
|
58
72
|
}
|
|
59
73
|
catch (cause) {
|
|
60
74
|
if (cause instanceof value_1.EncodeError) {
|
|
61
75
|
const errors = value_1.Value.Errors(raw, data);
|
|
62
|
-
return
|
|
76
|
+
return result_1.Result.err(new index_ts_1.ValidationError({ errors, cause }));
|
|
63
77
|
}
|
|
64
|
-
return
|
|
78
|
+
return result_1.Result.err(new index_ts_1.UnexpectedError({ cause }));
|
|
65
79
|
}
|
|
66
80
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { NatsConnection } from "@nats-io/nats-core";
|
|
2
|
+
import { type DefinedContract as BaseDefinedContract, type ContractApiViews, type ContractDependencyUse, type ContractModule, type ContractUseFn, type DefineContractInput, type EmptyApi, type MergeApis, type OwnedApiFromSource, type SdkContractModule, type TrellisApiLike, type TrellisContractV1, type UsedApiFromUses, type UseSpec } from "../contracts/mod.ts";
|
|
3
|
+
import type { ClientOpts } from "./client.ts";
|
|
4
|
+
import type { Trellis, TrellisAuth } from "./trellis.ts";
|
|
5
|
+
type RuntimeContractMethods<TOwnedApi extends TrellisApiLike, TTrellisApi extends TrellisApiLike> = {
|
|
6
|
+
createClient(nats: NatsConnection, auth: TrellisAuth, opts?: ClientOpts): Trellis<TTrellisApi>;
|
|
7
|
+
};
|
|
8
|
+
export type DefinedContract<TOwnedApi extends TrellisApiLike, TUsedApi extends TrellisApiLike, TTrellisApi extends TrellisApiLike, TContractId extends string = string> = BaseDefinedContract<TOwnedApi, TUsedApi, TTrellisApi, TContractId> & RuntimeContractMethods<TOwnedApi, TTrellisApi>;
|
|
9
|
+
export declare function defineContract<const T extends DefineContractInput<any, any, any, any, any, any>>(source: T): DefinedContract<OwnedApiFromSource<T> & TrellisApiLike, UsedApiFromUses<T["uses"]> & TrellisApiLike, MergeApis<OwnedApiFromSource<T>, UsedApiFromUses<T["uses"]>> & TrellisApiLike, T["id"]>;
|
|
10
|
+
export type { ContractApiViews, ContractDependencyUse, ContractModule, ContractUseFn, DefineContractInput, EmptyApi, SdkContractModule, TrellisApiLike, TrellisContractV1, UseSpec, };
|
|
11
|
+
//# sourceMappingURL=contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EACL,KAAK,eAAe,IAAI,mBAAmB,EAC3C,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EAExB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,OAAO,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAA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Module", { value: true });
|
|
3
|
+
exports.defineContract = defineContract;
|
|
4
|
+
const mod_ts_1 = require("../contracts/mod.ts");
|
|
5
|
+
const client_ts_1 = require("./client.ts");
|
|
6
|
+
function withRuntimeHelpers(contract) {
|
|
7
|
+
const runtimeContract = contract;
|
|
8
|
+
const createRuntimeClient = client_ts_1.createClient;
|
|
9
|
+
runtimeContract.createClient = (nats, auth, opts) => createRuntimeClient(runtimeContract, nats, auth, opts);
|
|
10
|
+
return runtimeContract;
|
|
11
|
+
}
|
|
12
|
+
function defineContract(source) {
|
|
13
|
+
const contract = (0, mod_ts_1.defineContract)(source);
|
|
14
|
+
// TypeScript's recursion limit trips over this cast in Svelte/tsserver, but
|
|
15
|
+
// the runtime helper augmentation preserves the underlying contract shape.
|
|
16
|
+
// @ts-ignore TS2589
|
|
17
|
+
return withRuntimeHelpers(contract);
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../contracts.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.defineContract = void 0;
|
|
18
|
+
__exportStar(require("../contracts/mod.ts"), exports);
|
|
19
|
+
var contract_ts_1 = require("./contract.ts");
|
|
20
|
+
Object.defineProperty(exports, "defineContract", { enumerable: true, get: function () { return contract_ts_1.defineContract; } });
|