feedscout 1.9.0 → 2.0.0-beta.2

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 (180) hide show
  1. package/dist/common/discover/defaults.js +1 -3
  2. package/dist/common/discover/utils.d.ts +2 -3
  3. package/dist/common/uris/feed/types.d.ts +2 -2
  4. package/dist/feeds/extractors.js +2 -2
  5. package/dist/feeds/platform/handlers/discourse.js +2 -6
  6. package/dist/feeds/platform/handlers/libsyn.js +1 -1
  7. package/package.json +23 -62
  8. package/dist/blogrolls/defaults.cjs +0 -57
  9. package/dist/blogrolls/defaults.d.cts +0 -16
  10. package/dist/blogrolls/extractors.cjs +0 -21
  11. package/dist/blogrolls/extractors.d.cts +0 -7
  12. package/dist/blogrolls/index.cjs +0 -25
  13. package/dist/blogrolls/index.d.cts +0 -7
  14. package/dist/blogrolls/types.d.cts +0 -6
  15. package/dist/blogrolls.cjs +0 -12
  16. package/dist/blogrolls.d.cts +0 -4
  17. package/dist/common/discover/defaults.cjs +0 -46
  18. package/dist/common/discover/defaults.d.cts +0 -6
  19. package/dist/common/discover/index.cjs +0 -105
  20. package/dist/common/discover/utils.cjs +0 -101
  21. package/dist/common/discover/utils.d.cts +0 -6
  22. package/dist/common/locales.cjs +0 -348
  23. package/dist/common/types.cjs +0 -10
  24. package/dist/common/types.d.cts +0 -90
  25. package/dist/common/uris/feed/index.cjs +0 -12
  26. package/dist/common/uris/feed/index.d.cts +0 -6
  27. package/dist/common/uris/feed/types.d.cts +0 -9
  28. package/dist/common/uris/guess/index.cjs +0 -8
  29. package/dist/common/uris/guess/index.d.cts +0 -7
  30. package/dist/common/uris/guess/types.d.cts +0 -10
  31. package/dist/common/uris/guess/utils.cjs +0 -42
  32. package/dist/common/uris/guess/utils.d.cts +0 -8
  33. package/dist/common/uris/headers/index.cjs +0 -26
  34. package/dist/common/uris/headers/index.d.cts +0 -6
  35. package/dist/common/uris/headers/types.d.cts +0 -9
  36. package/dist/common/uris/html/handlers.cjs +0 -59
  37. package/dist/common/uris/html/index.cjs +0 -35
  38. package/dist/common/uris/html/index.d.cts +0 -6
  39. package/dist/common/uris/html/types.d.cts +0 -13
  40. package/dist/common/uris/index.cjs +0 -32
  41. package/dist/common/uris/platform/index.cjs +0 -10
  42. package/dist/common/uris/platform/index.d.cts +0 -7
  43. package/dist/common/uris/platform/types.d.cts +0 -13
  44. package/dist/common/utils.cjs +0 -98
  45. package/dist/common/utils.d.cts +0 -12
  46. package/dist/favicons/defaults.cjs +0 -65
  47. package/dist/favicons/defaults.d.cts +0 -18
  48. package/dist/favicons/extractors.cjs +0 -25
  49. package/dist/favicons/extractors.d.cts +0 -7
  50. package/dist/favicons/index.cjs +0 -29
  51. package/dist/favicons/index.d.cts +0 -7
  52. package/dist/favicons/platform/handlers/bluesky.cjs +0 -27
  53. package/dist/favicons/platform/handlers/codeberg.cjs +0 -19
  54. package/dist/favicons/platform/handlers/deviantart.cjs +0 -29
  55. package/dist/favicons/platform/handlers/devto.cjs +0 -31
  56. package/dist/favicons/platform/handlers/github.cjs +0 -19
  57. package/dist/favicons/platform/handlers/githubGist.cjs +0 -19
  58. package/dist/favicons/platform/handlers/gitlab.cjs +0 -38
  59. package/dist/favicons/platform/handlers/lobsters.cjs +0 -21
  60. package/dist/favicons/platform/handlers/mastodon.cjs +0 -40
  61. package/dist/favicons/platform/handlers/reddit.cjs +0 -42
  62. package/dist/favicons/platform/handlers/sourceforge.cjs +0 -21
  63. package/dist/favicons/platform/handlers/tumblr.cjs +0 -16
  64. package/dist/favicons/types.d.cts +0 -4
  65. package/dist/favicons/utils.cjs +0 -10
  66. package/dist/favicons.cjs +0 -12
  67. package/dist/favicons.d.cts +0 -4
  68. package/dist/feeds/defaults.cjs +0 -290
  69. package/dist/feeds/defaults.d.cts +0 -21
  70. package/dist/feeds/extractors.cjs +0 -46
  71. package/dist/feeds/extractors.d.cts +0 -7
  72. package/dist/feeds/index.cjs +0 -26
  73. package/dist/feeds/index.d.cts +0 -7
  74. package/dist/feeds/platform/handlers/acast.cjs +0 -26
  75. package/dist/feeds/platform/handlers/ameblo.cjs +0 -36
  76. package/dist/feeds/platform/handlers/applePodcasts.cjs +0 -26
  77. package/dist/feeds/platform/handlers/arena.cjs +0 -42
  78. package/dist/feeds/platform/handlers/artstation.cjs +0 -52
  79. package/dist/feeds/platform/handlers/audioboom.cjs +0 -23
  80. package/dist/feeds/platform/handlers/bearblog.cjs +0 -45
  81. package/dist/feeds/platform/handlers/behance.cjs +0 -56
  82. package/dist/feeds/platform/handlers/blogspot.cjs +0 -72
  83. package/dist/feeds/platform/handlers/bluesky.cjs +0 -20
  84. package/dist/feeds/platform/handlers/bookwyrm.cjs +0 -48
  85. package/dist/feeds/platform/handlers/buttondown.cjs +0 -43
  86. package/dist/feeds/platform/handlers/buzzsprout.cjs +0 -22
  87. package/dist/feeds/platform/handlers/codeberg.cjs +0 -69
  88. package/dist/feeds/platform/handlers/csdn.cjs +0 -20
  89. package/dist/feeds/platform/handlers/dailymotion.cjs +0 -86
  90. package/dist/feeds/platform/handlers/deviantart.cjs +0 -85
  91. package/dist/feeds/platform/handlers/devto.cjs +0 -58
  92. package/dist/feeds/platform/handlers/discourse.cjs +0 -70
  93. package/dist/feeds/platform/handlers/douban.cjs +0 -56
  94. package/dist/feeds/platform/handlers/dreamwidth.cjs +0 -48
  95. package/dist/feeds/platform/handlers/exblog.cjs +0 -35
  96. package/dist/feeds/platform/handlers/fireside.cjs +0 -24
  97. package/dist/feeds/platform/handlers/friendica.cjs +0 -44
  98. package/dist/feeds/platform/handlers/ghost.cjs +0 -30
  99. package/dist/feeds/platform/handlers/github.cjs +0 -122
  100. package/dist/feeds/platform/handlers/githubGist.cjs +0 -56
  101. package/dist/feeds/platform/handlers/gitlab.cjs +0 -98
  102. package/dist/feeds/platform/handlers/goodreads.cjs +0 -49
  103. package/dist/feeds/platform/handlers/hackernews.cjs +0 -21
  104. package/dist/feeds/platform/handlers/hashnode.cjs +0 -16
  105. package/dist/feeds/platform/handlers/hatenablog.cjs +0 -56
  106. package/dist/feeds/platform/handlers/hearthis.cjs +0 -32
  107. package/dist/feeds/platform/handlers/heyWorld.cjs +0 -18
  108. package/dist/feeds/platform/handlers/insanejournal.cjs +0 -69
  109. package/dist/feeds/platform/handlers/itchio.cjs +0 -111
  110. package/dist/feeds/platform/handlers/kickstarter.cjs +0 -22
  111. package/dist/feeds/platform/handlers/lemmy.cjs +0 -88
  112. package/dist/feeds/platform/handlers/letterboxd.cjs +0 -46
  113. package/dist/feeds/platform/handlers/libsyn.cjs +0 -25
  114. package/dist/feeds/platform/handlers/listed.cjs +0 -20
  115. package/dist/feeds/platform/handlers/livejournal.cjs +0 -68
  116. package/dist/feeds/platform/handlers/lobsters.cjs +0 -57
  117. package/dist/feeds/platform/handlers/mastodon.cjs +0 -74
  118. package/dist/feeds/platform/handlers/mataroa.cjs +0 -16
  119. package/dist/feeds/platform/handlers/medium.cjs +0 -68
  120. package/dist/feeds/platform/handlers/microblog.cjs +0 -55
  121. package/dist/feeds/platform/handlers/misskey.cjs +0 -40
  122. package/dist/feeds/platform/handlers/myanimelist.cjs +0 -43
  123. package/dist/feeds/platform/handlers/naverBlog.cjs +0 -21
  124. package/dist/feeds/platform/handlers/nebula.cjs +0 -68
  125. package/dist/feeds/platform/handlers/note.cjs +0 -53
  126. package/dist/feeds/platform/handlers/observable.cjs +0 -34
  127. package/dist/feeds/platform/handlers/odysee.cjs +0 -20
  128. package/dist/feeds/platform/handlers/pagecord.cjs +0 -16
  129. package/dist/feeds/platform/handlers/paragraph.cjs +0 -20
  130. package/dist/feeds/platform/handlers/pika.cjs +0 -35
  131. package/dist/feeds/platform/handlers/pinterest.cjs +0 -57
  132. package/dist/feeds/platform/handlers/pixelfed.cjs +0 -46
  133. package/dist/feeds/platform/handlers/pleroma.cjs +0 -34
  134. package/dist/feeds/platform/handlers/podbean.cjs +0 -29
  135. package/dist/feeds/platform/handlers/podigee.cjs +0 -29
  136. package/dist/feeds/platform/handlers/posthaven.cjs +0 -24
  137. package/dist/feeds/platform/handlers/producthunt.cjs +0 -29
  138. package/dist/feeds/platform/handlers/prose.cjs +0 -26
  139. package/dist/feeds/platform/handlers/qiita.cjs +0 -58
  140. package/dist/feeds/platform/handlers/reddit.cjs +0 -149
  141. package/dist/feeds/platform/handlers/rssCom.cjs +0 -20
  142. package/dist/feeds/platform/handlers/seesaa.cjs +0 -22
  143. package/dist/feeds/platform/handlers/soundcloud.cjs +0 -39
  144. package/dist/feeds/platform/handlers/sourceforge.cjs +0 -53
  145. package/dist/feeds/platform/handlers/spreaker.cjs +0 -21
  146. package/dist/feeds/platform/handlers/stackExchange.cjs +0 -64
  147. package/dist/feeds/platform/handlers/steam.cjs +0 -35
  148. package/dist/feeds/platform/handlers/substack.cjs +0 -23
  149. package/dist/feeds/platform/handlers/tildes.cjs +0 -41
  150. package/dist/feeds/platform/handlers/tistory.cjs +0 -16
  151. package/dist/feeds/platform/handlers/transistor.cjs +0 -29
  152. package/dist/feeds/platform/handlers/tumblr.cjs +0 -24
  153. package/dist/feeds/platform/handlers/v2ex.cjs +0 -35
  154. package/dist/feeds/platform/handlers/velog.cjs +0 -24
  155. package/dist/feeds/platform/handlers/vimeo.cjs +0 -75
  156. package/dist/feeds/platform/handlers/weblogLol.cjs +0 -26
  157. package/dist/feeds/platform/handlers/weebly.cjs +0 -25
  158. package/dist/feeds/platform/handlers/wordpress.cjs +0 -209
  159. package/dist/feeds/platform/handlers/wpengine.cjs +0 -10
  160. package/dist/feeds/platform/handlers/writeas.cjs +0 -51
  161. package/dist/feeds/platform/handlers/ximalaya.cjs +0 -20
  162. package/dist/feeds/platform/handlers/youtube.cjs +0 -97
  163. package/dist/feeds/platform/handlers/zenn.cjs +0 -54
  164. package/dist/feeds/types.d.cts +0 -9
  165. package/dist/feeds.cjs +0 -16
  166. package/dist/feeds.d.cts +0 -4
  167. package/dist/hubs/discover/index.cjs +0 -30
  168. package/dist/hubs/discover/index.d.cts +0 -7
  169. package/dist/hubs/discover/types.d.cts +0 -15
  170. package/dist/hubs/feed/index.cjs +0 -32
  171. package/dist/hubs/headers/index.cjs +0 -17
  172. package/dist/hubs/html/index.cjs +0 -28
  173. package/dist/hubs.cjs +0 -0
  174. package/dist/hubs.d.cts +0 -2
  175. package/dist/index.cjs +0 -13
  176. package/dist/index.d.cts +0 -8
  177. package/dist/methods.cjs +0 -15
  178. package/dist/methods.d.cts +0 -7
  179. package/dist/utils.cjs +0 -9
  180. package/dist/utils.d.cts +0 -3
@@ -1,49 +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, searchParams } = new URL(url);
14
- const pathSegments = pathname.split("/").filter(Boolean);
15
- const shelf = searchParams.get("shelf");
16
- if (pathSegments[0] === "user" && pathSegments[1] === "show" && pathSegments[2]) {
17
- const userId = parseUserId(pathSegments[2]);
18
- if (userId) return [{
19
- uri: `${origin}/user/updates_rss/${userId}`,
20
- hint: require_utils.composeHint("goodreads:updates")
21
- }, {
22
- uri: `${origin}/review/list_rss/${userId}`,
23
- hint: require_utils.composeHint("goodreads:reviews")
24
- }];
25
- }
26
- if (pathSegments[0] === "review" && pathSegments[1] === "list" && pathSegments[2]) {
27
- const userId = parseUserId(pathSegments[2]);
28
- if (userId) {
29
- const uris = [];
30
- if (shelf) uris.push({
31
- uri: `${origin}/review/list_rss/${userId}?shelf=${encodeURIComponent(shelf)}`,
32
- hint: require_utils.composeHint("goodreads:shelf")
33
- });
34
- uris.push({
35
- uri: `${origin}/review/list_rss/${userId}`,
36
- hint: require_utils.composeHint("goodreads:reviews")
37
- });
38
- uris.push({
39
- uri: `${origin}/user/updates_rss/${userId}`,
40
- hint: require_utils.composeHint("goodreads:updates")
41
- });
42
- return uris;
43
- }
44
- }
45
- return [];
46
- }
47
- };
48
- //#endregion
49
- exports.goodreadsHandler = goodreadsHandler;
@@ -1,21 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/hackernews.ts
3
- const hosts = ["news.ycombinator.com"];
4
- const hackernewsHandler = {
5
- match: (url) => {
6
- return require_utils.isHostOf(url, hosts);
7
- },
8
- resolve: (url) => {
9
- const { pathname } = new URL(url);
10
- if (pathname === "/show" || pathname === "/shownew") return [{
11
- uri: "https://news.ycombinator.com/showrss",
12
- hint: require_utils.composeHint("hackernews:show")
13
- }];
14
- return [{
15
- uri: "https://news.ycombinator.com/rss",
16
- hint: require_utils.composeHint("hackernews:front")
17
- }];
18
- }
19
- };
20
- //#endregion
21
- exports.hackernewsHandler = hackernewsHandler;
@@ -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", "hashnode.com"]);
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,56 +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
- "hatenadiary.com",
8
- "hatenadiary.jp",
9
- "hatenadiary.org"
10
- ];
11
- const categoryRegex = /^\/archive\/category\/([^/]+)/;
12
- const authorRegex = /^\/archive\/author\/([^/]+)/;
13
- const hatenablogHandler = {
14
- match: (url) => {
15
- return require_utils.isSubdomainOf(url, domains);
16
- },
17
- resolve: (url) => {
18
- const { origin, pathname } = new URL(url);
19
- const uris = [];
20
- const categoryMatch = pathname.match(categoryRegex);
21
- if (categoryMatch?.[1]) {
22
- const category = categoryMatch[1];
23
- uris.push({
24
- uri: `${origin}/rss/category/${category}`,
25
- hint: require_utils.composeHint("hatenablog:category-rss")
26
- });
27
- uris.push({
28
- uri: `${origin}/feed/category/${category}`,
29
- hint: require_utils.composeHint("hatenablog:category-atom")
30
- });
31
- }
32
- const authorMatch = pathname.match(authorRegex);
33
- if (authorMatch?.[1]) {
34
- const author = authorMatch[1];
35
- uris.push({
36
- uri: `${origin}/rss/author/${author}`,
37
- hint: require_utils.composeHint("hatenablog:author-rss")
38
- });
39
- uris.push({
40
- uri: `${origin}/feed/author/${author}`,
41
- hint: require_utils.composeHint("hatenablog:author-atom")
42
- });
43
- }
44
- uris.push({
45
- uri: `${origin}/rss`,
46
- hint: require_utils.composeHint("hatenablog:posts-rss")
47
- });
48
- uris.push({
49
- uri: `${origin}/feed`,
50
- hint: require_utils.composeHint("hatenablog:posts-atom")
51
- });
52
- return uris;
53
- }
54
- };
55
- //#endregion
56
- exports.hatenablogHandler = hatenablogHandler;
@@ -1,32 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/hearthis.ts
3
- const hosts = ["hearthis.at", "www.hearthis.at"];
4
- const excludedPaths = [
5
- "about",
6
- "api",
7
- "feed",
8
- "login",
9
- "privacy",
10
- "search",
11
- "set",
12
- "signup",
13
- "terms"
14
- ];
15
- const hearthisHandler = {
16
- match: (url) => {
17
- return require_utils.isHostOf(url, hosts);
18
- },
19
- resolve: (url) => {
20
- const { pathname } = new URL(url);
21
- const pathSegments = pathname.split("/").filter(Boolean);
22
- if (pathSegments.length === 0) return [];
23
- const username = pathSegments[0];
24
- if (require_utils.isAnyOf(username, excludedPaths)) return [];
25
- return [{
26
- uri: `https://hearthis.at/${username}/podcast/`,
27
- hint: require_utils.composeHint("hearthis:tracks")
28
- }];
29
- }
30
- };
31
- //#endregion
32
- exports.hearthisHandler = hearthisHandler;
@@ -1,18 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/heyWorld.ts
3
- const heyWorldHandler = {
4
- match: (url) => {
5
- return require_utils.isHostOf(url, "world.hey.com");
6
- },
7
- resolve: (url) => {
8
- const { pathname } = new URL(url);
9
- const pathSegments = pathname.split("/").filter(Boolean);
10
- if (pathSegments.length === 0) return [];
11
- return [{
12
- uri: `https://world.hey.com/${pathSegments[0]}/feed.atom`,
13
- hint: require_utils.composeHint("hey-world:blog")
14
- }];
15
- }
16
- };
17
- //#endregion
18
- exports.heyWorldHandler = heyWorldHandler;
@@ -1,69 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/insanejournal.ts
3
- const wwwUsersPathRegex = /^\/(?:users\/|~)([^/]+)/;
4
- const wwwAsylumPathRegex = /^\/(?:asylum|community)\/([^/]+)/;
5
- const firstSegmentRegex = /^\/([^/]+)/;
6
- const tagRegex = /^\/tag\/([^/]+)/;
7
- const insanejournalHandler = {
8
- match: (url) => {
9
- if (!require_utils.isSubdomainOf(url, "insanejournal.com")) return false;
10
- const { hostname, pathname } = new URL(url);
11
- const lower = hostname.toLowerCase();
12
- if (lower === "www.insanejournal.com" || lower === "insanejournal.com") return wwwUsersPathRegex.test(pathname) || wwwAsylumPathRegex.test(pathname);
13
- if (lower === "asylums.insanejournal.com" || lower === "feeds.insanejournal.com") return firstSegmentRegex.test(pathname);
14
- return true;
15
- },
16
- resolve: (url) => {
17
- const { origin, hostname, pathname } = new URL(url);
18
- const lowerHostname = hostname.toLowerCase();
19
- const uris = [];
20
- let feedOrigin = origin;
21
- let feedPathPrefix = "";
22
- if (lowerHostname === "www.insanejournal.com" || lowerHostname === "insanejournal.com") {
23
- const userMatch = pathname.match(wwwUsersPathRegex);
24
- if (userMatch?.[1]) feedOrigin = `https://${userMatch[1]}.insanejournal.com`;
25
- else {
26
- const asylumMatch = pathname.match(wwwAsylumPathRegex);
27
- if (asylumMatch?.[1]) {
28
- feedOrigin = "https://asylums.insanejournal.com";
29
- feedPathPrefix = `/${asylumMatch[1]}`;
30
- } else return uris;
31
- }
32
- } else if (lowerHostname === "asylums.insanejournal.com") {
33
- const segMatch = pathname.match(firstSegmentRegex);
34
- if (segMatch?.[1]) feedPathPrefix = `/${segMatch[1]}`;
35
- else return uris;
36
- } else if (lowerHostname === "feeds.insanejournal.com") {
37
- const segMatch = pathname.match(firstSegmentRegex);
38
- if (segMatch?.[1]) feedPathPrefix = `/${segMatch[1]}`;
39
- else return uris;
40
- }
41
- const tagMatch = pathname.match(tagRegex);
42
- if (tagMatch?.[1]) {
43
- const tag = encodeURIComponent(tagMatch[1]);
44
- uris.push({
45
- uri: `${feedOrigin}${feedPathPrefix}/data/rss?tag=${tag}`,
46
- hint: require_utils.composeHint("insanejournal:posts-tag-rss")
47
- });
48
- uris.push({
49
- uri: `${feedOrigin}${feedPathPrefix}/data/atom?tag=${tag}`,
50
- hint: require_utils.composeHint("insanejournal:posts-tag-atom")
51
- });
52
- }
53
- uris.push({
54
- uri: `${feedOrigin}${feedPathPrefix}/data/rss`,
55
- hint: require_utils.composeHint("insanejournal:posts-rss")
56
- });
57
- uris.push({
58
- uri: `${feedOrigin}${feedPathPrefix}/data/atom`,
59
- hint: require_utils.composeHint("insanejournal:posts-atom")
60
- });
61
- uris.push({
62
- uri: `${feedOrigin}${feedPathPrefix}/data/userpics`,
63
- hint: require_utils.composeHint("insanejournal:userpics-atom")
64
- });
65
- return uris;
66
- }
67
- };
68
- //#endregion
69
- exports.insanejournalHandler = insanejournalHandler;
@@ -1,111 +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
- "free"
19
- ];
20
- const byUserRegex = /^\/games\/by-([^/]+)/;
21
- const tagRegex = /^\/games\/tag-([^/]+)/;
22
- const platformRegex = /^\/games\/platform-([^/.]+)/;
23
- const genreRegex = /^\/games\/genre-([^/.]+)/;
24
- const madeWithRegex = /^\/games\/made-with-([^/.]+)/;
25
- const sortRegex = /^\/games\/([^/.]+)/;
26
- const sectionRegex = /^\/([^/.]+)/;
27
- const gameRegex = /^\/([^/]+)/;
28
- const itchioHandler = {
29
- match: (url) => {
30
- return require_utils.isHostOf(url, mainHosts) || require_utils.isSubdomainOf(url, "itch.io");
31
- },
32
- resolve: (url) => {
33
- const { hostname, pathname } = new URL(url);
34
- const lowerHostname = hostname.toLowerCase();
35
- if (!mainHosts.includes(lowerHostname) && lowerHostname.endsWith(".itch.io")) {
36
- const creator = lowerHostname.replace(".itch.io", "");
37
- const gameMatch = pathname.match(gameRegex);
38
- if (gameMatch?.[1]) return [{
39
- uri: `https://${creator}.itch.io/${gameMatch[1]}/devlog.rss`,
40
- hint: require_utils.composeHint("itchio:devlog")
41
- }];
42
- return [{
43
- uri: `https://itch.io/games/by-${creator}.xml`,
44
- hint: require_utils.composeHint("itchio:games")
45
- }];
46
- }
47
- const byUserMatch = pathname.match(byUserRegex);
48
- if (byUserMatch?.[1]) return [{
49
- uri: `https://itch.io/games/by-${byUserMatch[1]}.xml`,
50
- hint: require_utils.composeHint("itchio:games")
51
- }];
52
- const tagMatch = pathname.match(tagRegex);
53
- if (tagMatch?.[1]) return [{
54
- uri: `https://itch.io/games/tag-${tagMatch[1]}.xml`,
55
- hint: require_utils.composeHint("itchio:tag")
56
- }];
57
- const platformMatch = pathname.match(platformRegex);
58
- if (platformMatch?.[1]) return [{
59
- uri: `https://itch.io/games/platform-${platformMatch[1]}.xml`,
60
- hint: require_utils.composeHint("itchio:platform")
61
- }];
62
- const genreMatch = pathname.match(genreRegex);
63
- if (genreMatch?.[1]) return [{
64
- uri: `https://itch.io/games/genre-${genreMatch[1]}.xml`,
65
- hint: require_utils.composeHint("itchio:genre")
66
- }];
67
- const madeWithMatch = pathname.match(madeWithRegex);
68
- if (madeWithMatch?.[1]) return [{
69
- uri: `https://itch.io/games/made-with-${madeWithMatch[1]}.xml`,
70
- hint: require_utils.composeHint("itchio:made-with")
71
- }];
72
- const sortMatch = pathname.match(sortRegex);
73
- if (sortMatch?.[1] && require_utils.isAnyOf(sortMatch[1], sorts)) return [{
74
- uri: `https://itch.io/games/${sortMatch[1]}.xml`,
75
- hint: require_utils.composeHint("itchio:games")
76
- }];
77
- if (pathname === "/games" || pathname === "/games/") return [{
78
- uri: "https://itch.io/games.xml",
79
- hint: require_utils.composeHint("itchio:games")
80
- }];
81
- if (pathname === "/devlogs" || pathname === "/devlogs/") return [{
82
- uri: "https://itch.io/devlogs.xml",
83
- hint: require_utils.composeHint("itchio:devlog")
84
- }];
85
- const sectionMatch = pathname.match(sectionRegex);
86
- if (sectionMatch?.[1] && require_utils.isAnyOf(sectionMatch[1], sections)) return [{
87
- uri: `https://itch.io/${sectionMatch[1]}.xml`,
88
- hint: require_utils.composeHint("itchio:section")
89
- }];
90
- const uris = [];
91
- uris.push({
92
- uri: "https://itch.io/feed/featured.xml",
93
- hint: require_utils.composeHint("itchio:featured")
94
- });
95
- uris.push({
96
- uri: "https://itch.io/feed/new.xml",
97
- hint: require_utils.composeHint("itchio:new")
98
- });
99
- uris.push({
100
- uri: "https://itch.io/feed/sales.xml",
101
- hint: require_utils.composeHint("itchio:sales")
102
- });
103
- uris.push({
104
- uri: "https://itch.io/blog.rss",
105
- hint: require_utils.composeHint("itchio:blog")
106
- });
107
- return uris;
108
- }
109
- };
110
- //#endregion
111
- 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,88 +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 validSorts = new Set([
5
- "Active",
6
- "Hot",
7
- "New",
8
- "Old",
9
- "TopHour",
10
- "TopSixHour",
11
- "TopTwelveHour",
12
- "TopDay",
13
- "TopWeek",
14
- "TopMonth",
15
- "TopThreeMonths",
16
- "TopSixMonths",
17
- "TopNineMonths",
18
- "TopYear",
19
- "TopAll",
20
- "Controversial",
21
- "Scaled",
22
- "MostComments",
23
- "NewComments"
24
- ]);
25
- const numericRegex = /^\d+$/;
26
- const getQuerySuffix = (searchParams) => {
27
- const params = new URLSearchParams();
28
- const sort = searchParams.get("sort");
29
- if (sort && validSorts.has(sort)) params.set("sort", sort);
30
- const limit = searchParams.get("limit");
31
- if (limit && numericRegex.test(limit)) params.set("limit", limit);
32
- const query = params.toString();
33
- return query ? `?${query}` : "";
34
- };
35
- const isCommunityPath = (pathname) => {
36
- const segments = pathname.split("/").filter(Boolean);
37
- return segments.length >= 2 && segments[0] === "c";
38
- };
39
- const isUserPath = (pathname) => {
40
- const segments = pathname.split("/").filter(Boolean);
41
- return segments.length >= 2 && segments[0] === "u";
42
- };
43
- const isHomePath = (pathname) => {
44
- return pathname === "/" || pathname === "" || pathname === "/home";
45
- };
46
- const isLemmyHtml = (content) => {
47
- return require_utils.hasMetaContent(content, "generator", "Lemmy");
48
- };
49
- const isLemmyHeaders = (headers) => {
50
- const poweredBy = headers.get("x-powered-by") ?? "";
51
- return lemmyPoweredByRegex.test(poweredBy);
52
- };
53
- const lemmyHandler = {
54
- match: (url, content, headers) => {
55
- try {
56
- const { pathname } = new URL(url);
57
- if (!isCommunityPath(pathname) && !isUserPath(pathname) && !isHomePath(pathname)) return false;
58
- if (content && isLemmyHtml(content)) return true;
59
- if (headers && isLemmyHeaders(headers)) return true;
60
- } catch {}
61
- return false;
62
- },
63
- resolve: (url) => {
64
- try {
65
- const { origin, pathname, searchParams } = new URL(url);
66
- const segments = pathname.split("/").filter(Boolean);
67
- const sortSuffix = getQuerySuffix(searchParams);
68
- if (isCommunityPath(pathname) && segments[1]) return [{
69
- uri: `${origin}/feeds/c/${segments[1]}.xml${sortSuffix}`,
70
- hint: require_utils.composeHint("lemmy:community")
71
- }];
72
- if (isUserPath(pathname) && segments[1]) return [{
73
- uri: `${origin}/feeds/u/${segments[1]}.xml${sortSuffix}`,
74
- hint: require_utils.composeHint("lemmy:user")
75
- }];
76
- if (isHomePath(pathname)) return [{
77
- uri: `${origin}/feeds/all.xml${sortSuffix}`,
78
- hint: require_utils.composeHint("lemmy:all")
79
- }, {
80
- uri: `${origin}/feeds/local.xml${sortSuffix}`,
81
- hint: require_utils.composeHint("lemmy:local")
82
- }];
83
- } catch {}
84
- return [];
85
- }
86
- };
87
- //#endregion
88
- exports.lemmyHandler = lemmyHandler;
@@ -1,46 +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
- if (pathSegments[0] === "journal") return [{
34
- uri: "https://letterboxd.com/journal/rss/",
35
- hint: require_utils.composeHint("letterboxd:journal")
36
- }];
37
- const username = pathSegments[0];
38
- if (require_utils.isAnyOf(username, excludedPaths)) return [];
39
- return [{
40
- uri: `https://letterboxd.com/${username}/rss/`,
41
- hint: require_utils.composeHint("letterboxd:diary")
42
- }];
43
- }
44
- };
45
- //#endregion
46
- exports.letterboxdHandler = letterboxdHandler;
@@ -1,25 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/libsyn.ts
3
- const numericRegex = /^\d+$/;
4
- const libsynHandler = {
5
- match: (url) => {
6
- return require_utils.isSubdomainOf(url, "libsyn.com");
7
- },
8
- resolve: (url) => {
9
- const { origin, pathname } = new URL(url);
10
- if (require_utils.isHostOf(url, "feeds.libsyn.com")) {
11
- const showId = pathname.split("/").filter(Boolean)[0];
12
- if (showId && numericRegex.test(showId)) return [{
13
- uri: `https://feeds.libsyn.com/${showId}/rss`,
14
- hint: require_utils.composeHint("libsyn:podcast")
15
- }];
16
- return [];
17
- }
18
- return [{
19
- uri: `${origin}/rss`,
20
- hint: require_utils.composeHint("libsyn:podcast")
21
- }];
22
- }
23
- };
24
- //#endregion
25
- exports.libsynHandler = libsynHandler;
@@ -1,20 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/listed.ts
3
- const hosts = ["listed.to", "www.listed.to"];
4
- const userRegex = /^\/@([^/]+)/;
5
- const listedHandler = {
6
- match: (url) => {
7
- return require_utils.isHostOf(url, hosts);
8
- },
9
- resolve: (url) => {
10
- const { pathname } = new URL(url);
11
- const userMatch = pathname.match(userRegex);
12
- if (!userMatch?.[1]) return [];
13
- return [{
14
- uri: `https://listed.to/@${userMatch[1]}/feed.rss`,
15
- hint: require_utils.composeHint("listed:blog")
16
- }];
17
- }
18
- };
19
- //#endregion
20
- exports.listedHandler = listedHandler;
@@ -1,68 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/livejournal.ts
3
- const wwwUsersPathRegex = /^\/(?:users\/|~)([^/]+)/;
4
- const legacyUserPathRegex = /^\/([^/]+)/;
5
- const tagRegex = /^\/tag\/([^/]+)/;
6
- const reservedHosts = new Set([
7
- "livejournal.com",
8
- "www.livejournal.com",
9
- "users.livejournal.com",
10
- "community.livejournal.com",
11
- "syndicated.livejournal.com"
12
- ]);
13
- const livejournalHandler = {
14
- match: (url) => {
15
- if (!require_utils.isSubdomainOf(url, "livejournal.com")) return false;
16
- const { hostname, pathname } = new URL(url);
17
- const lower = hostname.toLowerCase();
18
- if (reservedHosts.has(lower)) {
19
- if (lower === "www.livejournal.com") return wwwUsersPathRegex.test(pathname);
20
- if (lower === "users.livejournal.com" || lower === "community.livejournal.com") return legacyUserPathRegex.test(pathname);
21
- return false;
22
- }
23
- return true;
24
- },
25
- resolve: (url) => {
26
- const { origin, hostname, pathname } = new URL(url);
27
- const lowerHostname = hostname.toLowerCase();
28
- const uris = [];
29
- let userOrigin = origin;
30
- if (lowerHostname === "www.livejournal.com") {
31
- const userMatch = pathname.match(wwwUsersPathRegex);
32
- if (userMatch?.[1]) userOrigin = `https://${userMatch[1]}.livejournal.com`;
33
- else return uris;
34
- }
35
- if (lowerHostname === "users.livejournal.com" || lowerHostname === "community.livejournal.com") {
36
- const userMatch = pathname.match(legacyUserPathRegex);
37
- if (userMatch?.[1]) userOrigin = `https://${userMatch[1]}.livejournal.com`;
38
- else return uris;
39
- }
40
- const tagMatch = pathname.match(tagRegex);
41
- if (tagMatch?.[1]) {
42
- const tag = encodeURIComponent(tagMatch[1]);
43
- uris.push({
44
- uri: `${userOrigin}/data/rss?tag=${tag}`,
45
- hint: require_utils.composeHint("livejournal:posts-tag-rss")
46
- });
47
- uris.push({
48
- uri: `${userOrigin}/data/atom?tag=${tag}`,
49
- hint: require_utils.composeHint("livejournal:posts-tag-atom")
50
- });
51
- }
52
- uris.push({
53
- uri: `${userOrigin}/data/rss`,
54
- hint: require_utils.composeHint("livejournal:posts-rss")
55
- });
56
- uris.push({
57
- uri: `${userOrigin}/data/atom`,
58
- hint: require_utils.composeHint("livejournal:posts-atom")
59
- });
60
- uris.push({
61
- uri: `${userOrigin}/data/userpics`,
62
- hint: require_utils.composeHint("livejournal:userpics-atom")
63
- });
64
- return uris;
65
- }
66
- };
67
- //#endregion
68
- exports.livejournalHandler = livejournalHandler;