@opra/common 1.24.3 → 1.25.1

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.
@@ -1,7 +1,7 @@
1
1
  import { OpraSchema } from '../../schema/index.js';
2
2
  import type { ApiDocument } from '../api-document.js';
3
3
  import { DocumentElement } from './document-element.js';
4
- import type { DocumentInitContext } from './document-init-context';
4
+ import type { DocumentInitContext } from './document-init-context.js';
5
5
  export declare namespace ApiBase {
6
6
  interface InitArguments extends Pick<OpraSchema.Api, 'description' | 'name'> {
7
7
  owner: ApiDocument | ApiBase;
@@ -1,6 +1,6 @@
1
1
  import type { Combine, StrictOmit, TypeThunkAsync } from 'ts-gems';
2
2
  import type { OpraSchema } from '../../schema/index.js';
3
- import type { ApiDocument } from '../api-document';
3
+ import type { ApiDocument } from '../api-document.js';
4
4
  import { DataType } from '../data-type/data-type.js';
5
5
  import type { EnumType } from '../data-type/enum-type.js';
6
6
  import { DocumentElement } from './document-element.js';
@@ -1,2 +1,2 @@
1
- import type { ComplexType } from '../data-type/complex-type';
1
+ import type { ComplexType } from '../data-type/complex-type.js';
2
2
  export declare function ComplexTypeDecorator(options?: ComplexType.Options): (target: Function) => void;
@@ -150,7 +150,9 @@ export function HttpOperationDecoratorFactory(decoratorChain, options) {
150
150
  contentMeta.contentType = contentMeta.contentType || [
151
151
  MimeTypes.json,
152
152
  MimeTypes.yaml,
153
+ MimeTypes.yaml2,
153
154
  MimeTypes.toml,
155
+ MimeTypes.toml2,
154
156
  ];
155
157
  contentMeta.contentEncoding = contentMeta.contentEncoding || 'utf-8';
156
158
  if (isConstructor(contentMeta.type))
@@ -1,6 +1,6 @@
1
1
  import type { TypeThunkAsync } from 'ts-gems';
2
2
  import type { MQController } from '../mq/mq-controller.js';
3
- import type { MQHeader } from '../mq/mq-header';
3
+ import type { MQHeader } from '../mq/mq-header.js';
4
4
  export interface MQControllerDecorator<T extends MQControllerDecorator<any> = MQControllerDecorator<any>> extends ClassDecorator {
5
5
  Header(name: string | RegExp, optionsOrType?: MQHeader.Options | string | TypeThunkAsync | false): T;
6
6
  UseType(...type: TypeThunkAsync[]): T;
@@ -1,5 +1,5 @@
1
1
  import type { ThunkAsync, Type, TypeThunkAsync } from 'ts-gems';
2
- import type { MQHeader } from '../mq/mq-header';
2
+ import type { MQHeader } from '../mq/mq-header.js';
3
3
  import type { MQOperation } from '../mq/mq-operation.js';
4
4
  import type { MQOperationResponse } from '../mq/mq-operation-response.js';
5
5
  export interface MQOperationDecorator {
@@ -1,5 +1,5 @@
1
1
  import { OpraSchema } from '../../schema/index.js';
2
- import type { SimpleType } from '../data-type/simple-type';
2
+ import type { SimpleType } from '../data-type/simple-type.js';
3
3
  export interface SimpleTypeDecorator extends ClassDecorator {
4
4
  /**
5
5
  * This function is used to attach one or more usage examples to a `SimpleType` model.
@@ -1,7 +1,7 @@
1
1
  import type { StrictOmit, Type } from 'ts-gems';
2
2
  import { ResponsiveMap } from '../../helpers/index.js';
3
3
  import { OpraSchema } from '../../schema/index.js';
4
- import type { ApiDocument } from '../api-document';
4
+ import type { ApiDocument } from '../api-document.js';
5
5
  import { ApiBase } from '../common/api-base.js';
6
6
  import { HttpController } from './http-controller.js';
7
7
  import type { HttpOperation } from './http-operation.js';
@@ -8,7 +8,7 @@ import type { EnumType } from '../data-type/enum-type.js';
8
8
  import { HttpControllerDecoratorFactory } from '../decorators/http-controller.decorator.js';
9
9
  import { nodeInspectCustom } from '../utils/inspect.util.js';
10
10
  import type { HttpApi } from './http-api.js';
11
- import type { HttpOperation } from './http-operation';
11
+ import type { HttpOperation } from './http-operation.js';
12
12
  import { HttpParameter } from './http-parameter.js';
13
13
  /**
14
14
  * @namespace HttpController
@@ -1,6 +1,6 @@
1
1
  import type { Combine } from 'ts-gems';
2
2
  import { OpraSchema } from '../../schema/index.js';
3
- import type { ApiDocument } from '../api-document';
3
+ import type { ApiDocument } from '../api-document.js';
4
4
  import { HttpMediaType } from './http-media-type.js';
5
5
  /**
6
6
  * @namespace HttpMultipartField
@@ -1,6 +1,6 @@
1
1
  import type { Combine, StrictOmit } from 'ts-gems';
2
2
  import { OpraSchema } from '../../schema/index.js';
3
- import type { ApiDocument } from '../api-document';
3
+ import type { ApiDocument } from '../api-document.js';
4
4
  import { HttpMediaType } from './http-media-type.js';
5
5
  import { HttpOperation } from './http-operation.js';
6
6
  import type { HttpParameter } from './http-parameter.js';
@@ -1,6 +1,6 @@
1
1
  import type { Combine, StrictOmit, ThunkAsync, Type } from 'ts-gems';
2
2
  import { OpraSchema } from '../../schema/index.js';
3
- import type { ApiDocument } from '../api-document';
3
+ import type { ApiDocument } from '../api-document.js';
4
4
  import { DataTypeMap } from '../common/data-type-map.js';
5
5
  import { DocumentElement } from '../common/document-element.js';
6
6
  import type { DataType } from '../data-type/data-type.js';
@@ -1,7 +1,7 @@
1
1
  import { type Combine, type StrictOmit, Type, type TypeThunkAsync } from 'ts-gems';
2
2
  import { Validator } from 'valgen';
3
3
  import type { OpraSchema } from '../../schema/index.js';
4
- import type { ApiDocument } from '../api-document';
4
+ import type { ApiDocument } from '../api-document.js';
5
5
  import { DocumentElement } from '../common/document-element.js';
6
6
  import { Value } from '../common/value.js';
7
7
  import { DataType } from '../data-type/data-type.js';
@@ -1,9 +1,9 @@
1
1
  import type { StrictOmit } from 'ts-gems';
2
2
  import { OpraSchema } from '../../schema/index.js';
3
- import type { ApiDocument } from '../api-document';
3
+ import type { ApiDocument } from '../api-document.js';
4
4
  import { DocumentElement } from '../common/document-element.js';
5
5
  import { HttpMediaType } from './http-media-type.js';
6
- import type { HttpOperation } from './http-operation';
6
+ import type { HttpOperation } from './http-operation.js';
7
7
  /**
8
8
  * @namespace HttpRequestBody
9
9
  */
@@ -1,7 +1,7 @@
1
1
  import type { StrictOmit, Type } from 'ts-gems';
2
2
  import { ResponsiveMap } from '../../helpers/index.js';
3
3
  import { OpraSchema } from '../../schema/index.js';
4
- import type { ApiDocument } from '../api-document';
4
+ import type { ApiDocument } from '../api-document.js';
5
5
  import { ApiBase } from '../common/api-base.js';
6
6
  import { MQController } from './mq-controller.js';
7
7
  import { MQOperation } from './mq-operation.js';
@@ -7,7 +7,7 @@ import type { EnumType } from '../data-type/enum-type.js';
7
7
  import { MQControllerDecoratorFactory } from '../decorators/mq-controller.decorator.js';
8
8
  import { nodeInspectCustom } from '../utils/inspect.util.js';
9
9
  import type { MQApi } from './mq-api.js';
10
- import type { MQHeader } from './mq-header';
10
+ import type { MQHeader } from './mq-header.js';
11
11
  import type { MQOperation } from './mq-operation.js';
12
12
  /**
13
13
  * @namespace MQController
@@ -1,9 +1,8 @@
1
- import type { Combine, Type } from 'ts-gems';
2
- import { TypeThunkAsync } from 'ts-gems/lib/types';
1
+ import type { Combine, Type, TypeThunkAsync } from 'ts-gems';
3
2
  import { OpraSchema } from '../../schema/index.js';
4
3
  import { DocumentElement } from '../common/document-element.js';
5
4
  import { DataType } from '../data-type/data-type.js';
6
- import type { MQHeader } from './mq-header';
5
+ import type { MQHeader } from './mq-header.js';
7
6
  import type { MQOperation } from './mq-operation.js';
8
7
  /**
9
8
  * @namespace MQOperationResponse
@@ -1,5 +1,5 @@
1
1
  import type { Combine, ThunkAsync, Type } from 'ts-gems';
2
- import { TypeThunkAsync } from 'ts-gems/lib/types';
2
+ import { TypeThunkAsync } from 'ts-gems';
3
3
  import { Validator } from 'valgen';
4
4
  import { OpraSchema } from '../../schema/index.js';
5
5
  import { DataTypeMap } from '../common/data-type-map.js';
@@ -8,7 +8,7 @@ import { DataType } from '../data-type/data-type.js';
8
8
  import type { EnumType } from '../data-type/enum-type.js';
9
9
  import { MQOperationDecorator } from '../decorators/mq-operation.decorator.js';
10
10
  import type { MQController } from './mq-controller.js';
11
- import type { MQHeader } from './mq-header';
11
+ import type { MQHeader } from './mq-header.js';
12
12
  import type { MQOperationResponse } from './mq-operation-response.js';
13
13
  /**
14
14
  * @namespace MQOperation
@@ -1,7 +1,7 @@
1
1
  import type { StrictOmit, Type } from 'ts-gems';
2
2
  import { ResponsiveMap } from '../../helpers/index.js';
3
3
  import { OpraSchema } from '../../schema/index.js';
4
- import type { ApiDocument } from '../api-document';
4
+ import type { ApiDocument } from '../api-document.js';
5
5
  import { ApiBase } from '../common/api-base.js';
6
6
  import { WSController } from './ws-controller.js';
7
7
  import { WSOperation } from './ws-operation.js';
@@ -5,7 +5,9 @@ export declare enum MimeTypes {
5
5
  json = "application/json",
6
6
  xml = "application/xml",
7
7
  yaml = "text/yaml",
8
+ yaml2 = "application/yaml",
8
9
  toml = "text/toml",
10
+ toml2 = "application/toml",
9
11
  text = "text/plain",
10
12
  html = "text/html",
11
13
  markdown = "text/markdown",
@@ -7,7 +7,9 @@ export var MimeTypes;
7
7
  MimeTypes["json"] = "application/json";
8
8
  MimeTypes["xml"] = "application/xml";
9
9
  MimeTypes["yaml"] = "text/yaml";
10
+ MimeTypes["yaml2"] = "application/yaml";
10
11
  MimeTypes["toml"] = "text/toml";
12
+ MimeTypes["toml2"] = "application/toml";
11
13
  MimeTypes["text"] = "text/plain";
12
14
  MimeTypes["html"] = "text/html";
13
15
  MimeTypes["markdown"] = "text/markdown";
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  /** monkey patch (hijack)
3
2
  * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json
4
3
  */
@@ -12,3 +11,4 @@ if (!RegExp.prototype.toJSON) {
12
11
  return this.toString();
13
12
  };
14
13
  }
14
+ export {};
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@opra/common",
3
- "version": "1.24.3",
3
+ "version": "1.25.1",
4
4
  "description": "Opra common package",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
7
7
  "dependencies": {
8
- "@browsery/antlr4": "^4.13.3-r4",
9
- "@browsery/highland": "^2.13.6-r4",
10
- "@browsery/http-parser": "^0.5.10-r2",
8
+ "@browsery/antlr4": "^4.13.3-r5",
9
+ "@browsery/highland": "^2.13.6-r5",
10
+ "@browsery/http-parser": "^0.5.10-r3",
11
11
  "@browsery/i18next": "^25.6.0",
12
- "@browsery/type-is": "^2.0.1",
12
+ "@browsery/type-is": "^2.0.2-r1",
13
13
  "@jsopen/objects": "^2.2.0",
14
14
  "fast-tokenizer": "^1.9.0",
15
15
  "object-hash": "^3.0.0",