@bool-ts/core 2.2.3 → 2.3.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 (70) hide show
  1. package/dist/constants/index.d.ts +3 -0
  2. package/dist/constants/keys.d.ts +34 -0
  3. package/dist/constants/objects.d.ts +505 -0
  4. package/dist/decorators/arguments.d.ts +2 -3
  5. package/dist/decorators/container.d.ts +5 -1
  6. package/dist/decorators/controller.d.ts +1 -1
  7. package/dist/decorators/guard.d.ts +1 -1
  8. package/dist/decorators/inject.d.ts +1 -1
  9. package/dist/decorators/injectable.d.ts +1 -1
  10. package/dist/decorators/interceptor.d.ts +1 -1
  11. package/dist/decorators/middleware.d.ts +1 -1
  12. package/dist/decorators/module.d.ts +1 -1
  13. package/dist/decorators/webSocket.d.ts +1 -1
  14. package/dist/decorators/webSocketArguments.d.ts +1 -1
  15. package/dist/entities/application.d.ts +13 -83
  16. package/dist/entities/httpRoute.d.ts +0 -2
  17. package/dist/entities/httpRouter.d.ts +29 -3
  18. package/dist/entities/httpRouterGroup.d.ts +5 -1
  19. package/dist/entities/injector.d.ts +2 -2
  20. package/dist/http/clientError.d.ts +5 -35
  21. package/dist/http/serverError.d.ts +7 -19
  22. package/dist/index.d.ts +2 -2
  23. package/dist/index.js +6 -6
  24. package/dist/index.js.map +31 -29
  25. package/dist/interfaces/@types.d.ts +114 -0
  26. package/dist/interfaces/guard.d.ts +2 -1
  27. package/dist/interfaces/index.d.ts +2 -1
  28. package/dist/producers/factory.d.ts +1 -1
  29. package/dist/utils/asyncFunction.d.ts +1 -0
  30. package/dist/utils/colors.d.ts +30 -0
  31. package/dist/utils/functions.d.ts +1 -0
  32. package/dist/utils/index.d.ts +5 -0
  33. package/dist/utils/socket.d.ts +1 -0
  34. package/package.json +5 -4
  35. package/src/constants/index.ts +10 -0
  36. package/src/constants/objects.ts +291 -0
  37. package/src/decorators/arguments.ts +3 -5
  38. package/src/decorators/container.ts +40 -20
  39. package/src/decorators/controller.ts +2 -2
  40. package/src/decorators/guard.ts +2 -2
  41. package/src/decorators/http.ts +1 -1
  42. package/src/decorators/inject.ts +2 -2
  43. package/src/decorators/injectable.ts +2 -2
  44. package/src/decorators/interceptor.ts +2 -2
  45. package/src/decorators/middleware.ts +2 -2
  46. package/src/decorators/module.ts +2 -2
  47. package/src/decorators/webSocket.ts +2 -2
  48. package/src/decorators/webSocketArguments.ts +1 -1
  49. package/src/decorators/webSocketEvent.ts +1 -1
  50. package/src/entities/application.ts +1554 -1559
  51. package/src/entities/context.ts +12 -3
  52. package/src/entities/httpRoute.ts +1 -4
  53. package/src/entities/httpRouter.ts +36 -6
  54. package/src/entities/httpRouterGroup.ts +16 -5
  55. package/src/entities/injector.ts +3 -3
  56. package/src/http/clientError.ts +16 -39
  57. package/src/http/serverError.ts +17 -22
  58. package/src/index.ts +12 -2
  59. package/src/interfaces/@types.ts +171 -0
  60. package/src/interfaces/guard.ts +7 -1
  61. package/src/interfaces/index.ts +24 -1
  62. package/src/producers/factory.ts +1 -1
  63. package/src/utils/constructor.ts +1 -0
  64. package/src/utils/functions.ts +13 -0
  65. package/src/{ultils → utils}/index.ts +1 -0
  66. /package/{src/ultils/constructor.ts → dist/utils/constructor.d.ts} +0 -0
  67. /package/src/{keys/index.ts → constants/keys.ts} +0 -0
  68. /package/src/{ultils → utils}/asyncFunction.ts +0 -0
  69. /package/src/{ultils → utils}/colors.ts +0 -0
  70. /package/src/{ultils → utils}/socket.ts +0 -0
@@ -1,6 +1,6 @@
1
- import type { TConstructor } from "../ultils";
1
+ import type { TConstructor } from "../utils";
2
2
 
3
- import { guardKey } from "../keys";
3
+ import { guardKey } from "../constants/keys";
4
4
 
5
5
  export type TGuardMetadata = undefined;
6
6
 
@@ -1,6 +1,6 @@
1
1
  import type { TArgumentsMetadataCollection } from "./arguments";
2
2
 
3
- import { argumentsKey, controllerHttpKey } from "../keys";
3
+ import { argumentsKey, controllerHttpKey } from "../constants/keys";
4
4
 
5
5
  export type TRoute = {
6
6
  path: string;
@@ -1,6 +1,6 @@
1
- import type { TConstructor } from "../ultils";
1
+ import type { TConstructor } from "../utils";
2
2
 
3
- import { injectKey } from "../keys";
3
+ import { injectKey } from "../constants/keys";
4
4
 
5
5
  export const Inject =
6
6
  <T extends TConstructor<Object>, K extends TConstructor<Object>>(
@@ -1,6 +1,6 @@
1
- import type { TConstructor } from "../ultils";
1
+ import type { TConstructor } from "../utils";
2
2
 
3
- import { injectableKey } from "../keys";
3
+ import { injectableKey } from "../constants/keys";
4
4
 
5
5
  export const Injectable =
6
6
  <T extends TConstructor<Object>>() =>
@@ -1,5 +1,5 @@
1
- import { interceptorKey } from "../keys";
2
- import type { TConstructor } from "../ultils";
1
+ import { interceptorKey } from "../constants/keys";
2
+ import type { TConstructor } from "../utils";
3
3
 
4
4
  export type TInterceptorMetadata = undefined;
5
5
 
@@ -1,6 +1,6 @@
1
- import type { TConstructor } from "../ultils";
1
+ import type { TConstructor } from "../utils";
2
2
 
3
- import { middlewareKey } from "../keys";
3
+ import { middlewareKey } from "../constants/keys";
4
4
 
5
5
  export type TMiddlewareMetadata = undefined;
6
6
 
@@ -1,4 +1,4 @@
1
- import type { TConstructor } from "../ultils";
1
+ import type { TConstructor } from "../utils";
2
2
 
3
3
  import {
4
4
  containerKey,
@@ -9,7 +9,7 @@ import {
9
9
  middlewareKey,
10
10
  moduleKey,
11
11
  webSocketKey
12
- } from "../keys";
12
+ } from "../constants/keys";
13
13
 
14
14
  type TInstances = Array<new (...args: any[]) => any>;
15
15
  type TLoaders<TConfig extends {} = {}> = Record<
@@ -1,9 +1,9 @@
1
1
  import type { Server } from "bun";
2
- import type { TConstructor } from "../ultils";
2
+ import type { TConstructor } from "../utils";
3
3
  import type { TArgumentsMetadataCollection } from "./arguments";
4
4
  import type { TWebSocketEventMetadata } from "./webSocketEvent";
5
5
 
6
- import { webSocketEventKey, webSocketKey } from "../keys";
6
+ import { webSocketEventKey, webSocketKey } from "../constants/keys";
7
7
 
8
8
  export type TWebSocketHttpRouteMetadata = {
9
9
  path: string;
@@ -5,7 +5,7 @@ import {
5
5
  webSocketEventArgumentsKey,
6
6
  webSocketMessageArgsKey,
7
7
  webSocketServerArgsKey
8
- } from "../keys";
8
+ } from "../constants/keys";
9
9
 
10
10
  export type TWebsocketArgumentsMetadata =
11
11
  | {
@@ -3,7 +3,7 @@ import type {
3
3
  TWebsocketArgumentsMetadataGroup
4
4
  } from "./webSocketArguments";
5
5
 
6
- import { webSocketEventArgumentsKey, webSocketEventKey } from "../keys";
6
+ import { webSocketEventArgumentsKey, webSocketEventKey } from "../constants/keys";
7
7
 
8
8
  export type TWebSocketEventHandlerMetadata = Required<{
9
9
  methodName: string;