@fedify/fedify 2.0.7 → 2.0.9

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 (203) hide show
  1. package/dist/{assert-MZs1qjMx.js → assert-ddO5KLpe.mjs} +5 -9
  2. package/dist/{assert_equals-DSbWqCm3.js → assert_equals-Ew3jOFa3.mjs} +55 -69
  3. package/dist/{assert_instance_of-DHz7EHNU.js → assert_instance_of-C4Ri6VuN.mjs} +5 -9
  4. package/dist/{assert_not_equals-C80BG-_5.js → assert_not_equals--wG9hV7u.mjs} +6 -13
  5. package/dist/{assert_rejects-Ce45JcFg.js → assert_rejects-B-qJtC9Z.mjs} +6 -11
  6. package/dist/{assert_throws-BNXdRGWP.js → assert_throws-4NwKEy2q.mjs} +5 -10
  7. package/dist/{builder-DA7Qgx_F.js → builder-DDoQaGOu.mjs} +32 -41
  8. package/dist/{chunk-CGaQZ11T.cjs → chunk-DDcVe30Y.cjs} +23 -24
  9. package/dist/{chunk-DJNbSFdH.js → chunk-nlSIicah.js} +8 -8
  10. package/dist/{client-CoCIaTNO.js → client-A1UrnX6I.mjs} +9 -13
  11. package/dist/{client-BxMZiQaD.d.ts → client-AtlibPOU.d.ts} +1 -1
  12. package/dist/{client-C97KOq3x.d.cts → client-z-8dc-e1.d.cts} +1 -1
  13. package/dist/{collection-CcnIw1qY.js → collection-ChgDTHLz.mjs} +7 -12
  14. package/dist/compat/mod.cjs +5 -8
  15. package/dist/compat/mod.d.cts +78 -6
  16. package/dist/compat/mod.d.ts +78 -6
  17. package/dist/compat/mod.js +4 -8
  18. package/dist/compat/transformers.test.mjs +62 -0
  19. package/dist/{context-D3QkEtZd.d.cts → context-CNIt-Qn7.d.cts} +9 -18
  20. package/dist/{context-DZJhUmzF.d.ts → context-Dyg7P1qW.d.ts} +9 -18
  21. package/dist/{context-pa9aIrwp.js → context-Juj6bdHC.mjs} +7 -11
  22. package/dist/deno-CuVDEdyj.mjs +8 -0
  23. package/dist/{docloader-CJeSPcS_.js → docloader-BPq9yzC_.mjs} +8 -14
  24. package/dist/{esm-nLm00z9V.js → esm-DVILvP5e.mjs} +50 -89
  25. package/dist/federation/builder.test.d.mts +2 -0
  26. package/dist/federation/{builder.test.js → builder.test.mjs} +19 -38
  27. package/dist/federation/collection.test.d.mts +2 -0
  28. package/dist/federation/collection.test.mjs +21 -0
  29. package/dist/federation/handler.test.d.mts +2 -0
  30. package/dist/federation/{handler.test.js → handler.test.mjs} +26 -56
  31. package/dist/federation/idempotency.test.d.mts +2 -0
  32. package/dist/federation/{idempotency.test.js → idempotency.test.mjs} +31 -62
  33. package/dist/federation/inbox.test.d.mts +2 -0
  34. package/dist/federation/{inbox.test.js → inbox.test.mjs} +8 -12
  35. package/dist/federation/keycache.test.d.mts +2 -0
  36. package/dist/federation/{keycache.test.js → keycache.test.mjs} +13 -13
  37. package/dist/federation/kv.test.d.mts +2 -0
  38. package/dist/federation/{kv.test.js → kv.test.mjs} +11 -22
  39. package/dist/federation/middleware.test.d.mts +2 -0
  40. package/dist/federation/{middleware.test.js → middleware.test.mjs} +146 -225
  41. package/dist/federation/mod.cjs +327 -16
  42. package/dist/federation/mod.d.cts +3 -6
  43. package/dist/federation/mod.d.ts +3 -6
  44. package/dist/federation/mod.js +322 -13
  45. package/dist/federation/mq.test.d.mts +2 -0
  46. package/dist/federation/{mq.test.js → mq.test.mjs} +21 -35
  47. package/dist/federation/negotiation.test.d.mts +2 -0
  48. package/dist/federation/{negotiation.test.js → negotiation.test.mjs} +9 -16
  49. package/dist/federation/retry.test.d.mts +2 -0
  50. package/dist/federation/{retry.test.js → retry.test.mjs} +8 -11
  51. package/dist/federation/router.test.d.mts +2 -0
  52. package/dist/federation/{router.test.js → router.test.mjs} +11 -16
  53. package/dist/federation/send.test.d.mts +2 -0
  54. package/dist/federation/{send.test.js → send.test.mjs} +22 -29
  55. package/dist/federation/webfinger.test.d.mts +2 -0
  56. package/dist/federation/{webfinger.test.js → webfinger.test.mjs} +22 -55
  57. package/dist/{http-DkHdFfrc.d.ts → http-B2wiNmSo.d.ts} +1 -6
  58. package/dist/{http-B3vAjAtl.js → http-Bz7avX57.js} +39 -159
  59. package/dist/{http-Cz3MlXAZ.d.cts → http-C_tEAiZj.d.cts} +1 -6
  60. package/dist/{http-CjaLjnRN.js → http-DI213UHg.mjs} +31 -35
  61. package/dist/{http-CQ7TiYUI.cjs → http-DKBDoudA.cjs} +119 -233
  62. package/dist/{inbox-B33isX44.js → inbox-Bdn-CSRd.mjs} +18 -26
  63. package/dist/{key-Cga1p73u.js → key-DzJf84o7.mjs} +12 -19
  64. package/dist/{keycache-DRxpZ5r9.js → keycache-DaQ3ndaJ.mjs} +15 -10
  65. package/dist/{keys-ZbcByPg9.js → keys-CtZLJq76.mjs} +5 -9
  66. package/dist/{kv-QzKcOQgP.js → kv-BrZHNugx.mjs} +6 -10
  67. package/dist/{kv-BL4nlICN.d.cts → kv-CbLNp3zQ.d.cts} +1 -1
  68. package/dist/{kv-DXEUEP6z.d.ts → kv-GFYnFoOl.d.ts} +1 -1
  69. package/dist/{kv-cache-CFdy0BpZ.js → kv-cache-DBd7BezJ.js} +6 -13
  70. package/dist/{kv-cache--qyREO7e.cjs → kv-cache-Dj1Q7TiW.cjs} +27 -34
  71. package/dist/{kv-cache-El7We5sy.js → kv-cache-OWmRLHir.mjs} +4 -8
  72. package/dist/{ld-BWSOukKj.js → ld-DczS1fLK.mjs} +17 -31
  73. package/dist/middleware-B5CiOImA.mjs +5 -0
  74. package/dist/{middleware-CP7JdsGq.js → middleware-BKNu57ZI.js} +331 -365
  75. package/dist/middleware-C36TOX-2.cjs +4 -0
  76. package/dist/{middleware-Scz2k9eL.cjs → middleware-CyjmpK70.cjs} +523 -565
  77. package/dist/{middleware-BI1VCuPT.js → middleware-DoHz9oIo.mjs} +260 -292
  78. package/dist/{mod-DPkRU3EK.d.cts → mod-1xhgsHef.d.cts} +2 -2
  79. package/dist/{mod-DUWcVv49.d.ts → mod-BGtYJZKu.d.ts} +2 -2
  80. package/dist/{mod-DXsQakeS.d.cts → mod-Bld7oeqf.d.cts} +3 -3
  81. package/dist/{mod-DnSsduJF.d.ts → mod-BnAKGh2w.d.ts} +2 -2
  82. package/dist/{mod-CwZXZJ9d.d.ts → mod-DTOUyCce.d.ts} +3 -3
  83. package/dist/{mod-Di3W5OdP.d.cts → mod-DWoQffTD.d.cts} +2 -2
  84. package/dist/mod.cjs +29 -68
  85. package/dist/mod.d.cts +11 -14
  86. package/dist/mod.d.ts +11 -15
  87. package/dist/mod.js +17 -65
  88. package/dist/{negotiation-5NPJL6zp.js → negotiation-BehA2uul.mjs} +7 -11
  89. package/dist/nodeinfo/client.test.d.mts +2 -0
  90. package/dist/nodeinfo/{client.test.js → client.test.mjs} +22 -40
  91. package/dist/nodeinfo/handler.test.d.mts +2 -0
  92. package/dist/nodeinfo/{handler.test.js → handler.test.mjs} +13 -42
  93. package/dist/nodeinfo/mod.cjs +5 -8
  94. package/dist/nodeinfo/mod.d.cts +2 -3
  95. package/dist/nodeinfo/mod.d.ts +2 -3
  96. package/dist/nodeinfo/mod.js +4 -8
  97. package/dist/nodeinfo/types.test.d.mts +2 -0
  98. package/dist/nodeinfo/{types.test.js → types.test.mjs} +9 -16
  99. package/dist/otel/exporter.test.d.mts +2 -0
  100. package/dist/otel/{exporter.test.js → exporter.test.mjs} +117 -169
  101. package/dist/otel/mod.cjs +15 -20
  102. package/dist/otel/mod.d.cts +2 -2
  103. package/dist/otel/mod.d.ts +2 -2
  104. package/dist/otel/mod.js +8 -14
  105. package/dist/{owner-gd0Q9FuU.d.ts → owner-74ARJ5TL.d.ts} +1 -1
  106. package/dist/{owner-1AbPBOOZ.d.cts → owner-CptqhsOy.d.cts} +1 -1
  107. package/dist/{owner-HASxJJP1.js → owner-DXMGUEOr.mjs} +11 -16
  108. package/dist/{proof-BwfRl5J4.js → proof-C-7NljBU.js} +33 -59
  109. package/dist/{proof-BXt2Oi8t.js → proof-CEOujj0L.mjs} +21 -33
  110. package/dist/{proof-BYZ4hcgN.cjs → proof-DMu-6A_w.cjs} +133 -157
  111. package/dist/{retry-D4GJ670a.js → retry-Ddbq3AcK.mjs} +4 -7
  112. package/dist/{router-D9eI0s4b.js → router-CrMLXoOr.mjs} +4 -8
  113. package/dist/runtime/mod.cjs +11 -13
  114. package/dist/runtime/mod.d.cts +6 -2
  115. package/dist/runtime/mod.d.ts +0 -1
  116. package/dist/runtime/mod.js +4 -7
  117. package/dist/{send-BF3omx5-.js → send-DIfrLTB_.mjs} +8 -13
  118. package/dist/sig/http.test.d.mts +2 -0
  119. package/dist/sig/{http.test.js → http.test.mjs} +160 -199
  120. package/dist/sig/key.test.d.mts +2 -0
  121. package/dist/sig/{key.test.js → key.test.mjs} +11 -18
  122. package/dist/sig/ld.test.d.mts +2 -0
  123. package/dist/sig/{ld.test.js → ld.test.mjs} +22 -35
  124. package/dist/sig/mod.cjs +6 -9
  125. package/dist/sig/mod.d.cts +3 -3
  126. package/dist/sig/mod.d.ts +3 -3
  127. package/dist/sig/mod.js +5 -9
  128. package/dist/sig/owner.test.d.mts +2 -0
  129. package/dist/sig/{owner.test.js → owner.test.mjs} +19 -34
  130. package/dist/sig/proof.test.d.mts +2 -0
  131. package/dist/sig/{proof.test.js → proof.test.mjs} +16 -27
  132. package/dist/{std__assert-DWivtrGR.js → std__assert-Duiq_YC9.mjs} +12 -24
  133. package/dist/testing/{mod.d.ts → mod.d.mts} +26 -78
  134. package/dist/testing/mod.mjs +6 -0
  135. package/dist/{transformers-3g8GZwkZ.cjs → transformers-NeAONrAq.cjs} +20 -25
  136. package/dist/{transformers-C3FLHUd6.js → transformers-ve6e2xcg.js} +3 -7
  137. package/dist/{types-CPz01LGH.js → types-C37hquWI.mjs} +4 -7
  138. package/dist/{types-Cd_hszr_.cjs → types-KC4QAoxe.cjs} +29 -34
  139. package/dist/{types-C93Ob9cU.js → types-hvL8ElAs.js} +8 -13
  140. package/dist/utils/docloader.test.d.mts +2 -0
  141. package/dist/utils/{docloader.test.js → docloader.test.mjs} +14 -24
  142. package/dist/utils/kv-cache.test.d.mts +2 -0
  143. package/dist/utils/{kv-cache.test.js → kv-cache.test.mjs} +25 -40
  144. package/dist/utils/mod.cjs +5 -9
  145. package/dist/utils/mod.d.cts +1 -3
  146. package/dist/utils/mod.d.ts +1 -3
  147. package/dist/utils/mod.js +4 -9
  148. package/dist/vocab/cjs.test.d.mts +2 -0
  149. package/dist/vocab/cjs.test.mjs +14 -0
  150. package/dist/vocab/mod.cjs +10 -12
  151. package/dist/vocab/mod.js +3 -5
  152. package/package.json +7 -7
  153. package/dist/compat/transformers.test.d.ts +0 -3
  154. package/dist/compat/transformers.test.js +0 -87
  155. package/dist/compat-Bb4NuTUO.js +0 -4
  156. package/dist/compat-DmDDELst.cjs +0 -4
  157. package/dist/deno-CbQK8e-e.js +0 -121
  158. package/dist/federation/builder.test.d.ts +0 -3
  159. package/dist/federation/collection.test.d.ts +0 -3
  160. package/dist/federation/collection.test.js +0 -32
  161. package/dist/federation/handler.test.d.ts +0 -3
  162. package/dist/federation/idempotency.test.d.ts +0 -3
  163. package/dist/federation/inbox.test.d.ts +0 -3
  164. package/dist/federation/keycache.test.d.ts +0 -3
  165. package/dist/federation/kv.test.d.ts +0 -3
  166. package/dist/federation/middleware.test.d.ts +0 -3
  167. package/dist/federation/mq.test.d.ts +0 -3
  168. package/dist/federation/negotiation.test.d.ts +0 -3
  169. package/dist/federation/retry.test.d.ts +0 -3
  170. package/dist/federation/router.test.d.ts +0 -3
  171. package/dist/federation/send.test.d.ts +0 -3
  172. package/dist/federation/webfinger.test.d.ts +0 -3
  173. package/dist/federation-Bp3HI26G.cjs +0 -350
  174. package/dist/federation-DaMfqRm4.js +0 -332
  175. package/dist/middleware-CcXQzfn8.cjs +0 -12
  176. package/dist/middleware-CoeaBowW.js +0 -12
  177. package/dist/middleware-vH2jFwC6.js +0 -26
  178. package/dist/mod-Bh8mqlYw.d.cts +0 -9
  179. package/dist/mod-D6HodEq7.d.ts +0 -7
  180. package/dist/mod-DVwHUI_x.d.cts +0 -80
  181. package/dist/mod-DosD6NsG.d.ts +0 -82
  182. package/dist/mod-gq_Xfdz8.d.cts +0 -1
  183. package/dist/nodeinfo/client.test.d.ts +0 -3
  184. package/dist/nodeinfo/handler.test.d.ts +0 -3
  185. package/dist/nodeinfo/types.test.d.ts +0 -3
  186. package/dist/nodeinfo-DoESQxq5.js +0 -4
  187. package/dist/nodeinfo-DuMYTpbZ.cjs +0 -4
  188. package/dist/otel/exporter.test.d.ts +0 -3
  189. package/dist/runtime-c2Njxsry.cjs +0 -17
  190. package/dist/runtime-poamPCMb.js +0 -13
  191. package/dist/sig/http.test.d.ts +0 -3
  192. package/dist/sig/key.test.d.ts +0 -3
  193. package/dist/sig/ld.test.d.ts +0 -3
  194. package/dist/sig/owner.test.d.ts +0 -3
  195. package/dist/sig/proof.test.d.ts +0 -3
  196. package/dist/sig-BNhspNOf.js +0 -4
  197. package/dist/sig-vX39WyWI.cjs +0 -4
  198. package/dist/testing/mod.js +0 -10
  199. package/dist/utils/docloader.test.d.ts +0 -3
  200. package/dist/utils/kv-cache.test.d.ts +0 -3
  201. package/dist/utils-BQ9KqEK9.cjs +0 -4
  202. package/dist/utils-Dn5OPdSW.js +0 -4
  203. /package/dist/{mod-AGjRfPjT.d.ts → compat/transformers.test.d.mts} +0 -0
@@ -1,11 +1,10 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- globalThis.addEventListener = () => {};
4
3
  import { testDefinitions } from "@fedify/fixture";
5
4
  import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, TraverseCollectionOptions } from "@fedify/vocab";
6
- import { DocumentLoader, GetUserAgentOptions } from "@fedify/vocab-runtime";
7
5
  import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "@fedify/webfinger";
8
6
  import { TracerProvider } from "@opentelemetry/api";
7
+ import { DocumentLoader, GetUserAgentOptions } from "@fedify/vocab-runtime";
9
8
 
10
9
  //#region src/nodeinfo/types.d.ts
11
10
  /**
@@ -131,12 +130,6 @@ interface Usage {
131
130
  */
132
131
  readonly localComments: number;
133
132
  }
134
- /**
135
- * Converts a {@link NodeInfo} object to a JSON value.
136
- * @param nodeInfo The {@link NodeInfo} object to convert.
137
- * @returns The JSON value that complies with the NodeInfo schema.
138
- * @throws {TypeError} If the {@link NodeInfo} object is invalid.
139
- */
140
133
  //#endregion
141
134
  //#region src/nodeinfo/client.d.ts
142
135
  /**
@@ -172,18 +165,6 @@ interface GetNodeInfoOptions {
172
165
  */
173
166
  userAgent?: GetUserAgentOptions | string;
174
167
  }
175
- /**
176
- * Fetches a NodeInfo document from the given URL.
177
- * @param url The base URL of the server. If `options.direct` is turned off
178
- * (default), the NodeInfo document will be fetched from
179
- * the `.well-known` location of this URL (hence the only origin
180
- * of the URL is used). If `options.direct` is turned on,
181
- * the NodeInfo document will be fetched from the given URL.
182
- * @param options Options for fetching the NodeInfo document.
183
- * @returns The NodeInfo document if it could be fetched successfully.
184
- * Otherwise, `undefined` is returned.
185
- * @since 1.2.0
186
- */
187
168
  //#endregion
188
169
  //#region src/sig/owner.d.ts
189
170
  /**
@@ -206,16 +187,6 @@ interface GetKeyOwnerOptions {
206
187
  */
207
188
  tracerProvider?: TracerProvider;
208
189
  }
209
- /**
210
- * Gets the actor that owns the specified key. Returns `null` if the key has no
211
- * known owner.
212
- *
213
- * @param keyId The ID of the key to check, or the key itself.
214
- * @param options Options for getting the key owner.
215
- * @returns The actor that owns the key, or `null` if the key has no known
216
- * owner.
217
- * @since 0.7.0
218
- */
219
190
  //#endregion
220
191
  //#region src/federation/collection.d.ts
221
192
  /**
@@ -226,14 +197,6 @@ interface PageItems<TItem> {
226
197
  readonly nextCursor?: string | null;
227
198
  readonly items: readonly TItem[];
228
199
  }
229
- /**
230
- * Calculates the [partial follower collection digest][1].
231
- *
232
- * [1]: https://w3id.org/fep/8fcf#partial-follower-collection-digest
233
- * @param uris The URIs to calculate the digest. Duplicate URIs are ignored.
234
- * @returns The digest.
235
- */
236
-
237
200
  //#endregion
238
201
  //#region src/federation/send.d.ts
239
202
  /**
@@ -250,10 +213,6 @@ interface SenderKeyPair {
250
213
  */
251
214
  readonly keyId: URL;
252
215
  }
253
- /**
254
- * Parameters for {@link sendActivity}.
255
- */
256
-
257
216
  /**
258
217
  * An error that is thrown when an activity fails to send to a remote inbox.
259
218
  * It contains structured information about the failure, including the HTTP
@@ -434,15 +393,6 @@ type SharedInboxKeyDispatcher<TContextData> = (context: Context<TContextData>) =
434
393
  } | {
435
394
  username: string;
436
395
  } | null>;
437
- /**
438
- * A callback that handles errors during outbox processing.
439
- *
440
- * @param error The error that occurred.
441
- * @param activity The activity that caused the error. If it is `null`, the
442
- * error occurred during deserializing the activity.
443
- * @since 0.6.0
444
- */
445
-
446
396
  /**
447
397
  * A callback that handles permanent delivery failures when sending activities
448
398
  * to remote inboxes.
@@ -464,13 +414,9 @@ type SharedInboxKeyDispatcher<TContextData> = (context: Context<TContextData>) =
464
414
  * @since 2.0.0
465
415
  */
466
416
  type OutboxPermanentFailureHandler<TContextData> = (context: Context<TContextData>, values: {
467
- /** The inbox URL that failed. */
468
- readonly inbox: URL;
469
- /** The activity that failed to deliver. */
470
- readonly activity: Activity;
471
- /** The error that occurred. */
472
- readonly error: SendActivityError;
473
- /** The HTTP status code returned by the inbox. */
417
+ /** The inbox URL that failed. */readonly inbox: URL; /** The activity that failed to deliver. */
418
+ readonly activity: Activity; /** The error that occurred. */
419
+ readonly error: SendActivityError; /** The HTTP status code returned by the inbox. */
474
420
  readonly statusCode: number;
475
421
  /**
476
422
  * The actor IDs that were supposed to receive the activity at this inbox.
@@ -1039,15 +985,6 @@ interface Federation<TContextData> extends Federatable<TContextData> {
1039
985
  */
1040
986
  fetch(request: Request, options: FederationFetchOptions<TContextData>): Promise<Response>;
1041
987
  }
1042
- /**
1043
- * A builder for creating a {@link Federation} object. It defers the actual
1044
- * instantiation of the {@link Federation} object until the {@link build}
1045
- * method is called so that dispatchers and listeners can be registered
1046
- * before the {@link Federation} object is instantiated.
1047
- * @template TContextData The context data to pass to the {@link Context}.
1048
- * @since 1.6.0
1049
- */
1050
-
1051
988
  /**
1052
989
  * Additional settings for the actor dispatcher.
1053
990
  *
@@ -1880,7 +1817,8 @@ type ParseUriResult =
1880
1817
  }
1881
1818
  /**
1882
1819
  * The case of an object URI.
1883
- */ | {
1820
+ */
1821
+ | {
1884
1822
  readonly type: "object";
1885
1823
  readonly class: ConstructorWithTypeId<Object$1>;
1886
1824
  readonly typeId: URL;
@@ -1888,59 +1826,68 @@ type ParseUriResult =
1888
1826
  }
1889
1827
  /**
1890
1828
  * The case of an shared inbox URI.
1891
- */ | {
1829
+ */
1830
+ | {
1892
1831
  readonly type: "inbox";
1893
1832
  readonly identifier: undefined;
1894
1833
  }
1895
1834
  /**
1896
1835
  * The case of an personal inbox URI.
1897
- */ | {
1836
+ */
1837
+ | {
1898
1838
  readonly type: "inbox";
1899
1839
  readonly identifier: string;
1900
1840
  }
1901
1841
  /**
1902
1842
  * The case of an outbox collection URI.
1903
- */ | {
1843
+ */
1844
+ | {
1904
1845
  readonly type: "outbox";
1905
1846
  readonly identifier: string;
1906
1847
  }
1907
1848
  /**
1908
1849
  * The case of a following collection URI.
1909
- */ | {
1850
+ */
1851
+ | {
1910
1852
  readonly type: "following";
1911
1853
  readonly identifier: string;
1912
1854
  }
1913
1855
  /**
1914
1856
  * The case of a followers collection URI.
1915
- */ | {
1857
+ */
1858
+ | {
1916
1859
  readonly type: "followers";
1917
1860
  readonly identifier: string;
1918
1861
  }
1919
1862
  /**
1920
1863
  * The case of a liked collection URI.
1921
1864
  * @since 0.11.0
1922
- */ | {
1865
+ */
1866
+ | {
1923
1867
  readonly type: "liked";
1924
1868
  readonly identifier: string;
1925
1869
  }
1926
1870
  /**
1927
1871
  * The case of a featured collection URI.
1928
1872
  * @since 0.11.0
1929
- */ | {
1873
+ */
1874
+ | {
1930
1875
  readonly type: "featured";
1931
1876
  readonly identifier: string;
1932
1877
  }
1933
1878
  /**
1934
1879
  * The case of a featured tags collection URI.
1935
1880
  * @since 0.11.0
1936
- */ | {
1881
+ */
1882
+ | {
1937
1883
  readonly type: "featuredTags";
1938
1884
  readonly identifier: string;
1939
1885
  }
1940
1886
  /**
1941
1887
  * The case of a custom collection URI.
1942
1888
  * @since 1.8.0
1943
- */ | {
1889
+ */
1890
+ | {
1944
1891
  readonly type: "collection";
1945
1892
  readonly name: string | symbol;
1946
1893
  readonly class: ConstructorWithTypeId<Object$1>;
@@ -1950,7 +1897,8 @@ type ParseUriResult =
1950
1897
  /**
1951
1898
  * The case of a custom ordered collection URI.
1952
1899
  * @since 1.8.0
1953
- */ | {
1900
+ */
1901
+ | {
1954
1902
  readonly type: "orderedCollection";
1955
1903
  readonly name: string | symbol;
1956
1904
  readonly class: ConstructorWithTypeId<Object$1>;
@@ -0,0 +1,6 @@
1
+ import "@js-temporal/polyfill";
2
+ import "urlpattern-polyfill";
3
+ globalThis.addEventListener = () => {};
4
+ import { n as createRequestContext, t as createInboxContext } from "../context-Juj6bdHC.mjs";
5
+ import { testDefinitions } from "@fedify/fixture";
6
+ export { createInboxContext, createRequestContext, testDefinitions };
@@ -1,12 +1,8 @@
1
-
2
- const { Temporal } = require("@js-temporal/polyfill");
3
- const { URLPattern } = require("urlpattern-polyfill");
4
-
5
- const require_chunk = require('./chunk-CGaQZ11T.cjs');
6
- const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
7
-
1
+ const { Temporal } = require("@js-temporal/polyfill");
2
+ const { URLPattern } = require("urlpattern-polyfill");
3
+ require("./chunk-DDcVe30Y.cjs");
8
4
  //#region src/compat/transformers.ts
9
- const logger = (0, __logtape_logtape.getLogger)([
5
+ const logger = (0, require("@logtape/logtape").getLogger)([
10
6
  "fedify",
11
7
  "compat",
12
8
  "transformers"
@@ -94,23 +90,22 @@ function actorDehydrator(activity, _context) {
94
90
  function getDefaultActivityTransformers() {
95
91
  return [autoIdAssigner, actorDehydrator];
96
92
  }
97
-
98
93
  //#endregion
99
- Object.defineProperty(exports, 'actorDehydrator', {
100
- enumerable: true,
101
- get: function () {
102
- return actorDehydrator;
103
- }
94
+ Object.defineProperty(exports, "actorDehydrator", {
95
+ enumerable: true,
96
+ get: function() {
97
+ return actorDehydrator;
98
+ }
104
99
  });
105
- Object.defineProperty(exports, 'autoIdAssigner', {
106
- enumerable: true,
107
- get: function () {
108
- return autoIdAssigner;
109
- }
100
+ Object.defineProperty(exports, "autoIdAssigner", {
101
+ enumerable: true,
102
+ get: function() {
103
+ return autoIdAssigner;
104
+ }
105
+ });
106
+ Object.defineProperty(exports, "getDefaultActivityTransformers", {
107
+ enumerable: true,
108
+ get: function() {
109
+ return getDefaultActivityTransformers;
110
+ }
110
111
  });
111
- Object.defineProperty(exports, 'getDefaultActivityTransformers', {
112
- enumerable: true,
113
- get: function () {
114
- return getDefaultActivityTransformers;
115
- }
116
- });
@@ -1,9 +1,6 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
- import { URLPattern } from "urlpattern-polyfill";
4
-
1
+ import "@js-temporal/polyfill";
2
+ import "urlpattern-polyfill";
5
3
  import { getLogger } from "@logtape/logtape";
6
-
7
4
  //#region src/compat/transformers.ts
8
5
  const logger = getLogger([
9
6
  "fedify",
@@ -93,6 +90,5 @@ function actorDehydrator(activity, _context) {
93
90
  function getDefaultActivityTransformers() {
94
91
  return [autoIdAssigner, actorDehydrator];
95
92
  }
96
-
97
93
  //#endregion
98
- export { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers };
94
+ export { autoIdAssigner as n, getDefaultActivityTransformers as r, actorDehydrator as t };
@@ -1,8 +1,6 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
- import { URLPattern } from "urlpattern-polyfill";
4
- globalThis.addEventListener = () => {};
5
-
1
+ import "@js-temporal/polyfill";
2
+ import "urlpattern-polyfill";
3
+ globalThis.addEventListener = () => {};
6
4
  //#region src/nodeinfo/types.ts
7
5
  /**
8
6
  * Converts a {@link NodeInfo} object to a JSON value.
@@ -44,6 +42,5 @@ function nodeInfoToJson(nodeInfo) {
44
42
  metadata: nodeInfo.metadata ?? {}
45
43
  };
46
44
  }
47
-
48
45
  //#endregion
49
- export { nodeInfoToJson };
46
+ export { nodeInfoToJson as t };
@@ -1,13 +1,10 @@
1
-
2
- const { Temporal } = require("@js-temporal/polyfill");
3
- const { URLPattern } = require("urlpattern-polyfill");
4
-
5
- const require_chunk = require('./chunk-CGaQZ11T.cjs');
6
- const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
7
- const __fedify_vocab_runtime = require_chunk.__toESM(require("@fedify/vocab-runtime"));
8
-
1
+ const { Temporal } = require("@js-temporal/polyfill");
2
+ const { URLPattern } = require("urlpattern-polyfill");
3
+ require("./chunk-DDcVe30Y.cjs");
4
+ let _logtape_logtape = require("@logtape/logtape");
5
+ let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
9
6
  //#region src/nodeinfo/client.ts
10
- const logger = (0, __logtape_logtape.getLogger)([
7
+ const logger = (0, _logtape_logtape.getLogger)([
11
8
  "fedify",
12
9
  "nodeinfo",
13
10
  "client"
@@ -19,7 +16,7 @@ async function getNodeInfo(url, options = {}) {
19
16
  const wellKnownUrl = new URL("/.well-known/nodeinfo", url);
20
17
  const wellKnownResponse = await fetch(wellKnownUrl, { headers: {
21
18
  Accept: "application/json",
22
- "User-Agent": typeof options.userAgent === "string" ? options.userAgent : (0, __fedify_vocab_runtime.getUserAgent)(options.userAgent)
19
+ "User-Agent": typeof options.userAgent === "string" ? options.userAgent : (0, _fedify_vocab_runtime.getUserAgent)(options.userAgent)
23
20
  } });
24
21
  if (!wellKnownResponse.ok) {
25
22
  logger.error("Failed to fetch {url}: {status} {statusText}", {
@@ -27,22 +24,22 @@ async function getNodeInfo(url, options = {}) {
27
24
  status: wellKnownResponse.status,
28
25
  statusText: wellKnownResponse.statusText
29
26
  });
30
- return void 0;
27
+ return;
31
28
  }
32
29
  const wellKnownRd = await wellKnownResponse.json();
33
- const link = wellKnownRd?.links?.find((link$1) => link$1 != null && "rel" in link$1 && (link$1.rel === "http://nodeinfo.diaspora.software/ns/schema/2.0" || link$1.rel === "http://nodeinfo.diaspora.software/ns/schema/2.1") && "href" in link$1 && link$1.href != null);
30
+ const link = wellKnownRd?.links?.find((link) => link != null && "rel" in link && (link.rel === "http://nodeinfo.diaspora.software/ns/schema/2.0" || link.rel === "http://nodeinfo.diaspora.software/ns/schema/2.1") && "href" in link && link.href != null);
34
31
  if (link == null || link.href == null) {
35
32
  logger.error("Failed to find a NodeInfo document link from {url}: {resourceDescriptor}", {
36
33
  url: wellKnownUrl.href,
37
34
  resourceDescriptor: wellKnownRd
38
35
  });
39
- return void 0;
36
+ return;
40
37
  }
41
38
  nodeInfoUrl = link.href;
42
39
  }
43
40
  const response = await fetch(nodeInfoUrl, { headers: {
44
41
  Accept: "application/json",
45
- "User-Agent": typeof options.userAgent === "string" ? options.userAgent : (0, __fedify_vocab_runtime.getUserAgent)(options.userAgent)
42
+ "User-Agent": typeof options.userAgent === "string" ? options.userAgent : (0, _fedify_vocab_runtime.getUserAgent)(options.userAgent)
46
43
  } });
47
44
  if (!response.ok) {
48
45
  logger.error("Failed to fetch NodeInfo document from {url}: {status} {statusText}", {
@@ -50,7 +47,7 @@ async function getNodeInfo(url, options = {}) {
50
47
  status: response.status,
51
48
  statusText: response.statusText
52
49
  });
53
- return void 0;
50
+ return;
54
51
  }
55
52
  const data = await response.json();
56
53
  if (options.parse === "none") return data;
@@ -60,7 +57,7 @@ async function getNodeInfo(url, options = {}) {
60
57
  url: url.toString(),
61
58
  error
62
59
  });
63
- return void 0;
60
+ return;
64
61
  }
65
62
  }
66
63
  /**
@@ -255,7 +252,6 @@ function parseUsage(data, options = {}) {
255
252
  localComments
256
253
  };
257
254
  }
258
-
259
255
  //#endregion
260
256
  //#region src/nodeinfo/types.ts
261
257
  /**
@@ -298,23 +294,22 @@ function nodeInfoToJson(nodeInfo) {
298
294
  metadata: nodeInfo.metadata ?? {}
299
295
  };
300
296
  }
301
-
302
297
  //#endregion
303
- Object.defineProperty(exports, 'getNodeInfo', {
304
- enumerable: true,
305
- get: function () {
306
- return getNodeInfo;
307
- }
298
+ Object.defineProperty(exports, "getNodeInfo", {
299
+ enumerable: true,
300
+ get: function() {
301
+ return getNodeInfo;
302
+ }
303
+ });
304
+ Object.defineProperty(exports, "nodeInfoToJson", {
305
+ enumerable: true,
306
+ get: function() {
307
+ return nodeInfoToJson;
308
+ }
308
309
  });
309
- Object.defineProperty(exports, 'nodeInfoToJson', {
310
- enumerable: true,
311
- get: function () {
312
- return nodeInfoToJson;
313
- }
310
+ Object.defineProperty(exports, "parseNodeInfo", {
311
+ enumerable: true,
312
+ get: function() {
313
+ return parseNodeInfo;
314
+ }
314
315
  });
315
- Object.defineProperty(exports, 'parseNodeInfo', {
316
- enumerable: true,
317
- get: function () {
318
- return parseNodeInfo;
319
- }
320
- });
@@ -1,10 +1,7 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
- import { URLPattern } from "urlpattern-polyfill";
4
-
1
+ import "@js-temporal/polyfill";
2
+ import "urlpattern-polyfill";
5
3
  import { getLogger } from "@logtape/logtape";
6
4
  import { getUserAgent } from "@fedify/vocab-runtime";
7
-
8
5
  //#region src/nodeinfo/client.ts
9
6
  const logger = getLogger([
10
7
  "fedify",
@@ -26,16 +23,16 @@ async function getNodeInfo(url, options = {}) {
26
23
  status: wellKnownResponse.status,
27
24
  statusText: wellKnownResponse.statusText
28
25
  });
29
- return void 0;
26
+ return;
30
27
  }
31
28
  const wellKnownRd = await wellKnownResponse.json();
32
- const link = wellKnownRd?.links?.find((link$1) => link$1 != null && "rel" in link$1 && (link$1.rel === "http://nodeinfo.diaspora.software/ns/schema/2.0" || link$1.rel === "http://nodeinfo.diaspora.software/ns/schema/2.1") && "href" in link$1 && link$1.href != null);
29
+ const link = wellKnownRd?.links?.find((link) => link != null && "rel" in link && (link.rel === "http://nodeinfo.diaspora.software/ns/schema/2.0" || link.rel === "http://nodeinfo.diaspora.software/ns/schema/2.1") && "href" in link && link.href != null);
33
30
  if (link == null || link.href == null) {
34
31
  logger.error("Failed to find a NodeInfo document link from {url}: {resourceDescriptor}", {
35
32
  url: wellKnownUrl.href,
36
33
  resourceDescriptor: wellKnownRd
37
34
  });
38
- return void 0;
35
+ return;
39
36
  }
40
37
  nodeInfoUrl = link.href;
41
38
  }
@@ -49,7 +46,7 @@ async function getNodeInfo(url, options = {}) {
49
46
  status: response.status,
50
47
  statusText: response.statusText
51
48
  });
52
- return void 0;
49
+ return;
53
50
  }
54
51
  const data = await response.json();
55
52
  if (options.parse === "none") return data;
@@ -59,7 +56,7 @@ async function getNodeInfo(url, options = {}) {
59
56
  url: url.toString(),
60
57
  error
61
58
  });
62
- return void 0;
59
+ return;
63
60
  }
64
61
  }
65
62
  /**
@@ -254,7 +251,6 @@ function parseUsage(data, options = {}) {
254
251
  localComments
255
252
  };
256
253
  }
257
-
258
254
  //#endregion
259
255
  //#region src/nodeinfo/types.ts
260
256
  /**
@@ -297,6 +293,5 @@ function nodeInfoToJson(nodeInfo) {
297
293
  metadata: nodeInfo.metadata ?? {}
298
294
  };
299
295
  }
300
-
301
296
  //#endregion
302
- export { getNodeInfo, nodeInfoToJson, parseNodeInfo };
297
+ export { getNodeInfo as n, parseNodeInfo as r, nodeInfoToJson as t };
@@ -0,0 +1,2 @@
1
+ import { Temporal } from "@js-temporal/polyfill";
2
+ import { URLPattern } from "urlpattern-polyfill";
@@ -1,24 +1,15 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
- import { URLPattern } from "urlpattern-polyfill";
4
- globalThis.addEventListener = () => {};
5
-
6
- import { esm_default } from "../esm-nLm00z9V.js";
7
- import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
- import "../assert-MZs1qjMx.js";
9
- import "../assert_instance_of-DHz7EHNU.js";
10
- import "../deno-CbQK8e-e.js";
11
- import "../key-Cga1p73u.js";
12
- import { verifyRequest } from "../http-CjaLjnRN.js";
13
- import { getAuthenticatedDocumentLoader } from "../docloader-CJeSPcS_.js";
14
- import "../std__assert-DWivtrGR.js";
15
- import { assertRejects } from "../assert_rejects-Ce45JcFg.js";
16
- import "../assert_throws-BNXdRGWP.js";
17
- import "../assert_not_equals-C80BG-_5.js";
18
- import { rsaPrivateKey2 } from "../keys-ZbcByPg9.js";
1
+ import { Temporal } from "@js-temporal/polyfill";
2
+ import "urlpattern-polyfill";
3
+ globalThis.addEventListener = () => {};
4
+ import { t as esm_default } from "../esm-DVILvP5e.mjs";
5
+ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
+ import "../std__assert-Duiq_YC9.mjs";
7
+ import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
8
+ import { l as verifyRequest } from "../http-DI213UHg.mjs";
9
+ import { i as rsaPrivateKey2 } from "../keys-CtZLJq76.mjs";
10
+ import { t as getAuthenticatedDocumentLoader } from "../docloader-BPq9yzC_.mjs";
19
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
20
12
  import { UrlError } from "@fedify/vocab-runtime";
21
-
22
13
  //#region src/utils/docloader.test.ts
23
14
  test("getAuthenticatedDocumentLoader()", async (t) => {
24
15
  esm_default.spyGlobal();
@@ -31,11 +22,10 @@ test("getAuthenticatedDocumentLoader()", async (t) => {
31
22
  return new Response(JSON.stringify(v != null), { headers: { "Content-Type": "application/json" } });
32
23
  });
33
24
  await t.step("test", async () => {
34
- const loader = await getAuthenticatedDocumentLoader({
25
+ assertEquals(await (await getAuthenticatedDocumentLoader({
35
26
  keyId: new URL("https://example.com/key2"),
36
27
  privateKey: rsaPrivateKey2
37
- });
38
- assertEquals(await loader("https://example.com/object"), {
28
+ }))("https://example.com/object"), {
39
29
  contextUrl: null,
40
30
  documentUrl: "https://example.com/object",
41
31
  document: true
@@ -97,5 +87,5 @@ test("getAuthenticatedDocumentLoader() cancellation", {
97
87
  });
98
88
  esm_default.hardReset();
99
89
  });
100
-
101
- //#endregion
90
+ //#endregion
91
+ export {};
@@ -0,0 +1,2 @@
1
+ import { Temporal } from "@js-temporal/polyfill";
2
+ import { URLPattern } from "urlpattern-polyfill";