@fedify/fedify 1.5.0-dev.649 → 1.5.0-dev.652

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 (159) hide show
  1. package/CONTRIBUTING.md +265 -0
  2. package/SECURITY.md +22 -0
  3. package/SPONSORS.md +41 -0
  4. package/esm/deno.js +56 -46
  5. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/_constants.js +1 -1
  6. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/_shared.js +1 -1
  7. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/_test_comparator_set.js +1 -1
  8. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/can_parse.js +1 -1
  9. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/equals.js +1 -1
  10. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/format_range.js +1 -1
  11. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/greater_than.js +1 -1
  12. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/greater_than_range.js +1 -1
  13. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/increment.js +1 -1
  14. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/is_semver.js +1 -1
  15. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/less_than_range.js +1 -1
  16. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/mod.js +1 -1
  17. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/parse_range.js +7 -9
  18. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/range_intersects.js +1 -1
  19. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/satisfies.js +1 -1
  20. package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/try_parse_range.js +1 -1
  21. package/esm/deps/jsr.io/@std/semver/1.0.4/types.js +3 -0
  22. package/esm/federation/middleware.js +3 -4
  23. package/esm/nodeinfo/client.js +1 -1
  24. package/esm/nodeinfo/mod.js +1 -1
  25. package/esm/nodeinfo/types.js +1 -1
  26. package/esm/vocab/vocab.js +176 -176
  27. package/package.json +1 -1
  28. package/types/deno.d.ts +33 -32
  29. package/types/deps/jsr.io/@std/async/1.0.10/delay.d.ts +0 -1
  30. package/types/deps/jsr.io/@std/async/1.0.10/delay.d.ts.map +1 -1
  31. package/types/deps/jsr.io/@std/http/1.0.13/negotiation.d.ts +0 -1
  32. package/types/deps/jsr.io/@std/http/1.0.13/negotiation.d.ts.map +1 -1
  33. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/_constants.d.ts.map +1 -1
  34. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/_shared.d.ts.map +1 -1
  35. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/_test_comparator_set.d.ts.map +1 -1
  36. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/can_parse.d.ts.map +1 -1
  37. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/compare.d.ts.map +1 -1
  38. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/difference.d.ts.map +1 -1
  39. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/equals.d.ts.map +1 -1
  40. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/format.d.ts.map +1 -1
  41. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/format_range.d.ts.map +1 -1
  42. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/greater_or_equal.d.ts.map +1 -1
  43. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/greater_than.d.ts.map +1 -1
  44. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/greater_than_range.d.ts.map +1 -1
  45. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/increment.d.ts.map +1 -1
  46. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/is_range.d.ts.map +1 -1
  47. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/is_semver.d.ts.map +1 -1
  48. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/less_or_equal.d.ts.map +1 -1
  49. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/less_than.d.ts.map +1 -1
  50. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/less_than_range.d.ts.map +1 -1
  51. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/max_satisfying.d.ts.map +1 -1
  52. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/min_satisfying.d.ts.map +1 -1
  53. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/mod.d.ts.map +1 -1
  54. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/not_equals.d.ts.map +1 -1
  55. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/parse.d.ts.map +1 -1
  56. package/types/deps/jsr.io/@std/semver/1.0.4/parse_range.d.ts.map +1 -0
  57. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/range_intersects.d.ts.map +1 -1
  58. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/satisfies.d.ts.map +1 -1
  59. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/try_parse.d.ts.map +1 -1
  60. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/try_parse_range.d.ts.map +1 -1
  61. package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/types.d.ts.map +1 -1
  62. package/types/federation/callback.d.ts +0 -1
  63. package/types/federation/callback.d.ts.map +1 -1
  64. package/types/federation/collection.d.ts +0 -1
  65. package/types/federation/collection.d.ts.map +1 -1
  66. package/types/federation/context.d.ts +0 -2
  67. package/types/federation/context.d.ts.map +1 -1
  68. package/types/federation/federation.d.ts +0 -2
  69. package/types/federation/federation.d.ts.map +1 -1
  70. package/types/federation/handler.d.ts +0 -2
  71. package/types/federation/handler.d.ts.map +1 -1
  72. package/types/federation/keycache.d.ts +0 -1
  73. package/types/federation/keycache.d.ts.map +1 -1
  74. package/types/federation/middleware.d.ts +0 -2
  75. package/types/federation/middleware.d.ts.map +1 -1
  76. package/types/federation/mq.d.ts +0 -1
  77. package/types/federation/mq.d.ts.map +1 -1
  78. package/types/federation/send.d.ts +0 -2
  79. package/types/federation/send.d.ts.map +1 -1
  80. package/types/nodeinfo/client.d.ts +0 -1
  81. package/types/nodeinfo/client.d.ts.map +1 -1
  82. package/types/nodeinfo/handler.d.ts +0 -1
  83. package/types/nodeinfo/handler.d.ts.map +1 -1
  84. package/types/nodeinfo/mod.d.ts +1 -1
  85. package/types/nodeinfo/types.d.ts +1 -2
  86. package/types/nodeinfo/types.d.ts.map +1 -1
  87. package/types/runtime/docloader.d.ts +0 -1
  88. package/types/runtime/docloader.d.ts.map +1 -1
  89. package/types/sig/http.d.ts +0 -2
  90. package/types/sig/http.d.ts.map +1 -1
  91. package/types/sig/key.d.ts +0 -1
  92. package/types/sig/key.d.ts.map +1 -1
  93. package/types/sig/ld.d.ts +0 -1
  94. package/types/sig/ld.d.ts.map +1 -1
  95. package/types/sig/owner.d.ts +0 -1
  96. package/types/sig/owner.d.ts.map +1 -1
  97. package/types/sig/proof.d.ts +0 -1
  98. package/types/sig/proof.d.ts.map +1 -1
  99. package/types/vocab/actor.d.ts +0 -1
  100. package/types/vocab/actor.d.ts.map +1 -1
  101. package/types/vocab/constants.d.ts +0 -1
  102. package/types/vocab/constants.d.ts.map +1 -1
  103. package/types/vocab/lookup.d.ts +0 -1
  104. package/types/vocab/lookup.d.ts.map +1 -1
  105. package/types/vocab/type.d.ts +0 -1
  106. package/types/vocab/type.d.ts.map +1 -1
  107. package/types/vocab/vocab.d.ts +0 -1
  108. package/types/vocab/vocab.d.ts.map +1 -1
  109. package/types/webfinger/handler.d.ts +0 -1
  110. package/types/webfinger/handler.d.ts.map +1 -1
  111. package/types/webfinger/lookup.d.ts +0 -1
  112. package/types/webfinger/lookup.d.ts.map +1 -1
  113. package/types/x/hono.d.ts +0 -1
  114. package/types/x/hono.d.ts.map +1 -1
  115. package/types/x/sveltekit.d.ts +0 -1
  116. package/types/x/sveltekit.d.ts.map +1 -1
  117. package/esm/deps/jsr.io/@std/semver/1.0.3/types.js +0 -3
  118. package/types/deps/jsr.io/@std/semver/1.0.3/parse_range.d.ts.map +0 -1
  119. /package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/compare.js +0 -0
  120. /package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/difference.js +0 -0
  121. /package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/format.js +0 -0
  122. /package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/greater_or_equal.js +0 -0
  123. /package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/is_range.js +0 -0
  124. /package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/less_or_equal.js +0 -0
  125. /package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/less_than.js +0 -0
  126. /package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/max_satisfying.js +0 -0
  127. /package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/min_satisfying.js +0 -0
  128. /package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/not_equals.js +0 -0
  129. /package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/parse.js +0 -0
  130. /package/esm/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/try_parse.js +0 -0
  131. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/_constants.d.ts +0 -0
  132. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/_shared.d.ts +0 -0
  133. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/_test_comparator_set.d.ts +0 -0
  134. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/can_parse.d.ts +0 -0
  135. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/compare.d.ts +0 -0
  136. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/difference.d.ts +0 -0
  137. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/equals.d.ts +0 -0
  138. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/format.d.ts +0 -0
  139. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/format_range.d.ts +0 -0
  140. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/greater_or_equal.d.ts +0 -0
  141. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/greater_than.d.ts +0 -0
  142. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/greater_than_range.d.ts +0 -0
  143. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/increment.d.ts +0 -0
  144. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/is_range.d.ts +0 -0
  145. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/is_semver.d.ts +0 -0
  146. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/less_or_equal.d.ts +0 -0
  147. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/less_than.d.ts +0 -0
  148. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/less_than_range.d.ts +0 -0
  149. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/max_satisfying.d.ts +0 -0
  150. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/min_satisfying.d.ts +0 -0
  151. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/mod.d.ts +0 -0
  152. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/not_equals.d.ts +0 -0
  153. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/parse.d.ts +0 -0
  154. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/parse_range.d.ts +0 -0
  155. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/range_intersects.d.ts +0 -0
  156. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/satisfies.d.ts +0 -0
  157. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/try_parse.d.ts +0 -0
  158. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/try_parse_range.d.ts +0 -0
  159. /package/types/deps/jsr.io/@std/semver/{1.0.3 → 1.0.4}/types.d.ts +0 -0
@@ -0,0 +1,265 @@
1
+ <!-- deno-fmt-ignore-file -->
2
+
3
+ Contributing guide
4
+ ==================
5
+
6
+ Thank you for considering contributing to Fedify! This document explains how to
7
+ contribute to the project.
8
+
9
+
10
+ Bug reports
11
+ -----------
12
+
13
+ If you find a bug in Fedify, first of all, please search the [GitHub issue
14
+ tracker] to see if the bug has already been reported. If it hasn't been
15
+ reported yet, please open a new issue. When you open an issue, please provide
16
+ the following information:
17
+
18
+ - The version of Fedify you are using.
19
+ - The version of Deno you are using.
20
+ - The version of the operating system you are using.
21
+ - The steps to reproduce the bug.
22
+ - The expected behavior.
23
+ - The actual behavior.
24
+
25
+ [GitHub issue tracker]: https://github.com/fedify-dev/fedify/issues
26
+
27
+
28
+ Feature requests
29
+ ----------------
30
+
31
+ If you have a feature request for Fedify, please search the [GitHub issue
32
+ tracker] to see if the feature has already been requested. If it hasn't been
33
+ requested yet, please open a new issue. When you open an issue, please provide
34
+ the following information:
35
+
36
+ - The use case of the feature.
37
+ - The expected behavior.
38
+ - The reason why you think the feature should be implemented in Fedify,
39
+ instead of a third-party library or your own project.
40
+
41
+
42
+ Pull requests
43
+ -------------
44
+
45
+ ### License
46
+
47
+ Fedify is licensed under the [MIT License]. By opening a pull request,
48
+ you agree to license your contribution under the MIT License. If you cannot
49
+ agree to this license, please do not open a pull request.
50
+
51
+ [MIT License]: https://minhee.mit-license.org/2024-2025/
52
+
53
+ ### Building
54
+
55
+ To build the project, see the [*Build* section](#build).
56
+
57
+ ### Coding conventions
58
+
59
+ Please run the following commands before opening a pull request:
60
+
61
+ ~~~~ bash
62
+ cd src/
63
+ deno task check
64
+ ~~~~
65
+
66
+ ### Docs
67
+
68
+ If you want to fix a typo or improve the documentation, you can open a pull
69
+ request without opening an issue.
70
+
71
+ For Markdown, we have the following conventions:
72
+
73
+ - 80 characters at most per line, except for code blocks and URLs.
74
+ - Prefer [reference links] over [inline links].
75
+ - Prefer [setext headings] over [ATX headings].
76
+ - Two new lines before opening an H1/H2 heading.
77
+ - One space before and two spaces after a bullet.
78
+ - Wrap file paths in asterisks.
79
+ - Wrap inline code in backticks.
80
+ - Wrap code blocks in quadruple tildes (`~~~~`), and specify the language with
81
+ a single space after the opening tildes (e.g., `~~~~ bash`).
82
+
83
+ In order to build the docs,
84
+ see the [*Building the docs* section](#building-the-docs).
85
+
86
+ [reference links]: https://spec.commonmark.org/0.31.2/#shortcut-reference-link
87
+ [inline links]: https://spec.commonmark.org/0.31.2/#inline-link
88
+ [setext headings]: https://spec.commonmark.org/0.31.2/#setext-headings
89
+ [ATX headings]: https://spec.commonmark.org/0.31.2/#atx-headings
90
+
91
+ ### Bug fix
92
+
93
+ If you want to fix a bug in Fedify, please search the [GitHub issue tracker] to
94
+ see if the bug has already been reported. If it hasn't been reported yet,
95
+ please open a new issue to discuss the bug.
96
+
97
+ When you open a pull request, please provide the issue number that the pull
98
+ request is related to.
99
+
100
+ A patch set should include the following:
101
+
102
+ - The regression test that demonstrates the bug. It should fail without the
103
+ patch and pass with the patch.
104
+ - The fix for the bug.
105
+ - The *CHANGES.md* entry. The entry should include the issue number,
106
+ the pull request number, and your name (unless you want to be anonymous).
107
+
108
+ Bug fix pull requests should target the most oldest maintenance branch that
109
+ the bug affects. If you are not sure which branch to target, please ask in the
110
+ issue tracker.
111
+
112
+ ### Feature implementation
113
+
114
+ If you want to contribute to Fedify, please open a new issue in the [GitHub
115
+ issue tracker] to discuss the change you want to make. If the change is
116
+ accepted, you can start working on the change. When you open a pull request,
117
+ please provide the following information:
118
+
119
+ - The issue number that the pull request is related to.
120
+ - The description of the change.
121
+ - The reason why the change is needed.
122
+ - The steps to test the change.
123
+
124
+ A patch set should include the following:
125
+
126
+ - The unit tests that demonstrate the feature.
127
+ - The implementation of the feature.
128
+ - If any API change was made, the documentation update for the API.
129
+ - Check if examples work with the change, and update the examples if needed.
130
+ - The *CHANGES.md* entry. The entry should include the issue number,
131
+ the pull request number, and your name (unless you want to be anonymous).
132
+
133
+ Feature pull requests should target the *main* branch.
134
+
135
+
136
+ Build
137
+ -----
138
+
139
+ ### Directories
140
+
141
+ The repository consists of the following directories:
142
+
143
+ - *cli/*: The Fedify CLI. The CLI is built with [Deno].
144
+ - *docs/*: The Fedify docs. The docs are built with [Node.js] and
145
+ [VitePress].
146
+ - *examples/*: The example projects. Some examples are built with Deno, and
147
+ some are built with Node.js.
148
+ - *src/*: The Fedify library. The library is built with Deno, and tested with
149
+ Deno, Node.js, and [Bun].
150
+ - *codegen/*: The code generation scripts.
151
+
152
+ [Deno]: https://deno.com/
153
+ [VitePress]: https://vitepress.dev/
154
+ [Node.js]: https://nodejs.org/
155
+ [Bun]: https://bun.sh/
156
+
157
+ ### Development environment
158
+
159
+ Fedify uses [Deno] as the main development environment. Therefore, you need to
160
+ install Deno to hack on Fedify.
161
+
162
+ > [!TIP]
163
+ > If you use [mise-en-place], a dev tools/env vars manager and a task runner,
164
+ > you can easily install Deno, [Node.js], and [Bun] with following commands:
165
+ >
166
+ > ~~~~ bash
167
+ > mise trust
168
+ > mise install
169
+ > ~~~~
170
+
171
+ The recommended editor for Fedify is [Visual Studio Code] with
172
+ the [Deno extension] installed. Or you can use any editor that supports Deno;
173
+ see the [*Set Up Your Environment* section][1] in the Deno manual.
174
+
175
+ > [!CAUTION]
176
+ >
177
+ > Fedify heavily depends on code generation, so you need to run
178
+ > `deno task codegen` before coding or testing.
179
+
180
+ Assuming you have Deno and Visual Studio Code installed, you can open
181
+ the repository in Visual Studio Code and get ready to hack on Fedify by running
182
+ the following commands at the *root* of the repository:
183
+
184
+ ~~~~ bash
185
+ deno task codegen
186
+ code .
187
+ ~~~~
188
+
189
+ Note that the `deno task codegen` command is required to run only once at
190
+ very first time, or when you update the code generation scripts. Otherwise,
191
+ you can skip the command and just run:
192
+
193
+ ~~~~ bash
194
+ code .
195
+ ~~~~
196
+
197
+ Immediately after running the `code .` command, Visual Studio Code will open
198
+ the repository, and you can start hacking on Fedify. If you encounter the
199
+ following message:
200
+
201
+ > Do you want to install recommended 'Deno' extension from denoland for
202
+ > this repository?
203
+
204
+ Please click the *Install* button to install the Deno extension.
205
+
206
+ [mise-en-place]: https://mise.jdx.dev/
207
+ [Visual Studio Code]: https://code.visualstudio.com/
208
+ [Deno extension]: https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno
209
+ [1]: https://docs.deno.com/runtime/manual/getting_started/setup_your_environment/
210
+
211
+ ### Running the Fedify CLI
212
+
213
+ If you want to test your changes in the Fedify CLI, you can run
214
+ `deno task -f @fedify/cli run` command. For example, if you want to test
215
+ the `fedify lookup` subcommand, you can run the following command:
216
+
217
+ ~~~~ bash
218
+ deno task -f @fedify/cli run lookup @fedify@hollo.social
219
+ ~~~~
220
+
221
+ > [!TIP]
222
+ >
223
+ > Unlike the Fedify library, the Fedify CLI does not have to be tested with
224
+ > Node.js and Bun; you can test the CLI with Deno only.
225
+
226
+ #### Running the tests
227
+
228
+ If you want to test your changes in the Fedify library, you can run
229
+ the following command:
230
+
231
+ ~~~~ bash
232
+ deno task -f @fedify/fedify test
233
+ ~~~~
234
+
235
+ If the tests pass, you should run `deno task test-all` command to test
236
+ the library with Deno, Node.js, and [Bun]:
237
+
238
+ ~~~~ bash
239
+ deno task test-all
240
+ ~~~~
241
+
242
+ Of course, Node.js and Bun should be installed on your system to run the tests
243
+ with Node.js and Bun.
244
+
245
+ > [!TIP]
246
+ > If you use [mise-en-place], a dev tools/env vars manager and a task runner,
247
+ > you can easily install Deno, [Node.js], and [Bun] with a single command:
248
+ >
249
+ > ~~~~ bash
250
+ > mise install
251
+ > ~~~~
252
+
253
+ ### Building the docs
254
+
255
+ If you want to change the Fedify docs, you would like to preview the changes
256
+ in the browser. To do that, you need to install [Bun] first.
257
+ Then you can run the following commands at the *docs/* directory:
258
+
259
+ ~~~~ bash
260
+ bun install
261
+ bun dev
262
+ ~~~~
263
+
264
+ Once the development server is running, you can open your browser and navigate
265
+ to *http://localhost:5173/* to view the docs.
package/SECURITY.md ADDED
@@ -0,0 +1,22 @@
1
+ <!-- deno-fmt-ignore-file -->
2
+
3
+ Security policy
4
+ ===============
5
+
6
+ Supported versions
7
+ ------------------
8
+
9
+ We support the latest two minor versions of the library. For example, if the
10
+ latest version is 0.12.0, we support 0.12.x and 0.11.x.
11
+
12
+
13
+ Reporting a vulnerability
14
+ -------------------------
15
+
16
+ If you think you have found a security issue, please *do not* open a public
17
+ issue. Instead, please open a private vulnerability report by [creating a new
18
+ draft security advisory][1].
19
+
20
+ We will review your report and respond within 48 hours.
21
+
22
+ [1]: https://github.com/fedify-dev/fedify/security/advisories/new
package/SPONSORS.md ADDED
@@ -0,0 +1,41 @@
1
+ Sponsors of Fedify
2
+ ==================
3
+
4
+ This project exists thanks to all the people who contribute, donate, and sponsor
5
+ it. We are grateful for their support. We would like to thank the following
6
+ financial contributors:[^1]
7
+
8
+ [^1]: Those lists are automatically updated every hour.
9
+
10
+ <!-- cSpell: disable -->
11
+ <!-- DO NOT EDIT(h2): this section is automatically generated by the script -->
12
+
13
+ Supporters
14
+ ----------
15
+
16
+ - [Daniel Supernault](https://pixelfed.org/)
17
+ - [tkgka](https://opencollective.com/tkgka)
18
+ - [Blaine](https://opencollective.com/blaine)
19
+
20
+ Backers
21
+ -------
22
+
23
+ yamanoku, Julian Fietkau, okin, Andy Piper, box464, Evan Prodromou, Rafael Goulart, malte
24
+
25
+ One-time donations
26
+ ------------------
27
+
28
+ Markus P, Nils Bergmann, Rameez
29
+
30
+ <!-- /DO NOT EDIT -->
31
+ <!-- cSpell: enable -->
32
+
33
+
34
+ Become a sponsor
35
+ ----------------
36
+
37
+ We welcome financial contributions to help us maintain and improve this project.
38
+ If you would like to become a financial contributor, please visit our
39
+ [Open Collective].
40
+
41
+ [Open Collective]: https://opencollective.com/fedify
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "@fedify/fedify",
3
- "version": "1.5.0-dev.649+ac8cb1f2",
3
+ "version": "1.5.0-dev.652+daece2bb",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./mod.ts",
@@ -19,21 +19,9 @@ export default {
19
19
  "imports": {
20
20
  "@cfworker/json-schema": "npm:@cfworker/json-schema@^2.0.1",
21
21
  "@david/which-runtime": "jsr:@david/which-runtime@^0.2.1",
22
- "@deno/dnt": "jsr:@deno/dnt@0.41.2",
23
- "@fedify/fedify": "./mod.ts",
24
- "@fedify/fedify/federation": "./federation/mod.ts",
25
- "@fedify/fedify/nodeinfo": "./nodeinfo/mod.ts",
26
- "@fedify/fedify/runtime": "./runtime/mod.ts",
27
- "@fedify/fedify/sig": "./sig/mod.ts",
28
- "@fedify/fedify/vocab": "./vocab/mod.ts",
29
- "@fedify/fedify/webfinger": "./webfinger/mod.ts",
30
- "@fedify/fedify/x/denokv": "./x/denokv.ts",
31
- "@fedify/fedify/x/fresh": "./x/fresh.ts",
32
- "@fedify/fedify/x/hono": "./x/hono.ts",
33
- "@fedify/fedify/x/sveltekit": "./x/sveltekit.ts",
22
+ "@deno/dnt": "jsr:@deno/dnt@0.41.3",
34
23
  "@hongminhee/aitertools": "jsr:@hongminhee/aitertools@^0.6.0",
35
24
  "@hugoalh/http-header-link": "jsr:@hugoalh/http-header-link@^1.0.2",
36
- "@logtape/logtape": "jsr:@logtape/logtape@^0.8.1",
37
25
  "@opentelemetry/api": "npm:@opentelemetry/api@^1.9.0",
38
26
  "@opentelemetry/semantic-conventions": "npm:@opentelemetry/semantic-conventions@^1.27.0",
39
27
  "@phensley/language-tag": "npm:@phensley/language-tag@^1.9.0",
@@ -42,10 +30,7 @@ export default {
42
30
  "@std/bytes": "jsr:@std/bytes@^1.0.2",
43
31
  "@std/collections": "jsr:@std/collections@^1.0.6",
44
32
  "@std/encoding": "jsr:@std/encoding@^1.0.5",
45
- "@std/fs": "jsr:@std/fs@^1.0.3",
46
33
  "@std/http": "jsr:@std/http@^1.0.6",
47
- "@std/path": "jsr:@std/path@^1.0.6",
48
- "@std/semver": "jsr:@std/semver@^1.0.3",
49
34
  "@std/testing": "jsr:@std/testing@^0.224.0",
50
35
  "@std/text": "jsr:@std/text@^1.0.6",
51
36
  "@std/url": "jsr:@std/url@^0.225.1",
@@ -65,42 +50,67 @@ export default {
65
50
  "vocab/vocab.ts"
66
51
  ],
67
52
  "exclude": [
68
- ".git/",
69
- ".github/",
70
- ".vscode/",
71
- ".zed/",
53
+ ".dnt-import-map.json",
72
54
  "apidoc/",
73
- "cli/",
74
55
  "codegen/schema.yaml",
75
- "docs/",
76
- "examples/",
77
- "logo.svg",
78
56
  "npm/",
79
57
  "vocab/*.yaml",
80
58
  "!vocab/vocab.ts"
81
59
  ],
82
60
  "tasks": {
83
- "cache": "deno task codegen && deno cache mod.ts",
84
- "check": "deno task codegen && deno fmt --check && deno lint && deno check */*.ts",
85
61
  "codegen": "deno run --allow-read --allow-write --check codegen/main.ts vocab/ ../runtime/ > vocab/vocab.ts && deno fmt vocab/vocab.ts && deno cache vocab/vocab.ts && deno check vocab/vocab.ts",
86
- "test-without-codegen": "deno test --check --doc --allow-read --allow-write --allow-env --unstable-kv --trace-leaks --parallel",
87
- "test": "deno task codegen && deno task test-without-codegen",
88
- "coverage": "rm -rf coverage/ && deno task test --coverage && deno coverage --html coverage",
89
- "bench": "deno task codegen && deno bench --allow-read --allow-write --allow-net --allow-env --allow-run --unstable-kv",
90
- "apidoc": "deno task codegen && deno doc --html --name=Fedify --output=apidoc/ mod.ts",
91
62
  "check-version": "deno run ../cli/scripts/check_version.ts",
92
- "publish": "deno task codegen && deno publish",
93
- "dnt-without-codegen": "deno run -A dnt.ts",
94
- "dnt": "deno task codegen && deno task dnt-without-codegen",
95
- "test-all": "deno task check && deno task test-without-codegen && deno task dnt-without-codegen && cd npm/ && bun run ./test_runner.js && cd ../",
96
- "update": "deno run --allow-env --allow-read --allow-write=. --allow-run=git,deno --allow-net=jsr.io,registry.npmjs.org jsr:@molt/cli ./*.ts",
97
- "update:commit": "deno task -q update --commit --pre-commit=fmt,lint",
98
- "hooks:install": "deno run --allow-read=deno.json,.git/hooks/ --allow-write=.git/hooks/ jsr:@hongminhee/deno-task-hooks",
99
- "hooks:pre-commit": "deno task check && deno task check-version"
100
- },
101
- "unstable": [
102
- "kv",
103
- "temporal"
104
- ],
105
- "lock": false
63
+ "cache": {
64
+ "command": "deno cache mod.ts",
65
+ "dependencies": [
66
+ "check-version",
67
+ "codegen"
68
+ ]
69
+ },
70
+ "check": {
71
+ "command": "deno fmt --check && deno lint && deno check */*.ts",
72
+ "dependencies": [
73
+ "codegen"
74
+ ]
75
+ },
76
+ "test": {
77
+ "command": "deno test --check --doc --allow-read --allow-write --allow-env --unstable-kv --trace-leaks --parallel",
78
+ "dependencies": [
79
+ "codegen"
80
+ ]
81
+ },
82
+ "coverage": "deno task test --clean --coverage && deno coverage --html coverage",
83
+ "bench": {
84
+ "command": "deno bench --allow-read --allow-write --allow-net --allow-env --allow-run --unstable-kv",
85
+ "dependencies": [
86
+ "codegen"
87
+ ]
88
+ },
89
+ "apidoc": {
90
+ "command": "deno doc --html --name=Fedify --output=apidoc/ mod.ts",
91
+ "dependencies": [
92
+ "codegen"
93
+ ]
94
+ },
95
+ "publish": {
96
+ "command": "deno publish",
97
+ "dependencies": [
98
+ "codegen"
99
+ ]
100
+ },
101
+ "dnt": {
102
+ "command": "deno run -A dnt.ts",
103
+ "dependencies": [
104
+ "codegen"
105
+ ]
106
+ },
107
+ "test-all": {
108
+ "command": "cd npm/ && bun run ./test_runner.js && cd ../",
109
+ "dependencies": [
110
+ "check",
111
+ "test",
112
+ "dnt"
113
+ ]
114
+ }
115
+ }
106
116
  };
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  /**
3
3
  * The minimum valid SemVer object. Equivalent to `0.0.0`.
4
4
  */
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  export function compareNumber(a, b) {
3
3
  if (isNaN(a) || isNaN(b)) {
4
4
  throw new Error("Cannot compare against non-numbers");
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  import { isWildcardComparator } from "./_shared.js";
3
3
  import { compare } from "./compare.js";
4
4
  function testComparator(version, comparator) {
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { parse } from "./parse.js";
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { compare } from "./compare.js";
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { format } from "./format.js";
4
4
  import { isWildcardComparator } from "./_shared.js";
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { compare } from "./compare.js";
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { testComparatorSet } from "./_test_comparator_set.js";
4
4
  import { isWildcardComparator } from "./_shared.js";
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { parseBuild } from "./_shared.js";
4
4
  function bumpPrereleaseNumber(prerelease = []) {
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { ANY } from "./_constants.js";
4
4
  import { isValidNumber, isValidString } from "./_shared.js";
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { testComparatorSet } from "./_test_comparator_set.js";
4
4
  import { isWildcardComparator } from "./_shared.js";
@@ -1,5 +1,5 @@
1
1
  // Copyright Isaac Z. Schlueter and Contributors. All rights reserved. ISC license.
2
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
3
  // This module is browser compatible.
4
4
  /**
5
5
  * The Semantic Version parser.
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { COMPARATOR_REGEXP, OPERATOR_XRANGE_REGEXP, parseBuild, parseNumber, parsePrerelease, XRANGE, } from "./_shared.js";
4
4
  import { ALL, ANY } from "./_constants.js";
@@ -95,9 +95,7 @@ function handleRightHyphenRangeGroups(rightGroups) {
95
95
  major: +rightGroups.major,
96
96
  minor: +rightGroups.minor,
97
97
  patch: +rightGroups.patch,
98
- prerelease: rightGroups.prerelease
99
- ? parsePrerelease(rightGroups.prerelease)
100
- : [],
98
+ prerelease: [],
101
99
  build: [],
102
100
  };
103
101
  }
@@ -105,16 +103,16 @@ function parseHyphenRange(range) {
105
103
  const leftMatch = range.match(new RegExp(`^${XRANGE}`));
106
104
  const leftGroup = leftMatch?.groups;
107
105
  if (!leftGroup)
108
- return;
106
+ return null;
109
107
  const leftLength = leftMatch[0].length;
110
108
  const hyphenMatch = range.slice(leftLength).match(/^\s+-\s+/);
111
109
  if (!hyphenMatch)
112
- return;
110
+ return null;
113
111
  const hyphenLength = hyphenMatch[0].length;
114
112
  const rightMatch = range.slice(leftLength + hyphenLength).match(new RegExp(`^${XRANGE}\\s*$`));
115
113
  const rightGroups = rightMatch?.groups;
116
114
  if (!rightGroups)
117
- return;
115
+ return null;
118
116
  const from = handleLeftHyphenRangeGroups(leftGroup);
119
117
  const to = handleRightHyphenRangeGroups(rightGroups);
120
118
  return [from, to].filter(Boolean);
@@ -203,7 +201,7 @@ function handleLessThanOperator(groups) {
203
201
  if (minorIsWildcard) {
204
202
  if (patchIsWildcard)
205
203
  return [{ operator: "<", major, minor: 0, patch: 0 }];
206
- return [{ operator: "<", major, minor, patch: 0 }];
204
+ return [{ operator: "<", major, minor: 0, patch: 0 }];
207
205
  }
208
206
  if (patchIsWildcard)
209
207
  return [{ operator: "<", major, minor, patch: 0 }];
@@ -261,7 +259,7 @@ function handleGreaterOrEqualOperator(groups) {
261
259
  if (minorIsWildcard) {
262
260
  if (patchIsWildcard)
263
261
  return [{ operator: ">=", major, minor: 0, patch: 0 }];
264
- return [{ operator: ">=", major, minor, patch: 0 }];
262
+ return [{ operator: ">=", major, minor: 0, patch: 0 }];
265
263
  }
266
264
  if (patchIsWildcard)
267
265
  return [{ operator: ">=", major, minor, patch: 0 }];
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { isWildcardComparator } from "./_shared.js";
4
4
  import { compare } from "./compare.js";
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  import { testComparatorSet } from "./_test_comparator_set.js";
3
3
  /**
4
4
  * Test to see if the SemVer satisfies the range.
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { parseRange } from "./parse_range.js";
4
4
  /**
@@ -0,0 +1,3 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+ export {};
@@ -1,5 +1,4 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
- import { verifyObject } from "../mod.js";
3
2
  import { getLogger, withContext } from "@logtape/logtape";
4
3
  import { context, propagation, SpanKind, SpanStatusCode, trace, } from "@opentelemetry/api";
5
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";
@@ -12,7 +11,7 @@ import { verifyRequest } from "../sig/http.js";
12
11
  import { exportJwk, importJwk, validateCryptoKey } from "../sig/key.js";
13
12
  import { hasSignature, signJsonLd } from "../sig/ld.js";
14
13
  import { getKeyOwner } from "../sig/owner.js";
15
- import { signObject } from "../sig/proof.js";
14
+ import { signObject, verifyObject } from "../sig/proof.js";
16
15
  import { lookupObject, traverseCollection, } from "../vocab/lookup.js";
17
16
  import { getTypeId } from "../vocab/type.js";
18
17
  import { Activity, CryptographicKey, Multikey, } from "../vocab/vocab.js";
@@ -73,11 +72,11 @@ export class FederationImpl {
73
72
  const logger = getLogger(["fedify", "federation"]);
74
73
  this.kv = options.kv;
75
74
  this.kvPrefixes = {
76
- ...({
75
+ ...{
77
76
  activityIdempotence: ["_fedify", "activityIdempotence"],
78
77
  remoteDocument: ["_fedify", "remoteDocument"],
79
78
  publicKey: ["_fedify", "publicKey"],
80
- }),
79
+ },
81
80
  ...(options.kvPrefixes ?? {}),
82
81
  };
83
82
  if (options.queue == null) {