diff --git a/components/rss/actions/merge-rss-feeds/merge-rss-feeds.ts b/components/rss/actions/merge-rss-feeds/merge-rss-feeds.ts index f5f8ac20c5d4e..700f60163dfe7 100644 --- a/components/rss/actions/merge-rss-feeds/merge-rss-feeds.ts +++ b/components/rss/actions/merge-rss-feeds/merge-rss-feeds.ts @@ -1,11 +1,11 @@ -import rss from "../../app/rss.app"; import { defineAction } from "@pipedream/types"; +import rss from "../../app/rss.app"; export default defineAction({ name: "Merge RSS Feeds", description: "Retrieve multiple RSS feeds and return a merged array of items sorted by date [See documentation](https://www.rssboard.org/rss-specification)", key: "rss-merge-rss-feeds", - version: "1.2.8", + version: "1.2.9", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/rss/app/rss.app.ts b/components/rss/app/rss.app.ts index 1739b56bb7dc9..8ee01c2582154 100644 --- a/components/rss/app/rss.app.ts +++ b/components/rss/app/rss.app.ts @@ -30,7 +30,7 @@ export default defineApp({ }, methods: { // in theory if alternate setting title and description or aren't unique this won't work - itemTs(item = {} as (Item | any)): number { + itemTs(item = {} as (Item | any)): number { // eslint-disable-line @typescript-eslint/no-explicit-any const { pubdate, pubDate, date_published, } = item; @@ -40,7 +40,7 @@ export default defineApp({ } return +new Date(); }, - itemKey(item = {} as (Item | any)): string { + itemKey(item = {} as (Item | any)): string { // eslint-disable-line @typescript-eslint/no-explicit-any const { id, guid, link, title, } = item; @@ -53,12 +53,13 @@ export default defineApp({ } return hash(item); }, - async fetchFeed(url: string): Promise { + async fetchFeed(url: string): Promise { // eslint-disable-line @typescript-eslint/no-explicit-any const res = await axios(this, { url, method: "GET", headers: { "accept": "text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8, application/json, application/feed+json", + "User-Agent": "@PipedreamHQ/pipedream v1.0", }, validateStatus: () => true, // does not throw on any bad status code responseType: "stream", // stream is required for feedparser @@ -86,7 +87,7 @@ export default defineApp({ feedparser.on("error", reject); feedparser.on("end", resolve); feedparser.on("readable", function (this: FeedParser) { - let item: any = this.read(); + let item: any = this.read(); // eslint-disable-line @typescript-eslint/no-explicit-any while (item) { /* @@ -119,7 +120,7 @@ export default defineApp({ }); return items; }, - isJSONFeed(response: any): boolean { + isJSONFeed(response: any): boolean { // eslint-disable-line @typescript-eslint/no-explicit-any const acceptedJsonFeedMimes = [ "application/feed+json", "application/json", @@ -156,7 +157,7 @@ export default defineApp({ return url; }, sortItems(items) { - return items.sort((itemA: any, itemB: any) => { + return items.sort((itemA: any, itemB: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any if (this.itemTs(itemA) > this.itemTs(itemB)) { return 1; } diff --git a/components/rss/package.json b/components/rss/package.json index 6c432addcc367..9b58edaf73628 100644 --- a/components/rss/package.json +++ b/components/rss/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/rss", - "version": "0.5.8", + "version": "0.5.9", "description": "Pipedream RSS Components", "main": "dist/app/rss.app.mjs", "types": "dist/app/rss.app.d.ts", diff --git a/components/rss/sources/new-item-from-multiple-feeds/new-item-from-multiple-feeds.ts b/components/rss/sources/new-item-from-multiple-feeds/new-item-from-multiple-feeds.ts index eb144d57c1171..683e3413d63ea 100644 --- a/components/rss/sources/new-item-from-multiple-feeds/new-item-from-multiple-feeds.ts +++ b/components/rss/sources/new-item-from-multiple-feeds/new-item-from-multiple-feeds.ts @@ -1,5 +1,5 @@ -import rss from "../../app/rss.app"; import { defineSource } from "@pipedream/types"; +import rss from "../../app/rss.app"; import rssCommon from "../common/common"; export default defineSource({ @@ -8,7 +8,7 @@ export default defineSource({ name: "New Item From Multiple RSS Feeds", type: "source", description: "Emit new items from multiple RSS feeds", - version: "1.2.7", + version: "1.2.8", props: { ...rssCommon.props, urls: { @@ -43,7 +43,7 @@ export default defineSource({ console.log(`Retrieved items from ${url}`); items.push(...feedItems); } - this.rss.sortItems(items).forEach((item: any) => { + this.rss.sortItems(items).forEach((item: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any const meta = this.generateMeta(item); this.$emit(item, meta); }); diff --git a/components/rss/sources/new-item-in-feed/new-item-in-feed.ts b/components/rss/sources/new-item-in-feed/new-item-in-feed.ts index f0219faf1ecfc..d346e2391c104 100644 --- a/components/rss/sources/new-item-in-feed/new-item-in-feed.ts +++ b/components/rss/sources/new-item-in-feed/new-item-in-feed.ts @@ -7,7 +7,7 @@ export default defineSource({ key: "rss-new-item-in-feed", name: "New Item in Feed", description: "Emit new items from an RSS feed", - version: "1.2.7", + version: "1.2.8", type: "source", dedupe: "unique", props: { diff --git a/components/rss/sources/random-item-in-multiple-feeds/random-item-in-multiple-feeds.ts b/components/rss/sources/random-item-in-multiple-feeds/random-item-in-multiple-feeds.ts index 766db6bc227e9..ee5d73e35bc12 100644 --- a/components/rss/sources/random-item-in-multiple-feeds/random-item-in-multiple-feeds.ts +++ b/components/rss/sources/random-item-in-multiple-feeds/random-item-in-multiple-feeds.ts @@ -1,5 +1,5 @@ -import rss from "../../app/rss.app"; import { defineSource } from "@pipedream/types"; +import rss from "../../app/rss.app"; import rssCommon from "../common/common"; export default defineSource({ @@ -8,7 +8,7 @@ export default defineSource({ name: "Random item from multiple RSS feeds", type: "source", description: "Emit a random item from multiple RSS feeds", - version: "0.2.7", + version: "0.2.8", props: { ...rssCommon.props, urls: {