Skip to content

Commit

Permalink
build(ns-asyncapi-2): use nodenext for TypeScript modules (#4486)
Browse files Browse the repository at this point in the history
Refs #4385
  • Loading branch information
glowcloud authored Nov 13, 2024
1 parent 1ace076 commit 8399874
Show file tree
Hide file tree
Showing 326 changed files with 1,593 additions and 1,525 deletions.
22 changes: 22 additions & 0 deletions packages/apidom-ns-asyncapi-2/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"settings": {
"import/resolver": {
"typescript": {
"project": ["./tsconfig.json"]
}
}
},
"rules": {
"import/extensions": [
"error",
"always",
{
"ts": "always",
"tsx": "always",
"js": "always",
"jsx": "never",
"ignorePackages": true
}
]
}
}
4 changes: 2 additions & 2 deletions packages/apidom-ns-asyncapi-2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"test:update-snapshots": "cross-env UPDATE_SNAPSHOT=1 BABEL_ENV=cjs mocha",
"perf": "cross-env BABEL_ENV=es babel ./test/perf/index.ts --out-file ./test/perf/index.mjs --root-mode 'upward' && cross-env NODE_ENV=test node ./test/perf/index.mjs",
"perf:visitor-shortcut": "cross-env BABEL_ENV=es babel ./test/perf/visitor-shortcut.ts --out-file ./test/perf/visitor-shortcut.mjs --root-mode 'upward' && cross-env NODE_ENV=test node ./test/perf/visitor-shortcut.mjs",
"typescript:check-types": "tsc --noEmit",
"typescript:declaration": "tsc -p declaration.tsconfig.json && rollup -c config/rollup/types.dist.js",
"typescript:check-types": "tsc --noEmit && tsc -p ./test/tsconfig.json --noEmit",
"typescript:declaration": "tsc -p tsconfig.declaration.json && rollup -c config/rollup/types.dist.js",
"prepack": "copyfiles -u 3 ../../LICENSES/* LICENSES && copyfiles -u 2 ../../NOTICE .",
"postpack": "rimraf NOTICE LICENSES"
},
Expand Down
18 changes: 9 additions & 9 deletions packages/apidom-ns-asyncapi-2/src/elements/AsyncApi2.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core';

import AsyncApiVersionElement from './AsyncApiVersion';
import DefaultContentTypeElement from './DefaultContentType';
import IdentifierElement from './Identifier';
import ComponentsElement from './Components';
import InfoElement from './Info';
import ChannelsElement from './Channels';
import ServersElement from './Servers';
import TagsElement from './Tags';
import ExternalDocumentationElement from './ExternalDocumentation';
import AsyncApiVersionElement from './AsyncApiVersion.ts';
import DefaultContentTypeElement from './DefaultContentType.ts';
import IdentifierElement from './Identifier.ts';
import ComponentsElement from './Components.ts';
import InfoElement from './Info.ts';
import ChannelsElement from './Channels.ts';
import ServersElement from './Servers.ts';
import TagsElement from './Tags.ts';
import ExternalDocumentationElement from './ExternalDocumentation.ts';

class AsyncApi2 extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
36 changes: 18 additions & 18 deletions packages/apidom-ns-asyncapi-2/src/elements/ChannelBindings.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core';

import HttpChannelBindingElement from './bindings/http/HttpChannelBinding';
import WebSocketChannelBindingElement from './bindings/ws/WebSocketChannelBinding';
import KafkaChannelBindingElement from './bindings/kafka/KafkaChannelBinding';
import AnypointmqChannelBindingElement from './bindings/anypointmq/AnypointmqChannelBinding';
import AmqpChannelBindingElement from './bindings/amqp/AmqpChannelBinding';
import Amqp1ChannelBindingElement from './bindings/amqp1/Amqp1ChannelBinding';
import MqttChannelBindingElement from './bindings/mqtt/MqttChannelBinding';
import Mqtt5ChannelBindingElement from './bindings/mqtt5/Mqtt5ChannelBinding';
import NatsChannelBindingElement from './bindings/nats/NatsChannelBinding';
import JmsChannelBindingElement from './bindings/jms/JmsChannelBinding';
import SnsChannelBindingElement from './bindings/sns/SnsChannelBinding';
import SolaceChannelBindingElement from './bindings/solace/SolaceChannelBinding';
import SqsChannelBindingElement from './bindings/sqs/SqsChannelBinding';
import StompChannelBindingElement from './bindings/stomp/StompChannelBinding';
import RedisChannelBindingElement from './bindings/redis/RedisChannelBinding';
import MercureChannelBindingElement from './bindings/mercure/MercureChannelBinding';
import IbmmqChannelBindingElement from './bindings/ibmmq/IbmmqChannelBinding';
import GooglepubsubChannelBindingElement from './bindings/googlepubsub/GooglepubsubChannelBinding';
import HttpChannelBindingElement from './bindings/http/HttpChannelBinding.ts';
import WebSocketChannelBindingElement from './bindings/ws/WebSocketChannelBinding.ts';
import KafkaChannelBindingElement from './bindings/kafka/KafkaChannelBinding.ts';
import AnypointmqChannelBindingElement from './bindings/anypointmq/AnypointmqChannelBinding.ts';
import AmqpChannelBindingElement from './bindings/amqp/AmqpChannelBinding.ts';
import Amqp1ChannelBindingElement from './bindings/amqp1/Amqp1ChannelBinding.ts';
import MqttChannelBindingElement from './bindings/mqtt/MqttChannelBinding.ts';
import Mqtt5ChannelBindingElement from './bindings/mqtt5/Mqtt5ChannelBinding.ts';
import NatsChannelBindingElement from './bindings/nats/NatsChannelBinding.ts';
import JmsChannelBindingElement from './bindings/jms/JmsChannelBinding.ts';
import SnsChannelBindingElement from './bindings/sns/SnsChannelBinding.ts';
import SolaceChannelBindingElement from './bindings/solace/SolaceChannelBinding.ts';
import SqsChannelBindingElement from './bindings/sqs/SqsChannelBinding.ts';
import StompChannelBindingElement from './bindings/stomp/StompChannelBinding.ts';
import RedisChannelBindingElement from './bindings/redis/RedisChannelBinding.ts';
import MercureChannelBindingElement from './bindings/mercure/MercureChannelBinding.ts';
import IbmmqChannelBindingElement from './bindings/ibmmq/IbmmqChannelBinding.ts';
import GooglepubsubChannelBindingElement from './bindings/googlepubsub/GooglepubsubChannelBinding.ts';

class ChannelBindings extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
6 changes: 3 additions & 3 deletions packages/apidom-ns-asyncapi-2/src/elements/ChannelItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
Meta,
} from '@swagger-api/apidom-core';

import OperationElement from './Operation';
import ParametersElement from './Parameters';
import ChannelBindingsElement from './ChannelBindings';
import OperationElement from './Operation.ts';
import ParametersElement from './Parameters.ts';
import ChannelBindingsElement from './ChannelBindings.ts';

class ChannelItem extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
4 changes: 2 additions & 2 deletions packages/apidom-ns-asyncapi-2/src/elements/Info.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { StringElement, ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core';

import ContactElement from './Contact';
import LicenseElement from './License';
import ContactElement from './Contact.ts';
import LicenseElement from './License.ts';

class Info extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
12 changes: 6 additions & 6 deletions packages/apidom-ns-asyncapi-2/src/elements/Message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import {
Meta,
} from '@swagger-api/apidom-core';

import CorrelationIDElement from './CorrelationID';
import ReferenceElement from './Reference';
import SchemaElement from './Schema';
import TagsElement from './Tags';
import ExternalDocumentationElement from './ExternalDocumentation';
import MessageBindingsElement from './MessageBindings';
import CorrelationIDElement from './CorrelationID.ts';
import ReferenceElement from './Reference.ts';
import SchemaElement from './Schema.ts';
import TagsElement from './Tags.ts';
import ExternalDocumentationElement from './ExternalDocumentation.ts';
import MessageBindingsElement from './MessageBindings.ts';

class Message extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
36 changes: 18 additions & 18 deletions packages/apidom-ns-asyncapi-2/src/elements/MessageBindings.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core';

import HttpMessageBindingElement from './bindings/http/HttpMessageBinding';
import WebSocketMessageBindingElement from './bindings/ws/WebSocketMessageBinding';
import KafkaMessageBindingElement from './bindings/kafka/KafkaMessageBinding';
import AnypointmqMessageBindingElement from './bindings/anypointmq/AnypointmqMessageBinding';
import AmqpMessageBindingElement from './bindings/amqp/AmqpMessageBinding';
import Amqp1MessageBindingElement from './bindings/amqp1/Amqp1MessageBinding';
import MqttMessageBindingElement from './bindings/mqtt/MqttMessageBinding';
import Mqtt5MessageBindingElement from './bindings/mqtt5/Mqtt5MessageBinding';
import NatsMessageBindingElement from './bindings/nats/NatsMessageBinding';
import JmsMessageBindingElement from './bindings/jms/JmsMessageBinding';
import SnsMessageBindingElement from './bindings/sns/SnsMessageBinding';
import SolaceMessageBindingElement from './bindings/solace/SolaceMessageBinding';
import SqsMessageBindingElement from './bindings/sqs/SqsMessageBinding';
import StompMessageBindingElement from './bindings/stomp/StompMessageBinding';
import RedisMessageBindingElement from './bindings/redis/RedisMessageBinding';
import MercureMessageBindingElement from './bindings/mercure/MercureMessageBinding';
import IbmmqMessageBindingElement from './bindings/ibmmq/IbmmqMessageBinding';
import GooglepubsubMessageBindingElement from './bindings/googlepubsub/GooglepubsubMessageBinding';
import HttpMessageBindingElement from './bindings/http/HttpMessageBinding.ts';
import WebSocketMessageBindingElement from './bindings/ws/WebSocketMessageBinding.ts';
import KafkaMessageBindingElement from './bindings/kafka/KafkaMessageBinding.ts';
import AnypointmqMessageBindingElement from './bindings/anypointmq/AnypointmqMessageBinding.ts';
import AmqpMessageBindingElement from './bindings/amqp/AmqpMessageBinding.ts';
import Amqp1MessageBindingElement from './bindings/amqp1/Amqp1MessageBinding.ts';
import MqttMessageBindingElement from './bindings/mqtt/MqttMessageBinding.ts';
import Mqtt5MessageBindingElement from './bindings/mqtt5/Mqtt5MessageBinding.ts';
import NatsMessageBindingElement from './bindings/nats/NatsMessageBinding.ts';
import JmsMessageBindingElement from './bindings/jms/JmsMessageBinding.ts';
import SnsMessageBindingElement from './bindings/sns/SnsMessageBinding.ts';
import SolaceMessageBindingElement from './bindings/solace/SolaceMessageBinding.ts';
import SqsMessageBindingElement from './bindings/sqs/SqsMessageBinding.ts';
import StompMessageBindingElement from './bindings/stomp/StompMessageBinding.ts';
import RedisMessageBindingElement from './bindings/redis/RedisMessageBinding.ts';
import MercureMessageBindingElement from './bindings/mercure/MercureMessageBinding.ts';
import IbmmqMessageBindingElement from './bindings/ibmmq/IbmmqMessageBinding.ts';
import GooglepubsubMessageBindingElement from './bindings/googlepubsub/GooglepubsubMessageBinding.ts';

class MessageBindings extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
12 changes: 6 additions & 6 deletions packages/apidom-ns-asyncapi-2/src/elements/MessageTrait.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import {
Meta,
} from '@swagger-api/apidom-core';

import CorrelationIDElement from './CorrelationID';
import ExternalDocumentationElement from './ExternalDocumentation';
import MessageBindingsElement from './MessageBindings';
import ReferenceElement from './Reference';
import SchemaElement from './Schema';
import TagsElement from './Tags';
import CorrelationIDElement from './CorrelationID.ts';
import ExternalDocumentationElement from './ExternalDocumentation.ts';
import MessageBindingsElement from './MessageBindings.ts';
import ReferenceElement from './Reference.ts';
import SchemaElement from './Schema.ts';
import TagsElement from './Tags.ts';

class MessageTrait extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
2 changes: 1 addition & 1 deletion packages/apidom-ns-asyncapi-2/src/elements/OAuthFlows.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core';

import OAuthFlowElement from './OAuthFlow';
import OAuthFlowElement from './OAuthFlow.ts';

class OAuthFlows extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
10 changes: 5 additions & 5 deletions packages/apidom-ns-asyncapi-2/src/elements/Operation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {
Meta,
} from '@swagger-api/apidom-core';

import TagsElement from './Tags';
import ExternalDocumentationElement from './ExternalDocumentation';
import OperationBindingsElement from './OperationBindings';
import MessageElement from './Message';
import ReferenceElement from './Reference';
import TagsElement from './Tags.ts';
import ExternalDocumentationElement from './ExternalDocumentation.ts';
import OperationBindingsElement from './OperationBindings.ts';
import MessageElement from './Message.ts';
import ReferenceElement from './Reference.ts';

class Operation extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
36 changes: 18 additions & 18 deletions packages/apidom-ns-asyncapi-2/src/elements/OperationBindings.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core';

import HttpOperationBindingElement from './bindings/http/HttpOperationBinding';
import WebSocketOperationBindingElement from './bindings/ws/WebSocketOperationBinding';
import KafkaOperationBindingElement from './bindings/kafka/KafkaOperationBinding';
import AnypointmqOperationBindingElement from './bindings/anypointmq/AnypointmqOperationBinding';
import AmqpOperationBindingElement from './bindings/amqp/AmqpOperationBinding';
import Amqp1OperationBindingElement from './bindings/amqp1/Amqp1OperationBinding';
import MqttOperationBindingElement from './bindings/mqtt/MqttOperationBinding';
import Mqtt5OperationBindingElement from './bindings/mqtt5/Mqtt5OperationBinding';
import NatsOperationBindingElement from './bindings/nats/NatsOperationBinding';
import JmsOperationBindingElement from './bindings/jms/JmsOperationBinding';
import SnsOperationBindingElement from './bindings/sns/SnsOperationBinding';
import SolaceOperationBindingElement from './bindings/solace/SolaceOperationBinding';
import SqsOperationBindingElement from './bindings/sqs/SqsOperationBinding';
import StompOperationBindingElement from './bindings/stomp/StompOperationBinding';
import RedisOperationBindingElement from './bindings/redis/RedisOperationBinding';
import MercureOperationBindingElement from './bindings/mercure/MercureOperationBinding';
import IbmmqOperationBindingElement from './bindings/ibmmq/IbmmqOperationBinding';
import GooglepubsubOperationBindingElement from './bindings/googlepubsub/GooglepubsubOperationBinding';
import HttpOperationBindingElement from './bindings/http/HttpOperationBinding.ts';
import WebSocketOperationBindingElement from './bindings/ws/WebSocketOperationBinding.ts';
import KafkaOperationBindingElement from './bindings/kafka/KafkaOperationBinding.ts';
import AnypointmqOperationBindingElement from './bindings/anypointmq/AnypointmqOperationBinding.ts';
import AmqpOperationBindingElement from './bindings/amqp/AmqpOperationBinding.ts';
import Amqp1OperationBindingElement from './bindings/amqp1/Amqp1OperationBinding.ts';
import MqttOperationBindingElement from './bindings/mqtt/MqttOperationBinding.ts';
import Mqtt5OperationBindingElement from './bindings/mqtt5/Mqtt5OperationBinding.ts';
import NatsOperationBindingElement from './bindings/nats/NatsOperationBinding.ts';
import JmsOperationBindingElement from './bindings/jms/JmsOperationBinding.ts';
import SnsOperationBindingElement from './bindings/sns/SnsOperationBinding.ts';
import SolaceOperationBindingElement from './bindings/solace/SolaceOperationBinding.ts';
import SqsOperationBindingElement from './bindings/sqs/SqsOperationBinding.ts';
import StompOperationBindingElement from './bindings/stomp/StompOperationBinding.ts';
import RedisOperationBindingElement from './bindings/redis/RedisOperationBinding.ts';
import MercureOperationBindingElement from './bindings/mercure/MercureOperationBinding.ts';
import IbmmqOperationBindingElement from './bindings/ibmmq/IbmmqOperationBinding.ts';
import GooglepubsubOperationBindingElement from './bindings/googlepubsub/GooglepubsubOperationBinding.ts';

class OperationBindings extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
8 changes: 4 additions & 4 deletions packages/apidom-ns-asyncapi-2/src/elements/OperationTrait.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import {
Meta,
} from '@swagger-api/apidom-core';

import TagsElement from './Tags';
import ExternalDocumentationElement from './ExternalDocumentation';
import OperationBindingsElement from './OperationBindings';
import ReferenceElement from './Reference';
import TagsElement from './Tags.ts';
import ExternalDocumentationElement from './ExternalDocumentation.ts';
import OperationBindingsElement from './OperationBindings.ts';
import ReferenceElement from './Reference.ts';

class OperationTrait extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
4 changes: 2 additions & 2 deletions packages/apidom-ns-asyncapi-2/src/elements/Parameter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { StringElement, ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core';

import SchemaElement from './Schema';
import ReferenceElement from './Reference';
import SchemaElement from './Schema.ts';
import ReferenceElement from './Reference.ts';

class Parameter extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
4 changes: 2 additions & 2 deletions packages/apidom-ns-asyncapi-2/src/elements/Schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
} from '@swagger-api/apidom-core';
import { JSONSchemaElement } from '@swagger-api/apidom-ns-json-schema-draft-7';

import ReferenceElement from './Reference';
import ExternalDocumentationElement from './ExternalDocumentation';
import ReferenceElement from './Reference.ts';
import ExternalDocumentationElement from './ExternalDocumentation.ts';

class Schema extends JSONSchemaElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StringElement, ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core';

import OAuthFlowsElement from './OAuthFlows';
import OAuthFlowsElement from './OAuthFlows.ts';

class SecurityScheme extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
2 changes: 1 addition & 1 deletion packages/apidom-ns-asyncapi-2/src/elements/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Meta,
} from '@swagger-api/apidom-core';

import ServerBindingsElement from './ServerBindings';
import ServerBindingsElement from './ServerBindings.ts';

class Server extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
Loading

0 comments on commit 8399874

Please sign in to comment.