{"_id":"sitemapd","_rev":"4-4b2f0d83ac4ddd89bf89db612368e9f7","name":"sitemapd","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"sitemapd","version":"0.1.0","keywords":["sitemap","xml","rss","atom","crawler"],"license":"MIT","_id":"sitemapd@0.1.0","maintainers":[{"name":"harlan_zw","email":"harlan@harlanzw.com"}],"dist":{"shasum":"062655c6f73ee6fa4cc84a409d94be3bed47d695","tarball":"https://registry.npmjs.org/sitemapd/-/sitemapd-0.1.0.tgz","fileCount":17,"integrity":"sha512-pEx0ec+XucvbN8aAUe8TW6iQ3NCDevPprjlWa1xVwXMXC2S1GZACVyp0xGKxZLVib4gHqUu1UE04HZOFz5t4IQ==","signatures":[{"sig":"MEYCIQC4Exdylua2yPZBBeYwU41UallOS9HvZOOnO3mci0FVLQIhAM/XAz58sy6volfPcMLCeNzf4wIorF5Q6ioqzdlZHXi0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66411},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./fetch":{"types":"./dist/fetch.d.mts","import":"./dist/fetch.mjs"},"./parse":{"types":"./dist/parse.d.mts","import":"./dist/parse.mjs"}},"funding":"https://github.com/sponsors/harlan-zw","scripts":{"test":"vitest run","bench":"vitest bench","build":"unbuild","test:attw":"node scripts/check-attw.mjs","typecheck":"tsc --noEmit","bench:memory":"node --expose-gc benchmark/memory.mjs"},"_npmUser":{"name":"harlan_zw","email":"harlan@harlanzw.com"},"repository":{"url":"git+https://github.com/nuxt-modules/sitemap.git","type":"git","directory":"packages/sitemapd"},"description":"Runtime-neutral sitemap parsing and bounded traversal","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"fast-xml-parser":"^5.10.1"},"typesVersions":{"*":{".":["./dist/index.d.mts"],"fetch":["./dist/fetch.d.mts"],"parse":["./dist/parse.d.mts"]}},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.10","unbuild":"^3.6.1","typescript":"6.0.3","@arethetypeswrong/cli":"^0.18.5"},"_npmOperationalInternal":{"tmp":"tmp/sitemapd_0.1.0_1785319449298_0.9946674568830312","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"sitemapd","version":"0.2.0","keywords":["sitemap","xml","rss","atom","crawler"],"license":"MIT","_id":"sitemapd@0.2.0","maintainers":[{"name":"harlan_zw","email":"harlan@harlanzw.com"}],"dist":{"shasum":"0adc028f121ece9d2abf51a8edd8313d75835d73","tarball":"https://registry.npmjs.org/sitemapd/-/sitemapd-0.2.0.tgz","fileCount":17,"integrity":"sha512-gpZhUzDIbMneHj8djlUVjQeevA50ZaHlHQKwl/k8lHBXGr8tqXasrOdi1uYVP6PWjnh5HEBZv1tgVavgbxilVg==","signatures":[{"sig":"MEUCIH5iQt4gV815F6NGW5A/IcFwnHDAvHv07YA28ZqnIm1jAiEA3k1Y8OyGF/ysUEae2Vgwj9FBWpPBDtdo+3bDtiw7Qx8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75832},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./fetch":{"types":"./dist/fetch.d.mts","import":"./dist/fetch.mjs"},"./parse":{"types":"./dist/parse.d.mts","import":"./dist/parse.mjs"}},"funding":"https://github.com/sponsors/harlan-zw","scripts":{"test":"vitest run","bench":"vitest bench","build":"unbuild","test:attw":"node scripts/check-attw.mjs","typecheck":"tsc --noEmit","bench:memory":"node --expose-gc benchmark/memory.mjs"},"_npmUser":{"name":"harlan_zw","email":"harlan@harlanzw.com"},"repository":{"url":"git+https://github.com/nuxt-modules/sitemap.git","type":"git","directory":"packages/sitemapd"},"description":"Runtime-neutral sitemap parsing and bounded traversal","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"fast-xml-parser":"^5.10.1"},"typesVersions":{"*":{".":["./dist/index.d.mts"],"fetch":["./dist/fetch.d.mts"],"parse":["./dist/parse.d.mts"]}},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.10","unbuild":"^3.6.1","typescript":"6.0.3","@arethetypeswrong/cli":"^0.18.5"},"_npmOperationalInternal":{"tmp":"tmp/sitemapd_0.2.0_1785331195238_0.9279551404489215","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"sitemapd","version":"0.2.1","keywords":["sitemap","xml","rss","atom","crawler"],"author":{"url":"https://harlanzw.com/","name":"Harlan Wilton","email":"harlan@harlanzw.com"},"license":"MIT","_id":"sitemapd@0.2.1","maintainers":[{"name":"harlan_zw","email":"harlan@harlanzw.com"}],"homepage":"https://github.com/nuxt-modules/sitemap/tree/main/packages/sitemapd#readme","bugs":{"url":"https://github.com/nuxt-modules/sitemap/issues"},"dist":{"shasum":"ed0e458b1e2037c174e2f9f345890ff5c2de9aac","tarball":"https://registry.npmjs.org/sitemapd/-/sitemapd-0.2.1.tgz","fileCount":17,"integrity":"sha512-ei/QCl/cxTPEC8b/KtibUalvORO4q1ZIN8h22gq6DaSUuHO9jolYViHSojEDPll/AmH4CQnFDkKNuiyMOs83ig==","signatures":[{"sig":"MEUCIG/7bv4Almld8UWc6OhGte7DJjLc5LlM1N94/xckrP5jAiEA1eigz9sIMoZv0VWNIDTsiHjkye73VW3NKAoRc3n2kq0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/sitemapd@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":76617},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./fetch":{"types":"./dist/fetch.d.mts","import":"./dist/fetch.mjs"},"./parse":{"types":"./dist/parse.d.mts","import":"./dist/parse.mjs"}},"funding":"https://github.com/sponsors/harlan-zw","scripts":{"lint":"eslint .","test":"vitest run","bench":"vitest bench","build":"unbuild","release":"pnpm build && bumpp --commit \"chore(sitemapd): release v%s\" --tag \"sitemapd-v%s\"","lint:fix":"eslint . --fix","test:attw":"node scripts/check-attw.mjs","typecheck":"tsc --noEmit","bench:memory":"node --expose-gc benchmark/memory.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8054d9cc-a2a0-4cdf-8677-3c398c25a087"}},"repository":{"url":"git+https://github.com/nuxt-modules/sitemap.git","type":"git","directory":"packages/sitemapd"},"description":"Runtime-neutral sitemap parsing and bounded traversal","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"fast-xml-parser":"^5.10.1"},"publishConfig":{"access":"public"},"typesVersions":{"*":{".":["./dist/index.d.mts"],"fetch":["./dist/fetch.d.mts"],"parse":["./dist/parse.d.mts"]}},"_hasShrinkwrap":false,"devDependencies":{"bumpp":"^12.1.1","vitest":"^4.1.10","unbuild":"^3.6.1","typescript":"6.0.3","@arethetypeswrong/cli":"^0.18.5"},"_npmOperationalInternal":{"tmp":"tmp/sitemapd_0.2.1_1785753726895_0.8670643664601503","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"sitemapd","type":"module","version":"0.2.2","description":"Runtime-neutral sitemap parsing and bounded traversal","author":{"name":"Harlan Wilton","email":"harlan@harlanzw.com","url":"https://harlanzw.com/"},"license":"MIT","funding":"https://github.com/sponsors/harlan-zw","homepage":"https://github.com/nuxt-modules/sitemap/tree/main/packages/sitemapd#readme","repository":{"type":"git","url":"git+https://github.com/nuxt-modules/sitemap.git","directory":"packages/sitemapd"},"bugs":{"url":"https://github.com/nuxt-modules/sitemap/issues"},"keywords":["sitemap","xml","rss","atom","crawler"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./parse":{"types":"./dist/parse.d.mts","import":"./dist/parse.mjs"},"./fetch":{"types":"./dist/fetch.d.mts","import":"./dist/fetch.mjs"}},"main":"./dist/index.mjs","types":"./dist/index.d.mts","typesVersions":{"*":{".":["./dist/index.d.mts"],"parse":["./dist/parse.d.mts"],"fetch":["./dist/fetch.d.mts"]}},"publishConfig":{"access":"public"},"engines":{"node":">=18.0.0"},"dependencies":{"fast-xml-parser":"^5.10.1"},"devDependencies":{"@arethetypeswrong/cli":"^0.18.5","bumpp":"^12.2.0","typescript":"6.0.3","unbuild":"^3.6.1","vitest":"^4.1.10"},"scripts":{"build":"unbuild","lint":"eslint .","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit","test":"vitest run","bench":"vitest bench","bench:memory":"node --expose-gc benchmark/memory.mjs","test:attw":"node scripts/check-attw.mjs","release":"pnpm build && bumpp --commit \"chore(sitemapd): release v%s\" --tag \"sitemapd-v%s\""},"_nodeVersion":"24.18.0","_id":"sitemapd@0.2.2","dist":{"integrity":"sha512-XAuW9x2cI3B757A/h2sFYfye5kBUHM8Gr6Muzwtve1oYRCv3BntoKMcgNu+GNF/LKIvUD1fQpBTVUCoHlzMihg==","shasum":"96389e701f7bbb089efd5eec8b5dc22021aeacc7","tarball":"https://registry.npmjs.org/sitemapd/-/sitemapd-0.2.2.tgz","fileCount":17,"unpackedSize":86233,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/sitemapd@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC02PjpeKk7qSOIfvD2wzrqgIzFVy1BPYwrEzCTQMyOhwIgW2HeuhxRksqBy2Vqoyi7WCxjC+rl8QR/aQ7+QSxANEo="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8054d9cc-a2a0-4cdf-8677-3c398c25a087"}},"directories":{},"maintainers":[{"name":"harlan_zw","email":"harlan@harlanzw.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sitemapd_0.2.2_1786292070633_0.23189823295375045"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-29T10:04:09.166Z","modified":"2026-08-09T16:14:31.077Z","0.1.0":"2026-07-29T10:04:09.513Z","0.2.0":"2026-07-29T13:19:55.399Z","0.2.1":"2026-08-03T10:42:07.015Z","0.2.2":"2026-08-09T16:14:30.782Z"},"bugs":{"url":"https://github.com/nuxt-modules/sitemap/issues"},"author":{"name":"Harlan Wilton","email":"harlan@harlanzw.com","url":"https://harlanzw.com/"},"license":"MIT","homepage":"https://github.com/nuxt-modules/sitemap/tree/main/packages/sitemapd#readme","keywords":["sitemap","xml","rss","atom","crawler"],"repository":{"type":"git","url":"git+https://github.com/nuxt-modules/sitemap.git","directory":"packages/sitemapd"},"description":"Runtime-neutral sitemap parsing and bounded traversal","maintainers":[{"name":"harlan_zw","email":"harlan@harlanzw.com"}],"readme":"# sitemapd\n\nRuntime-neutral sitemap parsing and bounded traversal for Node, browsers, [Bun](https://bun.sh),\nand workerd.\n\n```ts\nimport { collectSitemap } from 'sitemapd/parse'\n\nconst result = await collectSitemap(response.body!)\n```\n\nUse `sitemapd` for an injected reader and `sitemapd/fetch` for the generic Fetch\nadapter. Network authority, DNS security, storage, and product policy remain\nthe host's responsibility.\n\n## Bounded traversal\n\n`createSitemapReader()` accepts injected document loading and target\nauthorization. Its `walk()` method owns one aggregate breadth-first budget\nacross every root and descendant:\n\n```ts\nimport { createSitemapReader } from 'sitemapd'\n\nconst reader = createSitemapReader({\n  loadDocument,\n  authorizeTarget,\n  limits: {\n    maxDepth: 3,\n    maxDocuments: 100,\n    maxUrls: 2_000_000,\n  },\n})\n\nconst digests = new Map<string, string>()\nconst result = await reader.walk(roots, {\n  concurrency: 4,\n  retention: 'none',\n  async onDocument(document) {\n    if (document.document._tag === 'urlset')\n      digests.set(document.resolvedUrl, await digest(document.document.entries))\n  },\n})\n```\n\nReads may finish out of order. The reader visits each document once in\ndeterministic breadth-first order while preserving root and index-child order.\nThe visitor is awaited serially and applies backpressure to traversal.\n\n`retention: 'all'` is the default and retains deduplicated URL entries plus\nindex references in the result. `retention: 'none'` returns empty aggregate\narrays after the visitor processes each document. This keeps only the bounded\nscheduler window and caller-owned reductions in memory. The `entriesRetained`\ndiscriminator narrows these result shapes.\n\n`maxUrls` counts URL records in breadth-first commit order, including duplicates.\nThis conservative accounting is identical in both retention modes.\n`urlsObserved` and `referencesObserved` expose the aggregate counters. Reaching\nany traversal budget returns an explicit partial result.\n\nPassing an `AbortSignal` stops scheduling, aborts active reads cooperatively,\nand returns a partial result with the `cancelled` reason. A visitor rejection or\nan unexpected loader or authorizer exception aborts active reads and rejects\n`walk()` with the original error. Tagged read failures remain values in the\nwalk result.\n\nPartial results expose a breadth-first `frontier`. Pass that frontier into a\nlater `walk()` together with the previously committed document URLs to continue\nwithout resetting depth or reading a document twice:\n\n```ts\nconst first = await reader.walk(roots, {\n  maxDocuments: 40,\n  retention: 'none',\n})\n\nif (first._tag === 'partial' && first.frontier.length > 0) {\n  const resumed = await reader.walk(first.frontier, {\n    seenDocuments: committedDocumentUrls,\n    maxDocuments: 40,\n    retention: 'none',\n  })\n}\n```\n\nThe frontier contains only scheduler work that remained eligible. Children\nblocked by `maxDepth` are excluded, so resuming cannot bypass the original depth\nlimit. Read failures remain tagged values; the host decides whether to add a\nfailed entry to a later frontier.\n","readmeFilename":""}