{"_id":"@enfyra/sdk-nuxt","_rev":"94-7c0b3bfdf4eb3c9c9a99b10873457dc4","name":"@enfyra/sdk-nuxt","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@enfyra/sdk-nuxt","version":"1.0.0","_id":"@enfyra/sdk-nuxt@1.0.0","maintainers":[{"name":"dothinh","email":"dothinh115@gmail.com"}],"dist":{"shasum":"39064bf0d85405766aea2488793dc4bbb7407519","tarball":"https://registry.npmjs.org/@enfyra/sdk-nuxt/-/sdk-nuxt-1.0.0.tgz","fileCount":19,"integrity":"sha512-2+sivBHjNki4Nsxi/yJCEmpGDoeULOoojYeTnBKEzaJdEXIkmxe2cdJRzhbKq4kGfhZznXE6sK9E/GyQ3n7kag==","signatures":[{"sig":"MEYCIQDHCtdH0Hx+AbkbI6beoPXQ3jr92mvJmubIIFMn5eM+zwIhAPQhP1oEvdisxJ72enJqenfiqA4H3w+X7vdIw16V6F49","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20886},"main":"./dist/module.mjs","type":"module","types":"./dist/module.d.ts","module":"./dist/module.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/module.d.ts","import":"./dist/module.mjs"}},"scripts":{"test":"vitest run","build":"unbuild","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dothinh","email":"dothinh115@gmail.com"},"_npmVersion":"11.13.0","description":"Nuxt module for Enfyra — SSR-safe client, composables, and cookie bridge proxy","directories":{},"_nodeVersion":"24.17.0","dependencies":{"@nuxt/kit":"^3.12.0","@enfyra/sdk-core":"0.1.9"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.4.0","vitest":"^3.0.9","unbuild":"^3.5.0","typescript":"^5.8.2","@types/node":"^22.13.10","@nuxt/schema":"^3.12.0"},"peerDependencies":{"nuxt":">=3.12.0 <5"},"_npmOperationalInternal":{"tmp":"tmp/sdk-nuxt_1.0.0_1785496580354_0.7155365436315562","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@enfyra/sdk-nuxt","version":"1.0.1","_id":"@enfyra/sdk-nuxt@1.0.1","maintainers":[{"name":"dothinh","email":"dothinh115@gmail.com"}],"dist":{"shasum":"2f5b88701c3f2e216f5fbd1abe64232ae31082c9","tarball":"https://registry.npmjs.org/@enfyra/sdk-nuxt/-/sdk-nuxt-1.0.1.tgz","fileCount":19,"integrity":"sha512-v68dOWYrX9zz/6hBCJFJiWZ1hFHW0KX2E29BHVgtN/nbsnznt4UQD1bp9AxmsG/0THZ/uX4Stbf6iRCxllpOwA==","signatures":[{"sig":"MEYCIQCBrPqoN2wJLTcwONjgvMXwxnrTGr2hK7i3Sln+iGbdeQIhAPWiKnu0tesdtYVP7ok1CDxsf34AK6Y8s+N8Q0HqCxqV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20887},"main":"./dist/module.mjs","type":"module","types":"./dist/module.d.ts","module":"./dist/module.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/module.d.ts","import":"./dist/module.mjs"}},"scripts":{"test":"vitest run","build":"unbuild","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dothinh","email":"dothinh115@gmail.com"},"_npmVersion":"11.13.0","description":"Nuxt module for Enfyra — SSR-safe client, composables, and cookie bridge proxy","directories":{},"_nodeVersion":"24.17.0","dependencies":{"@nuxt/kit":"^3.12.0","@enfyra/sdk-core":"0.1.10"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.4.0","vitest":"^3.0.9","unbuild":"^3.5.0","typescript":"^5.8.2","@types/node":"^22.13.10","@nuxt/schema":"^3.12.0"},"peerDependencies":{"nuxt":">=3.12.0 <5"},"_npmOperationalInternal":{"tmp":"tmp/sdk-nuxt_1.0.1_1785498488110_0.5945568304430482","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@enfyra/sdk-nuxt","version":"1.0.2","_id":"@enfyra/sdk-nuxt@1.0.2","maintainers":[{"name":"dothinh","email":"dothinh115@gmail.com"}],"dist":{"shasum":"5af4dc55a10f15a2bf22201335a0e68f3ca60a33","tarball":"https://registry.npmjs.org/@enfyra/sdk-nuxt/-/sdk-nuxt-1.0.2.tgz","fileCount":19,"integrity":"sha512-6sR6THSw/V876QDR1Ua0od2aaStVNssCFJGvyFgmwZuI8o1GWSOXUfOfv6TKoINi5PB5vbfqZDrpt0iSvp2AEQ==","signatures":[{"sig":"MEUCIQDvWgp+TY1UhdwPcWGIXgmKAmDEyptQJbHXevlXMFQJegIgNwdBH0N/qNGQE3M4muHIqgHFWLsxy9tvw+PP0/Usilc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21318},"main":"./dist/module.mjs","type":"module","types":"./dist/module.d.ts","module":"./dist/module.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/module.d.ts","import":"./dist/module.mjs"}},"gitHead":"03b088fa846c4529a86e6dee07bbe5bda40df0b8","scripts":{"test":"vitest run","build":"unbuild","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dothinh","email":"dothinh115@gmail.com"},"_npmVersion":"11.13.0","description":"Nuxt module for Enfyra — SSR-safe client, composables, and cookie bridge proxy","directories":{},"_nodeVersion":"24.17.0","dependencies":{"@nuxt/kit":"^3.12.0","@enfyra/sdk-core":"0.1.10"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.4.0","vitest":"^3.0.9","unbuild":"^3.5.0","typescript":"^5.8.2","@types/node":"^22.13.10","@nuxt/schema":"^3.12.0"},"peerDependencies":{"nuxt":">=3.12.0 <5"},"_npmOperationalInternal":{"tmp":"tmp/sdk-nuxt_1.0.2_1785507206099_0.9773858948956706","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@enfyra/sdk-nuxt","version":"1.0.3","license":"MIT","_id":"@enfyra/sdk-nuxt@1.0.3","maintainers":[{"name":"dothinh","email":"dothinh115@gmail.com"}],"dist":{"shasum":"b34ce5cafc27e2e78f16abef0ae0df0cdcddeb32","tarball":"https://registry.npmjs.org/@enfyra/sdk-nuxt/-/sdk-nuxt-1.0.3.tgz","fileCount":20,"integrity":"sha512-0UfC44AdVHdXy3j2z+yR/DjVPtpybeIDQjSTxfqPlbcMJVe0DqsciSVtUh12od86bgs90Qn7ozV5ZLHGgFBp3w==","signatures":[{"sig":"MEUCIQCfSekv0fr6oPuJ4RgRw94LdzRaXukcK0zRo9Uy9tzzEwIgOpnnovZPC6oQoLl0h91w8nHqeKz3Zuqlk3/0vCylhAs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23575},"main":"./dist/module.mjs","type":"module","types":"./dist/module.d.ts","module":"./dist/module.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/module.d.ts","import":"./dist/module.mjs"}},"gitHead":"6ab58c05d7c09fa2ad8c19a648b1f41bb40bf38a","scripts":{"test":"vitest run","build":"unbuild","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dothinh","email":"dothinh115@gmail.com"},"_npmVersion":"11.13.0","description":"Nuxt module for Enfyra — SSR-safe client, composables, and cookie bridge proxy","directories":{},"_nodeVersion":"24.17.0","dependencies":{"@nuxt/kit":"^3.12.0","@enfyra/sdk-core":"0.1.11"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.4.0","vitest":"^3.0.9","unbuild":"^3.5.0","typescript":"^5.8.2","@types/node":"^22.13.10","@nuxt/schema":"^3.12.0"},"peerDependencies":{"nuxt":">=3.12.0 <5"},"_npmOperationalInternal":{"tmp":"tmp/sdk-nuxt_1.0.3_1787022051787_0.7855444661069886","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@enfyra/sdk-nuxt","version":"1.0.4","license":"MIT","_id":"@enfyra/sdk-nuxt@1.0.4","maintainers":[{"name":"dothinh","email":"dothinh115@gmail.com"}],"dist":{"shasum":"8ae9069c560f587b2b12ee01807df51f50395346","tarball":"https://registry.npmjs.org/@enfyra/sdk-nuxt/-/sdk-nuxt-1.0.4.tgz","fileCount":20,"integrity":"sha512-K/GDRTzZsvmSw7JKDH0gNRRoBxys5pp+Ocpz1ViNX181IFIVB9XjhuzaDidCR8kz96zLtV3YjHVpfWieLVNA7A==","signatures":[{"sig":"MEQCIFdrHID1DCgt0gOOnMkQ2B3+mEv8AfzxpNUtBP7k9bNSAiBfxGom9xIR31aHi06tfRdtImiDnb2BuVncmiZ62p0wLw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23575},"main":"./dist/module.mjs","type":"module","types":"./dist/module.d.ts","module":"./dist/module.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/module.d.ts","import":"./dist/module.mjs"}},"gitHead":"2e2a8370e983baf7cfc7440d438793f4ced4b6c2","scripts":{"test":"vitest run","build":"unbuild","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dothinh","email":"dothinh115@gmail.com"},"_npmVersion":"11.6.0","description":"Nuxt module for Enfyra — SSR-safe client, composables, and cookie bridge proxy","directories":{},"_nodeVersion":"24.9.0","dependencies":{"@nuxt/kit":"^3.12.0","@enfyra/sdk-core":"0.1.12"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.4.0","vitest":"^3.0.9","unbuild":"^3.5.0","typescript":"^5.8.2","@types/node":"^22.13.10","@nuxt/schema":"^3.12.0"},"peerDependencies":{"nuxt":">=3.12.0 <5"},"_npmOperationalInternal":{"tmp":"tmp/sdk-nuxt_1.0.4_1787456255120_0.9475420487125705","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"_id":"@enfyra/sdk-nuxt@1.0.5","dist":{"shasum":"632e9ec721a9c825888653076cd8ad12d7a487c2","tarball":"https://registry.npmjs.org/@enfyra/sdk-nuxt/-/sdk-nuxt-1.0.5.tgz","fileCount":22,"integrity":"sha512-PGgXyFG0FAI5kl3wqyb0QEbxvLgIkWNkjrX9D+tv0N2RgqSGVSo+lsCjl7sdCJmcYDrXGM3v8BhJUio6BOkJxA==","signatures":[{"sig":"MEUCIQCSoSzY6IF0eOech9vNCsmVmGKNGYCLO17V85vbYlP8LQIgNQgKlIFBWp4WL1e/2KpHSvPsJoBVXnpsCMr43O0ZdiA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDz9hOAa0VUG5amLSJGALoJPX/GpY4KWHwS7Ef/bJMltAiAaTP3vBTuianiZ/8YugkLRwZoPWlgM/691bRvq/RXCiw=="}],"unpackedSize":27143},"main":"./dist/module.mjs","name":"@enfyra/sdk-nuxt","type":"module","types":"./dist/module.d.ts","module":"./dist/module.mjs","engines":{"node":">=22.19.0"},"exports":{".":{"types":"./dist/module.d.ts","import":"./dist/module.mjs"}},"gitHead":"14d59328092cc27068a2d79f9baf5a216061a309","license":"MIT","scripts":{"test":"vitest run","build":"unbuild","typecheck":"tsc --noEmit"},"version":"1.0.5","_npmUser":{"name":"dothinh","email":"dothinh115@gmail.com"},"_npmVersion":"11.13.0","description":"Nuxt module for Enfyra — SSR-safe client, composables, and cookie bridge proxy","directories":{},"maintainers":[{"name":"dothinh","email":"dothinh115@gmail.com"}],"_nodeVersion":"24.17.0","dependencies":{"h3":"^1.15.11","undici":"^8.10.0","@nuxt/kit":"^3.12.0","@enfyra/sdk-core":"0.1.12"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.4.0","vitest":"^3.0.9","unbuild":"^3.5.0","typescript":"^5.8.2","@types/node":"^22.13.10","@nuxt/schema":"^3.12.0"},"peerDependencies":{"nuxt":">=3.12.0 <5"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk-nuxt_1.0.5_1790496389968_0.7693154273190168"}}},"time":{"created":"2026-07-31T11:16:20.119Z","modified":"2026-09-27T08:06:30.255Z","0.1.0":"2025-08-31T18:06:12.140Z","0.1.1":"2025-08-31T18:06:40.081Z","0.1.2":"2025-08-31T18:10:36.676Z","0.1.3":"2025-08-31T18:30:07.399Z","0.1.4":"2025-08-31T18:41:53.345Z","0.1.5":"2025-08-31T19:14:45.011Z","0.1.6":"2025-08-31T19:17:16.422Z","0.1.7":"2025-08-31T19:26:21.150Z","0.1.8":"2025-08-31T19:34:07.520Z","0.1.9":"2025-08-31T20:01:33.574Z","0.1.10":"2025-08-31T20:11:01.909Z","0.1.11":"2025-08-31T21:27:41.690Z","0.1.12":"2025-08-31T23:08:31.947Z","0.1.13":"2025-08-31T23:42:23.379Z","0.2.0":"2025-09-01T02:30:04.397Z","0.2.1":"2025-09-01T02:46:40.598Z","0.2.2":"2025-09-01T03:07:05.678Z","0.2.3":"2025-09-01T03:32:22.147Z","0.2.4":"2025-09-01T12:10:51.639Z","0.3.0":"2025-09-01T23:14:10.728Z","0.3.1":"2025-09-01T23:41:33.993Z","0.3.2":"2025-09-04T02:29:39.279Z","0.3.3":"2025-09-04T12:03:20.094Z","0.3.4":"2025-09-04T12:07:17.799Z","0.3.5":"2025-09-04T12:09:58.482Z","0.3.6":"2025-09-04T12:14:46.045Z","0.3.7":"2025-09-13T12:43:17.341Z","0.3.8":"2025-10-13T02:23:42.116Z","0.3.9":"2025-11-20T06:57:39.910Z","0.3.10":"2025-11-20T07:01:48.514Z","0.3.11":"2025-11-28T23:48:10.144Z","0.3.12":"2025-12-03T11:04:18.531Z","0.3.13":"2025-12-05T14:20:12.357Z","0.3.14":"2025-12-05T18:07:33.865Z","0.3.15":"2025-12-06T17:19:55.007Z","0.3.16":"2025-12-06T17:32:14.470Z","0.3.17":"2025-12-06T17:40:50.559Z","0.3.18":"2025-12-06T17:54:40.822Z","0.3.19":"2025-12-06T18:39:11.670Z","0.3.20":"2025-12-06T18:54:01.052Z","0.3.21":"2025-12-07T00:36:54.340Z","0.3.22":"2025-12-14T08:26:52.787Z","0.3.23":"2025-12-14T09:08:37.479Z","0.3.24":"2025-12-14T11:36:38.718Z","0.3.25":"2025-12-19T03:32:26.456Z","0.3.26":"2026-01-23T18:04:27.131Z","0.3.28":"2026-01-23T18:17:58.796Z","0.3.29":"2026-01-23T18:19:16.273Z","0.3.30":"2026-01-23T18:20:15.303Z","0.4.0":"2026-01-23T18:31:15.600Z","0.4.1":"2026-01-23T18:48:50.476Z","0.4.2":"2026-01-23T18:56:53.019Z","0.4.3":"2026-01-23T19:33:24.686Z","0.4.5":"2026-01-23T19:44:06.668Z","0.5.0":"2026-01-23T20:06:48.067Z","0.6.0":"2026-01-23T20:11:51.449Z","0.6.1":"2026-02-06T11:46:48.360Z","0.6.2":"2026-03-03T14:54:47.713Z","0.6.3":"2026-03-03T17:02:39.090Z","0.7.0":"2026-03-04T13:43:26.060Z","0.7.1":"2026-03-04T13:48:19.815Z","0.7.2":"2026-03-05T15:59:11.794Z","0.7.3":"2026-03-05T18:55:06.728Z","0.7.4":"2026-03-06T12:59:05.106Z","0.7.5":"2026-03-06T16:19:30.130Z","0.7.6":"2026-03-10T14:11:16.345Z","0.7.7":"2026-03-11T11:40:12.701Z","0.7.8":"2026-03-14T13:13:52.475Z","1.0.0":"2026-07-31T11:16:20.491Z","1.0.1":"2026-07-31T11:48:08.260Z","1.0.2":"2026-07-31T14:13:26.251Z","1.0.3":"2026-08-18T03:00:51.916Z","1.0.4":"2026-08-23T03:37:35.271Z","1.0.5":"2026-09-27T08:06:30.055Z"},"license":"MIT","description":"Nuxt module for Enfyra — SSR-safe client, composables, and cookie bridge proxy","maintainers":[{"name":"dothinh","email":"dothinh115@gmail.com"}],"readme":"# @enfyra/sdk-nuxt\n\nNuxt 3/4 module for Enfyra. Cookie-bridge auth, SSR-safe request-scoped client, and auto-imported composables. Requires Node.js 22.19 or newer.\n\n## Install\n\n```bash\nyarn add @enfyra/sdk-nuxt @enfyra/sdk-core\n```\n\nSet `ENFYRA_APP_URL` in your environment — that's it:\n\n```dotenv\nENFYRA_APP_URL=https://admin.example.com\n```\n\n```ts\nexport default defineNuxtConfig({\n  modules: ['@enfyra/sdk-nuxt'],\n})\n```\n\nIf you prefer config over env (e.g. for multi-tenant or per-environment overrides), set `enfyra.appUrl` instead — it takes precedence over the env var:\n\n```ts\nexport default defineNuxtConfig({\n  modules: ['@enfyra/sdk-nuxt'],\n  enfyra: {\n    appUrl: 'https://admin.example.com',\n  },\n})\n```\n\nNo plugin, server middleware, route rule, or cookie handler needs to be written manually.\n\n## Options\n\nAll options are optional. `appUrl` falls back to `ENFYRA_APP_URL` when omitted.\n\n| Option | Type | Default | Notes |\n|---|---|---|---|\n| `appUrl` | `string` | `process.env.ENFYRA_APP_URL` | Server-only. Overrides the env var when set. |\n| `routePrefix` | `string` | `'/enfyra'` | Exposed to browser as the cookie-bridge proxy prefix. |\n| `proxy.headersTimeout` | `number` | `300000` | Maximum milliseconds to wait for upstream response headers. Set to `0` to disable. |\n| `proxy.bodyTimeout` | `number` | `300000` | Maximum milliseconds of inactivity between upstream response body chunks. Set to `0` to disable. |\n\nThe proxy defaults can be overridden per application without changing the process-wide fetch dispatcher:\n\n```ts\nexport default defineNuxtConfig({\n  modules: ['@enfyra/sdk-nuxt'],\n  enfyra: {\n    proxy: {\n      headersTimeout: 650_000,\n      bodyTimeout: 650_000,\n    },\n  },\n})\n```\n\n## Composables\n\nAll composables are auto-imported — no manual imports needed.\n\n### useEnfyra\n\nReturns the `EnfyraClient` instance for direct API access.\n\n```ts\nconst client = useEnfyra()\nconst { data } = await client.get('/projects')\n```\n\n### useAuth\n\n```ts\nconst { user, isAuthenticated, pending, login, logout, refresh, oauthLogin } = useAuth()\n\nawait login({ email: 'user@example.com', password: '...' })\noauthLogin('google')\n```\n\n### useQuery / useMutation\n\n```ts\nconst { data, error, pending, meta, refresh } = useQuery('articles', {\n  select: 'id,title,status',\n  filter: { status: { _eq: 'published' } },\n  limit: 20,\n})\n\nconst { execute, pending: saving } = useMutation('articles')\nawait execute({ data: { title: 'Hello' } })\n```\n\n### useStorage\n\n```ts\nconst { upload, uploading, download, getDownloadUrl, getFolderTree } = useStorage()\nconst file = await upload(fileInput.files[0], { folder: 1 })\n```\n\n### useWebSocket\n\n```ts\nconst ws = useWebSocket('cloud', { immediate: true })\nws.on('cloud:project-changed', (event) => { ... })\n```\n\n## SSR behavior\n\n- One `EnfyraClient` per incoming request; never cached across requests.\n- Forwards the request's `Cookie` and `Authorization` headers to the Enfyra App.\n- Appends rotated `Set-Cookie` headers back to the SSR response.\n- Browser traffic uses the same-origin `/enfyra` proxy with `HttpOnly` cookies.\n\n## What the module does\n\n- Proxies `/${routePrefix}/**` → `${appUrl}/api/**` with manual redirects.\n- Creates a request-scoped client (SSR) or singleton (CSR) via a Nuxt plugin.\n- Auto-imports all composables.\n- Sets `cookieBridgePrefix` for OAuth redirect flows.\n","readmeFilename":"README.md"}