{"_id":"@afcms/vite-plugin-opensearch","_rev":"5-a5cff4e438e1a3060b8e66fc870c7e2e","name":"@afcms/vite-plugin-opensearch","dist-tags":{"latest":"0.2.1"},"versions":{"0.0.0":{"name":"@afcms/vite-plugin-opensearch","version":"0.0.0","keywords":["browser-search","opensearch","vite-plugin","xml"],"author":"AFCMS <afcm.contact@gmail.com>","license":"MIT","_id":"@afcms/vite-plugin-opensearch@0.0.0","maintainers":[{"name":"afcm","email":"afcm.contact@gmail.com"}],"homepage":"https://github.com/AFCMS/vite-plugin-opensearch#readme","bugs":{"url":"https://github.com/AFCMS/vite-plugin-opensearch/issues"},"dist":{"shasum":"4ef2a74a2a8d7f520b83ee1f271fe034ad6c6556","tarball":"https://registry.npmjs.org/@afcms/vite-plugin-opensearch/-/vite-plugin-opensearch-0.0.0.tgz","fileCount":6,"integrity":"sha512-6r3qOHJYZGiSFOMCkx6n75fyZDHbRNH8oaiG8YIdnHkB+K8kSJG9Q4S5ZEkTyXfs8BSVgyAtnG1zzJ5lmwfudw==","signatures":[{"sig":"MEUCIQDmkdXn7R9RL3lsV/SdMchUianI3hBw4/lpJp4V3wrtNwIgCb5oqREAmO2wDFYk4xglAy7z6RtM2nXSTesb5H1FvWs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56139},"type":"module","exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","lint":"oxlint","test":"vitest run","build":"tsdown","format":"oxfmt","release":"bumpp","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"oxfmt --check"},"_npmUser":{"name":"afcm","email":"afcm.contact@gmail.com"},"devEngines":{"runtime":{"name":"node","onFail":"error","version":"^24"},"packageManager":{"name":"pnpm","onFail":"error","version":"^11"}},"repository":{"url":"git+https://github.com/AFCMS/vite-plugin-opensearch.git","type":"git"},"description":"Generate OpenSearch 1.1 browser search descriptions with Vite","directories":{},"_nodeVersion":"26.0.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^8.1.5","bumpp":"^11.1.0","oxfmt":"^0.59.0","oxlint":"^1.74.0","tsdown":"^0.22.5","vitest":"^4.1.10","publint":"^0.3.21","typescript":"^7.0.2","@types/node":"^26.1.1","oxlint-tsgolint":"^0.25.0","@arethetypeswrong/core":"^0.18.5"},"peerDependencies":{"vite":"^8"},"compatiblePackages":{"vite":{"type":"compatible","versions":"^8.0.0"},"schemaVersion":1},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-opensearch_0.0.0_1784740306511_0.5097674290333827","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@afcms/vite-plugin-opensearch","version":"0.1.0","keywords":["browser-search","opensearch","vite-plugin","xml"],"author":"AFCMS <afcm.contact@gmail.com>","license":"MIT","_id":"@afcms/vite-plugin-opensearch@0.1.0","maintainers":[{"name":"afcm","email":"afcm.contact@gmail.com"}],"homepage":"https://github.com/AFCMS/vite-plugin-opensearch#readme","bugs":{"url":"https://github.com/AFCMS/vite-plugin-opensearch/issues"},"dist":{"shasum":"8e56e7a9754e4b3944f21a9569c86f044c270b06","tarball":"https://registry.npmjs.org/@afcms/vite-plugin-opensearch/-/vite-plugin-opensearch-0.1.0.tgz","fileCount":6,"integrity":"sha512-5qnL/5e3hs4TKNiYds7mYQUiQmUYJmhLPNpS2AOuwPXV+E9Ky14yDdKxhtd1VR4g2rF31mjpCT/qsrxMktYc1g==","signatures":[{"sig":"MEQCIEd4JeKoyPCESdx0ZaxyPAEXWqjeLh3kggxzLb++dGcWAiBgmiyl2lQ0zdWkIY6iqJFcJtgBj7aJ7NZfObjQiRFZQg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@afcms%2fvite-plugin-opensearch@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":56139},"type":"module","exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","lint":"oxlint","test":"vitest run","build":"tsdown","format":"oxfmt","release":"bumpp","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"oxfmt --check"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:25fd7c96-c84c-4eaa-a48f-9a67f673e493"}},"devEngines":{"runtime":{"name":"node","onFail":"error","version":"^24"},"packageManager":{"name":"pnpm","onFail":"error","version":"^11"}},"repository":{"url":"git+https://github.com/AFCMS/vite-plugin-opensearch.git","type":"git"},"description":"Generate OpenSearch 1.1 browser search descriptions with Vite","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^8.1.5","bumpp":"^11.1.0","oxfmt":"^0.59.0","oxlint":"^1.74.0","tsdown":"^0.22.5","vitest":"^4.1.10","publint":"^0.3.21","typescript":"^7.0.2","@types/node":"^26.1.1","oxlint-tsgolint":"^0.25.0","@arethetypeswrong/core":"^0.18.5"},"peerDependencies":{"vite":"^8"},"compatiblePackages":{"vite":{"type":"compatible","versions":"^8.0.0"},"schemaVersion":1},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-opensearch_0.1.0_1784740575302_0.281012801553878","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@afcms/vite-plugin-opensearch","version":"0.1.1","keywords":["browser-search","opensearch","vite-plugin","xml"],"author":"AFCMS <afcm.contact@gmail.com>","license":"MIT","_id":"@afcms/vite-plugin-opensearch@0.1.1","maintainers":[{"name":"afcm","email":"afcm.contact@gmail.com"}],"homepage":"https://github.com/AFCMS/vite-plugin-opensearch#readme","bugs":{"url":"https://github.com/AFCMS/vite-plugin-opensearch/issues"},"dist":{"shasum":"03518749d327329080567378db784b1897680f16","tarball":"https://registry.npmjs.org/@afcms/vite-plugin-opensearch/-/vite-plugin-opensearch-0.1.1.tgz","fileCount":6,"integrity":"sha512-WdQZ3n27Uur/vXnXI9Zrs87N0YXV+D2BSqCRbWhC4Jv9gw5YQxNdabwPz0bSWAuVq69PGhGZnK5LPteUqg00Mg==","signatures":[{"sig":"MEQCICd4YbAompJ+omOfrSIWfSXF/NvYZ2PstiPfgDHWs9ZOAiA9PfqKf0DQYE5a64zEFcw8TmjwDeJ5ZJKCkWUbYXVdjQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@afcms%2fvite-plugin-opensearch@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":56178},"type":"module","engines":{"node":"^24"},"exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","lint":"oxlint","test":"vitest run","build":"tsdown","format":"oxfmt","release":"bumpp","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"oxfmt --check"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:25fd7c96-c84c-4eaa-a48f-9a67f673e493"}},"devEngines":{"runtime":{"name":"node","onFail":"error","version":"^24"},"packageManager":{"name":"pnpm","onFail":"error","version":"^11"}},"repository":{"url":"git+https://github.com/AFCMS/vite-plugin-opensearch.git","type":"git"},"description":"Generate OpenSearch 1.1 browser search descriptions with Vite","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^8.1.5","bumpp":"^11.1.0","oxfmt":"^0.59.0","oxlint":"^1.74.0","tsdown":"^0.22.5","vitest":"^4.1.10","publint":"^0.3.21","typescript":"^7.0.2","@types/node":"^24.13.3","oxlint-tsgolint":"^0.25.0","@arethetypeswrong/core":"^0.18.5"},"peerDependencies":{"vite":"^8"},"compatiblePackages":{"vite":{"type":"compatible","versions":"^8.0.0"},"schemaVersion":1},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-opensearch_0.1.1_1784797001271_0.9528741130400691","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@afcms/vite-plugin-opensearch","version":"0.2.0","keywords":["browser-search","opensearch","vite-plugin","xml"],"author":"AFCMS <afcm.contact@gmail.com>","license":"MIT","_id":"@afcms/vite-plugin-opensearch@0.2.0","maintainers":[{"name":"afcm","email":"afcm.contact@gmail.com"}],"homepage":"https://github.com/AFCMS/vite-plugin-opensearch#readme","bugs":{"url":"https://github.com/AFCMS/vite-plugin-opensearch/issues"},"dist":{"shasum":"6f945203dab1f6514aa3e3e33eafd42cac6d0f66","tarball":"https://registry.npmjs.org/@afcms/vite-plugin-opensearch/-/vite-plugin-opensearch-0.2.0.tgz","fileCount":5,"integrity":"sha512-wUVPAoWVXTktwXPCxnpB82Dn6GQTo0Kv0NLphyTTIrTnMytx72+uaICeroGYPeIBtPLA2X/N4Wb4qO1ikRKSRw==","signatures":[{"sig":"MEYCIQCddp5sjLhXNQuwDamJtaX6v3WP46aZ1feyAJnJVMsB3QIhAOCk8W/0Pswt1UUU2Bv0K+H2sBh6DEfCYac+aM0YJEiD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@afcms%2fvite-plugin-opensearch@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":23013},"type":"module","engines":{"node":"^24"},"exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","lint":"oxlint","test":"vitest run","build":"tsdown","format":"oxfmt","release":"bumpp","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"oxfmt --check"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:25fd7c96-c84c-4eaa-a48f-9a67f673e493"}},"devEngines":{"runtime":{"name":"node","onFail":"error","version":"^24"},"packageManager":{"name":"pnpm","onFail":"error","version":"^11"}},"repository":{"url":"git+https://github.com/AFCMS/vite-plugin-opensearch.git","type":"git"},"description":"Generate OpenSearch 1.1 browser search descriptions with Vite","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^8.1.5","bumpp":"^12.0.0","oxfmt":"^0.60.0","oxlint":"^1.75.0","tsdown":"^0.22.14","vitest":"^4.1.10","publint":"^0.3.22","typescript":"^7.0.2","@types/node":"^24.13.3","oxlint-tsgolint":"^7.0.2001","@arethetypeswrong/core":"^0.18.5"},"peerDependencies":{"vite":"^8"},"compatiblePackages":{"vite":{"type":"compatible","versions":"^8.0.0"},"schemaVersion":1},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-opensearch_0.2.0_1784923362369_0.9364220237478218","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@afcms/vite-plugin-opensearch","version":"0.2.1","description":"Generate OpenSearch 1.1 browser search descriptions with Vite","keywords":["browser-search","opensearch","vite-plugin","xml"],"homepage":"https://github.com/AFCMS/vite-plugin-opensearch#readme","bugs":{"url":"https://github.com/AFCMS/vite-plugin-opensearch/issues"},"license":"MIT","author":"AFCMS <afcm.contact@gmail.com>","repository":{"type":"git","url":"git+https://github.com/AFCMS/vite-plugin-opensearch.git"},"type":"module","exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"devDependencies":{"@arethetypeswrong/core":"^0.18.5","@types/node":"^24.13.3","bumpp":"^12.2.1","oxfmt":"^0.65.0","oxlint":"^1.80.0","oxlint-tsgolint":"^7.0.2001","publint":"^0.3.24","tsdown":"^0.22.14","typescript":"^7.0.2","vite":"^8.2.2","vitest":"^4.1.11"},"peerDependencies":{"vite":"^8"},"devEngines":{"packageManager":{"name":"pnpm","version":"^11","onFail":"error"},"runtime":{"name":"node","version":"^24","onFail":"error"}},"engines":{"node":"^24"},"compatiblePackages":{"schemaVersion":1,"vite":{"type":"compatible","versions":"^8.0.0"},"rollup":{"type":"incompatible"},"rolldown":{"type":"incompatible"}},"scripts":{"build":"tsdown","dev":"tsdown --watch","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","release":"bumpp","format":"oxfmt","format:check":"oxfmt --check","lint":"oxlint"},"_nodeVersion":"26.0.0","_id":"@afcms/vite-plugin-opensearch@0.2.1","dist":{"integrity":"sha512-2ix6sRgc8t/qCDSt9QKnrkA7nVQc6jUurf/PPHgZ5gRN+/vksT/zy2fjvX5M98BFBxM5rzAL4Nyn5r4yczd7+Q==","shasum":"597cf1bd5e57818ce4c2c6f5f97352c3fa58443f","tarball":"https://registry.npmjs.org/@afcms/vite-plugin-opensearch/-/vite-plugin-opensearch-0.2.1.tgz","fileCount":5,"unpackedSize":23119,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@afcms%2fvite-plugin-opensearch@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCF8/hEi5o/5e6z1fnZVWFf9GntQCfFEO6BNDxXFf9zigIgV4YZbVDl7fyVKZddptsjDJIbzUe6mSGRuLS/+jrJUxs="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:25fd7c96-c84c-4eaa-a48f-9a67f673e493"}},"directories":{},"maintainers":[{"name":"afcm","email":"afcm.contact@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vite-plugin-opensearch_0.2.1_1787767369117_0.7997335599755071"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-22T17:11:46.317Z","modified":"2026-08-26T18:02:49.603Z","0.0.0":"2026-07-22T17:11:46.642Z","0.1.0":"2026-07-22T17:16:16.449Z","0.1.1":"2026-07-23T08:56:41.442Z","0.2.0":"2026-07-24T20:02:42.508Z","0.2.1":"2026-08-26T18:02:49.259Z"},"bugs":{"url":"https://github.com/AFCMS/vite-plugin-opensearch/issues"},"author":"AFCMS <afcm.contact@gmail.com>","license":"MIT","homepage":"https://github.com/AFCMS/vite-plugin-opensearch#readme","keywords":["browser-search","opensearch","vite-plugin","xml"],"repository":{"type":"git","url":"git+https://github.com/AFCMS/vite-plugin-opensearch.git"},"description":"Generate OpenSearch 1.1 browser search descriptions with Vite","maintainers":[{"name":"afcm","email":"afcm.contact@gmail.com"}],"readme":"# @afcms/vite-plugin-opensearch\n\nA build-only Vite plugin that generates browser-compatible\n[OpenSearch 1.1](https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md)\ndescription documents.\n\nThis package implements the browser search protocol, not the OpenSearch search\nserver derived from Elasticsearch.\n\n## Installation\n\n```sh\npnpm add --save-dev @afcms/vite-plugin-opensearch\n```\n\nThe package requires Vite 8.\n\n## Basic usage\n\nAdd the plugin to `vite.config.ts`:\n\n```ts\nimport { defineConfig } from \"vite\";\nimport openSearch from \"@afcms/vite-plugin-opensearch\";\n\nexport default defineConfig({\n  plugins: [\n    openSearch({\n      baseURL: \"https://example.com/\",\n      descriptions: [\n        {\n          fileName: \"opensearch.xml\",\n          shortName: \"Example Search\",\n          description: \"Search example.com.\",\n          urls: [\n            {\n              type: \"text/html\",\n              template: \"/search?q={searchTerms}\",\n            },\n          ],\n          images: [\n            {\n              url: \"/favicon.ico\",\n              width: 16,\n              height: 16,\n              type: \"image/x-icon\",\n            },\n          ],\n          inputEncodings: [\"UTF-8\"],\n        },\n      ],\n    }),\n  ],\n});\n```\n\nThe build emits `opensearch.xml` at the root of Vite's output directory. The\nrelative search and image URLs become `https://example.com/search?...` and\n`https://example.com/favicon.ico` in the generated document.\n\n## Multiple search engines\n\nEvery description has its own exact output path, so a domain can publish\nmultiple search engines:\n\n```ts\nopenSearch({\n  baseURL: \"https://example.com/\",\n  descriptions: [\n    {\n      fileName: \"search/articles.xml\",\n      shortName: \"Articles\",\n      description: \"Search articles.\",\n      urls: [\n        {\n          type: \"text/html\",\n          template: \"/articles?q={searchTerms}\",\n        },\n      ],\n    },\n    {\n      fileName: \"search/people.xml\",\n      shortName: \"People\",\n      description: \"Search people.\",\n      urls: [\n        {\n          type: \"text/html\",\n          template: \"/people?q={searchTerms}\",\n        },\n      ],\n    },\n  ],\n});\n```\n\nThis emits `search/articles.xml` and `search/people.xml`. Output paths must be\nunique, relative POSIX paths and may use any file extension.\n\n## URL resolution\n\n`baseURL` must be an absolute HTTP or HTTPS URL. URL templates and image URLs\nare resolved with the standard `URL` constructor:\n\n- `/search` resolves from the origin root.\n- `search` resolves relative to the path in `baseURL`.\n- Absolute URLs remain absolute.\n- `data:` image URLs remain `data:` URLs.\n\nOpenSearch template placeholders such as `{searchTerms}` and `{startPage?}`\nare preserved. Query-string ampersands and other XML-sensitive characters are\nescaped in the emitted document.\n\n## Optional OpenSearch fields\n\nThe typed API supports all core OpenSearch description fields: contact, tags,\nlong name, images, example queries, developer, attribution, syndication rights,\nadult-content status, languages, and input/output encodings. Every public input\nhas JSDoc describing its limits and defaults.\n\nThe plugin rejects invalid OpenSearch data and unsafe output paths before it\nemits any files. A valid description without a `text/html` results URL produces\na build warning because common browsers may reject it.\n\n## Browser autodiscovery\n\nThe plugin generates description files but does not modify HTML. Add one link\nfor each engine to the page's `<head>`:\n\n```html\n<link\n  rel=\"search\"\n  type=\"application/opensearchdescription+xml\"\n  title=\"Articles\"\n  href=\"https://example.com/search/articles.xml\"\n/>\n<link\n  rel=\"search\"\n  type=\"application/opensearchdescription+xml\"\n  title=\"People\"\n  href=\"https://example.com/search/people.xml\"\n/>\n```\n\nThe link title should match the description's `shortName`.\n\nConfigure the production server or CDN to serve generated descriptions with\n`Content-Type: application/opensearchdescription+xml`. The plugin only runs\nduring Vite builds; it does not add development-server routes.\n","readmeFilename":""}