routup 0.1.1 → 0.1.3

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
@@ -62,11 +62,11 @@ router.listen(3000);
62
62
  According to the fact that routup is a minimalistic framework, it depends on plugins to cover some
63
63
  typically http framework functions, which are not integrated in the main package.
64
64
 
65
- | Name | Description |
66
- |-----------------------------------------------------------------------------|------------------------------------------------------------------------|
67
- | [body](https://www.npmjs.com/package/@routup/tree/master/packages/body) | Read and parse the request body. |
68
- | [cookie](https://www.npmjs.com/package/@routup/tree/master/packages/cookie) | Read and parse request cookies and serialize cookies for the response. |
69
- | [query](https://www.npmjs.com/package/@routup/tree/master/packages/query) | Read and parse the query string of the request url. |
65
+ | Name | Description |
66
+ |--------------------------------------------------------|------------------------------------------------------------------------|
67
+ | [body](https://www.npmjs.com/package/@routup/body) | Read and parse the request body. |
68
+ | [cookie](https://www.npmjs.com/package/@routup/cookie) | Read and parse request cookies and serialize cookies for the response. |
69
+ | [query](https://www.npmjs.com/package/@routup/query) | Read and parse the query string of the request url. |
70
70
 
71
71
 
72
72
  ## License
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  export * from './constants';
2
2
  export * from './helpers';
3
3
  export * from './layer';
4
- export * from './router';
4
+ export * from './path';
5
5
  export * from './route';
6
+ export * from './router';
6
7
  export * from './type';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
package/dist/index.js CHANGED
@@ -23,7 +23,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
23
23
  __exportStar(require("./constants"), exports);
24
24
  __exportStar(require("./helpers"), exports);
25
25
  __exportStar(require("./layer"), exports);
26
- __exportStar(require("./router"), exports);
26
+ __exportStar(require("./path"), exports);
27
27
  __exportStar(require("./route"), exports);
28
+ __exportStar(require("./router"), exports);
28
29
  __exportStar(require("./type"), exports);
29
30
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,8CAA4B;AAC5B,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,8CAA4B;AAC5B,4CAA0B;AAC1B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,2CAAyB;AACzB,yCAAuB"}
@@ -82,7 +82,7 @@ class Router {
82
82
  return;
83
83
  }
84
84
  if (typeof err !== 'undefined') {
85
- res.statusCode = 500;
85
+ res.statusCode = 400;
86
86
  res.statusMessage = err.message;
87
87
  res.end();
88
88
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "routup",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Routup is a minimalistic http based routing framework.",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -46,12 +46,11 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@ebec/http": "^0.0.4",
49
- "cookie": "^0.5.0",
50
49
  "etag": "^1.8.1",
51
50
  "mime": "^3.0.0",
52
51
  "negotiator": "^0.6.3",
53
52
  "path-to-regexp": "^6.2.1",
54
53
  "smob": "^0.0.6"
55
54
  },
56
- "gitHead": "b0c55a29be09b483fad27962505c040602c92a0e"
55
+ "gitHead": "073b2771996cde8b9e24af7c4cd69f15a560d830"
57
56
  }