Files
core/src/index.ts
T
chrnx a30c2cecb3 chore(release): 26.9.0-beta.2 to staging
The plugins repository builds against Plugin { name, mount } and app.boot(),
which only develop has. Staging the version publishes it to Verdaccio under
stg and nowhere else; the npm and JSR cut stays a separate decision.

The bump also moves the exported VERSION, which was two releases behind and had
no business being. Its comment claimed it was "replaced at publish time" and
nothing ever did that — not tsup, not stage.yml, not release.yml, which only
reads the version out of package.json. VERSION is what a consumer quotes in a
bug report, so a stale one sends someone to the changelog of a release they are
not running.

Pinning it to package.json is what keeps this from being a fix with a shelf
life: the next bump that forgets it now fails the build. smoke.test.ts was
never going to catch it, because it asserts the CalVer shape and a stale
version matches that perfectly.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-17 22:39:49 -05:00

107 lines
3.5 KiB
TypeScript

/**
* @green-tea/core — a decorator-driven, type-safe HTTP framework.
* Public API barrel: application bootstrap, routing/DI decorators, streaming,
* request validation, security helpers, and the cross-server mesh.
*/
import 'reflect-metadata';
/**
* Package version. Kept in step with `package.json` and `deno.json` by hand, and pinned to them by
* `test/package-metadata.test.ts`.
*
* It used to say it was "replaced at publish time", which nothing ever did — not `tsup`, not
* `stage.yml`, not `release.yml`, which only ever *reads* the version out of `package.json`. So the
* constant drifted two releases behind while the comment explained why it could not, and the only
* test touching it checked the CalVer shape, which a stale version satisfies perfectly.
*/
export const VERSION = '26.9.0-beta.2';
// Application
export { createApp } from './app';
export type { App, InspectLine, Explain, MeshConfig } from './app';
// Graph visualization
export { toMermaid, toDOT } from './graph-viz';
export type { GraphView } from './graph-viz';
export { buildOpenApi } from './openapi';
export type { OpenApiDoc, OpenApiInfo, OpenApiRoute } from './openapi';
// Views
export { render } from './views';
// Routing & decorators
export {
Provider,
Step,
Route,
Get,
Head,
Module,
Transformer,
Sse,
Ws,
Stream,
Post,
Put,
Patch,
Delete,
Options,
Html,
} from './metadata';
export type { Transport, HttpMethod, RouteDecorator, TransformerFn } from './metadata';
export type { Plugin, PluginApi, ScopeApi, ScopeNode } from './plugin';
export type { Hooks } from './app';
export type { TeardownFn } from './lifecycle';
// Transformers & error signals
export { JsonTransformer } from './transformers';
export type { ErrorRenderer, ErrorRequest, ErrorResponse } from './transformers';
export {
HttpError,
Unauthorized,
NotFound,
Redirect,
NotModified,
ValidationError,
TransportMismatchError,
HTTP_ERROR,
VALIDATION_ERROR,
isHttpError,
isValidationError,
} from './signals';
export type { HttpErrorLike } from './signals';
// Bus & flow
export { Bus } from './bus';
export type { LifecycleEvent, EventPayload, Correlation, Events } from './bus';
export { flow, Flow } from './flow';
export type { StepFn, CompiledFlow } from './flow';
// Parameter decorators
export { needs, ctx, param, query, body, headers, header, inbound, abort } from './params';
export type { Query, Headers, Context, ArgSpec, ArgDecorator } from './params';
// Observability
export { createDefaultLogger, logRequests, withConsoleFallback } from './logger';
export type { Logger, LogLevel, LogFields } from './logger';
// Streaming
export { channel, isAsyncIterable } from './channel';
export type { Channel } from './channel';
export { Rooms } from './rooms';
export { sse, isSseEvent, sseEncoder, ndjsonEncoder } from './encoders';
export type { StreamEncoder, SseEvent, SseFields } from './encoders';
// HTTP, security & validation
export type { RequestLimits } from './http';
export { UNMATCHED_ROUTE } from './http/core';
export type { TlsOptions, CorsOptions, SecurityOptions } from './security';
export type { UploadedFile, MultipartBody } from './multipart';
export type { StandardSchemaV1 } from './standard-schema';
// Mesh
export { connectLink } from './mesh/link';
export { buildRemote, envelopeFrom } from './mesh/teacup';
export { buildManifest, createMeshControl, MESH_CONTROL_PATH } from './mesh/teapot';
export type { Manifest, RequestEnvelope, Frame } from './mesh/protocol';