Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@elysiajs/cookie

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elysiajs/cookie - npm Package Compare versions

Comparing version 0.1.1 to 0.3.0-rc.3

3

dist/index.d.ts

@@ -15,3 +15,3 @@ import type { Elysia } from 'elysia';

export declare const cookie: ({ signed, secret: secretKey, ...defaultOptions }?: CookieOptions) => (app: Elysia) => Elysia<{
store: Record<any, any> & Record<typeof import("elysia").SCHEMA, {}> & Record<typeof import("elysia").DEFS, {}>;
store: Record<string, unknown>;
request: {

@@ -27,3 +27,4 @@ unsignCookie: (value: string) => {

schema: {};
meta: Record<typeof import("elysia").SCHEMA, {}> & Record<typeof import("elysia").DEFS, {}> & Record<typeof import("elysia").EXPOSED, {}>;
}>;
export default cookie;

@@ -30,3 +30,3 @@ import { serialize, parse } from 'cookie';

}))
.inject((context) => {
.derive((context) => {
let _cookie;

@@ -55,3 +55,3 @@ const getCookie = () => {

}
if (!context.set.headers['Set-Cookie'])
if (!Array.isArray(context.set.headers['Set-Cookie']))
context.set.headers['Set-Cookie'] = [];

@@ -58,0 +58,0 @@ context.set.headers['Set-Cookie'].push(serialize(name, value, {

{
"name": "@elysiajs/cookie",
"version": "0.1.1",
"version": "0.3.0-rc.3",
"description": "Plugin for Elysia that add supports for get/set cookie",

@@ -42,3 +42,3 @@ "author": {

"peerDependencies": {
"elysia": ">= 0.2.6"
"elysia": ">= 0.3.0-rc.3"
},

@@ -48,3 +48,3 @@ "devDependencies": {

"bun-types": "^0.5.0",
"elysia": "0.2.6",
"elysia": "0.3.0-rc.4",
"eslint": "^8.26.0",

@@ -51,0 +51,0 @@ "rimraf": "^3.0.2",

@@ -72,3 +72,3 @@ import type { Elysia, Handler } from 'elysia'

})
.inject((context) => {
.derive((context) => {
let _cookie: Record<string, string>

@@ -109,3 +109,3 @@

if (!context.set.headers['Set-Cookie'])
if (!Array.isArray(context.set.headers['Set-Cookie']))
// @ts-ignore

@@ -112,0 +112,0 @@ context.set.headers['Set-Cookie'] = []

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc