{"_id":"@crustum/laravel-echo-mercure","name":"@crustum/laravel-echo-mercure","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@crustum/laravel-echo-mercure","version":"1.0.0","description":"Mercure connector for Laravel Echo - Server-Sent Events (SSE) implementation","main":"dist/index.cjs","module":"dist/index.esm.js","browser":"dist/index.umd.js","types":"dist/index.d.ts","scripts":{"build":"npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:types","build:esm":"esbuild src/index.js --bundle --format=esm --outfile=dist/index.esm.js --minify","build:cjs":"esbuild src/index.js --bundle --format=cjs --outfile=dist/index.cjs --minify","build:umd":"esbuild src/umd-wrapper.js --bundle --format=iife --outfile=dist/index.umd.js --minify --define:process.env.NODE_ENV='\"production\"'","build:types":"tsc --declaration --emitDeclarationOnly --outDir dist","prepublishOnly":"npm run build","test":"echo \"Error: no test specified\" && exit 1"},"keywords":["mercure","laravel-echo","echo","sse","server-sent-events","realtime","broadcasting","websocket-alternative"],"author":{"name":"Crustum"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/crustum/laravel-echo-mercure.git"},"bugs":{"url":"https://github.com/crustum/laravel-echo-mercure/issues"},"homepage":"https://github.com/crustum/laravel-echo-mercure#readme","devDependencies":{"esbuild":"^0.19.0","typescript":"^5.3.0"},"peerDependencies":{"laravel-echo":"^1.15.0"},"engines":{"node":">=14.0.0"},"_id":"@crustum/laravel-echo-mercure@1.0.0","gitHead":"1e804a4299d8388fe5ab664ede57134716f58f02","_nodeVersion":"22.17.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-46N74pK4+7vVfSUDkYmS/nP2ZkWYRaphIDJEjdMkJZiUjQccwOct1pmbr2+bJXeFsRUiBJOt8OWe2Aa+4/4oVw==","shasum":"e51fe0a92161fa4b95585c9286ae18d06c77d494","tarball":"https://registry.npmjs.org/@crustum/laravel-echo-mercure/-/laravel-echo-mercure-1.0.0.tgz","fileCount":18,"unpackedSize":30684,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAfC1H1eInbVOmGWU673tDpHVGnYPAYWVkhmHD7nZpwlAiBtLKtGycrZQ7SCNVujsrKgOY9uM93NbqYohwm6MxWYMw=="}]},"_npmUser":{"name":"yevgeny.tomenko","email":"yevgenyt@gmail.com"},"directories":{},"maintainers":[{"name":"yevgeny.tomenko","email":"yevgenyt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/laravel-echo-mercure_1.0.0_1765307924544_0.9118136494797833"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-09T19:18:44.471Z","1.0.0":"2025-12-09T19:18:44.675Z","modified":"2025-12-09T19:18:44.941Z"},"maintainers":[{"name":"yevgeny.tomenko","email":"yevgenyt@gmail.com"}],"description":"Mercure connector for Laravel Echo - Server-Sent Events (SSE) implementation","homepage":"https://github.com/crustum/laravel-echo-mercure#readme","keywords":["mercure","laravel-echo","echo","sse","server-sent-events","realtime","broadcasting","websocket-alternative"],"repository":{"type":"git","url":"git+https://github.com/crustum/laravel-echo-mercure.git"},"author":{"name":"Crustum"},"bugs":{"url":"https://github.com/crustum/laravel-echo-mercure/issues"},"license":"MIT","readme":"# @crustum/laravel-echo-mercure\r\n\r\nMercure connector for Laravel Echo - Server-Sent Events (SSE) implementation compatible with Laravel Echo API.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @crustum/laravel-echo-mercure\r\n```\r\n\r\n## Usage\r\n\r\n### With Laravel Echo\r\n\r\n```javascript\r\nimport Echo from 'laravel-echo';\r\nimport { MercureConnector } from '@crustum/laravel-echo-mercure';\r\n\r\nwindow.Echo = new Echo({\r\n    broadcaster: MercureConnector,\r\n    mercureUrl: '/.well-known/mercure',\r\n    authEndpoint: '/broadcasting/auth',\r\n});\r\n```\r\n\r\n### Standalone Usage\r\n\r\n```javascript\r\nimport { MercureConnector } from '@crustum/laravel-echo-mercure';\r\n\r\nconst connector = new MercureConnector({\r\n    mercureUrl: '/.well-known/mercure',\r\n    authEndpoint: '/broadcasting/auth',\r\n});\r\n\r\nconst channel = connector.privateChannel('App.Model.Entity.User.123');\r\nchannel.listen('PostUpdated', (data) => {\r\n    console.log('Post updated:', data);\r\n});\r\n```\r\n\r\n## Browser Build\r\n\r\nFor browser usage without a bundler:\r\n\r\n```html\r\n<script src=\"node_modules/@crustum/laravel-echo-mercure/dist/index.umd.js\"></script>\r\n<script>\r\n    const connector = new MercureConnector({\r\n        mercureUrl: '/.well-known/mercure',\r\n        authEndpoint: '/broadcasting/auth',\r\n    });\r\n</script>\r\n```\r\n\r\n## Features\r\n\r\n- Compatible with Laravel Echo API\r\n- Server-Sent Events (SSE) via Mercure Hub\r\n- Channel batching for efficient connections\r\n- Private channel support with JWT authentication\r\n- Automatic channel routing\r\n- Event listener management\r\n\r\n## Configuration Options\r\n\r\n- `mercureUrl` - Mercure Hub URL (default: `'/.well-known/mercure'`)\r\n- `authEndpoint` - Authentication endpoint for JWT tokens (default: `'/broadcasting/auth'`)\r\n- `namespace` - Event namespace (default: `'App.Events'`)\r\n\r\n## License\r\n\r\nMIT\r\n\r\n","readmeFilename":"README.md","_rev":"1-a0169ed1ac9c2fcf78eb2719451c90db"}