@encore.dev/sdk 0.0.0 → 2.0.0-beta.11
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/LICENSE +362 -0
- package/README.md +245 -2
- package/app_meta.test.ts +154 -0
- package/app_meta.ts +226 -0
- package/config/config.test.ts +384 -0
- package/config/config.ts +236 -0
- package/config/mod.ts +15 -0
- package/config/secrets.ts +173 -0
- package/config/value.ts +239 -0
- package/cron/mod.test.ts +52 -0
- package/cron/mod.ts +62 -0
- package/dist/app_meta.d.ts +126 -0
- package/dist/app_meta.d.ts.map +1 -0
- package/dist/app_meta.js +67 -0
- package/dist/app_meta.js.map +1 -0
- package/dist/config/config.d.ts +135 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +115 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/mod.d.ts +5 -0
- package/dist/config/mod.d.ts.map +1 -0
- package/dist/config/mod.js +3 -0
- package/dist/config/mod.js.map +1 -0
- package/dist/config/secrets.d.ts +124 -0
- package/dist/config/secrets.d.ts.map +1 -0
- package/dist/config/secrets.js +73 -0
- package/dist/config/secrets.js.map +1 -0
- package/dist/config/value.d.ts +54 -0
- package/dist/config/value.d.ts.map +1 -0
- package/dist/config/value.js +181 -0
- package/dist/config/value.js.map +1 -0
- package/dist/cron/mod.d.ts +57 -0
- package/dist/cron/mod.d.ts.map +1 -0
- package/dist/cron/mod.js +39 -0
- package/dist/cron/mod.js.map +1 -0
- package/dist/frontends/mod.d.ts +39 -0
- package/dist/frontends/mod.d.ts.map +1 -0
- package/dist/frontends/mod.js +47 -0
- package/dist/frontends/mod.js.map +1 -0
- package/dist/gateway/errors.d.ts +101 -0
- package/dist/gateway/errors.d.ts.map +1 -0
- package/dist/gateway/errors.js +146 -0
- package/dist/gateway/errors.js.map +1 -0
- package/dist/gateway/match.d.ts +127 -0
- package/dist/gateway/match.d.ts.map +1 -0
- package/dist/gateway/match.js +206 -0
- package/dist/gateway/match.js.map +1 -0
- package/dist/gateway/middleware.d.ts +108 -0
- package/dist/gateway/middleware.d.ts.map +1 -0
- package/dist/gateway/middleware.js +9 -0
- package/dist/gateway/middleware.js.map +1 -0
- package/dist/gateway/mod.d.ts +130 -0
- package/dist/gateway/mod.d.ts.map +1 -0
- package/dist/gateway/mod.js +188 -0
- package/dist/gateway/mod.js.map +1 -0
- package/dist/gateway/request.d.ts +304 -0
- package/dist/gateway/request.d.ts.map +1 -0
- package/dist/gateway/request.js +403 -0
- package/dist/gateway/request.js.map +1 -0
- package/dist/gateway/serve.d.ts +114 -0
- package/dist/gateway/serve.d.ts.map +1 -0
- package/dist/gateway/serve.js +510 -0
- package/dist/gateway/serve.js.map +1 -0
- package/dist/gateways/mod.d.ts +42 -0
- package/dist/gateways/mod.d.ts.map +1 -0
- package/dist/gateways/mod.js +55 -0
- package/dist/gateways/mod.js.map +1 -0
- package/dist/internal/clients/call.d.ts +171 -0
- package/dist/internal/clients/call.d.ts.map +1 -0
- package/dist/internal/clients/call.js +284 -0
- package/dist/internal/clients/call.js.map +1 -0
- package/dist/internal/clients/grpc.d.ts +108 -0
- package/dist/internal/clients/grpc.d.ts.map +1 -0
- package/dist/internal/clients/grpc.js +349 -0
- package/dist/internal/clients/grpc.js.map +1 -0
- package/dist/internal/clients/mod.d.ts +81 -0
- package/dist/internal/clients/mod.d.ts.map +1 -0
- package/dist/internal/clients/mod.js +237 -0
- package/dist/internal/clients/mod.js.map +1 -0
- package/dist/internal/fetch.d.ts +67 -0
- package/dist/internal/fetch.d.ts.map +1 -0
- package/dist/internal/fetch.js +271 -0
- package/dist/internal/fetch.js.map +1 -0
- package/dist/internal/otel/backend.d.ts +52 -0
- package/dist/internal/otel/backend.d.ts.map +1 -0
- package/dist/internal/otel/backend.js +2 -0
- package/dist/internal/otel/backend.js.map +1 -0
- package/dist/internal/otel/context.d.ts +11 -0
- package/dist/internal/otel/context.d.ts.map +1 -0
- package/dist/internal/otel/context.js +34 -0
- package/dist/internal/otel/context.js.map +1 -0
- package/dist/internal/otel/context_manager.d.ts +23 -0
- package/dist/internal/otel/context_manager.d.ts.map +1 -0
- package/dist/internal/otel/context_manager.js +120 -0
- package/dist/internal/otel/context_manager.js.map +1 -0
- package/dist/internal/otel/encode.d.ts +114 -0
- package/dist/internal/otel/encode.d.ts.map +1 -0
- package/dist/internal/otel/encode.js +290 -0
- package/dist/internal/otel/encode.js.map +1 -0
- package/dist/internal/otel/http.d.ts +11 -0
- package/dist/internal/otel/http.d.ts.map +1 -0
- package/dist/internal/otel/http.js +65 -0
- package/dist/internal/otel/http.js.map +1 -0
- package/dist/internal/otel/index.d.ts +9 -0
- package/dist/internal/otel/index.d.ts.map +1 -0
- package/dist/internal/otel/index.js +8 -0
- package/dist/internal/otel/index.js.map +1 -0
- package/dist/internal/otel/meter.d.ts +74 -0
- package/dist/internal/otel/meter.d.ts.map +1 -0
- package/dist/internal/otel/meter.js +265 -0
- package/dist/internal/otel/meter.js.map +1 -0
- package/dist/internal/otel/propagator.d.ts +15 -0
- package/dist/internal/otel/propagator.d.ts.map +1 -0
- package/dist/internal/otel/propagator.js +61 -0
- package/dist/internal/otel/propagator.js.map +1 -0
- package/dist/internal/otel/provider.d.ts +13 -0
- package/dist/internal/otel/provider.d.ts.map +1 -0
- package/dist/internal/otel/provider.js +22 -0
- package/dist/internal/otel/provider.js.map +1 -0
- package/dist/internal/otel/span.d.ts +75 -0
- package/dist/internal/otel/span.d.ts.map +1 -0
- package/dist/internal/otel/span.js +234 -0
- package/dist/internal/otel/span.js.map +1 -0
- package/dist/internal/otel/tracer.d.ts +16 -0
- package/dist/internal/otel/tracer.d.ts.map +1 -0
- package/dist/internal/otel/tracer.js +71 -0
- package/dist/internal/otel/tracer.js.map +1 -0
- package/dist/internal/reqfields.d.ts +170 -0
- package/dist/internal/reqfields.d.ts.map +1 -0
- package/dist/internal/reqfields.js +349 -0
- package/dist/internal/reqfields.js.map +1 -0
- package/dist/internal/runtime/meter.d.ts +12 -0
- package/dist/internal/runtime/meter.d.ts.map +1 -0
- package/dist/internal/runtime/meter.js +22 -0
- package/dist/internal/runtime/meter.js.map +1 -0
- package/dist/internal/runtime/mod.d.ts +18 -0
- package/dist/internal/runtime/mod.d.ts.map +1 -0
- package/dist/internal/runtime/mod.js +59 -0
- package/dist/internal/runtime/mod.js.map +1 -0
- package/dist/internal/runtime/napi/napi.cjs +308 -0
- package/dist/internal/runtime/napi/napi.d.cts +1249 -0
- package/dist/internal/runtime/shutdown.d.ts +91 -0
- package/dist/internal/runtime/shutdown.d.ts.map +1 -0
- package/dist/internal/runtime/shutdown.js +299 -0
- package/dist/internal/runtime/shutdown.js.map +1 -0
- package/dist/internal/testing/carry.d.ts +49 -0
- package/dist/internal/testing/carry.d.ts.map +1 -0
- package/dist/internal/testing/carry.js +77 -0
- package/dist/internal/testing/carry.js.map +1 -0
- package/dist/internal/testing/runner.d.ts +2 -0
- package/dist/internal/testing/runner.d.ts.map +1 -0
- package/dist/internal/testing/runner.js +10 -0
- package/dist/internal/testing/runner.js.map +1 -0
- package/dist/internal/testing/scope.d.ts +112 -0
- package/dist/internal/testing/scope.d.ts.map +1 -0
- package/dist/internal/testing/scope.js +346 -0
- package/dist/internal/testing/scope.js.map +1 -0
- package/dist/internal/testing/steps.d.ts +55 -0
- package/dist/internal/testing/steps.d.ts.map +1 -0
- package/dist/internal/testing/steps.js +295 -0
- package/dist/internal/testing/steps.js.map +1 -0
- package/dist/internal/testing/telemetry.d.ts +305 -0
- package/dist/internal/testing/telemetry.d.ts.map +1 -0
- package/dist/internal/testing/telemetry.js +188 -0
- package/dist/internal/testing/telemetry.js.map +1 -0
- package/dist/internal/utils/constraints.d.ts +10 -0
- package/dist/internal/utils/constraints.d.ts.map +1 -0
- package/dist/internal/utils/constraints.js +2 -0
- package/dist/internal/utils/constraints.js.map +1 -0
- package/dist/log/index.d.ts +40 -0
- package/dist/log/index.d.ts.map +1 -0
- package/dist/log/index.js +44 -0
- package/dist/log/index.js.map +1 -0
- package/dist/log/logger.d.ts +125 -0
- package/dist/log/logger.d.ts.map +1 -0
- package/dist/log/logger.js +203 -0
- package/dist/log/logger.js.map +1 -0
- package/dist/log/runtime.d.ts +21 -0
- package/dist/log/runtime.d.ts.map +1 -0
- package/dist/log/runtime.js +22 -0
- package/dist/log/runtime.js.map +1 -0
- package/dist/log/stderr.d.ts +10 -0
- package/dist/log/stderr.d.ts.map +1 -0
- package/dist/log/stderr.js +25 -0
- package/dist/log/stderr.js.map +1 -0
- package/dist/metrics/mod.d.ts +242 -0
- package/dist/metrics/mod.d.ts.map +1 -0
- package/dist/metrics/mod.js +353 -0
- package/dist/metrics/mod.js.map +1 -0
- package/dist/mod.d.ts +5 -0
- package/dist/mod.d.ts.map +1 -0
- package/dist/mod.js +3 -0
- package/dist/mod.js.map +1 -0
- package/dist/otel.d.ts +10 -0
- package/dist/otel.d.ts.map +1 -0
- package/dist/otel.js +13 -0
- package/dist/otel.js.map +1 -0
- package/dist/pubsub/encoding.d.ts +8 -0
- package/dist/pubsub/encoding.d.ts.map +1 -0
- package/dist/pubsub/encoding.js +18 -0
- package/dist/pubsub/encoding.js.map +1 -0
- package/dist/pubsub/mod.d.ts +7 -0
- package/dist/pubsub/mod.d.ts.map +1 -0
- package/dist/pubsub/mod.js +3 -0
- package/dist/pubsub/mod.js.map +1 -0
- package/dist/pubsub/refs.d.ts +20 -0
- package/dist/pubsub/refs.d.ts.map +1 -0
- package/dist/pubsub/refs.js +11 -0
- package/dist/pubsub/refs.js.map +1 -0
- package/dist/pubsub/subscription.d.ts +223 -0
- package/dist/pubsub/subscription.d.ts.map +1 -0
- package/dist/pubsub/subscription.js +121 -0
- package/dist/pubsub/subscription.js.map +1 -0
- package/dist/pubsub/topic.d.ts +218 -0
- package/dist/pubsub/topic.d.ts.map +1 -0
- package/dist/pubsub/topic.js +281 -0
- package/dist/pubsub/topic.js.map +1 -0
- package/dist/reqctx/mod.d.ts +174 -0
- package/dist/reqctx/mod.d.ts.map +1 -0
- package/dist/reqctx/mod.js +144 -0
- package/dist/reqctx/mod.js.map +1 -0
- package/dist/services/index.d.ts +171 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +187 -0
- package/dist/services/index.js.map +1 -0
- package/dist/shutdown/mod.d.ts +60 -0
- package/dist/shutdown/mod.d.ts.map +1 -0
- package/dist/shutdown/mod.js +59 -0
- package/dist/shutdown/mod.js.map +1 -0
- package/dist/storage/clickhouse/database.d.ts +262 -0
- package/dist/storage/clickhouse/database.d.ts.map +1 -0
- package/dist/storage/clickhouse/database.js +362 -0
- package/dist/storage/clickhouse/database.js.map +1 -0
- package/dist/storage/clickhouse/errors.d.ts +67 -0
- package/dist/storage/clickhouse/errors.d.ts.map +1 -0
- package/dist/storage/clickhouse/errors.js +91 -0
- package/dist/storage/clickhouse/errors.js.map +1 -0
- package/dist/storage/clickhouse/mod.d.ts +31 -0
- package/dist/storage/clickhouse/mod.d.ts.map +1 -0
- package/dist/storage/clickhouse/mod.js +29 -0
- package/dist/storage/clickhouse/mod.js.map +1 -0
- package/dist/storage/objects/bucket.d.ts +522 -0
- package/dist/storage/objects/bucket.d.ts.map +1 -0
- package/dist/storage/objects/bucket.js +414 -0
- package/dist/storage/objects/bucket.js.map +1 -0
- package/dist/storage/objects/error.d.ts +24 -0
- package/dist/storage/objects/error.d.ts.map +1 -0
- package/dist/storage/objects/error.js +105 -0
- package/dist/storage/objects/error.js.map +1 -0
- package/dist/storage/objects/mod.d.ts +5 -0
- package/dist/storage/objects/mod.d.ts.map +1 -0
- package/dist/storage/objects/mod.js +3 -0
- package/dist/storage/objects/mod.js.map +1 -0
- package/dist/storage/objects/refs.d.ts +47 -0
- package/dist/storage/objects/refs.d.ts.map +1 -0
- package/dist/storage/objects/refs.js +26 -0
- package/dist/storage/objects/refs.js.map +1 -0
- package/dist/storage/postgres/database.d.ts +365 -0
- package/dist/storage/postgres/database.d.ts.map +1 -0
- package/dist/storage/postgres/database.js +480 -0
- package/dist/storage/postgres/database.js.map +1 -0
- package/dist/storage/postgres/errors.d.ts +120 -0
- package/dist/storage/postgres/errors.d.ts.map +1 -0
- package/dist/storage/postgres/errors.js +162 -0
- package/dist/storage/postgres/errors.js.map +1 -0
- package/dist/storage/postgres/interval.d.ts +44 -0
- package/dist/storage/postgres/interval.d.ts.map +1 -0
- package/dist/storage/postgres/interval.js +153 -0
- package/dist/storage/postgres/interval.js.map +1 -0
- package/dist/storage/postgres/mod.d.ts +5 -0
- package/dist/storage/postgres/mod.d.ts.map +1 -0
- package/dist/storage/postgres/mod.js +4 -0
- package/dist/storage/postgres/mod.js.map +1 -0
- package/dist/storage/redis/bitfield.d.ts +67 -0
- package/dist/storage/redis/bitfield.d.ts.map +1 -0
- package/dist/storage/redis/bitfield.js +114 -0
- package/dist/storage/redis/bitfield.js.map +1 -0
- package/dist/storage/redis/command.d.ts +45 -0
- package/dist/storage/redis/command.d.ts.map +1 -0
- package/dist/storage/redis/command.js +78 -0
- package/dist/storage/redis/command.js.map +1 -0
- package/dist/storage/redis/commands.d.ts +657 -0
- package/dist/storage/redis/commands.d.ts.map +1 -0
- package/dist/storage/redis/commands.js +759 -0
- package/dist/storage/redis/commands.js.map +1 -0
- package/dist/storage/redis/database.d.ts +336 -0
- package/dist/storage/redis/database.d.ts.map +1 -0
- package/dist/storage/redis/database.js +398 -0
- package/dist/storage/redis/database.js.map +1 -0
- package/dist/storage/redis/mod.d.ts +115 -0
- package/dist/storage/redis/mod.d.ts.map +1 -0
- package/dist/storage/redis/mod.js +109 -0
- package/dist/storage/redis/mod.js.map +1 -0
- package/dist/storage/redis/native.d.ts +16 -0
- package/dist/storage/redis/native.d.ts.map +1 -0
- package/dist/storage/redis/native.js +21 -0
- package/dist/storage/redis/native.js.map +1 -0
- package/dist/storage/redis/options.d.ts +90 -0
- package/dist/storage/redis/options.d.ts.map +1 -0
- package/dist/storage/redis/options.js +53 -0
- package/dist/storage/redis/options.js.map +1 -0
- package/dist/storage/redis/pubsub.d.ts +55 -0
- package/dist/storage/redis/pubsub.d.ts.map +1 -0
- package/dist/storage/redis/pubsub.js +88 -0
- package/dist/storage/redis/pubsub.js.map +1 -0
- package/dist/storage/redis/reply.d.ts +290 -0
- package/dist/storage/redis/reply.d.ts.map +1 -0
- package/dist/storage/redis/reply.js +611 -0
- package/dist/storage/redis/reply.js.map +1 -0
- package/dist/storage/redis/scan.d.ts +12 -0
- package/dist/storage/redis/scan.d.ts.map +1 -0
- package/dist/storage/redis/scan.js +76 -0
- package/dist/storage/redis/scan.js.map +1 -0
- package/dist/storage/redis/script.d.ts +92 -0
- package/dist/storage/redis/script.d.ts.map +1 -0
- package/dist/storage/redis/script.js +143 -0
- package/dist/storage/redis/script.js.map +1 -0
- package/dist/storage/redis/target.d.ts +49 -0
- package/dist/storage/redis/target.d.ts.map +1 -0
- package/dist/storage/redis/target.js +93 -0
- package/dist/storage/redis/target.js.map +1 -0
- package/dist/storage/redis/wire.d.ts +102 -0
- package/dist/storage/redis/wire.d.ts.map +1 -0
- package/dist/storage/redis/wire.js +309 -0
- package/dist/storage/redis/wire.js.map +1 -0
- package/dist/testing/bun.d.ts +8 -0
- package/dist/testing/bun.d.ts.map +1 -0
- package/dist/testing/bun.js +13 -0
- package/dist/testing/bun.js.map +1 -0
- package/dist/testing/jest.d.ts +8 -0
- package/dist/testing/jest.d.ts.map +1 -0
- package/dist/testing/jest.js +11 -0
- package/dist/testing/jest.js.map +1 -0
- package/dist/testing/mod.d.ts +183 -0
- package/dist/testing/mod.d.ts.map +1 -0
- package/dist/testing/mod.js +271 -0
- package/dist/testing/mod.js.map +1 -0
- package/dist/testing/node.d.ts +9 -0
- package/dist/testing/node.d.ts.map +1 -0
- package/dist/testing/node.js +12 -0
- package/dist/testing/node.js.map +1 -0
- package/dist/testing/playwright.d.ts +93 -0
- package/dist/testing/playwright.d.ts.map +1 -0
- package/dist/testing/playwright.js +164 -0
- package/dist/testing/playwright.js.map +1 -0
- package/dist/testing/puppeteer.d.ts +36 -0
- package/dist/testing/puppeteer.d.ts.map +1 -0
- package/dist/testing/puppeteer.js +70 -0
- package/dist/testing/puppeteer.js.map +1 -0
- package/dist/testing/system.d.ts +181 -0
- package/dist/testing/system.d.ts.map +1 -0
- package/dist/testing/system.js +255 -0
- package/dist/testing/system.js.map +1 -0
- package/dist/testing/vitest.d.ts +8 -0
- package/dist/testing/vitest.d.ts.map +1 -0
- package/dist/testing/vitest.js +13 -0
- package/dist/testing/vitest.js.map +1 -0
- package/dist/tracing/http.d.ts +11 -0
- package/dist/tracing/http.d.ts.map +1 -0
- package/dist/tracing/http.js +34 -0
- package/dist/tracing/http.js.map +1 -0
- package/dist/tracing/mod.d.ts +20 -0
- package/dist/tracing/mod.d.ts.map +1 -0
- package/dist/tracing/mod.js +47 -0
- package/dist/tracing/mod.js.map +1 -0
- package/dist/tracing/node.d.ts +10 -0
- package/dist/tracing/node.d.ts.map +1 -0
- package/dist/tracing/node.js +142 -0
- package/dist/tracing/node.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/mod.d.ts +43 -0
- package/dist/types/mod.d.ts.map +1 -0
- package/dist/types/mod.js +65 -0
- package/dist/types/mod.js.map +1 -0
- package/frontends/mod.test.ts +51 -0
- package/frontends/mod.ts +50 -0
- package/gateway/errors.ts +172 -0
- package/gateway/gateway.e2e.test.ts +297 -0
- package/gateway/gateway.test.ts +891 -0
- package/gateway/match.ts +239 -0
- package/gateway/middleware.ts +134 -0
- package/gateway/mod.ts +211 -0
- package/gateway/request.ts +578 -0
- package/gateway/serve.ts +738 -0
- package/gateways/mod.ts +60 -0
- package/internal/clients/call.ts +418 -0
- package/internal/clients/grpc.test.ts +664 -0
- package/internal/clients/grpc.ts +485 -0
- package/internal/clients/mod.test.ts +481 -0
- package/internal/clients/mod.ts +337 -0
- package/internal/fetch.ts +320 -0
- package/internal/otel/backend.ts +60 -0
- package/internal/otel/context.test.ts +70 -0
- package/internal/otel/context.ts +48 -0
- package/internal/otel/context_manager.test.ts +154 -0
- package/internal/otel/context_manager.ts +141 -0
- package/internal/otel/encode.test.ts +266 -0
- package/internal/otel/encode.ts +408 -0
- package/internal/otel/http.ts +92 -0
- package/internal/otel/index.ts +14 -0
- package/internal/otel/meter.test.ts +231 -0
- package/internal/otel/meter.ts +332 -0
- package/internal/otel/propagator.test.ts +105 -0
- package/internal/otel/propagator.ts +68 -0
- package/internal/otel/provider.ts +26 -0
- package/internal/otel/span.ts +281 -0
- package/internal/otel/tracer.test.ts +380 -0
- package/internal/otel/tracer.ts +111 -0
- package/internal/reqfields.ts +423 -0
- package/internal/runtime/meter.ts +26 -0
- package/internal/runtime/mod.ts +81 -0
- package/internal/runtime/napi/napi.cjs +308 -0
- package/internal/runtime/napi/napi.d.cts +1249 -0
- package/internal/runtime/shutdown.test.ts +464 -0
- package/internal/runtime/shutdown.ts +350 -0
- package/internal/testing/carry.test.ts +242 -0
- package/internal/testing/carry.ts +101 -0
- package/internal/testing/runner.ts +10 -0
- package/internal/testing/scope.ts +384 -0
- package/internal/testing/steps.test.ts +152 -0
- package/internal/testing/steps.ts +342 -0
- package/internal/testing/telemetry.test.ts +210 -0
- package/internal/testing/telemetry.ts +466 -0
- package/internal/utils/constraints.ts +12 -0
- package/log/index.ts +107 -0
- package/log/logger.test.ts +194 -0
- package/log/logger.ts +308 -0
- package/log/runtime.test.ts +65 -0
- package/log/runtime.ts +40 -0
- package/log/stderr.test.ts +23 -0
- package/log/stderr.ts +24 -0
- package/metrics/export.test.ts +341 -0
- package/metrics/mod.test.ts +177 -0
- package/metrics/mod.ts +450 -0
- package/mod.ts +15 -0
- package/otel.test.ts +98 -0
- package/otel.ts +17 -0
- package/package.json +208 -5
- package/pubsub/encoding.ts +18 -0
- package/pubsub/mod.ts +26 -0
- package/pubsub/pubsub.test.ts +405 -0
- package/pubsub/refs.ts +38 -0
- package/pubsub/subscription.ts +359 -0
- package/pubsub/topic.test.ts +147 -0
- package/pubsub/topic.ts +431 -0
- package/reqctx/mod.ts +267 -0
- package/reqctx/reqctx.test.ts +216 -0
- package/scripts/postprocess-docs.test.ts +58 -0
- package/services/index.test.ts +393 -0
- package/services/index.ts +215 -0
- package/shutdown/mod.ts +78 -0
- package/storage/clickhouse/database.integration.test.ts +337 -0
- package/storage/clickhouse/database.test.ts +279 -0
- package/storage/clickhouse/database.ts +586 -0
- package/storage/clickhouse/errors.ts +130 -0
- package/storage/clickhouse/mod.ts +37 -0
- package/storage/objects/bucket.test.ts +573 -0
- package/storage/objects/bucket.ts +968 -0
- package/storage/objects/error.ts +121 -0
- package/storage/objects/mod.ts +50 -0
- package/storage/objects/refs.ts +117 -0
- package/storage/postgres/database.integration.test.ts +450 -0
- package/storage/postgres/database.test.ts +428 -0
- package/storage/postgres/database.ts +658 -0
- package/storage/postgres/errors.ts +186 -0
- package/storage/postgres/interval.test.ts +72 -0
- package/storage/postgres/interval.ts +170 -0
- package/storage/postgres/mod.ts +19 -0
- package/storage/redis/bitfield.ts +162 -0
- package/storage/redis/command.ts +84 -0
- package/storage/redis/commands.ts +1471 -0
- package/storage/redis/database.ts +520 -0
- package/storage/redis/mod.ts +171 -0
- package/storage/redis/native.ts +22 -0
- package/storage/redis/options.ts +119 -0
- package/storage/redis/pubsub.ts +92 -0
- package/storage/redis/redis.test.ts +866 -0
- package/storage/redis/reply.ts +780 -0
- package/storage/redis/runtime.test.ts +248 -0
- package/storage/redis/scan.ts +125 -0
- package/storage/redis/script.ts +162 -0
- package/storage/redis/target.ts +134 -0
- package/storage/redis/wire.ts +345 -0
- package/testing/bun.ts +13 -0
- package/testing/jest.ts +11 -0
- package/testing/mod.ts +393 -0
- package/testing/node.ts +12 -0
- package/testing/playwright.ts +247 -0
- package/testing/puppeteer.ts +101 -0
- package/testing/system.test.ts +108 -0
- package/testing/system.ts +373 -0
- package/testing/vitest.ts +13 -0
- package/tracing/http.ts +49 -0
- package/tracing/mod.ts +83 -0
- package/tracing/native.test.ts +276 -0
- package/tracing/node.ts +176 -0
- package/tracing/tracing.test.ts +953 -0
- package/types/mod.ts +92 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code in an application's gateway: Middleware that authenticates,
|
|
3
|
+
* authorizes, limits, logs or meters the public requests the gateway serves,
|
|
4
|
+
* before they reach a service and after they return.
|
|
5
|
+
*
|
|
6
|
+
* A gateway with code is a service that hosts it, declared by a `gateway`
|
|
7
|
+
* section in the service's `encore.service.json`. The section takes what
|
|
8
|
+
* `encore.gateway.json` takes but the name: the gateway is named after its
|
|
9
|
+
* service.
|
|
10
|
+
*
|
|
11
|
+
* ```json
|
|
12
|
+
* {
|
|
13
|
+
* "name": "edge",
|
|
14
|
+
* "lang": "typescript",
|
|
15
|
+
* "entry": "main.ts",
|
|
16
|
+
* "gateway": {}
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* The service's program serves the gateway with its Middleware, and nothing
|
|
21
|
+
* else. As any service, it has its own secrets, caches, databases, topics
|
|
22
|
+
* and configs, and may call other services.
|
|
23
|
+
*
|
|
24
|
+
* ```typescript
|
|
25
|
+
* import * as gateway from "@encore.dev/sdk/gateway";
|
|
26
|
+
* import { ErrCode, match } from "@encore.dev/sdk/gateway";
|
|
27
|
+
*
|
|
28
|
+
* class Auth implements gateway.Middleware {
|
|
29
|
+
* match = match.pathPrefix("/api");
|
|
30
|
+
*
|
|
31
|
+
* async onRequest(req: gateway.Request) {
|
|
32
|
+
* const user = await verify(req.header("authorization"), req.signal);
|
|
33
|
+
* if (user === undefined) {
|
|
34
|
+
* return gateway.reject(ErrCode.Unauthenticated, "invalid token");
|
|
35
|
+
* }
|
|
36
|
+
* req.setHeader("x-user-id", user.id);
|
|
37
|
+
* req.state = user;
|
|
38
|
+
* }
|
|
39
|
+
* }
|
|
40
|
+
*
|
|
41
|
+
* await gateway.serve(new Auth());
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* ## Hooks
|
|
45
|
+
*
|
|
46
|
+
* A {@link Middleware} is called at the hooks it has, and no others:
|
|
47
|
+
*
|
|
48
|
+
* - `onRequest`, before the request is forwarded: it lets the request
|
|
49
|
+
* through, edited, or answers it itself;
|
|
50
|
+
* - `onRequestBody` and `onResponseBody`, with each chunk of the bodies, to
|
|
51
|
+
* observe;
|
|
52
|
+
* - `onResponse`, before the response is written, to edit its headers;
|
|
53
|
+
* - `onComplete`, once the request is done, off its path: where to log,
|
|
54
|
+
* meter or bill it.
|
|
55
|
+
*
|
|
56
|
+
* A Middleware is called only for the requests its `match` matches. Encore
|
|
57
|
+
* checks it before a request reaches JavaScript, so a request no Middleware
|
|
58
|
+
* is interested in costs the program nothing, and one whose only Middleware
|
|
59
|
+
* takes `onComplete` costs nothing on its way. A hook may read any of the
|
|
60
|
+
* request's headers, query parameters and cookies; each reaches JavaScript
|
|
61
|
+
* only as the hook reads it.
|
|
62
|
+
*
|
|
63
|
+
* Middleware see only public requests the gateway routes: calls between
|
|
64
|
+
* services, Pub/Sub pushes and requests for paths the gateway does not
|
|
65
|
+
* expose are Encore's alone, and so are CORS preflights, but for a gateway
|
|
66
|
+
* whose CORS is off (`"cors": false`), which routes them as any request.
|
|
67
|
+
*
|
|
68
|
+
* ## Answering a request
|
|
69
|
+
*
|
|
70
|
+
* `onRequest` returns nothing to let the request through, or a
|
|
71
|
+
* {@link Rejection} to answer it, returned or thrown: {@link reject}
|
|
72
|
+
* answers with an Encore error, as a service does, and {@link respond} with
|
|
73
|
+
* any response. Any other error, or a timeout, fails the hook, and the
|
|
74
|
+
* Middleware's `onError` says what happens to the request: `"failClosed"`
|
|
75
|
+
* refuses it, `"failOpen"` lets it through.
|
|
76
|
+
*
|
|
77
|
+
* ## Request Context
|
|
78
|
+
*
|
|
79
|
+
* `onRequest` sets the request's Request Context fields
|
|
80
|
+
* (`@encore.dev/sdk/reqctx`) with {@link Request.set}: the Middleware after
|
|
81
|
+
* it, the service the request reaches and the services that one calls with
|
|
82
|
+
* the request's context read them, as `currentUser.get()`. No client can set
|
|
83
|
+
* one. Every hook runs in its request's context, so it reads them with
|
|
84
|
+
* `field.get()` too, or {@link Request.get}: `onComplete` as the request was
|
|
85
|
+
* forwarded.
|
|
86
|
+
*
|
|
87
|
+
* ## Concurrency
|
|
88
|
+
*
|
|
89
|
+
* Hooks run on the event loop. One Middleware's hooks for one request are
|
|
90
|
+
* called one at a time, in the order of the request's life; hooks for
|
|
91
|
+
* different requests run concurrently. A hook that blocks the event loop
|
|
92
|
+
* delays every request. `onRequest` and `onResponse` have a timeout
|
|
93
|
+
* (`timeoutMs`); {@link Request.signal} aborts when it passes, for the work
|
|
94
|
+
* the hook awaits to stop too.
|
|
95
|
+
*
|
|
96
|
+
* Should JavaScript fall far behind the requests, the gateway refuses the
|
|
97
|
+
* hooks it cannot queue, as failures `onError` handles, rather than holding
|
|
98
|
+
* requests without limit.
|
|
99
|
+
*
|
|
100
|
+
* While a hook runs, the request's trace and Request Context are the
|
|
101
|
+
* current ones: spans it starts are part of the trace, `field.get()` reads
|
|
102
|
+
* the request's fields, and calls it makes to services carry both, with the
|
|
103
|
+
* fields `onRequest` has set so far.
|
|
104
|
+
*
|
|
105
|
+
* @module
|
|
106
|
+
*/
|
|
107
|
+
import { RT } from '../internal/runtime/mod.js';
|
|
108
|
+
import * as napi from '../internal/runtime/napi/napi.cjs';
|
|
109
|
+
import { forceCleanupOnRepeat, hold } from '../internal/runtime/shutdown.js';
|
|
110
|
+
import log from '../log/index.js';
|
|
111
|
+
import { GatewayError } from './errors.js';
|
|
112
|
+
import { check, Dispatcher, spec, } from './serve.js';
|
|
113
|
+
export * as match from './match.js';
|
|
114
|
+
export { ErrCode, GatewayError, Rejection, httpStatus, reject, respond, } from './errors.js';
|
|
115
|
+
export { Hook, Request, Response } from './request.js';
|
|
116
|
+
let served = false;
|
|
117
|
+
/** The runtime's gateway functions, of its gateway variant, which a gateway
|
|
118
|
+
* program loads. */
|
|
119
|
+
function native() {
|
|
120
|
+
const n = napi;
|
|
121
|
+
if (typeof n.gatewayServe !== 'function') {
|
|
122
|
+
throw new GatewayError('this process does not run the gateway variant of the Encore runtime: Encore runs a ' +
|
|
123
|
+
'service with a "gateway" section in its encore.service.json on it, telling it where ' +
|
|
124
|
+
'to serve the gateway in ENCORE_GATEWAY_LISTEN');
|
|
125
|
+
}
|
|
126
|
+
return n;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Serves the gateway this service hosts, with `middleware` in order, until
|
|
130
|
+
* Encore shuts the process down. Call it once, at the end of the program's
|
|
131
|
+
* entry point.
|
|
132
|
+
*
|
|
133
|
+
* While the gateway drains on the first SIGTERM, the hooks keep running; a
|
|
134
|
+
* second SIGTERM hurries the shutdown. The promise resolves once the gateway
|
|
135
|
+
* has stopped and every hook it queued has been called; Encore exits the
|
|
136
|
+
* process once its shutdown completes.
|
|
137
|
+
*
|
|
138
|
+
* It rejects with a {@link GatewayError} when the process is not a gateway
|
|
139
|
+
* program Encore runs, as under `encore run`; a Middleware is invalid, such
|
|
140
|
+
* as a name repeated, or a `match` the gateway refuses, such as an invalid
|
|
141
|
+
* regular expression; or the gateway is already served.
|
|
142
|
+
*/
|
|
143
|
+
export async function serve(...middleware) {
|
|
144
|
+
const checked = check(middleware);
|
|
145
|
+
const gw = native();
|
|
146
|
+
if (served)
|
|
147
|
+
throw new GatewayError('the gateway is served once per process');
|
|
148
|
+
served = true;
|
|
149
|
+
const mws = new Map();
|
|
150
|
+
let listen;
|
|
151
|
+
const dispatcher = new Dispatcher(gw, mws);
|
|
152
|
+
try {
|
|
153
|
+
for (const reg of checked)
|
|
154
|
+
mws.set(gw.gatewayRegister(spec(reg)), reg);
|
|
155
|
+
// Encore cleans up the infrastructure the hooks use only once every hook
|
|
156
|
+
// the gateway queued has been called.
|
|
157
|
+
const held = hold();
|
|
158
|
+
void dispatcher.closed
|
|
159
|
+
.then(() => dispatcher.drained())
|
|
160
|
+
.finally(() => held.release());
|
|
161
|
+
try {
|
|
162
|
+
listen = gw.gatewayServe(RT, events => {
|
|
163
|
+
try {
|
|
164
|
+
dispatcher.deliver(events);
|
|
165
|
+
}
|
|
166
|
+
catch (err) {
|
|
167
|
+
log.error(err, "cannot hand on the gateway's middleware events");
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
catch (err) {
|
|
172
|
+
held.release();
|
|
173
|
+
throw err;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
catch (err) {
|
|
177
|
+
throw new GatewayError(err instanceof Error ? err.message : String(err));
|
|
178
|
+
}
|
|
179
|
+
log.debug(`serving the gateway on ${listen}`);
|
|
180
|
+
forceCleanupOnRepeat('SIGTERM');
|
|
181
|
+
await dispatcher.closed;
|
|
182
|
+
await dispatcher.drained();
|
|
183
|
+
const dropped = gw.gatewayDropped();
|
|
184
|
+
if (dropped > 0) {
|
|
185
|
+
log.warn(`dropped ${dropped} body chunks and completions the middleware did not keep up with`);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=mod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../../gateway/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyGG;AAEH,OAAO,EAAC,EAAE,EAAC,MAAM,yBAAyB,CAAC;AAC3C,OAAO,KAAK,IAAI,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAC,oBAAoB,EAAE,IAAI,EAAC,MAAM,8BAA8B,CAAC;AACxE,OAAO,GAAG,MAAM,QAAQ,CAAC;AACzB,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AAEtC,OAAO,EACL,KAAK,EACL,UAAU,EACV,IAAI,GAGL,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EACL,OAAO,EACP,YAAY,EACZ,SAAS,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AAE,CAAC,CAAC;QACjC,IAAI,CAAC;YACH,MAAM,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE;gBACpC,IAAI,CAAC;oBACH,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAC7B,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,gDAAgD,CAAC,CAAC;gBACnE,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,YAAY,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3E,CAAC;IACD,GAAG,CAAC,KAAK,CAAC,0BAA0B,MAAM,EAAE,CAAC,CAAC;IAC9C,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAEhC,MAAM,UAAU,CAAC,MAAM,CAAC;IACxB,MAAM,UAAU,CAAC,OAAO,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAG,EAAE,CAAC,cAAc,EAAE,CAAC;IACpC,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,GAAG,CAAC,IAAI,CACN,WAAW,OAAO,kEAAkE,CACrF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
4
|
+
import type { SpanContext } from '@opentelemetry/api';
|
|
5
|
+
import { Field } from '../reqctx/mod.js';
|
|
6
|
+
/**
|
|
7
|
+
* A request as the native runtime keeps it: its headers, query parameters
|
|
8
|
+
* and cookies are handed to JavaScript only as a hook reads them.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export interface NativeView {
|
|
12
|
+
readonly gateway: string;
|
|
13
|
+
readonly service: string;
|
|
14
|
+
readonly route: string;
|
|
15
|
+
readonly method: string;
|
|
16
|
+
readonly path: string;
|
|
17
|
+
readonly host?: string | null;
|
|
18
|
+
readonly clientIp?: string | null;
|
|
19
|
+
readonly traceparent?: string | null;
|
|
20
|
+
readonly tracestate?: string | null;
|
|
21
|
+
/** The Request Context fields earlier Middleware set, encoded. */
|
|
22
|
+
readonly context?: readonly NativeField[] | null;
|
|
23
|
+
pathParam(name: string): string | null | undefined;
|
|
24
|
+
headerValues(name: string): string[];
|
|
25
|
+
queryValues(name: string): string[];
|
|
26
|
+
cookie(name: string): string | null | undefined;
|
|
27
|
+
}
|
|
28
|
+
/** A response's headers as the native runtime keeps them. @internal */
|
|
29
|
+
export interface NativeHeaders {
|
|
30
|
+
values(name: string): string[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A set of a Middleware's later hooks, which {@link Request.skip} narrows,
|
|
34
|
+
* combined with `|`: `Hook.Response | Hook.Complete`. `onRequest` is not
|
|
35
|
+
* among them: it is the hook that skips.
|
|
36
|
+
*/
|
|
37
|
+
export declare const Hook: {
|
|
38
|
+
/** `onRequestBody`. */
|
|
39
|
+
readonly RequestBody: number;
|
|
40
|
+
/** `onResponse`. */
|
|
41
|
+
readonly Response: number;
|
|
42
|
+
/** `onResponseBody`. */
|
|
43
|
+
readonly ResponseBody: number;
|
|
44
|
+
/** `onComplete`. */
|
|
45
|
+
readonly Complete: number;
|
|
46
|
+
};
|
|
47
|
+
/** A value of {@link Hook}, or several combined with `|`. */
|
|
48
|
+
export type Hooks = number;
|
|
49
|
+
/** The value of an attribute of a request's span. */
|
|
50
|
+
export type AttributeValue = string | boolean | number;
|
|
51
|
+
/** An edit to headers: op 0 sets, 1 adds, 2 removes. @internal */
|
|
52
|
+
export interface HeaderEdit {
|
|
53
|
+
op: number;
|
|
54
|
+
name: string;
|
|
55
|
+
value: string;
|
|
56
|
+
}
|
|
57
|
+
/** A Request Context field, encoded, as the native runtime shows and takes
|
|
58
|
+
* it: a null value clears it. @internal */
|
|
59
|
+
export interface NativeField {
|
|
60
|
+
name: string;
|
|
61
|
+
value?: string | null;
|
|
62
|
+
}
|
|
63
|
+
/** An attribute as the native runtime takes it. @internal */
|
|
64
|
+
export interface NativeAttribute {
|
|
65
|
+
key: string;
|
|
66
|
+
value: AttributeValue;
|
|
67
|
+
integer: boolean;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Whether a Middleware may not edit the header `name`, lowercase: Encore's
|
|
71
|
+
* headers, the trace context's, those framing the message, and CORS's. The
|
|
72
|
+
* gateway refuses the same edits.
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
export declare function isProtected(name: string): boolean;
|
|
76
|
+
/** Header values edited by a Middleware, by lowercase name, as they read
|
|
77
|
+
* now. */
|
|
78
|
+
type Overrides = Map<string, string[]>;
|
|
79
|
+
/** One Middleware's state for one request, shared by the Requests its hooks
|
|
80
|
+
* are shown. @internal */
|
|
81
|
+
export interface Lane {
|
|
82
|
+
state: unknown;
|
|
83
|
+
}
|
|
84
|
+
/** One run of a timed hook, `onRequest` or `onResponse`: expired once it
|
|
85
|
+
* has timed out and the gateway went on without it. @internal */
|
|
86
|
+
export interface HookRun {
|
|
87
|
+
expired: boolean;
|
|
88
|
+
}
|
|
89
|
+
/** The timed hook the code running now is part of, following its `await`s,
|
|
90
|
+
* timers and callbacks: so that what a timed-out hook goes on doing cannot
|
|
91
|
+
* change the state its later hooks are shown. @internal */
|
|
92
|
+
export declare const hookRuns: AsyncLocalStorage<HookRun>;
|
|
93
|
+
/**
|
|
94
|
+
* A public request the gateway serves, as a Middleware is shown it. Made by
|
|
95
|
+
* Encore: the same object is passed to each of one Middleware's hooks for
|
|
96
|
+
* one request.
|
|
97
|
+
*
|
|
98
|
+
* It reads the request's headers, query parameters and cookies as the hook
|
|
99
|
+
* asks for them, as the Middleware before this one left them, and with this
|
|
100
|
+
* one's edits. Encore's own headers, `x-encore-*`, are never shown. Edits
|
|
101
|
+
* are only allowed in `onRequest`; elsewhere they throw.
|
|
102
|
+
*/
|
|
103
|
+
export declare class Request {
|
|
104
|
+
/** Identifies the request among those in flight; unique while it is. */
|
|
105
|
+
readonly id: number;
|
|
106
|
+
/** @internal */ readonly middleware: string;
|
|
107
|
+
/** @internal */ readonly view: NativeView | undefined;
|
|
108
|
+
/** @internal */ readonly lane: Lane;
|
|
109
|
+
/** @internal */ overrides: Overrides | undefined;
|
|
110
|
+
/** @internal */ deciding: boolean;
|
|
111
|
+
/** @internal */ edits: HeaderEdit[];
|
|
112
|
+
/** @internal The request's Request Context fields, encoded, with this
|
|
113
|
+
* Middleware's changes: changed in place, as the context its hooks run in
|
|
114
|
+
* holds this record. */
|
|
115
|
+
readonly fields: Record<string, string>;
|
|
116
|
+
/** @internal The changes `set` and `unset` made, for the gateway. */
|
|
117
|
+
fieldEdits: NativeField[];
|
|
118
|
+
/** @internal */ attributes: NativeAttribute[];
|
|
119
|
+
/** @internal */ skipped: number;
|
|
120
|
+
/** @internal */ hookSignal: AbortSignal;
|
|
121
|
+
/** @internal Made by Encore. */
|
|
122
|
+
constructor(middleware: string, id: number, view: NativeView | undefined, lane: Lane);
|
|
123
|
+
/** The HTTP method, upper case. */
|
|
124
|
+
get method(): string;
|
|
125
|
+
/** The host the client addressed, from its Host header, if any. */
|
|
126
|
+
get host(): string | undefined;
|
|
127
|
+
/** The path, as the client sent it: not percent-decoded, without the
|
|
128
|
+
* query. */
|
|
129
|
+
get path(): string;
|
|
130
|
+
/** The service the gateway routes the request to. */
|
|
131
|
+
get service(): string;
|
|
132
|
+
/** The route template it matched, such as `/users/{id}`. */
|
|
133
|
+
get route(): string;
|
|
134
|
+
/** The address of the client the gateway took the request from, if
|
|
135
|
+
* known. */
|
|
136
|
+
get clientIp(): string | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* Aborts when the hook running now runs out of time: `onRequest` and
|
|
139
|
+
* `onResponse` have their Middleware's timeout, and the gateway goes on
|
|
140
|
+
* without them then. Pass it to what the hook awaits, as `fetch`, so the
|
|
141
|
+
* work stops too. It never aborts in the other hooks.
|
|
142
|
+
*/
|
|
143
|
+
get signal(): AbortSignal;
|
|
144
|
+
/** The value of the path parameter `name` of the matched route, as it was
|
|
145
|
+
* sent, not percent-decoded; undefined when the route has none of that
|
|
146
|
+
* name. */
|
|
147
|
+
pathParam(name: string): string | undefined;
|
|
148
|
+
/** The first value of the request header `name`, as earlier Middleware
|
|
149
|
+
* left it; undefined when it is not sent. Any case. */
|
|
150
|
+
header(name: string): string | undefined;
|
|
151
|
+
/** Every value of the request header `name`, in order. Any case. */
|
|
152
|
+
headerValues(name: string): string[];
|
|
153
|
+
/** The first value of the query parameter `name`, percent-decoded;
|
|
154
|
+
* undefined when it is not sent. */
|
|
155
|
+
query(name: string): string | undefined;
|
|
156
|
+
/** Every value of the query parameter `name`, percent-decoded, in
|
|
157
|
+
* order. */
|
|
158
|
+
queryValues(name: string): string[];
|
|
159
|
+
/** The value of the cookie `name`, from the `Cookie` headers as the
|
|
160
|
+
* Middleware before this one left them; undefined when it is not sent. */
|
|
161
|
+
cookie(name: string): string | undefined;
|
|
162
|
+
/** The context of the request's span at the gateway, which the spans its
|
|
163
|
+
* hooks start are children of; undefined when the request is not
|
|
164
|
+
* traced. */
|
|
165
|
+
get spanContext(): SpanContext | undefined;
|
|
166
|
+
private mustDecide;
|
|
167
|
+
private edit;
|
|
168
|
+
/**
|
|
169
|
+
* Sets the request header `name` to `value`, replacing any values, for the
|
|
170
|
+
* Middleware after this one and the service. Only in `onRequest`. Not for
|
|
171
|
+
* Encore's headers (`x-encore-*`, the trace context), those framing the
|
|
172
|
+
* message (`content-length` and the like) and CORS's: those throw.
|
|
173
|
+
*/
|
|
174
|
+
setHeader(name: string, value: string): void;
|
|
175
|
+
/** Adds `value` to the request header `name`, keeping its values. As
|
|
176
|
+
* {@link Request.setHeader}. */
|
|
177
|
+
addHeader(name: string, value: string): void;
|
|
178
|
+
/** Removes the request header `name`. As {@link Request.setHeader}. */
|
|
179
|
+
delHeader(name: string): void;
|
|
180
|
+
/**
|
|
181
|
+
* Sets attributes of the request's span at the gateway, as a user or
|
|
182
|
+
* tenant id to find its trace by. Never secrets. Only in `onRequest`. An
|
|
183
|
+
* integer number is recorded as an integer, another as a float.
|
|
184
|
+
*/
|
|
185
|
+
setAttributes(attributes: Record<string, AttributeValue>): void;
|
|
186
|
+
/** Skips this Middleware's later `hooks` for this request, as an
|
|
187
|
+
* `onResponse` a request without a session has no use for:
|
|
188
|
+
* `req.skip(Hook.Response | Hook.Complete)`. Only in `onRequest`. */
|
|
189
|
+
skip(hooks: Hooks): void;
|
|
190
|
+
/**
|
|
191
|
+
* The Request Context field's value for the request; undefined when it is
|
|
192
|
+
* not set: as the Middleware before this one set it, or this one did. In
|
|
193
|
+
* a hook, `field.get()` reads the same, as hooks run in their request's
|
|
194
|
+
* context; in `onComplete`, as the request was forwarded. A value that is
|
|
195
|
+
* not JSON reads as not set, as it does to `field.get()`.
|
|
196
|
+
*/
|
|
197
|
+
get<T>(field: Field<T>): T | undefined;
|
|
198
|
+
/**
|
|
199
|
+
* Sets the Request Context field to `value` for the request. The
|
|
200
|
+
* Middleware after this one, the service the request reaches, and every
|
|
201
|
+
* service it calls in turn with the request's context read it, with
|
|
202
|
+
* `field.get()`; so do the calls this hook makes from then on. It is how a
|
|
203
|
+
* Middleware that authenticates says who the request is for:
|
|
204
|
+
*
|
|
205
|
+
* ```ts
|
|
206
|
+
* export const currentUser = new Field<User>('user');
|
|
207
|
+
*
|
|
208
|
+
* class Auth implements gateway.Middleware {
|
|
209
|
+
* async onRequest(req: gateway.Request) {
|
|
210
|
+
* const user = await verify(req.header('authorization'), req.signal);
|
|
211
|
+
* if (user === undefined) {
|
|
212
|
+
* return gateway.reject(ErrCode.Unauthenticated, 'invalid token');
|
|
213
|
+
* }
|
|
214
|
+
* req.set(currentUser, user);
|
|
215
|
+
* }
|
|
216
|
+
* }
|
|
217
|
+
* ```
|
|
218
|
+
*
|
|
219
|
+
* Only in `onRequest`. The request takes the fields once the hook
|
|
220
|
+
* returns: none when it fails or answers the request.
|
|
221
|
+
*
|
|
222
|
+
* @throws TypeError - The value has no JSON form, or `field` is not a
|
|
223
|
+
* {@link Field}.
|
|
224
|
+
* @throws RangeError - The value encodes to more than a field may: 4 KiB,
|
|
225
|
+
* or 1 KiB for a field declared with `pubsub`; or it makes the request's
|
|
226
|
+
* fields encode to more than 8 KiB.
|
|
227
|
+
*/
|
|
228
|
+
set<T>(field: Field<T>, value: T): void;
|
|
229
|
+
/** Clears the Request Context field for the request, as one the
|
|
230
|
+
* Middleware before this one set. As {@link Request.set} sets it. */
|
|
231
|
+
unset(field: Field<unknown>): void;
|
|
232
|
+
/**
|
|
233
|
+
* What this Middleware kept for the request, for its later hooks: the
|
|
234
|
+
* user `onRequest` found, for `onComplete` to bill. Undefined until set.
|
|
235
|
+
* Encore drops it when the request is done.
|
|
236
|
+
*
|
|
237
|
+
* When `onRequest` or `onResponse` fails or times out, `state` goes back
|
|
238
|
+
* to the object it was before the hook; what the hook changed inside that
|
|
239
|
+
* object stays, since Encore does not copy it. A hook that may fail after
|
|
240
|
+
* changing it should set a new object, as `req.state = {...req.state,
|
|
241
|
+
* billed: true}`, rather than change the one it has. A hook that goes on
|
|
242
|
+
* after it timed out may no longer set it: that throws.
|
|
243
|
+
*/
|
|
244
|
+
get state(): unknown;
|
|
245
|
+
set state(value: unknown);
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* A response to a request the gateway served, in `onResponse`. Made by
|
|
249
|
+
* Encore. It reads the response's headers as the hook asks for them, as the
|
|
250
|
+
* Middleware after this one left them, and with this one's edits.
|
|
251
|
+
*/
|
|
252
|
+
export declare class Response {
|
|
253
|
+
/** The HTTP status. */
|
|
254
|
+
readonly status: number;
|
|
255
|
+
/** @internal */ readonly middleware: string;
|
|
256
|
+
/** @internal */ readonly headers: NativeHeaders | undefined;
|
|
257
|
+
/** @internal */ overrides: Overrides | undefined;
|
|
258
|
+
/** @internal */ editing: boolean;
|
|
259
|
+
/** @internal */ edits: HeaderEdit[];
|
|
260
|
+
/** @internal Made by Encore. */
|
|
261
|
+
constructor(middleware: string, status: number, headers: NativeHeaders | undefined);
|
|
262
|
+
/** The first value of the response header `name`, if any. Any case. */
|
|
263
|
+
header(name: string): string | undefined;
|
|
264
|
+
/** Every value of the response header `name`, in order. Any case. */
|
|
265
|
+
headerValues(name: string): string[];
|
|
266
|
+
private edit;
|
|
267
|
+
/** Sets the response header `name` to `value`, replacing any values,
|
|
268
|
+
* before it is written to the client. Not for the headers
|
|
269
|
+
* {@link Request.setHeader} may not set. */
|
|
270
|
+
setHeader(name: string, value: string): void;
|
|
271
|
+
/** Adds `value` to the response header `name`. */
|
|
272
|
+
addHeader(name: string, value: string): void;
|
|
273
|
+
/** Removes the response header `name`. */
|
|
274
|
+
delHeader(name: string): void;
|
|
275
|
+
}
|
|
276
|
+
/** A request the gateway is done with, for `onComplete`. */
|
|
277
|
+
export interface Completed {
|
|
278
|
+
/** The request, with the headers as they were forwarded, and the state
|
|
279
|
+
* its earlier hooks kept. */
|
|
280
|
+
readonly request: Request;
|
|
281
|
+
/** The status the client was answered with; undefined when it was never
|
|
282
|
+
* answered, as when it disconnected first. */
|
|
283
|
+
readonly status: number | undefined;
|
|
284
|
+
/** The name of the Middleware that answered the request, or `"gateway"`
|
|
285
|
+
* when the gateway did, as for a route it does not expose; undefined when
|
|
286
|
+
* the service answered. */
|
|
287
|
+
readonly rejectedBy: string | undefined;
|
|
288
|
+
/** Why the request failed, if it did: a hook that failed, or a service
|
|
289
|
+
* that could not be reached. */
|
|
290
|
+
readonly error: string | undefined;
|
|
291
|
+
/** When the gateway received the request. */
|
|
292
|
+
readonly received: Date;
|
|
293
|
+
/** How long the gateway took to answer it, in milliseconds. */
|
|
294
|
+
readonly durationMs: number;
|
|
295
|
+
/** How long the service took, in milliseconds, if the request was
|
|
296
|
+
* forwarded. */
|
|
297
|
+
readonly upstreamDurationMs: number | undefined;
|
|
298
|
+
/** The bytes of the request's body. */
|
|
299
|
+
readonly requestBodySize: number;
|
|
300
|
+
/** The bytes of the response's body. */
|
|
301
|
+
readonly responseBodySize: number;
|
|
302
|
+
}
|
|
303
|
+
export {};
|
|
304
|
+
//# sourceMappingURL=request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../gateway/request.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAC;AAIpD,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAEpC;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,kEAAkE;IAClE,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,WAAW,EAAE,GAAG,IAAI,CAAC;IACjD,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,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