@zyno-io/ts-server-foundation 26.712.36 → 26.712.920
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/dist/src/app/base.js +1 -1
- package/dist/src/app/base.js.map +1 -1
- package/dist/src/app/config.d.ts +1 -0
- package/dist/src/app/config.d.ts.map +1 -1
- package/dist/src/app/config.js +3 -1
- package/dist/src/app/config.js.map +1 -1
- package/dist/src/app/migrations-entrypoint.d.ts +0 -1
- package/dist/src/app/migrations-entrypoint.d.ts.map +1 -1
- package/dist/src/app/migrations-entrypoint.js +0 -17
- package/dist/src/app/migrations-entrypoint.js.map +1 -1
- package/dist/src/cli/tsf-dev.js +8 -3
- package/dist/src/cli/tsf-dev.js.map +1 -1
- package/dist/src/cli/tsf-install.d.ts.map +1 -1
- package/dist/src/cli/tsf-install.js +15 -15
- package/dist/src/cli/tsf-install.js.map +1 -1
- package/dist/src/cli/tsf-migrate.js +5 -20
- package/dist/src/cli/tsf-migrate.js.map +1 -1
- package/dist/src/cli/tsf-test.d.ts.map +1 -1
- package/dist/src/cli/tsf-test.js +31 -17
- package/dist/src/cli/tsf-test.js.map +1 -1
- package/dist/src/database/database.js +1 -1
- package/dist/src/database/index.js +1 -1
- package/dist/src/database/metadata.js +1 -1
- package/dist/src/database/migration/index.d.ts.map +1 -1
- package/dist/src/database/migration/index.js +27 -8
- package/dist/src/database/migration/index.js.map +1 -1
- package/dist/src/env.d.ts +1 -0
- package/dist/src/env.d.ts.map +1 -1
- package/dist/src/env.js +1 -1
- package/dist/src/env.js.map +1 -1
- package/dist/src/helpers/availability.d.ts +17 -0
- package/dist/src/helpers/availability.d.ts.map +1 -0
- package/dist/src/helpers/availability.js +82 -0
- package/dist/src/helpers/availability.js.map +1 -0
- package/dist/src/helpers/index.d.ts +2 -0
- package/dist/src/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/index.js +3 -1
- package/dist/src/helpers/index.js.map +1 -1
- package/dist/src/helpers/redis/availability.d.ts +12 -0
- package/dist/src/helpers/redis/availability.d.ts.map +1 -0
- package/dist/src/helpers/redis/availability.js +27 -0
- package/dist/src/helpers/redis/availability.js.map +1 -0
- package/dist/src/helpers/redis/redis.d.ts.map +1 -1
- package/dist/src/helpers/redis/redis.js +4 -1
- package/dist/src/helpers/redis/redis.js.map +1 -1
- package/dist/src/http/index.js +1 -1
- package/dist/src/http/router.js +2 -2
- package/dist/src/http/workflow.js +1 -1
- package/dist/src/index.js +5 -5
- package/dist/src/openapi/schema.js +1 -1
- package/dist/src/openapi/serializer.js +1 -1
- package/dist/src/reflection/annotations.js +1 -1
- package/dist/src/reflection/deserializer.js +1 -1
- package/dist/src/reflection/index.js +1 -1
- package/dist/src/reflection/model.js +1 -1
- package/dist/src/reflection/reflection-class.js +3 -3
- package/dist/src/services/index.js +1 -1
- package/dist/src/services/worker/index.js +1 -1
- package/dist/src/services/worker/runner.d.ts +2 -0
- package/dist/src/services/worker/runner.d.ts.map +1 -1
- package/dist/src/services/worker/runner.js +53 -1
- package/dist/src/services/worker/runner.js.map +1 -1
- package/dist/src/typescript-output.d.ts +13 -0
- package/dist/src/typescript-output.d.ts.map +1 -0
- package/dist/src/typescript-output.js +213 -0
- package/dist/src/typescript-output.js.map +1 -0
- package/docs/content/cli.md +3 -3
- package/docs/content/configuration.md +19 -18
- package/docs/content/getting-started.md +1 -1
- package/docs/content/helpers.md +21 -1
- package/docs/content/migrations.md +4 -2
- package/docs/content/public-api.md +1 -1
- package/docs/content/redis.md +21 -0
- package/docs/content/testing.md +3 -1
- package/package.json +1 -1
package/dist/src/env.js
CHANGED
|
@@ -57,5 +57,5 @@ function applyEnv(env) {
|
|
|
57
57
|
function toProcessEnv(env = exports.Env) {
|
|
58
58
|
return { ...env };
|
|
59
59
|
}
|
|
60
|
-
exports.__tsfTypeAliases = ({ "EnvObject": { kind: 18, typeName: "EnvObject", types: [{ kind: 20, name: "APP_ENV", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "NODE_ENV", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "NODE_TEST_CONTEXT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TZ", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "DEVCONSOLE_ENABLED", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "DB_ADAPTER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_USER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_PASSWORD_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_DATABASE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_CONNECTION_LIMIT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_MIN_IDLE_CONNECTIONS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_IDLE_TIMEOUT_SECONDS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_USER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_PASSWORD_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_DATABASE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_SCHEMA", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_SSL", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_SSL_REJECT_UNAUTHORIZED", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_CONNECTION_LIMIT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_IDLE_TIMEOUT_SECONDS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_JWT_ISSUER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_JWT_EXPIRATION_MINS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_JWT_COOKIE_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_JWT_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_JWT_SECRET_B64", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_JWT_ED_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_JWT_ENABLE_VERIFY", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_BASIC_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CRYPTO_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CRYPTO_IV_LENGTH", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "USE_REAL_IP_HEADER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "REDIS_SENTINEL_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "REDIS_SENTINEL_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "REDIS_SENTINEL_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "REDIS_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "REDIS_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "REDIS_PREFIX", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CACHE_REDIS_SENTINEL_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CACHE_REDIS_SENTINEL_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CACHE_REDIS_SENTINEL_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CACHE_REDIS_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CACHE_REDIS_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CACHE_REDIS_PREFIX", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MUTEX_REDIS_SENTINEL_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MUTEX_REDIS_SENTINEL_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MUTEX_REDIS_SENTINEL_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MUTEX_REDIS_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MUTEX_REDIS_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MUTEX_REDIS_PREFIX", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BROADCAST_REDIS_SENTINEL_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BROADCAST_REDIS_SENTINEL_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BROADCAST_REDIS_SENTINEL_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BROADCAST_REDIS_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BROADCAST_REDIS_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BROADCAST_REDIS_PREFIX", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MESH_REDIS_SENTINEL_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MESH_REDIS_SENTINEL_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MESH_REDIS_SENTINEL_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MESH_REDIS_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MESH_REDIS_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MESH_REDIS_PREFIX", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BULL_REDIS_SENTINEL_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BULL_REDIS_SENTINEL_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BULL_REDIS_SENTINEL_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BULL_REDIS_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BULL_REDIS_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BULL_REDIS_PREFIX", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BULL_QUEUE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MUTEX_MODE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ENABLE_OPENAPI_SCHEMA", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ENABLE_OPENAPI_ROUTE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ENABLE_JOB_RUNNER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SENTRY_DSN", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "OTEL_SDK_DISABLED", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "OTEL_DEBUG", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "OTEL_EXPORTER_OTLP_ENDPOINT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "OTEL_METRICS_ENDPOINT_ENABLED", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ALERTS_SLACK_WEBHOOK_URL", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SRPC_AUTH_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SRPC_AUTH_CLOCK_DRIFT_MS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "HTTP_REQUEST_LOGGING_MODE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "HEALTHZ_ENABLE_REQUEST_LOGGING", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ENABLE_PINO_PRETTY", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ENABLE_PINO_SINGLE_LINE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "LOG_LEVEL", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MAIL_FROM", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MAIL_FROM_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MAIL_PROVIDER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SMTP_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SMTP_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SMTP_USER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SMTP_PASSWORD_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SMTP_TLS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "POSTMARK_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PROTOC", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TEST_KEEP_DB", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TEST_RUN_TS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_DATABASE_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_ALLOW_SAVEPOINTS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_MANAGER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_POOL_SIZE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_MANAGER_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_MANAGER_TOKEN", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_KEY", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_LEASE_ID", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_DATABASE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_TRACE_SQL", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }], index: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] } } });
|
|
60
|
+
exports.__tsfTypeAliases = ({ "EnvObject": { kind: 18, typeName: "EnvObject", types: [{ kind: 20, name: "APP_ENV", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "NODE_ENV", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "NODE_TEST_CONTEXT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TZ", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "DEVCONSOLE_ENABLED", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "DB_ADAPTER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_USER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_PASSWORD_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_DATABASE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_CONNECTION_LIMIT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_MIN_IDLE_CONNECTIONS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MYSQL_IDLE_TIMEOUT_SECONDS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_USER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_PASSWORD_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_DATABASE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_SCHEMA", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_SSL", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_SSL_REJECT_UNAUTHORIZED", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_CONNECTION_LIMIT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PG_IDLE_TIMEOUT_SECONDS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_JWT_ISSUER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_JWT_EXPIRATION_MINS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_JWT_COOKIE_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_JWT_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_JWT_SECRET_B64", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_JWT_ED_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_JWT_ENABLE_VERIFY", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "AUTH_BASIC_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CRYPTO_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CRYPTO_IV_LENGTH", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "USE_REAL_IP_HEADER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "REDIS_SENTINEL_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "REDIS_SENTINEL_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "REDIS_SENTINEL_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "REDIS_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "REDIS_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "REDIS_PREFIX", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CACHE_REDIS_SENTINEL_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CACHE_REDIS_SENTINEL_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CACHE_REDIS_SENTINEL_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CACHE_REDIS_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CACHE_REDIS_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "CACHE_REDIS_PREFIX", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MUTEX_REDIS_SENTINEL_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MUTEX_REDIS_SENTINEL_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MUTEX_REDIS_SENTINEL_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MUTEX_REDIS_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MUTEX_REDIS_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MUTEX_REDIS_PREFIX", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BROADCAST_REDIS_SENTINEL_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BROADCAST_REDIS_SENTINEL_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BROADCAST_REDIS_SENTINEL_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BROADCAST_REDIS_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BROADCAST_REDIS_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BROADCAST_REDIS_PREFIX", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MESH_REDIS_SENTINEL_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MESH_REDIS_SENTINEL_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MESH_REDIS_SENTINEL_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MESH_REDIS_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MESH_REDIS_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MESH_REDIS_PREFIX", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BULL_REDIS_SENTINEL_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BULL_REDIS_SENTINEL_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BULL_REDIS_SENTINEL_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BULL_REDIS_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BULL_REDIS_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BULL_REDIS_PREFIX", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "BULL_QUEUE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MUTEX_MODE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ENABLE_OPENAPI_SCHEMA", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ENABLE_OPENAPI_ROUTE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ENABLE_JOB_RUNNER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SENTRY_DSN", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "OTEL_SDK_DISABLED", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "OTEL_DEBUG", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "OTEL_EXPORTER_OTLP_ENDPOINT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "OTEL_METRICS_ENDPOINT_ENABLED", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ALERTS_SLACK_WEBHOOK_URL", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SRPC_AUTH_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SRPC_AUTH_CLOCK_DRIFT_MS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "HTTP_REQUEST_LOGGING_MODE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "HEALTHZ_ENABLE_REQUEST_LOGGING", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ENABLE_PINO_PRETTY", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ENABLE_PINO_SINGLE_LINE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "LOG_LEVEL", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MAIL_FROM", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MAIL_FROM_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "MAIL_PROVIDER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SMTP_HOST", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SMTP_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SMTP_USER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SMTP_PASSWORD_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "SMTP_TLS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "POSTMARK_SECRET", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "PROTOC", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TEST_KEEP_DB", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TEST_RUN_TS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TSCONFIG", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_DATABASE_NAME", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_ALLOW_SAVEPOINTS", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_MANAGER", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_POOL_SIZE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_MANAGER_PORT", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_MANAGER_TOKEN", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_KEY", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_LEASE_ID", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_DATABASE", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "TSF_TEST_MYSQL_SESSION_TRACE_SQL", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }], index: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] } } });
|
|
61
61
|
//# sourceMappingURL=env.js.map
|
package/dist/src/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":";;;;;;AA4IA,MAAM,UAAU,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,EAAe,CAAC;AAEtC,QAAA,GAAG,GAAG,IAAI,KAAK,CAAC,UAAU,EAAE;IACrC,GAAG,CAA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;SACjB,CAAC;IACN,CAAC;CACJ,CAAc,CAAC;AAEhB;IACI,OAAO,EAAE,GAAG,QAAA,GAAG,EAAE,CAAC;AACtB,CAAC;AAED,kBAAyB,GAAc;IACnC,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;QAAE,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7C,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACtD,CAAC;AACL,CAAC;AAED,sBAA6B,GAAG,GAAc,QAAA,GAAG;IAC7C,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const DEFAULT_AVAILABILITY_ALERT_AFTER_MS = 60000;
|
|
2
|
+
export interface AvailabilityLogger {
|
|
3
|
+
info(...messages: unknown[]): void;
|
|
4
|
+
warning(...messages: unknown[]): void;
|
|
5
|
+
error(...messages: unknown[]): void;
|
|
6
|
+
}
|
|
7
|
+
export interface AvailabilityMonitorOptions {
|
|
8
|
+
alertAfterMs?: number;
|
|
9
|
+
name?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface AvailabilityMonitor {
|
|
12
|
+
unavailable(error?: unknown): void;
|
|
13
|
+
available(): void;
|
|
14
|
+
stop(): void;
|
|
15
|
+
}
|
|
16
|
+
export declare function createAvailabilityMonitor(logger: AvailabilityLogger, options?: AvailabilityMonitorOptions): AvailabilityMonitor;
|
|
17
|
+
//# sourceMappingURL=availability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability.d.ts","sourceRoot":"","sources":["../../../src/helpers/availability.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mCAAmC,QAAS,CAAC;AAE1D,MAAM,WAAW,kBAAkB;IAC/B,IAAI,CAAC,GAAG,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACnC,OAAO,CAAC,GAAG,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACtC,KAAK,CAAC,GAAG,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,0BAA0B;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAChC,WAAW,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,SAAS,IAAI,IAAI,CAAC;IAClB,IAAI,IAAI,IAAI,CAAC;CAChB;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,kBAAkB,EAAE,OAAO,GAAE,0BAA+B,GAAG,mBAAmB,CAqEnI"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.__tsfTypeAliases = exports.DEFAULT_AVAILABILITY_ALERT_AFTER_MS = void 0;
|
|
4
|
+
exports.createAvailabilityMonitor = createAvailabilityMonitor;
|
|
5
|
+
exports.DEFAULT_AVAILABILITY_ALERT_AFTER_MS = 60000;
|
|
6
|
+
function createAvailabilityMonitor(logger, options = {}) {
|
|
7
|
+
const alertAfterMs = Number(options.alertAfterMs ?? exports.DEFAULT_AVAILABILITY_ALERT_AFTER_MS);
|
|
8
|
+
if (!Number.isFinite(alertAfterMs) || alertAfterMs < 0) {
|
|
9
|
+
throw new Error('Availability alert delay must be a non-negative number');
|
|
10
|
+
}
|
|
11
|
+
const name = options.name ?? 'Dependency';
|
|
12
|
+
let unavailableAt;
|
|
13
|
+
let lastError;
|
|
14
|
+
let alertTimer;
|
|
15
|
+
let alerted = false;
|
|
16
|
+
let stopped = false;
|
|
17
|
+
const clearAlertTimer = () => {
|
|
18
|
+
if (alertTimer)
|
|
19
|
+
clearTimeout(alertTimer);
|
|
20
|
+
alertTimer = undefined;
|
|
21
|
+
};
|
|
22
|
+
const reportUnavailable = () => {
|
|
23
|
+
alertTimer = undefined;
|
|
24
|
+
if (stopped || unavailableAt === undefined || alerted)
|
|
25
|
+
return;
|
|
26
|
+
alerted = true;
|
|
27
|
+
const unavailableForMs = Date.now() - unavailableAt;
|
|
28
|
+
if (lastError === undefined) {
|
|
29
|
+
logger.error(`${name} remains unavailable`, { unavailableForMs });
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
logger.error(`${name} remains unavailable`, lastError, { unavailableForMs });
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const unavailable = (error) => {
|
|
36
|
+
if (stopped)
|
|
37
|
+
return;
|
|
38
|
+
if (error !== undefined)
|
|
39
|
+
lastError = error;
|
|
40
|
+
if (unavailableAt !== undefined)
|
|
41
|
+
return;
|
|
42
|
+
unavailableAt = Date.now();
|
|
43
|
+
logger.warning(`${name} is temporarily unavailable`, {
|
|
44
|
+
alertAfterMs,
|
|
45
|
+
errorMessage: getErrorMessage(error)
|
|
46
|
+
});
|
|
47
|
+
if (alertAfterMs === 0) {
|
|
48
|
+
reportUnavailable();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
alertTimer = setTimeout(reportUnavailable, alertAfterMs);
|
|
52
|
+
alertTimer.unref?.();
|
|
53
|
+
};
|
|
54
|
+
const available = () => {
|
|
55
|
+
if (stopped || unavailableAt === undefined)
|
|
56
|
+
return;
|
|
57
|
+
const unavailableForMs = Date.now() - unavailableAt;
|
|
58
|
+
const reported = alerted;
|
|
59
|
+
clearAlertTimer();
|
|
60
|
+
unavailableAt = undefined;
|
|
61
|
+
lastError = undefined;
|
|
62
|
+
alerted = false;
|
|
63
|
+
logger.info(`${name} recovered`, { unavailableForMs, alerted: reported });
|
|
64
|
+
};
|
|
65
|
+
return {
|
|
66
|
+
unavailable,
|
|
67
|
+
available,
|
|
68
|
+
stop() {
|
|
69
|
+
if (stopped)
|
|
70
|
+
return;
|
|
71
|
+
stopped = true;
|
|
72
|
+
clearAlertTimer();
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function getErrorMessage(error) {
|
|
77
|
+
if (error === undefined)
|
|
78
|
+
return undefined;
|
|
79
|
+
return error instanceof Error ? error.message : String(error);
|
|
80
|
+
}
|
|
81
|
+
exports.__tsfTypeAliases = ({ "AvailabilityLogger": { kind: 18, typeName: "AvailabilityLogger", types: [] }, "AvailabilityMonitor": { kind: 18, typeName: "AvailabilityMonitor", types: [] }, "AvailabilityMonitorOptions": { kind: 18, typeName: "AvailabilityMonitorOptions", types: [{ kind: 20, name: "alertAfterMs", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "name", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } });
|
|
82
|
+
//# sourceMappingURL=availability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability.js","sourceRoot":"","sources":["../../../src/helpers/availability.ts"],"names":[],"mappings":";;;;AAAa,QAAA,mCAAmC,GAAG,KAAM,CAAC;AAmB1D,mCAA0C,MAA0B,EAAE,OAAO,GAA+B,EAAE;IAC1G,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,IAAI,QAAA,mCAAmC,CAAC,CAAC;IACzF,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,YAAY,CAAC;IAC1C,IAAI,aAAiC,CAAC;IACtC,IAAI,SAAkB,CAAC;IACvB,IAAI,UAAsC,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AE,YAAY,CAAC,CAAC;QACzD,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC;IACzB,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,GAAG,EAAE;QACnB,IAAI,OAAO,IAAI,aAAa,KAAK,SAAS;YAAE,OAAO;QACnD,MAAM,gBAAgB,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,aAAa,CAAC;QACpD,MAAM,QAAQ,GAAG,OAAO,CAAC;QACzB,eAAe,EAAE,CAAC;QAClB,aAAa,GAAG,SAAS,CAAC;QAC1B,SAAS,GAAG,SAAS,CAAC;QACtB,OAAO,GAAG,KAAK,CAAC;QAChB,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,YAAY,EAAE,EAAE,gBAAgB,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC9E,CAAC,CAAC;IAEF,OAAO;QACH,WAAW;QACX,SAAS;QACT,IAAI;YACA,IAAI,OAAO;gBAAE,OAAO;YACpB,OAAO,GAAG,IAAI,CAAC;YACf,eAAe,EAAE,CAAC;QACtB,CAAC;KACJ,CAAC;AACN,CAAC;AAED,SAAS,eAAe,CAAC,KAAc;IACnC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './availability';
|
|
1
2
|
export * from './async/context';
|
|
2
3
|
export * from './async/process';
|
|
3
4
|
export * from './async/promise';
|
|
@@ -7,6 +8,7 @@ export * from './data/serialization';
|
|
|
7
8
|
export * from './data/transformer';
|
|
8
9
|
export * from './io/package';
|
|
9
10
|
export * from './io/stream';
|
|
11
|
+
export * from './redis/availability';
|
|
10
12
|
export * from './redis/cache';
|
|
11
13
|
export * from './redis/broadcast';
|
|
12
14
|
export { flattenMutexKey, MutexAcquisitionError, registerMutexObserver, resetMutexRedisConnection, withMutex, withMutexes, type MutexContext, type MutexFn, type MutexKey as HelperMutexKey, type MutexObservation, type MutexObserver, type MutexOptions, type RedisMutexClient, type RedisMutexProvider } from './redis/mutex';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACH,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,SAAS,EACT,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,QAAQ,IAAI,cAAc,EAC/B,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAC1B,MAAM,eAAe,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACH,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,SAAS,EACT,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,QAAQ,IAAI,cAAc,EAC/B,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAC1B,MAAM,eAAe,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.__tsfTypeAliases = exports.withMutexes = exports.withMutex = exports.resetMutexRedisConnection = exports.registerMutexObserver = exports.MutexAcquisitionError = exports.flattenMutexKey = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
tslib_1.__exportStar(require("./availability"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./async/context"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./async/process"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./async/promise"), exports);
|
|
@@ -11,6 +12,7 @@ tslib_1.__exportStar(require("./data/serialization"), exports);
|
|
|
11
12
|
tslib_1.__exportStar(require("./data/transformer"), exports);
|
|
12
13
|
tslib_1.__exportStar(require("./io/package"), exports);
|
|
13
14
|
tslib_1.__exportStar(require("./io/stream"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./redis/availability"), exports);
|
|
14
16
|
tslib_1.__exportStar(require("./redis/cache"), exports);
|
|
15
17
|
tslib_1.__exportStar(require("./redis/broadcast"), exports);
|
|
16
18
|
var mutex_1 = require("./redis/mutex");
|
|
@@ -26,5 +28,5 @@ tslib_1.__exportStar(require("./security/validation"), exports);
|
|
|
26
28
|
tslib_1.__exportStar(require("./utils/date"), exports);
|
|
27
29
|
tslib_1.__exportStar(require("./utils/error"), exports);
|
|
28
30
|
tslib_1.__exportStar(require("./utils/uuid"), exports);
|
|
29
|
-
exports.__tsfTypeAliases = ({ "BroadcastLogger": { kind: 18, typeName: "BroadcastLogger", types: [] }, "CacheRedisClient": { kind: 18, typeName: "CacheRedisClient", types: [] }, "CacheRedisProvider": { kind: 2, typeName: "() => RedisConnection<CacheRedisClient>", typeName: "CacheRedisProvider" }, "CryptoOptions": { kind: 18, typeName: "CryptoOptions", types: [{ kind: 20, name: "secret", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ivLength", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }] }, "DecoratedError": { kind: 18, typeName: "DecoratedError", types: [{ kind: 20, name: "cause", type: { kind: 12, types: [{ kind: 2 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "context", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 2 }], index: { kind: 2 }, types: [] }, { kind: 4 }] }, optional: true }], implements: [{ kind: 16, typeName: "Error", classType: () => (typeof Error !== "undefined" ? Error : (typeof exports !== "undefined" ? exports.Error : undefined)) }] }, "ExecProcessOptions": { kind: 18, typeName: "ExecProcessOptions", types: [{ kind: 20, name: "cwd", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "errorOnNonZero", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "stdio", type: { kind: 12, types: [{ kind: 2, typeName: "SpawnOptions['stdio']" }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onSpawn", type: { kind: 12, types: [{ kind: 2, typeName: "(proc: ChildProcess) => void" }, { kind: 4 }] }, optional: true }, { kind: 20, name: "shell", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "env", type: { kind: 12, types: [{ kind: 16, typeName: "NodeJS.ProcessEnv", classType: () => NodeJS.ProcessEnv }, { kind: 4 }] }, optional: true }] }, "ExecProcessResult": { kind: 18, typeName: "ExecProcessResult", types: [{ kind: 20, name: "code", type: { kind: 12, types: [{ kind: 7 }, { kind: 5 }] }, optional: false }, { kind: 20, name: "stdout", type: { kind: 16, typeName: "Buffer", classType: () => (typeof Buffer !== "undefined" ? Buffer : (typeof exports !== "undefined" ? exports.Buffer : undefined)) }, optional: false }, { kind: 20, name: "stderr", type: { kind: 16, typeName: "Buffer", classType: () => (typeof Buffer !== "undefined" ? Buffer : (typeof exports !== "undefined" ? exports.Buffer : undefined)) }, optional: false }] }, "HelperMutexKey": { kind: 1, typeName: "HelperMutexKey" }, "IDistributedMethodOptions": { kind: 18, typeName: "IDistributedMethodOptions", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "logger", type: { kind: 12, types: [{ kind: 2, typeName: "() => BroadcastLogger" }, { kind: 4 }] }, optional: true }] }, "IErrorContext": { kind: 18, typeName: "IErrorContext", types: [{ kind: 20, name: "scope", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scopeData", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 2 }], index: { kind: 2 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "loggerContext", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 2 }], index: { kind: 2 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "data", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 2 }], index: { kind: 2 }, types: [] }, { kind: 4 }] }, optional: true }], index: { kind: 2 } }, "MutexContext": { kind: 18, typeName: "MutexContext", types: [{ kind: 20, name: "key", type: { kind: 6 }, optional: false }, { kind: 20, name: "lockId", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "signal", type: { kind: 16, typeName: "AbortSignal", classType: () => (typeof AbortSignal !== "undefined" ? AbortSignal : (typeof exports !== "undefined" ? exports.AbortSignal : undefined)) }, optional: false }] }, "MutexObservation": { kind: 18, typeName: "MutexObservation", types: [{ kind: 20, name: "id", type: { kind: 6 }, optional: false }, { kind: 20, name: "key", type: { kind: 6 }, optional: false }, { kind: 20, name: "mode", type: { kind: 12, types: [{ kind: 10, literal: "local" }, { kind: 10, literal: "redis" }] }, optional: false }, { kind: 20, name: "type", type: { kind: 12, types: [{ kind: 10, literal: "pending" }, { kind: 10, literal: "acquired" }, { kind: 10, literal: "released" }, { kind: 10, literal: "error" }, { kind: 10, literal: "failed" }] }, optional: false }, { kind: 20, name: "startedAt", type: { kind: 7 }, optional: false }, { kind: 20, name: "at", type: { kind: 7 }, optional: false }, { kind: 20, name: "waited", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "error", type: { kind: 12, types: [{ kind: 2 }, { kind: 4 }] }, optional: true }] }, "MutexObserver": { kind: 2, typeName: "(entry: MutexObservation) => void", typeName: "MutexObserver" }, "MutexOptions": { kind: 18, typeName: "MutexOptions", types: [{ kind: 20, name: "key", type: { kind: 12, types: [{ kind: 1, typeName: "MutexKey" }, { kind: 14, type: { kind: 1, typeName: "MutexKey" } }] }, optional: false }, { kind: 20, name: "fn", type: { kind: 2, typeName: "MutexFn", typeArguments: [{ kind: 2, typeName: "T" }] }, optional: false }, { kind: 20, name: "retryCount", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "retryDelay", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "renewInterval", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "mode", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 10, literal: "local" }, { kind: 10, literal: "redis" }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "redis", type: { kind: 12, types: [{ kind: 2, typeName: "() => RedisConnection<RedisMutexClient>", typeName: "RedisMutexProvider" }, { kind: 4 }] }, optional: true }, { kind: 20, name: "signal", type: { kind: 12, types: [{ kind: 16, typeName: "AbortSignal", classType: () => (typeof AbortSignal !== "undefined" ? AbortSignal : (typeof exports !== "undefined" ? exports.AbortSignal : undefined)) }, { kind: 4 }] }, optional: true }] }, "PackageJson": { kind: 18, typeName: "PackageJson", types: [{ kind: 20, name: "name", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "version", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }], index: { kind: 2 } }, "RedisConnection": { kind: 18, typeName: "RedisConnection", types: [{ kind: 20, name: "client", type: { kind: 16, typeName: "TClient", classType: () => (typeof TClient !== "undefined" ? TClient : (typeof exports !== "undefined" ? exports.TClient : undefined)) }, optional: false }, { kind: 20, name: "prefix", type: { kind: 6 }, optional: false }] }, "RedisMutexClient": { kind: 18, typeName: "RedisMutexClient", types: [] }, "RedisMutexProvider": { kind: 2, typeName: "() => RedisConnection<RedisMutexClient>", typeName: "RedisMutexProvider" }, "Semaphore": { kind: 18, typeName: "Semaphore", types: [{ kind: 20, name: "promise", type: { kind: 22, type: { kind: 3 } }, optional: false }] }, "SentryTagValue": { kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 9 }, { kind: 2, typeName: "symbol" }, { kind: 5 }, { kind: 4 }], typeName: "SentryTagValue" }, "SimpleStore": { kind: 18, index: { kind: 1 }, types: [], typeName: "SimpleStore" } });
|
|
31
|
+
exports.__tsfTypeAliases = ({ "AvailabilityLogger": { kind: 18, typeName: "AvailabilityLogger", types: [] }, "AvailabilityMonitor": { kind: 18, typeName: "AvailabilityMonitor", types: [] }, "AvailabilityMonitorOptions": { kind: 18, typeName: "AvailabilityMonitorOptions", types: [{ kind: 20, name: "alertAfterMs", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "name", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, "BroadcastLogger": { kind: 18, typeName: "BroadcastLogger", types: [] }, "CacheRedisClient": { kind: 18, typeName: "CacheRedisClient", types: [] }, "CacheRedisProvider": { kind: 2, typeName: "() => RedisConnection<CacheRedisClient>", typeName: "CacheRedisProvider" }, "CryptoOptions": { kind: 18, typeName: "CryptoOptions", types: [{ kind: 20, name: "secret", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ivLength", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }] }, "DecoratedError": { kind: 18, typeName: "DecoratedError", types: [{ kind: 20, name: "cause", type: { kind: 12, types: [{ kind: 2 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "context", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 2 }], index: { kind: 2 }, types: [] }, { kind: 4 }] }, optional: true }], implements: [{ kind: 16, typeName: "Error", classType: () => (typeof Error !== "undefined" ? Error : (typeof exports !== "undefined" ? exports.Error : undefined)) }] }, "ExecProcessOptions": { kind: 18, typeName: "ExecProcessOptions", types: [{ kind: 20, name: "cwd", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "errorOnNonZero", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "stdio", type: { kind: 12, types: [{ kind: 2, typeName: "SpawnOptions['stdio']" }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onSpawn", type: { kind: 12, types: [{ kind: 2, typeName: "(proc: ChildProcess) => void" }, { kind: 4 }] }, optional: true }, { kind: 20, name: "shell", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "env", type: { kind: 12, types: [{ kind: 16, typeName: "NodeJS.ProcessEnv", classType: () => NodeJS.ProcessEnv }, { kind: 4 }] }, optional: true }] }, "ExecProcessResult": { kind: 18, typeName: "ExecProcessResult", types: [{ kind: 20, name: "code", type: { kind: 12, types: [{ kind: 7 }, { kind: 5 }] }, optional: false }, { kind: 20, name: "stdout", type: { kind: 16, typeName: "Buffer", classType: () => (typeof Buffer !== "undefined" ? Buffer : (typeof exports !== "undefined" ? exports.Buffer : undefined)) }, optional: false }, { kind: 20, name: "stderr", type: { kind: 16, typeName: "Buffer", classType: () => (typeof Buffer !== "undefined" ? Buffer : (typeof exports !== "undefined" ? exports.Buffer : undefined)) }, optional: false }] }, "HelperMutexKey": { kind: 1, typeName: "HelperMutexKey" }, "IDistributedMethodOptions": { kind: 18, typeName: "IDistributedMethodOptions", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "logger", type: { kind: 12, types: [{ kind: 2, typeName: "() => BroadcastLogger" }, { kind: 4 }] }, optional: true }] }, "IErrorContext": { kind: 18, typeName: "IErrorContext", types: [{ kind: 20, name: "scope", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scopeData", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 2 }], index: { kind: 2 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "loggerContext", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 2 }], index: { kind: 2 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "data", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 2 }], index: { kind: 2 }, types: [] }, { kind: 4 }] }, optional: true }], index: { kind: 2 } }, "MutexContext": { kind: 18, typeName: "MutexContext", types: [{ kind: 20, name: "key", type: { kind: 6 }, optional: false }, { kind: 20, name: "lockId", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "signal", type: { kind: 16, typeName: "AbortSignal", classType: () => (typeof AbortSignal !== "undefined" ? AbortSignal : (typeof exports !== "undefined" ? exports.AbortSignal : undefined)) }, optional: false }] }, "MutexObservation": { kind: 18, typeName: "MutexObservation", types: [{ kind: 20, name: "id", type: { kind: 6 }, optional: false }, { kind: 20, name: "key", type: { kind: 6 }, optional: false }, { kind: 20, name: "mode", type: { kind: 12, types: [{ kind: 10, literal: "local" }, { kind: 10, literal: "redis" }] }, optional: false }, { kind: 20, name: "type", type: { kind: 12, types: [{ kind: 10, literal: "pending" }, { kind: 10, literal: "acquired" }, { kind: 10, literal: "released" }, { kind: 10, literal: "error" }, { kind: 10, literal: "failed" }] }, optional: false }, { kind: 20, name: "startedAt", type: { kind: 7 }, optional: false }, { kind: 20, name: "at", type: { kind: 7 }, optional: false }, { kind: 20, name: "waited", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "error", type: { kind: 12, types: [{ kind: 2 }, { kind: 4 }] }, optional: true }] }, "MutexObserver": { kind: 2, typeName: "(entry: MutexObservation) => void", typeName: "MutexObserver" }, "MutexOptions": { kind: 18, typeName: "MutexOptions", types: [{ kind: 20, name: "key", type: { kind: 12, types: [{ kind: 1, typeName: "MutexKey" }, { kind: 14, type: { kind: 1, typeName: "MutexKey" } }] }, optional: false }, { kind: 20, name: "fn", type: { kind: 2, typeName: "MutexFn", typeArguments: [{ kind: 2, typeName: "T" }] }, optional: false }, { kind: 20, name: "retryCount", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "retryDelay", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "renewInterval", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "mode", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 10, literal: "local" }, { kind: 10, literal: "redis" }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "redis", type: { kind: 12, types: [{ kind: 2, typeName: "() => RedisConnection<RedisMutexClient>", typeName: "RedisMutexProvider" }, { kind: 4 }] }, optional: true }, { kind: 20, name: "signal", type: { kind: 12, types: [{ kind: 16, typeName: "AbortSignal", classType: () => (typeof AbortSignal !== "undefined" ? AbortSignal : (typeof exports !== "undefined" ? exports.AbortSignal : undefined)) }, { kind: 4 }] }, optional: true }] }, "PackageJson": { kind: 18, typeName: "PackageJson", types: [{ kind: 20, name: "name", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "version", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }], index: { kind: 2 } }, "RedisAvailabilityClient": { kind: 18, typeName: "RedisAvailabilityClient", types: [] }, "RedisAvailabilityMonitor": { kind: 18, typeName: "AvailabilityMonitor", types: [], typeName: "RedisAvailabilityMonitor" }, "RedisAvailabilityMonitorOptions": { kind: 18, typeName: "AvailabilityMonitorOptions", types: [{ kind: 20, name: "alertAfterMs", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "name", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }], typeName: "RedisAvailabilityMonitorOptions" }, "RedisConnection": { kind: 18, typeName: "RedisConnection", types: [{ kind: 20, name: "client", type: { kind: 16, typeName: "TClient", classType: () => (typeof TClient !== "undefined" ? TClient : (typeof exports !== "undefined" ? exports.TClient : undefined)) }, optional: false }, { kind: 20, name: "prefix", type: { kind: 6 }, optional: false }] }, "RedisMutexClient": { kind: 18, typeName: "RedisMutexClient", types: [] }, "RedisMutexProvider": { kind: 2, typeName: "() => RedisConnection<RedisMutexClient>", typeName: "RedisMutexProvider" }, "Semaphore": { kind: 18, typeName: "Semaphore", types: [{ kind: 20, name: "promise", type: { kind: 22, type: { kind: 3 } }, optional: false }] }, "SentryTagValue": { kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 9 }, { kind: 2, typeName: "symbol" }, { kind: 5 }, { kind: 4 }], typeName: "SentryTagValue" }, "SimpleStore": { kind: 18, index: { kind: 1 }, types: [], typeName: "SimpleStore" } });
|
|
30
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":";;;;AAAA,0DAAgC;AAChC,0DAAgC;AAChC,0DAAgC;AAChC,uDAA6B;AAC7B,yDAA+B;AAC/B,+DAAqC;AACrC,6DAAmC;AACnC,uDAA6B;AAC7B,sDAA4B;AAC5B,wDAA8B;AAC9B,4DAAkC;AAClC,uCAeuB;AAdnB,wGAAA,eAAe,OAAA;AACf,8GAAA,qBAAqB,OAAA;AACrB,8GAAA,qBAAqB,OAAA;AACrB,kHAAA,yBAAyB,OAAA;AACzB,kGAAA,SAAS,OAAA;AACT,oGAAA,WAAW,OAAA;AAUf,wDAA8B;AAC9B,4DAAkC;AAClC,gEAAsC;AACtC,uDAA6B;AAC7B,wDAA8B;AAC9B,uDAA6B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":";;;;AAAA,yDAA+B;AAC/B,0DAAgC;AAChC,0DAAgC;AAChC,0DAAgC;AAChC,uDAA6B;AAC7B,yDAA+B;AAC/B,+DAAqC;AACrC,6DAAmC;AACnC,uDAA6B;AAC7B,sDAA4B;AAC5B,+DAAqC;AACrC,wDAA8B;AAC9B,4DAAkC;AAClC,uCAeuB;AAdnB,wGAAA,eAAe,OAAA;AACf,8GAAA,qBAAqB,OAAA;AACrB,8GAAA,qBAAqB,OAAA;AACrB,kHAAA,yBAAyB,OAAA;AACzB,kGAAA,SAAS,OAAA;AACT,oGAAA,WAAW,OAAA;AAUf,wDAA8B;AAC9B,4DAAkC;AAClC,gEAAsC;AACtC,uDAA6B;AAC7B,wDAA8B;AAC9B,uDAA6B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type AvailabilityLogger, type AvailabilityMonitor, type AvailabilityMonitorOptions } from '../availability';
|
|
2
|
+
export declare const DEFAULT_REDIS_UNAVAILABLE_ALERT_AFTER_MS = 60000;
|
|
3
|
+
export type RedisAvailabilityMonitor = AvailabilityMonitor;
|
|
4
|
+
export type RedisAvailabilityMonitorOptions = AvailabilityMonitorOptions;
|
|
5
|
+
export interface RedisAvailabilityClient {
|
|
6
|
+
on(event: 'error', listener: (error: unknown) => void): unknown;
|
|
7
|
+
on(event: 'ready' | 'reconnecting', listener: () => void): unknown;
|
|
8
|
+
removeListener(event: 'error', listener: (error: unknown) => void): unknown;
|
|
9
|
+
removeListener(event: 'ready' | 'reconnecting', listener: () => void): unknown;
|
|
10
|
+
}
|
|
11
|
+
export declare function monitorRedisAvailability(client: RedisAvailabilityClient, logger: AvailabilityLogger, options?: RedisAvailabilityMonitorOptions): RedisAvailabilityMonitor;
|
|
12
|
+
//# sourceMappingURL=availability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability.d.ts","sourceRoot":"","sources":["../../../../src/helpers/redis/availability.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAClC,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,wCAAwC,QAAsC,CAAC;AAC5F,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AAC3D,MAAM,MAAM,+BAA+B,GAAG,0BAA0B,CAAC;AAEzE,MAAM,WAAW,uBAAuB;IACpC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC;IAChE,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC;IACnE,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC;IAC5E,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC;CAClF;AAED,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,kBAAkB,EAC1B,OAAO,GAAE,+BAAoC,GAC9C,wBAAwB,CAoB1B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.__tsfTypeAliases = exports.DEFAULT_REDIS_UNAVAILABLE_ALERT_AFTER_MS = void 0;
|
|
4
|
+
exports.monitorRedisAvailability = monitorRedisAvailability;
|
|
5
|
+
const availability_1 = require("../availability");
|
|
6
|
+
exports.DEFAULT_REDIS_UNAVAILABLE_ALERT_AFTER_MS = availability_1.DEFAULT_AVAILABILITY_ALERT_AFTER_MS;
|
|
7
|
+
function monitorRedisAvailability(client, logger, options = {}) {
|
|
8
|
+
const monitor = (0, availability_1.createAvailabilityMonitor)(logger, { ...options, name: options.name ?? 'Redis' });
|
|
9
|
+
const onError = (error) => monitor.unavailable(error);
|
|
10
|
+
const onReconnecting = () => monitor.unavailable();
|
|
11
|
+
const onReady = () => monitor.available();
|
|
12
|
+
client.on('error', onError);
|
|
13
|
+
client.on('reconnecting', onReconnecting);
|
|
14
|
+
client.on('ready', onReady);
|
|
15
|
+
return {
|
|
16
|
+
unavailable: monitor.unavailable,
|
|
17
|
+
available: monitor.available,
|
|
18
|
+
stop() {
|
|
19
|
+
client.removeListener('error', onError);
|
|
20
|
+
client.removeListener('reconnecting', onReconnecting);
|
|
21
|
+
client.removeListener('ready', onReady);
|
|
22
|
+
monitor.stop();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
exports.__tsfTypeAliases = ({ "RedisAvailabilityClient": { kind: 18, typeName: "RedisAvailabilityClient", types: [] }, "RedisAvailabilityMonitor": { kind: 18, typeName: "AvailabilityMonitor", types: [], typeName: "RedisAvailabilityMonitor" }, "RedisAvailabilityMonitorOptions": { kind: 18, typeName: "AvailabilityMonitorOptions", types: [{ kind: 20, name: "alertAfterMs", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "name", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }], typeName: "RedisAvailabilityMonitorOptions" } });
|
|
27
|
+
//# sourceMappingURL=availability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability.js","sourceRoot":"","sources":["../../../../src/helpers/redis/availability.ts"],"names":[],"mappings":";;;;AAAA,kDAMyB;AAEZ,QAAA,wCAAwC,GAAG,kDAAmC,CAAC;AAW5F,kCACI,MAA+B,EAC/B,MAA0B,EAC1B,OAAO,GAAoC,EAAE;IAE7C,MAAM,OAAO,GAAG,IAAA,wCAAyB,EAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,OAAO,EAAE,CAAC,CAAC;IACjG,MAAM,OAAO,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC/D,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;IACnD,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;IAE1C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5B,MAAM,CAAC,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAC1C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAE5B,OAAO;QACH,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,IAAI;YACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxC,MAAM,CAAC,cAAc,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;YACtD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxC,OAAO,CAAC,IAAI,EAAE,CAAC;QACnB,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis.d.ts","sourceRoot":"","sources":["../../../../src/helpers/redis/redis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAKnD,MAAM,WAAW,eAAe,CAAC,OAAO,GAAG,KAAK;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG;IACvD,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAClB,
|
|
1
|
+
{"version":3,"file":"redis.d.ts","sourceRoot":"","sources":["../../../../src/helpers/redis/redis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAKnD,MAAM,WAAW,eAAe,CAAC,OAAO,GAAG,KAAK;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG;IACvD,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAClB,CA2CA;AAID,wBAAgB,WAAW,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,eAAe,CAMlE;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAIxD"}
|
|
@@ -30,7 +30,10 @@ function createRedisOptions(configPrefix) {
|
|
|
30
30
|
port: Number(config.REDIS_SENTINEL_PORT ?? 26379)
|
|
31
31
|
}
|
|
32
32
|
],
|
|
33
|
-
name: config.REDIS_SENTINEL_NAME ? String(config.REDIS_SENTINEL_NAME) : undefined
|
|
33
|
+
name: config.REDIS_SENTINEL_NAME ? String(config.REDIS_SENTINEL_NAME) : undefined,
|
|
34
|
+
failoverDetector: true,
|
|
35
|
+
sentinelMaxConnections: 1,
|
|
36
|
+
reconnectOnError: error => (error.message.startsWith('READONLY') ? 2 : false)
|
|
34
37
|
}
|
|
35
38
|
};
|
|
36
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis.js","sourceRoot":"","sources":["../../../../src/helpers/redis/redis.ts"],"names":[],"mappings":";;;;;;;AAAA,8DAAmD;AAEnD,iDAAkD;AAClD,2CAA+C;AAO/C,4BAAmC,YAAqB;IAIpD,MAAM,MAAM,GAAG,EAAE,GAAG,IAAA,uBAAY,GAAE,EAA6B,CAAC;IAEhE,IAAI,YAAY,EAAE,CAAC;QACf,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YACpC,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,YAAY,SAAS,CAAC,EAAE,CAAC;gBAC3C,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,SAAS;oBAAE,SAAS;gBACxC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YACjE,CAAC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