@fedify/fedify 1.6.0-dev.814 → 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
@@ -1,2071 +0,0 @@
1
- import * as dntShim from "../_dnt.shims.js";
2
- import { getLogger, withContext } from "@logtape/logtape";
3
- import { context, propagation, SpanKind, SpanStatusCode, trace, } from "@opentelemetry/api";
4
- 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";
5
- import { getDefaultActivityTransformers } from "../compat/transformers.js";
6
- import metadata from "../deno.js";
7
- import { getNodeInfo } from "../nodeinfo/client.js";
8
- import { handleNodeInfo, handleNodeInfoJrd } from "../nodeinfo/handler.js";
9
- import { getAuthenticatedDocumentLoader, getDocumentLoader, kvCache, } from "../runtime/docloader.js";
10
- import { verifyRequest, } from "../sig/http.js";
11
- import { exportJwk, importJwk, validateCryptoKey } from "../sig/key.js";
12
- import { hasSignature, signJsonLd } from "../sig/ld.js";
13
- import { getKeyOwner } from "../sig/owner.js";
14
- import { signObject, verifyObject } from "../sig/proof.js";
15
- import { lookupObject, traverseCollection, } from "../vocab/lookup.js";
16
- import { getTypeId } from "../vocab/type.js";
17
- import { Activity, CryptographicKey, Multikey, } from "../vocab/vocab.js";
18
- import { handleWebFinger } from "../webfinger/handler.js";
19
- import { lookupWebFinger, } from "../webfinger/lookup.js";
20
- import { FederationBuilderImpl } from "./builder.js";
21
- import { buildCollectionSynchronizationHeader } from "./collection.js";
22
- import { handleActor, handleCollection, handleInbox, handleObject, } from "./handler.js";
23
- import { routeActivity } from "./inbox.js";
24
- import { KvKeyCache } from "./keycache.js";
25
- import { createExponentialBackoffPolicy } from "./retry.js";
26
- import { RouterError } from "./router.js";
27
- import { extractInboxes, sendActivity } from "./send.js";
28
- /**
29
- * Create a new {@link Federation} instance.
30
- * @param parameters Parameters for initializing the instance.
31
- * @returns A new {@link Federation} instance.
32
- * @since 0.10.0
33
- */
34
- export function createFederation(options) {
35
- return new FederationImpl(options);
36
- }
37
- export class FederationImpl extends FederationBuilderImpl {
38
- kv;
39
- kvPrefixes;
40
- inboxQueue;
41
- outboxQueue;
42
- fanoutQueue;
43
- inboxQueueStarted;
44
- outboxQueueStarted;
45
- fanoutQueueStarted;
46
- manuallyStartQueue;
47
- origin;
48
- documentLoaderFactory;
49
- contextLoaderFactory;
50
- authenticatedDocumentLoaderFactory;
51
- allowPrivateAddress;
52
- userAgent;
53
- onOutboxError;
54
- signatureTimeWindow;
55
- skipSignatureVerification;
56
- outboxRetryPolicy;
57
- inboxRetryPolicy;
58
- activityTransformers;
59
- tracerProvider;
60
- constructor(options) {
61
- super();
62
- const logger = getLogger(["fedify", "federation"]);
63
- this.kv = options.kv;
64
- this.kvPrefixes = {
65
- ...{
66
- activityIdempotence: ["_fedify", "activityIdempotence"],
67
- remoteDocument: ["_fedify", "remoteDocument"],
68
- publicKey: ["_fedify", "publicKey"],
69
- httpMessageSignaturesSpec: ["_fedify", "httpMessageSignaturesSpec"],
70
- },
71
- ...(options.kvPrefixes ?? {}),
72
- };
73
- if (options.queue == null) {
74
- this.inboxQueue = undefined;
75
- this.outboxQueue = undefined;
76
- this.fanoutQueue = undefined;
77
- }
78
- else if ("enqueue" in options.queue && "listen" in options.queue) {
79
- this.inboxQueue = options.queue;
80
- this.outboxQueue = options.queue;
81
- this.fanoutQueue = options.queue;
82
- }
83
- else {
84
- this.inboxQueue = options.queue.inbox;
85
- this.outboxQueue = options.queue.outbox;
86
- this.fanoutQueue = options.queue.fanout;
87
- }
88
- this.inboxQueueStarted = false;
89
- this.outboxQueueStarted = false;
90
- this.fanoutQueueStarted = false;
91
- this.manuallyStartQueue = options.manuallyStartQueue ?? false;
92
- if (options.origin != null) {
93
- if (typeof options.origin === "string") {
94
- if (!URL.canParse(options.origin) || !options.origin.match(/^https?:\/\//)) {
95
- throw new TypeError(`Invalid origin: ${JSON.stringify(options.origin)}`);
96
- }
97
- const origin = new URL(options.origin);
98
- if (!origin.pathname.match(/^\/*$/) || origin.search !== "" ||
99
- origin.hash !== "") {
100
- throw new TypeError(`Invalid origin: ${JSON.stringify(options.origin)}`);
101
- }
102
- this.origin = { handleHost: origin.host, webOrigin: origin.origin };
103
- }
104
- else {
105
- const { handleHost, webOrigin } = options.origin;
106
- if (!URL.canParse(`https://${handleHost}/`) || handleHost.includes("/")) {
107
- throw new TypeError(`Invalid origin.handleHost: ${JSON.stringify(handleHost)}`);
108
- }
109
- if (!URL.canParse(webOrigin) || !webOrigin.match(/^https?:\/\//)) {
110
- throw new TypeError(`Invalid origin.webOrigin: ${JSON.stringify(webOrigin)}`);
111
- }
112
- const webOriginUrl = new URL(webOrigin);
113
- if (!webOriginUrl.pathname.match(/^\/*$/) || webOriginUrl.search !== "" ||
114
- webOriginUrl.hash !== "") {
115
- throw new TypeError(`Invalid origin.webOrigin: ${JSON.stringify(webOrigin)}`);
116
- }
117
- this.origin = {
118
- handleHost: new URL(`https://${handleHost}/`).host,
119
- webOrigin: webOriginUrl.origin,
120
- };
121
- }
122
- }
123
- this.router.trailingSlashInsensitive = options.trailingSlashInsensitive ??
124
- false;
125
- this._initializeRouter();
126
- if (options.allowPrivateAddress || options.userAgent != null) {
127
- if (options.documentLoader != null) {
128
- throw new TypeError("Cannot set documentLoader with allowPrivateAddress or " +
129
- "userAgent options.");
130
- }
131
- else if (options.contextLoader != null) {
132
- throw new TypeError("Cannot set contextLoader with allowPrivateAddress or " +
133
- "userAgent options.");
134
- }
135
- else if (options.authenticatedDocumentLoaderFactory != null) {
136
- throw new TypeError("Cannot set authenticatedDocumentLoaderFactory with " +
137
- "allowPrivateAddress or userAgent options.");
138
- }
139
- }
140
- const { allowPrivateAddress, userAgent } = options;
141
- this.allowPrivateAddress = allowPrivateAddress ?? false;
142
- if (options.documentLoader != null) {
143
- if (options.documentLoaderFactory != null) {
144
- throw new TypeError("Cannot set both documentLoader and documentLoaderFactory options " +
145
- "at a time; use documentLoaderFactory only.");
146
- }
147
- this.documentLoaderFactory = () => options.documentLoader;
148
- logger.warn("The documentLoader option is deprecated; use documentLoaderFactory " +
149
- "option instead.");
150
- }
151
- else {
152
- this.documentLoaderFactory = options.documentLoaderFactory ??
153
- ((opts) => {
154
- return kvCache({
155
- loader: getDocumentLoader({
156
- allowPrivateAddress: opts?.allowPrivateAddress ??
157
- allowPrivateAddress,
158
- userAgent: opts?.userAgent ?? userAgent,
159
- }),
160
- kv: options.kv,
161
- prefix: this.kvPrefixes.remoteDocument,
162
- });
163
- });
164
- }
165
- if (options.contextLoader != null) {
166
- if (options.contextLoaderFactory != null) {
167
- throw new TypeError("Cannot set both contextLoader and contextLoaderFactory options " +
168
- "at a time; use contextLoaderFactory only.");
169
- }
170
- this.contextLoaderFactory = () => options.contextLoader;
171
- logger.warn("The contextLoader option is deprecated; use contextLoaderFactory " +
172
- "option instead.");
173
- }
174
- else {
175
- this.contextLoaderFactory = options.contextLoaderFactory ??
176
- this.documentLoaderFactory;
177
- }
178
- this.authenticatedDocumentLoaderFactory =
179
- options.authenticatedDocumentLoaderFactory ??
180
- ((identity) => getAuthenticatedDocumentLoader(identity, {
181
- allowPrivateAddress,
182
- userAgent,
183
- specDeterminer: new KvSpecDeterminer(this.kv, this.kvPrefixes.httpMessageSignaturesSpec),
184
- tracerProvider: this.tracerProvider,
185
- }));
186
- this.userAgent = userAgent;
187
- this.onOutboxError = options.onOutboxError;
188
- this.signatureTimeWindow = options.signatureTimeWindow ?? { hours: 1 };
189
- this.skipSignatureVerification = options.skipSignatureVerification ?? false;
190
- this.outboxRetryPolicy = options.outboxRetryPolicy ??
191
- createExponentialBackoffPolicy();
192
- this.inboxRetryPolicy = options.inboxRetryPolicy ??
193
- createExponentialBackoffPolicy();
194
- this.activityTransformers = options.activityTransformers ??
195
- getDefaultActivityTransformers();
196
- this.tracerProvider = options.tracerProvider ?? trace.getTracerProvider();
197
- }
198
- _initializeRouter() {
199
- this.router.add("/.well-known/webfinger", "webfinger");
200
- this.router.add("/.well-known/nodeinfo", "nodeInfoJrd");
201
- }
202
- _getTracer() {
203
- return this.tracerProvider.getTracer(metadata.name, metadata.version);
204
- }
205
- async _startQueueInternal(ctxData, signal, queue) {
206
- if (this.inboxQueue == null && this.outboxQueue == null)
207
- return;
208
- const logger = getLogger(["fedify", "federation", "queue"]);
209
- const promises = [];
210
- if (this.inboxQueue != null && (queue == null || queue === "inbox") &&
211
- !this.inboxQueueStarted) {
212
- logger.debug("Starting an inbox task worker.");
213
- this.inboxQueueStarted = true;
214
- promises.push(this.inboxQueue.listen((msg) => this.#listenQueue(ctxData, msg), { signal }));
215
- }
216
- if (this.outboxQueue != null &&
217
- this.outboxQueue !== this.inboxQueue &&
218
- (queue == null || queue === "outbox") &&
219
- !this.outboxQueueStarted) {
220
- logger.debug("Starting an outbox task worker.");
221
- this.outboxQueueStarted = true;
222
- promises.push(this.outboxQueue.listen((msg) => this.#listenQueue(ctxData, msg), { signal }));
223
- }
224
- if (this.fanoutQueue != null &&
225
- this.fanoutQueue !== this.inboxQueue &&
226
- this.fanoutQueue !== this.outboxQueue &&
227
- (queue == null || queue === "fanout") &&
228
- !this.fanoutQueueStarted) {
229
- logger.debug("Starting a fanout task worker.");
230
- this.fanoutQueueStarted = true;
231
- promises.push(this.fanoutQueue.listen((msg) => this.#listenQueue(ctxData, msg), { signal }));
232
- }
233
- await Promise.all(promises);
234
- }
235
- #listenQueue(ctxData, message) {
236
- const tracer = this._getTracer();
237
- const extractedContext = propagation.extract(context.active(), message.traceContext);
238
- return withContext({ messageId: message.id }, async () => {
239
- if (message.type === "fanout") {
240
- await tracer.startActiveSpan("activitypub.fanout", {
241
- kind: SpanKind.CONSUMER,
242
- attributes: {
243
- "activitypub.activity.type": message.activityType,
244
- },
245
- }, extractedContext, async (span) => {
246
- if (message.activityId != null) {
247
- span.setAttribute("activitypub.activity.id", message.activityId);
248
- }
249
- try {
250
- await this.#listenFanoutMessage(ctxData, message);
251
- }
252
- catch (e) {
253
- span.setStatus({
254
- code: SpanStatusCode.ERROR,
255
- message: String(e),
256
- });
257
- throw e;
258
- }
259
- finally {
260
- span.end();
261
- }
262
- });
263
- }
264
- else if (message.type === "outbox") {
265
- await tracer.startActiveSpan("activitypub.outbox", {
266
- kind: SpanKind.CONSUMER,
267
- attributes: {
268
- "activitypub.activity.type": message.activityType,
269
- "activitypub.activity.retries": message.attempt,
270
- },
271
- }, extractedContext, async (span) => {
272
- if (message.activityId != null) {
273
- span.setAttribute("activitypub.activity.id", message.activityId);
274
- }
275
- try {
276
- await this.#listenOutboxMessage(ctxData, message, span);
277
- }
278
- catch (e) {
279
- span.setStatus({
280
- code: SpanStatusCode.ERROR,
281
- message: String(e),
282
- });
283
- throw e;
284
- }
285
- finally {
286
- span.end();
287
- }
288
- });
289
- }
290
- else if (message.type === "inbox") {
291
- await tracer.startActiveSpan("activitypub.inbox", {
292
- kind: SpanKind.CONSUMER,
293
- attributes: {
294
- "activitypub.shared_inbox": message.identifier == null,
295
- },
296
- }, extractedContext, async (span) => {
297
- try {
298
- await this.#listenInboxMessage(ctxData, message, span);
299
- }
300
- catch (e) {
301
- span.setStatus({
302
- code: SpanStatusCode.ERROR,
303
- message: String(e),
304
- });
305
- throw e;
306
- }
307
- finally {
308
- span.end();
309
- }
310
- });
311
- }
312
- });
313
- }
314
- async #listenFanoutMessage(data, message) {
315
- const logger = getLogger(["fedify", "federation", "fanout"]);
316
- logger.debug("Fanning out activity {activityId} to {inboxes} inbox(es)...", {
317
- activityId: message.activityId,
318
- inboxes: globalThis.Object.keys(message.inboxes).length,
319
- });
320
- const keys = await Promise.all(message.keys.map(async ({ keyId, privateKey }) => ({
321
- keyId: new URL(keyId),
322
- privateKey: await importJwk(privateKey, "private"),
323
- })));
324
- const activity = await Activity.fromJsonLd(message.activity, {
325
- contextLoader: this.contextLoaderFactory({
326
- allowPrivateAddress: this.allowPrivateAddress,
327
- userAgent: this.userAgent,
328
- }),
329
- documentLoader: this.documentLoaderFactory({
330
- allowPrivateAddress: this.allowPrivateAddress,
331
- userAgent: this.userAgent,
332
- }),
333
- tracerProvider: this.tracerProvider,
334
- });
335
- const context = this.#createContext(new URL(message.baseUrl), data, {
336
- documentLoader: this.documentLoaderFactory({
337
- allowPrivateAddress: this.allowPrivateAddress,
338
- userAgent: this.userAgent,
339
- }),
340
- });
341
- await this.sendActivity(keys, message.inboxes, activity, {
342
- collectionSync: message.collectionSync,
343
- context,
344
- });
345
- }
346
- async #listenOutboxMessage(_, message, span) {
347
- const logger = getLogger(["fedify", "federation", "outbox"]);
348
- const logData = {
349
- keyIds: message.keys.map((pair) => pair.keyId),
350
- inbox: message.inbox,
351
- activity: message.activity,
352
- activityId: message.activityId,
353
- attempt: message.attempt,
354
- headers: message.headers,
355
- };
356
- const keys = [];
357
- let rsaKeyPair = null;
358
- for (const { keyId, privateKey } of message.keys) {
359
- const pair = {
360
- keyId: new URL(keyId),
361
- privateKey: await importJwk(privateKey, "private"),
362
- };
363
- if (rsaKeyPair == null &&
364
- pair.privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
365
- rsaKeyPair = pair;
366
- }
367
- keys.push(pair);
368
- }
369
- try {
370
- await sendActivity({
371
- keys,
372
- activity: message.activity,
373
- activityId: message.activityId,
374
- activityType: message.activityType,
375
- inbox: new URL(message.inbox),
376
- sharedInbox: message.sharedInbox,
377
- headers: new Headers(message.headers),
378
- specDeterminer: new KvSpecDeterminer(this.kv, this.kvPrefixes.httpMessageSignaturesSpec),
379
- tracerProvider: this.tracerProvider,
380
- });
381
- }
382
- catch (error) {
383
- span.setStatus({ code: SpanStatusCode.ERROR, message: String(error) });
384
- const loaderOptions = this.#getLoaderOptions(message.baseUrl);
385
- const activity = await Activity.fromJsonLd(message.activity, {
386
- contextLoader: this.contextLoaderFactory(loaderOptions),
387
- documentLoader: rsaKeyPair == null
388
- ? this.documentLoaderFactory(loaderOptions)
389
- : this.authenticatedDocumentLoaderFactory(rsaKeyPair, loaderOptions),
390
- tracerProvider: this.tracerProvider,
391
- });
392
- try {
393
- this.onOutboxError?.(error, activity);
394
- }
395
- catch (error) {
396
- logger.error("An unexpected error occurred in onError handler:\n{error}", { ...logData, error });
397
- }
398
- const delay = this.outboxRetryPolicy({
399
- elapsedTime: dntShim.Temporal.Instant.from(message.started).until(dntShim.Temporal.Now.instant()),
400
- attempts: message.attempt,
401
- });
402
- if (delay != null) {
403
- logger.error("Failed to send activity {activityId} to {inbox} (attempt " +
404
- "#{attempt}); retry...:\n{error}", { ...logData, error });
405
- await this.outboxQueue?.enqueue({
406
- ...message,
407
- attempt: message.attempt + 1,
408
- }, {
409
- delay: dntShim.Temporal.Duration.compare(delay, { seconds: 0 }) < 0
410
- ? dntShim.Temporal.Duration.from({ seconds: 0 })
411
- : delay,
412
- });
413
- }
414
- else {
415
- logger.error("Failed to send activity {activityId} to {inbox} after {attempt} " +
416
- "attempts; giving up:\n{error}", { ...logData, error });
417
- }
418
- return;
419
- }
420
- logger.info("Successfully sent activity {activityId} to {inbox}.", { ...logData });
421
- }
422
- async #listenInboxMessage(ctxData, message, span) {
423
- const logger = getLogger(["fedify", "federation", "inbox"]);
424
- const baseUrl = new URL(message.baseUrl);
425
- let context = this.#createContext(baseUrl, ctxData);
426
- if (message.identifier != null) {
427
- context = this.#createContext(baseUrl, ctxData, {
428
- documentLoader: await context.getDocumentLoader({
429
- identifier: message.identifier,
430
- }),
431
- });
432
- }
433
- else if (this.sharedInboxKeyDispatcher != null) {
434
- const identity = await this.sharedInboxKeyDispatcher(context);
435
- if (identity != null) {
436
- context = this.#createContext(baseUrl, ctxData, {
437
- documentLoader: "identifier" in identity || "username" in identity ||
438
- "handle" in identity
439
- ? await context.getDocumentLoader(identity)
440
- : context.getDocumentLoader(identity),
441
- });
442
- }
443
- }
444
- const activity = await Activity.fromJsonLd(message.activity, context);
445
- span.setAttribute("activitypub.activity.type", getTypeId(activity).href);
446
- if (activity.id != null) {
447
- span.setAttribute("activitypub.activity.id", activity.id.href);
448
- }
449
- const cacheKey = activity.id == null ? null : [
450
- ...this.kvPrefixes.activityIdempotence,
451
- context.origin,
452
- activity.id.href,
453
- ];
454
- if (cacheKey != null) {
455
- const cached = await this.kv.get(cacheKey);
456
- if (cached === true) {
457
- logger.debug("Activity {activityId} has already been processed.", {
458
- activityId: activity.id?.href,
459
- activity: message.activity,
460
- recipient: message.identifier,
461
- });
462
- return;
463
- }
464
- }
465
- await this._getTracer().startActiveSpan("activitypub.dispatch_inbox_listener", { kind: SpanKind.INTERNAL }, async (span) => {
466
- const dispatched = this.inboxListeners?.dispatchWithClass(activity);
467
- if (dispatched == null) {
468
- logger.error("Unsupported activity type:\n{activity}", {
469
- activityId: activity.id?.href,
470
- activity: message.activity,
471
- recipient: message.identifier,
472
- trial: message.attempt,
473
- });
474
- span.setStatus({
475
- code: SpanStatusCode.ERROR,
476
- message: `Unsupported activity type: ${getTypeId(activity).href}`,
477
- });
478
- span.end();
479
- return;
480
- }
481
- const { class: cls, listener } = dispatched;
482
- span.updateName(`activitypub.dispatch_inbox_listener ${cls.name}`);
483
- try {
484
- await listener(context.toInboxContext(message.identifier, message.activity, activity.id?.href, getTypeId(activity).href), activity);
485
- }
486
- catch (error) {
487
- try {
488
- await this.inboxErrorHandler?.(context, error);
489
- }
490
- catch (error) {
491
- logger.error("An unexpected error occurred in inbox error handler:\n{error}", {
492
- error,
493
- trial: message.attempt,
494
- activityId: activity.id?.href,
495
- activity: message.activity,
496
- recipient: message.identifier,
497
- });
498
- }
499
- const delay = this.inboxRetryPolicy({
500
- elapsedTime: dntShim.Temporal.Instant.from(message.started).until(dntShim.Temporal.Now.instant()),
501
- attempts: message.attempt,
502
- });
503
- if (delay != null) {
504
- logger.error("Failed to process the incoming activity {activityId} (attempt " +
505
- "#{attempt}); retry...:\n{error}", {
506
- error,
507
- attempt: message.attempt,
508
- activityId: activity.id?.href,
509
- activity: message.activity,
510
- recipient: message.identifier,
511
- });
512
- await this.inboxQueue?.enqueue({
513
- ...message,
514
- attempt: message.attempt + 1,
515
- }, {
516
- delay: dntShim.Temporal.Duration.compare(delay, { seconds: 0 }) < 0
517
- ? dntShim.Temporal.Duration.from({ seconds: 0 })
518
- : delay,
519
- });
520
- }
521
- else {
522
- logger.error("Failed to process the incoming activity {activityId} after " +
523
- "{trial} attempts; giving up:\n{error}", {
524
- error,
525
- activityId: activity.id?.href,
526
- activity: message.activity,
527
- recipient: message.identifier,
528
- });
529
- }
530
- span.setStatus({
531
- code: SpanStatusCode.ERROR,
532
- message: String(error),
533
- });
534
- span.end();
535
- return;
536
- }
537
- if (cacheKey != null) {
538
- await this.kv.set(cacheKey, true, {
539
- ttl: dntShim.Temporal.Duration.from({ days: 1 }),
540
- });
541
- }
542
- logger.info("Activity {activityId} has been processed.", {
543
- activityId: activity.id?.href,
544
- activity: message.activity,
545
- recipient: message.identifier,
546
- });
547
- span.end();
548
- });
549
- }
550
- startQueue(contextData, options = {}) {
551
- return this._startQueueInternal(contextData, options.signal, options.queue);
552
- }
553
- createContext(urlOrRequest, contextData) {
554
- return urlOrRequest instanceof Request
555
- ? this.#createContext(urlOrRequest, contextData)
556
- : this.#createContext(urlOrRequest, contextData);
557
- }
558
- #createContext(urlOrRequest, contextData, opts = {}) {
559
- const request = urlOrRequest instanceof Request ? urlOrRequest : null;
560
- const url = urlOrRequest instanceof URL
561
- ? new URL(urlOrRequest)
562
- : new URL(urlOrRequest.url);
563
- if (request == null) {
564
- url.pathname = "/";
565
- url.hash = "";
566
- url.search = "";
567
- }
568
- const loaderOptions = this.#getLoaderOptions(url.origin);
569
- const ctxOptions = {
570
- url,
571
- federation: this,
572
- data: contextData,
573
- documentLoader: opts.documentLoader ??
574
- this.documentLoaderFactory(loaderOptions),
575
- contextLoader: this.contextLoaderFactory(loaderOptions),
576
- };
577
- if (request == null)
578
- return new ContextImpl(ctxOptions);
579
- return new RequestContextImpl({
580
- ...ctxOptions,
581
- request,
582
- invokedFromActorDispatcher: opts.invokedFromActorDispatcher,
583
- invokedFromObjectDispatcher: opts.invokedFromObjectDispatcher,
584
- });
585
- }
586
- #getLoaderOptions(origin) {
587
- origin = typeof origin === "string"
588
- ? new URL(origin).origin
589
- : origin.origin;
590
- return {
591
- allowPrivateAddress: this.allowPrivateAddress,
592
- userAgent: typeof this.userAgent === "string" ? this.userAgent : {
593
- url: origin,
594
- ...this.userAgent,
595
- },
596
- };
597
- }
598
- async sendActivity(keys, inboxes, activity, options) {
599
- const logger = getLogger(["fedify", "federation", "outbox"]);
600
- const { immediate, collectionSync, context: ctx } = options;
601
- if (activity.id == null) {
602
- throw new TypeError("The activity to send must have an id.");
603
- }
604
- if (activity.actorId == null) {
605
- throw new TypeError("The activity to send must have at least one actor property.");
606
- }
607
- else if (keys.length < 1) {
608
- throw new TypeError("The keys must not be empty.");
609
- }
610
- const contextLoader = this.contextLoaderFactory(this.#getLoaderOptions(ctx.origin));
611
- const activityId = activity.id.href;
612
- let proofCreated = false;
613
- let rsaKey = null;
614
- for (const { keyId, privateKey } of keys) {
615
- validateCryptoKey(privateKey, "private");
616
- if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
617
- rsaKey = { keyId, privateKey };
618
- continue;
619
- }
620
- if (privateKey.algorithm.name === "Ed25519") {
621
- activity = await signObject(activity, privateKey, keyId, {
622
- contextLoader,
623
- tracerProvider: this.tracerProvider,
624
- });
625
- proofCreated = true;
626
- }
627
- }
628
- let jsonLd = await activity.toJsonLd({
629
- format: "compact",
630
- contextLoader,
631
- });
632
- if (rsaKey == null) {
633
- logger.warn("No supported key found to create a Linked Data signature for " +
634
- "the activity {activityId}. The activity will be sent without " +
635
- "a Linked Data signature. In order to create a Linked Data " +
636
- "signature, at least one RSASSA-PKCS1-v1_5 key must be provided.", {
637
- activityId,
638
- keys: keys.map((pair) => ({
639
- keyId: pair.keyId.href,
640
- privateKey: pair.privateKey,
641
- })),
642
- });
643
- }
644
- else {
645
- jsonLd = await signJsonLd(jsonLd, rsaKey.privateKey, rsaKey.keyId, {
646
- contextLoader,
647
- tracerProvider: this.tracerProvider,
648
- });
649
- }
650
- if (!proofCreated) {
651
- logger.warn("No supported key found to create a proof for the activity {activityId}. " +
652
- "The activity will be sent without a proof. " +
653
- "In order to create a proof, at least one Ed25519 key must be provided.", {
654
- activityId,
655
- keys: keys.map((pair) => ({
656
- keyId: pair.keyId.href,
657
- privateKey: pair.privateKey,
658
- })),
659
- });
660
- }
661
- if (immediate || this.outboxQueue == null) {
662
- if (immediate) {
663
- logger.debug("Sending activity immediately without queue since immediate option " +
664
- "is set.", { activityId: activity.id.href, activity: jsonLd });
665
- }
666
- else {
667
- logger.debug("Sending activity immediately without queue since queue is not set.", { activityId: activity.id.href, activity: jsonLd });
668
- }
669
- const promises = [];
670
- for (const inbox in inboxes) {
671
- promises.push(sendActivity({
672
- keys,
673
- activity: jsonLd,
674
- activityId: activity.id?.href,
675
- activityType: getTypeId(activity).href,
676
- inbox: new URL(inbox),
677
- sharedInbox: inboxes[inbox].sharedInbox,
678
- headers: collectionSync == null ? undefined : new Headers({
679
- "Collection-Synchronization": await buildCollectionSynchronizationHeader(collectionSync, inboxes[inbox].actorIds),
680
- }),
681
- specDeterminer: new KvSpecDeterminer(this.kv, this.kvPrefixes.httpMessageSignaturesSpec),
682
- tracerProvider: this.tracerProvider,
683
- }));
684
- }
685
- await Promise.all(promises);
686
- return;
687
- }
688
- logger.debug("Enqueuing activity {activityId} to send later.", { activityId: activity.id.href, activity: jsonLd });
689
- const keyJwkPairs = [];
690
- for (const { keyId, privateKey } of keys) {
691
- const privateKeyJwk = await exportJwk(privateKey);
692
- keyJwkPairs.push({ keyId: keyId.href, privateKey: privateKeyJwk });
693
- }
694
- if (!this.manuallyStartQueue)
695
- this._startQueueInternal(ctx.data);
696
- const carrier = {};
697
- propagation.inject(context.active(), carrier);
698
- const messages = [];
699
- for (const inbox in inboxes) {
700
- const message = {
701
- type: "outbox",
702
- id: dntShim.crypto.randomUUID(),
703
- baseUrl: ctx.origin,
704
- keys: keyJwkPairs,
705
- activity: jsonLd,
706
- activityId: activity.id?.href,
707
- activityType: getTypeId(activity).href,
708
- inbox,
709
- sharedInbox: inboxes[inbox].sharedInbox,
710
- started: new Date().toISOString(),
711
- attempt: 0,
712
- headers: collectionSync == null ? {} : {
713
- "Collection-Synchronization": await buildCollectionSynchronizationHeader(collectionSync, inboxes[inbox].actorIds),
714
- },
715
- traceContext: carrier,
716
- };
717
- messages.push(message);
718
- }
719
- const { outboxQueue } = this;
720
- if (outboxQueue.enqueueMany == null) {
721
- const promises = messages.map((m) => outboxQueue.enqueue(m));
722
- const results = await Promise.allSettled(promises);
723
- const errors = results
724
- .filter((r) => r.status === "rejected")
725
- .map((r) => r.reason);
726
- if (errors.length > 0) {
727
- logger.error("Failed to enqueue activity {activityId} to send later: {errors}", { activityId: activity.id.href, errors });
728
- if (errors.length > 1) {
729
- throw new AggregateError(errors, `Failed to enqueue activity ${activityId} to send later.`);
730
- }
731
- throw errors[0];
732
- }
733
- }
734
- else {
735
- try {
736
- await outboxQueue.enqueueMany(messages);
737
- }
738
- catch (error) {
739
- logger.error("Failed to enqueue activity {activityId} to send later: {error}", { activityId: activity.id.href, error });
740
- throw error;
741
- }
742
- }
743
- }
744
- fetch(request, options) {
745
- const requestId = getRequestId(request);
746
- return withContext({ requestId }, async () => {
747
- const tracer = this._getTracer();
748
- return await tracer.startActiveSpan(request.method, {
749
- kind: SpanKind.SERVER,
750
- attributes: {
751
- [ATTR_HTTP_REQUEST_METHOD]: request.method,
752
- [ATTR_URL_FULL]: request.url,
753
- },
754
- }, async (span) => {
755
- const logger = getLogger(["fedify", "federation", "http"]);
756
- if (span.isRecording()) {
757
- for (const [k, v] of request.headers) {
758
- span.setAttribute(ATTR_HTTP_REQUEST_HEADER(k), [v]);
759
- }
760
- }
761
- let response;
762
- try {
763
- response = await this.#fetch(request, { ...options, span, tracer });
764
- }
765
- catch (error) {
766
- span.setStatus({
767
- code: SpanStatusCode.ERROR,
768
- message: `${error}`,
769
- });
770
- span.end();
771
- logger.error("An error occurred while serving request {method} {url}: {error}", { method: request.method, url: request.url, error });
772
- throw error;
773
- }
774
- if (span.isRecording()) {
775
- span.setAttribute(ATTR_HTTP_RESPONSE_STATUS_CODE, response.status);
776
- for (const [k, v] of response.headers) {
777
- span.setAttribute(ATTR_HTTP_RESPONSE_HEADER(k), [v]);
778
- }
779
- span.setStatus({
780
- code: response.status >= 500
781
- ? SpanStatusCode.ERROR
782
- : SpanStatusCode.UNSET,
783
- message: response.statusText,
784
- });
785
- }
786
- span.end();
787
- const url = new URL(request.url);
788
- const logTpl = "{method} {path}: {status}";
789
- const values = {
790
- method: request.method,
791
- path: `${url.pathname}${url.search}`,
792
- url: request.url,
793
- status: response.status,
794
- };
795
- if (response.status >= 500)
796
- logger.error(logTpl, values);
797
- else if (response.status >= 400)
798
- logger.warn(logTpl, values);
799
- else
800
- logger.info(logTpl, values);
801
- return response;
802
- });
803
- });
804
- }
805
- async #fetch(request, { onNotFound, onNotAcceptable, onUnauthorized, contextData, span, tracer, }) {
806
- onNotFound ??= notFound;
807
- onNotAcceptable ??= notAcceptable;
808
- onUnauthorized ??= unauthorized;
809
- const url = new URL(request.url);
810
- const route = this.router.route(url.pathname);
811
- if (route == null)
812
- return await onNotFound(request);
813
- span.updateName(`${request.method} ${route.template}`);
814
- let context = this.#createContext(request, contextData);
815
- const routeName = route.name.replace(/:.*$/, "");
816
- switch (routeName) {
817
- case "webfinger":
818
- return await handleWebFinger(request, {
819
- context,
820
- host: this.origin?.handleHost,
821
- actorDispatcher: this.actorCallbacks?.dispatcher,
822
- actorHandleMapper: this.actorCallbacks?.handleMapper,
823
- actorAliasMapper: this.actorCallbacks?.aliasMapper,
824
- onNotFound,
825
- tracer,
826
- });
827
- case "nodeInfoJrd":
828
- return await handleNodeInfoJrd(request, context);
829
- case "nodeInfo":
830
- return await handleNodeInfo(request, {
831
- context,
832
- nodeInfoDispatcher: this.nodeInfoDispatcher,
833
- });
834
- case "actor":
835
- context = this.#createContext(request, contextData, {
836
- invokedFromActorDispatcher: {
837
- identifier: route.values.identifier ?? route.values.handle,
838
- },
839
- });
840
- return await handleActor(request, {
841
- identifier: route.values.identifier ?? route.values.handle,
842
- context,
843
- actorDispatcher: this.actorCallbacks?.dispatcher,
844
- authorizePredicate: this.actorCallbacks?.authorizePredicate,
845
- onUnauthorized,
846
- onNotFound,
847
- onNotAcceptable,
848
- });
849
- case "object": {
850
- const typeId = route.name.replace(/^object:/, "");
851
- const callbacks = this.objectCallbacks[typeId];
852
- const cls = this.objectTypeIds[typeId];
853
- context = this.#createContext(request, contextData, {
854
- invokedFromObjectDispatcher: { cls, values: route.values },
855
- });
856
- return await handleObject(request, {
857
- values: route.values,
858
- context,
859
- objectDispatcher: callbacks?.dispatcher,
860
- authorizePredicate: callbacks?.authorizePredicate,
861
- onUnauthorized,
862
- onNotFound,
863
- onNotAcceptable,
864
- });
865
- }
866
- case "outbox":
867
- return await handleCollection(request, {
868
- name: "outbox",
869
- identifier: route.values.identifier ?? route.values.handle,
870
- uriGetter: context.getOutboxUri.bind(context),
871
- context,
872
- collectionCallbacks: this.outboxCallbacks,
873
- tracerProvider: this.tracerProvider,
874
- onUnauthorized,
875
- onNotFound,
876
- onNotAcceptable,
877
- });
878
- case "inbox":
879
- if (request.method !== "POST") {
880
- return await handleCollection(request, {
881
- name: "inbox",
882
- identifier: route.values.identifier ?? route.values.handle,
883
- uriGetter: context.getInboxUri.bind(context),
884
- context,
885
- collectionCallbacks: this.inboxCallbacks,
886
- tracerProvider: this.tracerProvider,
887
- onUnauthorized,
888
- onNotFound,
889
- onNotAcceptable,
890
- });
891
- }
892
- context = this.#createContext(request, contextData, {
893
- documentLoader: await context.getDocumentLoader({
894
- identifier: route.values.identifier ?? route.values.handle,
895
- }),
896
- });
897
- // falls through
898
- case "sharedInbox":
899
- if (routeName !== "inbox" && this.sharedInboxKeyDispatcher != null) {
900
- const identity = await this.sharedInboxKeyDispatcher(context);
901
- if (identity != null) {
902
- context = this.#createContext(request, contextData, {
903
- documentLoader: "identifier" in identity || "username" in identity ||
904
- "handle" in identity
905
- ? await context.getDocumentLoader(identity)
906
- : context.getDocumentLoader(identity),
907
- });
908
- }
909
- }
910
- if (!this.manuallyStartQueue)
911
- this._startQueueInternal(contextData);
912
- return await handleInbox(request, {
913
- recipient: route.values.identifier ?? route.values.handle ?? null,
914
- context,
915
- inboxContextFactory: context.toInboxContext.bind(context),
916
- kv: this.kv,
917
- kvPrefixes: this.kvPrefixes,
918
- queue: this.inboxQueue,
919
- actorDispatcher: this.actorCallbacks?.dispatcher,
920
- inboxListeners: this.inboxListeners,
921
- inboxErrorHandler: this.inboxErrorHandler,
922
- onNotFound,
923
- signatureTimeWindow: this.signatureTimeWindow,
924
- skipSignatureVerification: this.skipSignatureVerification,
925
- tracerProvider: this.tracerProvider,
926
- });
927
- case "following":
928
- return await handleCollection(request, {
929
- name: "following",
930
- identifier: route.values.identifier ?? route.values.handle,
931
- uriGetter: context.getFollowingUri.bind(context),
932
- context,
933
- collectionCallbacks: this.followingCallbacks,
934
- tracerProvider: this.tracerProvider,
935
- onUnauthorized,
936
- onNotFound,
937
- onNotAcceptable,
938
- });
939
- case "followers": {
940
- let baseUrl = url.searchParams.get("base-url");
941
- if (baseUrl != null) {
942
- try {
943
- baseUrl = `${new URL(baseUrl).origin}/`;
944
- }
945
- catch {
946
- // If base-url is invalid, set to null to behave as if it wasn't provided
947
- baseUrl = null;
948
- }
949
- }
950
- return await handleCollection(request, {
951
- name: "followers",
952
- identifier: route.values.identifier ?? route.values.handle,
953
- uriGetter: baseUrl == null
954
- ? context.getFollowersUri.bind(context)
955
- : (identifier) => {
956
- const uri = context.getFollowersUri(identifier);
957
- uri.searchParams.set("base-url", baseUrl);
958
- return uri;
959
- },
960
- context,
961
- filter: baseUrl != null ? new URL(baseUrl) : undefined,
962
- filterPredicate: baseUrl != null
963
- ? ((i) => (i instanceof URL ? i.href : i.id?.href ?? "").startsWith(baseUrl))
964
- : undefined,
965
- collectionCallbacks: this.followersCallbacks,
966
- tracerProvider: this.tracerProvider,
967
- onUnauthorized,
968
- onNotFound,
969
- onNotAcceptable,
970
- });
971
- }
972
- case "liked":
973
- return await handleCollection(request, {
974
- name: "liked",
975
- identifier: route.values.identifier ?? route.values.handle,
976
- uriGetter: context.getLikedUri.bind(context),
977
- context,
978
- collectionCallbacks: this.likedCallbacks,
979
- tracerProvider: this.tracerProvider,
980
- onUnauthorized,
981
- onNotFound,
982
- onNotAcceptable,
983
- });
984
- case "featured":
985
- return await handleCollection(request, {
986
- name: "featured",
987
- identifier: route.values.identifier ?? route.values.handle,
988
- uriGetter: context.getFeaturedUri.bind(context),
989
- context,
990
- collectionCallbacks: this.featuredCallbacks,
991
- tracerProvider: this.tracerProvider,
992
- onUnauthorized,
993
- onNotFound,
994
- onNotAcceptable,
995
- });
996
- case "featuredTags":
997
- return await handleCollection(request, {
998
- name: "featured tags",
999
- identifier: route.values.identifier ?? route.values.handle,
1000
- uriGetter: context.getFeaturedTagsUri.bind(context),
1001
- context,
1002
- collectionCallbacks: this.featuredTagsCallbacks,
1003
- tracerProvider: this.tracerProvider,
1004
- onUnauthorized,
1005
- onNotFound,
1006
- onNotAcceptable,
1007
- });
1008
- default: {
1009
- const response = onNotFound(request);
1010
- return response instanceof Promise ? await response : response;
1011
- }
1012
- }
1013
- }
1014
- }
1015
- const FANOUT_THRESHOLD = 5;
1016
- export class ContextImpl {
1017
- url;
1018
- federation;
1019
- data;
1020
- documentLoader;
1021
- contextLoader;
1022
- invokedFromActorKeyPairsDispatcher;
1023
- constructor({ url, federation, data, documentLoader, contextLoader, invokedFromActorKeyPairsDispatcher, }) {
1024
- this.url = url;
1025
- this.federation = federation;
1026
- this.data = data;
1027
- this.documentLoader = documentLoader;
1028
- this.contextLoader = contextLoader;
1029
- this.invokedFromActorKeyPairsDispatcher =
1030
- invokedFromActorKeyPairsDispatcher;
1031
- }
1032
- toInboxContext(recipient, activity, activityId, activityType) {
1033
- return new InboxContextImpl(recipient, activity, activityId, activityType, {
1034
- url: this.url,
1035
- federation: this.federation,
1036
- data: this.data,
1037
- documentLoader: this.documentLoader,
1038
- contextLoader: this.contextLoader,
1039
- invokedFromActorKeyPairsDispatcher: this.invokedFromActorKeyPairsDispatcher,
1040
- });
1041
- }
1042
- get hostname() {
1043
- return this.url.hostname;
1044
- }
1045
- get host() {
1046
- return this.url.host;
1047
- }
1048
- get origin() {
1049
- return this.url.origin;
1050
- }
1051
- get canonicalOrigin() {
1052
- return this.federation.origin?.webOrigin ?? this.origin;
1053
- }
1054
- get tracerProvider() {
1055
- return this.federation.tracerProvider;
1056
- }
1057
- getNodeInfoUri() {
1058
- const path = this.federation.router.build("nodeInfo", {});
1059
- if (path == null) {
1060
- throw new RouterError("No NodeInfo dispatcher registered.");
1061
- }
1062
- return new URL(path, this.canonicalOrigin);
1063
- }
1064
- getActorUri(identifier) {
1065
- const path = this.federation.router.build("actor", { identifier, handle: identifier });
1066
- if (path == null) {
1067
- throw new RouterError("No actor dispatcher registered.");
1068
- }
1069
- return new URL(path, this.canonicalOrigin);
1070
- }
1071
- getObjectUri(
1072
- // deno-lint-ignore no-explicit-any
1073
- cls, values) {
1074
- const callbacks = this.federation.objectCallbacks[cls.typeId.href];
1075
- if (callbacks == null) {
1076
- throw new RouterError("No object dispatcher registered.");
1077
- }
1078
- for (const param of callbacks.parameters) {
1079
- if (!(param in values)) {
1080
- throw new TypeError(`Missing parameter: ${param}`);
1081
- }
1082
- }
1083
- const path = this.federation.router.build(`object:${cls.typeId.href}`, values);
1084
- if (path == null) {
1085
- throw new RouterError("No object dispatcher registered.");
1086
- }
1087
- return new URL(path, this.canonicalOrigin);
1088
- }
1089
- getOutboxUri(identifier) {
1090
- const path = this.federation.router.build("outbox", { identifier, handle: identifier });
1091
- if (path == null) {
1092
- throw new RouterError("No outbox dispatcher registered.");
1093
- }
1094
- return new URL(path, this.canonicalOrigin);
1095
- }
1096
- getInboxUri(identifier) {
1097
- if (identifier == null) {
1098
- const path = this.federation.router.build("sharedInbox", {});
1099
- if (path == null) {
1100
- throw new RouterError("No shared inbox path registered.");
1101
- }
1102
- return new URL(path, this.canonicalOrigin);
1103
- }
1104
- const path = this.federation.router.build("inbox", { identifier, handle: identifier });
1105
- if (path == null) {
1106
- throw new RouterError("No inbox path registered.");
1107
- }
1108
- return new URL(path, this.canonicalOrigin);
1109
- }
1110
- getFollowingUri(identifier) {
1111
- const path = this.federation.router.build("following", { identifier, handle: identifier });
1112
- if (path == null) {
1113
- throw new RouterError("No following collection path registered.");
1114
- }
1115
- return new URL(path, this.canonicalOrigin);
1116
- }
1117
- getFollowersUri(identifier) {
1118
- const path = this.federation.router.build("followers", { identifier, handle: identifier });
1119
- if (path == null) {
1120
- throw new RouterError("No followers collection path registered.");
1121
- }
1122
- return new URL(path, this.canonicalOrigin);
1123
- }
1124
- getLikedUri(identifier) {
1125
- const path = this.federation.router.build("liked", { identifier, handle: identifier });
1126
- if (path == null) {
1127
- throw new RouterError("No liked collection path registered.");
1128
- }
1129
- return new URL(path, this.canonicalOrigin);
1130
- }
1131
- getFeaturedUri(identifier) {
1132
- const path = this.federation.router.build("featured", { identifier, handle: identifier });
1133
- if (path == null) {
1134
- throw new RouterError("No featured collection path registered.");
1135
- }
1136
- return new URL(path, this.canonicalOrigin);
1137
- }
1138
- getFeaturedTagsUri(identifier) {
1139
- const path = this.federation.router.build("featuredTags", { identifier, handle: identifier });
1140
- if (path == null) {
1141
- throw new RouterError("No featured tags collection path registered.");
1142
- }
1143
- return new URL(path, this.canonicalOrigin);
1144
- }
1145
- parseUri(uri) {
1146
- if (uri == null)
1147
- return null;
1148
- if (uri.origin !== this.origin && uri.origin !== this.canonicalOrigin) {
1149
- return null;
1150
- }
1151
- const route = this.federation.router.route(uri.pathname);
1152
- const logger = getLogger(["fedify", "federation"]);
1153
- if (route == null)
1154
- return null;
1155
- else if (route.name === "sharedInbox") {
1156
- return {
1157
- type: "inbox",
1158
- identifier: undefined,
1159
- get handle() {
1160
- logger.warn("The ParseUriResult.handle property is deprecated; " +
1161
- "use ParseUriResult.identifier instead.");
1162
- return undefined;
1163
- },
1164
- };
1165
- }
1166
- const identifier = "identifier" in route.values
1167
- ? route.values.identifier
1168
- : route.values.handle;
1169
- if (route.name === "actor") {
1170
- return {
1171
- type: "actor",
1172
- identifier,
1173
- get handle() {
1174
- logger.warn("The ParseUriResult.handle property is deprecated; " +
1175
- "use ParseUriResult.identifier instead.");
1176
- return identifier;
1177
- },
1178
- };
1179
- }
1180
- else if (route.name.startsWith("object:")) {
1181
- const typeId = route.name.replace(/^object:/, "");
1182
- return {
1183
- type: "object",
1184
- class: this.federation.objectTypeIds[typeId],
1185
- typeId: new URL(typeId),
1186
- values: route.values,
1187
- };
1188
- }
1189
- else if (route.name === "inbox") {
1190
- return {
1191
- type: "inbox",
1192
- identifier,
1193
- get handle() {
1194
- logger.warn("The ParseUriResult.handle property is deprecated; " +
1195
- "use ParseUriResult.identifier instead.");
1196
- return identifier;
1197
- },
1198
- };
1199
- }
1200
- else if (route.name === "outbox") {
1201
- return {
1202
- type: "outbox",
1203
- identifier,
1204
- get handle() {
1205
- logger.warn("The ParseUriResult.handle property is deprecated; " +
1206
- "use ParseUriResult.identifier instead.");
1207
- return identifier;
1208
- },
1209
- };
1210
- }
1211
- else if (route.name === "following") {
1212
- return {
1213
- type: "following",
1214
- identifier,
1215
- get handle() {
1216
- logger.warn("The ParseUriResult.handle property is deprecated; " +
1217
- "use ParseUriResult.identifier instead.");
1218
- return identifier;
1219
- },
1220
- };
1221
- }
1222
- else if (route.name === "followers") {
1223
- return {
1224
- type: "followers",
1225
- identifier,
1226
- get handle() {
1227
- logger.warn("The ParseUriResult.handle property is deprecated; " +
1228
- "use ParseUriResult.identifier instead.");
1229
- return identifier;
1230
- },
1231
- };
1232
- }
1233
- else if (route.name === "liked") {
1234
- return {
1235
- type: "liked",
1236
- identifier,
1237
- get handle() {
1238
- logger.warn("The ParseUriResult.handle property is deprecated; " +
1239
- "use ParseUriResult.identifier instead.");
1240
- return identifier;
1241
- },
1242
- };
1243
- }
1244
- else if (route.name === "featured") {
1245
- return {
1246
- type: "featured",
1247
- identifier,
1248
- get handle() {
1249
- logger.warn("The ParseUriResult.handle property is deprecated; " +
1250
- "use ParseUriResult.identifier instead.");
1251
- return identifier;
1252
- },
1253
- };
1254
- }
1255
- else if (route.name === "featuredTags") {
1256
- return {
1257
- type: "featuredTags",
1258
- identifier,
1259
- get handle() {
1260
- logger.warn("The ParseUriResult.handle property is deprecated; " +
1261
- "use ParseUriResult.identifier instead.");
1262
- return identifier;
1263
- },
1264
- };
1265
- }
1266
- return null;
1267
- }
1268
- async getActorKeyPairs(identifier) {
1269
- const logger = getLogger(["fedify", "federation", "actor"]);
1270
- if (this.invokedFromActorKeyPairsDispatcher != null) {
1271
- logger.warn("Context.getActorKeyPairs({getActorKeyPairsIdentifier}) method is " +
1272
- "invoked from the actor key pairs dispatcher " +
1273
- "({actorKeyPairsDispatcherIdentifier}); this may cause " +
1274
- "an infinite loop.", {
1275
- getActorKeyPairsIdentifier: identifier,
1276
- actorKeyPairsDispatcherIdentifier: this.invokedFromActorKeyPairsDispatcher.identifier,
1277
- });
1278
- }
1279
- let keyPairs;
1280
- try {
1281
- keyPairs = await this.getKeyPairsFromIdentifier(identifier);
1282
- }
1283
- catch (_) {
1284
- logger.warn("No actor key pairs dispatcher registered.");
1285
- return [];
1286
- }
1287
- const owner = this.getActorUri(identifier);
1288
- const result = [];
1289
- for (const keyPair of keyPairs) {
1290
- const newPair = {
1291
- ...keyPair,
1292
- cryptographicKey: new CryptographicKey({
1293
- id: keyPair.keyId,
1294
- owner,
1295
- publicKey: keyPair.publicKey,
1296
- }),
1297
- multikey: new Multikey({
1298
- id: keyPair.keyId,
1299
- controller: owner,
1300
- publicKey: keyPair.publicKey,
1301
- }),
1302
- };
1303
- result.push(newPair);
1304
- }
1305
- return result;
1306
- }
1307
- async getKeyPairsFromIdentifier(identifier) {
1308
- const logger = getLogger(["fedify", "federation", "actor"]);
1309
- if (this.federation.actorCallbacks?.keyPairsDispatcher == null) {
1310
- throw new Error("No actor key pairs dispatcher registered.");
1311
- }
1312
- const path = this.federation.router.build("actor", { identifier, handle: identifier });
1313
- if (path == null) {
1314
- logger.warn("No actor dispatcher registered.");
1315
- return [];
1316
- }
1317
- const actorUri = new URL(path, this.canonicalOrigin);
1318
- const keyPairs = await this.federation.actorCallbacks?.keyPairsDispatcher(new ContextImpl({
1319
- ...this,
1320
- invokedFromActorKeyPairsDispatcher: { identifier },
1321
- }), identifier);
1322
- if (keyPairs.length < 1) {
1323
- logger.warn("No key pairs found for actor {identifier}.", { identifier });
1324
- }
1325
- let i = 0;
1326
- const result = [];
1327
- for (const keyPair of keyPairs) {
1328
- result.push({
1329
- ...keyPair,
1330
- keyId: new URL(
1331
- // For backwards compatibility, the first key is always the #main-key:
1332
- i == 0 ? `#main-key` : `#key-${i + 1}`, actorUri),
1333
- });
1334
- i++;
1335
- }
1336
- return result;
1337
- }
1338
- async getRsaKeyPairFromIdentifier(identifier) {
1339
- const keyPairs = await this.getKeyPairsFromIdentifier(identifier);
1340
- for (const keyPair of keyPairs) {
1341
- const { privateKey } = keyPair;
1342
- if (privateKey.algorithm.name === "RSASSA-PKCS1-v1_5" &&
1343
- privateKey.algorithm.hash
1344
- .name ===
1345
- "SHA-256") {
1346
- return keyPair;
1347
- }
1348
- }
1349
- getLogger(["fedify", "federation", "actor"]).warn("No RSA-PKCS#1-v1.5 SHA-256 key found for actor {identifier}.", { identifier });
1350
- return null;
1351
- }
1352
- getDocumentLoader(identity) {
1353
- if ("identifier" in identity || "username" in identity || "handle" in identity) {
1354
- let identifierPromise;
1355
- if ("username" in identity || "handle" in identity) {
1356
- let username;
1357
- if ("username" in identity) {
1358
- username = identity.username;
1359
- }
1360
- else {
1361
- username = identity.handle;
1362
- getLogger(["fedify", "runtime", "docloader"]).warn('The "handle" property is deprecated; use "identifier" or ' +
1363
- '"username" instead.', { identity });
1364
- }
1365
- const mapper = this.federation.actorCallbacks?.handleMapper;
1366
- if (mapper == null) {
1367
- identifierPromise = Promise.resolve(username);
1368
- }
1369
- else {
1370
- const identifier = mapper(this, username);
1371
- identifierPromise = identifier instanceof Promise
1372
- ? identifier
1373
- : Promise.resolve(identifier);
1374
- }
1375
- }
1376
- else {
1377
- identifierPromise = Promise.resolve(identity.identifier);
1378
- }
1379
- return identifierPromise.then((identifier) => {
1380
- if (identifier == null)
1381
- return this.documentLoader;
1382
- const keyPair = this.getRsaKeyPairFromIdentifier(identifier);
1383
- return keyPair.then((pair) => pair == null
1384
- ? this.documentLoader
1385
- : this.federation.authenticatedDocumentLoaderFactory(pair));
1386
- });
1387
- }
1388
- return this.federation.authenticatedDocumentLoaderFactory(identity);
1389
- }
1390
- lookupObject(identifier, options = {}) {
1391
- return lookupObject(identifier, {
1392
- ...options,
1393
- documentLoader: options.documentLoader ?? this.documentLoader,
1394
- contextLoader: options.contextLoader ?? this.contextLoader,
1395
- userAgent: options.userAgent ?? this.federation.userAgent,
1396
- tracerProvider: options.tracerProvider ?? this.tracerProvider,
1397
- // @ts-ignore: `allowPrivateAddress` is not in the type definition.
1398
- allowPrivateAddress: this.federation.allowPrivateAddress,
1399
- });
1400
- }
1401
- traverseCollection(collection, options = {}) {
1402
- return traverseCollection(collection, {
1403
- ...options,
1404
- documentLoader: options.documentLoader ?? this.documentLoader,
1405
- contextLoader: options.contextLoader ?? this.contextLoader,
1406
- });
1407
- }
1408
- lookupNodeInfo(url, options = {}) {
1409
- return options.parse === "none"
1410
- ? getNodeInfo(url, {
1411
- parse: "none",
1412
- direct: options.direct,
1413
- userAgent: options?.userAgent ?? this.federation.userAgent,
1414
- })
1415
- : getNodeInfo(url, {
1416
- parse: options.parse,
1417
- direct: options.direct,
1418
- userAgent: options?.userAgent ?? this.federation.userAgent,
1419
- });
1420
- }
1421
- lookupWebFinger(resource, options = {}) {
1422
- return lookupWebFinger(resource, {
1423
- ...options,
1424
- userAgent: options.userAgent ?? this.federation.userAgent,
1425
- tracerProvider: options.tracerProvider ?? this.tracerProvider,
1426
- allowPrivateAddress: this.federation.allowPrivateAddress,
1427
- });
1428
- }
1429
- sendActivity(sender, recipients, activity, options = {}) {
1430
- const tracer = this.tracerProvider.getTracer(metadata.name, metadata.version);
1431
- return tracer.startActiveSpan(this.federation.outboxQueue == null || options.immediate
1432
- ? "activitypub.outbox"
1433
- : "activitypub.fanout", {
1434
- kind: this.federation.outboxQueue == null || options.immediate
1435
- ? SpanKind.CLIENT
1436
- : SpanKind.PRODUCER,
1437
- attributes: {
1438
- "activitypub.activity.type": getTypeId(activity).href,
1439
- "activitypub.activity.to": activity.toIds.map((to) => to.href),
1440
- "activitypub.activity.cc": activity.toIds.map((cc) => cc.href),
1441
- "activitypub.activity.bto": activity.btoIds.map((bto) => bto.href),
1442
- "activitypub.activity.bcc": activity.toIds.map((bcc) => bcc.href),
1443
- },
1444
- }, async (span) => {
1445
- try {
1446
- if (activity.id != null) {
1447
- span.setAttribute("activitypub.activity.id", activity.id.href);
1448
- }
1449
- await this.sendActivityInternal(sender, recipients, activity, options, span);
1450
- }
1451
- catch (e) {
1452
- span.setStatus({ code: SpanStatusCode.ERROR, message: String(e) });
1453
- throw e;
1454
- }
1455
- finally {
1456
- span.end();
1457
- }
1458
- });
1459
- }
1460
- async sendActivityInternal(sender, recipients, activity, options, span) {
1461
- const logger = getLogger(["fedify", "federation", "outbox"]);
1462
- let keys;
1463
- let identifier = null;
1464
- if ("identifier" in sender || "username" in sender || "handle" in sender) {
1465
- if ("identifier" in sender) {
1466
- identifier = sender.identifier;
1467
- }
1468
- else {
1469
- let username;
1470
- if ("username" in sender) {
1471
- username = sender.username;
1472
- }
1473
- else {
1474
- username = sender.handle;
1475
- logger.warn('The "handle" property for the sender parameter is deprecated; ' +
1476
- 'use "identifier" or "username" instead.', { sender });
1477
- }
1478
- if (this.federation.actorCallbacks?.handleMapper == null) {
1479
- identifier = username;
1480
- }
1481
- else {
1482
- const mapped = await this.federation.actorCallbacks.handleMapper(this, username);
1483
- if (mapped == null) {
1484
- throw new Error(`No actor found for the given username ${JSON.stringify(username)}.`);
1485
- }
1486
- identifier = mapped;
1487
- }
1488
- }
1489
- span.setAttribute("fedify.actor.identifier", identifier);
1490
- keys = await this.getKeyPairsFromIdentifier(identifier);
1491
- if (keys.length < 1) {
1492
- throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
1493
- }
1494
- }
1495
- else if (Array.isArray(sender)) {
1496
- if (sender.length < 1) {
1497
- throw new Error("The sender's key pairs are empty.");
1498
- }
1499
- keys = sender;
1500
- }
1501
- else {
1502
- keys = [sender];
1503
- }
1504
- if (keys.length < 1) {
1505
- throw new TypeError("The sender's keys must not be empty.");
1506
- }
1507
- for (const { privateKey } of keys) {
1508
- validateCryptoKey(privateKey, "private");
1509
- }
1510
- const opts = { context: this };
1511
- let expandedRecipients;
1512
- if (Array.isArray(recipients)) {
1513
- expandedRecipients = recipients;
1514
- }
1515
- else if (recipients === "followers") {
1516
- if (identifier == null) {
1517
- throw new Error('If recipients is "followers", ' +
1518
- "sender must be an actor identifier or username.");
1519
- }
1520
- expandedRecipients = [];
1521
- for await (const recipient of this.getFollowers(identifier)) {
1522
- expandedRecipients.push(recipient);
1523
- }
1524
- if (options.syncCollection) {
1525
- const collectionId = this.federation.router.build("followers", { identifier, handle: identifier });
1526
- opts.collectionSync = collectionId == null
1527
- ? undefined
1528
- : new URL(collectionId, this.canonicalOrigin).href;
1529
- }
1530
- }
1531
- else {
1532
- expandedRecipients = [recipients];
1533
- }
1534
- span.setAttribute("activitypub.inboxes", expandedRecipients.length);
1535
- for (const activityTransformer of this.federation.activityTransformers) {
1536
- activity = activityTransformer(activity, this);
1537
- }
1538
- span?.setAttribute("activitypub.activity.id", activity?.id?.href ?? "");
1539
- if (activity.actorId == null) {
1540
- logger.error("Activity {activityId} to send does not have an actor.", { activity, activityId: activity?.id?.href });
1541
- throw new TypeError("The activity to send must have at least one actor property.");
1542
- }
1543
- const inboxes = extractInboxes({
1544
- recipients: expandedRecipients,
1545
- preferSharedInbox: options.preferSharedInbox,
1546
- excludeBaseUris: options.excludeBaseUris,
1547
- });
1548
- logger.debug("Sending activity {activityId} to inboxes:\n{inboxes}", {
1549
- inboxes: globalThis.Object.keys(inboxes),
1550
- activityId: activity.id?.href,
1551
- activity,
1552
- });
1553
- if (this.federation.fanoutQueue == null || options.immediate ||
1554
- options.fanout === "skip" || (options.fanout ?? "auto") === "auto" &&
1555
- globalThis.Object.keys(inboxes).length < FANOUT_THRESHOLD) {
1556
- await this.federation.sendActivity(keys, inboxes, activity, opts);
1557
- return;
1558
- }
1559
- const keyJwkPairs = await Promise.all(keys.map(async ({ keyId, privateKey }) => ({
1560
- keyId: keyId.href,
1561
- privateKey: await exportJwk(privateKey),
1562
- })));
1563
- const carrier = {};
1564
- propagation.inject(context.active(), carrier);
1565
- const message = {
1566
- type: "fanout",
1567
- id: dntShim.crypto.randomUUID(),
1568
- baseUrl: this.origin,
1569
- keys: keyJwkPairs,
1570
- inboxes: globalThis.Object.fromEntries(globalThis.Object.entries(inboxes).map(([k, { actorIds, sharedInbox }]) => [k, { actorIds: [...actorIds], sharedInbox }])),
1571
- activity: await activity.toJsonLd({
1572
- format: "compact",
1573
- contextLoader: this.contextLoader,
1574
- }),
1575
- activityId: activity.id?.href,
1576
- activityType: getTypeId(activity).href,
1577
- collectionSync: opts.collectionSync,
1578
- traceContext: carrier,
1579
- };
1580
- if (!this.federation.manuallyStartQueue) {
1581
- this.federation._startQueueInternal(this.data);
1582
- }
1583
- this.federation.fanoutQueue.enqueue(message);
1584
- }
1585
- async *getFollowers(identifier) {
1586
- if (this.federation.followersCallbacks == null) {
1587
- throw new Error("No followers collection dispatcher registered.");
1588
- }
1589
- const result = await this.federation.followersCallbacks.dispatcher(this, identifier, null);
1590
- if (result != null) {
1591
- for (const recipient of result.items)
1592
- yield recipient;
1593
- return;
1594
- }
1595
- if (this.federation.followersCallbacks.firstCursor == null) {
1596
- throw new Error("No first cursor dispatcher registered for followers collection.");
1597
- }
1598
- let cursor = await this.federation.followersCallbacks.firstCursor(this, identifier);
1599
- if (cursor != null) {
1600
- getLogger(["fedify", "federation", "outbox"]).warn("Since the followers collection dispatcher returned null for no " +
1601
- "cursor (i.e., one-shot dispatcher), the pagination is used to fetch " +
1602
- '"followers". However, it is recommended to implement the one-shot ' +
1603
- "dispatcher for better performance.", { identifier });
1604
- }
1605
- while (cursor != null) {
1606
- const result = await this.federation.followersCallbacks.dispatcher(this, identifier, cursor);
1607
- if (result == null)
1608
- break;
1609
- for (const recipient of result.items)
1610
- yield recipient;
1611
- cursor = result.nextCursor ?? null;
1612
- }
1613
- }
1614
- routeActivity(recipient, activity, options = {}) {
1615
- const tracerProvider = this.tracerProvider ?? this.tracerProvider;
1616
- const tracer = tracerProvider.getTracer(metadata.name, metadata.version);
1617
- return tracer.startActiveSpan("activitypub.inbox", {
1618
- kind: this.federation.inboxQueue == null || options.immediate
1619
- ? SpanKind.INTERNAL
1620
- : SpanKind.PRODUCER,
1621
- attributes: {
1622
- "activitypub.activity.type": getTypeId(activity).href,
1623
- },
1624
- }, async (span) => {
1625
- if (activity.id != null) {
1626
- span.setAttribute("activitypub.activity.id", activity.id.href);
1627
- }
1628
- if (activity.toIds.length > 0) {
1629
- span.setAttribute("activitypub.activity.to", activity.toIds.map((to) => to.href));
1630
- }
1631
- if (activity.ccIds.length > 0) {
1632
- span.setAttribute("activitypub.activity.cc", activity.ccIds.map((cc) => cc.href));
1633
- }
1634
- if (activity.btoIds.length > 0) {
1635
- span.setAttribute("activitypub.activity.bto", activity.btoIds.map((bto) => bto.href));
1636
- }
1637
- if (activity.bccIds.length > 0) {
1638
- span.setAttribute("activitypub.activity.bcc", activity.bccIds.map((bcc) => bcc.href));
1639
- }
1640
- try {
1641
- const ok = await this.routeActivityInternal(recipient, activity, options, span);
1642
- if (ok) {
1643
- span.setAttribute("activitypub.shared_inbox", recipient == null);
1644
- if (recipient != null) {
1645
- span.setAttribute("fedify.inbox.recipient", recipient);
1646
- }
1647
- }
1648
- else {
1649
- span.setStatus({ code: SpanStatusCode.ERROR });
1650
- }
1651
- return ok;
1652
- }
1653
- catch (e) {
1654
- span.setStatus({ code: SpanStatusCode.ERROR, message: String(e) });
1655
- throw e;
1656
- }
1657
- finally {
1658
- span.end();
1659
- }
1660
- });
1661
- }
1662
- async routeActivityInternal(recipient, activity, options = {}, span) {
1663
- const logger = getLogger(["fedify", "federation", "inbox"]);
1664
- const contextLoader = options.contextLoader ?? this.contextLoader;
1665
- const json = await activity.toJsonLd({ contextLoader });
1666
- const keyCache = new KvKeyCache(this.federation.kv, this.federation.kvPrefixes.publicKey, this);
1667
- const verified = await verifyObject(Activity, json, {
1668
- contextLoader,
1669
- documentLoader: options.documentLoader ?? this.documentLoader,
1670
- tracerProvider: options.tracerProvider ?? this.tracerProvider,
1671
- keyCache,
1672
- });
1673
- if (verified == null) {
1674
- logger.debug("Object Integrity Proofs are not verified.", { recipient, activity: json });
1675
- if (activity.id == null) {
1676
- logger.debug("Activity is missing an ID; unable to fetch.", { recipient, activity: json });
1677
- return false;
1678
- }
1679
- const fetched = await this.lookupObject(activity.id, options);
1680
- if (fetched == null) {
1681
- logger.debug("Failed to fetch the remote activity object {activityId}.", { recipient, activity: json, activityId: activity.id.href });
1682
- return false;
1683
- }
1684
- else if (!(fetched instanceof Activity)) {
1685
- logger.debug("Fetched object is not an Activity.", { recipient, activity: await fetched.toJsonLd({ contextLoader }) });
1686
- return false;
1687
- }
1688
- else if (fetched.id?.href !== activity.id.href) {
1689
- logger.debug("Fetched activity object has a different ID; failed to verify.", { recipient, activity: await fetched.toJsonLd({ contextLoader }) });
1690
- return false;
1691
- }
1692
- else if (fetched.actorIds.length < 1) {
1693
- logger.debug("Fetched activity object is missing an actor; unable to verify.", { recipient, activity: await fetched.toJsonLd({ contextLoader }) });
1694
- return false;
1695
- }
1696
- const activityId = fetched.id;
1697
- if (!fetched.actorIds.every((actor) => actor.origin === activityId.origin)) {
1698
- logger.debug("Fetched activity object has actors from different origins; " +
1699
- "unable to verify.", { recipient, activity: await fetched.toJsonLd({ contextLoader }) });
1700
- return false;
1701
- }
1702
- logger.debug("Successfully fetched the remote activity object {activityId}; " +
1703
- "ignore the original activity and use the fetched one, which is trustworthy.");
1704
- activity = fetched;
1705
- }
1706
- else {
1707
- logger.debug("Object Integrity Proofs are verified.", { recipient, activity: json });
1708
- }
1709
- const routeResult = await routeActivity({
1710
- context: this,
1711
- json,
1712
- activity,
1713
- recipient,
1714
- inboxListeners: this.federation.inboxListeners,
1715
- inboxContextFactory: this.toInboxContext.bind(this),
1716
- inboxErrorHandler: this.federation.inboxErrorHandler,
1717
- kv: this.federation.kv,
1718
- kvPrefixes: this.federation.kvPrefixes,
1719
- queue: this.federation.inboxQueue,
1720
- span,
1721
- tracerProvider: options.tracerProvider ?? this.tracerProvider,
1722
- });
1723
- return routeResult === "alreadyProcessed" || routeResult === "enqueued" ||
1724
- routeResult === "unsupportedActivity" || routeResult === "success";
1725
- }
1726
- }
1727
- class RequestContextImpl extends ContextImpl {
1728
- #invokedFromActorDispatcher;
1729
- #invokedFromObjectDispatcher;
1730
- request;
1731
- url;
1732
- constructor(options) {
1733
- super(options);
1734
- this.#invokedFromActorDispatcher = options.invokedFromActorDispatcher;
1735
- this.#invokedFromObjectDispatcher = options.invokedFromObjectDispatcher;
1736
- this.request = options.request;
1737
- this.url = options.url;
1738
- }
1739
- async getActor(identifier) {
1740
- if (this.federation.actorCallbacks == null ||
1741
- this.federation.actorCallbacks.dispatcher == null) {
1742
- throw new Error("No actor dispatcher registered.");
1743
- }
1744
- if (this.#invokedFromActorDispatcher != null) {
1745
- getLogger(["fedify", "federation", "actor"]).warn("RequestContext.getActor({getActorIdentifier}) is invoked from " +
1746
- "the actor dispatcher ({actorDispatcherIdentifier}); " +
1747
- "this may cause an infinite loop.", {
1748
- getActorIdentifier: identifier,
1749
- actorDispatcherIdentifier: this.#invokedFromActorDispatcher.identifier,
1750
- });
1751
- }
1752
- return await this.federation.actorCallbacks.dispatcher(new RequestContextImpl({
1753
- ...this,
1754
- invokedFromActorDispatcher: { identifier },
1755
- }), identifier);
1756
- }
1757
- async getObject(
1758
- // deno-lint-ignore no-explicit-any
1759
- cls, values) {
1760
- const callbacks = this.federation.objectCallbacks[cls.typeId.href];
1761
- if (callbacks == null) {
1762
- throw new Error("No object dispatcher registered.");
1763
- }
1764
- for (const param of callbacks.parameters) {
1765
- if (!(param in values)) {
1766
- throw new TypeError(`Missing parameter: ${param}`);
1767
- }
1768
- }
1769
- if (this.#invokedFromObjectDispatcher != null) {
1770
- getLogger(["fedify", "federation"]).warn("RequestContext.getObject({getObjectClass}, " +
1771
- "{getObjectValues}) is invoked from the object dispatcher " +
1772
- "({actorDispatcherClass}, {actorDispatcherValues}); " +
1773
- "this may cause an infinite loop.", {
1774
- getObjectClass: cls.name,
1775
- getObjectValues: values,
1776
- actorDispatcherClass: this.#invokedFromObjectDispatcher.cls.name,
1777
- actorDispatcherValues: this.#invokedFromObjectDispatcher.values,
1778
- });
1779
- }
1780
- return await callbacks.dispatcher(new RequestContextImpl({
1781
- ...this,
1782
- invokedFromObjectDispatcher: { cls, values },
1783
- }), values);
1784
- }
1785
- #signedKey = undefined;
1786
- async getSignedKey(options = {}) {
1787
- if (this.#signedKey != null)
1788
- return this.#signedKey;
1789
- return this.#signedKey = await verifyRequest(this.request, {
1790
- ...this,
1791
- contextLoader: options.contextLoader ?? this.contextLoader,
1792
- documentLoader: options.documentLoader ?? this.documentLoader,
1793
- timeWindow: this.federation.signatureTimeWindow,
1794
- tracerProvider: options.tracerProvider ?? this.tracerProvider,
1795
- });
1796
- }
1797
- #signedKeyOwner = undefined;
1798
- async getSignedKeyOwner(options = {}) {
1799
- if (this.#signedKeyOwner != null)
1800
- return this.#signedKeyOwner;
1801
- const key = await this.getSignedKey(options);
1802
- if (key == null)
1803
- return this.#signedKeyOwner = null;
1804
- return this.#signedKeyOwner = await getKeyOwner(key, {
1805
- contextLoader: options.contextLoader ?? this.contextLoader,
1806
- documentLoader: options.documentLoader ?? this.documentLoader,
1807
- tracerProvider: options.tracerProvider ?? this.tracerProvider,
1808
- });
1809
- }
1810
- }
1811
- export class InboxContextImpl extends ContextImpl {
1812
- recipient;
1813
- activity;
1814
- activityId;
1815
- activityType;
1816
- constructor(recipient, activity, activityId, activityType, options) {
1817
- super(options);
1818
- this.recipient = recipient;
1819
- this.activity = activity;
1820
- this.activityId = activityId;
1821
- this.activityType = activityType;
1822
- }
1823
- forwardActivity(forwarder, recipients, options) {
1824
- const tracer = this.tracerProvider.getTracer(metadata.name, metadata.version);
1825
- return tracer.startActiveSpan("activitypub.outbox", {
1826
- kind: this.federation.outboxQueue == null || options?.immediate
1827
- ? SpanKind.CLIENT
1828
- : SpanKind.PRODUCER,
1829
- attributes: { "activitypub.activity.type": this.activityType },
1830
- }, async (span) => {
1831
- try {
1832
- if (this.activityId != null) {
1833
- span.setAttribute("activitypub.activity.id", this.activityId);
1834
- }
1835
- await this.forwardActivityInternal(forwarder, recipients, options);
1836
- }
1837
- catch (e) {
1838
- span.setStatus({ code: SpanStatusCode.ERROR, message: String(e) });
1839
- throw e;
1840
- }
1841
- finally {
1842
- span.end();
1843
- }
1844
- });
1845
- }
1846
- async forwardActivityInternal(forwarder, recipients, options) {
1847
- const logger = getLogger(["fedify", "federation", "inbox"]);
1848
- let keys;
1849
- let identifier = null;
1850
- if ("identifier" in forwarder || "username" in forwarder ||
1851
- "handle" in forwarder) {
1852
- if ("identifier" in forwarder) {
1853
- identifier = forwarder.identifier;
1854
- }
1855
- else {
1856
- let username;
1857
- if ("username" in forwarder) {
1858
- username = forwarder.username;
1859
- }
1860
- else {
1861
- username = forwarder.handle;
1862
- logger.warn('The "handle" property for the forwarder parameter is deprecated; ' +
1863
- 'use "identifier" or "username" instead.', { forwarder });
1864
- }
1865
- if (this.federation.actorCallbacks?.handleMapper == null) {
1866
- identifier = username;
1867
- }
1868
- else {
1869
- const mapped = await this.federation.actorCallbacks.handleMapper(this, username);
1870
- if (mapped == null) {
1871
- throw new Error(`No actor found for the given username ${JSON.stringify(username)}.`);
1872
- }
1873
- identifier = mapped;
1874
- }
1875
- }
1876
- keys = await this.getKeyPairsFromIdentifier(identifier);
1877
- if (keys.length < 1) {
1878
- throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
1879
- }
1880
- }
1881
- else if (Array.isArray(forwarder)) {
1882
- if (forwarder.length < 1) {
1883
- throw new Error("The forwarder's key pairs are empty.");
1884
- }
1885
- keys = forwarder;
1886
- }
1887
- else {
1888
- keys = [forwarder];
1889
- }
1890
- if (!hasSignature(this.activity)) {
1891
- let hasProof;
1892
- try {
1893
- const activity = await Activity.fromJsonLd(this.activity, this);
1894
- hasProof = await activity.getProof() != null;
1895
- }
1896
- catch {
1897
- hasProof = false;
1898
- }
1899
- if (!hasProof) {
1900
- if (options?.skipIfUnsigned)
1901
- return;
1902
- logger.warn("The received activity {activityId} is not signed; even if it is " +
1903
- "forwarded to other servers as is, it may not be accepted by " +
1904
- "them due to the lack of a signature/proof.");
1905
- }
1906
- }
1907
- if (recipients === "followers") {
1908
- if (identifier == null) {
1909
- throw new Error('If recipients is "followers", ' +
1910
- "forwarder must be an actor identifier or username.");
1911
- }
1912
- const followers = [];
1913
- for await (const recipient of this.getFollowers(identifier)) {
1914
- followers.push(recipient);
1915
- }
1916
- recipients = followers;
1917
- }
1918
- const inboxes = extractInboxes({
1919
- recipients: Array.isArray(recipients) ? recipients : [recipients],
1920
- preferSharedInbox: options?.preferSharedInbox,
1921
- excludeBaseUris: options?.excludeBaseUris,
1922
- });
1923
- logger.debug("Forwarding activity {activityId} to inboxes:\n{inboxes}", {
1924
- inboxes: globalThis.Object.keys(inboxes),
1925
- activityId: this.activityId,
1926
- activity: this.activity,
1927
- });
1928
- if (options?.immediate || this.federation.outboxQueue == null) {
1929
- if (options?.immediate) {
1930
- logger.debug("Forwarding activity immediately without queue since immediate " +
1931
- "option is set.");
1932
- }
1933
- else {
1934
- logger.debug("Forwarding activity immediately without queue since queue is not " +
1935
- "set.");
1936
- }
1937
- const promises = [];
1938
- for (const inbox in inboxes) {
1939
- promises.push(sendActivity({
1940
- keys,
1941
- activity: this.activity,
1942
- activityId: this.activityId,
1943
- activityType: this.activityType,
1944
- inbox: new URL(inbox),
1945
- sharedInbox: inboxes[inbox].sharedInbox,
1946
- tracerProvider: this.tracerProvider,
1947
- specDeterminer: new KvSpecDeterminer(this.federation.kv, this.federation.kvPrefixes.httpMessageSignaturesSpec),
1948
- }));
1949
- }
1950
- await Promise.all(promises);
1951
- return;
1952
- }
1953
- logger.debug("Enqueuing activity {activityId} to forward later.", { activityId: this.activityId, activity: this.activity });
1954
- const keyJwkPairs = [];
1955
- for (const { keyId, privateKey } of keys) {
1956
- const privateKeyJwk = await exportJwk(privateKey);
1957
- keyJwkPairs.push({ keyId: keyId.href, privateKey: privateKeyJwk });
1958
- }
1959
- const carrier = {};
1960
- propagation.inject(context.active(), carrier);
1961
- const messages = [];
1962
- for (const inbox in inboxes) {
1963
- const message = {
1964
- type: "outbox",
1965
- id: dntShim.crypto.randomUUID(),
1966
- baseUrl: this.origin,
1967
- keys: keyJwkPairs,
1968
- activity: this.activity,
1969
- activityId: this.activityId,
1970
- activityType: this.activityType,
1971
- inbox,
1972
- sharedInbox: inboxes[inbox].sharedInbox,
1973
- started: new Date().toISOString(),
1974
- attempt: 0,
1975
- headers: {},
1976
- traceContext: carrier,
1977
- };
1978
- messages.push(message);
1979
- }
1980
- const { outboxQueue } = this.federation;
1981
- if (outboxQueue.enqueueMany == null) {
1982
- const promises = messages.map((m) => outboxQueue.enqueue(m));
1983
- const results = await Promise.allSettled(promises);
1984
- const errors = results
1985
- .filter((r) => r.status === "rejected")
1986
- .map((r) => r.reason);
1987
- if (errors.length > 0) {
1988
- logger.error("Failed to enqueue activity {activityId} to forward later:\n{errors}", { activityId: this.activityId, errors });
1989
- if (errors.length > 1) {
1990
- throw new AggregateError(errors, `Failed to enqueue activity ${this.activityId} to forward later.`);
1991
- }
1992
- throw errors[0];
1993
- }
1994
- }
1995
- else {
1996
- try {
1997
- await outboxQueue.enqueueMany(messages);
1998
- }
1999
- catch (error) {
2000
- logger.error("Failed to enqueue activity {activityId} to forward later:\n{error}", { activityId: this.activityId, error });
2001
- throw error;
2002
- }
2003
- }
2004
- }
2005
- }
2006
- export class KvSpecDeterminer {
2007
- kv;
2008
- prefix;
2009
- defaultSpec;
2010
- constructor(kv, prefix, defaultSpec = "rfc9421") {
2011
- this.kv = kv;
2012
- this.prefix = prefix;
2013
- this.defaultSpec = defaultSpec;
2014
- }
2015
- async determineSpec(origin) {
2016
- return await this.kv.get([
2017
- ...this.prefix,
2018
- origin,
2019
- ]) ?? this.defaultSpec;
2020
- }
2021
- async rememberSpec(origin, spec) {
2022
- await this.kv.set([...this.prefix, origin], spec);
2023
- }
2024
- }
2025
- function notFound(_request) {
2026
- return new Response("Not Found", { status: 404 });
2027
- }
2028
- function notAcceptable(_request) {
2029
- return new Response("Not Acceptable", {
2030
- status: 406,
2031
- headers: {
2032
- Vary: "Accept, Signature",
2033
- },
2034
- });
2035
- }
2036
- function unauthorized(_request) {
2037
- return new Response("Unauthorized", {
2038
- status: 401,
2039
- headers: {
2040
- Vary: "Accept, Signature",
2041
- },
2042
- });
2043
- }
2044
- /**
2045
- * Generates or extracts a unique identifier for a request.
2046
- *
2047
- * This function first attempts to extract an existing request ID from standard
2048
- * tracing headers. If none exists, it generates a new one. The ID format is:
2049
- *
2050
- * - If from headers, uses the existing ID.
2051
- * - If generated, uses format `req_` followed by a base36 timestamp and
2052
- * 6 random chars.
2053
- *
2054
- * @param request The incoming HTTP request.
2055
- * @returns A string identifier unique to this request.
2056
- */
2057
- function getRequestId(request) {
2058
- // First try to get existing trace ID from standard headers:
2059
- const traceId = request.headers.get("X-Request-Id") ||
2060
- request.headers.get("X-Correlation-Id") ||
2061
- request.headers.get("Traceparent")?.split("-")[1];
2062
- if (traceId != null)
2063
- return traceId;
2064
- // Generate new ID if none exists:
2065
- // - Use timestamp for rough chronological ordering
2066
- // - Add random suffix for uniqueness within same millisecond
2067
- // - Prefix to distinguish from potential existing IDs
2068
- const timestamp = Date.now().toString(36);
2069
- const random = Math.random().toString(36).slice(2, 8);
2070
- return `req_${timestamp}${random}`;
2071
- }