feedscout 1.8.0 → 2.0.0-beta.1

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 (236) hide show
  1. package/README.md +1 -1
  2. package/dist/blogrolls/extractors.d.ts +2 -2
  3. package/dist/blogrolls/extractors.js +2 -2
  4. package/dist/blogrolls/index.js +4 -5
  5. package/dist/blogrolls.d.ts +2 -2
  6. package/dist/blogrolls.js +2 -2
  7. package/dist/common/discover/defaults.d.ts +6 -0
  8. package/dist/common/discover/defaults.js +44 -0
  9. package/dist/common/discover/index.js +2 -2
  10. package/dist/common/discover/utils.d.ts +3 -6
  11. package/dist/common/discover/utils.js +1 -28
  12. package/dist/common/locales.js +214 -10
  13. package/dist/common/types.d.ts +3 -2
  14. package/dist/common/uris/feed/types.d.ts +2 -2
  15. package/dist/common/uris/html/types.d.ts +4 -4
  16. package/dist/common/utils.d.ts +6 -4
  17. package/dist/common/utils.js +13 -11
  18. package/dist/favicons/extractors.d.ts +2 -2
  19. package/dist/favicons/extractors.js +2 -2
  20. package/dist/favicons/index.js +4 -5
  21. package/dist/favicons.d.ts +2 -2
  22. package/dist/favicons.js +2 -2
  23. package/dist/feeds/defaults.d.ts +2 -1
  24. package/dist/feeds/defaults.js +116 -9
  25. package/dist/feeds/extractors.d.ts +2 -2
  26. package/dist/feeds/extractors.js +6 -6
  27. package/dist/feeds/index.js +4 -5
  28. package/dist/feeds/platform/handlers/acast.js +26 -0
  29. package/dist/feeds/platform/handlers/ameblo.js +36 -0
  30. package/dist/feeds/platform/handlers/applePodcasts.js +1 -1
  31. package/dist/feeds/platform/handlers/arena.js +42 -0
  32. package/dist/feeds/platform/handlers/artstation.js +52 -0
  33. package/dist/feeds/platform/handlers/audioboom.js +23 -0
  34. package/dist/feeds/platform/handlers/bearblog.js +45 -0
  35. package/dist/feeds/platform/handlers/behance.js +7 -0
  36. package/dist/feeds/platform/handlers/blogspot.js +38 -2
  37. package/dist/feeds/platform/handlers/bookwyrm.js +48 -0
  38. package/dist/feeds/platform/handlers/buttondown.js +43 -0
  39. package/dist/feeds/platform/handlers/buzzsprout.js +22 -0
  40. package/dist/feeds/platform/handlers/codeberg.js +5 -5
  41. package/dist/feeds/platform/handlers/dailymotion.js +16 -0
  42. package/dist/feeds/platform/handlers/deviantart.js +25 -6
  43. package/dist/feeds/platform/handlers/devto.js +8 -0
  44. package/dist/feeds/platform/handlers/discourse.js +70 -0
  45. package/dist/feeds/platform/handlers/dreamwidth.js +48 -0
  46. package/dist/feeds/platform/handlers/exblog.js +35 -0
  47. package/dist/feeds/platform/handlers/fireside.js +24 -0
  48. package/dist/feeds/platform/handlers/friendica.js +44 -0
  49. package/dist/feeds/platform/handlers/ghost.js +30 -0
  50. package/dist/feeds/platform/handlers/github.js +6 -0
  51. package/dist/feeds/platform/handlers/githubGist.js +16 -5
  52. package/dist/feeds/platform/handlers/gitlab.js +31 -13
  53. package/dist/feeds/platform/handlers/goodreads.js +18 -8
  54. package/dist/feeds/platform/handlers/hackernews.js +21 -0
  55. package/dist/feeds/platform/handlers/hashnode.js +1 -1
  56. package/dist/feeds/platform/handlers/hatenablog.js +4 -1
  57. package/dist/feeds/platform/handlers/hearthis.js +32 -0
  58. package/dist/feeds/platform/handlers/heyWorld.js +18 -0
  59. package/dist/feeds/platform/handlers/insanejournal.js +69 -0
  60. package/dist/feeds/platform/handlers/itchio.js +24 -1
  61. package/dist/feeds/platform/handlers/lemmy.js +46 -4
  62. package/dist/feeds/platform/handlers/letterboxd.js +4 -0
  63. package/dist/feeds/platform/handlers/libsyn.js +25 -0
  64. package/dist/feeds/platform/handlers/listed.js +20 -0
  65. package/dist/feeds/platform/handlers/livejournal.js +68 -0
  66. package/dist/feeds/platform/handlers/mastodon.js +32 -0
  67. package/dist/feeds/platform/handlers/mataroa.js +16 -0
  68. package/dist/feeds/platform/handlers/medium.js +2 -2
  69. package/dist/feeds/platform/handlers/microblog.js +55 -0
  70. package/dist/feeds/platform/handlers/misskey.js +40 -0
  71. package/dist/feeds/platform/handlers/myanimelist.js +43 -0
  72. package/dist/feeds/platform/handlers/naverBlog.js +21 -0
  73. package/dist/feeds/platform/handlers/nebula.js +68 -0
  74. package/dist/feeds/platform/handlers/note.js +53 -0
  75. package/dist/feeds/platform/handlers/observable.js +34 -0
  76. package/dist/feeds/platform/handlers/odysee.js +20 -0
  77. package/dist/feeds/platform/handlers/pagecord.js +16 -0
  78. package/dist/feeds/platform/handlers/paragraph.js +1 -2
  79. package/dist/feeds/platform/handlers/pika.js +35 -0
  80. package/dist/feeds/platform/handlers/pinterest.js +13 -0
  81. package/dist/feeds/platform/handlers/pixelfed.js +46 -0
  82. package/dist/feeds/platform/handlers/pleroma.js +34 -0
  83. package/dist/feeds/platform/handlers/podbean.js +29 -0
  84. package/dist/feeds/platform/handlers/podigee.js +29 -0
  85. package/dist/feeds/platform/handlers/posthaven.js +24 -0
  86. package/dist/feeds/platform/handlers/prose.js +26 -0
  87. package/dist/feeds/platform/handlers/qiita.js +58 -0
  88. package/dist/feeds/platform/handlers/reddit.js +83 -9
  89. package/dist/feeds/platform/handlers/rssCom.js +20 -0
  90. package/dist/feeds/platform/handlers/seesaa.js +22 -0
  91. package/dist/feeds/platform/handlers/sourceforge.js +37 -4
  92. package/dist/feeds/platform/handlers/spreaker.js +21 -0
  93. package/dist/feeds/platform/handlers/stackExchange.js +26 -2
  94. package/dist/feeds/platform/handlers/steam.js +7 -0
  95. package/dist/feeds/platform/handlers/tildes.js +41 -0
  96. package/dist/feeds/platform/handlers/tistory.js +16 -0
  97. package/dist/feeds/platform/handlers/transistor.js +29 -0
  98. package/dist/feeds/platform/handlers/velog.js +24 -0
  99. package/dist/feeds/platform/handlers/vimeo.js +6 -0
  100. package/dist/feeds/platform/handlers/weblogLol.js +26 -0
  101. package/dist/feeds/platform/handlers/weebly.js +25 -0
  102. package/dist/feeds/platform/handlers/wordpress.js +173 -28
  103. package/dist/feeds/platform/handlers/writeas.js +51 -0
  104. package/dist/feeds/platform/handlers/ximalaya.js +1 -1
  105. package/dist/feeds/platform/handlers/youtube.js +4 -1
  106. package/dist/feeds/platform/handlers/zenn.js +54 -0
  107. package/dist/feeds.d.ts +3 -3
  108. package/dist/feeds.js +3 -3
  109. package/dist/hubs/discover/index.js +3 -3
  110. package/dist/hubs/feed/index.js +2 -2
  111. package/dist/hubs/headers/index.js +2 -2
  112. package/dist/hubs/html/index.js +2 -2
  113. package/dist/index.d.ts +2 -1
  114. package/dist/index.js +2 -1
  115. package/dist/utils.d.ts +2 -1
  116. package/package.json +24 -64
  117. package/dist/blogrolls/defaults.cjs +0 -51
  118. package/dist/blogrolls/defaults.d.cts +0 -17
  119. package/dist/blogrolls/extractors.cjs +0 -21
  120. package/dist/blogrolls/extractors.d.cts +0 -7
  121. package/dist/blogrolls/index.cjs +0 -26
  122. package/dist/blogrolls/index.d.cts +0 -7
  123. package/dist/blogrolls/types.d.cts +0 -6
  124. package/dist/blogrolls.cjs +0 -13
  125. package/dist/blogrolls.d.cts +0 -4
  126. package/dist/common/discover/index.cjs +0 -105
  127. package/dist/common/discover/utils.cjs +0 -130
  128. package/dist/common/discover/utils.d.cts +0 -8
  129. package/dist/common/locales.cjs +0 -144
  130. package/dist/common/types.cjs +0 -10
  131. package/dist/common/types.d.cts +0 -89
  132. package/dist/common/uris/feed/index.cjs +0 -12
  133. package/dist/common/uris/feed/index.d.cts +0 -6
  134. package/dist/common/uris/feed/types.d.cts +0 -9
  135. package/dist/common/uris/guess/index.cjs +0 -8
  136. package/dist/common/uris/guess/index.d.cts +0 -7
  137. package/dist/common/uris/guess/types.d.cts +0 -10
  138. package/dist/common/uris/guess/utils.cjs +0 -42
  139. package/dist/common/uris/guess/utils.d.cts +0 -8
  140. package/dist/common/uris/headers/index.cjs +0 -26
  141. package/dist/common/uris/headers/index.d.cts +0 -6
  142. package/dist/common/uris/headers/types.d.cts +0 -9
  143. package/dist/common/uris/html/handlers.cjs +0 -45
  144. package/dist/common/uris/html/index.cjs +0 -19
  145. package/dist/common/uris/html/index.d.cts +0 -6
  146. package/dist/common/uris/html/types.d.cts +0 -12
  147. package/dist/common/uris/index.cjs +0 -32
  148. package/dist/common/uris/platform/index.cjs +0 -10
  149. package/dist/common/uris/platform/index.d.cts +0 -7
  150. package/dist/common/uris/platform/types.d.cts +0 -13
  151. package/dist/common/utils.cjs +0 -97
  152. package/dist/common/utils.d.cts +0 -10
  153. package/dist/favicons/defaults.cjs +0 -65
  154. package/dist/favicons/defaults.d.cts +0 -18
  155. package/dist/favicons/extractors.cjs +0 -25
  156. package/dist/favicons/extractors.d.cts +0 -7
  157. package/dist/favicons/index.cjs +0 -30
  158. package/dist/favicons/index.d.cts +0 -7
  159. package/dist/favicons/platform/handlers/bluesky.cjs +0 -27
  160. package/dist/favicons/platform/handlers/codeberg.cjs +0 -19
  161. package/dist/favicons/platform/handlers/deviantart.cjs +0 -29
  162. package/dist/favicons/platform/handlers/devto.cjs +0 -31
  163. package/dist/favicons/platform/handlers/github.cjs +0 -19
  164. package/dist/favicons/platform/handlers/githubGist.cjs +0 -19
  165. package/dist/favicons/platform/handlers/gitlab.cjs +0 -38
  166. package/dist/favicons/platform/handlers/lobsters.cjs +0 -21
  167. package/dist/favicons/platform/handlers/mastodon.cjs +0 -40
  168. package/dist/favicons/platform/handlers/reddit.cjs +0 -42
  169. package/dist/favicons/platform/handlers/sourceforge.cjs +0 -21
  170. package/dist/favicons/platform/handlers/tumblr.cjs +0 -16
  171. package/dist/favicons/types.d.cts +0 -4
  172. package/dist/favicons/utils.cjs +0 -10
  173. package/dist/favicons.cjs +0 -12
  174. package/dist/favicons.d.cts +0 -4
  175. package/dist/feeds/defaults.cjs +0 -178
  176. package/dist/feeds/defaults.d.cts +0 -20
  177. package/dist/feeds/extractors.cjs +0 -46
  178. package/dist/feeds/extractors.d.cts +0 -7
  179. package/dist/feeds/index.cjs +0 -27
  180. package/dist/feeds/index.d.cts +0 -7
  181. package/dist/feeds/platform/handlers/applePodcasts.cjs +0 -26
  182. package/dist/feeds/platform/handlers/behance.cjs +0 -49
  183. package/dist/feeds/platform/handlers/blogspot.cjs +0 -36
  184. package/dist/feeds/platform/handlers/bluesky.cjs +0 -20
  185. package/dist/feeds/platform/handlers/codeberg.cjs +0 -69
  186. package/dist/feeds/platform/handlers/csdn.cjs +0 -20
  187. package/dist/feeds/platform/handlers/dailymotion.cjs +0 -70
  188. package/dist/feeds/platform/handlers/deviantart.cjs +0 -66
  189. package/dist/feeds/platform/handlers/devto.cjs +0 -50
  190. package/dist/feeds/platform/handlers/douban.cjs +0 -56
  191. package/dist/feeds/platform/handlers/github.cjs +0 -116
  192. package/dist/feeds/platform/handlers/githubGist.cjs +0 -45
  193. package/dist/feeds/platform/handlers/gitlab.cjs +0 -80
  194. package/dist/feeds/platform/handlers/goodreads.cjs +0 -39
  195. package/dist/feeds/platform/handlers/hashnode.cjs +0 -16
  196. package/dist/feeds/platform/handlers/hatenablog.cjs +0 -53
  197. package/dist/feeds/platform/handlers/itchio.cjs +0 -88
  198. package/dist/feeds/platform/handlers/kickstarter.cjs +0 -22
  199. package/dist/feeds/platform/handlers/lemmy.cjs +0 -46
  200. package/dist/feeds/platform/handlers/letterboxd.cjs +0 -42
  201. package/dist/feeds/platform/handlers/lobsters.cjs +0 -57
  202. package/dist/feeds/platform/handlers/mastodon.cjs +0 -42
  203. package/dist/feeds/platform/handlers/medium.cjs +0 -68
  204. package/dist/feeds/platform/handlers/paragraph.cjs +0 -21
  205. package/dist/feeds/platform/handlers/pinterest.cjs +0 -44
  206. package/dist/feeds/platform/handlers/producthunt.cjs +0 -29
  207. package/dist/feeds/platform/handlers/reddit.cjs +0 -75
  208. package/dist/feeds/platform/handlers/soundcloud.cjs +0 -39
  209. package/dist/feeds/platform/handlers/sourceforge.cjs +0 -20
  210. package/dist/feeds/platform/handlers/stackExchange.cjs +0 -40
  211. package/dist/feeds/platform/handlers/steam.cjs +0 -28
  212. package/dist/feeds/platform/handlers/substack.cjs +0 -23
  213. package/dist/feeds/platform/handlers/tumblr.cjs +0 -24
  214. package/dist/feeds/platform/handlers/v2ex.cjs +0 -35
  215. package/dist/feeds/platform/handlers/vimeo.cjs +0 -69
  216. package/dist/feeds/platform/handlers/wordpress.cjs +0 -64
  217. package/dist/feeds/platform/handlers/wpengine.cjs +0 -10
  218. package/dist/feeds/platform/handlers/ximalaya.cjs +0 -20
  219. package/dist/feeds/platform/handlers/youtube.cjs +0 -94
  220. package/dist/feeds/types.d.cts +0 -9
  221. package/dist/feeds.cjs +0 -15
  222. package/dist/feeds.d.cts +0 -4
  223. package/dist/hubs/discover/index.cjs +0 -30
  224. package/dist/hubs/discover/index.d.cts +0 -7
  225. package/dist/hubs/discover/types.d.cts +0 -15
  226. package/dist/hubs/feed/index.cjs +0 -32
  227. package/dist/hubs/headers/index.cjs +0 -17
  228. package/dist/hubs/html/index.cjs +0 -28
  229. package/dist/hubs.cjs +0 -0
  230. package/dist/hubs.d.cts +0 -2
  231. package/dist/index.cjs +0 -12
  232. package/dist/index.d.cts +0 -7
  233. package/dist/methods.cjs +0 -15
  234. package/dist/methods.d.cts +0 -7
  235. package/dist/utils.cjs +0 -9
  236. package/dist/utils.d.cts +0 -2
@@ -1,50 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/devto.ts
3
- const hosts = ["dev.to", "www.dev.to"];
4
- const userRegex = /^\/([a-zA-Z0-9_]+)\/?$/;
5
- const tagRegex = /^\/t\/([^/]+)/;
6
- const excludedPaths = [
7
- "tag",
8
- "tags",
9
- "search",
10
- "top",
11
- "latest",
12
- "about",
13
- "contact",
14
- "privacy",
15
- "terms",
16
- "code-of-conduct",
17
- "faq",
18
- "enter",
19
- "settings",
20
- "signout-confirm",
21
- "notifications",
22
- "reading-list",
23
- "dashboard"
24
- ];
25
- const devtoHandler = {
26
- match: (url) => {
27
- return require_utils.isHostOf(url, hosts);
28
- },
29
- resolve: (url) => {
30
- const { pathname } = new URL(url);
31
- const userMatch = pathname.match(userRegex);
32
- if (userMatch?.[1]) {
33
- const username = userMatch[1];
34
- if (!require_utils.isAnyOf(username, excludedPaths)) return [{
35
- uri: `https://dev.to/feed/${username}`,
36
- hint: require_utils.composeHint("devto:posts")
37
- }];
38
- }
39
- const tagMatch = pathname.match(tagRegex);
40
- if (tagMatch?.[1]) return [{
41
- uri: `https://dev.to/feed/tag/${tagMatch[1]}`,
42
- hint: require_utils.composeHint("devto:tag")
43
- }];
44
- return [];
45
- }
46
- };
47
- //#endregion
48
- exports.devtoHandler = devtoHandler;
49
- exports.excludedPaths = excludedPaths;
50
- exports.hosts = hosts;
@@ -1,56 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/douban.ts
3
- const userRegex = /^\/people\/([^/]+)/;
4
- const subjectRegex = /^\/subject\/(\d+)/;
5
- const doubanHandler = {
6
- match: (url) => {
7
- return require_utils.isHostOf(url, "douban.com") || require_utils.isSubdomainOf(url, "douban.com");
8
- },
9
- resolve: (url) => {
10
- const { pathname } = new URL(url);
11
- const userMatch = pathname.match(userRegex);
12
- if (userMatch?.[1]) {
13
- const user = userMatch[1];
14
- return [
15
- {
16
- uri: `https://www.douban.com/feed/people/${user}/interests`,
17
- hint: require_utils.composeHint("douban:interests")
18
- },
19
- {
20
- uri: `https://www.douban.com/feed/people/${user}/reviews`,
21
- hint: require_utils.composeHint("douban:reviews")
22
- },
23
- {
24
- uri: `https://www.douban.com/feed/people/${user}/notes`,
25
- hint: require_utils.composeHint("douban:notes")
26
- }
27
- ];
28
- }
29
- const subjectMatch = pathname.match(subjectRegex);
30
- if (subjectMatch?.[1]) return [{
31
- uri: `https://www.douban.com/feed/subject/${subjectMatch[1]}/reviews`,
32
- hint: require_utils.composeHint("douban:subjectReviews")
33
- }];
34
- if (pathname === "/" || pathname === "") return [
35
- {
36
- uri: "https://www.douban.com/feed/review/book",
37
- hint: require_utils.composeHint("douban:reviews")
38
- },
39
- {
40
- uri: "https://www.douban.com/feed/review/movie",
41
- hint: require_utils.composeHint("douban:reviews")
42
- },
43
- {
44
- uri: "https://www.douban.com/feed/review/music",
45
- hint: require_utils.composeHint("douban:reviews")
46
- },
47
- {
48
- uri: "https://www.douban.com/feed/review/drama",
49
- hint: require_utils.composeHint("douban:reviews")
50
- }
51
- ];
52
- return [];
53
- }
54
- };
55
- //#endregion
56
- exports.doubanHandler = doubanHandler;
@@ -1,116 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/github.ts
3
- const userRegex = /^\/([^/]+)\/?$/;
4
- const repoRegex = /^\/([^/]+)\/([^/]+)/;
5
- const wikiRegex = /\/wiki(\/|$)/;
6
- const discussionsRegex = /\/discussions(\/|$)/;
7
- const branchRegex = /^\/[^/]+\/[^/]+\/tree\/([^/]+)\/?$/;
8
- const fileRegex = /^\/[^/]+\/[^/]+\/(?:blob|commits)\/([^/]+)\/(.+)/;
9
- const hosts = ["github.com", "www.github.com"];
10
- const excludedPaths = [
11
- "about",
12
- "account",
13
- "apps",
14
- "blog",
15
- "careers",
16
- "codespaces",
17
- "collections",
18
- "contact",
19
- "copilot",
20
- "customer-stories",
21
- "dashboard",
22
- "education",
23
- "enterprise",
24
- "events",
25
- "explore",
26
- "features",
27
- "feed",
28
- "home",
29
- "issues",
30
- "join",
31
- "login",
32
- "marketplace",
33
- "new",
34
- "nonprofit",
35
- "notifications",
36
- "organizations",
37
- "orgs",
38
- "password_reset",
39
- "premium-support",
40
- "pricing",
41
- "pulls",
42
- "readme",
43
- "resources",
44
- "search",
45
- "security",
46
- "sessions",
47
- "settings",
48
- "signup",
49
- "site",
50
- "sponsors",
51
- "stars",
52
- "team",
53
- "topics",
54
- "trending",
55
- "watching"
56
- ];
57
- const githubHandler = {
58
- match: (url) => {
59
- return require_utils.isHostOf(url, hosts);
60
- },
61
- resolve: (url) => {
62
- const { pathname } = new URL(url);
63
- const uris = [];
64
- const userMatch = pathname.match(userRegex);
65
- if (userMatch?.[1] && !require_utils.isAnyOf(userMatch[1], excludedPaths)) return [{
66
- uri: `https://github.com/${userMatch[1]}.atom`,
67
- hint: require_utils.composeHint("github:activity")
68
- }];
69
- const repoMatch = pathname.match(repoRegex);
70
- const owner = repoMatch?.[1];
71
- const repo = repoMatch?.[2];
72
- if (!owner || !repo || require_utils.isAnyOf(owner, excludedPaths)) return [];
73
- uris.push({
74
- uri: `https://github.com/${owner}/${repo}/releases.atom`,
75
- hint: require_utils.composeHint("github:releases")
76
- });
77
- uris.push({
78
- uri: `https://github.com/${owner}/${repo}/commits.atom`,
79
- hint: require_utils.composeHint("github:commits")
80
- });
81
- uris.push({
82
- uri: `https://github.com/${owner}/${repo}/tags.atom`,
83
- hint: require_utils.composeHint("github:tags")
84
- });
85
- if (wikiRegex.test(pathname)) uris.push({
86
- uri: `https://github.com/${owner}/${repo}/wiki.atom`,
87
- hint: require_utils.composeHint("github:wiki")
88
- });
89
- if (discussionsRegex.test(pathname)) uris.push({
90
- uri: `https://github.com/${owner}/${repo}/discussions.atom`,
91
- hint: require_utils.composeHint("github:discussions")
92
- });
93
- const branchMatch = pathname.match(branchRegex);
94
- if (branchMatch?.[1]) {
95
- const branch = branchMatch[1];
96
- uris.push({
97
- uri: `https://github.com/${owner}/${repo}/commits/${branch}.atom`,
98
- hint: require_utils.composeHint("github:branch-commits")
99
- });
100
- }
101
- const fileMatch = pathname.match(fileRegex);
102
- if (fileMatch?.[1] && fileMatch?.[2]) {
103
- const branch = fileMatch[1];
104
- const filePath = fileMatch[2];
105
- uris.push({
106
- uri: `https://github.com/${owner}/${repo}/commits/${branch}/${filePath}.atom`,
107
- hint: require_utils.composeHint("github:file-history")
108
- });
109
- }
110
- return uris;
111
- }
112
- };
113
- //#endregion
114
- exports.excludedPaths = excludedPaths;
115
- exports.githubHandler = githubHandler;
116
- exports.hosts = hosts;
@@ -1,45 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/githubGist.ts
3
- const gistRegex = /^\/([^/]+)\/([a-f0-9]+)/;
4
- const starredRegex = /^\/([^/]+)\/starred\/?$/;
5
- const userRegex = /^\/([^/]+)\/?$/;
6
- const hosts = ["gist.github.com"];
7
- const excludedPaths = [
8
- "discover",
9
- "search",
10
- "login",
11
- "join",
12
- "settings"
13
- ];
14
- const githubGistHandler = {
15
- match: (url) => {
16
- return require_utils.isHostOf(url, hosts);
17
- },
18
- resolve: (url) => {
19
- const { pathname } = new URL(url);
20
- const gistMatch = pathname.match(gistRegex);
21
- if (gistMatch?.[1] && gistMatch?.[2]) {
22
- const username = gistMatch[1];
23
- if (!require_utils.isAnyOf(username, excludedPaths)) return [{
24
- uri: `https://gist.github.com/${username}.atom`,
25
- hint: require_utils.composeHint("github-gist:gists")
26
- }];
27
- return [];
28
- }
29
- const starredMatch = pathname.match(starredRegex);
30
- if (starredMatch?.[1] && !require_utils.isAnyOf(starredMatch[1], excludedPaths)) return [{
31
- uri: `https://gist.github.com/${starredMatch[1]}/starred.atom`,
32
- hint: require_utils.composeHint("github-gist:starred")
33
- }];
34
- const userMatch = pathname.match(userRegex);
35
- if (userMatch?.[1] && !require_utils.isAnyOf(userMatch[1], excludedPaths)) return [{
36
- uri: `https://gist.github.com/${userMatch[1]}.atom`,
37
- hint: require_utils.composeHint("github-gist:gists")
38
- }];
39
- return [];
40
- }
41
- };
42
- //#endregion
43
- exports.excludedPaths = excludedPaths;
44
- exports.githubGistHandler = githubGistHandler;
45
- exports.hosts = hosts;
@@ -1,80 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/gitlab.ts
3
- const hosts = ["gitlab.com", "www.gitlab.com"];
4
- const excludedPaths = [
5
- "explore",
6
- "dashboard",
7
- "projects",
8
- "groups",
9
- "search",
10
- "admin",
11
- "help",
12
- "assets",
13
- "users",
14
- "api",
15
- "jwt",
16
- "oauth",
17
- "profile",
18
- "snippets",
19
- "abuse_reports",
20
- "invites",
21
- "import",
22
- "uploads",
23
- "robots.txt",
24
- "sitemap",
25
- "-"
26
- ];
27
- const isGitlabHtml = (content) => {
28
- return require_utils.hasMetaContent(content, "og:site_name", "GitLab");
29
- };
30
- const isGitlabHeaders = (headers) => {
31
- return headers.has("x-gitlab-meta");
32
- };
33
- const gitlabHandler = {
34
- match: (url, content, headers) => {
35
- if (require_utils.isHostOf(url, hosts)) return true;
36
- try {
37
- const { pathname } = new URL(url);
38
- if (pathname.split("/").filter(Boolean).length === 0) return false;
39
- if (content && isGitlabHtml(content)) return true;
40
- if (headers && isGitlabHeaders(headers)) return true;
41
- } catch {}
42
- return false;
43
- },
44
- resolve: (url) => {
45
- const { origin, pathname } = new URL(url);
46
- const pathSegments = pathname.split("/").filter(Boolean);
47
- if (pathSegments.length === 1) {
48
- const user = pathSegments[0];
49
- if (!require_utils.isAnyOf(user, excludedPaths)) return [{
50
- uri: `${origin}/${user}.atom`,
51
- hint: require_utils.composeHint("gitlab:activity")
52
- }];
53
- }
54
- if (pathSegments.length >= 2) {
55
- const user = pathSegments[0];
56
- const repo = pathSegments[1];
57
- if (!require_utils.isAnyOf(user, excludedPaths)) return [
58
- {
59
- uri: `${origin}/${user}/${repo}/-/releases.atom`,
60
- hint: require_utils.composeHint("gitlab:releases")
61
- },
62
- {
63
- uri: `${origin}/${user}/${repo}/-/tags?format=atom`,
64
- hint: require_utils.composeHint("gitlab:tags")
65
- },
66
- {
67
- uri: `${origin}/${user}/${repo}.atom`,
68
- hint: require_utils.composeHint("gitlab:activity")
69
- }
70
- ];
71
- }
72
- return [];
73
- }
74
- };
75
- //#endregion
76
- exports.excludedPaths = excludedPaths;
77
- exports.gitlabHandler = gitlabHandler;
78
- exports.hosts = hosts;
79
- exports.isGitlabHeaders = isGitlabHeaders;
80
- exports.isGitlabHtml = isGitlabHtml;
@@ -1,39 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/goodreads.ts
3
- const hosts = ["goodreads.com", "www.goodreads.com"];
4
- const parseUserId = (segment) => {
5
- const id = Number.parseInt(segment, 10);
6
- return Number.isNaN(id) ? void 0 : id;
7
- };
8
- const goodreadsHandler = {
9
- match: (url) => {
10
- return require_utils.isHostOf(url, hosts);
11
- },
12
- resolve: (url) => {
13
- const { origin, pathname } = new URL(url);
14
- const pathSegments = pathname.split("/").filter(Boolean);
15
- if (pathSegments[0] === "user" && pathSegments[1] === "show" && pathSegments[2]) {
16
- const userId = parseUserId(pathSegments[2]);
17
- if (userId) return [{
18
- uri: `${origin}/user/updates_rss/${userId}`,
19
- hint: require_utils.composeHint("goodreads:updates")
20
- }, {
21
- uri: `${origin}/review/list_rss/${userId}`,
22
- hint: require_utils.composeHint("goodreads:reviews")
23
- }];
24
- }
25
- if (pathSegments[0] === "review" && pathSegments[1] === "list" && pathSegments[2]) {
26
- const userId = parseUserId(pathSegments[2]);
27
- if (userId) return [{
28
- uri: `${origin}/review/list_rss/${userId}`,
29
- hint: require_utils.composeHint("goodreads:reviews")
30
- }, {
31
- uri: `${origin}/user/updates_rss/${userId}`,
32
- hint: require_utils.composeHint("goodreads:updates")
33
- }];
34
- }
35
- return [];
36
- }
37
- };
38
- //#endregion
39
- exports.goodreadsHandler = goodreadsHandler;
@@ -1,16 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/hashnode.ts
3
- const hashnodeHandler = {
4
- match: (url) => {
5
- return require_utils.isSubdomainOf(url, "hashnode.dev");
6
- },
7
- resolve: (url) => {
8
- const { origin } = new URL(url);
9
- return [{
10
- uri: `${origin}/rss.xml`,
11
- hint: require_utils.composeHint("hashnode:blog")
12
- }];
13
- }
14
- };
15
- //#endregion
16
- exports.hashnodeHandler = hashnodeHandler;
@@ -1,53 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/hatenablog.ts
3
- const domains = [
4
- "hatenablog.com",
5
- "hatenablog.jp",
6
- "hateblo.jp"
7
- ];
8
- const categoryRegex = /^\/archive\/category\/([^/]+)/;
9
- const authorRegex = /^\/archive\/author\/([^/]+)/;
10
- const hatenablogHandler = {
11
- match: (url) => {
12
- return require_utils.isSubdomainOf(url, domains);
13
- },
14
- resolve: (url) => {
15
- const { origin, pathname } = new URL(url);
16
- const uris = [];
17
- const categoryMatch = pathname.match(categoryRegex);
18
- if (categoryMatch?.[1]) {
19
- const category = categoryMatch[1];
20
- uris.push({
21
- uri: `${origin}/rss/category/${category}`,
22
- hint: require_utils.composeHint("hatenablog:category-rss")
23
- });
24
- uris.push({
25
- uri: `${origin}/feed/category/${category}`,
26
- hint: require_utils.composeHint("hatenablog:category-atom")
27
- });
28
- }
29
- const authorMatch = pathname.match(authorRegex);
30
- if (authorMatch?.[1]) {
31
- const author = authorMatch[1];
32
- uris.push({
33
- uri: `${origin}/rss/author/${author}`,
34
- hint: require_utils.composeHint("hatenablog:author-rss")
35
- });
36
- uris.push({
37
- uri: `${origin}/feed/author/${author}`,
38
- hint: require_utils.composeHint("hatenablog:author-atom")
39
- });
40
- }
41
- uris.push({
42
- uri: `${origin}/rss`,
43
- hint: require_utils.composeHint("hatenablog:posts-rss")
44
- });
45
- uris.push({
46
- uri: `${origin}/feed`,
47
- hint: require_utils.composeHint("hatenablog:posts-atom")
48
- });
49
- return uris;
50
- }
51
- };
52
- //#endregion
53
- exports.hatenablogHandler = hatenablogHandler;
@@ -1,88 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/itchio.ts
3
- const mainHosts = ["itch.io", "www.itch.io"];
4
- const sections = [
5
- "tools",
6
- "game-assets",
7
- "soundtracks",
8
- "physical-games",
9
- "books",
10
- "comics",
11
- "misc"
12
- ];
13
- const sorts = [
14
- "newest",
15
- "top-rated",
16
- "top-sellers",
17
- "on-sale"
18
- ];
19
- const byUserRegex = /^\/games\/by-([^/]+)/;
20
- const tagRegex = /^\/games\/tag-([^/]+)/;
21
- const sortRegex = /^\/games\/([^/.]+)/;
22
- const sectionRegex = /^\/([^/.]+)/;
23
- const gameRegex = /^\/([^/]+)/;
24
- const itchioHandler = {
25
- match: (url) => {
26
- return require_utils.isHostOf(url, mainHosts) || require_utils.isSubdomainOf(url, "itch.io");
27
- },
28
- resolve: (url) => {
29
- const { hostname, pathname } = new URL(url);
30
- const lowerHostname = hostname.toLowerCase();
31
- if (!mainHosts.includes(lowerHostname) && lowerHostname.endsWith(".itch.io")) {
32
- const creator = lowerHostname.replace(".itch.io", "");
33
- const gameMatch = pathname.match(gameRegex);
34
- if (gameMatch?.[1]) return [{
35
- uri: `https://${creator}.itch.io/${gameMatch[1]}/devlog.rss`,
36
- hint: require_utils.composeHint("itchio:devlog")
37
- }];
38
- return [{
39
- uri: `https://itch.io/games/by-${creator}.xml`,
40
- hint: require_utils.composeHint("itchio:games")
41
- }];
42
- }
43
- const byUserMatch = pathname.match(byUserRegex);
44
- if (byUserMatch?.[1]) return [{
45
- uri: `https://itch.io/games/by-${byUserMatch[1]}.xml`,
46
- hint: require_utils.composeHint("itchio:games")
47
- }];
48
- const tagMatch = pathname.match(tagRegex);
49
- if (tagMatch?.[1]) return [{
50
- uri: `https://itch.io/games/tag-${tagMatch[1]}.xml`,
51
- hint: require_utils.composeHint("itchio:tag")
52
- }];
53
- const sortMatch = pathname.match(sortRegex);
54
- if (sortMatch?.[1] && require_utils.isAnyOf(sortMatch[1], sorts)) return [{
55
- uri: `https://itch.io/games/${sortMatch[1]}.xml`,
56
- hint: require_utils.composeHint("itchio:games")
57
- }];
58
- if (pathname === "/games" || pathname === "/games/") return [{
59
- uri: "https://itch.io/games.xml",
60
- hint: require_utils.composeHint("itchio:games")
61
- }];
62
- if (pathname === "/devlogs" || pathname === "/devlogs/") return [{
63
- uri: "https://itch.io/devlogs.xml",
64
- hint: require_utils.composeHint("itchio:devlog")
65
- }];
66
- const sectionMatch = pathname.match(sectionRegex);
67
- if (sectionMatch?.[1] && require_utils.isAnyOf(sectionMatch[1], sections)) return [{
68
- uri: `https://itch.io/${sectionMatch[1]}.xml`,
69
- hint: require_utils.composeHint("itchio:section")
70
- }];
71
- const uris = [];
72
- uris.push({
73
- uri: "https://itch.io/feed/featured.xml",
74
- hint: require_utils.composeHint("itchio:featured")
75
- });
76
- uris.push({
77
- uri: "https://itch.io/feed/new.xml",
78
- hint: require_utils.composeHint("itchio:new")
79
- });
80
- uris.push({
81
- uri: "https://itch.io/feed/sales.xml",
82
- hint: require_utils.composeHint("itchio:sales")
83
- });
84
- return uris;
85
- }
86
- };
87
- //#endregion
88
- exports.itchioHandler = itchioHandler;
@@ -1,22 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/kickstarter.ts
3
- const hosts = ["kickstarter.com", "www.kickstarter.com"];
4
- const kickstarterHandler = {
5
- match: (url) => {
6
- return require_utils.isHostOf(url, hosts);
7
- },
8
- resolve: (url) => {
9
- const { pathname } = new URL(url);
10
- const pathSegments = pathname.split("/").filter(Boolean);
11
- if (pathSegments.length >= 3 && pathSegments[0] === "projects") return [{
12
- uri: `https://www.kickstarter.com/projects/${pathSegments[1]}/${pathSegments[2]}/posts.atom`,
13
- hint: require_utils.composeHint("kickstarter:updates")
14
- }];
15
- return [{
16
- uri: "https://www.kickstarter.com/projects/feed.atom",
17
- hint: require_utils.composeHint("kickstarter:projects")
18
- }];
19
- }
20
- };
21
- //#endregion
22
- exports.kickstarterHandler = kickstarterHandler;
@@ -1,46 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/lemmy.ts
3
- const lemmyPoweredByRegex = /lemmy/i;
4
- const isCommunityPath = (pathname) => {
5
- const segments = pathname.split("/").filter(Boolean);
6
- return segments.length >= 2 && segments[0] === "c";
7
- };
8
- const isUserPath = (pathname) => {
9
- const segments = pathname.split("/").filter(Boolean);
10
- return segments.length >= 2 && segments[0] === "u";
11
- };
12
- const isLemmyHtml = (content) => {
13
- return require_utils.hasMetaContent(content, "generator", "Lemmy");
14
- };
15
- const isLemmyHeaders = (headers) => {
16
- const poweredBy = headers.get("x-powered-by") ?? "";
17
- return lemmyPoweredByRegex.test(poweredBy);
18
- };
19
- const lemmyHandler = {
20
- match: (url, content, headers) => {
21
- try {
22
- const { pathname } = new URL(url);
23
- if (!isCommunityPath(pathname) && !isUserPath(pathname)) return false;
24
- if (content && isLemmyHtml(content)) return true;
25
- if (headers && isLemmyHeaders(headers)) return true;
26
- } catch {}
27
- return false;
28
- },
29
- resolve: (url) => {
30
- try {
31
- const { origin, pathname } = new URL(url);
32
- const segments = pathname.split("/").filter(Boolean);
33
- if (isCommunityPath(pathname) && segments[1]) return [{
34
- uri: `${origin}/feeds/c/${segments[1]}.xml`,
35
- hint: require_utils.composeHint("lemmy:community")
36
- }];
37
- if (isUserPath(pathname) && segments[1]) return [{
38
- uri: `${origin}/feeds/u/${segments[1]}.xml`,
39
- hint: require_utils.composeHint("lemmy:user")
40
- }];
41
- } catch {}
42
- return [];
43
- }
44
- };
45
- //#endregion
46
- exports.lemmyHandler = lemmyHandler;
@@ -1,42 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/letterboxd.ts
3
- const hosts = ["letterboxd.com", "www.letterboxd.com"];
4
- const excludedPaths = [
5
- "about",
6
- "activity",
7
- "api-beta",
8
- "apps",
9
- "contact",
10
- "create-account",
11
- "films",
12
- "journal",
13
- "legal",
14
- "lists",
15
- "members",
16
- "news",
17
- "pro",
18
- "search",
19
- "settings",
20
- "showdown",
21
- "sign-in",
22
- "welcome",
23
- "year-in-review"
24
- ];
25
- const letterboxdHandler = {
26
- match: (url) => {
27
- return require_utils.isHostOf(url, hosts);
28
- },
29
- resolve: (url) => {
30
- const { pathname } = new URL(url);
31
- const pathSegments = pathname.split("/").filter(Boolean);
32
- if (pathSegments.length === 0) return [];
33
- const username = pathSegments[0];
34
- if (require_utils.isAnyOf(username, excludedPaths)) return [];
35
- return [{
36
- uri: `https://letterboxd.com/${username}/rss/`,
37
- hint: require_utils.composeHint("letterboxd:diary")
38
- }];
39
- }
40
- };
41
- //#endregion
42
- exports.letterboxdHandler = letterboxdHandler;