@fedify/fedify 2.0.0-pr.458.1791 → 2.0.0-pr.467.1876

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 (121) hide show
  1. package/dist/{actor-B1Ok0M4n.cjs → actor-9gjVpXgd.cjs} +185 -185
  2. package/dist/{actor-Cca09Hlc.js → actor-CsH6QBYT.js} +185 -185
  3. package/dist/{actor-BjOdI0ZL.js → actor-D1LkZWVU.js} +1 -1
  4. package/dist/{builder-G4Si9uyR.js → builder-DCBCGtfN.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-DJ8aSy2Q.d.cts → context-PxGADCsD.d.cts} +140 -3
  9. package/dist/{context-DG0huGW-.d.ts → context-V-XS2_6O.d.ts} +140 -3
  10. package/dist/{docloader-7NmfEq4O.js → docloader-BaWIuRb2.js} +2 -2
  11. package/dist/{esm-CXBuq5BO.js → esm-uX3RtJS9.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/idempotency.test.js +15 -15
  16. package/dist/federation/inbox.test.js +3 -3
  17. package/dist/federation/keycache.test.js +3 -3
  18. package/dist/federation/kv.test.js +2 -2
  19. package/dist/federation/middleware.test.js +16 -16
  20. package/dist/federation/mod.cjs +7 -7
  21. package/dist/federation/mod.d.cts +2 -3
  22. package/dist/federation/mod.d.ts +2 -3
  23. package/dist/federation/mod.js +7 -7
  24. package/dist/federation/mq.test.js +6 -4
  25. package/dist/federation/negotiation.test.js +2 -2
  26. package/dist/federation/retry.test.js +2 -2
  27. package/dist/federation/router.test.js +2 -2
  28. package/dist/federation/send.test.js +9 -9
  29. package/dist/{http-CaEsjA2G.js → http-C5NpY8dE.js} +2 -2
  30. package/dist/{http-Cs287TmP.js → http-Cw6Nfbii.js} +2 -2
  31. package/dist/{http-DUTeGoKz.cjs → http-zanXjqHu.cjs} +2 -2
  32. package/dist/{inbox-CWHlU-4p.js → inbox-Bu3THMpw.js} +1 -1
  33. package/dist/{key-DEdR04Ab.js → key-KT2Sua_C.js} +2 -2
  34. package/dist/{keycache-BviIhg2b.js → keycache-CH77mwdO.js} +1 -1
  35. package/dist/{keys-CHylGW0O.js → keys-DM8I6W_Z.js} +1 -1
  36. package/dist/{kv-cache-BZnZAYno.js → kv-cache-DspkH6f2.js} +1 -1
  37. package/dist/{kv-cache-CZGTfHxH.cjs → kv-cache-DxziE8JZ.cjs} +1 -1
  38. package/dist/{ld-CImM10Xd.js → ld-RF_UxhNp.js} +2 -2
  39. package/dist/{lookup-BQkOrVtQ.js → lookup-D029Hgmr.js} +187 -192
  40. package/dist/{lookup-CxaofAPS.js → lookup-EXeITSkB.js} +3 -8
  41. package/dist/{lookup-CmWpZY_M.cjs → lookup-ZMUieFn0.cjs} +3 -8
  42. package/dist/middleware-BuhoXDtM.js +15 -0
  43. package/dist/middleware-C2X56NUR.cjs +15 -0
  44. package/dist/{middleware-CZBCqMIK.js → middleware-C32-qFyf.js} +7 -7
  45. package/dist/{middleware-CHrx6VCp.js → middleware-CI-4cLU9.js} +11 -11
  46. package/dist/{middleware-DehGSDBK.cjs → middleware-CMT8W2oG.cjs} +7 -7
  47. package/dist/middleware-DWijkoj4.js +26 -0
  48. package/dist/{mod-DJcZDvjA.d.cts → mod-BoRKfJPE.d.cts} +1 -1
  49. package/dist/{mod-BoHnwOCs.d.ts → mod-Cdo6SYlJ.d.ts} +1 -1
  50. package/dist/mod.cjs +7 -7
  51. package/dist/mod.d.cts +5 -6
  52. package/dist/mod.d.ts +5 -6
  53. package/dist/mod.js +7 -7
  54. package/dist/nodeinfo/client.test.js +3 -3
  55. package/dist/nodeinfo/handler.test.js +14 -14
  56. package/dist/nodeinfo/mod.d.cts +1 -1
  57. package/dist/nodeinfo/mod.d.ts +1 -1
  58. package/dist/nodeinfo/types.test.js +2 -2
  59. package/dist/{owner-C5k5U7z5.js → owner-6JbsaBQB.js} +2 -2
  60. package/dist/{proof-QPC0OByc.cjs → proof-CB7YKfl6.cjs} +3 -3
  61. package/dist/{proof-0QlPOspl.js → proof-D8SPvADT.js} +3 -3
  62. package/dist/{proof-DGsrnIEU.js → proof-gHlNO1tx.js} +2 -2
  63. package/dist/{send-BXuinmF1.js → send-CmpkYTnR.js} +2 -2
  64. package/dist/sig/http.test.js +7 -7
  65. package/dist/sig/key.test.js +5 -5
  66. package/dist/sig/ld.test.js +6 -6
  67. package/dist/sig/mod.cjs +4 -4
  68. package/dist/sig/mod.d.cts +1 -1
  69. package/dist/sig/mod.d.ts +1 -1
  70. package/dist/sig/mod.js +4 -4
  71. package/dist/sig/owner.test.js +6 -6
  72. package/dist/sig/proof.test.js +6 -6
  73. package/dist/testing/docloader.test.js +2 -2
  74. package/dist/testing/mod.js +2 -2
  75. package/dist/{testing-D4BaH0xH.js → testing-BJ493d9l.js} +1 -1
  76. package/dist/utils/docloader.test.js +8 -8
  77. package/dist/utils/kv-cache.test.js +2 -2
  78. package/dist/utils/mod.cjs +4 -4
  79. package/dist/utils/mod.d.cts +1 -1
  80. package/dist/utils/mod.d.ts +1 -1
  81. package/dist/utils/mod.js +4 -4
  82. package/dist/vocab/actor.test.js +4 -4
  83. package/dist/vocab/lookup.test.js +3 -3
  84. package/dist/vocab/mod.cjs +3 -3
  85. package/dist/vocab/mod.js +3 -3
  86. package/dist/vocab/type.test.js +2 -2
  87. package/dist/vocab/vocab.test.js +3 -3
  88. package/dist/{vocab-Bh3jSO8n.js → vocab-BY_op-IW.js} +2 -2
  89. package/dist/{vocab-lZ1-2A_O.cjs → vocab-I0FskT0s.cjs} +2 -2
  90. package/dist/webfinger/handler.test.js +14 -14
  91. package/dist/webfinger/lookup.test.js +3 -3
  92. package/dist/webfinger/mod.cjs +1 -1
  93. package/dist/webfinger/mod.js +1 -1
  94. package/package.json +5 -36
  95. package/dist/denokv-CCssOzMJ.js +0 -57
  96. package/dist/middleware-BXYjRNT8.js +0 -15
  97. package/dist/middleware-BiG0cANp.cjs +0 -15
  98. package/dist/middleware-DTljmOoB.js +0 -26
  99. package/dist/mq-CUKlBw08.d.ts +0 -143
  100. package/dist/mq-DcJPkXD5.d.cts +0 -140
  101. package/dist/vocab/schema.yaml +0 -247
  102. package/dist/x/cfworkers.cjs +0 -100
  103. package/dist/x/cfworkers.d.cts +0 -59
  104. package/dist/x/cfworkers.d.ts +0 -61
  105. package/dist/x/cfworkers.js +0 -98
  106. package/dist/x/cfworkers.test.d.ts +0 -3
  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/{mod-C2tOeRkN.d.cts → mod-CcDPcLJW.d.cts} +0 -0
  117. /package/dist/{mod-B2iOw50L.d.ts → mod-D5Z2tISD.d.ts} +0 -0
  118. /package/dist/{mod-0noXw66R.d.cts → mod-DMpuiKXi.d.cts} +0 -0
  119. /package/dist/{mod-DgdBYYa0.d.cts → mod-DgxG-byT.d.cts} +0 -0
  120. /package/dist/{mod-B9M-8jm2.d.ts → mod-aAE2wOWV.d.ts} +0 -0
  121. /package/dist/{mod-xIj-IT58.d.ts → mod-bjzj5QIb.d.ts} +0 -0
@@ -1,69 +0,0 @@
1
-
2
- const { Temporal } = require("@js-temporal/polyfill");
3
- const { URLPattern } = require("urlpattern-polyfill");
4
-
5
- const require_chunk = require('../chunk-DqRYRqnO.cjs');
6
- const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
7
-
8
- //#region src/x/sveltekit.ts
9
- /**
10
- * Create a SvelteKit hook handler to integrate with the {@link Federation}
11
- * object.
12
- *
13
- * @deprecated This function has been moved to `@fedify/sveltekit` package.
14
- * Import `fedifyHook` from `@fedify/sveltekit` instead.
15
- * This function will be removed in Fedify v2.0.
16
- *
17
- * @example hooks.server.ts
18
- * ``` typescript
19
- * import { federation } from "./federation"; // Import the `Federation` object
20
- *
21
- * export const handle = fedifyHook(federation, () => undefined);
22
- * ```
23
- *
24
- * @template TContextData A type of the context data for the {@link Federation}
25
- * object.
26
- * @param federation A {@link Federation} object to integrate with SvelteKit.
27
- * @param createContextData A function to create a context data for the
28
- * {@link Federation} object.
29
- * @returns A SvelteKit hook handler.
30
- * @since 1.3.0
31
- */
32
- function fedifyHook(federation, createContextData) {
33
- const logger = (0, __logtape_logtape.getLogger)([
34
- "fedify",
35
- "federation",
36
- "sveltekit"
37
- ]);
38
- logger.warn("The `@fedify/fedify/x/sveltekit` module is deprecated; use `fedifyHook` from `@fedify/sveltekit` package instead.");
39
- return async ({ event, resolve }) => {
40
- return await federation.fetch(event.request, {
41
- contextData: await createContextData(event),
42
- ...integrateFetchOptions({
43
- event,
44
- resolve
45
- })
46
- });
47
- };
48
- }
49
- function integrateFetchOptions({ event, resolve }) {
50
- return {
51
- async onNotFound() {
52
- return await resolve(event);
53
- },
54
- async onNotAcceptable() {
55
- const res = await resolve(event);
56
- if (res.status !== 404) return res;
57
- return new Response("Not acceptable", {
58
- status: 406,
59
- headers: {
60
- "Content-Type": "text/plain",
61
- Vary: "Accept"
62
- }
63
- });
64
- }
65
- };
66
- }
67
-
68
- //#endregion
69
- exports.fedifyHook = fedifyHook;
@@ -1,45 +0,0 @@
1
- import "../client-94iWEfQa.cjs";
2
- import "../vocab-CeDBzu-f.cjs";
3
- import "../actor-f2NtjyCg.cjs";
4
- import "../http-M8k5mKc0.cjs";
5
- import "../owner-B4HbyP8s.cjs";
6
- import "../mod-BxRCHTz-.cjs";
7
- import "../mod-C58MZ7Wx.cjs";
8
- import { Federation } from "../context-DJ8aSy2Q.cjs";
9
- import "../kv-Bxr0Q87_.cjs";
10
- import "../mq-DcJPkXD5.cjs";
11
-
12
- //#region src/x/sveltekit.d.ts
13
- type RequestEvent = {
14
- request: Request;
15
- };
16
- type HookParams = {
17
- event: RequestEvent;
18
- resolve: (event: RequestEvent) => Promise<Response>;
19
- };
20
- /**
21
- * Create a SvelteKit hook handler to integrate with the {@link Federation}
22
- * object.
23
- *
24
- * @deprecated This function has been moved to `@fedify/sveltekit` package.
25
- * Import `fedifyHook` from `@fedify/sveltekit` instead.
26
- * This function will be removed in Fedify v2.0.
27
- *
28
- * @example hooks.server.ts
29
- * ``` typescript
30
- * import { federation } from "./federation"; // Import the `Federation` object
31
- *
32
- * export const handle = fedifyHook(federation, () => undefined);
33
- * ```
34
- *
35
- * @template TContextData A type of the context data for the {@link Federation}
36
- * object.
37
- * @param federation A {@link Federation} object to integrate with SvelteKit.
38
- * @param createContextData A function to create a context data for the
39
- * {@link Federation} object.
40
- * @returns A SvelteKit hook handler.
41
- * @since 1.3.0
42
- */
43
- declare function fedifyHook<TContextData>(federation: Federation<TContextData>, createContextData: (event: RequestEvent) => TContextData | Promise<TContextData>): (params: HookParams) => Promise<Response>;
44
- //#endregion
45
- export { fedifyHook };
@@ -1,47 +0,0 @@
1
- import { Temporal } from "@js-temporal/polyfill";
2
- import { URLPattern } from "urlpattern-polyfill";
3
- import "../client-BsGzbnV-.js";
4
- import "../vocab-BCWe1Ih5.js";
5
- import "../actor-DqFajh9s.js";
6
- import "../http-BbO0ejuk.js";
7
- import "../owner-kQRGVXG1.js";
8
- import "../mod-BlVovdcy.js";
9
- import "../mod-Ds0mpFZU.js";
10
- import { Federation } from "../context-DG0huGW-.js";
11
- import "../kv-BKNZ-Tb-.js";
12
- import "../mq-CUKlBw08.js";
13
-
14
- //#region src/x/sveltekit.d.ts
15
- type RequestEvent = {
16
- request: Request;
17
- };
18
- type HookParams = {
19
- event: RequestEvent;
20
- resolve: (event: RequestEvent) => Promise<Response>;
21
- };
22
- /**
23
- * Create a SvelteKit hook handler to integrate with the {@link Federation}
24
- * object.
25
- *
26
- * @deprecated This function has been moved to `@fedify/sveltekit` package.
27
- * Import `fedifyHook` from `@fedify/sveltekit` instead.
28
- * This function will be removed in Fedify v2.0.
29
- *
30
- * @example hooks.server.ts
31
- * ``` typescript
32
- * import { federation } from "./federation"; // Import the `Federation` object
33
- *
34
- * export const handle = fedifyHook(federation, () => undefined);
35
- * ```
36
- *
37
- * @template TContextData A type of the context data for the {@link Federation}
38
- * object.
39
- * @param federation A {@link Federation} object to integrate with SvelteKit.
40
- * @param createContextData A function to create a context data for the
41
- * {@link Federation} object.
42
- * @returns A SvelteKit hook handler.
43
- * @since 1.3.0
44
- */
45
- declare function fedifyHook<TContextData>(federation: Federation<TContextData>, createContextData: (event: RequestEvent) => TContextData | Promise<TContextData>): (params: HookParams) => Promise<Response>;
46
- //#endregion
47
- export { fedifyHook };
@@ -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