@fedify/fastify 2.1.0-dev.403 → 2.1.0-dev.406

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
@@ -5,17 +5,18 @@ import { FastifyPluginAsync, FastifyPluginOptions, FastifyRequest } from "fastif
5
5
 
6
6
  type ErrorHandlers = Omit<FederationFetchOptions<unknown>, "contextData">;
7
7
  /**
8
- * A factory function that creates context data for the Federation instance.
9
- */
8
+ * A factory function that creates context data for the Federation instance.
9
+ */
10
10
  type ContextDataFactory<TContextData> = (request: FastifyRequest) => TContextData | Promise<TContextData>;
11
11
  /**
12
- * Plugin options for Fedify integration.
13
- */
12
+ * Plugin options for Fedify integration.
13
+ */
14
14
  interface FedifyPluginOptions<TContextData> extends FastifyPluginOptions {
15
15
  federation: Federation<TContextData>;
16
16
  contextDataFactory?: ContextDataFactory<TContextData>;
17
17
  errorHandlers?: Partial<ErrorHandlers>;
18
18
  }
19
+ // Wrap with fastify-plugin to bypass encapsulation
19
20
  declare const fedifyPlugin: FastifyPluginAsync<FedifyPluginOptions<unknown>>;
20
21
  //#endregion
21
22
  export { ContextDataFactory, FedifyPluginOptions, fedifyPlugin as default, fedifyPlugin };
package/dist/index.d.ts CHANGED
@@ -5,17 +5,18 @@ import { FastifyPluginAsync, FastifyPluginOptions, FastifyRequest } from "fastif
5
5
 
6
6
  type ErrorHandlers = Omit<FederationFetchOptions<unknown>, "contextData">;
7
7
  /**
8
- * A factory function that creates context data for the Federation instance.
9
- */
8
+ * A factory function that creates context data for the Federation instance.
9
+ */
10
10
  type ContextDataFactory<TContextData> = (request: FastifyRequest) => TContextData | Promise<TContextData>;
11
11
  /**
12
- * Plugin options for Fedify integration.
13
- */
12
+ * Plugin options for Fedify integration.
13
+ */
14
14
  interface FedifyPluginOptions<TContextData> extends FastifyPluginOptions {
15
15
  federation: Federation<TContextData>;
16
16
  contextDataFactory?: ContextDataFactory<TContextData>;
17
17
  errorHandlers?: Partial<ErrorHandlers>;
18
18
  }
19
+ // Wrap with fastify-plugin to bypass encapsulation
19
20
  declare const fedifyPlugin: FastifyPluginAsync<FedifyPluginOptions<unknown>>;
20
21
  //#endregion
21
22
  export { ContextDataFactory, FedifyPluginOptions, fedifyPlugin as default, fedifyPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fastify",
3
- "version": "2.1.0-dev.403+0ce42c7c",
3
+ "version": "2.1.0-dev.406+61a21e4e",
4
4
  "description": "Integrate Fedify with Fastify",
5
5
  "keywords": [
6
6
  "Fedify",
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "peerDependencies": {
50
50
  "fastify": "^5.2.0",
51
- "@fedify/fedify": "^2.1.0-dev.403+0ce42c7c"
51
+ "@fedify/fedify": "^2.1.0-dev.406+61a21e4e"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/node": "^22.17.0",