@fedify/fedify 1.6.0-dev.813 → 1.6.0-experiment.0

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 (1249) hide show
  1. package/dist/_virtual/rolldown_runtime.js +15 -0
  2. package/dist/codegen/fs.js +23 -0
  3. package/dist/codegen/schema.js +87 -0
  4. package/dist/codegen/type.js +394 -0
  5. package/dist/compat/mod.d.ts +5 -0
  6. package/dist/compat/mod.js +7 -0
  7. package/dist/compat/transformers.d.ts +101 -0
  8. package/dist/compat/transformers.js +98 -0
  9. package/dist/compat/transformers.test.d.ts +2 -0
  10. package/dist/compat/transformers.test.js +69 -0
  11. package/dist/compat/types.d.ts +18 -0
  12. package/dist/deno.js +109 -0
  13. package/dist/federation/builder.d.ts +19 -0
  14. package/dist/federation/builder.js +491 -0
  15. package/dist/federation/builder.test.d.ts +2 -0
  16. package/dist/federation/builder.test.js +123 -0
  17. package/dist/federation/callback.d.ts +211 -0
  18. package/dist/federation/collection.d.ts +36 -0
  19. package/dist/federation/collection.js +48 -0
  20. package/dist/federation/collection.test.d.ts +2 -0
  21. package/dist/federation/collection.test.js +25 -0
  22. package/dist/federation/context.d.ts +724 -0
  23. package/dist/federation/federation.d.ts +689 -0
  24. package/dist/federation/handler.d.ts +44 -0
  25. package/dist/federation/handler.js +543 -0
  26. package/dist/federation/handler.test.d.ts +2 -0
  27. package/dist/federation/handler.test.js +1186 -0
  28. package/dist/federation/inbox.js +165 -0
  29. package/dist/federation/inbox.test.d.ts +2 -0
  30. package/dist/federation/inbox.test.js +88 -0
  31. package/dist/federation/keycache.js +47 -0
  32. package/dist/federation/keycache.test.d.ts +2 -0
  33. package/dist/federation/keycache.test.js +55 -0
  34. package/dist/federation/kv.d.ts +74 -0
  35. package/dist/federation/kv.js +51 -0
  36. package/dist/federation/kv.test.d.ts +2 -0
  37. package/dist/federation/kv.test.js +25 -0
  38. package/dist/federation/middleware.d.ts +101 -0
  39. package/dist/federation/middleware.js +1775 -0
  40. package/dist/federation/middleware.test.d.ts +2 -0
  41. package/dist/federation/middleware.test.js +1491 -0
  42. package/dist/federation/mod.d.ts +15 -0
  43. package/dist/federation/mod.js +14 -0
  44. package/dist/federation/mq.d.ts +127 -0
  45. package/dist/federation/mq.js +147 -0
  46. package/dist/federation/mq.test.d.ts +2 -0
  47. package/dist/federation/mq.test.js +124 -0
  48. package/dist/federation/negotiation.js +63 -0
  49. package/dist/federation/retry.d.ts +71 -0
  50. package/dist/federation/retry.js +36 -0
  51. package/dist/federation/retry.test.d.ts +2 -0
  52. package/dist/federation/retry.test.js +44 -0
  53. package/dist/federation/router.d.ts +91 -0
  54. package/dist/federation/router.js +99 -0
  55. package/dist/federation/router.test.d.ts +2 -0
  56. package/dist/federation/router.test.js +78 -0
  57. package/dist/federation/send.d.ts +29 -0
  58. package/dist/federation/send.js +127 -0
  59. package/dist/federation/send.test.d.ts +2 -0
  60. package/dist/federation/send.test.js +214 -0
  61. package/dist/mod.d.ts +36 -0
  62. package/dist/mod.js +33 -0
  63. package/dist/node_modules/.pnpm/@jsr_hongminhee__deno-mock-fetch@0.3.2/node_modules/@jsr/hongminhee__deno-mock-fetch/mod.js +101 -0
  64. package/dist/node_modules/.pnpm/@jsr_hongminhee__deno-mock-fetch@0.3.2/node_modules/@jsr/hongminhee__deno-mock-fetch/router.js +93 -0
  65. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert.js +26 -0
  66. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_equals.js +49 -0
  67. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_exists.js +32 -0
  68. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_false.js +26 -0
  69. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_greater.js +34 -0
  70. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_greater_or_equal.js +34 -0
  71. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_instance_of.js +40 -0
  72. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_is_error.js +48 -0
  73. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_not_equals.js +36 -0
  74. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_object_match.js +4 -0
  75. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_rejects.js +42 -0
  76. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_strict_equals.js +53 -0
  77. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_string_includes.js +32 -0
  78. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_throws.js +38 -0
  79. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assertion_error.js +33 -0
  80. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/equal.js +79 -0
  81. package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/mod.js +19 -0
  82. package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/assertion_state.js +177 -0
  83. package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/build_message.js +101 -0
  84. package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/diff.js +274 -0
  85. package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/diff_str.js +148 -0
  86. package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/format.js +37 -0
  87. package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/mod.js +10 -0
  88. package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/styles.js +172 -0
  89. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/assert_path.js +11 -0
  90. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/constants.js +16 -0
  91. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/dirname.js +14 -0
  92. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/from_file_url.js +13 -0
  93. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/normalize.js +14 -0
  94. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/normalize_string.js +60 -0
  95. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/strip_trailing_separators.js +15 -0
  96. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_os.js +9 -0
  97. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/basename.js +4 -0
  98. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/common.js +4 -0
  99. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/constants.js +4 -0
  100. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/dirname.js +35 -0
  101. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/extname.js +4 -0
  102. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/format.js +4 -0
  103. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/from_file_url.js +34 -0
  104. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/glob_to_regexp.js +4 -0
  105. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/is_absolute.js +4 -0
  106. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/join.js +35 -0
  107. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/join_globs.js +4 -0
  108. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/mod.js +7 -0
  109. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/normalize.js +4 -0
  110. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/normalize_glob.js +4 -0
  111. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/parse.js +4 -0
  112. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/_util.js +13 -0
  113. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/dirname.js +54 -0
  114. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/from_file_url.js +27 -0
  115. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/join.js +47 -0
  116. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/normalize.js +59 -0
  117. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/relative.js +4 -0
  118. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/resolve.js +4 -0
  119. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/to_file_url.js +4 -0
  120. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/to_namespaced_path.js +4 -0
  121. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/windows/_util.js +19 -0
  122. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/windows/dirname.js +75 -0
  123. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/windows/from_file_url.js +31 -0
  124. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/windows/join.js +54 -0
  125. package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/windows/normalize.js +87 -0
  126. package/dist/node_modules/.pnpm/@jsr_std__url@1.0.0-rc.3/node_modules/@jsr/std__url/_strip.js +17 -0
  127. package/dist/node_modules/.pnpm/@jsr_std__url@1.0.0-rc.3/node_modules/@jsr/std__url/dirname.js +38 -0
  128. package/dist/node_modules/.pnpm/@jsr_std__url@1.0.0-rc.3/node_modules/@jsr/std__url/join.js +36 -0
  129. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_chars.js +47 -0
  130. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_dumper_state.js +4 -0
  131. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_loader_state.js +884 -0
  132. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_schema.js +120 -0
  133. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/binary.js +92 -0
  134. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/bool.js +41 -0
  135. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/float.js +58 -0
  136. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/int.js +118 -0
  137. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/map.js +18 -0
  138. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/merge.js +14 -0
  139. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/nil.js +23 -0
  140. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/omap.js +31 -0
  141. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/pairs.js +22 -0
  142. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/regexp.js +29 -0
  143. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/seq.js +14 -0
  144. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/set.js +17 -0
  145. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/str.js +14 -0
  146. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/timestamp.js +57 -0
  147. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/undefined.js +24 -0
  148. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_utils.js +17 -0
  149. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/mod.js +5 -0
  150. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/parse.js +54 -0
  151. package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/stringify.js +4 -0
  152. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/AlwaysShrinkableArbitrary.js +30 -0
  153. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/ArrayArbitrary.js +203 -0
  154. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/ArrayInt64Arbitrary.js +122 -0
  155. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/BigIntArbitrary.js +63 -0
  156. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/ConstantArbitrary.js +58 -0
  157. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/FrequencyArbitrary.js +136 -0
  158. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/IntegerArbitrary.js +64 -0
  159. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/LazyArbitrary.js +29 -0
  160. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/StringUnitArbitrary.js +45 -0
  161. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/TupleArbitrary.js +74 -0
  162. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/WithShrinkFromOtherArbitrary.js +40 -0
  163. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/AnyArbitraryBuilder.js +97 -0
  164. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/BoxedArbitraryBuilder.js +13 -0
  165. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/CharacterArbitraryBuilder.js +17 -0
  166. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/RestrictedIntegerArbitraryBuilder.js +23 -0
  167. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.js +32 -0
  168. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/data/GraphemeRanges.js +990 -0
  169. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ArrayInt64.js +98 -0
  170. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/BiasNumericRange.js +53 -0
  171. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/BuildSlicedGenerator.js +15 -0
  172. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/CustomEqualSet.js +27 -0
  173. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/DepthContext.js +24 -0
  174. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/DoubleHelpers.js +96 -0
  175. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/DoubleOnlyHelpers.js +25 -0
  176. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/FloatHelpers.js +57 -0
  177. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/FloatOnlyHelpers.js +26 -0
  178. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/FloatingOnlyHelpers.js +26 -0
  179. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/GraphemeRangesHelpers.js +58 -0
  180. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/MaxLengthFromMinLength.js +72 -0
  181. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/NoUndefinedAsContext.js +16 -0
  182. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/QualifiedObjectConstraints.js +58 -0
  183. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SameValueSet.js +41 -0
  184. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SameValueZeroSet.js +33 -0
  185. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ShrinkBigInt.js +37 -0
  186. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ShrinkInteger.js +41 -0
  187. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SlicesForStringBuilder.js +74 -0
  188. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/StrictlyEqualSet.js +38 -0
  189. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/TokenizeString.js +47 -0
  190. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/implementations/NoopSlicedGenerator.js +21 -0
  191. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/implementations/SlicedBasedGenerator.js +53 -0
  192. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/ArrayToMap.js +16 -0
  193. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/ArrayToSet.js +16 -0
  194. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/CodePointsToString.js +17 -0
  195. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToCharString.js +20 -0
  196. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToMappedConstant.js +69 -0
  197. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToPrintableIndex.js +18 -0
  198. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/KeyValuePairsToObject.js +42 -0
  199. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/PatternsToString.js +32 -0
  200. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/TimeToDate.js +30 -0
  201. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/UnboxedToBoxed.js +22 -0
  202. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/anything.js +14 -0
  203. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/array.js +22 -0
  204. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/bigInt.js +38 -0
  205. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/boolean.js +24 -0
  206. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/constant.js +13 -0
  207. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/constantFrom.js +14 -0
  208. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/date.js +30 -0
  209. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/dictionary.js +27 -0
  210. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/double.js +54 -0
  211. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/float.js +60 -0
  212. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/float32Array.js +22 -0
  213. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/float64Array.js +22 -0
  214. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/fullUnicode.js +24 -0
  215. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/fullUnicodeString.js +20 -0
  216. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/int16Array.js +15 -0
  217. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/int32Array.js +15 -0
  218. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/int8Array.js +15 -0
  219. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/integer.js +26 -0
  220. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/letrec.js +28 -0
  221. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/mapToConstant.js +26 -0
  222. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/maxSafeInteger.js +15 -0
  223. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/nat.js +17 -0
  224. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/noBias.js +11 -0
  225. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/oneof.js +31 -0
  226. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/sparseArray.js +68 -0
  227. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/string.js +32 -0
  228. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/tuple.js +13 -0
  229. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint16Array.js +15 -0
  230. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint32Array.js +15 -0
  231. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint8Array.js +15 -0
  232. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint8ClampedArray.js +15 -0
  233. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uniqueArray.js +47 -0
  234. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/arbitrary/definition/Arbitrary.js +184 -0
  235. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/arbitrary/definition/Value.js +31 -0
  236. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/precondition/PreconditionFailure.js +19 -0
  237. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/IRawProperty.js +12 -0
  238. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/IgnoreEqualValuesProperty.js +52 -0
  239. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/Property.generic.js +77 -0
  240. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/Property.js +22 -0
  241. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/SkipAfterProperty.js +61 -0
  242. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/TimeoutProperty.js +52 -0
  243. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/UnbiasedProperty.js +29 -0
  244. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/DecorateProperty.js +26 -0
  245. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/Runner.js +61 -0
  246. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/RunnerIterator.js +47 -0
  247. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/SourceValuesIterator.js +35 -0
  248. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/Tosser.js +33 -0
  249. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/GlobalParameters.js +12 -0
  250. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/QualifiedParameters.js +121 -0
  251. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/VerbosityLevel.js +14 -0
  252. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/reporter/ExecutionStatus.js +14 -0
  253. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/reporter/RunExecution.js +116 -0
  254. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/utils/PathWalker.js +24 -0
  255. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/utils/RunDetailsFormatter.js +135 -0
  256. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/symbols.js +15 -0
  257. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/random/generator/Random.js +48 -0
  258. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/LazyIterableIterator.js +24 -0
  259. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/Stream.js +84 -0
  260. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/StreamHelpers.js +50 -0
  261. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/utils/apply.js +28 -0
  262. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/utils/globals.js +309 -0
  263. package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/utils/stringify.js +217 -0
  264. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformArrayIntDistribution.js +20 -0
  265. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformBigIntDistribution.js +20 -0
  266. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformIntDistribution.js +20 -0
  267. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformArrayIntDistribution.js +20 -0
  268. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformBigIntDistribution.js +32 -0
  269. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformIntDistribution.js +43 -0
  270. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/ArrayInt.js +139 -0
  271. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformArrayIntDistributionInternal.js +26 -0
  272. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformIntDistributionInternal.js +14 -0
  273. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/LinearCongruential.js +53 -0
  274. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/MersenneTwister.js +114 -0
  275. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/RandomGenerator.js +26 -0
  276. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/XorShift.js +83 -0
  277. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/XoroShiro.js +83 -0
  278. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/pure-rand-default.js +44 -0
  279. package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/pure-rand.js +22 -0
  280. package/dist/nodeinfo/client.d.ts +96 -0
  281. package/dist/nodeinfo/client.js +272 -0
  282. package/dist/nodeinfo/client.test.d.ts +2 -0
  283. package/dist/nodeinfo/client.test.js +968 -0
  284. package/dist/nodeinfo/handler.js +46 -0
  285. package/dist/nodeinfo/handler.test.d.ts +2 -0
  286. package/dist/nodeinfo/handler.test.js +94 -0
  287. package/dist/nodeinfo/mod.d.ts +6 -0
  288. package/dist/nodeinfo/mod.js +9 -0
  289. package/dist/nodeinfo/semver.d.ts +78 -0
  290. package/dist/nodeinfo/semver.js +148 -0
  291. package/dist/nodeinfo/semver.test.d.ts +2 -0
  292. package/dist/nodeinfo/semver.test.js +134 -0
  293. package/dist/nodeinfo/types.d.ts +140 -0
  294. package/dist/nodeinfo/types.js +50 -0
  295. package/dist/nodeinfo/types.test.d.ts +2 -0
  296. package/dist/nodeinfo/types.test.js +197 -0
  297. package/dist/runtime/authdocloader.d.ts +56 -0
  298. package/dist/runtime/authdocloader.js +52 -0
  299. package/dist/runtime/authdocloader.test.d.ts +2 -0
  300. package/dist/runtime/authdocloader.test.js +54 -0
  301. package/dist/runtime/contexts.js +4116 -0
  302. package/dist/runtime/docloader.d.ts +211 -0
  303. package/dist/runtime/docloader.js +291 -0
  304. package/dist/runtime/docloader.test.d.ts +2 -0
  305. package/dist/runtime/docloader.test.js +428 -0
  306. package/dist/runtime/key.d.ts +66 -0
  307. package/dist/runtime/key.js +156 -0
  308. package/dist/runtime/key.test.d.ts +2 -0
  309. package/dist/runtime/key.test.js +93 -0
  310. package/dist/runtime/langstr.d.ts +24 -0
  311. package/dist/runtime/langstr.js +32 -0
  312. package/dist/runtime/langstr.test.d.ts +2 -0
  313. package/dist/runtime/langstr.test.js +31 -0
  314. package/dist/runtime/mod.d.ts +7 -0
  315. package/dist/runtime/mod.js +10 -0
  316. package/dist/runtime/multibase/base.js +32 -0
  317. package/dist/runtime/multibase/constants.js +172 -0
  318. package/dist/runtime/multibase/index.js +57 -0
  319. package/dist/runtime/multibase/multibase.test.d.ts +2 -0
  320. package/dist/runtime/multibase/multibase.test.js +351 -0
  321. package/dist/runtime/multibase/rfc4648.js +61 -0
  322. package/dist/runtime/multibase/util.js +21 -0
  323. package/dist/runtime/url.js +67 -0
  324. package/dist/runtime/url.test.d.ts +2 -0
  325. package/dist/runtime/url.test.js +43 -0
  326. package/dist/sig/http.d.ts +143 -0
  327. package/dist/sig/http.js +720 -0
  328. package/dist/sig/http.test.d.ts +2 -0
  329. package/dist/sig/http.test.js +1094 -0
  330. package/dist/sig/key.d.ts +125 -0
  331. package/dist/sig/key.js +257 -0
  332. package/dist/sig/key.test.d.ts +2 -0
  333. package/dist/sig/key.test.js +242 -0
  334. package/dist/sig/ld.d.ts +150 -0
  335. package/dist/sig/ld.js +270 -0
  336. package/dist/sig/ld.test.d.ts +2 -0
  337. package/dist/sig/ld.test.js +224 -0
  338. package/dist/sig/mod.d.ts +8 -0
  339. package/dist/sig/mod.js +11 -0
  340. package/dist/sig/owner.d.ts +74 -0
  341. package/dist/sig/owner.js +89 -0
  342. package/dist/sig/owner.test.d.ts +2 -0
  343. package/dist/sig/owner.test.js +45 -0
  344. package/dist/sig/proof.d.ts +134 -0
  345. package/dist/sig/proof.js +262 -0
  346. package/dist/sig/proof.test.d.ts +2 -0
  347. package/dist/sig/proof.test.js +263 -0
  348. package/dist/testing/context.js +94 -0
  349. package/dist/testing/docloader.js +48 -0
  350. package/dist/testing/docloader.test.d.ts +2 -0
  351. package/dist/testing/docloader.test.js +15 -0
  352. package/dist/testing/keys.js +123 -0
  353. package/dist/testing/mod.js +87 -0
  354. package/dist/vocab/actor.d.ts +133 -0
  355. package/dist/vocab/actor.js +148 -0
  356. package/dist/vocab/actor.test.d.ts +2 -0
  357. package/dist/vocab/actor.test.js +114 -0
  358. package/dist/vocab/constants.d.ts +24 -0
  359. package/dist/vocab/constants.js +17 -0
  360. package/dist/vocab/lookup.d.ts +123 -0
  361. package/dist/vocab/lookup.js +162 -0
  362. package/dist/vocab/lookup.test.d.ts +2 -0
  363. package/dist/vocab/lookup.test.js +113 -0
  364. package/dist/vocab/mod.d.ts +8 -0
  365. package/dist/vocab/mod.js +11 -0
  366. package/dist/vocab/type.d.ts +107 -0
  367. package/dist/vocab/type.js +13 -0
  368. package/dist/vocab/type.test.d.ts +2 -0
  369. package/dist/vocab/type.test.js +24 -0
  370. package/dist/vocab/vocab.d.ts +14448 -0
  371. package/dist/vocab/vocab.js +35617 -0
  372. package/dist/vocab/vocab.test.d.ts +2 -0
  373. package/dist/vocab/vocab.test.js +849 -0
  374. package/dist/webfinger/handler.js +140 -0
  375. package/dist/webfinger/handler.test.d.ts +2 -0
  376. package/dist/webfinger/handler.test.js +483 -0
  377. package/dist/webfinger/jrd.d.ts +60 -0
  378. package/dist/webfinger/lookup.d.ts +47 -0
  379. package/dist/webfinger/lookup.js +131 -0
  380. package/dist/webfinger/lookup.test.d.ts +2 -0
  381. package/dist/webfinger/lookup.test.js +119 -0
  382. package/dist/webfinger/mod.d.ts +5 -0
  383. package/dist/webfinger/mod.js +7 -0
  384. package/dist/x/denokv.js +41 -0
  385. package/dist/x/hono.d.ts +40 -0
  386. package/dist/x/hono.js +48 -0
  387. package/dist/x/sveltekit.d.ts +36 -0
  388. package/dist/x/sveltekit.js +56 -0
  389. package/package.json +57 -60
  390. package/CHANGES.md +0 -3883
  391. package/CONTRIBUTING.md +0 -272
  392. package/FEDERATION.md +0 -85
  393. package/LICENSE +0 -20
  394. package/SECURITY.md +0 -22
  395. package/SPONSORS.md +0 -47
  396. package/esm/_dnt.polyfills.js +0 -15
  397. package/esm/_dnt.shims.js +0 -70
  398. package/esm/compat/mod.js +0 -3
  399. package/esm/compat/transformers.js +0 -95
  400. package/esm/compat/types.js +0 -1
  401. package/esm/deno.js +0 -110
  402. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/_internal/compareValues.js +0 -9
  403. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/at.js +0 -28
  404. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/chunk.js +0 -36
  405. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/compact.js +0 -21
  406. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/countBy.js +0 -36
  407. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/difference.js +0 -26
  408. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/differenceBy.js +0 -38
  409. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/differenceWith.js +0 -35
  410. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/drop.js +0 -20
  411. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/dropRight.js +0 -23
  412. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/dropRightWhile.js +0 -26
  413. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/dropWhile.js +0 -25
  414. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/fill.js +0 -37
  415. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/flatMap.js +0 -24
  416. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/flatMapDeep.js +0 -17
  417. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/flatten.js +0 -33
  418. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/flattenDeep.js +0 -15
  419. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/forEachRight.js +0 -28
  420. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/groupBy.js +0 -44
  421. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/head.js +0 -18
  422. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/index.js +0 -60
  423. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/initial.js +0 -16
  424. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/intersection.js +0 -24
  425. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/intersectionBy.js +0 -37
  426. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/intersectionWith.js +0 -41
  427. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/isSubset.js +0 -27
  428. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/isSubsetWith.js +0 -34
  429. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/keyBy.js +0 -36
  430. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/last.js +0 -25
  431. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/maxBy.js +0 -37
  432. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/minBy.js +0 -37
  433. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/orderBy.js +0 -52
  434. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/partition.js +0 -36
  435. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/pull.js +0 -33
  436. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/pullAt.js +0 -25
  437. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/remove.js +0 -35
  438. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/sample.js +0 -18
  439. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/sampleSize.js +0 -35
  440. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/shuffle.js +0 -25
  441. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/sortBy.js +0 -36
  442. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/tail.js +0 -27
  443. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/take.js +0 -27
  444. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/takeRight.js +0 -29
  445. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/takeRightWhile.js +0 -25
  446. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/takeWhile.js +0 -29
  447. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/toFilled.js +0 -22
  448. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/union.js +0 -21
  449. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/unionBy.js +0 -26
  450. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/unionWith.js +0 -24
  451. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/uniq.js +0 -18
  452. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/uniqBy.js +0 -37
  453. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/uniqWith.js +0 -26
  454. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/unzip.js +0 -31
  455. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/unzipWith.js +0 -26
  456. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/windowed.js +0 -44
  457. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/without.js +0 -24
  458. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/xor.js +0 -23
  459. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/xorBy.js +0 -27
  460. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/xorWith.js +0 -26
  461. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/zip.js +0 -39
  462. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/zipObject.js +0 -37
  463. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/zipWith.js +0 -32
  464. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/_internal/getSymbols.js +0 -3
  465. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/_internal/getTag.js +0 -13
  466. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/_internal/tags.js +0 -26
  467. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/predicate/isArray.js +0 -23
  468. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/predicate/isObjectLike.js +0 -27
  469. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/predicate/isPlainObject.js +0 -51
  470. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/predicate/isSymbol.js +0 -17
  471. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/util/eq.js +0 -16
  472. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/util/toFinite.js +0 -26
  473. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/util/toInteger.js +0 -23
  474. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/util/toNumber.js +0 -23
  475. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/error/AbortError.js +0 -10
  476. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/error/TimeoutError.js +0 -10
  477. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/error/index.js +0 -2
  478. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/after.js +0 -40
  479. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/ary.js +0 -23
  480. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/asyncNoop.js +0 -10
  481. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/before.js +0 -40
  482. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/curry.js +0 -42
  483. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/curryRight.js +0 -44
  484. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/debounce.js +0 -97
  485. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/flow.js +0 -24
  486. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/flowRight.js +0 -21
  487. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/identity.js +0 -22
  488. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/index.js +0 -21
  489. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/memoize.js +0 -86
  490. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/negate.js +0 -16
  491. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/noop.js +0 -10
  492. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/once.js +0 -28
  493. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/partial.js +0 -45
  494. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/partialRight.js +0 -47
  495. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/rest.js +0 -40
  496. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/retry.js +0 -41
  497. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/spread.js +0 -21
  498. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/throttle.js +0 -46
  499. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/unary.js +0 -18
  500. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/index.js +0 -65
  501. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/clamp.js +0 -23
  502. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/inRange.js +0 -24
  503. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/index.js +0 -13
  504. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/mean.js +0 -17
  505. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/meanBy.js +0 -20
  506. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/median.js +0 -35
  507. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/medianBy.js +0 -25
  508. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/random.js +0 -23
  509. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/randomInt.js +0 -18
  510. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/range.js +0 -32
  511. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/rangeRight.js +0 -32
  512. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/round.js +0 -24
  513. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/sum.js +0 -20
  514. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/sumBy.js +0 -22
  515. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/clone.js +0 -70
  516. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/cloneDeep.js +0 -50
  517. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/cloneDeepWith.js +0 -201
  518. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/findKey.js +0 -22
  519. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/flattenObject.js +0 -49
  520. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/index.js +0 -17
  521. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/invert.js +0 -28
  522. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/mapKeys.js +0 -27
  523. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/mapValues.js +0 -28
  524. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/merge.js +0 -69
  525. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/mergeWith.js +0 -71
  526. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/omit.js +0 -25
  527. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/omitBy.js +0 -31
  528. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/pick.js +0 -27
  529. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/pickBy.js +0 -31
  530. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/toCamelCaseKeys.js +0 -66
  531. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/toMerged.js +0 -47
  532. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/toSnakeCaseKeys.js +0 -66
  533. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/index.js +0 -30
  534. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isArrayBuffer.js +0 -20
  535. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isBlob.js +0 -23
  536. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isBoolean.js +0 -25
  537. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isBrowser.js +0 -17
  538. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isBuffer.js +0 -23
  539. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isDate.js +0 -16
  540. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isEqual.js +0 -19
  541. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isEqualWith.js +0 -218
  542. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isError.js +0 -16
  543. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isFile.js +0 -26
  544. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isFunction.js +0 -16
  545. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isJSON.js +0 -40
  546. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isJSONValue.js +0 -94
  547. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isLength.js +0 -24
  548. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isMap.js +0 -20
  549. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isNil.js +0 -22
  550. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isNode.js +0 -17
  551. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isNotNil.js +0 -19
  552. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isNull.js +0 -23
  553. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isPlainObject.js +0 -56
  554. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isPrimitive.js +0 -31
  555. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isPromise.js +0 -20
  556. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isRegExp.js +0 -16
  557. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isSet.js +0 -20
  558. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isString.js +0 -20
  559. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isSymbol.js +0 -26
  560. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isTypedArray.js +0 -29
  561. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isUndefined.js +0 -23
  562. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isWeakMap.js +0 -23
  563. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isWeakSet.js +0 -23
  564. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/delay.js +0 -52
  565. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/index.js +0 -5
  566. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/mutex.js +0 -69
  567. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/semaphore.js +0 -99
  568. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/timeout.js +0 -20
  569. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/withTimeout.js +0 -29
  570. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/camelCase.js +0 -26
  571. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/capitalize.js +0 -14
  572. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/constantCase.js +0 -19
  573. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/deburr.js +0 -64
  574. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/escape.js +0 -23
  575. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/escapeRegExp.js +0 -14
  576. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/index.js +0 -21
  577. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/kebabCase.js +0 -19
  578. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/lowerCase.js +0 -19
  579. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/lowerFirst.js +0 -14
  580. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/pad.js +0 -19
  581. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/pascalCase.js +0 -20
  582. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/reverseString.js +0 -16
  583. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/snakeCase.js +0 -19
  584. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/startCase.js +0 -26
  585. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/trim.js +0 -20
  586. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/trimEnd.js +0 -39
  587. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/trimStart.js +0 -36
  588. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/unescape.js +0 -23
  589. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/upperCase.js +0 -26
  590. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/upperFirst.js +0 -14
  591. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/words.js +0 -38
  592. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/util/attempt.js +0 -47
  593. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/util/attemptAsync.js +0 -41
  594. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/util/index.js +0 -4
  595. package/esm/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/util/invariant.js +0 -33
  596. package/esm/federation/builder.js +0 -652
  597. package/esm/federation/callback.js +0 -1
  598. package/esm/federation/collection.js +0 -43
  599. package/esm/federation/context.js +0 -1
  600. package/esm/federation/federation.js +0 -1
  601. package/esm/federation/handler.js +0 -574
  602. package/esm/federation/inbox.js +0 -146
  603. package/esm/federation/keycache.js +0 -42
  604. package/esm/federation/kv.js +0 -52
  605. package/esm/federation/middleware.js +0 -2071
  606. package/esm/federation/mod.js +0 -17
  607. package/esm/federation/mq.js +0 -161
  608. package/esm/federation/negotiation.js +0 -92
  609. package/esm/federation/queue.js +0 -1
  610. package/esm/federation/retry.js +0 -34
  611. package/esm/federation/router.js +0 -97
  612. package/esm/federation/send.js +0 -129
  613. package/esm/mod.js +0 -52
  614. package/esm/nodeinfo/client.js +0 -372
  615. package/esm/nodeinfo/handler.js +0 -49
  616. package/esm/nodeinfo/mod.js +0 -11
  617. package/esm/nodeinfo/semver.js +0 -150
  618. package/esm/nodeinfo/types.js +0 -60
  619. package/esm/package.json +0 -3
  620. package/esm/runtime/contexts.js +0 -4191
  621. package/esm/runtime/docloader.js +0 -351
  622. package/esm/runtime/key.js +0 -153
  623. package/esm/runtime/langstr.js +0 -25
  624. package/esm/runtime/mod.js +0 -10
  625. package/esm/runtime/multibase/base.js +0 -30
  626. package/esm/runtime/multibase/constants.js +0 -78
  627. package/esm/runtime/multibase/index.js +0 -59
  628. package/esm/runtime/multibase/rfc4648.js +0 -79
  629. package/esm/runtime/multibase/util.js +0 -13
  630. package/esm/runtime/url.js +0 -96
  631. package/esm/sig/http.js +0 -845
  632. package/esm/sig/key.js +0 -253
  633. package/esm/sig/ld.js +0 -288
  634. package/esm/sig/mod.js +0 -11
  635. package/esm/sig/owner.js +0 -103
  636. package/esm/sig/proof.js +0 -269
  637. package/esm/vocab/actor.js +0 -168
  638. package/esm/vocab/constants.js +0 -9
  639. package/esm/vocab/lookup.js +0 -174
  640. package/esm/vocab/mod.js +0 -57
  641. package/esm/vocab/type.js +0 -6
  642. package/esm/vocab/vocab.js +0 -51266
  643. package/esm/webfinger/handler.js +0 -173
  644. package/esm/webfinger/jrd.js +0 -1
  645. package/esm/webfinger/lookup.js +0 -136
  646. package/esm/webfinger/mod.js +0 -8
  647. package/esm/x/hono.js +0 -65
  648. package/esm/x/sveltekit.js +0 -65
  649. package/logo.svg +0 -185
  650. package/types/_dnt.polyfills.d.ts +0 -18
  651. package/types/_dnt.polyfills.d.ts.map +0 -1
  652. package/types/_dnt.shims.d.ts +0 -14
  653. package/types/_dnt.shims.d.ts.map +0 -1
  654. package/types/compat/mod.d.ts +0 -4
  655. package/types/compat/mod.d.ts.map +0 -1
  656. package/types/compat/transformers.d.ts +0 -77
  657. package/types/compat/transformers.d.ts.map +0 -1
  658. package/types/compat/types.d.ts +0 -8
  659. package/types/compat/types.d.ts.map +0 -1
  660. package/types/deno.d.ts +0 -84
  661. package/types/deno.d.ts.map +0 -1
  662. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/_internal/compareValues.d.ts +0 -2
  663. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/_internal/compareValues.d.ts.map +0 -1
  664. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/at.d.ts +0 -17
  665. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/at.d.ts.map +0 -1
  666. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/chunk.d.ts +0 -25
  667. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/chunk.d.ts.map +0 -1
  668. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/compact.d.ts +0 -15
  669. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/compact.d.ts.map +0 -1
  670. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/countBy.d.ts +0 -29
  671. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/countBy.d.ts.map +0 -1
  672. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/difference.d.ts +0 -24
  673. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/difference.d.ts.map +0 -1
  674. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/differenceBy.d.ts +0 -34
  675. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/differenceBy.d.ts.map +0 -1
  676. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/differenceWith.d.ts +0 -30
  677. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/differenceWith.d.ts.map +0 -1
  678. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/drop.d.ts +0 -18
  679. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/drop.d.ts.map +0 -1
  680. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/dropRight.d.ts +0 -18
  681. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/dropRight.d.ts.map +0 -1
  682. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/dropRightWhile.d.ts +0 -20
  683. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/dropRightWhile.d.ts.map +0 -1
  684. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/dropWhile.d.ts +0 -20
  685. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/dropWhile.d.ts.map +0 -1
  686. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/fill.d.ts +0 -85
  687. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/fill.d.ts.map +0 -1
  688. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/flatMap.d.ts +0 -22
  689. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/flatMap.d.ts.map +0 -1
  690. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/flatMapDeep.d.ts +0 -16
  691. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/flatMapDeep.d.ts.map +0 -1
  692. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/flatten.d.ts +0 -18
  693. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/flatten.d.ts.map +0 -1
  694. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/flattenDeep.d.ts +0 -24
  695. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/flattenDeep.d.ts.map +0 -1
  696. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/forEachRight.d.ts +0 -47
  697. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/forEachRight.d.ts.map +0 -1
  698. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/groupBy.d.ts +0 -34
  699. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/groupBy.d.ts.map +0 -1
  700. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/head.d.ts +0 -33
  701. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/head.d.ts.map +0 -1
  702. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/index.d.ts +0 -61
  703. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/index.d.ts.map +0 -1
  704. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/initial.d.ts +0 -53
  705. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/initial.d.ts.map +0 -1
  706. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/intersection.d.ts +0 -20
  707. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/intersection.d.ts.map +0 -1
  708. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/intersectionBy.d.ts +0 -35
  709. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/intersectionBy.d.ts.map +0 -1
  710. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/intersectionWith.d.ts +0 -36
  711. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/intersectionWith.d.ts.map +0 -1
  712. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/isSubset.d.ts +0 -25
  713. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/isSubset.d.ts.map +0 -1
  714. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/isSubsetWith.d.ts +0 -32
  715. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/isSubsetWith.d.ts.map +0 -1
  716. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/keyBy.d.ts +0 -29
  717. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/keyBy.d.ts.map +0 -1
  718. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/last.d.ts +0 -47
  719. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/last.d.ts.map +0 -1
  720. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/maxBy.d.ts +0 -44
  721. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/maxBy.d.ts.map +0 -1
  722. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/minBy.d.ts +0 -44
  723. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/minBy.d.ts.map +0 -1
  724. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/orderBy.d.ts +0 -36
  725. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/orderBy.d.ts.map +0 -1
  726. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/partition.d.ts +0 -24
  727. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/partition.d.ts.map +0 -1
  728. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/pull.d.ts +0 -18
  729. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/pull.d.ts.map +0 -1
  730. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/pullAt.d.ts +0 -18
  731. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/pullAt.d.ts.map +0 -1
  732. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/remove.d.ts +0 -18
  733. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/remove.d.ts.map +0 -1
  734. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/sample.d.ts +0 -16
  735. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/sample.d.ts.map +0 -1
  736. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/sampleSize.d.ts +0 -20
  737. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/sampleSize.d.ts.map +0 -1
  738. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/shuffle.d.ts +0 -16
  739. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/shuffle.d.ts.map +0 -1
  740. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/sortBy.d.ts +0 -34
  741. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/sortBy.d.ts.map +0 -1
  742. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/tail.d.ts +0 -66
  743. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/tail.d.ts.map +0 -1
  744. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/take.d.ts +0 -24
  745. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/take.d.ts.map +0 -1
  746. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/takeRight.d.ts +0 -23
  747. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/takeRight.d.ts.map +0 -1
  748. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/takeRightWhile.d.ts +0 -19
  749. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/takeRightWhile.d.ts.map +0 -1
  750. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/takeWhile.d.ts +0 -20
  751. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/takeWhile.d.ts.map +0 -1
  752. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/toFilled.d.ts +0 -91
  753. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/toFilled.d.ts.map +0 -1
  754. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/union.d.ts +0 -19
  755. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/union.d.ts.map +0 -1
  756. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/unionBy.d.ts +0 -24
  757. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/unionBy.d.ts.map +0 -1
  758. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/unionWith.d.ts +0 -22
  759. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/unionWith.d.ts.map +0 -1
  760. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/uniq.d.ts +0 -17
  761. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/uniq.d.ts.map +0 -1
  762. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/uniqBy.d.ts +0 -28
  763. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/uniqBy.d.ts.map +0 -1
  764. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/uniqWith.d.ts +0 -17
  765. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/uniqWith.d.ts.map +0 -1
  766. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/unzip.d.ts +0 -19
  767. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/unzip.d.ts.map +0 -1
  768. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/unzipWith.d.ts +0 -16
  769. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/unzipWith.d.ts.map +0 -1
  770. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/windowed.d.ts +0 -49
  771. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/windowed.d.ts.map +0 -1
  772. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/without.d.ts +0 -22
  773. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/without.d.ts.map +0 -1
  774. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/xor.d.ts +0 -19
  775. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/xor.d.ts.map +0 -1
  776. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/xorBy.d.ts +0 -21
  777. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/xorBy.d.ts.map +0 -1
  778. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/xorWith.d.ts +0 -20
  779. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/xorWith.d.ts.map +0 -1
  780. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/zip.d.ts +0 -105
  781. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/zip.d.ts.map +0 -1
  782. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/zipObject.d.ts +0 -32
  783. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/zipObject.d.ts.map +0 -1
  784. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/zipWith.d.ts +0 -71
  785. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/array/zipWith.d.ts.map +0 -1
  786. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/_internal/getSymbols.d.ts +0 -2
  787. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/_internal/getSymbols.d.ts.map +0 -1
  788. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/_internal/getTag.d.ts +0 -9
  789. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/_internal/getTag.d.ts.map +0 -1
  790. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/_internal/tags.d.ts +0 -27
  791. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/_internal/tags.d.ts.map +0 -1
  792. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/predicate/isArray.d.ts +0 -22
  793. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/predicate/isArray.d.ts.map +0 -1
  794. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/predicate/isObjectLike.d.ts +0 -26
  795. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/predicate/isObjectLike.d.ts.map +0 -1
  796. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/predicate/isPlainObject.d.ts +0 -24
  797. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/predicate/isPlainObject.d.ts.map +0 -1
  798. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/predicate/isSymbol.d.ts +0 -16
  799. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/predicate/isSymbol.d.ts.map +0 -1
  800. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/util/eq.d.ts +0 -15
  801. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/util/eq.d.ts.map +0 -1
  802. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/util/toFinite.d.ts +0 -16
  803. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/util/toFinite.d.ts.map +0 -1
  804. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/util/toInteger.d.ts +0 -19
  805. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/util/toInteger.d.ts.map +0 -1
  806. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/util/toNumber.d.ts +0 -18
  807. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/compat/util/toNumber.d.ts.map +0 -1
  808. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/error/AbortError.d.ts +0 -8
  809. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/error/AbortError.d.ts.map +0 -1
  810. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/error/TimeoutError.d.ts +0 -8
  811. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/error/TimeoutError.d.ts.map +0 -1
  812. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/error/index.d.ts +0 -3
  813. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/error/index.d.ts.map +0 -1
  814. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/after.d.ts +0 -30
  815. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/after.d.ts.map +0 -1
  816. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/ary.d.ts +0 -20
  817. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/ary.d.ts.map +0 -1
  818. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/asyncNoop.d.ts +0 -11
  819. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/asyncNoop.d.ts.map +0 -1
  820. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/before.d.ts +0 -30
  821. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/before.d.ts.map +0 -1
  822. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/curry.d.ts +0 -125
  823. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/curry.d.ts.map +0 -1
  824. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/curryRight.d.ts +0 -139
  825. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/curryRight.d.ts.map +0 -1
  826. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/debounce.d.ts +0 -74
  827. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/debounce.d.ts.map +0 -1
  828. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/flow.d.ts +0 -131
  829. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/flow.d.ts.map +0 -1
  830. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/flowRight.d.ts +0 -143
  831. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/flowRight.d.ts.map +0 -1
  832. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/identity.d.ts +0 -21
  833. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/identity.d.ts.map +0 -1
  834. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/index.d.ts +0 -22
  835. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/index.d.ts.map +0 -1
  836. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/memoize.d.ts +0 -123
  837. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/memoize.d.ts.map +0 -1
  838. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/negate.d.ts +0 -15
  839. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/negate.d.ts.map +0 -1
  840. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/noop.d.ts +0 -11
  841. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/noop.d.ts.map +0 -1
  842. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/once.d.ts +0 -34
  843. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/once.d.ts.map +0 -1
  844. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/partial.d.ts +0 -552
  845. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/partial.d.ts.map +0 -1
  846. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/partialRight.d.ts +0 -629
  847. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/partialRight.d.ts.map +0 -1
  848. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/rest.d.ts +0 -32
  849. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/rest.d.ts.map +0 -1
  850. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/retry.d.ts +0 -77
  851. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/retry.d.ts.map +0 -1
  852. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/spread.d.ts +0 -18
  853. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/spread.d.ts.map +0 -1
  854. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/throttle.d.ts +0 -48
  855. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/throttle.d.ts.map +0 -1
  856. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/unary.d.ts +0 -16
  857. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/function/unary.d.ts.map +0 -1
  858. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/index.d.ts +0 -66
  859. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/index.d.ts.map +0 -1
  860. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/clamp.d.ts +0 -31
  861. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/clamp.d.ts.map +0 -1
  862. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/inRange.d.ts +0 -26
  863. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/inRange.d.ts.map +0 -1
  864. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/index.d.ts +0 -14
  865. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/index.d.ts.map +0 -1
  866. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/mean.d.ts +0 -15
  867. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/mean.d.ts.map +0 -1
  868. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/meanBy.d.ts +0 -17
  869. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/meanBy.d.ts.map +0 -1
  870. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/median.d.ts +0 -24
  871. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/median.d.ts.map +0 -1
  872. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/medianBy.d.ts +0 -22
  873. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/medianBy.d.ts.map +0 -1
  874. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/random.d.ts +0 -29
  875. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/random.d.ts.map +0 -1
  876. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/randomInt.d.ts +0 -25
  877. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/randomInt.d.ts.map +0 -1
  878. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/range.d.ts +0 -37
  879. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/range.d.ts.map +0 -1
  880. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/rangeRight.d.ts +0 -37
  881. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/rangeRight.d.ts.map +0 -1
  882. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/round.d.ts +0 -19
  883. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/round.d.ts.map +0 -1
  884. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/sum.d.ts +0 -15
  885. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/sum.d.ts.map +0 -1
  886. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/sumBy.d.ts +0 -17
  887. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/math/sumBy.d.ts.map +0 -1
  888. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/clone.d.ts +0 -30
  889. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/clone.d.ts.map +0 -1
  890. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/cloneDeep.d.ts +0 -48
  891. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/cloneDeep.d.ts.map +0 -1
  892. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/cloneDeepWith.d.ts +0 -44
  893. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/cloneDeepWith.d.ts.map +0 -1
  894. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/findKey.d.ts +0 -20
  895. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/findKey.d.ts.map +0 -1
  896. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/flattenObject.d.ts +0 -36
  897. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/flattenObject.d.ts.map +0 -1
  898. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/index.d.ts +0 -18
  899. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/index.d.ts.map +0 -1
  900. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/invert.d.ts +0 -20
  901. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/invert.d.ts.map +0 -1
  902. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/mapKeys.d.ts +0 -19
  903. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/mapKeys.d.ts.map +0 -1
  904. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/mapValues.d.ts +0 -20
  905. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/mapValues.d.ts.map +0 -1
  906. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/merge.d.ts +0 -42
  907. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/merge.d.ts.map +0 -1
  908. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/mergeWith.d.ts +0 -50
  909. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/mergeWith.d.ts.map +0 -1
  910. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/omit.d.ts +0 -19
  911. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/omit.d.ts.map +0 -1
  912. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/omitBy.d.ts +0 -21
  913. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/omitBy.d.ts.map +0 -1
  914. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/pick.d.ts +0 -19
  915. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/pick.d.ts.map +0 -1
  916. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/pickBy.d.ts +0 -21
  917. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/pickBy.d.ts.map +0 -1
  918. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/toCamelCaseKeys.d.ts +0 -53
  919. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/toCamelCaseKeys.d.ts.map +0 -1
  920. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/toMerged.d.ts +0 -44
  921. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/toMerged.d.ts.map +0 -1
  922. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/toSnakeCaseKeys.d.ts +0 -53
  923. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/object/toSnakeCaseKeys.d.ts.map +0 -1
  924. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/index.d.ts +0 -31
  925. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/index.d.ts.map +0 -1
  926. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isArrayBuffer.d.ts +0 -19
  927. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isArrayBuffer.d.ts.map +0 -1
  928. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isBlob.d.ts +0 -18
  929. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isBlob.d.ts.map +0 -1
  930. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isBoolean.d.ts +0 -24
  931. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isBoolean.d.ts.map +0 -1
  932. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isBrowser.d.ts +0 -16
  933. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isBrowser.d.ts.map +0 -1
  934. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isBuffer.d.ts +0 -20
  935. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isBuffer.d.ts.map +0 -1
  936. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isDate.d.ts +0 -15
  937. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isDate.d.ts.map +0 -1
  938. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isEqual.d.ts +0 -16
  939. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isEqual.d.ts.map +0 -1
  940. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isEqualWith.d.ts +0 -37
  941. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isEqualWith.d.ts.map +0 -1
  942. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isError.d.ts +0 -15
  943. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isError.d.ts.map +0 -1
  944. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isFile.d.ts +0 -20
  945. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isFile.d.ts.map +0 -1
  946. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isFunction.d.ts +0 -15
  947. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isFunction.d.ts.map +0 -1
  948. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isJSON.d.ts +0 -30
  949. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isJSON.d.ts.map +0 -1
  950. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isJSONValue.d.ts +0 -55
  951. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isJSONValue.d.ts.map +0 -1
  952. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isLength.d.ts +0 -23
  953. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isLength.d.ts.map +0 -1
  954. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isMap.d.ts +0 -19
  955. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isMap.d.ts.map +0 -1
  956. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isNil.d.ts +0 -21
  957. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isNil.d.ts.map +0 -1
  958. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isNode.d.ts +0 -16
  959. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isNode.d.ts.map +0 -1
  960. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isNotNil.d.ts +0 -18
  961. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isNotNil.d.ts.map +0 -1
  962. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isNull.d.ts +0 -22
  963. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isNull.d.ts.map +0 -1
  964. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isPlainObject.d.ts +0 -44
  965. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isPlainObject.d.ts.map +0 -1
  966. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isPrimitive.d.ts +0 -30
  967. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isPrimitive.d.ts.map +0 -1
  968. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isPromise.d.ts +0 -19
  969. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isPromise.d.ts.map +0 -1
  970. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isRegExp.d.ts +0 -15
  971. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isRegExp.d.ts.map +0 -1
  972. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isSet.d.ts +0 -19
  973. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isSet.d.ts.map +0 -1
  974. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isString.d.ts +0 -19
  975. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isString.d.ts.map +0 -1
  976. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isSymbol.d.ts +0 -25
  977. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isSymbol.d.ts.map +0 -1
  978. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isTypedArray.d.ts +0 -28
  979. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isTypedArray.d.ts.map +0 -1
  980. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isUndefined.d.ts +0 -22
  981. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isUndefined.d.ts.map +0 -1
  982. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isWeakMap.d.ts +0 -22
  983. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isWeakMap.d.ts.map +0 -1
  984. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isWeakSet.d.ts +0 -22
  985. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/predicate/isWeakSet.d.ts.map +0 -1
  986. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/delay.d.ts +0 -38
  987. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/delay.d.ts.map +0 -1
  988. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/index.d.ts +0 -6
  989. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/index.d.ts.map +0 -1
  990. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/mutex.d.ts +0 -63
  991. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/mutex.d.ts.map +0 -1
  992. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/semaphore.d.ts +0 -80
  993. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/semaphore.d.ts.map +0 -1
  994. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/timeout.d.ts +0 -16
  995. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/timeout.d.ts.map +0 -1
  996. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/withTimeout.d.ts +0 -27
  997. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/promise/withTimeout.d.ts.map +0 -1
  998. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/camelCase.d.ts +0 -18
  999. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/camelCase.d.ts.map +0 -1
  1000. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/capitalize.d.ts +0 -15
  1001. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/capitalize.d.ts.map +0 -1
  1002. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/constantCase.d.ts +0 -16
  1003. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/constantCase.d.ts.map +0 -1
  1004. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/deburr.d.ts +0 -21
  1005. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/deburr.d.ts.map +0 -1
  1006. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/escape.d.ts +0 -15
  1007. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/escape.d.ts.map +0 -1
  1008. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/escapeRegExp.d.ts +0 -13
  1009. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/escapeRegExp.d.ts.map +0 -1
  1010. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/index.d.ts +0 -22
  1011. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/index.d.ts.map +0 -1
  1012. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/kebabCase.d.ts +0 -16
  1013. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/kebabCase.d.ts.map +0 -1
  1014. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/lowerCase.d.ts +0 -16
  1015. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/lowerCase.d.ts.map +0 -1
  1016. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/lowerFirst.d.ts +0 -13
  1017. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/lowerFirst.d.ts.map +0 -1
  1018. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/pad.d.ts +0 -18
  1019. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/pad.d.ts.map +0 -1
  1020. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/pascalCase.d.ts +0 -16
  1021. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/pascalCase.d.ts.map +0 -1
  1022. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/reverseString.d.ts +0 -15
  1023. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/reverseString.d.ts.map +0 -1
  1024. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/snakeCase.d.ts +0 -16
  1025. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/snakeCase.d.ts.map +0 -1
  1026. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/startCase.d.ts +0 -15
  1027. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/startCase.d.ts.map +0 -1
  1028. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/trim.d.ts +0 -14
  1029. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/trim.d.ts.map +0 -1
  1030. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/trimEnd.d.ts +0 -18
  1031. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/trimEnd.d.ts.map +0 -1
  1032. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/trimStart.d.ts +0 -18
  1033. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/trimStart.d.ts.map +0 -1
  1034. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/unescape.d.ts +0 -15
  1035. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/unescape.d.ts.map +0 -1
  1036. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/upperCase.d.ts +0 -16
  1037. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/upperCase.d.ts.map +0 -1
  1038. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/upperFirst.d.ts +0 -13
  1039. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/upperFirst.d.ts.map +0 -1
  1040. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/words.d.ts +0 -37
  1041. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/string/words.d.ts.map +0 -1
  1042. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/util/attempt.d.ts +0 -41
  1043. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/util/attempt.d.ts.map +0 -1
  1044. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/util/attemptAsync.d.ts +0 -34
  1045. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/util/attemptAsync.d.ts.map +0 -1
  1046. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/util/index.d.ts +0 -5
  1047. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/util/index.d.ts.map +0 -1
  1048. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/util/invariant.d.ts +0 -39
  1049. package/types/deps/jsr.io/@es-toolkit/es-toolkit/1.38.0/src/util/invariant.d.ts.map +0 -1
  1050. package/types/federation/builder.d.ts +0 -79
  1051. package/types/federation/builder.d.ts.map +0 -1
  1052. package/types/federation/callback.d.ts +0 -202
  1053. package/types/federation/callback.d.ts.map +0 -1
  1054. package/types/federation/collection.d.ts +0 -27
  1055. package/types/federation/collection.d.ts.map +0 -1
  1056. package/types/federation/context.d.ts +0 -727
  1057. package/types/federation/context.d.ts.map +0 -1
  1058. package/types/federation/federation.d.ts +0 -682
  1059. package/types/federation/federation.d.ts.map +0 -1
  1060. package/types/federation/handler.d.ts +0 -120
  1061. package/types/federation/handler.d.ts.map +0 -1
  1062. package/types/federation/inbox.d.ts +0 -35
  1063. package/types/federation/inbox.d.ts.map +0 -1
  1064. package/types/federation/keycache.d.ts +0 -18
  1065. package/types/federation/keycache.d.ts.map +0 -1
  1066. package/types/federation/kv.d.ts +0 -66
  1067. package/types/federation/kv.d.ts.map +0 -1
  1068. package/types/federation/middleware.d.ts +0 -262
  1069. package/types/federation/middleware.d.ts.map +0 -1
  1070. package/types/federation/mod.d.ts +0 -19
  1071. package/types/federation/mod.d.ts.map +0 -1
  1072. package/types/federation/mq.d.ts +0 -119
  1073. package/types/federation/mq.d.ts.map +0 -1
  1074. package/types/federation/negotiation.d.ts +0 -37
  1075. package/types/federation/negotiation.d.ts.map +0 -1
  1076. package/types/federation/queue.d.ts +0 -47
  1077. package/types/federation/queue.d.ts.map +0 -1
  1078. package/types/federation/retry.d.ts +0 -64
  1079. package/types/federation/retry.d.ts.map +0 -1
  1080. package/types/federation/router.d.ts +0 -83
  1081. package/types/federation/router.d.ts.map +0 -1
  1082. package/types/federation/send.d.ts +0 -108
  1083. package/types/federation/send.d.ts.map +0 -1
  1084. package/types/mod.d.ts +0 -53
  1085. package/types/mod.d.ts.map +0 -1
  1086. package/types/nodeinfo/client.d.ts +0 -94
  1087. package/types/nodeinfo/client.d.ts.map +0 -1
  1088. package/types/nodeinfo/handler.d.ts +0 -32
  1089. package/types/nodeinfo/handler.d.ts.map +0 -1
  1090. package/types/nodeinfo/mod.d.ts +0 -12
  1091. package/types/nodeinfo/mod.d.ts.map +0 -1
  1092. package/types/nodeinfo/semver.d.ts +0 -71
  1093. package/types/nodeinfo/semver.d.ts.map +0 -1
  1094. package/types/nodeinfo/types.d.ts +0 -133
  1095. package/types/nodeinfo/types.d.ts.map +0 -1
  1096. package/types/runtime/contexts.d.ts +0 -3
  1097. package/types/runtime/contexts.d.ts.map +0 -1
  1098. package/types/runtime/docloader.d.ts +0 -225
  1099. package/types/runtime/docloader.d.ts.map +0 -1
  1100. package/types/runtime/key.d.ts +0 -54
  1101. package/types/runtime/key.d.ts.map +0 -1
  1102. package/types/runtime/langstr.d.ts +0 -15
  1103. package/types/runtime/langstr.d.ts.map +0 -1
  1104. package/types/runtime/mod.d.ts +0 -11
  1105. package/types/runtime/mod.d.ts.map +0 -1
  1106. package/types/runtime/multibase/base.d.ts +0 -15
  1107. package/types/runtime/multibase/base.d.ts.map +0 -1
  1108. package/types/runtime/multibase/constants.d.ts +0 -5
  1109. package/types/runtime/multibase/constants.d.ts.map +0 -1
  1110. package/types/runtime/multibase/index.d.ts +0 -24
  1111. package/types/runtime/multibase/index.d.ts.map +0 -1
  1112. package/types/runtime/multibase/rfc4648.d.ts +0 -6
  1113. package/types/runtime/multibase/rfc4648.d.ts.map +0 -1
  1114. package/types/runtime/multibase/util.d.ts +0 -4
  1115. package/types/runtime/multibase/util.d.ts.map +0 -1
  1116. package/types/runtime/url.d.ts +0 -11
  1117. package/types/runtime/url.d.ts.map +0 -1
  1118. package/types/shim/event.d.ts.map +0 -1
  1119. package/types/sig/http.d.ts +0 -221
  1120. package/types/sig/http.d.ts.map +0 -1
  1121. package/types/sig/key.d.ts +0 -123
  1122. package/types/sig/key.d.ts.map +0 -1
  1123. package/types/sig/ld.d.ts +0 -152
  1124. package/types/sig/ld.d.ts.map +0 -1
  1125. package/types/sig/mod.d.ts +0 -12
  1126. package/types/sig/mod.d.ts.map +0 -1
  1127. package/types/sig/owner.d.ts +0 -65
  1128. package/types/sig/owner.d.ts.map +0 -1
  1129. package/types/sig/proof.d.ts +0 -122
  1130. package/types/sig/proof.d.ts.map +0 -1
  1131. package/types/vocab/actor.d.ts +0 -125
  1132. package/types/vocab/actor.d.ts.map +0 -1
  1133. package/types/vocab/constants.d.ts +0 -10
  1134. package/types/vocab/constants.d.ts.map +0 -1
  1135. package/types/vocab/lookup.d.ts +0 -115
  1136. package/types/vocab/lookup.d.ts.map +0 -1
  1137. package/types/vocab/mod.d.ts +0 -58
  1138. package/types/vocab/mod.d.ts.map +0 -1
  1139. package/types/vocab/type.d.ts +0 -82
  1140. package/types/vocab/type.d.ts.map +0 -1
  1141. package/types/vocab/vocab.d.ts +0 -14437
  1142. package/types/vocab/vocab.d.ts.map +0 -1
  1143. package/types/webfinger/handler.d.ts +0 -56
  1144. package/types/webfinger/handler.d.ts.map +0 -1
  1145. package/types/webfinger/jrd.d.ts +0 -52
  1146. package/types/webfinger/jrd.d.ts.map +0 -1
  1147. package/types/webfinger/lookup.d.ts +0 -39
  1148. package/types/webfinger/lookup.d.ts.map +0 -1
  1149. package/types/webfinger/mod.d.ts +0 -9
  1150. package/types/webfinger/mod.d.ts.map +0 -1
  1151. package/types/x/hono.d.ts +0 -46
  1152. package/types/x/hono.d.ts.map +0 -1
  1153. package/types/x/sveltekit.d.ts +0 -42
  1154. package/types/x/sveltekit.d.ts.map +0 -1
  1155. /package/{esm → dist}/codegen/schema.yaml +0 -0
  1156. /package/{esm → dist}/testing/fixtures/activitypub.academy/users/brauca_darradiul +0 -0
  1157. /package/{esm → dist}/testing/fixtures/example.com/announce +0 -0
  1158. /package/{esm → dist}/testing/fixtures/example.com/collection +0 -0
  1159. /package/{esm → dist}/testing/fixtures/example.com/create +0 -0
  1160. /package/{esm → dist}/testing/fixtures/example.com/cross-origin-actor +0 -0
  1161. /package/{esm → dist}/testing/fixtures/example.com/hong-gildong +0 -0
  1162. /package/{esm → dist}/testing/fixtures/example.com/invite +0 -0
  1163. /package/{esm → dist}/testing/fixtures/example.com/key +0 -0
  1164. /package/{esm → dist}/testing/fixtures/example.com/key2 +0 -0
  1165. /package/{esm → dist}/testing/fixtures/example.com/object +0 -0
  1166. /package/{esm → dist}/testing/fixtures/example.com/orderedcollectionpage +0 -0
  1167. /package/{esm → dist}/testing/fixtures/example.com/paged/a +0 -0
  1168. /package/{esm → dist}/testing/fixtures/example.com/paged/b +0 -0
  1169. /package/{esm → dist}/testing/fixtures/example.com/paged-collection +0 -0
  1170. /package/{esm → dist}/testing/fixtures/example.com/person +0 -0
  1171. /package/{esm → dist}/testing/fixtures/example.com/person2 +0 -0
  1172. /package/{esm → dist}/testing/fixtures/example.com/test +0 -0
  1173. /package/{esm → dist}/testing/fixtures/example.com/users/handle +0 -0
  1174. /package/{esm → dist}/testing/fixtures/example.com/wrong-type +0 -0
  1175. /package/{esm → dist}/testing/fixtures/remote.domain/users/bob +0 -0
  1176. /package/{esm → dist}/testing/fixtures/server.example/users/alice +0 -0
  1177. /package/{esm → dist}/testing/fixtures/w3id.org/identity/v1 +0 -0
  1178. /package/{esm → dist}/testing/fixtures/w3id.org/security/data-integrity/v1 +0 -0
  1179. /package/{esm → dist}/testing/fixtures/w3id.org/security/multikey/v1 +0 -0
  1180. /package/{esm → dist}/testing/fixtures/w3id.org/security/v1 +0 -0
  1181. /package/{esm → dist}/testing/fixtures/wizard.casa/users/hongminhee +0 -0
  1182. /package/{esm → dist}/testing/fixtures/www.w3.org/ns/activitystreams +0 -0
  1183. /package/{esm → dist}/testing/fixtures/www.w3.org/ns/did/v1 +0 -0
  1184. /package/{esm → dist}/vocab/accept.yaml +0 -0
  1185. /package/{esm → dist}/vocab/activity.yaml +0 -0
  1186. /package/{esm → dist}/vocab/add.yaml +0 -0
  1187. /package/{esm → dist}/vocab/announce.yaml +0 -0
  1188. /package/{esm → dist}/vocab/application.yaml +0 -0
  1189. /package/{esm → dist}/vocab/arrive.yaml +0 -0
  1190. /package/{esm → dist}/vocab/article.yaml +0 -0
  1191. /package/{esm → dist}/vocab/audio.yaml +0 -0
  1192. /package/{esm → dist}/vocab/block.yaml +0 -0
  1193. /package/{esm → dist}/vocab/chatmessage.yaml +0 -0
  1194. /package/{esm → dist}/vocab/collection.yaml +0 -0
  1195. /package/{esm → dist}/vocab/collectionpage.yaml +0 -0
  1196. /package/{esm → dist}/vocab/create.yaml +0 -0
  1197. /package/{esm → dist}/vocab/dataintegrityproof.yaml +0 -0
  1198. /package/{esm → dist}/vocab/delete.yaml +0 -0
  1199. /package/{esm → dist}/vocab/didservice.yaml +0 -0
  1200. /package/{esm → dist}/vocab/dislike.yaml +0 -0
  1201. /package/{esm → dist}/vocab/document.yaml +0 -0
  1202. /package/{esm → dist}/vocab/emoji.yaml +0 -0
  1203. /package/{esm → dist}/vocab/emojireact.yaml +0 -0
  1204. /package/{esm → dist}/vocab/endpoints.yaml +0 -0
  1205. /package/{esm → dist}/vocab/event.yaml +0 -0
  1206. /package/{esm → dist}/vocab/export.yaml +0 -0
  1207. /package/{esm → dist}/vocab/flag.yaml +0 -0
  1208. /package/{esm → dist}/vocab/follow.yaml +0 -0
  1209. /package/{esm → dist}/vocab/group.yaml +0 -0
  1210. /package/{esm → dist}/vocab/hashtag.yaml +0 -0
  1211. /package/{esm → dist}/vocab/ignore.yaml +0 -0
  1212. /package/{esm → dist}/vocab/image.yaml +0 -0
  1213. /package/{esm → dist}/vocab/intransitiveactivity.yaml +0 -0
  1214. /package/{esm → dist}/vocab/invite.yaml +0 -0
  1215. /package/{esm → dist}/vocab/join.yaml +0 -0
  1216. /package/{esm → dist}/vocab/key.yaml +0 -0
  1217. /package/{esm → dist}/vocab/leave.yaml +0 -0
  1218. /package/{esm → dist}/vocab/like.yaml +0 -0
  1219. /package/{esm → dist}/vocab/link.yaml +0 -0
  1220. /package/{esm → dist}/vocab/listen.yaml +0 -0
  1221. /package/{esm → dist}/vocab/mention.yaml +0 -0
  1222. /package/{esm → dist}/vocab/move.yaml +0 -0
  1223. /package/{esm → dist}/vocab/multikey.yaml +0 -0
  1224. /package/{esm → dist}/vocab/note.yaml +0 -0
  1225. /package/{esm → dist}/vocab/object.yaml +0 -0
  1226. /package/{esm → dist}/vocab/offer.yaml +0 -0
  1227. /package/{esm → dist}/vocab/orderedcollection.yaml +0 -0
  1228. /package/{esm → dist}/vocab/orderedcollectionpage.yaml +0 -0
  1229. /package/{esm → dist}/vocab/organization.yaml +0 -0
  1230. /package/{esm → dist}/vocab/page.yaml +0 -0
  1231. /package/{esm → dist}/vocab/person.yaml +0 -0
  1232. /package/{esm → dist}/vocab/place.yaml +0 -0
  1233. /package/{esm → dist}/vocab/profile.yaml +0 -0
  1234. /package/{esm → dist}/vocab/propertyvalue.yaml +0 -0
  1235. /package/{esm → dist}/vocab/question.yaml +0 -0
  1236. /package/{esm → dist}/vocab/read.yaml +0 -0
  1237. /package/{esm → dist}/vocab/reject.yaml +0 -0
  1238. /package/{esm → dist}/vocab/relationship.yaml +0 -0
  1239. /package/{esm → dist}/vocab/remove.yaml +0 -0
  1240. /package/{esm → dist}/vocab/service.yaml +0 -0
  1241. /package/{esm → dist}/vocab/source.yaml +0 -0
  1242. /package/{esm → dist}/vocab/tentativeaccept.yaml +0 -0
  1243. /package/{esm → dist}/vocab/tentativereject.yaml +0 -0
  1244. /package/{esm → dist}/vocab/tombstone.yaml +0 -0
  1245. /package/{esm → dist}/vocab/travel.yaml +0 -0
  1246. /package/{esm → dist}/vocab/undo.yaml +0 -0
  1247. /package/{esm → dist}/vocab/update.yaml +0 -0
  1248. /package/{esm → dist}/vocab/video.yaml +0 -0
  1249. /package/{esm → dist}/vocab/view.yaml +0 -0
@@ -0,0 +1,1775 @@
1
+
2
+ import { Temporal } from "@js-temporal/polyfill";
3
+ import { URLPattern } from "urlpattern-polyfill";
4
+
5
+ import { getDefaultActivityTransformers } from "../compat/transformers.js";
6
+ import { deno_default } from "../deno.js";
7
+ import { getTypeId } from "../vocab/type.js";
8
+ import { getDocumentLoader, kvCache } from "../runtime/docloader.js";
9
+ import { Activity, CryptographicKey, Multikey } from "../vocab/vocab.js";
10
+ import { routeActivity } from "./inbox.js";
11
+ import { RouterError } from "./router.js";
12
+ import { FederationBuilderImpl } from "./builder.js";
13
+ import { buildCollectionSynchronizationHeader } from "./collection.js";
14
+ import { lookupWebFinger } from "../webfinger/lookup.js";
15
+ import { exportJwk, importJwk, validateCryptoKey } from "../sig/key.js";
16
+ import { verifyRequest } from "../sig/http.js";
17
+ import { hasSignature, signJsonLd } from "../sig/ld.js";
18
+ import { getKeyOwner } from "../sig/owner.js";
19
+ import { signObject, verifyObject } from "../sig/proof.js";
20
+ import { KvKeyCache } from "./keycache.js";
21
+ import { handleActor, handleCollection, handleInbox, handleObject } from "./handler.js";
22
+ import { getNodeInfo } from "../nodeinfo/client.js";
23
+ import { handleNodeInfo, handleNodeInfoJrd } from "../nodeinfo/handler.js";
24
+ import { getAuthenticatedDocumentLoader } from "../runtime/authdocloader.js";
25
+ import { lookupObject, traverseCollection } from "../vocab/lookup.js";
26
+ import { handleWebFinger } from "../webfinger/handler.js";
27
+ import { createExponentialBackoffPolicy } from "./retry.js";
28
+ import { extractInboxes, sendActivity } from "./send.js";
29
+ import { getLogger, withContext } from "@logtape/logtape";
30
+ import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
31
+ import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
32
+
33
+ //#region federation/middleware.ts
34
+ /**
35
+ * Create a new {@link Federation} instance.
36
+ * @param parameters Parameters for initializing the instance.
37
+ * @returns A new {@link Federation} instance.
38
+ * @since 0.10.0
39
+ */
40
+ function createFederation(options) {
41
+ return new FederationImpl(options);
42
+ }
43
+ var FederationImpl = class extends FederationBuilderImpl {
44
+ kv;
45
+ kvPrefixes;
46
+ inboxQueue;
47
+ outboxQueue;
48
+ fanoutQueue;
49
+ inboxQueueStarted;
50
+ outboxQueueStarted;
51
+ fanoutQueueStarted;
52
+ manuallyStartQueue;
53
+ origin;
54
+ documentLoaderFactory;
55
+ contextLoaderFactory;
56
+ authenticatedDocumentLoaderFactory;
57
+ allowPrivateAddress;
58
+ userAgent;
59
+ onOutboxError;
60
+ signatureTimeWindow;
61
+ skipSignatureVerification;
62
+ outboxRetryPolicy;
63
+ inboxRetryPolicy;
64
+ activityTransformers;
65
+ tracerProvider;
66
+ constructor(options) {
67
+ super();
68
+ const logger = getLogger(["fedify", "federation"]);
69
+ this.kv = options.kv;
70
+ this.kvPrefixes = {
71
+ activityIdempotence: ["_fedify", "activityIdempotence"],
72
+ remoteDocument: ["_fedify", "remoteDocument"],
73
+ publicKey: ["_fedify", "publicKey"],
74
+ httpMessageSignaturesSpec: ["_fedify", "httpMessageSignaturesSpec"],
75
+ ...options.kvPrefixes ?? {}
76
+ };
77
+ if (options.queue == null) {
78
+ this.inboxQueue = void 0;
79
+ this.outboxQueue = void 0;
80
+ this.fanoutQueue = void 0;
81
+ } else if ("enqueue" in options.queue && "listen" in options.queue) {
82
+ this.inboxQueue = options.queue;
83
+ this.outboxQueue = options.queue;
84
+ this.fanoutQueue = options.queue;
85
+ } else {
86
+ this.inboxQueue = options.queue.inbox;
87
+ this.outboxQueue = options.queue.outbox;
88
+ this.fanoutQueue = options.queue.fanout;
89
+ }
90
+ this.inboxQueueStarted = false;
91
+ this.outboxQueueStarted = false;
92
+ this.fanoutQueueStarted = false;
93
+ this.manuallyStartQueue = options.manuallyStartQueue ?? false;
94
+ if (options.origin != null) if (typeof options.origin === "string") {
95
+ if (!URL.canParse(options.origin) || !options.origin.match(/^https?:\/\//)) throw new TypeError(`Invalid origin: ${JSON.stringify(options.origin)}`);
96
+ const origin = new URL(options.origin);
97
+ if (!origin.pathname.match(/^\/*$/) || origin.search !== "" || origin.hash !== "") throw new TypeError(`Invalid origin: ${JSON.stringify(options.origin)}`);
98
+ this.origin = {
99
+ handleHost: origin.host,
100
+ webOrigin: origin.origin
101
+ };
102
+ } else {
103
+ const { handleHost, webOrigin } = options.origin;
104
+ if (!URL.canParse(`https://${handleHost}/`) || handleHost.includes("/")) throw new TypeError(`Invalid origin.handleHost: ${JSON.stringify(handleHost)}`);
105
+ if (!URL.canParse(webOrigin) || !webOrigin.match(/^https?:\/\//)) throw new TypeError(`Invalid origin.webOrigin: ${JSON.stringify(webOrigin)}`);
106
+ const webOriginUrl = new URL(webOrigin);
107
+ if (!webOriginUrl.pathname.match(/^\/*$/) || webOriginUrl.search !== "" || webOriginUrl.hash !== "") throw new TypeError(`Invalid origin.webOrigin: ${JSON.stringify(webOrigin)}`);
108
+ this.origin = {
109
+ handleHost: new URL(`https://${handleHost}/`).host,
110
+ webOrigin: webOriginUrl.origin
111
+ };
112
+ }
113
+ this.router.trailingSlashInsensitive = options.trailingSlashInsensitive ?? false;
114
+ this._initializeRouter();
115
+ if (options.allowPrivateAddress || options.userAgent != null) {
116
+ if (options.documentLoader != null) throw new TypeError("Cannot set documentLoader with allowPrivateAddress or userAgent options.");
117
+ else if (options.contextLoader != null) throw new TypeError("Cannot set contextLoader with allowPrivateAddress or userAgent options.");
118
+ else if (options.authenticatedDocumentLoaderFactory != null) throw new TypeError("Cannot set authenticatedDocumentLoaderFactory with allowPrivateAddress or userAgent options.");
119
+ }
120
+ const { allowPrivateAddress, userAgent } = options;
121
+ this.allowPrivateAddress = allowPrivateAddress ?? false;
122
+ if (options.documentLoader != null) {
123
+ if (options.documentLoaderFactory != null) throw new TypeError("Cannot set both documentLoader and documentLoaderFactory options at a time; use documentLoaderFactory only.");
124
+ this.documentLoaderFactory = () => options.documentLoader;
125
+ logger.warn("The documentLoader option is deprecated; use documentLoaderFactory option instead.");
126
+ } else this.documentLoaderFactory = options.documentLoaderFactory ?? ((opts) => {
127
+ return kvCache({
128
+ loader: getDocumentLoader({
129
+ allowPrivateAddress: opts?.allowPrivateAddress ?? allowPrivateAddress,
130
+ userAgent: opts?.userAgent ?? userAgent
131
+ }),
132
+ kv: options.kv,
133
+ prefix: this.kvPrefixes.remoteDocument
134
+ });
135
+ });
136
+ if (options.contextLoader != null) {
137
+ if (options.contextLoaderFactory != null) throw new TypeError("Cannot set both contextLoader and contextLoaderFactory options at a time; use contextLoaderFactory only.");
138
+ this.contextLoaderFactory = () => options.contextLoader;
139
+ logger.warn("The contextLoader option is deprecated; use contextLoaderFactory option instead.");
140
+ } else this.contextLoaderFactory = options.contextLoaderFactory ?? this.documentLoaderFactory;
141
+ this.authenticatedDocumentLoaderFactory = options.authenticatedDocumentLoaderFactory ?? ((identity) => getAuthenticatedDocumentLoader(identity, {
142
+ allowPrivateAddress,
143
+ userAgent,
144
+ specDeterminer: new KvSpecDeterminer(this.kv, this.kvPrefixes.httpMessageSignaturesSpec),
145
+ tracerProvider: this.tracerProvider
146
+ }));
147
+ this.userAgent = userAgent;
148
+ this.onOutboxError = options.onOutboxError;
149
+ this.signatureTimeWindow = options.signatureTimeWindow ?? { hours: 1 };
150
+ this.skipSignatureVerification = options.skipSignatureVerification ?? false;
151
+ this.outboxRetryPolicy = options.outboxRetryPolicy ?? createExponentialBackoffPolicy();
152
+ this.inboxRetryPolicy = options.inboxRetryPolicy ?? createExponentialBackoffPolicy();
153
+ this.activityTransformers = options.activityTransformers ?? getDefaultActivityTransformers();
154
+ this.tracerProvider = options.tracerProvider ?? trace.getTracerProvider();
155
+ }
156
+ _initializeRouter() {
157
+ this.router.add("/.well-known/webfinger", "webfinger");
158
+ this.router.add("/.well-known/nodeinfo", "nodeInfoJrd");
159
+ }
160
+ _getTracer() {
161
+ return this.tracerProvider.getTracer(deno_default.name, deno_default.version);
162
+ }
163
+ async _startQueueInternal(ctxData, signal, queue) {
164
+ if (this.inboxQueue == null && this.outboxQueue == null) return;
165
+ const logger = getLogger([
166
+ "fedify",
167
+ "federation",
168
+ "queue"
169
+ ]);
170
+ const promises = [];
171
+ if (this.inboxQueue != null && (queue == null || queue === "inbox") && !this.inboxQueueStarted) {
172
+ logger.debug("Starting an inbox task worker.");
173
+ this.inboxQueueStarted = true;
174
+ promises.push(this.inboxQueue.listen((msg) => this.#listenQueue(ctxData, msg), { signal }));
175
+ }
176
+ if (this.outboxQueue != null && this.outboxQueue !== this.inboxQueue && (queue == null || queue === "outbox") && !this.outboxQueueStarted) {
177
+ logger.debug("Starting an outbox task worker.");
178
+ this.outboxQueueStarted = true;
179
+ promises.push(this.outboxQueue.listen((msg) => this.#listenQueue(ctxData, msg), { signal }));
180
+ }
181
+ if (this.fanoutQueue != null && this.fanoutQueue !== this.inboxQueue && this.fanoutQueue !== this.outboxQueue && (queue == null || queue === "fanout") && !this.fanoutQueueStarted) {
182
+ logger.debug("Starting a fanout task worker.");
183
+ this.fanoutQueueStarted = true;
184
+ promises.push(this.fanoutQueue.listen((msg) => this.#listenQueue(ctxData, msg), { signal }));
185
+ }
186
+ await Promise.all(promises);
187
+ }
188
+ #listenQueue(ctxData, message) {
189
+ const tracer = this._getTracer();
190
+ const extractedContext = propagation.extract(context.active(), message.traceContext);
191
+ return withContext({ messageId: message.id }, async () => {
192
+ if (message.type === "fanout") await tracer.startActiveSpan("activitypub.fanout", {
193
+ kind: SpanKind.CONSUMER,
194
+ attributes: { "activitypub.activity.type": message.activityType }
195
+ }, extractedContext, async (span) => {
196
+ if (message.activityId != null) span.setAttribute("activitypub.activity.id", message.activityId);
197
+ try {
198
+ await this.#listenFanoutMessage(ctxData, message);
199
+ } catch (e) {
200
+ span.setStatus({
201
+ code: SpanStatusCode.ERROR,
202
+ message: String(e)
203
+ });
204
+ throw e;
205
+ } finally {
206
+ span.end();
207
+ }
208
+ });
209
+ else if (message.type === "outbox") await tracer.startActiveSpan("activitypub.outbox", {
210
+ kind: SpanKind.CONSUMER,
211
+ attributes: {
212
+ "activitypub.activity.type": message.activityType,
213
+ "activitypub.activity.retries": message.attempt
214
+ }
215
+ }, extractedContext, async (span) => {
216
+ if (message.activityId != null) span.setAttribute("activitypub.activity.id", message.activityId);
217
+ try {
218
+ await this.#listenOutboxMessage(ctxData, message, span);
219
+ } catch (e) {
220
+ span.setStatus({
221
+ code: SpanStatusCode.ERROR,
222
+ message: String(e)
223
+ });
224
+ throw e;
225
+ } finally {
226
+ span.end();
227
+ }
228
+ });
229
+ else if (message.type === "inbox") await tracer.startActiveSpan("activitypub.inbox", {
230
+ kind: SpanKind.CONSUMER,
231
+ attributes: { "activitypub.shared_inbox": message.identifier == null }
232
+ }, extractedContext, async (span) => {
233
+ try {
234
+ await this.#listenInboxMessage(ctxData, message, span);
235
+ } catch (e) {
236
+ span.setStatus({
237
+ code: SpanStatusCode.ERROR,
238
+ message: String(e)
239
+ });
240
+ throw e;
241
+ } finally {
242
+ span.end();
243
+ }
244
+ });
245
+ });
246
+ }
247
+ async #listenFanoutMessage(data, message) {
248
+ const logger = getLogger([
249
+ "fedify",
250
+ "federation",
251
+ "fanout"
252
+ ]);
253
+ logger.debug("Fanning out activity {activityId} to {inboxes} inbox(es)...", {
254
+ activityId: message.activityId,
255
+ inboxes: globalThis.Object.keys(message.inboxes).length
256
+ });
257
+ const keys = await Promise.all(message.keys.map(async ({ keyId, privateKey }) => ({
258
+ keyId: new URL(keyId),
259
+ privateKey: await importJwk(privateKey, "private")
260
+ })));
261
+ const activity = await Activity.fromJsonLd(message.activity, {
262
+ contextLoader: this.contextLoaderFactory({
263
+ allowPrivateAddress: this.allowPrivateAddress,
264
+ userAgent: this.userAgent
265
+ }),
266
+ documentLoader: this.documentLoaderFactory({
267
+ allowPrivateAddress: this.allowPrivateAddress,
268
+ userAgent: this.userAgent
269
+ }),
270
+ tracerProvider: this.tracerProvider
271
+ });
272
+ const context$1 = this.#createContext(new URL(message.baseUrl), data, { documentLoader: this.documentLoaderFactory({
273
+ allowPrivateAddress: this.allowPrivateAddress,
274
+ userAgent: this.userAgent
275
+ }) });
276
+ await this.sendActivity(keys, message.inboxes, activity, {
277
+ collectionSync: message.collectionSync,
278
+ context: context$1
279
+ });
280
+ }
281
+ async #listenOutboxMessage(_, message, span) {
282
+ const logger = getLogger([
283
+ "fedify",
284
+ "federation",
285
+ "outbox"
286
+ ]);
287
+ const logData = {
288
+ keyIds: message.keys.map((pair) => pair.keyId),
289
+ inbox: message.inbox,
290
+ activity: message.activity,
291
+ activityId: message.activityId,
292
+ attempt: message.attempt,
293
+ headers: message.headers
294
+ };
295
+ const keys = [];
296
+ let rsaKeyPair = null;
297
+ for (const { keyId, privateKey } of message.keys) {
298
+ const pair = {
299
+ keyId: new URL(keyId),
300
+ privateKey: await importJwk(privateKey, "private")
301
+ };
302
+ if (rsaKeyPair == null && pair.privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKeyPair = pair;
303
+ keys.push(pair);
304
+ }
305
+ try {
306
+ await sendActivity({
307
+ keys,
308
+ activity: message.activity,
309
+ activityId: message.activityId,
310
+ activityType: message.activityType,
311
+ inbox: new URL(message.inbox),
312
+ sharedInbox: message.sharedInbox,
313
+ headers: new Headers(message.headers),
314
+ specDeterminer: new KvSpecDeterminer(this.kv, this.kvPrefixes.httpMessageSignaturesSpec),
315
+ tracerProvider: this.tracerProvider
316
+ });
317
+ } catch (error) {
318
+ span.setStatus({
319
+ code: SpanStatusCode.ERROR,
320
+ message: String(error)
321
+ });
322
+ const loaderOptions = this.#getLoaderOptions(message.baseUrl);
323
+ const activity = await Activity.fromJsonLd(message.activity, {
324
+ contextLoader: this.contextLoaderFactory(loaderOptions),
325
+ documentLoader: rsaKeyPair == null ? this.documentLoaderFactory(loaderOptions) : this.authenticatedDocumentLoaderFactory(rsaKeyPair, loaderOptions),
326
+ tracerProvider: this.tracerProvider
327
+ });
328
+ try {
329
+ this.onOutboxError?.(error, activity);
330
+ } catch (error$1) {
331
+ logger.error("An unexpected error occurred in onError handler:\n{error}", {
332
+ ...logData,
333
+ error: error$1
334
+ });
335
+ }
336
+ const delay = this.outboxRetryPolicy({
337
+ elapsedTime: Temporal.Instant.from(message.started).until(Temporal.Now.instant()),
338
+ attempts: message.attempt
339
+ });
340
+ if (delay != null) {
341
+ logger.error("Failed to send activity {activityId} to {inbox} (attempt #{attempt}); retry...:\n{error}", {
342
+ ...logData,
343
+ error
344
+ });
345
+ await this.outboxQueue?.enqueue({
346
+ ...message,
347
+ attempt: message.attempt + 1
348
+ }, { delay: Temporal.Duration.compare(delay, { seconds: 0 }) < 0 ? Temporal.Duration.from({ seconds: 0 }) : delay });
349
+ } else logger.error("Failed to send activity {activityId} to {inbox} after {attempt} attempts; giving up:\n{error}", {
350
+ ...logData,
351
+ error
352
+ });
353
+ return;
354
+ }
355
+ logger.info("Successfully sent activity {activityId} to {inbox}.", { ...logData });
356
+ }
357
+ async #listenInboxMessage(ctxData, message, span) {
358
+ const logger = getLogger([
359
+ "fedify",
360
+ "federation",
361
+ "inbox"
362
+ ]);
363
+ const baseUrl = new URL(message.baseUrl);
364
+ let context$1 = this.#createContext(baseUrl, ctxData);
365
+ if (message.identifier != null) context$1 = this.#createContext(baseUrl, ctxData, { documentLoader: await context$1.getDocumentLoader({ identifier: message.identifier }) });
366
+ else if (this.sharedInboxKeyDispatcher != null) {
367
+ const identity = await this.sharedInboxKeyDispatcher(context$1);
368
+ if (identity != null) context$1 = this.#createContext(baseUrl, ctxData, { documentLoader: "identifier" in identity || "username" in identity || "handle" in identity ? await context$1.getDocumentLoader(identity) : context$1.getDocumentLoader(identity) });
369
+ }
370
+ const activity = await Activity.fromJsonLd(message.activity, context$1);
371
+ span.setAttribute("activitypub.activity.type", getTypeId(activity).href);
372
+ if (activity.id != null) span.setAttribute("activitypub.activity.id", activity.id.href);
373
+ const cacheKey = activity.id == null ? null : [
374
+ ...this.kvPrefixes.activityIdempotence,
375
+ context$1.origin,
376
+ activity.id.href
377
+ ];
378
+ if (cacheKey != null) {
379
+ const cached = await this.kv.get(cacheKey);
380
+ if (cached === true) {
381
+ logger.debug("Activity {activityId} has already been processed.", {
382
+ activityId: activity.id?.href,
383
+ activity: message.activity,
384
+ recipient: message.identifier
385
+ });
386
+ return;
387
+ }
388
+ }
389
+ await this._getTracer().startActiveSpan("activitypub.dispatch_inbox_listener", { kind: SpanKind.INTERNAL }, async (span$1) => {
390
+ const dispatched = this.inboxListeners?.dispatchWithClass(activity);
391
+ if (dispatched == null) {
392
+ logger.error("Unsupported activity type:\n{activity}", {
393
+ activityId: activity.id?.href,
394
+ activity: message.activity,
395
+ recipient: message.identifier,
396
+ trial: message.attempt
397
+ });
398
+ span$1.setStatus({
399
+ code: SpanStatusCode.ERROR,
400
+ message: `Unsupported activity type: ${getTypeId(activity).href}`
401
+ });
402
+ span$1.end();
403
+ return;
404
+ }
405
+ const { class: cls, listener } = dispatched;
406
+ span$1.updateName(`activitypub.dispatch_inbox_listener ${cls.name}`);
407
+ try {
408
+ await listener(context$1.toInboxContext(message.identifier, message.activity, activity.id?.href, getTypeId(activity).href), activity);
409
+ } catch (error) {
410
+ try {
411
+ await this.inboxErrorHandler?.(context$1, error);
412
+ } catch (error$1) {
413
+ logger.error("An unexpected error occurred in inbox error handler:\n{error}", {
414
+ error: error$1,
415
+ trial: message.attempt,
416
+ activityId: activity.id?.href,
417
+ activity: message.activity,
418
+ recipient: message.identifier
419
+ });
420
+ }
421
+ const delay = this.inboxRetryPolicy({
422
+ elapsedTime: Temporal.Instant.from(message.started).until(Temporal.Now.instant()),
423
+ attempts: message.attempt
424
+ });
425
+ if (delay != null) {
426
+ logger.error("Failed to process the incoming activity {activityId} (attempt #{attempt}); retry...:\n{error}", {
427
+ error,
428
+ attempt: message.attempt,
429
+ activityId: activity.id?.href,
430
+ activity: message.activity,
431
+ recipient: message.identifier
432
+ });
433
+ await this.inboxQueue?.enqueue({
434
+ ...message,
435
+ attempt: message.attempt + 1
436
+ }, { delay: Temporal.Duration.compare(delay, { seconds: 0 }) < 0 ? Temporal.Duration.from({ seconds: 0 }) : delay });
437
+ } else logger.error("Failed to process the incoming activity {activityId} after {trial} attempts; giving up:\n{error}", {
438
+ error,
439
+ activityId: activity.id?.href,
440
+ activity: message.activity,
441
+ recipient: message.identifier
442
+ });
443
+ span$1.setStatus({
444
+ code: SpanStatusCode.ERROR,
445
+ message: String(error)
446
+ });
447
+ span$1.end();
448
+ return;
449
+ }
450
+ if (cacheKey != null) await this.kv.set(cacheKey, true, { ttl: Temporal.Duration.from({ days: 1 }) });
451
+ logger.info("Activity {activityId} has been processed.", {
452
+ activityId: activity.id?.href,
453
+ activity: message.activity,
454
+ recipient: message.identifier
455
+ });
456
+ span$1.end();
457
+ });
458
+ }
459
+ startQueue(contextData, options = {}) {
460
+ return this._startQueueInternal(contextData, options.signal, options.queue);
461
+ }
462
+ createContext(urlOrRequest, contextData) {
463
+ return urlOrRequest instanceof Request ? this.#createContext(urlOrRequest, contextData) : this.#createContext(urlOrRequest, contextData);
464
+ }
465
+ #createContext(urlOrRequest, contextData, opts = {}) {
466
+ const request = urlOrRequest instanceof Request ? urlOrRequest : null;
467
+ const url = urlOrRequest instanceof URL ? new URL(urlOrRequest) : new URL(urlOrRequest.url);
468
+ if (request == null) {
469
+ url.pathname = "/";
470
+ url.hash = "";
471
+ url.search = "";
472
+ }
473
+ const loaderOptions = this.#getLoaderOptions(url.origin);
474
+ const ctxOptions = {
475
+ url,
476
+ federation: this,
477
+ data: contextData,
478
+ documentLoader: opts.documentLoader ?? this.documentLoaderFactory(loaderOptions),
479
+ contextLoader: this.contextLoaderFactory(loaderOptions)
480
+ };
481
+ if (request == null) return new ContextImpl(ctxOptions);
482
+ return new RequestContextImpl({
483
+ ...ctxOptions,
484
+ request,
485
+ invokedFromActorDispatcher: opts.invokedFromActorDispatcher,
486
+ invokedFromObjectDispatcher: opts.invokedFromObjectDispatcher
487
+ });
488
+ }
489
+ #getLoaderOptions(origin) {
490
+ origin = typeof origin === "string" ? new URL(origin).origin : origin.origin;
491
+ return {
492
+ allowPrivateAddress: this.allowPrivateAddress,
493
+ userAgent: typeof this.userAgent === "string" ? this.userAgent : {
494
+ url: origin,
495
+ ...this.userAgent
496
+ }
497
+ };
498
+ }
499
+ async sendActivity(keys, inboxes, activity, options) {
500
+ const logger = getLogger([
501
+ "fedify",
502
+ "federation",
503
+ "outbox"
504
+ ]);
505
+ const { immediate, collectionSync, context: ctx } = options;
506
+ if (activity.id == null) throw new TypeError("The activity to send must have an id.");
507
+ if (activity.actorId == null) throw new TypeError("The activity to send must have at least one actor property.");
508
+ else if (keys.length < 1) throw new TypeError("The keys must not be empty.");
509
+ const contextLoader = this.contextLoaderFactory(this.#getLoaderOptions(ctx.origin));
510
+ const activityId = activity.id.href;
511
+ let proofCreated = false;
512
+ let rsaKey = null;
513
+ for (const { keyId, privateKey } of keys) {
514
+ validateCryptoKey(privateKey, "private");
515
+ if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
516
+ rsaKey = {
517
+ keyId,
518
+ privateKey
519
+ };
520
+ continue;
521
+ }
522
+ if (privateKey.algorithm.name === "Ed25519") {
523
+ activity = await signObject(activity, privateKey, keyId, {
524
+ contextLoader,
525
+ tracerProvider: this.tracerProvider
526
+ });
527
+ proofCreated = true;
528
+ }
529
+ }
530
+ let jsonLd = await activity.toJsonLd({
531
+ format: "compact",
532
+ contextLoader
533
+ });
534
+ if (rsaKey == null) logger.warn("No supported key found to create a Linked Data signature for the activity {activityId}. The activity will be sent without a Linked Data signature. In order to create a Linked Data signature, at least one RSASSA-PKCS1-v1_5 key must be provided.", {
535
+ activityId,
536
+ keys: keys.map((pair) => ({
537
+ keyId: pair.keyId.href,
538
+ privateKey: pair.privateKey
539
+ }))
540
+ });
541
+ else jsonLd = await signJsonLd(jsonLd, rsaKey.privateKey, rsaKey.keyId, {
542
+ contextLoader,
543
+ tracerProvider: this.tracerProvider
544
+ });
545
+ if (!proofCreated) logger.warn("No supported key found to create a proof for the activity {activityId}. The activity will be sent without a proof. In order to create a proof, at least one Ed25519 key must be provided.", {
546
+ activityId,
547
+ keys: keys.map((pair) => ({
548
+ keyId: pair.keyId.href,
549
+ privateKey: pair.privateKey
550
+ }))
551
+ });
552
+ if (immediate || this.outboxQueue == null) {
553
+ if (immediate) logger.debug("Sending activity immediately without queue since immediate option is set.", {
554
+ activityId: activity.id.href,
555
+ activity: jsonLd
556
+ });
557
+ else logger.debug("Sending activity immediately without queue since queue is not set.", {
558
+ activityId: activity.id.href,
559
+ activity: jsonLd
560
+ });
561
+ const promises = [];
562
+ for (const inbox in inboxes) promises.push(sendActivity({
563
+ keys,
564
+ activity: jsonLd,
565
+ activityId: activity.id?.href,
566
+ activityType: getTypeId(activity).href,
567
+ inbox: new URL(inbox),
568
+ sharedInbox: inboxes[inbox].sharedInbox,
569
+ headers: collectionSync == null ? void 0 : new Headers({ "Collection-Synchronization": await buildCollectionSynchronizationHeader(collectionSync, inboxes[inbox].actorIds) }),
570
+ specDeterminer: new KvSpecDeterminer(this.kv, this.kvPrefixes.httpMessageSignaturesSpec),
571
+ tracerProvider: this.tracerProvider
572
+ }));
573
+ await Promise.all(promises);
574
+ return;
575
+ }
576
+ logger.debug("Enqueuing activity {activityId} to send later.", {
577
+ activityId: activity.id.href,
578
+ activity: jsonLd
579
+ });
580
+ const keyJwkPairs = [];
581
+ for (const { keyId, privateKey } of keys) {
582
+ const privateKeyJwk = await exportJwk(privateKey);
583
+ keyJwkPairs.push({
584
+ keyId: keyId.href,
585
+ privateKey: privateKeyJwk
586
+ });
587
+ }
588
+ if (!this.manuallyStartQueue) this._startQueueInternal(ctx.data);
589
+ const carrier = {};
590
+ propagation.inject(context.active(), carrier);
591
+ const messages = [];
592
+ for (const inbox in inboxes) {
593
+ const message = {
594
+ type: "outbox",
595
+ id: crypto.randomUUID(),
596
+ baseUrl: ctx.origin,
597
+ keys: keyJwkPairs,
598
+ activity: jsonLd,
599
+ activityId: activity.id?.href,
600
+ activityType: getTypeId(activity).href,
601
+ inbox,
602
+ sharedInbox: inboxes[inbox].sharedInbox,
603
+ started: new Date().toISOString(),
604
+ attempt: 0,
605
+ headers: collectionSync == null ? {} : { "Collection-Synchronization": await buildCollectionSynchronizationHeader(collectionSync, inboxes[inbox].actorIds) },
606
+ traceContext: carrier
607
+ };
608
+ messages.push(message);
609
+ }
610
+ const { outboxQueue } = this;
611
+ if (outboxQueue.enqueueMany == null) {
612
+ const promises = messages.map((m) => outboxQueue.enqueue(m));
613
+ const results = await Promise.allSettled(promises);
614
+ const errors = results.filter((r) => r.status === "rejected").map((r) => r.reason);
615
+ if (errors.length > 0) {
616
+ logger.error("Failed to enqueue activity {activityId} to send later: {errors}", {
617
+ activityId: activity.id.href,
618
+ errors
619
+ });
620
+ if (errors.length > 1) throw new AggregateError(errors, `Failed to enqueue activity ${activityId} to send later.`);
621
+ throw errors[0];
622
+ }
623
+ } else try {
624
+ await outboxQueue.enqueueMany(messages);
625
+ } catch (error) {
626
+ logger.error("Failed to enqueue activity {activityId} to send later: {error}", {
627
+ activityId: activity.id.href,
628
+ error
629
+ });
630
+ throw error;
631
+ }
632
+ }
633
+ fetch(request, options) {
634
+ const requestId = getRequestId(request);
635
+ return withContext({ requestId }, async () => {
636
+ const tracer = this._getTracer();
637
+ return await tracer.startActiveSpan(request.method, {
638
+ kind: SpanKind.SERVER,
639
+ attributes: {
640
+ [ATTR_HTTP_REQUEST_METHOD]: request.method,
641
+ [ATTR_URL_FULL]: request.url
642
+ }
643
+ }, async (span) => {
644
+ const logger = getLogger([
645
+ "fedify",
646
+ "federation",
647
+ "http"
648
+ ]);
649
+ if (span.isRecording()) for (const [k, v] of request.headers) span.setAttribute(ATTR_HTTP_REQUEST_HEADER(k), [v]);
650
+ let response;
651
+ try {
652
+ response = await this.#fetch(request, {
653
+ ...options,
654
+ span,
655
+ tracer
656
+ });
657
+ } catch (error) {
658
+ span.setStatus({
659
+ code: SpanStatusCode.ERROR,
660
+ message: `${error}`
661
+ });
662
+ span.end();
663
+ logger.error("An error occurred while serving request {method} {url}: {error}", {
664
+ method: request.method,
665
+ url: request.url,
666
+ error
667
+ });
668
+ throw error;
669
+ }
670
+ if (span.isRecording()) {
671
+ span.setAttribute(ATTR_HTTP_RESPONSE_STATUS_CODE, response.status);
672
+ for (const [k, v] of response.headers) span.setAttribute(ATTR_HTTP_RESPONSE_HEADER(k), [v]);
673
+ span.setStatus({
674
+ code: response.status >= 500 ? SpanStatusCode.ERROR : SpanStatusCode.UNSET,
675
+ message: response.statusText
676
+ });
677
+ }
678
+ span.end();
679
+ const url = new URL(request.url);
680
+ const logTpl = "{method} {path}: {status}";
681
+ const values = {
682
+ method: request.method,
683
+ path: `${url.pathname}${url.search}`,
684
+ url: request.url,
685
+ status: response.status
686
+ };
687
+ if (response.status >= 500) logger.error(logTpl, values);
688
+ else if (response.status >= 400) logger.warn(logTpl, values);
689
+ else logger.info(logTpl, values);
690
+ return response;
691
+ });
692
+ });
693
+ }
694
+ async #fetch(request, { onNotFound, onNotAcceptable, onUnauthorized, contextData, span, tracer }) {
695
+ onNotFound ??= notFound;
696
+ onNotAcceptable ??= notAcceptable;
697
+ onUnauthorized ??= unauthorized;
698
+ const url = new URL(request.url);
699
+ const route = this.router.route(url.pathname);
700
+ if (route == null) return await onNotFound(request);
701
+ span.updateName(`${request.method} ${route.template}`);
702
+ let context$1 = this.#createContext(request, contextData);
703
+ const routeName = route.name.replace(/:.*$/, "");
704
+ switch (routeName) {
705
+ case "webfinger": return await handleWebFinger(request, {
706
+ context: context$1,
707
+ host: this.origin?.handleHost,
708
+ actorDispatcher: this.actorCallbacks?.dispatcher,
709
+ actorHandleMapper: this.actorCallbacks?.handleMapper,
710
+ actorAliasMapper: this.actorCallbacks?.aliasMapper,
711
+ onNotFound,
712
+ tracer
713
+ });
714
+ case "nodeInfoJrd": return await handleNodeInfoJrd(request, context$1);
715
+ case "nodeInfo": return await handleNodeInfo(request, {
716
+ context: context$1,
717
+ nodeInfoDispatcher: this.nodeInfoDispatcher
718
+ });
719
+ case "actor":
720
+ context$1 = this.#createContext(request, contextData, { invokedFromActorDispatcher: { identifier: route.values.identifier ?? route.values.handle } });
721
+ return await handleActor(request, {
722
+ identifier: route.values.identifier ?? route.values.handle,
723
+ context: context$1,
724
+ actorDispatcher: this.actorCallbacks?.dispatcher,
725
+ authorizePredicate: this.actorCallbacks?.authorizePredicate,
726
+ onUnauthorized,
727
+ onNotFound,
728
+ onNotAcceptable
729
+ });
730
+ case "object": {
731
+ const typeId = route.name.replace(/^object:/, "");
732
+ const callbacks = this.objectCallbacks[typeId];
733
+ const cls = this.objectTypeIds[typeId];
734
+ context$1 = this.#createContext(request, contextData, { invokedFromObjectDispatcher: {
735
+ cls,
736
+ values: route.values
737
+ } });
738
+ return await handleObject(request, {
739
+ values: route.values,
740
+ context: context$1,
741
+ objectDispatcher: callbacks?.dispatcher,
742
+ authorizePredicate: callbacks?.authorizePredicate,
743
+ onUnauthorized,
744
+ onNotFound,
745
+ onNotAcceptable
746
+ });
747
+ }
748
+ case "outbox": return await handleCollection(request, {
749
+ name: "outbox",
750
+ identifier: route.values.identifier ?? route.values.handle,
751
+ uriGetter: context$1.getOutboxUri.bind(context$1),
752
+ context: context$1,
753
+ collectionCallbacks: this.outboxCallbacks,
754
+ tracerProvider: this.tracerProvider,
755
+ onUnauthorized,
756
+ onNotFound,
757
+ onNotAcceptable
758
+ });
759
+ case "inbox":
760
+ if (request.method !== "POST") return await handleCollection(request, {
761
+ name: "inbox",
762
+ identifier: route.values.identifier ?? route.values.handle,
763
+ uriGetter: context$1.getInboxUri.bind(context$1),
764
+ context: context$1,
765
+ collectionCallbacks: this.inboxCallbacks,
766
+ tracerProvider: this.tracerProvider,
767
+ onUnauthorized,
768
+ onNotFound,
769
+ onNotAcceptable
770
+ });
771
+ context$1 = this.#createContext(request, contextData, { documentLoader: await context$1.getDocumentLoader({ identifier: route.values.identifier ?? route.values.handle }) });
772
+ case "sharedInbox":
773
+ if (routeName !== "inbox" && this.sharedInboxKeyDispatcher != null) {
774
+ const identity = await this.sharedInboxKeyDispatcher(context$1);
775
+ if (identity != null) context$1 = this.#createContext(request, contextData, { documentLoader: "identifier" in identity || "username" in identity || "handle" in identity ? await context$1.getDocumentLoader(identity) : context$1.getDocumentLoader(identity) });
776
+ }
777
+ if (!this.manuallyStartQueue) this._startQueueInternal(contextData);
778
+ return await handleInbox(request, {
779
+ recipient: route.values.identifier ?? route.values.handle ?? null,
780
+ context: context$1,
781
+ inboxContextFactory: context$1.toInboxContext.bind(context$1),
782
+ kv: this.kv,
783
+ kvPrefixes: this.kvPrefixes,
784
+ queue: this.inboxQueue,
785
+ actorDispatcher: this.actorCallbacks?.dispatcher,
786
+ inboxListeners: this.inboxListeners,
787
+ inboxErrorHandler: this.inboxErrorHandler,
788
+ onNotFound,
789
+ signatureTimeWindow: this.signatureTimeWindow,
790
+ skipSignatureVerification: this.skipSignatureVerification,
791
+ tracerProvider: this.tracerProvider
792
+ });
793
+ case "following": return await handleCollection(request, {
794
+ name: "following",
795
+ identifier: route.values.identifier ?? route.values.handle,
796
+ uriGetter: context$1.getFollowingUri.bind(context$1),
797
+ context: context$1,
798
+ collectionCallbacks: this.followingCallbacks,
799
+ tracerProvider: this.tracerProvider,
800
+ onUnauthorized,
801
+ onNotFound,
802
+ onNotAcceptable
803
+ });
804
+ case "followers": {
805
+ let baseUrl = url.searchParams.get("base-url");
806
+ if (baseUrl != null) try {
807
+ baseUrl = `${new URL(baseUrl).origin}/`;
808
+ } catch {
809
+ baseUrl = null;
810
+ }
811
+ return await handleCollection(request, {
812
+ name: "followers",
813
+ identifier: route.values.identifier ?? route.values.handle,
814
+ uriGetter: baseUrl == null ? context$1.getFollowersUri.bind(context$1) : (identifier) => {
815
+ const uri = context$1.getFollowersUri(identifier);
816
+ uri.searchParams.set("base-url", baseUrl);
817
+ return uri;
818
+ },
819
+ context: context$1,
820
+ filter: baseUrl != null ? new URL(baseUrl) : void 0,
821
+ filterPredicate: baseUrl != null ? (i) => (i instanceof URL ? i.href : i.id?.href ?? "").startsWith(baseUrl) : void 0,
822
+ collectionCallbacks: this.followersCallbacks,
823
+ tracerProvider: this.tracerProvider,
824
+ onUnauthorized,
825
+ onNotFound,
826
+ onNotAcceptable
827
+ });
828
+ }
829
+ case "liked": return await handleCollection(request, {
830
+ name: "liked",
831
+ identifier: route.values.identifier ?? route.values.handle,
832
+ uriGetter: context$1.getLikedUri.bind(context$1),
833
+ context: context$1,
834
+ collectionCallbacks: this.likedCallbacks,
835
+ tracerProvider: this.tracerProvider,
836
+ onUnauthorized,
837
+ onNotFound,
838
+ onNotAcceptable
839
+ });
840
+ case "featured": return await handleCollection(request, {
841
+ name: "featured",
842
+ identifier: route.values.identifier ?? route.values.handle,
843
+ uriGetter: context$1.getFeaturedUri.bind(context$1),
844
+ context: context$1,
845
+ collectionCallbacks: this.featuredCallbacks,
846
+ tracerProvider: this.tracerProvider,
847
+ onUnauthorized,
848
+ onNotFound,
849
+ onNotAcceptable
850
+ });
851
+ case "featuredTags": return await handleCollection(request, {
852
+ name: "featured tags",
853
+ identifier: route.values.identifier ?? route.values.handle,
854
+ uriGetter: context$1.getFeaturedTagsUri.bind(context$1),
855
+ context: context$1,
856
+ collectionCallbacks: this.featuredTagsCallbacks,
857
+ tracerProvider: this.tracerProvider,
858
+ onUnauthorized,
859
+ onNotFound,
860
+ onNotAcceptable
861
+ });
862
+ default: {
863
+ const response = onNotFound(request);
864
+ return response instanceof Promise ? await response : response;
865
+ }
866
+ }
867
+ }
868
+ };
869
+ const FANOUT_THRESHOLD = 5;
870
+ var ContextImpl = class ContextImpl {
871
+ url;
872
+ federation;
873
+ data;
874
+ documentLoader;
875
+ contextLoader;
876
+ invokedFromActorKeyPairsDispatcher;
877
+ constructor({ url, federation, data, documentLoader, contextLoader, invokedFromActorKeyPairsDispatcher }) {
878
+ this.url = url;
879
+ this.federation = federation;
880
+ this.data = data;
881
+ this.documentLoader = documentLoader;
882
+ this.contextLoader = contextLoader;
883
+ this.invokedFromActorKeyPairsDispatcher = invokedFromActorKeyPairsDispatcher;
884
+ }
885
+ toInboxContext(recipient, activity, activityId, activityType) {
886
+ return new InboxContextImpl(recipient, activity, activityId, activityType, {
887
+ url: this.url,
888
+ federation: this.federation,
889
+ data: this.data,
890
+ documentLoader: this.documentLoader,
891
+ contextLoader: this.contextLoader,
892
+ invokedFromActorKeyPairsDispatcher: this.invokedFromActorKeyPairsDispatcher
893
+ });
894
+ }
895
+ get hostname() {
896
+ return this.url.hostname;
897
+ }
898
+ get host() {
899
+ return this.url.host;
900
+ }
901
+ get origin() {
902
+ return this.url.origin;
903
+ }
904
+ get canonicalOrigin() {
905
+ return this.federation.origin?.webOrigin ?? this.origin;
906
+ }
907
+ get tracerProvider() {
908
+ return this.federation.tracerProvider;
909
+ }
910
+ getNodeInfoUri() {
911
+ const path = this.federation.router.build("nodeInfo", {});
912
+ if (path == null) throw new RouterError("No NodeInfo dispatcher registered.");
913
+ return new URL(path, this.canonicalOrigin);
914
+ }
915
+ getActorUri(identifier) {
916
+ const path = this.federation.router.build("actor", {
917
+ identifier,
918
+ handle: identifier
919
+ });
920
+ if (path == null) throw new RouterError("No actor dispatcher registered.");
921
+ return new URL(path, this.canonicalOrigin);
922
+ }
923
+ getObjectUri(cls, values) {
924
+ const callbacks = this.federation.objectCallbacks[cls.typeId.href];
925
+ if (callbacks == null) throw new RouterError("No object dispatcher registered.");
926
+ for (const param of callbacks.parameters) if (!(param in values)) throw new TypeError(`Missing parameter: ${param}`);
927
+ const path = this.federation.router.build(`object:${cls.typeId.href}`, values);
928
+ if (path == null) throw new RouterError("No object dispatcher registered.");
929
+ return new URL(path, this.canonicalOrigin);
930
+ }
931
+ getOutboxUri(identifier) {
932
+ const path = this.federation.router.build("outbox", {
933
+ identifier,
934
+ handle: identifier
935
+ });
936
+ if (path == null) throw new RouterError("No outbox dispatcher registered.");
937
+ return new URL(path, this.canonicalOrigin);
938
+ }
939
+ getInboxUri(identifier) {
940
+ if (identifier == null) {
941
+ const path$1 = this.federation.router.build("sharedInbox", {});
942
+ if (path$1 == null) throw new RouterError("No shared inbox path registered.");
943
+ return new URL(path$1, this.canonicalOrigin);
944
+ }
945
+ const path = this.federation.router.build("inbox", {
946
+ identifier,
947
+ handle: identifier
948
+ });
949
+ if (path == null) throw new RouterError("No inbox path registered.");
950
+ return new URL(path, this.canonicalOrigin);
951
+ }
952
+ getFollowingUri(identifier) {
953
+ const path = this.federation.router.build("following", {
954
+ identifier,
955
+ handle: identifier
956
+ });
957
+ if (path == null) throw new RouterError("No following collection path registered.");
958
+ return new URL(path, this.canonicalOrigin);
959
+ }
960
+ getFollowersUri(identifier) {
961
+ const path = this.federation.router.build("followers", {
962
+ identifier,
963
+ handle: identifier
964
+ });
965
+ if (path == null) throw new RouterError("No followers collection path registered.");
966
+ return new URL(path, this.canonicalOrigin);
967
+ }
968
+ getLikedUri(identifier) {
969
+ const path = this.federation.router.build("liked", {
970
+ identifier,
971
+ handle: identifier
972
+ });
973
+ if (path == null) throw new RouterError("No liked collection path registered.");
974
+ return new URL(path, this.canonicalOrigin);
975
+ }
976
+ getFeaturedUri(identifier) {
977
+ const path = this.federation.router.build("featured", {
978
+ identifier,
979
+ handle: identifier
980
+ });
981
+ if (path == null) throw new RouterError("No featured collection path registered.");
982
+ return new URL(path, this.canonicalOrigin);
983
+ }
984
+ getFeaturedTagsUri(identifier) {
985
+ const path = this.federation.router.build("featuredTags", {
986
+ identifier,
987
+ handle: identifier
988
+ });
989
+ if (path == null) throw new RouterError("No featured tags collection path registered.");
990
+ return new URL(path, this.canonicalOrigin);
991
+ }
992
+ parseUri(uri) {
993
+ if (uri == null) return null;
994
+ if (uri.origin !== this.origin && uri.origin !== this.canonicalOrigin) return null;
995
+ const route = this.federation.router.route(uri.pathname);
996
+ const logger = getLogger(["fedify", "federation"]);
997
+ if (route == null) return null;
998
+ else if (route.name === "sharedInbox") return {
999
+ type: "inbox",
1000
+ identifier: void 0,
1001
+ get handle() {
1002
+ logger.warn("The ParseUriResult.handle property is deprecated; use ParseUriResult.identifier instead.");
1003
+ return void 0;
1004
+ }
1005
+ };
1006
+ const identifier = "identifier" in route.values ? route.values.identifier : route.values.handle;
1007
+ if (route.name === "actor") return {
1008
+ type: "actor",
1009
+ identifier,
1010
+ get handle() {
1011
+ logger.warn("The ParseUriResult.handle property is deprecated; use ParseUriResult.identifier instead.");
1012
+ return identifier;
1013
+ }
1014
+ };
1015
+ else if (route.name.startsWith("object:")) {
1016
+ const typeId = route.name.replace(/^object:/, "");
1017
+ return {
1018
+ type: "object",
1019
+ class: this.federation.objectTypeIds[typeId],
1020
+ typeId: new URL(typeId),
1021
+ values: route.values
1022
+ };
1023
+ } else if (route.name === "inbox") return {
1024
+ type: "inbox",
1025
+ identifier,
1026
+ get handle() {
1027
+ logger.warn("The ParseUriResult.handle property is deprecated; use ParseUriResult.identifier instead.");
1028
+ return identifier;
1029
+ }
1030
+ };
1031
+ else if (route.name === "outbox") return {
1032
+ type: "outbox",
1033
+ identifier,
1034
+ get handle() {
1035
+ logger.warn("The ParseUriResult.handle property is deprecated; use ParseUriResult.identifier instead.");
1036
+ return identifier;
1037
+ }
1038
+ };
1039
+ else if (route.name === "following") return {
1040
+ type: "following",
1041
+ identifier,
1042
+ get handle() {
1043
+ logger.warn("The ParseUriResult.handle property is deprecated; use ParseUriResult.identifier instead.");
1044
+ return identifier;
1045
+ }
1046
+ };
1047
+ else if (route.name === "followers") return {
1048
+ type: "followers",
1049
+ identifier,
1050
+ get handle() {
1051
+ logger.warn("The ParseUriResult.handle property is deprecated; use ParseUriResult.identifier instead.");
1052
+ return identifier;
1053
+ }
1054
+ };
1055
+ else if (route.name === "liked") return {
1056
+ type: "liked",
1057
+ identifier,
1058
+ get handle() {
1059
+ logger.warn("The ParseUriResult.handle property is deprecated; use ParseUriResult.identifier instead.");
1060
+ return identifier;
1061
+ }
1062
+ };
1063
+ else if (route.name === "featured") return {
1064
+ type: "featured",
1065
+ identifier,
1066
+ get handle() {
1067
+ logger.warn("The ParseUriResult.handle property is deprecated; use ParseUriResult.identifier instead.");
1068
+ return identifier;
1069
+ }
1070
+ };
1071
+ else if (route.name === "featuredTags") return {
1072
+ type: "featuredTags",
1073
+ identifier,
1074
+ get handle() {
1075
+ logger.warn("The ParseUriResult.handle property is deprecated; use ParseUriResult.identifier instead.");
1076
+ return identifier;
1077
+ }
1078
+ };
1079
+ return null;
1080
+ }
1081
+ async getActorKeyPairs(identifier) {
1082
+ const logger = getLogger([
1083
+ "fedify",
1084
+ "federation",
1085
+ "actor"
1086
+ ]);
1087
+ if (this.invokedFromActorKeyPairsDispatcher != null) logger.warn("Context.getActorKeyPairs({getActorKeyPairsIdentifier}) method is invoked from the actor key pairs dispatcher ({actorKeyPairsDispatcherIdentifier}); this may cause an infinite loop.", {
1088
+ getActorKeyPairsIdentifier: identifier,
1089
+ actorKeyPairsDispatcherIdentifier: this.invokedFromActorKeyPairsDispatcher.identifier
1090
+ });
1091
+ let keyPairs;
1092
+ try {
1093
+ keyPairs = await this.getKeyPairsFromIdentifier(identifier);
1094
+ } catch (_) {
1095
+ logger.warn("No actor key pairs dispatcher registered.");
1096
+ return [];
1097
+ }
1098
+ const owner = this.getActorUri(identifier);
1099
+ const result = [];
1100
+ for (const keyPair of keyPairs) {
1101
+ const newPair = {
1102
+ ...keyPair,
1103
+ cryptographicKey: new CryptographicKey({
1104
+ id: keyPair.keyId,
1105
+ owner,
1106
+ publicKey: keyPair.publicKey
1107
+ }),
1108
+ multikey: new Multikey({
1109
+ id: keyPair.keyId,
1110
+ controller: owner,
1111
+ publicKey: keyPair.publicKey
1112
+ })
1113
+ };
1114
+ result.push(newPair);
1115
+ }
1116
+ return result;
1117
+ }
1118
+ async getKeyPairsFromIdentifier(identifier) {
1119
+ const logger = getLogger([
1120
+ "fedify",
1121
+ "federation",
1122
+ "actor"
1123
+ ]);
1124
+ if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
1125
+ const path = this.federation.router.build("actor", {
1126
+ identifier,
1127
+ handle: identifier
1128
+ });
1129
+ if (path == null) {
1130
+ logger.warn("No actor dispatcher registered.");
1131
+ return [];
1132
+ }
1133
+ const actorUri = new URL(path, this.canonicalOrigin);
1134
+ const keyPairs = await this.federation.actorCallbacks?.keyPairsDispatcher(new ContextImpl({
1135
+ ...this,
1136
+ invokedFromActorKeyPairsDispatcher: { identifier }
1137
+ }), identifier);
1138
+ if (keyPairs.length < 1) logger.warn("No key pairs found for actor {identifier}.", { identifier });
1139
+ let i = 0;
1140
+ const result = [];
1141
+ for (const keyPair of keyPairs) {
1142
+ result.push({
1143
+ ...keyPair,
1144
+ keyId: new URL(i == 0 ? `#main-key` : `#key-${i + 1}`, actorUri)
1145
+ });
1146
+ i++;
1147
+ }
1148
+ return result;
1149
+ }
1150
+ async getRsaKeyPairFromIdentifier(identifier) {
1151
+ const keyPairs = await this.getKeyPairsFromIdentifier(identifier);
1152
+ for (const keyPair of keyPairs) {
1153
+ const { privateKey } = keyPair;
1154
+ if (privateKey.algorithm.name === "RSASSA-PKCS1-v1_5" && privateKey.algorithm.hash.name === "SHA-256") return keyPair;
1155
+ }
1156
+ getLogger([
1157
+ "fedify",
1158
+ "federation",
1159
+ "actor"
1160
+ ]).warn("No RSA-PKCS#1-v1.5 SHA-256 key found for actor {identifier}.", { identifier });
1161
+ return null;
1162
+ }
1163
+ getDocumentLoader(identity) {
1164
+ if ("identifier" in identity || "username" in identity || "handle" in identity) {
1165
+ let identifierPromise;
1166
+ if ("username" in identity || "handle" in identity) {
1167
+ let username;
1168
+ if ("username" in identity) username = identity.username;
1169
+ else {
1170
+ username = identity.handle;
1171
+ getLogger([
1172
+ "fedify",
1173
+ "runtime",
1174
+ "docloader"
1175
+ ]).warn("The \"handle\" property is deprecated; use \"identifier\" or \"username\" instead.", { identity });
1176
+ }
1177
+ const mapper = this.federation.actorCallbacks?.handleMapper;
1178
+ if (mapper == null) identifierPromise = Promise.resolve(username);
1179
+ else {
1180
+ const identifier = mapper(this, username);
1181
+ identifierPromise = identifier instanceof Promise ? identifier : Promise.resolve(identifier);
1182
+ }
1183
+ } else identifierPromise = Promise.resolve(identity.identifier);
1184
+ return identifierPromise.then((identifier) => {
1185
+ if (identifier == null) return this.documentLoader;
1186
+ const keyPair = this.getRsaKeyPairFromIdentifier(identifier);
1187
+ return keyPair.then((pair) => pair == null ? this.documentLoader : this.federation.authenticatedDocumentLoaderFactory(pair));
1188
+ });
1189
+ }
1190
+ return this.federation.authenticatedDocumentLoaderFactory(identity);
1191
+ }
1192
+ lookupObject(identifier, options = {}) {
1193
+ return lookupObject(identifier, {
1194
+ ...options,
1195
+ documentLoader: options.documentLoader ?? this.documentLoader,
1196
+ contextLoader: options.contextLoader ?? this.contextLoader,
1197
+ userAgent: options.userAgent ?? this.federation.userAgent,
1198
+ tracerProvider: options.tracerProvider ?? this.tracerProvider,
1199
+ allowPrivateAddress: this.federation.allowPrivateAddress
1200
+ });
1201
+ }
1202
+ traverseCollection(collection, options = {}) {
1203
+ return traverseCollection(collection, {
1204
+ ...options,
1205
+ documentLoader: options.documentLoader ?? this.documentLoader,
1206
+ contextLoader: options.contextLoader ?? this.contextLoader
1207
+ });
1208
+ }
1209
+ lookupNodeInfo(url, options = {}) {
1210
+ return options.parse === "none" ? getNodeInfo(url, {
1211
+ parse: "none",
1212
+ direct: options.direct,
1213
+ userAgent: options?.userAgent ?? this.federation.userAgent
1214
+ }) : getNodeInfo(url, {
1215
+ parse: options.parse,
1216
+ direct: options.direct,
1217
+ userAgent: options?.userAgent ?? this.federation.userAgent
1218
+ });
1219
+ }
1220
+ lookupWebFinger(resource, options = {}) {
1221
+ return lookupWebFinger(resource, {
1222
+ ...options,
1223
+ userAgent: options.userAgent ?? this.federation.userAgent,
1224
+ tracerProvider: options.tracerProvider ?? this.tracerProvider,
1225
+ allowPrivateAddress: this.federation.allowPrivateAddress
1226
+ });
1227
+ }
1228
+ sendActivity(sender, recipients, activity, options = {}) {
1229
+ const tracer = this.tracerProvider.getTracer(deno_default.name, deno_default.version);
1230
+ return tracer.startActiveSpan(this.federation.outboxQueue == null || options.immediate ? "activitypub.outbox" : "activitypub.fanout", {
1231
+ kind: this.federation.outboxQueue == null || options.immediate ? SpanKind.CLIENT : SpanKind.PRODUCER,
1232
+ attributes: {
1233
+ "activitypub.activity.type": getTypeId(activity).href,
1234
+ "activitypub.activity.to": activity.toIds.map((to) => to.href),
1235
+ "activitypub.activity.cc": activity.toIds.map((cc) => cc.href),
1236
+ "activitypub.activity.bto": activity.btoIds.map((bto) => bto.href),
1237
+ "activitypub.activity.bcc": activity.toIds.map((bcc) => bcc.href)
1238
+ }
1239
+ }, async (span) => {
1240
+ try {
1241
+ if (activity.id != null) span.setAttribute("activitypub.activity.id", activity.id.href);
1242
+ await this.sendActivityInternal(sender, recipients, activity, options, span);
1243
+ } catch (e) {
1244
+ span.setStatus({
1245
+ code: SpanStatusCode.ERROR,
1246
+ message: String(e)
1247
+ });
1248
+ throw e;
1249
+ } finally {
1250
+ span.end();
1251
+ }
1252
+ });
1253
+ }
1254
+ async sendActivityInternal(sender, recipients, activity, options, span) {
1255
+ const logger = getLogger([
1256
+ "fedify",
1257
+ "federation",
1258
+ "outbox"
1259
+ ]);
1260
+ let keys;
1261
+ let identifier = null;
1262
+ if ("identifier" in sender || "username" in sender || "handle" in sender) {
1263
+ if ("identifier" in sender) identifier = sender.identifier;
1264
+ else {
1265
+ let username;
1266
+ if ("username" in sender) username = sender.username;
1267
+ else {
1268
+ username = sender.handle;
1269
+ logger.warn("The \"handle\" property for the sender parameter is deprecated; use \"identifier\" or \"username\" instead.", { sender });
1270
+ }
1271
+ if (this.federation.actorCallbacks?.handleMapper == null) identifier = username;
1272
+ else {
1273
+ const mapped = await this.federation.actorCallbacks.handleMapper(this, username);
1274
+ if (mapped == null) throw new Error(`No actor found for the given username ${JSON.stringify(username)}.`);
1275
+ identifier = mapped;
1276
+ }
1277
+ }
1278
+ span.setAttribute("fedify.actor.identifier", identifier);
1279
+ keys = await this.getKeyPairsFromIdentifier(identifier);
1280
+ if (keys.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
1281
+ } else if (Array.isArray(sender)) {
1282
+ if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
1283
+ keys = sender;
1284
+ } else keys = [sender];
1285
+ if (keys.length < 1) throw new TypeError("The sender's keys must not be empty.");
1286
+ for (const { privateKey } of keys) validateCryptoKey(privateKey, "private");
1287
+ const opts = { context: this };
1288
+ let expandedRecipients;
1289
+ if (Array.isArray(recipients)) expandedRecipients = recipients;
1290
+ else if (recipients === "followers") {
1291
+ if (identifier == null) throw new Error("If recipients is \"followers\", sender must be an actor identifier or username.");
1292
+ expandedRecipients = [];
1293
+ for await (const recipient of this.getFollowers(identifier)) expandedRecipients.push(recipient);
1294
+ if (options.syncCollection) {
1295
+ const collectionId = this.federation.router.build("followers", {
1296
+ identifier,
1297
+ handle: identifier
1298
+ });
1299
+ opts.collectionSync = collectionId == null ? void 0 : new URL(collectionId, this.canonicalOrigin).href;
1300
+ }
1301
+ } else expandedRecipients = [recipients];
1302
+ span.setAttribute("activitypub.inboxes", expandedRecipients.length);
1303
+ for (const activityTransformer of this.federation.activityTransformers) activity = activityTransformer(activity, this);
1304
+ span?.setAttribute("activitypub.activity.id", activity?.id?.href ?? "");
1305
+ if (activity.actorId == null) {
1306
+ logger.error("Activity {activityId} to send does not have an actor.", {
1307
+ activity,
1308
+ activityId: activity?.id?.href
1309
+ });
1310
+ throw new TypeError("The activity to send must have at least one actor property.");
1311
+ }
1312
+ const inboxes = extractInboxes({
1313
+ recipients: expandedRecipients,
1314
+ preferSharedInbox: options.preferSharedInbox,
1315
+ excludeBaseUris: options.excludeBaseUris
1316
+ });
1317
+ logger.debug("Sending activity {activityId} to inboxes:\n{inboxes}", {
1318
+ inboxes: globalThis.Object.keys(inboxes),
1319
+ activityId: activity.id?.href,
1320
+ activity
1321
+ });
1322
+ if (this.federation.fanoutQueue == null || options.immediate || options.fanout === "skip" || (options.fanout ?? "auto") === "auto" && globalThis.Object.keys(inboxes).length < FANOUT_THRESHOLD) {
1323
+ await this.federation.sendActivity(keys, inboxes, activity, opts);
1324
+ return;
1325
+ }
1326
+ const keyJwkPairs = await Promise.all(keys.map(async ({ keyId, privateKey }) => ({
1327
+ keyId: keyId.href,
1328
+ privateKey: await exportJwk(privateKey)
1329
+ })));
1330
+ const carrier = {};
1331
+ propagation.inject(context.active(), carrier);
1332
+ const message = {
1333
+ type: "fanout",
1334
+ id: crypto.randomUUID(),
1335
+ baseUrl: this.origin,
1336
+ keys: keyJwkPairs,
1337
+ inboxes: globalThis.Object.fromEntries(globalThis.Object.entries(inboxes).map(([k, { actorIds, sharedInbox }]) => [k, {
1338
+ actorIds: [...actorIds],
1339
+ sharedInbox
1340
+ }])),
1341
+ activity: await activity.toJsonLd({
1342
+ format: "compact",
1343
+ contextLoader: this.contextLoader
1344
+ }),
1345
+ activityId: activity.id?.href,
1346
+ activityType: getTypeId(activity).href,
1347
+ collectionSync: opts.collectionSync,
1348
+ traceContext: carrier
1349
+ };
1350
+ if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
1351
+ this.federation.fanoutQueue.enqueue(message);
1352
+ }
1353
+ async *getFollowers(identifier) {
1354
+ if (this.federation.followersCallbacks == null) throw new Error("No followers collection dispatcher registered.");
1355
+ const result = await this.federation.followersCallbacks.dispatcher(this, identifier, null);
1356
+ if (result != null) {
1357
+ for (const recipient of result.items) yield recipient;
1358
+ return;
1359
+ }
1360
+ if (this.federation.followersCallbacks.firstCursor == null) throw new Error("No first cursor dispatcher registered for followers collection.");
1361
+ let cursor = await this.federation.followersCallbacks.firstCursor(this, identifier);
1362
+ if (cursor != null) getLogger([
1363
+ "fedify",
1364
+ "federation",
1365
+ "outbox"
1366
+ ]).warn("Since the followers collection dispatcher returned null for no cursor (i.e., one-shot dispatcher), the pagination is used to fetch \"followers\". However, it is recommended to implement the one-shot dispatcher for better performance.", { identifier });
1367
+ while (cursor != null) {
1368
+ const result$1 = await this.federation.followersCallbacks.dispatcher(this, identifier, cursor);
1369
+ if (result$1 == null) break;
1370
+ for (const recipient of result$1.items) yield recipient;
1371
+ cursor = result$1.nextCursor ?? null;
1372
+ }
1373
+ }
1374
+ routeActivity(recipient, activity, options = {}) {
1375
+ const tracerProvider = this.tracerProvider ?? this.tracerProvider;
1376
+ const tracer = tracerProvider.getTracer(deno_default.name, deno_default.version);
1377
+ return tracer.startActiveSpan("activitypub.inbox", {
1378
+ kind: this.federation.inboxQueue == null || options.immediate ? SpanKind.INTERNAL : SpanKind.PRODUCER,
1379
+ attributes: { "activitypub.activity.type": getTypeId(activity).href }
1380
+ }, async (span) => {
1381
+ if (activity.id != null) span.setAttribute("activitypub.activity.id", activity.id.href);
1382
+ if (activity.toIds.length > 0) span.setAttribute("activitypub.activity.to", activity.toIds.map((to) => to.href));
1383
+ if (activity.ccIds.length > 0) span.setAttribute("activitypub.activity.cc", activity.ccIds.map((cc) => cc.href));
1384
+ if (activity.btoIds.length > 0) span.setAttribute("activitypub.activity.bto", activity.btoIds.map((bto) => bto.href));
1385
+ if (activity.bccIds.length > 0) span.setAttribute("activitypub.activity.bcc", activity.bccIds.map((bcc) => bcc.href));
1386
+ try {
1387
+ const ok = await this.routeActivityInternal(recipient, activity, options, span);
1388
+ if (ok) {
1389
+ span.setAttribute("activitypub.shared_inbox", recipient == null);
1390
+ if (recipient != null) span.setAttribute("fedify.inbox.recipient", recipient);
1391
+ } else span.setStatus({ code: SpanStatusCode.ERROR });
1392
+ return ok;
1393
+ } catch (e) {
1394
+ span.setStatus({
1395
+ code: SpanStatusCode.ERROR,
1396
+ message: String(e)
1397
+ });
1398
+ throw e;
1399
+ } finally {
1400
+ span.end();
1401
+ }
1402
+ });
1403
+ }
1404
+ async routeActivityInternal(recipient, activity, options = {}, span) {
1405
+ const logger = getLogger([
1406
+ "fedify",
1407
+ "federation",
1408
+ "inbox"
1409
+ ]);
1410
+ const contextLoader = options.contextLoader ?? this.contextLoader;
1411
+ const json = await activity.toJsonLd({ contextLoader });
1412
+ const keyCache = new KvKeyCache(this.federation.kv, this.federation.kvPrefixes.publicKey, this);
1413
+ const verified = await verifyObject(Activity, json, {
1414
+ contextLoader,
1415
+ documentLoader: options.documentLoader ?? this.documentLoader,
1416
+ tracerProvider: options.tracerProvider ?? this.tracerProvider,
1417
+ keyCache
1418
+ });
1419
+ if (verified == null) {
1420
+ logger.debug("Object Integrity Proofs are not verified.", {
1421
+ recipient,
1422
+ activity: json
1423
+ });
1424
+ if (activity.id == null) {
1425
+ logger.debug("Activity is missing an ID; unable to fetch.", {
1426
+ recipient,
1427
+ activity: json
1428
+ });
1429
+ return false;
1430
+ }
1431
+ const fetched = await this.lookupObject(activity.id, options);
1432
+ if (fetched == null) {
1433
+ logger.debug("Failed to fetch the remote activity object {activityId}.", {
1434
+ recipient,
1435
+ activity: json,
1436
+ activityId: activity.id.href
1437
+ });
1438
+ return false;
1439
+ } else if (!(fetched instanceof Activity)) {
1440
+ logger.debug("Fetched object is not an Activity.", {
1441
+ recipient,
1442
+ activity: await fetched.toJsonLd({ contextLoader })
1443
+ });
1444
+ return false;
1445
+ } else if (fetched.id?.href !== activity.id.href) {
1446
+ logger.debug("Fetched activity object has a different ID; failed to verify.", {
1447
+ recipient,
1448
+ activity: await fetched.toJsonLd({ contextLoader })
1449
+ });
1450
+ return false;
1451
+ } else if (fetched.actorIds.length < 1) {
1452
+ logger.debug("Fetched activity object is missing an actor; unable to verify.", {
1453
+ recipient,
1454
+ activity: await fetched.toJsonLd({ contextLoader })
1455
+ });
1456
+ return false;
1457
+ }
1458
+ const activityId = fetched.id;
1459
+ if (!fetched.actorIds.every((actor) => actor.origin === activityId.origin)) {
1460
+ logger.debug("Fetched activity object has actors from different origins; unable to verify.", {
1461
+ recipient,
1462
+ activity: await fetched.toJsonLd({ contextLoader })
1463
+ });
1464
+ return false;
1465
+ }
1466
+ logger.debug("Successfully fetched the remote activity object {activityId}; ignore the original activity and use the fetched one, which is trustworthy.");
1467
+ activity = fetched;
1468
+ } else logger.debug("Object Integrity Proofs are verified.", {
1469
+ recipient,
1470
+ activity: json
1471
+ });
1472
+ const routeResult = await routeActivity({
1473
+ context: this,
1474
+ json,
1475
+ activity,
1476
+ recipient,
1477
+ inboxListeners: this.federation.inboxListeners,
1478
+ inboxContextFactory: this.toInboxContext.bind(this),
1479
+ inboxErrorHandler: this.federation.inboxErrorHandler,
1480
+ kv: this.federation.kv,
1481
+ kvPrefixes: this.federation.kvPrefixes,
1482
+ queue: this.federation.inboxQueue,
1483
+ span,
1484
+ tracerProvider: options.tracerProvider ?? this.tracerProvider
1485
+ });
1486
+ return routeResult === "alreadyProcessed" || routeResult === "enqueued" || routeResult === "unsupportedActivity" || routeResult === "success";
1487
+ }
1488
+ };
1489
+ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
1490
+ #invokedFromActorDispatcher;
1491
+ #invokedFromObjectDispatcher;
1492
+ request;
1493
+ url;
1494
+ constructor(options) {
1495
+ super(options);
1496
+ this.#invokedFromActorDispatcher = options.invokedFromActorDispatcher;
1497
+ this.#invokedFromObjectDispatcher = options.invokedFromObjectDispatcher;
1498
+ this.request = options.request;
1499
+ this.url = options.url;
1500
+ }
1501
+ async getActor(identifier) {
1502
+ if (this.federation.actorCallbacks == null || this.federation.actorCallbacks.dispatcher == null) throw new Error("No actor dispatcher registered.");
1503
+ if (this.#invokedFromActorDispatcher != null) getLogger([
1504
+ "fedify",
1505
+ "federation",
1506
+ "actor"
1507
+ ]).warn("RequestContext.getActor({getActorIdentifier}) is invoked from the actor dispatcher ({actorDispatcherIdentifier}); this may cause an infinite loop.", {
1508
+ getActorIdentifier: identifier,
1509
+ actorDispatcherIdentifier: this.#invokedFromActorDispatcher.identifier
1510
+ });
1511
+ return await this.federation.actorCallbacks.dispatcher(new RequestContextImpl({
1512
+ ...this,
1513
+ invokedFromActorDispatcher: { identifier }
1514
+ }), identifier);
1515
+ }
1516
+ async getObject(cls, values) {
1517
+ const callbacks = this.federation.objectCallbacks[cls.typeId.href];
1518
+ if (callbacks == null) throw new Error("No object dispatcher registered.");
1519
+ for (const param of callbacks.parameters) if (!(param in values)) throw new TypeError(`Missing parameter: ${param}`);
1520
+ if (this.#invokedFromObjectDispatcher != null) getLogger(["fedify", "federation"]).warn("RequestContext.getObject({getObjectClass}, {getObjectValues}) is invoked from the object dispatcher ({actorDispatcherClass}, {actorDispatcherValues}); this may cause an infinite loop.", {
1521
+ getObjectClass: cls.name,
1522
+ getObjectValues: values,
1523
+ actorDispatcherClass: this.#invokedFromObjectDispatcher.cls.name,
1524
+ actorDispatcherValues: this.#invokedFromObjectDispatcher.values
1525
+ });
1526
+ return await callbacks.dispatcher(new RequestContextImpl({
1527
+ ...this,
1528
+ invokedFromObjectDispatcher: {
1529
+ cls,
1530
+ values
1531
+ }
1532
+ }), values);
1533
+ }
1534
+ #signedKey = void 0;
1535
+ async getSignedKey(options = {}) {
1536
+ if (this.#signedKey != null) return this.#signedKey;
1537
+ return this.#signedKey = await verifyRequest(this.request, {
1538
+ ...this,
1539
+ contextLoader: options.contextLoader ?? this.contextLoader,
1540
+ documentLoader: options.documentLoader ?? this.documentLoader,
1541
+ timeWindow: this.federation.signatureTimeWindow,
1542
+ tracerProvider: options.tracerProvider ?? this.tracerProvider
1543
+ });
1544
+ }
1545
+ #signedKeyOwner = void 0;
1546
+ async getSignedKeyOwner(options = {}) {
1547
+ if (this.#signedKeyOwner != null) return this.#signedKeyOwner;
1548
+ const key = await this.getSignedKey(options);
1549
+ if (key == null) return this.#signedKeyOwner = null;
1550
+ return this.#signedKeyOwner = await getKeyOwner(key, {
1551
+ contextLoader: options.contextLoader ?? this.contextLoader,
1552
+ documentLoader: options.documentLoader ?? this.documentLoader,
1553
+ tracerProvider: options.tracerProvider ?? this.tracerProvider
1554
+ });
1555
+ }
1556
+ };
1557
+ var InboxContextImpl = class extends ContextImpl {
1558
+ recipient;
1559
+ activity;
1560
+ activityId;
1561
+ activityType;
1562
+ constructor(recipient, activity, activityId, activityType, options) {
1563
+ super(options);
1564
+ this.recipient = recipient;
1565
+ this.activity = activity;
1566
+ this.activityId = activityId;
1567
+ this.activityType = activityType;
1568
+ }
1569
+ forwardActivity(forwarder, recipients, options) {
1570
+ const tracer = this.tracerProvider.getTracer(deno_default.name, deno_default.version);
1571
+ return tracer.startActiveSpan("activitypub.outbox", {
1572
+ kind: this.federation.outboxQueue == null || options?.immediate ? SpanKind.CLIENT : SpanKind.PRODUCER,
1573
+ attributes: { "activitypub.activity.type": this.activityType }
1574
+ }, async (span) => {
1575
+ try {
1576
+ if (this.activityId != null) span.setAttribute("activitypub.activity.id", this.activityId);
1577
+ await this.forwardActivityInternal(forwarder, recipients, options);
1578
+ } catch (e) {
1579
+ span.setStatus({
1580
+ code: SpanStatusCode.ERROR,
1581
+ message: String(e)
1582
+ });
1583
+ throw e;
1584
+ } finally {
1585
+ span.end();
1586
+ }
1587
+ });
1588
+ }
1589
+ async forwardActivityInternal(forwarder, recipients, options) {
1590
+ const logger = getLogger([
1591
+ "fedify",
1592
+ "federation",
1593
+ "inbox"
1594
+ ]);
1595
+ let keys;
1596
+ let identifier = null;
1597
+ if ("identifier" in forwarder || "username" in forwarder || "handle" in forwarder) {
1598
+ if ("identifier" in forwarder) identifier = forwarder.identifier;
1599
+ else {
1600
+ let username;
1601
+ if ("username" in forwarder) username = forwarder.username;
1602
+ else {
1603
+ username = forwarder.handle;
1604
+ logger.warn("The \"handle\" property for the forwarder parameter is deprecated; use \"identifier\" or \"username\" instead.", { forwarder });
1605
+ }
1606
+ if (this.federation.actorCallbacks?.handleMapper == null) identifier = username;
1607
+ else {
1608
+ const mapped = await this.federation.actorCallbacks.handleMapper(this, username);
1609
+ if (mapped == null) throw new Error(`No actor found for the given username ${JSON.stringify(username)}.`);
1610
+ identifier = mapped;
1611
+ }
1612
+ }
1613
+ keys = await this.getKeyPairsFromIdentifier(identifier);
1614
+ if (keys.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
1615
+ } else if (Array.isArray(forwarder)) {
1616
+ if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
1617
+ keys = forwarder;
1618
+ } else keys = [forwarder];
1619
+ if (!hasSignature(this.activity)) {
1620
+ let hasProof;
1621
+ try {
1622
+ const activity = await Activity.fromJsonLd(this.activity, this);
1623
+ hasProof = await activity.getProof() != null;
1624
+ } catch {
1625
+ hasProof = false;
1626
+ }
1627
+ if (!hasProof) {
1628
+ if (options?.skipIfUnsigned) return;
1629
+ logger.warn("The received activity {activityId} is not signed; even if it is forwarded to other servers as is, it may not be accepted by them due to the lack of a signature/proof.");
1630
+ }
1631
+ }
1632
+ if (recipients === "followers") {
1633
+ if (identifier == null) throw new Error("If recipients is \"followers\", forwarder must be an actor identifier or username.");
1634
+ const followers = [];
1635
+ for await (const recipient of this.getFollowers(identifier)) followers.push(recipient);
1636
+ recipients = followers;
1637
+ }
1638
+ const inboxes = extractInboxes({
1639
+ recipients: Array.isArray(recipients) ? recipients : [recipients],
1640
+ preferSharedInbox: options?.preferSharedInbox,
1641
+ excludeBaseUris: options?.excludeBaseUris
1642
+ });
1643
+ logger.debug("Forwarding activity {activityId} to inboxes:\n{inboxes}", {
1644
+ inboxes: globalThis.Object.keys(inboxes),
1645
+ activityId: this.activityId,
1646
+ activity: this.activity
1647
+ });
1648
+ if (options?.immediate || this.federation.outboxQueue == null) {
1649
+ if (options?.immediate) logger.debug("Forwarding activity immediately without queue since immediate option is set.");
1650
+ else logger.debug("Forwarding activity immediately without queue since queue is not set.");
1651
+ const promises = [];
1652
+ for (const inbox in inboxes) promises.push(sendActivity({
1653
+ keys,
1654
+ activity: this.activity,
1655
+ activityId: this.activityId,
1656
+ activityType: this.activityType,
1657
+ inbox: new URL(inbox),
1658
+ sharedInbox: inboxes[inbox].sharedInbox,
1659
+ tracerProvider: this.tracerProvider,
1660
+ specDeterminer: new KvSpecDeterminer(this.federation.kv, this.federation.kvPrefixes.httpMessageSignaturesSpec)
1661
+ }));
1662
+ await Promise.all(promises);
1663
+ return;
1664
+ }
1665
+ logger.debug("Enqueuing activity {activityId} to forward later.", {
1666
+ activityId: this.activityId,
1667
+ activity: this.activity
1668
+ });
1669
+ const keyJwkPairs = [];
1670
+ for (const { keyId, privateKey } of keys) {
1671
+ const privateKeyJwk = await exportJwk(privateKey);
1672
+ keyJwkPairs.push({
1673
+ keyId: keyId.href,
1674
+ privateKey: privateKeyJwk
1675
+ });
1676
+ }
1677
+ const carrier = {};
1678
+ propagation.inject(context.active(), carrier);
1679
+ const messages = [];
1680
+ for (const inbox in inboxes) {
1681
+ const message = {
1682
+ type: "outbox",
1683
+ id: crypto.randomUUID(),
1684
+ baseUrl: this.origin,
1685
+ keys: keyJwkPairs,
1686
+ activity: this.activity,
1687
+ activityId: this.activityId,
1688
+ activityType: this.activityType,
1689
+ inbox,
1690
+ sharedInbox: inboxes[inbox].sharedInbox,
1691
+ started: new Date().toISOString(),
1692
+ attempt: 0,
1693
+ headers: {},
1694
+ traceContext: carrier
1695
+ };
1696
+ messages.push(message);
1697
+ }
1698
+ const { outboxQueue } = this.federation;
1699
+ if (outboxQueue.enqueueMany == null) {
1700
+ const promises = messages.map((m) => outboxQueue.enqueue(m));
1701
+ const results = await Promise.allSettled(promises);
1702
+ const errors = results.filter((r) => r.status === "rejected").map((r) => r.reason);
1703
+ if (errors.length > 0) {
1704
+ logger.error("Failed to enqueue activity {activityId} to forward later:\n{errors}", {
1705
+ activityId: this.activityId,
1706
+ errors
1707
+ });
1708
+ if (errors.length > 1) throw new AggregateError(errors, `Failed to enqueue activity ${this.activityId} to forward later.`);
1709
+ throw errors[0];
1710
+ }
1711
+ } else try {
1712
+ await outboxQueue.enqueueMany(messages);
1713
+ } catch (error) {
1714
+ logger.error("Failed to enqueue activity {activityId} to forward later:\n{error}", {
1715
+ activityId: this.activityId,
1716
+ error
1717
+ });
1718
+ throw error;
1719
+ }
1720
+ }
1721
+ };
1722
+ var KvSpecDeterminer = class {
1723
+ kv;
1724
+ prefix;
1725
+ defaultSpec;
1726
+ constructor(kv, prefix, defaultSpec = "rfc9421") {
1727
+ this.kv = kv;
1728
+ this.prefix = prefix;
1729
+ this.defaultSpec = defaultSpec;
1730
+ }
1731
+ async determineSpec(origin) {
1732
+ return await this.kv.get([...this.prefix, origin]) ?? this.defaultSpec;
1733
+ }
1734
+ async rememberSpec(origin, spec) {
1735
+ await this.kv.set([...this.prefix, origin], spec);
1736
+ }
1737
+ };
1738
+ function notFound(_request) {
1739
+ return new Response("Not Found", { status: 404 });
1740
+ }
1741
+ function notAcceptable(_request) {
1742
+ return new Response("Not Acceptable", {
1743
+ status: 406,
1744
+ headers: { Vary: "Accept, Signature" }
1745
+ });
1746
+ }
1747
+ function unauthorized(_request) {
1748
+ return new Response("Unauthorized", {
1749
+ status: 401,
1750
+ headers: { Vary: "Accept, Signature" }
1751
+ });
1752
+ }
1753
+ /**
1754
+ * Generates or extracts a unique identifier for a request.
1755
+ *
1756
+ * This function first attempts to extract an existing request ID from standard
1757
+ * tracing headers. If none exists, it generates a new one. The ID format is:
1758
+ *
1759
+ * - If from headers, uses the existing ID.
1760
+ * - If generated, uses format `req_` followed by a base36 timestamp and
1761
+ * 6 random chars.
1762
+ *
1763
+ * @param request The incoming HTTP request.
1764
+ * @returns A string identifier unique to this request.
1765
+ */
1766
+ function getRequestId(request) {
1767
+ const traceId = request.headers.get("X-Request-Id") || request.headers.get("X-Correlation-Id") || request.headers.get("Traceparent")?.split("-")[1];
1768
+ if (traceId != null) return traceId;
1769
+ const timestamp = Date.now().toString(36);
1770
+ const random = Math.random().toString(36).slice(2, 8);
1771
+ return `req_${timestamp}${random}`;
1772
+ }
1773
+
1774
+ //#endregion
1775
+ export { ContextImpl, FederationImpl, InboxContextImpl, createFederation };