feedscout 1.6.2 → 1.7.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 +14 -0
- package/dist/blogrolls/extractors.cjs +1 -1
- package/dist/blogrolls/extractors.js +1 -1
- package/dist/blogrolls/index.cjs +3 -2
- package/dist/blogrolls/index.js +5 -4
- package/dist/common/discover/index.cjs +21 -9
- package/dist/common/discover/index.js +21 -9
- package/dist/common/discover/utils.cjs +44 -18
- package/dist/common/discover/utils.d.cts +8 -0
- package/dist/common/discover/utils.d.ts +8 -0
- package/dist/common/discover/utils.js +43 -19
- package/dist/common/locales.cjs +3 -1
- package/dist/common/locales.js +3 -1
- package/dist/common/types.d.cts +6 -4
- package/dist/common/types.d.ts +6 -4
- package/dist/common/uris/guess/utils.cjs +2 -1
- package/dist/common/uris/guess/utils.js +2 -1
- package/dist/common/uris/headers/index.cjs +2 -1
- package/dist/common/uris/headers/index.js +2 -1
- package/dist/common/utils.cjs +10 -3
- package/dist/common/utils.js +9 -3
- package/dist/favicons/extractors.cjs +16 -4
- package/dist/favicons/extractors.js +16 -4
- package/dist/favicons/index.cjs +3 -2
- package/dist/favicons/index.js +5 -4
- package/dist/favicons/platform/handlers/bluesky.cjs +3 -3
- package/dist/favicons/platform/handlers/bluesky.js +3 -3
- package/dist/favicons/platform/handlers/mastodon.cjs +7 -5
- package/dist/favicons/platform/handlers/mastodon.js +7 -5
- package/dist/favicons/platform/handlers/reddit.cjs +5 -6
- package/dist/favicons/platform/handlers/reddit.js +5 -6
- package/dist/favicons/utils.cjs +10 -0
- package/dist/favicons/utils.js +9 -0
- package/dist/feeds/defaults.cjs +2 -0
- package/dist/feeds/defaults.js +2 -0
- package/dist/feeds/extractors.cjs +10 -8
- package/dist/feeds/extractors.js +10 -8
- package/dist/feeds/index.cjs +2 -2
- package/dist/feeds/index.js +3 -3
- package/dist/feeds/platform/handlers/blogspot.cjs +2 -1
- package/dist/feeds/platform/handlers/blogspot.js +2 -1
- package/dist/feeds/platform/handlers/bluesky.cjs +2 -1
- package/dist/feeds/platform/handlers/bluesky.js +2 -1
- package/dist/feeds/platform/handlers/csdn.cjs +2 -1
- package/dist/feeds/platform/handlers/csdn.js +2 -1
- package/dist/feeds/platform/handlers/deviantart.cjs +8 -4
- package/dist/feeds/platform/handlers/deviantart.js +8 -4
- package/dist/feeds/platform/handlers/douban.cjs +4 -2
- package/dist/feeds/platform/handlers/douban.js +4 -2
- package/dist/feeds/platform/handlers/github.cjs +12 -6
- package/dist/feeds/platform/handlers/github.js +12 -6
- package/dist/feeds/platform/handlers/githubGist.cjs +6 -3
- package/dist/feeds/platform/handlers/githubGist.js +6 -3
- package/dist/feeds/platform/handlers/gitlab.cjs +15 -2
- package/dist/feeds/platform/handlers/gitlab.js +16 -3
- package/dist/feeds/platform/handlers/lemmy.cjs +46 -0
- package/dist/feeds/platform/handlers/lemmy.js +46 -0
- package/dist/feeds/platform/handlers/mastodon.cjs +5 -3
- package/dist/feeds/platform/handlers/mastodon.js +5 -3
- package/dist/feeds/platform/handlers/medium.cjs +10 -5
- package/dist/feeds/platform/handlers/medium.js +10 -5
- package/dist/feeds/platform/handlers/reddit.cjs +10 -5
- package/dist/feeds/platform/handlers/reddit.js +10 -5
- package/dist/feeds/platform/handlers/soundcloud.cjs +3 -2
- package/dist/feeds/platform/handlers/soundcloud.js +3 -2
- package/dist/feeds/platform/handlers/stackExchange.cjs +6 -3
- package/dist/feeds/platform/handlers/stackExchange.js +6 -3
- package/dist/feeds/platform/handlers/steam.cjs +4 -2
- package/dist/feeds/platform/handlers/steam.js +4 -2
- package/dist/feeds/platform/handlers/v2ex.cjs +4 -2
- package/dist/feeds/platform/handlers/v2ex.js +4 -2
- package/dist/feeds/platform/handlers/vimeo.cjs +3 -2
- package/dist/feeds/platform/handlers/vimeo.js +3 -2
- package/dist/feeds/platform/handlers/ximalaya.cjs +2 -1
- package/dist/feeds/platform/handlers/ximalaya.js +2 -1
- package/dist/feeds/platform/handlers/youtube.cjs +10 -9
- package/dist/feeds/platform/handlers/youtube.js +10 -9
- package/dist/hubs/discover/index.cjs +4 -4
- package/dist/hubs/discover/index.js +5 -5
- package/dist/hubs/discover/types.d.cts +2 -2
- package/dist/hubs/discover/types.d.ts +2 -2
- package/dist/hubs/feed/index.cjs +7 -5
- package/dist/hubs/feed/index.js +7 -5
- package/dist/hubs/headers/index.cjs +3 -3
- package/dist/hubs/headers/index.js +4 -4
- package/dist/hubs/html/index.cjs +3 -3
- package/dist/hubs/html/index.js +4 -4
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/package.json +3 -3
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveUrl } from "../../common/utils.js";
|
|
2
2
|
import { discoverUrisFromHeaders } from "../../common/uris/headers/index.js";
|
|
3
3
|
//#region src/hubs/headers/index.ts
|
|
4
4
|
const hubSelector = [{ rel: "hub" }];
|
|
5
5
|
const selfSelector = [{ rel: "self" }];
|
|
6
|
-
const discoverHubsFromHeaders = (headers, baseUrl,
|
|
6
|
+
const discoverHubsFromHeaders = (headers, baseUrl, resolveUrlFn = resolveUrl) => {
|
|
7
7
|
const hubUris = discoverUrisFromHeaders(headers, { linkSelectors: hubSelector });
|
|
8
8
|
if (hubUris.length === 0) return [];
|
|
9
9
|
const selfUris = discoverUrisFromHeaders(headers, { linkSelectors: selfSelector });
|
|
10
|
-
const topic = selfUris[0] ?
|
|
10
|
+
const topic = selfUris[0] ? resolveUrlFn(selfUris[0], baseUrl) : baseUrl;
|
|
11
11
|
return hubUris.map((hub) => ({
|
|
12
|
-
hub:
|
|
12
|
+
hub: resolveUrlFn(hub, baseUrl),
|
|
13
13
|
topic
|
|
14
14
|
}));
|
|
15
15
|
};
|
package/dist/hubs/html/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@ const htmlOptions = {
|
|
|
8
8
|
anchorIgnoredUris: [],
|
|
9
9
|
anchorLabels: []
|
|
10
10
|
};
|
|
11
|
-
const discoverHubsFromHtml = (content, baseUrl,
|
|
11
|
+
const discoverHubsFromHtml = (content, baseUrl, resolveUrlFn = require_utils.resolveUrl) => {
|
|
12
12
|
const hubUris = require_index.discoverUrisFromHtml(content, {
|
|
13
13
|
...htmlOptions,
|
|
14
14
|
linkSelectors: hubSelector
|
|
@@ -18,9 +18,9 @@ const discoverHubsFromHtml = (content, baseUrl, normalizeUrlFn = require_utils.n
|
|
|
18
18
|
...htmlOptions,
|
|
19
19
|
linkSelectors: selfSelector
|
|
20
20
|
});
|
|
21
|
-
const topic = selfUris[0] ?
|
|
21
|
+
const topic = selfUris[0] ? resolveUrlFn(selfUris[0], baseUrl) : baseUrl;
|
|
22
22
|
return hubUris.map((hub) => ({
|
|
23
|
-
hub:
|
|
23
|
+
hub: resolveUrlFn(hub, baseUrl),
|
|
24
24
|
topic
|
|
25
25
|
}));
|
|
26
26
|
};
|
package/dist/hubs/html/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveUrl } from "../../common/utils.js";
|
|
2
2
|
import { discoverUrisFromHtml } from "../../common/uris/html/index.js";
|
|
3
3
|
//#region src/hubs/html/index.ts
|
|
4
4
|
const hubSelector = [{ rel: "hub" }];
|
|
@@ -8,7 +8,7 @@ const htmlOptions = {
|
|
|
8
8
|
anchorIgnoredUris: [],
|
|
9
9
|
anchorLabels: []
|
|
10
10
|
};
|
|
11
|
-
const discoverHubsFromHtml = (content, baseUrl,
|
|
11
|
+
const discoverHubsFromHtml = (content, baseUrl, resolveUrlFn = resolveUrl) => {
|
|
12
12
|
const hubUris = discoverUrisFromHtml(content, {
|
|
13
13
|
...htmlOptions,
|
|
14
14
|
linkSelectors: hubSelector
|
|
@@ -18,9 +18,9 @@ const discoverHubsFromHtml = (content, baseUrl, normalizeUrlFn = normalizeUrl) =
|
|
|
18
18
|
...htmlOptions,
|
|
19
19
|
linkSelectors: selfSelector
|
|
20
20
|
});
|
|
21
|
-
const topic = selfUris[0] ?
|
|
21
|
+
const topic = selfUris[0] ? resolveUrlFn(selfUris[0], baseUrl) : baseUrl;
|
|
22
22
|
return hubUris.map((hub) => ({
|
|
23
|
-
hub:
|
|
23
|
+
hub: resolveUrlFn(hub, baseUrl),
|
|
24
24
|
topic
|
|
25
25
|
}));
|
|
26
26
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_utils = require("./common/discover/utils.cjs");
|
|
2
3
|
const require_index = require("./blogrolls/index.cjs");
|
|
3
4
|
const require_index$1 = require("./favicons/index.cjs");
|
|
4
5
|
const require_index$2 = require("./feeds/index.cjs");
|
|
5
6
|
const require_index$3 = require("./hubs/discover/index.cjs");
|
|
7
|
+
exports.defaultResolveSiteUrlFn = require_utils.defaultResolveSiteUrlFn;
|
|
6
8
|
exports.discoverBlogrolls = require_index.discoverBlogrolls;
|
|
7
9
|
exports.discoverFavicons = require_index$1.discoverFavicons;
|
|
8
10
|
exports.discoverFeeds = require_index$2.discoverFeeds;
|
|
9
11
|
exports.discoverHubs = require_index$3.discoverHubs;
|
|
12
|
+
exports.getFeedSiteUrl = require_utils.getFeedSiteUrl;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DiscoverExtractFn, DiscoverFetchFn, DiscoverFetchFnOptions, DiscoverFetchFnResponse, DiscoverInput, DiscoverInputObject, DiscoverMethod, DiscoverMethodsConfig,
|
|
1
|
+
import { DiscoverExtractFn, DiscoverFetchFn, DiscoverFetchFnOptions, DiscoverFetchFnResponse, DiscoverInput, DiscoverInputObject, DiscoverMethod, DiscoverMethodsConfig, DiscoverOnProgressFn, DiscoverOptions, DiscoverProgress, DiscoverResolveSiteUrlFn, DiscoverResolveUrlFn, DiscoverResult, DiscoverUriEntry, DiscoverUriHint, UriEntry } from "./common/types.cjs";
|
|
2
2
|
import { discoverBlogrolls } from "./blogrolls/index.cjs";
|
|
3
|
+
import { defaultResolveSiteUrlFn, getFeedSiteUrl } from "./common/discover/utils.cjs";
|
|
3
4
|
import { discoverFavicons } from "./favicons/index.cjs";
|
|
4
5
|
import { discoverFeeds } from "./feeds/index.cjs";
|
|
5
6
|
import { discoverHubs } from "./hubs/discover/index.cjs";
|
|
6
|
-
export { type DiscoverExtractFn, type DiscoverFetchFn, type DiscoverFetchFnOptions, type DiscoverFetchFnResponse, type DiscoverInput, type DiscoverInputObject, type DiscoverMethod, type DiscoverMethodsConfig, type
|
|
7
|
+
export { type DiscoverExtractFn, type DiscoverFetchFn, type DiscoverFetchFnOptions, type DiscoverFetchFnResponse, type DiscoverInput, type DiscoverInputObject, type DiscoverMethod, type DiscoverMethodsConfig, type DiscoverOnProgressFn, type DiscoverOptions, type DiscoverProgress, type DiscoverResolveSiteUrlFn, type DiscoverResolveUrlFn, type DiscoverResult, type DiscoverUriEntry, type DiscoverUriHint, type UriEntry, defaultResolveSiteUrlFn, discoverBlogrolls, discoverFavicons, discoverFeeds, discoverHubs, getFeedSiteUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DiscoverExtractFn, DiscoverFetchFn, DiscoverFetchFnOptions, DiscoverFetchFnResponse, DiscoverInput, DiscoverInputObject, DiscoverMethod, DiscoverMethodsConfig,
|
|
1
|
+
import { DiscoverExtractFn, DiscoverFetchFn, DiscoverFetchFnOptions, DiscoverFetchFnResponse, DiscoverInput, DiscoverInputObject, DiscoverMethod, DiscoverMethodsConfig, DiscoverOnProgressFn, DiscoverOptions, DiscoverProgress, DiscoverResolveSiteUrlFn, DiscoverResolveUrlFn, DiscoverResult, DiscoverUriEntry, DiscoverUriHint, UriEntry } from "./common/types.js";
|
|
2
2
|
import { discoverBlogrolls } from "./blogrolls/index.js";
|
|
3
|
+
import { defaultResolveSiteUrlFn, getFeedSiteUrl } from "./common/discover/utils.js";
|
|
3
4
|
import { discoverFavicons } from "./favicons/index.js";
|
|
4
5
|
import { discoverFeeds } from "./feeds/index.js";
|
|
5
6
|
import { discoverHubs } from "./hubs/discover/index.js";
|
|
6
|
-
export { type DiscoverExtractFn, type DiscoverFetchFn, type DiscoverFetchFnOptions, type DiscoverFetchFnResponse, type DiscoverInput, type DiscoverInputObject, type DiscoverMethod, type DiscoverMethodsConfig, type
|
|
7
|
+
export { type DiscoverExtractFn, type DiscoverFetchFn, type DiscoverFetchFnOptions, type DiscoverFetchFnResponse, type DiscoverInput, type DiscoverInputObject, type DiscoverMethod, type DiscoverMethodsConfig, type DiscoverOnProgressFn, type DiscoverOptions, type DiscoverProgress, type DiscoverResolveSiteUrlFn, type DiscoverResolveUrlFn, type DiscoverResult, type DiscoverUriEntry, type DiscoverUriHint, type UriEntry, defaultResolveSiteUrlFn, discoverBlogrolls, discoverFavicons, discoverFeeds, discoverHubs, getFeedSiteUrl };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { defaultResolveSiteUrlFn, getFeedSiteUrl } from "./common/discover/utils.js";
|
|
1
2
|
import { discoverBlogrolls } from "./blogrolls/index.js";
|
|
2
3
|
import { discoverFavicons } from "./favicons/index.js";
|
|
3
4
|
import { discoverFeeds } from "./feeds/index.js";
|
|
4
5
|
import { discoverHubs } from "./hubs/discover/index.js";
|
|
5
|
-
export { discoverBlogrolls, discoverFavicons, discoverFeeds, discoverHubs };
|
|
6
|
+
export { defaultResolveSiteUrlFn, discoverBlogrolls, discoverFavicons, discoverFeeds, discoverHubs, getFeedSiteUrl };
|
package/package.json
CHANGED
|
@@ -112,9 +112,9 @@
|
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@types/bun": "^1.3.11",
|
|
115
|
-
"kvalita": "1.
|
|
116
|
-
"tsdown": "^0.21.
|
|
115
|
+
"kvalita": "1.12.2",
|
|
116
|
+
"tsdown": "^0.21.7",
|
|
117
117
|
"vitepress": "^2.0.0-alpha.17"
|
|
118
118
|
},
|
|
119
|
-
"version": "1.
|
|
119
|
+
"version": "1.7.0"
|
|
120
120
|
}
|