@wooksjs/event-http 0.2.23 → 0.3.0

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/README.md CHANGED
@@ -29,7 +29,7 @@ As a part of `wooks` event processing framework, `@wooksjs/event-http` implement
29
29
  - [@wooksjs/http-static](https://github.com/wooksjs/wooksjs/tree/main/packages/http-static) - to serve static files
30
30
  - [@wooksjs/http-proxy](https://github.com/wooksjs/wooksjs/tree/main/packages/http-proxy) - to proxy requests
31
31
 
32
- ## Install
32
+ ## Installation
33
33
 
34
34
  `npm install wooks @wooksjs/event-http`
35
35
 
package/dist/index.cjs CHANGED
@@ -832,7 +832,7 @@ class HttpErrorRenderer extends BaseHttpResponseRenderer {
832
832
  `<head><title>${data.statusCode} ${httpStatusCodes[data.statusCode]}</title></head>` +
833
833
  `<body><center><h1>${data.statusCode} ${httpStatusCodes[data.statusCode]}</h1></center>` +
834
834
  `<center><h4>${data.message}</h1></center><hr color="#666">` +
835
- `<center style="color: #666;"> Wooks v${"0.2.23"} </center>` +
835
+ `<center style="color: #666;"> Wooks v${"0.3.0"} </center>` +
836
836
  `${keys.length
837
837
  ? `<pre style="${preStyles}">${JSON.stringify(Object.assign(Object.assign({}, data), { statusCode: undefined, message: undefined, error: undefined }), null, ' ')}</pre>`
838
838
  : ''}` +
@@ -1009,7 +1009,7 @@ class WooksHttp extends wooks.WooksAdapterBase {
1009
1009
  return (req, res) => __awaiter(this, void 0, void 0, function* () {
1010
1010
  var _a, _b, _c;
1011
1011
  const { restoreCtx, clearCtx } = createHttpContext({ req, res }, this.mergeEventOptions((_a = this.opts) === null || _a === void 0 ? void 0 : _a.eventOptions));
1012
- const handlers = this.wooks.lookup(req.method, req.url);
1012
+ const { handlers } = this.wooks.lookup(req.method, req.url);
1013
1013
  if (handlers || ((_b = this.opts) === null || _b === void 0 ? void 0 : _b.onNotFound)) {
1014
1014
  try {
1015
1015
  yield this.processHandlers(handlers || [(_c = this.opts) === null || _c === void 0 ? void 0 : _c.onNotFound]);
package/dist/index.mjs CHANGED
@@ -830,7 +830,7 @@ class HttpErrorRenderer extends BaseHttpResponseRenderer {
830
830
  `<head><title>${data.statusCode} ${httpStatusCodes[data.statusCode]}</title></head>` +
831
831
  `<body><center><h1>${data.statusCode} ${httpStatusCodes[data.statusCode]}</h1></center>` +
832
832
  `<center><h4>${data.message}</h1></center><hr color="#666">` +
833
- `<center style="color: #666;"> Wooks v${"0.2.23"} </center>` +
833
+ `<center style="color: #666;"> Wooks v${"0.3.0"} </center>` +
834
834
  `${keys.length
835
835
  ? `<pre style="${preStyles}">${JSON.stringify(Object.assign(Object.assign({}, data), { statusCode: undefined, message: undefined, error: undefined }), null, ' ')}</pre>`
836
836
  : ''}` +
@@ -1007,7 +1007,7 @@ class WooksHttp extends WooksAdapterBase {
1007
1007
  return (req, res) => __awaiter(this, void 0, void 0, function* () {
1008
1008
  var _a, _b, _c;
1009
1009
  const { restoreCtx, clearCtx } = createHttpContext({ req, res }, this.mergeEventOptions((_a = this.opts) === null || _a === void 0 ? void 0 : _a.eventOptions));
1010
- const handlers = this.wooks.lookup(req.method, req.url);
1010
+ const { handlers } = this.wooks.lookup(req.method, req.url);
1011
1011
  if (handlers || ((_b = this.opts) === null || _b === void 0 ? void 0 : _b.onNotFound)) {
1012
1012
  try {
1013
1013
  yield this.processHandlers(handlers || [(_c = this.opts) === null || _c === void 0 ? void 0 : _c.onNotFound]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wooksjs/event-http",
3
- "version": "0.2.23",
3
+ "version": "0.3.0",
4
4
  "description": "@wooksjs/event-http",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -31,9 +31,9 @@
31
31
  "url": "https://github.com/wooksjs/wooksjs/issues"
32
32
  },
33
33
  "peerDependencies": {
34
- "wooks": "0.2.23",
34
+ "wooks": "0.3.0",
35
35
  "@prostojs/router": "^0.1.0",
36
- "@wooksjs/event-core": "0.2.23"
36
+ "@wooksjs/event-core": "0.3.0"
37
37
  },
38
38
  "dependencies": {
39
39
  "@prostojs/logger": "^0.3.6"