🚀 Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

fami

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

fami - npm Package Compare versions

Comparing version
2.0.3
to
2.0.4
+24
-21
dist/kaito.cjs

@@ -16,3 +16,3 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }

}
head.headers.append("Set-Cookie", header);
return head.headers.append("Set-Cookie", header);
}

@@ -26,23 +26,26 @@ function deleteCookie(name) {

}
head.headers.append("Set-Cookie", header);
return head.headers.append("Set-Cookie", header);
}
return {
..._nullishCoalesce(context, () => ( {})),
get fami() {
return f;
},
get cookies() {
const cookies = Object.freeze(f.parse(req.headers.get("Cookie")));
Object.defineProperties(this, {
cookies: {
value: cookies,
enumerable: true,
configurable: true
}
});
return cookies;
},
setCookie,
deleteCookie
};
function buildContext(input) {
return {
..._nullishCoalesce(input, () => ( {})),
get fami() {
return f;
},
get cookies() {
const cookies = Object.freeze(f.parse(req.headers.get("Cookie")));
Object.defineProperties(this, {
cookies: {
value: cookies,
enumerable: true,
configurable: true
}
});
return cookies;
},
setCookie,
deleteCookie
};
}
return buildContext(context);
};

@@ -49,0 +52,0 @@ }

@@ -30,6 +30,5 @@ import { F as FamiInput, a as Fami, C as CookieValue, b as CookieAttributes, P as PromiseIfSecret } from './fami-CfMv7Vv1.cjs';

}
interface FamiPipeContext<Names extends string, Defs extends FamiInput<Names>> {
<C, P>(context: NoOverlap<C, FamiContext<Names, Defs>> & C, params: P, req: KaitoRequestStub, head: KaitoHeadStub): C & FamiContext<Names, Defs>;
<C, P>(context: C extends null | undefined ? C : never, params: P, req: KaitoRequestStub, head: KaitoHeadStub): FamiContext<Names, Defs>;
}
type FamiPipeInput<C, Names extends string, Defs extends FamiInput<Names>> = C extends null | undefined ? C : NoOverlap<C, FamiContext<Names, Defs>> & C;
type FamiPipeOutput<C, Names extends string, Defs extends FamiInput<Names>> = C extends null | undefined ? FamiContext<Names, Defs> : C & FamiContext<Names, Defs>;
type FamiPipeContext<Names extends string, Defs extends FamiInput<Names>> = <C, P>(context: FamiPipeInput<C, Names, Defs>, params: P, req: KaitoRequestStub, head: KaitoHeadStub) => FamiPipeOutput<C, Names, Defs>;
/**

@@ -64,2 +63,2 @@ * Creates a Kaito context wrapper that includes the Fami instance and cookie management methods.

export { type FamiContext, type FamiPipeContext, type KaitoHeadStub, type KaitoRequestStub, fami };
export { type FamiContext, type FamiPipeContext, type FamiPipeInput, type FamiPipeOutput, type KaitoHeadStub, type KaitoRequestStub, fami };

@@ -30,6 +30,5 @@ import { F as FamiInput, a as Fami, C as CookieValue, b as CookieAttributes, P as PromiseIfSecret } from './fami-CfMv7Vv1.js';

}
interface FamiPipeContext<Names extends string, Defs extends FamiInput<Names>> {
<C, P>(context: NoOverlap<C, FamiContext<Names, Defs>> & C, params: P, req: KaitoRequestStub, head: KaitoHeadStub): C & FamiContext<Names, Defs>;
<C, P>(context: C extends null | undefined ? C : never, params: P, req: KaitoRequestStub, head: KaitoHeadStub): FamiContext<Names, Defs>;
}
type FamiPipeInput<C, Names extends string, Defs extends FamiInput<Names>> = C extends null | undefined ? C : NoOverlap<C, FamiContext<Names, Defs>> & C;
type FamiPipeOutput<C, Names extends string, Defs extends FamiInput<Names>> = C extends null | undefined ? FamiContext<Names, Defs> : C & FamiContext<Names, Defs>;
type FamiPipeContext<Names extends string, Defs extends FamiInput<Names>> = <C, P>(context: FamiPipeInput<C, Names, Defs>, params: P, req: KaitoRequestStub, head: KaitoHeadStub) => FamiPipeOutput<C, Names, Defs>;
/**

@@ -64,2 +63,2 @@ * Creates a Kaito context wrapper that includes the Fami instance and cookie management methods.

export { type FamiContext, type FamiPipeContext, type KaitoHeadStub, type KaitoRequestStub, fami };
export { type FamiContext, type FamiPipeContext, type FamiPipeInput, type FamiPipeOutput, type KaitoHeadStub, type KaitoRequestStub, fami };

@@ -16,3 +16,3 @@ import {

}
head.headers.append("Set-Cookie", header);
return head.headers.append("Set-Cookie", header);
}

@@ -26,23 +26,26 @@ function deleteCookie(name) {

}
head.headers.append("Set-Cookie", header);
return head.headers.append("Set-Cookie", header);
}
return {
...context ?? {},
get fami() {
return f;
},
get cookies() {
const cookies = Object.freeze(f.parse(req.headers.get("Cookie")));
Object.defineProperties(this, {
cookies: {
value: cookies,
enumerable: true,
configurable: true
}
});
return cookies;
},
setCookie,
deleteCookie
};
function buildContext(input) {
return {
...input ?? {},
get fami() {
return f;
},
get cookies() {
const cookies = Object.freeze(f.parse(req.headers.get("Cookie")));
Object.defineProperties(this, {
cookies: {
value: cookies,
enumerable: true,
configurable: true
}
});
return cookies;
},
setCookie,
deleteCookie
};
}
return buildContext(context);
};

@@ -49,0 +52,0 @@ }

{
"name": "fami",
"version": "2.0.3",
"version": "2.0.4",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Working with cookies shouldn't be complicated or scary.",