@fedify/h3 2.0.1 → 2.0.2-dev.407

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.d.cts CHANGED
@@ -4,30 +4,30 @@ import { EventHandler, EventHandlerRequest, EventHandlerResponse, H3Error, H3Eve
4
4
  //#region src/index.d.ts
5
5
 
6
6
  /**
7
- * A factory function that creates the context data that will be passed to the
8
- * `Federation` instance.
9
- * @template TContextData The type of the context data that will be passed to
10
- * the `Federation` instance.
11
- * @param event The event that triggered the handler.
12
- * @param request The request that triggered the handler.
13
- * @returns The context data that will be passed to the `Federation` instance.
14
- * This can be a promise that resolves to the context data.
15
- */
7
+ * A factory function that creates the context data that will be passed to the
8
+ * `Federation` instance.
9
+ * @template TContextData The type of the context data that will be passed to
10
+ * the `Federation` instance.
11
+ * @param event The event that triggered the handler.
12
+ * @param request The request that triggered the handler.
13
+ * @returns The context data that will be passed to the `Federation` instance.
14
+ * This can be a promise that resolves to the context data.
15
+ */
16
16
  type ContextDataFactory<TContextData> = (event: H3Event<EventHandlerRequest>, request: Request) => Promise<TContextData> | TContextData;
17
17
  /**
18
- * Integrates a `Federation` instance with an H3 handler.
19
- * @param federation
20
- * @param contextDataFactory
21
- * @returns
22
- */
18
+ * Integrates a `Federation` instance with an H3 handler.
19
+ * @param federation
20
+ * @param contextDataFactory
21
+ * @returns
22
+ */
23
23
  declare function integrateFederation<TContextData>(federation: Federation<TContextData>, contextDataFactory: ContextDataFactory<TContextData>): EventHandler<EventHandlerRequest, EventHandlerResponse>;
24
24
  /**
25
- * An error handler that responds with a 406 Not Acceptable if Fedify
26
- * responded with a 406 Not Acceptable and the actual handler responded with
27
- * a 404 Not Found.
28
- * @param error The error that occurred.
29
- * @param event The event that triggered the handler.
30
- */
25
+ * An error handler that responds with a 406 Not Acceptable if Fedify
26
+ * responded with a 406 Not Acceptable and the actual handler responded with
27
+ * a 404 Not Found.
28
+ * @param error The error that occurred.
29
+ * @param event The event that triggered the handler.
30
+ */
31
31
  declare function onError(error: H3Error<unknown>, event: H3Event<EventHandlerResponse>): Promise<void>;
32
32
  //#endregion
33
33
  export { ContextDataFactory, integrateFederation, onError };
package/dist/index.d.ts CHANGED
@@ -4,30 +4,30 @@ import { Federation } from "@fedify/fedify";
4
4
  //#region src/index.d.ts
5
5
 
6
6
  /**
7
- * A factory function that creates the context data that will be passed to the
8
- * `Federation` instance.
9
- * @template TContextData The type of the context data that will be passed to
10
- * the `Federation` instance.
11
- * @param event The event that triggered the handler.
12
- * @param request The request that triggered the handler.
13
- * @returns The context data that will be passed to the `Federation` instance.
14
- * This can be a promise that resolves to the context data.
15
- */
7
+ * A factory function that creates the context data that will be passed to the
8
+ * `Federation` instance.
9
+ * @template TContextData The type of the context data that will be passed to
10
+ * the `Federation` instance.
11
+ * @param event The event that triggered the handler.
12
+ * @param request The request that triggered the handler.
13
+ * @returns The context data that will be passed to the `Federation` instance.
14
+ * This can be a promise that resolves to the context data.
15
+ */
16
16
  type ContextDataFactory<TContextData> = (event: H3Event<EventHandlerRequest>, request: Request) => Promise<TContextData> | TContextData;
17
17
  /**
18
- * Integrates a `Federation` instance with an H3 handler.
19
- * @param federation
20
- * @param contextDataFactory
21
- * @returns
22
- */
18
+ * Integrates a `Federation` instance with an H3 handler.
19
+ * @param federation
20
+ * @param contextDataFactory
21
+ * @returns
22
+ */
23
23
  declare function integrateFederation<TContextData>(federation: Federation<TContextData>, contextDataFactory: ContextDataFactory<TContextData>): EventHandler<EventHandlerRequest, EventHandlerResponse>;
24
24
  /**
25
- * An error handler that responds with a 406 Not Acceptable if Fedify
26
- * responded with a 406 Not Acceptable and the actual handler responded with
27
- * a 404 Not Found.
28
- * @param error The error that occurred.
29
- * @param event The event that triggered the handler.
30
- */
25
+ * An error handler that responds with a 406 Not Acceptable if Fedify
26
+ * responded with a 406 Not Acceptable and the actual handler responded with
27
+ * a 404 Not Found.
28
+ * @param error The error that occurred.
29
+ * @param event The event that triggered the handler.
30
+ */
31
31
  declare function onError(error: H3Error<unknown>, event: H3Event<EventHandlerResponse>): Promise<void>;
32
32
  //#endregion
33
33
  export { ContextDataFactory, integrateFederation, onError };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/h3",
3
- "version": "2.0.1",
3
+ "version": "2.0.2-dev.407+6f4b2e28",
4
4
  "description": "Integrate Fedify with h3",
5
5
  "keywords": [
6
6
  "Fedify",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "peerDependencies": {
54
54
  "h3": "^1.15.0",
55
- "@fedify/fedify": "^2.0.1"
55
+ "@fedify/fedify": "^2.0.2-dev.407+6f4b2e28"
56
56
  },
57
57
  "scripts": {
58
58
  "build:self": "tsdown",