Skip to content

Commit

Permalink
Use @m4rc3l05/feed-normalizer to extract feed
Browse files Browse the repository at this point in the history
Signed-off-by: m4rc3l05 <[email protected]>
  • Loading branch information
M4RC3L05 committed May 18, 2024
1 parent 1302b4a commit 3cceab1
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 665 deletions.
1 change: 1 addition & 0 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"#src/": "./src/",
"@db/sqlite": "jsr:@db/[email protected]",
"@m4rc3l05/cron": "jsr:@m4rc3l05/[email protected]",
"@m4rc3l05/feed-normalizer": "jsr:@m4rc3l05/[email protected]",
"@m4rc3l05/process-lifecycle": "jsr:@m4rc3l05/[email protected]",
"@m4rc3l05/requester": "jsr:@m4rc3l05/[email protected]",
"@m4rc3l05/sqlite-tag": "jsr:@m4rc3l05/[email protected]",
Expand Down
21 changes: 16 additions & 5 deletions deno.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"jsr:@db/[email protected]": "jsr:@db/[email protected]",
"jsr:@denosaurs/plug@1": "jsr:@denosaurs/[email protected]",
"jsr:@m4rc3l05/[email protected]": "jsr:@m4rc3l05/[email protected]",
"jsr:@m4rc3l05/[email protected]": "jsr:@m4rc3l05/[email protected]",
"jsr:@m4rc3l05/[email protected]": "jsr:@m4rc3l05/[email protected]",
"jsr:@m4rc3l05/[email protected]": "jsr:@m4rc3l05/[email protected]",
"jsr:@m4rc3l05/[email protected]": "jsr:@m4rc3l05/[email protected]",
Expand All @@ -23,7 +24,6 @@
"jsr:@std/[email protected]": "jsr:@std/[email protected]",
"jsr:@std/io@^0.224.0": "jsr:@std/[email protected]",
"jsr:@std/[email protected]": "jsr:@std/[email protected]",
"jsr:@std/[email protected]": "jsr:@std/[email protected]",
"jsr:@std/[email protected]": "jsr:@std/[email protected]",
"jsr:@std/path@^0.221.0": "jsr:@std/[email protected]",
"jsr:@std/[email protected]": "jsr:@std/[email protected]",
Expand All @@ -36,7 +36,8 @@
"npm:[email protected]": "npm:[email protected]",
"npm:[email protected]": "npm:[email protected]",
"npm:[email protected]": "npm:[email protected]",
"npm:[email protected]": "npm:[email protected]"
"npm:[email protected]": "npm:[email protected]",
"npm:[email protected]": "npm:[email protected]"
},
"jsr": {
"@db/[email protected]": {
Expand All @@ -63,6 +64,14 @@
"npm:[email protected]"
]
},
"@m4rc3l05/[email protected]": {
"integrity": "289f89cb42aaaa25acf001dade028cb42fd9090dbf5c5873d215cbcd00da2187",
"dependencies": [
"jsr:@std/[email protected]",
"npm:[email protected]",
"npm:[email protected]"
]
},
"@m4rc3l05/[email protected]": {
"integrity": "f900dfe4d28e8418a0d62f7636f8a3315b7b87a142a059fb50f62aa415d7585b"
},
Expand Down Expand Up @@ -127,9 +136,6 @@
"jsr:@std/io@^0.224.0"
]
},
"@std/[email protected]": {
"integrity": "5ac87989393f8cb1c81bee02aef6f5d4c8289b416deabc04f9ad25dff292d0b0"
},
"@std/[email protected]": {
"integrity": "1217cc25534bca9a2f672d7fe7c6f356e4027df400c0e85c0ef3e4343bc67d11",
"dependencies": [
Expand Down Expand Up @@ -241,6 +247,10 @@
"integrity": "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==",
"dependencies": {}
},
"[email protected]": {
"integrity": "sha512-b0Zcf09AhqKS83btmUeYBS8tFK7XL2e3RvLmZcm0sTdF1/UUlHSsjXdCcWNxe7yfmAlPve5ym0DmKGtTzP6kVQ==",
"dependencies": {}
},
"[email protected]": {
"integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==",
"dependencies": {}
Expand Down Expand Up @@ -309,6 +319,7 @@
"dependencies": [
"jsr:@db/[email protected]",
"jsr:@m4rc3l05/[email protected]",
"jsr:@m4rc3l05/[email protected]",
"jsr:@m4rc3l05/[email protected]",
"jsr:@m4rc3l05/[email protected]",
"jsr:@m4rc3l05/[email protected]",
Expand Down
4 changes: 1 addition & 3 deletions src/apps/api/routes/feeds/validate-url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const validateUrl = (router: Hono) => {
async (c) => {
try {
const data = await requestBodyValidator.validate(await c.req.json());
const { feed: extracted, feedResolver } = await c.get("feedService")
const { title } = await c.get("feedService")
.verifyFeed(data.url, {
signal: AbortSignal.any([
AbortSignal.timeout(10_000),
Expand All @@ -24,8 +24,6 @@ export const validateUrl = (router: Hono) => {
]),
});

const title = feedResolver.resolveFeedTitle(extracted);

if (!title) throw new Error("No title for feed");

const feed = c
Expand Down
34 changes: 0 additions & 34 deletions src/resolvers/feed-resolver/interfaces.ts

This file was deleted.

150 changes: 0 additions & 150 deletions src/resolvers/feed-resolver/json-feed-resolver.ts

This file was deleted.

10 changes: 0 additions & 10 deletions src/resolvers/feed-resolver/mod.ts

This file was deleted.

0 comments on commit 3cceab1

Please sign in to comment.