@wooksjs/event-http 0.7.12 → 0.7.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -731,10 +731,10 @@ function renderCookie(key, data) {
731
731
  return `${key}=${encodeURIComponent(data.value)}${attrs}`;
732
732
  }
733
733
  const cookieAttrFunc = {
734
- expires: (v) => `Expires=${typeof v === "string" || typeof v === "number" ? new Date(v).toUTCString() : v.toUTCString()}`,
735
- maxAge: (v) => `Max-Age=${convertTime(v, "s").toString()}`,
736
- domain: (v) => `Domain=${sanitizeCookieAttrValue(String(v))}`,
737
- path: (v) => `Path=${sanitizeCookieAttrValue(String(v))}`,
734
+ expires: (v) => v === void 0 ? "" : `Expires=${typeof v === "string" || typeof v === "number" ? new Date(v).toUTCString() : v.toUTCString()}`,
735
+ maxAge: (v) => v === void 0 ? "" : `Max-Age=${convertTime(v, "s").toString()}`,
736
+ domain: (v) => v === void 0 ? "" : `Domain=${sanitizeCookieAttrValue(String(v))}`,
737
+ path: (v) => v === void 0 ? "" : `Path=${sanitizeCookieAttrValue(String(v))}`,
738
738
  secure: (v) => v ? "Secure" : "",
739
739
  httpOnly: (v) => v ? "HttpOnly" : "",
740
740
  sameSite: (v) => v ? `SameSite=${typeof v === "string" ? v : "Strict"}` : ""
@@ -1457,7 +1457,7 @@ function escapeHtml(value) {
1457
1457
  //#endregion
1458
1458
  //#region packages/event-http/src/response/wooks-http-response.ts
1459
1459
  let framework = {
1460
- version: "0.7.11",
1460
+ version: "0.7.12",
1461
1461
  poweredBy: "wooksjs",
1462
1462
  link: "https://wooks.moost.org/",
1463
1463
  image: "https://wooks.moost.org/wooks-full-logo.svg"
package/dist/index.mjs CHANGED
@@ -702,10 +702,10 @@ function renderCookie(key, data) {
702
702
  return `${key}=${encodeURIComponent(data.value)}${attrs}`;
703
703
  }
704
704
  const cookieAttrFunc = {
705
- expires: (v) => `Expires=${typeof v === "string" || typeof v === "number" ? new Date(v).toUTCString() : v.toUTCString()}`,
706
- maxAge: (v) => `Max-Age=${convertTime(v, "s").toString()}`,
707
- domain: (v) => `Domain=${sanitizeCookieAttrValue(String(v))}`,
708
- path: (v) => `Path=${sanitizeCookieAttrValue(String(v))}`,
705
+ expires: (v) => v === void 0 ? "" : `Expires=${typeof v === "string" || typeof v === "number" ? new Date(v).toUTCString() : v.toUTCString()}`,
706
+ maxAge: (v) => v === void 0 ? "" : `Max-Age=${convertTime(v, "s").toString()}`,
707
+ domain: (v) => v === void 0 ? "" : `Domain=${sanitizeCookieAttrValue(String(v))}`,
708
+ path: (v) => v === void 0 ? "" : `Path=${sanitizeCookieAttrValue(String(v))}`,
709
709
  secure: (v) => v ? "Secure" : "",
710
710
  httpOnly: (v) => v ? "HttpOnly" : "",
711
711
  sameSite: (v) => v ? `SameSite=${typeof v === "string" ? v : "Strict"}` : ""
@@ -1428,7 +1428,7 @@ function escapeHtml(value) {
1428
1428
  //#endregion
1429
1429
  //#region packages/event-http/src/response/wooks-http-response.ts
1430
1430
  let framework = {
1431
- version: "0.7.11",
1431
+ version: "0.7.12",
1432
1432
  poweredBy: "wooksjs",
1433
1433
  link: "https://wooks.moost.org/",
1434
1434
  image: "https://wooks.moost.org/wooks-full-logo.svg"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wooksjs/event-http",
3
- "version": "0.7.12",
3
+ "version": "0.7.13",
4
4
  "description": "@wooksjs/event-http",
5
5
  "keywords": [
6
6
  "api",
@@ -42,14 +42,14 @@
42
42
  "devDependencies": {
43
43
  "typescript": "^5.9.3",
44
44
  "vitest": "^3.2.4",
45
- "@wooksjs/event-core": "^0.7.12",
46
- "wooks": "^0.7.12"
45
+ "@wooksjs/event-core": "^0.7.13",
46
+ "wooks": "^0.7.13"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@prostojs/logger": "^0.4.3",
50
50
  "@prostojs/router": "^0.3.4",
51
- "@wooksjs/event-core": "^0.7.12",
52
- "wooks": "^0.7.12"
51
+ "wooks": "^0.7.13",
52
+ "@wooksjs/event-core": "^0.7.13"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "rolldown -c ../../rolldown.config.mjs"