@webiny/handler 5.40.5-beta.0 → 5.41.0-dbt.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/Context.d.ts +1 -1
- package/ResponseHeaders.d.ts +5 -5
- package/package.json +10 -10
- package/plugins/HandlerOnRequestPlugin.d.ts +1 -1
- package/types.d.ts +4 -4
package/Context.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare class Context extends BaseContext implements ContextInterface {
|
|
|
15
15
|
*
|
|
16
16
|
* This can be removed when we introduce the type augmentation.
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export type ContextPluginCallable<T extends ContextInterface = ContextInterface> = BaseContextPluginCallable<T>;
|
|
19
19
|
export declare class ContextPlugin<T extends ContextInterface = ContextInterface> extends BaseContextPlugin<T> {
|
|
20
20
|
}
|
|
21
21
|
export declare const createContextPlugin: <T extends ContextInterface = ContextInterface>(callable: ContextPluginCallable<T>) => BaseContextPlugin<T>;
|
package/ResponseHeaders.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import * as http from "http";
|
|
3
|
-
|
|
3
|
+
type ExtraHeaders = {
|
|
4
4
|
"content-type"?: string | undefined;
|
|
5
5
|
"x-webiny-version"?: http.OutgoingHttpHeader | undefined;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
export
|
|
7
|
+
type AllHeaders = http.OutgoingHttpHeaders & ExtraHeaders;
|
|
8
|
+
export type StandardHeaderValue = http.OutgoingHttpHeader | boolean | undefined;
|
|
9
|
+
export type StandardHeaders = {
|
|
10
10
|
[K in keyof AllHeaders as string extends K ? never : number extends K ? never : K]: http.OutgoingHttpHeaders[K];
|
|
11
11
|
} & {
|
|
12
12
|
[name: string]: StandardHeaderValue;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
type Setter<T> = ((value: T) => T) | T;
|
|
15
15
|
export declare class ResponseHeaders {
|
|
16
16
|
private readonly headers;
|
|
17
17
|
private constructor();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/handler",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.41.0-dbt.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"@babel/runtime": "7.24.1",
|
|
16
16
|
"@fastify/compress": "6.2.0",
|
|
17
17
|
"@fastify/cookie": "8.3.0",
|
|
18
|
-
"@webiny/api": "5.
|
|
19
|
-
"@webiny/error": "5.
|
|
20
|
-
"@webiny/handler-client": "5.
|
|
21
|
-
"@webiny/plugins": "5.
|
|
22
|
-
"@webiny/utils": "5.
|
|
18
|
+
"@webiny/api": "5.41.0-dbt.0",
|
|
19
|
+
"@webiny/error": "5.41.0-dbt.0",
|
|
20
|
+
"@webiny/handler-client": "5.41.0-dbt.0",
|
|
21
|
+
"@webiny/plugins": "5.41.0-dbt.0",
|
|
22
|
+
"@webiny/utils": "5.41.0-dbt.0",
|
|
23
23
|
"fastify": "4.11.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"@babel/core": "7.24.3",
|
|
28
28
|
"@babel/preset-env": "7.24.3",
|
|
29
29
|
"@babel/preset-typescript": "7.24.1",
|
|
30
|
-
"@webiny/cli": "5.
|
|
31
|
-
"@webiny/project-utils": "5.
|
|
30
|
+
"@webiny/cli": "5.41.0-dbt.0",
|
|
31
|
+
"@webiny/project-utils": "5.41.0-dbt.0",
|
|
32
32
|
"rimraf": "5.0.5",
|
|
33
33
|
"ttypescript": "1.5.15",
|
|
34
|
-
"typescript": "4.
|
|
34
|
+
"typescript": "4.9.5"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"build": "yarn webiny run build",
|
|
42
42
|
"watch": "yarn webiny run watch"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "bbaec4dd1685579548c08bbde386aee5d96b80f8"
|
|
45
45
|
}
|
|
@@ -6,7 +6,7 @@ import { FastifyReply, FastifyRequest } from "fastify";
|
|
|
6
6
|
*
|
|
7
7
|
* This way users can prevent stopping of the request on our built-in OPTIONS request.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type HandlerOnRequestPluginCallableResponse = false | undefined | null | void;
|
|
10
10
|
interface HandlerOnRequestPluginCallable {
|
|
11
11
|
(request: FastifyRequest, reply: FastifyReply): Promise<HandlerOnRequestPluginCallableResponse>;
|
|
12
12
|
}
|
package/types.d.ts
CHANGED
|
@@ -5,13 +5,13 @@ import { ClientContext } from "@webiny/handler-client/types";
|
|
|
5
5
|
export interface RouteMethodOptions {
|
|
6
6
|
override?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type RouteMethodPath = `/${string}` | "*";
|
|
9
9
|
export interface RouteMethod {
|
|
10
10
|
(path: RouteMethodPath, handler: RouteHandlerMethod, options?: RouteMethodOptions): void;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
12
|
+
export type Request = FastifyRequest;
|
|
13
|
+
export type Reply = FastifyReply;
|
|
14
|
+
export type DefinedContextRoutes = Record<HTTPMethods, string[]>;
|
|
15
15
|
export interface ContextRoutes {
|
|
16
16
|
defined: DefinedContextRoutes;
|
|
17
17
|
onGet: RouteMethod;
|