New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hattip/session

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hattip/session - npm Package Compare versions

Comparing version 0.0.35-canary.2 to 0.0.35-canary.7

15

dist/index.d.ts
import { RequestContext } from '@hattip/compose';
import { CookieSerializeOptions } from '@hattip/cookie';
import { Awaitable as Awaitable$1 } from 'vitest';

@@ -49,5 +48,5 @@ declare class UnsafeMemorySessionStore implements SessionStore {

interface RedisSessionStoreOptions {
getClient(ctx: RequestContext): Awaitable$1<RedisClient>;
generateId?(): Awaitable$1<string>;
validateId?(id: string): Awaitable$1<boolean>;
getClient(ctx: RequestContext): Awaitable<RedisClient>;
generateId?(): Awaitable<string>;
validateId?(id: string): Awaitable<boolean>;
serializationOptions?: SessionSerializationOptions;

@@ -64,3 +63,3 @@ }

interface KVStore {
get(key: string): Awaitable$1<string | null>;
get(key: string): Awaitable<string | null>;
put(key: string, value: string, options: {

@@ -72,5 +71,5 @@ expirationTtl: number;

interface KvSessionStoreOptions {
getStore(ctx: RequestContext): Awaitable$1<KVStore>;
generateId?(): Awaitable$1<string>;
validateId?(id: string): Awaitable$1<boolean>;
getStore(ctx: RequestContext): Awaitable<KVStore>;
generateId?(): Awaitable<string>;
validateId?(id: string): Awaitable<boolean>;
serializationOptions?: SessionSerializationOptions;

@@ -77,0 +76,0 @@ }

@@ -24,8 +24,9 @@ var __accessCheck = (obj, member, msg) => {

// src/crypto.ts
var { Buffer: Buffer2 } = globalThis;
function fromBase64(input) {
input = input.replace(/-/g, "+").replace(/_/g, "/");
return typeof atob === "function" ? Uint8Array.from(atob(input), (c) => c.charCodeAt(0)) : Buffer.from(input, "base64");
return typeof atob === "function" ? Uint8Array.from(atob(input), (c) => c.charCodeAt(0)) : Buffer2.from(input, "base64");
}
function toBase64(input) {
return (typeof btoa === "function" ? btoa(String.fromCharCode(...input)) : Buffer.from(input).toString("base64")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
return (typeof btoa === "function" ? btoa(String.fromCharCode(...input)) : Buffer2.from(input).toString("base64")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
}

@@ -32,0 +33,0 @@ async function signatureKeyFromSecret(secret) {

{
"name": "@hattip/session",
"version": "0.0.35-canary.2",
"version": "0.0.35-canary.7",
"type": "module",

@@ -23,19 +23,19 @@ "description": "Session management for HatTip",

"dependencies": {
"@hattip/cookie": "0.0.35-canary.2",
"@hattip/compose": "0.0.35-canary.2",
"@hattip/core": "0.0.35-canary.2"
"@hattip/compose": "0.0.35-canary.7",
"@hattip/cookie": "0.0.35-canary.7",
"@hattip/core": "0.0.35-canary.7"
},
"devDependencies": {
"@cyco130/eslint-config": "^3.3.0",
"@cyco130/eslint-config": "^3.3.2",
"@miniflare/kv": "^2.14.0",
"@miniflare/storage-memory": "^2.14.0",
"@types/node": "^20.4.2",
"@types/node": "^20.5.0",
"@types/redis-mock": "^0.17.1",
"eslint": "^8.45.0",
"publint": "^0.1.16",
"eslint": "^8.47.0",
"publint": "^0.2.0",
"redis-mock": "^0.56.3",
"tsup": "^7.1.0",
"tsup": "^7.2.0",
"typescript": "^5.1.6",
"vitest": "^0.33.0",
"@hattip/polyfills": "0.0.35-canary.2"
"vitest": "^0.34.1",
"@hattip/polyfills": "0.0.35-canary.7"
},

@@ -42,0 +42,0 @@ "scripts": {

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