{"_id":"@empellio/vite-localtunnel","_rev":"3-8f32a33cd40478d5f7568d478e40391e","name":"@empellio/vite-localtunnel","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@empellio/vite-localtunnel","version":"0.1.0","keywords":["vite","plugin","localtunnel","devserver"],"license":"MIT","_id":"@empellio/vite-localtunnel@0.1.0","maintainers":[{"name":"vladimirurik","email":"vladimir.urik@empellio.com"}],"dist":{"shasum":"18c111368a48f67e63227867f50213fff3b923b4","tarball":"https://registry.npmjs.org/@empellio/vite-localtunnel/-/vite-localtunnel-0.1.0.tgz","fileCount":9,"integrity":"sha512-iG7pvtJSYiBWi+MDbho4WA/FuUChjiTW72rhCrSYSMk+Hpt5AVRkK/iSJyaZFjWar/LMInfDYjuMcRw8FtmUgg==","signatures":[{"sig":"MEUCIQCZO3nnj9splfxFiib+nn4i5teFI7MPgVXPNtbyutVe/wIgVdNME2/ie/7ERrZ7/GwtBNtiIkg6K5gWrilT3D8dVyE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17948},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"c1b5d07c9a446df4fb1809e9e2996c986a69c0ce","scripts":{"dev":"tsup src/index.ts --format esm,cjs --dts --sourcemap --watch --clean","build":"tsup src/index.ts --format esm,cjs --dts --sourcemap --clean","typecheck":"tsc --noEmit"},"_npmUser":{"name":"vladimirurik","email":"vladimir.urik@empellio.com"},"_npmVersion":"10.8.2","description":"Vite plugin that exposes your dev server via localtunnel and prints the public URL and password.","directories":{},"_nodeVersion":"20.19.1","dependencies":{"localtunnel":"^2.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","typescript":"^5.5.0","@types/node":"^20.10.0","@types/localtunnel":"^2.0.4"},"peerDependencies":{"vite":"^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/vite-localtunnel_0.1.0_1759008739234_0.6380474649262333","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@empellio/vite-localtunnel","version":"0.1.1","keywords":["vite","plugin","localtunnel","devserver"],"license":"MIT","_id":"@empellio/vite-localtunnel@0.1.1","maintainers":[{"name":"vladimirurik","email":"vladimir.urik@empellio.com"}],"dist":{"shasum":"0786e165275cfc293621b41b30f3dcbad0556cbd","tarball":"https://registry.npmjs.org/@empellio/vite-localtunnel/-/vite-localtunnel-0.1.1.tgz","fileCount":10,"integrity":"sha512-5cVWMSBElCkSQPWzd829ePAYMsj2bg7ejuID9ufdloQJFn1o5i7DaJYSgz2MZukT+tKpZuDpG3Ya5Di2xsCZGw==","signatures":[{"sig":"MEUCIQDExzipjVA7ilXXi7AvfvxIobHI6SDFgs+KlypphQBdPAIga8GPbmDPVCAQu8nuqMa61IT3RO5a/k+nwT1qDA8BLvk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19015},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"d0e8f2d4c5b26b726bce3b679fcf5a66c9d098a3","scripts":{"dev":"tsup src/index.ts --format esm,cjs --dts --sourcemap --watch --clean","build":"tsup src/index.ts --format esm,cjs --dts --sourcemap --clean","typecheck":"tsc --noEmit"},"_npmUser":{"name":"vladimirurik","email":"vladimir.urik@empellio.com"},"_npmVersion":"10.8.2","description":"Vite plugin that exposes your dev server via localtunnel and prints the public URL and password.","directories":{},"_nodeVersion":"20.19.1","dependencies":{"localtunnel":"^2.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","typescript":"^5.5.0","@types/node":"^20.10.0","@types/localtunnel":"^2.0.4"},"peerDependencies":{"vite":"^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/vite-localtunnel_0.1.1_1759009044627_0.6317833116501568","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@empellio/vite-localtunnel","version":"0.1.2","description":"Vite plugin that exposes your dev server via localtunnel and prints the public URL and password.","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --sourcemap --clean","dev":"tsup src/index.ts --format esm,cjs --dts --sourcemap --watch --clean","typecheck":"tsc --noEmit"},"peerDependencies":{"vite":">=4.0.0"},"dependencies":{"localtunnel":"^2.0.2"},"devDependencies":{"@types/localtunnel":"^2.0.4","@types/node":"^20.10.0","tsup":"^8.0.1","typescript":"^5.5.0"},"engines":{"node":">=18"},"keywords":["vite","plugin","localtunnel","devserver"],"license":"MIT","publishConfig":{"access":"public"},"_id":"@empellio/vite-localtunnel@0.1.2","gitHead":"4457e229675092eda9b891ad7c3edefc83d002bd","_nodeVersion":"20.19.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-b89q4Mb8nPv5M/JDLMynv4OdtLpQkUw4ZojduEt+rg8injUc4ISd8lEuKkssismlBNV7OWGojWVrgv1tF6JMrw==","shasum":"6e73b66c7693ef5345484f8a6620479c37979dfa","tarball":"https://registry.npmjs.org/@empellio/vite-localtunnel/-/vite-localtunnel-0.1.2.tgz","fileCount":10,"unpackedSize":19006,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHqPF4bvzOjxMJLx5BddLtwbvobGcWgx2ziX6IdywBaqAiEAsiQg/RUrleJUbfJJco62obLm64ME7eNFtKw6K8jbTJI="}]},"_npmUser":{"name":"vladimirurik","email":"vladimir.urik@empellio.com"},"directories":{},"maintainers":[{"name":"vladimirurik","email":"vladimir.urik@empellio.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vite-localtunnel_0.1.2_1759009464925_0.6359618153017659"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-27T21:32:19.160Z","modified":"2025-09-27T21:44:25.349Z","0.1.0":"2025-09-27T21:32:19.484Z","0.1.1":"2025-09-27T21:37:24.845Z","0.1.2":"2025-09-27T21:44:25.122Z"},"license":"MIT","keywords":["vite","plugin","localtunnel","devserver"],"description":"Vite plugin that exposes your dev server via localtunnel and prints the public URL and password.","maintainers":[{"name":"vladimirurik","email":"vladimir.urik@empellio.com"}],"readme":"## @empellio/vite-localtunnel\n\nExpose your Vite dev server to the internet via LocalTunnel. Prints the public URL and fetches the LocalTunnel password. Vite 4/5, Node 18+.\n\n### Installation\n\n```bash\nnpm install -D @empellio/vite-localtunnel\n```\n\nPeer dependency: `vite` (v4 or v5). Requires Node.js 18+ (native `fetch`).\n\n### Quick start\n\n```ts\n// vite.config.ts\nimport { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\nimport viteLocalTunnel from '@empellio/vite-localtunnel'\n\nexport default defineConfig({\n  plugins: [react(), viteLocalTunnel()],\n})\n```\n\nWhen you start Vite you should see:\n\n```\n🌍 Public dev URL: https://abc-123-xyz.loca.lt\n🔑 Localtunnel password: s3cr3t\n```\n\n### What it does\n\n- Determines the dev server port from `server.httpServer.address().port` (fallback to `server.config.server.port`/`5173`).\n- Starts LocalTunnel: `localtunnel({ port })` and logs `🌍 Public dev URL: …`.\n- Extracts the `host` from the URL and adds it to `server.config.server.allowedHosts` (so Vite accepts requests through the tunnel).\n- Fetches `https://loca.lt/mytunnelpassword` and logs `🔑 Localtunnel password: …`.\n- Closes the tunnel when Vite shuts down (`tunnel.close()`).\n\n### API Reference\n\n- `viteLocalTunnel(): Plugin` — zero‑config, works out of the box.\n\n### Notes\n\n- If you already use `server.allowedHosts: true` in `vite.config.ts`, nothing to change — the plugin detects this.\n- LocalTunnel is for development only. Do not use in production.\n\n### Troubleshooting\n\n- If the public URL or password cannot be retrieved, the plugin logs a warning. Check your network/firewall.\n- Some proxies/firewalls can block `https://loca.lt`. Try another network.\n\n### Build\n\nBuild is configured via `tsup` with ESM/CJS outputs and `index.d.ts` generation.\n\n### Changelog\n\n- 0.1.0: Initial release\n","readmeFilename":"README.md"}