routup 0.10.0 → 0.11.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.
Files changed (51) hide show
  1. package/dist/index.cjs +2 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.mjs +2 -0
  4. package/dist/index.mjs.map +1 -0
  5. package/package.json +19 -6
  6. package/dist/handler/index.js +0 -24
  7. package/dist/handler/index.js.map +0 -1
  8. package/dist/handler/utils.js +0 -29
  9. package/dist/handler/utils.js.map +0 -1
  10. package/dist/index.js +0 -31
  11. package/dist/index.js.map +0 -1
  12. package/dist/layer/index.js +0 -26
  13. package/dist/layer/index.js.map +0 -1
  14. package/dist/layer/module.js +0 -82
  15. package/dist/layer/module.js.map +0 -1
  16. package/dist/layer/type.js +0 -9
  17. package/dist/layer/type.js.map +0 -1
  18. package/dist/layer/utils.js +0 -15
  19. package/dist/layer/utils.js.map +0 -1
  20. package/dist/path/index.js +0 -25
  21. package/dist/path/index.js.map +0 -1
  22. package/dist/path/matcher.js +0 -74
  23. package/dist/path/matcher.js.map +0 -1
  24. package/dist/path/type.js +0 -9
  25. package/dist/path/type.js.map +0 -1
  26. package/dist/route/index.js +0 -26
  27. package/dist/route/index.js.map +0 -1
  28. package/dist/route/module.js +0 -125
  29. package/dist/route/module.js.map +0 -1
  30. package/dist/route/type.js +0 -9
  31. package/dist/route/type.js.map +0 -1
  32. package/dist/route/utils.js +0 -15
  33. package/dist/route/utils.js.map +0 -1
  34. package/dist/router/index.js +0 -25
  35. package/dist/router/index.js.map +0 -1
  36. package/dist/router/module.js +0 -285
  37. package/dist/router/module.js.map +0 -1
  38. package/dist/router/type.js +0 -3
  39. package/dist/router/type.js.map +0 -1
  40. package/dist/type.js +0 -9
  41. package/dist/type.js.map +0 -1
  42. package/dist/utils/index.js +0 -27
  43. package/dist/utils/index.js.map +0 -1
  44. package/dist/utils/is-instance.js +0 -16
  45. package/dist/utils/is-instance.js.map +0 -1
  46. package/dist/utils/path.js +0 -14
  47. package/dist/utils/path.js.map +0 -1
  48. package/dist/utils/promise.js +0 -19
  49. package/dist/utils/promise.js.map +0 -1
  50. package/dist/utils/request.js +0 -32
  51. package/dist/utils/request.js.map +0 -1
@@ -1,27 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2022-2022.
4
- * Author Peter Placzek (tada5hi)
5
- * For the full copyright and license information,
6
- * view the LICENSE file that was distributed with this source code.
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
- };
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- __exportStar(require("./is-instance"), exports);
24
- __exportStar(require("./path"), exports);
25
- __exportStar(require("./promise"), exports);
26
- __exportStar(require("./request"), exports);
27
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,gDAA8B;AAC9B,yCAAuB;AACvB,4CAA0B;AAC1B,4CAA0B"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2022-2022.
4
- * Author Peter Placzek (tada5hi)
5
- * For the full copyright and license information,
6
- * view the LICENSE file that was distributed with this source code.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.isInstance = void 0;
10
- function isInstance(input, name) {
11
- return (typeof input === 'object' &&
12
- input !== null &&
13
- input['@instanceof'] === Symbol.for(name));
14
- }
15
- exports.isInstance = isInstance;
16
- //# sourceMappingURL=is-instance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-instance.js","sourceRoot":"","sources":["../../src/utils/is-instance.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,SAAgB,UAAU,CAAC,KAAc,EAAE,IAAY;IACnD,OAAO,CACH,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACb,KAAmC,CAAC,aAAa,CAAC,KAAK,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAC3E,CAAC;AACN,CAAC;AAND,gCAMC"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2022.
4
- * Author Peter Placzek (tada5hi)
5
- * For the full copyright and license information,
6
- * view the LICENSE file that was distributed with this source code.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.isPath = void 0;
10
- function isPath(input) {
11
- return typeof input === 'string' || input instanceof RegExp;
12
- }
13
- exports.isPath = isPath;
14
- //# sourceMappingURL=path.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/utils/path.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAIH,SAAgB,MAAM,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,MAAM,CAAC;AAChE,CAAC;AAFD,wBAEC"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2022.
4
- * Author Peter Placzek (tada5hi)
5
- * For the full copyright and license information,
6
- * view the LICENSE file that was distributed with this source code.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.isPromise = void 0;
10
- const smob_1 = require("smob");
11
- function isPromise(p) {
12
- return (0, smob_1.isObject)(p) &&
13
- (p instanceof Promise ||
14
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
15
- // @ts-ignore
16
- typeof p.then === 'function');
17
- }
18
- exports.isPromise = isPromise;
19
- //# sourceMappingURL=promise.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"promise.js","sourceRoot":"","sources":["../../src/utils/promise.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+BAAgC;AAEhC,SAAgB,SAAS,CAAC,CAAU;IAChC,OAAO,IAAA,eAAQ,EAAC,CAAC,CAAC;QACd,CACI,CAAC,YAAY,OAAO;YACpB,6DAA6D;YAC7D,aAAa;YACb,OAAO,CAAC,CAAC,IAAI,KAAK,UAAU,CAC/B,CAAC;AACV,CAAC;AARD,8BAQC"}
@@ -1,32 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2022.
4
- * Author Peter Placzek (tada5hi)
5
- * For the full copyright and license information,
6
- * view the LICENSE file that was distributed with this source code.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.createRequestTimeout = void 0;
10
- const http_1 = require("@ebec/http");
11
- /* istanbul ignore next */
12
- function createRequestTimeout(res, timeout, done) {
13
- const instance = setTimeout(() => {
14
- res.statusCode = http_1.GatewayTimeoutErrorOptions.statusCode;
15
- res.statusMessage = http_1.GatewayTimeoutErrorOptions.message;
16
- res.end();
17
- }, timeout);
18
- res.once('close', () => {
19
- clearTimeout(instance);
20
- if (typeof done === 'function') {
21
- done();
22
- }
23
- });
24
- res.once('error', (e) => {
25
- clearTimeout(instance);
26
- if (typeof done === 'function') {
27
- done(e);
28
- }
29
- });
30
- }
31
- exports.createRequestTimeout = createRequestTimeout;
32
- //# sourceMappingURL=request.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/utils/request.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,qCAAwD;AAGxD,0BAA0B;AAC1B,SAAgB,oBAAoB,CAAC,GAAa,EAAE,OAAe,EAAE,IAAW;IAC5E,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,EAAE;QAC7B,GAAG,CAAC,UAAU,GAAG,iCAA0B,CAAC,UAAU,CAAC;QACvD,GAAG,CAAC,aAAa,GAAG,iCAA0B,CAAC,OAAO,CAAC;QAEvD,GAAG,CAAC,GAAG,EAAE,CAAC;IACd,CAAC,EAAE,OAAO,CAAC,CAAC;IAEZ,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE;QACnB,YAAY,CAAC,QAAQ,CAAC,CAAC;QAEvB,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE;YAC5B,IAAI,EAAE,CAAC;SACV;IACL,CAAC,CAAC,CAAC;IAEH,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;QACpB,YAAY,CAAC,QAAQ,CAAC,CAAC;QAEvB,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE;YAC5B,IAAI,CAAC,CAAC,CAAC,CAAC;SACX;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAvBD,oDAuBC"}