UNPKG

24.5 kBSource Map (JSON)View Raw
1{"version":3,"file":"use-atom-feed.cjs.production.min.js","sources":["../src/Parser.ts","../src/index.guard.ts","../src/useAtomFeed.ts"],"sourcesContent":["import { AtomCategory, AtomContent, AtomLink, AtomLinkRelType, AtomPerson, AtomText, AtomTextType } from './AtomCommon';\nimport { AtomEntry, AtomSource } from './AtomEntry';\nimport { AtomFeed } from './AtomFeed';\n\nimport { sanitize } from 'dompurify';\n\n/** searches for a tag in the node list, prevents recursive searches */\nconst findByTag = (nodes: Iterable<Element> | ArrayLike<Element> | HTMLCollection, tagName: string) => Array.from(nodes).find(e => e.nodeName === tagName);\n/** searches for nodes which have a matching tagName, prevents recursive searches */\nconst filterByTag = (nodes: Iterable<Element> | ArrayLike<Element> | HTMLCollection, tagName: string) => Array.from(nodes).filter(e => e.nodeName === tagName);\n/** shortcut method for `findByTag()` that accesses children */\nconst findChildTag = (parent: Document | Element, tagName: string) => findByTag(parent.children, tagName);\n/** shortcut method for `filterByTag()` that accesses children */\nconst filterChildTags = (parent: Document | Element, tagName: string) => filterByTag(parent.children, tagName);\n\n/** parses the feed */\nexport function parseAtomFeed(data: string): AtomFeed {\n const parser = new DOMParser();\n const xml = parser.parseFromString(data, 'text/xml');\n const feed = findChildTag(xml, 'feed');\n if(feed) {\n return {\n id: sanitizeTextContent(findChildTag(feed, 'id')) ?? '',\n title: parseAtomText(findChildTag(feed, 'title')),\n updated: new Date(findChildTag(feed, 'updated')?.textContent ?? 0),\n entries: filterChildTags(feed, 'entry').map(e => parseAtomEntry(e)),\n author: filterChildTags(feed, 'author').map(author => parseAtomPerson(author)),\n link: filterChildTags(feed, 'link').map(link => parseAtomLink(link)),\n category: filterChildTags(feed, 'category').map(category => parseAtomCategory(category)),\n contributor: filterChildTags(feed, 'contributor').map(contributor => parseAtomPerson(contributor)),\n generator: {\n value: sanitizeTextContent(findChildTag(feed, 'generator')) ?? '',\n uri: sanitizeTextAttribute(findChildTag(feed, 'generator'), 'uri'),\n version: sanitizeTextAttribute(findChildTag(feed, 'generator'), 'version'),\n },\n icon: sanitizeTextContent(findChildTag(feed, 'icon')),\n logo: sanitizeTextContent(findChildTag(feed, 'logo')),\n rights: parseAtomText(findChildTag(feed, 'rights')),\n subtitle: sanitizeTextContent(findChildTag(feed, 'subtitle')),\n };\n }\n throw Error('No <feed> tag found.');\n}\n\nexport function parseAtomEntry(entry: Element): AtomEntry {\n return {\n id: sanitizeTextContent(findChildTag(entry, 'id')) ?? '',\n title: parseAtomText(findChildTag(entry, 'title')),\n updated: new Date(findChildTag(entry, 'updated')?.textContent ?? 0),\n author: filterChildTags(entry, 'author').map(author => parseAtomPerson(author)),\n content: parseAtomContent(findChildTag(entry, 'content')),\n link: filterChildTags(entry, 'link').map(link => parseAtomLink(link)),\n summary: parseAtomText(findChildTag(entry, 'summary')),\n category: filterChildTags(entry, 'category').map(category => parseAtomCategory(category)),\n contributor: filterChildTags(entry, 'contributor').map(contributor => parseAtomPerson(contributor)),\n published: findChildTag(entry, 'published') ? new Date(findChildTag(entry, 'published')?.textContent ?? 0) : undefined,\n rights: parseAtomText(findChildTag(entry, 'rights')),\n source: parseAtomSource(findChildTag(entry, 'source')),\n };\n}\n\n/** safely decode text content */\nexport function safelyDecodeAtomText(type: AtomTextType, element: Element | undefined): string {\n if(element !== undefined) {\n // If type=\"xhtml\", then this element contains inline xhtml, wrapped in a div element.\n // This means that the existing `.innerHTML` is ready to be santized\n if(type === 'xhtml') return sanitize(element.innerHTML);\n // If type=\"html\", then this element contains entity escaped html.\n // using `.textContent` will un-escape the text\n else if(type === 'html') return sanitize(element.textContent ?? '');\n // If type=\"text\", then this element contains plain text with no entity escaped html.\n // This means that the content of `.innerHTML` are **intended** to be safe.\n // However, we don't want to leave an attack vector open, so we're going to sanitize it anyway.\n else if(type === 'text') return sanitize(element.innerHTML);\n }\n return '';\n}\n\n/** shortcut for safely decoding the `.textContent` value of an element */\nexport function sanitizeTextContent(element: Element | undefined): string | undefined { \n return element !== undefined ? sanitize(element?.textContent ?? '') : undefined;\n}\n\n/** shortcut for safely decoding the an attribute value of an element */\nexport function sanitizeTextAttribute<T = string>(element: Element | undefined, attributeName: string): T | undefined {\n return element !== undefined ? (element.getAttribute(attributeName) !== null ? sanitize(element.getAttribute(attributeName)!) as unknown as T : undefined) : undefined;\n}\n\nexport function parseAtomContent(content: Element | undefined): AtomContent {\n const type = (sanitizeTextAttribute(content, 'type') as AtomTextType) ?? undefined;\n return {\n type,\n src: sanitizeTextAttribute(content, 'src'),\n value: safelyDecodeAtomText(type, content),\n }\n}\n\n\nexport function parseAtomText(text: Element | undefined): AtomText {\n const type = (sanitizeTextAttribute(text, 'type') as AtomTextType) ?? undefined;\n return {\n type,\n value: safelyDecodeAtomText(type, text)\n }\n}\n\nexport function parseAtomPerson(person: Element): AtomPerson {\n return {\n name: sanitize(findChildTag(person, 'name')?.textContent ?? ''),\n uri: sanitizeTextContent(findChildTag(person, 'uri')),\n email: sanitizeTextContent(findChildTag(person, 'email')),\n }\n}\n\nexport function parseAtomLink(link: Element): AtomLink {\n return {\n href: sanitizeTextAttribute(link, 'href') ?? '',\n rel: sanitizeTextAttribute<AtomLinkRelType>(link, 'ref'),\n type: sanitizeTextAttribute(link, 'type'),\n hreflang: sanitizeTextAttribute(link, 'hreflang'),\n title: sanitizeTextAttribute(link, 'title'),\n length: sanitizeTextAttribute(link, 'length'),\n };\n}\n\nexport function parseAtomCategory(category: Element): AtomCategory {\n return {\n term: sanitizeTextAttribute(category, 'term') ?? '',\n scheme: sanitizeTextAttribute(category, 'scheme') ?? undefined,\n label: sanitizeTextAttribute(category, 'label') ?? undefined\n };\n}\n\nexport function parseAtomSource(source: Element | undefined): AtomSource | undefined {\n if(source !== undefined) {\n return {\n id: sanitizeTextContent(findChildTag(source, 'id')) ?? '',\n title: sanitizeTextContent(findChildTag(source, 'title')) ?? '',\n updated: new Date(findChildTag(source, 'title')?.textContent ?? 0)\n };\n }\n return undefined;\n}","/*\n * Generated type guards for \"index.ts\".\n * WARNING: Do not manually change this file.\n */\nimport { AtomFeed, AtomGenerator, AtomEntry, AtomSource, AtomCategory, AtomContent, AtomLink, AtomPerson, AtomLinkRelType, AtomAuthor, AtomContributor, AtomText, AtomTextType, AtomTitle, AtomSummary, AtomRights } from \"./index\";\n\nexport function isAtomFeed(obj: any, _argumentName?: string): obj is AtomFeed {\n return (\n (obj !== null &&\n typeof obj === \"object\" ||\n typeof obj === \"function\") &&\n typeof obj.id === \"string\" &&\n isAtomTitle(obj.title) as boolean &&\n obj.updated instanceof Date &&\n Array.isArray(obj.entries) &&\n obj.entries.every((e: any) =>\n isAtomEntry(e) as boolean\n ) &&\n (typeof obj.author === \"undefined\" ||\n Array.isArray(obj.author) &&\n obj.author.every((e: any) =>\n isAtomAuthor(e) as boolean\n )) &&\n (typeof obj.link === \"undefined\" ||\n Array.isArray(obj.link) &&\n obj.link.every((e: any) =>\n isAtomLink(e) as boolean\n )) &&\n (typeof obj.category === \"undefined\" ||\n Array.isArray(obj.category) &&\n obj.category.every((e: any) =>\n isAtomCategory(e) as boolean\n )) &&\n (typeof obj.contributor === \"undefined\" ||\n Array.isArray(obj.contributor) &&\n obj.contributor.every((e: any) =>\n isAtomContributor(e) as boolean\n )) &&\n (typeof obj.generator === \"undefined\" ||\n isAtomGenerator(obj.generator) as boolean) &&\n (typeof obj.icon === \"undefined\" ||\n typeof obj.icon === \"string\") &&\n (typeof obj.logo === \"undefined\" ||\n typeof obj.logo === \"string\") &&\n (typeof obj.rights === \"undefined\" ||\n isAtomRights(obj.rights) as boolean) &&\n (typeof obj.subtitle === \"undefined\" ||\n typeof obj.subtitle === \"string\")\n )\n}\n\nexport function isAtomGenerator(obj: any, _argumentName?: string): obj is AtomGenerator {\n return (\n (obj !== null &&\n typeof obj === \"object\" ||\n typeof obj === \"function\") &&\n typeof obj.value === \"string\" &&\n (typeof obj.uri === \"undefined\" ||\n typeof obj.uri === \"string\") &&\n (typeof obj.version === \"undefined\" ||\n typeof obj.version === \"string\")\n )\n}\n\nexport function isAtomEntry(obj: any, _argumentName?: string): obj is AtomEntry {\n return (\n (obj !== null &&\n typeof obj === \"object\" ||\n typeof obj === \"function\") &&\n typeof obj.id === \"string\" &&\n isAtomTitle(obj.title) as boolean &&\n obj.updated instanceof Date &&\n (typeof obj.author === \"undefined\" ||\n Array.isArray(obj.author) &&\n obj.author.every((e: any) =>\n isAtomAuthor(e) as boolean\n )) &&\n (typeof obj.content === \"undefined\" ||\n isAtomContent(obj.content) as boolean) &&\n (typeof obj.link === \"undefined\" ||\n Array.isArray(obj.link) &&\n obj.link.every((e: any) =>\n isAtomLink(e) as boolean\n )) &&\n (typeof obj.summary === \"undefined\" ||\n isAtomSummary(obj.summary) as boolean) &&\n (typeof obj.category === \"undefined\" ||\n Array.isArray(obj.category) &&\n obj.category.every((e: any) =>\n isAtomCategory(e) as boolean\n )) &&\n (typeof obj.contributor === \"undefined\" ||\n Array.isArray(obj.contributor) &&\n obj.contributor.every((e: any) =>\n isAtomContributor(e) as boolean\n )) &&\n (typeof obj.published === \"undefined\" ||\n obj.published instanceof Date) &&\n (typeof obj.rights === \"undefined\" ||\n isAtomRights(obj.rights) as boolean) &&\n (typeof obj.source === \"undefined\" ||\n isAtomSource(obj.source) as boolean)\n )\n}\n\nexport function isAtomSource(obj: any, _argumentName?: string): obj is AtomSource {\n return (\n (obj !== null &&\n typeof obj === \"object\" ||\n typeof obj === \"function\") &&\n typeof obj.id === \"string\" &&\n typeof obj.title === \"string\" &&\n obj.updated instanceof Date\n )\n}\n\nexport function isAtomCategory(obj: any, _argumentName?: string): obj is AtomCategory {\n return (\n (obj !== null &&\n typeof obj === \"object\" ||\n typeof obj === \"function\") &&\n typeof obj.term === \"string\" &&\n (typeof obj.scheme === \"undefined\" ||\n typeof obj.scheme === \"string\") &&\n (typeof obj.label === \"undefined\" ||\n typeof obj.label === \"string\")\n )\n}\n\nexport function isAtomContent(obj: any, _argumentName?: string): obj is AtomContent {\n return (\n (obj !== null &&\n typeof obj === \"object\" ||\n typeof obj === \"function\") &&\n (typeof obj.type === \"undefined\" ||\n obj.type === \"text\" ||\n obj.type === \"html\" ||\n obj.type === \"xhtml\") &&\n (typeof obj.src === \"undefined\" ||\n typeof obj.src === \"string\") &&\n typeof obj.value === \"string\"\n )\n}\n\nexport function isAtomLink(obj: any, _argumentName?: string): obj is AtomLink {\n return (\n (obj !== null &&\n typeof obj === \"object\" ||\n typeof obj === \"function\") &&\n typeof obj.href === \"string\" &&\n (typeof obj.rel === \"undefined\" ||\n obj.rel === \"alternate\" ||\n obj.rel === \"enclosure\" ||\n obj.rel === \"related\" ||\n obj.rel === \"self\" ||\n obj.rel === \"via\") &&\n (typeof obj.type === \"undefined\" ||\n typeof obj.type === \"string\") &&\n (typeof obj.hreflang === \"undefined\" ||\n typeof obj.hreflang === \"string\") &&\n (typeof obj.title === \"undefined\" ||\n typeof obj.title === \"string\") &&\n (typeof obj.length === \"undefined\" ||\n typeof obj.length === \"string\")\n )\n}\n\nexport function isAtomPerson(obj: any, _argumentName?: string): obj is AtomPerson {\n return (\n (obj !== null &&\n typeof obj === \"object\" ||\n typeof obj === \"function\") &&\n typeof obj.name === \"string\" &&\n (typeof obj.uri === \"undefined\" ||\n typeof obj.uri === \"string\") &&\n (typeof obj.email === \"undefined\" ||\n typeof obj.email === \"string\")\n )\n}\n\nexport function isAtomLinkRelType(obj: any, _argumentName?: string): obj is AtomLinkRelType {\n return (\n (obj === \"alternate\" ||\n obj === \"enclosure\" ||\n obj === \"related\" ||\n obj === \"self\" ||\n obj === \"via\")\n )\n}\n\nexport function isAtomAuthor(obj: any, _argumentName?: string): obj is AtomAuthor {\n return (\n isAtomPerson(obj) as boolean\n )\n}\n\nexport function isAtomContributor(obj: any, _argumentName?: string): obj is AtomContributor {\n return (\n isAtomPerson(obj) as boolean\n )\n}\n\nexport function isAtomText(obj: any, _argumentName?: string): obj is AtomText {\n return (\n (obj !== null &&\n typeof obj === \"object\" ||\n typeof obj === \"function\") &&\n (typeof obj.type === \"undefined\" ||\n obj.type === \"text\" ||\n obj.type === \"html\" ||\n obj.type === \"xhtml\") &&\n typeof obj.value === \"string\"\n )\n}\n\nexport function isAtomTextType(obj: any, _argumentName?: string): obj is AtomTextType {\n return (\n (obj === \"text\" ||\n obj === \"html\" ||\n obj === \"xhtml\")\n )\n}\n\nexport function isAtomTitle(obj: any, _argumentName?: string): obj is AtomTitle {\n return (\n isAtomText(obj) as boolean\n )\n}\n\nexport function isAtomSummary(obj: any, _argumentName?: string): obj is AtomSummary {\n return (\n isAtomText(obj) as boolean\n )\n}\n\nexport function isAtomRights(obj: any, _argumentName?: string): obj is AtomRights {\n return (\n isAtomText(obj) as boolean\n )\n}\n","import useSWR, { SWRConfiguration } from 'swr';\nimport { parseFeed } from 'htmlparser2';\n\nexport interface Response<Data> {\n data?: Data;\n error?: Error;\n isValidating: boolean;\n}\n\nexport type Feed = ReturnType<typeof parseFeed>;\n\n/**\n * The React hook used for reading the Atom feed.\n * @param feedURL The URL of the Atom feed\n * @param options Options that are passed to `useSWR()` behind the scenes.\n * More info: https://swr.vercel.app/docs/options#options\n * @returns The decoded Atom feed or any errors seen along the way\n */\nexport function useAtomFeed(feedURL: string, options?: SWRConfiguration): Response<Feed> {\n const fetcher = (url: string) => fetch(url).then(res => res.text());\n const { data, error, isValidating } = useSWR(feedURL, fetcher, options);\n\n // if data is defined\n if(data) {\n // attempt to decode\n try {\n const decoded = parseFeed(data, { xmlMode: true });\n // return a good decode\n return {\n data: decoded,\n error,\n isValidating\n }\n }\n catch(parseError) {\n // return a decode failure\n return {\n data: undefined,\n error: parseError,\n isValidating\n }\n }\n }\n else {\n // data is undefined\n return {\n data: undefined,\n error,\n isValidating\n }\n }\n}\n"],"names":["findChildTag","parent","tagName","nodes","Array","from","find","e","nodeName","findByTag","children","filterChildTags","filter","filterByTag","parseAtomEntry","entry","id","sanitizeTextContent","title","parseAtomText","updated","Date","_findChildTag2","textContent","author","map","parseAtomPerson","content","parseAtomContent","link","parseAtomLink","summary","category","parseAtomCategory","contributor","published","_findChildTag3","undefined","rights","source","parseAtomSource","safelyDecodeAtomText","type","element","sanitize","innerHTML","sanitizeTextAttribute","attributeName","getAttribute","src","value","text","person","name","_findChildTag4","uri","email","href","rel","hreflang","length","term","scheme","label","_findChildTag5","data","xml","DOMParser","parseFromString","feed","_findChildTag","entries","generator","version","icon","logo","subtitle","Error","isAtomGenerator","obj","_argumentName","isAtomEntry","isAtomTitle","isArray","every","isAtomAuthor","isAtomContent","isAtomLink","isAtomSummary","isAtomCategory","isAtomContributor","isAtomRights","isAtomSource","isAtomPerson","isAtomText","feedURL","options","useSWR","url","fetch","then","res","error","isValidating","parseFeed","xmlMode","parseError"],"mappings":"8LAWMA,EAAe,SAACC,EAA4BC,UAJhC,SAACC,EAAgED,UAAoBE,MAAMC,KAAKF,GAAOG,MAAK,SAAAC,UAAKA,EAAEC,WAAaN,KAI5EO,CAAUR,EAAOS,SAAUR,IAE3FS,EAAkB,SAACV,EAA4BC,UAJjC,SAACC,EAAgED,UAAoBE,MAAMC,KAAKF,GAAOS,QAAO,SAAAL,UAAKA,EAAEC,WAAaN,KAI7EW,CAAYZ,EAAOS,SAAUR,aA+BtFY,EAAeC,uBACtB,CACLC,YAAIC,EAAoBjB,EAAae,EAAO,UAAU,GACtDG,MAAOC,EAAcnB,EAAae,EAAO,UACzCK,QAAS,IAAIC,uBAAKrB,EAAae,EAAO,mBAApBO,EAAgCC,eAAe,GACjEC,OAAQb,EAAgBI,EAAO,UAAUU,KAAI,SAAAD,UAAUE,EAAgBF,MACvEG,QAASC,EAAiB5B,EAAae,EAAO,YAC9Cc,KAAMlB,EAAgBI,EAAO,QAAQU,KAAI,SAAAI,UAAQC,EAAcD,MAC/DE,QAASZ,EAAcnB,EAAae,EAAO,YAC3CiB,SAAUrB,EAAgBI,EAAO,YAAYU,KAAI,SAAAO,UAAYC,EAAkBD,MAC/EE,YAAavB,EAAgBI,EAAO,eAAeU,KAAI,SAAAS,UAAeR,EAAgBQ,MACtFC,UAA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