@theokit/http 0.4.0

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.
Files changed (38) hide show
  1. package/README.md +172 -0
  2. package/dist/app.d.ts +67 -0
  3. package/dist/app.js +11 -0
  4. package/dist/app.js.map +1 -0
  5. package/dist/chunk-34KOKJ5M.js +71 -0
  6. package/dist/chunk-34KOKJ5M.js.map +1 -0
  7. package/dist/chunk-3PGQVQWG.js +276 -0
  8. package/dist/chunk-3PGQVQWG.js.map +1 -0
  9. package/dist/chunk-7QVYU63E.js +7 -0
  10. package/dist/chunk-7QVYU63E.js.map +1 -0
  11. package/dist/chunk-HLW7YKZE.js +99 -0
  12. package/dist/chunk-HLW7YKZE.js.map +1 -0
  13. package/dist/chunk-LKNI6QEP.js +20 -0
  14. package/dist/chunk-LKNI6QEP.js.map +1 -0
  15. package/dist/chunk-LWCNTZN6.js +87 -0
  16. package/dist/chunk-LWCNTZN6.js.map +1 -0
  17. package/dist/chunk-SMWUPP2C.js +125 -0
  18. package/dist/chunk-SMWUPP2C.js.map +1 -0
  19. package/dist/chunk-TBMGRXH5.js +477 -0
  20. package/dist/chunk-TBMGRXH5.js.map +1 -0
  21. package/dist/chunk-U46H4CGF.js +34 -0
  22. package/dist/chunk-U46H4CGF.js.map +1 -0
  23. package/dist/exception-filter-chain-BCSQ3MZ2.js +10 -0
  24. package/dist/exception-filter-chain-BCSQ3MZ2.js.map +1 -0
  25. package/dist/index.d.ts +1047 -0
  26. package/dist/index.js +761 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/interceptor-chain-6S3PUV7J.js +9 -0
  29. package/dist/interceptor-chain-6S3PUV7J.js.map +1 -0
  30. package/dist/middleware-consumer-ljxK1fU_.d.ts +58 -0
  31. package/dist/runtime-node.d.ts +21 -0
  32. package/dist/runtime-node.js +12 -0
  33. package/dist/runtime-node.js.map +1 -0
  34. package/dist/theokit-plugin.d.ts +65 -0
  35. package/dist/theokit-plugin.js +432 -0
  36. package/dist/theokit-plugin.js.map +1 -0
  37. package/dist/types-CGthbcon.d.ts +19 -0
  38. package/package.json +58 -0
package/README.md ADDED
@@ -0,0 +1,172 @@
1
+ # @theokit/http-decorators
2
+
3
+ NestJS-style decorators (`@Controller`, `@Get`, `@Post`, `@Body`, `@UseGuards`) that bridge to TheoKit's `defineRoute` + `defineMiddleware`. Opt-in for teams migrating from NestJS.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @theokit/http-decorators reflect-metadata
9
+ ```
10
+
11
+ Add to your `tsconfig.json`:
12
+
13
+ ```json
14
+ {
15
+ "compilerOptions": {
16
+ "experimentalDecorators": true,
17
+ "emitDecoratorMetadata": true
18
+ }
19
+ }
20
+ ```
21
+
22
+ ## Quick start
23
+
24
+ ```typescript
25
+ import { Controller, Get, Post, Body } from '@theokit/http-decorators'
26
+ import { z } from 'zod'
27
+
28
+ const zCreateCat = z.object({ name: z.string(), age: z.number() })
29
+
30
+ class CreateCatDto {
31
+ static schema = zCreateCat
32
+ }
33
+
34
+ @Controller('cats')
35
+ export class CatsController {
36
+ @Get()
37
+ findAll(): string {
38
+ return 'This action returns all cats'
39
+ }
40
+
41
+ @Post()
42
+ create(@Body() body: CreateCatDto) {
43
+ return `Added ${(body as z.infer<typeof zCreateCat>).name}`
44
+ }
45
+ }
46
+ ```
47
+
48
+ ## DTO validation (Pattern D2 — Zod static schema)
49
+
50
+ TheoKit uses Zod as the single source of truth for validation. Attach a `static schema` to your DTO class:
51
+
52
+ ```typescript
53
+ const zCreateCat = z.object({
54
+ name: z.string().min(2).max(50),
55
+ age: z.number().min(0),
56
+ breed: z.string(),
57
+ })
58
+
59
+ class CreateCatDto {
60
+ static schema = zCreateCat
61
+ }
62
+ ```
63
+
64
+ The bridge reads `CreateCatDto.schema` at metadata-walk time and feeds it to `defineRoute({ body: zCreateCat })`. This preserves TheoKit's OpenAPI generation + type inference pipeline.
65
+
66
+ ## Guards and Interceptors
67
+
68
+ ```typescript
69
+ import { Controller, Get, UseGuards } from '@theokit/http-decorators'
70
+
71
+ class AuthGuard {
72
+ canActivate(request: Request): boolean {
73
+ return request.headers.get('authorization') !== null
74
+ }
75
+ }
76
+
77
+ @Controller('admin')
78
+ export class AdminController {
79
+ @UseGuards(AuthGuard)
80
+ @Get()
81
+ dashboard() {
82
+ return { status: 'authenticated' }
83
+ }
84
+ }
85
+ ```
86
+
87
+ Guards that return `false` produce a 401 response. `@UseInterceptors` wraps the handler for post-processing (logging, caching).
88
+
89
+ ## CLI scaffold
90
+
91
+ ```bash
92
+ theokit generate controller cats
93
+ # Creates server/controllers/cats.controller.ts
94
+ ```
95
+
96
+ ## registerControllers (low-level API)
97
+
98
+ For advanced use cases without the Vite plugin:
99
+
100
+ ```typescript
101
+ import { registerControllers } from '@theokit/http-decorators'
102
+ import { CatsController } from './controllers/cats.controller.js'
103
+
104
+ const routes = registerControllers([CatsController])
105
+ // Returns RouteRegistration[] with verb, fullPath, walkResult per method
106
+ ```
107
+
108
+ ## Decorators reference
109
+
110
+ | Decorator | Kind | Purpose |
111
+ |---|---|---|
112
+ | `@Controller(prefix?, opts?)` | Class | Route prefix scope |
113
+ | `@Get(path?)` | Method | GET endpoint |
114
+ | `@Post(path?)` | Method | POST endpoint |
115
+ | `@Put(path?)` | Method | PUT endpoint |
116
+ | `@Patch(path?)` | Method | PATCH endpoint |
117
+ | `@Delete(path?)` | Method | DELETE endpoint |
118
+ | `@Options(path?)` | Method | OPTIONS endpoint |
119
+ | `@Head(path?)` | Method | HEAD endpoint |
120
+ | `@All(path?)` | Method | All HTTP methods |
121
+ | `@Body(key?)` | Parameter | Request body (or body[key]) |
122
+ | `@Param(key?)` | Parameter | Route params (or params[key]) |
123
+ | `@Query(key?)` | Parameter | Query string (or query[key]) |
124
+ | `@Headers(name?)` | Parameter | Request headers |
125
+ | `@Req()` | Parameter | Full Request object |
126
+ | `@Res(opts?)` | Parameter | Response object (`passthrough` option) |
127
+ | `@Session()` | Parameter | Session object |
128
+ | `@Ip()` | Parameter | Client IP |
129
+ | `@HostParam(key?)` | Parameter | Host parameters |
130
+ | `@HttpCode(status)` | Method | Override response status code |
131
+ | `@Header(name, value)` | Method | Set response header |
132
+ | `@Redirect(url, status?)` | Method | Redirect response |
133
+ | `@UseGuards(...guards)` | Class/Method | Attach guard classes |
134
+ | `@UseInterceptors(...interceptors)` | Class/Method | Attach interceptor classes |
135
+
136
+ ## Limitations
137
+
138
+ ### Singleton-scope controllers only (v0.1.0)
139
+
140
+ Controllers are instantiated once per `registerControllers` call. NestJS request-scoped controllers (`@Injectable({ scope: Scope.REQUEST })`) are not supported. Migration path: v0.2.0+ via `@theokit/di` integration.
141
+
142
+ ### Interceptor wrap semantics simplified
143
+
144
+ NestJS interceptors can skip calling `next()` (e.g., cache-hit short-circuit). v0.1.0 wraps always call `next()` then post-process. Consumers needing pre-handler short-circuit should use `defineMiddleware` directly.
145
+
146
+ ### Handler returning Response bypasses decorator-set status/headers
147
+
148
+ If your handler returns a `Response` object directly, `@HttpCode` and `@Header` decorators are not applied. You own the full response. This matches NestJS behavior with `@Res({ passthrough: false })`.
149
+
150
+ ## Troubleshooting
151
+
152
+ ### `HttpDecoratorsConfigError: emitDecoratorMetadata not enabled`
153
+
154
+ Your `tsconfig.json` is missing the `emitDecoratorMetadata: true` flag. Add both flags:
155
+
156
+ ```json
157
+ {
158
+ "compilerOptions": {
159
+ "experimentalDecorators": true,
160
+ "emitDecoratorMetadata": true
161
+ }
162
+ }
163
+ ```
164
+
165
+ ### `HttpDecoratorsConfigError: missing @Controller() decorator`
166
+
167
+ You have `@Get`/`@Post` methods on a class that lacks `@Controller()`. Add the decorator to the class.
168
+
169
+ ## Bundle cost
170
+
171
+ - Opt-in consumers: ~8-13KB gzipped (`reflect-metadata` ~3KB + this package ~5-10KB)
172
+ - Non-opt-in consumers: 0KB
package/dist/app.d.ts ADDED
@@ -0,0 +1,67 @@
1
+ import { S as ServerHandle } from './types-CGthbcon.js';
2
+
3
+ /**
4
+ * TheoApp — NestJS/Spring Boot-style application bootstrap.
5
+ *
6
+ * Internally uses Web Standard Request/Response pipeline.
7
+ * Node adapter converts at the HTTP server boundary.
8
+ */
9
+ /** Readiness check — async function returning health status. */
10
+ type ReadinessCheck = () => Promise<{
11
+ name: string;
12
+ healthy: boolean;
13
+ message?: string;
14
+ }>;
15
+ interface TheoAppOptions {
16
+ /** Controller classes decorated with @Controller. */
17
+ controllers: Function[];
18
+ /** Agent classes decorated with @Agent — auto-wired with routes + SSE + tools. */
19
+ agents?: Function[];
20
+ /** @Module class for structured DI. */
21
+ module?: Function;
22
+ /** Provider/toolbox classes — instantiated and injected into controllers + agents. */
23
+ providers?: Function[];
24
+ /** LLM API key for agent execution (reads OPENROUTER_API_KEY env if not set). */
25
+ llmApiKey?: string;
26
+ /** LLM model override (default: from @Agent({ model }) metadata). */
27
+ llmModel?: string;
28
+ /** Agent stream factory override (for testing or custom SDK wiring). */
29
+ agentStreamFactory?: (walk: unknown, tools: unknown[], apiKey: string, model?: string) => (message: string, sessionId: string) => AsyncIterable<unknown>;
30
+ /** HTML string to serve at GET / (inline frontend). */
31
+ html?: string;
32
+ /** Readiness checks for GET /__theo/ready (K8s readiness probe). */
33
+ readinessChecks?: ReadinessCheck[];
34
+ /** Custom health endpoint path (default: '/__theo/health'). */
35
+ healthPath?: string;
36
+ /** Custom readiness endpoint path (default: '/__theo/ready'). */
37
+ readyPath?: string;
38
+ }
39
+ declare class TheoApp {
40
+ private serverHandle;
41
+ private readonly routes;
42
+ private frontendHtml?;
43
+ private readonly startTime;
44
+ private readonly healthPath;
45
+ private readonly readyPath;
46
+ private readonly readinessChecks;
47
+ private constructor();
48
+ /**
49
+ * Create a TheoKit application with Spring Boot-style DI.
50
+ *
51
+ * EC-7: async because Container may resolve async factories (Agent.create).
52
+ * EC-2: Registration order guaranteed: providers → controllers → agents.
53
+ */
54
+ static create(opts: TheoAppOptions): Promise<TheoApp>;
55
+ listen(port: number): Promise<void>;
56
+ getServerHandle(): ServerHandle;
57
+ close(): Promise<void>;
58
+ private agentRoutes;
59
+ private autoWireAgents;
60
+ private handleReadinessCheck;
61
+ private createFallbackStream;
62
+ private handleRequest;
63
+ private findRoute;
64
+ private buildArgs;
65
+ }
66
+
67
+ export { type ReadinessCheck, TheoApp, type TheoAppOptions };
package/dist/app.js ADDED
@@ -0,0 +1,11 @@
1
+ import {
2
+ TheoApp
3
+ } from "./chunk-TBMGRXH5.js";
4
+ import "./chunk-SMWUPP2C.js";
5
+ import "./chunk-HLW7YKZE.js";
6
+ import "./chunk-3PGQVQWG.js";
7
+ import "./chunk-7QVYU63E.js";
8
+ export {
9
+ TheoApp
10
+ };
11
+ //# sourceMappingURL=app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,71 @@
1
+ import {
2
+ CATCH_EXCEPTIONS,
3
+ HttpException,
4
+ getMeta
5
+ } from "./chunk-3PGQVQWG.js";
6
+ import {
7
+ resolveOrNew
8
+ } from "./chunk-LKNI6QEP.js";
9
+ import {
10
+ __name
11
+ } from "./chunk-7QVYU63E.js";
12
+
13
+ // src/bridge/exception-filter-chain.ts
14
+ async function runExceptionFilters(exception, filters, request, container) {
15
+ const host = {
16
+ getRequest: /* @__PURE__ */ __name(() => request, "getRequest")
17
+ };
18
+ for (const FilterCtor of filters) {
19
+ const catchTypes = getMeta(CATCH_EXCEPTIONS, FilterCtor) ?? [];
20
+ if (matchesException(exception, catchTypes)) {
21
+ const filter = resolveOrNew(FilterCtor, container);
22
+ try {
23
+ return await filter.catch(exception, host);
24
+ } catch (filterError) {
25
+ console.error("[@theokit/http] Exception filter threw:", filterError);
26
+ return globalFallback(exception);
27
+ }
28
+ }
29
+ }
30
+ return builtInResponse(exception);
31
+ }
32
+ __name(runExceptionFilters, "runExceptionFilters");
33
+ function matchesException(exception, catchTypes) {
34
+ if (catchTypes.length === 0) return true;
35
+ return catchTypes.some((Type) => exception instanceof Type);
36
+ }
37
+ __name(matchesException, "matchesException");
38
+ function builtInResponse(exception) {
39
+ if (exception instanceof HttpException) {
40
+ return new Response(JSON.stringify(exception.toJSON()), {
41
+ status: exception.statusCode,
42
+ headers: {
43
+ "content-type": "application/json"
44
+ }
45
+ });
46
+ }
47
+ return globalFallback(exception);
48
+ }
49
+ __name(builtInResponse, "builtInResponse");
50
+ function globalFallback(exception) {
51
+ const message = exception instanceof Error ? exception.message : "Internal server error";
52
+ console.error("[@theokit/http] Unhandled exception:", exception);
53
+ return new Response(JSON.stringify({
54
+ error: {
55
+ code: "INTERNAL_SERVER_ERROR",
56
+ message,
57
+ statusCode: 500
58
+ }
59
+ }), {
60
+ status: 500,
61
+ headers: {
62
+ "content-type": "application/json"
63
+ }
64
+ });
65
+ }
66
+ __name(globalFallback, "globalFallback");
67
+
68
+ export {
69
+ runExceptionFilters
70
+ };
71
+ //# sourceMappingURL=chunk-34KOKJ5M.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/bridge/exception-filter-chain.ts"],"sourcesContent":["/**\n * Exception filter pipeline — Web Standard Request/Response.\n *\n * Returns a Response instead of writing to ServerResponse.\n * EC-1: recursion guard — filter that throws → global fallback.\n */\nimport { HttpException } from '../exceptions/http-exception.js'\nimport { getMeta, CATCH_EXCEPTIONS } from '../metadata/index.js'\n\nimport { resolveOrNew, type DiContainer } from './di-resolve.js'\n\n/** Interface for exception filter classes (bound via @UseFilters). */\nexport interface ExceptionFilter {\n catch(exception: unknown, host: ArgumentsHost): Response | Promise<Response>\n}\n\n/** ArgumentsHost — Web Standard. */\nexport interface ArgumentsHost {\n getRequest(): Request\n}\n\n/**\n * Run exception filters and return an error Response.\n * Returns the filter's Response or a built-in fallback.\n */\nexport async function runExceptionFilters(\n exception: unknown,\n filters: Function[],\n request: Request,\n container?: DiContainer,\n): Promise<Response> {\n const host: ArgumentsHost = {\n getRequest: () => request,\n }\n\n for (const FilterCtor of filters) {\n const catchTypes = getMeta<Function[]>(CATCH_EXCEPTIONS, FilterCtor) ?? []\n if (matchesException(exception, catchTypes)) {\n const filter = resolveOrNew(FilterCtor, container) as ExceptionFilter\n try {\n return await filter.catch(exception, host)\n } catch (filterError) {\n // EC-1: filter itself threw — fall to global fallback\n console.error('[@theokit/http] Exception filter threw:', filterError)\n return globalFallback(exception)\n }\n }\n }\n\n return builtInResponse(exception)\n}\n\nfunction matchesException(exception: unknown, catchTypes: Function[]): boolean {\n if (catchTypes.length === 0) return true\n return catchTypes.some((Type) => exception instanceof Type)\n}\n\nfunction builtInResponse(exception: unknown): Response {\n if (exception instanceof HttpException) {\n return new Response(JSON.stringify(exception.toJSON()), {\n status: exception.statusCode,\n headers: { 'content-type': 'application/json' },\n })\n }\n return globalFallback(exception)\n}\n\nfunction globalFallback(exception: unknown): Response {\n const message = exception instanceof Error ? exception.message : 'Internal server error'\n console.error('[@theokit/http] Unhandled exception:', exception)\n return new Response(\n JSON.stringify({ error: { code: 'INTERNAL_SERVER_ERROR', message, statusCode: 500 } }),\n { status: 500, headers: { 'content-type': 'application/json' } },\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAyBA,eAAsBA,oBACpBC,WACAC,SACAC,SACAC,WAAuB;AAEvB,QAAMC,OAAsB;IAC1BC,YAAY,6BAAMH,SAAN;EACd;AAEA,aAAWI,cAAcL,SAAS;AAChC,UAAMM,aAAaC,QAAoBC,kBAAkBH,UAAAA,KAAe,CAAA;AACxE,QAAII,iBAAiBV,WAAWO,UAAAA,GAAa;AAC3C,YAAMI,SAASC,aAAaN,YAAYH,SAAAA;AACxC,UAAI;AACF,eAAO,MAAMQ,OAAOE,MAAMb,WAAWI,IAAAA;MACvC,SAASU,aAAa;AAEpBC,gBAAQC,MAAM,2CAA2CF,WAAAA;AACzD,eAAOG,eAAejB,SAAAA;MACxB;IACF;EACF;AAEA,SAAOkB,gBAAgBlB,SAAAA;AACzB;AAzBsBD;AA2BtB,SAASW,iBAAiBV,WAAoBO,YAAsB;AAClE,MAAIA,WAAWY,WAAW,EAAG,QAAO;AACpC,SAAOZ,WAAWa,KAAK,CAACC,SAASrB,qBAAqBqB,IAAAA;AACxD;AAHSX;AAKT,SAASQ,gBAAgBlB,WAAkB;AACzC,MAAIA,qBAAqBsB,eAAe;AACtC,WAAO,IAAIC,SAASC,KAAKC,UAAUzB,UAAU0B,OAAM,CAAA,GAAK;MACtDC,QAAQ3B,UAAU4B;MAClBC,SAAS;QAAE,gBAAgB;MAAmB;IAChD,CAAA;EACF;AACA,SAAOZ,eAAejB,SAAAA;AACxB;AARSkB;AAUT,SAASD,eAAejB,WAAkB;AACxC,QAAM8B,UAAU9B,qBAAqB+B,QAAQ/B,UAAU8B,UAAU;AACjEf,UAAQC,MAAM,wCAAwChB,SAAAA;AACtD,SAAO,IAAIuB,SACTC,KAAKC,UAAU;IAAET,OAAO;MAAEgB,MAAM;MAAyBF;MAASF,YAAY;IAAI;EAAE,CAAA,GACpF;IAAED,QAAQ;IAAKE,SAAS;MAAE,gBAAgB;IAAmB;EAAE,CAAA;AAEnE;AAPSZ;","names":["runExceptionFilters","exception","filters","request","container","host","getRequest","FilterCtor","catchTypes","getMeta","CATCH_EXCEPTIONS","matchesException","filter","resolveOrNew","catch","filterError","console","error","globalFallback","builtInResponse","length","some","Type","HttpException","Response","JSON","stringify","toJSON","status","statusCode","headers","message","Error","code"]}
@@ -0,0 +1,276 @@
1
+ import {
2
+ __name
3
+ } from "./chunk-7QVYU63E.js";
4
+
5
+ // src/metadata/keys.ts
6
+ var CONTROLLER_PREFIX = /* @__PURE__ */ Symbol.for("theokit:http-decorators:controller-prefix");
7
+ var ROUTE_METHODS = /* @__PURE__ */ Symbol.for("theokit:http-decorators:route-methods");
8
+ var ROUTE_PARAMS = /* @__PURE__ */ Symbol.for("theokit:http-decorators:route-params");
9
+ var ROUTE_STATUS = /* @__PURE__ */ Symbol.for("theokit:http-decorators:route-status");
10
+ var ROUTE_HEADERS = /* @__PURE__ */ Symbol.for("theokit:http-decorators:route-headers");
11
+ var ROUTE_REDIRECT = /* @__PURE__ */ Symbol.for("theokit:http-decorators:route-redirect");
12
+ var USE_GUARDS = /* @__PURE__ */ Symbol.for("theokit:http-decorators:use-guards");
13
+ var USE_INTERCEPTORS = /* @__PURE__ */ Symbol.for("theokit:http-decorators:use-interceptors");
14
+ var USE_FILTERS = /* @__PURE__ */ Symbol.for("theokit:http-decorators:use-filters");
15
+ var CATCH_EXCEPTIONS = /* @__PURE__ */ Symbol.for("theokit:http-decorators:catch-exceptions");
16
+
17
+ // src/metadata/storage.ts
18
+ import "reflect-metadata";
19
+ function setMeta(key, target, value, propertyKey) {
20
+ if (propertyKey !== void 0) {
21
+ Reflect.defineMetadata(key, value, target, propertyKey);
22
+ } else {
23
+ Reflect.defineMetadata(key, value, target);
24
+ }
25
+ }
26
+ __name(setMeta, "setMeta");
27
+ function getMeta(key, target, propertyKey) {
28
+ if (propertyKey !== void 0) {
29
+ return Reflect.getMetadata(key, target, propertyKey);
30
+ }
31
+ return Reflect.getMetadata(key, target);
32
+ }
33
+ __name(getMeta, "getMeta");
34
+
35
+ // src/exceptions/http-exception.ts
36
+ var STATUS_CODES = {
37
+ 400: "BAD_REQUEST",
38
+ 401: "UNAUTHORIZED",
39
+ 403: "FORBIDDEN",
40
+ 404: "NOT_FOUND",
41
+ 405: "METHOD_NOT_ALLOWED",
42
+ 406: "NOT_ACCEPTABLE",
43
+ 408: "REQUEST_TIMEOUT",
44
+ 409: "CONFLICT",
45
+ 410: "GONE",
46
+ 412: "PRECONDITION_FAILED",
47
+ 413: "PAYLOAD_TOO_LARGE",
48
+ 415: "UNSUPPORTED_MEDIA_TYPE",
49
+ 418: "IM_A_TEAPOT",
50
+ 422: "UNPROCESSABLE_ENTITY",
51
+ 429: "TOO_MANY_REQUESTS",
52
+ 500: "INTERNAL_SERVER_ERROR",
53
+ 501: "NOT_IMPLEMENTED",
54
+ 502: "BAD_GATEWAY",
55
+ 503: "SERVICE_UNAVAILABLE",
56
+ 504: "GATEWAY_TIMEOUT",
57
+ 505: "HTTP_VERSION_NOT_SUPPORTED"
58
+ };
59
+ var HttpException = class extends Error {
60
+ static {
61
+ __name(this, "HttpException");
62
+ }
63
+ statusCode;
64
+ code;
65
+ description;
66
+ constructor(message, statusCode, options) {
67
+ super(message, options?.cause ? {
68
+ cause: options.cause
69
+ } : void 0);
70
+ this.name = this.constructor.name;
71
+ this.statusCode = statusCode;
72
+ this.code = STATUS_CODES[statusCode] ?? "INTERNAL_SERVER_ERROR";
73
+ this.description = options?.description;
74
+ }
75
+ toJSON() {
76
+ return {
77
+ error: {
78
+ code: this.code,
79
+ message: this.message,
80
+ statusCode: this.statusCode,
81
+ ...this.description ? {
82
+ description: this.description
83
+ } : {}
84
+ }
85
+ };
86
+ }
87
+ };
88
+ function factory(status, defaultMsg) {
89
+ return class extends HttpException {
90
+ constructor(message = defaultMsg, options) {
91
+ super(message, status, options);
92
+ this.name = this.constructor.name;
93
+ }
94
+ };
95
+ }
96
+ __name(factory, "factory");
97
+ var BadRequestException = class extends factory(400, "Bad Request") {
98
+ static {
99
+ __name(this, "BadRequestException");
100
+ }
101
+ };
102
+ var UnauthorizedException = class extends factory(401, "Unauthorized") {
103
+ static {
104
+ __name(this, "UnauthorizedException");
105
+ }
106
+ };
107
+ var ForbiddenException = class extends factory(403, "Forbidden") {
108
+ static {
109
+ __name(this, "ForbiddenException");
110
+ }
111
+ };
112
+ var NotFoundException = class extends factory(404, "Not Found") {
113
+ static {
114
+ __name(this, "NotFoundException");
115
+ }
116
+ };
117
+ var MethodNotAllowedException = class extends factory(405, "Method Not Allowed") {
118
+ static {
119
+ __name(this, "MethodNotAllowedException");
120
+ }
121
+ };
122
+ var NotAcceptableException = class extends factory(406, "Not Acceptable") {
123
+ static {
124
+ __name(this, "NotAcceptableException");
125
+ }
126
+ };
127
+ var RequestTimeoutException = class extends factory(408, "Request Timeout") {
128
+ static {
129
+ __name(this, "RequestTimeoutException");
130
+ }
131
+ };
132
+ var ConflictException = class extends factory(409, "Conflict") {
133
+ static {
134
+ __name(this, "ConflictException");
135
+ }
136
+ };
137
+ var GoneException = class extends factory(410, "Gone") {
138
+ static {
139
+ __name(this, "GoneException");
140
+ }
141
+ };
142
+ var PreconditionFailedException = class extends factory(412, "Precondition Failed") {
143
+ static {
144
+ __name(this, "PreconditionFailedException");
145
+ }
146
+ };
147
+ var PayloadTooLargeException = class extends factory(413, "Payload Too Large") {
148
+ static {
149
+ __name(this, "PayloadTooLargeException");
150
+ }
151
+ };
152
+ var UnsupportedMediaTypeException = class extends factory(415, "Unsupported Media Type") {
153
+ static {
154
+ __name(this, "UnsupportedMediaTypeException");
155
+ }
156
+ };
157
+ var ImATeapotException = class extends factory(418, "I'm a Teapot") {
158
+ static {
159
+ __name(this, "ImATeapotException");
160
+ }
161
+ };
162
+ var UnprocessableEntityException = class extends factory(422, "Unprocessable Entity") {
163
+ static {
164
+ __name(this, "UnprocessableEntityException");
165
+ }
166
+ };
167
+ var InternalServerErrorException = class extends factory(500, "Internal Server Error") {
168
+ static {
169
+ __name(this, "InternalServerErrorException");
170
+ }
171
+ };
172
+ var NotImplementedException = class extends factory(501, "Not Implemented") {
173
+ static {
174
+ __name(this, "NotImplementedException");
175
+ }
176
+ };
177
+ var BadGatewayException = class extends factory(502, "Bad Gateway") {
178
+ static {
179
+ __name(this, "BadGatewayException");
180
+ }
181
+ };
182
+ var ServiceUnavailableException = class extends factory(503, "Service Unavailable") {
183
+ static {
184
+ __name(this, "ServiceUnavailableException");
185
+ }
186
+ };
187
+ var GatewayTimeoutException = class extends factory(504, "Gateway Timeout") {
188
+ static {
189
+ __name(this, "GatewayTimeoutException");
190
+ }
191
+ };
192
+ var HttpVersionNotSupportedException = class extends factory(505, "HTTP Version Not Supported") {
193
+ static {
194
+ __name(this, "HttpVersionNotSupportedException");
195
+ }
196
+ };
197
+ var TooManyRequestsException = class extends factory(429, "Too Many Requests") {
198
+ static {
199
+ __name(this, "TooManyRequestsException");
200
+ }
201
+ };
202
+ var HttpStatus = {
203
+ // 2xx Success
204
+ OK: 200,
205
+ CREATED: 201,
206
+ ACCEPTED: 202,
207
+ NO_CONTENT: 204,
208
+ // 3xx Redirection
209
+ MOVED_PERMANENTLY: 301,
210
+ FOUND: 302,
211
+ NOT_MODIFIED: 304,
212
+ TEMPORARY_REDIRECT: 307,
213
+ PERMANENT_REDIRECT: 308,
214
+ // 4xx Client Error
215
+ BAD_REQUEST: 400,
216
+ UNAUTHORIZED: 401,
217
+ PAYMENT_REQUIRED: 402,
218
+ FORBIDDEN: 403,
219
+ NOT_FOUND: 404,
220
+ METHOD_NOT_ALLOWED: 405,
221
+ NOT_ACCEPTABLE: 406,
222
+ REQUEST_TIMEOUT: 408,
223
+ CONFLICT: 409,
224
+ GONE: 410,
225
+ PRECONDITION_FAILED: 412,
226
+ PAYLOAD_TOO_LARGE: 413,
227
+ UNSUPPORTED_MEDIA_TYPE: 415,
228
+ IM_A_TEAPOT: 418,
229
+ UNPROCESSABLE_ENTITY: 422,
230
+ TOO_MANY_REQUESTS: 429,
231
+ // 5xx Server Error
232
+ INTERNAL_SERVER_ERROR: 500,
233
+ NOT_IMPLEMENTED: 501,
234
+ BAD_GATEWAY: 502,
235
+ SERVICE_UNAVAILABLE: 503,
236
+ GATEWAY_TIMEOUT: 504
237
+ };
238
+
239
+ export {
240
+ CONTROLLER_PREFIX,
241
+ ROUTE_METHODS,
242
+ ROUTE_PARAMS,
243
+ ROUTE_STATUS,
244
+ ROUTE_HEADERS,
245
+ ROUTE_REDIRECT,
246
+ USE_GUARDS,
247
+ USE_INTERCEPTORS,
248
+ USE_FILTERS,
249
+ CATCH_EXCEPTIONS,
250
+ setMeta,
251
+ getMeta,
252
+ HttpException,
253
+ BadRequestException,
254
+ UnauthorizedException,
255
+ ForbiddenException,
256
+ NotFoundException,
257
+ MethodNotAllowedException,
258
+ NotAcceptableException,
259
+ RequestTimeoutException,
260
+ ConflictException,
261
+ GoneException,
262
+ PreconditionFailedException,
263
+ PayloadTooLargeException,
264
+ UnsupportedMediaTypeException,
265
+ ImATeapotException,
266
+ UnprocessableEntityException,
267
+ InternalServerErrorException,
268
+ NotImplementedException,
269
+ BadGatewayException,
270
+ ServiceUnavailableException,
271
+ GatewayTimeoutException,
272
+ HttpVersionNotSupportedException,
273
+ TooManyRequestsException,
274
+ HttpStatus
275
+ };
276
+ //# sourceMappingURL=chunk-3PGQVQWG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/metadata/keys.ts","../src/metadata/storage.ts","../src/exceptions/http-exception.ts"],"sourcesContent":["/**\n * Global Symbol-keyed metadata namespace constants for @theokit/http.\n *\n * Uses Symbol.for() (global Symbol registry) instead of Symbol() (local) because\n * the SWC loader imports controller files as separate module instances. With local\n * Symbols, the decorator-set metadata keys would be different Symbol instances from\n * the keys used by walkControllerMetadata — making metadata lookup silently fail.\n *\n * Symbol.for() ensures the SAME Symbol instance across module boundaries, which is\n * exactly how reflect-metadata keys should work in a multi-module decorator system.\n */\n\nexport const CONTROLLER_PREFIX = Symbol.for('theokit:http-decorators:controller-prefix')\nexport const ROUTE_METHODS = Symbol.for('theokit:http-decorators:route-methods')\nexport const ROUTE_PARAMS = Symbol.for('theokit:http-decorators:route-params')\nexport const ROUTE_STATUS = Symbol.for('theokit:http-decorators:route-status')\nexport const ROUTE_HEADERS = Symbol.for('theokit:http-decorators:route-headers')\nexport const ROUTE_REDIRECT = Symbol.for('theokit:http-decorators:route-redirect')\nexport const USE_GUARDS = Symbol.for('theokit:http-decorators:use-guards')\nexport const USE_INTERCEPTORS = Symbol.for('theokit:http-decorators:use-interceptors')\nexport const USE_FILTERS = Symbol.for('theokit:http-decorators:use-filters')\nexport const CATCH_EXCEPTIONS = Symbol.for('theokit:http-decorators:catch-exceptions')\n","import 'reflect-metadata'\n\n/**\n * Typed facade over Reflect.defineMetadata / Reflect.getMetadata.\n * Centralizes all reflect-metadata calls so decorators + bridge\n * never call Reflect.* directly (single import point for the polyfill).\n */\n\nexport function setMeta<T>(\n key: symbol,\n target: object,\n value: T,\n propertyKey?: string | symbol,\n): void {\n if (propertyKey !== undefined) {\n Reflect.defineMetadata(key, value, target, propertyKey)\n } else {\n Reflect.defineMetadata(key, value, target)\n }\n}\n\nexport function getMeta<T>(\n key: symbol,\n target: object,\n propertyKey?: string | symbol,\n): T | undefined {\n if (propertyKey !== undefined) {\n return Reflect.getMetadata(key, target, propertyKey) as T | undefined\n }\n return Reflect.getMetadata(key, target) as T | undefined\n}\n","/**\n * HttpException hierarchy for @theokit/http.\n *\n * Per ADR D2: response shape {error: {code, message, statusCode}} matches\n * existing guard (401) and validation (422) format.\n */\n\nconst STATUS_CODES: Record<number, string> = {\n 400: 'BAD_REQUEST',\n 401: 'UNAUTHORIZED',\n 403: 'FORBIDDEN',\n 404: 'NOT_FOUND',\n 405: 'METHOD_NOT_ALLOWED',\n 406: 'NOT_ACCEPTABLE',\n 408: 'REQUEST_TIMEOUT',\n 409: 'CONFLICT',\n 410: 'GONE',\n 412: 'PRECONDITION_FAILED',\n 413: 'PAYLOAD_TOO_LARGE',\n 415: 'UNSUPPORTED_MEDIA_TYPE',\n 418: 'IM_A_TEAPOT',\n 422: 'UNPROCESSABLE_ENTITY',\n 429: 'TOO_MANY_REQUESTS',\n 500: 'INTERNAL_SERVER_ERROR',\n 501: 'NOT_IMPLEMENTED',\n 502: 'BAD_GATEWAY',\n 503: 'SERVICE_UNAVAILABLE',\n 504: 'GATEWAY_TIMEOUT',\n 505: 'HTTP_VERSION_NOT_SUPPORTED',\n}\n\nexport interface HttpExceptionOptions {\n cause?: Error\n description?: string\n}\n\nexport class HttpException extends Error {\n public readonly statusCode: number\n public readonly code: string\n public readonly description?: string\n\n constructor(message: string, statusCode: number, options?: HttpExceptionOptions) {\n super(message, options?.cause ? { cause: options.cause } : undefined)\n this.name = this.constructor.name\n this.statusCode = statusCode\n this.code = STATUS_CODES[statusCode] ?? 'INTERNAL_SERVER_ERROR'\n this.description = options?.description\n }\n\n toJSON() {\n return {\n error: {\n code: this.code,\n message: this.message,\n statusCode: this.statusCode,\n ...(this.description ? { description: this.description } : {}),\n },\n }\n }\n}\n\nfunction factory(status: number, defaultMsg: string) {\n return class extends HttpException {\n constructor(message = defaultMsg, options?: HttpExceptionOptions) {\n super(message, status, options)\n this.name = this.constructor.name\n }\n }\n}\n\nexport class BadRequestException extends factory(400, 'Bad Request') {}\nexport class UnauthorizedException extends factory(401, 'Unauthorized') {}\nexport class ForbiddenException extends factory(403, 'Forbidden') {}\nexport class NotFoundException extends factory(404, 'Not Found') {}\nexport class MethodNotAllowedException extends factory(405, 'Method Not Allowed') {}\nexport class NotAcceptableException extends factory(406, 'Not Acceptable') {}\nexport class RequestTimeoutException extends factory(408, 'Request Timeout') {}\nexport class ConflictException extends factory(409, 'Conflict') {}\nexport class GoneException extends factory(410, 'Gone') {}\nexport class PreconditionFailedException extends factory(412, 'Precondition Failed') {}\nexport class PayloadTooLargeException extends factory(413, 'Payload Too Large') {}\nexport class UnsupportedMediaTypeException extends factory(415, 'Unsupported Media Type') {}\nexport class ImATeapotException extends factory(418, \"I'm a Teapot\") {}\nexport class UnprocessableEntityException extends factory(422, 'Unprocessable Entity') {}\nexport class InternalServerErrorException extends factory(500, 'Internal Server Error') {}\nexport class NotImplementedException extends factory(501, 'Not Implemented') {}\nexport class BadGatewayException extends factory(502, 'Bad Gateway') {}\nexport class ServiceUnavailableException extends factory(503, 'Service Unavailable') {}\nexport class GatewayTimeoutException extends factory(504, 'Gateway Timeout') {}\nexport class HttpVersionNotSupportedException extends factory(505, 'HTTP Version Not Supported') {}\nexport class TooManyRequestsException extends factory(429, 'Too Many Requests') {}\n\n/**\n * HttpStatus enum — all standard HTTP status codes as named constants.\n *\n * @example\n * ```ts\n * import { HttpStatus } from '@theokit/http'\n *\n * @HttpCode(HttpStatus.CREATED)\n * @Post()\n * create() { ... }\n *\n * if (res.status === HttpStatus.NOT_FOUND) { ... }\n * ```\n */\nexport const HttpStatus = {\n // 2xx Success\n OK: 200,\n CREATED: 201,\n ACCEPTED: 202,\n NO_CONTENT: 204,\n\n // 3xx Redirection\n MOVED_PERMANENTLY: 301,\n FOUND: 302,\n NOT_MODIFIED: 304,\n TEMPORARY_REDIRECT: 307,\n PERMANENT_REDIRECT: 308,\n\n // 4xx Client Error\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n PAYMENT_REQUIRED: 402,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n METHOD_NOT_ALLOWED: 405,\n NOT_ACCEPTABLE: 406,\n REQUEST_TIMEOUT: 408,\n CONFLICT: 409,\n GONE: 410,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n UNSUPPORTED_MEDIA_TYPE: 415,\n IM_A_TEAPOT: 418,\n UNPROCESSABLE_ENTITY: 422,\n TOO_MANY_REQUESTS: 429,\n\n // 5xx Server Error\n INTERNAL_SERVER_ERROR: 500,\n NOT_IMPLEMENTED: 501,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n} as const\n\nexport type HttpStatusCode = (typeof HttpStatus)[keyof typeof HttpStatus]\n"],"mappings":"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","names":["CONTROLLER_PREFIX","Symbol","for","ROUTE_METHODS","ROUTE_PARAMS","ROUTE_STATUS","ROUTE_HEADERS","ROUTE_REDIRECT","USE_GUARDS","USE_INTERCEPTORS","USE_FILTERS","CATCH_EXCEPTIONS","setMeta","key","target","value","propertyKey","undefined","Reflect","defineMetadata","getMeta","getMetadata","STATUS_CODES","HttpException","Error","statusCode","code","description","message","options","cause","undefined","name","toJSON","error","factory","status","defaultMsg","BadRequestException","UnauthorizedException","ForbiddenException","NotFoundException","MethodNotAllowedException","NotAcceptableException","RequestTimeoutException","ConflictException","GoneException","PreconditionFailedException","PayloadTooLargeException","UnsupportedMediaTypeException","ImATeapotException","UnprocessableEntityException","InternalServerErrorException","NotImplementedException","BadGatewayException","ServiceUnavailableException","GatewayTimeoutException","HttpVersionNotSupportedException","TooManyRequestsException","HttpStatus","OK","CREATED","ACCEPTED","NO_CONTENT","MOVED_PERMANENTLY","FOUND","NOT_MODIFIED","TEMPORARY_REDIRECT","PERMANENT_REDIRECT","BAD_REQUEST","UNAUTHORIZED","PAYMENT_REQUIRED","FORBIDDEN","NOT_FOUND","METHOD_NOT_ALLOWED","NOT_ACCEPTABLE","REQUEST_TIMEOUT","CONFLICT","GONE","PRECONDITION_FAILED","PAYLOAD_TOO_LARGE","UNSUPPORTED_MEDIA_TYPE","IM_A_TEAPOT","UNPROCESSABLE_ENTITY","TOO_MANY_REQUESTS","INTERNAL_SERVER_ERROR","NOT_IMPLEMENTED","BAD_GATEWAY","SERVICE_UNAVAILABLE","GATEWAY_TIMEOUT"]}
@@ -0,0 +1,7 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
4
+ export {
5
+ __name
6
+ };
7
+ //# sourceMappingURL=chunk-7QVYU63E.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}