@leyyo/common 1.2.4 → 1.2.6

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 (140) hide show
  1. package/dist/$$leyyo-loader.d.ts +1 -0
  2. package/dist/$$leyyo-loader.js +40 -0
  3. package/dist/$$leyyo-loader.js.map +1 -0
  4. package/dist/deploy/deploy.common.d.ts +4 -4
  5. package/dist/error/error.common.d.ts +5 -5
  6. package/dist/error/error.common.js +17 -18
  7. package/dist/error/error.common.js.map +1 -1
  8. package/dist/error/index.const.d.ts +4 -0
  9. package/dist/error/index.const.js +8 -0
  10. package/dist/error/index.const.js.map +1 -0
  11. package/dist/error/index.d.ts +1 -1
  12. package/dist/error/index.js +1 -1
  13. package/dist/error/index.js.map +1 -1
  14. package/dist/error/index.types.d.ts +6 -6
  15. package/dist/error/items/caused.error.d.ts +0 -2
  16. package/dist/error/items/caused.error.js +0 -5
  17. package/dist/error/items/caused.error.js.map +1 -1
  18. package/dist/error/items/developer.error.js +2 -0
  19. package/dist/error/items/developer.error.js.map +1 -1
  20. package/dist/error/items/http.error.d.ts +14 -8
  21. package/dist/error/items/http.error.js +23 -7
  22. package/dist/error/items/http.error.js.map +1 -1
  23. package/dist/error/items/index.d.ts +2 -17
  24. package/dist/error/items/index.js +2 -17
  25. package/dist/error/items/index.js.map +1 -1
  26. package/dist/error/items/invalid-value.error.js +2 -0
  27. package/dist/error/items/invalid-value.error.js.map +1 -1
  28. package/dist/error/items/leyyo.error.d.ts +17 -10
  29. package/dist/error/items/leyyo.error.js +37 -22
  30. package/dist/error/items/leyyo.error.js.map +1 -1
  31. package/dist/error/items/multiple.error.d.ts +4 -2
  32. package/dist/error/items/multiple.error.js +3 -1
  33. package/dist/error/items/multiple.error.js.map +1 -1
  34. package/dist/event/event.common.d.ts +3 -3
  35. package/dist/event/event.common.js.map +1 -1
  36. package/dist/event/event.error.d.ts +2 -2
  37. package/dist/event/event.error.js +2 -1
  38. package/dist/event/event.error.js.map +1 -1
  39. package/dist/event/index.d.ts +1 -0
  40. package/dist/event/index.js +1 -0
  41. package/dist/event/index.js.map +1 -1
  42. package/dist/hub/hub.channel.d.ts +2 -2
  43. package/dist/hub/hub.common.d.ts +2 -2
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.js +2 -0
  46. package/dist/index.js.map +1 -1
  47. package/dist/leyyo/leyyo.d.ts +8 -8
  48. package/dist/log/index.d.ts +1 -0
  49. package/dist/log/index.js +1 -0
  50. package/dist/log/index.js.map +1 -1
  51. package/dist/log/log-level.d.ts +1 -1
  52. package/dist/log/log-level.js +2 -3
  53. package/dist/log/log-level.js.map +1 -1
  54. package/dist/log/log.common.d.ts +2 -2
  55. package/dist/log/log.common.js.map +1 -1
  56. package/dist/log/logger.error.js +1 -0
  57. package/dist/log/logger.error.js.map +1 -1
  58. package/dist/log/logger.instance.d.ts +5 -5
  59. package/dist/name/index.d.ts +1 -0
  60. package/dist/name/index.js +1 -0
  61. package/dist/name/index.js.map +1 -1
  62. package/dist/name/name.common.d.ts +3 -3
  63. package/dist/name/name.error.js +1 -0
  64. package/dist/name/name.error.js.map +1 -1
  65. package/dist/opt/opt.common.d.ts +2 -2
  66. package/dist/repo/repo.common.d.ts +2 -2
  67. package/dist/shared/index.d.ts +1 -0
  68. package/dist/shared/index.enum.d.ts +1 -1
  69. package/dist/shared/index.js +1 -0
  70. package/dist/shared/index.js.map +1 -1
  71. package/dist/shared/index.loader.d.ts +5 -0
  72. package/dist/shared/index.loader.js +3 -0
  73. package/dist/shared/index.loader.js.map +1 -0
  74. package/dist/util/$define-error.d.ts +9 -0
  75. package/dist/util/$define-error.js +25 -0
  76. package/dist/util/$define-error.js.map +1 -0
  77. package/dist/util/$enum-name.d.ts +16 -0
  78. package/dist/util/$enum-name.js +18 -0
  79. package/dist/util/$enum-name.js.map +1 -0
  80. package/dist/util/$loader.d.ts +18 -0
  81. package/dist/util/$loader.js +40 -0
  82. package/dist/util/$loader.js.map +1 -0
  83. package/dist/util/index.d.ts +5 -0
  84. package/dist/util/index.js +5 -0
  85. package/dist/util/index.js.map +1 -1
  86. package/dist/util/is.d.ts +59 -0
  87. package/dist/util/is.js +68 -0
  88. package/dist/util/is.js.map +1 -0
  89. package/dist/util/jitter-interval.d.ts +10 -0
  90. package/dist/util/jitter-interval.js +33 -0
  91. package/dist/util/jitter-interval.js.map +1 -0
  92. package/package.json +1 -1
  93. package/dist/error/http-error.map.d.ts +0 -6
  94. package/dist/error/http-error.map.js +0 -25
  95. package/dist/error/http-error.map.js.map +0 -1
  96. package/dist/error/items/bad-request.error.d.ts +0 -10
  97. package/dist/error/items/bad-request.error.js +0 -16
  98. package/dist/error/items/bad-request.error.js.map +0 -1
  99. package/dist/error/items/conflict.error.d.ts +0 -10
  100. package/dist/error/items/conflict.error.js +0 -16
  101. package/dist/error/items/conflict.error.js.map +0 -1
  102. package/dist/error/items/content-too-large.error.d.ts +0 -10
  103. package/dist/error/items/content-too-large.error.js +0 -16
  104. package/dist/error/items/content-too-large.error.js.map +0 -1
  105. package/dist/error/items/forbidden.error.d.ts +0 -10
  106. package/dist/error/items/forbidden.error.js +0 -16
  107. package/dist/error/items/forbidden.error.js.map +0 -1
  108. package/dist/error/items/gone.error.d.ts +0 -10
  109. package/dist/error/items/gone.error.js +0 -16
  110. package/dist/error/items/gone.error.js.map +0 -1
  111. package/dist/error/items/length-required.error.d.ts +0 -10
  112. package/dist/error/items/length-required.error.js +0 -16
  113. package/dist/error/items/length-required.error.js.map +0 -1
  114. package/dist/error/items/method-not-allowed.error.d.ts +0 -10
  115. package/dist/error/items/method-not-allowed.error.js +0 -16
  116. package/dist/error/items/method-not-allowed.error.js.map +0 -1
  117. package/dist/error/items/not-acceptable.error.d.ts +0 -10
  118. package/dist/error/items/not-acceptable.error.js +0 -16
  119. package/dist/error/items/not-acceptable.error.js.map +0 -1
  120. package/dist/error/items/not-found.error.d.ts +0 -10
  121. package/dist/error/items/not-found.error.js +0 -16
  122. package/dist/error/items/not-found.error.js.map +0 -1
  123. package/dist/error/items/payment-required.error.d.ts +0 -10
  124. package/dist/error/items/payment-required.error.js +0 -16
  125. package/dist/error/items/payment-required.error.js.map +0 -1
  126. package/dist/error/items/precondition-failed.error.d.ts +0 -10
  127. package/dist/error/items/precondition-failed.error.js +0 -16
  128. package/dist/error/items/precondition-failed.error.js.map +0 -1
  129. package/dist/error/items/proxy-authentication-required.error.d.ts +0 -10
  130. package/dist/error/items/proxy-authentication-required.error.js +0 -16
  131. package/dist/error/items/proxy-authentication-required.error.js.map +0 -1
  132. package/dist/error/items/request-timeout.error.d.ts +0 -10
  133. package/dist/error/items/request-timeout.error.js +0 -16
  134. package/dist/error/items/request-timeout.error.js.map +0 -1
  135. package/dist/error/items/silent.error.d.ts +0 -11
  136. package/dist/error/items/silent.error.js +0 -19
  137. package/dist/error/items/silent.error.js.map +0 -1
  138. package/dist/error/items/unauthorized.error.d.ts +0 -10
  139. package/dist/error/items/unauthorized.error.js +0 -16
  140. package/dist/error/items/unauthorized.error.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,gDAA8B;AAC9B,gDAA8B;AAC9B,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,4CAA0B;AAE1B,0CAAwB;AACxB,6CAA2B;AAC3B,uCAAqB;AACrB,oDAAkC;AAClC,4CAA0B;AAC1B,gDAA8B;AAC9B,gDAA8B;AAC9B,iDAA+B"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Normal empty values
3
+ * */
4
+ export declare const EMPTY_VALUES: any[];
5
+ /**
6
+ * Empty values with empty string
7
+ * */
8
+ export declare const EMPTY_VALUES_STR: string[];
9
+ /**
10
+ * Is bare object?
11
+ * Means:
12
+ * - `constructor === "Object"`
13
+ *
14
+ * @param {any} obj - given value
15
+ * @return {boolean} - is bare object?
16
+ * */
17
+ export declare const isObj: (obj: unknown) => boolean;
18
+ /**
19
+ * Is filled object?
20
+ * Means:
21
+ * - `constructor === "Object"`
22
+ * - `obj.keys.length > 0`
23
+ *
24
+ * @param {any} obj - given value
25
+ * @return {boolean} - is filled object?
26
+ * */
27
+ export declare const isFilledObj: (obj: unknown) => boolean;
28
+ /**
29
+ * Is filled array?
30
+ * Means
31
+ * - `constructor === "Array"`
32
+ * - `arr.length > 0`
33
+ *
34
+ * @param {any} arr - given value
35
+ * @return {boolean} - is filled array?
36
+ * */
37
+ export declare const isFilledArr: (arr: unknown) => boolean;
38
+ /**
39
+ * Is text?
40
+ * Means:
41
+ * - `typeof === "string"`
42
+ * - `not empty string`
43
+ * - `not starts/ends with space`
44
+ *
45
+ * @param {any} str - given value
46
+ * @return {boolean} - is text?
47
+ * */
48
+ export declare const isText: (str: unknown) => boolean;
49
+ /**
50
+ * Is empty?
51
+ * Means:
52
+ * - `not null`
53
+ * - `not undefined`
54
+ * - `not empty string`
55
+ *
56
+ * @param {any} value - given value
57
+ * @return {boolean} - is empty?
58
+ * */
59
+ export declare const isEmpty: (value: unknown) => boolean;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isEmpty = exports.isText = exports.isFilledArr = exports.isFilledObj = exports.isObj = exports.EMPTY_VALUES_STR = exports.EMPTY_VALUES = void 0;
4
+ /**
5
+ * Normal empty values
6
+ * */
7
+ exports.EMPTY_VALUES = [null, undefined];
8
+ /**
9
+ * Empty values with empty string
10
+ * */
11
+ exports.EMPTY_VALUES_STR = [null, undefined, ''];
12
+ /**
13
+ * Is bare object?
14
+ * Means:
15
+ * - `constructor === "Object"`
16
+ *
17
+ * @param {any} obj - given value
18
+ * @return {boolean} - is bare object?
19
+ * */
20
+ const isObj = (obj) => obj && typeof obj === 'object' && !Array.isArray(obj);
21
+ exports.isObj = isObj;
22
+ /**
23
+ * Is filled object?
24
+ * Means:
25
+ * - `constructor === "Object"`
26
+ * - `obj.keys.length > 0`
27
+ *
28
+ * @param {any} obj - given value
29
+ * @return {boolean} - is filled object?
30
+ * */
31
+ const isFilledObj = (obj) => (0, exports.isObj)(obj) && Object.keys(obj).length > 0;
32
+ exports.isFilledObj = isFilledObj;
33
+ /**
34
+ * Is filled array?
35
+ * Means
36
+ * - `constructor === "Array"`
37
+ * - `arr.length > 0`
38
+ *
39
+ * @param {any} arr - given value
40
+ * @return {boolean} - is filled array?
41
+ * */
42
+ const isFilledArr = (arr) => Array.isArray(arr) && arr.length > 0;
43
+ exports.isFilledArr = isFilledArr;
44
+ /**
45
+ * Is text?
46
+ * Means:
47
+ * - `typeof === "string"`
48
+ * - `not empty string`
49
+ * - `not starts/ends with space`
50
+ *
51
+ * @param {any} str - given value
52
+ * @return {boolean} - is text?
53
+ * */
54
+ const isText = (str) => typeof str === 'string' && str !== '' && str.trim() === str;
55
+ exports.isText = isText;
56
+ /**
57
+ * Is empty?
58
+ * Means:
59
+ * - `not null`
60
+ * - `not undefined`
61
+ * - `not empty string`
62
+ *
63
+ * @param {any} value - given value
64
+ * @return {boolean} - is empty?
65
+ * */
66
+ const isEmpty = (value) => exports.EMPTY_VALUES.includes(value) || (typeof value === 'string' && value.trim() === '');
67
+ exports.isEmpty = isEmpty;
68
+ //# sourceMappingURL=is.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is.js","sourceRoot":"","sources":["../../src/util/is.ts"],"names":[],"mappings":";;;AAAA;;KAEK;AACQ,QAAA,YAAY,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAE9C;;KAEK;AACQ,QAAA,gBAAgB,GAAG,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;AAEtD;;;;;;;KAOK;AACE,MAAM,KAAK,GAAG,CAAC,GAAY,EAAW,EAAE,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAAzF,QAAA,KAAK,SAAoF;AAEtG;;;;;;;;KAQK;AACE,MAAM,WAAW,GAAG,CAAC,GAAY,EAAW,EAAE,CAAC,IAAA,aAAK,EAAC,GAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AAAnF,QAAA,WAAW,eAAwE;AAEhG;;;;;;;;KAQK;AACE,MAAM,WAAW,GAAG,CAAC,GAAY,EAAW,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;AAA9E,QAAA,WAAW,eAAmE;AAE3F;;;;;;;;;KASK;AACE,MAAM,MAAM,GAAG,CAAC,GAAY,EAAW,EAAE,CAAC,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC;AAAhG,QAAA,MAAM,UAA0F;AAE7G;;;;;;;;;KASK;AACE,MAAM,OAAO,GAAG,CAAC,KAAc,EAAW,EAAE,CAAC,oBAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AAA1H,QAAA,OAAO,WAAmH"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Generate next delay time with exponential & randomized manner
3
+ *
4
+ * @param {number} tryCount - try count
5
+ * @param {number} baseDelay - starting delay interval
6
+ * @param {number} maxDelay - maximum delay interval
7
+ * @param {number} maxTryCount - max try count, if `tryCount` excess it, it returns undefined
8
+ * @return {number} - next interval time if (maxTryCount && `tryCount` >= `maxTryCount`)
9
+ * */
10
+ export declare function jitterInterval(tryCount: number, baseDelay: number, maxDelay: number, maxTryCount?: number): number;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.jitterInterval = jitterInterval;
4
+ /**
5
+ * Generate next delay time with exponential & randomized manner
6
+ *
7
+ * @param {number} tryCount - try count
8
+ * @param {number} baseDelay - starting delay interval
9
+ * @param {number} maxDelay - maximum delay interval
10
+ * @param {number} maxTryCount - max try count, if `tryCount` excess it, it returns undefined
11
+ * @return {number} - next interval time if (maxTryCount && `tryCount` >= `maxTryCount`)
12
+ * */
13
+ function jitterInterval(tryCount, baseDelay, maxDelay, maxTryCount) {
14
+ if ([tryCount, baseDelay, maxDelay].some(v => !isValid(v))) {
15
+ return undefined;
16
+ }
17
+ if (isValid(maxTryCount) && tryCount >= maxTryCount) {
18
+ return undefined;
19
+ }
20
+ const exp = Math.min(baseDelay * Math.pow(2, tryCount), maxDelay);
21
+ const result = Math.floor(exp / 2 + Math.random() * (exp / 2));
22
+ return Number.isSafeInteger(result) ? result : undefined;
23
+ }
24
+ /**
25
+ * Check value is expected interval value
26
+ *
27
+ * @param {any} value - given value, possible number
28
+ * @return {boolean} - is it expected?
29
+ * */
30
+ function isValid(value) {
31
+ return typeof value === 'number' && value > 0 && Number.isInteger(value) && Number.isSafeInteger(value);
32
+ }
33
+ //# sourceMappingURL=jitter-interval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jitter-interval.js","sourceRoot":"","sources":["../../src/util/jitter-interval.ts"],"names":[],"mappings":";;AASA,wCAUC;AAnBD;;;;;;;;KAQK;AACL,SAAgB,cAAc,CAAC,QAAgB,EAAE,SAAiB,EAAE,QAAgB,EAAE,WAAoB;IACtG,IAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACzD,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,IAAI,OAAO,CAAC,WAAW,CAAC,IAAI,QAAQ,IAAI,WAAW,EAAE,CAAC;QAClD,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,SAAA,CAAC,EAAI,QAAQ,CAAA,EAAE,QAAQ,CAAC,CAAC;IAC1D,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IAC/D,OAAO,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7D,CAAC;AAED;;;;;KAKK;AACL,SAAS,OAAO,CAAC,KAAc;IAC3B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC5G,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leyyo/common",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Common library",
5
5
  "keywords": [
6
6
  "common"
@@ -1,6 +0,0 @@
1
- import type { ClassLike } from "../shared";
2
- import { HttpError } from "./items";
3
- /**
4
- * Http error map to use easy
5
- * */
6
- export declare const HttpErrorMap: Record<number, ClassLike<HttpError>>;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HttpErrorMap = void 0;
4
- const items_1 = require("./items");
5
- // noinspection JSUnusedGlobalSymbols
6
- /**
7
- * Http error map to use easy
8
- * */
9
- exports.HttpErrorMap = {
10
- 400: items_1.BadRequestError,
11
- 401: items_1.UnauthorizedError,
12
- 402: items_1.PaymentRequiredError,
13
- 403: items_1.ForbiddenError,
14
- 404: items_1.NotFoundError,
15
- 405: items_1.MethodNotAllowedError,
16
- 406: items_1.NotAcceptableError,
17
- 407: items_1.ProxyAuthenticationRequiredError,
18
- 408: items_1.RequestTimeoutError,
19
- 409: items_1.ConflictError,
20
- 410: items_1.GoneError,
21
- 411: items_1.LengthRequiredError,
22
- 412: items_1.PreconditionFailedError,
23
- 413: items_1.ContentTooLargeError,
24
- };
25
- //# sourceMappingURL=http-error.map.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http-error.map.js","sourceRoot":"","sources":["../../src/error/http-error.map.ts"],"names":[],"mappings":";;;AACA,mCASiB;AAEjB,qCAAqC;AACrC;;KAEK;AACQ,QAAA,YAAY,GAAyC;IAC9D,GAAG,EAAE,uBAAe;IACpB,GAAG,EAAE,yBAAiB;IACtB,GAAG,EAAE,4BAAoB;IACzB,GAAG,EAAE,sBAAc;IACnB,GAAG,EAAE,qBAAa;IAClB,GAAG,EAAE,6BAAqB;IAC1B,GAAG,EAAE,0BAAkB;IACvB,GAAG,EAAE,wCAAgC;IACrC,GAAG,EAAE,2BAAmB;IACxB,GAAG,EAAE,qBAAa;IAClB,GAAG,EAAE,iBAAS;IACd,GAAG,EAAE,2BAAmB;IACxB,GAAG,EAAE,+BAAuB;IAC5B,GAAG,EAAE,4BAAoB;CAC5B,CAAA"}
@@ -1,10 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- import type { Opt } from "../../opt";
3
- /**
4
- * Http 400 Bad Request
5
- *
6
- * The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing).
7
- * */
8
- export declare class BadRequestError extends HttpError {
9
- constructor(message?: string, opt?: Opt);
10
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BadRequestError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * Http 400 Bad Request
7
- *
8
- * The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing).
9
- * */
10
- class BadRequestError extends http_error_1.HttpError {
11
- constructor(message, opt) {
12
- super(message !== null && message !== void 0 ? message : 'Bad request error', 400, opt);
13
- }
14
- }
15
- exports.BadRequestError = BadRequestError;
16
- //# sourceMappingURL=bad-request.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bad-request.error.js","sourceRoot":"","sources":["../../../src/error/items/bad-request.error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAGvC;;;;KAIK;AACL,MAAa,eAAgB,SAAQ,sBAAS;IAC1C,YAAY,OAAgB,EAAE,GAAS;QACnC,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,mBAAmB,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACpD,CAAC;CACJ;AAJD,0CAIC"}
@@ -1,10 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- import type { Opt } from "../../opt";
3
- /**
4
- * Http 409 Conflict
5
- *
6
- * Indicates that the request could not be processed because of conflict in the current state of the resource, such as an edit conflict between multiple simultaneous updates.
7
- * */
8
- export declare class ConflictError extends HttpError {
9
- constructor(message?: string, opt?: Opt);
10
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConflictError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * Http 409 Conflict
7
- *
8
- * Indicates that the request could not be processed because of conflict in the current state of the resource, such as an edit conflict between multiple simultaneous updates.
9
- * */
10
- class ConflictError extends http_error_1.HttpError {
11
- constructor(message, opt) {
12
- super(message !== null && message !== void 0 ? message : 'Conflict', 409, opt);
13
- }
14
- }
15
- exports.ConflictError = ConflictError;
16
- //# sourceMappingURL=conflict.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conflict.error.js","sourceRoot":"","sources":["../../../src/error/items/conflict.error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAGvC;;;;KAIK;AACL,MAAa,aAAc,SAAQ,sBAAS;IACxC,YAAY,OAAgB,EAAE,GAAS;QACnC,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,UAAU,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAC3C,CAAC;CACJ;AAJD,sCAIC"}
@@ -1,10 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- import type { Opt } from "../../opt";
3
- /**
4
- * Http 413 Content Too Large
5
- *
6
- * The request is larger than the server is willing or able to process.
7
- * */
8
- export declare class ContentTooLargeError extends HttpError {
9
- constructor(message?: string, opt?: Opt);
10
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContentTooLargeError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * Http 413 Content Too Large
7
- *
8
- * The request is larger than the server is willing or able to process.
9
- * */
10
- class ContentTooLargeError extends http_error_1.HttpError {
11
- constructor(message, opt) {
12
- super(message !== null && message !== void 0 ? message : 'Content too large', 413, opt);
13
- }
14
- }
15
- exports.ContentTooLargeError = ContentTooLargeError;
16
- //# sourceMappingURL=content-too-large.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"content-too-large.error.js","sourceRoot":"","sources":["../../../src/error/items/content-too-large.error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAGvC;;;;KAIK;AACL,MAAa,oBAAqB,SAAQ,sBAAS;IAC/C,YAAY,OAAgB,EAAE,GAAS;QACnC,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,mBAAmB,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACpD,CAAC;CACJ;AAJD,oDAIC"}
@@ -1,10 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- import type { Opt } from "../../opt";
3
- /**
4
- * Http 403 Forbidden
5
- *
6
- * The request was valid, but the server refuses action
7
- * */
8
- export declare class ForbiddenError extends HttpError {
9
- constructor(message?: string, opt?: Opt);
10
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ForbiddenError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * Http 403 Forbidden
7
- *
8
- * The request was valid, but the server refuses action
9
- * */
10
- class ForbiddenError extends http_error_1.HttpError {
11
- constructor(message, opt) {
12
- super(message !== null && message !== void 0 ? message : 'Forbidden', 403, opt);
13
- }
14
- }
15
- exports.ForbiddenError = ForbiddenError;
16
- //# sourceMappingURL=forbidden.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"forbidden.error.js","sourceRoot":"","sources":["../../../src/error/items/forbidden.error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAGvC;;;;KAIK;AACL,MAAa,cAAe,SAAQ,sBAAS;IACzC,YAAY,OAAgB,EAAE,GAAS;QACnC,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,WAAW,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC;CACJ;AAJD,wCAIC"}
@@ -1,10 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- import type { Opt } from "../../opt";
3
- /**
4
- * Http 410 Gone
5
- *
6
- * Indicates that the resource requested was previously in use but is no longer available and will not be available again
7
- * */
8
- export declare class GoneError extends HttpError {
9
- constructor(message?: string, opt?: Opt);
10
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GoneError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * Http 410 Gone
7
- *
8
- * Indicates that the resource requested was previously in use but is no longer available and will not be available again
9
- * */
10
- class GoneError extends http_error_1.HttpError {
11
- constructor(message, opt) {
12
- super(message !== null && message !== void 0 ? message : 'Gone', 410, opt);
13
- }
14
- }
15
- exports.GoneError = GoneError;
16
- //# sourceMappingURL=gone.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gone.error.js","sourceRoot":"","sources":["../../../src/error/items/gone.error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAGvC;;;;KAIK;AACL,MAAa,SAAU,SAAQ,sBAAS;IACpC,YAAY,OAAgB,EAAE,GAAS;QACnC,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACvC,CAAC;CACJ;AAJD,8BAIC"}
@@ -1,10 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- import type { Opt } from "../../opt";
3
- /**
4
- * Http 411 Length Required
5
- *
6
- * The request did not specify the length of its content, which is required by the requested resource.
7
- * */
8
- export declare class LengthRequiredError extends HttpError {
9
- constructor(message?: string, opt?: Opt);
10
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LengthRequiredError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * Http 411 Length Required
7
- *
8
- * The request did not specify the length of its content, which is required by the requested resource.
9
- * */
10
- class LengthRequiredError extends http_error_1.HttpError {
11
- constructor(message, opt) {
12
- super(message !== null && message !== void 0 ? message : 'Length required', 411, opt);
13
- }
14
- }
15
- exports.LengthRequiredError = LengthRequiredError;
16
- //# sourceMappingURL=length-required.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"length-required.error.js","sourceRoot":"","sources":["../../../src/error/items/length-required.error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAGvC;;;;KAIK;AACL,MAAa,mBAAoB,SAAQ,sBAAS;IAC9C,YAAY,OAAgB,EAAE,GAAS;QACnC,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,iBAAiB,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAClD,CAAC;CACJ;AAJD,kDAIC"}
@@ -1,10 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- import type { Opt } from "../../opt";
3
- /**
4
- * Http 405 Method Not Allowed
5
- *
6
- * A request method is not supported for the requested resource (for example, a GET request on a form that requires data to be presented
7
- * */
8
- export declare class MethodNotAllowedError extends HttpError {
9
- constructor(message?: string, opt?: Opt);
10
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MethodNotAllowedError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * Http 405 Method Not Allowed
7
- *
8
- * A request method is not supported for the requested resource (for example, a GET request on a form that requires data to be presented
9
- * */
10
- class MethodNotAllowedError extends http_error_1.HttpError {
11
- constructor(message, opt) {
12
- super(message !== null && message !== void 0 ? message : 'Method not allowed', 405, opt);
13
- }
14
- }
15
- exports.MethodNotAllowedError = MethodNotAllowedError;
16
- //# sourceMappingURL=method-not-allowed.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"method-not-allowed.error.js","sourceRoot":"","sources":["../../../src/error/items/method-not-allowed.error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAGvC;;;;KAIK;AACL,MAAa,qBAAsB,SAAQ,sBAAS;IAChD,YAAY,OAAgB,EAAE,GAAS;QACnC,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,oBAAoB,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACrD,CAAC;CACJ;AAJD,sDAIC"}
@@ -1,10 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- import type { Opt } from "../../opt";
3
- /**
4
- * Http 406 Not Acceptable
5
- *
6
- * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
7
- * */
8
- export declare class NotAcceptableError extends HttpError {
9
- constructor(message?: string, opt?: Opt);
10
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotAcceptableError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * Http 406 Not Acceptable
7
- *
8
- * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
9
- * */
10
- class NotAcceptableError extends http_error_1.HttpError {
11
- constructor(message, opt) {
12
- super(message !== null && message !== void 0 ? message : 'Not acceptable', 406, opt);
13
- }
14
- }
15
- exports.NotAcceptableError = NotAcceptableError;
16
- //# sourceMappingURL=not-acceptable.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"not-acceptable.error.js","sourceRoot":"","sources":["../../../src/error/items/not-acceptable.error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAGvC;;;;KAIK;AACL,MAAa,kBAAmB,SAAQ,sBAAS;IAC7C,YAAY,OAAgB,EAAE,GAAS;QACnC,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,gBAAgB,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACjD,CAAC;CACJ;AAJD,gDAIC"}
@@ -1,10 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- import type { Opt } from "../../opt";
3
- /**
4
- * Http 404 Not Found
5
- *
6
- * The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.
7
- * */
8
- export declare class NotFoundError extends HttpError {
9
- constructor(message?: string, opt?: Opt);
10
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotFoundError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * Http 404 Not Found
7
- *
8
- * The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.
9
- * */
10
- class NotFoundError extends http_error_1.HttpError {
11
- constructor(message, opt) {
12
- super(message !== null && message !== void 0 ? message : 'Not found', 404, opt);
13
- }
14
- }
15
- exports.NotFoundError = NotFoundError;
16
- //# sourceMappingURL=not-found.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"not-found.error.js","sourceRoot":"","sources":["../../../src/error/items/not-found.error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAGvC;;;;KAIK;AACL,MAAa,aAAc,SAAQ,sBAAS;IACxC,YAAY,OAAgB,EAAE,GAAS;QACnC,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,WAAW,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC;CACJ;AAJD,sCAIC"}
@@ -1,10 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- import type { Opt } from "../../opt";
3
- /**
4
- * Http 402 Payment Required
5
- *
6
- * The original intention was that this code might be used as part of some form of digital cash or micropayment scheme
7
- * */
8
- export declare class PaymentRequiredError extends HttpError {
9
- constructor(message?: string, opt?: Opt);
10
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentRequiredError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * Http 402 Payment Required
7
- *
8
- * The original intention was that this code might be used as part of some form of digital cash or micropayment scheme
9
- * */
10
- class PaymentRequiredError extends http_error_1.HttpError {
11
- constructor(message, opt) {
12
- super(message !== null && message !== void 0 ? message : 'Payment required', 402, opt);
13
- }
14
- }
15
- exports.PaymentRequiredError = PaymentRequiredError;
16
- //# sourceMappingURL=payment-required.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-required.error.js","sourceRoot":"","sources":["../../../src/error/items/payment-required.error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAGvC;;;;KAIK;AACL,MAAa,oBAAqB,SAAQ,sBAAS;IAC/C,YAAY,OAAgB,EAAE,GAAS;QACnC,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,kBAAkB,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACnD,CAAC;CACJ;AAJD,oDAIC"}
@@ -1,10 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- import type { Opt } from "../../opt";
3
- /**
4
- * Http 412 Precondition Failed
5
- *
6
- * The server does not meet one of the preconditions that the requester put on the request header fields.
7
- * */
8
- export declare class PreconditionFailedError extends HttpError {
9
- constructor(message?: string, opt?: Opt);
10
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PreconditionFailedError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * Http 412 Precondition Failed
7
- *
8
- * The server does not meet one of the preconditions that the requester put on the request header fields.
9
- * */
10
- class PreconditionFailedError extends http_error_1.HttpError {
11
- constructor(message, opt) {
12
- super(message !== null && message !== void 0 ? message : 'Precondition failed', 412, opt);
13
- }
14
- }
15
- exports.PreconditionFailedError = PreconditionFailedError;
16
- //# sourceMappingURL=precondition-failed.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"precondition-failed.error.js","sourceRoot":"","sources":["../../../src/error/items/precondition-failed.error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAGvC;;;;KAIK;AACL,MAAa,uBAAwB,SAAQ,sBAAS;IAClD,YAAY,OAAgB,EAAE,GAAS;QACnC,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,qBAAqB,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACtD,CAAC;CACJ;AAJD,0DAIC"}
@@ -1,10 +0,0 @@
1
- import { HttpError } from "./http.error";
2
- import type { Opt } from "../../opt";
3
- /**
4
- * Http 407 Proxy Authentication Required
5
- *
6
- * The client must first authenticate itself with the proxy.
7
- * */
8
- export declare class ProxyAuthenticationRequiredError extends HttpError {
9
- constructor(message?: string, opt?: Opt);
10
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProxyAuthenticationRequiredError = void 0;
4
- const http_error_1 = require("./http.error");
5
- /**
6
- * Http 407 Proxy Authentication Required
7
- *
8
- * The client must first authenticate itself with the proxy.
9
- * */
10
- class ProxyAuthenticationRequiredError extends http_error_1.HttpError {
11
- constructor(message, opt) {
12
- super(message !== null && message !== void 0 ? message : 'Proxy authentication required', 407, opt);
13
- }
14
- }
15
- exports.ProxyAuthenticationRequiredError = ProxyAuthenticationRequiredError;
16
- //# sourceMappingURL=proxy-authentication-required.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proxy-authentication-required.error.js","sourceRoot":"","sources":["../../../src/error/items/proxy-authentication-required.error.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAGvC;;;;KAIK;AACL,MAAa,gCAAiC,SAAQ,sBAAS;IAC3D,YAAY,OAAgB,EAAE,GAAS;QACnC,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,+BAA+B,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAChE,CAAC;CACJ;AAJD,4EAIC"}