@expressots/shared 0.3.0 → 3.0.0-beta.4

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 CHANGED
@@ -1,59 +1,64 @@
1
1
 
2
2
 
3
- ## [0.3.0](https://github.com/expressots/shared/compare/0.2.0...0.3.0) (2024-11-24)
3
+ ## [3.0.0](https://github.com/expressots/shared/compare/3.0.0-beta.3...3.0.0) (2024-12-03)
4
4
 
5
5
 
6
6
  ### Features
7
7
 
8
- * add entryPoint property to ExpressoConfig interface ([324ac37](https://github.com/expressots/shared/commit/324ac37a7d407c491881998c6ed3288e04a0ae39))
8
+ * refactor IWebServer interface, add IWebServerBuilder ([9a23fff](https://github.com/expressots/shared/commit/9a23fff1e7de8d3880ed90317ffde1037ef1947b))
9
9
 
10
- ## [0.2.0](https://github.com/expressots/shared/compare/0.1.0...0.2.0) (2024-11-16)
10
+ ## [3.0.0-beta.3](https://github.com/expressots/shared/compare/0.3.0...0.4.0) (2024-11-28)
11
+
12
+ ### Features
13
+
14
+ - add close method to Server interface for graceful shutdown ([7d0cd8f](https://github.com/expressots/shared/commit/7d0cd8f1e05c5fed96e74b01dc715e5c7eb268d0))
11
15
 
16
+ ## [0.3.0](https://github.com/expressots/shared/compare/0.2.0...0.3.0) (2024-11-24)
12
17
 
13
18
  ### Features
14
19
 
15
- * add interfaces for console, middleware, and environment; update index exports ([30d7dbb](https://github.com/expressots/shared/commit/30d7dbb0c24af12e4537f626be816f2f5d8a81a0))
20
+ - add entryPoint property to ExpressoConfig interface ([324ac37](https://github.com/expressots/shared/commit/324ac37a7d407c491881998c6ed3288e04a0ae39))
16
21
 
22
+ ## [0.2.0](https://github.com/expressots/shared/compare/0.1.0...0.2.0) (2024-11-16)
17
23
 
18
- ### Bug Fixes
24
+ ### Features
19
25
 
20
- * standardize quotes in middleware interface file ([6b3f045](https://github.com/expressots/shared/commit/6b3f0459c3ba0bf58d1de920335c6ef7dd438e32))
26
+ - add interfaces for console, middleware, and environment; update index exports ([30d7dbb](https://github.com/expressots/shared/commit/30d7dbb0c24af12e4537f626be816f2f5d8a81a0))
21
27
 
28
+ ### Bug Fixes
29
+
30
+ - standardize quotes in middleware interface file ([6b3f045](https://github.com/expressots/shared/commit/6b3f0459c3ba0bf58d1de920335c6ef7dd438e32))
22
31
 
23
32
  ### Tests
24
33
 
25
- * enhance coverage for configDotenv function and add edge case handling ([58612bd](https://github.com/expressots/shared/commit/58612bd0040b592133bac687cfb29b9c6ece2a94))
26
-
27
- ## 0.1.0 (2024-11-10)
34
+ - enhance coverage for configDotenv function and add edge case handling ([58612bd](https://github.com/expressots/shared/commit/58612bd0040b592133bac687cfb29b9c6ece2a94))
28
35
 
36
+ ## 0.1.0 (2024-11-10)
29
37
 
30
38
  ### Features
31
39
 
32
- * add compiler and package definitions ([8352e66](https://github.com/expressots/shared/commit/8352e663c1a3429c70bbf7588380fe92f547e0a9))
33
- * add early ai unit test generation and code coverage ([7eb5f38](https://github.com/expressots/shared/commit/7eb5f380f6b49ce6316a9749daaa7311fda74f04))
34
- * add env and compiler modules ([f93f6c3](https://github.com/expressots/shared/commit/f93f6c3a719d1a1129112bee4e5e9cf6e42ddd89))
35
- * add global config interface ([cbe2e12](https://github.com/expressots/shared/commit/cbe2e127db006273e9049220fe3ed20b964d697b))
36
- * change to beta version ([4e835ca](https://github.com/expressots/shared/commit/4e835ca58933336bc78d66fb42935bf4d02ec641))
37
- * update readme to include badges ([5995b1a](https://github.com/expressots/shared/commit/5995b1a3eab1481aa4552ca76683c6b16ae0dc60))
38
-
40
+ - add compiler and package definitions ([8352e66](https://github.com/expressots/shared/commit/8352e663c1a3429c70bbf7588380fe92f547e0a9))
41
+ - add early ai unit test generation and code coverage ([7eb5f38](https://github.com/expressots/shared/commit/7eb5f380f6b49ce6316a9749daaa7311fda74f04))
42
+ - add env and compiler modules ([f93f6c3](https://github.com/expressots/shared/commit/f93f6c3a719d1a1129112bee4e5e9cf6e42ddd89))
43
+ - add global config interface ([cbe2e12](https://github.com/expressots/shared/commit/cbe2e127db006273e9049220fe3ed20b964d697b))
44
+ - change to beta version ([4e835ca](https://github.com/expressots/shared/commit/4e835ca58933336bc78d66fb42935bf4d02ec641))
45
+ - update readme to include badges ([5995b1a](https://github.com/expressots/shared/commit/5995b1a3eab1481aa4552ca76683c6b16ae0dc60))
39
46
 
40
47
  ### Bug Fixes
41
48
 
42
- * add express config file for testing ([d7ae7e1](https://github.com/expressots/shared/commit/d7ae7e1d91a73965be89a9f96df4dfdbc67575d4))
43
- * change dependency installation from npm ci to npm install in CI workflow ([6bc1ece](https://github.com/expressots/shared/commit/6bc1ece4da3c9aca717e769a8d2f615058652579))
44
- * remove compiler load lib ([c8f6085](https://github.com/expressots/shared/commit/c8f6085ffdd2af524522174789cfe51203827bbb))
45
- * reorder build and test steps in CI workflow; update Jest config to ignore specific paths ([4500863](https://github.com/expressots/shared/commit/45008637af232929c8c20df24c3cf4d6b56a082e))
46
- * update CI workflow to use npm ci for dependency installation; refine Jest configs ([356c232](https://github.com/expressots/shared/commit/356c232bbfcf6bad7254ee0ab3417fd82f831a9f))
47
- * update package.json to use exact version numbers for dependencies ([7cdd924](https://github.com/expressots/shared/commit/7cdd924b468af56ccf5bdfaa36b7cad82034e007))
48
-
49
+ - add express config file for testing ([d7ae7e1](https://github.com/expressots/shared/commit/d7ae7e1d91a73965be89a9f96df4dfdbc67575d4))
50
+ - change dependency installation from npm ci to npm install in CI workflow ([6bc1ece](https://github.com/expressots/shared/commit/6bc1ece4da3c9aca717e769a8d2f615058652579))
51
+ - remove compiler load lib ([c8f6085](https://github.com/expressots/shared/commit/c8f6085ffdd2af524522174789cfe51203827bbb))
52
+ - reorder build and test steps in CI workflow; update Jest config to ignore specific paths ([4500863](https://github.com/expressots/shared/commit/45008637af232929c8c20df24c3cf4d6b56a082e))
53
+ - update CI workflow to use npm ci for dependency installation; refine Jest configs ([356c232](https://github.com/expressots/shared/commit/356c232bbfcf6bad7254ee0ab3417fd82f831a9f))
54
+ - update package.json to use exact version numbers for dependencies ([7cdd924](https://github.com/expressots/shared/commit/7cdd924b468af56ccf5bdfaa36b7cad82034e007))
49
55
 
50
56
  ### Code Refactoring
51
57
 
52
- * remove unused env property from ExpressoConfig interface ([97663e8](https://github.com/expressots/shared/commit/97663e8a386ece45111eba0c2f8b66d1eb9c90af))
53
-
54
- ## 0.0.1 (2023-09-05)
55
-
56
-
57
- ### Bug Fixes
58
-
59
- * testing commitlint ([0e78653](https://github.com/expressots/<<repo_name>>/commit/0e786539402f69fdca3fe5b684d850e523db7698))
58
+ - remove unused env property from ExpressoConfig interface ([97663e8](https://github.com/expressots/shared/commit/97663e8a386ece45111eba0c2f8b66d1eb9c90af))
59
+
60
+ ## 0.0.1 (2023-09-05)
61
+
62
+ ### Bug Fixes
63
+
64
+ - testing commitlint ([0e78653](https://github.com/expressots/<<repo_name>>/commit/0e786539402f69fdca3fe5b684d850e523db7698))
@@ -1,6 +1,6 @@
1
- import express from "express";
2
- import { Environment, IEnvironment } from "./environment.interface";
1
+ import { Server as HTTPServer } from "http";
3
2
  import { IConsoleMessage } from "./console.interface";
3
+ import { Environment, IEnvironment } from "./environment.interface";
4
4
  import { RenderEngine } from "./render/render.types";
5
5
  /**
6
6
  * Namespace for the Server Application.
@@ -13,7 +13,7 @@ export declare namespace Server {
13
13
  */
14
14
  interface IWebServer {
15
15
  initEnvironment(environment: Environment, options?: IEnvironment): void;
16
- listen(port: number | string, appInfo?: IConsoleMessage): Promise<void>;
16
+ listen(port: number | string, appInfo?: IConsoleMessage): Promise<IWebServerPublic>;
17
17
  setEngine<T extends RenderEngine.EngineOptions>(engine: RenderEngine.Engine, options?: T): Promise<void>;
18
18
  }
19
19
  /**
@@ -23,24 +23,31 @@ export declare namespace Server {
23
23
  new (): T;
24
24
  }
25
25
  /**
26
- * Public Interface for the WebServer application.
26
+ * Interface for the WebServerBuilder.
27
27
  * @public API
28
28
  */
29
- interface IWebServerPublic {
29
+ interface IWebServerBuilder {
30
30
  /**
31
31
  * Start listening on the given port.
32
32
  * @param port - The port number to listen on.
33
33
  * @param consoleMessage - Optional App info message to display on startup.
34
34
  */
35
- listen(port: number | string, consoleMessage?: IConsoleMessage): Promise<void>;
35
+ listen(port: number | string, consoleMessage?: IConsoleMessage): Promise<IWebServerPublic>;
36
+ }
37
+ /**
38
+ * Public Interface for the WebServer application.
39
+ * @public API
40
+ */
41
+ interface IWebServerPublic {
36
42
  /**
37
43
  * Get the underlying HTTP server. (default: Express.js)
38
44
  * @returns The underlying HTTP server after initialization.
39
45
  * @public API
40
46
  */
41
- getHttpServer(): Promise<express.Application>;
47
+ getHttpServer(): Promise<HTTPServer>;
42
48
  }
43
49
  }
44
50
  export type IWebServer = Server.IWebServer;
45
51
  export type IWebServerConstructor<T extends IWebServer> = Server.IWebServerConstructor<T>;
52
+ export type IWebServerBuilder = Server.IWebServerBuilder;
46
53
  export type IWebServerPublic = Server.IWebServerPublic;
@@ -2,4 +2,4 @@ export { RenderEngine } from "./render/render.types";
2
2
  export { IConsoleMessage } from "./console.interface";
3
3
  export { IExpressoMiddleware } from "./middleware.interface";
4
4
  export { Environment, IEnvironment, Env } from "./environment.interface";
5
- export { IWebServer, IWebServerConstructor, IWebServerPublic, Server, } from "./application-express.interface";
5
+ export { IWebServer, IWebServerBuilder, IWebServerConstructor, IWebServerPublic, Server, } from "./application-express.interface";
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expressots/shared",
3
- "version": "0.3.0",
3
+ "version": "3.0.0-beta.4",
4
4
  "description": "Shared library for ExpressoTS modules 🐎",
5
5
  "author": "Richard Zampieri <richard.zampieri@expresso-ts.com>",
6
6
  "main": "./lib/cjs/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expressots/shared",
3
- "version": "0.3.0",
3
+ "version": "3.0.0-beta.4",
4
4
  "description": "Shared library for ExpressoTS modules 🐎",
5
5
  "author": "Richard Zampieri <richard.zampieri@expresso-ts.com>",
6
6
  "main": "./lib/cjs/index.js",