@bool-ts/core 1.6.2 → 1.6.3
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.
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export { Body,
|
|
1
|
+
export { Body, Context, Param, Params, Query, Request, RequestHeaders, ResponseHeaders } from "./arguments";
|
|
2
2
|
export { Controller } from "./controller";
|
|
3
|
+
export { Dispatcher } from "./dispatcher";
|
|
3
4
|
export { Guard } from "./guard";
|
|
5
|
+
export { Delete, Get, Options, Patch, Post, Put } from "./http";
|
|
4
6
|
export { Inject } from "./inject";
|
|
5
7
|
export { Injectable } from "./injectable";
|
|
6
8
|
export { Middleware } from "./middleware";
|
|
7
9
|
export { Module } from "./module";
|
|
8
|
-
export { Get, Post, Put, Patch, Delete, Options } from "./http";
|
|
9
10
|
export { ZodSchema } from "./zodSchema";
|
|
10
|
-
export {
|
|
11
|
+
export type { TArgumentsMetadata } from "./arguments";
|
|
11
12
|
export type { TControllerMetadata } from "./controller";
|
|
12
|
-
export type {
|
|
13
|
+
export type { TDispatcherMetadata } from "./dispatcher";
|
|
14
|
+
export type { TGuardMetadata } from "./guard";
|
|
13
15
|
export type { THttpMetadata } from "./http";
|
|
14
|
-
export type { TArgumentsMetadata } from "./arguments";
|
|
15
16
|
export type { TMiddlewareMetadata } from "./middleware";
|
|
16
|
-
export type {
|
|
17
|
-
export type { TDispatcherMetadata } from "./dispatcher";
|
|
17
|
+
export type { TModuleMetadata, TModuleOptions } from "./module";
|
package/dist/decorators/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { Body,
|
|
1
|
+
export { Body, Context, Param, Params, Query, Request, RequestHeaders, ResponseHeaders } from "./arguments";
|
|
2
2
|
export { Controller } from "./controller";
|
|
3
|
+
export { Dispatcher } from "./dispatcher";
|
|
3
4
|
export { Guard } from "./guard";
|
|
5
|
+
export { Delete, Get, Options, Patch, Post, Put } from "./http";
|
|
4
6
|
export { Inject } from "./inject";
|
|
5
7
|
export { Injectable } from "./injectable";
|
|
6
8
|
export { Middleware } from "./middleware";
|
|
7
9
|
export { Module } from "./module";
|
|
8
|
-
export { Get, Post, Put, Patch, Delete, Options } from "./http";
|
|
9
10
|
export { ZodSchema } from "./zodSchema";
|
|
10
|
-
export { Dispatcher } from "./dispatcher";
|
package/dist/hooks/injector.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
|
-
import {
|
|
2
|
+
import { controllerKey, dispatcherKey, guardKey, injectableKey, injectKey, middlewareKey } from "../keys";
|
|
3
3
|
export const Injector = new (class {
|
|
4
4
|
_mapper = new Map();
|
|
5
5
|
/**
|
|
@@ -13,7 +13,7 @@ export declare const httpServerErrors: Readonly<{
|
|
|
13
13
|
}>;
|
|
14
14
|
export declare class HttpServerError<T extends keyof typeof httpServerErrors = keyof typeof httpServerErrors, K = any> extends Error {
|
|
15
15
|
readonly httpCode: T;
|
|
16
|
-
readonly message: typeof httpServerErrors[T] | string;
|
|
16
|
+
readonly message: (typeof httpServerErrors)[T] | string;
|
|
17
17
|
readonly data: K;
|
|
18
18
|
constructor({ httpCode, data, message }: {
|
|
19
19
|
httpCode: T;
|
package/package.json
CHANGED
package/src/decorators/index.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { Body,
|
|
1
|
+
export { Body, Context, Param, Params, Query, Request, RequestHeaders, ResponseHeaders } from "./arguments";
|
|
2
2
|
export { Controller } from "./controller";
|
|
3
|
+
export { Dispatcher } from "./dispatcher";
|
|
3
4
|
export { Guard } from "./guard";
|
|
5
|
+
export { Delete, Get, Options, Patch, Post, Put } from "./http";
|
|
4
6
|
export { Inject } from "./inject";
|
|
5
7
|
export { Injectable } from "./injectable";
|
|
6
8
|
export { Middleware } from "./middleware";
|
|
7
9
|
export { Module } from "./module";
|
|
8
|
-
export { Get, Post, Put, Patch, Delete, Options } from "./http";
|
|
9
10
|
export { ZodSchema } from "./zodSchema";
|
|
10
|
-
export { Dispatcher } from "./dispatcher";
|
|
11
11
|
|
|
12
|
+
export type { TArgumentsMetadata } from "./arguments";
|
|
12
13
|
export type { TControllerMetadata } from "./controller";
|
|
13
|
-
export type {
|
|
14
|
+
export type { TDispatcherMetadata } from "./dispatcher";
|
|
15
|
+
export type { TGuardMetadata } from "./guard";
|
|
14
16
|
export type { THttpMetadata } from "./http";
|
|
15
|
-
export type { TArgumentsMetadata } from "./arguments";
|
|
16
17
|
export type { TMiddlewareMetadata } from "./middleware";
|
|
17
|
-
export type {
|
|
18
|
-
export type { TDispatcherMetadata } from "./dispatcher";
|
|
18
|
+
export type { TModuleMetadata, TModuleOptions } from "./module";
|
package/src/hooks/injector.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
|
-
import {
|
|
2
|
+
import { controllerKey, dispatcherKey, guardKey, injectableKey, injectKey, middlewareKey } from "../keys";
|
|
3
3
|
|
|
4
4
|
type TDefinition<T = any> = { new (...args: any[]): T } | string | symbol;
|
|
5
5
|
|
package/src/http/serverError.ts
CHANGED
|
@@ -12,23 +12,12 @@ export const httpServerErrors = Object.freeze({
|
|
|
12
12
|
511: "NETWORK_AUTHENTICATION_REQUIRED"
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
export class HttpServerError<
|
|
16
|
-
T extends keyof typeof httpServerErrors = keyof typeof httpServerErrors,
|
|
17
|
-
K = any
|
|
18
|
-
> extends Error {
|
|
15
|
+
export class HttpServerError<T extends keyof typeof httpServerErrors = keyof typeof httpServerErrors, K = any> extends Error {
|
|
19
16
|
public readonly httpCode: T;
|
|
20
|
-
public readonly message: typeof httpServerErrors[T] | string;
|
|
17
|
+
public readonly message: (typeof httpServerErrors)[T] | string;
|
|
21
18
|
public readonly data: K;
|
|
22
19
|
|
|
23
|
-
constructor({
|
|
24
|
-
httpCode,
|
|
25
|
-
data,
|
|
26
|
-
message
|
|
27
|
-
}: {
|
|
28
|
-
httpCode: T;
|
|
29
|
-
data: K;
|
|
30
|
-
message?: string;
|
|
31
|
-
}) {
|
|
20
|
+
constructor({ httpCode, data, message }: { httpCode: T; data: K; message?: string }) {
|
|
32
21
|
super();
|
|
33
22
|
|
|
34
23
|
this.httpCode = httpCode;
|