diff --git a/config/MAINTAINERS.json b/config/MAINTAINERS.json index 6ea5fc3cd8b..cd62c615eb9 100644 --- a/config/MAINTAINERS.json +++ b/config/MAINTAINERS.json @@ -1,7 +1,7 @@ [ { "name": "Aishat Muibudeen", - "github": "mayaleeeee", + "github": "Mayaleeeee", "linkedin": "aishatmuibudeen", "slack": "U03CNHGEUR1", "twitter": "maya_ux_ui", diff --git a/markdown/blog/beyond-boundaries.md b/markdown/blog/beyond-boundaries.md index c02ea3c443a..590a28271f6 100644 --- a/markdown/blog/beyond-boundaries.md +++ b/markdown/blog/beyond-boundaries.md @@ -72,7 +72,7 @@ Comparing this to the previous year, we are proud of this current trajectory and | No | Project Idea | Mentor/s | Category | Mentee/s | | --- | --- | --- | --- | --- | -| 1 | [Add help/{command} endpoint](https://github.com/asyncapi/server-api/issues/144) | [David Pereira](https://github.com/BOLT04) | Engineering | [Prince Rajpoot](https://github.com/princerajpoot20) | +| 1 | [Add help/\{command} endpoint](https://github.com/asyncapi/server-api/issues/144) | [David Pereira](https://github.com/BOLT04) | Engineering | [Prince Rajpoot](https://github.com/princerajpoot20) | | 2 | [Website UI Kit design/dev project](https://github.com/asyncapi/design-system/issues/4) | [AceTheCreator](https://github.com/AceTheCreator) | Design | [AISHAT MUIBUDEEN](https://github.com/Mayaleeeee) | | 3 | [MVP integration of extensions catalog with AsyncAPI tools](https://github.com/asyncapi/extensions-catalog/issues/78) | [Lukasz Gornicki](https://github.com/derberg) | Engineering | [Sambhav Gupta](https://github.com/sambhavgupta0705) | | 4 | [Documenting how different protocols work with AsyncAPI](https://github.com/orgs/asyncapi/discussions/533) | [Alejandra Quetzalli](https://github.com/alequetzalli) | Documentation | [Cynthia Peter](https://github.com/CynthiaPeter), [Arya Gupta](https://github.com/Arya-Gupta), [Joy Almeida](https://github.com/J0SAL), [Vaishnavi Nandakumar](https://github.com/VaishnaviNandakumar)| diff --git a/markdown/docs/tools/cli/_section.md b/markdown/docs/tools/cli/_section.md new file mode 100644 index 00000000000..ed12360f15c --- /dev/null +++ b/markdown/docs/tools/cli/_section.md @@ -0,0 +1,4 @@ +--- +title: CLI +weight: 10 +--- \ No newline at end of file diff --git a/markdown/docs/tools/cli/context.md b/markdown/docs/tools/cli/context.md new file mode 100644 index 00000000000..95fbcc8e008 --- /dev/null +++ b/markdown/docs/tools/cli/context.md @@ -0,0 +1,156 @@ +--- +title: 'Context concept' +weight: 50 +--- + +## Overview + +AsyncAPI CLI provides functionality called `context`. It's purpose is to help to work with AsyncAPI CLI in large projects where you do not have just one service exposing AsyncAPI document, but multiple. + +Event driven architecture involves multiple actors, subscribers and publishers. One time you want to validate document **A** and the other time you want to generate models from document **B**. Every time you do it, you need to provide to AsyncAPI CLI the location of the AsyncAPI document, which might be time consuming. You can workaround it with aliases in bash profiles or with other solutions but it is better to use `context` feature, as you can then store it in your repository and share with other team members. + +In short it means that for example instead of writing `asyncapi validate /some/folder/my-asyncapi.yml` you can create a context called `myasync` that will be an alias for and point to `/some/folder/my-asyncapi.yml`. This way next time you use the CLI you can do `asyncapi validate myasync`. + +## Context File location + +You can have a global context for your workstation, and a project specific context. + +If your use case is that you work with multiple repositories, you might want to use a global context. The `.asyncapi-cli` context file is then located in your home directory. You can also store your custom `.asyncapi-cli` file in your project with custom configuration. This way when you run `asyncapi config context add` inside your project, the new context is added to the context file under your project. + +## How to add context to a project + +### Manually + - Create file `.asyncapi-cli` containing [minimal empty context file](#minimalEmptyContextFile) in: + - current directory + - root of current repository + - user's home directory + +### Using CLI's `init` command + +`asyncapi config context init [CONTEXT-FILE-PATH]` + +Where `[CONTEXT-FILE-PATH]` instructs CLI what directory should the file `.asyncapi-cli` containing [minimal empty context file](#minimalEmptyContextFile) be created in: + - current directory: `asyncapi config context init .` (default) + - root of current repository: `asyncapi config context init ./` + - user's home directory: `asyncapi config context init ~` + +(if `[CONTEXT-FILE-PATH]` is omitted, empty context file is created in current directory) + +Make use of newly created `.asyncapi-cli` by executing command: + +`asyncapi config context add [CONTEXT-NAME] [SPEC-FILE-PATH]` + +### Setup example in a real project + +Below you can see an example of context setup for [Event Driven Flight status notification service](https://github.com/amadeus4dev-examples/amadeus-async-flight-status/tree/ff433b6d320a3a6a2499976cbf0782353bc57c16) of the [Amadeus Airline Platform](https://amadeus.com/en/industries/airlines/airline-platform), with multiple microservices and their AsyncAPI documents. + +```bash +# One-time initialization of '.asyncapi-cli' file +(main)$ asyncapi config context init +Initialized context /amadeus-async-flight-status/.asyncapi-cli + +# Adding first context +(main)$ asyncapi config context add subscriber subscriber/asyncapi.yaml +Added context "subscriber". +You can set it as your current context: asyncapi config context use subscriber +You can use this context when needed by passing subscriber as a parameter: asyncapi validate subscriber + +# Adding more contexts +(main)$ asyncapi config context add notifier notifier/asyncapi.yaml +Added context "notifier". +You can set it as your current context: asyncapi config context use notifier +You can use this context when needed by passing notifier as a parameter: asyncapi validate notifier + +(main)$ asyncapi config context add monitor monitor/asyncapi.yaml +Added context "monitor". +You can set it as your current context: asyncapi config context use monitor +You can use this context when needed by passing monitor as a parameter: asyncapi validate monitor + +# Setting monitor as default context +(main)$ asyncapi config context use monitor +monitor is set as current + +# Now you do not even have to remember the context name, and default 'monitor/asyncapi.yaml' will be validated +(main)$ asyncapi validate +File monitor/asyncapi.yaml is valid but has (itself and/or referenced documents) governance issues. +monitor/asyncapi.yaml + 1:1 warning asyncapi-defaultContentType AsyncAPI document should have "defaultContentType" field. + 1:1 warning asyncapi-id AsyncAPI document should have "id" field. + 1:1 warning asyncapi2-tags AsyncAPI object should have non-empty "tags" array. + 1:11 information asyncapi-latest-version The latest version of AsyncAPi is not used. It is recommended update to the "2.6.0" version. asyncapi + 2:6 warning asyncapi-info-contact Info object should have "contact" object. info + 19:15 warning asyncapi2-operation-operationId Operation should have an "operationId" field defined. channels.flight/update.subscribe + 26:13 warning asyncapi2-operation-operationId Operation should have an "operationId" field defined. channels.flight/queue.publish +✖ 7 problems (0 errors, 6 warnings, 1 info, 0 hints) + +# You can now use context name when running AsyncAPI commands, no need to remember file location like 'notifier/asyncapi.yaml' +(main)$ asyncapi validate notifier +File notifier/asyncapi.yaml is valid but has (itself and/or referenced documents) governance issues. +notifier/asyncapi.yaml + 1:1 warning asyncapi-defaultContentType AsyncAPI document should have "defaultContentType" field. + 1:1 warning asyncapi-id AsyncAPI document should have "id" field. + 1:1 warning asyncapi2-tags AsyncAPI object should have non-empty "tags" array. + 1:11 information asyncapi-latest-version The latest version of AsyncAPi is not used. It is recommended update to the "2.6.0" version. asyncapi + 2:6 warning asyncapi-info-contact Info object should have "contact" object. info + 18:13 warning asyncapi2-operation-operationId Operation should have an "operationId" field defined. channels.flight/update.publish +✖ 6 problems (0 errors, 5 warnings, 1 info, 0 hints) + +# Switch default context +(main)$ asyncapi config context use notifier +notifier is set as current + +# List all contexts +(main)$ asyncapi config context list +monitor: monitor/asyncapi.yaml +notifier: notifier/asyncapi.yaml +subscriber: subscriber/asyncapi.yaml +``` + +## Context File structure + +### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +current | `string` | An optional string value representing one of context names, which is used as default in CLI. Default means you can run CLI commands without providing context name, like `asyncapi validate`, and it will run against the default - `current` - context. +store | [Store Object](#storeObject) | **REQUIRED**. Map of filesystem paths to target AsyncAPI documents. + +### Store Object + +Map of filesystem paths to target AsyncAPI documents. + +**Patterned Fields** + +Field Pattern | Type | Description +---|:---:|--- +{contextName} | `string` | An optional string value representing filesystem path to the target AsyncAPI document. + +### Minimal Empty Context File +Raw JSON: +``` +{ + "store": {} +} +``` +Stringified JSON: +``` +{"store":{}} +``` + +### Context File Example + +Example of a context file for [Event Driven Flight status notification service](https://github.com/amadeus4dev-examples/amadeus-async-flight-status/tree/ff433b6d320a3a6a2499976cbf0782353bc57c16) of the [Amadeus Airline Platform](https://amadeus.com/en/industries/airlines/airline-platform), with multiple microservices and their AsyncAPI documents: +``` +{ + "current": "monitor", + "store": { + "monitor": "monitor/asyncapi.yaml", + "notifier": "notifier/asyncapi.yaml", + "subscriber": "subscriber/asyncapi.yaml" + } +} +``` + +## More context related CLI options + +All commands for managing contexts are available under `asyncapi config context` [CLI commands group](usage#asyncapi-config-context). diff --git a/markdown/docs/tools/cli/index.md b/markdown/docs/tools/cli/index.md new file mode 100644 index 00000000000..7a28241c630 --- /dev/null +++ b/markdown/docs/tools/cli/index.md @@ -0,0 +1,73 @@ +--- +title: 'Introduction' +weight: 20 +--- + + +The AsyncAPI CLI is a command-line tool that provides a set of commands for working with AsyncAPI documents. AsyncAPI is a specification for describing asynchronous APIs, which allows developers to define the structure of messages exchanged between different parts of their applications. The AsyncAPI CLI simplifies creating, validating, bundling, and manipulating AsyncAPI documents, making it easier to work with asynchronous APIs. + +## Features + +The AsyncAPI CLI offers the following key features: + +* Creation: New AsyncAPI documents can be created from scratch using the CLI, which is useful when starting a new project or creating a new version of an existing API. + +* Validation: AsyncAPI documents can be quickly and easily validated using the [AsyncAPI Parser](https://github.com/asyncapi/parser-js), which ensures that the documents conform to the AsyncAPI specification and catches errors early in the development process. + +* Conversion: The AsyncAPI CLI can convert AsyncAPI documents from one version to another, which is helpful for migrating APIs to a newer version of the AsyncAPI specification. + +* Difference: The AsyncAPI CLI can be used to find the differences between two AsyncAPI documents, which helps compare different versions of an API or identify changes made to an API. + +* Generation: The AsyncAPI CLI leverages AsyncAPI libraries like [Generator](https://github.com/asyncapi/generator) and [Modelina](https://github.com/asyncapi/modelina), which allow you to generate various types of documentation, applications, and models in different programming languages. This feature can save significant time and effort when creating new APIs. + +* Optimize: Using [Optimizer](https://github.com/asyncapi/optimizer/), the AsyncAPI CLI can be used to optimize an AsyncAPI specification file which can optimize the structure of the AsyncAPI document to make it smaller and without repetition. + +* Start: The AsyncAPI CLI can be used to start [AsyncAPI Studio](https://studio.asyncapi.com/) locally, which the user can use to view, edit, and test AsyncAPI documents. + +To summarize, the AsyncAPI CLI offers the following features and process flow, as shown in the diagram below: + +```mermaid +graph TD; +A[AsyncAPI Document] +B[Creation] +J[Studio - Editor] +I[Optimization] +D[Validation] +C[Generation] +F[Apps/Docs] +G[Models] +H[Diff] +K[Bundling] +E[Conversion] +A-->B; +A-->D; +A-->C; +C-->F +C-->G +A-->H; +A-->I; +A-->J; +A-->E; +A-->K; +``` + +## CLI flow + +The following flowchart illustrates the process flow of the AsyncAPI CLI: + +```mermaid +graph TD; +A[Start] --> B[User runs the AsyncAPI CLI] +B --> C[User issues a command] +C --> D[CLI processes the command and runs the corresponding operation] +D --> |Is the operation successful?| E{Yes} +D --> |Is the operation recoverable?| F{Yes} +E --> G[CLI returns the results of the operation to the user] +F --> |Operation Error| H[CLI displays an error message and suggests possible next steps] +G --> J[User receives the results] +H --> I[User follows suggested steps to recover] +I --> C[User reissues the corrected command] +J[User terminates the AsyncAPI CLI] --> K[End] +``` + +This flowchart shows the high-level process that occurs when using the AsyncAPI CLI. The user starts by running a command (such as `validate`, `generate`, or `start`), which the CLI processes. The CLI then performs the corresponding operation (such as validating or generating an AsyncAPI document) and returns the results to the user. If an error occurs, the CLI displays an error message and suggests possible next steps for the user. diff --git a/markdown/docs/tools/cli/installation.md b/markdown/docs/tools/cli/installation.md new file mode 100644 index 00000000000..5b954799ca3 --- /dev/null +++ b/markdown/docs/tools/cli/installation.md @@ -0,0 +1,173 @@ +--- +title: 'Installation guide' +weight: 30 +--- + +## Node and npm + +To use the AsyncAPI CLI tool, you must install NPM and Node.js version 10 or higher. To check if you already have both installed, run the following commands in your terminal: + +```sh +# check if node is installed +node -v +# or +node --version + +# check if NPM is installed +npm -v +# or +npm --version +``` + +If you don’t have Node.js or NPM installed, you can install both with this [Node.js package manager](https://nodejs.org/en/download/package-manager/). + +After installing Node.js and NPM, run the following command to install the AsyncAPI CLI globally: +```sh +npm install -g @asyncapi/cli +``` +## Docker + +Install [Docker](https://docs.docker.com/get-docker/) first, then use docker to build the image using the following command : +``` +docker build -t asyncapi/cli:latest . +``` +and run the image using the following command : + +```bash +docker run --rm -it \ +--user=root \ +-v [ASYNCAPI SPEC FILE LOCATION]:/app/asyncapi.yml \ +-v [GENERATED FILES LOCATION]:/app/output \ +asyncapi/cli [COMMAND HERE] + +# Example that you can run inside the cli directory after cloning this repository. First, you specify the mount in the location of your AsyncAPI specification file and then you mount it in the directory where the generation result should be saved. +docker run --rm -it \ + --user=root \ + -v ${PWD}/test/integration/fixtures/asyncapi_v1.yml:/app/asyncapi.yml \ + -v ${PWD}/output:/app/output \ + asyncapi/cli generate fromTemplate -o /app/output /app/asyncapi.yml @asyncapi/html-template --force-write +``` +Note: Use ``` ` ``` instead of `\` for Windows. + + +## Mac +There are two ways to install the AsyncAPI CLI on your macOS: using the `brew` package manager or `pkg` files. + +### brew + +To install the AsyncAPI CLI using the `brew` package manager, run the following commands in your terminal: +```sh +# Install brew +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + +# Install AsyncAPI CLI +brew install asyncapi +``` + +### pkg + +Every release of the AsyncAPI CLI has two macOS dedicated `pkg` file that enables you to install the CLI tool as a macOS application for x64 as well as arm64 architecture. +To download the latest CLI release, run this command in your terminal: +```sh +# For x64 +curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.x64.pkg + +# For arm64 +curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.arm64.pkg +``` + +To download a specific CLI release, run this command in your terminal: +```sh +curl -OL https://github.com/asyncapi/cli/releases/download//asyncapi.pkg +``` + + +Follow this link for all AsyncAPI CLI releases. + + +After downloading the AsyncAPI CLI, install it via the following command: + +```sh +sudo installer -pkg asyncapi.pkg -target / +``` + +## Windows + +There are two ways to install the AsyncAPI CLI on your Windows operating system: using the `chocolatey` package manager or executable files. + +### Chocolatey + +Prerequisites: +[Chocolatey](https://chocolatey.org/install) must be installed on your Windows operating system. The installation instructions can be found [here](https://docs.chocolatey.org/en-us/choco/setup#installing-chocolatey-cli). + +To install the AsyncAPI CLI using the `chocolatey` package manager, run the following command in your terminal with administrator privileges: + +```sh +# Install AsyncAPI CLI +choco install asyncapi +``` + +To upgrade run this command:- +```sh +# Upgrade AsyncAPI CLI +choco upgrade asyncapi +``` +To install a specific version run this command: +```sh +# Install AsyncAPI CLI version xx.xx.xx +choco install asyncapi --version xx.xx.xx +``` +All the AsyncAPI CLI versions can be found [here](https://chocolatey.org/packages/asyncapi). + +### Executable files + +Just install the appropriate installer and simply follow the default installation steps to complete the installation process. + +Download [asyncapi.x64.exe](https://github.com/asyncapi/cli/releases/latest/download/asyncapi.x64.exe) for 64-bit Windows and download [asyncapi.x86.exe](https://github.com/asyncapi/cli/releases/latest/download/asyncapi.x86.exe) for 32-bit Windows. + + +## Linux +Selecting the appropriate AsyncAPI CLI installation method on a Linux operating system depends on your Linux distro. + +### Debian based distros + +For Debian based distros, you can install the AsycAPI CLI using the `dpkg` package manager for Debian. +```sh +curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.deb +``` + +To download a specific release of the CLI, run this command in your terminal: +```sh +curl -OL https://github.com/asyncapi/cli/releases/download//asyncapi.deb +``` + +### Other distros +You can install the AsyncAPI CLI for other Linux distros using the archive `tar.gz` file. To download the latest release of the CLI, run this command in your terminal: +```sh +curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.tar.gz +``` + +To download a specific release of the CLI, run this command in your terminal: +```sh +curl -OL https://github.com/asyncapi/cli/releases/download//asyncapi.tar.gz +``` + +Once you have downloaded the archived file, untar it by running this command in your terminal: +```sh +tar -xzf asyncapi.tar.gz +``` + +The step above will create an `AsyncAPI` directory in the current path. To run the CLI from anywhere, you must create a `symlink`. If the current path you are on is `/user/local/bin`, for example, you must create the `symlink` in the `/user/local/bin` directory by following these steps: +```sh +# cd into the unarchived directory +cd asyncapi + +# get the absolute path +pwd + +# Create a symlink +ln -s /bin/asyncapi /user/local/bin/asyncapi + +# The "asyncapi" command should be available to be used +asyncapi +``` diff --git a/markdown/docs/tools/cli/metrics_collection.md b/markdown/docs/tools/cli/metrics_collection.md new file mode 100644 index 00000000000..3e89f6bddc6 --- /dev/null +++ b/markdown/docs/tools/cli/metrics_collection.md @@ -0,0 +1,57 @@ +# Metrics collection guideline + +AsyncAPI **anonymously** tracks command executions to improve the specification and tools, ensuring no sensitive data reaches our servers. It aids in comprehending how AsyncAPI tools are used and adopted, facilitating ongoing improvements to our specifications and tools. + +Even though metrics collection is enabled by default, you can always [disable tracking](#how-to-disable-tracking) if you want to. + +## What we collect +We are collecting the following metrics: + +- `asyncapi_adoption.action.invoked`: +With this metric we are tracking the command executed on the CLI as soon as the command is invoked, so it has already been executed but not finished yet. We just want to know which commands are used, regardless they have failed or succeeded. + +Example of the data collected by this metric when the `validate` command has been executed: +``` +asyncapi_adoption.action.invoked COUNTER { action: 'validate' } 1 +``` + +- `asyncapi_adoption.action.finished`: +This metric tracks the command executed once it has already finished, carrying the result of the execution and some metadata based on the AsyncAPI document in place. + +Example for `validate` command successfully executed and finished: +``` +asyncapi_adoption.action.finished COUNTER { + validation_result: 'valid', + success: true, + asyncapi_version: '2.6.0', + asyncapi_servers: 2, + asyncapi_channels: 4, + asyncapi_messages: 3, + asyncapi_operations_send: 3, + asyncapi_operations_receive: 1, + asyncapi_schemas: 52, + action: 'validate' + } 1 +``` + +## Where the data is stored +We are making use of [New Relic API](https://docs.newrelic.com/docs/apis/intro-apis/introduction-new-relic-apis/#rest-api) to send the metrics collected to _New Relic_ servers, where they are stored, and finally visualized on the AsyncAPI website. + +Metrics won't be collected in CI environments, or when the "CI" env variable is set up to "true". + +The analytics config file will be store by default at your home directory. In case you prefer to change the file path then you should set the `ASYNCAPI_METRICS_CONFIG_PATH` env var to any specific path value when running any command. For instance: +```` +ASYNCAPI_METRICS_CONFIG_PATH=/tmp/.asyncapi-analytics asyncapi config analytics --status +```` + +## How to disable tracking +To disable tracking, please run the following command: +`asyncapi config analytics --disable` + +Once disabled, if you want to enable tracking back again then run: +`asyncapi config analytics --enable` + +In case you do not know the current status of analytics, then you can append the "--status" flag to be aware of it: +`asyncapi config analytics --status` + +Remember that keeping this tracking enabled will help AsyncAPI community to provide better specifications and tools in the future. \ No newline at end of file diff --git a/markdown/docs/tools/cli/usage.md b/markdown/docs/tools/cli/usage.md index 54b21b61af2..18540a7aab6 100644 --- a/markdown/docs/tools/cli/usage.md +++ b/markdown/docs/tools/cli/usage.md @@ -27,7 +27,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/1.15.3 linux-x64 node-v18.20.2 +@asyncapi/cli/1.15.4 linux-x64 node-v18.20.3 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -98,7 +98,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml -o final-asyncapi.yaml --base ../public-api/main.yaml --baseDir ./social-media/comments-service ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/bundle.ts)_ ## `asyncapi config` @@ -112,7 +112,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/config/index.ts)_ ## `asyncapi config analytics` @@ -132,7 +132,7 @@ DESCRIPTION Enable or disable analytics for metrics collection ``` -_See code: [src/commands/config/analytics.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/config/analytics.ts)_ +_See code: [src/commands/config/analytics.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/config/analytics.ts)_ ## `asyncapi config context` @@ -146,7 +146,7 @@ DESCRIPTION Manage short aliases for full paths to AsyncAPI documents ``` -_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/config/context/index.ts)_ +_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/config/context/index.ts)_ ## `asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH` @@ -168,7 +168,7 @@ DESCRIPTION Add a context to the store ``` -_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/config/context/add.ts)_ +_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/config/context/add.ts)_ ## `asyncapi config context current` @@ -185,7 +185,7 @@ DESCRIPTION Shows the current context that is being used ``` -_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/config/context/current.ts)_ +_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/config/context/current.ts)_ ## `asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH` @@ -206,7 +206,7 @@ DESCRIPTION Edit a context in the store ``` -_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/config/context/edit.ts)_ +_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/config/context/edit.ts)_ ## `asyncapi config context init [CONTEXT-FILE-PATH]` @@ -229,7 +229,7 @@ DESCRIPTION Initialize context ``` -_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/config/context/init.ts)_ +_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/config/context/init.ts)_ ## `asyncapi config context list` @@ -246,7 +246,7 @@ DESCRIPTION List all the stored contexts in the store ``` -_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/config/context/list.ts)_ +_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/config/context/list.ts)_ ## `asyncapi config context remove CONTEXT-NAME` @@ -266,7 +266,7 @@ DESCRIPTION Delete a context from the store ``` -_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/config/context/remove.ts)_ +_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/config/context/remove.ts)_ ## `asyncapi config context use CONTEXT-NAME` @@ -286,7 +286,7 @@ DESCRIPTION Set a context as current ``` -_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/config/context/use.ts)_ +_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/config/context/use.ts)_ ## `asyncapi config versions` @@ -303,7 +303,7 @@ DESCRIPTION Show versions of AsyncAPI tools used ``` -_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/config/versions.ts)_ +_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/config/versions.ts)_ ## `asyncapi convert [SPEC-FILE]` @@ -325,7 +325,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -365,7 +365,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/diff.ts)_ ## `asyncapi generate` @@ -379,7 +379,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -423,7 +423,7 @@ EXAMPLES $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write ``` -_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/generate/fromTemplate.ts)_ +_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/generate/fromTemplate.ts)_ ## `asyncapi generate models LANGUAGE FILE` @@ -491,7 +491,7 @@ DESCRIPTION Generates typed models ``` -_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/generate/models.ts)_ +_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/generate/models.ts)_ ## `asyncapi new` @@ -548,7 +548,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -605,7 +605,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/new/file.ts)_ +_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/new/file.ts)_ ## `asyncapi new glee` @@ -627,7 +627,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/new/glee.ts)_ +_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/new/glee.ts)_ ## `asyncapi optimize [SPEC-FILE]` @@ -665,7 +665,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/optimize.ts)_ ## `asyncapi start` @@ -679,7 +679,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -698,7 +698,7 @@ DESCRIPTION starts a new local instance of Studio ``` -_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/start/studio.ts)_ +_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/start/studio.ts)_ ## `asyncapi validate [SPEC-FILE]` @@ -726,5 +726,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.15.3/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.15.4/src/commands/validate.ts)_ diff --git a/netlify.toml b/netlify.toml index 2a83666a24e..5bbb82e6312 100644 --- a/netlify.toml +++ b/netlify.toml @@ -4,6 +4,9 @@ X-Frame-Options = "ALLOW-FROM https://www.youtube.com/" Access-Control-Allow-Origin = "*" +[context.production.environment] + NODE_ENV = "development" + [build] command = "npm run build" functions = "netlify/functions" diff --git a/package-lock.json b/package-lock.json index 6ca38c6f566..34de764cba7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,6 +49,7 @@ "next-mdx-remote": "^4.4.1", "node-fetch": "^3.3.2", "postcss": "^8.4.35", + "prettier": "^3.3.0", "react": "^18", "react-dom": "^18", "react-ga": "^3.3.1", @@ -14281,8 +14282,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.0.tgz", "integrity": "sha512-J9odKxERhCQ10OC2yb93583f6UnYutOeiV5i0zEDS7UGTdUt0u+y8erxl3lBKvwo/JHyyoEdXjwp4dke9oyZ/g==", - "dev": true, - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, diff --git a/package.json b/package.json index 76a5287c777..be135f769d4 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "next-mdx-remote": "^4.4.1", "node-fetch": "^3.3.2", "postcss": "^8.4.35", + "prettier": "^3.3.0", "react": "^18", "react-dom": "^18", "react-ga": "^3.3.1", diff --git a/pages/newsletter.tsx b/pages/newsletter.tsx new file mode 100644 index 00000000000..234acfbd336 --- /dev/null +++ b/pages/newsletter.tsx @@ -0,0 +1,18 @@ +import React from 'react'; + +import Head from '@/components/Head'; +import Container from '@/components/layout/Container'; +import NewsletterSubscribe from '@/components/NewsletterSubscribe'; + +export default function NewsletterIndexPage() { + return ( +
+ +
+ + + +
+
+ ); +}