@moostjs/event-http 0.6.4 → 0.6.6
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/dist/index.cjs +2 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.mjs +2 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -662,6 +662,7 @@ const CONTEXT_TYPE = "HTTP";
|
|
|
662
662
|
raw.on("end", unscope);
|
|
663
663
|
} },
|
|
664
664
|
targetPath,
|
|
665
|
+
controllerPrefix: opts.prefix,
|
|
665
666
|
handlerType: handler.type
|
|
666
667
|
});
|
|
667
668
|
const routerBinding = handler.method === "UPGRADE" ? this.httpApp.upgrade(targetPath, fn) : this.httpApp.on(handler.method, targetPath, fn);
|
|
@@ -694,7 +695,7 @@ const CONTEXT_TYPE = "HTTP";
|
|
|
694
695
|
image: "https://moost.org/moost-full-logo.svg",
|
|
695
696
|
link: "https://moost.org/",
|
|
696
697
|
poweredBy: "moostjs",
|
|
697
|
-
version: "0.6.
|
|
698
|
+
version: "0.6.5"
|
|
698
699
|
});
|
|
699
700
|
if (httpApp && httpApp instanceof __wooksjs_event_http.WooksHttp) this.httpApp = httpApp;
|
|
700
701
|
else if (httpApp) this.httpApp = (0, __wooksjs_event_http.createHttpApp)({
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,7 @@ import * as moost from 'moost';
|
|
|
2
2
|
import { TInterceptorPriority, TOvertakeFn, TInterceptorDef, TClassConstructor, TMoostAdapter, Moost, TConsoleBase, TMoostAdapterOptions } from 'moost';
|
|
3
3
|
import { TCookieAttributes as TCookieAttributes$1, TCookieAttributesInput, WooksHttp, TWooksHttpOptions } from '@wooksjs/event-http';
|
|
4
4
|
export { HttpError, TCacheControl, TCookieAttributesInput, TSetCookieData, httpKind, useHttpContext } from '@wooksjs/event-http';
|
|
5
|
-
import
|
|
6
|
-
import { TProstoRouterPathBuilder } from '@prostojs/router';
|
|
5
|
+
import { IncomingMessage, ServerResponse } from 'http';
|
|
7
6
|
import { ListenOptions } from 'net';
|
|
8
7
|
|
|
9
8
|
/** Bearer token transport configuration for auth guards. */
|
|
@@ -365,6 +364,7 @@ declare const CompressedBodySizeLimit: (n: number) => ClassDecorator & MethodDec
|
|
|
365
364
|
*/
|
|
366
365
|
declare const BodyReadTimeoutMs: (n: number) => ClassDecorator & MethodDecorator;
|
|
367
366
|
|
|
367
|
+
type TPathBuilder<ParamsType = Record<string, string | string[]>> = (params?: ParamsType) => string;
|
|
368
368
|
/** Handler metadata for HTTP events, carrying the HTTP method and route path. */
|
|
369
369
|
interface THttpHandlerMeta {
|
|
370
370
|
method: string;
|
|
@@ -400,7 +400,7 @@ declare class MoostHttp implements TMoostAdapter<THttpHandlerMeta> {
|
|
|
400
400
|
protected httpApp: WooksHttp;
|
|
401
401
|
constructor(httpApp?: WooksHttp | TWooksHttpOptions);
|
|
402
402
|
getHttpApp(): WooksHttp;
|
|
403
|
-
getServerCb(onNoMatch?: (req:
|
|
403
|
+
getServerCb(onNoMatch?: (req: IncomingMessage, res: ServerResponse) => void): (req: IncomingMessage, res: ServerResponse) => void;
|
|
404
404
|
/**
|
|
405
405
|
* Programmatic route invocation using the Web Standard fetch API.
|
|
406
406
|
* Goes through the full Moost pipeline: DI scoping, interceptors,
|
|
@@ -428,11 +428,11 @@ declare class MoostHttp implements TMoostAdapter<THttpHandlerMeta> {
|
|
|
428
428
|
listen(handle: any, backlog?: number, listeningListener?: () => void): Promise<void>;
|
|
429
429
|
listen(handle: any, listeningListener?: () => void): Promise<void>;
|
|
430
430
|
readonly pathBuilders: Record<string, {
|
|
431
|
-
GET?:
|
|
432
|
-
PUT?:
|
|
433
|
-
PATCH?:
|
|
434
|
-
POST?:
|
|
435
|
-
DELETE?:
|
|
431
|
+
GET?: TPathBuilder;
|
|
432
|
+
PUT?: TPathBuilder;
|
|
433
|
+
PATCH?: TPathBuilder;
|
|
434
|
+
POST?: TPathBuilder;
|
|
435
|
+
DELETE?: TPathBuilder;
|
|
436
436
|
}>;
|
|
437
437
|
onNotFound(): Promise<unknown>;
|
|
438
438
|
protected moost?: Moost;
|
package/dist/index.mjs
CHANGED
|
@@ -639,6 +639,7 @@ const CONTEXT_TYPE = "HTTP";
|
|
|
639
639
|
raw.on("end", unscope);
|
|
640
640
|
} },
|
|
641
641
|
targetPath,
|
|
642
|
+
controllerPrefix: opts.prefix,
|
|
642
643
|
handlerType: handler.type
|
|
643
644
|
});
|
|
644
645
|
const routerBinding = handler.method === "UPGRADE" ? this.httpApp.upgrade(targetPath, fn) : this.httpApp.on(handler.method, targetPath, fn);
|
|
@@ -671,7 +672,7 @@ const CONTEXT_TYPE = "HTTP";
|
|
|
671
672
|
image: "https://moost.org/moost-full-logo.svg",
|
|
672
673
|
link: "https://moost.org/",
|
|
673
674
|
poweredBy: "moostjs",
|
|
674
|
-
version: "0.6.
|
|
675
|
+
version: "0.6.5"
|
|
675
676
|
});
|
|
676
677
|
if (httpApp && httpApp instanceof WooksHttp) this.httpApp = httpApp;
|
|
677
678
|
else if (httpApp) this.httpApp = createHttpApp({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moostjs/event-http",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"description": "@moostjs/event-http",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"composables",
|
|
@@ -43,16 +43,16 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@wooksjs/event-http": "^0.7.
|
|
47
|
-
"@wooksjs/http-body": "^0.7.
|
|
46
|
+
"@wooksjs/event-http": "^0.7.8",
|
|
47
|
+
"@wooksjs/http-body": "^0.7.8"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"vitest": "3.2.4"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@prostojs/infact": "^0.4.1",
|
|
54
|
-
"@wooksjs/event-core": "^0.7.
|
|
55
|
-
"moost": "^0.6.
|
|
54
|
+
"@wooksjs/event-core": "^0.7.8",
|
|
55
|
+
"moost": "^0.6.6"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"pub": "pnpm publish --access public",
|