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

PackageRoleDeep dive
orvethUnscoped 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/coreLifecycle interfaces and runtime metadata helpers.Core
@orveth/httpHTTP status constants, response preparation, header utilities.HTTP
@orveth/serverNode.js HTTP runtime with routing, middleware, and JSON helpers.Server
@orveth/errorsTyped errors with stable machine codes and JSON normalization.Errors
@orveth/configTyped configuration parsing from arbitrary sources.Config
@orveth/loggerStructured logging interfaces and a console JSON-lines sink.Logger
@orveth/validationDiscriminated validation results and adapter-friendly validators.Validation
@orveth/httpsTLS file loading and HTTPS listeners for Orveth apps.HTTPS
@orveth/jwtHS256 JWT sign and verify via jose.JWT
@orveth/prismaPrisma shutdown hooks and database health routes.Prisma

Canonical import examples

These snippets mirror the symbols exported from each package entrypoint today.

@orveth/server

server-imports.ts
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";