1.0.3 - Improved error handling
This commit is contained in:
parent
311519ebd9
commit
12c815fde3
14
index.js
14
index.js
@ -249,15 +249,25 @@ const renderImage = image => `\
|
|||||||
const main = async () => {
|
const main = async () => {
|
||||||
const feeds = []
|
const feeds = []
|
||||||
|
|
||||||
|
const subscribe = feedPromise => {
|
||||||
|
return feedPromise
|
||||||
|
.catch(error => {
|
||||||
|
console.error(error)
|
||||||
|
})
|
||||||
|
.then(feed => {
|
||||||
|
feeds.push(feed)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
console.log('Grabbing posts...')
|
console.log('Grabbing posts...')
|
||||||
for(let user of config.feeds.nitter) {
|
for(let user of config.feeds.nitter) {
|
||||||
feeds.push(await handleNitterUser(user) )
|
await subscribe(handleNitterUser(user) )
|
||||||
}
|
}
|
||||||
console.log('Caching sources...')
|
console.log('Caching sources...')
|
||||||
Bun.write('cache.json', JSON.stringify(cache, null, 2))
|
Bun.write('cache.json', JSON.stringify(cache, null, 2))
|
||||||
|
|
||||||
for(let user of config.feeds.tumblr) {
|
for(let user of config.feeds.tumblr) {
|
||||||
feeds.push(await handleTumblrUser(user) )
|
await subscribe(handleTumblrUser(user) )
|
||||||
}
|
}
|
||||||
|
|
||||||
await print(feeds)
|
await print(feeds)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "rssssing",
|
"name": "rssssing",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user