@fedify/fedify 2.0.0-pr.469.1873 → 2.0.0-pr.474.1879

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.
Files changed (122) hide show
  1. package/dist/{actor-Bo3uuvwH.js → actor-BYv3E3MI.js} +185 -185
  2. package/dist/{actor-DoaVs0vL.cjs → actor-CjcnBLTk.cjs} +185 -185
  3. package/dist/{actor-DhFfLv7K.js → actor-DM_mczcz.js} +1 -1
  4. package/dist/{builder-DFaO3_4-.js → builder-CpW45hts.js} +3 -3
  5. package/dist/compat/mod.d.cts +2 -3
  6. package/dist/compat/mod.d.ts +2 -3
  7. package/dist/compat/transformers.test.js +14 -14
  8. package/dist/{context-DG0huGW-.d.ts → context-DXV-2IZN.d.ts} +146 -3
  9. package/dist/{context-DJ8aSy2Q.d.cts → context-Nt2rAqjj.d.cts} +146 -3
  10. package/dist/{docloader-B1AZ1LMA.js → docloader-DPQnUMPZ.js} +2 -2
  11. package/dist/{esm-CbckHird.js → esm-CHBTY23R.js} +1 -1
  12. package/dist/federation/builder.test.js +4 -4
  13. package/dist/federation/collection.test.js +2 -2
  14. package/dist/federation/handler.test.js +15 -15
  15. package/dist/federation/handler_requirehttpsig.test.js +138 -0
  16. package/dist/federation/idempotency.test.js +15 -15
  17. package/dist/federation/inbox.test.js +3 -3
  18. package/dist/federation/keycache.test.js +3 -3
  19. package/dist/federation/kv.test.js +2 -2
  20. package/dist/federation/middleware.test.js +16 -16
  21. package/dist/federation/mod.cjs +7 -7
  22. package/dist/federation/mod.d.cts +2 -3
  23. package/dist/federation/mod.d.ts +2 -3
  24. package/dist/federation/mod.js +7 -7
  25. package/dist/federation/mq.test.js +6 -4
  26. package/dist/federation/negotiation.test.js +2 -2
  27. package/dist/federation/retry.test.js +2 -2
  28. package/dist/federation/router.test.js +2 -2
  29. package/dist/federation/send.test.js +9 -9
  30. package/dist/{http-D27ZccIJ.cjs → http-B1cyhAOR.cjs} +2 -2
  31. package/dist/{http-D8SvAGVC.js → http-CNbh6Bgj.js} +2 -2
  32. package/dist/{http-nnaaa9xj.js → http-Di-WAayg.js} +2 -2
  33. package/dist/{inbox-C5M1_a0k.js → inbox-CKpjNIIw.js} +1 -1
  34. package/dist/{key-bc3A8THw.js → key-Bm6xoWJ9.js} +2 -2
  35. package/dist/{keycache-CpTjHRpy.js → keycache-BoIUmk-X.js} +1 -1
  36. package/dist/{keys-D6W2Pnoh.js → keys-BJSEmAMh.js} +1 -1
  37. package/dist/{kv-cache-B_RVzls5.js → kv-cache-BCfbzWvV.js} +1 -1
  38. package/dist/{kv-cache-CZcZLaEo.cjs → kv-cache-ugHk-g8V.cjs} +1 -1
  39. package/dist/{ld-D5Vg307g.js → ld-CFrblqOy.js} +2 -2
  40. package/dist/{lookup-DO7ZeFb2.cjs → lookup-BKHMnItE.cjs} +2 -7
  41. package/dist/{lookup-BBrk-_5k.js → lookup-CjRKAy5i.js} +186 -191
  42. package/dist/{lookup-BXY5QJif.js → lookup-CovW5HO7.js} +2 -7
  43. package/dist/{middleware-CU0RJROn.js → middleware-BCCuNXoU.js} +17 -15
  44. package/dist/middleware-CaQFohcx.js +26 -0
  45. package/dist/middleware-CqJTYvui.cjs +15 -0
  46. package/dist/{middleware-RgDZByG7.js → middleware-DFP98BrZ.js} +13 -11
  47. package/dist/middleware-cA6uI21b.js +15 -0
  48. package/dist/{middleware-Dy7xPuu-.cjs → middleware-fxZRXc2R.cjs} +13 -11
  49. package/dist/{mod-DJcZDvjA.d.cts → mod-CKRSFzK_.d.cts} +1 -1
  50. package/dist/{mod-BoHnwOCs.d.ts → mod-C_6Uxusd.d.ts} +1 -1
  51. package/dist/mod.cjs +7 -7
  52. package/dist/mod.d.cts +5 -6
  53. package/dist/mod.d.ts +5 -6
  54. package/dist/mod.js +7 -7
  55. package/dist/nodeinfo/client.test.js +3 -3
  56. package/dist/nodeinfo/handler.test.js +14 -14
  57. package/dist/nodeinfo/mod.d.cts +1 -1
  58. package/dist/nodeinfo/mod.d.ts +1 -1
  59. package/dist/nodeinfo/types.test.js +2 -2
  60. package/dist/{owner-DSDpCSms.js → owner-8cgMngcR.js} +2 -2
  61. package/dist/{proof-Bvu8zaM1.js → proof-BbhNICOW.js} +2 -2
  62. package/dist/{proof-C1-VSUNW.cjs → proof-C3woq5fl.cjs} +3 -3
  63. package/dist/{proof-4L3D-iT4.js → proof-OnfETSbB.js} +3 -3
  64. package/dist/{send-Cr3PSs0N.js → send-zlaQ6fqY.js} +2 -2
  65. package/dist/sig/http.test.js +7 -7
  66. package/dist/sig/key.test.js +5 -5
  67. package/dist/sig/ld.test.js +6 -6
  68. package/dist/sig/mod.cjs +4 -4
  69. package/dist/sig/mod.d.cts +1 -1
  70. package/dist/sig/mod.d.ts +1 -1
  71. package/dist/sig/mod.js +4 -4
  72. package/dist/sig/owner.test.js +6 -6
  73. package/dist/sig/proof.test.js +6 -6
  74. package/dist/testing/docloader.test.js +2 -2
  75. package/dist/testing/mod.d.ts +6 -0
  76. package/dist/testing/mod.js +2 -2
  77. package/dist/{testing-Bw9AfLxQ.js → testing-DHsP4t6k.js} +1 -1
  78. package/dist/utils/docloader.test.js +8 -8
  79. package/dist/utils/kv-cache.test.js +2 -2
  80. package/dist/utils/mod.cjs +4 -4
  81. package/dist/utils/mod.d.cts +1 -1
  82. package/dist/utils/mod.d.ts +1 -1
  83. package/dist/utils/mod.js +4 -4
  84. package/dist/vocab/actor.test.js +4 -4
  85. package/dist/vocab/lookup.test.js +3 -3
  86. package/dist/vocab/mod.cjs +3 -3
  87. package/dist/vocab/mod.js +3 -3
  88. package/dist/vocab/type.test.js +2 -2
  89. package/dist/vocab/vocab.test.js +3 -3
  90. package/dist/{vocab-B74bq08l.js → vocab-DMGCHMXF.js} +2 -2
  91. package/dist/{vocab-HJLl6-1F.cjs → vocab-YXPM77QO.cjs} +2 -2
  92. package/dist/webfinger/handler.test.js +14 -14
  93. package/dist/webfinger/lookup.test.js +3 -3
  94. package/dist/webfinger/mod.cjs +1 -1
  95. package/dist/webfinger/mod.js +1 -1
  96. package/package.json +3 -34
  97. package/dist/denokv-CCssOzMJ.js +0 -57
  98. package/dist/middleware-BU2XnCCI.js +0 -15
  99. package/dist/middleware-D4qQ6MLq.cjs +0 -15
  100. package/dist/middleware-DEu9Xuza.js +0 -26
  101. package/dist/mq-CUKlBw08.d.ts +0 -143
  102. package/dist/mq-DcJPkXD5.d.cts +0 -140
  103. package/dist/x/cfworkers.cjs +0 -100
  104. package/dist/x/cfworkers.d.cts +0 -59
  105. package/dist/x/cfworkers.d.ts +0 -61
  106. package/dist/x/cfworkers.js +0 -98
  107. package/dist/x/cfworkers.test.js +0 -177
  108. package/dist/x/hono.cjs +0 -61
  109. package/dist/x/hono.d.cts +0 -53
  110. package/dist/x/hono.d.ts +0 -55
  111. package/dist/x/hono.js +0 -60
  112. package/dist/x/sveltekit.cjs +0 -69
  113. package/dist/x/sveltekit.d.cts +0 -45
  114. package/dist/x/sveltekit.d.ts +0 -47
  115. package/dist/x/sveltekit.js +0 -68
  116. /package/dist/{x/cfworkers.test.d.ts → federation/handler_requirehttpsig.test.d.ts} +0 -0
  117. /package/dist/{mod-C2tOeRkN.d.cts → mod-CcDPcLJW.d.cts} +0 -0
  118. /package/dist/{mod-B2iOw50L.d.ts → mod-D5Z2tISD.d.ts} +0 -0
  119. /package/dist/{mod-0noXw66R.d.cts → mod-DMpuiKXi.d.cts} +0 -0
  120. /package/dist/{mod-DgdBYYa0.d.cts → mod-DgxG-byT.d.cts} +0 -0
  121. /package/dist/{mod-B9M-8jm2.d.ts → mod-aAE2wOWV.d.ts} +0 -0
  122. /package/dist/{mod-xIj-IT58.d.ts → mod-bjzj5QIb.d.ts} +0 -0
@@ -1,68 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
- import { URLPattern } from "urlpattern-polyfill";
4
-
5
- import { getLogger } from "@logtape/logtape";
6
-
7
- //#region src/x/sveltekit.ts
8
- /**
9
- * Create a SvelteKit hook handler to integrate with the {@link Federation}
10
- * object.
11
- *
12
- * @deprecated This function has been moved to `@fedify/sveltekit` package.
13
- * Import `fedifyHook` from `@fedify/sveltekit` instead.
14
- * This function will be removed in Fedify v2.0.
15
- *
16
- * @example hooks.server.ts
17
- * ``` typescript
18
- * import { federation } from "./federation"; // Import the `Federation` object
19
- *
20
- * export const handle = fedifyHook(federation, () => undefined);
21
- * ```
22
- *
23
- * @template TContextData A type of the context data for the {@link Federation}
24
- * object.
25
- * @param federation A {@link Federation} object to integrate with SvelteKit.
26
- * @param createContextData A function to create a context data for the
27
- * {@link Federation} object.
28
- * @returns A SvelteKit hook handler.
29
- * @since 1.3.0
30
- */
31
- function fedifyHook(federation, createContextData) {
32
- const logger = getLogger([
33
- "fedify",
34
- "federation",
35
- "sveltekit"
36
- ]);
37
- logger.warn("The `@fedify/fedify/x/sveltekit` module is deprecated; use `fedifyHook` from `@fedify/sveltekit` package instead.");
38
- return async ({ event, resolve }) => {
39
- return await federation.fetch(event.request, {
40
- contextData: await createContextData(event),
41
- ...integrateFetchOptions({
42
- event,
43
- resolve
44
- })
45
- });
46
- };
47
- }
48
- function integrateFetchOptions({ event, resolve }) {
49
- return {
50
- async onNotFound() {
51
- return await resolve(event);
52
- },
53
- async onNotAcceptable() {
54
- const res = await resolve(event);
55
- if (res.status !== 404) return res;
56
- return new Response("Not acceptable", {
57
- status: 406,
58
- headers: {
59
- "Content-Type": "text/plain",
60
- Vary: "Accept"
61
- }
62
- });
63
- }
64
- };
65
- }
66
-
67
- //#endregion
68
- export { fedifyHook };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes