hoa 0.1.1 → 0.1.2
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/CHANGELOG.md +5 -0
- package/dist/cjs/application.js +0 -3
- package/dist/cjs/response.js +2 -2
- package/dist/esm/application.js +0 -3
- package/dist/esm/response.js +2 -2
- package/package.json +1 -1
- package/types/index.d.ts +1 -0
package/CHANGELOG.md
CHANGED
package/dist/cjs/application.js
CHANGED
|
@@ -207,9 +207,6 @@ function respond(ctx) {
|
|
|
207
207
|
res.delete("Transfer-Encoding");
|
|
208
208
|
res.set("Content-Length", "0");
|
|
209
209
|
}
|
|
210
|
-
if (!res._explicitStatus) {
|
|
211
|
-
res.status = 404;
|
|
212
|
-
}
|
|
213
210
|
return new Response(null, {
|
|
214
211
|
status: res.status,
|
|
215
212
|
statusText: res.statusText,
|
package/dist/cjs/response.js
CHANGED
|
@@ -147,13 +147,13 @@ class HoaResponse {
|
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Get the response status code.
|
|
150
|
-
* Defaults to
|
|
150
|
+
* Defaults to 404 if not explicitly set.
|
|
151
151
|
*
|
|
152
152
|
* @returns {number} The HTTP status code
|
|
153
153
|
* @public
|
|
154
154
|
*/
|
|
155
155
|
get status() {
|
|
156
|
-
return this._status ||
|
|
156
|
+
return this._status || 404;
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
159
|
* Set the response status code.
|
package/dist/esm/application.js
CHANGED
|
@@ -169,9 +169,6 @@ function respond(ctx) {
|
|
|
169
169
|
res.delete("Transfer-Encoding");
|
|
170
170
|
res.set("Content-Length", "0");
|
|
171
171
|
}
|
|
172
|
-
if (!res._explicitStatus) {
|
|
173
|
-
res.status = 404;
|
|
174
|
-
}
|
|
175
172
|
return new Response(null, {
|
|
176
173
|
status: res.status,
|
|
177
174
|
statusText: res.statusText,
|
package/dist/esm/response.js
CHANGED
|
@@ -125,13 +125,13 @@ class HoaResponse {
|
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
127
|
* Get the response status code.
|
|
128
|
-
* Defaults to
|
|
128
|
+
* Defaults to 404 if not explicitly set.
|
|
129
129
|
*
|
|
130
130
|
* @returns {number} The HTTP status code
|
|
131
131
|
* @public
|
|
132
132
|
*/
|
|
133
133
|
get status() {
|
|
134
|
-
return this._status ||
|
|
134
|
+
return this._status || 404;
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
137
137
|
* Set the response status code.
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -194,6 +194,7 @@ export declare class Application {
|
|
|
194
194
|
constructor(options?: ApplicationOptions);
|
|
195
195
|
|
|
196
196
|
name: string;
|
|
197
|
+
silent?: boolean;
|
|
197
198
|
readonly HoaContext: typeof HoaContext;
|
|
198
199
|
readonly HoaRequest: typeof HoaRequest;
|
|
199
200
|
readonly HoaResponse: typeof HoaResponse;
|