@orpc/server 1.7.8 → 1.7.9
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/helpers/index.d.mts
CHANGED
@@ -68,6 +68,10 @@ interface GetCookieOptions extends ParseOptions {
|
|
68
68
|
* ```
|
69
69
|
*/
|
70
70
|
declare function getCookie(headers: Headers | undefined, name: string, options?: GetCookieOptions): string | undefined;
|
71
|
+
/**
|
72
|
+
* Deletes a cookie by marking it expired.
|
73
|
+
*/
|
74
|
+
declare function deleteCookie(headers: Headers | undefined, name: string, options?: Omit<SetCookieOptions, 'maxAge'>): void;
|
71
75
|
|
72
76
|
/**
|
73
77
|
* Encrypts a string using AES-GCM with a secret key.
|
@@ -126,5 +130,5 @@ declare function sign(value: string, secret: string): Promise<string>;
|
|
126
130
|
*/
|
127
131
|
declare function unsign(signedValue: string | undefined | null, secret: string): Promise<string | undefined>;
|
128
132
|
|
129
|
-
export { decodeBase64url, decrypt, encodeBase64url, encrypt, getCookie, setCookie, sign, unsign };
|
133
|
+
export { decodeBase64url, decrypt, deleteCookie, encodeBase64url, encrypt, getCookie, setCookie, sign, unsign };
|
130
134
|
export type { GetCookieOptions, SetCookieOptions };
|
package/dist/helpers/index.d.ts
CHANGED
@@ -68,6 +68,10 @@ interface GetCookieOptions extends ParseOptions {
|
|
68
68
|
* ```
|
69
69
|
*/
|
70
70
|
declare function getCookie(headers: Headers | undefined, name: string, options?: GetCookieOptions): string | undefined;
|
71
|
+
/**
|
72
|
+
* Deletes a cookie by marking it expired.
|
73
|
+
*/
|
74
|
+
declare function deleteCookie(headers: Headers | undefined, name: string, options?: Omit<SetCookieOptions, 'maxAge'>): void;
|
71
75
|
|
72
76
|
/**
|
73
77
|
* Encrypts a string using AES-GCM with a secret key.
|
@@ -126,5 +130,5 @@ declare function sign(value: string, secret: string): Promise<string>;
|
|
126
130
|
*/
|
127
131
|
declare function unsign(signedValue: string | undefined | null, secret: string): Promise<string | undefined>;
|
128
132
|
|
129
|
-
export { decodeBase64url, decrypt, encodeBase64url, encrypt, getCookie, setCookie, sign, unsign };
|
133
|
+
export { decodeBase64url, decrypt, deleteCookie, encodeBase64url, encrypt, getCookie, setCookie, sign, unsign };
|
130
134
|
export type { GetCookieOptions, SetCookieOptions };
|
package/dist/helpers/index.mjs
CHANGED
@@ -50,6 +50,12 @@ function getCookie(headers, name, options = {}) {
|
|
50
50
|
}
|
51
51
|
return parse(cookieHeader, options)[name];
|
52
52
|
}
|
53
|
+
function deleteCookie(headers, name, options = {}) {
|
54
|
+
return setCookie(headers, name, "", {
|
55
|
+
...options,
|
56
|
+
maxAge: 0
|
57
|
+
});
|
58
|
+
}
|
53
59
|
|
54
60
|
const PBKDF2_CONFIG = {
|
55
61
|
name: "PBKDF2",
|
@@ -179,4 +185,4 @@ async function unsign(signedValue, secret) {
|
|
179
185
|
return isValid ? value : void 0;
|
180
186
|
}
|
181
187
|
|
182
|
-
export { decodeBase64url, decrypt, encodeBase64url, encrypt, getCookie, setCookie, sign, unsign };
|
188
|
+
export { decodeBase64url, decrypt, deleteCookie, encodeBase64url, encrypt, getCookie, setCookie, sign, unsign };
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orpc/server",
|
3
3
|
"type": "module",
|
4
|
-
"version": "1.7.
|
4
|
+
"version": "1.7.9",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -102,14 +102,14 @@
|
|
102
102
|
},
|
103
103
|
"dependencies": {
|
104
104
|
"cookie": "^1.0.2",
|
105
|
-
"@orpc/
|
106
|
-
"@orpc/
|
107
|
-
"@orpc/standard-server": "1.7.
|
108
|
-
"@orpc/standard-server-aws-lambda": "1.7.
|
109
|
-
"@orpc/
|
110
|
-
"@orpc/standard-server-
|
111
|
-
"@orpc/standard-server-
|
112
|
-
"@orpc/standard-server-peer": "1.7.
|
105
|
+
"@orpc/client": "1.7.9",
|
106
|
+
"@orpc/contract": "1.7.9",
|
107
|
+
"@orpc/standard-server": "1.7.9",
|
108
|
+
"@orpc/standard-server-aws-lambda": "1.7.9",
|
109
|
+
"@orpc/shared": "1.7.9",
|
110
|
+
"@orpc/standard-server-fetch": "1.7.9",
|
111
|
+
"@orpc/standard-server-node": "1.7.9",
|
112
|
+
"@orpc/standard-server-peer": "1.7.9"
|
113
113
|
},
|
114
114
|
"devDependencies": {
|
115
115
|
"@types/ws": "^8.18.1",
|