framework-do-dede 2.0.21 → 3.0.1
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/application/controller.d.ts +70 -0
- package/dist/{decorators → application}/controller.js +45 -33
- package/dist/application/entity.d.ts +21 -0
- package/dist/application/entity.js +161 -0
- package/dist/application/index.d.ts +6 -0
- package/dist/application/index.js +5 -0
- package/dist/{protocols/StorageGateway.d.ts → application/services.d.ts} +2 -0
- package/dist/application/services.js +20 -0
- package/dist/application/usecase.d.ts +11 -0
- package/dist/application/usecase.js +24 -0
- package/dist/dede.d.ts +5 -4
- package/dist/dede.js +22 -26
- package/dist/{handlers → http}/controller.handler.d.ts +2 -2
- package/dist/http/controller.handler.js +160 -0
- package/dist/http/{ExpressHttpServer.d.ts → elysia-server.adapter.d.ts} +2 -2
- package/dist/http/{ElysiaHttpServer.js → elysia-server.adapter.js} +2 -2
- package/dist/http/{ElysiaHttpServer.d.ts → express-server.adapter.d.ts} +2 -2
- package/dist/http/express-server.adapter.js +25 -0
- package/dist/http/{HttpServer.d.ts → http-server.d.ts} +13 -0
- package/dist/http/{HttpServer.js → http-server.js} +4 -2
- package/dist/http/index.d.ts +2 -2
- package/dist/http/index.js +2 -2
- package/dist/index.d.ts +2 -7
- package/dist/index.js +9 -6
- package/dist/infra/di/registry.d.ts +11 -0
- package/dist/infra/di/registry.js +32 -0
- package/package.json +5 -4
- package/dist/decorators/controller.d.ts +0 -38
- package/dist/decorators/di.d.ts +0 -1
- package/dist/decorators/di.js +0 -7
- package/dist/decorators/entity.d.ts +0 -12
- package/dist/decorators/entity.js +0 -65
- package/dist/decorators/index.d.ts +0 -6
- package/dist/decorators/index.js +0 -6
- package/dist/decorators/services.d.ts +0 -1
- package/dist/decorators/services.js +0 -27
- package/dist/decorators/usecase.d.ts +0 -4
- package/dist/decorators/usecase.js +0 -15
- package/dist/di/registry.d.ts +0 -17
- package/dist/di/registry.js +0 -51
- package/dist/domain/Entity.d.ts +0 -5
- package/dist/domain/Entity.js +0 -132
- package/dist/handlers/controller.handler.js +0 -215
- package/dist/handlers/index.d.ts +0 -3
- package/dist/handlers/index.js +0 -3
- package/dist/handlers/usecase.handler.d.ts +0 -4
- package/dist/handlers/usecase.handler.js +0 -43
- package/dist/http/ExpressHttpServer.js +0 -19
- package/dist/protocols/Controller.d.ts +0 -17
- package/dist/protocols/Controller.js +0 -1
- package/dist/protocols/CreateRepository.d.ts +0 -4
- package/dist/protocols/CreateRepository.js +0 -1
- package/dist/protocols/DeleteRepository.d.ts +0 -3
- package/dist/protocols/DeleteRepository.js +0 -1
- package/dist/protocols/DeleteRepositoryBy.d.ts +0 -3
- package/dist/protocols/DeleteRepositoryBy.js +0 -1
- package/dist/protocols/ExistsBy.d.ts +0 -3
- package/dist/protocols/ExistsBy.js +0 -1
- package/dist/protocols/HttpMiddleware.d.ts +0 -3
- package/dist/protocols/HttpMiddleware.js +0 -1
- package/dist/protocols/HttpServerError.d.ts +0 -5
- package/dist/protocols/HttpServerError.js +0 -1
- package/dist/protocols/NotExistsBy.d.ts +0 -3
- package/dist/protocols/NotExistsBy.js +0 -1
- package/dist/protocols/Request.d.ts +0 -5
- package/dist/protocols/Request.js +0 -1
- package/dist/protocols/RequestMetrics.d.ts +0 -18
- package/dist/protocols/RequestMetrics.js +0 -1
- package/dist/protocols/RequestMetricsHandler.d.ts +0 -5
- package/dist/protocols/RequestMetricsHandler.js +0 -1
- package/dist/protocols/RestoreManyRepository.d.ts +0 -9
- package/dist/protocols/RestoreManyRepository.js +0 -1
- package/dist/protocols/RestoreRepository.d.ts +0 -3
- package/dist/protocols/RestoreRepository.js +0 -1
- package/dist/protocols/RestoreRepositoryBy.d.ts +0 -3
- package/dist/protocols/RestoreRepositoryBy.js +0 -1
- package/dist/protocols/StorageGateway.js +0 -1
- package/dist/protocols/UpdateRepository.d.ts +0 -4
- package/dist/protocols/UpdateRepository.js +0 -1
- package/dist/protocols/UseCase.d.ts +0 -3
- package/dist/protocols/UseCase.js +0 -1
- package/dist/protocols/Validation.d.ts +0 -3
- package/dist/protocols/Validation.js +0 -1
- package/dist/protocols/index.d.ts +0 -18
- package/dist/protocols/index.js +0 -1
- package/dist/utils/Log.d.ts +0 -6
- package/dist/utils/Log.js +0 -42
- /package/dist/http/{FrameworkError.d.ts → errors/framework.d.ts} +0 -0
- /package/dist/http/{FrameworkError.js → errors/framework.js} +0 -0
- /package/dist/http/{ServerError.d.ts → errors/server.d.ts} +0 -0
- /package/dist/http/{ServerError.js → errors/server.js} +0 -0
package/dist/utils/Log.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const logStyles = {
|
|
2
|
-
reset: "\x1b[0m",
|
|
3
|
-
bright: "\x1b[1m",
|
|
4
|
-
dim: "\x1b[2m",
|
|
5
|
-
underscore: "\x1b[4m",
|
|
6
|
-
blink: "\x1b[5m",
|
|
7
|
-
reverse: "\x1b[7m",
|
|
8
|
-
hidden: "\x1b[8m",
|
|
9
|
-
// Foreground (text) colors
|
|
10
|
-
fg: {
|
|
11
|
-
black: "\x1b[30m",
|
|
12
|
-
red: "\x1b[31m",
|
|
13
|
-
green: "\x1b[32m",
|
|
14
|
-
yellow: "\x1b[33m",
|
|
15
|
-
blue: "\x1b[34m",
|
|
16
|
-
magenta: "\x1b[35m",
|
|
17
|
-
cyan: "\x1b[36m",
|
|
18
|
-
white: "\x1b[37m",
|
|
19
|
-
crimson: "\x1b[38m"
|
|
20
|
-
},
|
|
21
|
-
// Background colors
|
|
22
|
-
bg: {
|
|
23
|
-
black: "\x1b[40m",
|
|
24
|
-
red: "\x1b[41m",
|
|
25
|
-
green: "\x1b[42m",
|
|
26
|
-
yellow: "\x1b[43m",
|
|
27
|
-
blue: "\x1b[44m",
|
|
28
|
-
magenta: "\x1b[45m",
|
|
29
|
-
cyan: "\x1b[46m",
|
|
30
|
-
white: "\x1b[47m",
|
|
31
|
-
crimson: "\x1b[48m"
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
const log = (color, text) => {
|
|
35
|
-
console.log(`${color}%s${logStyles.reset}`, text);
|
|
36
|
-
};
|
|
37
|
-
export class Log {
|
|
38
|
-
static info = (text) => log(logStyles.fg.cyan, text);
|
|
39
|
-
static error = (text) => log(logStyles.fg.red, text);
|
|
40
|
-
static success = (text) => log(logStyles.fg.green, text);
|
|
41
|
-
static warning = (text) => log(logStyles.fg.yellow, text);
|
|
42
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|