@expressots/core 1.9.0 → 2.0.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.
- package/lib/CHANGELOG.md +54 -26
- package/lib/cjs/application/application-factory.js +83 -0
- package/lib/cjs/application/index.js +3 -5
- package/lib/cjs/controller/base-controller.js +1 -12
- package/lib/cjs/decorator/scope-binding.js +30 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/middleware/index.js +5 -0
- package/lib/cjs/middleware/interfaces/body-parser.interface.js +2 -0
- package/lib/cjs/middleware/interfaces/compression.interface.js +2 -0
- package/lib/cjs/middleware/interfaces/cors.interface.js +2 -0
- package/lib/cjs/middleware/interfaces/serve-static.interface.js +2 -0
- package/lib/cjs/middleware/middleware-resolver.js +64 -0
- package/lib/cjs/middleware/middleware-service.js +145 -0
- package/lib/cjs/provider/index.js +2 -2
- package/lib/cjs/types/application/application-factory.d.ts +34 -0
- package/lib/cjs/types/application/application-factory.d.ts.map +1 -0
- package/lib/cjs/types/application/index.d.ts +1 -1
- package/lib/cjs/types/application/index.d.ts.map +1 -1
- package/lib/cjs/types/controller/base-controller.d.ts +4 -10
- package/lib/cjs/types/controller/base-controller.d.ts.map +1 -1
- package/lib/cjs/types/decorator/scope-binding.d.ts +30 -0
- package/lib/cjs/types/decorator/scope-binding.d.ts.map +1 -1
- package/lib/cjs/types/index.d.ts +1 -0
- package/lib/cjs/types/index.d.ts.map +1 -1
- package/lib/cjs/types/middleware/index.d.ts +5 -0
- package/lib/cjs/types/middleware/index.d.ts.map +1 -0
- package/lib/cjs/types/middleware/interfaces/body-parser.interface.d.ts +34 -0
- package/lib/cjs/types/middleware/interfaces/body-parser.interface.d.ts.map +1 -0
- package/lib/cjs/types/middleware/interfaces/compression.interface.d.ts +99 -0
- package/lib/cjs/types/middleware/interfaces/compression.interface.d.ts.map +1 -0
- package/lib/cjs/types/middleware/interfaces/cors.interface.d.ts +58 -0
- package/lib/cjs/types/middleware/interfaces/cors.interface.d.ts.map +1 -0
- package/lib/cjs/types/middleware/interfaces/serve-static.interface.d.ts +71 -0
- package/lib/cjs/types/middleware/interfaces/serve-static.interface.d.ts.map +1 -0
- package/lib/cjs/types/middleware/middleware-resolver.d.ts +12 -0
- package/lib/cjs/types/middleware/middleware-resolver.d.ts.map +1 -0
- package/lib/cjs/types/middleware/middleware-service.d.ts +137 -0
- package/lib/cjs/types/middleware/middleware-service.d.ts.map +1 -0
- package/lib/cjs/types/provider/index.d.ts +1 -1
- package/lib/cjs/types/provider/index.d.ts.map +1 -1
- package/lib/esm/application/application-factory.js +72 -0
- package/lib/esm/application/index.js +3 -5
- package/lib/esm/controller/base-controller.js +1 -13
- package/lib/esm/decorator/scope-binding.js +30 -0
- package/lib/esm/index.mjs +1 -0
- package/lib/esm/middleware/index.js +5 -0
- package/lib/esm/middleware/interfaces/body-parser.interface.js +2 -0
- package/lib/esm/middleware/interfaces/compression.interface.js +2 -0
- package/lib/esm/middleware/interfaces/cors.interface.js +2 -0
- package/lib/esm/middleware/interfaces/serve-static.interface.js +2 -0
- package/lib/esm/middleware/middleware-resolver.js +65 -0
- package/lib/esm/middleware/middleware-service.js +144 -0
- package/lib/esm/provider/index.js +2 -2
- package/lib/esm/types/application/application-factory.d.ts +34 -0
- package/lib/esm/types/application/application-factory.d.ts.map +1 -0
- package/lib/esm/types/application/index.d.ts +1 -1
- package/lib/esm/types/application/index.d.ts.map +1 -1
- package/lib/esm/types/controller/base-controller.d.ts +4 -10
- package/lib/esm/types/controller/base-controller.d.ts.map +1 -1
- package/lib/esm/types/decorator/scope-binding.d.ts +30 -0
- package/lib/esm/types/decorator/scope-binding.d.ts.map +1 -1
- package/lib/esm/types/index.d.ts +1 -0
- package/lib/esm/types/index.d.ts.map +1 -1
- package/lib/esm/types/middleware/index.d.ts +5 -0
- package/lib/esm/types/middleware/index.d.ts.map +1 -0
- package/lib/esm/types/middleware/interfaces/body-parser.interface.d.ts +34 -0
- package/lib/esm/types/middleware/interfaces/body-parser.interface.d.ts.map +1 -0
- package/lib/esm/types/middleware/interfaces/compression.interface.d.ts +99 -0
- package/lib/esm/types/middleware/interfaces/compression.interface.d.ts.map +1 -0
- package/lib/esm/types/middleware/interfaces/cors.interface.d.ts +58 -0
- package/lib/esm/types/middleware/interfaces/cors.interface.d.ts.map +1 -0
- package/lib/esm/types/middleware/interfaces/serve-static.interface.d.ts +71 -0
- package/lib/esm/types/middleware/interfaces/serve-static.interface.d.ts.map +1 -0
- package/lib/esm/types/middleware/middleware-resolver.d.ts +12 -0
- package/lib/esm/types/middleware/middleware-resolver.d.ts.map +1 -0
- package/lib/esm/types/middleware/middleware-service.d.ts +137 -0
- package/lib/esm/types/middleware/middleware-service.d.ts.map +1 -0
- package/lib/esm/types/provider/index.d.ts +1 -1
- package/lib/esm/types/provider/index.d.ts.map +1 -1
- package/lib/package.json +7 -8
- package/package.json +7 -8
- package/lib/cjs/application/application.js +0 -141
- package/lib/cjs/provider/logger/winston-logger.js +0 -131
- package/lib/cjs/types/application/application.d.ts +0 -70
- package/lib/cjs/types/application/application.d.ts.map +0 -1
- package/lib/cjs/types/provider/logger/winston-logger.d.ts +0 -46
- package/lib/cjs/types/provider/logger/winston-logger.d.ts.map +0 -1
- package/lib/esm/application/application.js +0 -144
- package/lib/esm/provider/logger/winston-logger.js +0 -132
- package/lib/esm/types/application/application.d.ts +0 -70
- package/lib/esm/types/application/application.d.ts.map +0 -1
- package/lib/esm/types/provider/logger/winston-logger.d.ts +0 -46
- package/lib/esm/types/provider/logger/winston-logger.d.ts.map +0 -1
package/lib/CHANGELOG.md
CHANGED
|
@@ -1,39 +1,67 @@
|
|
|
1
|
+
## [2.0.0](https://github.com/expressots/expressots/compare/1.9.1...2.0.0) (2023-09-14)
|
|
1
2
|
|
|
3
|
+
### Features
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
### Bug Fixes
|
|
13
|
-
|
|
14
|
-
* disable console.spec to be refactored ([22a54bd](https://github.com/expressots/expressots/commit/22a54bdb7f0c2032d3b0e0f935ce48d73e665e84))
|
|
15
|
-
* dto validator json structure per property ([a8fbe40](https://github.com/expressots/expressots/commit/a8fbe409647140e867f930a882fd395df45d6de7))
|
|
16
|
-
* export console for testing ([d3f2c07](https://github.com/expressots/expressots/commit/d3f2c07ca2df0176fabed04172ce4ff684c91c9c))
|
|
17
|
-
* opinionated template logger.error function ([073f4e1](https://github.com/expressots/expressots/commit/073f4e154732fa3fed9492ec772c36894bc3cf48))
|
|
18
|
-
* replace dto interface for class opinionated template ([3e99d7c](https://github.com/expressots/expressots/commit/3e99d7c5492ff64701e754ec845a0410da442296))
|
|
19
|
-
* use new report utility in usecases ([#91](https://github.com/expressots/expressots/issues/91)) ([d1477b2](https://github.com/expressots/expressots/commit/d1477b24f932e354fb55373e8e73fe9155289486))
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
### Code Refactoring
|
|
23
|
-
|
|
24
|
-
* update type from any to number ([#90](https://github.com/expressots/expressots/issues/90)) ([5e34a44](https://github.com/expressots/expressots/commit/5e34a44d8bd353b8d3834f198f36bf73aa521845))
|
|
5
|
+
- add middleware resolver ([23b8d9f](https://github.com/expressots/expressots/commit/23b8d9ff8f0c8b4bb893f4fd0d7f39afcb7dd1cd))
|
|
6
|
+
- add app factory
|
|
7
|
+
- add services layer
|
|
8
|
+
- add middleware interfaces for cors, compression, bodyparser and generic middleware
|
|
9
|
+
- add configurable error handler
|
|
10
|
+
- separate expressjs from core library in its own library called adapter-express
|
|
11
|
+
- created provider mechanism to share resources between multiple adapters
|
|
12
|
+
- eliminate chalk, inversify utils dependencies
|
|
13
|
+
- create a logger system using stdout
|
|
25
14
|
|
|
26
|
-
|
|
15
|
+
### Code Refactoring
|
|
16
|
+
|
|
17
|
+
- refactor error handling
|
|
18
|
+
- remove winston lib for loggin ([5868bc9](https://github.com/expressots/expressots/commit/5868bc949f2242f0a9bfe5483642bb3878cc0156))
|
|
19
|
+
- removing unnecessary dependencies ([fdd43e0](https://github.com/expressots/expressots/commit/fdd43e0f280024b8e4b53f392ea56842a091898e))
|
|
27
20
|
|
|
21
|
+
## [1.9.1](https://github.com/expressots/expressots/compare/1.9.0...1.9.1) (2023-09-14)
|
|
28
22
|
|
|
29
23
|
### Bug Fixes
|
|
30
24
|
|
|
31
|
-
|
|
25
|
+
- add peer dependency @expressots/adapter-express ([874db40](https://github.com/expressots/expressots/commit/874db402af7bac8d5ac638fc206f3daf9f707fc3))
|
|
26
|
+
- change esm config to modeule interop ([32f04b5](https://github.com/expressots/expressots/commit/32f04b5bc7da6c515df70b0156f2f5cadd5526ac))
|
|
27
|
+
- change esm config to modeule interop ([978b168](https://github.com/expressots/expressots/commit/978b1685aa18c0573313ee96049159a1c95c4d87))
|
|
28
|
+
- opinionated template app provider services ([bcb55ca](https://github.com/expressots/expressots/commit/bcb55caf1e5a0ff053b5aaf89a79ef4537b38161))
|
|
29
|
+
- using adapter-express dependency ([84b0348](https://github.com/expressots/expressots/commit/84b03486193632b84e46e670bd44c6f8a01ebaa4))
|
|
30
|
+
|
|
31
|
+
### Code Refactoring
|
|
32
|
+
|
|
33
|
+
- create express adapter platform ([784beaa](https://github.com/expressots/expressots/commit/784beaaea9247e304abada8ebd33c673199e35f9))
|
|
34
|
+
- expose app base class for adapter ([36d8dec](https://github.com/expressots/expressots/commit/36d8dec0435a2456d1b9e1d5dca5bfb8956cfdea))
|
|
32
35
|
|
|
36
|
+
## [1.9.0](https://github.com/expressots/expressots/compare/1.8.1...1.9.0) (2023-09-12)
|
|
37
|
+
|
|
38
|
+
### Features
|
|
39
|
+
|
|
40
|
+
- add pck resolver & remove chalk dependency ([6bbd415](https://github.com/expressots/expressots/commit/6bbd415937159e419116b6ade8f9852c3251fbf4))
|
|
41
|
+
- bump vitest from 0.34.3 to 0.34.4 ([#92](https://github.com/expressots/expressots/issues/92)) ([89dc682](https://github.com/expressots/expressots/commit/89dc682c7047897f01fd7770591b6ffea689d137))
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
- disable console.spec to be refactored ([22a54bd](https://github.com/expressots/expressots/commit/22a54bdb7f0c2032d3b0e0f935ce48d73e665e84))
|
|
46
|
+
- dto validator json structure per property ([a8fbe40](https://github.com/expressots/expressots/commit/a8fbe409647140e867f930a882fd395df45d6de7))
|
|
47
|
+
- export console for testing ([d3f2c07](https://github.com/expressots/expressots/commit/d3f2c07ca2df0176fabed04172ce4ff684c91c9c))
|
|
48
|
+
- opinionated template logger.error function ([073f4e1](https://github.com/expressots/expressots/commit/073f4e154732fa3fed9492ec772c36894bc3cf48))
|
|
49
|
+
- replace dto interface for class opinionated template ([3e99d7c](https://github.com/expressots/expressots/commit/3e99d7c5492ff64701e754ec845a0410da442296))
|
|
50
|
+
- use new report utility in usecases ([#91](https://github.com/expressots/expressots/issues/91)) ([d1477b2](https://github.com/expressots/expressots/commit/d1477b24f932e354fb55373e8e73fe9155289486))
|
|
51
|
+
|
|
52
|
+
### Code Refactoring
|
|
53
|
+
|
|
54
|
+
- update type from any to number ([#90](https://github.com/expressots/expressots/issues/90)) ([5e34a44](https://github.com/expressots/expressots/commit/5e34a44d8bd353b8d3834f198f36bf73aa521845))
|
|
55
|
+
|
|
56
|
+
## [1.8.1](https://github.com/expressots/expressots/compare/1.8.0...1.8.1) (2023-09-10)
|
|
57
|
+
|
|
58
|
+
### Bug Fixes
|
|
59
|
+
|
|
60
|
+
- add generic in memory db and virtual table analysis ([#86](https://github.com/expressots/expressots/issues/86)) ([29541f9](https://github.com/expressots/expressots/commit/29541f997e47c8ac5f8cafbb0195c34c904454f4))
|
|
33
61
|
|
|
34
62
|
### Continuous Integrations
|
|
35
63
|
|
|
36
|
-
|
|
64
|
+
- config test workflow and setup vitest ([#88](https://github.com/expressots/expressots/issues/88)) ([67316ce](https://github.com/expressots/expressots/commit/67316cece977f04f9750a5a5af6cd88dfc695e0d))
|
|
37
65
|
|
|
38
66
|
## [1.8.0](https://github.com/expressots/expressots/compare/1.7.0...1.8.0) (2023-09-05)
|
|
39
67
|
|
|
@@ -270,4 +298,4 @@
|
|
|
270
298
|
|
|
271
299
|
### Bug Fixes
|
|
272
300
|
|
|
273
|
-
- fix pipeline for tag name ([b9ec52d](https://github.com/expressots/expressots/commit/b9ec52dc065763185f69364d8f083b1a95fa37e0))
|
|
301
|
+
- fix pipeline for tag name ([b9ec52d](https://github.com/expressots/expressots/commit/b9ec52dc065763185f69364d8f083b1a95fa37e0))
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AppFactory = void 0;
|
|
13
|
+
const logger_service_1 = require("../provider/logger/logger-service");
|
|
14
|
+
const adapter_express_1 = require("@expressots/adapter-express");
|
|
15
|
+
//import { AppFastify } from "./fastify/application-fastify";
|
|
16
|
+
//import { IApplicationFastify } from "./fastify/application-fastify.interface";
|
|
17
|
+
//import { Handler } from "@fastify/middie";
|
|
18
|
+
/**
|
|
19
|
+
* AppFactory Class
|
|
20
|
+
*
|
|
21
|
+
* Responsible for creating an instance of the Application,
|
|
22
|
+
* either using a custom application type or with provided middlewares.
|
|
23
|
+
*/
|
|
24
|
+
class AppFactory {
|
|
25
|
+
/* public static async create(
|
|
26
|
+
container: Container,
|
|
27
|
+
middlewares: Array<express.RequestHandler>,
|
|
28
|
+
httpServerFactory?: new () => AppFastify,
|
|
29
|
+
): Promise<AppFastify>; */
|
|
30
|
+
/**
|
|
31
|
+
* Implementation of the create method, handling both overloads.
|
|
32
|
+
* @param container - InversifyJS container to resolve dependencies.
|
|
33
|
+
* @param appTypeOrMiddlewares - Custom application class or array of middlewares.
|
|
34
|
+
* @returns Instance of the application.
|
|
35
|
+
*/
|
|
36
|
+
static create(container, appTypeOrMiddlewares, httpServerFactory /*| AppFastify*/) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
let app /*| AppFastify*/ = {}; /*| AppFastify*/
|
|
39
|
+
if (this.isOpinionated(appTypeOrMiddlewares)) {
|
|
40
|
+
switch (httpServerFactory) {
|
|
41
|
+
case adapter_express_1.AppExpress:
|
|
42
|
+
app = container.resolve(appTypeOrMiddlewares);
|
|
43
|
+
app.create(container);
|
|
44
|
+
return app;
|
|
45
|
+
/* case AppFastify:
|
|
46
|
+
app = container.resolve(appTypeOrMiddlewares as new () => AppFastify);
|
|
47
|
+
await app.create(container);
|
|
48
|
+
return app as IApplicationFastify; */
|
|
49
|
+
default:
|
|
50
|
+
app = container.resolve(appTypeOrMiddlewares);
|
|
51
|
+
app.create(container);
|
|
52
|
+
return app;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
switch (httpServerFactory) {
|
|
57
|
+
case adapter_express_1.AppExpress:
|
|
58
|
+
app = container.get(adapter_express_1.AppExpress);
|
|
59
|
+
app.create(container, appTypeOrMiddlewares);
|
|
60
|
+
return app;
|
|
61
|
+
/* case AppFastify:
|
|
62
|
+
app = container.get<AppFastify>(AppFastify);
|
|
63
|
+
await app.create(container, appTypeOrMiddlewares as Array<Handler>);
|
|
64
|
+
return app as AppFastify; */
|
|
65
|
+
default:
|
|
66
|
+
app = container.get(adapter_express_1.AppExpress);
|
|
67
|
+
app.create(container, appTypeOrMiddlewares);
|
|
68
|
+
return app;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Checks if the provided parameter is a custom application type.
|
|
75
|
+
* @param appTypeOrMiddlewares - Custom application class or array of middlewares.
|
|
76
|
+
* @returns True if the provided parameter is a custom application type.
|
|
77
|
+
*/
|
|
78
|
+
static isOpinionated(appTypeOrMiddlewares) {
|
|
79
|
+
return typeof appTypeOrMiddlewares === "function";
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.AppFactory = AppFactory;
|
|
83
|
+
AppFactory.logger = new logger_service_1.Logger();
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var application_1 = require("./application");
|
|
5
|
-
Object.defineProperty(exports, "AppInstance", { enumerable: true, get: function () { return application_1.AppInstance; } });
|
|
6
|
-
Object.defineProperty(exports, "Application", { enumerable: true, get: function () { return application_1.Application; } });
|
|
7
|
-
Object.defineProperty(exports, "ServerEnvironment", { enumerable: true, get: function () { return application_1.ServerEnvironment; } });
|
|
3
|
+
exports.AppFactory = exports.AppContainer = void 0;
|
|
8
4
|
var app_container_1 = require("./app-container");
|
|
9
5
|
Object.defineProperty(exports, "AppContainer", { enumerable: true, get: function () { return app_container_1.AppContainer; } });
|
|
6
|
+
var application_factory_1 = require("./application-factory");
|
|
7
|
+
Object.defineProperty(exports, "AppFactory", { enumerable: true, get: function () { return application_factory_1.AppFactory; } });
|
|
@@ -5,9 +5,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
8
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
9
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
10
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -27,13 +24,6 @@ const inversify_binding_decorators_1 = require("inversify-binding-decorators");
|
|
|
27
24
|
* @provide BaseController
|
|
28
25
|
*/
|
|
29
26
|
let BaseController = BaseController_1 = class BaseController {
|
|
30
|
-
/**
|
|
31
|
-
* Constructs a new BaseController instance with a specified service name.
|
|
32
|
-
* @param serviceName - The name of the service associated with the controller.
|
|
33
|
-
*/
|
|
34
|
-
constructor(serviceName = "") {
|
|
35
|
-
this.serviceName = serviceName;
|
|
36
|
-
}
|
|
37
27
|
/**
|
|
38
28
|
* Calls an asynchronous use case and sends an appropriate response based on the result.
|
|
39
29
|
* @param useCase - A promise representing the asynchronous use case to call.
|
|
@@ -92,6 +82,5 @@ let BaseController = BaseController_1 = class BaseController {
|
|
|
92
82
|
};
|
|
93
83
|
exports.BaseController = BaseController;
|
|
94
84
|
exports.BaseController = BaseController = BaseController_1 = __decorate([
|
|
95
|
-
(0, inversify_binding_decorators_1.provide)(BaseController_1)
|
|
96
|
-
__metadata("design:paramtypes", [String])
|
|
85
|
+
(0, inversify_binding_decorators_1.provide)(BaseController_1)
|
|
97
86
|
], BaseController);
|
|
@@ -4,10 +4,40 @@ exports.provideTransient = exports.provideSingleton = void 0;
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
6
|
const inversify_binding_decorators_1 = require("inversify-binding-decorators");
|
|
7
|
+
/**
|
|
8
|
+
* Provides a singleton binding for the given identifier.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* Singleton binding ensures that the same instance of a dependency is reused within the entire container.
|
|
12
|
+
*
|
|
13
|
+
* @param identifier - The identifier (e.g., symbol, string, class) for the dependency being registered.
|
|
14
|
+
* @returns A fluent interface for further configuring the binding.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* @provideSingleton(ServiceIdentifier)
|
|
19
|
+
* class MyService {}
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
7
22
|
const provideSingleton = (identifier) => {
|
|
8
23
|
return (0, inversify_binding_decorators_1.fluentProvide)(identifier).inSingletonScope().done();
|
|
9
24
|
};
|
|
10
25
|
exports.provideSingleton = provideSingleton;
|
|
26
|
+
/**
|
|
27
|
+
* Provides a transient binding for the given identifier.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Transient binding ensures that a new instance of a dependency is created every time it is resolved.
|
|
31
|
+
*
|
|
32
|
+
* @param identifier - The identifier (e.g., symbol, string, class) for the dependency being registered.
|
|
33
|
+
* @returns A fluent interface for further configuring the binding.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* @provideTransient(ServiceIdentifier)
|
|
38
|
+
* class MyService {}
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
11
41
|
const provideTransient = (identifier) => {
|
|
12
42
|
return (0, inversify_binding_decorators_1.fluentProvide)(identifier).inTransientScope().done();
|
|
13
43
|
};
|
package/lib/cjs/index.js
CHANGED
|
@@ -21,5 +21,6 @@ __exportStar(require("./container-module"), exports);
|
|
|
21
21
|
__exportStar(require("./controller"), exports);
|
|
22
22
|
__exportStar(require("./decorator"), exports);
|
|
23
23
|
__exportStar(require("./error"), exports);
|
|
24
|
+
__exportStar(require("./middleware"), exports);
|
|
24
25
|
__exportStar(require("./provider"), exports);
|
|
25
26
|
__exportStar(require("./render"), exports);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Middleware = void 0;
|
|
4
|
+
var middleware_service_1 = require("./middleware-service");
|
|
5
|
+
Object.defineProperty(exports, "Middleware", { enumerable: true, get: function () { return middleware_service_1.Middleware; } });
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.middlewareResolver = void 0;
|
|
4
|
+
const logger_service_1 = require("../provider/logger/logger-service");
|
|
5
|
+
/**
|
|
6
|
+
* MiddlewareResolver class is responsible for resolving and retrieving Express middlewares
|
|
7
|
+
* by their names. It maintains a registry of available middlewares and provides
|
|
8
|
+
* a method to retrieve them by their name. If a middleware is not installed, it logs
|
|
9
|
+
* an informative message.
|
|
10
|
+
*/
|
|
11
|
+
class MiddlewareResolver {
|
|
12
|
+
constructor() {
|
|
13
|
+
/**
|
|
14
|
+
* A registry object mapping middleware names to their corresponding package names.
|
|
15
|
+
* It is used to identify and require the middleware from the current working directory.
|
|
16
|
+
*/
|
|
17
|
+
this.middlewareRegistry = {
|
|
18
|
+
cors: "cors",
|
|
19
|
+
compression: "compression",
|
|
20
|
+
// Add other middlewares
|
|
21
|
+
};
|
|
22
|
+
this.logger = new logger_service_1.Logger();
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves a middleware by its name and optionally configures it with provided options.
|
|
26
|
+
*
|
|
27
|
+
* @param {string} middlewareName - The name of the middleware to be retrieved.
|
|
28
|
+
* @param {...any} options - Optional arguments to configure the middleware.
|
|
29
|
+
* @returns {express.RequestHandler | null} - Returns the configured middleware or null if not found or not installed.
|
|
30
|
+
*/
|
|
31
|
+
getMiddleware(middlewareName, ...options) {
|
|
32
|
+
const packageName = this.middlewareRegistry[middlewareName];
|
|
33
|
+
if (!packageName) {
|
|
34
|
+
console.error(`Middleware ${middlewareName} not found`);
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
let hasMiddleware = "";
|
|
38
|
+
try {
|
|
39
|
+
hasMiddleware = require.resolve(packageName, { paths: [process.cwd()] });
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
this.logger.warn(`Middleware [${middlewareName}] not installed. Please install it using your package manager.`, "middleware-resolver");
|
|
43
|
+
}
|
|
44
|
+
if (hasMiddleware) {
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
46
|
+
const middleware = require(hasMiddleware);
|
|
47
|
+
return middleware(...options) || middleware.default(...options);
|
|
48
|
+
}
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A utility function that wraps the creation and retrieval of middleware.
|
|
54
|
+
* It creates a new instance of MiddlewareResolver and calls the getMiddleware method.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} middleware - The name of the middleware to be retrieved.
|
|
57
|
+
* @param {...any} options - Optional arguments to configure the middleware.
|
|
58
|
+
* @returns {express.RequestHandler | null} - Returns the configured middleware or null if not found or not installed.
|
|
59
|
+
*/
|
|
60
|
+
function middlewareResolver(middleware, ...options) {
|
|
61
|
+
const resolver = new MiddlewareResolver();
|
|
62
|
+
return resolver.getMiddleware(middleware, ...options);
|
|
63
|
+
}
|
|
64
|
+
exports.middlewareResolver = middlewareResolver;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
var Middleware_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.Middleware = void 0;
|
|
14
|
+
const express_1 = __importDefault(require("express"));
|
|
15
|
+
const index_1 = require("../decorator/index");
|
|
16
|
+
const error_handler_middleware_1 = __importDefault(require("../error/error-handler-middleware"));
|
|
17
|
+
const logger_service_1 = require("../provider/logger/logger-service");
|
|
18
|
+
const middleware_resolver_1 = require("./middleware-resolver");
|
|
19
|
+
/**
|
|
20
|
+
* Singleton class that implements the IConfigure interface.
|
|
21
|
+
* Manages the middleware configuration for the application,
|
|
22
|
+
* including adding Body Parser and retrieving all configured middlewares.
|
|
23
|
+
*
|
|
24
|
+
* @see IConfigure
|
|
25
|
+
*/
|
|
26
|
+
let Middleware = Middleware_1 = class Middleware {
|
|
27
|
+
constructor() {
|
|
28
|
+
this.middlewares = [];
|
|
29
|
+
this.logger = new logger_service_1.Logger();
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Checks if a middleware with the given name exists in the middleware collection.
|
|
33
|
+
*
|
|
34
|
+
* @param middlewareName - The name of the middleware to be checked.
|
|
35
|
+
*
|
|
36
|
+
* @returns A boolean value indicating whether the middleware exists or not.
|
|
37
|
+
*/
|
|
38
|
+
middlewareExists(middlewareName) {
|
|
39
|
+
const middlewares = this.getMiddlewares();
|
|
40
|
+
const middlewareIndex = middlewares.findIndex((m) => m.name === middlewareName);
|
|
41
|
+
return middlewareIndex !== -1;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Adds a Body Parser middleware to the middleware collection using the given options.
|
|
45
|
+
*
|
|
46
|
+
* @param options - Optional configuration options for the JSON body parser.
|
|
47
|
+
*/
|
|
48
|
+
addBodyParser(options) {
|
|
49
|
+
const middlewareExist = this.middlewareExists("jsonParser");
|
|
50
|
+
if (middlewareExist) {
|
|
51
|
+
this.logger.warn(`[jsonParser] already exists. Skipping...`, "configure-service");
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
this.middlewares.push(express_1.default.json(options));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Adds Cross-Origin Resource Sharing (CORS) middleware to enable or control cross-origin requests.
|
|
59
|
+
*
|
|
60
|
+
* @param options - Optional configuration options for CORS. Defines the behavior of CORS requests like allowed origins, methods, headers, etc.
|
|
61
|
+
*/
|
|
62
|
+
addCors(options) {
|
|
63
|
+
const middleware = (0, middleware_resolver_1.middlewareResolver)("cors", options);
|
|
64
|
+
const middlewareExist = this.middlewareExists("cors");
|
|
65
|
+
if (middleware && !middlewareExist) {
|
|
66
|
+
this.middlewares.push(middleware);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Adds Compression middleware to reduce the size of the response body and improve the speed of the client-server communication.
|
|
71
|
+
*
|
|
72
|
+
* @param options - Optional configuration options for Compression. Allows fine-tuning the compression behavior, such as setting the compression level, threshold, and filter functions to determine which requests should be compressed.
|
|
73
|
+
*/
|
|
74
|
+
addCompression(options) {
|
|
75
|
+
const middleware = (0, middleware_resolver_1.middlewareResolver)("compression", options);
|
|
76
|
+
const middlewareExist = this.middlewareExists("compression");
|
|
77
|
+
if (middleware && !middlewareExist) {
|
|
78
|
+
this.middlewares.push(middleware);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Configures the error handling middleware for the application.
|
|
83
|
+
*
|
|
84
|
+
* @param errorHandling - The Express error handler function that takes care of processing errors and formulating the response.
|
|
85
|
+
*/
|
|
86
|
+
setErrorHandler(errorHandling) {
|
|
87
|
+
if (!errorHandling) {
|
|
88
|
+
this.errorHandler = error_handler_middleware_1.default;
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
this.errorHandler = errorHandling;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Adds a middleware to serve static files from the specified root directory.
|
|
96
|
+
* Allows the application to serve files like images, CSS, JavaScript, etc.
|
|
97
|
+
*
|
|
98
|
+
* @param root - The root directory from which the static assets are to be served.
|
|
99
|
+
* @param options - Optional configuration options for serving static files. Defines behavior like cache control, custom headers, etc.
|
|
100
|
+
*/
|
|
101
|
+
serveStatic(root, options) {
|
|
102
|
+
const middlewareExist = this.middlewareExists("serveStatic");
|
|
103
|
+
if (middlewareExist) {
|
|
104
|
+
this.logger.warn(`[serveStatic] already exists. Skipping...`, "configure-service");
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
this.middlewares.push(express_1.default.static(root, options));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Adds a middleware to the middleware collection.
|
|
112
|
+
*
|
|
113
|
+
* @param middleware - The Express request handler function to be added to the middleware collection.
|
|
114
|
+
*
|
|
115
|
+
*/
|
|
116
|
+
addMiddleware(middleware) {
|
|
117
|
+
const middlewareExist = this.middlewareExists(middleware.name);
|
|
118
|
+
if (middlewareExist) {
|
|
119
|
+
this.logger.warn(`[${middleware.name}] already exists. Skipping...`, "configure-service");
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
this.middlewares.push(middleware);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Retrieves all the middlewares that have been added to the collection.
|
|
127
|
+
*
|
|
128
|
+
* @returns An array of Express request handlers representing the middlewares.
|
|
129
|
+
*/
|
|
130
|
+
getMiddlewares() {
|
|
131
|
+
return this.middlewares;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Gets the configured error handler middleware.
|
|
135
|
+
*
|
|
136
|
+
* @returns The error handler middleware.
|
|
137
|
+
*/
|
|
138
|
+
getErrorHandler() {
|
|
139
|
+
return this.errorHandler;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
exports.Middleware = Middleware;
|
|
143
|
+
exports.Middleware = Middleware = Middleware_1 = __decorate([
|
|
144
|
+
(0, index_1.provideSingleton)(Middleware_1)
|
|
145
|
+
], Middleware);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ValidateDTO = exports.
|
|
3
|
+
exports.ValidateDTO = exports.Env = exports.Logger = exports.Provider = void 0;
|
|
4
4
|
var provider_service_1 = require("./provider-service");
|
|
5
5
|
Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return provider_service_1.Provider; } });
|
|
6
6
|
var logger_service_1 = require("./logger/logger-service");
|
|
7
7
|
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return logger_service_1.Logger; } });
|
|
8
8
|
var env_validator_provider_1 = require("./environment/env-validator.provider");
|
|
9
|
-
Object.defineProperty(exports, "
|
|
9
|
+
Object.defineProperty(exports, "Env", { enumerable: true, get: function () { return env_validator_provider_1.EnvValidatorProvider; } });
|
|
10
10
|
var dto_validator_provider_1 = require("./dto-validator/dto-validator.provider");
|
|
11
11
|
Object.defineProperty(exports, "ValidateDTO", { enumerable: true, get: function () { return dto_validator_provider_1.ValidateDTO; } });
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import express from "express";
|
|
2
|
+
import { Container } from "inversify";
|
|
3
|
+
import { AppExpress, IApplicationExpress } from "@expressots/adapter-express";
|
|
4
|
+
/**
|
|
5
|
+
* AppFactory Class
|
|
6
|
+
*
|
|
7
|
+
* Responsible for creating an instance of the Application,
|
|
8
|
+
* either using a custom application type or with provided middlewares.
|
|
9
|
+
*/
|
|
10
|
+
declare class AppFactory {
|
|
11
|
+
private static logger;
|
|
12
|
+
/**
|
|
13
|
+
* Creates an instance of the application using a custom application type.
|
|
14
|
+
* @param container - InversifyJS container to resolve dependencies.
|
|
15
|
+
* @param CustomAppType - Custom application class extending Application.
|
|
16
|
+
* @returns Instance of the application.
|
|
17
|
+
*/
|
|
18
|
+
static create(container: Container, CustomAppType: new () => AppExpress, httpServerFactory?: new () => AppExpress): Promise<IApplicationExpress>;
|
|
19
|
+
/**
|
|
20
|
+
* Creates an instance of the application with provided middlewares.
|
|
21
|
+
* @param container - InversifyJS container to resolve dependencies.
|
|
22
|
+
* @param middlewares - Array of Express middlewares to be applied.
|
|
23
|
+
* @returns Instance of the application.
|
|
24
|
+
*/
|
|
25
|
+
static create(container: Container, middlewares: Array<express.RequestHandler>, httpServerFactory?: new () => AppExpress): Promise<AppExpress>;
|
|
26
|
+
/**
|
|
27
|
+
* Checks if the provided parameter is a custom application type.
|
|
28
|
+
* @param appTypeOrMiddlewares - Custom application class or array of middlewares.
|
|
29
|
+
* @returns True if the provided parameter is a custom application type.
|
|
30
|
+
*/
|
|
31
|
+
private static isOpinionated;
|
|
32
|
+
}
|
|
33
|
+
export { AppFactory };
|
|
34
|
+
//# sourceMappingURL=application-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-factory.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/application/application-factory.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAK9E;;;;;GAKG;AACH,cAAM,UAAU;IACd,OAAO,CAAC,MAAM,CAAC,MAAM,CAAwB;IAC7C;;;;;OAKG;WACiB,MAAM,CACxB,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,UAAU,UAAU,EACnC,iBAAiB,CAAC,EAAE,UAAU,UAAU,GACvC,OAAO,CAAC,mBAAmB,CAAC;IAO/B;;;;;OAKG;WACiB,MAAM,CACxB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,EAC1C,iBAAiB,CAAC,EAAE,UAAU,UAAU,GACvC,OAAO,CAAC,UAAU,CAAC;IA+DtB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;CAK7B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/application/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/application/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,31 +1,25 @@
|
|
|
1
1
|
import { Response } from "express";
|
|
2
|
-
import {
|
|
2
|
+
import { Controller } from "@expressots/adapter-express";
|
|
3
3
|
/**
|
|
4
4
|
* The BaseController class is an abstract base class for controllers.
|
|
5
5
|
* It provides methods for handling use case calls and sending appropriate responses.
|
|
6
6
|
* @provide BaseController
|
|
7
7
|
*/
|
|
8
|
-
declare abstract class BaseController implements
|
|
9
|
-
private serviceName;
|
|
10
|
-
/**
|
|
11
|
-
* Constructs a new BaseController instance with a specified service name.
|
|
12
|
-
* @param serviceName - The name of the service associated with the controller.
|
|
13
|
-
*/
|
|
14
|
-
constructor(serviceName?: string);
|
|
8
|
+
declare abstract class BaseController implements Controller {
|
|
15
9
|
/**
|
|
16
10
|
* Calls an asynchronous use case and sends an appropriate response based on the result.
|
|
17
11
|
* @param useCase - A promise representing the asynchronous use case to call.
|
|
18
12
|
* @param res - The Express response object.
|
|
19
13
|
* @param successStatusCode - The HTTP status code to return upon successful execution.
|
|
20
14
|
*/
|
|
21
|
-
protected callUseCaseAsync(useCase: Promise<any>, res:
|
|
15
|
+
protected callUseCaseAsync(useCase: Promise<any>, res: Response, successStatusCode: number): Promise<any>;
|
|
22
16
|
/**
|
|
23
17
|
* Calls a use case and sends an appropriate response based on the result.
|
|
24
18
|
* @param useCase - The use case to call.
|
|
25
19
|
* @param res - The Express response object.
|
|
26
20
|
* @param successStatusCode - The HTTP status code to return upon successful execution.
|
|
27
21
|
*/
|
|
28
|
-
protected callUseCase(useCase: any, res:
|
|
22
|
+
protected callUseCase(useCase: any, res: Response, successStatusCode: number): any;
|
|
29
23
|
/**
|
|
30
24
|
* Synchronously renders a template with the given options using the Express `Response` object's render method.
|
|
31
25
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-controller.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/controller/base-controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-controller.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/controller/base-controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD;;;;GAIG;AACH,uBACe,cAAe,YAAW,UAAU;IACjD;;;;;OAKG;cACa,gBAAgB,CAC9B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EACrB,GAAG,EAAE,QAAQ,EACb,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,GAAG,CAAC;IAIf;;;;;OAKG;IACH,SAAS,CAAC,WAAW,CACnB,OAAO,EAAE,GAAG,EACZ,GAAG,EAAE,QAAQ,EACb,iBAAiB,EAAE,MAAM,GACxB,GAAG;IAIN;;;;;;;;;;OAUG;IACH,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,KAAK,GAAG,IAAI;IAI5E;;;;;;;;;;OAUG;IACH,SAAS,CAAC,kBAAkB,CAC1B,GAAG,EAAE,QAAQ,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,KAAK,GACX,OAAO,CAAC,MAAM,CAAC;CAUnB;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|