@bool-ts/core 1.8.1 → 1.8.2

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 (54) hide show
  1. package/__test/controller.ts +1 -1
  2. package/__test/dispatcher.ts +2 -2
  3. package/__test/firstGuard.ts +3 -1
  4. package/__test/firstMiddleware.ts +3 -2
  5. package/__test/index.ts +1 -1
  6. package/__test/module.ts +1 -1
  7. package/__test/repository.ts +2 -3
  8. package/__test/secondGuard.ts +1 -1
  9. package/__test/secondMiddleware.ts +2 -2
  10. package/__test/service.ts +4 -7
  11. package/__test/tsconfig.json +6 -2
  12. package/__test/webSocket.ts +1 -1
  13. package/dist/index.js +4995 -6
  14. package/package.json +2 -2
  15. package/dist/decorators/arguments.js +0 -123
  16. package/dist/decorators/controller.js +0 -9
  17. package/dist/decorators/dispatcher.js +0 -6
  18. package/dist/decorators/guard.js +0 -9
  19. package/dist/decorators/http.js +0 -60
  20. package/dist/decorators/index.js +0 -13
  21. package/dist/decorators/inject.js +0 -9
  22. package/dist/decorators/injectable.js +0 -3
  23. package/dist/decorators/middleware.js +0 -6
  24. package/dist/decorators/module.js +0 -48
  25. package/dist/decorators/webSocket.js +0 -40
  26. package/dist/decorators/webSocketArguments.js +0 -49
  27. package/dist/decorators/webSocketEvent.js +0 -24
  28. package/dist/decorators/zodSchema.js +0 -15
  29. package/dist/entities/httpRoute.js +0 -268
  30. package/dist/entities/httpRouter.js +0 -27
  31. package/dist/entities/httpRouterGroup.js +0 -24
  32. package/dist/entities/index.js +0 -6
  33. package/dist/entities/webSocketRoute.js +0 -22
  34. package/dist/entities/webSocketRouter.js +0 -54
  35. package/dist/entities/webSocketRouterGroup.js +0 -51
  36. package/dist/hooks/factory.js +0 -1072
  37. package/dist/hooks/index.js +0 -2
  38. package/dist/hooks/injector.js +0 -36
  39. package/dist/http/clientError.js +0 -42
  40. package/dist/http/index.js +0 -40
  41. package/dist/http/serverError.js +0 -24
  42. package/dist/interfaces/context.js +0 -1
  43. package/dist/interfaces/controller.js +0 -1
  44. package/dist/interfaces/dispatcher.js +0 -1
  45. package/dist/interfaces/guard.js +0 -1
  46. package/dist/interfaces/index.js +0 -1
  47. package/dist/interfaces/middleware.js +0 -1
  48. package/dist/interfaces/module.js +0 -1
  49. package/dist/interfaces/webSocket.js +0 -1
  50. package/dist/keys/index.js +0 -31
  51. package/dist/ultils/asyncFunction.js +0 -1
  52. package/dist/ultils/colors.js +0 -41
  53. package/dist/ultils/index.js +0 -3
  54. package/dist/ultils/socket.js +0 -7
@@ -16,7 +16,7 @@ import {
16
16
  Query,
17
17
  RequestBody,
18
18
  RequestHeaders
19
- } from "@src";
19
+ } from "@dist";
20
20
  import { TestService } from "./service";
21
21
 
22
22
  const postParamsSchema = Zod.object({
@@ -1,6 +1,6 @@
1
- import type { IDispatcher } from "../src";
1
+ import type { IDispatcher } from "@dist";
2
2
 
3
- import { Dispatcher } from "../src";
3
+ import { Dispatcher } from "@dist";
4
4
 
5
5
  @Dispatcher()
6
6
  export class CustomDispatcher implements IDispatcher {
@@ -1,4 +1,6 @@
1
- import { Guard, IGuard } from "../src";
1
+ import type { IGuard } from "@dist";
2
+
3
+ import { Guard } from "@dist";
2
4
 
3
5
  @Guard()
4
6
  export class FirstGuard implements IGuard {
@@ -1,5 +1,6 @@
1
- import type { IMiddleware } from "../src";
2
- import { Middleware } from "../src";
1
+ import type { IMiddleware } from "@dist";
2
+
3
+ import { Middleware } from "@dist";
3
4
 
4
5
  @Middleware()
5
6
  export class FirstMiddleware implements IMiddleware {
package/__test/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import "reflect-metadata";
2
2
 
3
- import { BoolFactory } from "../src";
3
+ import { BoolFactory } from "@dist";
4
4
  import { TestModule } from "./module";
5
5
 
6
6
  BoolFactory(TestModule, {
package/__test/module.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Module } from "../src";
1
+ import { Module } from "@dist";
2
2
  import { TestController } from "./controller";
3
3
  import { CustomDispatcher } from "./dispatcher";
4
4
  import { FirstGuard } from "./firstGuard";
@@ -1,12 +1,11 @@
1
1
  import type { IRepository } from "./interfaces";
2
2
 
3
- import { Injectable } from "../src";
4
-
3
+ import { Injectable } from "@dist";
5
4
 
6
5
  @Injectable()
7
6
  export class TestRepository implements IRepository {
8
7
  /**
9
- *
8
+ *
10
9
  */
11
10
  exec() {
12
11
  console.log("This is test repository.");
@@ -1,4 +1,4 @@
1
- import { Guard, IGuard } from "../src";
1
+ import { Guard, IGuard } from "@dist";
2
2
 
3
3
  @Guard()
4
4
  export class SecondGuard implements IGuard {
@@ -1,5 +1,5 @@
1
- import type { IMiddleware } from "../src";
2
- import { Middleware } from "../src";
1
+ import type { IMiddleware } from "@dist";
2
+ import { Middleware } from "@dist";
3
3
 
4
4
  @Middleware()
5
5
  export class SecondMiddleware implements IMiddleware {
package/__test/service.ts CHANGED
@@ -1,17 +1,14 @@
1
- import type { IService, IRepository } from "./interfaces";
1
+ import type { IRepository, IService } from "./interfaces";
2
2
 
3
- import { Inject, Injectable } from "../src";
3
+ import { Inject, Injectable } from "@dist";
4
4
  import { TestRepository } from "./repository";
5
5
 
6
-
7
6
  @Injectable()
8
7
  export class TestService implements IService {
9
- constructor(
10
- @Inject(TestRepository) private readonly testRepository: IRepository
11
- ) { }
8
+ constructor(@Inject(TestRepository) private readonly testRepository: IRepository) {}
12
9
 
13
10
  /**
14
- *
11
+ *
15
12
  */
16
13
  exec() {
17
14
  console.log("This is test service.", this.testRepository);
@@ -30,9 +30,13 @@
30
30
  "moduleResolution": "Bundler" /* Specify how TypeScript looks up a file from a given module specifier. */,
31
31
  "baseUrl": "./" /* Specify the base directory to resolve non-relative module names. */,
32
32
  "paths": {
33
- "@src": ["../src"]
33
+ "@src": ["../src"],
34
+ "@dist": ["../dist"]
34
35
  } /* Specify a set of entries that re-map imports to additional lookup locations. */,
35
- "rootDirs": ["./", "../src"] /* Allow multiple folders to be treated as one when resolving modules. */,
36
+ "rootDirs": [
37
+ "./",
38
+ "@dist"
39
+ ] /* Allow multiple folders to be treated as one when resolving modules. */,
36
40
  // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
37
41
  // "types": [
38
42
  // "reflect-metadata"
@@ -7,7 +7,7 @@ import {
7
7
  WebSocketConnection,
8
8
  WebSocketEvent,
9
9
  WebSocketServer
10
- } from "../src";
10
+ } from "@dist";
11
11
 
12
12
  @WebSocket()
13
13
  export class TestWebSocket {