{"_id":"@beerpsi/elysia-session","name":"@beerpsi/elysia-session","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@beerpsi/elysia-session","description":"Session plugin for Elysia","version":"0.1.0","author":{"name":"beerpsi","email":"beerpsi@duck.com","url":"https://github.com/beer-psi"},"repository":{"type":"git","url":"git+https://github.com/beer-psi/elysia-session.git"},"main":"dist/cjs/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","type":"module","exports":{"./package.json":"./package.json",".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/cjs/index.cjs"},"./store/bun":{"types":"./dist/store/bun/index.d.ts","bun":"./dist/store/bun/index.js"}},"bugs":{"url":"https://github.com/beer-psi/elysia-session/issues"},"homepage":"https://github.com/beer-psi/elysia-session","keywords":["elysia","session"],"license":"MIT","devDependencies":{"@types/bun":"latest","tsup":"^8.5.0","typescript":"^5"},"peerDependencies":{"elysia":"^1.4.15"},"scripts":{"dev":"bun run --hot example/index.ts","build":"bun build.ts","test":"bun test","release":"pnpm build && pnpm test && pnpm publish --access public"},"_id":"@beerpsi/elysia-session@0.1.0","_integrity":"sha512-zEocBgiBJygnI9irsTGkPF60tuUWrSo6G1A5kjoCZgLpZHMJfhPwG6LsT830nMGSlqgcC3ICY3jEfqXqsyjdfA==","_resolved":"/tmp/627f3b29e777cc37b43e73cc95aac73c/beerpsi-elysia-session-0.1.0.tgz","_from":"file:beerpsi-elysia-session-0.1.0.tgz","_nodeVersion":"25.1.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-zEocBgiBJygnI9irsTGkPF60tuUWrSo6G1A5kjoCZgLpZHMJfhPwG6LsT830nMGSlqgcC3ICY3jEfqXqsyjdfA==","shasum":"8cf902449a889acd90737be91740b0c7f8b366b9","tarball":"https://registry.npmjs.org/@beerpsi/elysia-session/-/elysia-session-0.1.0.tgz","fileCount":43,"unpackedSize":190123,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCjJo2Okiqi7e383Uoks8Q6fXhB45bNFZhCEd/mr5LKOgIgTG9MPcIyE8D3CkRoSrCXBGDoHfwm7JksaqfS3Wp+lVY="}]},"_npmUser":{"name":"beerpsi","email":"beerpsi@duck.com"},"directories":{},"maintainers":[{"name":"beerpsi","email":"beerpsi@duck.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/elysia-session_0.1.0_1762615954076_0.05151359090732699"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-08T15:32:33.974Z","0.1.0":"2025-11-08T15:32:34.304Z","modified":"2025-11-08T15:32:34.608Z"},"maintainers":[{"name":"beerpsi","email":"beerpsi@duck.com"}],"description":"Session plugin for Elysia","homepage":"https://github.com/beer-psi/elysia-session","keywords":["elysia","session"],"repository":{"type":"git","url":"git+https://github.com/beer-psi/elysia-session.git"},"author":{"name":"beerpsi","email":"beerpsi@duck.com","url":"https://github.com/beer-psi"},"bugs":{"url":"https://github.com/beer-psi/elysia-session/issues"},"license":"MIT","readme":"# elysia-session\n\nSession plugin for [Elysia](https://github.com/elysiajs/elysia). See the [example](example/index.ts).\n\n## Configuration\n\n```typescript\ninterface SessionOptions<\n    TStore extends Store,\n    Schema extends TObject | undefined = undefined,\n> {\n    /**\n     * The session store implementation.\n     */\n    store: TStore;\n\n    /**\n     * Type strict validation for session data. Session data is validated at:\n     * - session load time, for existing sessions\n     * - session save time, if the session will be saved (see {@link alwaysSave} and {@link saveUninitialized})\n     *\n     * New sessions are not validated.\n     */\n    schema?: Schema;\n\n    /**\n     * The name of the session cookie.\n     */\n    name?: string;\n\n    /**\n     * The function used to generate the session ID.\n     */\n    generateSessionId?: () => string;\n\n    /**\n     * Force the session to be saved back to the store, even if it was never modified\n     * during the request.\n     */\n    alwaysSave?: boolean;\n\n    /**\n     * Whether to save \"uninitialized\" sessions to the store.\n     */\n    saveUninitialized?: boolean;\n\n    /**\n     * Additional session cookie options. See [Elysia's cookie configuration](https://elysiajs.com/patterns/cookie.html#config)\n     * for details.\n     */\n    cookieOptions?: Omit<CookieOptions, \"value\">;\n}\n```\n\n## Session store\n\nSession stores must adhere to the [`Store`](src/store/index.ts) interface. For example\nimplementations, see stores based on Bun's [`RedisClient`](src/store/bun/redis.ts) and\n[`SQL`](src/store/bun/sql.ts).\n","readmeFilename":"README.md","_rev":"1-d271be6e22f0e9904c81f1cbad3114ba"}