Packages
Each library ships ESM, CJS, and TypeScript declarations from its dist/ directory via tsup. Import only from published package roots—never from deep src/ paths—so your builds track the supported public contract.
Stability expectations
Exported symbols are intentional. Semantics may evolve while the ecosystem is pre-1.0. Review changelog entries and diff public types when upgrading between commits or tagged releases.
Ecosystem matrix
| Package | Role | Deep dive |
|---|---|---|
orveth | Unscoped meta-package: one install that re-exports every @orveth/* public entrypoint. Prefer individual scoped packages when you want a smaller dependency graph. | Getting started |
@orveth/core | Lifecycle interfaces and runtime metadata helpers. | Core |
@orveth/http | HTTP status constants, response preparation, header utilities. | HTTP |
@orveth/server | Node.js HTTP runtime with routing, middleware, and JSON helpers. | Server |
@orveth/errors | Typed errors with stable machine codes and JSON normalization. | Errors |
@orveth/config | Typed configuration parsing from arbitrary sources. | Config |
@orveth/logger | Structured logging interfaces and a console JSON-lines sink. | Logger |
@orveth/validation | Discriminated validation results and adapter-friendly validators. | Validation |
@orveth/https | TLS file loading and HTTPS listeners for Orveth apps. | HTTPS |
@orveth/jwt | HS256 JWT sign and verify via jose. | JWT |
@orveth/prisma | Prisma shutdown hooks and database health routes. | Prisma |
Canonical import examples
These snippets mirror the symbols exported from each package entrypoint today.
@orveth/server
import {
Orveth,
DEFAULT_MAX_REQUEST_BODY_BYTES,
type Handler,
type HandlerResult,
type HttpMethod,
type Middleware,
type Next,
type RequestContext,
type RouteHandler,
} from "@orveth/server";@orveth/http
import {
HttpStatus,
ContentType,
prepareJsonResponse,
prepareTextResponse,
prepareJsonErrorResponse,
getHeader,
normalizeHeaderName,
acceptsJson,
type HttpStatusCode,
type RawHeaders,
type PreparedJsonResponse,
type PreparedTextResponse,
} from "@orveth/http";@orveth/errors
import {
OrvethError,
HttpError,
ValidationError,
ConfigError,
isNormalizedError,
} from "@orveth/errors";
import type { NormalizedError } from "@orveth/errors";@orveth/config
import {
parseConfig,
createMapSource,
createProcessEnvSource,
requiredString,
optionalString,
coercedInteger,
coercedBoolean,
} from "@orveth/config";
import type { ConfigField, ConfigParser, ConfigShape, ConfigSource } from "@orveth/config";@orveth/logger
import { ConsoleLogger } from "@orveth/logger";
import type { Logger, LogLevel, LogRecord, LogAttributes } from "@orveth/logger";@orveth/validation
import { validationSuccess, validationFailure } from "@orveth/validation";
import type {
Validator,
ValidationResult,
ValidationIssue,
ValidationSuccess,
ValidationFailure,
} from "@orveth/validation";@orveth/core
import { createPackageMetadata } from "@orveth/core";
import type { Disposable, Initializable, PackageMetadata } from "@orveth/core";@orveth/https
import { listenHttps, readTlsFilePair } from "@orveth/https";
import type {
ListenHttpsOptions,
RequestListenerSource,
TlsFilePairPaths,
} from "@orveth/https";@orveth/jwt
import {
signJwt,
verifyJwt,
verifyBearerJwt,
extractBearerToken,
requireBearerToken,
} from "@orveth/jwt";
import type { JwtClaims, SignJwtOptions, VerifyJwtOptions } from "@orveth/jwt";@orveth/prisma
import {
checkDatabaseConnection,
createDatabaseHealthRoute,
prismaHealth,
disconnectPrisma,
registerPrismaShutdown,
} from "@orveth/prisma";