keq 5.0.0-alpha.23 → 5.0.0-alpha.25

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 (72) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/context/types/keq-context-options/keq-resolve-with-mode.d.ts +1 -1
  3. package/dist/context/types/keq-context-options/keq-resolve-with-mode.d.ts.map +1 -1
  4. package/dist/exception/http-exceptions/bad-gateway.exception.d.ts +2 -2
  5. package/dist/exception/http-exceptions/bad-gateway.exception.d.ts.map +1 -1
  6. package/dist/exception/http-exceptions/bad-request.exception.d.ts +2 -2
  7. package/dist/exception/http-exceptions/bad-request.exception.d.ts.map +1 -1
  8. package/dist/exception/http-exceptions/conflict.exception.d.ts +2 -2
  9. package/dist/exception/http-exceptions/conflict.exception.d.ts.map +1 -1
  10. package/dist/exception/http-exceptions/content-too-large.exception.d.ts +2 -2
  11. package/dist/exception/http-exceptions/content-too-large.exception.d.ts.map +1 -1
  12. package/dist/exception/http-exceptions/forbidden.exception.d.ts +2 -2
  13. package/dist/exception/http-exceptions/forbidden.exception.d.ts.map +1 -1
  14. package/dist/exception/http-exceptions/gateway-timeout.exception.d.ts +2 -2
  15. package/dist/exception/http-exceptions/gateway-timeout.exception.d.ts.map +1 -1
  16. package/dist/exception/http-exceptions/http-version-not-supported.exception.d.ts +2 -2
  17. package/dist/exception/http-exceptions/http-version-not-supported.exception.d.ts.map +1 -1
  18. package/dist/exception/http-exceptions/im-a-teapot.exception.d.ts +2 -2
  19. package/dist/exception/http-exceptions/im-a-teapot.exception.d.ts.map +1 -1
  20. package/dist/exception/http-exceptions/internal-server-error.exception.d.ts +2 -2
  21. package/dist/exception/http-exceptions/internal-server-error.exception.d.ts.map +1 -1
  22. package/dist/exception/http-exceptions/method-not-allowed.exception.d.ts +2 -2
  23. package/dist/exception/http-exceptions/method-not-allowed.exception.d.ts.map +1 -1
  24. package/dist/exception/http-exceptions/not-acceptable.exception.d.ts +2 -2
  25. package/dist/exception/http-exceptions/not-acceptable.exception.d.ts.map +1 -1
  26. package/dist/exception/http-exceptions/not-founded.exception.d.ts +2 -2
  27. package/dist/exception/http-exceptions/not-founded.exception.d.ts.map +1 -1
  28. package/dist/exception/http-exceptions/not-implemented.exception.d.ts +2 -2
  29. package/dist/exception/http-exceptions/not-implemented.exception.d.ts.map +1 -1
  30. package/dist/exception/http-exceptions/precondition-failed.exception.d.ts +2 -2
  31. package/dist/exception/http-exceptions/precondition-failed.exception.d.ts.map +1 -1
  32. package/dist/exception/http-exceptions/proxy-authentication-required.exception.d.ts +2 -2
  33. package/dist/exception/http-exceptions/proxy-authentication-required.exception.d.ts.map +1 -1
  34. package/dist/exception/http-exceptions/request-timeout.exception.d.ts +2 -2
  35. package/dist/exception/http-exceptions/request-timeout.exception.d.ts.map +1 -1
  36. package/dist/exception/http-exceptions/request.exception.d.ts +7 -2
  37. package/dist/exception/http-exceptions/request.exception.d.ts.map +1 -1
  38. package/dist/exception/http-exceptions/service-unavailable.exception.d.ts +2 -2
  39. package/dist/exception/http-exceptions/service-unavailable.exception.d.ts.map +1 -1
  40. package/dist/exception/http-exceptions/too-many-requests.exception.d.ts +2 -2
  41. package/dist/exception/http-exceptions/too-many-requests.exception.d.ts.map +1 -1
  42. package/dist/exception/http-exceptions/unauthorized.exception.d.ts +2 -2
  43. package/dist/exception/http-exceptions/unauthorized.exception.d.ts.map +1 -1
  44. package/dist/exception/http-exceptions/unsupported-media-type.exception.d.ts +2 -2
  45. package/dist/exception/http-exceptions/unsupported-media-type.exception.d.ts.map +1 -1
  46. package/dist/exception/http-exceptions/uri-too-long.exception.d.ts +2 -2
  47. package/dist/exception/http-exceptions/uri-too-long.exception.d.ts.map +1 -1
  48. package/dist/index.d.ts +2 -2
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +449 -402
  51. package/dist/index.js.map +1 -1
  52. package/dist/index.mjs +449 -402
  53. package/dist/index.mjs.map +1 -1
  54. package/dist/request/core.d.ts.map +1 -1
  55. package/dist/request/keq.d.ts +4 -1
  56. package/dist/request/keq.d.ts.map +1 -1
  57. package/dist/request/request.d.ts +2 -1
  58. package/dist/request/request.d.ts.map +1 -1
  59. package/dist/request/types/index.d.ts +1 -0
  60. package/dist/request/types/index.d.ts.map +1 -1
  61. package/dist/request/types/server-sent-event.d.ts +3 -0
  62. package/dist/request/types/server-sent-event.d.ts.map +1 -0
  63. package/dist/request/utils/index.d.ts +1 -0
  64. package/dist/request/utils/index.d.ts.map +1 -1
  65. package/dist/request/utils/intelligent-parse-response.d.ts.map +1 -1
  66. package/dist/request/utils/resolve-with.d.ts +3 -0
  67. package/dist/request/utils/resolve-with.d.ts.map +1 -0
  68. package/dist/router/index.d.ts +0 -5
  69. package/dist/router/index.d.ts.map +1 -1
  70. package/dist/router/keq-router.d.ts +25 -7
  71. package/dist/router/keq-router.d.ts.map +1 -1
  72. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  ## 5.0.0-alpha.6 (2025-09-17)
2
2
 
3
+ ## 5.0.0-alpha.25
4
+
5
+ ### Major Changes
6
+
7
+ - 214ae66: **BREAKING CHANGE:** RequestException third parameter changed from retry: boolean to options: { fatal: boolean, response: Response }
8
+
9
+ ```javascript
10
+ // Before
11
+ new RequestException(400, "Error message", true);
12
+
13
+ // After
14
+ new RequestException(400, "Error message", {
15
+ fatal: false,
16
+ response: someResponseObject,
17
+ });
18
+ ```
19
+
20
+ ### Minor Changes
21
+
22
+ - 9290139: **Feat:** add event listener support to KeqRequest.
23
+
24
+ ## 5.0.0-alpha.24
25
+
26
+ ### Minor Changes
27
+
28
+ - 0a2eb2f: **Feat:** server-sent event support.
29
+
3
30
  ## 5.0.0-alpha.23
4
31
 
5
32
  ### Patch Changes
@@ -1,2 +1,2 @@
1
- export type KeqResolveWithMode = 'intelligent' | 'response' | 'text' | 'json' | 'form-data' | 'blob' | 'array-buffer';
1
+ export type KeqResolveWithMode = 'intelligent' | 'response' | 'text' | 'json' | 'form-data' | 'blob' | 'array-buffer' | 'sse';
2
2
  //# sourceMappingURL=keq-resolve-with-mode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"keq-resolve-with-mode.d.ts","sourceRoot":"","sources":["../../../../src/context/types/keq-context-options/keq-resolve-with-mode.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,cAAc,CAAA"}
1
+ {"version":3,"file":"keq-resolve-with-mode.d.ts","sourceRoot":"","sources":["../../../../src/context/types/keq-context-options/keq-resolve-with-mode.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,cAAc,GAAG,KAAK,CAAA"}
@@ -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
- export { createRequest, Keq, request, KeqRequest, type KeqOptions, type KeqApiSchema, type KeqOperation, type KeqDefaultOperation, type KeqQueryInit, type KeqPathParameterInit, type KeqQueryOptions, } from './request';
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,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"}