This commit is contained in:
2026-03-03 15:23:00 +00:00
parent 5e3726de39
commit 8e223bfbec
3689 changed files with 955330 additions and 1011 deletions

View File

@@ -0,0 +1,16 @@
import type { OutgoingHttpHeaders } from 'node:http';
type HeaderNames = keyof OutgoingHttpHeaders;
type HeaderValue<H extends HeaderNames> = OutgoingHttpHeaders[H];
export declare class Controller {
private statusCode?;
private headers;
setStatus(statusCode: number): void;
getStatus(): number | undefined;
setHeader<H extends HeaderNames>(name: H, value?: HeaderValue<H>): void;
setHeader(name: string, value?: string | string[]): void;
getHeader(name: string): string | string[] | undefined;
getHeaders(): {
[name: string]: string | string[] | undefined;
};
}
export {};

View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Controller = void 0;
class Controller {
constructor() {
this.statusCode = undefined;
this.headers = {};
}
setStatus(statusCode) {
this.statusCode = statusCode;
}
getStatus() {
return this.statusCode;
}
setHeader(name, value) {
this.headers[name] = value;
}
getHeader(name) {
return this.headers[name];
}
getHeaders() {
return this.headers;
}
}
exports.Controller = Controller;
//# sourceMappingURL=controller.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"controller.js","sourceRoot":"","sources":["../../src/interfaces/controller.ts"],"names":[],"mappings":";;;AAKA,MAAa,UAAU;IAAvB;QACU,eAAU,GAAY,SAAS,CAAC;QAChC,YAAO,GAAG,EAAuD,CAAC;IAwB5E,CAAC;IAtBQ,SAAS,CAAC,UAAkB;QACjC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAEM,SAAS;QACd,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAKM,SAAS,CAAC,IAAY,EAAE,KAAyB;QACtD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IAC7B,CAAC;IAEM,SAAS,CAAC,IAAY;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAEM,UAAU;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AA1BD,gCA0BC"}

31
node_modules/@tsoa/runtime/dist/interfaces/file.d.ts generated vendored Normal file
View File

@@ -0,0 +1,31 @@
import { Readable } from 'stream';
/** Object containing file metadata and access information. */
export interface File {
/** Name of the form field associated with this file. */
fieldname: string;
/** Name of the file on the uploader's computer. */
originalname: string;
/**
* Value of the `Content-Transfer-Encoding` header for this file.
* @deprecated since July 2015
* @see RFC 7578, Section 4.7
*/
encoding: string;
/** Value of the `Content-Type` header for this file. */
mimetype: string;
/** Size of the file in bytes. */
size: number;
/**
* A readable stream of this file. Only available to the `_handleFile`
* callback for custom `StorageEngine`s.
*/
stream: Readable;
/** `DiskStorage` only: Directory to which this file has been uploaded. */
destination: string;
/** `DiskStorage` only: Name of this file within `destination`. */
filename: string;
/** `DiskStorage` only: Full path to the uploaded file. */
path: string;
/** `MemoryStorage` only: A Buffer containing the entire file. */
buffer: Buffer;
}

3
node_modules/@tsoa/runtime/dist/interfaces/file.js generated vendored Normal file
View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=file.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/interfaces/file.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,7 @@
export type Newable<T = unknown, TArgs extends unknown[] = any[]> = new (...args: TArgs) => T;
export type ServiceIdentifier<T = unknown> = string | symbol | Newable<T> | Function;
export interface IocContainer {
get<T>(controller: ServiceIdentifier<T>): T;
get<T>(controller: ServiceIdentifier<T>): Promise<T>;
}
export type IocContainerFactory<T = any> = (request: T) => IocContainer;

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=iocModule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"iocModule.js","sourceRoot":"","sources":["../../src/interfaces/iocModule.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,5 @@
import { IsValidHeader } from '../utils/isHeaderType';
export type HttpStatusCodeLiteral = 100 | 101 | 102 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
export type HttpStatusCodeStringLiteral = `${HttpStatusCodeLiteral}`;
export type OtherValidOpenApiHttpStatusCode = '1XX' | '2XX' | '3XX' | '4XX' | '5XX' | 'default';
export type TsoaResponse<T extends HttpStatusCodeLiteral, BodyType, HeaderType extends IsValidHeader<HeaderType> = object> = (status: T, data: BodyType, headers?: HeaderType) => any;

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=response.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../src/interfaces/response.ts"],"names":[],"mappings":""}