@fedify/fedify 0.8.0-dev.152 → 0.8.0-dev.154

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of @fedify/fedify might be problematic. Click here for more details.

Files changed (407) hide show
  1. package/CHANGES.md +1 -0
  2. package/esm/deps/jsr.io/@std/bytes/{0.220.1 → 0.224.0}/concat.js +12 -8
  3. package/esm/deps/jsr.io/@std/bytes/0.224.0/copy.js +48 -0
  4. package/esm/deps/jsr.io/@std/bytes/0.224.0/ends_with.js +32 -0
  5. package/esm/deps/jsr.io/@std/bytes/0.224.0/equals.js +81 -0
  6. package/esm/deps/jsr.io/@std/bytes/0.224.0/includes_needle.js +39 -0
  7. package/esm/deps/jsr.io/@std/bytes/0.224.0/index_of_needle.js +66 -0
  8. package/esm/deps/jsr.io/@std/bytes/0.224.0/last_index_of_needle.js +63 -0
  9. package/esm/deps/jsr.io/@std/bytes/0.224.0/mod.js +151 -0
  10. package/esm/deps/jsr.io/@std/bytes/0.224.0/repeat.js +36 -0
  11. package/esm/deps/jsr.io/@std/bytes/0.224.0/starts_with.js +30 -0
  12. package/esm/deps/jsr.io/@std/encoding/{0.220.1 → 0.224.0}/base64.js +19 -2
  13. package/esm/deps/jsr.io/@std/encoding/{0.220.1 → 0.224.0}/hex.js +2 -7
  14. package/esm/deps/jsr.io/@std/semver/{0.220.1/test_range.js → 0.224.0/_test_comparator_set.js} +5 -16
  15. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/can_parse.js +1 -0
  16. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/constants.js +0 -2
  17. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/equals.js +1 -0
  18. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/format.js +2 -3
  19. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/format_range.js +3 -2
  20. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/greater_than.js +1 -0
  21. package/esm/deps/jsr.io/@std/semver/0.224.0/greater_than_range.js +39 -0
  22. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/increment.js +1 -0
  23. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/is_range.js +2 -2
  24. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/is_semver.js +1 -0
  25. package/esm/deps/jsr.io/@std/semver/0.224.0/less_than_range.js +39 -0
  26. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/max_satisfying.js +2 -2
  27. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/min_satisfying.js +2 -2
  28. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/mod.js +3 -0
  29. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/parse_range.js +2 -1
  30. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/range_intersects.js +4 -3
  31. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/range_max.js +13 -5
  32. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/range_min.js +13 -5
  33. package/esm/deps/jsr.io/@std/semver/0.224.0/satisfies.js +11 -0
  34. package/esm/deps/jsr.io/@std/semver/0.224.0/test_range.js +13 -0
  35. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/try_parse_range.js +1 -0
  36. package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/types.js +1 -0
  37. package/esm/federation/collection.js +1 -1
  38. package/esm/federation/handler.js +1 -1
  39. package/esm/federation/send.js +7 -1
  40. package/esm/httpsig/mod.js +74 -17
  41. package/esm/nodeinfo/types.js +1 -1
  42. package/esm/runtime/docloader.js +1 -1
  43. package/esm/runtime/key.js +1 -1
  44. package/package.json +2 -2
  45. package/types/deps/jsr.io/@std/assert/0.224.0/_constants.d.ts.map +1 -0
  46. package/types/deps/jsr.io/@std/assert/0.224.0/assert.d.ts.map +1 -0
  47. package/types/deps/jsr.io/@std/assert/0.224.0/assert_almost_equals.d.ts.map +1 -0
  48. package/types/deps/jsr.io/@std/assert/0.224.0/assert_array_includes.d.ts.map +1 -0
  49. package/types/deps/jsr.io/@std/assert/0.224.0/assert_equals.d.ts.map +1 -0
  50. package/types/deps/jsr.io/@std/assert/0.224.0/assert_exists.d.ts.map +1 -0
  51. package/types/deps/jsr.io/@std/assert/0.224.0/assert_false.d.ts.map +1 -0
  52. package/types/deps/jsr.io/@std/assert/0.224.0/assert_greater.d.ts.map +1 -0
  53. package/types/deps/jsr.io/@std/assert/0.224.0/assert_greater_or_equal.d.ts.map +1 -0
  54. package/types/deps/jsr.io/@std/assert/0.224.0/assert_instance_of.d.ts.map +1 -0
  55. package/types/deps/jsr.io/@std/assert/0.224.0/assert_is_error.d.ts.map +1 -0
  56. package/types/deps/jsr.io/@std/assert/0.224.0/assert_less.d.ts.map +1 -0
  57. package/types/deps/jsr.io/@std/assert/0.224.0/assert_less_or_equal.d.ts.map +1 -0
  58. package/types/deps/jsr.io/@std/assert/0.224.0/assert_match.d.ts.map +1 -0
  59. package/types/deps/jsr.io/@std/assert/0.224.0/assert_not_equals.d.ts.map +1 -0
  60. package/types/deps/jsr.io/@std/assert/0.224.0/assert_not_instance_of.d.ts.map +1 -0
  61. package/types/deps/jsr.io/@std/assert/0.224.0/assert_not_match.d.ts.map +1 -0
  62. package/types/deps/jsr.io/@std/assert/0.224.0/assert_not_strict_equals.d.ts.map +1 -0
  63. package/types/deps/jsr.io/@std/assert/0.224.0/assert_object_match.d.ts.map +1 -0
  64. package/types/deps/jsr.io/@std/assert/0.224.0/assert_rejects.d.ts.map +1 -0
  65. package/types/deps/jsr.io/@std/assert/0.224.0/assert_strict_equals.d.ts.map +1 -0
  66. package/types/deps/jsr.io/@std/assert/0.224.0/assert_string_includes.d.ts.map +1 -0
  67. package/types/deps/jsr.io/@std/assert/0.224.0/assert_throws.d.ts.map +1 -0
  68. package/types/deps/jsr.io/@std/assert/0.224.0/assertion_error.d.ts.map +1 -0
  69. package/types/deps/jsr.io/@std/assert/0.224.0/equal.d.ts.map +1 -0
  70. package/types/deps/jsr.io/@std/assert/0.224.0/fail.d.ts.map +1 -0
  71. package/types/deps/jsr.io/@std/assert/0.224.0/mod.d.ts.map +1 -0
  72. package/types/deps/jsr.io/@std/assert/0.224.0/unimplemented.d.ts.map +1 -0
  73. package/types/deps/jsr.io/@std/assert/0.224.0/unreachable.d.ts.map +1 -0
  74. package/types/deps/jsr.io/@std/async/{0.220.1 → 0.224.0}/delay.d.ts.map +1 -1
  75. package/types/deps/jsr.io/@std/bytes/0.224.0/concat.d.ts +18 -0
  76. package/types/deps/jsr.io/@std/bytes/0.224.0/concat.d.ts.map +1 -0
  77. package/types/deps/jsr.io/@std/bytes/0.224.0/copy.d.ts +39 -0
  78. package/types/deps/jsr.io/@std/bytes/0.224.0/copy.d.ts.map +1 -0
  79. package/types/deps/jsr.io/@std/bytes/0.224.0/ends_with.d.ts +23 -0
  80. package/types/deps/jsr.io/@std/bytes/0.224.0/ends_with.d.ts.map +1 -0
  81. package/types/deps/jsr.io/@std/bytes/0.224.0/equals.d.ts +21 -0
  82. package/types/deps/jsr.io/@std/bytes/0.224.0/equals.d.ts.map +1 -0
  83. package/types/deps/jsr.io/@std/bytes/0.224.0/includes_needle.d.ts +35 -0
  84. package/types/deps/jsr.io/@std/bytes/0.224.0/includes_needle.d.ts.map +1 -0
  85. package/types/deps/jsr.io/@std/bytes/0.224.0/index_of_needle.d.ts +43 -0
  86. package/types/deps/jsr.io/@std/bytes/0.224.0/index_of_needle.d.ts.map +1 -0
  87. package/types/deps/jsr.io/@std/bytes/0.224.0/last_index_of_needle.d.ts +40 -0
  88. package/types/deps/jsr.io/@std/bytes/0.224.0/last_index_of_needle.d.ts.map +1 -0
  89. package/types/deps/jsr.io/@std/bytes/0.224.0/mod.d.ts +150 -0
  90. package/types/deps/jsr.io/@std/bytes/0.224.0/mod.d.ts.map +1 -0
  91. package/types/deps/jsr.io/@std/bytes/0.224.0/repeat.d.ts +24 -0
  92. package/types/deps/jsr.io/@std/bytes/0.224.0/repeat.d.ts.map +1 -0
  93. package/types/deps/jsr.io/@std/bytes/0.224.0/starts_with.d.ts +23 -0
  94. package/types/deps/jsr.io/@std/bytes/0.224.0/starts_with.d.ts.map +1 -0
  95. package/types/deps/jsr.io/@std/encoding/{0.220.1 → 0.224.0}/_util.d.ts.map +1 -1
  96. package/types/deps/jsr.io/@std/encoding/{0.220.1 → 0.224.0}/base64.d.ts +8 -2
  97. package/types/deps/jsr.io/@std/encoding/0.224.0/base64.d.ts.map +1 -0
  98. package/types/deps/jsr.io/@std/encoding/0.224.0/hex.d.ts.map +1 -0
  99. package/types/deps/jsr.io/@std/fmt/0.224.0/colors.d.ts.map +1 -0
  100. package/types/deps/jsr.io/@std/fs/{0.220.1 → 0.224.0}/_get_file_info_type.d.ts.map +1 -1
  101. package/types/deps/jsr.io/@std/fs/{0.220.1 → 0.224.0}/_to_path_string.d.ts.map +1 -1
  102. package/types/deps/jsr.io/@std/fs/0.224.0/ensure_dir.d.ts.map +1 -0
  103. package/types/deps/jsr.io/@std/fs/0.224.0/ensure_file.d.ts.map +1 -0
  104. package/types/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/_negotiation/common.d.ts.map +1 -1
  105. package/types/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/_negotiation/encoding.d.ts.map +1 -1
  106. package/types/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/_negotiation/language.d.ts.map +1 -1
  107. package/types/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/_negotiation/media_type.d.ts.map +1 -1
  108. package/types/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/negotiation.d.ts.map +1 -1
  109. package/types/deps/jsr.io/@std/internal/0.224.0/diff.d.ts.map +1 -0
  110. package/types/deps/jsr.io/@std/internal/0.224.0/format.d.ts.map +1 -0
  111. package/types/deps/jsr.io/@std/internal/0.224.0/mod.d.ts.map +1 -0
  112. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/_common/assert_path.d.ts.map +1 -1
  113. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/_common/basename.d.ts.map +1 -1
  114. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/_common/common.d.ts.map +1 -1
  115. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/_common/constants.d.ts.map +1 -1
  116. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/_common/dirname.d.ts.map +1 -1
  117. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/_common/format.d.ts.map +1 -1
  118. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/_common/from_file_url.d.ts.map +1 -1
  119. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/_common/glob_to_reg_exp.d.ts.map +1 -1
  120. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/_common/normalize.d.ts.map +1 -1
  121. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/_common/normalize_string.d.ts.map +1 -1
  122. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/_common/relative.d.ts.map +1 -1
  123. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/_common/strip_trailing_separators.d.ts.map +1 -1
  124. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/_common/to_file_url.d.ts.map +1 -1
  125. package/types/deps/jsr.io/@std/path/0.224.0/_interface.d.ts.map +1 -0
  126. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/_os.d.ts.map +1 -1
  127. package/types/deps/jsr.io/@std/path/0.224.0/basename.d.ts.map +1 -0
  128. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/common.d.ts.map +1 -1
  129. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/constants.d.ts.map +1 -1
  130. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/dirname.d.ts.map +1 -1
  131. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/extname.d.ts.map +1 -1
  132. package/types/deps/jsr.io/@std/path/0.224.0/format.d.ts.map +1 -0
  133. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/from_file_url.d.ts.map +1 -1
  134. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/glob_to_regexp.d.ts.map +1 -1
  135. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/is_absolute.d.ts.map +1 -1
  136. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/is_glob.d.ts.map +1 -1
  137. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/join.d.ts.map +1 -1
  138. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/join_globs.d.ts.map +1 -1
  139. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/mod.d.ts.map +1 -1
  140. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/normalize.d.ts.map +1 -1
  141. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/normalize_glob.d.ts.map +1 -1
  142. package/types/deps/jsr.io/@std/path/0.224.0/parse.d.ts.map +1 -0
  143. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/_util.d.ts.map +1 -1
  144. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/basename.d.ts.map +1 -1
  145. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/common.d.ts.map +1 -1
  146. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/constants.d.ts.map +1 -1
  147. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/dirname.d.ts.map +1 -1
  148. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/extname.d.ts.map +1 -1
  149. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/format.d.ts.map +1 -1
  150. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/from_file_url.d.ts.map +1 -1
  151. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/glob_to_regexp.d.ts.map +1 -1
  152. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/is_absolute.d.ts.map +1 -1
  153. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/is_glob.d.ts.map +1 -1
  154. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/join.d.ts.map +1 -1
  155. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/join_globs.d.ts.map +1 -1
  156. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/mod.d.ts.map +1 -1
  157. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/normalize.d.ts.map +1 -1
  158. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/normalize_glob.d.ts.map +1 -1
  159. package/types/deps/jsr.io/@std/path/0.224.0/posix/parse.d.ts.map +1 -0
  160. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/relative.d.ts.map +1 -1
  161. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/resolve.d.ts.map +1 -1
  162. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/to_file_url.d.ts.map +1 -1
  163. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/posix/to_namespaced_path.d.ts.map +1 -1
  164. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/relative.d.ts.map +1 -1
  165. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/resolve.d.ts.map +1 -1
  166. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/to_file_url.d.ts.map +1 -1
  167. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/to_namespaced_path.d.ts.map +1 -1
  168. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/_util.d.ts.map +1 -1
  169. package/types/deps/jsr.io/@std/path/0.224.0/windows/basename.d.ts.map +1 -0
  170. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/common.d.ts.map +1 -1
  171. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/constants.d.ts.map +1 -1
  172. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/dirname.d.ts.map +1 -1
  173. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/extname.d.ts.map +1 -1
  174. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/format.d.ts.map +1 -1
  175. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/from_file_url.d.ts.map +1 -1
  176. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/glob_to_regexp.d.ts.map +1 -1
  177. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/is_absolute.d.ts.map +1 -1
  178. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/is_glob.d.ts.map +1 -1
  179. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/join.d.ts.map +1 -1
  180. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/join_globs.d.ts.map +1 -1
  181. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/mod.d.ts.map +1 -1
  182. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/normalize.d.ts.map +1 -1
  183. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/normalize_glob.d.ts.map +1 -1
  184. package/types/deps/jsr.io/@std/path/0.224.0/windows/parse.d.ts.map +1 -0
  185. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/relative.d.ts.map +1 -1
  186. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/resolve.d.ts.map +1 -1
  187. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/to_file_url.d.ts.map +1 -1
  188. package/types/deps/jsr.io/@std/path/{0.220.1 → 0.224.0}/windows/to_namespaced_path.d.ts.map +1 -1
  189. package/types/deps/jsr.io/@std/semver/0.224.0/_constants.d.ts.map +1 -0
  190. package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/_shared.d.ts.map +1 -1
  191. package/types/deps/jsr.io/@std/semver/0.224.0/_test_comparator_set.d.ts +3 -0
  192. package/types/deps/jsr.io/@std/semver/0.224.0/_test_comparator_set.d.ts.map +1 -0
  193. package/types/deps/jsr.io/@std/semver/0.224.0/can_parse.d.ts.map +1 -0
  194. package/types/deps/jsr.io/@std/semver/0.224.0/compare.d.ts.map +1 -0
  195. package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/constants.d.ts.map +1 -1
  196. package/types/deps/jsr.io/@std/semver/0.224.0/difference.d.ts.map +1 -0
  197. package/types/deps/jsr.io/@std/semver/0.224.0/equals.d.ts.map +1 -0
  198. package/types/deps/jsr.io/@std/semver/0.224.0/format.d.ts.map +1 -0
  199. package/types/deps/jsr.io/@std/semver/0.224.0/format_range.d.ts.map +1 -0
  200. package/types/deps/jsr.io/@std/semver/0.224.0/greater_or_equal.d.ts.map +1 -0
  201. package/types/deps/jsr.io/@std/semver/0.224.0/greater_than.d.ts.map +1 -0
  202. package/types/deps/jsr.io/@std/semver/0.224.0/greater_than_range.d.ts +4 -0
  203. package/types/deps/jsr.io/@std/semver/0.224.0/greater_than_range.d.ts.map +1 -0
  204. package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/increment.d.ts.map +1 -1
  205. package/types/deps/jsr.io/@std/semver/0.224.0/is_range.d.ts.map +1 -0
  206. package/types/deps/jsr.io/@std/semver/0.224.0/is_semver.d.ts.map +1 -0
  207. package/types/deps/jsr.io/@std/semver/0.224.0/less_or_equal.d.ts.map +1 -0
  208. package/types/deps/jsr.io/@std/semver/0.224.0/less_than.d.ts.map +1 -0
  209. package/types/deps/jsr.io/@std/semver/0.224.0/less_than_range.d.ts +4 -0
  210. package/types/deps/jsr.io/@std/semver/0.224.0/less_than_range.d.ts.map +1 -0
  211. package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/max_satisfying.d.ts.map +1 -1
  212. package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/min_satisfying.d.ts.map +1 -1
  213. package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/mod.d.ts +3 -0
  214. package/types/deps/jsr.io/@std/semver/0.224.0/mod.d.ts.map +1 -0
  215. package/types/deps/jsr.io/@std/semver/0.224.0/not_equals.d.ts.map +1 -0
  216. package/types/deps/jsr.io/@std/semver/0.224.0/parse.d.ts.map +1 -0
  217. package/types/deps/jsr.io/@std/semver/0.224.0/parse_range.d.ts.map +1 -0
  218. package/types/deps/jsr.io/@std/semver/0.224.0/range_intersects.d.ts.map +1 -0
  219. package/types/deps/jsr.io/@std/semver/0.224.0/range_max.d.ts +14 -0
  220. package/types/deps/jsr.io/@std/semver/0.224.0/range_max.d.ts.map +1 -0
  221. package/types/deps/jsr.io/@std/semver/0.224.0/range_min.d.ts +14 -0
  222. package/types/deps/jsr.io/@std/semver/0.224.0/range_min.d.ts.map +1 -0
  223. package/types/deps/jsr.io/@std/semver/{0.220.1/test_range.d.ts → 0.224.0/satisfies.d.ts} +2 -2
  224. package/types/deps/jsr.io/@std/semver/0.224.0/satisfies.d.ts.map +1 -0
  225. package/types/deps/jsr.io/@std/semver/0.224.0/test_range.d.ts +12 -0
  226. package/types/deps/jsr.io/@std/semver/0.224.0/test_range.d.ts.map +1 -0
  227. package/types/deps/jsr.io/@std/semver/0.224.0/try_parse.d.ts.map +1 -0
  228. package/types/deps/jsr.io/@std/semver/0.224.0/try_parse_range.d.ts.map +1 -0
  229. package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/types.d.ts +0 -4
  230. package/types/deps/jsr.io/@std/semver/0.224.0/types.d.ts.map +1 -0
  231. package/types/deps/jsr.io/@std/testing/{0.220.1 → 0.224.0}/snapshot.d.ts.map +1 -1
  232. package/types/deps/jsr.io/@std/text/{0.220.1 → 0.224.0}/_util.d.ts.map +1 -1
  233. package/types/deps/jsr.io/@std/text/{0.220.1 → 0.224.0}/case.d.ts.map +1 -1
  234. package/types/deps/jsr.io/@std/text/{0.220.1 → 0.224.0}/closest_string.d.ts.map +1 -1
  235. package/types/deps/jsr.io/@std/text/{0.220.1 → 0.224.0}/compare_similarity.d.ts.map +1 -1
  236. package/types/deps/jsr.io/@std/text/0.224.0/levenshtein_distance.d.ts.map +1 -0
  237. package/types/deps/jsr.io/@std/text/{0.220.1 → 0.224.0}/mod.d.ts.map +1 -1
  238. package/types/deps/jsr.io/@std/text/{0.220.1 → 0.224.0}/word_similarity_sort.d.ts.map +1 -1
  239. package/types/deps/jsr.io/@std/url/{0.220.1 → 0.224.0}/_strip.d.ts.map +1 -1
  240. package/types/deps/jsr.io/@std/url/0.224.0/basename.d.ts.map +1 -0
  241. package/types/deps/jsr.io/@std/url/0.224.0/dirname.d.ts.map +1 -0
  242. package/types/deps/jsr.io/@std/url/0.224.0/extname.d.ts.map +1 -0
  243. package/types/deps/jsr.io/@std/url/0.224.0/join.d.ts.map +1 -0
  244. package/types/deps/jsr.io/@std/url/0.224.0/mod.d.ts.map +1 -0
  245. package/types/deps/jsr.io/@std/url/{0.220.1 → 0.224.0}/normalize.d.ts.map +1 -1
  246. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_dumper/dumper.d.ts.map +1 -1
  247. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_dumper/dumper_state.d.ts.map +1 -1
  248. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_error.d.ts.map +1 -1
  249. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_loader/loader.d.ts.map +1 -1
  250. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_loader/loader_state.d.ts.map +1 -1
  251. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_mark.d.ts.map +1 -1
  252. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_state.d.ts.map +1 -1
  253. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/binary.d.ts.map +1 -1
  254. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/bool.d.ts.map +1 -1
  255. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/float.d.ts.map +1 -1
  256. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/function.d.ts.map +1 -1
  257. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/int.d.ts.map +1 -1
  258. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/map.d.ts.map +1 -1
  259. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/merge.d.ts.map +1 -1
  260. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/mod.d.ts.map +1 -1
  261. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/nil.d.ts.map +1 -1
  262. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/omap.d.ts.map +1 -1
  263. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/pairs.d.ts.map +1 -1
  264. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/regexp.d.ts.map +1 -1
  265. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/seq.d.ts.map +1 -1
  266. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/set.d.ts.map +1 -1
  267. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/str.d.ts.map +1 -1
  268. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/timestamp.d.ts.map +1 -1
  269. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_type/undefined.d.ts.map +1 -1
  270. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/_utils.d.ts.map +1 -1
  271. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/mod.d.ts.map +1 -1
  272. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/parse.d.ts.map +1 -1
  273. package/types/deps/jsr.io/@std/yaml/0.224.0/schema/core.d.ts.map +1 -0
  274. package/types/deps/jsr.io/@std/yaml/0.224.0/schema/default.d.ts.map +1 -0
  275. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/schema/extended.d.ts.map +1 -1
  276. package/types/deps/jsr.io/@std/yaml/0.224.0/schema/failsafe.d.ts.map +1 -0
  277. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/schema/json.d.ts.map +1 -1
  278. package/types/deps/jsr.io/@std/yaml/0.224.0/schema/mod.d.ts.map +1 -0
  279. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/schema.d.ts.map +1 -1
  280. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/stringify.d.ts.map +1 -1
  281. package/types/deps/jsr.io/@std/yaml/{0.220.1 → 0.224.0}/type.d.ts.map +1 -1
  282. package/types/federation/send.d.ts.map +1 -1
  283. package/types/httpsig/mod.d.ts.map +1 -1
  284. package/types/nodeinfo/types.d.ts +1 -1
  285. package/esm/deps/jsr.io/@std/bytes/0.220.1/copy.js +0 -37
  286. package/esm/deps/jsr.io/@std/bytes/0.220.1/ends_with.js +0 -23
  287. package/esm/deps/jsr.io/@std/bytes/0.220.1/equals.js +0 -44
  288. package/esm/deps/jsr.io/@std/bytes/0.220.1/includes_needle.js +0 -21
  289. package/esm/deps/jsr.io/@std/bytes/0.220.1/index_of_needle.js +0 -45
  290. package/esm/deps/jsr.io/@std/bytes/0.220.1/last_index_of_needle.js +0 -45
  291. package/esm/deps/jsr.io/@std/bytes/0.220.1/mod.js +0 -25
  292. package/esm/deps/jsr.io/@std/bytes/0.220.1/repeat.js +0 -33
  293. package/esm/deps/jsr.io/@std/bytes/0.220.1/starts_with.js +0 -21
  294. package/types/deps/jsr.io/@std/bytes/0.220.1/concat.d.ts +0 -14
  295. package/types/deps/jsr.io/@std/bytes/0.220.1/concat.d.ts.map +0 -1
  296. package/types/deps/jsr.io/@std/bytes/0.220.1/copy.d.ts +0 -28
  297. package/types/deps/jsr.io/@std/bytes/0.220.1/copy.d.ts.map +0 -1
  298. package/types/deps/jsr.io/@std/bytes/0.220.1/ends_with.d.ts +0 -14
  299. package/types/deps/jsr.io/@std/bytes/0.220.1/ends_with.d.ts.map +0 -1
  300. package/types/deps/jsr.io/@std/bytes/0.220.1/equals.d.ts +0 -6
  301. package/types/deps/jsr.io/@std/bytes/0.220.1/equals.d.ts.map +0 -1
  302. package/types/deps/jsr.io/@std/bytes/0.220.1/includes_needle.d.ts +0 -17
  303. package/types/deps/jsr.io/@std/bytes/0.220.1/includes_needle.d.ts.map +0 -1
  304. package/types/deps/jsr.io/@std/bytes/0.220.1/index_of_needle.d.ts +0 -18
  305. package/types/deps/jsr.io/@std/bytes/0.220.1/index_of_needle.d.ts.map +0 -1
  306. package/types/deps/jsr.io/@std/bytes/0.220.1/last_index_of_needle.d.ts +0 -18
  307. package/types/deps/jsr.io/@std/bytes/0.220.1/last_index_of_needle.d.ts.map +0 -1
  308. package/types/deps/jsr.io/@std/bytes/0.220.1/mod.d.ts +0 -24
  309. package/types/deps/jsr.io/@std/bytes/0.220.1/mod.d.ts.map +0 -1
  310. package/types/deps/jsr.io/@std/bytes/0.220.1/repeat.d.ts +0 -15
  311. package/types/deps/jsr.io/@std/bytes/0.220.1/repeat.d.ts.map +0 -1
  312. package/types/deps/jsr.io/@std/bytes/0.220.1/starts_with.d.ts +0 -14
  313. package/types/deps/jsr.io/@std/bytes/0.220.1/starts_with.d.ts.map +0 -1
  314. package/types/deps/jsr.io/@std/encoding/0.220.1/base64.d.ts.map +0 -1
  315. package/types/deps/jsr.io/@std/encoding/0.220.1/hex.d.ts.map +0 -1
  316. package/types/deps/jsr.io/@std/fs/0.220.1/ensure_dir.d.ts.map +0 -1
  317. package/types/deps/jsr.io/@std/fs/0.220.1/ensure_file.d.ts.map +0 -1
  318. package/types/deps/jsr.io/@std/path/0.220.1/_interface.d.ts.map +0 -1
  319. package/types/deps/jsr.io/@std/path/0.220.1/basename.d.ts.map +0 -1
  320. package/types/deps/jsr.io/@std/path/0.220.1/format.d.ts.map +0 -1
  321. package/types/deps/jsr.io/@std/path/0.220.1/parse.d.ts.map +0 -1
  322. package/types/deps/jsr.io/@std/path/0.220.1/posix/parse.d.ts.map +0 -1
  323. package/types/deps/jsr.io/@std/path/0.220.1/windows/basename.d.ts.map +0 -1
  324. package/types/deps/jsr.io/@std/path/0.220.1/windows/parse.d.ts.map +0 -1
  325. package/types/deps/jsr.io/@std/semver/0.220.1/_constants.d.ts.map +0 -1
  326. package/types/deps/jsr.io/@std/semver/0.220.1/can_parse.d.ts.map +0 -1
  327. package/types/deps/jsr.io/@std/semver/0.220.1/compare.d.ts.map +0 -1
  328. package/types/deps/jsr.io/@std/semver/0.220.1/difference.d.ts.map +0 -1
  329. package/types/deps/jsr.io/@std/semver/0.220.1/equals.d.ts.map +0 -1
  330. package/types/deps/jsr.io/@std/semver/0.220.1/format.d.ts.map +0 -1
  331. package/types/deps/jsr.io/@std/semver/0.220.1/format_range.d.ts.map +0 -1
  332. package/types/deps/jsr.io/@std/semver/0.220.1/greater_or_equal.d.ts.map +0 -1
  333. package/types/deps/jsr.io/@std/semver/0.220.1/greater_than.d.ts.map +0 -1
  334. package/types/deps/jsr.io/@std/semver/0.220.1/is_range.d.ts.map +0 -1
  335. package/types/deps/jsr.io/@std/semver/0.220.1/is_semver.d.ts.map +0 -1
  336. package/types/deps/jsr.io/@std/semver/0.220.1/less_or_equal.d.ts.map +0 -1
  337. package/types/deps/jsr.io/@std/semver/0.220.1/less_than.d.ts.map +0 -1
  338. package/types/deps/jsr.io/@std/semver/0.220.1/mod.d.ts.map +0 -1
  339. package/types/deps/jsr.io/@std/semver/0.220.1/not_equals.d.ts.map +0 -1
  340. package/types/deps/jsr.io/@std/semver/0.220.1/parse.d.ts.map +0 -1
  341. package/types/deps/jsr.io/@std/semver/0.220.1/parse_range.d.ts.map +0 -1
  342. package/types/deps/jsr.io/@std/semver/0.220.1/range_intersects.d.ts.map +0 -1
  343. package/types/deps/jsr.io/@std/semver/0.220.1/range_max.d.ts +0 -8
  344. package/types/deps/jsr.io/@std/semver/0.220.1/range_max.d.ts.map +0 -1
  345. package/types/deps/jsr.io/@std/semver/0.220.1/range_min.d.ts +0 -8
  346. package/types/deps/jsr.io/@std/semver/0.220.1/range_min.d.ts.map +0 -1
  347. package/types/deps/jsr.io/@std/semver/0.220.1/test_range.d.ts.map +0 -1
  348. package/types/deps/jsr.io/@std/semver/0.220.1/try_parse.d.ts.map +0 -1
  349. package/types/deps/jsr.io/@std/semver/0.220.1/try_parse_range.d.ts.map +0 -1
  350. package/types/deps/jsr.io/@std/semver/0.220.1/types.d.ts.map +0 -1
  351. package/types/deps/jsr.io/@std/text/0.220.1/levenshtein_distance.d.ts.map +0 -1
  352. package/types/deps/jsr.io/@std/url/0.220.1/basename.d.ts.map +0 -1
  353. package/types/deps/jsr.io/@std/url/0.220.1/dirname.d.ts.map +0 -1
  354. package/types/deps/jsr.io/@std/url/0.220.1/extname.d.ts.map +0 -1
  355. package/types/deps/jsr.io/@std/url/0.220.1/join.d.ts.map +0 -1
  356. package/types/deps/jsr.io/@std/url/0.220.1/mod.d.ts.map +0 -1
  357. package/types/deps/jsr.io/@std/yaml/0.220.1/schema/core.d.ts.map +0 -1
  358. package/types/deps/jsr.io/@std/yaml/0.220.1/schema/default.d.ts.map +0 -1
  359. package/types/deps/jsr.io/@std/yaml/0.220.1/schema/failsafe.d.ts.map +0 -1
  360. package/types/deps/jsr.io/@std/yaml/0.220.1/schema/mod.d.ts.map +0 -1
  361. /package/esm/deps/jsr.io/@std/encoding/{0.220.1 → 0.224.0}/_util.js +0 -0
  362. /package/esm/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/_negotiation/common.js +0 -0
  363. /package/esm/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/_negotiation/encoding.js +0 -0
  364. /package/esm/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/_negotiation/language.js +0 -0
  365. /package/esm/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/_negotiation/media_type.js +0 -0
  366. /package/esm/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/negotiation.js +0 -0
  367. /package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/_constants.js +0 -0
  368. /package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/_shared.js +0 -0
  369. /package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/compare.js +0 -0
  370. /package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/difference.js +0 -0
  371. /package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/greater_or_equal.js +0 -0
  372. /package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/less_or_equal.js +0 -0
  373. /package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/less_than.js +0 -0
  374. /package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/not_equals.js +0 -0
  375. /package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/parse.js +0 -0
  376. /package/esm/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/try_parse.js +0 -0
  377. /package/types/deps/jsr.io/@std/encoding/{0.220.1 → 0.224.0}/_util.d.ts +0 -0
  378. /package/types/deps/jsr.io/@std/encoding/{0.220.1 → 0.224.0}/hex.d.ts +0 -0
  379. /package/types/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/_negotiation/common.d.ts +0 -0
  380. /package/types/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/_negotiation/encoding.d.ts +0 -0
  381. /package/types/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/_negotiation/language.d.ts +0 -0
  382. /package/types/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/_negotiation/media_type.d.ts +0 -0
  383. /package/types/deps/jsr.io/@std/http/{0.220.1 → 0.224.0}/negotiation.d.ts +0 -0
  384. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/_constants.d.ts +0 -0
  385. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/_shared.d.ts +0 -0
  386. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/can_parse.d.ts +0 -0
  387. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/compare.d.ts +0 -0
  388. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/constants.d.ts +0 -0
  389. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/difference.d.ts +0 -0
  390. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/equals.d.ts +0 -0
  391. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/format.d.ts +0 -0
  392. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/format_range.d.ts +0 -0
  393. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/greater_or_equal.d.ts +0 -0
  394. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/greater_than.d.ts +0 -0
  395. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/increment.d.ts +0 -0
  396. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/is_range.d.ts +0 -0
  397. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/is_semver.d.ts +0 -0
  398. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/less_or_equal.d.ts +0 -0
  399. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/less_than.d.ts +0 -0
  400. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/max_satisfying.d.ts +0 -0
  401. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/min_satisfying.d.ts +0 -0
  402. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/not_equals.d.ts +0 -0
  403. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/parse.d.ts +0 -0
  404. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/parse_range.d.ts +0 -0
  405. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/range_intersects.d.ts +0 -0
  406. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/try_parse.d.ts +0 -0
  407. /package/types/deps/jsr.io/@std/semver/{0.220.1 → 0.224.0}/try_parse_range.d.ts +0 -0
@@ -1,10 +1,11 @@
1
- import { compare } from "./compare.js";
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
2
  import { isWildcardComparator } from "./_shared.js";
3
+ import { compare } from "./compare.js";
3
4
  function testComparator(version, comparator) {
4
5
  if (isWildcardComparator(comparator)) {
5
6
  return true;
6
7
  }
7
- const cmp = compare(version, comparator.semver ?? comparator);
8
+ const cmp = compare(version, comparator);
8
9
  switch (comparator.operator) {
9
10
  case "=":
10
11
  case undefined: {
@@ -27,7 +28,7 @@ function testComparator(version, comparator) {
27
28
  }
28
29
  }
29
30
  }
30
- function testComparatorSet(version, set) {
31
+ export function testComparatorSet(version, set) {
31
32
  for (const comparator of set) {
32
33
  if (!testComparator(version, comparator)) {
33
34
  return false;
@@ -43,11 +44,8 @@ function testComparatorSet(version, set) {
43
44
  if (isWildcardComparator(comparator)) {
44
45
  continue;
45
46
  }
46
- const { prerelease } = comparator.semver ?? comparator;
47
+ const { major, minor, patch, prerelease } = comparator;
47
48
  if (prerelease && prerelease.length > 0) {
48
- const major = comparator.semver?.major ?? comparator.major;
49
- const minor = comparator.semver?.minor ?? comparator.minor;
50
- const patch = comparator.semver?.patch ?? comparator.patch;
51
49
  if (version.major === major && version.minor === minor &&
52
50
  version.patch === patch) {
53
51
  return true;
@@ -58,12 +56,3 @@ function testComparatorSet(version, set) {
58
56
  }
59
57
  return true;
60
58
  }
61
- /**
62
- * Test to see if the version satisfies the range.
63
- * @param version The version to test
64
- * @param range The range to check
65
- * @returns true if the version is in the range
66
- */
67
- export function testRange(version, range) {
68
- return range.some((set) => testComparatorSet(version, set));
69
- }
@@ -1,4 +1,5 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
2
3
  import { parse } from "./parse.js";
3
4
  export function canParse(version) {
4
5
  try {
@@ -61,7 +61,6 @@ export const ANY = {
61
61
  export const ALL = {
62
62
  operator: undefined,
63
63
  ...ANY,
64
- semver: ANY,
65
64
  };
66
65
  /**
67
66
  * A comparator which will not span any semantic versions
@@ -69,5 +68,4 @@ export const ALL = {
69
68
  export const NONE = {
70
69
  operator: "<",
71
70
  ...MIN,
72
- semver: MIN,
73
71
  };
@@ -1,4 +1,5 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
2
3
  import { compare } from "./compare.js";
3
4
  /**
4
5
  * Returns `true` if both semantic versions are logically equivalent, even if they're not the exact same version object.
@@ -1,5 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
- import { ANY } from "./constants.js";
1
+ import { isWildcardComparator } from "./_shared.js";
3
2
  function formatNumber(value) {
4
3
  if (value === Number.POSITIVE_INFINITY) {
5
4
  return "∞";
@@ -22,7 +21,7 @@ function formatNumber(value) {
22
21
  * @returns The string representation of a semantic version.
23
22
  */
24
23
  export function format(semver) {
25
- if (semver === ANY) {
24
+ if (isWildcardComparator(semver)) {
26
25
  return "*";
27
26
  }
28
27
  const major = formatNumber(semver.major);
@@ -1,8 +1,9 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
2
3
  import { format } from "./format.js";
3
4
  function formatComparator(comparator) {
4
- const { semver, operator } = comparator;
5
- return `${operator === undefined ? "" : operator}${format(semver ?? comparator)}`;
5
+ const { operator } = comparator;
6
+ return `${operator === undefined ? "" : operator}${format(comparator)}`;
6
7
  }
7
8
  /**
8
9
  * Formats the range into a string
@@ -1,4 +1,5 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
2
3
  import { compare } from "./compare.js";
3
4
  /**
4
5
  * Greater than comparison
@@ -0,0 +1,39 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { testComparatorSet } from "./_test_comparator_set.js";
4
+ import { isWildcardComparator } from "./_shared.js";
5
+ import { compare } from "./compare.js";
6
+ /** Check if the semver is greater than the range. */
7
+ export function greaterThanRange(semver, range) {
8
+ return range.every((comparatorSet) => greaterThanComparatorSet(semver, comparatorSet));
9
+ }
10
+ function greaterThanComparatorSet(semver, comparatorSet) {
11
+ // If the comparator set contains wildcard, then the semver is not greater than the range.
12
+ if (comparatorSet.some(isWildcardComparator))
13
+ return false;
14
+ // If the semver satisfies the comparator set, then it's not greater than the range.
15
+ if (testComparatorSet(semver, comparatorSet))
16
+ return false;
17
+ // If the semver is less than any of the comparator set, then it's not greater than the range.
18
+ if (comparatorSet.some((comparator) => lessThanComparator(semver, comparator)))
19
+ return false;
20
+ return true;
21
+ }
22
+ function lessThanComparator(semver, comparator) {
23
+ const cmp = compare(semver, comparator);
24
+ switch (comparator.operator) {
25
+ case "=":
26
+ case undefined:
27
+ return cmp < 0;
28
+ case "!=":
29
+ return false;
30
+ case ">":
31
+ return cmp <= 0;
32
+ case "<":
33
+ return false;
34
+ case ">=":
35
+ return cmp < 0;
36
+ case "<=":
37
+ return false;
38
+ }
39
+ }
@@ -1,4 +1,5 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
2
3
  import { parseBuild } from "./_shared.js";
3
4
  function bumpPrereleaseNumber(prerelease = []) {
4
5
  const values = [...prerelease];
@@ -7,10 +7,10 @@ function isComparator(value) {
7
7
  return false;
8
8
  if (value === NONE || value === ALL)
9
9
  return true;
10
- const { operator, semver } = value;
10
+ const { operator } = value;
11
11
  return ((operator === undefined ||
12
12
  OPERATORS.includes(operator)) &&
13
- isSemVer(semver));
13
+ isSemVer(value));
14
14
  }
15
15
  /**
16
16
  * Does a deep check on the object to determine if its a valid range.
@@ -1,4 +1,5 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
2
3
  import { ANY, INVALID } from "./constants.js";
3
4
  import { isValidNumber, isValidString } from "./_shared.js";
4
5
  /**
@@ -0,0 +1,39 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { testComparatorSet } from "./_test_comparator_set.js";
4
+ import { isWildcardComparator } from "./_shared.js";
5
+ import { compare } from "./compare.js";
6
+ /** Check if the semver is less than the range. */
7
+ export function lessThanRange(semver, range) {
8
+ return range.every((comparatorSet) => lessThanComparatorSet(semver, comparatorSet));
9
+ }
10
+ function lessThanComparatorSet(semver, comparatorSet) {
11
+ // If the comparator set contains wildcard, then the semver is not greater than the range.
12
+ if (comparatorSet.some(isWildcardComparator))
13
+ return false;
14
+ // If the semver satisfies the comparator set, then it's not less than the range.
15
+ if (testComparatorSet(semver, comparatorSet))
16
+ return false;
17
+ // If the semver is greater than any of the comparator set, then it's not less than the range.
18
+ if (comparatorSet.some((comparator) => greaterThanComparator(semver, comparator)))
19
+ return false;
20
+ return true;
21
+ }
22
+ function greaterThanComparator(semver, comparator) {
23
+ const cmp = compare(semver, comparator);
24
+ switch (comparator.operator) {
25
+ case "=":
26
+ case undefined:
27
+ return cmp > 0;
28
+ case "!=":
29
+ return false;
30
+ case ">":
31
+ return false;
32
+ case "<":
33
+ return cmp >= 0;
34
+ case ">=":
35
+ return false;
36
+ case "<=":
37
+ return cmp > 0;
38
+ }
39
+ }
@@ -1,4 +1,4 @@
1
- import { testRange } from "./test_range.js";
1
+ import { satisfies } from "./satisfies.js";
2
2
  import { greaterThan } from "./greater_than.js";
3
3
  /**
4
4
  * Returns the highest version in the list that satisfies the range, or `undefined`
@@ -10,7 +10,7 @@ import { greaterThan } from "./greater_than.js";
10
10
  export function maxSatisfying(versions, range) {
11
11
  let max;
12
12
  for (const version of versions) {
13
- if (!testRange(version, range))
13
+ if (!satisfies(version, range))
14
14
  continue;
15
15
  max = max && greaterThan(max, version) ? max : version;
16
16
  }
@@ -1,4 +1,4 @@
1
- import { testRange } from "./test_range.js";
1
+ import { satisfies } from "./satisfies.js";
2
2
  import { lessThan } from "./less_than.js";
3
3
  /**
4
4
  * Returns the lowest version in the list that satisfies the range, or `undefined` if
@@ -10,7 +10,7 @@ import { lessThan } from "./less_than.js";
10
10
  export function minSatisfying(versions, range) {
11
11
  let min;
12
12
  for (const version of versions) {
13
- if (!testRange(version, range))
13
+ if (!satisfies(version, range))
14
14
  continue;
15
15
  min = min && lessThan(min, version) ? min : version;
16
16
  }
@@ -269,6 +269,7 @@ export * from "./constants.js";
269
269
  export * from "./difference.js";
270
270
  export * from "./format.js";
271
271
  export * from "./test_range.js";
272
+ export * from "./satisfies.js";
272
273
  export * from "./increment.js";
273
274
  export * from "./is_semver.js";
274
275
  export * from "./max_satisfying.js";
@@ -287,7 +288,9 @@ export * from "./format_range.js";
287
288
  export * from "./equals.js";
288
289
  export * from "./not_equals.js";
289
290
  export * from "./greater_than.js";
291
+ export * from "./greater_than_range.js";
290
292
  export * from "./greater_or_equal.js";
291
293
  export * from "./less_than.js";
294
+ export * from "./less_than_range.js";
292
295
  export * from "./less_or_equal.js";
293
296
  export const SEMVER_SPEC_VERSION = "2.0.0";
@@ -1,4 +1,5 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
2
3
  import { COMPARATOR_REGEXP, OPERATOR_XRANGE_REGEXP, parseBuild, parseNumber, parsePrerelease, XRANGE, } from "./_shared.js";
3
4
  import { ALL, ANY, NONE } from "./constants.js";
4
5
  function parseComparator(comparator) {
@@ -16,7 +17,7 @@ function parseComparator(comparator) {
16
17
  build: buildmetadata ? parseBuild(buildmetadata) : [],
17
18
  }
18
19
  : ANY;
19
- return { operator: operator || undefined, ...semver, semver };
20
+ return { operator: operator || undefined, ...semver };
20
21
  }
21
22
  function isWildcard(id) {
22
23
  return !id || id.toLowerCase() === "x" || id === "*";
@@ -1,7 +1,8 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
2
3
  import { isWildcardComparator } from "./_shared.js";
3
4
  import { compare } from "./compare.js";
4
- import { testRange } from "./test_range.js";
5
+ import { satisfies } from "./satisfies.js";
5
6
  function comparatorIntersects(c0, c1) {
6
7
  const op0 = c0.operator;
7
8
  const op1 = c1.operator;
@@ -9,12 +10,12 @@ function comparatorIntersects(c0, c1) {
9
10
  // if c0 is empty comparator, then returns true
10
11
  if (isWildcardComparator(c0))
11
12
  return true;
12
- return testRange(c0, [[c1]]);
13
+ return satisfies(c0, [[c1]]);
13
14
  }
14
15
  if (op1 === undefined) {
15
16
  if (isWildcardComparator(c1))
16
17
  return true;
17
- return testRange(c1, [[c0]]);
18
+ return satisfies(c1, [[c0]]);
18
19
  }
19
20
  const cmp = compare(c0, c1);
20
21
  const sameDirectionIncreasing = (op0 === ">=" || op0 === ">") &&
@@ -1,10 +1,12 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
- import { ANY, INVALID, MAX } from "./constants.js";
3
- import { testRange } from "./test_range.js";
2
+ // This module is browser compatible.
3
+ import { INVALID, MAX } from "./constants.js";
4
+ import { satisfies } from "./satisfies.js";
4
5
  import { greaterThan } from "./greater_than.js";
6
+ import { isWildcardComparator } from "./_shared.js";
5
7
  function comparatorMax(comparator) {
6
- const semver = comparator.semver ?? comparator;
7
- if (semver === ANY)
8
+ const semver = comparator;
9
+ if (isWildcardComparator(comparator))
8
10
  return MAX;
9
11
  switch (comparator.operator) {
10
12
  case "!=":
@@ -40,6 +42,12 @@ function comparatorMax(comparator) {
40
42
  }
41
43
  }
42
44
  /**
45
+ * @deprecated This will be removed in 1.0.0. Use {@linkcode greaterThanRange} or
46
+ * {@linkcode lessThanRange} for comparing ranges and semvers. The maximum
47
+ * version of a range is often not well defined, and therefore this API
48
+ * shouldn't be used. See
49
+ * {@link https://github.com/denoland/deno_std/issues/4365} for details.
50
+ *
43
51
  * The maximum valid SemVer for a given range or INVALID
44
52
  * @param range The range to calculate the max for
45
53
  * @returns A valid SemVer or INVALID
@@ -49,7 +57,7 @@ export function rangeMax(range) {
49
57
  for (const comparators of range) {
50
58
  for (const comparator of comparators) {
51
59
  const candidate = comparatorMax(comparator);
52
- if (!testRange(candidate, range))
60
+ if (!satisfies(candidate, range))
53
61
  continue;
54
62
  max = (max && greaterThan(max, candidate)) ? max : candidate;
55
63
  }
@@ -1,12 +1,14 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
- import { ANY, INVALID, MAX, MIN } from "./constants.js";
3
- import { testRange } from "./test_range.js";
2
+ // This module is browser compatible.
3
+ import { INVALID, MAX, MIN } from "./constants.js";
4
+ import { satisfies } from "./satisfies.js";
4
5
  import { lessThan } from "./less_than.js";
5
6
  import { greaterThan } from "./greater_than.js";
6
7
  import { increment } from "./increment.js";
8
+ import { isWildcardComparator } from "./_shared.js";
7
9
  function comparatorMin(comparator) {
8
- const semver = comparator.semver ?? comparator;
9
- if (semver === ANY)
10
+ const semver = comparator;
11
+ if (isWildcardComparator(semver))
10
12
  return MIN;
11
13
  switch (comparator.operator) {
12
14
  case ">":
@@ -31,6 +33,12 @@ function comparatorMin(comparator) {
31
33
  }
32
34
  }
33
35
  /**
36
+ * @deprecated This will be removed in 1.0.0. Use {@linkcode greaterThanRange} or
37
+ * {@linkcode lessThanRange} for comparing ranges and semvers. The minimum
38
+ * version of a range is often not well defined, and therefore this API
39
+ * shouldn't be used. See
40
+ * {@link https://github.com/denoland/deno_std/issues/4365} for details.
41
+ *
34
42
  * The minimum valid SemVer for a given range or INVALID
35
43
  * @param range The range to calculate the min for
36
44
  * @returns A valid SemVer or INVALID
@@ -40,7 +48,7 @@ export function rangeMin(range) {
40
48
  for (const comparators of range) {
41
49
  for (const comparator of comparators) {
42
50
  const candidate = comparatorMin(comparator);
43
- if (!testRange(candidate, range))
51
+ if (!satisfies(candidate, range))
44
52
  continue;
45
53
  min = (min && lessThan(min, candidate)) ? min : candidate;
46
54
  }
@@ -0,0 +1,11 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ import { testComparatorSet } from "./_test_comparator_set.js";
3
+ /**
4
+ * Test to see if the version satisfies the range.
5
+ * @param version The version to test
6
+ * @param range The range to check
7
+ * @returns true if the version is in the range
8
+ */
9
+ export function satisfies(version, range) {
10
+ return range.some((set) => testComparatorSet(version, set));
11
+ }
@@ -0,0 +1,13 @@
1
+ import { satisfies } from "./satisfies.js";
2
+ /**
3
+ * Test to see if the version satisfies the range.
4
+ * @param version The version to test
5
+ * @param range The range to check
6
+ * @returns true if the version is in the range
7
+ *
8
+ * @deprecated This will be removed in 1.0.0. Use {@linkcode satisfies}
9
+ * instead. See https://github.com/denoland/deno_std/pull/4364.
10
+ */
11
+ export function testRange(version, range) {
12
+ return satisfies(version, range);
13
+ }
@@ -1,4 +1,5 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
2
3
  import { parseRange } from "./parse_range.js";
3
4
  /**
4
5
  * A tries to parse a valid Range string or returns undefined
@@ -1,2 +1,3 @@
1
1
  // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
2
3
  export {};
@@ -1,5 +1,5 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
- import { encodeHex } from "../deps/jsr.io/@std/encoding/0.220.1/hex.js";
2
+ import { encodeHex } from "../deps/jsr.io/@std/encoding/0.224.0/hex.js";
3
3
  /**
4
4
  * Calculates the [partial follower collection digest][1].
5
5
  *
@@ -1,6 +1,6 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
2
  import { getLogger } from "@logtape/logtape";
3
- import { accepts } from "../deps/jsr.io/@std/http/0.220.1/negotiation.js";
3
+ import { accepts } from "../deps/jsr.io/@std/http/0.224.0/negotiation.js";
4
4
  import { doesActorOwnKey, verify } from "../httpsig/mod.js";
5
5
  import { Activity, Link, Object, OrderedCollection, OrderedCollectionPage, } from "../vocab/vocab.js";
6
6
  export function acceptsJsonLd(request) {
@@ -42,7 +42,13 @@ export async function sendActivity({ activity, privateKey, keyId, inbox, documen
42
42
  request = await sign(request, privateKey, keyId);
43
43
  const response = await fetch(request);
44
44
  if (!response.ok) {
45
- const error = await response.text();
45
+ let error;
46
+ try {
47
+ error = await response.text();
48
+ }
49
+ catch (_) {
50
+ error = "";
51
+ }
46
52
  logger.error("Failed to send activity {activityId} to {inbox} ({status} " +
47
53
  "{statusText}):\n{error}", {
48
54
  activityId: activity.id?.href,
@@ -5,8 +5,9 @@
5
5
  * @module
6
6
  */
7
7
  import * as dntShim from "../_dnt.shims.js";
8
- import { equals } from "../deps/jsr.io/@std/bytes/0.220.1/mod.js";
9
- import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/0.220.1/base64.js";
8
+ import { getLogger } from "@logtape/logtape";
9
+ import { equals } from "../deps/jsr.io/@std/bytes/0.224.0/mod.js";
10
+ import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/0.224.0/base64.js";
10
11
  import { isActor } from "../vocab/actor.js";
11
12
  import { CryptographicKey, Object as ASObject, } from "../vocab/vocab.js";
12
13
  import { validateCryptoKey } from "./key.js";
@@ -73,16 +74,22 @@ const supportedHashAlgorithms = {
73
74
  * could not be verified.
74
75
  */
75
76
  export async function verify(request, documentLoader, currentTime) {
77
+ const logger = getLogger(["fedify", "httpsig", "verify"]);
76
78
  request = request.clone();
77
79
  const dateHeader = request.headers.get("Date");
78
- if (dateHeader == null)
80
+ if (dateHeader == null) {
81
+ logger.debug("Failed to verify; no Date header found.", { headers: Object.fromEntries(request.headers.entries()) });
79
82
  return null;
83
+ }
80
84
  const sigHeader = request.headers.get("Signature");
81
- if (sigHeader == null)
85
+ if (sigHeader == null) {
86
+ logger.debug("Failed to verify; no Signature header found.", { headers: Object.fromEntries(request.headers.entries()) });
82
87
  return null;
88
+ }
83
89
  const digestHeader = request.headers.get("Digest");
84
90
  if (request.method !== "GET" && request.method !== "HEAD" &&
85
91
  digestHeader == null) {
92
+ logger.debug("Failed to verify; no Digest header found.", { headers: Object.fromEntries(request.headers.entries()) });
86
93
  return null;
87
94
  }
88
95
  let body = null;
@@ -96,30 +103,60 @@ export async function verify(request, documentLoader, currentTime) {
96
103
  continue;
97
104
  const digest = decodeBase64(digestBase64);
98
105
  const expectedDigest = await dntShim.crypto.subtle.digest(supportedHashAlgorithms[algo], body);
99
- if (!equals(digest, new Uint8Array(expectedDigest)))
106
+ if (!equals(digest, new Uint8Array(expectedDigest))) {
107
+ logger.debug("Failed to verify; digest mismatch ({algorithm}): " +
108
+ "{digest} != {expectedDigest}.", {
109
+ algorithm: algo,
110
+ digest: digestBase64,
111
+ expectedDigest: encodeBase64(expectedDigest),
112
+ });
100
113
  return null;
114
+ }
101
115
  matched = true;
102
116
  }
103
- if (!matched)
117
+ if (!matched) {
118
+ logger.debug("Failed to verify; no supported digest algorithm found. " +
119
+ "Supported: {supportedAlgorithms}; found: {algorithms}.", {
120
+ supportedAlgorithms: Object.keys(supportedHashAlgorithms),
121
+ algorithms: digests.map(([algo]) => algo),
122
+ });
104
123
  return null;
124
+ }
105
125
  }
106
126
  const date = dntShim.Temporal.Instant.from(new Date(dateHeader).toISOString());
107
127
  const now = currentTime ?? dntShim.Temporal.Now.instant();
108
128
  if (dntShim.Temporal.Instant.compare(date, now.add({ seconds: 30 })) > 0) {
109
- // Too far in the future
129
+ logger.debug("Failed to verify; Date is too far in the future.", { date: date.toString(), now: now.toString() });
110
130
  return null;
111
131
  }
112
132
  else if (dntShim.Temporal.Instant.compare(date, now.subtract({ seconds: 30 })) < 0) {
113
- // Too far in the past
133
+ logger.debug("Failed to verify; Date is too far in the past.", { date: date.toString(), now: now.toString() });
114
134
  return null;
115
135
  }
116
136
  const sigValues = Object.fromEntries(sigHeader.split(",").map((pair) => pair.match(/^\s*([A-Za-z]+)="([^"]*)"\s*$/)).filter((m) => m != null).map((m) => m.slice(1, 3)));
117
- if (!("keyId" in sigValues && "headers" in sigValues &&
118
- "signature" in sigValues)) {
137
+ if (!("keyId" in sigValues)) {
138
+ logger.debug("Failed to verify; no keyId field found in the Signature header.", { signature: sigHeader });
139
+ return null;
140
+ }
141
+ else if (!("headers" in sigValues)) {
142
+ logger.debug("Failed to verify; no headers field found in the Signature header.", { signature: sigHeader });
143
+ return null;
144
+ }
145
+ else if (!("signature" in sigValues)) {
146
+ logger.debug("Failed to verify; no signature field found in the Signature header.", { signature: sigHeader });
119
147
  return null;
120
148
  }
121
149
  const { keyId, headers, signature } = sigValues;
122
- const { document } = await documentLoader(keyId);
150
+ logger.debug("Fetching key {keyId} to verify signature...", { keyId });
151
+ let document;
152
+ try {
153
+ const remoteDocument = await documentLoader(keyId);
154
+ document = remoteDocument.document;
155
+ }
156
+ catch (_) {
157
+ logger.debug("Failed to fetch key {keyId}.", { keyId });
158
+ return null;
159
+ }
123
160
  let object;
124
161
  try {
125
162
  object = await ASObject.fromJsonLd(document, { documentLoader });
@@ -131,8 +168,10 @@ export async function verify(request, documentLoader, currentTime) {
131
168
  object = await CryptographicKey.fromJsonLd(document, { documentLoader });
132
169
  }
133
170
  catch (e) {
134
- if (e instanceof TypeError)
171
+ if (e instanceof TypeError) {
172
+ logger.debug("Failed to verify; key {keyId} returned an invalid object.", { keyId });
135
173
  return null;
174
+ }
136
175
  throw e;
137
176
  }
138
177
  }
@@ -146,19 +185,31 @@ export async function verify(request, documentLoader, currentTime) {
146
185
  break;
147
186
  }
148
187
  }
149
- if (key == null)
188
+ if (key == null) {
189
+ logger.debug("Failed to verify; object {keyId} returned an {actorType}, " +
190
+ "but has no key matching {keyId}.", { keyId, actorType: object.constructor.name });
150
191
  return null;
192
+ }
151
193
  }
152
- else
194
+ else {
195
+ logger.debug("Failed to verify; key {keyId} returned an invalid object.", { keyId });
153
196
  return null;
154
- if (key.publicKey == null)
197
+ }
198
+ if (key.publicKey == null) {
199
+ logger.debug("Failed to verify; key {keyId} has no publicKeyPem field.", { keyId });
155
200
  return null;
201
+ }
156
202
  const headerNames = headers.split(/\s+/g);
157
203
  if (!headerNames.includes("(request-target)") || !headerNames.includes("date")) {
204
+ logger.debug("Failed to verify; required headers missing in the Signature header: " +
205
+ "{headers}.", { headers });
158
206
  return null;
159
207
  }
160
- if (body != null && !headerNames.includes("digest"))
208
+ if (body != null && !headerNames.includes("digest")) {
209
+ logger.debug("Failed to verify; required headers missing in the Signature header: " +
210
+ "{headers}.", { headers });
161
211
  return null;
212
+ }
162
213
  const message = headerNames.map((name) => `${name}: ` +
163
214
  (name == "(request-target)"
164
215
  ? `${request.method.toLowerCase()} ${new URL(request.url).pathname}`
@@ -168,7 +219,13 @@ export async function verify(request, documentLoader, currentTime) {
168
219
  const sig = decodeBase64(signature);
169
220
  // TODO: support other than RSASSA-PKCS1-v1_5:
170
221
  const verified = await dntShim.crypto.subtle.verify("RSASSA-PKCS1-v1_5", key.publicKey, sig, new TextEncoder().encode(message));
171
- return verified ? key : null;
222
+ if (!verified) {
223
+ logger.debug("Failed to verify; signature {signature} is invalid. " +
224
+ "Check if the key is correct or if the signed message is correct. " +
225
+ "The message to sign is:\n{message}", { signature, message });
226
+ return null;
227
+ }
228
+ return key;
172
229
  }
173
230
  /**
174
231
  * Checks if the actor of the given activity owns the specified key.
@@ -1,4 +1,4 @@
1
- import { format } from "../deps/jsr.io/@std/semver/0.220.1/mod.js";
1
+ import { format } from "../deps/jsr.io/@std/semver/0.224.0/mod.js";
2
2
  /**
3
3
  * Converts a {@link NodeInfo} object to a JSON value.
4
4
  * @param nodeInfo The {@link NodeInfo} object to convert.