structured-fw 1.7.0 → 1.7.1
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.
|
@@ -5,6 +5,7 @@ import path from "node:path";
|
|
|
5
5
|
import { existsSync, readFileSync, ReadStream } from "node:fs";
|
|
6
6
|
import { StructuredError } from "../StructuredError.js";
|
|
7
7
|
import { minimatch } from "minimatch";
|
|
8
|
+
import { Transform } from "node:stream";
|
|
8
9
|
export class RequestContext {
|
|
9
10
|
executionStartedAt = null;
|
|
10
11
|
executionCompletedAt = null;
|
|
@@ -70,7 +71,7 @@ export class RequestContext {
|
|
|
70
71
|
else if (data === undefined || data === null) {
|
|
71
72
|
this.sendResponse('', 'text/plain; charset=utf-8');
|
|
72
73
|
}
|
|
73
|
-
else if (data instanceof ReadStream) {
|
|
74
|
+
else if (data instanceof ReadStream || data instanceof Transform) {
|
|
74
75
|
this.streamingData = true;
|
|
75
76
|
data.once('end', () => {
|
|
76
77
|
this.response.end();
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"type": "module",
|
|
21
21
|
"main": "build/index",
|
|
22
|
-
"version": "1.7.
|
|
22
|
+
"version": "1.7.1",
|
|
23
23
|
"scripts": {
|
|
24
24
|
"develop": "tsc --watch",
|
|
25
25
|
"startDev": "cd build && nodemon --watch '../app/**/*' --watch '../build/**/*' -e js,html,hbs,css index.js",
|