@expressots/adapter-express 0.0.1-dev.1 → 1.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/README.md +13 -10
- package/lib/README.md +13 -10
- package/lib/cjs/adapter-express/application-base.js +36 -0
- package/lib/cjs/adapter-express/application-express.js +2 -1
- package/lib/cjs/types/adapter-express/application-base.d.ts +55 -0
- package/lib/cjs/types/adapter-express/application-base.d.ts.map +1 -0
- package/lib/cjs/types/adapter-express/application-express.d.ts +2 -1
- package/lib/cjs/types/adapter-express/application-express.d.ts.map +1 -1
- package/lib/esm/adapter-express/application-base.js +36 -0
- package/lib/esm/adapter-express/application-express.js +2 -1
- package/lib/esm/types/adapter-express/application-base.d.ts +55 -0
- package/lib/esm/types/adapter-express/application-base.d.ts.map +1 -0
- package/lib/esm/types/adapter-express/application-express.d.ts +2 -1
- package/lib/esm/types/adapter-express/application-express.d.ts.map +1 -1
- package/lib/package.json +2 -5
- package/package.json +2 -5
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<a name="readme-top"></a>
|
|
2
2
|
|
|
3
3
|
<!-- PROJECT SHIELDS -->
|
|
4
|
+
|
|
4
5
|
[![Contributors][contributors-shield]][contributors-url]
|
|
5
6
|
[![Forks][forks-shield]][forks-url]
|
|
6
7
|
[![Stargazers][stars-shield]][stars-url]
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
</details>
|
|
45
46
|
|
|
46
47
|
<!-- ABOUT THE PROJECT -->
|
|
48
|
+
|
|
47
49
|
# About The Project
|
|
48
50
|
|
|
49
51
|
ExpressoTS is a [Typescript](https://www.typescriptlang.org/) + [Node.js](https://nodejs.org/en/) lightweight framework for quick building scalable, easy to read and maintain, server-side applications 🐎
|
|
@@ -92,16 +94,17 @@ Distributed under the MIT License. See [`LICENSE.txt`](https://github.com/expres
|
|
|
92
94
|
|
|
93
95
|
<!-- MARKDOWN LINKS & IMAGES -->
|
|
94
96
|
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
|
|
95
|
-
|
|
96
|
-
[contributors-
|
|
97
|
-
[
|
|
98
|
-
[forks-
|
|
99
|
-
[
|
|
100
|
-
[stars-
|
|
101
|
-
[
|
|
102
|
-
[issues-
|
|
103
|
-
[
|
|
104
|
-
[license-
|
|
97
|
+
|
|
98
|
+
[contributors-shield]: https://img.shields.io/github/contributors/expressots/adapter-express?style=for-the-badge
|
|
99
|
+
[contributors-url]: https://github.com/expressots/adapter-express/graphs/contributors
|
|
100
|
+
[forks-shield]: https://img.shields.io/github/forks/expressots/adapter-express?style=for-the-badge
|
|
101
|
+
[forks-url]: https://github.com/expressots/adapter-express/forks
|
|
102
|
+
[stars-shield]: https://img.shields.io/github/stars/expressots/adapter-express?style=for-the-badge
|
|
103
|
+
[stars-url]: https://github.com/expressots/adapter-express/stargazers
|
|
104
|
+
[issues-shield]: https://img.shields.io/github/issues/expressots/adapter-express?style=for-the-badge
|
|
105
|
+
[issues-url]: https://github.com/expressots/expressadapter-expressots/issues
|
|
106
|
+
[license-shield]: https://img.shields.io/github/license/expressots/adapter-express?style=for-the-badge
|
|
107
|
+
[license-url]: https://github.com/expressots/adapter-express/blob/main/LICENSE
|
|
105
108
|
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
|
|
106
109
|
[linkedin-url]: https://www.linkedin.com/company/expresso-ts/
|
|
107
110
|
[product-screenshot]: images/screenshot.png
|
package/lib/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<a name="readme-top"></a>
|
|
2
2
|
|
|
3
3
|
<!-- PROJECT SHIELDS -->
|
|
4
|
+
|
|
4
5
|
[![Contributors][contributors-shield]][contributors-url]
|
|
5
6
|
[![Forks][forks-shield]][forks-url]
|
|
6
7
|
[![Stargazers][stars-shield]][stars-url]
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
</details>
|
|
45
46
|
|
|
46
47
|
<!-- ABOUT THE PROJECT -->
|
|
48
|
+
|
|
47
49
|
# About The Project
|
|
48
50
|
|
|
49
51
|
ExpressoTS is a [Typescript](https://www.typescriptlang.org/) + [Node.js](https://nodejs.org/en/) lightweight framework for quick building scalable, easy to read and maintain, server-side applications 🐎
|
|
@@ -92,16 +94,17 @@ Distributed under the MIT License. See [`LICENSE.txt`](https://github.com/expres
|
|
|
92
94
|
|
|
93
95
|
<!-- MARKDOWN LINKS & IMAGES -->
|
|
94
96
|
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
|
|
95
|
-
|
|
96
|
-
[contributors-
|
|
97
|
-
[
|
|
98
|
-
[forks-
|
|
99
|
-
[
|
|
100
|
-
[stars-
|
|
101
|
-
[
|
|
102
|
-
[issues-
|
|
103
|
-
[
|
|
104
|
-
[license-
|
|
97
|
+
|
|
98
|
+
[contributors-shield]: https://img.shields.io/github/contributors/expressots/adapter-express?style=for-the-badge
|
|
99
|
+
[contributors-url]: https://github.com/expressots/adapter-express/graphs/contributors
|
|
100
|
+
[forks-shield]: https://img.shields.io/github/forks/expressots/adapter-express?style=for-the-badge
|
|
101
|
+
[forks-url]: https://github.com/expressots/adapter-express/forks
|
|
102
|
+
[stars-shield]: https://img.shields.io/github/stars/expressots/adapter-express?style=for-the-badge
|
|
103
|
+
[stars-url]: https://github.com/expressots/adapter-express/stargazers
|
|
104
|
+
[issues-shield]: https://img.shields.io/github/issues/expressots/adapter-express?style=for-the-badge
|
|
105
|
+
[issues-url]: https://github.com/expressots/expressadapter-expressots/issues
|
|
106
|
+
[license-shield]: https://img.shields.io/github/license/expressots/adapter-express?style=for-the-badge
|
|
107
|
+
[license-url]: https://github.com/expressots/adapter-express/blob/main/LICENSE
|
|
105
108
|
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
|
|
106
109
|
[linkedin-url]: https://www.linkedin.com/company/expresso-ts/
|
|
107
110
|
[product-screenshot]: images/screenshot.png
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ApplicationBase = void 0;
|
|
10
|
+
const inversify_binding_decorators_1 = require("inversify-binding-decorators");
|
|
11
|
+
/**
|
|
12
|
+
* Abstract class ApplicationBase.
|
|
13
|
+
*
|
|
14
|
+
* ApplicationBase serves as the foundational structure for building
|
|
15
|
+
* server applications. It declares the lifecycle hooks that allow
|
|
16
|
+
* subclasses to configure services, handle post-server initialization,
|
|
17
|
+
* and perform cleanup when the server is shutting down. Extending
|
|
18
|
+
* classes are required to provide implementations for these methods
|
|
19
|
+
* to define specific behaviors for their particular use cases.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* class Application extends ApplicationBase {
|
|
23
|
+
* protected configureServices() { //... }
|
|
24
|
+
* protected postServerInitialization() { //... }
|
|
25
|
+
* protected serverShutdown() { //... }
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
* @abstract
|
|
30
|
+
*/
|
|
31
|
+
let ApplicationBase = class ApplicationBase {
|
|
32
|
+
};
|
|
33
|
+
exports.ApplicationBase = ApplicationBase;
|
|
34
|
+
exports.ApplicationBase = ApplicationBase = __decorate([
|
|
35
|
+
(0, inversify_binding_decorators_1.provide)(ApplicationBase)
|
|
36
|
+
], ApplicationBase);
|
|
@@ -23,6 +23,7 @@ const inversify_binding_decorators_1 = require("inversify-binding-decorators");
|
|
|
23
23
|
const process_1 = __importDefault(require("process"));
|
|
24
24
|
const core_1 = require("@expressots/core");
|
|
25
25
|
const inversify_express_server_1 = require("./express-utils/inversify-express-server");
|
|
26
|
+
const application_base_1 = require("./application-base");
|
|
26
27
|
/**
|
|
27
28
|
* Enum representing possible server environments.
|
|
28
29
|
*/
|
|
@@ -35,7 +36,7 @@ var ServerEnvironment;
|
|
|
35
36
|
* The Application class provides a way to configure and manage an Express application.
|
|
36
37
|
* @provide Application
|
|
37
38
|
*/
|
|
38
|
-
let ApplicationExpress = class ApplicationExpress extends
|
|
39
|
+
let ApplicationExpress = class ApplicationExpress extends application_base_1.ApplicationBase {
|
|
39
40
|
constructor() {
|
|
40
41
|
super(...arguments);
|
|
41
42
|
this.middlewares = [];
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Abstract class ApplicationBase.
|
|
3
|
+
*
|
|
4
|
+
* ApplicationBase serves as the foundational structure for building
|
|
5
|
+
* server applications. It declares the lifecycle hooks that allow
|
|
6
|
+
* subclasses to configure services, handle post-server initialization,
|
|
7
|
+
* and perform cleanup when the server is shutting down. Extending
|
|
8
|
+
* classes are required to provide implementations for these methods
|
|
9
|
+
* to define specific behaviors for their particular use cases.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* class Application extends ApplicationBase {
|
|
13
|
+
* protected configureServices() { //... }
|
|
14
|
+
* protected postServerInitialization() { //... }
|
|
15
|
+
* protected serverShutdown() { //... }
|
|
16
|
+
* }
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @abstract
|
|
20
|
+
*/
|
|
21
|
+
declare abstract class ApplicationBase {
|
|
22
|
+
/**
|
|
23
|
+
* Method to configure services that should be initialized
|
|
24
|
+
* before the server starts. It must be implemented by the
|
|
25
|
+
* extending class to set up necessary services or configurations.
|
|
26
|
+
* Can return a Promise for async configuration.
|
|
27
|
+
*
|
|
28
|
+
* @abstract
|
|
29
|
+
* @returns {void | Promise<void>}
|
|
30
|
+
*/
|
|
31
|
+
protected abstract configureServices(): void | Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Method to configure services or actions that should be executed
|
|
34
|
+
* after the server starts. It allows the extending class to perform
|
|
35
|
+
* any necessary operations once the server is up and running.
|
|
36
|
+
* Can return a Promise for async execution.
|
|
37
|
+
*
|
|
38
|
+
* @abstract
|
|
39
|
+
* @returns {void | Promise<void>}
|
|
40
|
+
*/
|
|
41
|
+
protected abstract postServerInitialization(): void | Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Method to perform any necessary actions or cleanup after the server
|
|
44
|
+
* is shutting down. This might include closing database connections,
|
|
45
|
+
* stopping background tasks, or other cleanup activities. It provides
|
|
46
|
+
* a clean exit point for the server.
|
|
47
|
+
* Can return a Promise for async cleanup.
|
|
48
|
+
*
|
|
49
|
+
* @abstract
|
|
50
|
+
* @returns {void | Promise<void>}
|
|
51
|
+
*/
|
|
52
|
+
protected abstract serverShutdown(): void | Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
export { ApplicationBase };
|
|
55
|
+
//# sourceMappingURL=application-base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-base.d.ts","sourceRoot":"","sources":["../../../../src/adapter-express/application-base.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,uBACe,eAAe;IAC5B;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,iBAAiB,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAE5D;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,wBAAwB,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAEnE;;;;;;;;;OASG;IACH,SAAS,CAAC,QAAQ,CAAC,cAAc,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAC1D;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import express from "express";
|
|
2
2
|
import { Container } from "inversify";
|
|
3
|
-
import { IApplicationMessageToConsole, RenderTemplateOptions
|
|
3
|
+
import { IApplicationMessageToConsole, RenderTemplateOptions } from "@expressots/core";
|
|
4
4
|
import { IApplicationExpress } from "./application-express.interface";
|
|
5
|
+
import { ApplicationBase } from "./application-base";
|
|
5
6
|
/**
|
|
6
7
|
* Enum representing possible server environments.
|
|
7
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-express.d.ts","sourceRoot":"","sources":["../../../../src/adapter-express/application-express.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,OAAO,EAEL,4BAA4B,EAK5B,qBAAqB,
|
|
1
|
+
{"version":3,"file":"application-express.d.ts","sourceRoot":"","sources":["../../../../src/adapter-express/application-express.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,OAAO,EAEL,4BAA4B,EAK5B,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;GAEG;AACH,aAAK,iBAAiB;IACpB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;CAC1B;AAED;;;GAGG;AACH,cACM,kBAAmB,SAAQ,eAAgB,YAAW,mBAAmB;IAC7E,OAAO,CAAC,GAAG,CAAsB;IACjC,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,WAAW,CAAoB;IACvC,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,WAAW,CAAqC;IAExD,SAAS,CAAC,iBAAiB,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IACnD,SAAS,CAAC,wBAAwB,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC1D,SAAS,CAAC,cAAc,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAEhD;;OAEG;IACH,OAAO,CAAC,UAAU;IAKlB;;;;;OAKG;IACU,MAAM,CACjB,SAAS,EAAE,SAAS,EACpB,WAAW,GAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAM,GAC9C,OAAO,CAAC,kBAAkB,CAAC;IA0B9B;;;;;OAKG;IACU,MAAM,CACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,iBAAiB,EAC9B,cAAc,CAAC,EAAE,4BAA4B,GAC5C,OAAO,CAAC,IAAI,CAAC;IAmBhB;;;;;;;;;;OAUG;IACI,SAAS,CAAC,CAAC,SAAS,qBAAqB,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI;IASnE;;;;OAIG;IACH,SAAS,CAAC,aAAa,IAAI,OAAO;IAWlC;;;;;OAKG;IACH,IAAW,UAAU,IAAI,OAAO,CAAC,WAAW,CAE3C;CACF;AAED,OAAO,EAAE,kBAAkB,IAAI,UAAU,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ApplicationBase = void 0;
|
|
10
|
+
const inversify_binding_decorators_1 = require("inversify-binding-decorators");
|
|
11
|
+
/**
|
|
12
|
+
* Abstract class ApplicationBase.
|
|
13
|
+
*
|
|
14
|
+
* ApplicationBase serves as the foundational structure for building
|
|
15
|
+
* server applications. It declares the lifecycle hooks that allow
|
|
16
|
+
* subclasses to configure services, handle post-server initialization,
|
|
17
|
+
* and perform cleanup when the server is shutting down. Extending
|
|
18
|
+
* classes are required to provide implementations for these methods
|
|
19
|
+
* to define specific behaviors for their particular use cases.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* class Application extends ApplicationBase {
|
|
23
|
+
* protected configureServices() { //... }
|
|
24
|
+
* protected postServerInitialization() { //... }
|
|
25
|
+
* protected serverShutdown() { //... }
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
* @abstract
|
|
30
|
+
*/
|
|
31
|
+
let ApplicationBase = class ApplicationBase {
|
|
32
|
+
};
|
|
33
|
+
exports.ApplicationBase = ApplicationBase;
|
|
34
|
+
exports.ApplicationBase = ApplicationBase = __decorate([
|
|
35
|
+
(0, inversify_binding_decorators_1.provide)(ApplicationBase)
|
|
36
|
+
], ApplicationBase);
|
|
@@ -14,6 +14,7 @@ const inversify_binding_decorators_1 = require("inversify-binding-decorators");
|
|
|
14
14
|
const process_1 = __importDefault(require("process"));
|
|
15
15
|
const core_1 = require("@expressots/core");
|
|
16
16
|
const inversify_express_server_1 = require("./express-utils/inversify-express-server");
|
|
17
|
+
const application_base_1 = require("./application-base");
|
|
17
18
|
/**
|
|
18
19
|
* Enum representing possible server environments.
|
|
19
20
|
*/
|
|
@@ -26,7 +27,7 @@ var ServerEnvironment;
|
|
|
26
27
|
* The Application class provides a way to configure and manage an Express application.
|
|
27
28
|
* @provide Application
|
|
28
29
|
*/
|
|
29
|
-
let ApplicationExpress = class ApplicationExpress extends
|
|
30
|
+
let ApplicationExpress = class ApplicationExpress extends application_base_1.ApplicationBase {
|
|
30
31
|
app;
|
|
31
32
|
port;
|
|
32
33
|
environment;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Abstract class ApplicationBase.
|
|
3
|
+
*
|
|
4
|
+
* ApplicationBase serves as the foundational structure for building
|
|
5
|
+
* server applications. It declares the lifecycle hooks that allow
|
|
6
|
+
* subclasses to configure services, handle post-server initialization,
|
|
7
|
+
* and perform cleanup when the server is shutting down. Extending
|
|
8
|
+
* classes are required to provide implementations for these methods
|
|
9
|
+
* to define specific behaviors for their particular use cases.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* class Application extends ApplicationBase {
|
|
13
|
+
* protected configureServices() { //... }
|
|
14
|
+
* protected postServerInitialization() { //... }
|
|
15
|
+
* protected serverShutdown() { //... }
|
|
16
|
+
* }
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @abstract
|
|
20
|
+
*/
|
|
21
|
+
declare abstract class ApplicationBase {
|
|
22
|
+
/**
|
|
23
|
+
* Method to configure services that should be initialized
|
|
24
|
+
* before the server starts. It must be implemented by the
|
|
25
|
+
* extending class to set up necessary services or configurations.
|
|
26
|
+
* Can return a Promise for async configuration.
|
|
27
|
+
*
|
|
28
|
+
* @abstract
|
|
29
|
+
* @returns {void | Promise<void>}
|
|
30
|
+
*/
|
|
31
|
+
protected abstract configureServices(): void | Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Method to configure services or actions that should be executed
|
|
34
|
+
* after the server starts. It allows the extending class to perform
|
|
35
|
+
* any necessary operations once the server is up and running.
|
|
36
|
+
* Can return a Promise for async execution.
|
|
37
|
+
*
|
|
38
|
+
* @abstract
|
|
39
|
+
* @returns {void | Promise<void>}
|
|
40
|
+
*/
|
|
41
|
+
protected abstract postServerInitialization(): void | Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Method to perform any necessary actions or cleanup after the server
|
|
44
|
+
* is shutting down. This might include closing database connections,
|
|
45
|
+
* stopping background tasks, or other cleanup activities. It provides
|
|
46
|
+
* a clean exit point for the server.
|
|
47
|
+
* Can return a Promise for async cleanup.
|
|
48
|
+
*
|
|
49
|
+
* @abstract
|
|
50
|
+
* @returns {void | Promise<void>}
|
|
51
|
+
*/
|
|
52
|
+
protected abstract serverShutdown(): void | Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
export { ApplicationBase };
|
|
55
|
+
//# sourceMappingURL=application-base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-base.d.ts","sourceRoot":"","sources":["../../../../src/adapter-express/application-base.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,uBACe,eAAe;IAC5B;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,iBAAiB,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAE5D;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,wBAAwB,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAEnE;;;;;;;;;OASG;IACH,SAAS,CAAC,QAAQ,CAAC,cAAc,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAC1D;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import express from "express";
|
|
2
2
|
import { Container } from "inversify";
|
|
3
|
-
import { IApplicationMessageToConsole, RenderTemplateOptions
|
|
3
|
+
import { IApplicationMessageToConsole, RenderTemplateOptions } from "@expressots/core";
|
|
4
4
|
import { IApplicationExpress } from "./application-express.interface";
|
|
5
|
+
import { ApplicationBase } from "./application-base";
|
|
5
6
|
/**
|
|
6
7
|
* Enum representing possible server environments.
|
|
7
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-express.d.ts","sourceRoot":"","sources":["../../../../src/adapter-express/application-express.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,OAAO,EAEL,4BAA4B,EAK5B,qBAAqB,
|
|
1
|
+
{"version":3,"file":"application-express.d.ts","sourceRoot":"","sources":["../../../../src/adapter-express/application-express.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,OAAO,EAEL,4BAA4B,EAK5B,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;GAEG;AACH,aAAK,iBAAiB;IACpB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;CAC1B;AAED;;;GAGG;AACH,cACM,kBAAmB,SAAQ,eAAgB,YAAW,mBAAmB;IAC7E,OAAO,CAAC,GAAG,CAAsB;IACjC,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,WAAW,CAAoB;IACvC,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,WAAW,CAAqC;IAExD,SAAS,CAAC,iBAAiB,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IACnD,SAAS,CAAC,wBAAwB,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC1D,SAAS,CAAC,cAAc,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAEhD;;OAEG;IACH,OAAO,CAAC,UAAU;IAKlB;;;;;OAKG;IACU,MAAM,CACjB,SAAS,EAAE,SAAS,EACpB,WAAW,GAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAM,GAC9C,OAAO,CAAC,kBAAkB,CAAC;IA0B9B;;;;;OAKG;IACU,MAAM,CACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,iBAAiB,EAC9B,cAAc,CAAC,EAAE,4BAA4B,GAC5C,OAAO,CAAC,IAAI,CAAC;IAmBhB;;;;;;;;;;OAUG;IACI,SAAS,CAAC,CAAC,SAAS,qBAAqB,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI;IASnE;;;;OAIG;IACH,SAAS,CAAC,aAAa,IAAI,OAAO;IAWlC;;;;;OAKG;IACH,IAAW,UAAU,IAAI,OAAO,CAAC,WAAW,CAE3C;CACF;AAED,OAAO,EAAE,kBAAkB,IAAI,UAAU,EAAE,iBAAiB,EAAE,CAAC"}
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expressots/adapter-express",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Expressots - modern, fast, lightweight nodejs web framework (@adapter-express)",
|
|
5
5
|
"author": "",
|
|
6
6
|
"main": "./lib/cjs/index.js",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@commitlint/cli": "^17.7.1",
|
|
78
78
|
"@commitlint/config-conventional": "^17.7.0",
|
|
79
|
-
"@expressots/core": "
|
|
79
|
+
"@expressots/core": "^1.9.1",
|
|
80
80
|
"@release-it/conventional-changelog": "^7.0.1",
|
|
81
81
|
"@types/jest": "^29.5.0",
|
|
82
82
|
"@types/node": "^20.4.9",
|
|
@@ -90,9 +90,6 @@
|
|
|
90
90
|
"ts-jest": "^29.0.5",
|
|
91
91
|
"typescript": "^5.2.2"
|
|
92
92
|
},
|
|
93
|
-
"peerDependencies": {
|
|
94
|
-
"@expressots/core": "latest"
|
|
95
|
-
},
|
|
96
93
|
"release-it": {
|
|
97
94
|
"git": {
|
|
98
95
|
"commitMessage": "chore(release): ${version}"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expressots/adapter-express",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Expressots - modern, fast, lightweight nodejs web framework (@adapter-express)",
|
|
5
5
|
"author": "",
|
|
6
6
|
"main": "./lib/cjs/index.js",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@commitlint/cli": "^17.7.1",
|
|
78
78
|
"@commitlint/config-conventional": "^17.7.0",
|
|
79
|
-
"@expressots/core": "
|
|
79
|
+
"@expressots/core": "^1.9.1",
|
|
80
80
|
"@release-it/conventional-changelog": "^7.0.1",
|
|
81
81
|
"@types/jest": "^29.5.0",
|
|
82
82
|
"@types/node": "^20.4.9",
|
|
@@ -90,9 +90,6 @@
|
|
|
90
90
|
"ts-jest": "^29.0.5",
|
|
91
91
|
"typescript": "^5.2.2"
|
|
92
92
|
},
|
|
93
|
-
"peerDependencies": {
|
|
94
|
-
"@expressots/core": "latest"
|
|
95
|
-
},
|
|
96
93
|
"release-it": {
|
|
97
94
|
"git": {
|
|
98
95
|
"commitMessage": "chore(release): ${version}"
|