@fedify/fedify 1.6.1-dev.880 → 1.6.1-dev.883

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 (119) hide show
  1. package/dist/{actor-DvmEmDn9.js → actor-CwAL6Q82.js} +180 -180
  2. package/dist/{actor-DIk6hH_U.js → actor-DezwbbQX.js} +3 -3
  3. package/dist/{actor-f67C7yQD.d.ts → actor-tT_B0pDn.d.ts} +5 -8
  4. package/dist/{assert-Dv75vaGI.js → assert-YJk-1DlZ.js} +1 -1
  5. package/dist/{assert_equals-ClvzlhZu.js → assert_equals-Dnj7ejjL.js} +16 -9
  6. package/dist/{assert_instance_of--9UCVKsi.js → assert_instance_of-DBIoG5k7.js} +1 -1
  7. package/dist/{assert_is_error-D162gXcM.js → assert_is_error-jyzqjHud.js} +1 -1
  8. package/dist/{assert_not_equals-Cyf5m9Ke.js → assert_not_equals-wx-SRs4i.js} +1 -1
  9. package/dist/{assert_rejects-FOHCtlD2.js → assert_rejects-BZjUwo62.js} +2 -2
  10. package/dist/{assert_throws-CRfQJvVx.js → assert_throws-gBPv3v2V.js} +2 -2
  11. package/dist/{authdocloader-B3ME-k-0.js → authdocloader-C-_Lr-KH.js} +3 -3
  12. package/dist/{authdocloader-Bt52x-cz.js → authdocloader-Df1y1MKv.js} +4 -4
  13. package/dist/{builder-DT_CjHJM.js → builder-C8tsk_Xe.js} +3 -3
  14. package/dist/{client-Dw1pCSIt.d.ts → client-Cd552pKL.d.ts} +6 -9
  15. package/dist/{client-CSQzJhcr.js → client-CwjvB-Dh.js} +1 -1
  16. package/dist/{collection-QaGK9TVn.js → collection-Dfb0TPno.js} +1 -1
  17. package/dist/compat/mod.d.ts +12 -12
  18. package/dist/compat/mod.js +1 -1
  19. package/dist/compat/transformers.test.js +21 -21
  20. package/dist/{context-DBM4y1xF.d.ts → context-DRhhOsMk.d.ts} +12 -28
  21. package/dist/{context-DaUJ8XgG.js → context-DfToVZY6.js} +2 -2
  22. package/dist/{docloader-BesQV-nU.js → docloader-BFRgyDAa.js} +1 -2
  23. package/dist/{docloader-DdQSFoDK.js → docloader-BXc5egq6.js} +1 -2
  24. package/dist/{docloader-DTRsVZPo.d.ts → docloader-DlUDOVSe.d.ts} +4 -7
  25. package/dist/{esm-BxIKwi-M.js → esm-Btx3E8og.js} +1 -1
  26. package/dist/federation/builder.test.js +12 -12
  27. package/dist/federation/collection.test.js +9 -9
  28. package/dist/federation/handler.test.js +28 -28
  29. package/dist/federation/inbox.test.js +6 -6
  30. package/dist/federation/keycache.test.js +6 -6
  31. package/dist/federation/kv.test.js +8 -8
  32. package/dist/federation/middleware.test.js +28 -28
  33. package/dist/federation/mod.d.ts +11 -11
  34. package/dist/federation/mod.js +12 -12
  35. package/dist/federation/mq.test.js +10 -10
  36. package/dist/federation/retry.test.js +2 -2
  37. package/dist/federation/router.test.js +9 -9
  38. package/dist/federation/send.test.js +18 -18
  39. package/dist/{federation-Bmj7soSg.js → federation-3B6BDKCK.js} +1 -1
  40. package/dist/{http-nvlEiwC4.js → http-3CJyDlPz.js} +4 -4
  41. package/dist/{http-CZyKN-rt.d.ts → http-BkUCISGt.d.ts} +6 -14
  42. package/dist/{http-DKFoMKYk.js → http-DC3mY9EG.js} +4 -4
  43. package/dist/{inbox-DUxOSixz.js → inbox-CCbuuUqY.js} +4 -4
  44. package/dist/{key-C_i44VCP.js → key-CD8i4ZB_.js} +2 -2
  45. package/dist/{key-B6j6aQIf.js → key-Ce8aGBE5.js} +5 -5
  46. package/dist/{key-DnZNsfoE.js → key-D0WW7EHK.js} +3 -3
  47. package/dist/{key-BiM3rCVA.js → key-Y8a6dgOq.js} +4 -4
  48. package/dist/{keycache-NtvEqcq9.js → keycache-BtADunPo.js} +2 -2
  49. package/dist/{keys-R9p0S8_o.js → keys-BIY57kjo.js} +1 -1
  50. package/dist/{kv-BmsWxOQ2.d.ts → kv-p8sC8PTT.d.ts} +3 -7
  51. package/dist/{ld-BLZnxCWX.js → ld-D4G5WL1G.js} +4 -4
  52. package/dist/{lookup-B38eCiCI.js → lookup-C8V37GPa.js} +1 -1
  53. package/dist/{lookup-DXgwlvAK.js → lookup-CQnVHXIh.js} +3 -3
  54. package/dist/{lookup-CNK83LQK.js → lookup-Ds1_3qy2.js} +1 -1
  55. package/dist/{lookup-nlxO7x0u.d.ts → lookup-vJccIKCS.d.ts} +4 -8
  56. package/dist/middleware-DPuaf71I.js +17 -0
  57. package/dist/{middleware-Bjqgfc8l.js → middleware-DRpRVwO7.js} +18 -18
  58. package/dist/{middleware-FhQhkH0G.js → middleware-Jvf6WsMN.js} +18 -18
  59. package/dist/middleware-XHndzOUD.js +33 -0
  60. package/dist/{mod-iE_61Xjt.d.ts → mod-BTHfUeLo.d.ts} +2 -9
  61. package/dist/{mod-BUAWJ2pK.d.ts → mod-BUTm-sog.d.ts} +5 -9
  62. package/dist/{mod-CsYfI7YL.d.ts → mod-CgmTOt4z.d.ts} +3 -21
  63. package/dist/{mod-Bx6Du4Ct.d.ts → mod-DSPyncxx.d.ts} +5 -11
  64. package/dist/mod.d.ts +14 -14
  65. package/dist/mod.js +12 -12
  66. package/dist/{mq-Bue016Tz.d.ts → mq-nceTGCuc.d.ts} +3 -7
  67. package/dist/nodeinfo/client.test.js +23 -36
  68. package/dist/nodeinfo/handler.test.js +27 -27
  69. package/dist/nodeinfo/mod.d.ts +3 -3
  70. package/dist/nodeinfo/mod.js +2 -2
  71. package/dist/nodeinfo/semver.test.js +8 -8
  72. package/dist/nodeinfo/types.test.js +8 -8
  73. package/dist/{owner-C_Gw25Id.d.ts → owner-CbRc94FP.d.ts} +6 -9
  74. package/dist/{owner-DKsEWurW.js → owner-Dyk0zd-q.js} +3 -3
  75. package/dist/{proof-DtIUHGA0.js → proof-B8Hm2M5c.js} +3 -3
  76. package/dist/{proof-DKetjewp.js → proof-D-CWdNQx.js} +5 -5
  77. package/dist/runtime/authdocloader.test.js +17 -17
  78. package/dist/runtime/docloader.test.js +69 -66
  79. package/dist/runtime/key.test.js +13 -13
  80. package/dist/runtime/langstr.test.js +8 -8
  81. package/dist/runtime/mod.d.ts +5 -5
  82. package/dist/runtime/mod.js +6 -6
  83. package/dist/runtime/multibase/multibase.test.js +8 -8
  84. package/dist/runtime/url.test.js +4 -4
  85. package/dist/{send-Z9IEW2ZG.js → send-CJXTH3ST.js} +3 -3
  86. package/dist/sig/http.test.js +52 -47
  87. package/dist/sig/key.test.js +14 -14
  88. package/dist/sig/ld.test.js +12 -12
  89. package/dist/sig/mod.d.ts +7 -7
  90. package/dist/sig/mod.js +6 -6
  91. package/dist/sig/owner.test.js +16 -16
  92. package/dist/sig/proof.test.js +15 -15
  93. package/dist/{std__assert-CaBUULmX.js → std__assert-CHXwj7zk.js} +1 -1
  94. package/dist/testing/docloader.test.js +8 -8
  95. package/dist/testing/mod.d.ts +0 -1
  96. package/dist/{transformers-jxj-4o2K.js → transformers-ghwJuzGY.js} +1 -1
  97. package/dist/{types-C9A_t_ZN.js → types-D3XNqpGz.js} +1 -1
  98. package/dist/vocab/actor.test.js +60 -49
  99. package/dist/vocab/lookup.test.js +13 -13
  100. package/dist/vocab/mod.d.ts +5 -5
  101. package/dist/vocab/mod.js +4 -4
  102. package/dist/vocab/type.test.js +3 -3
  103. package/dist/vocab/vocab.test.js +129 -132
  104. package/dist/{vocab-CHuz96Ha.js → vocab-CPrCb9BR.js} +3 -3
  105. package/dist/{vocab-7mZSoHR0.js → vocab-CaZSjoCB.js} +178 -178
  106. package/dist/{vocab-C4bpdeio.d.ts → vocab-DSFLLLe6.d.ts} +2 -7
  107. package/dist/webfinger/handler.test.js +27 -27
  108. package/dist/webfinger/lookup.test.js +41 -46
  109. package/dist/webfinger/mod.d.ts +3 -3
  110. package/dist/webfinger/mod.js +2 -2
  111. package/dist/x/cfworkers.d.ts +2 -9
  112. package/dist/x/cfworkers.test.js +8 -8
  113. package/dist/x/hono.d.ts +11 -12
  114. package/dist/x/sveltekit.d.ts +11 -12
  115. package/package.json +2 -3
  116. package/dist/hongminhee__deno-mock-fetch-DJKLj_H-.js +0 -188
  117. package/dist/middleware-B8XTnZdu.js +0 -33
  118. package/dist/middleware-D-_NS4x8.js +0 -17
  119. /package/dist/{denokv-iB_ggPGm.js → denokv-B_GFWjrl.js} +0 -0
@@ -3,20 +3,20 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { assertEquals } from "../assert_equals-ClvzlhZu.js";
7
- import "../assert-Dv75vaGI.js";
8
- import "../assert_instance_of--9UCVKsi.js";
6
+ import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
7
+ import "../assert-YJk-1DlZ.js";
8
+ import "../assert_instance_of-DBIoG5k7.js";
9
9
  import { MemoryKvStore } from "../kv-DohFOP2C.js";
10
- import { FetchError, contexts_default, deno_default, getDocumentLoader, getUserAgent, kvCache } from "../docloader-DdQSFoDK.js";
10
+ import { FetchError, contexts_default, deno_default, getDocumentLoader, getUserAgent, kvCache } from "../docloader-BXc5egq6.js";
11
11
  import { UrlError } from "../url-kTAI6_KP.js";
12
12
  import { test } from "../testing-jcGLO9Lp.js";
13
- import "../std__assert-CaBUULmX.js";
14
- import { assertRejects } from "../assert_rejects-FOHCtlD2.js";
15
- import "../assert_is_error-D162gXcM.js";
16
- import "../assert_not_equals-Cyf5m9Ke.js";
17
- import { assertThrows } from "../assert_throws-CRfQJvVx.js";
13
+ import "../std__assert-CHXwj7zk.js";
14
+ import { assertRejects } from "../assert_rejects-BZjUwo62.js";
15
+ import "../assert_is_error-jyzqjHud.js";
16
+ import "../assert_not_equals-wx-SRs4i.js";
17
+ import { assertThrows } from "../assert_throws-gBPv3v2V.js";
18
18
  import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
19
- import { install, mock, uninstall } from "../hongminhee__deno-mock-fetch-DJKLj_H-.js";
19
+ import { esm_default } from "../esm-Btx3E8og.js";
20
20
  import process from "node:process";
21
21
 
22
22
  //#region runtime/docloader.test.ts
@@ -31,13 +31,13 @@ test("new FetchError()", () => {
31
31
  });
32
32
  test("getDocumentLoader()", async (t) => {
33
33
  const fetchDocumentLoader = getDocumentLoader();
34
- install();
35
- mock("GET@/object", (_req) => new Response(JSON.stringify({
34
+ esm_default.spyGlobal();
35
+ esm_default.get("https://example.com/object", { body: {
36
36
  "@context": "https://www.w3.org/ns/activitystreams",
37
37
  id: "https://example.com/object",
38
38
  name: "Fetched object",
39
39
  type: "Object"
40
- }), { status: 200 }));
40
+ } });
41
41
  await t.step("ok", async () => {
42
42
  assertEquals(await fetchDocumentLoader("https://example.com/object"), {
43
43
  contextUrl: null,
@@ -50,43 +50,37 @@ test("getDocumentLoader()", async (t) => {
50
50
  }
51
51
  });
52
52
  });
53
- mock("GET@/link-ctx", (_req) => new Response(JSON.stringify({
54
- id: "https://example.com/link-ctx",
55
- name: "Fetched object",
56
- type: "Object"
57
- }), {
58
- status: 200,
53
+ esm_default.get("https://example.com/link-ctx", {
54
+ body: {
55
+ id: "https://example.com/link-ctx",
56
+ name: "Fetched object",
57
+ type: "Object"
58
+ },
59
59
  headers: {
60
60
  "Content-Type": "application/activity+json",
61
61
  Link: "<https://www.w3.org/ns/activitystreams>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\""
62
62
  }
63
- }));
64
- mock("GET@/link-obj", (_req) => new Response("", {
65
- status: 200,
66
- headers: {
67
- "Content-Type": "text/html; charset=utf-8",
68
- Link: "<https://example.com/object>; rel=\"alternate\"; type=\"application/activity+json\""
69
- }
70
- }));
71
- mock("GET@/link-obj-relative", (_req) => new Response("", {
72
- status: 200,
73
- headers: {
74
- "Content-Type": "text/html; charset=utf-8",
75
- Link: "</object>; rel=\"alternate\"; type=\"application/activity+json\""
76
- }
77
- }));
78
- mock("GET@/obj-w-wrong-link", (_req) => new Response(JSON.stringify({
79
- "@context": "https://www.w3.org/ns/activitystreams",
80
- id: "https://example.com/obj-w-wrong-link",
81
- name: "Fetched object",
82
- type: "Object"
83
- }), {
84
- status: 200,
63
+ });
64
+ esm_default.get("https://example.com/link-obj", { headers: {
65
+ "Content-Type": "text/html; charset=utf-8",
66
+ Link: "<https://example.com/object>; rel=\"alternate\"; type=\"application/activity+json\""
67
+ } });
68
+ esm_default.get("https://example.com/link-obj-relative", { headers: {
69
+ "Content-Type": "text/html; charset=utf-8",
70
+ Link: "</object>; rel=\"alternate\"; type=\"application/activity+json\""
71
+ } });
72
+ esm_default.get("https://example.com/obj-w-wrong-link", {
73
+ body: {
74
+ "@context": "https://www.w3.org/ns/activitystreams",
75
+ id: "https://example.com/obj-w-wrong-link",
76
+ name: "Fetched object",
77
+ type: "Object"
78
+ },
85
79
  headers: {
86
80
  "Content-Type": "text/html; charset=utf-8",
87
81
  Link: "<https://example.com/object>; rel=\"alternate\"; type=\"application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"\""
88
82
  }
89
- }));
83
+ });
90
84
  await t.step("Link header", async () => {
91
85
  assertEquals(await fetchDocumentLoader("https://example.com/link-ctx"), {
92
86
  contextUrl: "https://www.w3.org/ns/activitystreams",
@@ -141,7 +135,8 @@ test("getDocumentLoader()", async (t) => {
141
135
  }
142
136
  });
143
137
  });
144
- mock("GET@/html-link", (_req) => new Response(`<html>
138
+ esm_default.get("https://example.com/html-link", {
139
+ body: `<html>
145
140
  <head>
146
141
  <meta charset=utf-8>
147
142
  <link
@@ -149,10 +144,9 @@ test("getDocumentLoader()", async (t) => {
149
144
  type='application/activity+json'
150
145
  href="https://example.com/object">
151
146
  </head>
152
- </html>`, {
153
- status: 200,
147
+ </html>`,
154
148
  headers: { "Content-Type": "text/html; charset=utf-8" }
155
- }));
149
+ });
156
150
  await t.step("HTML <link>", async () => {
157
151
  assertEquals(await fetchDocumentLoader("https://example.com/html-link"), {
158
152
  contextUrl: null,
@@ -165,7 +159,8 @@ test("getDocumentLoader()", async (t) => {
165
159
  }
166
160
  });
167
161
  });
168
- mock("GET@/html-a", (_req) => new Response(`<html>
162
+ esm_default.get("https://example.com/html-a", {
163
+ body: `<html>
169
164
  <head>
170
165
  <meta charset=utf-8>
171
166
  </head>
@@ -175,10 +170,9 @@ test("getDocumentLoader()", async (t) => {
175
170
  type=application/activity+json
176
171
  href=https://example.com/object>test</a>
177
172
  </body>
178
- </html>`, {
179
- status: 200,
173
+ </html>`,
180
174
  headers: { "Content-Type": "text/html; charset=utf-8" }
181
- }));
175
+ });
182
176
  await t.step("HTML <a>", async () => {
183
177
  assertEquals(await fetchDocumentLoader("https://example.com/html-a"), {
184
178
  contextUrl: null,
@@ -191,15 +185,15 @@ test("getDocumentLoader()", async (t) => {
191
185
  }
192
186
  });
193
187
  });
194
- mock("GET@/wrong-content-type", (_req) => new Response(JSON.stringify({
195
- "@context": "https://www.w3.org/ns/activitystreams",
196
- id: "https://example.com/wrong-content-type",
197
- name: "Fetched object",
198
- type: "Object"
199
- }), {
200
- status: 200,
188
+ esm_default.get("https://example.com/wrong-content-type", {
189
+ body: {
190
+ "@context": "https://www.w3.org/ns/activitystreams",
191
+ id: "https://example.com/wrong-content-type",
192
+ name: "Fetched object",
193
+ type: "Object"
194
+ },
201
195
  headers: { "Content-Type": "text/html; charset=utf-8" }
202
- }));
196
+ });
203
197
  await t.step("Wrong Content-Type", async () => {
204
198
  assertEquals(await fetchDocumentLoader("https://example.com/wrong-content-type"), {
205
199
  contextUrl: null,
@@ -212,7 +206,7 @@ test("getDocumentLoader()", async (t) => {
212
206
  }
213
207
  });
214
208
  });
215
- mock("GET@/404", (_req) => new Response("", { status: 404 }));
209
+ esm_default.get("https://example.com/404", { status: 404 });
216
210
  await t.step("not ok", async () => {
217
211
  await assertRejects(() => fetchDocumentLoader("https://example.com/404"), FetchError, "HTTP 404: https://example.com/404");
218
212
  });
@@ -226,8 +220,12 @@ test("getDocumentLoader()", async (t) => {
226
220
  await t.step("deny non-HTTP/HTTPS", async () => {
227
221
  await assertRejects(() => fetchDocumentLoader("ftp://localhost"), UrlError);
228
222
  });
229
- mock("GET@/localhost-redirect", (_req) => Response.redirect("https://localhost/object", 302));
230
- mock("GET@/localhost-link", (_req) => new Response(`<html>
223
+ esm_default.get("https://example.com/localhost-redirect", {
224
+ status: 302,
225
+ headers: { Location: "https://localhost/object" }
226
+ });
227
+ esm_default.get("https://example.com/localhost-link", {
228
+ body: `<html>
231
229
  <head>
232
230
  <meta charset=utf-8>
233
231
  <link
@@ -235,10 +233,15 @@ test("getDocumentLoader()", async (t) => {
235
233
  type='application/activity+json'
236
234
  href="https://localhost/object">
237
235
  </head>
238
- </html>`, {
239
- status: 200,
236
+ </html>`,
240
237
  headers: { "Content-Type": "text/html; charset=utf-8" }
241
- }));
238
+ });
239
+ esm_default.get("https://localhost/object", { body: {
240
+ "@context": "https://www.w3.org/ns/activitystreams",
241
+ id: "https://localhost/object",
242
+ name: "Fetched object",
243
+ type: "Object"
244
+ } });
242
245
  await t.step("allowPrivateAddress: false", async () => {
243
246
  await assertRejects(() => fetchDocumentLoader("https://localhost/object"), UrlError);
244
247
  await assertRejects(() => fetchDocumentLoader("https://example.com/localhost-redirect"), UrlError);
@@ -251,7 +254,7 @@ test("getDocumentLoader()", async (t) => {
251
254
  documentUrl: "https://localhost/object",
252
255
  document: {
253
256
  "@context": "https://www.w3.org/ns/activitystreams",
254
- id: "https://example.com/object",
257
+ id: "https://localhost/object",
255
258
  name: "Fetched object",
256
259
  type: "Object"
257
260
  }
@@ -260,7 +263,7 @@ test("getDocumentLoader()", async (t) => {
260
263
  assertEquals(await fetchDocumentLoader2("https://example.com/localhost-redirect"), expected);
261
264
  assertEquals(await fetchDocumentLoader2("https://example.com/localhost-link"), expected);
262
265
  });
263
- uninstall();
266
+ esm_default.hardReset();
264
267
  });
265
268
  test("kvCache()", async (t) => {
266
269
  const kv = new MemoryKvStore();
@@ -3,24 +3,24 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { assertEquals } from "../assert_equals-ClvzlhZu.js";
7
- import "../assert-Dv75vaGI.js";
8
- import "../assert_instance_of--9UCVKsi.js";
9
- import "../docloader-DdQSFoDK.js";
6
+ import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
7
+ import "../assert-YJk-1DlZ.js";
8
+ import "../assert_instance_of-DBIoG5k7.js";
9
+ import "../docloader-BXc5egq6.js";
10
10
  import "../url-kTAI6_KP.js";
11
11
  import "../multibase-DeCHcK8L.js";
12
- import { exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../vocab-7mZSoHR0.js";
12
+ import { exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../vocab-CaZSjoCB.js";
13
13
  import "../langstr-DbWheeIS.js";
14
- import "../lookup-CNK83LQK.js";
14
+ import "../lookup-Ds1_3qy2.js";
15
15
  import "../type-D2s5lmbZ.js";
16
- import "../actor-DIk6hH_U.js";
17
- import { exportJwk, importJwk } from "../key-DnZNsfoE.js";
16
+ import "../actor-DezwbbQX.js";
17
+ import { exportJwk, importJwk } from "../key-D0WW7EHK.js";
18
18
  import { test } from "../testing-jcGLO9Lp.js";
19
- import "../std__assert-CaBUULmX.js";
20
- import "../assert_rejects-FOHCtlD2.js";
21
- import "../assert_is_error-D162gXcM.js";
22
- import "../assert_not_equals-Cyf5m9Ke.js";
23
- import "../assert_throws-CRfQJvVx.js";
19
+ import "../std__assert-CHXwj7zk.js";
20
+ import "../assert_rejects-BZjUwo62.js";
21
+ import "../assert_is_error-jyzqjHud.js";
22
+ import "../assert_not_equals-wx-SRs4i.js";
23
+ import "../assert_throws-gBPv3v2V.js";
24
24
 
25
25
  //#region runtime/key.test.ts
26
26
  const rsaSpki = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxsRuvCkgJtflBTl4OVsm\nnt/J1mQfZasfJtN33dcZ3d1lJroxmgmMu69zjGEAwkNbMQaWNLqC4eogkJaeJ4RR\n5MHYXkL9nNilVoTkjX5BVit3puzs7XJ7WQnKQgQMI+ezn24GHsZ/v1JIo77lerX5\nk4HNwTNVt+yaZVQWaOMR3+6FwziQR6kd0VuG9/a9dgAnz2cEoORRC1i4W7IZaB1s\nZnh1WbHbevlGd72HSXll5rocPIHn8gq6xpBgpHwRphlRsgn4KHaJ6brXDIJjrnQh\nIe/YUBOGj/ImSEXhRwlFerKsoAVnZ0Hwbfa46qk44TAt8CyoPMWmpK6pt0ng4pQ2\nuwIDAQAB\n-----END PUBLIC KEY-----\n";
@@ -3,16 +3,16 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { assertEquals } from "../assert_equals-ClvzlhZu.js";
7
- import "../assert-Dv75vaGI.js";
8
- import "../assert_instance_of--9UCVKsi.js";
6
+ import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
7
+ import "../assert-YJk-1DlZ.js";
8
+ import "../assert_instance_of-DBIoG5k7.js";
9
9
  import { LanguageString } from "../langstr-DbWheeIS.js";
10
10
  import { test } from "../testing-jcGLO9Lp.js";
11
- import "../std__assert-CaBUULmX.js";
12
- import "../assert_rejects-FOHCtlD2.js";
13
- import "../assert_is_error-D162gXcM.js";
14
- import "../assert_not_equals-Cyf5m9Ke.js";
15
- import "../assert_throws-CRfQJvVx.js";
11
+ import "../std__assert-CHXwj7zk.js";
12
+ import "../assert_rejects-BZjUwo62.js";
13
+ import "../assert_is_error-jyzqjHud.js";
14
+ import "../assert_not_equals-wx-SRs4i.js";
15
+ import "../assert_throws-gBPv3v2V.js";
16
16
  import { parseLanguageTag } from "@phensley/language-tag";
17
17
  import util from "node:util";
18
18
 
@@ -1,8 +1,8 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import "../kv-BmsWxOQ2.js";
4
- import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError$1 as FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader$1 as fetchDocumentLoader, getDocumentLoader$1 as getDocumentLoader, getUserAgent$1 as getUserAgent, kvCache$1 as kvCache } from "../docloader-DTRsVZPo.js";
5
- import { LanguageString$1 as LanguageString } from "../vocab-C4bpdeio.js";
6
- import "../http-CZyKN-rt.js";
7
- import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "../mod-iE_61Xjt.js";
3
+ import "../kv-p8sC8PTT.js";
4
+ import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "../docloader-DlUDOVSe.js";
5
+ import { LanguageString } from "../vocab-DSFLLLe6.js";
6
+ import "../http-BkUCISGt.js";
7
+ import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "../mod-BTHfUeLo.js";
8
8
  export { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetAuthenticatedDocumentLoaderOptions, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, LanguageString, RemoteDocument, exportMultibaseKey, exportSpki, fetchDocumentLoader, getAuthenticatedDocumentLoader, getDocumentLoader, getUserAgent, importMultibaseKey, importPem, importPkcs1, importSpki, kvCache };
@@ -2,12 +2,12 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "../docloader-BesQV-nU.js";
6
- import { LanguageString, exportMultibaseKey$1 as exportMultibaseKey, exportSpki$1 as exportSpki, importMultibaseKey$1 as importMultibaseKey, importPem$1 as importPem, importPkcs1$1 as importPkcs1, importSpki$1 as importSpki } from "../actor-DvmEmDn9.js";
7
- import "../lookup-B38eCiCI.js";
8
- import "../key-C_i44VCP.js";
9
- import "../http-DKFoMKYk.js";
10
- import { getAuthenticatedDocumentLoader$1 as getAuthenticatedDocumentLoader } from "../authdocloader-Bt52x-cz.js";
5
+ import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "../docloader-BFRgyDAa.js";
6
+ import { LanguageString, exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../actor-CwAL6Q82.js";
7
+ import "../lookup-C8V37GPa.js";
8
+ import "../key-CD8i4ZB_.js";
9
+ import "../http-DC3mY9EG.js";
10
+ import { getAuthenticatedDocumentLoader } from "../authdocloader-Df1y1MKv.js";
11
11
  import "../runtime-BSkOVUWM.js";
12
12
 
13
13
  export { FetchError, LanguageString, exportMultibaseKey, exportSpki, fetchDocumentLoader, getAuthenticatedDocumentLoader, getDocumentLoader, getUserAgent, importMultibaseKey, importPem, importPkcs1, importSpki, kvCache };
@@ -3,16 +3,16 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { assertEquals } from "../../assert_equals-ClvzlhZu.js";
7
- import "../../assert-Dv75vaGI.js";
8
- import "../../assert_instance_of--9UCVKsi.js";
6
+ import { assertEquals } from "../../assert_equals-Dnj7ejjL.js";
7
+ import "../../assert-YJk-1DlZ.js";
8
+ import "../../assert_instance_of-DBIoG5k7.js";
9
9
  import { codes, decode, decodeText, encode, encodeText, names } from "../../multibase-DeCHcK8L.js";
10
10
  import { test } from "../../testing-jcGLO9Lp.js";
11
- import "../../std__assert-CaBUULmX.js";
12
- import "../../assert_rejects-FOHCtlD2.js";
13
- import "../../assert_is_error-D162gXcM.js";
14
- import "../../assert_not_equals-Cyf5m9Ke.js";
15
- import "../../assert_throws-CRfQJvVx.js";
11
+ import "../../std__assert-CHXwj7zk.js";
12
+ import "../../assert_rejects-BZjUwo62.js";
13
+ import "../../assert_is_error-jyzqjHud.js";
14
+ import "../../assert_not_equals-wx-SRs4i.js";
15
+ import "../../assert_throws-gBPv3v2V.js";
16
16
 
17
17
  //#region runtime/multibase/multibase.test.ts
18
18
  test("multibase.encode and decode", async (t) => {
@@ -3,12 +3,12 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { assertEquals } from "../assert_equals-ClvzlhZu.js";
7
- import { assert } from "../assert-Dv75vaGI.js";
6
+ import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
7
+ import { assert } from "../assert-YJk-1DlZ.js";
8
8
  import { UrlError, expandIPv6Address, isValidPublicIPv4Address, isValidPublicIPv6Address, validatePublicUrl } from "../url-kTAI6_KP.js";
9
9
  import { test } from "../testing-jcGLO9Lp.js";
10
- import { assertFalse, assertRejects } from "../assert_rejects-FOHCtlD2.js";
11
- import "../assert_is_error-D162gXcM.js";
10
+ import { assertFalse, assertRejects } from "../assert_rejects-BZjUwo62.js";
11
+ import "../assert_is_error-jyzqjHud.js";
12
12
 
13
13
  //#region runtime/url.test.ts
14
14
  test("validatePublicUrl()", async () => {
@@ -3,8 +3,8 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default } from "./docloader-DdQSFoDK.js";
7
- import { doubleKnock } from "./http-nvlEiwC4.js";
6
+ import { deno_default } from "./docloader-BXc5egq6.js";
7
+ import { doubleKnock } from "./http-3CJyDlPz.js";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
10
10
 
@@ -27,7 +27,7 @@ function extractInboxes({ recipients, preferSharedInbox, excludeBaseUris }) {
27
27
  if (inbox != null && recipient.id != null) {
28
28
  if (excludeBaseUris != null && excludeBaseUris.some((u) => u.origin === inbox?.origin)) continue;
29
29
  inboxes[inbox.href] ??= {
30
- actorIds: new Set(),
30
+ actorIds: /* @__PURE__ */ new Set(),
31
31
  sharedInbox
32
32
  };
33
33
  inboxes[inbox.href].actorIds.add(recipient.id.href);
@@ -3,28 +3,28 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { assertEquals } from "../assert_equals-ClvzlhZu.js";
7
- import { assert } from "../assert-Dv75vaGI.js";
8
- import "../assert_instance_of--9UCVKsi.js";
9
- import "../docloader-DdQSFoDK.js";
6
+ import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
7
+ import { assert } from "../assert-YJk-1DlZ.js";
8
+ import "../assert_instance_of-DBIoG5k7.js";
9
+ import "../docloader-BXc5egq6.js";
10
10
  import "../url-kTAI6_KP.js";
11
11
  import "../multibase-DeCHcK8L.js";
12
- import { exportSpki } from "../vocab-7mZSoHR0.js";
12
+ import { exportSpki } from "../vocab-CaZSjoCB.js";
13
13
  import "../langstr-DbWheeIS.js";
14
- import "../lookup-CNK83LQK.js";
14
+ import "../lookup-Ds1_3qy2.js";
15
15
  import "../type-D2s5lmbZ.js";
16
- import "../actor-DIk6hH_U.js";
17
- import { exportJwk } from "../key-DnZNsfoE.js";
18
- import { createRfc9421SignatureBase, doubleKnock, formatRfc9421Signature, formatRfc9421SignatureParameters, parseRfc9421Signature, parseRfc9421SignatureInput, signRequest, timingSafeEqual, verifyRequest } from "../http-nvlEiwC4.js";
16
+ import "../actor-DezwbbQX.js";
17
+ import { exportJwk } from "../key-D0WW7EHK.js";
18
+ import { createRfc9421SignatureBase, doubleKnock, formatRfc9421Signature, formatRfc9421SignatureParameters, parseRfc9421Signature, parseRfc9421SignatureInput, signRequest, timingSafeEqual, verifyRequest } from "../http-3CJyDlPz.js";
19
19
  import { test } from "../testing-jcGLO9Lp.js";
20
- import { assertExists, assertStringIncludes } from "../std__assert-CaBUULmX.js";
21
- import { assertFalse } from "../assert_rejects-FOHCtlD2.js";
22
- import "../assert_is_error-D162gXcM.js";
23
- import "../assert_not_equals-Cyf5m9Ke.js";
24
- import "../assert_throws-CRfQJvVx.js";
20
+ import { assertExists, assertStringIncludes } from "../std__assert-CHXwj7zk.js";
21
+ import { assertFalse } from "../assert_rejects-BZjUwo62.js";
22
+ import "../assert_is_error-jyzqjHud.js";
23
+ import "../assert_not_equals-wx-SRs4i.js";
24
+ import "../assert_throws-gBPv3v2V.js";
25
25
  import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
26
- import { rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey5 } from "../keys-R9p0S8_o.js";
27
- import { install, mock, uninstall } from "../hongminhee__deno-mock-fetch-DJKLj_H-.js";
26
+ import { rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey5 } from "../keys-BIY57kjo.js";
27
+ import { esm_default } from "../esm-Btx3E8og.js";
28
28
  import { encodeBase64 } from "byte-encodings/base64";
29
29
 
30
30
  //#region sig/http.test.ts
@@ -624,11 +624,12 @@ test("verifyRequest() [rfc9421] test vector from Mastodon", async () => {
624
624
  assertEquals(await exportSpki(result2.publicKey), await exportSpki(rsaPublicKey5.publicKey));
625
625
  });
626
626
  test("doubleKnock() function with successful first attempt", async () => {
627
- install();
627
+ esm_default.spyGlobal();
628
628
  let requestCount = 0;
629
629
  let firstRequestSpec = null;
630
- mock("POST@/inbox-accepts-rfc9421", (req) => {
630
+ esm_default.post("https://example.com/inbox-accepts-rfc9421", (cl) => {
631
631
  requestCount++;
632
+ const req = cl.request;
632
633
  const signatureInputHeader = req.headers.get("Signature-Input");
633
634
  const signatureHeader = req.headers.get("Signature");
634
635
  if (signatureInputHeader && signatureHeader) {
@@ -668,14 +669,15 @@ test("doubleKnock() function with successful first attempt", async () => {
668
669
  assertExists(loggedRequest, "Request should be logged");
669
670
  assert(loggedRequest?.headers.has("Signature-Input"), "Logged request should have RFC 9421 Signature-Input header");
670
671
  assert(loggedRequest?.headers.has("Signature"), "Logged request should have RFC 9421 Signature header");
671
- uninstall();
672
+ esm_default.hardReset();
672
673
  });
673
674
  test("doubleKnock() function with fallback to draft-cavage", async () => {
674
- install();
675
+ esm_default.spyGlobal();
675
676
  let requestCount = 0;
676
677
  let firstSpec = null;
677
678
  let secondSpec = null;
678
- mock("POST@/inbox-accepts-draft-cavage", (req) => {
679
+ esm_default.post("https://example.com/inbox-accepts-draft-cavage", (cl) => {
680
+ const req = cl.request;
679
681
  requestCount++;
680
682
  if (req.headers.has("Signature-Input")) {
681
683
  firstSpec = "rfc9421";
@@ -711,19 +713,19 @@ test("doubleKnock() function with fallback to draft-cavage", async () => {
711
713
  assertEquals(secondSpec, "draft-cavage-http-signatures-12", "Second attempt should use draft-cavage");
712
714
  assertEquals(specDeterminer.rememberedOrigin, "https://example.com", "Origin should be remembered");
713
715
  assertEquals(specDeterminer.rememberedSpec, "draft-cavage-http-signatures-12", "Successful spec should be remembered");
714
- uninstall();
716
+ esm_default.hardReset();
715
717
  });
716
718
  test("doubleKnock() function with redirect handling", async () => {
717
- install();
719
+ esm_default.spyGlobal();
718
720
  const requestedUrls = [];
719
721
  const responseCodes = [];
720
- mock("POST@/redirect-endpoint", (req) => {
721
- requestedUrls.push(req.url);
722
+ esm_default.post("https://example.com/redirect-endpoint", (cl) => {
723
+ requestedUrls.push(cl.url);
722
724
  responseCodes.push(302);
723
725
  return Response.redirect("https://example.com/final-endpoint", 302);
724
726
  });
725
- mock("POST@/final-endpoint", (req) => {
726
- requestedUrls.push(req.url);
727
+ esm_default.post("https://example.com/final-endpoint", (cl) => {
728
+ requestedUrls.push(cl.url);
727
729
  responseCodes.push(202);
728
730
  return new Response("", { status: 202 });
729
731
  });
@@ -741,13 +743,14 @@ test("doubleKnock() function with redirect handling", async () => {
741
743
  assertEquals(requestedUrls[0], "https://example.com/redirect-endpoint", "First request should be to redirect-endpoint");
742
744
  assertEquals(requestedUrls[1], "https://example.com/final-endpoint", "Second request should be to final-endpoint");
743
745
  assertEquals(responseCodes, [302, 202], "Response status codes should match expected sequence");
744
- uninstall();
746
+ esm_default.hardReset();
745
747
  });
746
748
  test("doubleKnock() function with both specs rejected", async () => {
747
- install();
749
+ esm_default.spyGlobal();
748
750
  let requestCount = 0;
749
751
  const attempts = [];
750
- mock("POST@/inbox-rejects-all", (req) => {
752
+ esm_default.post("https://example.com/inbox-rejects-all", (cl) => {
753
+ const req = cl.request;
751
754
  requestCount++;
752
755
  if (req.headers.has("Signature-Input")) attempts.push("rfc9421");
753
756
  else if (req.headers.has("Signature")) attempts.push("draft-cavage");
@@ -768,13 +771,14 @@ test("doubleKnock() function with both specs rejected", async () => {
768
771
  assertEquals(attempts.length, 2, "Two signature attempts should have been made");
769
772
  assertEquals(attempts[0], "rfc9421", "First attempt should use RFC 9421");
770
773
  assertEquals(attempts[1], "draft-cavage", "Second attempt should use draft-cavage");
771
- uninstall();
774
+ esm_default.hardReset();
772
775
  });
773
776
  test("doubleKnock() function with specDeterminer choosing draft-cavage first", async () => {
774
- install();
777
+ esm_default.spyGlobal();
775
778
  let requestCount = 0;
776
779
  let firstSpec = null;
777
- mock("POST@/inbox-accepts-any", (req) => {
780
+ esm_default.post("https://example.com/inbox-accepts-any", (cl) => {
781
+ const req = cl.request;
778
782
  requestCount++;
779
783
  if (req.headers.has("Signature-Input")) firstSpec = "rfc9421";
780
784
  else if (req.headers.has("Signature")) firstSpec = "draft-cavage";
@@ -798,25 +802,25 @@ test("doubleKnock() function with specDeterminer choosing draft-cavage first", a
798
802
  assertEquals(response.status, 202, "Response status should be 202 Accepted");
799
803
  assertEquals(requestCount, 1, "Only one request should have been made");
800
804
  assertEquals(firstSpec, "draft-cavage", "First attempt should use draft-cavage");
801
- uninstall();
805
+ esm_default.hardReset();
802
806
  });
803
807
  test("doubleKnock() complex redirect chain test", async () => {
804
- install();
808
+ esm_default.spyGlobal();
805
809
  const requestedUrls = [];
806
- mock("POST@/redirect1", (req) => {
807
- requestedUrls.push(req.url);
810
+ esm_default.post("https://example.com/redirect1", (cl) => {
811
+ requestedUrls.push(cl.url);
808
812
  return Response.redirect("https://example.com/redirect2", 302);
809
813
  });
810
- mock("POST@/redirect2", (req) => {
811
- requestedUrls.push(req.url);
814
+ esm_default.post("https://example.com/redirect2", (cl) => {
815
+ requestedUrls.push(cl.url);
812
816
  return Response.redirect("https://example.com/redirect3", 307);
813
817
  });
814
- mock("POST@/redirect3", (req) => {
815
- requestedUrls.push(req.url);
818
+ esm_default.post("https://example.com/redirect3", (cl) => {
819
+ requestedUrls.push(cl.url);
816
820
  return Response.redirect("https://example.com/final", 301);
817
821
  });
818
- mock("POST@/final", (req) => {
819
- requestedUrls.push(req.url);
822
+ esm_default.post("https://example.com/final", (cl) => {
823
+ requestedUrls.push(cl.url);
820
824
  return new Response("Success", { status: 200 });
821
825
  });
822
826
  const request = new Request("https://example.com/redirect1", {
@@ -841,13 +845,14 @@ test("doubleKnock() complex redirect chain test", async () => {
841
845
  assertEquals(requestedUrls[3], "https://example.com/final", "Fourth request should be to final");
842
846
  assertEquals(logs.length, 4, "Four requests should have been logged");
843
847
  for (const loggedReq of logs) assert(loggedReq.headers.has("Signature-Input") || loggedReq.headers.has("Signature"), "Each request should be signed with either RFC 9421 or draft-cavage");
844
- uninstall();
848
+ esm_default.hardReset();
845
849
  });
846
850
  test("doubleKnock() async specDeterminer test", async () => {
847
- install();
851
+ esm_default.spyGlobal();
848
852
  let requestCount = 0;
849
853
  let specUsed = null;
850
- mock("POST@/inbox-async-determiner", (req) => {
854
+ esm_default.post("https://example.com/inbox-async-determiner", (cl) => {
855
+ const req = cl.request;
851
856
  requestCount++;
852
857
  if (req.headers.has("Signature-Input")) specUsed = "rfc9421";
853
858
  else if (req.headers.has("Signature")) specUsed = "draft-cavage-http-signatures-12";
@@ -874,7 +879,7 @@ test("doubleKnock() async specDeterminer test", async () => {
874
879
  assertEquals(response.status, 202, "Response status should be 202 Accepted");
875
880
  assertEquals(requestCount, 1, "Only one request should have been made");
876
881
  assertEquals(specUsed, "draft-cavage-http-signatures-12", "Should use spec from async determiner");
877
- uninstall();
882
+ esm_default.hardReset();
878
883
  });
879
884
  test("timingSafeEqual()", async (t) => {
880
885
  await t.step("should return true for equal empty arrays", () => {