@evanp/activitypub-bot 0.51.2 → 0.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +235 -0
- package/lib/app.js +2 -0
- package/lib/botcontext.js +5 -32
- package/lib/microsyntax.js +5 -21
- package/lib/routes/static.js +12 -0
- package/package.json +6 -4
- package/web/profile.html +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,45 @@ and this project adheres to
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.52.0] - 2026-10-05
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- `GET /js/ap-components.min.js` to serve the installed ap-components bundle
|
|
17
|
+
locally, with cache revalidation.
|
|
18
|
+
- Regression tests for local component serving, injected fetch usage, reverse
|
|
19
|
+
WebFinger metadata, and discovery failures.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Serve ap-components from the installed npm dependency at
|
|
24
|
+
`/js/ap-components.min.js` instead of loading it from a CDN on profile pages.
|
|
25
|
+
- Use activitypub-webfinger for actor ID discovery, mention resolution, and
|
|
26
|
+
reverse WebFinger lookup, with SafeFetcher.fetch bound once per instance.
|
|
27
|
+
- Reverse WebFinger lookups now fetch directly through SafeFetcher instead of
|
|
28
|
+
the cached, signed ActivityPub client.
|
|
29
|
+
- Return `null` on failed WebFinger discovery in `BotContext.toActorId()`.
|
|
30
|
+
|
|
31
|
+
## [0.51.4] 2026-09-29
|
|
32
|
+
|
|
33
|
+
### Updated
|
|
34
|
+
|
|
35
|
+
- activitystrea.ms to 4.0.1.
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- Restored ESLint 9 compatibility with neostandard so `npm ci` can complete
|
|
40
|
+
in the release workflow.
|
|
41
|
+
|
|
42
|
+
## [0.51.3] 2026-09-29
|
|
43
|
+
|
|
44
|
+
### Updated
|
|
45
|
+
|
|
46
|
+
- dependencies: csv-parse, express-rate-limit, mysql2, nanoid, pg,
|
|
47
|
+
rate-limit-redis, redis, and transitive dependencies ip-address, qs, undici.
|
|
48
|
+
- ESLint to 10.x.
|
|
49
|
+
- GitHub Actions: actions/checkout and actions/setup-node to v7.
|
|
50
|
+
|
|
12
51
|
## [0.51.2] 2026-08-19
|
|
13
52
|
|
|
14
53
|
### Updated
|
|
@@ -1642,3 +1681,199 @@ Hot patch on the `stable` branch.
|
|
|
1642
1681
|
- Sequelize drivers for SQLite, Postgres, and MySQL.
|
|
1643
1682
|
- Docker multi-platform build workflow.
|
|
1644
1683
|
- Dependabot configuration.
|
|
1684
|
+
|
|
1685
|
+
[Unreleased]: https://github.com/evanp/activitypub-bot/compare/v0.52.0...HEAD
|
|
1686
|
+
[0.52.0]: https://github.com/evanp/activitypub-bot/compare/v0.51.4...v0.52.0
|
|
1687
|
+
[0.51.4]: https://github.com/evanp/activitypub-bot/compare/v0.51.3...v0.51.4
|
|
1688
|
+
[0.51.3]: https://github.com/evanp/activitypub-bot/compare/v0.51.2...v0.51.3
|
|
1689
|
+
[0.51.2]: https://github.com/evanp/activitypub-bot/compare/v0.51.1...v0.51.2
|
|
1690
|
+
[0.51.1]: https://github.com/evanp/activitypub-bot/compare/v0.51.0...v0.51.1
|
|
1691
|
+
[0.51.0]: https://github.com/evanp/activitypub-bot/compare/v0.50.2...v0.51.0
|
|
1692
|
+
[0.50.2]: https://github.com/evanp/activitypub-bot/compare/v0.50.1...v0.50.2
|
|
1693
|
+
[0.50.1]: https://github.com/evanp/activitypub-bot/compare/v0.50.0...v0.50.1
|
|
1694
|
+
[0.50.0]: https://github.com/evanp/activitypub-bot/compare/v0.49.1...v0.50.0
|
|
1695
|
+
[0.49.1]: https://github.com/evanp/activitypub-bot/compare/v0.49.0...v0.49.1
|
|
1696
|
+
[0.49.0]: https://github.com/evanp/activitypub-bot/compare/v0.48.2...v0.49.0
|
|
1697
|
+
[0.48.2]: https://github.com/evanp/activitypub-bot/compare/v0.48.1...v0.48.2
|
|
1698
|
+
[0.48.1]: https://github.com/evanp/activitypub-bot/compare/v0.48.0...v0.48.1
|
|
1699
|
+
[0.48.0]: https://github.com/evanp/activitypub-bot/compare/v0.47.1...v0.48.0
|
|
1700
|
+
[0.47.1]: https://github.com/evanp/activitypub-bot/compare/v0.47.0...v0.47.1
|
|
1701
|
+
[0.47.0]: https://github.com/evanp/activitypub-bot/compare/v0.46.5...v0.47.0
|
|
1702
|
+
[0.46.5]: https://github.com/evanp/activitypub-bot/compare/v0.46.4...v0.46.5
|
|
1703
|
+
[0.46.4]: https://github.com/evanp/activitypub-bot/compare/v0.46.3...v0.46.4
|
|
1704
|
+
[0.46.3]: https://github.com/evanp/activitypub-bot/compare/v0.46.2...v0.46.3
|
|
1705
|
+
[0.46.2]: https://github.com/evanp/activitypub-bot/compare/v0.46.1...v0.46.2
|
|
1706
|
+
[0.46.1]: https://github.com/evanp/activitypub-bot/compare/v0.46.0...v0.46.1
|
|
1707
|
+
[0.46.0]: https://github.com/evanp/activitypub-bot/compare/v0.45.20...v0.46.0
|
|
1708
|
+
[0.45.20]: https://github.com/evanp/activitypub-bot/compare/v0.45.19...v0.45.20
|
|
1709
|
+
[0.45.19]: https://github.com/evanp/activitypub-bot/compare/v0.45.18...v0.45.19
|
|
1710
|
+
[0.45.18]: https://github.com/evanp/activitypub-bot/compare/v0.45.17...v0.45.18
|
|
1711
|
+
[0.45.17]: https://github.com/evanp/activitypub-bot/compare/v0.45.16...v0.45.17
|
|
1712
|
+
[0.45.16]: https://github.com/evanp/activitypub-bot/compare/v0.45.15...v0.45.16
|
|
1713
|
+
[0.45.15]: https://github.com/evanp/activitypub-bot/compare/v0.45.14...v0.45.15
|
|
1714
|
+
[0.45.14]: https://github.com/evanp/activitypub-bot/compare/v0.45.13...v0.45.14
|
|
1715
|
+
[0.45.13]: https://github.com/evanp/activitypub-bot/compare/v0.45.12...v0.45.13
|
|
1716
|
+
[0.45.12]: https://github.com/evanp/activitypub-bot/compare/v0.45.11...v0.45.12
|
|
1717
|
+
[0.45.11]: https://github.com/evanp/activitypub-bot/compare/v0.45.10...v0.45.11
|
|
1718
|
+
[0.45.10]: https://github.com/evanp/activitypub-bot/compare/v0.45.9...v0.45.10
|
|
1719
|
+
[0.45.9]: https://github.com/evanp/activitypub-bot/compare/v0.45.8...v0.45.9
|
|
1720
|
+
[0.45.8]: https://github.com/evanp/activitypub-bot/compare/v0.45.7...v0.45.8
|
|
1721
|
+
[0.45.7]: https://github.com/evanp/activitypub-bot/compare/v0.45.6...v0.45.7
|
|
1722
|
+
[0.45.6]: https://github.com/evanp/activitypub-bot/compare/v0.45.5...v0.45.6
|
|
1723
|
+
[0.45.5]: https://github.com/evanp/activitypub-bot/compare/v0.45.4...v0.45.5
|
|
1724
|
+
[0.45.4]: https://github.com/evanp/activitypub-bot/compare/v0.45.3...v0.45.4
|
|
1725
|
+
[0.45.3]: https://github.com/evanp/activitypub-bot/compare/v0.45.2...v0.45.3
|
|
1726
|
+
[0.45.2]: https://github.com/evanp/activitypub-bot/compare/v0.45.1...v0.45.2
|
|
1727
|
+
[0.45.1]: https://github.com/evanp/activitypub-bot/compare/v0.45.0...v0.45.1
|
|
1728
|
+
[0.45.0]: https://github.com/evanp/activitypub-bot/compare/v0.44.3...v0.45.0
|
|
1729
|
+
[0.44.3]: https://github.com/evanp/activitypub-bot/compare/v0.44.2...v0.44.3
|
|
1730
|
+
[0.44.2]: https://github.com/evanp/activitypub-bot/compare/v0.44.1...v0.44.2
|
|
1731
|
+
[0.44.1]: https://github.com/evanp/activitypub-bot/compare/v0.44.0...v0.44.1
|
|
1732
|
+
[0.44.0]: https://github.com/evanp/activitypub-bot/compare/v0.43.3...v0.44.0
|
|
1733
|
+
[0.43.3]: https://github.com/evanp/activitypub-bot/compare/v0.43.2...v0.43.3
|
|
1734
|
+
[0.43.2]: https://github.com/evanp/activitypub-bot/compare/v0.43.1...v0.43.2
|
|
1735
|
+
[0.43.1]: https://github.com/evanp/activitypub-bot/compare/v0.43.0...v0.43.1
|
|
1736
|
+
[0.43.0]: https://github.com/evanp/activitypub-bot/compare/v0.42.1...v0.43.0
|
|
1737
|
+
[0.42.1]: https://github.com/evanp/activitypub-bot/compare/v0.42.0...v0.42.1
|
|
1738
|
+
[0.42.0]: https://github.com/evanp/activitypub-bot/compare/v0.41.3...v0.42.0
|
|
1739
|
+
[0.41.3]: https://github.com/evanp/activitypub-bot/compare/v0.41.2...v0.41.3
|
|
1740
|
+
[0.41.2]: https://github.com/evanp/activitypub-bot/compare/v0.41.1...v0.41.2
|
|
1741
|
+
[0.41.1]: https://github.com/evanp/activitypub-bot/compare/v0.41.0...v0.41.1
|
|
1742
|
+
[0.41.0]: https://github.com/evanp/activitypub-bot/compare/v0.40.2...v0.41.0
|
|
1743
|
+
[0.40.2]: https://github.com/evanp/activitypub-bot/compare/v0.40.1...v0.40.2
|
|
1744
|
+
[0.40.1]: https://github.com/evanp/activitypub-bot/compare/v0.40.0...v0.40.1
|
|
1745
|
+
[0.40.0]: https://github.com/evanp/activitypub-bot/compare/v0.39.6...v0.40.0
|
|
1746
|
+
[0.39.6]: https://github.com/evanp/activitypub-bot/compare/v0.39.5...v0.39.6
|
|
1747
|
+
[0.39.5]: https://github.com/evanp/activitypub-bot/compare/v0.39.4...v0.39.5
|
|
1748
|
+
[0.39.4]: https://github.com/evanp/activitypub-bot/compare/v0.39.3...v0.39.4
|
|
1749
|
+
[0.39.3]: https://github.com/evanp/activitypub-bot/compare/v0.39.2...v0.39.3
|
|
1750
|
+
[0.39.2]: https://github.com/evanp/activitypub-bot/compare/v0.39.1...v0.39.2
|
|
1751
|
+
[0.39.1]: https://github.com/evanp/activitypub-bot/compare/v0.39.0...v0.39.1
|
|
1752
|
+
[0.39.0]: https://github.com/evanp/activitypub-bot/compare/v0.38.4...v0.39.0
|
|
1753
|
+
[0.38.4]: https://github.com/evanp/activitypub-bot/compare/v0.38.3...v0.38.4
|
|
1754
|
+
[0.38.3]: https://github.com/evanp/activitypub-bot/compare/v0.38.2...v0.38.3
|
|
1755
|
+
[0.38.2]: https://github.com/evanp/activitypub-bot/compare/v0.38.1...v0.38.2
|
|
1756
|
+
[0.38.1]: https://github.com/evanp/activitypub-bot/compare/v0.38.0...v0.38.1
|
|
1757
|
+
[0.38.0]: https://github.com/evanp/activitypub-bot/compare/v0.37.1...v0.38.0
|
|
1758
|
+
[0.37.1]: https://github.com/evanp/activitypub-bot/compare/v0.37.0...v0.37.1
|
|
1759
|
+
[0.37.0]: https://github.com/evanp/activitypub-bot/compare/v0.36.2...v0.37.0
|
|
1760
|
+
[0.36.2]: https://github.com/evanp/activitypub-bot/compare/v0.36.1...v0.36.2
|
|
1761
|
+
[0.36.1]: https://github.com/evanp/activitypub-bot/compare/v0.36.0...v0.36.1
|
|
1762
|
+
[0.36.0]: https://github.com/evanp/activitypub-bot/compare/v0.35.0...v0.36.0
|
|
1763
|
+
[0.35.0]: https://github.com/evanp/activitypub-bot/compare/v0.34.1...v0.35.0
|
|
1764
|
+
[0.34.1]: https://github.com/evanp/activitypub-bot/compare/v0.34.0...v0.34.1
|
|
1765
|
+
[0.34.0]: https://github.com/evanp/activitypub-bot/compare/v0.33.0...v0.34.0
|
|
1766
|
+
[0.33.0]: https://github.com/evanp/activitypub-bot/compare/v0.32.3...v0.33.0
|
|
1767
|
+
[0.32.3]: https://github.com/evanp/activitypub-bot/compare/v0.32.2...v0.32.3
|
|
1768
|
+
[0.32.2]: https://github.com/evanp/activitypub-bot/compare/v0.32.1...v0.32.2
|
|
1769
|
+
[0.32.1]: https://github.com/evanp/activitypub-bot/compare/v0.32.0...v0.32.1
|
|
1770
|
+
[0.32.0]: https://github.com/evanp/activitypub-bot/compare/v0.31.1...v0.32.0
|
|
1771
|
+
[0.31.1]: https://github.com/evanp/activitypub-bot/compare/v0.31.0...v0.31.1
|
|
1772
|
+
[0.31.0]: https://github.com/evanp/activitypub-bot/compare/v0.30.6...v0.31.0
|
|
1773
|
+
[0.30.6]: https://github.com/evanp/activitypub-bot/compare/v0.30.5...v0.30.6
|
|
1774
|
+
[0.30.5]: https://github.com/evanp/activitypub-bot/compare/v0.30.4...v0.30.5
|
|
1775
|
+
[0.30.4]: https://github.com/evanp/activitypub-bot/compare/v0.30.3...v0.30.4
|
|
1776
|
+
[0.30.3]: https://github.com/evanp/activitypub-bot/compare/v0.30.2...v0.30.3
|
|
1777
|
+
[0.30.2]: https://github.com/evanp/activitypub-bot/compare/v0.30.1...v0.30.2
|
|
1778
|
+
[0.30.1]: https://github.com/evanp/activitypub-bot/compare/v0.30.0...v0.30.1
|
|
1779
|
+
[0.30.0]: https://github.com/evanp/activitypub-bot/compare/v0.29.0...v0.30.0
|
|
1780
|
+
[0.29.0]: https://github.com/evanp/activitypub-bot/compare/v0.28.7...v0.29.0
|
|
1781
|
+
[0.28.7]: https://github.com/evanp/activitypub-bot/compare/v0.28.6...v0.28.7
|
|
1782
|
+
[0.28.6]: https://github.com/evanp/activitypub-bot/compare/v0.28.5...v0.28.6
|
|
1783
|
+
[0.28.5]: https://github.com/evanp/activitypub-bot/compare/v0.28.4...v0.28.5
|
|
1784
|
+
[0.28.4]: https://github.com/evanp/activitypub-bot/compare/v0.28.3...v0.28.4
|
|
1785
|
+
[0.28.3]: https://github.com/evanp/activitypub-bot/compare/v0.28.2...v0.28.3
|
|
1786
|
+
[0.28.2]: https://github.com/evanp/activitypub-bot/compare/v0.28.1...v0.28.2
|
|
1787
|
+
[0.28.1]: https://github.com/evanp/activitypub-bot/compare/v0.28.0...v0.28.1
|
|
1788
|
+
[0.28.0]: https://github.com/evanp/activitypub-bot/compare/v0.27.1...v0.28.0
|
|
1789
|
+
[0.27.1]: https://github.com/evanp/activitypub-bot/compare/v0.27.0...v0.27.1
|
|
1790
|
+
[0.27.0]: https://github.com/evanp/activitypub-bot/compare/v0.26.3...v0.27.0
|
|
1791
|
+
[0.26.3]: https://github.com/evanp/activitypub-bot/compare/v0.26.2...v0.26.3
|
|
1792
|
+
[0.26.2]: https://github.com/evanp/activitypub-bot/compare/v0.26.1...v0.26.2
|
|
1793
|
+
[0.26.1]: https://github.com/evanp/activitypub-bot/compare/v0.26.0...v0.26.1
|
|
1794
|
+
[0.26.0]: https://github.com/evanp/activitypub-bot/compare/v0.25.1...v0.26.0
|
|
1795
|
+
[0.25.1]: https://github.com/evanp/activitypub-bot/compare/v0.25.0...v0.25.1
|
|
1796
|
+
[0.25.0]: https://github.com/evanp/activitypub-bot/compare/v0.24.2...v0.25.0
|
|
1797
|
+
[0.24.2]: https://github.com/evanp/activitypub-bot/compare/v0.24.1...v0.24.2
|
|
1798
|
+
[0.24.1]: https://github.com/evanp/activitypub-bot/compare/v0.24.0...v0.24.1
|
|
1799
|
+
[0.24.0]: https://github.com/evanp/activitypub-bot/compare/v0.23.0...v0.24.0
|
|
1800
|
+
[0.23.0]: https://github.com/evanp/activitypub-bot/compare/v0.22.0...v0.23.0
|
|
1801
|
+
[0.22.0]: https://github.com/evanp/activitypub-bot/compare/v0.21.2...v0.22.0
|
|
1802
|
+
[0.21.2]: https://github.com/evanp/activitypub-bot/compare/v0.21.1...v0.21.2
|
|
1803
|
+
[0.21.1]: https://github.com/evanp/activitypub-bot/compare/v0.21.0...v0.21.1
|
|
1804
|
+
[0.21.0]: https://github.com/evanp/activitypub-bot/compare/v0.20.1...v0.21.0
|
|
1805
|
+
[0.20.1]: https://github.com/evanp/activitypub-bot/compare/v0.20.0...v0.20.1
|
|
1806
|
+
[0.20.0]: https://github.com/evanp/activitypub-bot/compare/v0.19.0...v0.20.0
|
|
1807
|
+
[0.19.0]: https://github.com/evanp/activitypub-bot/compare/v0.18.0...v0.19.0
|
|
1808
|
+
[0.18.0]: https://github.com/evanp/activitypub-bot/compare/v0.17.0...v0.18.0
|
|
1809
|
+
[0.17.0]: https://github.com/evanp/activitypub-bot/compare/v0.16.7...v0.17.0
|
|
1810
|
+
[0.16.7]: https://github.com/evanp/activitypub-bot/compare/v0.16.6...v0.16.7
|
|
1811
|
+
[0.16.6]: https://github.com/evanp/activitypub-bot/compare/v0.16.5...v0.16.6
|
|
1812
|
+
[0.16.5]: https://github.com/evanp/activitypub-bot/compare/v0.16.4...v0.16.5
|
|
1813
|
+
[0.16.4]: https://github.com/evanp/activitypub-bot/compare/v0.16.3...v0.16.4
|
|
1814
|
+
[0.16.3]: https://github.com/evanp/activitypub-bot/compare/v0.16.2...v0.16.3
|
|
1815
|
+
[0.16.2]: https://github.com/evanp/activitypub-bot/compare/v0.16.1...v0.16.2
|
|
1816
|
+
[0.16.1]: https://github.com/evanp/activitypub-bot/compare/v0.16.0...v0.16.1
|
|
1817
|
+
[0.16.0]: https://github.com/evanp/activitypub-bot/compare/v0.15.4...v0.16.0
|
|
1818
|
+
[0.15.4]: https://github.com/evanp/activitypub-bot/compare/v0.15.3...v0.15.4
|
|
1819
|
+
[0.15.3]: https://github.com/evanp/activitypub-bot/compare/v0.15.2...v0.15.3
|
|
1820
|
+
[0.15.2]: https://github.com/evanp/activitypub-bot/compare/v0.15.1...v0.15.2
|
|
1821
|
+
[0.15.1]: https://github.com/evanp/activitypub-bot/compare/v0.15.0...v0.15.1
|
|
1822
|
+
[0.15.0]: https://github.com/evanp/activitypub-bot/compare/v0.14.2...v0.15.0
|
|
1823
|
+
[0.14.2]: https://github.com/evanp/activitypub-bot/compare/v0.14.1...v0.14.2
|
|
1824
|
+
[0.14.1]: https://github.com/evanp/activitypub-bot/compare/v0.14.0...v0.14.1
|
|
1825
|
+
[0.14.0]: https://github.com/evanp/activitypub-bot/compare/v0.13.14...v0.14.0
|
|
1826
|
+
[0.13.14]: https://github.com/evanp/activitypub-bot/compare/v0.13.13...v0.13.14
|
|
1827
|
+
[0.13.13]: https://github.com/evanp/activitypub-bot/compare/v0.13.12...v0.13.13
|
|
1828
|
+
[0.13.12]: https://github.com/evanp/activitypub-bot/compare/v0.13.11...v0.13.12
|
|
1829
|
+
[0.13.11]: https://github.com/evanp/activitypub-bot/compare/v0.13.10...v0.13.11
|
|
1830
|
+
[0.13.10]: https://github.com/evanp/activitypub-bot/compare/v0.13.9...v0.13.10
|
|
1831
|
+
[0.13.9]: https://github.com/evanp/activitypub-bot/compare/v0.13.8...v0.13.9
|
|
1832
|
+
[0.13.8]: https://github.com/evanp/activitypub-bot/compare/v0.13.7...v0.13.8
|
|
1833
|
+
[0.13.7]: https://github.com/evanp/activitypub-bot/compare/v0.13.6...v0.13.7
|
|
1834
|
+
[0.13.6]: https://github.com/evanp/activitypub-bot/compare/v0.13.5...v0.13.6
|
|
1835
|
+
[0.13.5]: https://github.com/evanp/activitypub-bot/compare/v0.13.4...v0.13.5
|
|
1836
|
+
[0.13.4]: https://github.com/evanp/activitypub-bot/compare/v0.13.3...v0.13.4
|
|
1837
|
+
[0.13.3]: https://github.com/evanp/activitypub-bot/compare/v0.13.2...v0.13.3
|
|
1838
|
+
[0.13.2]: https://github.com/evanp/activitypub-bot/compare/v0.13.1...v0.13.2
|
|
1839
|
+
[0.13.1]: https://github.com/evanp/activitypub-bot/compare/v0.13.0...v0.13.1
|
|
1840
|
+
[0.13.0]: https://github.com/evanp/activitypub-bot/compare/v0.12.1...v0.13.0
|
|
1841
|
+
[0.12.1]: https://github.com/evanp/activitypub-bot/compare/v0.12.0...v0.12.1
|
|
1842
|
+
[0.12.0]: https://github.com/evanp/activitypub-bot/compare/v0.11.0...v0.12.0
|
|
1843
|
+
[0.11.0]: https://github.com/evanp/activitypub-bot/compare/v0.10.0...v0.11.0
|
|
1844
|
+
[0.10.0]: https://github.com/evanp/activitypub-bot/compare/v0.9.0...v0.10.0
|
|
1845
|
+
[0.9.0]: https://github.com/evanp/activitypub-bot/compare/v0.8.0...v0.9.0
|
|
1846
|
+
[0.8.0]: https://github.com/evanp/activitypub-bot/compare/v0.7.5...v0.8.0
|
|
1847
|
+
[0.7.5]: https://github.com/evanp/activitypub-bot/compare/v0.7.4...v0.7.5
|
|
1848
|
+
[0.7.4]: https://github.com/evanp/activitypub-bot/compare/v0.7.3...v0.7.4
|
|
1849
|
+
[0.7.3]: https://github.com/evanp/activitypub-bot/compare/v0.7.2...v0.7.3
|
|
1850
|
+
[0.7.2]: https://github.com/evanp/activitypub-bot/compare/v0.7.1...v0.7.2
|
|
1851
|
+
[0.7.1]: https://github.com/evanp/activitypub-bot/compare/v0.7.0...v0.7.1
|
|
1852
|
+
[0.7.0]: https://github.com/evanp/activitypub-bot/compare/v0.6.0...v0.7.0
|
|
1853
|
+
[0.6.0]: https://github.com/evanp/activitypub-bot/compare/v0.5.7...v0.6.0
|
|
1854
|
+
[0.5.7]: https://github.com/evanp/activitypub-bot/compare/v0.5.6...v0.5.7
|
|
1855
|
+
[0.5.6]: https://github.com/evanp/activitypub-bot/compare/v0.5.5...v0.5.6
|
|
1856
|
+
[0.5.5]: https://github.com/evanp/activitypub-bot/compare/v0.5.4...v0.5.5
|
|
1857
|
+
[0.5.4]: https://github.com/evanp/activitypub-bot/compare/v0.5.3...v0.5.4
|
|
1858
|
+
[0.5.3]: https://github.com/evanp/activitypub-bot/compare/v0.5.2...v0.5.3
|
|
1859
|
+
[0.5.2]: https://github.com/evanp/activitypub-bot/compare/v0.5.1...v0.5.2
|
|
1860
|
+
[0.5.1]: https://github.com/evanp/activitypub-bot/compare/v0.5.0...v0.5.1
|
|
1861
|
+
[0.5.0]: https://github.com/evanp/activitypub-bot/compare/v0.4.10...v0.5.0
|
|
1862
|
+
[0.4.10]: https://github.com/evanp/activitypub-bot/compare/v0.4.9...v0.4.10
|
|
1863
|
+
[0.4.9]: https://github.com/evanp/activitypub-bot/compare/v0.4.8...v0.4.9
|
|
1864
|
+
[0.4.8]: https://github.com/evanp/activitypub-bot/compare/v0.4.7...v0.4.8
|
|
1865
|
+
[0.4.7]: https://github.com/evanp/activitypub-bot/compare/v0.4.6...v0.4.7
|
|
1866
|
+
[0.4.6]: https://github.com/evanp/activitypub-bot/compare/v0.4.5...v0.4.6
|
|
1867
|
+
[0.4.5]: https://github.com/evanp/activitypub-bot/compare/v0.4.4...v0.4.5
|
|
1868
|
+
[0.4.4]: https://github.com/evanp/activitypub-bot/compare/v0.4.3...v0.4.4
|
|
1869
|
+
[0.4.3]: https://github.com/evanp/activitypub-bot/compare/v0.4.2...v0.4.3
|
|
1870
|
+
[0.4.2]: https://github.com/evanp/activitypub-bot/compare/v0.4.1...v0.4.2
|
|
1871
|
+
[0.4.1]: https://github.com/evanp/activitypub-bot/compare/v0.4.0...v0.4.1
|
|
1872
|
+
[0.4.0]: https://github.com/evanp/activitypub-bot/compare/v0.3.4...v0.4.0
|
|
1873
|
+
[0.3.4]: https://github.com/evanp/activitypub-bot/compare/v0.3.3...v0.3.4
|
|
1874
|
+
[0.3.3]: https://github.com/evanp/activitypub-bot/compare/v0.3.2...v0.3.3
|
|
1875
|
+
[0.3.2]: https://github.com/evanp/activitypub-bot/compare/v0.3.1...v0.3.2
|
|
1876
|
+
[0.3.1]: https://github.com/evanp/activitypub-bot/compare/v0.3.0...v0.3.1
|
|
1877
|
+
[0.3.0]: https://github.com/evanp/activitypub-bot/compare/v0.2.0...v0.3.0
|
|
1878
|
+
[0.2.0]: https://github.com/evanp/activitypub-bot/compare/v0.1.0...v0.2.0
|
|
1879
|
+
[0.1.0]: https://github.com/evanp/activitypub-bot/tree/v0.1.0
|
package/lib/app.js
CHANGED
|
@@ -37,6 +37,7 @@ import proxyRouter from './routes/proxy.js'
|
|
|
37
37
|
import nodeinfoRouter from './routes/nodeinfo.js'
|
|
38
38
|
import robotsTxtRouter from './routes/robotstxt.js'
|
|
39
39
|
import faviconRouter from './routes/favicon.js'
|
|
40
|
+
import staticRouter from './routes/static.js'
|
|
40
41
|
import { BotContext } from './botcontext.js'
|
|
41
42
|
import { Transformer } from './microsyntax.js'
|
|
42
43
|
import { HTTPSignatureAuthenticator } from './httpsignatureauthenticator.js'
|
|
@@ -331,6 +332,7 @@ export async function makeApp ({ databaseUrl, origin, bots, logLevel = 'silent',
|
|
|
331
332
|
|
|
332
333
|
// These should not check HTTP Signature even if provided
|
|
333
334
|
|
|
335
|
+
app.use('/', staticRouter)
|
|
334
336
|
app.use('/', healthRouter)
|
|
335
337
|
app.use('/', serverRouter)
|
|
336
338
|
app.use('/', profileRouter)
|
package/lib/botcontext.js
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import assert from 'node:assert'
|
|
2
2
|
|
|
3
3
|
import { nanoid } from 'nanoid'
|
|
4
|
+
import { actorIdOf, webfingerOf } from 'activitypub-webfinger'
|
|
4
5
|
|
|
5
6
|
import as2 from './activitystreams.js'
|
|
6
7
|
|
|
7
|
-
const AS2_TYPES = [
|
|
8
|
-
'application/activity+json',
|
|
9
|
-
'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
|
|
10
|
-
]
|
|
11
|
-
|
|
12
8
|
const AS2_NS = 'https://www.w3.org/ns/activitystreams#'
|
|
13
9
|
|
|
14
|
-
const WF_NS = 'https://purl.archive.org/socialweb/webfinger#'
|
|
15
|
-
|
|
16
10
|
const THREAD_PROP = 'https://purl.archive.org/socialweb/thread#thread'
|
|
17
11
|
const CONVERSATION_PROP = 'http://ostatus.org/schema/1.0/conversation'
|
|
18
12
|
|
|
@@ -28,6 +22,7 @@ export class BotContext {
|
|
|
28
22
|
#logger = null
|
|
29
23
|
#bots
|
|
30
24
|
#fetcher
|
|
25
|
+
#fetch
|
|
31
26
|
|
|
32
27
|
constructor (
|
|
33
28
|
botId,
|
|
@@ -64,6 +59,7 @@ export class BotContext {
|
|
|
64
59
|
this.#bots = bots
|
|
65
60
|
this.#logger = logger.child({ class: 'BotContext', botId })
|
|
66
61
|
this.#fetcher = fetcher
|
|
62
|
+
this.#fetch = fetcher.fetch.bind(fetcher)
|
|
67
63
|
}
|
|
68
64
|
|
|
69
65
|
get botId () {
|
|
@@ -400,34 +396,11 @@ export class BotContext {
|
|
|
400
396
|
if (domain.toLowerCase() === this.#formatter.hostname) {
|
|
401
397
|
return this.#formatter.format({ username })
|
|
402
398
|
}
|
|
403
|
-
|
|
404
|
-
`?resource=acct:${webfinger}`
|
|
405
|
-
const res = await this.#fetcher.fetch(url)
|
|
406
|
-
if (res.status !== 200) {
|
|
407
|
-
throw new Error(`Status ${res.status} fetching ${url}`)
|
|
408
|
-
}
|
|
409
|
-
const json = await res.json()
|
|
410
|
-
const link = json?.links?.find(
|
|
411
|
-
(l) => l.rel === 'self' && AS2_TYPES.includes(l.type)
|
|
412
|
-
)
|
|
413
|
-
return link ? link.href : null
|
|
399
|
+
return await actorIdOf(webfinger, { fetch: this.#fetch })
|
|
414
400
|
}
|
|
415
401
|
|
|
416
402
|
async toWebfinger (actorId) {
|
|
417
|
-
|
|
418
|
-
if (!actor) {
|
|
419
|
-
return null
|
|
420
|
-
}
|
|
421
|
-
const wf = actor.get(WF_NS + 'webfinger')
|
|
422
|
-
if (wf) {
|
|
423
|
-
return wf.value()
|
|
424
|
-
}
|
|
425
|
-
const username = actor.get('preferredUsername')?.first
|
|
426
|
-
if (!username) {
|
|
427
|
-
return null
|
|
428
|
-
}
|
|
429
|
-
const actorUrl = new URL(actor.id)
|
|
430
|
-
return `${username}@${actorUrl.hostname}`
|
|
403
|
+
return await webfingerOf(actorId, { fetch: this.#fetch })
|
|
431
404
|
}
|
|
432
405
|
|
|
433
406
|
async announceObject (obj, actors = null) {
|
package/lib/microsyntax.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import assert from 'node:assert'
|
|
2
|
+
import { actorIdOf } from 'activitypub-webfinger'
|
|
2
3
|
|
|
3
4
|
const AS2 = 'https://www.w3.org/ns/activitystreams#'
|
|
4
5
|
|
|
5
6
|
export class Transformer {
|
|
6
7
|
#tagNamespace = null
|
|
7
8
|
#client = null
|
|
8
|
-
#
|
|
9
|
+
#fetch = null
|
|
9
10
|
#formatter = null
|
|
10
11
|
|
|
11
12
|
constructor (tagNamespace, client, fetcher, formatter) {
|
|
@@ -16,12 +17,12 @@ export class Transformer {
|
|
|
16
17
|
|
|
17
18
|
this.#tagNamespace = tagNamespace
|
|
18
19
|
this.#client = client
|
|
19
|
-
this.#
|
|
20
|
+
this.#fetch = fetcher.fetch.bind(fetcher)
|
|
20
21
|
this.#formatter = formatter
|
|
21
22
|
|
|
22
23
|
assert.ok(this.#tagNamespace)
|
|
23
24
|
assert.ok(this.#client)
|
|
24
|
-
assert.ok(this.#
|
|
25
|
+
assert.ok(this.#fetch)
|
|
25
26
|
assert.ok(this.#formatter)
|
|
26
27
|
}
|
|
27
28
|
|
|
@@ -99,24 +100,7 @@ export class Transformer {
|
|
|
99
100
|
if (domain.toLowerCase() === this.#formatter.hostname) {
|
|
100
101
|
return this.#formatter.format({ username, type: 'profile' })
|
|
101
102
|
}
|
|
102
|
-
const
|
|
103
|
-
`resource=acct:${username}@${domain}`
|
|
104
|
-
let json = null
|
|
105
|
-
try {
|
|
106
|
-
const response = await this.#fetcher.fetch(url,
|
|
107
|
-
{ headers: { Accept: 'application/jrd+json' } })
|
|
108
|
-
if (response.status !== 200) return null
|
|
109
|
-
json = await response.json()
|
|
110
|
-
} catch (error) {
|
|
111
|
-
return null
|
|
112
|
-
}
|
|
113
|
-
if (!json.links) return null
|
|
114
|
-
const link = json.links.find(
|
|
115
|
-
link => link.rel === 'self' &&
|
|
116
|
-
(link.type === 'application/activity+json' ||
|
|
117
|
-
link.type === 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'))
|
|
118
|
-
if (!link) return null
|
|
119
|
-
const actorId = link.href
|
|
103
|
+
const actorId = await actorIdOf(webfinger, { fetch: this.#fetch })
|
|
120
104
|
if (!actorId) return null
|
|
121
105
|
let actor = null
|
|
122
106
|
try {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Router } from 'express'
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
|
|
4
|
+
const router = Router()
|
|
5
|
+
|
|
6
|
+
const COMPONENT_BUNDLE_FILENAME = fileURLToPath(import.meta.resolve('@socialwebfoundation/ap-components/dist/ap-components.min.js'))
|
|
7
|
+
|
|
8
|
+
router.get('/js/ap-components.min.js', (req, res) => {
|
|
9
|
+
res.sendFile(COMPONENT_BUNDLE_FILENAME, { maxAge: 0 })
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
export default router
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evanp/activitypub-bot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.0",
|
|
4
4
|
"description": "server-side ActivityPub bot framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -31,17 +31,19 @@
|
|
|
31
31
|
"homepage": "https://github.com/evanp/activitypub-bot#readme",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@isaacs/ttlcache": "^2.1.4",
|
|
34
|
-
"
|
|
34
|
+
"@socialwebfoundation/ap-components": "^1.4.2",
|
|
35
|
+
"activitypub-webfinger": "^0.2.1",
|
|
36
|
+
"activitystrea.ms": "^4.0.1",
|
|
35
37
|
"csv-parse": "^7.0.0",
|
|
36
38
|
"express": "^5.2.1",
|
|
37
39
|
"express-rate-limit": "^8.3.2",
|
|
38
40
|
"humanhash": "^1.0.4",
|
|
39
41
|
"ipaddr.js": "^2.3.0",
|
|
40
|
-
"nanoid": "^
|
|
42
|
+
"nanoid": "^6.0.1",
|
|
41
43
|
"node-fetch": "^3.3.2",
|
|
42
44
|
"pino": "^10.1.1",
|
|
43
45
|
"pino-http": "^11.0.0",
|
|
44
|
-
"rate-limit-redis": "^
|
|
46
|
+
"rate-limit-redis": "^6.0.1",
|
|
45
47
|
"redis": "^6.0.1",
|
|
46
48
|
"sequelize": "^6.37.7"
|
|
47
49
|
},
|
package/web/profile.html
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
7
|
<meta name="robots" content="noindex,nofollow">
|
|
8
8
|
<title>activitypub.bot</title>
|
|
9
|
-
<script type="module" src="https://unpkg.com/@socialwebfoundation/ap-components"></script>
|
|
10
9
|
<style>
|
|
11
10
|
body { max-width: 60ch; margin: 0 auto; padding: 1rem; }
|
|
12
11
|
</style>
|
|
@@ -19,7 +18,7 @@
|
|
|
19
18
|
</main>
|
|
20
19
|
|
|
21
20
|
<script type="module">
|
|
22
|
-
import { ActivityPubElement } from "
|
|
21
|
+
import { ActivityPubElement } from "/js/ap-components.min.js";
|
|
23
22
|
|
|
24
23
|
const cache = new Map();
|
|
25
24
|
|