@wooksjs/event-http 0.3.3 → 0.3.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/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -8
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -836,7 +836,7 @@ class HttpErrorRenderer extends BaseHttpResponseRenderer {
|
|
|
836
836
|
`<head><title>${data.statusCode} ${httpStatusCodes[data.statusCode]}</title></head>` +
|
|
837
837
|
`<body><center><h1>${data.statusCode} ${httpStatusCodes[data.statusCode]}</h1></center>` +
|
|
838
838
|
`<center><h4>${data.message}</h1></center><hr color="#666">` +
|
|
839
|
-
`<center style="color: #666;"> Wooks v${"0.3.
|
|
839
|
+
`<center style="color: #666;"> Wooks v${"0.3.4"} </center>` +
|
|
840
840
|
`${keys.length
|
|
841
841
|
? `<pre style="${preStyles}">${JSON.stringify(Object.assign(Object.assign({}, data), { statusCode: undefined, message: undefined, error: undefined }), null, ' ')}</pre>`
|
|
842
842
|
: ''}` +
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { TConsoleBase } from '@prostojs/logger';
|
|
|
9
9
|
import { TEmpty } from '@wooksjs/event-core';
|
|
10
10
|
import { TEventOptions } from '@wooksjs/event-core';
|
|
11
11
|
import { TGenericContextStore } from '@wooksjs/event-core';
|
|
12
|
+
import { THook } from '@wooksjs/event-core';
|
|
12
13
|
import { TProstoRouterPathHandle } from '@prostojs/router';
|
|
13
14
|
import { TWooksHandler } from 'wooks';
|
|
14
15
|
import { URLSearchParams as URLSearchParams_2 } from 'url';
|
|
@@ -435,9 +436,7 @@ export declare function useRequest(): {
|
|
|
435
436
|
export declare function useResponse(): {
|
|
436
437
|
rawResponse: (options?: TUseResponseOptions) => ServerResponse<IncomingMessage>;
|
|
437
438
|
hasResponded: () => boolean;
|
|
438
|
-
status: ((code?: EHttpStatusCode) => EHttpStatusCode) &
|
|
439
|
-
value?: EHttpStatusCode | undefined;
|
|
440
|
-
};
|
|
439
|
+
status: ((code?: EHttpStatusCode) => EHttpStatusCode) & THook<EHttpStatusCode, "value">;
|
|
441
440
|
};
|
|
442
441
|
|
|
443
442
|
export declare function useSearchParams(): {
|
|
@@ -456,11 +455,7 @@ export declare function useSetCacheControl(): {
|
|
|
456
455
|
export declare function useSetCookie(name: string): {
|
|
457
456
|
name: string;
|
|
458
457
|
type: string;
|
|
459
|
-
} &
|
|
460
|
-
value?: string | undefined;
|
|
461
|
-
} & {
|
|
462
|
-
attrs?: TCookieAttributes | undefined;
|
|
463
|
-
};
|
|
458
|
+
} & THook<string, "value"> & THook<TCookieAttributes, "attrs">;
|
|
464
459
|
|
|
465
460
|
export declare function useSetCookies(): {
|
|
466
461
|
setCookie: (name: string, value: string, attrs?: Partial<TCookieAttributes>) => void;
|
package/dist/index.mjs
CHANGED
|
@@ -834,7 +834,7 @@ class HttpErrorRenderer extends BaseHttpResponseRenderer {
|
|
|
834
834
|
`<head><title>${data.statusCode} ${httpStatusCodes[data.statusCode]}</title></head>` +
|
|
835
835
|
`<body><center><h1>${data.statusCode} ${httpStatusCodes[data.statusCode]}</h1></center>` +
|
|
836
836
|
`<center><h4>${data.message}</h1></center><hr color="#666">` +
|
|
837
|
-
`<center style="color: #666;"> Wooks v${"0.3.
|
|
837
|
+
`<center style="color: #666;"> Wooks v${"0.3.4"} </center>` +
|
|
838
838
|
`${keys.length
|
|
839
839
|
? `<pre style="${preStyles}">${JSON.stringify(Object.assign(Object.assign({}, data), { statusCode: undefined, message: undefined, error: undefined }), null, ' ')}</pre>`
|
|
840
840
|
: ''}` +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wooksjs/event-http",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "@wooksjs/event-http",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"url": "https://github.com/wooksjs/wooksjs/issues"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"wooks": "0.3.
|
|
34
|
+
"wooks": "0.3.4",
|
|
35
35
|
"@prostojs/router": "^0.1.0",
|
|
36
|
-
"@wooksjs/event-core": "0.3.
|
|
36
|
+
"@wooksjs/event-core": "0.3.4"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@prostojs/logger": "^0.3.6"
|