@navios/core 0.1.8 → 0.1.10
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.
- package/dist/_tsup-dts-rollup.d.mts +46 -2
- package/dist/_tsup-dts-rollup.d.ts +46 -2
- package/dist/chunk-Z2AVZ4BT.mjs +65 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +3346 -16
- package/dist/index.mjs +219 -52
- package/dist/multipart-23QO76VV.mjs +3120 -0
- package/package.json +4 -3
- package/src/decorators/endpoint.decorator.mts +1 -1
- package/src/decorators/header.decorator.mts +7 -1
- package/src/decorators/http-code.decorator.mts +6 -1
- package/src/decorators/index.mts +2 -0
- package/src/decorators/multipart.decorator.mts +100 -0
- package/src/decorators/stream.decorator.mts +81 -0
- package/src/metadata/endpoint.metadata.mts +9 -3
- package/src/metadata/module.metadata.mts +1 -1
- package/src/navios.application.mts +30 -0
- package/src/services/controller-adapter.service.mts +130 -3
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { AnyZodObject } from 'zod';
|
|
2
2
|
import type { BaseEndpointConfig } from '@navios/common';
|
|
3
|
+
import type { BaseStreamConfig } from '@navios/common';
|
|
3
4
|
import type { EndpointFunctionArgs } from '@navios/common';
|
|
4
5
|
import { FastifyBaseLogger } from 'fastify';
|
|
5
6
|
import type { FastifyCorsOptions } from '@fastify/cors';
|
|
6
7
|
import type { FastifyInstance } from 'fastify';
|
|
7
8
|
import type { FastifyListenOptions } from 'fastify';
|
|
9
|
+
import type { FastifyMultipartOptions } from '@fastify/multipart';
|
|
8
10
|
import type { FastifyReply } from 'fastify';
|
|
9
11
|
import type { FastifyRequest } from 'fastify';
|
|
10
12
|
import { FastifySchema } from 'fastify';
|
|
@@ -379,6 +381,8 @@ declare class ControllerAdapterService {
|
|
|
379
381
|
private provideSchemaForConfig;
|
|
380
382
|
private provideHandler;
|
|
381
383
|
private provideHandlerForConfig;
|
|
384
|
+
private provideHandlerForStream;
|
|
385
|
+
private provideHandlerForMultipart;
|
|
382
386
|
}
|
|
383
387
|
export { ControllerAdapterService }
|
|
384
388
|
export { ControllerAdapterService as ControllerAdapterService_alias_1 }
|
|
@@ -419,7 +423,7 @@ declare interface EndpointMetadata {
|
|
|
419
423
|
type: EndpointType;
|
|
420
424
|
headers: Partial<Record<HttpHeader, number | string | string[] | undefined>>;
|
|
421
425
|
httpMethod: HttpMethod;
|
|
422
|
-
config: BaseEndpointConfig | null;
|
|
426
|
+
config: BaseEndpointConfig | BaseStreamConfig | null;
|
|
423
427
|
guards: Set<ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>>;
|
|
424
428
|
customAttributes: Map<string | symbol, any>;
|
|
425
429
|
}
|
|
@@ -448,7 +452,9 @@ export { EndpointResult as EndpointResult_alias_2 }
|
|
|
448
452
|
|
|
449
453
|
declare enum EndpointType {
|
|
450
454
|
Unknown = "unknown",
|
|
451
|
-
|
|
455
|
+
Endpoint = "endpoint",
|
|
456
|
+
Stream = "stream",
|
|
457
|
+
Multipart = "multipart",
|
|
452
458
|
Handler = "handler"
|
|
453
459
|
}
|
|
454
460
|
export { EndpointType }
|
|
@@ -1132,12 +1138,34 @@ export { ModuleOptions }
|
|
|
1132
1138
|
export { ModuleOptions as ModuleOptions_alias_1 }
|
|
1133
1139
|
export { ModuleOptions as ModuleOptions_alias_2 }
|
|
1134
1140
|
|
|
1141
|
+
declare function Multipart<Method extends HttpMethod = HttpMethod, Url extends string = string, QuerySchema = undefined, ResponseSchema extends ZodType = ZodType, RequestSchema = ZodType>(endpoint: {
|
|
1142
|
+
config: BaseEndpointConfig<Method, Url, QuerySchema, ResponseSchema, RequestSchema>;
|
|
1143
|
+
}): (target: (params: QuerySchema extends AnyZodObject ? RequestSchema extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, RequestSchema> : EndpointFunctionArgs<Url, QuerySchema, undefined> : RequestSchema extends ZodType ? EndpointFunctionArgs<Url, undefined, RequestSchema> : EndpointFunctionArgs<Url, undefined, undefined>) => Promise<z.input<ResponseSchema>>, context: ClassMethodDecoratorContext) => (params: QuerySchema extends AnyZodObject ? RequestSchema extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, RequestSchema> : EndpointFunctionArgs<Url, QuerySchema, undefined> : RequestSchema extends ZodType ? EndpointFunctionArgs<Url, undefined, RequestSchema> : EndpointFunctionArgs<Url, undefined, undefined>) => Promise<z.input<ResponseSchema>>;
|
|
1144
|
+
export { Multipart }
|
|
1145
|
+
export { Multipart as Multipart_alias_1 }
|
|
1146
|
+
export { Multipart as Multipart_alias_2 }
|
|
1147
|
+
|
|
1148
|
+
declare type MultipartParams<EndpointDeclaration extends {
|
|
1149
|
+
config: BaseEndpointConfig<any, any, any, any, any>;
|
|
1150
|
+
}, Url extends string = EndpointDeclaration['config']['url'], QuerySchema = EndpointDeclaration['config']['querySchema']> = QuerySchema extends AnyZodObject ? EndpointDeclaration['config']['requestSchema'] extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, EndpointDeclaration['config']['requestSchema']> : EndpointFunctionArgs<Url, QuerySchema, undefined> : EndpointDeclaration['config']['requestSchema'] extends ZodType ? EndpointFunctionArgs<Url, undefined, EndpointDeclaration['config']['requestSchema']> : EndpointFunctionArgs<Url, undefined, undefined>;
|
|
1151
|
+
export { MultipartParams }
|
|
1152
|
+
export { MultipartParams as MultipartParams_alias_1 }
|
|
1153
|
+
export { MultipartParams as MultipartParams_alias_2 }
|
|
1154
|
+
|
|
1155
|
+
declare type MultipartResult<EndpointDeclaration extends {
|
|
1156
|
+
config: BaseEndpointConfig<any, any, any, any, any>;
|
|
1157
|
+
}> = EndpointDeclaration['config']['responseSchema'] extends ZodDiscriminatedUnion<any, infer Options> ? Promise<z.input<Options[number]>> : Promise<z.input<EndpointDeclaration['config']['responseSchema']>>;
|
|
1158
|
+
export { MultipartResult }
|
|
1159
|
+
export { MultipartResult as MultipartResult_alias_1 }
|
|
1160
|
+
export { MultipartResult as MultipartResult_alias_2 }
|
|
1161
|
+
|
|
1135
1162
|
declare class NaviosApplication {
|
|
1136
1163
|
private moduleLoader;
|
|
1137
1164
|
private controllerAdapter;
|
|
1138
1165
|
private logger;
|
|
1139
1166
|
private server;
|
|
1140
1167
|
private corsOptions;
|
|
1168
|
+
private multipartOptions;
|
|
1141
1169
|
private globalPrefix;
|
|
1142
1170
|
private appModule;
|
|
1143
1171
|
private options;
|
|
@@ -1146,8 +1174,10 @@ declare class NaviosApplication {
|
|
|
1146
1174
|
init(): Promise<void>;
|
|
1147
1175
|
private getFastifyInstance;
|
|
1148
1176
|
private configureFastifyInstance;
|
|
1177
|
+
configureMultipart(server: FastifyInstance, options: FastifyMultipartOptions | true): Promise<void>;
|
|
1149
1178
|
private initModules;
|
|
1150
1179
|
enableCors(options: FastifyCorsOptions): void;
|
|
1180
|
+
enableMultipart(options: FastifyMultipartOptions): void;
|
|
1151
1181
|
setGlobalPrefix(prefix: string): void;
|
|
1152
1182
|
getServer(): FastifyInstance;
|
|
1153
1183
|
listen(options: FastifyListenOptions): Promise<void>;
|
|
@@ -1445,6 +1475,20 @@ export { setPromiseCollector }
|
|
|
1445
1475
|
export { setPromiseCollector as setPromiseCollector_alias_1 }
|
|
1446
1476
|
export { setPromiseCollector as setPromiseCollector_alias_2 }
|
|
1447
1477
|
|
|
1478
|
+
declare function Stream<Method extends HttpMethod = HttpMethod, Url extends string = string, QuerySchema = undefined, RequestSchema = ZodType>(endpoint: {
|
|
1479
|
+
config: BaseStreamConfig<Method, Url, QuerySchema, RequestSchema>;
|
|
1480
|
+
}): (target: (params: QuerySchema extends AnyZodObject ? RequestSchema extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, RequestSchema> : EndpointFunctionArgs<Url, QuerySchema, undefined> : RequestSchema extends ZodType ? EndpointFunctionArgs<Url, undefined, RequestSchema> : EndpointFunctionArgs<Url, undefined, undefined>, reply: FastifyReply) => Promise<void>, context: ClassMethodDecoratorContext) => (params: QuerySchema extends AnyZodObject ? RequestSchema extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, RequestSchema> : EndpointFunctionArgs<Url, QuerySchema, undefined> : RequestSchema extends ZodType ? EndpointFunctionArgs<Url, undefined, RequestSchema> : EndpointFunctionArgs<Url, undefined, undefined>, reply: FastifyReply) => Promise<void>;
|
|
1481
|
+
export { Stream }
|
|
1482
|
+
export { Stream as Stream_alias_1 }
|
|
1483
|
+
export { Stream as Stream_alias_2 }
|
|
1484
|
+
|
|
1485
|
+
declare type StreamParams<EndpointDeclaration extends {
|
|
1486
|
+
config: BaseStreamConfig<any, any, any, any>;
|
|
1487
|
+
}, Url extends string = EndpointDeclaration['config']['url'], QuerySchema = EndpointDeclaration['config']['querySchema']> = QuerySchema extends AnyZodObject ? EndpointDeclaration['config']['requestSchema'] extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, EndpointDeclaration['config']['requestSchema']> : EndpointFunctionArgs<Url, QuerySchema, undefined> : EndpointDeclaration['config']['requestSchema'] extends ZodType ? EndpointFunctionArgs<Url, undefined, EndpointDeclaration['config']['requestSchema']> : EndpointFunctionArgs<Url, undefined, undefined>;
|
|
1488
|
+
export { StreamParams }
|
|
1489
|
+
export { StreamParams as StreamParams_alias_1 }
|
|
1490
|
+
export { StreamParams as StreamParams_alias_2 }
|
|
1491
|
+
|
|
1448
1492
|
declare const stripEndSlash: (path: string) => string;
|
|
1449
1493
|
export { stripEndSlash }
|
|
1450
1494
|
export { stripEndSlash as stripEndSlash_alias_1 }
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { AnyZodObject } from 'zod';
|
|
2
2
|
import type { BaseEndpointConfig } from '@navios/common';
|
|
3
|
+
import type { BaseStreamConfig } from '@navios/common';
|
|
3
4
|
import type { EndpointFunctionArgs } from '@navios/common';
|
|
4
5
|
import { FastifyBaseLogger } from 'fastify';
|
|
5
6
|
import type { FastifyCorsOptions } from '@fastify/cors';
|
|
6
7
|
import type { FastifyInstance } from 'fastify';
|
|
7
8
|
import type { FastifyListenOptions } from 'fastify';
|
|
9
|
+
import type { FastifyMultipartOptions } from '@fastify/multipart';
|
|
8
10
|
import type { FastifyReply } from 'fastify';
|
|
9
11
|
import type { FastifyRequest } from 'fastify';
|
|
10
12
|
import { FastifySchema } from 'fastify';
|
|
@@ -379,6 +381,8 @@ declare class ControllerAdapterService {
|
|
|
379
381
|
private provideSchemaForConfig;
|
|
380
382
|
private provideHandler;
|
|
381
383
|
private provideHandlerForConfig;
|
|
384
|
+
private provideHandlerForStream;
|
|
385
|
+
private provideHandlerForMultipart;
|
|
382
386
|
}
|
|
383
387
|
export { ControllerAdapterService }
|
|
384
388
|
export { ControllerAdapterService as ControllerAdapterService_alias_1 }
|
|
@@ -419,7 +423,7 @@ declare interface EndpointMetadata {
|
|
|
419
423
|
type: EndpointType;
|
|
420
424
|
headers: Partial<Record<HttpHeader, number | string | string[] | undefined>>;
|
|
421
425
|
httpMethod: HttpMethod;
|
|
422
|
-
config: BaseEndpointConfig | null;
|
|
426
|
+
config: BaseEndpointConfig | BaseStreamConfig | null;
|
|
423
427
|
guards: Set<ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>>;
|
|
424
428
|
customAttributes: Map<string | symbol, any>;
|
|
425
429
|
}
|
|
@@ -448,7 +452,9 @@ export { EndpointResult as EndpointResult_alias_2 }
|
|
|
448
452
|
|
|
449
453
|
declare enum EndpointType {
|
|
450
454
|
Unknown = "unknown",
|
|
451
|
-
|
|
455
|
+
Endpoint = "endpoint",
|
|
456
|
+
Stream = "stream",
|
|
457
|
+
Multipart = "multipart",
|
|
452
458
|
Handler = "handler"
|
|
453
459
|
}
|
|
454
460
|
export { EndpointType }
|
|
@@ -1132,12 +1138,34 @@ export { ModuleOptions }
|
|
|
1132
1138
|
export { ModuleOptions as ModuleOptions_alias_1 }
|
|
1133
1139
|
export { ModuleOptions as ModuleOptions_alias_2 }
|
|
1134
1140
|
|
|
1141
|
+
declare function Multipart<Method extends HttpMethod = HttpMethod, Url extends string = string, QuerySchema = undefined, ResponseSchema extends ZodType = ZodType, RequestSchema = ZodType>(endpoint: {
|
|
1142
|
+
config: BaseEndpointConfig<Method, Url, QuerySchema, ResponseSchema, RequestSchema>;
|
|
1143
|
+
}): (target: (params: QuerySchema extends AnyZodObject ? RequestSchema extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, RequestSchema> : EndpointFunctionArgs<Url, QuerySchema, undefined> : RequestSchema extends ZodType ? EndpointFunctionArgs<Url, undefined, RequestSchema> : EndpointFunctionArgs<Url, undefined, undefined>) => Promise<z.input<ResponseSchema>>, context: ClassMethodDecoratorContext) => (params: QuerySchema extends AnyZodObject ? RequestSchema extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, RequestSchema> : EndpointFunctionArgs<Url, QuerySchema, undefined> : RequestSchema extends ZodType ? EndpointFunctionArgs<Url, undefined, RequestSchema> : EndpointFunctionArgs<Url, undefined, undefined>) => Promise<z.input<ResponseSchema>>;
|
|
1144
|
+
export { Multipart }
|
|
1145
|
+
export { Multipart as Multipart_alias_1 }
|
|
1146
|
+
export { Multipart as Multipart_alias_2 }
|
|
1147
|
+
|
|
1148
|
+
declare type MultipartParams<EndpointDeclaration extends {
|
|
1149
|
+
config: BaseEndpointConfig<any, any, any, any, any>;
|
|
1150
|
+
}, Url extends string = EndpointDeclaration['config']['url'], QuerySchema = EndpointDeclaration['config']['querySchema']> = QuerySchema extends AnyZodObject ? EndpointDeclaration['config']['requestSchema'] extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, EndpointDeclaration['config']['requestSchema']> : EndpointFunctionArgs<Url, QuerySchema, undefined> : EndpointDeclaration['config']['requestSchema'] extends ZodType ? EndpointFunctionArgs<Url, undefined, EndpointDeclaration['config']['requestSchema']> : EndpointFunctionArgs<Url, undefined, undefined>;
|
|
1151
|
+
export { MultipartParams }
|
|
1152
|
+
export { MultipartParams as MultipartParams_alias_1 }
|
|
1153
|
+
export { MultipartParams as MultipartParams_alias_2 }
|
|
1154
|
+
|
|
1155
|
+
declare type MultipartResult<EndpointDeclaration extends {
|
|
1156
|
+
config: BaseEndpointConfig<any, any, any, any, any>;
|
|
1157
|
+
}> = EndpointDeclaration['config']['responseSchema'] extends ZodDiscriminatedUnion<any, infer Options> ? Promise<z.input<Options[number]>> : Promise<z.input<EndpointDeclaration['config']['responseSchema']>>;
|
|
1158
|
+
export { MultipartResult }
|
|
1159
|
+
export { MultipartResult as MultipartResult_alias_1 }
|
|
1160
|
+
export { MultipartResult as MultipartResult_alias_2 }
|
|
1161
|
+
|
|
1135
1162
|
declare class NaviosApplication {
|
|
1136
1163
|
private moduleLoader;
|
|
1137
1164
|
private controllerAdapter;
|
|
1138
1165
|
private logger;
|
|
1139
1166
|
private server;
|
|
1140
1167
|
private corsOptions;
|
|
1168
|
+
private multipartOptions;
|
|
1141
1169
|
private globalPrefix;
|
|
1142
1170
|
private appModule;
|
|
1143
1171
|
private options;
|
|
@@ -1146,8 +1174,10 @@ declare class NaviosApplication {
|
|
|
1146
1174
|
init(): Promise<void>;
|
|
1147
1175
|
private getFastifyInstance;
|
|
1148
1176
|
private configureFastifyInstance;
|
|
1177
|
+
configureMultipart(server: FastifyInstance, options: FastifyMultipartOptions | true): Promise<void>;
|
|
1149
1178
|
private initModules;
|
|
1150
1179
|
enableCors(options: FastifyCorsOptions): void;
|
|
1180
|
+
enableMultipart(options: FastifyMultipartOptions): void;
|
|
1151
1181
|
setGlobalPrefix(prefix: string): void;
|
|
1152
1182
|
getServer(): FastifyInstance;
|
|
1153
1183
|
listen(options: FastifyListenOptions): Promise<void>;
|
|
@@ -1445,6 +1475,20 @@ export { setPromiseCollector }
|
|
|
1445
1475
|
export { setPromiseCollector as setPromiseCollector_alias_1 }
|
|
1446
1476
|
export { setPromiseCollector as setPromiseCollector_alias_2 }
|
|
1447
1477
|
|
|
1478
|
+
declare function Stream<Method extends HttpMethod = HttpMethod, Url extends string = string, QuerySchema = undefined, RequestSchema = ZodType>(endpoint: {
|
|
1479
|
+
config: BaseStreamConfig<Method, Url, QuerySchema, RequestSchema>;
|
|
1480
|
+
}): (target: (params: QuerySchema extends AnyZodObject ? RequestSchema extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, RequestSchema> : EndpointFunctionArgs<Url, QuerySchema, undefined> : RequestSchema extends ZodType ? EndpointFunctionArgs<Url, undefined, RequestSchema> : EndpointFunctionArgs<Url, undefined, undefined>, reply: FastifyReply) => Promise<void>, context: ClassMethodDecoratorContext) => (params: QuerySchema extends AnyZodObject ? RequestSchema extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, RequestSchema> : EndpointFunctionArgs<Url, QuerySchema, undefined> : RequestSchema extends ZodType ? EndpointFunctionArgs<Url, undefined, RequestSchema> : EndpointFunctionArgs<Url, undefined, undefined>, reply: FastifyReply) => Promise<void>;
|
|
1481
|
+
export { Stream }
|
|
1482
|
+
export { Stream as Stream_alias_1 }
|
|
1483
|
+
export { Stream as Stream_alias_2 }
|
|
1484
|
+
|
|
1485
|
+
declare type StreamParams<EndpointDeclaration extends {
|
|
1486
|
+
config: BaseStreamConfig<any, any, any, any>;
|
|
1487
|
+
}, Url extends string = EndpointDeclaration['config']['url'], QuerySchema = EndpointDeclaration['config']['querySchema']> = QuerySchema extends AnyZodObject ? EndpointDeclaration['config']['requestSchema'] extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, EndpointDeclaration['config']['requestSchema']> : EndpointFunctionArgs<Url, QuerySchema, undefined> : EndpointDeclaration['config']['requestSchema'] extends ZodType ? EndpointFunctionArgs<Url, undefined, EndpointDeclaration['config']['requestSchema']> : EndpointFunctionArgs<Url, undefined, undefined>;
|
|
1488
|
+
export { StreamParams }
|
|
1489
|
+
export { StreamParams as StreamParams_alias_1 }
|
|
1490
|
+
export { StreamParams as StreamParams_alias_2 }
|
|
1491
|
+
|
|
1448
1492
|
declare const stripEndSlash: (path: string) => string;
|
|
1449
1493
|
export { stripEndSlash }
|
|
1450
1494
|
export { stripEndSlash as stripEndSlash_alias_1 }
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
6
|
+
var __typeError = (msg) => {
|
|
7
|
+
throw TypeError(msg);
|
|
8
|
+
};
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
11
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
12
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
13
|
+
}) : x)(function(x) {
|
|
14
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
15
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
16
|
+
});
|
|
17
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
18
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
|
+
};
|
|
20
|
+
var __decoratorStart = (base) => [, , , __create((base == null ? void 0 : base[__knownSymbol("metadata")]) ?? null)];
|
|
21
|
+
var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
|
|
22
|
+
var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
|
|
23
|
+
var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
|
|
24
|
+
var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
|
|
25
|
+
var __runInitializers = (array, flags, self, value) => {
|
|
26
|
+
for (var i = 0, fns = array[flags >> 1], n = fns && fns.length; i < n; i++) flags & 1 ? fns[i].call(self) : value = fns[i].call(self, value);
|
|
27
|
+
return value;
|
|
28
|
+
};
|
|
29
|
+
var __decorateElement = (array, flags, name, decorators, target, extra) => {
|
|
30
|
+
var fn, it, done, ctx, access, k = flags & 7, s = !!(flags & 8), p = !!(flags & 16);
|
|
31
|
+
var j = k > 3 ? array.length + 1 : k ? s ? 1 : 2 : 0, key = __decoratorStrings[k + 5];
|
|
32
|
+
var initializers = k > 3 && (array[j - 1] = []), extraInitializers = array[j] || (array[j] = []);
|
|
33
|
+
var desc = k && (!p && !s && (target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(k < 4 ? target : { get [name]() {
|
|
34
|
+
return __privateGet(this, extra);
|
|
35
|
+
}, set [name](x) {
|
|
36
|
+
return __privateSet(this, extra, x);
|
|
37
|
+
} }, name));
|
|
38
|
+
k ? p && k < 4 && __name(extra, (k > 2 ? "set " : k > 1 ? "get " : "") + name) : __name(target, name);
|
|
39
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
40
|
+
ctx = __decoratorContext(k, name, done = {}, array[3], extraInitializers);
|
|
41
|
+
if (k) {
|
|
42
|
+
ctx.static = s, ctx.private = p, access = ctx.access = { has: p ? (x) => __privateIn(target, x) : (x) => name in x };
|
|
43
|
+
if (k ^ 3) access.get = p ? (x) => (k ^ 1 ? __privateGet : __privateMethod)(x, target, k ^ 4 ? extra : desc.get) : (x) => x[name];
|
|
44
|
+
if (k > 2) access.set = p ? (x, y) => __privateSet(x, target, y, k ^ 4 ? extra : desc.set) : (x, y) => x[name] = y;
|
|
45
|
+
}
|
|
46
|
+
it = (0, decorators[i])(k ? k < 4 ? p ? extra : desc[key] : k > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
|
|
47
|
+
if (k ^ 4 || it === void 0) __expectFn(it) && (k > 4 ? initializers.unshift(it) : k ? p ? extra = it : desc[key] = it : target = it);
|
|
48
|
+
else if (typeof it !== "object" || it === null) __typeError("Object expected");
|
|
49
|
+
else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
|
|
50
|
+
}
|
|
51
|
+
return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
|
|
52
|
+
};
|
|
53
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
54
|
+
var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj);
|
|
55
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
56
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
57
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
__require,
|
|
61
|
+
__commonJS,
|
|
62
|
+
__decoratorStart,
|
|
63
|
+
__runInitializers,
|
|
64
|
+
__decorateElement
|
|
65
|
+
};
|
package/dist/index.d.mts
CHANGED
|
@@ -19,6 +19,11 @@ export { Header } from './_tsup-dts-rollup.mjs';
|
|
|
19
19
|
export { HttpCode } from './_tsup-dts-rollup.mjs';
|
|
20
20
|
export { Module } from './_tsup-dts-rollup.mjs';
|
|
21
21
|
export { ModuleOptions } from './_tsup-dts-rollup.mjs';
|
|
22
|
+
export { Multipart } from './_tsup-dts-rollup.mjs';
|
|
23
|
+
export { MultipartParams } from './_tsup-dts-rollup.mjs';
|
|
24
|
+
export { MultipartResult } from './_tsup-dts-rollup.mjs';
|
|
25
|
+
export { Stream } from './_tsup-dts-rollup.mjs';
|
|
26
|
+
export { StreamParams } from './_tsup-dts-rollup.mjs';
|
|
22
27
|
export { UseGuards } from './_tsup-dts-rollup.mjs';
|
|
23
28
|
export { HttpException } from './_tsup-dts-rollup.mjs';
|
|
24
29
|
export { BadRequestException } from './_tsup-dts-rollup.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,11 @@ export { Header } from './_tsup-dts-rollup.js';
|
|
|
19
19
|
export { HttpCode } from './_tsup-dts-rollup.js';
|
|
20
20
|
export { Module } from './_tsup-dts-rollup.js';
|
|
21
21
|
export { ModuleOptions } from './_tsup-dts-rollup.js';
|
|
22
|
+
export { Multipart } from './_tsup-dts-rollup.js';
|
|
23
|
+
export { MultipartParams } from './_tsup-dts-rollup.js';
|
|
24
|
+
export { MultipartResult } from './_tsup-dts-rollup.js';
|
|
25
|
+
export { Stream } from './_tsup-dts-rollup.js';
|
|
26
|
+
export { StreamParams } from './_tsup-dts-rollup.js';
|
|
22
27
|
export { UseGuards } from './_tsup-dts-rollup.js';
|
|
23
28
|
export { HttpException } from './_tsup-dts-rollup.js';
|
|
24
29
|
export { BadRequestException } from './_tsup-dts-rollup.js';
|