From a1d99e172f5d57c974349cc28c70af54c40a9090 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 2 Oct 2023 12:33:22 +0200 Subject: [PATCH 01/16] chore: update @asyncapi/java-spring-template to 1.1.0 version (#794) --- apps/studio/package.json | 2 +- package-lock.json | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/studio/package.json b/apps/studio/package.json index b44e030c3..cfdcd6bab 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -78,7 +78,7 @@ "@asyncapi/go-watermill-template": "^0.2.40", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", - "@asyncapi/java-spring-template": "^1.0.0", + "@asyncapi/java-spring-template": "^1.1.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.3.3", "@asyncapi/nodejs-template": "^0.13.3", diff --git a/package-lock.json b/package-lock.json index 5aa7b2e95..64667afe4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -525,7 +525,7 @@ "@asyncapi/go-watermill-template": "^0.2.40", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", - "@asyncapi/java-spring-template": "^1.0.0", + "@asyncapi/java-spring-template": "^1.1.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.3.3", "@asyncapi/nodejs-template": "^0.13.3", @@ -1430,9 +1430,9 @@ } }, "node_modules/@asyncapi/java-spring-template": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.0.0.tgz", - "integrity": "sha512-3f60yPVQ4+B/8jiwt+16PU6jEfE9+rQlRHbCMKyOaUXbc8Mbyc9LNfNgk6PU42b4hquqUT8+ep1qgtZ+srSHIA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.1.0.tgz", + "integrity": "sha512-qbGONcOEyuSKFhpmFQC4ED9cmdy6R3afFAx1ZPQkjO71oPZ/tVhpZng0oP/OQ+3BjywxbDDYFul79/jVJKLBVg==", "dev": true, "dependencies": { "@asyncapi/generator-filters": "^2.1.0", @@ -34930,9 +34930,9 @@ } }, "@asyncapi/java-spring-template": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.0.0.tgz", - "integrity": "sha512-3f60yPVQ4+B/8jiwt+16PU6jEfE9+rQlRHbCMKyOaUXbc8Mbyc9LNfNgk6PU42b4hquqUT8+ep1qgtZ+srSHIA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.1.0.tgz", + "integrity": "sha512-qbGONcOEyuSKFhpmFQC4ED9cmdy6R3afFAx1ZPQkjO71oPZ/tVhpZng0oP/OQ+3BjywxbDDYFul79/jVJKLBVg==", "dev": true, "requires": { "@asyncapi/generator-filters": "^2.1.0", @@ -35353,7 +35353,7 @@ "@asyncapi/go-watermill-template": "^0.2.40", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", - "@asyncapi/java-spring-template": "^1.0.0", + "@asyncapi/java-spring-template": "^1.1.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.3.3", "@asyncapi/nodejs-template": "^0.13.3", From 1c40838068da7f1a5def2ed5442f485c1e74b4ef Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 2 Oct 2023 12:49:58 +0200 Subject: [PATCH 02/16] chore: update @asyncapi/java-spring-template to 1.2.0 version (#795) --- apps/studio/package.json | 2 +- package-lock.json | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/studio/package.json b/apps/studio/package.json index cfdcd6bab..656a4afa8 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -78,7 +78,7 @@ "@asyncapi/go-watermill-template": "^0.2.40", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", - "@asyncapi/java-spring-template": "^1.1.0", + "@asyncapi/java-spring-template": "^1.2.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.3.3", "@asyncapi/nodejs-template": "^0.13.3", diff --git a/package-lock.json b/package-lock.json index 64667afe4..0951454f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -525,7 +525,7 @@ "@asyncapi/go-watermill-template": "^0.2.40", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", - "@asyncapi/java-spring-template": "^1.1.0", + "@asyncapi/java-spring-template": "^1.2.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.3.3", "@asyncapi/nodejs-template": "^0.13.3", @@ -1430,9 +1430,9 @@ } }, "node_modules/@asyncapi/java-spring-template": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.1.0.tgz", - "integrity": "sha512-qbGONcOEyuSKFhpmFQC4ED9cmdy6R3afFAx1ZPQkjO71oPZ/tVhpZng0oP/OQ+3BjywxbDDYFul79/jVJKLBVg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.2.0.tgz", + "integrity": "sha512-aCt18PnX24rgqZOvBoIC2Fi3rISB0vey/Kuk/VLAs4Ox89bcnIkZFZFB7u/h70IO+cI0I/GldyzpwluTGfJeeg==", "dev": true, "dependencies": { "@asyncapi/generator-filters": "^2.1.0", @@ -34930,9 +34930,9 @@ } }, "@asyncapi/java-spring-template": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.1.0.tgz", - "integrity": "sha512-qbGONcOEyuSKFhpmFQC4ED9cmdy6R3afFAx1ZPQkjO71oPZ/tVhpZng0oP/OQ+3BjywxbDDYFul79/jVJKLBVg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.2.0.tgz", + "integrity": "sha512-aCt18PnX24rgqZOvBoIC2Fi3rISB0vey/Kuk/VLAs4Ox89bcnIkZFZFB7u/h70IO+cI0I/GldyzpwluTGfJeeg==", "dev": true, "requires": { "@asyncapi/generator-filters": "^2.1.0", @@ -35353,7 +35353,7 @@ "@asyncapi/go-watermill-template": "^0.2.40", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", - "@asyncapi/java-spring-template": "^1.1.0", + "@asyncapi/java-spring-template": "^1.2.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.3.3", "@asyncapi/nodejs-template": "^0.13.3", From 4c6d6b8e36d73aa9f7550fcdf513e44a2ccb7880 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 3 Oct 2023 13:09:28 +0200 Subject: [PATCH 03/16] chore: update @asyncapi/nodejs-template to 1.0.0 version (#798) --- apps/studio/package.json | 2 +- package-lock.json | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/studio/package.json b/apps/studio/package.json index 656a4afa8..ed9425eea 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -81,7 +81,7 @@ "@asyncapi/java-spring-template": "^1.2.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.3.3", - "@asyncapi/nodejs-template": "^0.13.3", + "@asyncapi/nodejs-template": "^1.0.0", "@asyncapi/nodejs-ws-template": "^0.9.33", "@asyncapi/python-paho-template": "^0.2.13", "@asyncapi/ts-nats-template": "^0.10.3", diff --git a/package-lock.json b/package-lock.json index 0951454f0..532f3cf76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -528,7 +528,7 @@ "@asyncapi/java-spring-template": "^1.2.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.3.3", - "@asyncapi/nodejs-template": "^0.13.3", + "@asyncapi/nodejs-template": "^1.0.0", "@asyncapi/nodejs-ws-template": "^0.9.33", "@asyncapi/python-paho-template": "^0.2.13", "@asyncapi/ts-nats-template": "^0.10.3", @@ -1670,9 +1670,9 @@ } }, "node_modules/@asyncapi/nodejs-template": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/@asyncapi/nodejs-template/-/nodejs-template-0.13.3.tgz", - "integrity": "sha512-qzW4OqYuQ7Vf3lHpiiZDO2IzL4zzBd3OBADLEufjsbLtldhxV7h/ztes8UjZuhycqRC5WL3LP+Bd1QalEDllkw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@asyncapi/nodejs-template/-/nodejs-template-1.0.0.tgz", + "integrity": "sha512-Veh1AfyE2v33HBQ++yID4gKbBJvhliW0+kXSYTzYK232HzlwQXK7QQMLImQpP+HJAvlCfsu2Tyknwej52D19Gw==", "dev": true, "dependencies": { "@asyncapi/generator-filters": "^2.1.0", @@ -35126,9 +35126,9 @@ } }, "@asyncapi/nodejs-template": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/@asyncapi/nodejs-template/-/nodejs-template-0.13.3.tgz", - "integrity": "sha512-qzW4OqYuQ7Vf3lHpiiZDO2IzL4zzBd3OBADLEufjsbLtldhxV7h/ztes8UjZuhycqRC5WL3LP+Bd1QalEDllkw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@asyncapi/nodejs-template/-/nodejs-template-1.0.0.tgz", + "integrity": "sha512-Veh1AfyE2v33HBQ++yID4gKbBJvhliW0+kXSYTzYK232HzlwQXK7QQMLImQpP+HJAvlCfsu2Tyknwej52D19Gw==", "dev": true, "requires": { "@asyncapi/generator-filters": "^2.1.0", @@ -35356,7 +35356,7 @@ "@asyncapi/java-spring-template": "^1.2.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.3.3", - "@asyncapi/nodejs-template": "^0.13.3", + "@asyncapi/nodejs-template": "^1.0.0", "@asyncapi/nodejs-ws-template": "^0.9.33", "@asyncapi/openapi-schema-parser": "^3.0.4", "@asyncapi/parser": "^2.1.0-next-major-spec.5", From 42842644e81fcdc29a841093bb755b8b75704b8e Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Tue, 3 Oct 2023 17:09:13 +0200 Subject: [PATCH 04/16] feat: enable navigation for v3 (#796) --- apps/studio/package.json | 2 +- apps/studio/src/components/Content.tsx | 7 +- .../Modals/Generator/template-parameters.json | 2 +- apps/studio/src/components/Navigation.tsx | 47 ++- apps/studio/src/components/Navigationv3.tsx | 391 ++++++++++++++++++ apps/studio/src/components/Sidebar.tsx | 2 +- .../src/components/Template/HTMLWrapper.tsx | 9 +- .../src/components/Visualiser/Visualiser.tsx | 8 +- apps/studio/src/react-app-env.d.ts | 4 +- apps/studio/src/services/parser.service.ts | 11 +- apps/studio/src/state/documents.state.ts | 4 +- package-lock.json | 20 +- 12 files changed, 453 insertions(+), 54 deletions(-) create mode 100644 apps/studio/src/components/Navigationv3.tsx diff --git a/apps/studio/package.json b/apps/studio/package.json index ed9425eea..a6f93ce51 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -26,7 +26,7 @@ "@asyncapi/avro-schema-parser": "^3.0.2", "@asyncapi/converter": "^1.3.1", "@asyncapi/openapi-schema-parser": "^3.0.4", - "@asyncapi/parser": "^2.1.0-next-major-spec.5", + "@asyncapi/parser": "^3.0.0-next-major-spec.2", "@asyncapi/react-component": "^1.0.0-next.54", "@asyncapi/specs": "^6.0.0-next-major-spec.6", "@ebay/nice-modal-react": "^1.2.10", diff --git a/apps/studio/src/components/Content.tsx b/apps/studio/src/components/Content.tsx index 40c68a8d7..cea67ccc6 100644 --- a/apps/studio/src/components/Content.tsx +++ b/apps/studio/src/components/Content.tsx @@ -1,6 +1,7 @@ import SplitPane from './SplitPane'; import { Editor } from './Editor/Editor'; import { Navigation } from './Navigation'; +import { Navigationv3 } from './Navigationv3'; import { Template } from './Template'; import { VisualiserTemplate } from './Visualiser'; @@ -16,7 +17,7 @@ export const Content: FunctionComponent = () => { // eslint-disabl const document = useDocumentsState(state => state.documents['asyncapi']?.document) || null; const v3Enabled = useSettingsState(state => state.editor.v3support) || false; const isV3 = document?.version() === '3.0.0' && v3Enabled; - const navigationEnabled = isV3 ? false : show.primarySidebar; + const navigationEnabled = show.primarySidebar; const editorEnabled = show.primaryPanel; const viewEnabled = show.secondaryPanel; const viewType = secondaryPanelType; @@ -42,7 +43,9 @@ export const Content: FunctionComponent = () => { // eslint-disabl localStorage.setItem(splitPosLeft, String(size)); }, 100)} > - + { + isV3 ? : + } ); diff --git a/apps/studio/src/components/Modals/Generator/template-parameters.json b/apps/studio/src/components/Modals/Generator/template-parameters.json index 77321670a..afd6f0c7e 100644 --- a/apps/studio/src/components/Modals/Generator/template-parameters.json +++ b/apps/studio/src/components/Modals/Generator/template-parameters.json @@ -1 +1 @@ -{"@asyncapi/dotnet-nats-template":{"title":".NET Nats Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"version":{"description":"Version of the generated library","type":"string","default":"0.0.1"},"projectName":{"description":"Name of the generated library","type":"string","default":"AsyncapiNatsClient"},"repositoryUrl":{"description":"Repository url for the project file, often needed for release pipelines","type":"string"},"targetFramework":{"description":"The project target framework","type":"string","default":"netstandard2.0;netstandard2.1"},"packageVersion":{"description":"PackageVersion of the generated library","type":"string"},"assemblyVersion":{"description":"AssemblyVersion of the generated library","type":"string"},"fileVersion":{"description":"FileVersion of the generated library","type":"string"},"serializationLibrary":{"description":"Which serialization library should the models use? `newtonsoft` or `json` (system.text.json)","type":"string","default":"json"}},"required":[],"additionalProperties":false},"supportedProtocols":["nats"]},"@asyncapi/go-watermill-template":{"title":"GO Lang Watermill Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"moduleName":{"description":"name of the go module to be generated","type":"string","default":"go-async-api"}},"required":[],"additionalProperties":false},"supportedProtocols":["amqp"]},"@asyncapi/html-template":{"title":"HTML website","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"sidebarOrganization":{"description":"Defines how the sidebar should be organized. 'byTags' to categorize operations by tags in the root of the document, `byTagsNoRoot` does the same but for pub/sub tags.","type":"string"},"baseHref":{"description":"Sets the base URL for links and forms.","type":"string"},"version":{"description":"Override the version of your application provided under `info.version` location in the specification file.","type":"string"},"singleFile":{"description":"If set this parameter to true generate single html file with scripts and styles inside","type":"boolean","default":false},"outFilename":{"description":"The name of the output HTML file","type":"string","default":"index.html"},"pdf":{"description":"Set to `true` to get index.pdf generated next to your index.html","type":"boolean","default":false},"pdfTimeout":{"description":"The timeout (in ms) used to generate the pdf","type":"number","default":30000},"favicon":{"description":"URL/Path of the favicon","type":"string","default":""},"config":{"description":"Stringified JSON or a path to a JSON file to override the default React component config. The config override is merged with the default config using the [JSON Merge Patch](https://tools.ietf.org/html/rfc7386) algorithm.","type":"string","default":""}},"required":[],"additionalProperties":false}},"@asyncapi/java-spring-cloud-stream-template":{"title":"Java Spring Cloud Stream Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"actuator":{"description":"If present, it adds the dependencies for spring-boot-starter-web, spring-boot-starter-actuator and micrometer-registry-prometheus.","type":"boolean","default":false},"artifactId":{"description":"The Maven artifact id. Alternatively you can set the specification extension info.x-artifact-id","type":"string","default":"project-name"},"artifactType":{"description":"The type of project to generate, application or library. The default is application. When generating an application, the pom.xml file will contain the complete set of dependencies required to run an app, and it will contain an Application class with a main function. Otherwise the pom file will include only the dependencies required to compile a library.","type":"string","default":"application"},"binder":{"description":"The name of the binder implementation, one of kafka, rabbit or solace. Default: kafka. If you need other binders to be supported, please let us know!","type":"string","default":"kafka"},"dynamicType":{"description":"When using channels with parameters, i.e. dynamic topics where the topic could be different for each message, this determines whether to use the StreamBridge or a message header. StreamBridge can be used with all binders, but some binders such as Solace can use the topic set in a header for better performance. Possible values are streamBridge and header. Default is streamBridge.","type":"string","default":"streamBridge"},"groupId":{"description":"The Maven group id. Alternatively you can set the specification extension info.x-group-id","type":"string","default":"com.company"},"host":{"description":"The host connection property. Currently this only works with the Solace binder. Example: tcp://myhost.com:55555.","type":"string","default":"tcp://localhost:55555"},"javaPackage":{"description":"The Java package of the generated classes. Alternatively you can set the specification extension info.x-java-package","type":"string"},"msgVpn":{"description":"The message vpn connection property. Currently this only works with the Solace binder.","type":"string","default":"default"},"parametersToHeaders":{"description":"If true, this will create headers on the incoming messages for each channel parameter. Currently this only works with messages originating from Solace (using the solace_destination header) and RabbitMQ (using the amqp_receivedRoutingKey header.)","type":"boolean","default":false},"password":{"description":"The client password connection property. Currently this only works with the Solace binder.","type":"string","default":"default"},"reactive":{"description":"If true, this will generate reactive style functions using the Flux class. Defalt: false.","type":"boolean","default":false},"solaceSpringCloudVersion":{"description":"The version of the solace-spring-cloud-bom dependency used when generating an application. Alternatively you can set the specification extension info.x-solace-spring-cloud-version.","type":"string","default":"2.1.0"},"springBootVersion":{"description":"The version of Spring Boot used when generating an application. Alternatively you can set the specification extension info.x-spring-booot-version. Example: 2.2.6.RELEASE.","type":"string","default":"2.4.7"},"springCloudVersion":{"description":"The version of the spring-cloud-dependencies BOM dependency used when generating an application. Alternatively you can set the specification extension info.x-spring-cloud-version. Example: Hoxton.RELEASE.","type":"string","default":"2020.0.3"},"springCloudStreamVersion":{"description":"The version of the spring-cloud-stream dependency specified in the Maven file, when generating a library. When generating an application, the spring-cloud-dependencies BOM is used instead. Example: 3.0.1.RELEASE","type":"string","default":"3.1.3"},"username":{"description":"The client username connection property. Currently this only works with the Solace binder","type":"string","default":"default"},"view":{"description":"The view that the template uses. By default it is the client view, which means that when the document says publish, we subscribe. In the case of the provider view, when the document says publish, we publish. Values are client or provider. The default is client.","type":"string","default":"client"},"useServers":{"description":"This option works when binder is kafka. By default it is set to false. When set to true, it will concatenate all the urls in the servers section as a list of brokers for kafka.","type":"string"}},"required":[],"additionalProperties":false}},"@asyncapi/java-spring-template":{"title":"Java Spring Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"inverseOperations":{"description":"Generate application that will publish messages to `publish` operation of channels and read messages from `subscribe` operation of channels. Literally this flag just swap `publish` and `subscribe` operations in channels.","type":"boolean","default":false},"disableEqualsHashCode":{"description":"Disable generation of equals and hashCode methods for model classes.","type":"boolean","default":false},"listenerPollTimeout":{"description":"Only for Kafka. Timeout to use when polling the consumer.","type":"number","default":3000},"listenerConcurrency":{"description":"Only for Kafka. Number of threads to run in the listener containers.","type":"number","default":3},"connectionTimeout":{"description":"Only for MQTT. This value, measured in seconds, defines the maximum time interval the client will wait for the network connection to the MQTT server to be established. The default timeout is 30 seconds. A value of 0 disables timeout processing meaning the client will wait until the network connection is made successfully or fails.","type":"number","default":30},"disconnectionTimeout":{"description":"Only for MQTT. The completion timeout in milliseconds when disconnecting. The default disconnect completion timeout is 5000 milliseconds.","type":"number","default":5000},"completionTimeout":{"description":"Only for MQTT. The completion timeout in milliseconds for operations. The default completion timeout is 30000 milliseconds.","type":"number","default":30000},"mqttClientId":{"description":"Only for MQTT. Provides the client identifier for the MQTT server. This parameter overrides the value of the clientId if it's set in the AsyncAPI file.","type":"string"},"asyncapiFileDir":{"description":"Parameter of @asyncapi/generator-hooks#createAsyncapiFile, allows to specify where original AsyncAPI file will be stored.","type":"string","default":"src/main/resources/api/"},"javaPackage":{"description":"The Java package of the generated classes. Alternatively you can set the specification extension info.x-java-package","type":"string","default":"com.asyncapi"},"addTypeInfoHeader":{"description":"Only for Kafka. Add type information to the message header","type":"boolean","default":true}},"required":[],"additionalProperties":false},"supportedProtocols":["kafka","amqp","mqtt"]},"@asyncapi/java-template":{"title":"Java Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"server":{"description":"The server you want to use in the code.","type":"string"},"asyncapiFileDir":{"description":"Custom location of the AsyncAPI file that you provided as an input in generation. By default it is located in the root of the output directory","type":"string"},"user":{"description":"Username for the server to generate code for","type":"string","default":"app"},"password":{"description":"Password for the server to generate code for","type":"string","default":"passw0rd"},"package":{"description":"Java package name for generated code","type":"string","default":"com.asyncapi"},"mqTopicPrefix":{"description":"MQ topic prefix. Used for ibmmq protocols. Default will work with dev MQ instance","type":"string","default":"dev//"}},"required":["server"],"additionalProperties":false},"supportedProtocols":["ibmmq","ibmmq-secure","kafka","kafka-secure"]},"@asyncapi/markdown-template":{"title":"Markdown Documentation","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"frontMatter":{"description":"The name of a JSON or YAML formatted file containing values to provide the YAML frontmatter for static-site or documentation generators. The file may contain {{title}} and {{version}} replaceable tags.","type":"string"},"outFilename":{"description":"The name of the output markdown file","type":"string","default":"asyncapi.md"},"toc":{"description":"Include a Table-of-Contents in the output markdown.","type":"boolean","default":true},"version":{"description":"Override the version of your application provided under `info.version` location in the specification file.","type":"string"}},"required":[],"additionalProperties":false}},"@asyncapi/nodejs-template":{"title":"NodeJS Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"server":{"description":"The server you want to use in the code.","type":"string"},"asyncapiFileDir":{"description":"Custom location of the AsyncAPI file that you provided as an input in generation. By default it is located in the root of the output directory","type":"string"},"securityScheme":{"description":"Name of the security scheme. Only scheme with X509 and Kafka protocol is supported for now.","type":"string"},"certFilesDir":{"description":"Directory where application certificates are located. This parameter is needed when you use X509 security scheme and your cert files are not located in the root of your application.","type":"string","default":"./"}},"required":["server"],"additionalProperties":false},"supportedProtocols":["amqp","mqtt","mqtts","kafka","kafka-secure","ws"]},"@asyncapi/nodejs-ws-template":{"title":"NodeJS WebSocket Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"server":{"description":"The server you want to use in the code.","type":"string"},"asyncapiFileDir":{"description":"Custom location of the AsyncAPI file that you provided as an input in generation. By default it is located in the root of the output directory","type":"string"}},"required":["server"],"additionalProperties":false},"supportedProtocols":["ws"]},"@asyncapi/python-paho-template":{"title":"Python Paho Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"view":{"description":"The view that the template uses. By default it is the client view, which means that when the document says publish, we subscribe. In the case of the provider view, when the document says publish, we publish. Values are client or provider. The default is client.","type":"string"}},"required":[],"additionalProperties":false}},"@asyncapi/ts-nats-template":{"title":"Typescript Nats Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"generateTestClient":{"description":"Generate the test client","type":"boolean","default":false},"promisifyReplyCallback":{"description":"Use promises as callbacks for reply operation","type":"boolean","default":false}},"required":[],"additionalProperties":false},"supportedProtocols":["nats"]}} \ No newline at end of file +{"@asyncapi/dotnet-nats-template":{"title":".NET Nats Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"version":{"description":"Version of the generated library","type":"string","default":"0.0.1"},"projectName":{"description":"Name of the generated library","type":"string","default":"AsyncapiNatsClient"},"repositoryUrl":{"description":"Repository url for the project file, often needed for release pipelines","type":"string"},"targetFramework":{"description":"The project target framework","type":"string","default":"netstandard2.0;netstandard2.1"},"packageVersion":{"description":"PackageVersion of the generated library","type":"string"},"assemblyVersion":{"description":"AssemblyVersion of the generated library","type":"string"},"fileVersion":{"description":"FileVersion of the generated library","type":"string"},"serializationLibrary":{"description":"Which serialization library should the models use? `newtonsoft` or `json` (system.text.json)","type":"string","default":"json"}},"required":[],"additionalProperties":false},"supportedProtocols":["nats"]},"@asyncapi/go-watermill-template":{"title":"GO Lang Watermill Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"moduleName":{"description":"name of the go module to be generated","type":"string","default":"go-async-api"}},"required":[],"additionalProperties":false},"supportedProtocols":["amqp"]},"@asyncapi/html-template":{"title":"HTML website","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"sidebarOrganization":{"description":"Defines how the sidebar should be organized. 'byTags' to categorize operations by tags in the root of the document, `byTagsNoRoot` does the same but for pub/sub tags.","type":"string"},"baseHref":{"description":"Sets the base URL for links and forms.","type":"string"},"version":{"description":"Override the version of your application provided under `info.version` location in the specification file.","type":"string"},"singleFile":{"description":"If set this parameter to true generate single html file with scripts and styles inside","type":"boolean","default":false},"outFilename":{"description":"The name of the output HTML file","type":"string","default":"index.html"},"pdf":{"description":"Set to `true` to get index.pdf generated next to your index.html","type":"boolean","default":false},"pdfTimeout":{"description":"The timeout (in ms) used to generate the pdf","type":"number","default":30000},"favicon":{"description":"URL/Path of the favicon","type":"string","default":""},"config":{"description":"Stringified JSON or a path to a JSON file to override the default React component config. The config override is merged with the default config using the [JSON Merge Patch](https://tools.ietf.org/html/rfc7386) algorithm.","type":"string","default":""}},"required":[],"additionalProperties":false}},"@asyncapi/java-spring-cloud-stream-template":{"title":"Java Spring Cloud Stream Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"actuator":{"description":"If present, it adds the dependencies for spring-boot-starter-web, spring-boot-starter-actuator and micrometer-registry-prometheus.","type":"boolean","default":false},"artifactId":{"description":"The Maven artifact id. Alternatively you can set the specification extension info.x-artifact-id","type":"string","default":"project-name"},"artifactType":{"description":"The type of project to generate, application or library. The default is application. When generating an application, the pom.xml file will contain the complete set of dependencies required to run an app, and it will contain an Application class with a main function. Otherwise the pom file will include only the dependencies required to compile a library.","type":"string","default":"application"},"binder":{"description":"The name of the binder implementation, one of kafka, rabbit or solace. Default: kafka. If you need other binders to be supported, please let us know!","type":"string","default":"kafka"},"dynamicType":{"description":"When using channels with parameters, i.e. dynamic topics where the topic could be different for each message, this determines whether to use the StreamBridge or a message header. StreamBridge can be used with all binders, but some binders such as Solace can use the topic set in a header for better performance. Possible values are streamBridge and header. Default is streamBridge.","type":"string","default":"streamBridge"},"groupId":{"description":"The Maven group id. Alternatively you can set the specification extension info.x-group-id","type":"string","default":"com.company"},"host":{"description":"The host connection property. Currently this only works with the Solace binder. Example: tcp://myhost.com:55555.","type":"string","default":"tcp://localhost:55555"},"javaPackage":{"description":"The Java package of the generated classes. Alternatively you can set the specification extension info.x-java-package","type":"string"},"msgVpn":{"description":"The message vpn connection property. Currently this only works with the Solace binder.","type":"string","default":"default"},"parametersToHeaders":{"description":"If true, this will create headers on the incoming messages for each channel parameter. Currently this only works with messages originating from Solace (using the solace_destination header) and RabbitMQ (using the amqp_receivedRoutingKey header.)","type":"boolean","default":false},"password":{"description":"The client password connection property. Currently this only works with the Solace binder.","type":"string","default":"default"},"reactive":{"description":"If true, this will generate reactive style functions using the Flux class. Defalt: false.","type":"boolean","default":false},"solaceSpringCloudVersion":{"description":"The version of the solace-spring-cloud-bom dependency used when generating an application. Alternatively you can set the specification extension info.x-solace-spring-cloud-version.","type":"string","default":"2.1.0"},"springBootVersion":{"description":"The version of Spring Boot used when generating an application. Alternatively you can set the specification extension info.x-spring-booot-version. Example: 2.2.6.RELEASE.","type":"string","default":"2.4.7"},"springCloudVersion":{"description":"The version of the spring-cloud-dependencies BOM dependency used when generating an application. Alternatively you can set the specification extension info.x-spring-cloud-version. Example: Hoxton.RELEASE.","type":"string","default":"2020.0.3"},"springCloudStreamVersion":{"description":"The version of the spring-cloud-stream dependency specified in the Maven file, when generating a library. When generating an application, the spring-cloud-dependencies BOM is used instead. Example: 3.0.1.RELEASE","type":"string","default":"3.1.3"},"username":{"description":"The client username connection property. Currently this only works with the Solace binder","type":"string","default":"default"},"view":{"description":"The view that the template uses. By default it is the client view, which means that when the document says publish, we subscribe. In the case of the provider view, when the document says publish, we publish. Values are client or provider. The default is client.","type":"string","default":"client"},"useServers":{"description":"This option works when binder is kafka. By default it is set to false. When set to true, it will concatenate all the urls in the servers section as a list of brokers for kafka.","type":"string"}},"required":[],"additionalProperties":false}},"@asyncapi/java-spring-template":{"title":"Java Spring Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"inverseOperations":{"description":"Generate application that will publish messages to `publish` operation of channels and read messages from `subscribe` operation of channels. Literally this flag just swap `publish` and `subscribe` operations in channels.","type":"boolean","default":false},"disableEqualsHashCode":{"description":"Disable generation of equals and hashCode methods for model classes.","type":"boolean","default":false},"listenerPollTimeout":{"description":"Only for Kafka. Timeout to use when polling the consumer.","type":"number","default":3000},"listenerConcurrency":{"description":"Only for Kafka. Number of threads to run in the listener containers.","type":"number","default":3},"connectionTimeout":{"description":"Only for MQTT. This value, measured in seconds, defines the maximum time interval the client will wait for the network connection to the MQTT server to be established. The default timeout is 30 seconds. A value of 0 disables timeout processing meaning the client will wait until the network connection is made successfully or fails.","type":"number","default":30},"disconnectionTimeout":{"description":"Only for MQTT. The completion timeout in milliseconds when disconnecting. The default disconnect completion timeout is 5000 milliseconds.","type":"number","default":5000},"completionTimeout":{"description":"Only for MQTT. The completion timeout in milliseconds for operations. The default completion timeout is 30000 milliseconds.","type":"number","default":30000},"mqttClientId":{"description":"Only for MQTT. Provides the client identifier for the MQTT server. This parameter overrides the value of the clientId if it's set in the AsyncAPI file.","type":"string"},"asyncapiFileDir":{"description":"Parameter of @asyncapi/generator-hooks#createAsyncapiFile, allows to specify where original AsyncAPI file will be stored.","type":"string","default":"src/main/resources/api/"},"javaPackage":{"description":"The Java package of the generated classes. Alternatively you can set the specification extension info.x-java-package","type":"string","default":"com.asyncapi"},"addTypeInfoHeader":{"description":"Only for Kafka. Add type information to the message header","type":"boolean","default":true},"springBoot2":{"description":"Generate template files for the Spring Boot version 2. For kafka protocol it will also force to use spring-kafka 2.9.9","type":"boolean","default":false}},"required":[],"additionalProperties":false},"supportedProtocols":["kafka","amqp","mqtt"]},"@asyncapi/java-template":{"title":"Java Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"server":{"description":"The server you want to use in the code.","type":"string"},"asyncapiFileDir":{"description":"Custom location of the AsyncAPI file that you provided as an input in generation. By default it is located in the root of the output directory","type":"string"},"user":{"description":"Username for the server to generate code for","type":"string","default":"app"},"password":{"description":"Password for the server to generate code for","type":"string","default":"passw0rd"},"package":{"description":"Java package name for generated code","type":"string","default":"com.asyncapi"},"mqTopicPrefix":{"description":"MQ topic prefix. Used for ibmmq protocols. Default will work with dev MQ instance","type":"string","default":"dev//"}},"required":["server"],"additionalProperties":false},"supportedProtocols":["ibmmq","ibmmq-secure","kafka","kafka-secure"]},"@asyncapi/markdown-template":{"title":"Markdown Documentation","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"frontMatter":{"description":"The name of a JSON or YAML formatted file containing values to provide the YAML frontmatter for static-site or documentation generators. The file may contain {{title}} and {{version}} replaceable tags.","type":"string"},"outFilename":{"description":"The name of the output markdown file","type":"string","default":"asyncapi.md"},"toc":{"description":"Include a Table-of-Contents in the output markdown.","type":"boolean","default":true},"version":{"description":"Override the version of your application provided under `info.version` location in the specification file.","type":"string"}},"required":[],"additionalProperties":false}},"@asyncapi/nodejs-template":{"title":"NodeJS Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"server":{"description":"The server you want to use in the code.","type":"string"},"asyncapiFileDir":{"description":"Custom location of the AsyncAPI file that you provided as an input in generation. By default it is located in the root of the output directory","type":"string"},"securityScheme":{"description":"Name of the security scheme. Only scheme with X509 and Kafka protocol is supported for now.","type":"string"},"certFilesDir":{"description":"Directory where application certificates are located. This parameter is needed when you use X509 security scheme and your cert files are not located in the root of your application.","type":"string","default":"./"}},"required":["server"],"additionalProperties":false},"supportedProtocols":["amqp","mqtt","mqtts","kafka","kafka-secure","ws"]},"@asyncapi/nodejs-ws-template":{"title":"NodeJS WebSocket Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"server":{"description":"The server you want to use in the code.","type":"string"},"asyncapiFileDir":{"description":"Custom location of the AsyncAPI file that you provided as an input in generation. By default it is located in the root of the output directory","type":"string"}},"required":["server"],"additionalProperties":false},"supportedProtocols":["ws"]},"@asyncapi/python-paho-template":{"title":"Python Paho Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"view":{"description":"The view that the template uses. By default it is the client view, which means that when the document says publish, we subscribe. In the case of the provider view, when the document says publish, we publish. Values are client or provider. The default is client.","type":"string"}},"required":[],"additionalProperties":false}},"@asyncapi/ts-nats-template":{"title":"Typescript Nats Project","schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"generateTestClient":{"description":"Generate the test client","type":"boolean","default":false},"promisifyReplyCallback":{"description":"Use promises as callbacks for reply operation","type":"boolean","default":false}},"required":[],"additionalProperties":false},"supportedProtocols":["nats"]}} \ No newline at end of file diff --git a/apps/studio/src/components/Navigation.tsx b/apps/studio/src/components/Navigation.tsx index fb92ca8d1..381c28cef 100644 --- a/apps/studio/src/components/Navigation.tsx +++ b/apps/studio/src/components/Navigation.tsx @@ -5,14 +5,14 @@ import React, { useEffect, useState } from 'react'; import { useServices } from '../services'; import { useDocumentsState, useFilesState } from '../state'; -import type { OldAsyncAPIDocument as AsyncAPIDocument } from '@asyncapi/parser/cjs'; +import type { AsyncAPIDocumentInterface } from '@asyncapi/parser/cjs'; interface NavigationProps { className?: string; } interface NavigationSectionProps { - document: AsyncAPIDocument; + document: AsyncAPIDocumentInterface; rawSpec: string; hash: string; } @@ -36,8 +36,9 @@ const ServersNavigation: React.FunctionComponent = ({ Servers
    - {Object.entries(document.servers() || {}).map(([serverName, server]) => ( -
  • { + const serverName = server.id(); + return
  • = ({ {serverName}
  • - ))} + })}
); @@ -72,11 +73,11 @@ const OperationsNavigation: React.FunctionComponent = ({ }) => { const { navigationSvc } = useServices(); - const operations = Object.entries(document.channels() || {}).map( - ([channelName, channel]) => { + const operations = document.operations().all().map( + (operation) => { const channels: React.ReactNode[] = []; - - if (channel.hasPublish()) { + const channelName = operation.channels().all()[0].address() || 'unknown'; + if (operation.isReceive()) { channels.push(
  • = ({
  • , ); } - if (channel.hasSubscribe()) { + if (operation.isSend()) { channels.push(
  • = ({ }) => { const { navigationSvc } = useServices(); - const messages = Object.keys(document.components()?.messages() || {}).map( - messageName => ( -
  • { + const messageName = message.id(); + return
  • = ({ > {messageName}
  • - ), + }, ); return ( @@ -202,9 +204,10 @@ const SchemasNavigation: React.FunctionComponent = ({ }) => { const { navigationSvc } = useServices(); - const schemas = Object.keys(document.components()?.schemas() || {}).map( - schemaName => ( -
  • { + const schemaName = schema.id(); + return
  • = ({ > {schemaName}
  • - ), + } ); return ( @@ -271,7 +274,7 @@ export const Navigation: React.FunctionComponent = ({ ); } - const components = document.hasComponents() && document.components(); + const components = document.components(); return (
      @@ -290,7 +293,7 @@ export const Navigation: React.FunctionComponent = ({ Information
    - {document.hasServers() && ( + {!document.servers().isEmpty() && (
  • = ({ hash={hash} />
  • - {components && components.hasMessages() && ( + {!components.messages().isEmpty() && (
  • = ({ />
  • )} - {components && components.hasSchemas() && ( + {!components.schemas().isEmpty() && (
  • = ({ + document, + hash, +}) => { + const { navigationSvc } = useServices(); + + return ( + <> +
    + navigationSvc.scrollTo('/servers', 'servers') + } + > + Servers +
    +
      + {document.servers().all().map((server) => { + const serverName = server.id(); + return
    • + navigationSvc.scrollTo( + `/servers/${serverName.replace(/\//g, '~1')}`, + `server-${serverName}`, + ) + } + > +
      +
      + + {server.protocolVersion() + ? `${server.protocol()} ${server.protocolVersion()}` + : server.protocol()} + +
      + {serverName} +
      +
    • + })} +
    + + ); +}; + +const ChannelsNavigation: React.FunctionComponent = ({ + document, + hash, +}) => { + const { navigationSvc } = useServices(); + + const channels = document.channels().all().map( + (channel) => { + return
  • + navigationSvc.scrollTo( + `/channels/${(channel.id() ?? '').replace(/\//g, '~1')}`, + `channels-${channel.id()}`, + ) + } + > +
    +
    + + {channel.id()} + +
    + {channel.address()} +
    +
  • + }, + ); + + return ( + <> +
    + navigationSvc.scrollTo( + '/channels', + 'channels', + ) + } + > + Channels +
    +
      {channels}
    + + ); +}; + +const OperationsNavigation: React.FunctionComponent = ({ + document, + hash, +}) => { + const { navigationSvc } = useServices(); + + const operations = document.operations().all().map( + (operation) => { + const operations: React.ReactNode[] = []; + if (operation.isReceive()) { + operations.push( +
  • + navigationSvc.scrollTo( + `/operations/${(operation.id() ?? '').replace(/\//g, '~1')}`, + `operation-receive-${operation.id()}`, + ) + } + > +
    +
    + + Receive + +
    + {operation.id()} +
    +
  • + ); + } + if (operation.isSend()) { + operations.push( +
  • + navigationSvc.scrollTo( + `/operations/${(operation.id() ?? '').replace(/\//g, '~1')}`, + `operation-send-${operation.id()}`, + ) + } + > +
    +
    + + Send + +
    + {operation.id()} +
    +
  • , + ); + } + + return operations; + }, + ); + + return ( + <> +
    + navigationSvc.scrollTo( + '/operations', + 'operations', + ) + } + > + Operations +
    +
      {operations}
    + + ); +}; + +const MessagesNavigation: React.FunctionComponent = ({ + document, + hash, +}) => { + const { navigationSvc } = useServices(); + + const messages = document.components().messages().all().map( + message => { + const messageName = message.id(); + return
  • + navigationSvc.scrollTo( + `/components/messages/${messageName.replace(/\//g, '~1')}`, + `message-${messageName}`, + ) + } + > + {messageName} +
  • + }, + ); + + return ( + <> +
    + navigationSvc.scrollTo( + '/components/messages', + 'messages', + ) + } + > + Messages +
    +
      {messages}
    + + ); +}; + +const SchemasNavigation: React.FunctionComponent = ({ + document, + hash, +}) => { + const { navigationSvc } = useServices(); + + const schemas = document.components().schemas().all().map( + schema => { + const schemaName = schema.id(); + return
  • + navigationSvc.scrollTo( + `/components/schemas/${schemaName.replace(/\//g, '~1')}`, + `schema-${schemaName}`, + ) + } + > + {schemaName} +
  • + } + ); + + return ( + <> +
    + navigationSvc.scrollTo( + '/components/schemas', + 'schemas', + ) + } + > + Schemas +
    +
      {schemas}
    + + ); +}; + +export const Navigationv3: React.FunctionComponent = ({ + className = '', +}) => { + const [hash, setHash] = useState(window.location.hash); + + const { navigationSvc } = useServices(); + const rawSpec = useFilesState(state => state.files['asyncapi']?.content); + const document = useDocumentsState(state => state.documents['asyncapi']?.document); + + useEffect(() => { + const fn = () => { + // remove `#` char + const h = window.location.hash.startsWith('#') ? window.location.hash.substring(1) : window.location.hash; + setHash(h); + }; + fn(); + window.addEventListener('hashchange', fn); + return () => { + window.removeEventListener('hashchange', fn); + }; + }, []); + + if (!rawSpec || !document) { + return ( +
    + Empty or invalid document. Please fix errors/define AsyncAPI document. +
    + ); + } + + const components = document.components(); + return ( +
    +
      +
    • +
      + navigationSvc.scrollTo( + '/info', + 'introduction', + ) + } + > + Information +
      +
    • + {!document.servers().isEmpty() && ( +
    • + +
    • + )} +
    • + +
    • +
    • + +
    • + {!components.messages().isEmpty() && ( +
    • + +
    • + )} + {!components.schemas().isEmpty() && ( +
    • + +
    • + )} +
    +
    + ); +}; \ No newline at end of file diff --git a/apps/studio/src/components/Sidebar.tsx b/apps/studio/src/components/Sidebar.tsx index b4cfaba4f..dd117a943 100644 --- a/apps/studio/src/components/Sidebar.tsx +++ b/apps/studio/src/components/Sidebar.tsx @@ -69,7 +69,7 @@ export const Sidebar: FunctionComponent = () => { onClick: () => updateState('primarySidebar'), icon: , tooltip: 'Navigation', - enabled: !isV3 + enabled: true }, // editor { diff --git a/apps/studio/src/components/Template/HTMLWrapper.tsx b/apps/studio/src/components/Template/HTMLWrapper.tsx index 8f2726d54..afb944cbe 100644 --- a/apps/studio/src/components/Template/HTMLWrapper.tsx +++ b/apps/studio/src/components/Template/HTMLWrapper.tsx @@ -4,7 +4,7 @@ import { AsyncApiComponentWP } from '@asyncapi/react-component'; import { useServices } from '../../services'; import { appState, useDocumentsState, useSettingsState, useOtherState, otherState } from '../../state'; -import type { OldAsyncAPIDocument as AsyncAPIDocument } from '@asyncapi/parser/cjs'; +import { OldAsyncAPIDocument as AsyncAPIDocument, convertToOldAPI } from '@asyncapi/parser/cjs'; interface HTMLWrapperProps {} @@ -12,6 +12,7 @@ export const HTMLWrapper: React.FunctionComponent = () => { const [parsedSpec, setParsedSpec] = useState(null); const { navigationSvc } = useServices(); const document = useDocumentsState(state => state.documents['asyncapi']?.document) || null; + const autoRendering = useSettingsState(state => state.templates.autoRendering); const templateRerender = useOtherState(state => state.templateRerender); @@ -21,13 +22,15 @@ export const HTMLWrapper: React.FunctionComponent = () => { useEffect(() => { if (autoRendering || parsedSpec === null) { - setParsedSpec(document); + const oldDocument = document !== null ? convertToOldAPI(document) : null; + setParsedSpec(oldDocument); } }, [document]); // eslint-disable-line useEffect(() => { if (templateRerender) { - setParsedSpec(document); + const oldDocument = document !== null ? convertToOldAPI(document) : null; + setParsedSpec(oldDocument); otherState.setState({ templateRerender: false }); } }, [templateRerender]); // eslint-disable-line diff --git a/apps/studio/src/components/Visualiser/Visualiser.tsx b/apps/studio/src/components/Visualiser/Visualiser.tsx index 90555cf3e..357d2c632 100644 --- a/apps/studio/src/components/Visualiser/Visualiser.tsx +++ b/apps/studio/src/components/Visualiser/Visualiser.tsx @@ -4,7 +4,7 @@ import { FlowDiagram } from './FlowDiagram'; import { useDocumentsState, useSettingsState, useOtherState, otherState } from '../../state'; -import type { OldAsyncAPIDocument as AsyncAPIDocument } from '@asyncapi/parser/cjs'; +import { OldAsyncAPIDocument as AsyncAPIDocument, convertToOldAPI } from '@asyncapi/parser/cjs'; import type { FunctionComponent } from 'react'; interface VisualiserProps {} @@ -17,13 +17,15 @@ export const Visualiser: FunctionComponent = () => { useEffect(() => { if (autoRendering || parsedSpec === null) { - setParsedSpec(document); + const oldDocument = document !== null ? convertToOldAPI(document) : null; + setParsedSpec(oldDocument); } }, [document]); // eslint-disable-line useEffect(() => { if (templateRerender) { - setParsedSpec(document); + const oldDocument = document !== null ? convertToOldAPI(document) : null; + setParsedSpec(oldDocument); otherState.setState({ templateRerender: false }); } }, [templateRerender]); // eslint-disable-line diff --git a/apps/studio/src/react-app-env.d.ts b/apps/studio/src/react-app-env.d.ts index 8265dfcfb..f4ce82809 100644 --- a/apps/studio/src/react-app-env.d.ts +++ b/apps/studio/src/react-app-env.d.ts @@ -1,7 +1,7 @@ /// import type * as monacoAPI from 'monaco-editor/esm/vs/editor/editor.api'; -import type { OldAsyncAPIDocument as AsyncAPIDocument, ParseOutput } from '@asyncapi/parser/cjs'; +import type { AsyncAPIDocumentInterface, ParseOutput } from '@asyncapi/parser/cjs'; declare global { interface Window { @@ -9,7 +9,7 @@ declare global { monaco: typeof monacoAPI; Editor: monacoAPI.editor.IStandaloneCodeEditor; MonacoEnvironment: monacoAPI.Environment | undefined; - ParsedSpec?: AsyncAPIDocument; + ParsedSpec?: AsyncAPIDocumentInterface; ParsedExtras?: ParseOutput['extras']; } } diff --git a/apps/studio/src/services/parser.service.ts b/apps/studio/src/services/parser.service.ts index 0fd3a5650..a1138238c 100644 --- a/apps/studio/src/services/parser.service.ts +++ b/apps/studio/src/services/parser.service.ts @@ -1,6 +1,6 @@ import { AbstractService } from './abstract.service'; -import { Parser, convertToOldAPI, DiagnosticSeverity } from '@asyncapi/parser/cjs'; +import { Parser, DiagnosticSeverity } from '@asyncapi/parser/cjs'; import { OpenAPISchemaParser } from '@asyncapi/openapi-schema-parser'; import { AvroSchemaParser } from '@asyncapi/avro-schema-parser'; import { untilde } from '@asyncapi/parser/cjs/utils'; @@ -17,8 +17,8 @@ export class ParserService extends AbstractService { override async onInit() { this.parser = new Parser({ schemaParsers: [ - OpenAPISchemaParser(), - AvroSchemaParser(), + OpenAPISchemaParser() as any, + AvroSchemaParser() as any, ], __unstable: { resolver: { @@ -42,12 +42,9 @@ export class ParserService extends AbstractService { const { document, diagnostics: _diagnostics, extras } = await this.parser.parse(spec, options); diagnostics = _diagnostics; if (document) { - // This is needed as we are still using the old Parser API - // @todo: migrate to Parser API v2 - const oldDocument = convertToOldAPI(document); this.updateDocument(uri, { uri, - document: oldDocument, + document, diagnostics: this.createDiagnostics(diagnostics), extras, valid: true, diff --git a/apps/studio/src/state/documents.state.ts b/apps/studio/src/state/documents.state.ts index e6bbb03ab..276e89b16 100644 --- a/apps/studio/src/state/documents.state.ts +++ b/apps/studio/src/state/documents.state.ts @@ -1,6 +1,6 @@ import create from 'zustand'; -import type { OldAsyncAPIDocument as AsyncAPIDocument, Diagnostic, ParseOutput } from '@asyncapi/parser/cjs'; +import type { AsyncAPIDocumentInterface, Diagnostic, ParseOutput } from '@asyncapi/parser/cjs'; export type DocumentDiagnostics = { original: Diagnostic[]; @@ -13,7 +13,7 @@ export type DocumentDiagnostics = { export type Document = { uri: string; - document?: AsyncAPIDocument; + document?: AsyncAPIDocumentInterface; extras?: ParseOutput['extras']; diagnostics: DocumentDiagnostics; valid?: boolean; diff --git a/package-lock.json b/package-lock.json index 532f3cf76..18ad827b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -500,7 +500,7 @@ "@asyncapi/avro-schema-parser": "^3.0.2", "@asyncapi/converter": "^1.3.1", "@asyncapi/openapi-schema-parser": "^3.0.4", - "@asyncapi/parser": "^2.1.0-next-major-spec.5", + "@asyncapi/parser": "^3.0.0-next-major-spec.2", "@asyncapi/react-component": "^1.0.0-next.54", "@asyncapi/specs": "^6.0.0-next-major-spec.6", "@ebay/nice-modal-react": "^1.2.10", @@ -634,11 +634,11 @@ } }, "apps/studio/node_modules/@asyncapi/parser": { - "version": "2.1.0-next-major-spec.5", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0-next-major-spec.5.tgz", - "integrity": "sha512-j18xG8jKnIcgva9jWKJVCZNaPZhfPi8FBzKVeK9QTXxpm5tbq4wAuTWrTbEVDutc+fJgMdq3tMHlSricLanhHw==", + "version": "3.0.0-next-major-spec.2", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.0-next-major-spec.2.tgz", + "integrity": "sha512-/gJgCYNYlUSDJhySK3IagjiyFfnwEsAZd5rTe396CB+HxJ6yDWDOZYdHzkFgU2RnCULSGzVOWZGx8t3PK+yuVg==", "dependencies": { - "@asyncapi/specs": "^6.0.0-next-major-spec.2", + "@asyncapi/specs": "^6.0.0-next-major-spec.6", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", "@stoplight/json-ref-resolver": "^3.1.5", "@stoplight/spectral-core": "^1.16.1", @@ -35359,7 +35359,7 @@ "@asyncapi/nodejs-template": "^1.0.0", "@asyncapi/nodejs-ws-template": "^0.9.33", "@asyncapi/openapi-schema-parser": "^3.0.4", - "@asyncapi/parser": "^2.1.0-next-major-spec.5", + "@asyncapi/parser": "^3.0.0-next-major-spec.2", "@asyncapi/python-paho-template": "^0.2.13", "@asyncapi/react-component": "^1.0.0-next.54", "@asyncapi/specs": "^6.0.0-next-major-spec.6", @@ -35421,11 +35421,11 @@ }, "dependencies": { "@asyncapi/parser": { - "version": "2.1.0-next-major-spec.5", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0-next-major-spec.5.tgz", - "integrity": "sha512-j18xG8jKnIcgva9jWKJVCZNaPZhfPi8FBzKVeK9QTXxpm5tbq4wAuTWrTbEVDutc+fJgMdq3tMHlSricLanhHw==", + "version": "3.0.0-next-major-spec.2", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.0-next-major-spec.2.tgz", + "integrity": "sha512-/gJgCYNYlUSDJhySK3IagjiyFfnwEsAZd5rTe396CB+HxJ6yDWDOZYdHzkFgU2RnCULSGzVOWZGx8t3PK+yuVg==", "requires": { - "@asyncapi/specs": "^6.0.0-next-major-spec.2", + "@asyncapi/specs": "^6.0.0-next-major-spec.6", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", "@stoplight/json-ref-resolver": "^3.1.5", "@stoplight/spectral-core": "^1.16.1", From ce3fbeb103f98ff40495e69d4667b0686eb78aec Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Wed, 4 Oct 2023 17:51:15 +0200 Subject: [PATCH 05/16] fix: broken navigation with v3 input (#801) --- apps/studio/src/components/Navigation.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/studio/src/components/Navigation.tsx b/apps/studio/src/components/Navigation.tsx index 381c28cef..4a94a1822 100644 --- a/apps/studio/src/components/Navigation.tsx +++ b/apps/studio/src/components/Navigation.tsx @@ -76,7 +76,11 @@ const OperationsNavigation: React.FunctionComponent = ({ const operations = document.operations().all().map( (operation) => { const channels: React.ReactNode[] = []; - const channelName = operation.channels().all()[0].address() || 'unknown'; + // only has one channel per operation + let channelName = 'Unknown'; + if (!operation.channels().isEmpty()) { + channelName = operation.channels().all()[0].address() ?? 'Unknown'; + } if (operation.isReceive()) { channels.push(
  • Date: Thu, 5 Oct 2023 07:23:45 +0200 Subject: [PATCH 06/16] build(deps): bump postcss from 8.4.24 to 8.4.31 (#806) --- apps/studio-next/package.json | 2 +- apps/studio/package.json | 2 +- package-lock.json | 58 ++++++++--------------------------- packages/ui/package.json | 2 +- 4 files changed, 15 insertions(+), 49 deletions(-) diff --git a/apps/studio-next/package.json b/apps/studio-next/package.json index 0ead3d47d..9e27410f0 100644 --- a/apps/studio-next/package.json +++ b/apps/studio-next/package.json @@ -16,7 +16,7 @@ "eslint": "8.46.0", "eslint-config-next": "13.4.12", "next": "13.4.12", - "postcss": "8.4.27", + "postcss": "8.4.31", "react": "18.2.0", "react-dom": "18.2.0", "tailwindcss": "3.3.3", diff --git a/apps/studio/package.json b/apps/studio/package.json index a6f93ce51..f76cd2701 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -110,7 +110,7 @@ "https-browserify": "^1.0.0", "markdown-toc": "^1.2.0", "path-browserify": "^1.0.1", - "postcss": "^8.4.19", + "postcss": "^8.4.31", "process": "^0.11.10", "raw-loader": "^4.0.2", "react-scripts": "5.0.1", diff --git a/package-lock.json b/package-lock.json index 18ad827b4..9c8dd4e61 100644 --- a/package-lock.json +++ b/package-lock.json @@ -557,7 +557,7 @@ "https-browserify": "^1.0.0", "markdown-toc": "^1.2.0", "path-browserify": "^1.0.1", - "postcss": "^8.4.19", + "postcss": "^8.4.31", "process": "^0.11.10", "raw-loader": "^4.0.2", "react-scripts": "5.0.1", @@ -582,7 +582,7 @@ "eslint": "8.46.0", "eslint-config-next": "13.4.12", "next": "13.4.12", - "postcss": "8.4.27", + "postcss": "8.4.31", "react": "18.2.0", "react-dom": "18.2.0", "tailwindcss": "3.3.3", @@ -594,33 +594,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.6.tgz", "integrity": "sha512-q0RkvNgMweWWIvSMDiXhflGUKMdIxBo2M2tYM/0kEGDueQByFzK4KZAgu5YHGFNxziTlppNpTIBcqHQAxlfHdA==" }, - "apps/studio-next/node_modules/postcss": { - "version": "8.4.27", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz", - "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, "apps/studio-next/node_modules/typescript": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", @@ -26540,7 +26513,9 @@ } }, "node_modules/postcss": { - "version": "8.4.24", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "funding": [ { "type": "opencollective", @@ -26555,7 +26530,6 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", @@ -34266,7 +34240,7 @@ "@types/react": "^18.2.5", "eslint": "^7.32.0", "eslint-config-custom": "*", - "postcss": "^8.4.20", + "postcss": "^8.4.31", "tailwind-config": "*", "tsconfig": "*", "tsup": "^6.1.3", @@ -35399,7 +35373,7 @@ "monaco-editor": "0.34.1", "monaco-yaml": "4.0.2", "path-browserify": "^1.0.1", - "postcss": "^8.4.19", + "postcss": "^8.4.31", "process": "^0.11.10", "raw-loader": "^4.0.2", "react": "^18.2.0", @@ -35615,7 +35589,7 @@ "classnames": "^2.3.2", "eslint": "^7.32.0", "eslint-config-custom": "*", - "postcss": "^8.4.20", + "postcss": "^8.4.31", "react": "^18.2.0", "react-dom": "^18.2.0", "tailwind-config": "*", @@ -51794,7 +51768,9 @@ "dev": true }, "postcss": { - "version": "8.4.24", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "requires": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", @@ -54567,7 +54543,7 @@ "eslint": "8.46.0", "eslint-config-next": "13.4.12", "next": "13.4.12", - "postcss": "8.4.27", + "postcss": "8.4.31", "react": "18.2.0", "react-dom": "18.2.0", "tailwindcss": "3.3.3", @@ -54579,16 +54555,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.6.tgz", "integrity": "sha512-q0RkvNgMweWWIvSMDiXhflGUKMdIxBo2M2tYM/0kEGDueQByFzK4KZAgu5YHGFNxziTlppNpTIBcqHQAxlfHdA==" }, - "postcss": { - "version": "8.4.27", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz", - "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==", - "requires": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - } - }, "typescript": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", diff --git a/packages/ui/package.json b/packages/ui/package.json index f018c207d..8412bb01f 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -34,7 +34,7 @@ "@types/react": "^18.2.5", "eslint": "^7.32.0", "eslint-config-custom": "*", - "postcss": "^8.4.20", + "postcss": "^8.4.31", "tailwind-config": "*", "tsconfig": "*", "tsup": "^6.1.3", From 7fd77f8ca73e0d7300ff327b682c123b11e1a579 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Thu, 5 Oct 2023 12:38:13 +0200 Subject: [PATCH 07/16] feat: enable v3 documentation rendering (#797) --- apps/studio/package.json | 4 +- apps/studio/src/components/Sidebar.tsx | 2 +- .../src/components/Template/HTMLWrapper.tsx | 18 +- package-lock.json | 262 +++++------------- 4 files changed, 77 insertions(+), 209 deletions(-) diff --git a/apps/studio/package.json b/apps/studio/package.json index f76cd2701..b0cc65305 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -26,8 +26,8 @@ "@asyncapi/avro-schema-parser": "^3.0.2", "@asyncapi/converter": "^1.3.1", "@asyncapi/openapi-schema-parser": "^3.0.4", - "@asyncapi/parser": "^3.0.0-next-major-spec.2", - "@asyncapi/react-component": "^1.0.0-next.54", + "@asyncapi/parser": "^3.0.0-next-major-spec.3", + "@asyncapi/react-component": "^1.0.2", "@asyncapi/specs": "^6.0.0-next-major-spec.6", "@ebay/nice-modal-react": "^1.2.10", "@headlessui/react": "^1.7.4", diff --git a/apps/studio/src/components/Sidebar.tsx b/apps/studio/src/components/Sidebar.tsx index dd117a943..feaf9d41a 100644 --- a/apps/studio/src/components/Sidebar.tsx +++ b/apps/studio/src/components/Sidebar.tsx @@ -89,7 +89,7 @@ export const Sidebar: FunctionComponent = () => { onClick: () => updateState('secondaryPanel', 'template'), icon: , tooltip: 'HTML preview', - enabled: !isV3 + enabled: true }, // visuliser { diff --git a/apps/studio/src/components/Template/HTMLWrapper.tsx b/apps/studio/src/components/Template/HTMLWrapper.tsx index afb944cbe..8bff5431a 100644 --- a/apps/studio/src/components/Template/HTMLWrapper.tsx +++ b/apps/studio/src/components/Template/HTMLWrapper.tsx @@ -4,12 +4,12 @@ import { AsyncApiComponentWP } from '@asyncapi/react-component'; import { useServices } from '../../services'; import { appState, useDocumentsState, useSettingsState, useOtherState, otherState } from '../../state'; -import { OldAsyncAPIDocument as AsyncAPIDocument, convertToOldAPI } from '@asyncapi/parser/cjs'; +import { AsyncAPIDocumentInterface } from '@asyncapi/parser/cjs'; interface HTMLWrapperProps {} export const HTMLWrapper: React.FunctionComponent = () => { - const [parsedSpec, setParsedSpec] = useState(null); + const [parsedSpec, setParsedSpec] = useState(null); const { navigationSvc } = useServices(); const document = useDocumentsState(state => state.documents['asyncapi']?.document) || null; @@ -22,15 +22,13 @@ export const HTMLWrapper: React.FunctionComponent = () => { useEffect(() => { if (autoRendering || parsedSpec === null) { - const oldDocument = document !== null ? convertToOldAPI(document) : null; - setParsedSpec(oldDocument); + setParsedSpec(document); } }, [document]); // eslint-disable-line useEffect(() => { if (templateRerender) { - const oldDocument = document !== null ? convertToOldAPI(document) : null; - setParsedSpec(oldDocument); + setParsedSpec(document); otherState.setState({ templateRerender: false }); } }, [templateRerender]); // eslint-disable-line @@ -43,14 +41,6 @@ export const HTMLWrapper: React.FunctionComponent = () => { ); } - if (document?.version() === '3.0.0') { - return ( -
    -

    Documentation preview is not supported yet for v3.0.0 specifications.

    -
    - ); - } - return ( parsedSpec && (
    diff --git a/package-lock.json b/package-lock.json index 9c8dd4e61..bdf51e2e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -500,8 +500,8 @@ "@asyncapi/avro-schema-parser": "^3.0.2", "@asyncapi/converter": "^1.3.1", "@asyncapi/openapi-schema-parser": "^3.0.4", - "@asyncapi/parser": "^3.0.0-next-major-spec.2", - "@asyncapi/react-component": "^1.0.0-next.54", + "@asyncapi/parser": "^3.0.0-next-major-spec.3", + "@asyncapi/react-component": "^1.0.2", "@asyncapi/specs": "^6.0.0-next-major-spec.6", "@ebay/nice-modal-react": "^1.2.10", "@headlessui/react": "^1.7.4", @@ -607,9 +607,9 @@ } }, "apps/studio/node_modules/@asyncapi/parser": { - "version": "3.0.0-next-major-spec.2", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.0-next-major-spec.2.tgz", - "integrity": "sha512-/gJgCYNYlUSDJhySK3IagjiyFfnwEsAZd5rTe396CB+HxJ6yDWDOZYdHzkFgU2RnCULSGzVOWZGx8t3PK+yuVg==", + "version": "3.0.0-next-major-spec.3", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.0-next-major-spec.3.tgz", + "integrity": "sha512-LCrAQqJpGxraMyU2k1Nh1X6Q1dz7a/YhTRRFFrQHOEo+TUT/kRdoUkRDP++e58dO7h9MBN+/hZK5TaqE+/jQiw==", "dependencies": { "@asyncapi/specs": "^6.0.0-next-major-spec.6", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", @@ -861,27 +861,11 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "apps/studio/node_modules/tr46": { - "version": "0.0.3", - "license": "MIT" - }, "apps/studio/node_modules/web-vitals": { "version": "3.3.2", "dev": true, "license": "Apache-2.0" }, - "apps/studio/node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause" - }, - "apps/studio/node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", @@ -1724,22 +1708,6 @@ } } }, - "node_modules/@asyncapi/parser/node_modules/tr46": { - "version": "0.0.3", - "license": "MIT" - }, - "node_modules/@asyncapi/parser/node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause" - }, - "node_modules/@asyncapi/parser/node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/@asyncapi/protobuf-schema-parser": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@asyncapi/protobuf-schema-parser/-/protobuf-schema-parser-3.0.0.tgz", @@ -1792,13 +1760,13 @@ } }, "node_modules/@asyncapi/react-component": { - "version": "1.0.0-next.54", - "resolved": "https://registry.npmjs.org/@asyncapi/react-component/-/react-component-1.0.0-next.54.tgz", - "integrity": "sha512-ign7m7Pt+xQEiYdcA/pABC/Qxpl9lILs3utNTjivEstL5zb2RprQpotHwWmZDLmvbHlmycD3n34xhfoFkRUmHA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@asyncapi/react-component/-/react-component-1.0.2.tgz", + "integrity": "sha512-Betb4RDEsATpKcpw5uG2PeNWViPJIlwGZKx3xPFBpreh9J4nB9SFb7WPddY4Myrbw79/PX6N/KBy+LyiETEDmA==", "dependencies": { "@asyncapi/avro-schema-parser": "3.0.3", "@asyncapi/openapi-schema-parser": "3.0.4", - "@asyncapi/parser": "^3.0.0-next-major-spec.1", + "@asyncapi/parser": "^3.0.0-next-major-spec.3", "@asyncapi/protobuf-schema-parser": "3.0.0", "highlight.js": "^10.7.2", "isomorphic-dompurify": "^0.13.0", @@ -1812,9 +1780,9 @@ } }, "node_modules/@asyncapi/react-component/node_modules/@asyncapi/parser": { - "version": "3.0.0-next-major-spec.1", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.0-next-major-spec.1.tgz", - "integrity": "sha512-nzXwirVYyV8iCmHo4Rhzp1d3NQwOfN6/A3VgplQaKokTuaNcQdbW9c0RrM0f5MGYvAVGF/Uz1E2fWyRF3r/aoQ==", + "version": "3.0.0-next-major-spec.3", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.0-next-major-spec.3.tgz", + "integrity": "sha512-LCrAQqJpGxraMyU2k1Nh1X6Q1dz7a/YhTRRFFrQHOEo+TUT/kRdoUkRDP++e58dO7h9MBN+/hZK5TaqE+/jQiw==", "dependencies": { "@asyncapi/specs": "^6.0.0-next-major-spec.6", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", @@ -1836,9 +1804,9 @@ } }, "node_modules/@asyncapi/react-component/node_modules/@asyncapi/specs": { - "version": "6.0.0-next-major-spec.6", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.0.0-next-major-spec.6.tgz", - "integrity": "sha512-xYiXZetKiAZgZoh2q/sxt+Ceg8bLTK/WSCwtLvlH7JgnjpnOEtCDwKszijmmOJEYdGVSrj0OFXLPrg/dm4JANw==", + "version": "6.0.0-next-major-spec.8", + "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.0.0-next-major-spec.8.tgz", + "integrity": "sha512-WVhzeJepkqO6abDprz9bk9zR/ESidanQncPP7jFRUJQ71ED4/XQMjaSKLE5MB09eUUZoY5EqoccUQJWfc54SMg==", "dependencies": { "@types/json-schema": "^7.0.11" } @@ -1870,25 +1838,6 @@ "json-pointer": "0.6.2" } }, - "node_modules/@asyncapi/react-component/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/@asyncapi/react-component/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/@asyncapi/react-component/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/@asyncapi/specs": { "version": "4.3.1", "dev": true, @@ -15519,25 +15468,6 @@ } } }, - "node_modules/cross-fetch/node_modules/tr46": { - "version": "0.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/cross-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/cross-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/cross-spawn": { "version": "7.0.3", "license": "MIT", @@ -25651,22 +25581,6 @@ "dev": true, "license": "MIT" }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "license": "MIT" - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause" - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/node-forge": { "version": "1.3.1", "dev": true, @@ -33566,6 +33480,25 @@ "version": "2.3.0", "license": "MIT" }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/whatwg-url/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/whatwg-url/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, "node_modules/which": { "version": "2.0.2", "license": "ISC", @@ -35165,19 +35098,6 @@ "requires": { "whatwg-url": "^5.0.0" } - }, - "tr46": { - "version": "0.0.3" - }, - "webidl-conversions": { - "version": "3.0.1" - }, - "whatwg-url": { - "version": "5.0.0", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } } } }, @@ -35228,13 +35148,13 @@ } }, "@asyncapi/react-component": { - "version": "1.0.0-next.54", - "resolved": "https://registry.npmjs.org/@asyncapi/react-component/-/react-component-1.0.0-next.54.tgz", - "integrity": "sha512-ign7m7Pt+xQEiYdcA/pABC/Qxpl9lILs3utNTjivEstL5zb2RprQpotHwWmZDLmvbHlmycD3n34xhfoFkRUmHA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@asyncapi/react-component/-/react-component-1.0.2.tgz", + "integrity": "sha512-Betb4RDEsATpKcpw5uG2PeNWViPJIlwGZKx3xPFBpreh9J4nB9SFb7WPddY4Myrbw79/PX6N/KBy+LyiETEDmA==", "requires": { "@asyncapi/avro-schema-parser": "3.0.3", "@asyncapi/openapi-schema-parser": "3.0.4", - "@asyncapi/parser": "^3.0.0-next-major-spec.1", + "@asyncapi/parser": "^3.0.0-next-major-spec.3", "@asyncapi/protobuf-schema-parser": "3.0.0", "highlight.js": "^10.7.2", "isomorphic-dompurify": "^0.13.0", @@ -35244,9 +35164,9 @@ }, "dependencies": { "@asyncapi/parser": { - "version": "3.0.0-next-major-spec.1", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.0-next-major-spec.1.tgz", - "integrity": "sha512-nzXwirVYyV8iCmHo4Rhzp1d3NQwOfN6/A3VgplQaKokTuaNcQdbW9c0RrM0f5MGYvAVGF/Uz1E2fWyRF3r/aoQ==", + "version": "3.0.0-next-major-spec.3", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.0-next-major-spec.3.tgz", + "integrity": "sha512-LCrAQqJpGxraMyU2k1Nh1X6Q1dz7a/YhTRRFFrQHOEo+TUT/kRdoUkRDP++e58dO7h9MBN+/hZK5TaqE+/jQiw==", "requires": { "@asyncapi/specs": "^6.0.0-next-major-spec.6", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", @@ -35268,9 +35188,9 @@ } }, "@asyncapi/specs": { - "version": "6.0.0-next-major-spec.6", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.0.0-next-major-spec.6.tgz", - "integrity": "sha512-xYiXZetKiAZgZoh2q/sxt+Ceg8bLTK/WSCwtLvlH7JgnjpnOEtCDwKszijmmOJEYdGVSrj0OFXLPrg/dm4JANw==", + "version": "6.0.0-next-major-spec.8", + "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.0.0-next-major-spec.8.tgz", + "integrity": "sha512-WVhzeJepkqO6abDprz9bk9zR/ESidanQncPP7jFRUJQ71ED4/XQMjaSKLE5MB09eUUZoY5EqoccUQJWfc54SMg==", "requires": { "@types/json-schema": "^7.0.11" } @@ -35289,25 +35209,6 @@ "@types/json-schema": "^7.0.7", "json-pointer": "0.6.2" } - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } } } }, @@ -35333,9 +35234,9 @@ "@asyncapi/nodejs-template": "^1.0.0", "@asyncapi/nodejs-ws-template": "^0.9.33", "@asyncapi/openapi-schema-parser": "^3.0.4", - "@asyncapi/parser": "^3.0.0-next-major-spec.2", + "@asyncapi/parser": "^3.0.0-next-major-spec.3", "@asyncapi/python-paho-template": "^0.2.13", - "@asyncapi/react-component": "^1.0.0-next.54", + "@asyncapi/react-component": "^1.0.2", "@asyncapi/specs": "^6.0.0-next-major-spec.6", "@asyncapi/ts-nats-template": "^0.10.3", "@craco/craco": "^7.1.0", @@ -35395,9 +35296,9 @@ }, "dependencies": { "@asyncapi/parser": { - "version": "3.0.0-next-major-spec.2", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.0-next-major-spec.2.tgz", - "integrity": "sha512-/gJgCYNYlUSDJhySK3IagjiyFfnwEsAZd5rTe396CB+HxJ6yDWDOZYdHzkFgU2RnCULSGzVOWZGx8t3PK+yuVg==", + "version": "3.0.0-next-major-spec.3", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.0-next-major-spec.3.tgz", + "integrity": "sha512-LCrAQqJpGxraMyU2k1Nh1X6Q1dz7a/YhTRRFFrQHOEo+TUT/kRdoUkRDP++e58dO7h9MBN+/hZK5TaqE+/jQiw==", "requires": { "@asyncapi/specs": "^6.0.0-next-major-spec.6", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", @@ -35557,22 +35458,9 @@ "has-flag": "^4.0.0" } }, - "tr46": { - "version": "0.0.3" - }, "web-vitals": { "version": "3.3.2", "dev": true - }, - "webidl-conversions": { - "version": "3.0.1" - }, - "whatwg-url": { - "version": "5.0.0", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } } } }, @@ -44425,22 +44313,6 @@ "requires": { "whatwg-url": "^5.0.0" } - }, - "tr46": { - "version": "0.0.3", - "dev": true - }, - "webidl-conversions": { - "version": "3.0.1", - "dev": true - }, - "whatwg-url": { - "version": "5.0.0", - "dev": true, - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } } } }, @@ -51222,21 +51094,6 @@ "version": "2.6.11", "requires": { "whatwg-url": "^5.0.0" - }, - "dependencies": { - "tr46": { - "version": "0.0.3" - }, - "webidl-conversions": { - "version": "3.0.1" - }, - "whatwg-url": { - "version": "5.0.0", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - } } }, "node-fetch-native": { @@ -56184,6 +56041,27 @@ "whatwg-mimetype": { "version": "2.3.0" }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + }, + "dependencies": { + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + } + } + }, "which": { "version": "2.0.2", "requires": { From a7fc8eb91ffbcc5415025c67b4875a313feb17f4 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Sat, 7 Oct 2023 22:56:02 +0200 Subject: [PATCH 08/16] chore: update @asyncapi/java-spring-template to 1.3.0 version (#810) --- apps/studio/package.json | 2 +- package-lock.json | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/studio/package.json b/apps/studio/package.json index b0cc65305..a0072db58 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -78,7 +78,7 @@ "@asyncapi/go-watermill-template": "^0.2.40", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", - "@asyncapi/java-spring-template": "^1.2.0", + "@asyncapi/java-spring-template": "^1.3.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.3.3", "@asyncapi/nodejs-template": "^1.0.0", diff --git a/package-lock.json b/package-lock.json index bdf51e2e4..f691123a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -525,7 +525,7 @@ "@asyncapi/go-watermill-template": "^0.2.40", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", - "@asyncapi/java-spring-template": "^1.2.0", + "@asyncapi/java-spring-template": "^1.3.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.3.3", "@asyncapi/nodejs-template": "^1.0.0", @@ -1387,9 +1387,9 @@ } }, "node_modules/@asyncapi/java-spring-template": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.2.0.tgz", - "integrity": "sha512-aCt18PnX24rgqZOvBoIC2Fi3rISB0vey/Kuk/VLAs4Ox89bcnIkZFZFB7u/h70IO+cI0I/GldyzpwluTGfJeeg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.3.0.tgz", + "integrity": "sha512-w9Q4t6Y1k3twJES9tGSjByu7/64UuzpVQQGEsmtDtRa7SaWzbVML82HCmnAV3C8tKX+AARK1jBxNf680AtZBzg==", "dev": true, "dependencies": { "@asyncapi/generator-filters": "^2.1.0", @@ -34837,9 +34837,9 @@ } }, "@asyncapi/java-spring-template": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.2.0.tgz", - "integrity": "sha512-aCt18PnX24rgqZOvBoIC2Fi3rISB0vey/Kuk/VLAs4Ox89bcnIkZFZFB7u/h70IO+cI0I/GldyzpwluTGfJeeg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.3.0.tgz", + "integrity": "sha512-w9Q4t6Y1k3twJES9tGSjByu7/64UuzpVQQGEsmtDtRa7SaWzbVML82HCmnAV3C8tKX+AARK1jBxNf680AtZBzg==", "dev": true, "requires": { "@asyncapi/generator-filters": "^2.1.0", @@ -35228,7 +35228,7 @@ "@asyncapi/go-watermill-template": "^0.2.40", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", - "@asyncapi/java-spring-template": "^1.2.0", + "@asyncapi/java-spring-template": "^1.3.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.3.3", "@asyncapi/nodejs-template": "^1.0.0", From cc5fce876a1c548fc891f029bba08f58734bae6e Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 9 Oct 2023 11:15:35 +0200 Subject: [PATCH 09/16] chore: update @asyncapi/markdown-template to 1.4.0 version (#811) --- apps/studio/package.json | 2 +- package-lock.json | 20 ++++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/apps/studio/package.json b/apps/studio/package.json index a0072db58..ff7c15172 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -80,7 +80,7 @@ "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", "@asyncapi/java-spring-template": "^1.3.0", "@asyncapi/java-template": "^0.2.1", - "@asyncapi/markdown-template": "^1.3.3", + "@asyncapi/markdown-template": "^1.4.0", "@asyncapi/nodejs-template": "^1.0.0", "@asyncapi/nodejs-ws-template": "^0.9.33", "@asyncapi/python-paho-template": "^0.2.13", diff --git a/package-lock.json b/package-lock.json index f691123a7..c796cd9ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -527,7 +527,7 @@ "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", "@asyncapi/java-spring-template": "^1.3.0", "@asyncapi/java-template": "^0.2.1", - "@asyncapi/markdown-template": "^1.3.3", + "@asyncapi/markdown-template": "^1.4.0", "@asyncapi/nodejs-template": "^1.0.0", "@asyncapi/nodejs-ws-template": "^0.9.33", "@asyncapi/python-paho-template": "^0.2.13", @@ -1428,14 +1428,12 @@ } }, "node_modules/@asyncapi/markdown-template": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@asyncapi/markdown-template/-/markdown-template-1.3.3.tgz", - "integrity": "sha512-7gRo1yVMf6TCrOJOi8q8HxkZOJGWtQHQOElXTi9gUbl710b/3SYxlPN8hiS8JuX7d9oOD5JHg0MvRXlq4YxiLw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@asyncapi/markdown-template/-/markdown-template-1.4.0.tgz", + "integrity": "sha512-mvghEtlCi/2DxSnBRMn5nRD+lD2P/HOfodnLMPav1SM0th9eiwizovTQzfuUByjFxVRj9x54ywXObm/fzo3oBQ==", "dev": true, "dependencies": { - "@asyncapi/generator-filters": "^2.1.0", "@asyncapi/generator-react-sdk": "^1.0.0", - "@asyncapi/parser": "^2.1.0", "openapi-sampler": "^1.3.0", "yaml": "^1.10.2" } @@ -34872,14 +34870,12 @@ } }, "@asyncapi/markdown-template": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@asyncapi/markdown-template/-/markdown-template-1.3.3.tgz", - "integrity": "sha512-7gRo1yVMf6TCrOJOi8q8HxkZOJGWtQHQOElXTi9gUbl710b/3SYxlPN8hiS8JuX7d9oOD5JHg0MvRXlq4YxiLw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@asyncapi/markdown-template/-/markdown-template-1.4.0.tgz", + "integrity": "sha512-mvghEtlCi/2DxSnBRMn5nRD+lD2P/HOfodnLMPav1SM0th9eiwizovTQzfuUByjFxVRj9x54ywXObm/fzo3oBQ==", "dev": true, "requires": { - "@asyncapi/generator-filters": "^2.1.0", "@asyncapi/generator-react-sdk": "^1.0.0", - "@asyncapi/parser": "^2.1.0", "openapi-sampler": "^1.3.0", "yaml": "^1.10.2" }, @@ -35230,7 +35226,7 @@ "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", "@asyncapi/java-spring-template": "^1.3.0", "@asyncapi/java-template": "^0.2.1", - "@asyncapi/markdown-template": "^1.3.3", + "@asyncapi/markdown-template": "^1.4.0", "@asyncapi/nodejs-template": "^1.0.0", "@asyncapi/nodejs-ws-template": "^0.9.33", "@asyncapi/openapi-schema-parser": "^3.0.4", From dbeb742568b9b404b3c1ff44efd0f8b7669aca4f Mon Sep 17 00:00:00 2001 From: Prince Rajpoot <44585452+princerajpoot20@users.noreply.github.com> Date: Tue, 10 Oct 2023 15:31:14 +0530 Subject: [PATCH 10/16] Add ChipInput component (#808) --- .../src/components/ChipInput.stories.tsx | 76 ++++++++++++++++++ packages/ui/components/ChipInput.tsx | 80 +++++++++++++++++++ packages/ui/components/index.tsx | 1 + 3 files changed, 157 insertions(+) create mode 100644 apps/design-system/src/components/ChipInput.stories.tsx create mode 100644 packages/ui/components/ChipInput.tsx diff --git a/apps/design-system/src/components/ChipInput.stories.tsx b/apps/design-system/src/components/ChipInput.stories.tsx new file mode 100644 index 000000000..fa129f7f3 --- /dev/null +++ b/apps/design-system/src/components/ChipInput.stories.tsx @@ -0,0 +1,76 @@ +import { useState } from "react"; +import { ChipInput } from "@asyncapi/studio-ui"; + +const meta = { + component: ChipInput, + parameters: { + layout: 'fullscreen', + backgrounds: { + default: 'light' + } + }, +}; + +export default meta; + +export const Default = () => { + const [currentChips, setCurrentChips] = useState([]); + + return ( +
    + +
    + ); +}; + +export const WithTags = () => { + const [currentChips, setCurrentChips] = useState(['production', 'platform']); + + return ( +
    + +
    + ); + }; + +export const WithSomeDefaultText = () => { + const [currentChips, setCurrentChips] = useState(['production', 'platform']); + + return ( +
    + +
    + ); +}; + +export const WithCustomPlaceholder = () => { + const [currentChips, setCurrentChips] = useState([]); + + return ( +
    + +
    + ); +}; diff --git a/packages/ui/components/ChipInput.tsx b/packages/ui/components/ChipInput.tsx new file mode 100644 index 000000000..f3d45c694 --- /dev/null +++ b/packages/ui/components/ChipInput.tsx @@ -0,0 +1,80 @@ +import { FunctionComponent, KeyboardEvent, useRef } from 'react'; + +interface ChipInputProps { + name: string; + id: string; + className?: string; + chips: string[]; + onChange: (chips: string[]) => void; + isDisabled?: boolean; + placeholder?: string; + defaultValue?: string; +} + +export const ChipInput: FunctionComponent = ({ + name, + id, + className, + chips, + onChange, + isDisabled = false, + placeholder = 'Add Tags', + defaultValue = '' +}) => { + const inputRef = useRef(null); + const firstChipRef = useRef(null); + + const handleKeyDown = (event: KeyboardEvent) => { + if (event.key === 'Enter' && event.currentTarget.value.trim()) { + onChange([...chips, event.currentTarget.value.trim()]); + event.currentTarget.value = ''; + } else if (event.key === 'Backspace' && !event.currentTarget.value) { + onChange(chips.slice(0, -1)); + } else if (event.key === 'Tab' && !event.shiftKey) { + event.preventDefault(); + firstChipRef.current?.focus(); + } + }; + + const handleChipKeyDown = (index: number) => (event: KeyboardEvent) => { + if (event.key === 'Backspace') { + const updatedChips = [...chips]; + updatedChips.splice(index, 1); + onChange(updatedChips); + } + }; + + const handleDelete = (chipToDelete: string) => () => { + const updatedChips = chips.filter(chip => chip !== chipToDelete); + onChange(updatedChips); + }; + + return ( +
    + {chips.map((chip, index) => ( +
    + {chip} + +
    + ))} + +
    + ); +}; diff --git a/packages/ui/components/index.tsx b/packages/ui/components/index.tsx index 50e048646..a1058b7ad 100644 --- a/packages/ui/components/index.tsx +++ b/packages/ui/components/index.tsx @@ -2,6 +2,7 @@ import './styles.css' // components +export * from './ChipInput' export * from './EditorSwitch' export * from './DropdownMenu' export * from './Logo' From 2b1da0697299cb0ed6ff9849d3a7ddcc9c5b318b Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 11 Oct 2023 11:01:26 +0200 Subject: [PATCH 11/16] chore: update @asyncapi/java-spring-template to 1.4.0 version (#813) --- apps/studio/package.json | 2 +- package-lock.json | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/studio/package.json b/apps/studio/package.json index ff7c15172..dc50d6a13 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -78,7 +78,7 @@ "@asyncapi/go-watermill-template": "^0.2.40", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", - "@asyncapi/java-spring-template": "^1.3.0", + "@asyncapi/java-spring-template": "^1.4.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.4.0", "@asyncapi/nodejs-template": "^1.0.0", diff --git a/package-lock.json b/package-lock.json index c796cd9ff..bb408ea06 100644 --- a/package-lock.json +++ b/package-lock.json @@ -525,7 +525,7 @@ "@asyncapi/go-watermill-template": "^0.2.40", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", - "@asyncapi/java-spring-template": "^1.3.0", + "@asyncapi/java-spring-template": "^1.4.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.4.0", "@asyncapi/nodejs-template": "^1.0.0", @@ -1387,9 +1387,9 @@ } }, "node_modules/@asyncapi/java-spring-template": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.3.0.tgz", - "integrity": "sha512-w9Q4t6Y1k3twJES9tGSjByu7/64UuzpVQQGEsmtDtRa7SaWzbVML82HCmnAV3C8tKX+AARK1jBxNf680AtZBzg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.4.0.tgz", + "integrity": "sha512-8fRosWeK7F6fk9kYIaHVfv53GdkqunpWkaF1q4wOInlXt5NV3JJt9iVqRcSQis79X/cy9E3jP3VnbDmwl5btCQ==", "dev": true, "dependencies": { "@asyncapi/generator-filters": "^2.1.0", @@ -34835,9 +34835,9 @@ } }, "@asyncapi/java-spring-template": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.3.0.tgz", - "integrity": "sha512-w9Q4t6Y1k3twJES9tGSjByu7/64UuzpVQQGEsmtDtRa7SaWzbVML82HCmnAV3C8tKX+AARK1jBxNf680AtZBzg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@asyncapi/java-spring-template/-/java-spring-template-1.4.0.tgz", + "integrity": "sha512-8fRosWeK7F6fk9kYIaHVfv53GdkqunpWkaF1q4wOInlXt5NV3JJt9iVqRcSQis79X/cy9E3jP3VnbDmwl5btCQ==", "dev": true, "requires": { "@asyncapi/generator-filters": "^2.1.0", @@ -35224,7 +35224,7 @@ "@asyncapi/go-watermill-template": "^0.2.40", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", - "@asyncapi/java-spring-template": "^1.3.0", + "@asyncapi/java-spring-template": "^1.4.0", "@asyncapi/java-template": "^0.2.1", "@asyncapi/markdown-template": "^1.4.0", "@asyncapi/nodejs-template": "^1.0.0", From 9187c171c0ecfd9cac35ef958a6e63a1f4a9d24e Mon Sep 17 00:00:00 2001 From: Ace <40604284+AceTheCreator@users.noreply.github.com> Date: Wed, 11 Oct 2023 04:26:54 -0500 Subject: [PATCH 12/16] fix: studio breaking when trying to generate code/document (#804) Co-authored-by: Khuda Dad Nomani <32505158+KhudaDad414@users.noreply.github.com> --- .changeset/lucky-geckos-talk.md | 4 ++++ .../src/components/Modals/Generator/TemplateParameters.tsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .changeset/lucky-geckos-talk.md diff --git a/.changeset/lucky-geckos-talk.md b/.changeset/lucky-geckos-talk.md new file mode 100644 index 000000000..7820ad69d --- /dev/null +++ b/.changeset/lucky-geckos-talk.md @@ -0,0 +1,4 @@ +--- +"@asyncapi/studio": patch +--- +fix studio breaking when trying to generate code/document diff --git a/apps/studio/src/components/Modals/Generator/TemplateParameters.tsx b/apps/studio/src/components/Modals/Generator/TemplateParameters.tsx index afc4b97ff..862f7e783 100644 --- a/apps/studio/src/components/Modals/Generator/TemplateParameters.tsx +++ b/apps/studio/src/components/Modals/Generator/TemplateParameters.tsx @@ -106,7 +106,7 @@ export const TemplateParametersSans: ForwardRefRenderFunction { - if (supportedProtocols.includes(server.protocol())) availableServers.push(serverName); + if (server.protocol && supportedProtocols.includes(server.protocol())) availableServers.push(serverName); }); if (supportedProtocols.length && availableServers.length === 0) { From 165cb6e0a21daa6e9079d09974800197d3fe5100 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 11 Oct 2023 11:33:49 +0200 Subject: [PATCH 13/16] chore: version packages (#814) --- .changeset/lucky-geckos-talk.md | 4 ---- apps/studio/CHANGELOG.md | 6 ++++++ apps/studio/package.json | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 .changeset/lucky-geckos-talk.md diff --git a/.changeset/lucky-geckos-talk.md b/.changeset/lucky-geckos-talk.md deleted file mode 100644 index 7820ad69d..000000000 --- a/.changeset/lucky-geckos-talk.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -"@asyncapi/studio": patch ---- -fix studio breaking when trying to generate code/document diff --git a/apps/studio/CHANGELOG.md b/apps/studio/CHANGELOG.md index 1eb28bf47..750f2b9dd 100644 --- a/apps/studio/CHANGELOG.md +++ b/apps/studio/CHANGELOG.md @@ -1,5 +1,11 @@ # @asyncapi/studio +## 0.19.1 + +### Patch Changes + +- 9187c17: fix studio breaking when trying to generate code/document + ## 0.19.0 ### Minor Changes diff --git a/apps/studio/package.json b/apps/studio/package.json index dc50d6a13..1ca6aab0c 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/studio", - "version": "0.19.0", + "version": "0.19.1", "private": true, "description": "One place that allows you to develop an AsyncAPI document, validate it, convert it to the latest version, preview the documentation and visualize the events flow.", "license": "Apache-2.0", From 3228dfaa38f9660a16c61f0eb1f65b8189e6a0af Mon Sep 17 00:00:00 2001 From: samz Date: Thu, 12 Oct 2023 06:32:57 +0100 Subject: [PATCH 14/16] ci: add issue metrics action (#815) --- .github/workflows/issues-metrics.yml | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/issues-metrics.yml diff --git a/.github/workflows/issues-metrics.yml b/.github/workflows/issues-metrics.yml new file mode 100644 index 000000000..4c2500064 --- /dev/null +++ b/.github/workflows/issues-metrics.yml @@ -0,0 +1,43 @@ +name: Monthly issue metrics +on: + workflow_dispatch: + schedule: + - cron: '3 2 1 * *' + +permissions: + issues: write + pull-requests: read + +jobs: + build: + name: issue metrics + runs-on: ubuntu-latest + + steps: + + - name: Get dates for last month + shell: bash + run: | + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + + - name: Run issue-metrics tool + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:shapeitapp/shapeitapp created:${{ env.last_month }}' + + - name: Create issue + uses: peter-evans/create-issue-from-file@v4 + with: + title: Monthly issue metrics report + token: ${{ secrets.GITHUB_TOKEN }} + content-filepath: ./issue_metrics.md + assignees: Amzani From 7e2ac9c4d6aba8394d4171187fb95f84d3e4d77c Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 16 Oct 2023 12:39:49 +0200 Subject: [PATCH 15/16] chore: update @asyncapi/go-watermill-template to 0.2.41 version (#817) --- apps/studio/package.json | 2 +- package-lock.json | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/apps/studio/package.json b/apps/studio/package.json index 1ca6aab0c..6f7f97558 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -75,7 +75,7 @@ }, "devDependencies": { "@asyncapi/dotnet-nats-template": "^0.12.1", - "@asyncapi/go-watermill-template": "^0.2.40", + "@asyncapi/go-watermill-template": "^0.2.41", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", "@asyncapi/java-spring-template": "^1.4.0", diff --git a/package-lock.json b/package-lock.json index bb408ea06..20f93b37f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -494,7 +494,7 @@ }, "apps/studio": { "name": "@asyncapi/studio", - "version": "0.19.0", + "version": "0.19.1", "license": "Apache-2.0", "dependencies": { "@asyncapi/avro-schema-parser": "^3.0.2", @@ -522,7 +522,7 @@ }, "devDependencies": { "@asyncapi/dotnet-nats-template": "^0.12.1", - "@asyncapi/go-watermill-template": "^0.2.40", + "@asyncapi/go-watermill-template": "^0.2.41", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", "@asyncapi/java-spring-template": "^1.4.0", @@ -1184,15 +1184,15 @@ } }, "node_modules/@asyncapi/go-watermill-template": { - "version": "0.2.40", - "resolved": "https://registry.npmjs.org/@asyncapi/go-watermill-template/-/go-watermill-template-0.2.40.tgz", - "integrity": "sha512-4YwaRlLJ42xMh3qHRD3VaIJXNtozB8VyHaKLIuk4jcwqYby5AXkgXxbpr/x7P1EatGqKx0rgt7Y5t2K3OEy5SA==", + "version": "0.2.41", + "resolved": "https://registry.npmjs.org/@asyncapi/go-watermill-template/-/go-watermill-template-0.2.41.tgz", + "integrity": "sha512-O6VEyc15Irp9fE8tYqeLMPG8htP6kuKj9WvzaMG9Hj0rHbZMaJFg3arXyc4ZIsUL9kPB3ph4YERD5AYRNHojcw==", "dev": true, "dependencies": { "@asyncapi/generator-filters": "^2.0.0", "@asyncapi/generator-hooks": "^0.1.0", "@asyncapi/generator-react-sdk": "^0.2.23", - "@asyncapi/modelina": "^1.9.0" + "@asyncapi/modelina": "^1.9.1" } }, "node_modules/@asyncapi/html-template": { @@ -1528,9 +1528,9 @@ } }, "node_modules/@asyncapi/modelina": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@asyncapi/modelina/-/modelina-1.9.0.tgz", - "integrity": "sha512-bvzdMD16JjxzRTs4PwpXoeM3ZFczGwuCfMm8rYryOSg232+eN+9B3TgbrJ0BH70l0+1ilIzJC+dAHUohy4R32A==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@asyncapi/modelina/-/modelina-1.9.1.tgz", + "integrity": "sha512-Uik1951dm0MGduKsPzzJmeHZ/IINevR1Qx+QHIRfj9B4ayEAFMNV7sOBJ9eqtEvDohGvXgeFsnNMGAXshed1GQ==", "dev": true, "dependencies": { "@apidevtools/json-schema-ref-parser": "^9.0.9", @@ -34660,15 +34660,15 @@ } }, "@asyncapi/go-watermill-template": { - "version": "0.2.40", - "resolved": "https://registry.npmjs.org/@asyncapi/go-watermill-template/-/go-watermill-template-0.2.40.tgz", - "integrity": "sha512-4YwaRlLJ42xMh3qHRD3VaIJXNtozB8VyHaKLIuk4jcwqYby5AXkgXxbpr/x7P1EatGqKx0rgt7Y5t2K3OEy5SA==", + "version": "0.2.41", + "resolved": "https://registry.npmjs.org/@asyncapi/go-watermill-template/-/go-watermill-template-0.2.41.tgz", + "integrity": "sha512-O6VEyc15Irp9fE8tYqeLMPG8htP6kuKj9WvzaMG9Hj0rHbZMaJFg3arXyc4ZIsUL9kPB3ph4YERD5AYRNHojcw==", "dev": true, "requires": { "@asyncapi/generator-filters": "^2.0.0", "@asyncapi/generator-hooks": "^0.1.0", "@asyncapi/generator-react-sdk": "^0.2.23", - "@asyncapi/modelina": "^1.9.0" + "@asyncapi/modelina": "^1.9.1" } }, "@asyncapi/html-template": { @@ -34955,9 +34955,9 @@ } }, "@asyncapi/modelina": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@asyncapi/modelina/-/modelina-1.9.0.tgz", - "integrity": "sha512-bvzdMD16JjxzRTs4PwpXoeM3ZFczGwuCfMm8rYryOSg232+eN+9B3TgbrJ0BH70l0+1ilIzJC+dAHUohy4R32A==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@asyncapi/modelina/-/modelina-1.9.1.tgz", + "integrity": "sha512-Uik1951dm0MGduKsPzzJmeHZ/IINevR1Qx+QHIRfj9B4ayEAFMNV7sOBJ9eqtEvDohGvXgeFsnNMGAXshed1GQ==", "dev": true, "requires": { "@apidevtools/json-schema-ref-parser": "^9.0.9", @@ -35221,7 +35221,7 @@ "@asyncapi/avro-schema-parser": "^3.0.2", "@asyncapi/converter": "^1.3.1", "@asyncapi/dotnet-nats-template": "^0.12.1", - "@asyncapi/go-watermill-template": "^0.2.40", + "@asyncapi/go-watermill-template": "^0.2.41", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", "@asyncapi/java-spring-template": "^1.4.0", From 223fa22b2865255725e323b19a206791e1962333 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 18 Oct 2023 20:59:27 +0200 Subject: [PATCH 16/16] chore: update @asyncapi/go-watermill-template to 0.2.42 version (#818) --- apps/studio/package.json | 2 +- package-lock.json | 257 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 239 insertions(+), 20 deletions(-) diff --git a/apps/studio/package.json b/apps/studio/package.json index 6f7f97558..7b0720b4d 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -75,7 +75,7 @@ }, "devDependencies": { "@asyncapi/dotnet-nats-template": "^0.12.1", - "@asyncapi/go-watermill-template": "^0.2.41", + "@asyncapi/go-watermill-template": "^0.2.42", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", "@asyncapi/java-spring-template": "^1.4.0", diff --git a/package-lock.json b/package-lock.json index 20f93b37f..037171ffc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -522,7 +522,7 @@ }, "devDependencies": { "@asyncapi/dotnet-nats-template": "^0.12.1", - "@asyncapi/go-watermill-template": "^0.2.41", + "@asyncapi/go-watermill-template": "^0.2.42", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", "@asyncapi/java-spring-template": "^1.4.0", @@ -1184,15 +1184,49 @@ } }, "node_modules/@asyncapi/go-watermill-template": { - "version": "0.2.41", - "resolved": "https://registry.npmjs.org/@asyncapi/go-watermill-template/-/go-watermill-template-0.2.41.tgz", - "integrity": "sha512-O6VEyc15Irp9fE8tYqeLMPG8htP6kuKj9WvzaMG9Hj0rHbZMaJFg3arXyc4ZIsUL9kPB3ph4YERD5AYRNHojcw==", + "version": "0.2.42", + "resolved": "https://registry.npmjs.org/@asyncapi/go-watermill-template/-/go-watermill-template-0.2.42.tgz", + "integrity": "sha512-k97buMXdISG5J3Zpw53fAKYI9fQX8xo+cMuuceaEMtB5TsTgjpscVb9opUBRMYGZsX+oRp9vEhvfeuem11U0IQ==", "dev": true, "dependencies": { "@asyncapi/generator-filters": "^2.0.0", "@asyncapi/generator-hooks": "^0.1.0", "@asyncapi/generator-react-sdk": "^0.2.23", - "@asyncapi/modelina": "^1.9.1" + "@asyncapi/modelina": "^2.0.0" + } + }, + "node_modules/@asyncapi/go-watermill-template/node_modules/@asyncapi/modelina": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@asyncapi/modelina/-/modelina-2.0.0.tgz", + "integrity": "sha512-88ey/C/6mjcLTHH5SMS3QssK2bcUQJ1W6m12NDTFmOnQur+emqOyJAy+e7KAOg2kMUze/81iT23yhoS0RkaRUg==", + "dev": true, + "dependencies": { + "@apidevtools/json-schema-ref-parser": "^9.0.9", + "@apidevtools/swagger-parser": "^10.0.3", + "@asyncapi/avro-schema-parser": "^3.0.2", + "@asyncapi/openapi-schema-parser": "^3.0.4", + "@asyncapi/parser": "^2.1.0", + "@asyncapi/raml-dt-schema-parser": "^4.0.4", + "@swc/core": "^1.3.5", + "@swc/jest": "^0.2.23", + "@types/node": "^20.3.3", + "alterschema": "^1.1.2", + "change-case": "^4.1.2", + "cross-env": "^7.0.3", + "openapi-types": "9.3.0", + "typescript-json-schema": "^0.58.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@asyncapi/go-watermill-template/node_modules/@types/node": { + "version": "20.8.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", + "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.25.1" } }, "node_modules/@asyncapi/html-template": { @@ -1568,11 +1602,6 @@ "node": ">=12" } }, - "node_modules/@asyncapi/modelina/node_modules/path-equal": { - "version": "1.2.5", - "dev": true, - "license": "MIT" - }, "node_modules/@asyncapi/modelina/node_modules/safe-stable-stringify": { "version": "2.4.3", "dev": true, @@ -26210,6 +26239,12 @@ "tslib": "^2.0.3" } }, + "node_modules/path-equal": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/path-equal/-/path-equal-1.2.5.tgz", + "integrity": "sha512-i73IctDr3F2W+bsOWDyyVm/lqsXO47aY9nsFZUjTT/aljSbkxHxxCoyZ9UUrM8jK0JVod+An+rl48RCsvWM+9g==", + "dev": true + }, "node_modules/path-exists": { "version": "4.0.0", "license": "MIT", @@ -32400,6 +32435,81 @@ "node": ">=4.2.0" } }, + "node_modules/typescript-json-schema": { + "version": "0.58.1", + "resolved": "https://registry.npmjs.org/typescript-json-schema/-/typescript-json-schema-0.58.1.tgz", + "integrity": "sha512-EcmquhfGEmEJOAezLZC6CzY0rPNzfXuky+Z3zoXULEEncW8e13aAjmC2r8ppT1bvvDekJj1TJ4xVhOdkjYtkUA==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@types/node": "^16.9.2", + "glob": "^7.1.7", + "path-equal": "^1.2.5", + "safe-stable-stringify": "^2.2.0", + "ts-node": "^10.9.1", + "typescript": "~4.9.5", + "yargs": "^17.1.1" + }, + "bin": { + "typescript-json-schema": "bin/typescript-json-schema" + } + }, + "node_modules/typescript-json-schema/node_modules/@types/node": { + "version": "16.18.59", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.59.tgz", + "integrity": "sha512-PJ1w2cNeKUEdey4LiPra0ZuxZFOGvetswE8qHRriV/sUkL5Al4tTmPV9D2+Y/TPIxTHHgxTfRjZVKWhPw/ORhQ==", + "dev": true + }, + "node_modules/typescript-json-schema/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/typescript-json-schema/node_modules/safe-stable-stringify": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", + "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/typescript-json-schema/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/typescript-json-schema/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/uc.micro": { "version": "1.0.6", "dev": true, @@ -32462,6 +32572,12 @@ "ieee754": "^1.1.13" } }, + "node_modules/undici-types": { + "version": "5.25.3", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", + "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", + "dev": true + }, "node_modules/unfetch": { "version": "4.2.0", "dev": true, @@ -34660,15 +34776,48 @@ } }, "@asyncapi/go-watermill-template": { - "version": "0.2.41", - "resolved": "https://registry.npmjs.org/@asyncapi/go-watermill-template/-/go-watermill-template-0.2.41.tgz", - "integrity": "sha512-O6VEyc15Irp9fE8tYqeLMPG8htP6kuKj9WvzaMG9Hj0rHbZMaJFg3arXyc4ZIsUL9kPB3ph4YERD5AYRNHojcw==", + "version": "0.2.42", + "resolved": "https://registry.npmjs.org/@asyncapi/go-watermill-template/-/go-watermill-template-0.2.42.tgz", + "integrity": "sha512-k97buMXdISG5J3Zpw53fAKYI9fQX8xo+cMuuceaEMtB5TsTgjpscVb9opUBRMYGZsX+oRp9vEhvfeuem11U0IQ==", "dev": true, "requires": { "@asyncapi/generator-filters": "^2.0.0", "@asyncapi/generator-hooks": "^0.1.0", "@asyncapi/generator-react-sdk": "^0.2.23", - "@asyncapi/modelina": "^1.9.1" + "@asyncapi/modelina": "^2.0.0" + }, + "dependencies": { + "@asyncapi/modelina": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@asyncapi/modelina/-/modelina-2.0.0.tgz", + "integrity": "sha512-88ey/C/6mjcLTHH5SMS3QssK2bcUQJ1W6m12NDTFmOnQur+emqOyJAy+e7KAOg2kMUze/81iT23yhoS0RkaRUg==", + "dev": true, + "requires": { + "@apidevtools/json-schema-ref-parser": "^9.0.9", + "@apidevtools/swagger-parser": "^10.0.3", + "@asyncapi/avro-schema-parser": "^3.0.2", + "@asyncapi/openapi-schema-parser": "^3.0.4", + "@asyncapi/parser": "^2.1.0", + "@asyncapi/raml-dt-schema-parser": "^4.0.4", + "@swc/core": "^1.3.5", + "@swc/jest": "^0.2.23", + "@types/node": "^20.3.3", + "alterschema": "^1.1.2", + "change-case": "^4.1.2", + "cross-env": "^7.0.3", + "openapi-types": "9.3.0", + "typescript-json-schema": "^0.58.1" + } + }, + "@types/node": { + "version": "20.8.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", + "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "dev": true, + "requires": { + "undici-types": "~5.25.1" + } + } } }, "@asyncapi/html-template": { @@ -34987,10 +35136,6 @@ "wrap-ansi": "^7.0.0" } }, - "path-equal": { - "version": "1.2.5", - "dev": true - }, "safe-stable-stringify": { "version": "2.4.3", "dev": true @@ -35221,7 +35366,7 @@ "@asyncapi/avro-schema-parser": "^3.0.2", "@asyncapi/converter": "^1.3.1", "@asyncapi/dotnet-nats-template": "^0.12.1", - "@asyncapi/go-watermill-template": "^0.2.41", + "@asyncapi/go-watermill-template": "^0.2.42", "@asyncapi/html-template": "^0.28.4", "@asyncapi/java-spring-cloud-stream-template": "^0.13.4", "@asyncapi/java-spring-template": "^1.4.0", @@ -51488,6 +51633,12 @@ "tslib": "^2.0.3" } }, + "path-equal": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/path-equal/-/path-equal-1.2.5.tgz", + "integrity": "sha512-i73IctDr3F2W+bsOWDyyVm/lqsXO47aY9nsFZUjTT/aljSbkxHxxCoyZ9UUrM8jK0JVod+An+rl48RCsvWM+9g==", + "dev": true + }, "path-exists": { "version": "4.0.0" }, @@ -55348,6 +55499,68 @@ "version": "4.9.5", "dev": true }, + "typescript-json-schema": { + "version": "0.58.1", + "resolved": "https://registry.npmjs.org/typescript-json-schema/-/typescript-json-schema-0.58.1.tgz", + "integrity": "sha512-EcmquhfGEmEJOAezLZC6CzY0rPNzfXuky+Z3zoXULEEncW8e13aAjmC2r8ppT1bvvDekJj1TJ4xVhOdkjYtkUA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@types/node": "^16.9.2", + "glob": "^7.1.7", + "path-equal": "^1.2.5", + "safe-stable-stringify": "^2.2.0", + "ts-node": "^10.9.1", + "typescript": "~4.9.5", + "yargs": "^17.1.1" + }, + "dependencies": { + "@types/node": { + "version": "16.18.59", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.59.tgz", + "integrity": "sha512-PJ1w2cNeKUEdey4LiPra0ZuxZFOGvetswE8qHRriV/sUkL5Al4tTmPV9D2+Y/TPIxTHHgxTfRjZVKWhPw/ORhQ==", + "dev": true + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "safe-stable-stringify": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", + "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", + "dev": true + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } + } + }, "uc.micro": { "version": "1.0.6", "dev": true @@ -55384,6 +55597,12 @@ } } }, + "undici-types": { + "version": "5.25.3", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", + "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", + "dev": true + }, "unfetch": { "version": "4.2.0", "dev": true