@expressots/core 2.12.0 → 2.14.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 CHANGED
@@ -1,5 +1,41 @@
1
1
 
2
2
 
3
+ ## [2.14.0](https://github.com/expressots/expressots/compare/2.13.0...2.14.0) (2024-07-04)
4
+
5
+
6
+ ### Features
7
+
8
+ * bump @types/node from 20.12.7 to 20.14.9 ([ca36368](https://github.com/expressots/expressots/commit/ca3636841c54ff43968e40f8005b35a262920d50))
9
+ * bump @typescript-eslint/eslint-plugin from 7.6.0 to 7.15.0 ([3255f6a](https://github.com/expressots/expressots/commit/3255f6ae16279afa35f49585c8f223f2e88c4de9))
10
+ * bump @typescript-eslint/parser from 7.6.0 to 7.15.0 ([3ac1c8c](https://github.com/expressots/expressots/commit/3ac1c8c478eb2695062ff590ef0773d276eeebaf))
11
+ * bump prettier from 3.3.1 to 3.3.2 ([56c3299](https://github.com/expressots/expressots/commit/56c329900954002d58feb0572ae6dd8f3c12b0ab))
12
+ * bump release-it and @release-it/conventional-changelog ([c68612f](https://github.com/expressots/expressots/commit/c68612fffbe1afe5586127a74a85607de7a63cb0))
13
+ * bump typescript from 5.2.2 to 5.5.3 ([ee338de](https://github.com/expressots/expressots/commit/ee338de2e7c8da77f5bd39afc42a438be708744a))
14
+ * bump vite from 5.2.8 to 5.3.3 ([0299602](https://github.com/expressots/expressots/commit/02996021fec87041dfbeee187a8f77bf3aadcd13))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * engine bump & husky init script ([57d0549](https://github.com/expressots/expressots/commit/57d0549e4e93dd18b94bb182c29ad487963d0131))
20
+
21
+
22
+ ### Code Refactoring
23
+
24
+ * [@provide](https://github.com/provide) is available through core ([6c315e4](https://github.com/expressots/expressots/commit/6c315e4ca68eb079f09d6e4a5b0f689f9bbf810c))
25
+ * add test to validate the decorator [@provide](https://github.com/provide) ([e4981c4](https://github.com/expressots/expressots/commit/e4981c44e63197cf812f4d4f3fb010bc7f0c2e4a))
26
+
27
+ ## [2.13.0](https://github.com/expressots/expressots/compare/2.12.0...2.13.0) (2024-06-11)
28
+
29
+
30
+ ### Features
31
+
32
+ * bump prettier from 3.3.0 to 3.3.1 ([90ff872](https://github.com/expressots/expressots/commit/90ff8725e2bba2e72d76d1b9288510dd5434bd0b))
33
+
34
+
35
+ ### Code Refactoring
36
+
37
+ * update adapter-express to latest ([3905e9a](https://github.com/expressots/expressots/commit/3905e9a60ddc5b12df13a0b61e9e82e0ee74df9b))
38
+
3
39
  ## [2.12.0](https://github.com/expressots/expressots/compare/2.11.0...2.12.0) (2024-06-07)
4
40
 
5
41
 
@@ -610,4 +646,4 @@
610
646
 
611
647
  ### Bug Fixes
612
648
 
613
- - fix pipeline for tag name ([b9ec52d](https://github.com/expressots/expressots/commit/b9ec52dc065763185f69364d8f083b1a95fa37e0))
649
+ - fix pipeline for tag name ([b9ec52d](https://github.com/expressots/expressots/commit/b9ec52dc065763185f69364d8f083b1a95fa37e0))
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.packageResolver = void 0;
3
+ exports.packageResolver = packageResolver;
4
4
  /* eslint-disable @typescript-eslint/no-explicit-any */
5
5
  const logger_provider_1 = require("../provider/logger/logger.provider");
6
6
  /**
@@ -32,4 +32,3 @@ function packageResolver(packageName, ...options) {
32
32
  logger.warn(`Package [${packageName}] not installed. Please install it using your package manager.`, "package-resolver");
33
33
  }
34
34
  }
35
- exports.packageResolver = packageResolver;
@@ -1,9 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.provideTransient = exports.provideSingleton = void 0;
3
+ exports.provideTransient = exports.provideSingleton = exports.provide = 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 binding for the given identifier.
9
+ *
10
+ * @param identifier - The identifier (e.g., symbol, string, class) for the dependency being registered.
11
+ * @returns A fluent interface for further configuring the binding.
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * @provide(ServiceIdentifier)
16
+ * class MyService {}
17
+ * ```
18
+ */
19
+ const provide = (identifier) => {
20
+ return (0, inversify_binding_decorators_1.fluentProvide)(identifier).done();
21
+ };
22
+ exports.provide = provide;
7
23
  /**
8
24
  * Provides a singleton binding for the given identifier.
9
25
  *
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.middlewareResolver = void 0;
3
+ exports.middlewareResolver = middlewareResolver;
4
4
  const logger_provider_1 = require("../provider/logger/logger.provider");
5
5
  /**
6
6
  * MiddlewareResolver class is responsible for resolving and retrieving Express middlewares
@@ -69,4 +69,3 @@ function middlewareResolver(middleware, ...options) {
69
69
  const resolver = new MiddlewareResolver();
70
70
  return resolver.getMiddleware(middleware, ...options);
71
71
  }
72
- exports.middlewareResolver = middlewareResolver;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ValidateDTO = void 0;
3
+ exports.ValidateDTO = ValidateDTO;
4
4
  require("reflect-metadata");
5
5
  const status_code_1 = require("../../error/status-code");
6
6
  const package_resolver_1 = require("../../common/package-resolver");
@@ -50,4 +50,3 @@ function ValidateDTO(type) {
50
50
  }
51
51
  };
52
52
  }
53
- exports.ValidateDTO = ValidateDTO;
@@ -1,3 +1,16 @@
1
+ /**
2
+ * Provides a binding for the given identifier.
3
+ *
4
+ * @param identifier - The identifier (e.g., symbol, string, class) for the dependency being registered.
5
+ * @returns A fluent interface for further configuring the binding.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * @provide(ServiceIdentifier)
10
+ * class MyService {}
11
+ * ```
12
+ */
13
+ declare const provide: (identifier: any) => (target: any) => any;
1
14
  /**
2
15
  * Provides a singleton binding for the given identifier.
3
16
  *
@@ -30,4 +43,4 @@ declare const provideSingleton: (identifier: any) => (target: any) => any;
30
43
  * ```
31
44
  */
32
45
  declare const provideTransient: (identifier: any) => (target: any) => any;
33
- export { provideSingleton, provideTransient };
46
+ export { provide, provideSingleton, provideTransient };
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import * as http from "http";
4
2
  interface OptionsJson {
5
3
  /** When set to true, then deflated (compressed) bodies will be inflated; when false, deflated bodies are rejected. Defaults to true. */
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import http from "http";
3
2
  export interface StreamOptions {
4
3
  /**
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { RequestHandler } from "express";
4
2
  import { Readable } from "stream";
5
3
  declare global {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import http from "http";
3
2
  interface ServeStaticOptions<R extends http.ServerResponse = http.ServerResponse> {
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import express, { Request, Response, NextFunction } from "express";
3
2
  import { OptionsJson } from "./interfaces/body-parser.interface";
4
3
  import { CompressionOptions } from "./interfaces/compression.interface";
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expressots/core",
3
- "version": "2.12.0",
3
+ "version": "2.14.0",
4
4
  "description": "Expressots - modern, fast, lightweight nodejs web framework (@core)",
5
5
  "author": "Richard Zampieri",
6
6
  "main": "./lib/cjs/index.js",
@@ -47,10 +47,10 @@
47
47
  "server-side"
48
48
  ],
49
49
  "engines": {
50
- "node": ">=18.10.0"
50
+ "node": ">=18.18.0"
51
51
  },
52
52
  "scripts": {
53
- "prepare": "husky install",
53
+ "prepare": "husky",
54
54
  "clean": "node scripts/rm.js lib",
55
55
  "copy": "node scripts/copy.js package.json README.md CHANGELOG.md lib",
56
56
  "rename:esm": "node scripts/mv.js lib/esm/index.js lib/esm/index.mjs",
@@ -76,20 +76,20 @@
76
76
  "@codecov/vite-plugin": "^0.0.1-beta.5",
77
77
  "@commitlint/cli": "19.2.1",
78
78
  "@commitlint/config-conventional": "19.1.0",
79
- "@expressots/adapter-express": "1.4.0",
80
- "@release-it/conventional-changelog": "7.0.2",
79
+ "@expressots/adapter-express": "latest",
80
+ "@release-it/conventional-changelog": "8.0.1",
81
81
  "@types/express": "4.17.21",
82
- "@types/node": "20.12.7",
83
- "@typescript-eslint/eslint-plugin": "7.6.0",
84
- "@typescript-eslint/parser": "7.6.0",
82
+ "@types/node": "20.14.9",
83
+ "@typescript-eslint/eslint-plugin": "7.15.0",
84
+ "@typescript-eslint/parser": "7.15.0",
85
85
  "@vitest/coverage-v8": "1.4.0",
86
86
  "eslint": "8.57.0",
87
87
  "eslint-config-prettier": "9.1.0",
88
88
  "husky": "9.0.11",
89
- "prettier": "3.3.0",
90
- "release-it": "16.3.0",
91
- "typescript": "5.2.2",
92
- "vite": "5.2.8",
89
+ "prettier": "3.3.2",
90
+ "release-it": "17.4.1",
91
+ "typescript": "5.5.3",
92
+ "vite": "5.3.3",
93
93
  "vite-tsconfig-paths": "4.3.2",
94
94
  "vitest": "1.4.0"
95
95
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expressots/core",
3
- "version": "2.12.0",
3
+ "version": "2.14.0",
4
4
  "description": "Expressots - modern, fast, lightweight nodejs web framework (@core)",
5
5
  "author": "Richard Zampieri",
6
6
  "main": "./lib/cjs/index.js",
@@ -47,10 +47,10 @@
47
47
  "server-side"
48
48
  ],
49
49
  "engines": {
50
- "node": ">=18.10.0"
50
+ "node": ">=18.18.0"
51
51
  },
52
52
  "scripts": {
53
- "prepare": "husky install",
53
+ "prepare": "husky",
54
54
  "clean": "node scripts/rm.js lib",
55
55
  "copy": "node scripts/copy.js package.json README.md CHANGELOG.md lib",
56
56
  "rename:esm": "node scripts/mv.js lib/esm/index.js lib/esm/index.mjs",
@@ -76,20 +76,20 @@
76
76
  "@codecov/vite-plugin": "^0.0.1-beta.5",
77
77
  "@commitlint/cli": "19.2.1",
78
78
  "@commitlint/config-conventional": "19.1.0",
79
- "@expressots/adapter-express": "1.4.0",
80
- "@release-it/conventional-changelog": "7.0.2",
79
+ "@expressots/adapter-express": "latest",
80
+ "@release-it/conventional-changelog": "8.0.1",
81
81
  "@types/express": "4.17.21",
82
- "@types/node": "20.12.7",
83
- "@typescript-eslint/eslint-plugin": "7.6.0",
84
- "@typescript-eslint/parser": "7.6.0",
82
+ "@types/node": "20.14.9",
83
+ "@typescript-eslint/eslint-plugin": "7.15.0",
84
+ "@typescript-eslint/parser": "7.15.0",
85
85
  "@vitest/coverage-v8": "1.4.0",
86
86
  "eslint": "8.57.0",
87
87
  "eslint-config-prettier": "9.1.0",
88
88
  "husky": "9.0.11",
89
- "prettier": "3.3.0",
90
- "release-it": "16.3.0",
91
- "typescript": "5.2.2",
92
- "vite": "5.2.8",
89
+ "prettier": "3.3.2",
90
+ "release-it": "17.4.1",
91
+ "typescript": "5.5.3",
92
+ "vite": "5.3.3",
93
93
  "vite-tsconfig-paths": "4.3.2",
94
94
  "vitest": "1.4.0"
95
95
  },