@faasjs/http 0.0.2-beta.386 → 0.0.2-beta.387
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.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -496,6 +496,8 @@ var Http = class {
|
|
|
496
496
|
"Cache-Control": "no-cache, no-store"
|
|
497
497
|
}, this.cookie.headers(), this.response.headers);
|
|
498
498
|
data.response = __spreadValues(__spreadValues({}, data.response), this.response);
|
|
499
|
+
const originBody = data.response.body;
|
|
500
|
+
data.response.originBody = originBody;
|
|
499
501
|
if (process.env.FaasMode === "local") {
|
|
500
502
|
this.logger.debug("[onInvoke] Response: %j", data.response);
|
|
501
503
|
return;
|
|
@@ -505,8 +507,6 @@ var Http = class {
|
|
|
505
507
|
const acceptEncoding = this.headers["accept-encoding"] || this.headers["Accept-Encoding"];
|
|
506
508
|
if (!acceptEncoding || !/(br|gzip|deflate)/.test(acceptEncoding))
|
|
507
509
|
return;
|
|
508
|
-
const originBody = data.response.body;
|
|
509
|
-
data.response.originBody = originBody;
|
|
510
510
|
try {
|
|
511
511
|
if (acceptEncoding.includes("br")) {
|
|
512
512
|
data.response.headers["Content-Encoding"] = "br";
|
package/dist/index.mjs
CHANGED
|
@@ -489,6 +489,8 @@ var Http = class {
|
|
|
489
489
|
"Cache-Control": "no-cache, no-store"
|
|
490
490
|
}, this.cookie.headers(), this.response.headers);
|
|
491
491
|
data.response = __spreadValues(__spreadValues({}, data.response), this.response);
|
|
492
|
+
const originBody = data.response.body;
|
|
493
|
+
data.response.originBody = originBody;
|
|
492
494
|
if (process.env.FaasMode === "local") {
|
|
493
495
|
this.logger.debug("[onInvoke] Response: %j", data.response);
|
|
494
496
|
return;
|
|
@@ -498,8 +500,6 @@ var Http = class {
|
|
|
498
500
|
const acceptEncoding = this.headers["accept-encoding"] || this.headers["Accept-Encoding"];
|
|
499
501
|
if (!acceptEncoding || !/(br|gzip|deflate)/.test(acceptEncoding))
|
|
500
502
|
return;
|
|
501
|
-
const originBody = data.response.body;
|
|
502
|
-
data.response.originBody = originBody;
|
|
503
503
|
try {
|
|
504
504
|
if (acceptEncoding.includes("br")) {
|
|
505
505
|
data.response.headers["Content-Encoding"] = "br";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/http",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.387",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@faasjs/func": "^0.0.2-beta.
|
|
26
|
-
"@faasjs/logger": "^0.0.2-beta.
|
|
25
|
+
"@faasjs/func": "^0.0.2-beta.387",
|
|
26
|
+
"@faasjs/logger": "^0.0.2-beta.387"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"tsup": "*",
|