feedscout 1.4.0 → 1.6.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/README.md +12 -17
- package/dist/blogrolls/defaults.cjs +1 -3
- package/dist/blogrolls/defaults.js +1 -2
- package/dist/blogrolls/extractors.cjs +6 -9
- package/dist/blogrolls/extractors.js +6 -9
- package/dist/blogrolls/index.cjs +6 -9
- package/dist/blogrolls/index.d.cts +1 -1
- package/dist/blogrolls/index.d.ts +1 -1
- package/dist/blogrolls/index.js +1 -4
- package/dist/blogrolls.cjs +4 -5
- package/dist/blogrolls.js +1 -2
- package/dist/common/discover/index.cjs +60 -21
- package/dist/common/discover/index.js +58 -19
- package/dist/common/discover/utils.cjs +30 -9
- package/dist/common/discover/utils.js +28 -8
- package/dist/common/locales.cjs +127 -8
- package/dist/common/locales.js +116 -2
- package/dist/common/types.cjs +10 -0
- package/dist/common/types.d.cts +23 -5
- package/dist/common/types.d.ts +23 -5
- package/dist/common/types.js +10 -0
- package/dist/common/uris/feed/index.cjs +12 -0
- package/dist/common/uris/feed/index.d.cts +6 -0
- package/dist/common/uris/feed/index.d.ts +6 -0
- package/dist/common/uris/feed/index.js +12 -0
- package/dist/common/uris/feed/types.d.cts +9 -0
- package/dist/common/uris/feed/types.d.ts +9 -0
- package/dist/common/uris/guess/index.cjs +2 -4
- package/dist/common/uris/guess/index.d.cts +2 -1
- package/dist/common/uris/guess/index.d.ts +2 -1
- package/dist/common/uris/guess/index.js +1 -3
- package/dist/common/uris/guess/types.d.cts +3 -1
- package/dist/common/uris/guess/types.d.ts +3 -1
- package/dist/common/uris/guess/utils.cjs +5 -4
- package/dist/common/uris/guess/utils.d.cts +3 -1
- package/dist/common/uris/guess/utils.d.ts +3 -1
- package/dist/common/uris/guess/utils.js +5 -3
- package/dist/common/uris/headers/index.cjs +2 -4
- package/dist/common/uris/headers/index.js +1 -3
- package/dist/common/uris/html/handlers.cjs +2 -4
- package/dist/common/uris/html/handlers.js +1 -3
- package/dist/common/uris/html/index.cjs +2 -4
- package/dist/common/uris/html/index.js +1 -3
- package/dist/common/uris/index.cjs +23 -17
- package/dist/common/uris/index.js +19 -13
- package/dist/common/uris/platform/index.cjs +3 -5
- package/dist/common/uris/platform/index.d.cts +7 -0
- package/dist/common/uris/platform/index.d.ts +7 -0
- package/dist/common/uris/platform/index.js +3 -4
- package/dist/common/uris/platform/types.d.cts +4 -2
- package/dist/common/uris/platform/types.d.ts +4 -2
- package/dist/common/utils.cjs +25 -8
- package/dist/common/utils.d.cts +2 -2
- package/dist/common/utils.d.ts +2 -2
- package/dist/common/utils.js +23 -7
- package/dist/favicons/defaults.cjs +60 -0
- package/dist/favicons/defaults.d.cts +18 -0
- package/dist/favicons/defaults.d.ts +18 -0
- package/dist/favicons/defaults.js +53 -0
- package/dist/favicons/extractors.cjs +13 -0
- package/dist/favicons/extractors.d.cts +7 -0
- package/dist/favicons/extractors.d.ts +7 -0
- package/dist/favicons/extractors.js +13 -0
- package/dist/favicons/index.cjs +29 -0
- package/dist/favicons/index.d.cts +7 -0
- package/dist/favicons/index.d.ts +7 -0
- package/dist/favicons/index.js +29 -0
- package/dist/favicons/platform/handlers/bluesky.cjs +27 -0
- package/dist/favicons/platform/handlers/bluesky.js +27 -0
- package/dist/favicons/platform/handlers/codeberg.cjs +18 -0
- package/dist/favicons/platform/handlers/codeberg.js +18 -0
- package/dist/favicons/platform/handlers/deviantart.cjs +29 -0
- package/dist/favicons/platform/handlers/deviantart.js +29 -0
- package/dist/favicons/platform/handlers/github.cjs +18 -0
- package/dist/favicons/platform/handlers/github.js +18 -0
- package/dist/favicons/platform/handlers/githubGist.cjs +18 -0
- package/dist/favicons/platform/handlers/githubGist.js +18 -0
- package/dist/favicons/platform/handlers/lobsters.cjs +21 -0
- package/dist/favicons/platform/handlers/lobsters.js +21 -0
- package/dist/favicons/platform/handlers/mastodon.cjs +36 -0
- package/dist/favicons/platform/handlers/mastodon.js +34 -0
- package/dist/favicons/platform/handlers/reddit.cjs +41 -0
- package/dist/favicons/platform/handlers/reddit.js +41 -0
- package/dist/favicons/platform/handlers/sourceforge.cjs +21 -0
- package/dist/favicons/platform/handlers/sourceforge.js +21 -0
- package/dist/favicons/platform/handlers/tumblr.cjs +16 -0
- package/dist/favicons/platform/handlers/tumblr.js +16 -0
- package/dist/favicons/types.d.cts +4 -0
- package/dist/favicons/types.d.ts +4 -0
- package/dist/favicons.cjs +12 -0
- package/dist/favicons.d.cts +4 -0
- package/dist/favicons.d.ts +4 -0
- package/dist/favicons.js +3 -0
- package/dist/feeds/defaults.cjs +66 -37
- package/dist/feeds/defaults.d.cts +2 -2
- package/dist/feeds/defaults.d.ts +2 -2
- package/dist/feeds/defaults.js +52 -23
- package/dist/feeds/extractors.cjs +1 -3
- package/dist/feeds/extractors.js +1 -3
- package/dist/feeds/index.cjs +6 -8
- package/dist/feeds/index.d.cts +1 -1
- package/dist/feeds/index.d.ts +1 -1
- package/dist/feeds/index.js +1 -3
- package/dist/feeds/platform/handlers/behance.cjs +10 -6
- package/dist/feeds/platform/handlers/behance.js +10 -6
- package/dist/feeds/platform/handlers/blogspot.cjs +19 -8
- package/dist/feeds/platform/handlers/blogspot.js +19 -7
- package/dist/feeds/platform/handlers/bluesky.cjs +7 -6
- package/dist/feeds/platform/handlers/bluesky.js +7 -6
- package/dist/feeds/platform/handlers/codeberg.cjs +69 -0
- package/dist/feeds/platform/handlers/codeberg.js +67 -0
- package/dist/feeds/platform/handlers/csdn.cjs +19 -0
- package/dist/feeds/platform/handlers/csdn.js +19 -0
- package/dist/feeds/platform/handlers/dailymotion.cjs +10 -6
- package/dist/feeds/platform/handlers/dailymotion.js +10 -6
- package/dist/feeds/platform/handlers/deviantart.cjs +20 -8
- package/dist/feeds/platform/handlers/deviantart.js +18 -8
- package/dist/feeds/platform/handlers/devto.cjs +10 -6
- package/dist/feeds/platform/handlers/devto.js +10 -6
- package/dist/feeds/platform/handlers/douban.cjs +54 -0
- package/dist/feeds/platform/handlers/douban.js +54 -0
- package/dist/feeds/platform/handlers/github.cjs +37 -16
- package/dist/feeds/platform/handlers/github.js +35 -16
- package/dist/feeds/platform/handlers/githubGist.cjs +17 -17
- package/dist/feeds/platform/handlers/githubGist.js +15 -17
- package/dist/feeds/platform/handlers/gitlab.cjs +18 -8
- package/dist/feeds/platform/handlers/gitlab.js +18 -8
- package/dist/feeds/platform/handlers/goodreads.cjs +39 -0
- package/dist/feeds/platform/handlers/goodreads.js +39 -0
- package/dist/feeds/platform/handlers/hashnode.cjs +16 -0
- package/dist/feeds/platform/handlers/hashnode.js +16 -0
- package/dist/feeds/platform/handlers/hatenablog.cjs +53 -0
- package/dist/feeds/platform/handlers/hatenablog.js +53 -0
- package/dist/feeds/platform/handlers/itchio.cjs +88 -0
- package/dist/feeds/platform/handlers/itchio.js +88 -0
- package/dist/feeds/platform/handlers/kickstarter.cjs +10 -6
- package/dist/feeds/platform/handlers/kickstarter.js +10 -6
- package/dist/feeds/platform/handlers/letterboxd.cjs +42 -0
- package/dist/feeds/platform/handlers/letterboxd.js +42 -0
- package/dist/feeds/platform/handlers/lobsters.cjs +35 -12
- package/dist/feeds/platform/handlers/lobsters.js +34 -12
- package/dist/feeds/platform/handlers/mastodon.cjs +40 -0
- package/dist/feeds/platform/handlers/mastodon.js +40 -0
- package/dist/feeds/platform/handlers/medium.cjs +26 -10
- package/dist/feeds/platform/handlers/medium.js +26 -10
- package/dist/feeds/platform/handlers/paragraph.cjs +21 -0
- package/dist/feeds/platform/handlers/paragraph.js +21 -0
- package/dist/feeds/platform/handlers/pinterest.cjs +6 -10
- package/dist/feeds/platform/handlers/pinterest.js +6 -10
- package/dist/feeds/platform/handlers/producthunt.cjs +14 -7
- package/dist/feeds/platform/handlers/producthunt.js +14 -7
- package/dist/feeds/platform/handlers/reddit.cjs +35 -12
- package/dist/feeds/platform/handlers/reddit.js +34 -12
- package/dist/feeds/platform/handlers/soundcloud.cjs +6 -5
- package/dist/feeds/platform/handlers/soundcloud.js +6 -5
- package/dist/feeds/platform/handlers/sourceforge.cjs +20 -0
- package/dist/feeds/platform/handlers/sourceforge.js +19 -0
- package/dist/feeds/platform/handlers/stackExchange.cjs +37 -0
- package/dist/feeds/platform/handlers/stackExchange.js +37 -0
- package/dist/feeds/platform/handlers/steam.cjs +26 -0
- package/dist/feeds/platform/handlers/steam.js +26 -0
- package/dist/feeds/platform/handlers/substack.cjs +6 -5
- package/dist/feeds/platform/handlers/substack.js +6 -5
- package/dist/feeds/platform/handlers/tumblr.cjs +13 -7
- package/dist/feeds/platform/handlers/tumblr.js +12 -7
- package/dist/feeds/platform/handlers/v2ex.cjs +33 -0
- package/dist/feeds/platform/handlers/v2ex.js +33 -0
- package/dist/feeds/platform/handlers/vimeo.cjs +68 -0
- package/dist/feeds/platform/handlers/vimeo.js +68 -0
- package/dist/feeds/platform/handlers/wordpress.cjs +46 -12
- package/dist/feeds/platform/handlers/wordpress.js +46 -12
- package/dist/feeds/platform/handlers/wpengine.cjs +10 -0
- package/dist/feeds/platform/handlers/wpengine.js +11 -0
- package/dist/feeds/platform/handlers/ximalaya.cjs +19 -0
- package/dist/feeds/platform/handlers/ximalaya.js +19 -0
- package/dist/feeds/platform/handlers/youtube.cjs +35 -13
- package/dist/feeds/platform/handlers/youtube.js +35 -13
- package/dist/feeds.cjs +4 -5
- package/dist/feeds.js +1 -2
- package/dist/hubs/discover/index.cjs +7 -9
- package/dist/hubs/discover/index.js +1 -3
- package/dist/hubs/discover/utils.cjs +1 -3
- package/dist/hubs/discover/utils.js +1 -2
- package/dist/hubs/feed/index.cjs +1 -3
- package/dist/hubs/feed/index.js +1 -3
- package/dist/hubs/headers/index.cjs +3 -5
- package/dist/hubs/headers/index.js +1 -3
- package/dist/hubs/html/index.cjs +3 -5
- package/dist/hubs/html/index.js +1 -3
- package/dist/hubs.js +1 -1
- package/dist/index.cjs +8 -7
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -2
- package/dist/methods.cjs +13 -10
- package/dist/methods.d.cts +3 -1
- package/dist/methods.d.ts +3 -1
- package/dist/methods.js +3 -2
- package/dist/utils.cjs +3 -4
- package/dist/utils.js +1 -2
- package/package.json +15 -5
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { composeHint, isAnyOf, isHostOf } from "../../../common/utils.js";
|
|
2
|
+
//#region src/feeds/platform/handlers/vimeo.ts
|
|
3
|
+
const hosts = ["vimeo.com", "www.vimeo.com"];
|
|
4
|
+
const excludedPaths = [
|
|
5
|
+
"about",
|
|
6
|
+
"blog",
|
|
7
|
+
"business",
|
|
8
|
+
"careers",
|
|
9
|
+
"categories",
|
|
10
|
+
"channels",
|
|
11
|
+
"create",
|
|
12
|
+
"enterprise",
|
|
13
|
+
"explore",
|
|
14
|
+
"features",
|
|
15
|
+
"for-hire",
|
|
16
|
+
"groups",
|
|
17
|
+
"help",
|
|
18
|
+
"join",
|
|
19
|
+
"log_in",
|
|
20
|
+
"manage",
|
|
21
|
+
"ondemand",
|
|
22
|
+
"ott",
|
|
23
|
+
"plus",
|
|
24
|
+
"pricing",
|
|
25
|
+
"pro",
|
|
26
|
+
"search",
|
|
27
|
+
"settings",
|
|
28
|
+
"site_map",
|
|
29
|
+
"solutions",
|
|
30
|
+
"stock",
|
|
31
|
+
"upload",
|
|
32
|
+
"upgrade",
|
|
33
|
+
"watch"
|
|
34
|
+
];
|
|
35
|
+
const vimeoHandler = {
|
|
36
|
+
match: (url) => {
|
|
37
|
+
return isHostOf(url, hosts);
|
|
38
|
+
},
|
|
39
|
+
resolve: (url) => {
|
|
40
|
+
const { origin, pathname } = new URL(url);
|
|
41
|
+
const pathSegments = pathname.split("/").filter(Boolean);
|
|
42
|
+
if (pathSegments[0] === "channels" && pathSegments[1]) return [{
|
|
43
|
+
uri: `${origin}/channels/${pathSegments[1]}/videos/rss`,
|
|
44
|
+
hint: composeHint("vimeo:channel")
|
|
45
|
+
}];
|
|
46
|
+
if (pathSegments[0] === "groups" && pathSegments[1]) return [{
|
|
47
|
+
uri: `${origin}/groups/${pathSegments[1]}/videos/rss`,
|
|
48
|
+
hint: composeHint("vimeo:group")
|
|
49
|
+
}];
|
|
50
|
+
if (pathSegments.length >= 1) {
|
|
51
|
+
const user = pathSegments[0];
|
|
52
|
+
if (!isAnyOf(user, excludedPaths) && !/^\d+$/.test(user)) {
|
|
53
|
+
const feeds = [{
|
|
54
|
+
uri: `${origin}/${user}/videos/rss`,
|
|
55
|
+
hint: composeHint("vimeo:videos")
|
|
56
|
+
}];
|
|
57
|
+
if (pathSegments[1] === "likes") feeds.unshift({
|
|
58
|
+
uri: `${origin}/${user}/likes/rss`,
|
|
59
|
+
hint: composeHint("vimeo:likes")
|
|
60
|
+
});
|
|
61
|
+
return feeds;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { vimeoHandler };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
const require_utils = require(
|
|
2
|
-
|
|
1
|
+
const require_utils = require("../../../common/utils.cjs");
|
|
3
2
|
//#region src/feeds/platform/handlers/wordpress.ts
|
|
4
3
|
const categoryPathRegex = /^\/category\/([^/]+)/;
|
|
5
4
|
const tagPathRegex = /^\/tag\/([^/]+)/;
|
|
@@ -12,19 +11,54 @@ const wordpressHandler = {
|
|
|
12
11
|
const { origin, pathname } = new URL(url);
|
|
13
12
|
const uris = [];
|
|
14
13
|
const categoryMatch = pathname.match(categoryPathRegex);
|
|
15
|
-
if (categoryMatch?.[1]) uris.push(
|
|
14
|
+
if (categoryMatch?.[1]) uris.push({
|
|
15
|
+
uri: [`${origin}/category/${categoryMatch[1]}/feed/`, `${origin}/category/${categoryMatch[1]}/?feed=rss`],
|
|
16
|
+
hint: require_utils.composeHint("wordpress:category")
|
|
17
|
+
});
|
|
16
18
|
const tagMatch = pathname.match(tagPathRegex);
|
|
17
|
-
if (tagMatch?.[1]) uris.push(
|
|
19
|
+
if (tagMatch?.[1]) uris.push({
|
|
20
|
+
uri: [`${origin}/tag/${tagMatch[1]}/feed/`, `${origin}/tag/${tagMatch[1]}/?feed=rss`],
|
|
21
|
+
hint: require_utils.composeHint("wordpress:tag")
|
|
22
|
+
});
|
|
18
23
|
const authorMatch = pathname.match(authorPathRegex);
|
|
19
|
-
if (authorMatch?.[1]) uris.push(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
uris.push(
|
|
24
|
-
|
|
24
|
+
if (authorMatch?.[1]) uris.push({
|
|
25
|
+
uri: [`${origin}/author/${authorMatch[1]}/feed/`, `${origin}/author/${authorMatch[1]}/?feed=rss`],
|
|
26
|
+
hint: require_utils.composeHint("wordpress:author")
|
|
27
|
+
});
|
|
28
|
+
uris.push({
|
|
29
|
+
uri: [`${origin}/feed/`, `${origin}/?feed=rss`],
|
|
30
|
+
hint: require_utils.composeHint("wordpress:posts-rss2")
|
|
31
|
+
});
|
|
32
|
+
uris.push({
|
|
33
|
+
uri: [`${origin}/feed/rss2/`, `${origin}/?feed=rss2`],
|
|
34
|
+
hint: require_utils.composeHint("wordpress:posts-rss2-alt")
|
|
35
|
+
});
|
|
36
|
+
uris.push({
|
|
37
|
+
uri: [`${origin}/feed/rdf/`, `${origin}/?feed=rdf`],
|
|
38
|
+
hint: require_utils.composeHint("wordpress:posts-rdf")
|
|
39
|
+
});
|
|
40
|
+
uris.push({
|
|
41
|
+
uri: [`${origin}/feed/atom/`, `${origin}/?feed=atom`],
|
|
42
|
+
hint: require_utils.composeHint("wordpress:posts-atom")
|
|
43
|
+
});
|
|
44
|
+
uris.push({
|
|
45
|
+
uri: [`${origin}/comments/feed/`, `${origin}/?feed=comments-rss2`],
|
|
46
|
+
hint: require_utils.composeHint("wordpress:comments")
|
|
47
|
+
});
|
|
48
|
+
uris.push({
|
|
49
|
+
uri: [`${origin}/comments/feed/rss2/`, `${origin}/?feed=comments-rss2`],
|
|
50
|
+
hint: require_utils.composeHint("wordpress:comments-rss2")
|
|
51
|
+
});
|
|
52
|
+
uris.push({
|
|
53
|
+
uri: [`${origin}/comments/feed/rdf/`, `${origin}/?feed=comments-rdf`],
|
|
54
|
+
hint: require_utils.composeHint("wordpress:comments-rdf")
|
|
55
|
+
});
|
|
56
|
+
uris.push({
|
|
57
|
+
uri: [`${origin}/comments/feed/atom/`, `${origin}/?feed=comments-atom`],
|
|
58
|
+
hint: require_utils.composeHint("wordpress:comments-atom")
|
|
59
|
+
});
|
|
25
60
|
return uris;
|
|
26
61
|
}
|
|
27
62
|
};
|
|
28
|
-
|
|
29
63
|
//#endregion
|
|
30
|
-
exports.wordpressHandler = wordpressHandler;
|
|
64
|
+
exports.wordpressHandler = wordpressHandler;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { isSubdomainOf } from "../../../common/utils.js";
|
|
2
|
-
|
|
1
|
+
import { composeHint, isSubdomainOf } from "../../../common/utils.js";
|
|
3
2
|
//#region src/feeds/platform/handlers/wordpress.ts
|
|
4
3
|
const categoryPathRegex = /^\/category\/([^/]+)/;
|
|
5
4
|
const tagPathRegex = /^\/tag\/([^/]+)/;
|
|
@@ -12,19 +11,54 @@ const wordpressHandler = {
|
|
|
12
11
|
const { origin, pathname } = new URL(url);
|
|
13
12
|
const uris = [];
|
|
14
13
|
const categoryMatch = pathname.match(categoryPathRegex);
|
|
15
|
-
if (categoryMatch?.[1]) uris.push(
|
|
14
|
+
if (categoryMatch?.[1]) uris.push({
|
|
15
|
+
uri: [`${origin}/category/${categoryMatch[1]}/feed/`, `${origin}/category/${categoryMatch[1]}/?feed=rss`],
|
|
16
|
+
hint: composeHint("wordpress:category")
|
|
17
|
+
});
|
|
16
18
|
const tagMatch = pathname.match(tagPathRegex);
|
|
17
|
-
if (tagMatch?.[1]) uris.push(
|
|
19
|
+
if (tagMatch?.[1]) uris.push({
|
|
20
|
+
uri: [`${origin}/tag/${tagMatch[1]}/feed/`, `${origin}/tag/${tagMatch[1]}/?feed=rss`],
|
|
21
|
+
hint: composeHint("wordpress:tag")
|
|
22
|
+
});
|
|
18
23
|
const authorMatch = pathname.match(authorPathRegex);
|
|
19
|
-
if (authorMatch?.[1]) uris.push(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
uris.push(
|
|
24
|
-
|
|
24
|
+
if (authorMatch?.[1]) uris.push({
|
|
25
|
+
uri: [`${origin}/author/${authorMatch[1]}/feed/`, `${origin}/author/${authorMatch[1]}/?feed=rss`],
|
|
26
|
+
hint: composeHint("wordpress:author")
|
|
27
|
+
});
|
|
28
|
+
uris.push({
|
|
29
|
+
uri: [`${origin}/feed/`, `${origin}/?feed=rss`],
|
|
30
|
+
hint: composeHint("wordpress:posts-rss2")
|
|
31
|
+
});
|
|
32
|
+
uris.push({
|
|
33
|
+
uri: [`${origin}/feed/rss2/`, `${origin}/?feed=rss2`],
|
|
34
|
+
hint: composeHint("wordpress:posts-rss2-alt")
|
|
35
|
+
});
|
|
36
|
+
uris.push({
|
|
37
|
+
uri: [`${origin}/feed/rdf/`, `${origin}/?feed=rdf`],
|
|
38
|
+
hint: composeHint("wordpress:posts-rdf")
|
|
39
|
+
});
|
|
40
|
+
uris.push({
|
|
41
|
+
uri: [`${origin}/feed/atom/`, `${origin}/?feed=atom`],
|
|
42
|
+
hint: composeHint("wordpress:posts-atom")
|
|
43
|
+
});
|
|
44
|
+
uris.push({
|
|
45
|
+
uri: [`${origin}/comments/feed/`, `${origin}/?feed=comments-rss2`],
|
|
46
|
+
hint: composeHint("wordpress:comments")
|
|
47
|
+
});
|
|
48
|
+
uris.push({
|
|
49
|
+
uri: [`${origin}/comments/feed/rss2/`, `${origin}/?feed=comments-rss2`],
|
|
50
|
+
hint: composeHint("wordpress:comments-rss2")
|
|
51
|
+
});
|
|
52
|
+
uris.push({
|
|
53
|
+
uri: [`${origin}/comments/feed/rdf/`, `${origin}/?feed=comments-rdf`],
|
|
54
|
+
hint: composeHint("wordpress:comments-rdf")
|
|
55
|
+
});
|
|
56
|
+
uris.push({
|
|
57
|
+
uri: [`${origin}/comments/feed/atom/`, `${origin}/?feed=comments-atom`],
|
|
58
|
+
hint: composeHint("wordpress:comments-atom")
|
|
59
|
+
});
|
|
25
60
|
return uris;
|
|
26
61
|
}
|
|
27
62
|
};
|
|
28
|
-
|
|
29
63
|
//#endregion
|
|
30
|
-
export { wordpressHandler };
|
|
64
|
+
export { wordpressHandler };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
+
//#region src/feeds/platform/handlers/wpengine.ts
|
|
3
|
+
const wpengineHandler = {
|
|
4
|
+
match: (url) => {
|
|
5
|
+
return require_utils.isSubdomainOf(url, ["wpenginepowered.com", "wpengine.com"]);
|
|
6
|
+
},
|
|
7
|
+
resolve: require("./wordpress.cjs").wordpressHandler.resolve
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.wpengineHandler = wpengineHandler;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isSubdomainOf } from "../../../common/utils.js";
|
|
2
|
+
import { wordpressHandler } from "./wordpress.js";
|
|
3
|
+
//#region src/feeds/platform/handlers/wpengine.ts
|
|
4
|
+
const wpengineHandler = {
|
|
5
|
+
match: (url) => {
|
|
6
|
+
return isSubdomainOf(url, ["wpenginepowered.com", "wpengine.com"]);
|
|
7
|
+
},
|
|
8
|
+
resolve: wordpressHandler.resolve
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { wpengineHandler };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
+
//#region src/feeds/platform/handlers/ximalaya.ts
|
|
3
|
+
const hosts = ["www.ximalaya.com", "ximalaya.com"];
|
|
4
|
+
const ximalayaHandler = {
|
|
5
|
+
match: (url) => {
|
|
6
|
+
return require_utils.isHostOf(url, hosts);
|
|
7
|
+
},
|
|
8
|
+
resolve: (url) => {
|
|
9
|
+
const { pathname } = new URL(url);
|
|
10
|
+
const id = pathname.match(/^\/album\/(\d+)/)?.[1];
|
|
11
|
+
if (!id) return [];
|
|
12
|
+
return [{
|
|
13
|
+
uri: `https://www.ximalaya.com/album/${id}.xml`,
|
|
14
|
+
hint: require_utils.composeHint("ximalaya:album")
|
|
15
|
+
}];
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.ximalayaHandler = ximalayaHandler;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { composeHint, isHostOf } from "../../../common/utils.js";
|
|
2
|
+
//#region src/feeds/platform/handlers/ximalaya.ts
|
|
3
|
+
const hosts = ["www.ximalaya.com", "ximalaya.com"];
|
|
4
|
+
const ximalayaHandler = {
|
|
5
|
+
match: (url) => {
|
|
6
|
+
return isHostOf(url, hosts);
|
|
7
|
+
},
|
|
8
|
+
resolve: (url) => {
|
|
9
|
+
const { pathname } = new URL(url);
|
|
10
|
+
const id = pathname.match(/^\/album\/(\d+)/)?.[1];
|
|
11
|
+
if (!id) return [];
|
|
12
|
+
return [{
|
|
13
|
+
uri: `https://www.ximalaya.com/album/${id}.xml`,
|
|
14
|
+
hint: composeHint("ximalaya:album")
|
|
15
|
+
}];
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ximalayaHandler };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
const require_utils = require(
|
|
2
|
-
|
|
1
|
+
const require_utils = require("../../../common/utils.cjs");
|
|
3
2
|
//#region src/feeds/platform/handlers/youtube.ts
|
|
4
3
|
const hosts = [
|
|
5
4
|
"youtube.com",
|
|
@@ -16,12 +15,39 @@ const customPathRegex = /^\/c\/([^/]+)/;
|
|
|
16
15
|
const extractChannelIdFromContent = (content) => {
|
|
17
16
|
return content.match(channelIdRegex)?.[1];
|
|
18
17
|
};
|
|
18
|
+
const getAllUploadsPlaylistId = (channelId) => {
|
|
19
|
+
return channelId.replace(/^UC/, "UU");
|
|
20
|
+
};
|
|
19
21
|
const getVideosOnlyPlaylistId = (channelId) => {
|
|
20
22
|
return channelId.replace(/^UC/, "UULF");
|
|
21
23
|
};
|
|
22
24
|
const getShortsOnlyPlaylistId = (channelId) => {
|
|
23
25
|
return channelId.replace(/^UC/, "UUSH");
|
|
24
26
|
};
|
|
27
|
+
const getLiveStreamsOnlyPlaylistId = (channelId) => {
|
|
28
|
+
return channelId.replace(/^UC/, "UULV");
|
|
29
|
+
};
|
|
30
|
+
const feedUrl = (param, value) => {
|
|
31
|
+
return `https://www.youtube.com/feeds/videos.xml?${param}=${value}`;
|
|
32
|
+
};
|
|
33
|
+
const pushChannelUris = (uris, channelId) => {
|
|
34
|
+
uris.push({
|
|
35
|
+
uri: [feedUrl("channel_id", channelId), feedUrl("playlist_id", getAllUploadsPlaylistId(channelId))],
|
|
36
|
+
hint: require_utils.composeHint("youtube:all")
|
|
37
|
+
});
|
|
38
|
+
uris.push({
|
|
39
|
+
uri: feedUrl("playlist_id", getVideosOnlyPlaylistId(channelId)),
|
|
40
|
+
hint: require_utils.composeHint("youtube:videos")
|
|
41
|
+
});
|
|
42
|
+
uris.push({
|
|
43
|
+
uri: feedUrl("playlist_id", getShortsOnlyPlaylistId(channelId)),
|
|
44
|
+
hint: require_utils.composeHint("youtube:shorts")
|
|
45
|
+
});
|
|
46
|
+
uris.push({
|
|
47
|
+
uri: feedUrl("playlist_id", getLiveStreamsOnlyPlaylistId(channelId)),
|
|
48
|
+
hint: require_utils.composeHint("youtube:live")
|
|
49
|
+
});
|
|
50
|
+
};
|
|
25
51
|
const youtubeHandler = {
|
|
26
52
|
match: (url) => {
|
|
27
53
|
return require_utils.isHostOf(url, hosts);
|
|
@@ -32,25 +58,21 @@ const youtubeHandler = {
|
|
|
32
58
|
const channelMatch = parsedUrl.pathname.match(channelPathRegex);
|
|
33
59
|
if (channelMatch?.[1]) {
|
|
34
60
|
const channelId = channelMatch[1];
|
|
35
|
-
uris
|
|
36
|
-
uris.push(`https://www.youtube.com/feeds/videos.xml?playlist_id=${getVideosOnlyPlaylistId(channelId)}`);
|
|
37
|
-
uris.push(`https://www.youtube.com/feeds/videos.xml?playlist_id=${getShortsOnlyPlaylistId(channelId)}`);
|
|
61
|
+
pushChannelUris(uris, channelId);
|
|
38
62
|
}
|
|
39
63
|
const playlistId = parsedUrl.searchParams.get("list");
|
|
40
|
-
if (playlistId) uris.push(
|
|
64
|
+
if (playlistId) uris.push({
|
|
65
|
+
uri: feedUrl("playlist_id", playlistId),
|
|
66
|
+
hint: require_utils.composeHint("youtube:playlist")
|
|
67
|
+
});
|
|
41
68
|
if (uris.length === 0 && content) {
|
|
42
69
|
if (parsedUrl.searchParams.has("v") || parsedUrl.hostname.includes("youtu.be") && parsedUrl.pathname.length > 1 || parsedUrl.pathname.match(handlePathRegex) || parsedUrl.pathname.match(userPathRegex) || parsedUrl.pathname.match(customPathRegex)) {
|
|
43
70
|
const channelId = extractChannelIdFromContent(content);
|
|
44
|
-
if (channelId)
|
|
45
|
-
uris.push(`https://www.youtube.com/feeds/videos.xml?channel_id=${channelId}`);
|
|
46
|
-
uris.push(`https://www.youtube.com/feeds/videos.xml?playlist_id=${getVideosOnlyPlaylistId(channelId)}`);
|
|
47
|
-
uris.push(`https://www.youtube.com/feeds/videos.xml?playlist_id=${getShortsOnlyPlaylistId(channelId)}`);
|
|
48
|
-
}
|
|
71
|
+
if (channelId) pushChannelUris(uris, channelId);
|
|
49
72
|
}
|
|
50
73
|
}
|
|
51
74
|
return uris;
|
|
52
75
|
}
|
|
53
76
|
};
|
|
54
|
-
|
|
55
77
|
//#endregion
|
|
56
|
-
exports.youtubeHandler = youtubeHandler;
|
|
78
|
+
exports.youtubeHandler = youtubeHandler;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { isHostOf } from "../../../common/utils.js";
|
|
2
|
-
|
|
1
|
+
import { composeHint, isHostOf } from "../../../common/utils.js";
|
|
3
2
|
//#region src/feeds/platform/handlers/youtube.ts
|
|
4
3
|
const hosts = [
|
|
5
4
|
"youtube.com",
|
|
@@ -16,12 +15,39 @@ const customPathRegex = /^\/c\/([^/]+)/;
|
|
|
16
15
|
const extractChannelIdFromContent = (content) => {
|
|
17
16
|
return content.match(channelIdRegex)?.[1];
|
|
18
17
|
};
|
|
18
|
+
const getAllUploadsPlaylistId = (channelId) => {
|
|
19
|
+
return channelId.replace(/^UC/, "UU");
|
|
20
|
+
};
|
|
19
21
|
const getVideosOnlyPlaylistId = (channelId) => {
|
|
20
22
|
return channelId.replace(/^UC/, "UULF");
|
|
21
23
|
};
|
|
22
24
|
const getShortsOnlyPlaylistId = (channelId) => {
|
|
23
25
|
return channelId.replace(/^UC/, "UUSH");
|
|
24
26
|
};
|
|
27
|
+
const getLiveStreamsOnlyPlaylistId = (channelId) => {
|
|
28
|
+
return channelId.replace(/^UC/, "UULV");
|
|
29
|
+
};
|
|
30
|
+
const feedUrl = (param, value) => {
|
|
31
|
+
return `https://www.youtube.com/feeds/videos.xml?${param}=${value}`;
|
|
32
|
+
};
|
|
33
|
+
const pushChannelUris = (uris, channelId) => {
|
|
34
|
+
uris.push({
|
|
35
|
+
uri: [feedUrl("channel_id", channelId), feedUrl("playlist_id", getAllUploadsPlaylistId(channelId))],
|
|
36
|
+
hint: composeHint("youtube:all")
|
|
37
|
+
});
|
|
38
|
+
uris.push({
|
|
39
|
+
uri: feedUrl("playlist_id", getVideosOnlyPlaylistId(channelId)),
|
|
40
|
+
hint: composeHint("youtube:videos")
|
|
41
|
+
});
|
|
42
|
+
uris.push({
|
|
43
|
+
uri: feedUrl("playlist_id", getShortsOnlyPlaylistId(channelId)),
|
|
44
|
+
hint: composeHint("youtube:shorts")
|
|
45
|
+
});
|
|
46
|
+
uris.push({
|
|
47
|
+
uri: feedUrl("playlist_id", getLiveStreamsOnlyPlaylistId(channelId)),
|
|
48
|
+
hint: composeHint("youtube:live")
|
|
49
|
+
});
|
|
50
|
+
};
|
|
25
51
|
const youtubeHandler = {
|
|
26
52
|
match: (url) => {
|
|
27
53
|
return isHostOf(url, hosts);
|
|
@@ -32,25 +58,21 @@ const youtubeHandler = {
|
|
|
32
58
|
const channelMatch = parsedUrl.pathname.match(channelPathRegex);
|
|
33
59
|
if (channelMatch?.[1]) {
|
|
34
60
|
const channelId = channelMatch[1];
|
|
35
|
-
uris
|
|
36
|
-
uris.push(`https://www.youtube.com/feeds/videos.xml?playlist_id=${getVideosOnlyPlaylistId(channelId)}`);
|
|
37
|
-
uris.push(`https://www.youtube.com/feeds/videos.xml?playlist_id=${getShortsOnlyPlaylistId(channelId)}`);
|
|
61
|
+
pushChannelUris(uris, channelId);
|
|
38
62
|
}
|
|
39
63
|
const playlistId = parsedUrl.searchParams.get("list");
|
|
40
|
-
if (playlistId) uris.push(
|
|
64
|
+
if (playlistId) uris.push({
|
|
65
|
+
uri: feedUrl("playlist_id", playlistId),
|
|
66
|
+
hint: composeHint("youtube:playlist")
|
|
67
|
+
});
|
|
41
68
|
if (uris.length === 0 && content) {
|
|
42
69
|
if (parsedUrl.searchParams.has("v") || parsedUrl.hostname.includes("youtu.be") && parsedUrl.pathname.length > 1 || parsedUrl.pathname.match(handlePathRegex) || parsedUrl.pathname.match(userPathRegex) || parsedUrl.pathname.match(customPathRegex)) {
|
|
43
70
|
const channelId = extractChannelIdFromContent(content);
|
|
44
|
-
if (channelId)
|
|
45
|
-
uris.push(`https://www.youtube.com/feeds/videos.xml?channel_id=${channelId}`);
|
|
46
|
-
uris.push(`https://www.youtube.com/feeds/videos.xml?playlist_id=${getVideosOnlyPlaylistId(channelId)}`);
|
|
47
|
-
uris.push(`https://www.youtube.com/feeds/videos.xml?playlist_id=${getShortsOnlyPlaylistId(channelId)}`);
|
|
48
|
-
}
|
|
71
|
+
if (channelId) pushChannelUris(uris, channelId);
|
|
49
72
|
}
|
|
50
73
|
}
|
|
51
74
|
return uris;
|
|
52
75
|
}
|
|
53
76
|
};
|
|
54
|
-
|
|
55
77
|
//#endregion
|
|
56
|
-
export { youtubeHandler };
|
|
78
|
+
export { youtubeHandler };
|
package/dist/feeds.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
const require_defaults = require(
|
|
3
|
-
const require_extractors = require(
|
|
4
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_defaults = require("./feeds/defaults.cjs");
|
|
3
|
+
const require_extractors = require("./feeds/extractors.cjs");
|
|
5
4
|
exports.anchorLabels = require_defaults.anchorLabels;
|
|
6
5
|
exports.defaultExtractor = require_extractors.defaultExtractor;
|
|
7
6
|
exports.defaultGuessOptions = require_defaults.defaultGuessOptions;
|
|
@@ -13,4 +12,4 @@ exports.linkSelectors = require_defaults.linkSelectors;
|
|
|
13
12
|
exports.mimeTypes = require_defaults.mimeTypes;
|
|
14
13
|
exports.urisBalanced = require_defaults.urisBalanced;
|
|
15
14
|
exports.urisComprehensive = require_defaults.urisComprehensive;
|
|
16
|
-
exports.urisMinimal = require_defaults.urisMinimal;
|
|
15
|
+
exports.urisMinimal = require_defaults.urisMinimal;
|
package/dist/feeds.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { anchorLabels, defaultGuessOptions, defaultHeadersOptions, defaultHtmlOptions, defaultPlatformOptions, ignoredUris, linkSelectors, mimeTypes, urisBalanced, urisComprehensive, urisMinimal } from "./feeds/defaults.js";
|
|
2
2
|
import { defaultExtractor } from "./feeds/extractors.js";
|
|
3
|
-
|
|
4
|
-
export { anchorLabels, defaultExtractor, defaultGuessOptions, defaultHeadersOptions, defaultHtmlOptions, defaultPlatformOptions, ignoredUris, linkSelectors, mimeTypes, urisBalanced, urisComprehensive, urisMinimal };
|
|
3
|
+
export { anchorLabels, defaultExtractor, defaultGuessOptions, defaultHeadersOptions, defaultHtmlOptions, defaultPlatformOptions, ignoredUris, linkSelectors, mimeTypes, urisBalanced, urisComprehensive, urisMinimal };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
const require_utils = require(
|
|
2
|
-
const require_utils$1 = require(
|
|
3
|
-
const require_index = require(
|
|
4
|
-
const require_index$1 = require(
|
|
5
|
-
const require_index$2 = require(
|
|
6
|
-
const require_utils$2 = require(
|
|
7
|
-
|
|
1
|
+
const require_utils = require("../../common/utils.cjs");
|
|
2
|
+
const require_utils$1 = require("../../common/discover/utils.cjs");
|
|
3
|
+
const require_index = require("../feed/index.cjs");
|
|
4
|
+
const require_index$1 = require("../headers/index.cjs");
|
|
5
|
+
const require_index$2 = require("../html/index.cjs");
|
|
6
|
+
const require_utils$2 = require("./utils.cjs");
|
|
8
7
|
//#region src/hubs/discover/index.ts
|
|
9
8
|
const discoverHubs = async (input, options = {}) => {
|
|
10
9
|
const { methods = [
|
|
@@ -28,6 +27,5 @@ const discoverHubs = async (input, options = {}) => {
|
|
|
28
27
|
}
|
|
29
28
|
return results;
|
|
30
29
|
};
|
|
31
|
-
|
|
32
30
|
//#endregion
|
|
33
|
-
exports.discoverHubs = discoverHubs;
|
|
31
|
+
exports.discoverHubs = discoverHubs;
|
|
@@ -4,7 +4,6 @@ import { discoverHubsFromFeed } from "../feed/index.js";
|
|
|
4
4
|
import { discoverHubsFromHeaders } from "../headers/index.js";
|
|
5
5
|
import { discoverHubsFromHtml } from "../html/index.js";
|
|
6
6
|
import { normalizeInput } from "./utils.js";
|
|
7
|
-
|
|
8
7
|
//#region src/hubs/discover/index.ts
|
|
9
8
|
const discoverHubs = async (input, options = {}) => {
|
|
10
9
|
const { methods = [
|
|
@@ -28,6 +27,5 @@ const discoverHubs = async (input, options = {}) => {
|
|
|
28
27
|
}
|
|
29
28
|
return results;
|
|
30
29
|
};
|
|
31
|
-
|
|
32
30
|
//#endregion
|
|
33
|
-
export { discoverHubs };
|
|
31
|
+
export { discoverHubs };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
//#region src/hubs/discover/utils.ts
|
|
3
2
|
const normalizeInput = async (input, fetchFn) => {
|
|
4
3
|
if (typeof input === "string") {
|
|
@@ -15,6 +14,5 @@ const normalizeInput = async (input, fetchFn) => {
|
|
|
15
14
|
headers: input.headers
|
|
16
15
|
};
|
|
17
16
|
};
|
|
18
|
-
|
|
19
17
|
//#endregion
|
|
20
|
-
exports.normalizeInput = normalizeInput;
|
|
18
|
+
exports.normalizeInput = normalizeInput;
|
package/dist/hubs/feed/index.cjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
let feedsmith = require("feedsmith");
|
|
2
|
-
|
|
3
2
|
//#region src/hubs/feed/index.ts
|
|
4
3
|
const getLinksWithRel = (links, rel) => {
|
|
5
4
|
return links?.filter((link) => link.rel === rel && link.href).map((link) => link.href) ?? [];
|
|
@@ -27,6 +26,5 @@ const discoverHubsFromFeed = (content, baseUrl) => {
|
|
|
27
26
|
} catch {}
|
|
28
27
|
return [];
|
|
29
28
|
};
|
|
30
|
-
|
|
31
29
|
//#endregion
|
|
32
|
-
exports.discoverHubsFromFeed = discoverHubsFromFeed;
|
|
30
|
+
exports.discoverHubsFromFeed = discoverHubsFromFeed;
|
package/dist/hubs/feed/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { parseFeed } from "feedsmith";
|
|
2
|
-
|
|
3
2
|
//#region src/hubs/feed/index.ts
|
|
4
3
|
const getLinksWithRel = (links, rel) => {
|
|
5
4
|
return links?.filter((link) => link.rel === rel && link.href).map((link) => link.href) ?? [];
|
|
@@ -27,6 +26,5 @@ const discoverHubsFromFeed = (content, baseUrl) => {
|
|
|
27
26
|
} catch {}
|
|
28
27
|
return [];
|
|
29
28
|
};
|
|
30
|
-
|
|
31
29
|
//#endregion
|
|
32
|
-
export { discoverHubsFromFeed };
|
|
30
|
+
export { discoverHubsFromFeed };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
const require_utils = require(
|
|
2
|
-
const require_index = require(
|
|
3
|
-
|
|
1
|
+
const require_utils = require("../../common/utils.cjs");
|
|
2
|
+
const require_index = require("../../common/uris/headers/index.cjs");
|
|
4
3
|
//#region src/hubs/headers/index.ts
|
|
5
4
|
const hubSelector = [{ rel: "hub" }];
|
|
6
5
|
const selfSelector = [{ rel: "self" }];
|
|
@@ -14,6 +13,5 @@ const discoverHubsFromHeaders = (headers, baseUrl, normalizeUrlFn = require_util
|
|
|
14
13
|
topic
|
|
15
14
|
}));
|
|
16
15
|
};
|
|
17
|
-
|
|
18
16
|
//#endregion
|
|
19
|
-
exports.discoverHubsFromHeaders = discoverHubsFromHeaders;
|
|
17
|
+
exports.discoverHubsFromHeaders = discoverHubsFromHeaders;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { normalizeUrl } from "../../common/utils.js";
|
|
2
2
|
import { discoverUrisFromHeaders } from "../../common/uris/headers/index.js";
|
|
3
|
-
|
|
4
3
|
//#region src/hubs/headers/index.ts
|
|
5
4
|
const hubSelector = [{ rel: "hub" }];
|
|
6
5
|
const selfSelector = [{ rel: "self" }];
|
|
@@ -14,6 +13,5 @@ const discoverHubsFromHeaders = (headers, baseUrl, normalizeUrlFn = normalizeUrl
|
|
|
14
13
|
topic
|
|
15
14
|
}));
|
|
16
15
|
};
|
|
17
|
-
|
|
18
16
|
//#endregion
|
|
19
|
-
export { discoverHubsFromHeaders };
|
|
17
|
+
export { discoverHubsFromHeaders };
|
package/dist/hubs/html/index.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
const require_utils = require(
|
|
2
|
-
const require_index = require(
|
|
3
|
-
|
|
1
|
+
const require_utils = require("../../common/utils.cjs");
|
|
2
|
+
const require_index = require("../../common/uris/html/index.cjs");
|
|
4
3
|
//#region src/hubs/html/index.ts
|
|
5
4
|
const hubSelector = [{ rel: "hub" }];
|
|
6
5
|
const selfSelector = [{ rel: "self" }];
|
|
@@ -25,6 +24,5 @@ const discoverHubsFromHtml = (content, baseUrl, normalizeUrlFn = require_utils.n
|
|
|
25
24
|
topic
|
|
26
25
|
}));
|
|
27
26
|
};
|
|
28
|
-
|
|
29
27
|
//#endregion
|
|
30
|
-
exports.discoverHubsFromHtml = discoverHubsFromHtml;
|
|
28
|
+
exports.discoverHubsFromHtml = discoverHubsFromHtml;
|
package/dist/hubs/html/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { normalizeUrl } from "../../common/utils.js";
|
|
2
2
|
import { discoverUrisFromHtml } from "../../common/uris/html/index.js";
|
|
3
|
-
|
|
4
3
|
//#region src/hubs/html/index.ts
|
|
5
4
|
const hubSelector = [{ rel: "hub" }];
|
|
6
5
|
const selfSelector = [{ rel: "self" }];
|
|
@@ -25,6 +24,5 @@ const discoverHubsFromHtml = (content, baseUrl, normalizeUrlFn = normalizeUrl) =
|
|
|
25
24
|
topic
|
|
26
25
|
}));
|
|
27
26
|
};
|
|
28
|
-
|
|
29
27
|
//#endregion
|
|
30
|
-
export { discoverHubsFromHtml };
|
|
28
|
+
export { discoverHubsFromHtml };
|
package/dist/hubs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {};
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
const require_index = require(
|
|
3
|
-
const require_index$1 = require(
|
|
4
|
-
const require_index$2 = require(
|
|
5
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_index = require("./blogrolls/index.cjs");
|
|
3
|
+
const require_index$1 = require("./favicons/index.cjs");
|
|
4
|
+
const require_index$2 = require("./feeds/index.cjs");
|
|
5
|
+
const require_index$3 = require("./hubs/discover/index.cjs");
|
|
6
6
|
exports.discoverBlogrolls = require_index.discoverBlogrolls;
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
7
|
+
exports.discoverFavicons = require_index$1.discoverFavicons;
|
|
8
|
+
exports.discoverFeeds = require_index$2.discoverFeeds;
|
|
9
|
+
exports.discoverHubs = require_index$3.discoverHubs;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { DiscoverExtractFn, DiscoverFetchFn, DiscoverFetchFnOptions, DiscoverFetchFnResponse, DiscoverInput, DiscoverInputObject, DiscoverMethodsConfig, DiscoverNormalizeUrlFn, DiscoverOnProgressFn, DiscoverOptions, DiscoverProgress, DiscoverResult } from "./common/types.cjs";
|
|
1
|
+
import { DiscoverExtractFn, DiscoverFetchFn, DiscoverFetchFnOptions, DiscoverFetchFnResponse, DiscoverInput, DiscoverInputObject, DiscoverMethod, DiscoverMethodsConfig, DiscoverNormalizeUrlFn, DiscoverOnProgressFn, DiscoverOptions, DiscoverProgress, DiscoverResult, DiscoverUriEntry, DiscoverUriHint, UriEntry } from "./common/types.cjs";
|
|
2
2
|
import { discoverBlogrolls } from "./blogrolls/index.cjs";
|
|
3
|
+
import { discoverFavicons } from "./favicons/index.cjs";
|
|
3
4
|
import { discoverFeeds } from "./feeds/index.cjs";
|
|
4
5
|
import { discoverHubs } from "./hubs/discover/index.cjs";
|
|
5
|
-
export { type DiscoverExtractFn, type DiscoverFetchFn, type DiscoverFetchFnOptions, type DiscoverFetchFnResponse, type DiscoverInput, type DiscoverInputObject, type DiscoverMethodsConfig, type DiscoverNormalizeUrlFn, type DiscoverOnProgressFn, type DiscoverOptions, type DiscoverProgress, type DiscoverResult, discoverBlogrolls, discoverFeeds, discoverHubs };
|
|
6
|
+
export { type DiscoverExtractFn, type DiscoverFetchFn, type DiscoverFetchFnOptions, type DiscoverFetchFnResponse, type DiscoverInput, type DiscoverInputObject, type DiscoverMethod, type DiscoverMethodsConfig, type DiscoverNormalizeUrlFn, type DiscoverOnProgressFn, type DiscoverOptions, type DiscoverProgress, type DiscoverResult, type DiscoverUriEntry, type DiscoverUriHint, type UriEntry, discoverBlogrolls, discoverFavicons, discoverFeeds, discoverHubs };
|