@casterly/express
Advanced tools
Comparing version 0.9.0-alpha.7 to 0.9.0-alpha.8
@@ -41,3 +41,2 @@ "use strict"; | ||
require("./globals"); | ||
var stream_1 = require("stream"); | ||
var core_1 = require("@casterly/core"); | ||
@@ -47,3 +46,3 @@ var createRequestHandler = function () { | ||
return function (req, res, next) { return __awaiter(void 0, void 0, void 0, function () { | ||
var request, responseHeaders, writable, response, _i, _a, key, err_1; | ||
var request, responseHeaders, response, _i, _a, key, err_1; | ||
var _b, _c; | ||
@@ -70,14 +69,6 @@ return __generator(this, function (_d) { | ||
})); | ||
writable = new stream_1.Writable(); | ||
writable.write = res.write.bind(res); | ||
writable.destroy = res.destroy.bind(res); | ||
writable.end = res.end.bind(res); | ||
writable.cork = res.cork.bind(res); | ||
writable.uncork = res.uncork.bind(res); | ||
_d.label = 1; | ||
case 1: | ||
_d.trys.push([1, 3, , 4]); | ||
return [4 /*yield*/, handleRequest(request, responseHeaders, { | ||
responseStream: writable, | ||
})]; | ||
return [4 /*yield*/, handleRequest(request, responseHeaders)]; | ||
case 2: | ||
@@ -97,6 +88,6 @@ response = _d.sent(); | ||
} | ||
else if (typeof response.body === 'object' && 'pipe' in response.body) { | ||
if (response.body !== writable) { | ||
response.body.pipe(res); | ||
} | ||
else if (typeof response.body === 'object' && | ||
'pipe' in response.body && | ||
typeof response.body.pipe === 'function') { | ||
response.body.pipe(res); | ||
if (typeof response.onReadyToStream === 'function') { | ||
@@ -103,0 +94,0 @@ response.onReadyToStream(); |
{ | ||
"name": "@casterly/express", | ||
"version": "0.9.0-alpha.7", | ||
"version": "0.9.0-alpha.8", | ||
"description": "Casterly bindings for Express.js", | ||
@@ -42,8 +42,8 @@ "author": "Lucas Cordeiro <ecdb.lucas@gmail.com>", | ||
"peerDependencies": { | ||
"@casterly/components": "^0.4.0", | ||
"@casterly/components": "^0.9.0-alpha.4", | ||
"express": "^4.17.1", | ||
"react": "^16.9.0 || ^17.0.0", | ||
"react-dom": "^16.9.0 || ^17.0.0", | ||
"react-router": "^6.0.0-beta.0", | ||
"react-router-dom": "^6.0.0-beta.0" | ||
"react-router": "^6.0.0-beta.6", | ||
"react-router-dom": "^6.0.0-beta.6" | ||
}, | ||
@@ -55,5 +55,5 @@ "devDependencies": { | ||
"dependencies": { | ||
"@casterly/core": "^0.9.0-alpha.7" | ||
"@casterly/core": "^0.9.0-alpha.8" | ||
}, | ||
"gitHead": "5c48c031f0ea254eac30ccfec0556c1ddd0f5290" | ||
"gitHead": "ddd170efc32f568b250d43b7939faf1f72c73e2c" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8745
116
- Removed@casterly/components@0.4.5(transitive)