@faasjs/http 0.0.4-beta.15 → 0.0.4-beta.17
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -6
- package/dist/index.mjs +4 -6
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -207,4 +207,4 @@ declare class Http<TParams extends Record<string, any> = any, TCookie extends Re
|
|
|
207
207
|
}
|
|
208
208
|
declare function useHttp<TParams extends Record<string, any> = any, TCookie extends Record<string, string> = any, TSession extends Record<string, string> = any>(config?: HttpConfig<TParams, TCookie, TSession>): UseifyPlugin<Http<TParams, TCookie, TSession>>;
|
|
209
209
|
|
|
210
|
-
export { ContentType, Cookie, CookieOptions, Http, HttpConfig, HttpError, Response, Session, SessionOptions, Validator, ValidatorConfig, ValidatorOptions, ValidatorRuleOptions, useHttp };
|
|
210
|
+
export { ContentType, Cookie, type CookieOptions, Http, type HttpConfig, HttpError, type Response, Session, type SessionOptions, Validator, type ValidatorConfig, type ValidatorOptions, type ValidatorRuleOptions, useHttp };
|
package/dist/index.d.ts
CHANGED
|
@@ -207,4 +207,4 @@ declare class Http<TParams extends Record<string, any> = any, TCookie extends Re
|
|
|
207
207
|
}
|
|
208
208
|
declare function useHttp<TParams extends Record<string, any> = any, TCookie extends Record<string, string> = any, TSession extends Record<string, string> = any>(config?: HttpConfig<TParams, TCookie, TSession>): UseifyPlugin<Http<TParams, TCookie, TSession>>;
|
|
209
209
|
|
|
210
|
-
export { ContentType, Cookie, CookieOptions, Http, HttpConfig, HttpError, Response, Session, SessionOptions, Validator, ValidatorConfig, ValidatorOptions, ValidatorRuleOptions, useHttp };
|
|
210
|
+
export { ContentType, Cookie, type CookieOptions, Http, type HttpConfig, HttpError, type Response, Session, type SessionOptions, Validator, type ValidatorConfig, type ValidatorOptions, type ValidatorRuleOptions, useHttp };
|
package/dist/index.js
CHANGED
|
@@ -82,9 +82,7 @@ var Session = class {
|
|
|
82
82
|
if (signedParts[1] !== digest)
|
|
83
83
|
throw Error("Session Not valid");
|
|
84
84
|
const message = Buffer.from(signedParts[0], "base64").toString();
|
|
85
|
-
const parts = message.split("--").map(
|
|
86
|
-
return Buffer.from(part2, "base64");
|
|
87
|
-
});
|
|
85
|
+
const parts = message.split("--").map((part2) => Buffer.from(part2, "base64"));
|
|
88
86
|
const cipher = crypto.createDecipheriv(
|
|
89
87
|
this.config.cipherName,
|
|
90
88
|
this.secret,
|
|
@@ -180,8 +178,7 @@ var Cookie = class {
|
|
|
180
178
|
headers() {
|
|
181
179
|
if (Object.keys(this.setCookie).length === 0)
|
|
182
180
|
return {};
|
|
183
|
-
|
|
184
|
-
return { "Set-Cookie": Object.values(this.setCookie) };
|
|
181
|
+
return { "Set-Cookie": Object.values(this.setCookie) };
|
|
185
182
|
}
|
|
186
183
|
};
|
|
187
184
|
|
|
@@ -246,7 +243,8 @@ var Validator = class {
|
|
|
246
243
|
throw new HttpError(res);
|
|
247
244
|
}
|
|
248
245
|
throw error;
|
|
249
|
-
}
|
|
246
|
+
}
|
|
247
|
+
if (config.whitelist === "ignore")
|
|
250
248
|
for (const key of diff)
|
|
251
249
|
delete params[key];
|
|
252
250
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -80,9 +80,7 @@ var Session = class {
|
|
|
80
80
|
if (signedParts[1] !== digest)
|
|
81
81
|
throw Error("Session Not valid");
|
|
82
82
|
const message = Buffer.from(signedParts[0], "base64").toString();
|
|
83
|
-
const parts = message.split("--").map(
|
|
84
|
-
return Buffer.from(part2, "base64");
|
|
85
|
-
});
|
|
83
|
+
const parts = message.split("--").map((part2) => Buffer.from(part2, "base64"));
|
|
86
84
|
const cipher = createDecipheriv(
|
|
87
85
|
this.config.cipherName,
|
|
88
86
|
this.secret,
|
|
@@ -178,8 +176,7 @@ var Cookie = class {
|
|
|
178
176
|
headers() {
|
|
179
177
|
if (Object.keys(this.setCookie).length === 0)
|
|
180
178
|
return {};
|
|
181
|
-
|
|
182
|
-
return { "Set-Cookie": Object.values(this.setCookie) };
|
|
179
|
+
return { "Set-Cookie": Object.values(this.setCookie) };
|
|
183
180
|
}
|
|
184
181
|
};
|
|
185
182
|
|
|
@@ -244,7 +241,8 @@ var Validator = class {
|
|
|
244
241
|
throw new HttpError(res);
|
|
245
242
|
}
|
|
246
243
|
throw error;
|
|
247
|
-
}
|
|
244
|
+
}
|
|
245
|
+
if (config.whitelist === "ignore")
|
|
248
246
|
for (const key of diff)
|
|
249
247
|
delete params[key];
|
|
250
248
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/http",
|
|
3
|
-
"version": "0.0.4-beta.
|
|
3
|
+
"version": "0.0.4-beta.17",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@faasjs/func": "0.0.4-beta.
|
|
26
|
-
"@faasjs/logger": "0.0.4-beta.
|
|
25
|
+
"@faasjs/func": "0.0.4-beta.17",
|
|
26
|
+
"@faasjs/logger": "0.0.4-beta.17"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@faasjs/func": "0.0.4-beta.
|
|
30
|
-
"@faasjs/logger": "0.0.4-beta.
|
|
29
|
+
"@faasjs/func": "0.0.4-beta.17",
|
|
30
|
+
"@faasjs/logger": "0.0.4-beta.17"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
33
33
|
"npm": ">=9.0.0",
|