apache-js-workers
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -61,2 +61,6 @@ "use strict"; | ||
Res.prototype.send = function (body) { | ||
worker_threads_1.parentPort.postMessage({ | ||
type: 'set-status-code', | ||
statusCode: this.statusCode | ||
}); | ||
worker_threads_1.parentPort.postMessage({ type: 'response', body: body }); | ||
@@ -63,0 +67,0 @@ }; |
@@ -73,3 +73,3 @@ import { workerData, parentPort } from 'worker_threads' | ||
writeHead(statusCode: number, headers: { [ keys: string ]: string }) { | ||
writeHead(statusCode: number, headers?: { [ keys: string ]: string }) { | ||
this.addHeaders(headers) | ||
@@ -86,2 +86,7 @@ this.statusCode = statusCode | ||
send(body?: any) { | ||
parentPort.postMessage({ | ||
type: 'set-status-code', | ||
statusCode: this.statusCode | ||
} as SetStatusCodeMessage) | ||
parentPort.postMessage({ type: 'response', body } as ResponseMessage) | ||
@@ -88,0 +93,0 @@ } |
{ | ||
"name": "apache-js-workers", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
6617
167