@privateaim/server-http-kit 0.8.12 → 0.8.14
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/CHANGELOG.md +31 -0
- package/dist/middlewares/module.d.ts +2 -2
- package/dist/middlewares/module.d.ts.map +1 -1
- package/dist/middlewares/module.js +1 -1
- package/dist/middlewares/module.js.map +1 -1
- package/dist/middlewares/types.d.ts +1 -1
- package/dist/middlewares/types.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/middlewares/module.ts +5 -2
- package/src/middlewares/types.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.8.14](https://github.com/PrivateAIM/hub/compare/v0.8.13...v0.8.14) (2025-07-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **messenger:** mount default middlewares ([d7ede75](https://github.com/PrivateAIM/hub/commit/d7ede752688b73a43bb9ca99557ffb17e9594cc1))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** bump the minorandpatch group across 1 directory with 19 updates ([#1099](https://github.com/PrivateAIM/hub/issues/1099)) ([30b0ab6](https://github.com/PrivateAIM/hub/commit/30b0ab6b748b287380eb84ac0c8aae4ee22e0be7))
|
|
14
|
+
* **deps:** bump the minorandpatch group across 1 directory with 24 updates ([#1084](https://github.com/PrivateAIM/hub/issues/1084)) ([92a3f43](https://github.com/PrivateAIM/hub/commit/92a3f43eb47795a7fff756939a036f2e771bd3cd))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Dependencies
|
|
18
|
+
|
|
19
|
+
* The following workspace dependencies were updated
|
|
20
|
+
* dependencies
|
|
21
|
+
* @privateaim/kit bumped from ^0.8.13 to ^0.8.14
|
|
22
|
+
* @privateaim/server-kit bumped from ^0.8.13 to ^0.8.14
|
|
23
|
+
|
|
24
|
+
## [0.8.13](https://github.com/PrivateAIM/hub/compare/v0.8.12...v0.8.13) (2025-05-05)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Dependencies
|
|
28
|
+
|
|
29
|
+
* The following workspace dependencies were updated
|
|
30
|
+
* dependencies
|
|
31
|
+
* @privateaim/kit bumped from ^0.8.12 to ^0.8.13
|
|
32
|
+
* @privateaim/server-kit bumped from ^0.8.12 to ^0.8.13
|
|
33
|
+
|
|
3
34
|
## [0.8.12](https://github.com/PrivateAIM/hub/compare/v0.8.11...v0.8.12) (2025-04-25)
|
|
4
35
|
|
|
5
36
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Router } from 'routup';
|
|
2
|
-
import type {
|
|
3
|
-
export declare function mountMiddlewares(router: Router, ctx
|
|
2
|
+
import type { MiddlewareMountOptions } from './types';
|
|
3
|
+
export declare function mountMiddlewares(router: Router, ctx?: MiddlewareMountOptions): void;
|
|
4
4
|
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/middlewares/module.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AASrC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/middlewares/module.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AASrC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD,wBAAgB,gBAAgB,CAC5B,MAAM,EAAE,MAAM,EACd,GAAG,GAAE,sBAA2B,QAmCnC"}
|
|
@@ -15,7 +15,7 @@ const decorators_1 = require("./decorators");
|
|
|
15
15
|
const prometheus_1 = require("./prometheus");
|
|
16
16
|
const rate_limit_1 = require("./rate-limit");
|
|
17
17
|
const swagger_1 = require("./swagger");
|
|
18
|
-
function mountMiddlewares(router, ctx) {
|
|
18
|
+
function mountMiddlewares(router, ctx = {}) {
|
|
19
19
|
ctx.basic ??= true;
|
|
20
20
|
ctx.cors ??= true;
|
|
21
21
|
ctx.prometheus ??= true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/middlewares/module.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAaH,
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/middlewares/module.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAaH,4CAqCC;AA/CD,0CAAoD;AACpD,oCAA4C;AAC5C,mCAA+C;AAC/C,iCAA6C;AAC7C,6CAAyD;AACzD,6CAAyD;AACzD,6CAA0D;AAC1D,uCAAmD;AAGnD,SAAgB,gBAAgB,CAC5B,MAAc,EACd,MAA8B,EAAE;IAEhC,GAAG,CAAC,KAAK,KAAK,IAAI,CAAC;IACnB,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC;IAClB,GAAG,CAAC,UAAU,KAAK,IAAI,CAAC;IACxB,GAAG,CAAC,SAAS,KAAK,IAAI,CAAC;IACvB,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC;IAErB,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;QACX,IAAA,0BAAmB,EAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;QACZ,IAAA,4BAAoB,EAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QACb,IAAA,gCAAqB,EAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC;QACjB,IAAA,sCAAyB,EAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAED,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC;QAChB,IAAA,uCAA0B,EAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAED,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;QACd,IAAA,gCAAsB,EAAC,MAAM,EAAE,IAAA,wBAAgB,EAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;IAClE,CAAC;IAED,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC;QACjB,IAAA,sCAAyB,EAAC,MAAM,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC;AACL,CAAC"}
|
|
@@ -7,7 +7,7 @@ export type MiddlewareSwaggerOptions = {
|
|
|
7
7
|
export type MiddlewareDecoratorsOptions = {
|
|
8
8
|
controllers: (ClassType | Record<string, any>)[];
|
|
9
9
|
};
|
|
10
|
-
export type
|
|
10
|
+
export type MiddlewareMountOptions = {
|
|
11
11
|
options?: MiddlewareSwaggerOptions;
|
|
12
12
|
authup?: AuthupMiddlewareRegistrationOptions;
|
|
13
13
|
basic?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/middlewares/types.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAC;AAEvE,MAAM,MAAM,wBAAwB,GAAG;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACtC,WAAW,EAAE,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,CAAA;CACnD,CAAC;AAEF,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/middlewares/types.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAC;AAEvE,MAAM,MAAM,wBAAwB,GAAG;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACtC,WAAW,EAAE,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,CAAA;CACnD,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACjC,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAEnC,MAAM,CAAC,EAAE,mCAAmC,CAAC;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,2BAA2B,CAAC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC;CAChD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@privateaim/server-http-kit",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.14",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"author": {
|
|
@@ -18,27 +18,27 @@
|
|
|
18
18
|
"@authup/server-adapter-kit": "^1.0.0-beta.26",
|
|
19
19
|
"@authup/server-adapter-http": "^1.0.0-beta.26",
|
|
20
20
|
"@ebec/http": "^2.3.0",
|
|
21
|
-
"@privateaim/kit": "^0.8.
|
|
22
|
-
"@privateaim/server-kit": "^0.8.
|
|
23
|
-
"@routup/basic": "^1.4.
|
|
24
|
-
"@routup/decorators": "^3.4.
|
|
25
|
-
"@routup/prometheus": "^2.4.
|
|
26
|
-
"@routup/rate-limit": "^2.4.
|
|
27
|
-
"@routup/swagger": "^2.4.
|
|
21
|
+
"@privateaim/kit": "^0.8.14",
|
|
22
|
+
"@privateaim/server-kit": "^0.8.14",
|
|
23
|
+
"@routup/basic": "^1.4.2",
|
|
24
|
+
"@routup/decorators": "^3.4.2",
|
|
25
|
+
"@routup/prometheus": "^2.4.1",
|
|
26
|
+
"@routup/rate-limit": "^2.4.1",
|
|
27
|
+
"@routup/swagger": "^2.4.2",
|
|
28
28
|
"cors": "^2.8.5",
|
|
29
|
-
"hapic": "^2.
|
|
29
|
+
"hapic": "^2.7.0",
|
|
30
30
|
"locter": "^2.1.6",
|
|
31
31
|
"validup": "^0.1.8"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@types/cors": "^2.8.
|
|
34
|
+
"@types/cors": "^2.8.19",
|
|
35
35
|
"redis-extension": "^2.0.2",
|
|
36
|
-
"routup": "^4.0.
|
|
36
|
+
"routup": "^4.0.2",
|
|
37
37
|
"typeorm-extension": "^3.7.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"redis-extension": "^2.0.2",
|
|
41
|
-
"routup": "^4.0.
|
|
41
|
+
"routup": "^4.0.2",
|
|
42
42
|
"typeorm-extension": "^3.7.1"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
@@ -14,9 +14,12 @@ import { mountDecoratorsMiddleware } from './decorators';
|
|
|
14
14
|
import { mountPrometheusMiddleware } from './prometheus';
|
|
15
15
|
import { mountRateLimiterMiddleware } from './rate-limit';
|
|
16
16
|
import { mountSwaggerMiddleware } from './swagger';
|
|
17
|
-
import type {
|
|
17
|
+
import type { MiddlewareMountOptions } from './types';
|
|
18
18
|
|
|
19
|
-
export function mountMiddlewares(
|
|
19
|
+
export function mountMiddlewares(
|
|
20
|
+
router: Router,
|
|
21
|
+
ctx: MiddlewareMountOptions = {},
|
|
22
|
+
) {
|
|
20
23
|
ctx.basic ??= true;
|
|
21
24
|
ctx.cors ??= true;
|
|
22
25
|
ctx.prometheus ??= true;
|
package/src/middlewares/types.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type MiddlewareDecoratorsOptions = {
|
|
|
17
17
|
controllers: (ClassType | Record<string, any>)[]
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
export type
|
|
20
|
+
export type MiddlewareMountOptions = {
|
|
21
21
|
options?: MiddlewareSwaggerOptions,
|
|
22
22
|
|
|
23
23
|
authup?: AuthupMiddlewareRegistrationOptions,
|