{"_id":"@devondragon/emdash-plugin-404-viewer","_rev":"5-b188478b299cdae8e3a20409fbe9c899","name":"@devondragon/emdash-plugin-404-viewer","dist-tags":{"latest":"0.4.0"},"versions":{"0.2.0":{"name":"@devondragon/emdash-plugin-404-viewer","version":"0.2.0","keywords":["emdash","emdash-plugin","cms","404","admin"],"author":{"name":"Devon Hillard","email":"devon@devondragon.com"},"license":"MIT","_id":"@devondragon/emdash-plugin-404-viewer@0.2.0","maintainers":[{"name":"devondragon","email":"devon@justblackmagic.com"}],"homepage":"https://github.com/devondragon/emdash-plugins/tree/main/packages/404-viewer#readme","bugs":{"url":"https://github.com/devondragon/emdash-plugins/issues"},"dist":{"shasum":"9721829d50c3b364f709b3503bd000e84c9948cc","tarball":"https://registry.npmjs.org/@devondragon/emdash-plugin-404-viewer/-/emdash-plugin-404-viewer-0.2.0.tgz","fileCount":7,"integrity":"sha512-FCFdimWGzcKxbU6ExJE8NBuTSeHU2to4I3ed/SKJwWUHqL9VjID3Huo2hQsdicAGY+lZihUGhGuhaZ8AM0wqxw==","signatures":[{"sig":"MEQCIHClQcwVrSquX7QD2311WNez6PkLDdpvA8LyFc5zW+9dAiAcNwZz8X9AxPg4V8JbNxqoxhn4ismykEy5uQQ78MpsVg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17043},"main":"./dist/index.js","type":"module","_from":"file:devondragon-emdash-plugin-404-viewer-0.2.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./admin":{"types":"./dist/admin.d.ts","import":"./dist/admin.js"}},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"devondragon","email":"devon@justblackmagic.com"},"_resolved":"/private/var/folders/29/3qrsb2312yn4h47zj4zrqnxh0000gn/T/e6210a2889eee7b45b5abc97004a9f0a/devondragon-emdash-plugin-404-viewer-0.2.0.tgz","_integrity":"sha512-FCFdimWGzcKxbU6ExJE8NBuTSeHU2to4I3ed/SKJwWUHqL9VjID3Huo2hQsdicAGY+lZihUGhGuhaZ8AM0wqxw==","repository":{"url":"git+https://github.com/devondragon/emdash-plugins.git","type":"git","directory":"packages/404-viewer"},"_npmVersion":"11.12.1","description":"EmDash admin plugin: viewer for the built-in 404 log table","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.2.4","emdash":"^0.1.0","tsdown":"^0.21.0","typescript":"^5.9.3","@types/react":"^19.2.14","@cloudflare/kumo":"^1.17.0","@phosphor-icons/react":"^2.1.10"},"peerDependencies":{"react":"^19.0.0","emdash":"^0.1.0","@cloudflare/kumo":"^1.0.0","@phosphor-icons/react":"^2.1.10"},"_npmOperationalInternal":{"tmp":"tmp/emdash-plugin-404-viewer_0.2.0_1775664223493_0.7352184941579893","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@devondragon/emdash-plugin-404-viewer","version":"0.3.0","keywords":["emdash","emdash-plugin","cms","404","admin"],"author":{"name":"Devon Hillard","email":"devon@devondragon.com"},"license":"MIT","_id":"@devondragon/emdash-plugin-404-viewer@0.3.0","maintainers":[{"name":"devondragon","email":"devon@justblackmagic.com"}],"homepage":"https://github.com/devondragon/emdash-plugins/tree/main/packages/404-viewer#readme","bugs":{"url":"https://github.com/devondragon/emdash-plugins/issues"},"dist":{"shasum":"c1ba36869979b388f1f77332f5617bb79e9df85c","tarball":"https://registry.npmjs.org/@devondragon/emdash-plugin-404-viewer/-/emdash-plugin-404-viewer-0.3.0.tgz","fileCount":7,"integrity":"sha512-I2kkLg1qDvJs8kRXEAld7xO/Ltz4L+BshHFOfiPSKOhCVvs6nsyuzE55UPx+oWspQgwmCrBpSOV+4t9i8/p7Mg==","signatures":[{"sig":"MEYCIQCMVXwCqHz+rTuRc7VAqkxdukwtfI6DgF6NMMIoXSAZRAIhAKO4ZLlvGrqC18Tz/xusoSzfZprV5aTVSBK94Zv7tWlx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@devondragon%2femdash-plugin-404-viewer@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":37147},"main":"./dist/index.js","type":"module","_from":"file:devondragon-emdash-plugin-404-viewer-0.3.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./admin":{"types":"./dist/admin.d.ts","import":"./dist/admin.js"}},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e48381b7-3e12-45af-b623-3a58dcea468a"}},"_resolved":"/tmp/c93712aa0fd365180b11fb6d64501ab6/devondragon-emdash-plugin-404-viewer-0.3.0.tgz","_integrity":"sha512-I2kkLg1qDvJs8kRXEAld7xO/Ltz4L+BshHFOfiPSKOhCVvs6nsyuzE55UPx+oWspQgwmCrBpSOV+4t9i8/p7Mg==","repository":{"url":"git+https://github.com/devondragon/emdash-plugins.git","type":"git","directory":"packages/404-viewer"},"_npmVersion":"11.11.0","description":"EmDash admin plugin: viewer for the built-in 404 log table","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.2.4","emdash":"^0.1.0","tsdown":"^0.21.0","typescript":"^5.9.3","@types/react":"^19.2.14","@cloudflare/kumo":"^1.17.0","@phosphor-icons/react":"^2.1.10"},"peerDependencies":{"react":"^19.0.0","emdash":"^0.1.0","@cloudflare/kumo":"^1.0.0","@phosphor-icons/react":"^2.1.10"},"_npmOperationalInternal":{"tmp":"tmp/emdash-plugin-404-viewer_0.3.0_1775745004430_0.6332701418644886","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@devondragon/emdash-plugin-404-viewer","version":"0.3.1","keywords":["emdash","emdash-plugin","cms","404","admin"],"author":{"name":"Devon Hillard","email":"devon@devondragon.com"},"license":"MIT","_id":"@devondragon/emdash-plugin-404-viewer@0.3.1","maintainers":[{"name":"devondragon","email":"devon@justblackmagic.com"}],"homepage":"https://github.com/devondragon/emdash-plugins/tree/main/packages/404-viewer#readme","bugs":{"url":"https://github.com/devondragon/emdash-plugins/issues"},"dist":{"shasum":"961d8e4c688006668d6f3ac78422e9d60e098568","tarball":"https://registry.npmjs.org/@devondragon/emdash-plugin-404-viewer/-/emdash-plugin-404-viewer-0.3.1.tgz","fileCount":7,"integrity":"sha512-8X63dlm19YOcGPRZCiaTxfDQ4A5brIOxeBjLWP9O7c7naBpYdFs2I7WdJdQ8TPi2pnb91dc0NvDCP3etWHbX9w==","signatures":[{"sig":"MEQCIFpRCm9M6H+PpV/B92JMUFwKeJxPnGehN5TmOBtEgHboAiAEIoh2hGbAYx1i4riGx9x6dBENtM37ewxju20TB5LAAw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@devondragon%2femdash-plugin-404-viewer@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":37148},"main":"./dist/index.js","type":"module","_from":"file:devondragon-emdash-plugin-404-viewer-0.3.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./admin":{"types":"./dist/admin.d.ts","import":"./dist/admin.js"}},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e48381b7-3e12-45af-b623-3a58dcea468a"}},"_resolved":"/tmp/0a44d8cc3f2adaf4f4e191205873ee27/devondragon-emdash-plugin-404-viewer-0.3.1.tgz","_integrity":"sha512-8X63dlm19YOcGPRZCiaTxfDQ4A5brIOxeBjLWP9O7c7naBpYdFs2I7WdJdQ8TPi2pnb91dc0NvDCP3etWHbX9w==","repository":{"url":"git+https://github.com/devondragon/emdash-plugins.git","type":"git","directory":"packages/404-viewer"},"_npmVersion":"11.12.1","description":"EmDash admin plugin: viewer for the built-in 404 log table","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.2.4","emdash":"^0.4.0","tsdown":"^0.21.0","typescript":"^5.9.3","@types/react":"^19.2.14","@cloudflare/kumo":"^1.17.0","@phosphor-icons/react":"^2.1.10"},"peerDependencies":{"react":"^19.0.0","emdash":">=0.1.0","@cloudflare/kumo":"^1.0.0","@phosphor-icons/react":"^2.1.10"},"_npmOperationalInternal":{"tmp":"tmp/emdash-plugin-404-viewer_0.3.1_1776118511625_0.9676946103153727","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@devondragon/emdash-plugin-404-viewer","version":"0.3.2","keywords":["emdash","emdash-plugin","cms","404","admin"],"author":{"name":"Devon Hillard","email":"devon@devondragon.com"},"license":"MIT","_id":"@devondragon/emdash-plugin-404-viewer@0.3.2","maintainers":[{"name":"devondragon","email":"devon@justblackmagic.com"}],"homepage":"https://github.com/devondragon/emdash-plugins/tree/main/packages/404-viewer#readme","bugs":{"url":"https://github.com/devondragon/emdash-plugins/issues"},"dist":{"shasum":"81a203cb125f6b0076e5efc0618ddd62903fbd36","tarball":"https://registry.npmjs.org/@devondragon/emdash-plugin-404-viewer/-/emdash-plugin-404-viewer-0.3.2.tgz","fileCount":7,"integrity":"sha512-UVInErPftl/h4s5mBeOubBsumnRb/x3NlP938SYfuwRtiXqSPMJm+fo1lrWTdnXHJbdygHd45bAPO790NT6FSg==","signatures":[{"sig":"MEQCIDwBLQ/9jFMAaqFeN+njVk0UYSrUhteJ1FXB3sfTLpFqAiAyVESAv4Wx2kqAlI2kPPSLJa3y+3cnhPlcO5blsY5ziQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCdF3+C1fPgN2bOI3/Ux3UIKm+SbqyTfsuZBs7ydQoxSQIgOVpWWkSXmnDrJood7OD10Wjsy5h+Ipax6R+2LGLCqjE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@devondragon%2femdash-plugin-404-viewer@0.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":37232},"main":"./dist/index.js","type":"module","_from":"file:devondragon-emdash-plugin-404-viewer-0.3.2.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./admin":{"types":"./dist/admin.d.ts","import":"./dist/admin.js"}},"scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e48381b7-3e12-45af-b623-3a58dcea468a"}},"_resolved":"/tmp/2ed6f320cbbd6a3ff9e1851c9f910b52/devondragon-emdash-plugin-404-viewer-0.3.2.tgz","_integrity":"sha512-UVInErPftl/h4s5mBeOubBsumnRb/x3NlP938SYfuwRtiXqSPMJm+fo1lrWTdnXHJbdygHd45bAPO790NT6FSg==","repository":{"url":"git+https://github.com/devondragon/emdash-plugins.git","type":"git","directory":"packages/404-viewer"},"_npmVersion":"11.19.0","description":"EmDash admin plugin: viewer for the built-in 404 log table","directories":{},"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.2.4","emdash":"^0.4.0","tsdown":"^0.21.0","typescript":"^5.9.3","@types/react":"^19.2.14","@cloudflare/kumo":"^1.17.0","@phosphor-icons/react":"^2.1.10"},"peerDependencies":{"react":"^19.0.0","emdash":">=0.1.0","@cloudflare/kumo":"^1.0.0","@phosphor-icons/react":"^2.1.10"},"_npmOperationalInternal":{"tmp":"tmp/emdash-plugin-404-viewer_0.3.2_1788837907887_0.1383140327648429","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"_id":"@devondragon/emdash-plugin-404-viewer@0.4.0","bugs":{"url":"https://github.com/devondragon/emdash-plugins/issues"},"dist":{"shasum":"e63d241a55030086fb8247fc4b221f3b882c28d7","tarball":"https://registry.npmjs.org/@devondragon/emdash-plugin-404-viewer/-/emdash-plugin-404-viewer-0.4.0.tgz","fileCount":7,"integrity":"sha512-Xzr6nS7RhVDxMg5UrENCz/wtTrg75DHlYibUE77Kg4deYWY7HFJ3VkNK/sY13dsnhqfbdFXLL/8CPphcoiMP1Q==","signatures":[{"sig":"MEUCIGYD0F+FapFPU/rjwGczD9UVPc2VSDVO/yWd0R7KjybjAiEA82Ev/oCjioIkoBR7Sx7+zGQI6KE+c/iFXxQAcpaeCV8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD8Qo6tltrng3gyVtyxeBgI61//9o9Y8jgy5ZQb8bsaYAIgHL0d87Hz7kNw0alBrjEKrkRxqAHUPqOzhIm7+t9N4L0="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@devondragon%2femdash-plugin-404-viewer@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":37312},"main":"./dist/index.js","name":"@devondragon/emdash-plugin-404-viewer","type":"module","_from":"file:devondragon-emdash-plugin-404-viewer-0.4.0.tgz","types":"./dist/index.d.ts","author":{"name":"Devon Hillard","email":"devon@devondragon.com"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./admin":{"types":"./dist/admin.d.ts","import":"./dist/admin.js"}},"license":"MIT","scripts":{"dev":"tsdown --watch","build":"tsdown","typecheck":"tsc --noEmit"},"version":"0.4.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"e48381b7-3e12-45af-b623-3a58dcea468a"}},"homepage":"https://github.com/devondragon/emdash-plugins/tree/main/packages/404-viewer#readme","keywords":["emdash","emdash-plugin","cms","404","admin"],"_resolved":"/tmp/833c6493b2b787efaf75e68c5dc0d06b/devondragon-emdash-plugin-404-viewer-0.4.0.tgz","_integrity":"sha512-Xzr6nS7RhVDxMg5UrENCz/wtTrg75DHlYibUE77Kg4deYWY7HFJ3VkNK/sY13dsnhqfbdFXLL/8CPphcoiMP1Q==","repository":{"url":"git+https://github.com/devondragon/emdash-plugins.git","type":"git","directory":"packages/404-viewer"},"_npmVersion":"11.19.0","description":"EmDash admin plugin: viewer for the built-in 404 log table","directories":{},"maintainers":[{"name":"devondragon","email":"devon@justblackmagic.com"}],"_nodeVersion":"24.21.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.3.1","emdash":"^1.3.0","tsdown":"^0.21.0","typescript":"^5.9.3","@types/react":"^19.3.0","@cloudflare/kumo":"2.6.0","@phosphor-icons/react":"^2.1.10"},"peerDependencies":{"react":"^19.0.0","emdash":">=1.0.0","@cloudflare/kumo":"^2.6.0","@phosphor-icons/react":"^2.1.10"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/emdash-plugin-404-viewer_0.4.0_1792289016174_0.7236276046324983"}}},"time":{"created":"2026-04-08T16:03:43.391Z","modified":"2026-10-18T02:03:36.581Z","0.2.0":"2026-04-08T16:03:43.623Z","0.3.0":"2026-04-09T14:30:04.558Z","0.3.1":"2026-04-13T22:15:11.848Z","0.3.2":"2026-09-08T03:25:07.976Z","0.4.0":"2026-10-18T02:03:36.249Z"},"bugs":{"url":"https://github.com/devondragon/emdash-plugins/issues"},"author":{"name":"Devon Hillard","email":"devon@devondragon.com"},"license":"MIT","homepage":"https://github.com/devondragon/emdash-plugins/tree/main/packages/404-viewer#readme","keywords":["emdash","emdash-plugin","cms","404","admin"],"repository":{"url":"git+https://github.com/devondragon/emdash-plugins.git","type":"git","directory":"packages/404-viewer"},"description":"EmDash admin plugin: viewer for the built-in 404 log table","maintainers":[{"name":"devondragon","email":"devon@justblackmagic.com"}],"readme":"# @devondragon/emdash-plugin-404-viewer\n\nEmDash admin plugin that surfaces the built-in `_emdash_404_log` table as a viewer in the EmDash admin sidebar. See aggregate hit counts, browse the full log with search and pagination, and prune or clear entries.\n\n## Requirements\n\n- EmDash `>=1.0.0` (tested against 1.3.0)\n- React `^19`\n- `@cloudflare/kumo` `^2.6.0` (EmDash 1.x ships 2.6.0)\n- An EmDash site backed by Cloudflare D1 (the plugin reads `_emdash_404_log`, which is populated by EmDash's redirect middleware)\n\n## Installation\n\n```bash\npnpm add @devondragon/emdash-plugin-404-viewer\n```\n\n## Usage\n\nIn your `astro.config.mjs`:\n\n```ts\nimport { defineConfig } from \"astro/config\";\nimport emdash from \"emdash\";\nimport { notFoundViewerPlugin } from \"@devondragon/emdash-plugin-404-viewer\";\n\nexport default defineConfig({\n  integrations: [\n    emdash({\n      plugins: [notFoundViewerPlugin()],\n    }),\n  ],\n});\n```\n\nAfter running your dev server, the \"404 Log\" page appears in the EmDash admin sidebar.\n\n## Features\n\n- **Summary view** — paths grouped by hit count, with severity badges and \"last seen\" timestamps.\n- **Full log view** — paginated browsing with search-by-path.\n- **Create redirect from a 404** — admins get a \"→ Redirect\" button on each row that opens a modal to post a new rule via EmDash's built-in redirects API. Supports exact paths or Astro-style patterns (`[param]`, `[...rest]`), includes post-title autosuggest for the destination, and picks from 301/302/307/308.\n- **Prune older than N days** — bulk delete with a date threshold.\n- **Clear all** — wipes the entire log (confirms first).\n\n## Notes\n\n- The plugin reads from EmDash's built-in API (`/_emdash/api/redirects/404s`) — no separate database setup required.\n- Uses `@cloudflare/kumo` and `@phosphor-icons/react` (already required by EmDash) for UI primitives.\n- Creating a redirect requires the `redirects:manage` permission (admin role). Non-admin users will not see the \"→ Redirect\" buttons.\n- Destination autosuggest uses EmDash's search API and fills the field with `/<slug>`; you may need to edit to match your collection's route (e.g. `/blog/<slug>`).\n\n## License\n\nMIT © Devon Hillard\n","readmeFilename":"README.md"}