@opra/common 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/cjs/document/factory/import-resource-class.js +1 -0
  2. package/cjs/document/factory/import-type-class.js +9 -2
  3. package/cjs/document/resource/collection.js +9 -9
  4. package/cjs/document/resource/singleton.js +4 -4
  5. package/cjs/url/opra-url.js +7 -7
  6. package/esm/document/api-document.js +37 -33
  7. package/esm/document/constants.js +6 -3
  8. package/esm/document/data-type/api-field.js +15 -12
  9. package/esm/document/data-type/builtin/any.type.js +8 -5
  10. package/esm/document/data-type/builtin/base64.type.js +8 -5
  11. package/esm/document/data-type/builtin/bigint.type.js +8 -5
  12. package/esm/document/data-type/builtin/boolean.type.js +11 -8
  13. package/esm/document/data-type/builtin/date.type.js +10 -7
  14. package/esm/document/data-type/builtin/guid.type.js +12 -9
  15. package/esm/document/data-type/builtin/index.js +13 -10
  16. package/esm/document/data-type/builtin/integer.type.js +13 -10
  17. package/esm/document/data-type/builtin/number.type.js +10 -7
  18. package/esm/document/data-type/builtin/object.type.js +8 -5
  19. package/esm/document/data-type/builtin/string.type.js +11 -8
  20. package/esm/document/data-type/builtin/time.type.js +10 -7
  21. package/esm/document/data-type/builtin/timestamp.type.js +12 -9
  22. package/esm/document/data-type/complex-type.js +34 -30
  23. package/esm/document/data-type/data-type.js +12 -9
  24. package/esm/document/data-type/enum-type.js +19 -15
  25. package/esm/document/data-type/mapped-type.js +29 -24
  26. package/esm/document/data-type/simple-type.js +21 -17
  27. package/esm/document/data-type/union-type.js +29 -26
  28. package/esm/document/factory/add-references.js +7 -3
  29. package/esm/document/factory/create-document.js +16 -10
  30. package/esm/document/factory/factory.js +37 -33
  31. package/esm/document/factory/import-resource-class.js +22 -15
  32. package/esm/document/factory/import-type-class.js +43 -26
  33. package/esm/document/factory/index.js +4 -1
  34. package/esm/document/factory/process-resources.js +16 -10
  35. package/esm/document/factory/process-types.js +37 -31
  36. package/esm/document/index.js +17 -14
  37. package/esm/document/resource/collection.js +50 -46
  38. package/esm/document/resource/resource.js +12 -9
  39. package/esm/document/resource/singleton.js +29 -25
  40. package/esm/document/utils/inspect.util.js +7 -4
  41. package/esm/document/utils/string-compare.util.js +5 -1
  42. package/esm/exception/enums/issue-severity.enum.js +5 -2
  43. package/esm/exception/error-issue.js +2 -1
  44. package/esm/exception/http-errors/bad-request.error.js +8 -4
  45. package/esm/exception/http-errors/failed-dependency.error.js +8 -4
  46. package/esm/exception/http-errors/forbidden.error.js +8 -4
  47. package/esm/exception/http-errors/internal-server.error.js +8 -4
  48. package/esm/exception/http-errors/method-not-allowed.error.js +8 -4
  49. package/esm/exception/http-errors/not-acceptable.error.js +8 -4
  50. package/esm/exception/http-errors/not-found.error.js +8 -4
  51. package/esm/exception/http-errors/unauthorized.error.js +8 -4
  52. package/esm/exception/http-errors/unprocessable-entity.error.js +8 -4
  53. package/esm/exception/index.js +18 -15
  54. package/esm/exception/opra-exception.js +7 -3
  55. package/esm/exception/resource-errors/resource-conflict.error.js +8 -4
  56. package/esm/exception/resource-errors/resource-not-found.error.js +8 -4
  57. package/esm/exception/wrap-exception.js +24 -20
  58. package/esm/filter/antlr/OpraFilterLexer.js +9 -6
  59. package/esm/filter/antlr/OpraFilterListener.js +5 -2
  60. package/esm/filter/antlr/OpraFilterParser.js +126 -79
  61. package/esm/filter/antlr/OpraFilterVisitor.js +5 -2
  62. package/esm/filter/ast/abstract/ast.js +5 -1
  63. package/esm/filter/ast/abstract/expression.js +6 -2
  64. package/esm/filter/ast/abstract/literal.js +6 -2
  65. package/esm/filter/ast/abstract/term.js +6 -2
  66. package/esm/filter/ast/expressions/arithmetic-expression.js +8 -3
  67. package/esm/filter/ast/expressions/array-expression.js +6 -2
  68. package/esm/filter/ast/expressions/comparison-expression.js +6 -2
  69. package/esm/filter/ast/expressions/logical-expression.js +6 -2
  70. package/esm/filter/ast/expressions/parentheses-expression.js +6 -2
  71. package/esm/filter/ast/index.js +19 -16
  72. package/esm/filter/ast/terms/boolean-literal.js +6 -2
  73. package/esm/filter/ast/terms/date-literal.js +12 -8
  74. package/esm/filter/ast/terms/external-constant.js +6 -2
  75. package/esm/filter/ast/terms/null-literal.js +6 -2
  76. package/esm/filter/ast/terms/number-literal.js +8 -4
  77. package/esm/filter/ast/terms/qualified-identifier.js +6 -2
  78. package/esm/filter/ast/terms/string-literal.js +8 -4
  79. package/esm/filter/ast/terms/time-literal.js +10 -6
  80. package/esm/filter/build.js +69 -45
  81. package/esm/filter/errors.js +9 -3
  82. package/esm/filter/filter-tree-visitor.js +31 -26
  83. package/esm/filter/index.js +8 -5
  84. package/esm/filter/opra-error-listener.js +8 -4
  85. package/esm/filter/parse.js +19 -14
  86. package/esm/filter/utils.js +7 -2
  87. package/esm/helpers/function-utils.js +14 -8
  88. package/esm/helpers/get-stack-filename.js +5 -1
  89. package/esm/helpers/index.js +11 -8
  90. package/esm/helpers/is-url.js +5 -1
  91. package/esm/helpers/mixin-utils.js +7 -2
  92. package/esm/helpers/object-utils.js +12 -6
  93. package/esm/helpers/path-to-object-tree.js +5 -1
  94. package/esm/helpers/responsive-map.js +5 -1
  95. package/esm/helpers/type-guards.js +17 -7
  96. package/esm/http/codecs/boolean-codec.js +5 -1
  97. package/esm/http/codecs/date-codec.js +5 -1
  98. package/esm/http/codecs/filter-codec.js +9 -5
  99. package/esm/http/codecs/integer-codec.js +6 -2
  100. package/esm/http/codecs/number-codec.js +5 -1
  101. package/esm/http/codecs/string-codec.js +5 -1
  102. package/esm/http/enums/http-headers-codes.enum.js +5 -2
  103. package/esm/http/enums/http-status-codes.enum.js +5 -2
  104. package/esm/http/enums/http-status-messages.js +4 -1
  105. package/esm/http/http-headers.js +9 -5
  106. package/esm/http/http-message.host.js +18 -13
  107. package/esm/http/http-params.js +25 -20
  108. package/esm/http/http-request-message.js +22 -18
  109. package/esm/http/http-response-message.js +28 -23
  110. package/esm/http/index.js +17 -14
  111. package/esm/http/interfaces/client-http-headers.interface.js +2 -1
  112. package/esm/http/interfaces/cookie-options.interface.js +2 -1
  113. package/esm/http/interfaces/server-http-headers.interface.js +2 -1
  114. package/esm/i18n/i18n.js +28 -23
  115. package/esm/i18n/index.js +9 -5
  116. package/esm/i18n/string-utils.js +7 -2
  117. package/esm/i18n/translate.js +7 -3
  118. package/esm/index.js +16 -11
  119. package/esm/schema/constants.js +4 -1
  120. package/esm/schema/data-type/complex-type.interface.js +5 -2
  121. package/esm/schema/data-type/data-type.interface.js +2 -1
  122. package/esm/schema/data-type/enum-type.interface.js +5 -2
  123. package/esm/schema/data-type/field.interface.js +2 -1
  124. package/esm/schema/data-type/mapped-type.interface.js +5 -2
  125. package/esm/schema/data-type/simple-type.interface.js +5 -2
  126. package/esm/schema/data-type/union-type.interface.js +5 -2
  127. package/esm/schema/document.interface.js +2 -1
  128. package/esm/schema/index.js +34 -31
  129. package/esm/schema/resource/collection.interface.js +5 -2
  130. package/esm/schema/resource/container.interface.js +5 -2
  131. package/esm/schema/resource/endpoint.interface.js +2 -1
  132. package/esm/schema/resource/resource.interface.js +2 -1
  133. package/esm/schema/resource/singleton.interface.js +5 -2
  134. package/esm/schema/type-guards.js +53 -40
  135. package/esm/types.js +2 -1
  136. package/esm/url/index.js +8 -5
  137. package/esm/url/opra-url-path-component.js +7 -3
  138. package/esm/url/opra-url-path.js +18 -14
  139. package/esm/url/opra-url.js +25 -21
  140. package/esm/url/utils/decode-path-component.js +8 -4
  141. package/esm/url/utils/encode-path-component.js +8 -3
  142. package/esm/utils/path-utils.js +7 -2
  143. package/package.json +5 -4
  144. package/{esm → types}/document/factory/import-resource-class.d.ts +1 -0
  145. package/{esm → types}/document/resource/collection.d.ts +10 -10
  146. package/{esm → types}/document/resource/singleton.d.ts +4 -4
  147. package/{esm → types}/schema/resource/collection.interface.d.ts +6 -6
  148. package/{esm → types}/url/opra-url.d.ts +3 -3
  149. package/{esm → types}/document/api-document.d.ts +0 -0
  150. package/{esm → types}/document/constants.d.ts +0 -0
  151. package/{esm → types}/document/data-type/api-field.d.ts +0 -0
  152. package/{esm → types}/document/data-type/builtin/any.type.d.ts +0 -0
  153. package/{esm → types}/document/data-type/builtin/base64.type.d.ts +0 -0
  154. package/{esm → types}/document/data-type/builtin/bigint.type.d.ts +0 -0
  155. package/{esm → types}/document/data-type/builtin/boolean.type.d.ts +0 -0
  156. package/{esm → types}/document/data-type/builtin/date.type.d.ts +0 -0
  157. package/{esm → types}/document/data-type/builtin/guid.type.d.ts +0 -0
  158. package/{esm → types}/document/data-type/builtin/index.d.ts +0 -0
  159. package/{esm → types}/document/data-type/builtin/integer.type.d.ts +0 -0
  160. package/{esm → types}/document/data-type/builtin/number.type.d.ts +0 -0
  161. package/{esm → types}/document/data-type/builtin/object.type.d.ts +0 -0
  162. package/{esm → types}/document/data-type/builtin/string.type.d.ts +0 -0
  163. package/{esm → types}/document/data-type/builtin/time.type.d.ts +0 -0
  164. package/{esm → types}/document/data-type/builtin/timestamp.type.d.ts +0 -0
  165. package/{esm → types}/document/data-type/complex-type.d.ts +0 -0
  166. package/{esm → types}/document/data-type/data-type.d.ts +0 -0
  167. package/{esm → types}/document/data-type/enum-type.d.ts +0 -0
  168. package/{esm → types}/document/data-type/mapped-type.d.ts +0 -0
  169. package/{esm → types}/document/data-type/simple-type.d.ts +0 -0
  170. package/{esm → types}/document/data-type/union-type.d.ts +0 -0
  171. package/{esm → types}/document/factory/add-references.d.ts +0 -0
  172. package/{esm → types}/document/factory/create-document.d.ts +0 -0
  173. package/{esm → types}/document/factory/factory.d.ts +0 -0
  174. package/{esm → types}/document/factory/import-type-class.d.ts +0 -0
  175. package/{esm → types}/document/factory/index.d.ts +0 -0
  176. package/{esm → types}/document/factory/process-resources.d.ts +0 -0
  177. package/{esm → types}/document/factory/process-types.d.ts +0 -0
  178. package/{esm → types}/document/index.d.ts +0 -0
  179. package/{esm → types}/document/resource/resource.d.ts +0 -0
  180. package/{esm → types}/document/utils/inspect.util.d.ts +0 -0
  181. package/{esm → types}/document/utils/string-compare.util.d.ts +0 -0
  182. package/{esm → types}/exception/enums/issue-severity.enum.d.ts +0 -0
  183. package/{esm → types}/exception/error-issue.d.ts +0 -0
  184. package/{esm → types}/exception/http-errors/bad-request.error.d.ts +0 -0
  185. package/{esm → types}/exception/http-errors/failed-dependency.error.d.ts +0 -0
  186. package/{esm → types}/exception/http-errors/forbidden.error.d.ts +0 -0
  187. package/{esm → types}/exception/http-errors/internal-server.error.d.ts +0 -0
  188. package/{esm → types}/exception/http-errors/method-not-allowed.error.d.ts +0 -0
  189. package/{esm → types}/exception/http-errors/not-acceptable.error.d.ts +0 -0
  190. package/{esm → types}/exception/http-errors/not-found.error.d.ts +0 -0
  191. package/{esm → types}/exception/http-errors/unauthorized.error.d.ts +0 -0
  192. package/{esm → types}/exception/http-errors/unprocessable-entity.error.d.ts +0 -0
  193. package/{esm → types}/exception/index.d.ts +0 -0
  194. package/{esm → types}/exception/opra-exception.d.ts +0 -0
  195. package/{esm → types}/exception/resource-errors/resource-conflict.error.d.ts +0 -0
  196. package/{esm → types}/exception/resource-errors/resource-not-found.error.d.ts +0 -0
  197. package/{esm → types}/exception/wrap-exception.d.ts +0 -0
  198. package/{esm → types}/filter/antlr/OpraFilterLexer.d.ts +0 -0
  199. package/{esm → types}/filter/antlr/OpraFilterListener.d.ts +0 -0
  200. package/{esm → types}/filter/antlr/OpraFilterParser.d.ts +0 -0
  201. package/{esm → types}/filter/antlr/OpraFilterVisitor.d.ts +0 -0
  202. package/{esm → types}/filter/ast/abstract/ast.d.ts +0 -0
  203. package/{esm → types}/filter/ast/abstract/expression.d.ts +0 -0
  204. package/{esm → types}/filter/ast/abstract/literal.d.ts +0 -0
  205. package/{esm → types}/filter/ast/abstract/term.d.ts +0 -0
  206. package/{esm → types}/filter/ast/expressions/arithmetic-expression.d.ts +0 -0
  207. package/{esm → types}/filter/ast/expressions/array-expression.d.ts +0 -0
  208. package/{esm → types}/filter/ast/expressions/comparison-expression.d.ts +0 -0
  209. package/{esm → types}/filter/ast/expressions/logical-expression.d.ts +0 -0
  210. package/{esm → types}/filter/ast/expressions/parentheses-expression.d.ts +0 -0
  211. package/{esm → types}/filter/ast/index.d.ts +0 -0
  212. package/{esm → types}/filter/ast/terms/boolean-literal.d.ts +0 -0
  213. package/{esm → types}/filter/ast/terms/date-literal.d.ts +0 -0
  214. package/{esm → types}/filter/ast/terms/external-constant.d.ts +0 -0
  215. package/{esm → types}/filter/ast/terms/null-literal.d.ts +0 -0
  216. package/{esm → types}/filter/ast/terms/number-literal.d.ts +0 -0
  217. package/{esm → types}/filter/ast/terms/qualified-identifier.d.ts +0 -0
  218. package/{esm → types}/filter/ast/terms/string-literal.d.ts +0 -0
  219. package/{esm → types}/filter/ast/terms/time-literal.d.ts +0 -0
  220. package/{esm → types}/filter/build.d.ts +0 -0
  221. package/{esm → types}/filter/errors.d.ts +0 -0
  222. package/{esm → types}/filter/filter-tree-visitor.d.ts +0 -0
  223. package/{esm → types}/filter/index.d.ts +0 -0
  224. package/{esm → types}/filter/opra-error-listener.d.ts +0 -0
  225. package/{esm → types}/filter/parse.d.ts +0 -0
  226. package/{esm → types}/filter/utils.d.ts +0 -0
  227. package/{esm → types}/helpers/function-utils.d.ts +0 -0
  228. package/{esm → types}/helpers/get-stack-filename.d.ts +0 -0
  229. package/{esm → types}/helpers/index.d.ts +0 -0
  230. package/{esm → types}/helpers/is-url.d.ts +0 -0
  231. package/{esm → types}/helpers/mixin-utils.d.ts +0 -0
  232. package/{esm → types}/helpers/object-utils.d.ts +0 -0
  233. package/{esm → types}/helpers/path-to-object-tree.d.ts +0 -0
  234. package/{esm → types}/helpers/responsive-map.d.ts +0 -0
  235. package/{esm → types}/helpers/type-guards.d.ts +0 -0
  236. package/{esm → types}/http/codecs/boolean-codec.d.ts +0 -0
  237. package/{esm → types}/http/codecs/date-codec.d.ts +0 -0
  238. package/{esm → types}/http/codecs/filter-codec.d.ts +0 -0
  239. package/{esm → types}/http/codecs/integer-codec.d.ts +0 -0
  240. package/{esm → types}/http/codecs/number-codec.d.ts +0 -0
  241. package/{esm → types}/http/codecs/string-codec.d.ts +0 -0
  242. package/{esm → types}/http/enums/http-headers-codes.enum.d.ts +0 -0
  243. package/{esm → types}/http/enums/http-status-codes.enum.d.ts +0 -0
  244. package/{esm → types}/http/enums/http-status-messages.d.ts +0 -0
  245. package/{esm → types}/http/http-headers.d.ts +0 -0
  246. package/{esm → types}/http/http-message.host.d.ts +0 -0
  247. package/{esm → types}/http/http-params.d.ts +0 -0
  248. package/{esm → types}/http/http-request-message.d.ts +0 -0
  249. package/{esm → types}/http/http-response-message.d.ts +0 -0
  250. package/{esm → types}/http/index.d.ts +0 -0
  251. package/{esm → types}/http/interfaces/client-http-headers.interface.d.ts +0 -0
  252. package/{esm → types}/http/interfaces/cookie-options.interface.d.ts +0 -0
  253. package/{esm → types}/http/interfaces/server-http-headers.interface.d.ts +0 -0
  254. package/{esm → types}/http/multipart/batch-multipart.d.ts +0 -0
  255. package/{esm → types}/http/multipart/http-request-content.d.ts +0 -0
  256. package/{esm → types}/http/multipart/http-response-content.d.ts +0 -0
  257. package/{esm → types}/http/multipart/index.d.ts +0 -0
  258. package/{esm → types}/i18n/i18n.d.ts +0 -0
  259. package/{esm → types}/i18n/index.d.ts +0 -0
  260. package/{esm → types}/i18n/string-utils.d.ts +0 -0
  261. package/{esm → types}/i18n/translate.d.ts +0 -0
  262. package/{esm → types}/index.d.ts +0 -0
  263. package/{esm → types}/schema/constants.d.ts +0 -0
  264. package/{esm → types}/schema/data-type/complex-type.interface.d.ts +0 -0
  265. package/{esm → types}/schema/data-type/data-type.interface.d.ts +0 -0
  266. package/{esm → types}/schema/data-type/enum-type.interface.d.ts +0 -0
  267. package/{esm → types}/schema/data-type/field.interface.d.ts +0 -0
  268. package/{esm → types}/schema/data-type/mapped-type.interface.d.ts +0 -0
  269. package/{esm → types}/schema/data-type/simple-type.interface.d.ts +0 -0
  270. package/{esm → types}/schema/data-type/union-type.interface.d.ts +0 -0
  271. package/{esm → types}/schema/document.interface.d.ts +0 -0
  272. package/{esm → types}/schema/index.d.ts +0 -0
  273. package/{esm → types}/schema/resource/container.interface.d.ts +0 -0
  274. package/{esm → types}/schema/resource/endpoint.interface.d.ts +0 -0
  275. package/{esm → types}/schema/resource/resource.interface.d.ts +0 -0
  276. package/{esm → types}/schema/resource/singleton.interface.d.ts +2 -2
  277. /package/{esm → types}/schema/type-guards.d.ts +0 -0
  278. /package/{esm → types}/types.d.ts +0 -0
  279. /package/{esm → types}/url/index.d.ts +0 -0
  280. /package/{esm → types}/url/opra-url-path-component.d.ts +0 -0
  281. /package/{esm → types}/url/opra-url-path.d.ts +0 -0
  282. /package/{esm → types}/url/utils/decode-path-component.d.ts +0 -0
  283. /package/{esm → types}/url/utils/encode-path-component.d.ts +0 -0
  284. /package/{esm → types}/utils/path-utils.d.ts +0 -0
@@ -1,12 +1,16 @@
1
- import antlr4 from '@browsery/antlr4';
2
- import { ArithmeticExpressionContext, LogicalExpressionContext, } from './antlr/OpraFilterParser.js';
3
- import { ArithmeticExpression, ArrayExpression, BooleanLiteral, ComparisonExpression, DateLiteral, LogicalExpression, NullLiteral, NumberLiteral, ParenthesesExpression, QualifiedIdentifier, StringLiteral, TimeLiteral } from './ast/index.js';
4
- import { ExternalConstant } from './ast/terms/external-constant.js';
5
- import { SyntaxError } from './errors.js';
6
- import { unquoteFilterString } from './utils.js';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FilterTreeVisitor = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const antlr4_1 = tslib_1.__importDefault(require("@browsery/antlr4"));
6
+ const OpraFilterParser_js_1 = require("./antlr/OpraFilterParser.js");
7
+ const index_js_1 = require("./ast/index.js");
8
+ const external_constant_js_1 = require("./ast/terms/external-constant.js");
9
+ const errors_js_1 = require("./errors.js");
10
+ const utils_js_1 = require("./utils.js");
7
11
  // Fix: antlr4 d.ts files are invalid
8
- const ParseTreeVisitor = antlr4.tree.ParseTreeVisitor;
9
- export class FilterTreeVisitor extends ParseTreeVisitor {
12
+ const ParseTreeVisitor = antlr4_1.default.tree.ParseTreeVisitor;
13
+ class FilterTreeVisitor extends ParseTreeVisitor {
10
14
  constructor(options) {
11
15
  super();
12
16
  this._timeZone = options?.timeZone;
@@ -27,31 +31,31 @@ export class FilterTreeVisitor extends ParseTreeVisitor {
27
31
  return ctx.getText();
28
32
  }
29
33
  visitNullLiteral() {
30
- return new NullLiteral();
34
+ return new index_js_1.NullLiteral();
31
35
  }
32
36
  visitBooleanLiteral(ctx) {
33
- return new BooleanLiteral(ctx.getText() === 'true');
37
+ return new index_js_1.BooleanLiteral(ctx.getText() === 'true');
34
38
  }
35
39
  visitNumberLiteral(ctx) {
36
- return new NumberLiteral(ctx.getText());
40
+ return new index_js_1.NumberLiteral(ctx.getText());
37
41
  }
38
42
  visitStringLiteral(ctx) {
39
- return new StringLiteral(unquoteFilterString(ctx.getText()));
43
+ return new index_js_1.StringLiteral((0, utils_js_1.unquoteFilterString)(ctx.getText()));
40
44
  }
41
45
  visitInfinityLiteral() {
42
- return new NumberLiteral(Infinity);
46
+ return new index_js_1.NumberLiteral(Infinity);
43
47
  }
44
48
  visitDateLiteral(ctx) {
45
- return new DateLiteral(unquoteFilterString(ctx.getText()));
49
+ return new index_js_1.DateLiteral((0, utils_js_1.unquoteFilterString)(ctx.getText()));
46
50
  }
47
51
  visitDateTimeLiteral(ctx) {
48
- return new DateLiteral(unquoteFilterString(ctx.getText()));
52
+ return new index_js_1.DateLiteral((0, utils_js_1.unquoteFilterString)(ctx.getText()));
49
53
  }
50
54
  visitTimeLiteral(ctx) {
51
- return new TimeLiteral(unquoteFilterString(ctx.getText()));
55
+ return new index_js_1.TimeLiteral((0, utils_js_1.unquoteFilterString)(ctx.getText()));
52
56
  }
53
57
  visitQualifiedIdentifierTerm(ctx) {
54
- return new QualifiedIdentifier(ctx.getText());
58
+ return new index_js_1.QualifiedIdentifier(ctx.getText());
55
59
  }
56
60
  visitPolarityExpression(ctx) {
57
61
  const x = this.visit(ctx.expression());
@@ -60,20 +64,20 @@ export class FilterTreeVisitor extends ParseTreeVisitor {
60
64
  x.value *= -1;
61
65
  return x;
62
66
  }
63
- throw new SyntaxError('Unexpected token "' + ctx.getText() + '"');
67
+ throw new errors_js_1.SyntaxError('Unexpected token "' + ctx.getText() + '"');
64
68
  }
65
69
  visitExternalConstantTerm(ctx) {
66
- return new ExternalConstant(ctx.externalConstant().getText().substring(1));
70
+ return new external_constant_js_1.ExternalConstant(ctx.externalConstant().getText().substring(1));
67
71
  }
68
72
  visitParenthesizedExpression(ctx) {
69
73
  const expression = this.visit(ctx.expression());
70
- return new ParenthesesExpression(expression);
74
+ return new index_js_1.ParenthesesExpression(expression);
71
75
  }
72
76
  visitArrayExpression(ctx) {
73
- return new ArrayExpression(ctx.expression_list().map(child => this.visit(child)));
77
+ return new index_js_1.ArrayExpression(ctx.expression_list().map(child => this.visit(child)));
74
78
  }
75
79
  visitComparisonExpression(ctx) {
76
- return new ComparisonExpression({
80
+ return new index_js_1.ComparisonExpression({
77
81
  op: ctx.compOp().getText(),
78
82
  left: this.visit(ctx.expression(0)),
79
83
  right: this.visit(ctx.expression(1))
@@ -83,7 +87,7 @@ export class FilterTreeVisitor extends ParseTreeVisitor {
83
87
  const items = [];
84
88
  const wrapChildren = (arr, op) => {
85
89
  for (const c of arr) {
86
- if (c instanceof LogicalExpressionContext && c.logOp().getText() === op) {
90
+ if (c instanceof OpraFilterParser_js_1.LogicalExpressionContext && c.logOp().getText() === op) {
87
91
  wrapChildren(c.expression_list(), c.logOp().getText());
88
92
  continue;
89
93
  }
@@ -92,17 +96,17 @@ export class FilterTreeVisitor extends ParseTreeVisitor {
92
96
  }
93
97
  };
94
98
  wrapChildren(ctx.expression_list(), ctx.logOp().getText());
95
- return new LogicalExpression({
99
+ return new index_js_1.LogicalExpression({
96
100
  op: ctx.logOp().getText(),
97
101
  items
98
102
  });
99
103
  }
100
104
  visitArithmeticExpression(ctx) {
101
- const exp = new ArithmeticExpression();
105
+ const exp = new index_js_1.ArithmeticExpression();
102
106
  const wrapChildren = (children, op) => {
103
107
  for (let i = 0, len = children.length; i < len; i++) {
104
108
  const child = children[i];
105
- if (child instanceof ArithmeticExpressionContext) {
109
+ if (child instanceof OpraFilterParser_js_1.ArithmeticExpressionContext) {
106
110
  wrapChildren(child.expression_list(), child.arthOp().getText());
107
111
  continue;
108
112
  }
@@ -114,3 +118,4 @@ export class FilterTreeVisitor extends ParseTreeVisitor {
114
118
  return exp;
115
119
  }
116
120
  }
121
+ exports.FilterTreeVisitor = FilterTreeVisitor;
@@ -1,5 +1,8 @@
1
- export * from './ast/index.js';
2
- export * from './parse.js';
3
- export * from './build.js';
4
- export * from './opra-error-listener.js';
5
- export * from './filter-tree-visitor.js';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./ast/index.js"), exports);
5
+ tslib_1.__exportStar(require("./parse.js"), exports);
6
+ tslib_1.__exportStar(require("./build.js"), exports);
7
+ tslib_1.__exportStar(require("./opra-error-listener.js"), exports);
8
+ tslib_1.__exportStar(require("./filter-tree-visitor.js"), exports);
@@ -1,11 +1,15 @@
1
- import { ErrorListener } from '@browsery/antlr4';
2
- import { FilterParseError } from './errors.js';
3
- export class OpraErrorListener extends ErrorListener {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OpraErrorListener = void 0;
4
+ const antlr4_1 = require("@browsery/antlr4");
5
+ const errors_js_1 = require("./errors.js");
6
+ class OpraErrorListener extends antlr4_1.ErrorListener {
4
7
  constructor(errors) {
5
8
  super();
6
9
  this.errors = errors;
7
10
  }
8
11
  syntaxError(recognizer, offendingSymbol, line, column, msg, e) {
9
- this.errors.push(new FilterParseError(msg, { recognizer, offendingSymbol, line, column, e }));
12
+ this.errors.push(new errors_js_1.FilterParseError(msg, { recognizer, offendingSymbol, line, column, e }));
10
13
  }
11
14
  }
15
+ exports.OpraErrorListener = OpraErrorListener;
@@ -1,23 +1,27 @@
1
- import { CharStream, CommonTokenStream } from '@browsery/antlr4';
2
- import OpraFilterLexer from './antlr/OpraFilterLexer.js';
3
- import OpraFilterParser from './antlr/OpraFilterParser.js';
4
- import { SyntaxError } from './errors.js';
5
- import { FilterTreeVisitor } from './filter-tree-visitor.js';
6
- import { OpraErrorListener } from './opra-error-listener.js';
7
- export function parseFilter(text, visitor) {
8
- const chars = new CharStream(text);
9
- const lexer = new OpraFilterLexer(chars);
10
- const tokenStream = new CommonTokenStream(lexer);
11
- const parser = new OpraFilterParser(tokenStream);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseFilter = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const antlr4_1 = require("@browsery/antlr4");
6
+ const OpraFilterLexer_js_1 = tslib_1.__importDefault(require("./antlr/OpraFilterLexer.js"));
7
+ const OpraFilterParser_js_1 = tslib_1.__importDefault(require("./antlr/OpraFilterParser.js"));
8
+ const errors_js_1 = require("./errors.js");
9
+ const filter_tree_visitor_js_1 = require("./filter-tree-visitor.js");
10
+ const opra_error_listener_js_1 = require("./opra-error-listener.js");
11
+ function parseFilter(text, visitor) {
12
+ const chars = new antlr4_1.CharStream(text);
13
+ const lexer = new OpraFilterLexer_js_1.default(chars);
14
+ const tokenStream = new antlr4_1.CommonTokenStream(lexer);
15
+ const parser = new OpraFilterParser_js_1.default(tokenStream);
12
16
  parser.buildParseTrees = true;
13
17
  const errors = [];
14
- const errorListener = new OpraErrorListener(errors);
18
+ const errorListener = new opra_error_listener_js_1.OpraErrorListener(errors);
15
19
  lexer.removeErrorListeners();
16
20
  lexer.addErrorListener(errorListener);
17
21
  parser.removeErrorListeners();
18
22
  parser.addErrorListener(errorListener);
19
23
  const tree = parser.root();
20
- visitor = visitor || new FilterTreeVisitor();
24
+ visitor = visitor || new filter_tree_visitor_js_1.FilterTreeVisitor();
21
25
  const result = visitor.visit(tree);
22
26
  if (errors.length) {
23
27
  const errMsgs = [];
@@ -27,9 +31,10 @@ export function parseFilter(text, visitor) {
27
31
  ? (' at ' + 'line: ' + err.line + ' column: ' + err.column)
28
32
  : (' at ' + ' column: ' + err.column)));
29
33
  }
30
- const e = new SyntaxError(errMsgs.join('\n'));
34
+ const e = new errors_js_1.SyntaxError(errMsgs.join('\n'));
31
35
  e.errors = errors;
32
36
  throw e;
33
37
  }
34
38
  return result;
35
39
  }
40
+ exports.parseFilter = parseFilter;
@@ -1,3 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.unquoteFilterString = exports.quoteFilterString = void 0;
1
4
  const quotesRegEx = /'/g;
2
5
  const escapeRegEx = /(\\)/g;
3
6
  const unescapeRegEx = /\\(.)/g;
@@ -7,15 +10,17 @@ function escapeString(s) {
7
10
  function unescapeString(s) {
8
11
  return s.replace(unescapeRegEx, '$1');
9
12
  }
10
- export function quoteFilterString(s) {
13
+ function quoteFilterString(s) {
11
14
  return "'" +
12
15
  escapeString(s).replace(quotesRegEx, '\\\'') +
13
16
  "'";
14
17
  }
15
- export function unquoteFilterString(s) {
18
+ exports.quoteFilterString = quoteFilterString;
19
+ function unquoteFilterString(s) {
16
20
  if (s && (s.startsWith("'") || s.startsWith('"')) && s.endsWith(s.charAt(0))) {
17
21
  return unescapeString(s.substring(1, s.length - 1));
18
22
  }
19
23
  /* istanbul ignore next */
20
24
  return s;
21
25
  }
26
+ exports.unquoteFilterString = unquoteFilterString;
@@ -1,19 +1,25 @@
1
- import promisify from 'putil-promisify';
2
- import { isConstructor } from './type-guards.js';
3
- export async function resolveThunk(thunk) {
4
- thunk = promisify.isPromise(thunk) ? await thunk : thunk;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveClass = exports.resolveThunk = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const putil_promisify_1 = tslib_1.__importDefault(require("putil-promisify"));
6
+ const type_guards_js_1 = require("./type-guards.js");
7
+ async function resolveThunk(thunk) {
8
+ thunk = putil_promisify_1.default.isPromise(thunk) ? await thunk : thunk;
5
9
  if (typeof thunk === 'function') {
6
- if (isConstructor(thunk))
10
+ if ((0, type_guards_js_1.isConstructor)(thunk))
7
11
  return thunk;
8
12
  return resolveClass(thunk());
9
13
  }
10
14
  return thunk;
11
15
  }
12
- export async function resolveClass(thunk) {
13
- thunk = promisify.isPromise(thunk) ? await thunk : thunk;
16
+ exports.resolveThunk = resolveThunk;
17
+ async function resolveClass(thunk) {
18
+ thunk = putil_promisify_1.default.isPromise(thunk) ? await thunk : thunk;
14
19
  if (typeof thunk !== 'function')
15
20
  throw new Error(`No Class type resolved`);
16
- if (isConstructor(thunk))
21
+ if ((0, type_guards_js_1.isConstructor)(thunk))
17
22
  return thunk;
18
23
  return resolveClass(thunk());
19
24
  }
25
+ exports.resolveClass = resolveClass;
@@ -1,5 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getStackFileName = void 0;
1
4
  const PATH_PATTERN = /^(?:file:\/\/)?(.+)$/;
2
- export function getStackFileName(position = 1) {
5
+ function getStackFileName(position = 1) {
3
6
  if (position >= Error.stackTraceLimit) {
4
7
  throw new TypeError('getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `' +
5
8
  position + '` and Error.stackTraceLimit was: `' + Error.stackTraceLimit + '`');
@@ -18,3 +21,4 @@ export function getStackFileName(position = 1) {
18
21
  }
19
22
  return '';
20
23
  }
24
+ exports.getStackFileName = getStackFileName;
@@ -1,8 +1,11 @@
1
- export * from './function-utils.js';
2
- export * from './get-stack-filename.js';
3
- export * from './is-url.js';
4
- export * from './mixin-utils.js';
5
- export * from './object-utils.js';
6
- export * from './path-to-object-tree.js';
7
- export * from './responsive-map.js';
8
- export * from './type-guards.js';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./function-utils.js"), exports);
5
+ tslib_1.__exportStar(require("./get-stack-filename.js"), exports);
6
+ tslib_1.__exportStar(require("./is-url.js"), exports);
7
+ tslib_1.__exportStar(require("./mixin-utils.js"), exports);
8
+ tslib_1.__exportStar(require("./object-utils.js"), exports);
9
+ tslib_1.__exportStar(require("./path-to-object-tree.js"), exports);
10
+ tslib_1.__exportStar(require("./responsive-map.js"), exports);
11
+ tslib_1.__exportStar(require("./type-guards.js"), exports);
@@ -1,4 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isUrl = void 0;
1
4
  const URL_PATTERN = /^(https?:\/\/.)[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/i;
2
- export function isUrl(url) {
5
+ function isUrl(url) {
3
6
  return URL_PATTERN.test(url);
4
7
  }
8
+ exports.isUrl = isUrl;
@@ -1,4 +1,7 @@
1
- export function applyMixins(derivedCtor, baseCtor, filter) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inheritPropertyInitializers = exports.applyMixins = void 0;
4
+ function applyMixins(derivedCtor, baseCtor, filter) {
2
5
  for (const k of Object.getOwnPropertyNames(baseCtor.prototype)) {
3
6
  if ((k === 'constructor' || k === '__proto__' || k === 'toJSON' || k === 'toString') ||
4
7
  filter && !filter(k))
@@ -7,7 +10,8 @@ export function applyMixins(derivedCtor, baseCtor, filter) {
7
10
  Object.create(null));
8
11
  }
9
12
  }
10
- export function inheritPropertyInitializers(target, sourceClass,
13
+ exports.applyMixins = applyMixins;
14
+ function inheritPropertyInitializers(target, sourceClass,
11
15
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
12
16
  isPropertyInherited = (key) => true) {
13
17
  try {
@@ -25,3 +29,4 @@ isPropertyInherited = (key) => true) {
25
29
  //
26
30
  }
27
31
  }
32
+ exports.inheritPropertyInitializers = inheritPropertyInitializers;
@@ -1,18 +1,23 @@
1
- import isPlainObject from 'putil-isplainobject';
2
- import merge from 'putil-merge';
3
- export function cloneObject(obj, jsonOnly) {
4
- return merge({}, obj, {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.omitUndefined = exports.cloneObject = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const putil_isplainobject_1 = tslib_1.__importDefault(require("putil-isplainobject"));
6
+ const putil_merge_1 = tslib_1.__importDefault(require("putil-merge"));
7
+ function cloneObject(obj, jsonOnly) {
8
+ return (0, putil_merge_1.default)({}, obj, {
5
9
  deep: true,
6
10
  clone: true,
7
11
  filter: (source, key) => {
8
12
  const v = source[key];
9
13
  return v != null &&
10
14
  !jsonOnly || (typeof v !== 'function' &&
11
- (typeof v !== 'object' || isPlainObject(v) || Array.isArray(v)));
15
+ (typeof v !== 'object' || (0, putil_isplainobject_1.default)(v) || Array.isArray(v)));
12
16
  }
13
17
  });
14
18
  }
15
- export function omitUndefined(obj) {
19
+ exports.cloneObject = cloneObject;
20
+ function omitUndefined(obj) {
16
21
  if (!(obj && typeof obj === 'object'))
17
22
  return obj;
18
23
  for (const k of Object.keys(obj)) {
@@ -23,3 +28,4 @@ export function omitUndefined(obj) {
23
28
  }
24
29
  return obj;
25
30
  }
31
+ exports.omitUndefined = omitUndefined;
@@ -1,9 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pathToObjectTree = void 0;
1
4
  const DOT_PATTERN = /^([^.]+)\.(.*)$/;
2
- export function pathToObjectTree(arr, lowerCaseKeys) {
5
+ function pathToObjectTree(arr, lowerCaseKeys) {
3
6
  if (!(arr && arr.length))
4
7
  return;
5
8
  return _pathToObjectTree(arr, {}, lowerCaseKeys);
6
9
  }
10
+ exports.pathToObjectTree = pathToObjectTree;
7
11
  function _pathToObjectTree(arr, target, lowerCaseKeys) {
8
12
  for (let k of arr) {
9
13
  if (lowerCaseKeys)
@@ -1,4 +1,7 @@
1
+ "use strict";
1
2
  var _a, _b, _c, _d;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ResponsiveMap = void 0;
2
5
  function isMap(v) {
3
6
  return v && typeof v.forEach === 'function';
4
7
  }
@@ -9,7 +12,7 @@ const kOptions = Symbol('kOptions');
9
12
  /**
10
13
  * A Map implementation that supports case-insensitivity and ordered keys
11
14
  */
12
- export class ResponsiveMap extends Map {
15
+ class ResponsiveMap extends Map {
13
16
  constructor(init, options) {
14
17
  super();
15
18
  this[_a] = new Map();
@@ -161,3 +164,4 @@ export class ResponsiveMap extends Map {
161
164
  return key.toLowerCase();
162
165
  }
163
166
  }
167
+ exports.ResponsiveMap = ResponsiveMap;
@@ -1,43 +1,53 @@
1
- export function isConstructor(fn) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isURL = exports.isFormData = exports.isBlob = exports.isReadableStream = exports.isReadable = exports.isStream = exports.isConstructor = void 0;
4
+ function isConstructor(fn) {
2
5
  return typeof fn === 'function' && fn.prototype &&
3
6
  fn.prototype.constructor === fn &&
4
7
  fn.prototype.constructor.name !== 'Function' &&
5
8
  fn.prototype.constructor.name !== 'anonymous';
6
9
  }
7
- export function isStream(stream) {
10
+ exports.isConstructor = isConstructor;
11
+ function isStream(stream) {
8
12
  return stream !== null
9
13
  && typeof stream === 'object'
10
14
  && typeof stream.pipe === 'function';
11
15
  }
12
- export function isReadable(x) {
16
+ exports.isStream = isStream;
17
+ function isReadable(x) {
13
18
  return isStream(x)
14
19
  && x.readable !== false
15
20
  && typeof x._read === 'function'
16
21
  && typeof x._readableState === 'object';
17
22
  }
18
- export function isReadableStream(x) {
23
+ exports.isReadable = isReadable;
24
+ function isReadableStream(x) {
19
25
  return isStream(x)
20
26
  && x.readable !== false
21
27
  && typeof x.getReader === 'function'
22
28
  && typeof x.pipeThrough === 'function'
23
29
  && typeof x.pipeTo === 'function';
24
30
  }
25
- export function isBlob(x) {
31
+ exports.isReadableStream = isReadableStream;
32
+ function isBlob(x) {
26
33
  return x !== null
27
34
  && typeof x === 'object'
28
35
  && typeof x.size === 'number'
29
36
  && typeof x.arrayBuffer === 'function'
30
37
  && typeof x.stream === 'function';
31
38
  }
32
- export function isFormData(x) {
39
+ exports.isBlob = isBlob;
40
+ function isFormData(x) {
33
41
  return x !== null
34
42
  && typeof x.constructor === 'function'
35
43
  && x.constructor.name === 'FormData'
36
44
  && typeof x.append === 'function'
37
45
  && typeof x.getAll === 'function';
38
46
  }
39
- export function isURL(x) {
47
+ exports.isFormData = isFormData;
48
+ function isURL(x) {
40
49
  return x !== null
41
50
  && typeof x.host === 'string'
42
51
  && typeof x.href === 'string';
43
52
  }
53
+ exports.isURL = isURL;
@@ -1,6 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BooleanCodec = void 0;
1
4
  const trueValues = ['true', 't', 'yes', 'y', '1'];
2
5
  const falseValues = ['false', 'f', 'no', 'n', '0'];
3
- export class BooleanCodec {
6
+ class BooleanCodec {
4
7
  decode(value) {
5
8
  if (value === '')
6
9
  return true;
@@ -18,3 +21,4 @@ export class BooleanCodec {
18
21
  (value ? 'true' : 'false') : '';
19
22
  }
20
23
  }
24
+ exports.BooleanCodec = BooleanCodec;
@@ -1,6 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DateCodec = void 0;
1
4
  // noinspection RegExpUnnecessaryNonCapturingGroup
2
5
  const DATE_FORMAT_PATTERN = /^(\d{4})(?:-?(0[1-9]|1[012])(?:-?([123]0|[012][1-9]|31))?)?(?:[T ]?([01][0-9]|2[0-3]):?([0-5][0-9]):?([0-5][0-9])?(?:\.(\d+))?(?:(Z)|(?:([+-])([01]?[0-9]|2[0-3]):?([0-5][0-9])?))?)?$/;
3
- export class DateCodec {
6
+ class DateCodec {
4
7
  constructor(options) {
5
8
  this.max = options?.max ? coerceToDateString(options.max) : undefined;
6
9
  this.min = options?.min ? coerceToDateString(options.min) : undefined;
@@ -19,6 +22,7 @@ export class DateCodec {
19
22
  return coerceToDateString(value, this.time, this.timeZone);
20
23
  }
21
24
  }
25
+ exports.DateCodec = DateCodec;
22
26
  function coerceToDateString(value, time, timeZone) {
23
27
  if (value === '' || value == null)
24
28
  return '';
@@ -1,13 +1,17 @@
1
- import { Expression } from '../../filter/ast/index.js';
2
- import { parseFilter } from '../../filter/parse.js';
3
- export class FilterCodec {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FilterCodec = void 0;
4
+ const index_js_1 = require("../../filter/ast/index.js");
5
+ const parse_js_1 = require("../../filter/parse.js");
6
+ class FilterCodec {
4
7
  decode(value) {
5
- if (value instanceof Expression)
8
+ if (value instanceof index_js_1.Expression)
6
9
  return value;
7
- return parseFilter(value);
10
+ return (0, parse_js_1.parseFilter)(value);
8
11
  }
9
12
  encode(value) {
10
13
  // @ts-ignore
11
14
  return value ? '' + value : '';
12
15
  }
13
16
  }
17
+ exports.FilterCodec = FilterCodec;
@@ -1,5 +1,8 @@
1
- import { NumberCodec } from './number-codec.js';
2
- export class IntegerCodec extends NumberCodec {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IntegerCodec = void 0;
4
+ const number_codec_js_1 = require("./number-codec.js");
5
+ class IntegerCodec extends number_codec_js_1.NumberCodec {
3
6
  constructor(options) {
4
7
  super(options);
5
8
  this.enum = options?.enum;
@@ -13,3 +16,4 @@ export class IntegerCodec extends NumberCodec {
13
16
  return v;
14
17
  }
15
18
  }
19
+ exports.IntegerCodec = IntegerCodec;
@@ -1,4 +1,7 @@
1
- export class NumberCodec {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NumberCodec = void 0;
4
+ class NumberCodec {
2
5
  constructor(options) {
3
6
  this.max = options?.max;
4
7
  this.min = options?.min;
@@ -18,3 +21,4 @@ export class NumberCodec {
18
21
  return typeof value === 'number' ? '' + value : '';
19
22
  }
20
23
  }
24
+ exports.NumberCodec = NumberCodec;
@@ -1,4 +1,7 @@
1
- export class StringCodec {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StringCodec = void 0;
4
+ class StringCodec {
2
5
  constructor(options) {
3
6
  this.maxLength = options?.maxLength;
4
7
  this.minLength = options?.minLength;
@@ -17,3 +20,4 @@ export class StringCodec {
17
20
  return value == null ? '' : '' + value;
18
21
  }
19
22
  }
23
+ exports.StringCodec = StringCodec;
@@ -1,8 +1,11 @@
1
+ "use strict";
1
2
  // noinspection JSUnusedGlobalSymbols
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.HttpHeaderCodes = void 0;
2
5
  /**
3
6
  * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#controls
4
7
  */
5
- export var HttpHeaderCodes;
8
+ var HttpHeaderCodes;
6
9
  (function (HttpHeaderCodes) {
7
10
  /* *** Opra Headers *** */
8
11
  HttpHeaderCodes["X_Opra_Version"] = "X-OPRA-Version";
@@ -407,4 +410,4 @@ export var HttpHeaderCodes;
407
410
  *
408
411
  */
409
412
  HttpHeaderCodes["Max_Forwards"] = "Max-Forwards";
410
- })(HttpHeaderCodes || (HttpHeaderCodes = {}));
413
+ })(HttpHeaderCodes = exports.HttpHeaderCodes || (exports.HttpHeaderCodes = {}));
@@ -1,8 +1,11 @@
1
+ "use strict";
1
2
  // noinspection JSUnusedGlobalSymbols
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.HttpStatusCodes = void 0;
2
5
  /**
3
6
  * https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#successful_responses
4
7
  */
5
- export var HttpStatusCodes;
8
+ var HttpStatusCodes;
6
9
  (function (HttpStatusCodes) {
7
10
  /* *** Information responses *** */
8
11
  /**
@@ -294,4 +297,4 @@ export var HttpStatusCodes;
294
297
  * Indicates that the client needs to authenticate to gain network access.
295
298
  */
296
299
  HttpStatusCodes[HttpStatusCodes["NETWORK_AUTHENTICATION_REQUIRED"] = 511] = "NETWORK_AUTHENTICATION_REQUIRED";
297
- })(HttpStatusCodes || (HttpStatusCodes = {}));
300
+ })(HttpStatusCodes = exports.HttpStatusCodes || (exports.HttpStatusCodes = {}));
@@ -1,4 +1,7 @@
1
- export const HttpStatusMessages = {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpStatusMessages = void 0;
4
+ exports.HttpStatusMessages = {
2
5
  "100": "Continue",
3
6
  "101": "Switching Protocols",
4
7
  "102": "Processing",