@opra/common 1.27.1 → 1.27.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/browser.js +4 -4
  2. package/document/common/api-base.js +1 -0
  3. package/document/common/value.js +1 -0
  4. package/document/data-type/api-field.js +1 -0
  5. package/document/data-type/array-type.d.ts +1 -1
  6. package/document/data-type/array-type.js +1 -0
  7. package/document/data-type/complex-type-base.js +3 -1
  8. package/document/data-type/data-type.js +3 -0
  9. package/document/data-type/enum-type.js +1 -0
  10. package/document/data-type/extended-types/base64.type.d.ts +1 -1
  11. package/document/data-type/extended-types/date-time.type.d.ts +1 -1
  12. package/document/data-type/extended-types/date.type.d.ts +1 -1
  13. package/document/data-type/extended-types/field-path.type.js +1 -0
  14. package/document/data-type/mapped-type.js +1 -0
  15. package/document/data-type/simple-type.js +1 -0
  16. package/document/data-type/union-type.d.ts +1 -1
  17. package/document/decorators/api-field-decorator.d.ts +1 -1
  18. package/document/decorators/http-operation-entity-find-many.decorator.js +1 -0
  19. package/document/decorators/http-operation-entity.decorator.js +4 -0
  20. package/document/decorators/http-operation.decorator.js +2 -0
  21. package/document/decorators/ws-param.decorator.d.ts +1 -1
  22. package/document/factory/data-type.factory.js +3 -0
  23. package/document/factory/http-api.factory.js +2 -0
  24. package/document/factory/mq-api.factory.js +2 -0
  25. package/document/factory/ws-api.factory.js +2 -0
  26. package/document/http/http-api.js +1 -0
  27. package/document/http/http-controller.js +1 -0
  28. package/document/http/http-media-type.js +1 -0
  29. package/document/http/http-multipart-field.js +1 -0
  30. package/document/http/http-operation-response.js +2 -0
  31. package/document/http/http-parameter.d.ts +2 -2
  32. package/document/http/http-parameter.js +2 -0
  33. package/document/http/http-request-body.js +2 -0
  34. package/document/http/http-status-range.js +1 -0
  35. package/document/mq/mq-api.js +3 -0
  36. package/document/mq/mq-header.d.ts +2 -2
  37. package/document/mq/mq-header.js +2 -0
  38. package/document/mq/mq-operation-response.js +1 -0
  39. package/document/mq/mq-operation.d.ts +3 -4
  40. package/document/ws/ws-api.js +3 -0
  41. package/document/ws/ws-operation.d.ts +1 -1
  42. package/document/ws/ws-operation.js +1 -0
  43. package/exception/error-issue.d.ts +1 -1
  44. package/exception/error-issue.js +1 -1
  45. package/exception/opra-exception.js +1 -0
  46. package/filter/antlr/OpraFilterLexer.js +1 -1
  47. package/filter/antlr/OpraFilterListener.js +1 -0
  48. package/filter/antlr/OpraFilterParser.js +1 -1
  49. package/filter/ast/expressions/array-expression.js +1 -0
  50. package/filter/ast/terms/qualified-identifier.js +1 -0
  51. package/filter/errors.js +1 -0
  52. package/filter/filter-rules.d.ts +1 -1
  53. package/filter/filter-rules.js +2 -1
  54. package/filter/filter-tree-visitor.js +2 -1
  55. package/filter/opra-error-listener.js +1 -1
  56. package/helpers/type-guards.js +2 -0
  57. package/i18n/i18n.js +1 -0
  58. package/package.json +2 -2
  59. package/polifils/array-find-last.js +1 -1
  60. package/schema/api.interface.d.ts +2 -2
  61. package/schema/data-type/data-type.interface.js +1 -1
  62. package/schema/mq/mq-operation.interface.d.ts +1 -1
  63. package/schema/ws/ws-api.interface.js +1 -1
  64. package/schema/ws/ws-operation.interface.d.ts +1 -1
@@ -1,4 +1,5 @@
1
1
  import { omitUndefined } from '@jsopen/objects';
2
+ import { OpraSchema } from '../../schema/index.js';
2
3
  import { CLASS_NAME_PATTERN } from '../constants.js';
3
4
  import { DocumentElement } from './document-element.js';
4
5
  export class ApiBase extends DocumentElement {
@@ -1,5 +1,6 @@
1
1
  import { omitUndefined } from '@jsopen/objects';
2
2
  import { asMutable } from 'ts-gems';
3
+ import { DataType } from '../data-type/data-type.js';
3
4
  import { DocumentElement } from './document-element.js';
4
5
  export const Value = function (owner, initArgs) {
5
6
  if (!this)
@@ -1,5 +1,6 @@
1
1
  import { omitUndefined } from '@jsopen/objects';
2
2
  import { asMutable } from 'ts-gems';
3
+ import { OpraSchema } from '../../schema/index.js';
3
4
  import { DocumentElement } from '../common/document-element.js';
4
5
  import { DECORATOR } from '../constants.js';
5
6
  import { ApiFieldDecoratorFactory } from '../decorators/api-field-decorator.js';
@@ -1,6 +1,6 @@
1
1
  import 'reflect-metadata';
2
2
  import type { Combine, Type } from 'ts-gems';
3
- import { Validator } from 'valgen';
3
+ import { type Validator } from 'valgen';
4
4
  import { OpraSchema } from '../../schema/index.js';
5
5
  import type { ApiDocument } from '../api-document.js';
6
6
  import type { DocumentElement } from '../common/document-element.js';
@@ -5,6 +5,7 @@ import { vg } from 'valgen';
5
5
  import { OpraSchema } from '../../schema/index.js';
6
6
  import { DATATYPE_METADATA, DECORATOR } from '../constants.js';
7
7
  import { DataType } from './data-type.js';
8
+ import { EnumType } from './enum-type.js';
8
9
  /**
9
10
  * @class ArrayType
10
11
  */
@@ -1,7 +1,9 @@
1
1
  import hashObject from 'object-hash';
2
2
  import { asMutable } from 'ts-gems';
3
3
  import { validator, vg } from 'valgen';
4
- import { parseFieldsProjection, ResponsiveMap, } from '../../helpers/index.js';
4
+ import { FieldsProjection, parseFieldsProjection, ResponsiveMap, } from '../../helpers/index.js';
5
+ import { OpraSchema } from '../../schema/index.js';
6
+ import { DocumentInitContext } from '../common/document-init-context.js';
5
7
  import { ArrayType } from './array-type.js';
6
8
  import { DataType } from './data-type.js';
7
9
  export const FIELD_PATH_PATTERN = /^([+-])?([a-z$_][\w.]*)$/i;
@@ -1,6 +1,9 @@
1
1
  import { omitUndefined } from '@jsopen/objects';
2
2
  import { asMutable } from 'ts-gems';
3
+ import { FieldsProjection } from '../../helpers/index.js';
4
+ import { OpraSchema } from '../../schema/index.js';
3
5
  import { DocumentElement } from '../common/document-element.js';
6
+ import { DocumentInitContext } from '../common/document-init-context.js';
4
7
  import { CLASS_NAME_PATTERN } from '../constants.js';
5
8
  import { colorFgMagenta, colorFgYellow, colorReset, nodeInspectCustom, } from '../utils/inspect.util.js';
6
9
  import { testScopeMatch } from '../utils/test-scope-match.js';
@@ -4,6 +4,7 @@ import { asMutable } from 'ts-gems';
4
4
  import { vg } from 'valgen';
5
5
  import { cloneObject } from '../../helpers/index.js';
6
6
  import { OpraSchema } from '../../schema/index.js';
7
+ import { DocumentInitContext } from '../common/document-init-context.js';
7
8
  import { DATATYPE_METADATA, DECORATOR } from '../constants.js';
8
9
  import { DataType } from './data-type.js';
9
10
  /**
@@ -1,4 +1,4 @@
1
- import { Type } from 'ts-gems';
1
+ import type { Type } from 'ts-gems';
2
2
  import { type Validator } from 'valgen';
3
3
  import { DECODER, ENCODER } from '../../constants.js';
4
4
  export declare class Base64Type {
@@ -1,4 +1,4 @@
1
- import { Type } from 'ts-gems';
1
+ import type { Type } from 'ts-gems';
2
2
  import { type Validator, vg } from 'valgen';
3
3
  import { DECODER, ENCODER } from '../../constants.js';
4
4
  export declare class DateTimeType {
@@ -1,4 +1,4 @@
1
- import { Type } from 'ts-gems';
1
+ import type { Type } from 'ts-gems';
2
2
  import { type Validator } from 'valgen';
3
3
  import { DECODER, ENCODER } from '../../constants.js';
4
4
  export declare class DateType {
@@ -1,5 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { toString, validator, vg } from 'valgen';
3
+ import { DocumentElement } from '../../common/document-element.js';
3
4
  import { DECODER, ENCODER } from '../../constants.js';
4
5
  import { DataType } from '../data-type.js';
5
6
  import { SimpleType } from '../simple-type.js';
@@ -2,6 +2,7 @@ import 'reflect-metadata';
2
2
  import { omitUndefined } from '@jsopen/objects';
3
3
  import { asMutable } from 'ts-gems';
4
4
  import { OpraSchema } from '../../schema/index.js';
5
+ import { DocumentElement } from '../common/document-element.js';
5
6
  import { ApiField } from './api-field.js';
6
7
  import { ComplexTypeBase } from './complex-type-base.js';
7
8
  import { DataType } from './data-type.js';
@@ -4,6 +4,7 @@ import { asMutable } from 'ts-gems';
4
4
  import { isAny } from 'valgen';
5
5
  import { cloneObject } from '../../helpers/index.js';
6
6
  import { OpraSchema } from '../../schema/index.js';
7
+ import { DocumentInitContext } from '../common/document-init-context.js';
7
8
  import { DECORATOR } from '../constants.js';
8
9
  import { AttributeDecoratorFactory, SimpleTypeDecoratorFactory, } from '../decorators/simple-type.decorator.js';
9
10
  import { DataType } from './data-type.js';
@@ -1,6 +1,6 @@
1
1
  import 'reflect-metadata';
2
2
  import type { Combine, Type } from 'ts-gems';
3
- import { Validator } from 'valgen';
3
+ import { type Validator } from 'valgen';
4
4
  import { OpraSchema } from '../../schema/index.js';
5
5
  import type { ApiDocument } from '../api-document.js';
6
6
  import type { DocumentElement } from '../common/document-element.js';
@@ -1,4 +1,4 @@
1
- import { StrictOmit } from 'ts-gems';
1
+ import type { StrictOmit } from 'ts-gems';
2
2
  import type { ApiField } from '../data-type/api-field.js';
3
3
  export interface ApiFieldDecorator extends PropertyDecorator {
4
4
  /**
@@ -1,4 +1,5 @@
1
1
  import { HttpStatusCode, MimeTypes } from '../../enums/index.js';
2
+ import { OpraSchema } from '../../schema/index.js';
2
3
  import { DATATYPE_METADATA } from '../constants.js';
3
4
  import { FieldPathType } from '../data-type/extended-types/index.js';
4
5
  import { IntegerType } from '../data-type/primitive-types/index.js';
@@ -1,9 +1,13 @@
1
1
  import { FilterRules } from '../../filter/filter-rules.js';
2
+ import { OpraFilter } from '../../filter/index.js';
3
+ import { OpraSchema } from '../../schema/index.js';
2
4
  import { DATATYPE_METADATA } from '../constants.js';
3
5
  import { FIELD_PATH_PATTERN } from '../data-type/complex-type-base.js';
4
6
  import { EnumType } from '../data-type/enum-type.js';
5
7
  import { FilterType } from '../data-type/extended-types/index.js';
6
8
  import { HttpOperation } from '../http/http-operation.js';
9
+ import { HttpRequestBody } from '../http/http-request-body.js';
10
+ import {} from './http-operation.decorator.js';
7
11
  /* Implementation **/
8
12
  HttpOperation.Entity = {};
9
13
  /**
@@ -3,6 +3,8 @@ import { isConstructor } from '@jsopen/objects';
3
3
  import { MimeTypes } from '../../enums/index.js';
4
4
  import { OpraSchema } from '../../schema/index.js';
5
5
  import { HTTP_CONTROLLER_METADATA } from '../constants.js';
6
+ import { HttpMediaType } from '../http/http-media-type.js';
7
+ import { HttpMultipartField } from '../http/http-multipart-field.js';
6
8
  export function HttpOperationDecoratorFactory(decoratorChain, options) {
7
9
  /**
8
10
  *
@@ -1,4 +1,4 @@
1
- import { TypeThunkAsync } from 'ts-gems';
1
+ import type { TypeThunkAsync } from 'ts-gems';
2
2
  export declare function WsParam(type?: TypeThunkAsync | string, options?: WsParam.Options): ParameterDecorator;
3
3
  export declare namespace WsParam {
4
4
  interface Options {
@@ -1,7 +1,10 @@
1
1
  import { cloneObject, resolveThunk, ResponsiveMap, } from '../../helpers/index.js';
2
2
  import { OpraSchema } from '../../schema/index.js';
3
+ import { DataTypeMap } from '../common/data-type-map.js';
4
+ import { DocumentElement } from '../common/document-element.js';
3
5
  import { DocumentInitContext } from '../common/document-init-context.js';
4
6
  import { DATATYPE_METADATA, DECODER, ENCODER, kCtorMap, kDataTypeMap, } from '../constants.js';
7
+ import { ApiField } from '../data-type/api-field.js';
5
8
  import { ArrayType } from '../data-type/array-type.js';
6
9
  import { ComplexType } from '../data-type/complex-type.js';
7
10
  import { ComplexTypeBase } from '../data-type/complex-type-base.js';
@@ -1,5 +1,7 @@
1
1
  import { isConstructor } from '@jsopen/objects';
2
2
  import { resolveThunk } from '../../helpers/index.js';
3
+ import { OpraSchema } from '../../schema/index.js';
4
+ import { DocumentInitContext } from '../common/document-init-context.js';
3
5
  import { HTTP_CONTROLLER_METADATA } from '../constants.js';
4
6
  import { HttpApi } from '../http/http-api.js';
5
7
  import { HttpController } from '../http/http-controller.js';
@@ -1,5 +1,7 @@
1
1
  import { isConstructor } from '@jsopen/objects';
2
2
  import { resolveThunk } from '../../helpers/index.js';
3
+ import { OpraSchema } from '../../schema/index.js';
4
+ import { DocumentInitContext } from '../common/document-init-context.js';
3
5
  import { MQ_CONTROLLER_METADATA } from '../constants.js';
4
6
  import { MQApi } from '../mq/mq-api.js';
5
7
  import { MQController } from '../mq/mq-controller.js';
@@ -1,5 +1,7 @@
1
1
  import { isConstructor } from '@jsopen/objects';
2
2
  import { resolveThunk } from '../../helpers/index.js';
3
+ import { OpraSchema } from '../../schema/index.js';
4
+ import { DocumentInitContext } from '../common/document-init-context.js';
3
5
  import { WS_CONTROLLER_METADATA, WS_PARAM_METADATA } from '../constants.js';
4
6
  import { WSApi } from '../ws/ws-api.js';
5
7
  import { WSController } from '../ws/ws-controller.js';
@@ -1,4 +1,5 @@
1
1
  import { ResponsiveMap } from '../../helpers/index.js';
2
+ import { OpraSchema } from '../../schema/index.js';
2
3
  import { ApiBase } from '../common/api-base.js';
3
4
  import { HttpController } from './http-controller.js';
4
5
  /**
@@ -8,6 +8,7 @@ import { DocumentElement } from '../common/document-element.js';
8
8
  import { CLASS_NAME_PATTERN, DECORATOR, kDataTypeMap } from '../constants.js';
9
9
  import { HttpControllerDecoratorFactory } from '../decorators/http-controller.decorator.js';
10
10
  import { colorFgMagenta, colorFgYellow, colorReset, nodeInspectCustom, } from '../utils/inspect.util.js';
11
+ import { HttpParameter } from './http-parameter.js';
11
12
  /**
12
13
  * HttpController
13
14
  */
@@ -2,6 +2,7 @@ import typeIs from '@browsery/type-is';
2
2
  import { omitUndefined } from '@jsopen/objects';
3
3
  import { asMutable } from 'ts-gems';
4
4
  import { isAny, vg } from 'valgen';
5
+ import { OpraSchema } from '../../schema/index.js';
5
6
  import { DocumentElement } from '../common/document-element.js';
6
7
  import { ArrayType } from '../data-type/array-type.js';
7
8
  import { DataType } from '../data-type/data-type.js';
@@ -1,4 +1,5 @@
1
1
  import { omitUndefined } from '@jsopen/objects';
2
+ import { OpraSchema } from '../../schema/index.js';
2
3
  import { parseRegExp } from '../utils/parse-regexp.util.js';
3
4
  import { HttpMediaType } from './http-media-type.js';
4
5
  /**
@@ -1,5 +1,7 @@
1
1
  import { omitUndefined } from '@jsopen/objects';
2
+ import { OpraSchema } from '../../schema/index.js';
2
3
  import { HttpMediaType } from './http-media-type.js';
4
+ import { HttpOperation } from './http-operation.js';
3
5
  import { HttpStatusRange } from './http-status-range.js';
4
6
  /**
5
7
  * @class HttpOperationResponse
@@ -1,5 +1,5 @@
1
- import { type Combine, type StrictOmit, Type, type TypeThunkAsync } from 'ts-gems';
2
- import { Validator } from 'valgen';
1
+ import { type Combine, type StrictOmit, type Type, type TypeThunkAsync } from 'ts-gems';
2
+ import { type Validator } from 'valgen';
3
3
  import type { OpraSchema } from '../../schema/index.js';
4
4
  import type { ApiDocument } from '../api-document.js';
5
5
  import { DocumentElement } from '../common/document-element.js';
@@ -1,7 +1,9 @@
1
1
  import { omitUndefined } from '@jsopen/objects';
2
2
  import { asMutable, } from 'ts-gems';
3
3
  import { vg } from 'valgen';
4
+ import { DocumentElement } from '../common/document-element.js';
4
5
  import { Value } from '../common/value.js';
6
+ import { DataType } from '../data-type/data-type.js';
5
7
  import { parseRegExp } from '../utils/parse-regexp.util.js';
6
8
  export const HttpParameter = function (owner, initArgs) {
7
9
  if (!this)
@@ -1,5 +1,7 @@
1
1
  import { omitUndefined } from '@jsopen/objects';
2
+ import { OpraSchema } from '../../schema/index.js';
2
3
  import { DocumentElement } from '../common/document-element.js';
4
+ import { HttpMediaType } from './http-media-type.js';
3
5
  /**
4
6
  * @class HttpRequestBody
5
7
  */
@@ -1,3 +1,4 @@
1
+ import { OpraSchema } from '../../schema/index.js';
1
2
  const STATUS_RANGE_PATTERN = /^([1-6]\d{2})(?:-([1-6]\d{2}))?$/;
2
3
  /**
3
4
  * @class HttpStatusRange
@@ -1,5 +1,8 @@
1
1
  import { ResponsiveMap } from '../../helpers/index.js';
2
+ import { OpraSchema } from '../../schema/index.js';
2
3
  import { ApiBase } from '../common/api-base.js';
4
+ import { MQController } from './mq-controller.js';
5
+ import { MQOperation } from './mq-operation.js';
3
6
  /**
4
7
  * @class MQApi
5
8
  */
@@ -1,5 +1,5 @@
1
- import { type Combine, type StrictOmit, Type, type TypeThunkAsync } from 'ts-gems';
2
- import { Validator } from 'valgen';
1
+ import { type Combine, type StrictOmit, type Type, type TypeThunkAsync } from 'ts-gems';
2
+ import { type Validator } from 'valgen';
3
3
  import type { OpraSchema } from '../../schema/index.js';
4
4
  import { DocumentElement } from '../common/document-element.js';
5
5
  import { Value } from '../common/value.js';
@@ -1,7 +1,9 @@
1
1
  import { omitUndefined } from '@jsopen/objects';
2
2
  import { asMutable, } from 'ts-gems';
3
3
  import { vg } from 'valgen';
4
+ import { DocumentElement } from '../common/document-element.js';
4
5
  import { Value } from '../common/value.js';
6
+ import { DataType } from '../data-type/data-type.js';
5
7
  import { parseRegExp } from '../utils/parse-regexp.util.js';
6
8
  export const MQHeader = function (owner, initArgs) {
7
9
  if (!this)
@@ -1,4 +1,5 @@
1
1
  import { omitUndefined } from '@jsopen/objects';
2
+ import { OpraSchema } from '../../schema/index.js';
2
3
  import { DocumentElement } from '../common/document-element.js';
3
4
  import { DataType } from '../data-type/data-type.js';
4
5
  /**
@@ -1,12 +1,11 @@
1
- import type { Combine, ThunkAsync, Type } from 'ts-gems';
2
- import { TypeThunkAsync } from 'ts-gems';
3
- import { Validator } from 'valgen';
1
+ import type { Combine, ThunkAsync, Type, TypeThunkAsync } from 'ts-gems';
2
+ import { type Validator } from 'valgen';
4
3
  import { OpraSchema } from '../../schema/index.js';
5
4
  import { DataTypeMap } from '../common/data-type-map.js';
6
5
  import { DocumentElement } from '../common/document-element.js';
7
6
  import { DataType } from '../data-type/data-type.js';
8
7
  import type { EnumType } from '../data-type/enum-type.js';
9
- import { MQOperationDecorator } from '../decorators/mq-operation.decorator.js';
8
+ import { type MQOperationDecorator } from '../decorators/mq-operation.decorator.js';
10
9
  import type { MQController } from './mq-controller.js';
11
10
  import type { MQHeader } from './mq-header.js';
12
11
  import type { MQOperationResponse } from './mq-operation-response.js';
@@ -1,5 +1,8 @@
1
1
  import { ResponsiveMap } from '../../helpers/index.js';
2
+ import { OpraSchema } from '../../schema/index.js';
2
3
  import { ApiBase } from '../common/api-base.js';
4
+ import { WSController } from './ws-controller.js';
5
+ import { WSOperation } from './ws-operation.js';
3
6
  /**
4
7
  * @class WSApi
5
8
  */
@@ -4,7 +4,7 @@ import { DataTypeMap } from '../common/data-type-map.js';
4
4
  import { DocumentElement } from '../common/document-element.js';
5
5
  import { DataType } from '../data-type/data-type.js';
6
6
  import type { EnumType } from '../data-type/enum-type.js';
7
- import { WSOperationDecorator } from '../decorators/ws-operation.decorator.js';
7
+ import { type WSOperationDecorator } from '../decorators/ws-operation.decorator.js';
8
8
  import { WSController } from './ws-controller.js';
9
9
  /**
10
10
  * @namespace WSOperation
@@ -7,6 +7,7 @@ import { CLASS_NAME_PATTERN, DECORATOR, kDataTypeMap } from '../constants.js';
7
7
  import { DataType } from '../data-type/data-type.js';
8
8
  import { WSOperationDecoratorFactory, } from '../decorators/ws-operation.decorator.js';
9
9
  import { parseRegExp } from '../utils/parse-regexp.util.js';
10
+ import { WSController } from './ws-controller.js';
10
11
  /**
11
12
  * WSOperation
12
13
  */
@@ -1,4 +1,4 @@
1
- import { JsonType } from 'ts-gems';
1
+ import type { JsonType } from 'ts-gems';
2
2
  import { IssueSeverity } from './issue-severity.enum.js';
3
3
  export interface ErrorIssue {
4
4
  message: string;
@@ -1 +1 @@
1
- export {};
1
+ import { IssueSeverity } from './issue-severity.enum.js';
@@ -1,5 +1,6 @@
1
1
  import { omitUndefined } from '@jsopen/objects';
2
2
  import { i18n } from '../i18n/index.js';
3
+ import { IssueSeverity } from './issue-severity.enum.js';
3
4
  /**
4
5
  * Defines the base Opra exception, which is handled by the default Exceptions Handler.
5
6
  */
@@ -1,6 +1,6 @@
1
1
  // Generated from ./src/filter/antlr/OpraFilter.g4 by ANTLR 4.13.2
2
2
  // noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols
3
- import { ATNDeserializer, DFA, Lexer, LexerATNSimulator, PredictionContextCache, Token, } from '@browsery/antlr4';
3
+ import { ATN, ATNDeserializer, CharStream, DecisionState, DFA, Lexer, LexerATNSimulator, RuleContext, PredictionContextCache, Token, } from '@browsery/antlr4';
4
4
  export default class OpraFilterLexer extends Lexer {
5
5
  static T__0 = 1;
6
6
  static T__1 = 2;
@@ -1,5 +1,6 @@
1
1
  // Generated from ./src/filter/antlr/OpraFilter.g4 by ANTLR 4.13.2
2
2
  import { ParseTreeListener } from '@browsery/antlr4';
3
+ import {} from './OpraFilterParser.js';
3
4
  /**
4
5
  * This interface defines a complete listener for a parse tree produced by
5
6
  * `OpraFilterParser`.
@@ -1,6 +1,6 @@
1
1
  // Generated from ./src/filter/antlr/OpraFilter.g4 by ANTLR 4.13.2
2
2
  // noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols
3
- import { ATN, ATNDeserializer, DFA, FailedPredicateException, NoViableAltException, Parser, ParserATNSimulator, ParserRuleContext, PredictionContextCache, RecognitionException, Token, } from '@browsery/antlr4';
3
+ import { ATN, ATNDeserializer, BailErrorStrategy, DecisionState, DFA, FailedPredicateException, Interval, IntervalSet, NoViableAltException, Parser, ParserATNSimulator, ParserRuleContext, PredictionContextCache, PredictionMode, RecognitionException, RuleContext, RuleNode, TerminalNode, Token, TokenStream, } from '@browsery/antlr4';
4
4
  export default class OpraFilterParser extends Parser {
5
5
  static T__0 = 1;
6
6
  static T__1 = 2;
@@ -1,3 +1,4 @@
1
+ import { Expression } from '../abstract/expression.js';
1
2
  import { Term } from '../abstract/term.js';
2
3
  export class ArrayExpression extends Term {
3
4
  items;
@@ -1,3 +1,4 @@
1
+ import { DataType } from '../../../document/data-type/data-type.js';
1
2
  import { Literal } from '../abstract/literal.js';
2
3
  export class QualifiedIdentifier extends Literal {
3
4
  constructor(value) {
package/filter/errors.js CHANGED
@@ -1,3 +1,4 @@
1
+ import {} from '@browsery/antlr4';
1
2
  export class SyntaxError extends TypeError {
2
3
  }
3
4
  export class FilterValidationError extends TypeError {
@@ -1,6 +1,6 @@
1
1
  import '../polifils/array-find-last.js';
2
2
  import type { StrictOmit } from 'ts-gems';
3
- import { Validator } from 'valgen';
3
+ import { type Validator } from 'valgen';
4
4
  import type { ComplexType } from '../document/index.js';
5
5
  import { ResponsiveMap } from '../helpers/index.js';
6
6
  import { OpraSchema } from '../schema/index.js';
@@ -3,7 +3,8 @@ import { omitUndefined } from '@jsopen/objects';
3
3
  import { isString } from 'valgen';
4
4
  import { OpraException } from '../exception/index.js';
5
5
  import { ResponsiveMap } from '../helpers/index.js';
6
- import { ArithmeticExpression, ArrayExpression, ComparisonExpression, Literal, LogicalExpression, ParenthesizedExpression, QualifiedIdentifier, } from './ast/index.js';
6
+ import { OpraSchema } from '../schema/index.js';
7
+ import { ArithmeticExpression, ArrayExpression, ComparisonExpression, Expression, Literal, LogicalExpression, ParenthesizedExpression, QualifiedIdentifier, } from './ast/index.js';
7
8
  import { parse } from './parse.js';
8
9
  export class FilterRules {
9
10
  _rules = new ResponsiveMap();
@@ -1,5 +1,6 @@
1
1
  import { ParseTreeVisitor } from '@browsery/antlr4';
2
- import { LogicalExpressionContext, } from './antlr/OpraFilterParser.js';
2
+ import { ArrayValueContext, BooleanLiteralContext, ComparisonExpressionContext, DateLiteralContext, DateTimeLiteralContext, ExpressionContext, ExternalConstantContext, LogicalExpressionContext, NegativeExpressionContext, NumberLiteralContext, ParenthesizedExpressionContext, ParenthesizedItemContext, QualifiedIdentifierContext, RootContext, StringLiteralContext, TimeLiteralContext, } from './antlr/OpraFilterParser.js';
3
+ import OpraFilterVisitor from './antlr/OpraFilterVisitor.js';
3
4
  import { ArrayExpression, BooleanLiteral, ComparisonExpression, DateLiteral, DateTimeLiteral, LogicalExpression, NegativeExpression, NullLiteral, NumberLiteral, ParenthesizedExpression, QualifiedIdentifier, StringLiteral, TimeLiteral, } from './ast/index.js';
4
5
  import { ExternalConstant } from './ast/terms/external-constant.js';
5
6
  import { unquoteFilterString } from './utils.js';
@@ -1,4 +1,4 @@
1
- import { ErrorListener, } from '@browsery/antlr4';
1
+ import { ErrorListener, RecognitionException, } from '@browsery/antlr4';
2
2
  import { FilterParseError } from './errors.js';
3
3
  export class OpraErrorListener extends ErrorListener {
4
4
  errors;
@@ -1,3 +1,5 @@
1
+ /// <reference lib="dom" />
2
+ import { Readable, Stream } from 'stream';
1
3
  export function isStream(x) {
2
4
  return x !== null && typeof x === 'object' && typeof x.pipe === 'function';
3
5
  }
package/i18n/i18n.js CHANGED
@@ -1,3 +1,4 @@
1
+ import * as I18next from '@browsery/i18next';
1
2
  import i18next from '@browsery/i18next';
2
3
  import { splitString, tokenize } from 'fast-tokenizer';
3
4
  import { unescapeString } from './string-utils.js';
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@opra/common",
3
- "version": "1.27.1",
3
+ "version": "1.27.4",
4
4
  "description": "Opra common package",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
7
7
  "dependencies": {
8
- "@browsery/antlr4": "^4.13.3-r5",
8
+ "@browsery/antlr4": "^4.13.3-r7",
9
9
  "@browsery/highland": "^2.13.6-r5",
10
10
  "@browsery/http-parser": "^0.5.10-r3",
11
11
  "@browsery/i18next": "^25.6.0",
@@ -1,3 +1,4 @@
1
+ export {};
1
2
  if (!Array.prototype.findLast) {
2
3
  Array.prototype.findLast = function (predicate, thisArg) {
3
4
  const i = this.findLastIndex(predicate, thisArg);
@@ -18,4 +19,3 @@ if (!Array.prototype.findLast) {
18
19
  return -1;
19
20
  };
20
21
  }
21
- export {};
@@ -1,5 +1,5 @@
1
- import { DataTypeContainer } from './data-type-container.interface.js';
2
- import { Transport } from './types.js';
1
+ import type { DataTypeContainer } from './data-type-container.interface.js';
2
+ import type { Transport } from './types.js';
3
3
  /**
4
4
  * @interface Api
5
5
  */
@@ -1 +1 @@
1
- export {};
1
+ import { ArrayType } from './array-type.interface.js';
@@ -1,4 +1,4 @@
1
- import { DataType } from '../data-type/data-type.interface.js';
1
+ import type { DataType } from '../data-type/data-type.interface.js';
2
2
  import type { DataTypeContainer } from '../data-type-container.interface.js';
3
3
  import type { MQHeader } from './mq-header.interface.js';
4
4
  /**
@@ -1 +1 @@
1
- export {};
1
+ import { WSController } from './ws-controller.interface.js';
@@ -1,4 +1,4 @@
1
- import { DataType } from '../data-type/data-type.interface.js';
1
+ import type { DataType } from '../data-type/data-type.interface.js';
2
2
  import type { DataTypeContainer } from '../data-type-container.interface.js';
3
3
  /**
4
4
  * @interface WSOperation