keq 5.0.0-alpha.24 → 5.0.0-alpha.26

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 (64) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/context/utils/fork.d.ts.map +1 -1
  3. package/dist/exception/http-exceptions/bad-gateway.exception.d.ts +2 -2
  4. package/dist/exception/http-exceptions/bad-gateway.exception.d.ts.map +1 -1
  5. package/dist/exception/http-exceptions/bad-request.exception.d.ts +2 -2
  6. package/dist/exception/http-exceptions/bad-request.exception.d.ts.map +1 -1
  7. package/dist/exception/http-exceptions/conflict.exception.d.ts +2 -2
  8. package/dist/exception/http-exceptions/conflict.exception.d.ts.map +1 -1
  9. package/dist/exception/http-exceptions/content-too-large.exception.d.ts +2 -2
  10. package/dist/exception/http-exceptions/content-too-large.exception.d.ts.map +1 -1
  11. package/dist/exception/http-exceptions/forbidden.exception.d.ts +2 -2
  12. package/dist/exception/http-exceptions/forbidden.exception.d.ts.map +1 -1
  13. package/dist/exception/http-exceptions/gateway-timeout.exception.d.ts +2 -2
  14. package/dist/exception/http-exceptions/gateway-timeout.exception.d.ts.map +1 -1
  15. package/dist/exception/http-exceptions/http-version-not-supported.exception.d.ts +2 -2
  16. package/dist/exception/http-exceptions/http-version-not-supported.exception.d.ts.map +1 -1
  17. package/dist/exception/http-exceptions/im-a-teapot.exception.d.ts +2 -2
  18. package/dist/exception/http-exceptions/im-a-teapot.exception.d.ts.map +1 -1
  19. package/dist/exception/http-exceptions/internal-server-error.exception.d.ts +2 -2
  20. package/dist/exception/http-exceptions/internal-server-error.exception.d.ts.map +1 -1
  21. package/dist/exception/http-exceptions/method-not-allowed.exception.d.ts +2 -2
  22. package/dist/exception/http-exceptions/method-not-allowed.exception.d.ts.map +1 -1
  23. package/dist/exception/http-exceptions/not-acceptable.exception.d.ts +2 -2
  24. package/dist/exception/http-exceptions/not-acceptable.exception.d.ts.map +1 -1
  25. package/dist/exception/http-exceptions/not-founded.exception.d.ts +2 -2
  26. package/dist/exception/http-exceptions/not-founded.exception.d.ts.map +1 -1
  27. package/dist/exception/http-exceptions/not-implemented.exception.d.ts +2 -2
  28. package/dist/exception/http-exceptions/not-implemented.exception.d.ts.map +1 -1
  29. package/dist/exception/http-exceptions/precondition-failed.exception.d.ts +2 -2
  30. package/dist/exception/http-exceptions/precondition-failed.exception.d.ts.map +1 -1
  31. package/dist/exception/http-exceptions/proxy-authentication-required.exception.d.ts +2 -2
  32. package/dist/exception/http-exceptions/proxy-authentication-required.exception.d.ts.map +1 -1
  33. package/dist/exception/http-exceptions/request-timeout.exception.d.ts +2 -2
  34. package/dist/exception/http-exceptions/request-timeout.exception.d.ts.map +1 -1
  35. package/dist/exception/http-exceptions/request.exception.d.ts +7 -2
  36. package/dist/exception/http-exceptions/request.exception.d.ts.map +1 -1
  37. package/dist/exception/http-exceptions/service-unavailable.exception.d.ts +2 -2
  38. package/dist/exception/http-exceptions/service-unavailable.exception.d.ts.map +1 -1
  39. package/dist/exception/http-exceptions/too-many-requests.exception.d.ts +2 -2
  40. package/dist/exception/http-exceptions/too-many-requests.exception.d.ts.map +1 -1
  41. package/dist/exception/http-exceptions/unauthorized.exception.d.ts +2 -2
  42. package/dist/exception/http-exceptions/unauthorized.exception.d.ts.map +1 -1
  43. package/dist/exception/http-exceptions/unsupported-media-type.exception.d.ts +2 -2
  44. package/dist/exception/http-exceptions/unsupported-media-type.exception.d.ts.map +1 -1
  45. package/dist/exception/http-exceptions/uri-too-long.exception.d.ts +2 -2
  46. package/dist/exception/http-exceptions/uri-too-long.exception.d.ts.map +1 -1
  47. package/dist/index.d.ts +1 -1
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +133 -85
  50. package/dist/index.js.map +1 -1
  51. package/dist/index.mjs +133 -85
  52. package/dist/index.mjs.map +1 -1
  53. package/dist/middlewares/flow-control-middleware/serial-flow-control-middleware.d.ts.map +1 -1
  54. package/dist/middlewares/flow-control-middleware/types/keq-flow-control.d.ts +2 -1
  55. package/dist/middlewares/flow-control-middleware/types/keq-flow-control.d.ts.map +1 -1
  56. package/dist/request/keq.d.ts +4 -2
  57. package/dist/request/keq.d.ts.map +1 -1
  58. package/dist/request/request.d.ts +2 -1
  59. package/dist/request/request.d.ts.map +1 -1
  60. package/dist/router/index.d.ts +0 -5
  61. package/dist/router/index.d.ts.map +1 -1
  62. package/dist/router/keq-router.d.ts +25 -7
  63. package/dist/router/keq-router.d.ts.map +1 -1
  64. package/package.json +2 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  ## 5.0.0-alpha.6 (2025-09-17)
2
2
 
3
+ ## 5.0.0-alpha.26
4
+
5
+ ### Minor Changes
6
+
7
+ - 63161c4: **Feat:** the .flowControl() support concurrency.
8
+
9
+ ### Patch Changes
10
+
11
+ - 22ce01a: **Fix:** JSON.stringify ctx.response always get empty object.
12
+
13
+ ## 5.0.0-alpha.25
14
+
15
+ ### Major Changes
16
+
17
+ - 214ae66: **BREAKING CHANGE:** RequestException third parameter changed from retry: boolean to options: { fatal: boolean, response: Response }
18
+
19
+ ```javascript
20
+ // Before
21
+ new RequestException(400, "Error message", true);
22
+
23
+ // After
24
+ new RequestException(400, "Error message", {
25
+ fatal: false,
26
+ response: someResponseObject,
27
+ });
28
+ ```
29
+
30
+ ### Minor Changes
31
+
32
+ - 9290139: **Feat:** add event listener support to KeqRequest.
33
+
3
34
  ## 5.0.0-alpha.24
4
35
 
5
36
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"fork.d.ts","sourceRoot":"","sources":["../../../src/context/utils/fork.ts"],"names":[],"mappings":"AAuBA;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CAgEtC;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAErC"}
1
+ {"version":3,"file":"fork.d.ts","sourceRoot":"","sources":["../../../src/context/utils/fork.ts"],"names":[],"mappings":"AAuBA;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CA4EtC;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAErC"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class BadGatewayException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=bad-gateway.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bad-gateway.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/bad-gateway.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,qBAAa,mBAAoB,SAAQ,gBAAgB;gBAC3C,OAAO,GAAE,MAAsB,EAAE,KAAK,UAAO;CAK1D"}
1
+ {"version":3,"file":"bad-gateway.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/bad-gateway.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAG/E,qBAAa,mBAAoB,SAAQ,gBAAgB;gBAC3C,OAAO,GAAE,MAAsB,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAK/E"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class BadRequestException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=bad-request.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bad-request.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/bad-request.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,qBAAa,mBAAoB,SAAQ,gBAAgB;gBAC3C,OAAO,GAAE,MAAsB,EAAE,KAAK,UAAQ;CAK3D"}
1
+ {"version":3,"file":"bad-request.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/bad-request.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAG/E,qBAAa,mBAAoB,SAAQ,gBAAgB;gBAC3C,OAAO,GAAE,MAAsB,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAK/E"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class ConflictException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=conflict.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conflict.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/conflict.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,qBAAa,iBAAkB,SAAQ,gBAAgB;gBACzC,OAAO,GAAE,MAAmB,EAAE,KAAK,UAAQ;CAKxD"}
1
+ {"version":3,"file":"conflict.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/conflict.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAG/E,qBAAa,iBAAkB,SAAQ,gBAAgB;gBACzC,OAAO,GAAE,MAAmB,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAK5E"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class ContentTooLargeException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=content-too-large.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-too-large.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/content-too-large.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,qBAAa,wBAAyB,SAAQ,gBAAgB;gBAChD,OAAO,GAAE,MAA4B,EAAE,KAAK,UAAQ;CAOjE"}
1
+ {"version":3,"file":"content-too-large.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/content-too-large.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAG/E,qBAAa,wBAAyB,SAAQ,gBAAgB;gBAChD,OAAO,GAAE,MAA4B,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAOrF"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class ForbiddenException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=forbidden.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"forbidden.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/forbidden.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,qBAAa,kBAAmB,SAAQ,gBAAgB;gBAC1C,OAAO,GAAE,MAAoB,EAAE,KAAK,UAAQ;CAKzD"}
1
+ {"version":3,"file":"forbidden.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/forbidden.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAG/E,qBAAa,kBAAmB,SAAQ,gBAAgB;gBAC1C,OAAO,GAAE,MAAoB,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAK7E"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class GatewayTimeoutException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=gateway-timeout.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gateway-timeout.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/gateway-timeout.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,qBAAa,uBAAwB,SAAQ,gBAAgB;gBAC/C,OAAO,GAAE,MAA0B,EAAE,KAAK,UAAO;CAK9D"}
1
+ {"version":3,"file":"gateway-timeout.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/gateway-timeout.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAE/E,qBAAa,uBAAwB,SAAQ,gBAAgB;gBAC/C,OAAO,GAAE,MAA0B,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAKnF"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class HttpVersionNotSupportedException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=http-version-not-supported.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"http-version-not-supported.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/http-version-not-supported.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,qBAAa,gCAAiC,SAAQ,gBAAgB;gBACxD,OAAO,GAAE,MAAqC,EAAE,KAAK,UAAQ;CAO1E"}
1
+ {"version":3,"file":"http-version-not-supported.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/http-version-not-supported.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAE/E,qBAAa,gCAAiC,SAAQ,gBAAgB;gBACxD,OAAO,GAAE,MAAqC,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAO9F"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class ImATeapotException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=im-a-teapot.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"im-a-teapot.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/im-a-teapot.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,qBAAa,kBAAmB,SAAQ,gBAAgB;gBAC1C,OAAO,GAAE,MAAuB,EAAE,KAAK,UAAQ;CAK5D"}
1
+ {"version":3,"file":"im-a-teapot.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/im-a-teapot.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAG/E,qBAAa,kBAAmB,SAAQ,gBAAgB;gBAC1C,OAAO,GAAE,MAAuB,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAKhF"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class InternalServerErrorException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=internal-server-error.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal-server-error.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/internal-server-error.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,qBAAa,4BAA6B,SAAQ,gBAAgB;gBACpD,OAAO,GAAE,MAAgC,EAAE,KAAK,UAAO;CAOpE"}
1
+ {"version":3,"file":"internal-server-error.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/internal-server-error.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAE/E,qBAAa,4BAA6B,SAAQ,gBAAgB;gBACpD,OAAO,GAAE,MAAgC,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAOzF"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class MethodNotAllowedException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=method-not-allowed.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"method-not-allowed.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/method-not-allowed.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,qBAAa,yBAA0B,SAAQ,gBAAgB;gBACjD,OAAO,GAAE,MAA6B,EAAE,KAAK,UAAQ;CAOlE"}
1
+ {"version":3,"file":"method-not-allowed.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/method-not-allowed.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAE/E,qBAAa,yBAA0B,SAAQ,gBAAgB;gBACjD,OAAO,GAAE,MAA6B,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAOtF"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class NotAcceptableException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=not-acceptable.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"not-acceptable.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/not-acceptable.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,qBAAa,sBAAuB,SAAQ,gBAAgB;gBAC9C,OAAO,GAAE,MAAyB,EAAE,KAAK,UAAQ;CAK9D"}
1
+ {"version":3,"file":"not-acceptable.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/not-acceptable.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAG/E,qBAAa,sBAAuB,SAAQ,gBAAgB;gBAC9C,OAAO,GAAE,MAAyB,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAKlF"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class NotFoundedException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=not-founded.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"not-founded.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/not-founded.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,qBAAa,mBAAoB,SAAQ,gBAAgB;gBAC3C,OAAO,GAAE,MAAsB,EAAE,KAAK,UAAQ;CAK3D"}
1
+ {"version":3,"file":"not-founded.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/not-founded.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAE/E,qBAAa,mBAAoB,SAAQ,gBAAgB;gBAC3C,OAAO,GAAE,MAAsB,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAK/E"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class NotImplementedException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=not-implemented.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"not-implemented.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/not-implemented.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,qBAAa,uBAAwB,SAAQ,gBAAgB;gBAC/C,OAAO,GAAE,MAA0B,EAAE,KAAK,UAAQ;CAK/D"}
1
+ {"version":3,"file":"not-implemented.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/not-implemented.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAE/E,qBAAa,uBAAwB,SAAQ,gBAAgB;gBAC/C,OAAO,GAAE,MAA0B,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAKnF"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class PreconditionFailedException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=precondition-failed.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"precondition-failed.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/precondition-failed.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,qBAAa,2BAA4B,SAAQ,gBAAgB;gBACnD,OAAO,GAAE,MAA8B,EAAE,KAAK,UAAQ;CAOnE"}
1
+ {"version":3,"file":"precondition-failed.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/precondition-failed.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAE/E,qBAAa,2BAA4B,SAAQ,gBAAgB;gBACnD,OAAO,GAAE,MAA8B,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAOvF"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class ProxyAuthenticationRequiredException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=proxy-authentication-required.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"proxy-authentication-required.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/proxy-authentication-required.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,qBAAa,oCAAqC,SAAQ,gBAAgB;gBAC5D,OAAO,GAAE,MAAwC,EAAE,KAAK,UAAQ;CAO7E"}
1
+ {"version":3,"file":"proxy-authentication-required.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/proxy-authentication-required.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAG/E,qBAAa,oCAAqC,SAAQ,gBAAgB;gBAC5D,OAAO,GAAE,MAAwC,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAOjG"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class RequestTimeoutException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=request-timeout.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"request-timeout.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/request-timeout.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,qBAAa,uBAAwB,SAAQ,gBAAgB;gBAC/C,OAAO,GAAE,MAA0B,EAAE,KAAK,UAAO;CAO9D"}
1
+ {"version":3,"file":"request-timeout.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/request-timeout.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAG/E,qBAAa,uBAAwB,SAAQ,gBAAgB;gBAC/C,OAAO,GAAE,MAA0B,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAOnF"}
@@ -1,7 +1,12 @@
1
1
  import { Exception } from '../exception.js';
2
+ export interface RequestExceptionOptions {
3
+ fatal?: boolean;
4
+ response?: Response;
5
+ }
2
6
  export declare class RequestException extends Exception {
3
- statusCode: number;
7
+ statusCode: number | string;
4
8
  retry: boolean;
5
- constructor(statusCode: number, message?: string, retry?: boolean);
9
+ response?: Response;
10
+ constructor(statusCode: number | string, message?: string, options?: RequestExceptionOptions);
6
11
  }
7
12
  //# sourceMappingURL=request.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"request.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/request.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAG3C,qBAAa,gBAAiB,SAAQ,SAAS;IAC7C,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,OAAO,CAAA;gBAEF,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,UAAO;CAQ/D"}
1
+ {"version":3,"file":"request.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/request.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAG3C,MAAM,WAAW,uBAAuB;IAEtC,KAAK,CAAC,EAAE,OAAO,CAAA;IAGf,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB;AAED,qBAAa,gBAAiB,SAAQ,SAAS;IAC7C,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAA;gBAEP,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAS7F"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class ServiceUnavailableException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=service-unavailable.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"service-unavailable.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/service-unavailable.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,qBAAa,2BAA4B,SAAQ,gBAAgB;gBACnD,OAAO,GAAE,MAA8B,EAAE,KAAK,UAAO;CAOlE"}
1
+ {"version":3,"file":"service-unavailable.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/service-unavailable.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAG/E,qBAAa,2BAA4B,SAAQ,gBAAgB;gBACnD,OAAO,GAAE,MAA8B,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAOvF"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class TooManyRequestsException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=too-many-requests.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"too-many-requests.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/too-many-requests.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,qBAAa,wBAAyB,SAAQ,gBAAgB;gBAChD,OAAO,GAAE,MAA4B,EAAE,KAAK,UAAO;CAKhE"}
1
+ {"version":3,"file":"too-many-requests.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/too-many-requests.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAG/E,qBAAa,wBAAyB,SAAQ,gBAAgB;gBAChD,OAAO,GAAE,MAA4B,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAKrF"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class UnauthorizedException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=unauthorized.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unauthorized.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/unauthorized.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,qBAAa,qBAAsB,SAAQ,gBAAgB;gBAC7C,OAAO,GAAE,MAAuB,EAAE,KAAK,UAAQ;CAK5D"}
1
+ {"version":3,"file":"unauthorized.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/unauthorized.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAE/E,qBAAa,qBAAsB,SAAQ,gBAAgB;gBAC7C,OAAO,GAAE,MAAuB,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAKhF"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class UnsupportedMediaTypeException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=unsupported-media-type.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unsupported-media-type.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/unsupported-media-type.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,qBAAa,6BAA8B,SAAQ,gBAAgB;gBACrD,OAAO,GAAE,MAAiC,EAAE,KAAK,UAAQ;CAKtE"}
1
+ {"version":3,"file":"unsupported-media-type.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/unsupported-media-type.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAE/E,qBAAa,6BAA8B,SAAQ,gBAAgB;gBACrD,OAAO,GAAE,MAAiC,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAK1F"}
@@ -1,5 +1,5 @@
1
- import { RequestException } from './request.exception';
1
+ import { RequestException, RequestExceptionOptions } from './request.exception';
2
2
  export declare class UriTooLongException extends RequestException {
3
- constructor(message?: string, retry?: boolean);
3
+ constructor(message?: string, options?: RequestExceptionOptions);
4
4
  }
5
5
  //# sourceMappingURL=uri-too-long.exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"uri-too-long.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/uri-too-long.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,qBAAa,mBAAoB,SAAQ,gBAAgB;gBAC3C,OAAO,GAAE,MAAuB,EAAE,KAAK,UAAQ;CAK5D"}
1
+ {"version":3,"file":"uri-too-long.exception.d.ts","sourceRoot":"","sources":["../../../src/exception/http-exceptions/uri-too-long.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAG/E,qBAAa,mBAAoB,SAAQ,gBAAgB;gBAC3C,OAAO,GAAE,MAAuB,EAAE,OAAO,CAAC,EAAE,uBAAuB;CAKhF"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { createRequest, Keq, request, KeqRequest, type KeqOptions, type KeqApiSchema, type KeqOperation, type KeqDefaultOperation, type KeqQueryInit, type KeqPathParameterInit, type KeqQueryOptions, type ServerSentEvent, } from './request';
2
2
  export { type KeqBodyInit, } from './request-init';
3
3
  export { composeMiddleware, type KeqMiddleware, type KeqNext, } from './middleware';
4
- export { type KeqRoute, composeRoute, keqHostRoute, keqLocationRoute, keqMethodRoute, keqModuleRoute, keqPathnameRoute, } from './router';
4
+ export { type KeqRoute, composeRoute, } from './router';
5
5
  export { createProxyResponse, KeqExecutionContext, KeqSharedContext, type KeqSharedContextOptions, type KeqContext, type KeqContextData, type KeqContextEmitter, type KeqGlobal, type KeqContextOptions, type KeqMiddlewareOptions, type KeqEvents, type KeqRetryDelay, type KeqRetryOn, } from './context';
6
6
  export { Exception, TypeException, TimeoutException, AbortException, RequestException, BadRequestException, UnauthorizedException, ForbiddenException, NotFoundedException, MethodNotAllowedException, NotAcceptableException, ProxyAuthenticationRequiredException, RequestTimeoutException, ConflictException, PreconditionFailedException, ContentTooLargeException, UriTooLongException, ImATeapotException, TooManyRequestsException, UnsupportedMediaTypeException, InternalServerErrorException, NotImplementedException, BadGatewayException, ServiceUnavailableException, GatewayTimeoutException, } from './exception';
7
7
  export { KeqMiddlewareOrchestrator, KeqMiddlewareExecutor, } from './orchestrator';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,GAAG,EACH,OAAO,EACP,UAAU,EACV,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,KAAK,WAAW,GACjB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EACL,iBAAiB,EACjB,KAAK,aAAa,EAClB,KAAK,OAAO,GACb,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,KAAK,QAAQ,EACb,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,gBAAgB,GACjB,MAAM,UAAU,CAAA;AAEjB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,UAAU,GAChB,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,cAAc,EAEd,gBAAgB,EAEhB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,oCAAoC,EACpC,uBAAuB,EACvB,iBAAiB,EACjB,2BAA2B,EAC3B,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,6BAA6B,EAE7B,4BAA4B,EAC5B,uBAAuB,EACvB,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,aAAa,CAAA;AAEpB,OAAO,EACL,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,GAAG,EACH,OAAO,EACP,UAAU,EACV,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,KAAK,WAAW,GACjB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EACL,iBAAiB,EACjB,KAAK,aAAa,EAClB,KAAK,OAAO,GACb,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,KAAK,QAAQ,EACb,YAAY,GACb,MAAM,UAAU,CAAA;AAEjB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,UAAU,GAChB,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,cAAc,EAEd,gBAAgB,EAEhB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,oCAAoC,EACpC,uBAAuB,EACvB,iBAAiB,EACjB,2BAA2B,EAC3B,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,6BAA6B,EAE7B,4BAA4B,EAC5B,uBAAuB,EACvB,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,aAAa,CAAA;AAEpB,OAAO,EACL,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,gBAAgB,CAAA"}