Full Code of asyncapi/cli for AI

master b53337377884 cached
299 files
911.1 KB
234.2k tokens
478 symbols
1 requests
Download .txt
Showing preview only (993K chars total). Download the full file or copy to clipboard to get everything.
Repository: asyncapi/cli
Branch: master
Commit: b53337377884
Files: 299
Total size: 911.1 KB

Directory structure:
gitextract_blnuhiyp/

├── .all-contributorsrc
├── .asyncapi-tool
├── .changeset/
│   └── config.json
├── .dockerignore
├── .editorconfig
├── .gitattributes
├── .github/
│   └── workflows/
│       ├── add-good-first-issue-labels.yml
│       ├── automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml
│       ├── automerge-for-humans-merging.yml
│       ├── automerge-for-humans-remove-ready-to-merge-label-on-edit.yml
│       ├── automerge-orphans.yml
│       ├── automerge.yml
│       ├── autoupdate.yml
│       ├── bounty-program-commands.yml
│       ├── bump-homebrew-formula.yml
│       ├── bump.yml
│       ├── deploy/
│       │   └── chocolatey/
│       │       ├── asyncapi-cli.nuspec
│       │       ├── replace.ps1
│       │       └── tools/
│       │           └── chocolateyinstall.ps1
│       ├── help-command.yml
│       ├── if-docker-pr-testing.yml
│       ├── if-nodejs-pr-testing.yml
│       ├── issues-prs-notifications.yml
│       ├── lint-pr-title.yml
│       ├── notify-tsc-members-mention.yml
│       ├── please-take-a-look-command.yml
│       ├── release-announcements.yml
│       ├── release-chocolatey.yml
│       ├── release-docker.yml
│       ├── release-server-api.yml
│       ├── release-with-changesets.yml
│       ├── scripts/
│       │   ├── README.md
│       │   ├── kit/
│       │   │   ├── htmlContent.js
│       │   │   ├── index.js
│       │   │   └── package.json
│       │   └── mailchimp/
│       │       └── htmlContent.js
│       ├── stale-issues-prs.yml
│       ├── test-action.yml
│       ├── update-docs-in-website.yml
│       ├── update-docs-on-docs-commits.yml
│       ├── update-maintainers-trigger.yaml
│       ├── update-pr.yml
│       ├── upload-release-assets.yml
│       └── welcome-first-time-contrib.yml
├── .gitignore
├── .prettierrc
├── .sonarcloud.properties
├── CHANGELOG.md
├── CODEOWNERS
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── DEVELOPMENT.md
├── Dockerfile
├── LICENSE
├── NOTICE
├── README.md
├── action-template.yml
├── action.yml
├── assets/
│   ├── create-template/
│   │   └── templates/
│   │       └── default/
│   │           ├── asyncapi.yaml
│   │           ├── package.json
│   │           ├── readme.md
│   │           └── template/
│   │               └── index.js
│   └── examples/
│       ├── default-example.json
│       └── default-example.yaml
├── bin/
│   ├── dev
│   ├── dev.cmd
│   ├── run
│   ├── run.cmd
│   ├── run_bin
│   └── run_bin.cmd
├── docs/
│   ├── architecture.md
│   ├── autocompleteEnabled.md
│   ├── context.md
│   ├── contributing-prs.md
│   ├── debugging-testing.md
│   ├── github-action.md
│   ├── index.md
│   ├── installation.md
│   ├── metrics_collection.md
│   └── usage.md
├── eslint.config.mjs
├── github-action/
│   ├── .asyncapi-tool
│   ├── Dockerfile
│   ├── Makefile
│   ├── README.md
│   ├── bump-test.sh
│   ├── entrypoint.sh
│   ├── lib/
│   │   └── bump-action-version.js
│   └── test/
│       ├── asyncapi.yml
│       ├── bundle/
│       │   ├── asyncapi.yaml
│       │   ├── features.yaml
│       │   └── messages.yaml
│       ├── dummy.yml
│       ├── specification-invalid.yml
│       ├── unoptimized.yml
│       └── unoptimized_optimized.yml
├── jest.config.ts
├── nodemon.json
├── openapi.yaml
├── package.json
├── scripts/
│   ├── enableAutoComplete.js
│   ├── fetch-asyncapi-example.js
│   ├── generateTypesForGenerateCommand.js
│   ├── releasePackagesRename.js
│   └── updateUsageDocs.js
├── src/
│   ├── apps/
│   │   ├── api/
│   │   │   ├── .do/
│   │   │   │   ├── app.yaml
│   │   │   │   └── apps/
│   │   │   │       ├── .gitignore
│   │   │   │       ├── .terraform.lock.hcl
│   │   │   │       └── main.tf
│   │   │   ├── Dockerfile
│   │   │   ├── README.md
│   │   │   ├── app.ts
│   │   │   ├── configs/
│   │   │   │   ├── development.json
│   │   │   │   ├── production.json
│   │   │   │   └── test.json
│   │   │   ├── constants.ts
│   │   │   ├── controllers/
│   │   │   │   ├── bundle.controller.ts
│   │   │   │   ├── convert.controller.ts
│   │   │   │   ├── diff.controller.ts
│   │   │   │   ├── docs.controller.ts
│   │   │   │   ├── generate.controller.ts
│   │   │   │   ├── help.controller.ts
│   │   │   │   ├── parse.controller.ts
│   │   │   │   ├── validate.controller.ts
│   │   │   │   └── version.controller.ts
│   │   │   ├── exceptions/
│   │   │   │   └── problem.exception.ts
│   │   │   ├── index.ts
│   │   │   ├── middlewares/
│   │   │   │   ├── logger.middleware.ts
│   │   │   │   ├── problem.middleware.ts
│   │   │   │   └── validation.middleware.ts
│   │   │   ├── server-api.d.ts
│   │   │   ├── server.ts
│   │   │   └── templates.json
│   │   └── cli/
│   │       ├── commands/
│   │       │   ├── bundle.ts
│   │       │   ├── config/
│   │       │   │   ├── analytics.ts
│   │       │   │   ├── auth/
│   │       │   │   │   └── add.ts
│   │       │   │   ├── context/
│   │       │   │   │   ├── add.ts
│   │       │   │   │   ├── current.ts
│   │       │   │   │   ├── edit.ts
│   │       │   │   │   ├── index.ts
│   │       │   │   │   ├── init.ts
│   │       │   │   │   ├── list.ts
│   │       │   │   │   ├── remove.ts
│   │       │   │   │   └── use.ts
│   │       │   │   ├── index.ts
│   │       │   │   └── versions.ts
│   │       │   ├── convert.ts
│   │       │   ├── diff.ts
│   │       │   ├── format.ts
│   │       │   ├── generate/
│   │       │   │   ├── client.ts
│   │       │   │   ├── fromTemplate.ts
│   │       │   │   ├── index.ts
│   │       │   │   └── models.ts
│   │       │   ├── new/
│   │       │   │   ├── file.ts
│   │       │   │   ├── index.ts
│   │       │   │   └── template.ts
│   │       │   ├── optimize.ts
│   │       │   ├── pretty.ts
│   │       │   ├── start/
│   │       │   │   ├── api.ts
│   │       │   │   ├── index.ts
│   │       │   │   ├── preview.ts
│   │       │   │   └── studio.ts
│   │       │   └── validate.ts
│   │       └── internal/
│   │           ├── args/
│   │           │   └── generate.args.ts
│   │           ├── base/
│   │           │   └── BaseGeneratorCommand.ts
│   │           ├── base.ts
│   │           ├── flags/
│   │           │   ├── bundle.flags.ts
│   │           │   ├── config/
│   │           │   │   ├── analytics.flags.ts
│   │           │   │   └── context.flags.ts
│   │           │   ├── convert.flags.ts
│   │           │   ├── diff.flags.ts
│   │           │   ├── format.flags.ts
│   │           │   ├── generate/
│   │           │   │   ├── clients.flags.ts
│   │           │   │   ├── fromTemplate.flags.ts
│   │           │   │   ├── models.flags.ts
│   │           │   │   └── sharedFlags.ts
│   │           │   ├── global.flags.ts
│   │           │   ├── new/
│   │           │   │   ├── file.flags.ts
│   │           │   │   └── template.flags.ts
│   │           │   ├── optimize.flags.ts
│   │           │   ├── parser.flags.ts
│   │           │   ├── pretty.flags.ts
│   │           │   ├── proxy.flags.ts
│   │           │   ├── start/
│   │           │   │   ├── api.flags.ts
│   │           │   │   ├── preview.flags.ts
│   │           │   │   └── studio.flags.ts
│   │           │   └── validate.flags.ts
│   │           ├── global.d.ts
│   │           ├── globals.ts
│   │           └── hooks/
│   │               └── command_not_found/
│   │                   └── myhook.ts
│   ├── domains/
│   │   ├── models/
│   │   │   ├── Context.ts
│   │   │   ├── Preview.ts
│   │   │   ├── SpecificationFile.ts
│   │   │   ├── Studio.ts
│   │   │   └── generate/
│   │   │       └── Flags.ts
│   │   └── services/
│   │       ├── archiver.service.ts
│   │       ├── base.service.ts
│   │       ├── config.service.ts
│   │       ├── convert.service.ts
│   │       ├── generator.service.ts
│   │       ├── module.d.ts
│   │       └── validation.service.ts
│   ├── errors/
│   │   ├── context-error.ts
│   │   ├── diff-error.ts
│   │   ├── generator-error.ts
│   │   ├── specification-file.ts
│   │   └── validation-error.ts
│   ├── index.ts
│   ├── interfaces/
│   │   └── index.ts
│   └── utils/
│       ├── ajv.ts
│       ├── app-openapi.ts
│       ├── error-handler.ts
│       ├── generate/
│       │   ├── flags.ts
│       │   ├── mapBaseUrl.ts
│       │   ├── parseParams.ts
│       │   ├── prompts.ts
│       │   ├── registry.ts
│       │   └── watcher.ts
│       ├── logger.ts
│       ├── proxy.ts
│       ├── retrieve-language.ts
│       ├── scoreCalculator.ts
│       ├── temp-dir.ts
│       └── validation.ts
├── test/
│   ├── fixtures/
│   │   ├── asyncapiTestingScore.yml
│   │   ├── asyncapiValid_v1.yml
│   │   ├── asyncapi_v1.yml
│   │   ├── asyncapi_v2.yml
│   │   ├── badFormatAsyncapi.json
│   │   ├── dummyspec/
│   │   │   ├── apiwithref.json
│   │   │   ├── dummySpec.yml
│   │   │   ├── dummySpecWithoutSecurity.yml
│   │   │   ├── shared.json
│   │   │   ├── unoptimizedSpec.json
│   │   │   └── unoptimizedSpec.yml
│   │   ├── external-refs/
│   │   │   ├── main.yaml
│   │   │   └── schemas.yaml
│   │   ├── generate-same-dir-ref/
│   │   │   ├── asyncapi.yaml
│   │   │   └── messages.yaml
│   │   ├── invalid-overrides.json
│   │   ├── minimaltemplate/
│   │   │   ├── hooks/
│   │   │   │   └── generateAsyncapiFile.js
│   │   │   ├── package.json
│   │   │   └── template/
│   │   │       └── index.js
│   │   ├── newtemplate/
│   │   │   ├── hooks/
│   │   │   │   └── generateAsyncapiFile.js
│   │   │   ├── package.json
│   │   │   └── template/
│   │   │       └── index.js
│   │   ├── openapi.yml
│   │   ├── overrides.json
│   │   ├── specification-avro.yml
│   │   ├── specification-invalid.yml
│   │   ├── specification-v3-diff.yml
│   │   ├── specification-v3.yml
│   │   ├── specification.json
│   │   ├── specification.yml
│   │   ├── valid-specification-latest.yml
│   │   └── valid-specification.yml
│   ├── helpers/
│   │   ├── index.ts
│   │   └── init.js
│   ├── hooks/
│   │   └── command_not_found/
│   │       └── myhook.spec.ts
│   ├── integration/
│   │   ├── bundle/
│   │   │   ├── bundle.test.ts
│   │   │   ├── channels.yaml
│   │   │   ├── feature.yaml
│   │   │   ├── final-asyncapi.yaml
│   │   │   ├── first-asyncapi.yaml
│   │   │   ├── first-asyncapiv3.yaml
│   │   │   └── messages.yaml
│   │   ├── config/
│   │   │   ├── analytics.test.ts
│   │   │   └── versions.test.ts
│   │   ├── context.test.ts
│   │   ├── convert.test.ts
│   │   ├── diff.test.ts
│   │   ├── format.test.ts
│   │   ├── generate/
│   │   │   ├── __snapshots__/
│   │   │   │   └── models.test.ts.snap
│   │   │   ├── client.test.ts
│   │   │   ├── fromTemplate.test.ts
│   │   │   └── models.test.ts
│   │   ├── new/
│   │   │   ├── file.test.ts
│   │   │   └── template.test.ts
│   │   ├── optimize.test.ts
│   │   ├── pretty.test.ts
│   │   ├── studio.test.ts
│   │   └── validate.test.ts
│   ├── jest.setup.ts
│   ├── system/
│   │   └── .gitkeep
│   ├── tsconfig.json
│   └── unit/
│       ├── controllers/
│       │   ├── convert.controller.test.ts
│       │   ├── diff.controller.test.ts
│       │   ├── parse.controller.test.ts
│       │   ├── setup.test.ts
│       │   └── validate.controller.test.ts
│       ├── services/
│       │   ├── archiver.service.test.ts
│       │   ├── convert.service.test.ts
│       │   └── validation.service.test.ts
│       └── utils/
│           ├── ajv.test.ts
│           ├── app-openapi.test.ts
│           ├── registry.test.ts
│           ├── retrieve-language.test.ts
│           └── temp-dir.test.ts
└── tsconfig.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .all-contributorsrc
================================================
{
  "files": [
    "README.md"
  ],
  "imageSize": 100,
  "commit": false,
  "contributors": [
    {
      "login": "jotamusik",
      "name": "Jorge Aguiar Martín",
      "avatar_url": "https://avatars.githubusercontent.com/u/14940638?v=4",
      "profile": "https://github.com/jotamusik",
      "contributions": [
        "code",
        "ideas",
        "test",
        "doc"
      ]
    },
    {
      "login": "derberg",
      "name": "Lukasz Gornicki",
      "avatar_url": "https://avatars.githubusercontent.com/u/6995927?v=4",
      "profile": "https://www.brainfart.dev/",
      "contributions": [
        "ideas",
        "code",
        "review",
        "maintenance"
      ]
    },
    {
      "login": "Souvikns",
      "name": "souvik",
      "avatar_url": "https://avatars.githubusercontent.com/u/41781438?v=4",
      "profile": "https://souvik.vercel.app/",
      "contributions": [
        "code",
        "ideas",
        "test",
        "review",
        "maintenance",
        "doc"
      ]
    },
    {
      "login": "boyney123",
      "name": "David Boyne",
      "avatar_url": "https://avatars.githubusercontent.com/u/3268013?v=4",
      "profile": "https://boyney.io/",
      "contributions": [
        "code",
        "ideas",
        "maintenance"
      ]
    },
    {
      "login": "fmvilas",
      "name": "Fran Méndez",
      "avatar_url": "https://avatars.githubusercontent.com/u/242119?v=4",
      "profile": "http://www.fmvilas.com/",
      "contributions": [
        "code",
        "ideas",
        "review"
      ]
    },
    {
      "login": "magicmatatjahu",
      "name": "Maciej Urbańczyk",
      "avatar_url": "https://avatars.githubusercontent.com/u/20404945?v=4",
      "profile": "https://github.com/magicmatatjahu",
      "contributions": [
        "review",
        "maintenance",
        "ideas"
      ]
    },
    {
      "login": "aayushmau5",
      "name": "Aayush Kumar Sahu",
      "avatar_url": "https://avatars.githubusercontent.com/u/54525741?v=4",
      "profile": "https://aayushsahu.com/",
      "contributions": [
        "code",
        "test"
      ]
    },
    {
      "login": "mihirterna",
      "name": "Mihir Kulkarni",
      "avatar_url": "https://avatars.githubusercontent.com/u/31316452?v=4",
      "profile": "https://github.com/mihirterna",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "imabp",
      "name": "Abir",
      "avatar_url": "https://avatars.githubusercontent.com/u/53480076?v=4",
      "profile": "https://imabp.github.io/resume/",
      "contributions": [
        "test",
        "code"
      ]
    },
    {
      "login": "peter-rr",
      "name": "Peter Ramos",
      "avatar_url": "https://avatars.githubusercontent.com/u/81691177?v=4",
      "profile": "https://github.com/peter-rr",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "Samridhi-98",
      "name": "Samriddhi",
      "avatar_url": "https://avatars.githubusercontent.com/u/54466041?v=4",
      "profile": "https://samridhi-98.github.io/Portfolio",
      "contributions": [
        "test"
      ]
    },
    {
      "login": "pranay202",
      "name": "Pranay Kharabe",
      "avatar_url": "https://avatars.githubusercontent.com/u/68046838?v=4",
      "profile": "https://linktr.ee/KharabePranay",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "activus-d",
      "name": "Damilola Oladele",
      "avatar_url": "https://avatars.githubusercontent.com/u/98895460?v=4",
      "profile": "https://d-m-oladele.netlify.app/",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "prayutsu",
      "name": "Abhay Garg",
      "avatar_url": "https://avatars.githubusercontent.com/u/54636525?v=4",
      "profile": "https://github.com/prayutsu",
      "contributions": [
        "code",
        "test"
      ]
    },
    {
      "login": "sambhavgupta0705",
      "name": "Sambhav Gupta",
      "avatar_url": "https://avatars.githubusercontent.com/u/81870866?v=4",
      "profile": "https://github.com/sambhavgupta0705",
      "contributions": [
        "code",
        "test"
      ]
    },
    {
      "login": "CyberHippo",
      "name": "Hippolyte Vergnol",
      "avatar_url": "https://avatars.githubusercontent.com/u/18269437?v=4",
      "profile": "https://github.com/CyberHippo",
      "contributions": [
        "code",
        "infra"
      ]
    },
    {
      "login": "Vetsoo",
      "name": "Jente Vets",
      "avatar_url": "https://avatars.githubusercontent.com/u/22449126?v=4",
      "profile": "https://www.jentevets.com",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "kaushik-rishi",
      "name": "Rishi",
      "avatar_url": "https://avatars.githubusercontent.com/u/52498617?v=4",
      "profile": "https://github.com/kaushik-rishi",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "Shurtu-gal",
      "name": "Ashish Padhy",
      "avatar_url": "https://avatars.githubusercontent.com/u/100484401?v=4",
      "profile": "http://ashishpadhy.live",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "meetagrawal09",
      "name": "Meet Agrawal",
      "avatar_url": "https://avatars.githubusercontent.com/u/73902874?v=4",
      "profile": "https://github.com/meetagrawal09",
      "contributions": [
        "infra"
      ]
    },
    {
      "login": "chinma-yyy",
      "name": "Chinmay Shewale",
      "avatar_url": "https://avatars.githubusercontent.com/u/112387862?v=4",
      "profile": "https://www.chinmayyy.tech",
      "contributions": [
        "code",
        "test"
      ]
    },
    {
      "login": "mhmohona",
      "name": "Mahfuza Humayra Mohona",
      "avatar_url": "https://avatars.githubusercontent.com/u/14244685?v=4",
      "profile": "https://github.com/mhmohona",
      "contributions": [
        "doc"
      ]
    },
    {
      "login": "GreenRover",
      "name": "Heiko Henning",
      "avatar_url": "https://avatars.githubusercontent.com/u/512850?v=4",
      "profile": "https://github.com/GreenRover",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "AayushSaini101",
      "name": "Zack_Aayush",
      "avatar_url": "https://avatars.githubusercontent.com/u/60972989?v=4",
      "profile": "https://www.linkedin.com/in/aayush-saini-0a25931b1/",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "ayushnau",
      "name": "Ayush Nautiyal",
      "avatar_url": "https://avatars.githubusercontent.com/u/78146753?v=4",
      "profile": "https://github.com/ayushnau",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "Anish Kacham",
      "name": "AnishKacham",
      "avatar_url": "https://avatars.githubusercontent.com/u/79566582?v=4",
      "profile": "https://github.com/AnishKacham",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "aeworxet",
      "name": "Viacheslav Turovskyi",
      "avatar_url": "https://avatars.githubusercontent.com/u/16149591?v=4",
      "profile": "https://github.com/aeworxet",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "amanbedi1",
      "name": "Amanpreet Singh Bedi ",
      "avatar_url": "https://avatars.githubusercontent.com/u/82234871?v=4",
      "profile": "https://github.com/amanbedi1",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "ron-debajyoti",
      "name": "Debajyoti Halder",
      "avatar_url": "https://avatars.githubusercontent.com/u/22571664?v=4",
      "profile": "https://github.com/ron-debajyoti",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "Savio629",
      "name": "Savio Dias",
      "avatar_url": "https://avatars.githubusercontent.com/u/91362589?v=4",
      "profile": "https://github.com/Savio629",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "jonaslagoni",
      "name": "Jonas Lagoni",
      "avatar_url": "https://avatars.githubusercontent.com/u/13396189?v=4",
      "profile": "https://github.com/jonaslagoni",
      "contributions": [
        "code",
        "ideas",
        "review",
        "test"
      ]
    },
    {
      "login": "KhudaDad414",
      "name": "Khuda Dad Nomani",
      "avatar_url": "https://avatars.githubusercontent.com/u/32505158?v=4",
      "profile": "https://github.com/KhudaDad414",
      "contributions": [
        "code",
        "doc"
      ]
    },
    {
      "login": "smoya",
      "name": "Sergio Moya ",
      "avatar_url": "https://avatars.githubusercontent.com/u/1083296?v=4",
      "profile": "https://github.com/smoya",
      "contributions": [
        "code"
      ]
    },
    {
      "login": "Vishal2002",
      "name": "Vishal Sharma",
      "avatar_url": "https://avatars.githubusercontent.com/u/35897449?v=4",
      "profile": "https://github.com/Vishal2002",
      "contributions": [
        "code"
      ]
    }
  ],
  "contributorsPerLine": 7,
  "projectName": "cli",
  "projectOwner": "asyncapi",
  "repoType": "github",
  "repoHost": "https://github.com",
  "skipCi": false,
  "commitConvention": "angular",
  "commitType": "docs"
}


================================================
FILE: .asyncapi-tool
================================================
title: AsyncAPI CLI
description: |
    One CLI to rule them all. 
    This is a CLI that aims to integrate all AsyncAPI tools that you need while AsyncAPI document development and maintainance. 
    You can use it to generate docs or code, validate AsyncAPI document and event create new documents.
links:
    websiteUrl: https://www.asyncapi.com/tools/cli
filters:
    technology:
        - TypeScript
    categories:
        - others
        - cli
    hasCommercial: false

================================================
FILE: .changeset/config.json
================================================
{
  "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
  "changelog": ["@changesets/changelog-git", { "repo": "asyncapi/cli" }],
  "commit": false,
  "fixed": [],
  "linked": [],
  "access": "public",
  "baseBranch": "master",
  "updateInternalDependencies": "patch",
  "privatePackages": {
    "version": true,
    "tag": true
  }
}


================================================
FILE: .dockerignore
================================================
node_modules
npm-debug.log
Dockerfile
.dockerignore
.git


================================================
FILE: .editorconfig
================================================
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false


================================================
FILE: .gitattributes
================================================
* text=auto eol=lf


================================================
FILE: .github/workflows/add-good-first-issue-labels.yml
================================================
# This workflow is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# Purpose of this workflow is to enable anyone to label issue with 'Good First Issue' and 'area/*' with a single command.
name: Add 'Good First Issue' and 'area/*' labels # if proper comment added

on:
  issue_comment:
    types:
      - created

permissions: {}

jobs:
  add-labels:
    name: Add 'Good First Issue' and 'area/*' labels
    if: ${{(!github.event.issue.pull_request && github.event.issue.state != 'closed' && github.actor != 'asyncapi-bot') && (contains(github.event.comment.body, '/good-first-issue') || contains(github.event.comment.body, '/gfi' ))}}
    runs-on: ubuntu-latest
    permissions:
      issues: write    # This is needed to add labels to issues.
    steps:
      - name: Add label
        uses: actions/github-script@v7
        with:
          github-token: ${{ github.token }}
          script: |
            const areas = ['javascript', 'typescript', 'java' , 'go', 'docs', 'ci-cd', 'design'];
            const words = context.payload.comment.body.trim().split(" ");
            const areaIndex = words.findIndex((word)=> word === '/gfi' || word === '/good-first-issue') + 1
            let area = words[areaIndex];
            switch(area){
              case 'ts':
                area = 'typescript';
                break;
              case 'js':
                area = 'javascript';
                break;
              case 'markdown':
                area = 'docs';
                break;
            }
            if(!areas.includes(area)){
              const message = `Hey @${context.payload.sender.login}, your message doesn't follow the requirements, you can try \`/help\`.`

              await github.rest.issues.createComment({
                issue_number: context.issue.number,
                owner: context.repo.owner,
                repo: context.repo.repo,
                body: message
              })
            } else {

              // remove area if there is any before adding new labels.
              const currentLabels = (await github.rest.issues.listLabelsOnIssue({
                issue_number: context.issue.number,
                owner: context.repo.owner,
                repo: context.repo.repo,
              })).data.map(label => label.name);

              const shouldBeRemoved = currentLabels.filter(label => (label.startsWith('area/') && !label.endsWith(area)));
              shouldBeRemoved.forEach(label => {
                github.rest.issues.deleteLabel({
                  owner: context.repo.owner,
                  repo: context.repo.repo,
                  name: label,
                });
              });

               // Add new labels.
              github.rest.issues.addLabels({
                issue_number: context.issue.number,
                owner: context.repo.owner,
                repo: context.repo.repo,
                labels: ['good first issue', `area/${area}`]
              });
            }


================================================
FILE: .github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml
================================================
# This workflow is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# Purpose of this workflow is to enable anyone to label PR with the following labels:
# `ready-to-merge` and `do-not-merge` labels to get stuff merged or blocked from merging
# `autoupdate` to keep a branch up-to-date with the target branch

name: Label PRs # if proper comment added

on:
  issue_comment:
    types:
      - created

permissions: {}

jobs:
  add-ready-to-merge-label:
    name: Add ready-to-merge label
    permissions:
      issues: write # required to add labels and post comments on PR issues
      pull-requests: write # required to read PR metadata from the issue pull_request URL
      contents: read # required to compare PR branch commits against base
    if: >
      github.event.issue.pull_request && 
      github.event.issue.state != 'closed' && 
      github.actor != 'asyncapi-bot' && 
      (
        contains(github.event.comment.body, '/ready-to-merge') || 
        contains(github.event.comment.body, '/rtm' )
      )

    runs-on: ubuntu-latest
    steps:
      - name: Add ready-to-merge label
        uses: actions/github-script@v7
        env:
          GITHUB_ACTOR: ${{ github.actor }}
        with:
          github-token: ${{ github.token }}
          script: |
            const prDetailsUrl = context.payload.issue.pull_request.url;
            const { data: pull } = await github.request(prDetailsUrl);
            const { draft: isDraft} = pull;
            if(!isDraft) {
              console.log('adding ready-to-merge label...');
              github.rest.issues.addLabels({
                issue_number: context.issue.number,
                owner: context.repo.owner,
                repo: context.repo.repo,
                labels: ['ready-to-merge']
              })  
            }

            const { data: comparison } =
            await github.rest.repos.compareCommitsWithBasehead({
              owner: pull.head.repo.owner.login,
              repo: pull.head.repo.name,
              basehead: `${pull.base.label}...${pull.head.label}`,
            });
            if (comparison.behind_by !== 0 && pull.mergeable_state === 'behind') {
              console.log(`This branch is behind the target by ${comparison.behind_by} commits`)
              console.log('adding out-of-date comment...');
              github.rest.issues.createComment({
                issue_number: context.issue.number,
                owner: context.repo.owner,
                repo: context.repo.repo,
                body: `Hello, @${process.env.GITHUB_ACTOR}! 👋🏼
                       This PR is not up to date with the base branch and can't be merged.
                       Please update your branch manually with the latest version of the base branch.
                       PRO-TIP: To request an update from the upstream branch, simply comment \`/u\` or \`/update\` and our bot will handle the update operation promptly.
                       
                       The only requirement for this to work is to enable [Allow edits from maintainers](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) option in your PR. Also the update will not work if your fork is located in an organization, not under your personal profile.
                       Thanks 😄`
              })
            }

  add-do-not-merge-label:
    name: Add do-not-merge label
    permissions:
      issues: write # required to add labels on PR issues
      pull-requests: write # required to read PR metadata from the issue pull_request URL
    if: >
      github.event.issue.pull_request &&
      github.event.issue.state != 'closed' &&
      github.actor != 'asyncapi-bot' &&
      (
        contains(github.event.comment.body, '/do-not-merge') ||
        contains(github.event.comment.body, '/dnm' )
      )
    runs-on: ubuntu-latest
    steps:
      - name: Add do-not-merge label
        uses: actions/github-script@v7
        with:
          github-token: ${{ github.token }}
          script: |
            github.rest.issues.addLabels({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              labels: ['do-not-merge']
            })
  add-autoupdate-label:
    name: Add autoupdate label
    permissions:
      issues: write # required to add labels on PR issues
      pull-requests: write # required to read PR metadata from the issue pull_request URL
    if: >
      github.event.issue.pull_request && 
      github.event.issue.state != 'closed' && 
      github.actor != 'asyncapi-bot' &&
      (
        contains(github.event.comment.body, '/autoupdate') ||
        contains(github.event.comment.body, '/au' )
      )
    runs-on: ubuntu-latest
    steps:
      - name: Add autoupdate label
        uses: actions/github-script@v7
        with:
          github-token: ${{ github.token }}
          script: |
            github.rest.issues.addLabels({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              labels: ['autoupdate']
            })


================================================
FILE: .github/workflows/automerge-for-humans-merging.yml
================================================
# This workflow is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# Purpose of this workflow is to allow people to merge PR without a need of maintainer doing it. If all checks are in place (including maintainers approval) - JUST MERGE IT!
name: Automerge For Humans

on:
  pull_request_target:
    types:
      - labeled
      - unlabeled
      - synchronize
      - opened
      - edited
      - ready_for_review
      - reopened
      - unlocked                              # zizmor: ignore[dangerous-triggers] needed if we want author to be our bot

permissions: {}

jobs:
  automerge-for-humans:
    name: Automerge PRs labeled with ready-to-merge
    permissions:
      contents: read # required for PR commit metadata reads
      pull-requests: read # required to read pull request details in github-script steps
    # it runs only if PR actor is not a bot, at least not a bot that we know
    if: |
      github.event.pull_request.draft == false && 
      !contains(fromJSON('["asyncapi-bot","dependabot[bot]","dependabot-preview[bot]"]'), github.event.pull_request.user.login)
    runs-on: ubuntu-latest
    steps:
      - name: Get PR authors
        id: authors
        uses: actions/github-script@v7
        with:
          script: |
            // Get paginated list of all commits in the PR
            try {
              const commitOpts = github.rest.pulls.listCommits.endpoint.merge({
                owner: context.repo.owner,
                repo: context.repo.repo,
                pull_number: context.issue.number
              });

              const commits = await github.paginate(commitOpts);

              if (commits.length === 0) {
                core.setFailed('No commits found in the PR');
                return '';
              }

              // Get unique authors from the commits list
              const authors = commits.reduce((acc, commit) => {
                const username = commit.author?.login || commit.commit.author?.name;
                if (username && !acc[username]) {
                  acc[username] = {
                    name: commit.commit.author?.name,
                    email: commit.commit.author?.email,
                  }
                }

                return acc;
              }, {});

              return authors;
            } catch (error) {
              core.setFailed(error.message);
              return [];
            }

      - name: Create commit message
        id: create-commit-message
        uses: actions/github-script@v7
        env:
          AUTHORS_JSON: ${{ steps.authors.outputs.result }}
        with:
          script: |
            const authors = JSON.parse(process.env.AUTHORS_JSON);

            if (Object.keys(authors).length === 0) {
              core.setFailed('No authors found in the PR');
              return '';
            }

            // Create a string of the form "Co-authored-by: Name <email>"
            // ref: https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors
            const coAuthors = Object.values(authors).map(author => {
              return `Co-authored-by: ${author.name} <${author.email}>`;
            }).join('\n');

            core.debug(coAuthors);;

            return coAuthors;

      - name: Automerge PR
        uses: pascalgn/automerge-action@22948e0bc22f0aa673800da838595a3e7347e584 #v0.15.6 https://github.com/pascalgn/automerge-action/releases/tag/v0.15.6
        env:
          GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"
          MERGE_LABELS: "!do-not-merge,ready-to-merge"
          MERGE_METHOD: "squash"
          # Using the output of the previous step (`Co-authored-by: ...` lines) as commit description.
          # Important to keep 2 empty lines as https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors#creating-co-authored-commits-on-the-command-line mentions
          MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})\n\n\n${{ fromJSON(steps.create-commit-message.outputs.result) }}"
          MERGE_RETRIES: "20"
          MERGE_RETRY_SLEEP: "30000"


================================================
FILE: .github/workflows/automerge-for-humans-remove-ready-to-merge-label-on-edit.yml
================================================
# This workflow is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# Defence from evil contributor that after adding `ready-to-merge` all suddenly makes evil commit or evil change in PR title
# Label is removed once above action is detected
name: Remove ready-to-merge label

on:
  pull_request:
    types:
      - synchronize
      - edited

permissions: {}

jobs:
  remove-ready-label:
    name: Remove ready-to-merge label
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write # required to remove labels and post comments on PR issues 
    steps:
      - name: Remove label
        uses: actions/github-script@v7
        with:
          github-token: ${{ github.token }}
          script: |
            const labelToRemove = 'ready-to-merge';
            const labels = context.payload.pull_request.labels;
            const isLabelPresent = labels.some(label => label.name === labelToRemove)
            if(!isLabelPresent) return;
            github.rest.issues.removeLabel({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              name: labelToRemove
            })


================================================
FILE: .github/workflows/automerge-orphans.yml
================================================
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

name: 'Notify on failing automerge'

on:
  schedule:
  - cron: "0 0 * * *"

permissions: {}

jobs:
  identify-orphans:
    if: startsWith(github.repository, 'asyncapi/')
    name: Find orphans and notify
    permissions:
      contents: read # required by checkout and repository metadata reads
      pull-requests: read # required to list open pull requests
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Get list of orphans
        uses: actions/github-script@v7
        id: orphans
        with:
          github-token: ${{ github.token }}
          script: |
            const query = `query($owner:String!, $name:String!) {
              repository(owner:$owner, name:$name){
                pullRequests(first: 100, states: OPEN){
                  nodes{
                    title
                    url
                    author {
                      resourcePath
                    }
                  }
                }
              }
            }`;
            const variables = {
              owner: context.repo.owner,
              name: context.repo.repo
            };
            const { repository: { pullRequests: { nodes } } } = await github.graphql(query, variables);

            let orphans = nodes.filter( (pr) => pr.author.resourcePath === '/asyncapi-bot' || pr.author.resourcePath === '/apps/dependabot')

            if (orphans.length) {
              core.setOutput('found', 'true');
              //Yes, this is very naive approach to assume there is just one PR causing issues, there can be a case that more PRs are affected the same day
              //The thing is that handling multiple PRs will increase a complexity in this PR that in my opinion we should avoid
              //The other PRs will be reported the next day the action runs, or person that checks first url will notice the other ones
              core.setOutput('url', orphans[0].url);
              core.setOutput('title', orphans[0].title);
            }
      - if: steps.orphans.outputs.found == 'true'
        name: Convert markdown to slack markdown
        # This workflow is from our own org repo and safe to reference by 'master'.
        uses: asyncapi/.github/.github/actions/slackify-markdown@master # //NOSONAR
        id: issuemarkdown
        with:
          markdown: "-> [${{steps.orphans.outputs.title}}](${{steps.orphans.outputs.url}})"
      - if: steps.orphans.outputs.found == 'true'
        name: Send info about orphan to slack
        uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
        env:
          SLACK_WEBHOOK: ${{secrets.SLACK_CI_FAIL_NOTIFY}}
          SLACK_TITLE: 🚨 Not merged PR that should be automerged 🚨
          SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}}
          MSG_MINIMAL: true

================================================
FILE: .github/workflows/automerge.yml
================================================
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo.

name: Automerge PRs from bots

on:
  pull_request_target:          # Needed as GH_TOKEN_BOT_EVE needed for approval.
    types:
      - opened
      - synchronize             # zizmor: ignore[dangerous-triggers]

permissions: {}

jobs:
  autoapprove-for-bot:
    name: Autoapprove PR comming from a bot
    if: >
      contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]"]'), github.event.pull_request.user.login) &&
      contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]"]'), github.actor) &&
      !contains(github.event.pull_request.labels.*.name, 'released')
    runs-on: ubuntu-latest
    steps:
      - name: Autoapproving
        uses: hmarr/auto-approve-action@44888193675f29a83e04faf4002fa8c0b537b1e4   # v3.2.1 is used https://github.com/hmarr/auto-approve-action/releases/tag/v3.2.1
        with:
          github-token: "${{ secrets.GH_TOKEN_BOT_EVE }}"

      - name: Label autoapproved
        uses: actions/github-script@v7
        with:
          github-token: ${{ secrets.GH_TOKEN }}
          script: |
            github.rest.issues.addLabels({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              labels: ['autoapproved', 'autoupdate']
            })

  automerge-for-bot:
    name: Automerge PR autoapproved by a bot
    needs: [autoapprove-for-bot]
    runs-on: ubuntu-latest
    steps:
      - name: Automerging
        uses: pascalgn/automerge-action@22948e0bc22f0aa673800da838595a3e7347e584 #v0.15.6 https://github.com/pascalgn/automerge-action/releases/tag/v0.15.6
        env:
          GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"
          GITHUB_LOGIN: asyncapi-bot
          MERGE_LABELS: "!do-not-merge"
          MERGE_METHOD: "squash"
          MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})"
          MERGE_RETRIES: "20"
          MERGE_RETRY_SLEEP: "30000"


================================================
FILE: .github/workflows/autoupdate.yml
================================================
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# This workflow is designed to work with:
# - autoapprove and automerge workflows for dependabot and asyncapibot.
# - special release branches that we from time to time create in upstream repos. If we open up PRs for them from the very beginning of the release, the release branch will constantly update with new things from the destination branch they are opened against

# It uses GitHub Action that auto-updates pull requests branches, whenever changes are pushed to their destination branch.
# Autoupdating to latest destination branch works only in the context of upstream repo and not forks

name: autoupdate

on:
  push:
    branches-ignore:  
      - 'version-bump/**'
      - 'dependabot/**'
      - 'bot/**'
      - 'all-contributors/**'

permissions: {}

jobs:
  autoupdate-for-bot:
    if: startsWith(github.repository, 'asyncapi/')
    name: Autoupdate autoapproved PR created in the upstream
    runs-on: ubuntu-latest
    steps:
      - name: Autoupdating
        uses: chinthakagodawita/autoupdate@0707656cd062a3b0cf8fa9b2cda1d1404d74437e
        env:
          GITHUB_TOKEN: '${{ secrets.GH_TOKEN_BOT_EVE }}'
          PR_FILTER: "labelled"
          PR_LABELS: "autoupdate"
          PR_READY_STATE: "ready_for_review"
          MERGE_CONFLICT_ACTION: "ignore"


================================================
FILE: .github/workflows/bounty-program-commands.yml
================================================
# This workflow is centrally managed at https://github.com/asyncapi/.github/
# Don't make changes to this file in this repository, as they will be overwritten with
# changes made to the same file in the abovementioned repository.

# The purpose of this workflow is to allow Bounty Team members
# (https://github.com/orgs/asyncapi/teams/bounty_team) to issue commands to the
# organization's global AsyncAPI bot related to the Bounty Program, while at the
# same time preventing unauthorized users from misusing them.

name: Bounty Program commands

on:
  issue_comment:
    types:
      - created

env:
  BOUNTY_PROGRAM_LABELS_JSON: |
    [
      {"name": "bounty", "color": "0e8a16", "description": "Participation in the Bounty Program"}
    ]

permissions: {}

jobs:
  guard-against-unauthorized-use:
    name: Guard against unauthorized use
    permissions:
      issues: write # required to post a comment on the issue/PR
      pull-requests: write # required to post a comment on the issue/PR if it's a PR
    if: >
      !contains(fromJSON('["aeworxet","thulieblack"]'), github.actor) &&
      (
        startsWith(github.event.comment.body, '/bounty' )
      )

    runs-on: ubuntu-latest

    steps:
      - name: ❌ @${{github.actor}} made an unauthorized attempt to use a Bounty Program's command
        uses: actions/github-script@v7
        env:
          ACTOR: ${{ github.actor }}
        with:
          github-token: ${{ github.token }}
          script: |
            const commentText = `❌ @${process.env.ACTOR} is not authorized to use the Bounty Program's commands.
            These commands can only be used by members of the [Bounty Team](https://github.com/orgs/asyncapi/teams/bounty_team).`;

            console.log(`❌ @${process.env.ACTOR} made an unauthorized attempt to use a Bounty Program's command.`);
            github.rest.issues.createComment({
                issue_number: context.issue.number,
                owner: context.repo.owner,
                repo: context.repo.repo,
                body: commentText
              })

  add-label-bounty:
    name: Add bounty label
    permissions:
      issues: write # required to read/create labels and add labels on the issue/PR
      pull-requests: write #  required to read/create labels and add labels on the issue/PR
    if: >
      contains(fromJSON('["aeworxet","thulieblack"]'), github.actor) &&
      (
        startsWith(github.event.comment.body, '/bounty' )
      )

    runs-on: ubuntu-latest
    steps:
      - name: Add label `bounty`
        uses: actions/github-script@v7
        with:
          github-token: ${{ github.token }}
          script: |
            const BOUNTY_PROGRAM_LABELS = JSON.parse(process.env.BOUNTY_PROGRAM_LABELS_JSON);
            let LIST_OF_LABELS_FOR_REPO = await github.rest.issues.listLabelsForRepo({
                owner: context.repo.owner,
                repo: context.repo.repo,
                });
                
            LIST_OF_LABELS_FOR_REPO = LIST_OF_LABELS_FOR_REPO.data.map(key => key.name);

            if (!LIST_OF_LABELS_FOR_REPO.includes(BOUNTY_PROGRAM_LABELS[0].name)) {
              await github.rest.issues.createLabel({
                owner: context.repo.owner,
                repo: context.repo.repo,
                name: BOUNTY_PROGRAM_LABELS[0].name,
                color: BOUNTY_PROGRAM_LABELS[0].color,
                description: BOUNTY_PROGRAM_LABELS[0].description
              });
            }

            console.log('Adding label `bounty`...');
            github.rest.issues.addLabels({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              labels: [BOUNTY_PROGRAM_LABELS[0].name]
            })

  remove-label-bounty:
    name: Remove bounty label
    permissions:
      issues: write # required to read/remove labels on the issue/PR
      pull-requests: write # required to read/remove labels on the issue/PR if it's a PR
    if: >
      contains(fromJSON('["aeworxet","thulieblack"]'), github.actor) &&
      (
        startsWith(github.event.comment.body, '/unbounty' )
      )
    runs-on: ubuntu-latest
    steps:
      - name: Remove label `bounty`
        uses: actions/github-script@v7
        with:
          github-token: ${{ github.token }}
          script: |
            const BOUNTY_PROGRAM_LABELS = JSON.parse(process.env.BOUNTY_PROGRAM_LABELS_JSON);
            let LIST_OF_LABELS_FOR_ISSUE = await github.rest.issues.listLabelsOnIssue({
                owner: context.repo.owner,
                repo: context.repo.repo,
                issue_number: context.issue.number,
                });

            LIST_OF_LABELS_FOR_ISSUE = LIST_OF_LABELS_FOR_ISSUE.data.map(key => key.name);

            if (LIST_OF_LABELS_FOR_ISSUE.includes(BOUNTY_PROGRAM_LABELS[0].name)) {
              console.log('Removing label `bounty`...');
              github.rest.issues.removeLabel({
                issue_number: context.issue.number,
                owner: context.repo.owner,
                repo: context.repo.repo,
                name: [BOUNTY_PROGRAM_LABELS[0].name]
              })
            }


================================================
FILE: .github/workflows/bump-homebrew-formula.yml
================================================
name: Bump Homebrew formula for CLI

on:
  # Since now release depends on schedule, might be that there is a situation we cannot wait for schedule and trigger release manually
  workflow_dispatch:
  # We cannot run brew release continusly every time we release something as sometimes we release a couple of times a day and overload brew pipelines
  # More details https://github.com/asyncapi/cli/issues/503
  schedule:
    - cron: "0 23 * * *"

jobs:
  bump-formula-in-homebrew:
    if: github.repository == 'asyncapi/cli'
    name: Bump the formula in homebrew-core repo
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v4
      - name: Get version from package.json
        id: extractver
        run: |
          VERSION=$(npm run get-version --silent)
          echo "version=$VERSION" >> $GITHUB_OUTPUT
      - uses: mislav/bump-homebrew-formula-action@9d4d820e1d00b99927bd36e67d41fff1cfc8bd07 # v2
        with:
          # A PR will be sent to github.com/Homebrew/homebrew-core to update AsyncAPI CLI formula:
          formula-name: asyncapi
          # https://github.com/mislav/bump-homebrew-formula-action/issues/58
          formula-path: Formula/a/asyncapi.rb
          tag-name: ${{ steps.extractver.outputs.version }}
          download-url: https://registry.npmjs.org/@asyncapi/cli/-/cli-${{ steps.extractver.outputs.version }}.tgz #we need to point to npm not github as there is a dist that is not on github
        env:
          COMMITTER_TOKEN: ${{ secrets.GH_TOKEN_BOT_EVE }}
      - if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
        name: Report workflow run status to Slack
        uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 # v3.15.1
        with:
          status: ${{ job.status }}
          fields: repo,action,workflow
          text: 'AsyncAPI CLI release to BREW failed'
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}

================================================
FILE: .github/workflows/bump.yml
================================================
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# Purpose of this action is to update npm package in libraries that use it. It is like dependabot for asyncapi npm modules only. 
# It runs in a repo after merge of release commit and searches for other packages that use released package. Every found package gets updated with lates version

name: Bump package version in dependent repos - if Node project

on:
  # It cannot run on release event as when release is created then version is not yet bumped in package.json
  # This means we cannot extract easily latest version and have a risk that package is not yet on npm
  push:
    branches:
      - master

jobs:
  bump-in-dependent-projects:
    name: Bump this package in repositories that depend on it
    if: startsWith(github.event.commits[0].message, 'chore(release):')
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v3
      - name: Check if Node.js project and has package.json
        id: packagejson
        run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT
      - if: steps.packagejson.outputs.exists == 'true'
        name: Bumping latest version of this package in other repositories
        uses: derberg/npm-dependency-manager-for-your-github-org@1eafd3bf3974f21d395c1abac855cb04b295d570 # using v6.-.- https://github.com/derberg/npm-dependency-manager-for-your-github-org/releases/tag/v6
        with:
          github_token: ${{ secrets.GH_TOKEN }}
          committer_username: asyncapi-bot
          committer_email: info@asyncapi.io
          repos_to_ignore: spec,bindings,saunter,server-api
          custom_id: "dependency update from asyncapi bot"


================================================
FILE: .github/workflows/deploy/chocolatey/asyncapi-cli.nuspec
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
  <metadata>
    <id>asyncapi</id>
    <version>{{version}}</version>
    <packageSourceUrl>https://github.com/asyncapi/cli/releases/v{{version}}</packageSourceUrl>
    <owners>AsyncAPI_Initiative</owners>

    <!-- == SOFTWARE SPECIFIC SECTION == -->
    <!-- This section is about the software itself -->
    <title>asyncapi-cli</title>
    <authors>AsyncAPI_Initiative</authors>
    <projectUrl>https://www.asyncapi.com/</projectUrl>
    <iconUrl>https://avatars.githubusercontent.com/u/16401334?s=200</iconUrl>
    <copyright>2023 AsyncAPI Initiative</copyright>
    <licenseUrl>https://github.com/asyncapi/cli/blob/master/LICENSE</licenseUrl>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <releaseNotes>https://github.com/asyncapi/cli/releases/v{{version}}</releaseNotes>
    <projectSourceUrl>https://github.com/asyncapi/cli</projectSourceUrl>
    <docsUrl>https://www.asyncapi.com/docs/tools/cli</docsUrl>
    <bugTrackerUrl>https://github.com/asyncapi/cli/issues/new/choose</bugTrackerUrl>
    <tags>asyncapi-cli cli nodejs api asyncapi</tags>
    <summary>CLI to work with your AsyncAPI files. You can validate them and in the future use a generator and even bootstrap a new file. Contributions are welcomed!</summary>
    <description>CLI to work with your AsyncAPI files. You can validate them and in the future use a generator and even bootstrap a new file. Contributions are welcomed!</description>
  </metadata>
  <files>
    <!-- this section controls what actually gets packaged into the Chocolatey package -->
    <file src="tools\**" target="tools" />
  </files>
</package>


================================================
FILE: .github/workflows/deploy/chocolatey/replace.ps1
================================================
param (
  [Parameter(Mandatory=$true)]
  [string]$version,
  [string]$checksum,
  [string]$checksum64
)

$filePaths = @(
  './tools/chocolateyinstall.ps1'
  './asyncapi-cli.nuspec'
)

foreach ($filePath in $filePaths) {
  $fileContents = Get-Content $filePath
  $fileContents = $fileContents -replace '{{version}}', $version
  $fileContents = $fileContents -replace '{{checksum}}', $checksum
  $fileContents = $fileContents -replace '{{checksum64}}', $checksum64
  Set-Content $filePath $fileContents
}

================================================
FILE: .github/workflows/deploy/chocolatey/tools/chocolateyinstall.ps1
================================================
$ErrorActionPreference = 'Stop' # stop on all errors
$toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"

$url          = 'https://github.com/asyncapi/cli/releases/download/v{{version}}/asyncapi.x86.exe'
$url64        = 'https://github.com/asyncapi/cli/releases/download/v{{version}}/asyncapi.x64.exe' 

$packageArgs = @{
  packageName   = $env:ChocolateyPackageName
  unzipLocation = $toolsDir
  fileType      = 'EXE' 
  url           = $url
  url64bit      = $url64
  #file         = $fileLocation NOTE: Commented out because we are using url instead

  softwareName  = 'asyncapi-cli*'

  checksum      = '{{checksum}}'
  checksumType  = 'sha256' #default is md5, can also be sha1, sha256 or sha512
  checksum64    = '{{checksum64}}'
  checksumType64= 'sha256' #default is checksumType

  validExitCodes= @(0, 3010, 1641)
  silentArgs   = '/S'           # NSIS
}

Install-ChocolateyPackage @packageArgs # https://docs.chocolatey.org/en-us/create/functions/install-chocolateypackage


================================================
FILE: .github/workflows/help-command.yml
================================================
# This workflow is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

name: Create help comment

on: 
  issue_comment:
    types: 
      - created

permissions: {}

jobs:
  create_help_comment_pr:
    name: Help Comment in PR
    if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }}
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write                # To comment on Pull requests
    steps:
      - name: Add comment to PR
        uses: actions/github-script@v7
        env:
          ACTOR: ${{ github.actor }}
        with:
          github-token: ${{ github.token }}
          script: |
            //Yes to add comment to PR the same endpoint is use that we use to create a comment in issue
            //For more details http://developer.github.com/v3/issues/comments/
            //Also proved by this action https://github.com/actions-ecosystem/action-create-comment/blob/main/src/main.ts
            github.rest.issues.createComment({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              body: `Hello, @${process.env.ACTOR}! 👋🏼 

                    I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand!
        
                    At the moment the following comments are supported in pull requests:
        
                    - \`/please-take-a-look\` or \`/ptal\` - This comment will add a comment to the PR asking for attention from the reviewrs who have not reviewed the PR yet.
                    - \`/ready-to-merge\` or \`/rtm\` - This comment will trigger automerge of PR in case all required checks are green, approvals in place and do-not-merge label is not added
                    - \`/do-not-merge\` or \`/dnm\` - This comment will block automerging even if all conditions are met and ready-to-merge label is added
                    - \`/autoupdate\` or \`/au\` - This comment will add \`autoupdate\` label to the PR and keeps your PR up-to-date to the target branch's future changes. Unless there is a merge conflict or it is a draft PR. (Currently only works for upstream branches.)
                    - \`/update\` or \`/u\` - This comment will update the PR with the latest changes from the target branch. Unless there is a merge conflict or it is a draft PR. NOTE: this only updates the PR once, so if you need to update again, you need to call the command again.`
            })

  create_help_comment_issue:
    name: Help Comment in Issue
    if: ${{ !github.event.issue.pull_request && startsWith(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot' }}
    runs-on: ubuntu-latest
    permissions:
      issues: write                       # To comment on Issues
    steps:
      - name: Add comment to Issue
        uses: actions/github-script@v7
        env:
          ACTOR: ${{ github.actor }}
        with:
          github-token: ${{ github.token }}
          script: |
            github.rest.issues.createComment({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              body: `Hello, @${process.env.ACTOR}! 👋🏼 

              I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand!
  
              At the moment the following comments are supported in issues:
  
              - \`/good-first-issue {js | ts | java | go | docs | design | ci-cd}\` or \`/gfi {js | ts | java | go | docs | design | ci-cd}\` - label an issue as a \`good first issue\`.
              example: \`/gfi js\` or \`/good-first-issue ci-cd\`
              - \`/transfer-issue {repo-name}\` or \`/ti {repo-name}\` - transfer issue from the source repository to the other repository passed by the user. example: \`/ti cli\` or \`/transfer-issue cli\`.`
            })

================================================
FILE: .github/workflows/if-docker-pr-testing.yml
================================================
#This action is centrally managed in https://github.com/asyncapi/.github/
#Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo
#It does magic only if there is a Dockerfile in the root of the project
name: PR testing - if Docker

on:
  pull_request:
    types: [opened, reopened, synchronize, ready_for_review]

env:
  IMAGE_NAME: ${{ github.repository }}

permissions:
  contents: read

jobs:
  test-docker-pr:
    name: Test Docker build
    runs-on: ubuntu-latest

    steps:
      - if: >
          !github.event.pull_request.draft && !(
            (github.event.pull_request.user.login == 'asyncapi-bot' && (
              startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') || 
              startsWith(github.event.pull_request.title, 'chore(release):')
            )) ||
            (github.event.pull_request.user.login == 'asyncapi-bot-eve' && (
              startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') || 
              startsWith(github.event.pull_request.title, 'chore(release):')
            )) ||
            (github.event.pull_request.user.login == 'allcontributors[bot]' && 
              startsWith(github.event.pull_request.title, 'docs: add')
            )
          )
        id: should_run
        name: Should Run
        run: echo "shouldrun=true" >> "$GITHUB_OUTPUT"

      - if: steps.should_run.outputs.shouldrun == 'true' 
        name: Checkout repository
        uses: actions/checkout@v4
        with:
          persist-credentials: false

      - if: steps.should_run.outputs.shouldrun == 'true' 
        name: Check if project has a Dockerfile
        id: docker
        run: test -e ./Dockerfile && echo "exists=true" >> "$GITHUB_OUTPUT" || echo "exists=false" >> "$GITHUB_OUTPUT"
        shell: bash

      - if: steps.docker.outputs.exists == 'true'
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # use 3.10.0 https://github.com/docker/setup-buildx-action/releases/tag/v2.5.0

      - if: steps.docker.outputs.exists == 'true'
        name: Extract metadata for Docker
        id: meta
        uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # use 5.7.0 https://github.com/docker/metadata-action/releases/tag/v4.3.0
        with:
          images: ${{ env.IMAGE_NAME }}

      - if: steps.docker.outputs.exists == 'true'
        name: Build Docker image
        uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4  # use 6.15.0 https://github.com/docker/build-push-action/releases/tag/v4.0.0
        with:
          context: .
          push: false
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}
          cache-from: type=gha
          cache-to: type=gha,mode=max


================================================
FILE: .github/workflows/if-nodejs-pr-testing.yml
================================================
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# It does magic only if there is package.json file in the root of the project
name: PR testing - if Node project

on:
  pull_request:
    types: [opened, reopened, synchronize, ready_for_review]

permissions:
  contents: read

jobs:
  test-nodejs-pr:
    name: Test NodeJS PR - ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    steps:
      - if: >
          !github.event.pull_request.draft && !(
            (github.event.pull_request.user.login == 'asyncapi-bot' && (
              startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') || 
              startsWith(github.event.pull_request.title, 'chore(release):')
            )) ||
            (github.event.pull_request.user.login == 'asyncapi-bot-eve' && (
              startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') || 
              startsWith(github.event.pull_request.title, 'chore(release):')
            )) ||
            (github.event.pull_request.user.login == 'allcontributors[bot]' && 
              startsWith(github.event.pull_request.title, 'docs: add')
            )
          )
        id: should_run
        name: Should Run
        run: echo "shouldrun=true" >> "$GITHUB_OUTPUT"
        shell: bash
      - if: steps.should_run.outputs.shouldrun == 'true' 
        name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows
        run: |
          git config --global core.autocrlf false
          git config --global core.eol lf
        shell: bash
      - if: steps.should_run.outputs.shouldrun == 'true' 
        name: Checkout repository
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - if: steps.should_run.outputs.shouldrun == 'true' 
        name: Check if Node.js project and has package.json
        id: packagejson
        run: test -e ./package.json && echo "exists=true" >> "$GITHUB_OUTPUT" || echo "exists=false" >> "$GITHUB_OUTPUT"
        shell: bash
      - if: steps.packagejson.outputs.exists == 'true'
        name: Determine what node version to use
        # This workflow is from our own org repo and safe to reference by 'master'.
        uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master # //NOSONAR
        with:
          node-version: ${{ vars.NODE_VERSION }}
        id: lockversion
      - if: steps.packagejson.outputs.exists == 'true'
        name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "${{ steps.lockversion.outputs.version }}"
      - if: steps.lockversion.outputs.version == '18' && matrix.os == 'windows-latest'
        #npm cli 10 is buggy because of some cache issue
        name: Install npm cli 8
        shell: bash
        run: npm install -g npm@8.19.4
      - if: steps.packagejson.outputs.exists == 'true'
        name: Install dependencies
        shell: bash
        run: npm ci
      - if: steps.packagejson.outputs.exists == 'true'
        name: Test
        run: npm test --if-present
      - if: steps.packagejson.outputs.exists == 'true' && matrix.os == 'ubuntu-latest'
        #linting should run just one and not on all possible operating systems
        name: Run linter
        run: npm run lint --if-present
      - if: steps.packagejson.outputs.exists == 'true'
        name: Run release assets generation to make sure PR does not break it
        shell: bash
        run: npm run generate:assets --if-present


================================================
FILE: .github/workflows/issues-prs-notifications.yml
================================================
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# This action notifies community on slack whenever there is a new issue, PR or discussion started in given repository
name: Notify slack

on:
  issues:
    types: [opened, reopened]

  pull_request_target:
    types: [opened, reopened, ready_for_review]   # zizmor: ignore[dangerous-triggers]   

  discussion:
    types: [created]

permissions: {}

jobs:
  issue:
    if: github.event_name == 'issues' && github.actor != 'asyncapi-bot' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
    name: Notify slack on every new issue
    runs-on: ubuntu-latest
    steps:
      - name: Convert markdown to slack markdown for issue
        # This workflow is from our own org repo and safe to reference by 'master'.
        uses: asyncapi/.github/.github/actions/slackify-markdown@master # //NOSONAR
        id: issuemarkdown
        env:
          ISSUE_TITLE: ${{github.event.issue.title}}
          ISSUE_URL: ${{github.event.issue.html_url}}
          ISSUE_BODY: ${{github.event.issue.body}}
        with:
          markdown: "[${{ env.ISSUE_TITLE }}](${{ env.ISSUE_URL }}) \n ${{ env.ISSUE_BODY }}"
      - name: Send info about issue
        uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
        env:
          SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}}
          SLACK_TITLE: 🐛 New Issue in ${{github.repository}} 🐛
          SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}}
          MSG_MINIMAL: true

  pull_request:
    if: github.event_name == 'pull_request_target' && github.actor != 'asyncapi-bot' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
    name: Notify slack on every new pull request
    runs-on: ubuntu-latest
    steps:
      - name: Convert markdown to slack markdown for pull request
        # This workflow is from our own org repo and safe to reference by 'master'.
        uses: asyncapi/.github/.github/actions/slackify-markdown@master # //NOSONAR
        id: prmarkdown
        env:
          PR_TITLE: ${{github.event.pull_request.title}}
          PR_URL: ${{github.event.pull_request.html_url}}
          PR_BODY: ${{github.event.pull_request.body}}
        with:
          markdown: "[${{ env.PR_TITLE }}](${{ env.PR_URL }}) \n ${{ env.PR_BODY }}"
      - name: Send info about pull request
        uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
        env:
          SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}}
          SLACK_TITLE: 💪 New Pull Request in ${{github.repository}} 💪
          SLACK_MESSAGE: ${{steps.prmarkdown.outputs.text}}
          MSG_MINIMAL: true

  discussion:
    if: github.event_name == 'discussion' && github.actor != 'asyncapi-bot' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
    name: Notify slack on every new pull request
    runs-on: ubuntu-latest
    steps:
      - name: Convert markdown to slack markdown for pull request
        # This workflow is from our own org repo and safe to reference by 'master'.
        uses: asyncapi/.github/.github/actions/slackify-markdown@master # //NOSONAR
        id: discussionmarkdown
        env:
          DISCUSSION_TITLE: ${{github.event.discussion.title}}
          DISCUSSION_URL: ${{github.event.discussion.html_url}}
          DISCUSSION_BODY: ${{github.event.discussion.body}}
        with:
          markdown: "[${{ env.DISCUSSION_TITLE }}](${{ env.DISCUSSION_URL }}) \n ${{ env.DISCUSSION_BODY }}"
      - name: Send info about pull request
        uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
        env:
          SLACK_WEBHOOK: ${{secrets.SLACK_GITHUB_NEWISSUEPR}}
          SLACK_TITLE: 💬 New Discussion in ${{github.repository}} 💬
          SLACK_MESSAGE: ${{steps.discussionmarkdown.outputs.text}}
          MSG_MINIMAL: true


================================================
FILE: .github/workflows/lint-pr-title.yml
================================================
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

name: Lint PR title

on:
  pull_request:
    types: [opened, reopened, synchronize, edited, ready_for_review]

permissions: {}

jobs:
  lint-pr-title:
    name: Lint PR title
    runs-on: ubuntu-latest
    permissions:
      contents: read            # To checkout code and read PR information
      pull-requests: write      # To comment on PR if the title is not valid
    steps:
      # Since this workflow is REQUIRED for a PR to be mergable, we have to have this 'if' statement in step level instead of job level.
      - if: ${{ !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors[bot]"]'), github.actor) }} # zizmor: ignore[obfuscation]
        uses: amannn/action-semantic-pull-request@c3cd5d1ea3580753008872425915e343e351ab54 #version 5.2.0 https://github.com/amannn/action-semantic-pull-request/releases/tag/v5.2.0
        id: lint_pr_title
        env:
          GITHUB_TOKEN: ${{ github.token }}
        with:
          subjectPattern: ^(?![A-Z]).+$
          subjectPatternError: |
            The subject "{subject}" found in the pull request title "{title}" should start with a lowercase character.

      # Comments the error message from the above lint_pr_title action
      - if: ${{ always() && steps.lint_pr_title.outputs.error_message != null && !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors[bot]"]'), github.actor)}} # zizmor: ignore[obfuscation]
        name: Comment on PR
        uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd #use 2.5.0 https://github.com/marocchino/sticky-pull-request-comment/releases/tag/v2.5.0
        with:
          header: pr-title-lint-error
          GITHUB_TOKEN: ${{ github.token }}
          message: |

            We require all PRs to follow [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). 
            More details 👇🏼
            ```
             ${{ steps.lint_pr_title.outputs.error_message}}
            ```
        # deletes the error comment if the title is correct
      - if: ${{ steps.lint_pr_title.outputs.error_message == null }}
        name: delete the comment
        uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd #use 2.5.0 https://github.com/marocchino/sticky-pull-request-comment/releases/tag/v2.5.0
        with:
          header: pr-title-lint-error
          delete: true
          GITHUB_TOKEN: ${{ github.token }}


================================================
FILE: .github/workflows/notify-tsc-members-mention.yml
================================================
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# This action notifies community on slack whenever there is a new issue, PR or discussion started in given repository
name: Notify slack and email subscribers whenever TSC members are mentioned in GitHub

on:
  issue_comment:
    types:
      - created

  discussion_comment:
    types:
      - created

  issues:
    types:
      - opened

  pull_request_target:      # Needed to access secrets. The checkout is done on base branch so script cannot be malicious.
    types:
      - opened              # zizmor: ignore[dangerous-triggers]
  discussion:
    types:
      - created

permissions:
  contents: read            # To checkout repository

jobs:
  issue:
    if: github.event_name == 'issues' && contains(github.event.issue.body, '@asyncapi/tsc_members')
    name: TSC notification on every new issue
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'npm'
          cache-dependency-path: '**/package-lock.json'
      #########
      # Handling Slack notifications
      #########
      - name: Convert markdown to slack markdown
        # This workflow is from our own org repo and safe to reference by 'master'.
        uses: asyncapi/.github/.github/actions/slackify-markdown@master # //NOSONAR
        id: issuemarkdown
        with:
          markdown: "[${{github.event.issue.title}}](${{github.event.issue.html_url}}) \n ${{github.event.issue.body}}"
      - name: Send info about issue
        uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
        env:
          SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
          SLACK_TITLE: 🆘 New issue that requires TSC Members attention 🆘
          SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}}
          MSG_MINIMAL: true
      #########
      # Handling Kit.com notifications
      #########
      - name: Install deps
        run: npm install
        working-directory: ./.github/workflows/scripts/kit
      - name: Send email with Kit.com
        uses: actions/github-script@v7
        env:
          KIT_API_KEY: ${{ secrets.KIT_API_KEY }}
          KIT_TSC_TAG_ID: ${{ secrets.KIT_TSC_TAG_ID }}
          TITLE: ${{ github.event.issue.title }}
          HTML_URL: ${{ github.event.issue.html_url }}
        with:
          script: |
            const sendEmail = require('./.github/workflows/scripts/kit/index.js');
            return sendEmail(process.env.HTML_URL, process.env.TITLE);

  pull_request:
    if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.body, '@asyncapi/tsc_members')
    name: TSC notification on every new pull request
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'npm'
          cache-dependency-path: '**/package-lock.json'
      #########
      # Handling Slack notifications
      #########
      - name: Convert markdown to slack markdown
        # This workflow is from our own org repo and safe to reference by 'master'.
        uses: asyncapi/.github/.github/actions/slackify-markdown@master # //NOSONAR
        id: prmarkdown
        with:
          markdown: "[${{github.event.pull_request.title}}](${{github.event.pull_request.html_url}}) \n ${{github.event.pull_request.body}}"
      - name: Send info about pull request
        uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
        env:
          SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
          SLACK_TITLE: 🆘 New PR that requires TSC Members attention 🆘
          SLACK_MESSAGE: ${{steps.prmarkdown.outputs.text}}
          MSG_MINIMAL: true
      #########
      # Handling Kit.com notifications
      #########
      - name: Install deps
        run: npm install
        working-directory: ./.github/workflows/scripts/kit
      - name: Send email with Kit.com
        uses: actions/github-script@v7
        env:
          KIT_API_KEY: ${{ secrets.KIT_API_KEY }}
          KIT_TSC_TAG_ID: ${{ secrets.KIT_TSC_TAG_ID }}
          TITLE: ${{ github.event.pull_request.title }}
          HTML_URL: ${{ github.event.pull_request.html_url }}
        with:
          script: |
            const sendEmail = require('./.github/workflows/scripts/kit/index.js');
            return sendEmail(process.env.HTML_URL, process.env.TITLE);

  discussion:
    if: github.event_name == 'discussion' && contains(github.event.discussion.body, '@asyncapi/tsc_members')
    name: TSC notification on every new discussion
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'npm'
          cache-dependency-path: '**/package-lock.json'
      #########
      # Handling Slack notifications
      #########
      - name: Convert markdown to slack markdown
        # This workflow is from our own org repo and safe to reference by 'master'.
        uses: asyncapi/.github/.github/actions/slackify-markdown@master # //NOSONAR
        id: discussionmarkdown
        with:
          markdown: "[${{github.event.discussion.title}}](${{github.event.discussion.html_url}}) \n ${{github.event.discussion.body}}"
      - name: Send info about discussion
        uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
        env:
          SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
          SLACK_TITLE: 🆘 New discussion that requires TSC Members attention 🆘
          SLACK_MESSAGE: ${{steps.discussionmarkdown.outputs.text}}
          MSG_MINIMAL: true
      #########
      # Handling Kit.com notifications
      #########
      - name: Install deps
        run: npm install
        working-directory: ./.github/workflows/scripts/kit
      - name: Send email with Kit.com
        uses: actions/github-script@v7
        env:
          KIT_API_KEY: ${{ secrets.KIT_API_KEY }}
          KIT_TSC_TAG_ID: ${{ secrets.KIT_TSC_TAG_ID }}
          TITLE: ${{ github.event.discussion.title }}
          HTML_URL: ${{ github.event.discussion.html_url }}
        with:
          script: |
            const sendEmail = require('./.github/workflows/scripts/kit/index.js');
            return sendEmail(process.env.HTML_URL, process.env.TITLE);

  issue_comment:
    if: ${{ github.event_name == 'issue_comment' && !github.event.issue.pull_request && contains(github.event.comment.body, '@asyncapi/tsc_members') }}
    name: TSC notification on every new comment in issue
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'npm'
          cache-dependency-path: '**/package-lock.json'
      #########
      # Handling Slack notifications
      #########
      - name: Convert markdown to slack markdown
        # This workflow is from our own org repo and safe to reference by 'master'.
        uses: asyncapi/.github/.github/actions/slackify-markdown@master # //NOSONAR
        id: issuemarkdown
        with:
          markdown: "[${{github.event.issue.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}"
      - name: Send info about issue comment
        uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
        env:
          SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
          SLACK_TITLE: 🆘 New comment under existing issue that requires TSC Members attention 🆘
          SLACK_MESSAGE: ${{steps.issuemarkdown.outputs.text}}
          MSG_MINIMAL: true
      #########
      # Handling Kit.com notifications
      #########
      - name: Install deps
        run: npm install
        working-directory: ./.github/workflows/scripts/kit
      - name: Send email with Kit.com
        uses: actions/github-script@v7
        env:
          KIT_API_KEY: ${{ secrets.KIT_API_KEY }}
          KIT_TSC_TAG_ID: ${{ secrets.KIT_TSC_TAG_ID }}
          TITLE: ${{ github.event.issue.title }}
          HTML_URL: ${{ github.event.comment.html_url }}
        with:
          script: |
            const sendEmail = require('./.github/workflows/scripts/kit/index.js');
            return sendEmail(process.env.HTML_URL, process.env.TITLE);

  pr_comment:
    if: github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '@asyncapi/tsc_members')
    name: TSC notification on every new comment in pr
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'npm'
          cache-dependency-path: '**/package-lock.json'
      #########
      # Handling Slack notifications
      #########
      - name: Convert markdown to slack markdown
        # This workflow is from our own org repo and safe to reference by 'master'.
        uses: asyncapi/.github/.github/actions/slackify-markdown@master # //NOSONAR
        id: prmarkdown
        with:
          markdown: "[${{github.event.issue.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}"
      - name: Send info about PR comment
        uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
        env:
          SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
          SLACK_TITLE: 🆘 New comment under existing PR that requires TSC Members attention 🆘
          SLACK_MESSAGE: ${{steps.prmarkdown.outputs.text}}
          MSG_MINIMAL: true
      #########
      # Handling Kit.com notifications
      #########
      - name: Install deps
        run: npm install
        working-directory: ./.github/workflows/scripts/kit
      - name: Send email with Kit.com
        uses: actions/github-script@v7
        env:
          KIT_API_KEY: ${{ secrets.KIT_API_KEY }}
          KIT_TSC_TAG_ID: ${{ secrets.KIT_TSC_TAG_ID }}
          TITLE: ${{ github.event.issue.title }}
          HTML_URL: ${{ github.event.comment.html_url }}
        with:
          script: |
            const sendEmail = require('./.github/workflows/scripts/kit/index.js');
            return sendEmail(process.env.HTML_URL, process.env.TITLE);

  discussion_comment:
    if: github.event_name == 'discussion_comment' && contains(github.event.comment.body, '@asyncapi/tsc_members')
    name: TSC notification on every new comment in discussion
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'npm'
          cache-dependency-path: '**/package-lock.json'
      #########
      # Handling Slack notifications
      #########
      - name: Convert markdown to slack markdown
        # This workflow is from our own org repo and safe to reference by 'master'.
        uses: asyncapi/.github/.github/actions/slackify-markdown@master # //NOSONAR
        id: discussionmarkdown
        with:
          markdown: "[${{github.event.discussion.title}}](${{github.event.comment.html_url}}) \n ${{github.event.comment.body}}"
      - name: Send info about discussion comment
        uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
        env:
          SLACK_WEBHOOK: ${{secrets.SLACK_TSC_MEMBERS_NOTIFY}}
          SLACK_TITLE: 🆘 New comment under existing discussion that requires TSC Members attention 🆘
          SLACK_MESSAGE: ${{steps.discussionmarkdown.outputs.text}}
          MSG_MINIMAL: true
      #########
      # Handling Kit.com notifications
      #########
      - name: Install deps
        run: npm install
        working-directory: ./.github/workflows/scripts/kit
      - name: Send email with Kit.com
        uses: actions/github-script@v7
        env:
          KIT_API_KEY: ${{ secrets.KIT_API_KEY }}
          KIT_TSC_TAG_ID: ${{ secrets.KIT_TSC_TAG_ID }}
          TITLE: ${{ github.event.discussion.title }}
          HTML_URL: ${{ github.event.comment.html_url }}
        with:
          script: |
            const sendEmail = require('./.github/workflows/scripts/kit/index.js');
            return sendEmail(process.env.HTML_URL, process.env.TITLE);


================================================
FILE: .github/workflows/please-take-a-look-command.yml
================================================
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# It uses Github actions to listen for comments on issues and pull requests and 
# if the comment contains /please-take-a-look or /ptal it will add a comment pinging 
# the code-owners who are reviewers for PR

name: Please take a Look

on:
  issue_comment:
    types: [created]

permissions: {}

jobs:
  ping-for-attention:
    if: >
      github.event.issue.pull_request &&
      github.event.issue.state != 'closed' &&
      github.actor != 'asyncapi-bot' &&
      (
        contains(github.event.comment.body, '/please-take-a-look') ||
        contains(github.event.comment.body, '/ptal') ||
        contains(github.event.comment.body, '/PTAL') 
      )
    name: Ping code owners for attention
    runs-on: ubuntu-latest
    steps:
      - name: Check for Please Take a Look Command
        uses: actions/github-script@v7
        with:
          github-token: ${{ secrets.GH_TOKEN }}
          script: |
            const prDetailsUrl = context.payload.issue.pull_request.url;
            const { data: pull } = await github.request(prDetailsUrl);
            const reviewers = (pull.requested_reviewers || []).map(reviewer => reviewer.login);

            const { data: reviews } = await github.rest.pulls.listReviews({
              owner: context.repo.owner,
              repo: context.repo.repo,
              pull_number: context.issue.number
            });

            const reviewersWhoHaveReviewed = reviews.map(review => review.user.login);

            const reviewersWhoHaveNotReviewed = reviewers.filter(reviewer => !reviewersWhoHaveReviewed.includes(reviewer));

            if (reviewersWhoHaveNotReviewed.length > 0) {
              const comment = reviewersWhoHaveNotReviewed.filter(reviewer => reviewer !== 'asyncapi-bot-eve' ).map(reviewer => `@${reviewer}`).join(' ');
              await github.rest.issues.createComment({
                issue_number: context.issue.number,
                owner: context.repo.owner,
                repo: context.repo.repo,
                body: `${comment} Please take a look at this PR. Thanks! :wave:`
              });
            }


================================================
FILE: .github/workflows/release-announcements.yml
================================================
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

name: 'Announce releases in different channels'

on: 
  release:
    types: 
      - published

permissions:
  contents: read            # To checkout code and read release information

jobs:

  slack-announce:
    name: Slack - notify on every release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Convert markdown to slack markdown for issue
        # This workflow is from our own org repo and safe to reference by 'master'.
        uses: asyncapi/.github/.github/actions/slackify-markdown@master # //NOSONAR
        id: markdown
        env:
          RELEASE_TAG: ${{github.event.release.tag_name}}
          RELEASE_URL: ${{github.event.release.html_url}}
          RELEASE_BODY: ${{ github.event.release.body }}
        with:
          markdown: "[${{ env.RELEASE_TAG }}](${{ env.RELEASE_URL }}) \n ${{ env.RELEASE_BODY }}"
      - name: Send info about release to Slack
        uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # Using v2.3.2
        env:
            SLACK_WEBHOOK: ${{ secrets.SLACK_RELEASES }}
            SLACK_TITLE: Release ${{ env.RELEASE_TAG }} for ${{ env.REPO_NAME }} is out in the wild 😱💪🍾🎂
            SLACK_MESSAGE: ${{steps.markdown.outputs.text}}
            MSG_MINIMAL: true
            RELEASE_TAG: ${{github.event.release.tag_name}}
            REPO_NAME: ${{github.repository}}

  twitter-announce:
    name: Twitter - notify on minor and major releases
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Get version of last and previous release
        uses: actions/github-script@v7
        id: versions
        with:
          github-token: ${{ github.token }}
          script: |
            const query = `query($owner:String!, $name:String!) {
              repository(owner:$owner, name:$name){
                releases(first: 2, orderBy: {field: CREATED_AT, direction: DESC}) {
                  nodes {
                    name
                  }
                }
              }
            }`;
            const variables = {
              owner: context.repo.owner,
              name: context.repo.repo
            };
            const { repository: { releases: { nodes } } } = await github.graphql(query, variables);
            core.setOutput('lastver', nodes[0].name);
            // In case of first release in the package, there is no such thing as previous error, so we set info about previous version only once we have it
            // We should tweet about the release no matter of the type as it is initial release
            if (nodes.length != 1) core.setOutput('previousver', nodes[1].name);
      - name: Identify release type
        id: releasetype
        # if previousver is not provided then this steps just logs information about missing version, no errors
        env:
          PREV_VERSION: ${{steps.versions.outputs.previousver}}
          LAST_VERSION: ${{steps.versions.outputs.lastver}}
        run: echo "type=$(npx -q -p semver-diff-cli semver-diff "$PREV_VERSION" "$LAST_VERSION")" >> "$GITHUB_OUTPUT"
      - name: Get name of the person that is behind the newly released version
        id: author
        run: |
          AUTHOR_NAME=$(git log -1 --pretty=format:'%an')
          printf 'name=%s\n' "$AUTHOR_NAME" >> "$GITHUB_OUTPUT"
      - name: Publish information about the release to Twitter # tweet only if detected version change is not a patch
        # tweet goes out even if the type is not major or minor but "You need provide version number to compare."
        # it is ok, it just means we did not identify previous version as we are tweeting out information about the release for the first time
        if: steps.releasetype.outputs.type != 'null' && steps.releasetype.outputs.type != 'patch' # null means that versions are the same
        uses: m1ner79/Github-Twittction@d1e508b6c2170145127138f93c49b7c46c6ff3a7   # using 2.0.0 https://github.com/m1ner79/Github-Twittction/releases/tag/v2.0.0
        env:
          RELEASE_TAG: ${{github.event.release.tag_name}}
          REPO_NAME: ${{github.repository}}
          AUTHOR_NAME: ${{ steps.author.outputs.name }}
          RELEASE_URL: ${{github.event.release.html_url}}
        with:
          twitter_status: "Release ${{ env.RELEASE_TAG }} for ${{ env.REPO_NAME }} is out in the wild 😱💪🍾🎂\n\nThank you for the contribution ${{ env.AUTHOR_NAME }} ${{ env.RELEASE_URL }}"
          twitter_consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }} 
          twitter_consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }} 
          twitter_access_token_key: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }} 
          twitter_access_token_secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

================================================
FILE: .github/workflows/release-chocolatey.yml
================================================
name: Release Chocolatey Package
on:
  # We cannot run chocolatey release continusly every time we release something as sometimes we release a couple of times a day and overload chocolatey pipelines
  # More details https://github.com/asyncapi/cli/issues/503
  schedule:
    - cron: '0 23 * * *' # Run every day at 23:00 UTC
  # Since now release depends on schedule, might be that there is a situation we cannot wait for schedule and trigger release manually
  workflow_dispatch:
    inputs:
      version:
        description: 'Version to release (optional)'
        required: false
  
jobs:
  release:
    name: Publish to Chocolatey Community
    runs-on: windows-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Set Version
        id: release_version
        run: |
          if ( "${{ github.event_name }}" -eq "workflow_dispatch" -and "${{ github.event.inputs.version }}" -ne "" ) {
            $version = "${{ github.event.inputs.version }}"
          }
          else {
            $version = $(npm pkg get version)
          }

          $version = $version.Replace("`"", "")
          echo "Setting version to $version"
          echo "version=$version" >> $env:GITHUB_OUTPUT

      - name: Check if this is a new version to release
        id: check_new_version
        run: |
          $output = choco search asyncapi-cli --version=${{ steps.release_version.outputs.version }}
          # Output is of the form:
          # Chocolatey v2.2.2
          # asyncapi-cli 0.0.1 [Approved]
          # 1 packages found.
          # If the version is not found, the output will of the form:
          # Chocolatey v2.2.2
          # 0 packages found.

          if ($output -match "0 packages found.") {
            echo "This is a new version to release"
            echo "new_version=true" >> $env:GITHUB_OUTPUT
          }
          else {
            echo "This is not a new version to release"
            echo "new_version=false" >> $env:GITHUB_OUTPUT
          }
          
      - name: Download release
        if: steps.check_new_version.outputs.new_version == 'true'
        run: |
          echo "Downloading release assets for version ${{ steps.release_version.outputs.version }}"
          mkdir -p ./dist/win32
          curl -L "https://github.com/asyncapi/cli/releases/download/v${{ steps.release_version.outputs.version }}/asyncapi.x64.exe" -o "./dist/win32/asyncapi.x64.exe"
          curl -L "https://github.com/asyncapi/cli/releases/download/v${{ steps.release_version.outputs.version }}/asyncapi.x86.exe" -o "./dist/win32/asyncapi.x86.exe"

      - name: Get Checksum of the release
        if: steps.check_new_version.outputs.new_version == 'true'
        id: release_checksum
        run: |
          $checksum = (Get-FileHash -Path "./dist/win32/asyncapi.x86.exe" -Algorithm SHA256).Hash
          $checksum64 = (Get-FileHash -Path "./dist/win32/asyncapi.x64.exe" -Algorithm SHA256).Hash
          echo "Setting checksum to $checksum"
          echo "checksum=$checksum" >> $env:GITHUB_OUTPUT
          echo "Setting checksum64 to $checksum64"
          echo "checksum64=$checksum64" >> $env:GITHUB_OUTPUT

      - name: Make nuspec from the template
        if: steps.check_new_version.outputs.new_version == 'true'
        run: |
          cd ./.github/workflows/deploy/chocolatey
          pwsh -File ./replace.ps1 -version ${{ steps.release_version.outputs.version }} -checksum ${{ steps.release_checksum.outputs.checksum }} -checksum64 ${{ steps.release_checksum.outputs.checksum64 }}

      - name: Run Chocolatey Pack
        if: steps.check_new_version.outputs.new_version == 'true'
        run: |
          cd ./.github/workflows/deploy/chocolatey
          choco pack ./asyncapi-cli.nuspec
          choco apikey add --source "'https://push.chocolatey.org/'" --key ${{ secrets.CHOCOLATEY_API_KEY }}
          choco push ./asyncapi.${{ steps.release_version.outputs.version }}.nupkg --source "'https://push.chocolatey.org/'"  
          
      - if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
        name: Report workflow run status to Slack
        uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 #using https://github.com/8398a7/action-slack/releases/tag/v3.15.1
        with:
          status: ${{ job.status }}
          fields: repo,action,workflow
          text: 'AsyncAPI CLI release to Chocolatey failed'
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}

================================================
FILE: .github/workflows/release-docker.yml
================================================
name: Release Docker Image
on:
  release:
    types:
      - published

jobs:
  publish-docker:
    name: Generating Docker
    runs-on: ubuntu-latest
    steps:
      - name: Get version without v character
        id: version
        env:
          TAG_NAME: ${{ github.event.release.tag_name }}
        run: |
          VERSION_WITHOUT_V=${TAG_NAME:1}
          echo "value=${VERSION_WITHOUT_V}" >> $GITHUB_OUTPUT

      - name : Checkout repository
        uses: actions/checkout@v4
        with:
          ref: ${{ github.event.release.tag_name }}

      - name: Set Up QEMU
        uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0

      - name: Set Up Docker Buildx
        uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

      - name: login to Docker Hub
        uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}

      - name: Build Image
        uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
        with:
          push: true
          load: false
          build-args: |
            ASYNCAPI_CLI_VERSION=${{ steps.version.outputs.value }}
          tags: |
            asyncapi/cli:${{ steps.version.outputs.value }}
            asyncapi/cli:latest
          platforms: linux/amd64,linux/arm64
          cache-from: type=gha
          cache-to: type=gha

      - name:  Sync README.md and Description to Docker Hub
        uses: actions/checkout@v4

      - uses: meeDamian/sync-readme@82715041300710d9be7c726c9d6c683b70451087 # v1.0.6
        with:
          user: ${{ secrets.DOCKER_USERNAME }}
          pass: ${{ secrets.DOCKER_PASSWORD }}
          slug: asyncapi/cli
          description: CLI to work with your AsyncAPI files

  publish-action-docker:
    name: Release github action for cli and update version in action.yml
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          ref: ${{ github.event.release.tag_name }}

      - name: Get version without v character
        id: version
        env:
          TAG_NAME: ${{ github.event.release.tag_name }}
        run: |
          VERSION_WITHOUT_V=${TAG_NAME:1}
          echo "value=${VERSION_WITHOUT_V}" >> $GITHUB_OUTPUT

      - name: Set Up QEMU
        uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0

      - name: Set Up Docker Buildx
        uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

      - name: Login to Docker Hub
        uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}

      - name: Build and push
        uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
        with:
          context: .
          file: ./github-action/Dockerfile
          push: true
          tags: |
            asyncapi/github-action-for-cli:${{ steps.version.outputs.value }}
            asyncapi/github-action-for-cli:latest
          platforms: linux/amd64,linux/arm64

      - name: Change directory to github-action
        run: |
          cd github-action/
          ls -la

      - uses: meeDamian/sync-readme@82715041300710d9be7c726c9d6c683b70451087 # v1.0.6
        with:
          user: ${{ secrets.DOCKER_USERNAME }}
          pass: ${{ secrets.DOCKER_PASSWORD }}
          slug: asyncapi/github-action-for-cli
          description: Github action for AsyncAPI CLI



================================================
FILE: .github/workflows/release-server-api.yml
================================================
name: Release Server API Image
on: 
  release:
    types: 
      - published
  workflow_dispatch:
    inputs:
      version:
        description: 'Version to release'
        required: true
jobs:

  publish-docker:
    name: Generating Docker
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Get version without v character
        id: version
        run: |
          VERSION=${{github.event.release.tag_name || github.event.inputs.version}}
          VERSION_WITHOUT_V=${VERSION:1}
          echo "value=${VERSION_WITHOUT_V}" >> $GITHUB_OUTPUT

      - name: Set Up QEMU
        uses: docker/setup-qemu-action@v3

      - name: Set Up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Login to Docker Hub
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}

      - name: Build and Push Docker Image
        uses: docker/build-push-action@v6
        id: push
        with:
          context: .
          file: ./src/apps/api/Dockerfile
          push: true
          tags: |
            asyncapi/server-api:${{ steps.version.outputs.value }}
            asyncapi/server-api:latest
          platforms: linux/amd64,linux/arm64
          
      - uses: meeDamian/sync-readme@82715041300710d9be7c726c9d6c683b70451087 #version 1.0.6 https://github.com/meeDamian/sync-readme/releases/tag/v1.0.6
        with:
          user: ${{secrets.DOCKER_USERNAME}}
          pass: ${{ secrets.DOCKER_PASSWORD }}
          slug: asyncapi/server-api
          readme: ./src/apps/api/README.md
          description: Server API providing official AsyncAPI tools

    outputs:
      digest: ${{ steps.push.outputs.digest }}

  deploy-app:
    name: Deploy to DigitalOcean App
    needs: publish-docker
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        
      - name: Deploy to DigitalOcean App
        uses: digitalocean/app_action/deploy@190f99be3ce4cbbe5d1ca0a63a8ac9d0add205d0
        env:
          DOCKER_DIGEST: ${{ needs.publish-docker.outputs.digest }}
        with:
          token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
          app_spec_location: ./src/apps/api/.do/app.yaml
          print_deploy_logs: true


================================================
FILE: .github/workflows/release-with-changesets.yml
================================================
# It does magic only if there is a package.json file in the root of the project
name: Release

on:
  push:
    branches:
      - master
        # The below lines are not enough to have release supported for these branches
      - next-spec
      - next-major
      - next-major-spec
      - beta
      - alpha
      - next

jobs:
  test-nodejs:
    # We just check the message of the first commit as there is always just one commit because we squash into one before merging
    # "commits" contains an array of objects where one of the properties is the commit "message"
    # Release workflow will be skipped if release conventional commits are not used
    if: |
      (startsWith( github.event.commits[0].message , 'fix:' ) ||
      startsWith( github.event.commits[0].message, 'fix!:' ) ||
      startsWith( github.event.commits[0].message, 'feat:' ) ||
      startsWith( github.event.commits[0].message, 'chore(release):' ) ||
      startsWith( github.event.commits[0].message, 'feat!:' ))
    name: Test NodeJS release on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    steps:
      - name: Set git to use LF # To once and for all finish the never-ending fight between Unix and Windows
        run: |
          git config --global core.autocrlf false
          git config --global core.eol lf
        shell: bash
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Check if Node.js project and has package.json
        id: packagejson
        run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT
        shell: bash
      - if: steps.packagejson.outputs.exists == 'true'
        name: Check package-lock version
        uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
        id: lockversion
      - if: steps.packagejson.outputs.exists == 'true'
        name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "${{ steps.lockversion.outputs.version }}"
          registry-url: "https://registry.npmjs.org"
      - if: steps.lockversion.outputs.version == '18' && matrix.os == 'windows-latest'
        name: Install npm cli 8
        shell: bash
        # npm cli 10 is buggy because of some cache issues
        run: npm install -g npm@8.19.4
      - if: steps.packagejson.outputs.exists == 'true'
        name: Install dependencies
        shell: bash
        run: npm ci
      - if: steps.packagejson.outputs.exists == 'true'
        name: Run test
        run: npm test --if-present
      - if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
        name: Report workflow run status to Slack
        uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 # v3.15.1
        with:
          status: ${{ job.status }}
          fields: repo,action,workflow
          text: "Release workflow failed in testing job"
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}

  release:
    needs: [test-nodejs]
    name: Publish to any of NPM, GitHub, or Docker Hub
    runs-on: ubuntu-latest
    permissions:
      contents: write
      id-token: write
      pull-requests: write
    steps:
      - name: Set git to use LF # To once and for all finish the never-ending fight between Unix and Windows
        run: |
          git config --global core.autocrlf false
          git config --global core.eol lf
      - name: Checkout repository
        uses: actions/checkout@v6
      - name: Check if Node.js project and has package.json
        id: packagejson
        run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT
        shell: bash
      - if: steps.packagejson.outputs.exists == 'true'
        name: Check package-lock version
        uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
        id: lockversion
        with:
          node-version: ${{ vars.NODE_VERSION }}
      - if: steps.packagejson.outputs.exists == 'true'
        name: Setup Node.js
        uses: actions/setup-node@v6
        with:
          node-version: "${{ steps.lockversion.outputs.version }}"
      - if: steps.packagejson.outputs.exists == 'true'
        name: Install dependencies
        shell: bash
        run: npm ci
      - if: steps.packagejson.outputs.exists == 'true'
        name: Install changelog
        shell: bash
        # This step can be removed once the issue is fixed in the changeset package.
        run: npm install @changesets/changelog-git@0.2.0

      - if: steps.packagejson.outputs.exists == 'true'
        name: Publish to any of NPM, Github, and Docker Hub
        #this step has 2 goals, it is either identifying that there is changeset file created and then this action creates a PR with version bump that will trigger release - or if it sees there is no changeset, and there are versions changes in package.json files, it publish new versions to NPM is they are not there yet
        # However, as currently changeset's publish isn't working well with OIDC next step will directly publish to NPM if there are version changes but no changesets
        uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1.5.3
        id: release
        with:
          version: npm run bump:version
          commit: "chore(release): release and bump versions of packages"
          title: "chore(release): release and bump versions of packages"
          # Working around changesets action not supporting OIDC yet. Need to pass successful release output for triggering github release
          publish: npm run publish:trusted
          setupGitUser: false
        env:
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
          GIT_AUTHOR_NAME: asyncapi-bot
          GIT_AUTHOR_EMAIL: info@asyncapi.io
          GIT_COMMITTER_NAME: asyncapi-bot
          GIT_COMMITTER_EMAIL: info@asyncapi.io

      - name: Publish to NPM directly (skip if version already published)
        if: steps.packagejson.outputs.exists == 'true' && steps.release.outputs.hasChangesets == 'false'
        shell: bash
        run: |
          # Check if the version in package.json is already published
          VERSION=$(node -p "require('./package.json').version")
          PACKAGE_NAME=$(node -p "require('./package.json').name")
          if npm view "$PACKAGE_NAME@$VERSION" > /dev/null 2>&1; then
            echo "Version $VERSION of package $PACKAGE_NAME is already published. Skipping publish."
          else
            echo "Publishing version $VERSION of package $PACKAGE_NAME to NPM."
            npm publish --provenance
          fi

      - if: failure() # Only, on failure, send a message on the 94_bot-failing-ci Slack channel
        name: Report workflow run status to Slack
        uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 # v3.15.1
        with:
          status: ${{ job.status }}
          fields: repo,action,workflow
          text: "Release workflow failed in release job"
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}


================================================
FILE: .github/workflows/scripts/README.md
================================================
The entire `scripts` directory is centrally managed in [.github](https://github.com/asyncapi/.github/) repository. Any changes in this folder should be done in central repository.

================================================
FILE: .github/workflows/scripts/kit/htmlContent.js
================================================
/**
 * This code is centrally managed in https://github.com/asyncapi/.github/
 * Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo
 *
 * Kit.com version — greeting uses Kit Liquid (subscriber.first_name). Unsubscribe is provided by the Kit email template/footer.
 */

/**
 * Escape HTML special characters to prevent XSS
 */
function escapeHtml(text) {
    if (!text) return '';
    return text
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;')
        .replace(/'/g, '&#039;');
}

module.exports = (link, title) => {
    // Sanitize inputs to prevent XSS
    const safeLink = escapeHtml(link);
    const safeTitle = escapeHtml(title);

    return `<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    <head>
        <!-- NAME: SIMPLE TEXT -->
        <!--[if gte mso 15]>
        <xml>
            <o:OfficeDocumentSettings>
            <o:AllowPNG/>
            <o:PixelsPerInch>96</o:PixelsPerInch>
            </o:OfficeDocumentSettings>
        </xml>
        <![endif]-->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>${safeTitle}</title>
        
    <style type="text/css">
		p{
			margin:10px 0;
			padding:0;
		}
		table{
			border-collapse:collapse;
		}
		h1,h2,h3,h4,h5,h6{
			display:block;
			margin:0;
			padding:0;
		}
		img,a img{
			border:0;
			height:auto;
			outline:none;
			text-decoration:none;
		}
		body,#bodyTable,#bodyCell{
			height:100%;
			margin:0;
			padding:0;
			width:100%;
		}
		.mcnPreviewText{
			display:none !important;
		}
		#outlook a{
			padding:0;
		}
		img{
			-ms-interpolation-mode:bicubic;
		}
		table{
			mso-table-lspace:0pt;
			mso-table-rspace:0pt;
		}
		.ReadMsgBody{
			width:100%;
		}
		.ExternalClass{
			width:100%;
		}
		p,a,li,td,blockquote{
			mso-line-height-rule:exactly;
		}
		a[href^=tel],a[href^=sms]{
			color:inherit;
			cursor:default;
			text-decoration:none;
		}
		p,a,li,td,body,table,blockquote{
			-ms-text-size-adjust:100%;
			-webkit-text-size-adjust:100%;
		}
		.ExternalClass,.ExternalClass p,.ExternalClass td,.ExternalClass div,.ExternalClass span,.ExternalClass font{
			line-height:100%;
		}
		a[x-apple-data-detectors]{
			color:inherit !important;
			text-decoration:none !important;
			font-size:inherit !important;
			font-family:inherit !important;
			font-weight:inherit !important;
			line-height:inherit !important;
		}
		#bodyCell{
			padding:10px;
		}
		.templateContainer{
			max-width:600px !important;
		}
		a.mcnButton{
			display:block;
		}
		.mcnImage,.mcnRetinaImage{
			vertical-align:bottom;
		}
		.mcnTextContent{
			word-break:break-word;
		}
		.mcnTextContent img{
			height:auto !important;
		}
		.mcnDividerBlock{
			table-layout:fixed !important;
		}
		body,#bodyTable{
			background-color:#FFFFFF;
			background-image:none;
			background-repeat:no-repeat;
			background-position:center;
			background-size:cover;
		}
		#bodyCell{
			border-top:0;
		}
		.templateContainer{
			border:0;
		}
		h1{
			color:#202020;
			font-family:Helvetica;
			font-size:26px;
			font-style:normal;
			font-weight:bold;
			line-height:125%;
			letter-spacing:normal;
			text-align:left;
		}
		h2{
			color:#202020;
			font-family:Helvetica;
			font-size:22px;
			font-style:normal;
			font-weight:bold;
			line-height:125%;
			letter-spacing:normal;
			text-align:left;
		}
		h3{
			color:#202020;
			font-family:Helvetica;
			font-size:20px;
			font-style:normal;
			font-weight:bold;
			line-height:125%;
			letter-spacing:normal;
			text-align:left;
		}
		h4{
			color:#202020;
			font-family:Helvetica;
			font-size:18px;
			font-style:normal;
			font-weight:bold;
			line-height:125%;
			letter-spacing:normal;
			text-align:left;
		}
		#templateHeader{
			border-top:0;
			border-bottom:0;
		}
		#templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
			color:#202020;
			font-family:Helvetica;
			font-size:16px;
			line-height:150%;
			text-align:left;
		}
		#templateHeader .mcnTextContent a,#templateHeader .mcnTextContent p a{
			color:#007C89;
			font-weight:normal;
			text-decoration:underline;
		}
		#templateBody{
			border-top:0;
			border-bottom:0;
		}
		#templateBody .mcnTextContent,#templateBody .mcnTextContent p{
			color:#202020;
			font-family:Helvetica;
			font-size:16px;
			line-height:150%;
			text-align:left;
		}
		#templateBody .mcnTextContent a,#templateBody .mcnTextContent p a{
			color:#007C89;
			font-weight:normal;
			text-decoration:underline;
		}
		#templateFooter{
			border-top:0;
			border-bottom:0;
		}
		#templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
			color:#202020;
			font-family:Helvetica;
			font-size:12px;
			line-height:150%;
			text-align:left;
		}
		#templateFooter .mcnTextContent a,#templateFooter .mcnTextContent p a{
			color:#202020;
			font-weight:normal;
			text-decoration:underline;
		}
	@media only screen and (min-width:768px){
		.templateContainer{
			width:600px !important;
		}

}	@media only screen and (max-width: 480px){
		body,table,td,p,a,li,blockquote{
			-webkit-text-size-adjust:none !important;
		}

}	@media only screen and (max-width: 480px){
		body{
			width:100% !important;
			min-width:100% !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnRetinaImage{
			max-width:100% !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnImage{
			width:100% !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnCartContainer,.mcnCaptionTopContent,.mcnRecContentContainer,.mcnCaptionBottomContent,.mcnTextContentContainer,.mcnBoxedTextContentContainer,.mcnImageGroupContentContainer,.mcnCaptionLeftTextContentContainer,.mcnCaptionRightTextContentContainer,.mcnCaptionLeftImageContentContainer,.mcnCaptionRightImageContentContainer,.mcnImageCardLeftTextContentContainer,.mcnImageCardRightTextContentContainer,.mcnImageCardLeftImageContentContainer,.mcnImageCardRightImageContentContainer{
			max-width:100% !important;
			width:100% !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnBoxedTextContentContainer{
			min-width:100% !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnImageGroupContent{
			padding:9px !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnCaptionLeftContentOuter .mcnTextContent,.mcnCaptionRightContentOuter .mcnTextContent{
			padding-top:9px !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnImageCardTopImageContent,.mcnCaptionBottomContent:last-child .mcnCaptionBottomImageContent,.mcnCaptionBlockInner .mcnCaptionTopContent:last-child .mcnTextContent{
			padding-top:18px !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnImageCardBottomImageContent{
			padding-bottom:9px !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnImageGroupBlockInner{
			padding-top:0 !important;
			padding-bottom:0 !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnImageGroupBlockOuter{
			padding-top:9px !important;
			padding-bottom:9px !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnTextContent,.mcnBoxedTextContentColumn{
			padding-right:18px !important;
			padding-left:18px !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnImageCardLeftImageContent,.mcnImageCardRightImageContent{
			padding-right:18px !important;
			padding-bottom:0 !important;
			padding-left:18px !important;
		}

}	@media only screen and (max-width: 480px){
		.mcpreview-image-uploader{
			display:none !important;
			width:100% !important;
		}

}	@media only screen and (max-width: 480px){
		h1{
			font-size:22px !important;
			line-height:125% !important;
		}

}	@media only screen and (max-width: 480px){
		h2{
			font-size:20px !important;
			line-height:125% !important;
		}

}	@media only screen and (max-width: 480px){
		h3{
			font-size:18px !important;
			line-height:125% !important;
		}

}	@media only screen and (max-width: 480px){
		h4{
			font-size:16px !important;
			line-height:150% !important;
		}

}	@media only screen and (max-width: 480px){
		table.mcnBoxedTextContentContainer td.mcnTextContent,td.mcnBoxedTextContentContainer td.mcnTextContent p{
			font-size:14px !important;
			line-height:150% !important;
		}

}	@media only screen and (max-width: 480px){
		td#templateHeader td.mcnTextContent,td#templateHeader td.mcnTextContent p{
			font-size:16px !important;
			line-height:150% !important;
		}

}	@media only screen and (max-width: 480px){
		td#templateBody td.mcnTextContent,td#templateBody td.mcnTextContent p{
			font-size:16px !important;
			line-height:150% !important;
		}

}	@media only screen and (max-width: 480px){
		td#templateFooter td.mcnTextContent,td#templateFooter td.mcnTextContent p{
			font-size:14px !important;
			line-height:150% !important;
		}

}</style></head>
    <body style="background:#FFFFFF none no-repeat center/cover;height: 100%;margin: 0;padding: 0;width: 100%;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #FFFFFF;background-image: none;background-repeat: no-repeat;background-position: center;background-size: cover;">
        <center>
            <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable" style="background:#FFFFFF none no-repeat center/cover;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;height: 100%;margin: 0;padding: 0;width: 100%;background-color: #FFFFFF;background-image: none;background-repeat: no-repeat;background-position: center;background-size: cover;">
                <tr>
                    <td align="left" valign="top" id="bodyCell" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;height: 100%;margin: 0;padding: 10px;width: 100%;border-top: 0;">
                        <!-- BEGIN TEMPLATE // -->
                        <!--[if (gte mso 9)|(IE)]>
                        <table align="center" border="0" cellspacing="0" cellpadding="0" width="600" style="width:600px;">
                        <tr>
                        <td align="center" valign="top" width="600" style="width:600px;">
                        <![endif]-->
                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateContainer" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;border: 0;max-width: 600px !important;">
                            <tr>
                                <td valign="top" id="templateHeader" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;border-top: 0;border-bottom: 0;"><table class="mcnTextBlock" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" valign="top">
              	<!--[if mso]>
				<table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
				<tr>
				<![endif]-->
			    
				<!--[if mso]>
				<td valign="top" width="600" style="width:600px;">
				<![endif]-->
                <table style="max-width: 100%;min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding-top: 0;padding-right: 18px;padding-bottom: 9px;padding-left: 18px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;word-break: break-word;color: #202020;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;" valign="top">
                        
                            Hey {{ subscriber.first_name | strip | default: "TSC member" }},<br>
<br>
There is a new topic at AsyncAPI Initiative that requires Technical Steering Committee attention. 
<br>
Please have a look if it is just something you need to be aware of, or maybe your vote is needed.
<br>
Topic: <a href="${ safeLink }" style="color:#007c89;font-weight:normal;text-decoration:underline" target="_blank">${ safeTitle }</a>.
                        </td>
                    </tr>
                </tbody></table>
				<!--[if mso]>
				</td>
				<![endif]-->
                
				<!--[if mso]>
				</tr>
				</table>
				<![endif]-->
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateBody" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;border-top: 0;border-bottom: 0;">
                                <table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnTextBlock" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">

    <tbody class="mcnTextBlockOuter">
        <tr>
            <td valign="top" class="mcnTextBlockInner" style="padding-top: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
              	<!--[if mso]>
				<table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
				<tr>
				<![endif]-->
			    
				<!--[if mso]>
				<td valign="top" width="600" style="width:600px;">
				<![endif]-->
                <table align="left" border="0" cellpadding="0" cellspacing="0" style="max-width: 100%;min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" width="100%" class="mcnTextContentContainer">
                    <tbody><tr>
                        
                        <td valign="top" class="mcnTextContent" style="padding-top: 0;padding-right: 18px;padding-bottom: 9px;padding-left: 18px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;word-break: break-word;color: #202020;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;">
                        
                            Cheers,<br>
AsyncAPI Initiative
                        </td>
                    </tr>
                </tbody></table>
				<!--[if mso]>
				</td>
				<![endif]-->
                
				<!--[if mso]>
				</tr>
				</table>
				<![endif]-->
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateFooter" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;border-top: 0;border-bottom: 0;"><table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnTextBlock" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td valign="top" class="mcnTextBlockInner" style="padding-top: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
              	<!--[if mso]>
				<table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
				<tr>
				<![endif]-->
			    
				<!--[if mso]>
				<td valign="top" width="600" style="width:600px;">
				<![endif]-->
                <table align="left" border="0" cellpadding="0" cellspacing="0" style="max-width: 100%;min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" width="100%" class="mcnTextContentContainer">
                    <tbody><tr>
                        
                        <td valign="top" class="mcnTextContent" style="padding-top: 0;padding-right: 18px;padding-bottom: 9px;padding-left: 18px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;word-break: break-word;color: #202020;font-family: Helvetica;font-size: 12px;line-height: 150%;text-align: left;">
                        
                            You are receiving this email because you are subscribed to TSC Voting notifications.<br>
&nbsp;
                        </td>
                    </tr>
                </tbody></table>
				<!--[if mso]>
				</td>
				<![endif]-->
                
				<!--[if mso]>
				</tr>
				</table>
				<![endif]-->
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                        </table>
                        <!--[if (gte mso 9)|(IE)]>
                        </td>
                        </tr>
                        </table>
                        <![endif]-->
                        <!-- // END TEMPLATE -->
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>
`
}

================================================
FILE: .github/workflows/scripts/kit/index.js
================================================
/**
 * This code is centrally managed in https://github.com/asyncapi/.github/
 * Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo
 */
const core = require('@actions/core');
const htmlContent = require('./htmlContent.js');

const sanitizeLinkAndTitle = (link, title) => {
  // Validate inputs to prevent injection attacks
    if (!link || typeof link !== 'string' || link.length > 2000) {
        return core.setFailed('Invalid link parameter');
    }
    if (!title || typeof title !== 'string' || title.length > 500) {
        return core.setFailed('Invalid title parameter');
    }

    let parsedLink;
    try {
        parsedLink = new URL(link);
    } catch (error) {
        return core.setFailed('Invalid link parameter');
    }

    if (parsedLink.protocol !== 'https:') {
        return core.setFailed('Link must use https protocol');
    }

    // Sanitize title by removing control characters and limiting length
    const sanitizedTitle = title.replace(/[\x00-\x1F\x7F]/g, '').substring(0, 250);
    return { sanitizedLink: parsedLink.toString(), sanitizedTitle };
};

module.exports = async (link, title) => {
    const KIT_BASE = 'https://api.kit.com/v4';
    const TSC_TAG_ID = Number(process.env.KIT_TSC_TAG_ID);

    // Schedule 1 minute ahead
    const sendAt = new Date(Date.now() + 60 * 1000);

    const { sanitizedLink, sanitizedTitle } = sanitizeLinkAndTitle(link, title);

    const res = await fetch(`${KIT_BASE}/broadcasts`, {
        method: 'POST',
        headers: {
            'X-Kit-Api-Key': process.env.KIT_API_KEY,
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
            subject: `TSC attention required: ${sanitizedTitle}`,
            preview_text: 'Check out the latest topic that TSC members have to be aware of',
            content: htmlContent(sanitizedLink, sanitizedTitle),
            description: `TSC notification - ${new Date().toUTCString()}`,
            public: false,
            published_at: null,
            send_at: sendAt.toISOString(),
            subscriber_filter: [{ all: [{ type: 'tag', ids: [TSC_TAG_ID] }] }]
        })
    });

    if (!res.ok) return core.setFailed(`Failed creating broadcast: ${await res.text()}`);
    core.info(`Kit.com TSC broadcast scheduled for ${sendAt.toISOString()}`);
};


================================================
FILE: .github/workflows/scripts/kit/package.json
================================================
{
  "name": "schedule-email",
  "description": "Kit.com email broadcast script for TSC notifications. This file is centrally managed in https://github.com/asyncapi/.github/",
  "license": "Apache 2.0",
  "dependencies": {
    "@actions/core": "1.6.0"
  }
}


================================================
FILE: .github/workflows/scripts/mailchimp/htmlContent.js
================================================
/**
 * This code is centrally managed in https://github.com/asyncapi/.github/
 * Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo
 */

/**
 * Escape HTML special characters to prevent XSS
 */
function escapeHtml(text) {
    if (!text) return '';
    return text
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;')
        .replace(/'/g, '&#039;');
}

module.exports = (link, title) => {
    // Sanitize inputs to prevent XSS
    const safeLink = escapeHtml(link);
    const safeTitle = escapeHtml(title);

    return `<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    <head>
        <!-- NAME: SIMPLE TEXT -->
        <!--[if gte mso 15]>
        <xml>
            <o:OfficeDocumentSettings>
            <o:AllowPNG/>
            <o:PixelsPerInch>96</o:PixelsPerInch>
            </o:OfficeDocumentSettings>
        </xml>
        <![endif]-->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>*|MC:SUBJECT|*</title>
        
    <style type="text/css">
		p{
			margin:10px 0;
			padding:0;
		}
		table{
			border-collapse:collapse;
		}
		h1,h2,h3,h4,h5,h6{
			display:block;
			margin:0;
			padding:0;
		}
		img,a img{
			border:0;
			height:auto;
			outline:none;
			text-decoration:none;
		}
		body,#bodyTable,#bodyCell{
			height:100%;
			margin:0;
			padding:0;
			width:100%;
		}
		.mcnPreviewText{
			display:none !important;
		}
		#outlook a{
			padding:0;
		}
		img{
			-ms-interpolation-mode:bicubic;
		}
		table{
			mso-table-lspace:0pt;
			mso-table-rspace:0pt;
		}
		.ReadMsgBody{
			width:100%;
		}
		.ExternalClass{
			width:100%;
		}
		p,a,li,td,blockquote{
			mso-line-height-rule:exactly;
		}
		a[href^=tel],a[href^=sms]{
			color:inherit;
			cursor:default;
			text-decoration:none;
		}
		p,a,li,td,body,table,blockquote{
			-ms-text-size-adjust:100%;
			-webkit-text-size-adjust:100%;
		}
		.ExternalClass,.ExternalClass p,.ExternalClass td,.ExternalClass div,.ExternalClass span,.ExternalClass font{
			line-height:100%;
		}
		a[x-apple-data-detectors]{
			color:inherit !important;
			text-decoration:none !important;
			font-size:inherit !important;
			font-family:inherit !important;
			font-weight:inherit !important;
			line-height:inherit !important;
		}
		#bodyCell{
			padding:10px;
		}
		.templateContainer{
			max-width:600px !important;
		}
		a.mcnButton{
			display:block;
		}
		.mcnImage,.mcnRetinaImage{
			vertical-align:bottom;
		}
		.mcnTextContent{
			word-break:break-word;
		}
		.mcnTextContent img{
			height:auto !important;
		}
		.mcnDividerBlock{
			table-layout:fixed !important;
		}
		body,#bodyTable{
			background-color:#FFFFFF;
			background-image:none;
			background-repeat:no-repeat;
			background-position:center;
			background-size:cover;
		}
		#bodyCell{
			border-top:0;
		}
		.templateContainer{
			border:0;
		}
		h1{
			color:#202020;
			font-family:Helvetica;
			font-size:26px;
			font-style:normal;
			font-weight:bold;
			line-height:125%;
			letter-spacing:normal;
			text-align:left;
		}
		h2{
			color:#202020;
			font-family:Helvetica;
			font-size:22px;
			font-style:normal;
			font-weight:bold;
			line-height:125%;
			letter-spacing:normal;
			text-align:left;
		}
		h3{
			color:#202020;
			font-family:Helvetica;
			font-size:20px;
			font-style:normal;
			font-weight:bold;
			line-height:125%;
			letter-spacing:normal;
			text-align:left;
		}
		h4{
			color:#202020;
			font-family:Helvetica;
			font-size:18px;
			font-style:normal;
			font-weight:bold;
			line-height:125%;
			letter-spacing:normal;
			text-align:left;
		}
		#templateHeader{
			border-top:0;
			border-bottom:0;
		}
		#templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
			color:#202020;
			font-family:Helvetica;
			font-size:16px;
			line-height:150%;
			text-align:left;
		}
		#templateHeader .mcnTextContent a,#templateHeader .mcnTextContent p a{
			color:#007C89;
			font-weight:normal;
			text-decoration:underline;
		}
		#templateBody{
			border-top:0;
			border-bottom:0;
		}
		#templateBody .mcnTextContent,#templateBody .mcnTextContent p{
			color:#202020;
			font-family:Helvetica;
			font-size:16px;
			line-height:150%;
			text-align:left;
		}
		#templateBody .mcnTextContent a,#templateBody .mcnTextContent p a{
			color:#007C89;
			font-weight:normal;
			text-decoration:underline;
		}
		#templateFooter{
			border-top:0;
			border-bottom:0;
		}
		#templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
			color:#202020;
			font-family:Helvetica;
			font-size:12px;
			line-height:150%;
			text-align:left;
		}
		#templateFooter .mcnTextContent a,#templateFooter .mcnTextContent p a{
			color:#202020;
			font-weight:normal;
			text-decoration:underline;
		}
	@media only screen and (min-width:768px){
		.templateContainer{
			width:600px !important;
		}

}	@media only screen and (max-width: 480px){
		body,table,td,p,a,li,blockquote{
			-webkit-text-size-adjust:none !important;
		}

}	@media only screen and (max-width: 480px){
		body{
			width:100% !important;
			min-width:100% !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnRetinaImage{
			max-width:100% !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnImage{
			width:100% !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnCartContainer,.mcnCaptionTopContent,.mcnRecContentContainer,.mcnCaptionBottomContent,.mcnTextContentContainer,.mcnBoxedTextContentContainer,.mcnImageGroupContentContainer,.mcnCaptionLeftTextContentContainer,.mcnCaptionRightTextContentContainer,.mcnCaptionLeftImageContentContainer,.mcnCaptionRightImageContentContainer,.mcnImageCardLeftTextContentContainer,.mcnImageCardRightTextContentContainer,.mcnImageCardLeftImageContentContainer,.mcnImageCardRightImageContentContainer{
			max-width:100% !important;
			width:100% !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnBoxedTextContentContainer{
			min-width:100% !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnImageGroupContent{
			padding:9px !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnCaptionLeftContentOuter .mcnTextContent,.mcnCaptionRightContentOuter .mcnTextContent{
			padding-top:9px !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnImageCardTopImageContent,.mcnCaptionBottomContent:last-child .mcnCaptionBottomImageContent,.mcnCaptionBlockInner .mcnCaptionTopContent:last-child .mcnTextContent{
			padding-top:18px !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnImageCardBottomImageContent{
			padding-bottom:9px !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnImageGroupBlockInner{
			padding-top:0 !important;
			padding-bottom:0 !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnImageGroupBlockOuter{
			padding-top:9px !important;
			padding-bottom:9px !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnTextContent,.mcnBoxedTextContentColumn{
			padding-right:18px !important;
			padding-left:18px !important;
		}

}	@media only screen and (max-width: 480px){
		.mcnImageCardLeftImageContent,.mcnImageCardRightImageContent{
			padding-right:18px !important;
			padding-bottom:0 !important;
			padding-left:18px !important;
		}

}	@media only screen and (max-width: 480px){
		.mcpreview-image-uploader{
			display:none !important;
			width:100% !important;
		}

}	@media only screen and (max-width: 480px){
		h1{
			font-size:22px !important;
			line-height:125% !important;
		}

}	@media only screen and (max-width: 480px){
		h2{
			font-size:20px !important;
			line-height:125% !important;
		}

}	@media only screen and (max-width: 480px){
		h3{
			font-size:18px !important;
			line-height:125% !important;
		}

}	@media only screen and (max-width: 480px){
		h4{
			font-size:16px !important;
			line-height:150% !important;
		}

}	@media only screen and (max-width: 480px){
		table.mcnBoxedTextContentContainer td.mcnTextContent,td.mcnBoxedTextContentContainer td.mcnTextContent p{
			font-size:14px !important;
			line-height:150% !important;
		}

}	@media only screen and (max-width: 480px){
		td#templateHeader td.mcnTextContent,td#templateHeader td.mcnTextContent p{
			font-size:16px !important;
			line-height:150% !important;
		}

}	@media only screen and (max-width: 480px){
		td#templateBody td.mcnTextContent,td#templateBody td.mcnTextContent p{
			font-size:16px !important;
			line-height:150% !important;
		}

}	@media only screen and (max-width: 480px){
		td#templateFooter td.mcnTextContent,td#templateFooter td.mcnTextContent p{
			font-size:14px !important;
			line-height:150% !important;
		}

}</style></head>
    <body style="background:#FFFFFF none no-repeat center/cover;height: 100%;margin: 0;padding: 0;width: 100%;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #FFFFFF;background-image: none;background-repeat: no-repeat;background-position: center;background-size: cover;">
        <!--*|IF:MC_PREVIEW_TEXT|*-->
        <!--[if !gte mso 9]><!----><span class="mcnPreviewText" style="display:none; font-size:0px; line-height:0px; max-height:0px; max-width:0px; opacity:0; overflow:hidden; visibility:hidden; mso-hide:all;">*|MC_PREVIEW_TEXT|*</span><!--<![endif]-->
        <!--*|END:IF|*-->
        <center>
            <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable" style="background:#FFFFFF none no-repeat center/cover;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;height: 100%;margin: 0;padding: 0;width: 100%;background-color: #FFFFFF;background-image: none;background-repeat: no-repeat;background-position: center;background-size: cover;">
                <tr>
                    <td align="left" valign="top" id="bodyCell" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;height: 100%;margin: 0;padding: 10px;width: 100%;border-top: 0;">
                        <!-- BEGIN TEMPLATE // -->
                        <!--[if (gte mso 9)|(IE)]>
                        <table align="center" border="0" cellspacing="0" cellpadding="0" width="600" style="width:600px;">
                        <tr>
                        <td align="center" valign="top" width="600" style="width:600px;">
                        <![endif]-->
                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateContainer" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;border: 0;max-width: 600px !important;">
                            <tr>
                                <td valign="top" id="templateHeader" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;border-top: 0;border-bottom: 0;"><table class="mcnTextBlock" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" valign="top">
              	<!--[if mso]>
				<table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
				<tr>
				<![endif]-->
			    
				<!--[if mso]>
				<td valign="top" width="600" style="width:600px;">
				<![endif]-->
                <table style="max-width: 100%;min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding-top: 0;padding-right: 18px;padding-bottom: 9px;padding-left: 18px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;word-break: break-word;color: #202020;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;" valign="top">
                        
                            Hey *|FNAME|*,<br>
<br>
There is a new topic at AsyncAPI Initiative that requires Technical Steering Committee attention. 
<br>
Please have a look if it is just something you need to be aware of, or maybe your vote is needed.
<br>
Topic: <a href="${ safeLink }" style="color:#007c89;font-weight:normal;text-decoration:underline" target="_blank">${ safeTitle }</a>.
                        </td>
                    </tr>
                </tbody></table>
				<!--[if mso]>
				</td>
				<![endif]-->
                
				<!--[if mso]>
				</tr>
				</table>
				<![endif]-->
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateBody" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;border-top: 0;border-bottom: 0;">
                                <table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnTextBlock" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">

    <tbody class="mcnTextBlockOuter">
        <tr>
            <td valign="top" class="mcnTextBlockInner" style="padding-top: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
              	<!--[if mso]>
				<table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
				<tr>
				<![endif]-->
			    
				<!--[if mso]>
				<td valign="top" width="600" style="width:600px;">
				<![endif]-->
                <table align="left" border="0" cellpadding="0" cellspacing="0" style="max-width: 100%;min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" width="100%" class="mcnTextContentContainer">
                    <tbody><tr>
                        
                        <td valign="top" class="mcnTextContent" style="padding-top: 0;padding-right: 18px;padding-bottom: 9px;padding-left: 18px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;word-break: break-word;color: #202020;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;">
                        
                            Cheers,<br>
AsyncAPI Initiative
                        </td>
                    </tr>
                </tbody></table>
				<!--[if mso]>
				</td>
				<![endif]-->
                
				<!--[if mso]>
				</tr>
				</table>
				<![endif]-->
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateFooter" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;border-top: 0;border-bottom: 0;"><table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnTextBlock" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td valign="top" class="mcnTextBlockInner" style="padding-top: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
              	<!--[if mso]>
				<table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
				<tr>
				<![endif]-->
			    
				<!--[if mso]>
				<td valign="top" width="600" style="width:600px;">
				<![endif]-->
                <table align="left" border="0" cellpadding="0" cellspacing="0" style="max-width: 100%;min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" width="100%" class="mcnTextContentContainer">
                    <tbody><tr>
                        
                        <td valign="top" class="mcnTextContent" style="padding-top: 0;padding-right: 18px;padding-bottom: 9px;padding-left: 18px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;word-break: break-word;color: #202020;font-family: Helvetica;font-size: 12px;line-height: 150%;text-align: left;">
                        
                            Want to change how you receive these emails?<br>
You can <a href="*|UPDATE_PROFILE|*" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #202020;font-weight: normal;text-decoration: underline;">update your preferences</a> or <a href="*|UNSUB|*" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #202020;font-weight: normal;text-decoration: underline;">unsubscribe from this list</a>.<br>
&nbsp;
                        </td>
                    </tr>
                </tbody></table>
				<!--[if mso]>
				</td>
				<![endif]-->
                
				<!--[if mso]>
				</tr>
				</table>
				<![endif]-->
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                        </table>
                        <!--[if (gte mso 9)|(IE)]>
                        </td>
                        </tr>
                        </table>
                        <![endif]-->
                        <!-- // END TEMPLATE -->
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>
`
}

================================================
FILE: .github/workflows/stale-issues-prs.yml
================================================
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

name: Manage stale issues and PRs

on:
  schedule:
  - cron: "0 0 * * *"

permissions: {}

jobs:
  stale:
    if: startsWith(github.repository, 'asyncapi/')
    name: Mark issue or PR as stale
    runs-on: ubuntu-latest
    permissions:
      contents: read            # As delete-branch is not being used
      issues: write             # To add comments and labels to issues
      pull-requests: write      # To add comments and labels to PRs
    steps:
    - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 #v9.1.0 but pointing to commit for security reasons
      with:
        repo-token: ${{ github.token }}
        stale-issue-message: |
          This issue has been automatically marked as stale because it has not had recent activity :sleeping:

          It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. 

          There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under [open governance model](https://github.com/asyncapi/community/blob/master/CHARTER.md). 

          Let us figure out together how to push this issue forward. Connect with us through [one of many communication channels](https://github.com/asyncapi/community/issues/1) we established here.

          Thank you for your patience :heart:
        stale-pr-message: |
          This pull request has been automatically marked as stale because it has not had recent activity :sleeping:

          It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation.

          There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under [open governance model](https://github.com/asyncapi/community/blob/master/CHARTER.md). 

          Let us figure out together how to push this pull request forward. Connect with us through [one of many communication channels](https://github.com/asyncapi/community/issues/1) we established here.

          Thank you for your patience :heart:
        days-before-stale: 120
        days-before-close: 120
        stale-issue-label: stale
        stale-pr-label: stale
        exempt-issue-labels: keep-open
        exempt-pr-labels: keep-open
        close-issue-reason: not_planned


================================================
FILE: .github/workflows/test-action.yml
================================================
name: PR testing of CLI action

on:
  pull_request:
    types: [ opened, synchronize, reopened, ready_for_review ]

jobs:
  should-workflow-run:
    runs-on: ubuntu-latest
    steps:
      - if: >
          !github.event.pull_request.draft && !(
            (github.actor == 'asyncapi-bot' && (
              startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') ||
              startsWith(github.event.pull_request.title, 'chore(release):')
            )) ||
            (github.actor == 'asyncapi-bot-eve' && (
              startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') ||
              startsWith(github.event.pull_request.title, 'chore(release):')
            )) ||
            (github.actor == 'allcontributors[bot]' &&
              startsWith(github.event.pull_request.title, 'docs: add')
            )
          )
        id: should_run
        name: Should Run
        run: echo "shouldrun=true" >> $GITHUB_OUTPUT
    outputs:
      shouldrun: ${{ steps.should_run.outputs.shouldrun }}

  build-docker:
    needs: should-workflow-run
    name: Build Docker image
    if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Get docker version
        id: docker_version
        run: >
          ls -la;
          action=$(cat action.yml);
          regex='docker:\/\/asyncapi\/github-action-for-cli:([0-9.]+)';
          [[ $action =~ $regex ]];
          action_version=${BASH_REMATCH[1]};
          echo "action_version=$action_version" >> $GITHUB_OUTPUT
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3
      - name: Build Docker image and export
        uses: docker/build-push-action@v5
        with:
          context: .
          file: ./github-action/Dockerfile
          tags: asyncapi/github-action-for-cli:${{ steps.docker_version.outputs.action_version }}
          outputs: type=docker,dest=/tmp/asyncapi.tar
      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: asyncapi
          path: /tmp/asyncapi.tar


  test-defaults:
    if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
    runs-on: ubuntu-latest
    needs: [should-workflow-run, build-docker]
    steps:
      - name: Download artifact
        uses: actions/download-artifact@v4
        with:
          name: asyncapi
          path: /tmp
      - name: Load Docker image
        run: |
          docker load --input /tmp/asyncapi.tar
          docker image ls -a
      - uses: actions/checkout@v4
      - name: Remove bin directory to disable developer mode
        run: rm -rf ./bin
      - name: Test GitHub Action
        uses: ./
        with:
          filepath: ./github-action/test/asyncapi.yml
      - name: Assert GitHub Action
        run: |
          echo "Listing all files"
          ls -R
          echo "Asserting GitHub Action"
          if [ -f "./output/asyncapi.md" ]; then
            echo "Files exist"
          else
            echo "Files do not exist:- ./output/asyncapi.md"
            echo "Action failed"
            exit 1
          fi

  test-validate-success:
    if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
    runs-on: ubuntu-latest
    needs: [should-workflow-run, build-docker]
    steps:
      - name: Download artifact
        uses: actions/download-artifact@v4
        with:
          name: asyncapi
          path: /tmp
      - name: Load Docker image
        run: |
          docker load --input /tmp/asyncapi.tar
          docker image ls -a
      - uses: actions/checkout@v4
      - name: Remove bin directory to disable developer mode
        run: rm -rf ./bin
      - name: Test GitHub Action
        uses: ./
        with:
          filepath: ./github-action/test/asyncapi.yml
          command: validate

  test-custom-command:
    if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
    runs-on: ubuntu-latest
    needs: [should-workflow-run, build-docker]
    steps:
      - name: Download artifact
        uses: actions/download-artifact@v4
        with:
          name: asyncapi
          path: /tmp
      - name: Load Docker image
        run: |
          docker load --input /tmp/asyncapi.tar
          docker image ls -a
      - uses: actions/checkout@v4
      - name: Remove bin directory to disable developer mode
        run: rm -rf ./bin
      - name: Test GitHub Action
        uses: ./
        with:
          # Custom command to generate models
          # Note: You can use command itself to generate models, but this is just an example for testing custom commands
          custom_command: "generate models typescript ./github-action/test/asyncapi.yml -o ./output"
      - name: Assert GitHub Action
        run: |
          echo "Listing all files"
          ls -R
          echo "Asserting GitHub Action"
          if [ -f "./output/AnonymousSchema_1.ts" ]; then
            echo "Models have been generated"
          else
            echo "Models have not been generated"
            echo "Action failed"
            exit 1
          fi

  test-custom-output:
    if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
    runs-on: ubuntu-latest
    needs: [should-workflow-run, build-docker]
    steps:
      - name: Download artifact
        uses: actions/download-artifact@v4
        with:
          name: asyncapi
          path: /tmp
      - name: Load Docker image
        run: |
          docker load --input /tmp/asyncapi.tar
          docker image ls -a
      - uses: actions/checkout@v4
      - name: Remove bin directory to disable developer mode
        run: rm -rf ./bin
      - name: Test GitHub Action
        uses: ./
        with:
          filepath: ./github-action/test/asyncapi.yml
          output: custom-output
      - name: Assert GitHub Action
        run: |
          echo "Listing all files"
          ls -R
          echo "Asserting GitHub Action"
          if [ -f "./custom-output/asyncapi.md" ]; then
            echo "Files exist"
          else
            echo "Files do not exist:- ./custom-output/asyncapi.md"
            echo "Action failed"
            exit 1
          fi

  test-file-not-found:
    if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
    runs-on: ubuntu-latest
    needs: [should-workflow-run, build-docker]
    steps:
      - name: Download artifact
        uses: actions/download-artifact@v4
        with:
          name: asyncapi
          path: /tmp
      - name: Load Docker image
        run: |
          docker load --input /tmp/asyncapi.tar
          docker image ls -a
      - uses: actions/checkout@v4
      - name: Remove bin directory to disable developer mode
        run: rm -rf ./bin
      - name: Test GitHub Action
        id: test
        uses: ./
        with:
          filepath: non_existent_file.yml
        continue-on-error: true
      - name: Check for failure
        run: |
          if [ "${{ steps.test.outcome }}" == "success" ]; then
            echo "Test Failure: non_existent_file.yml should throw an error but did not"
            exit 1
          else
            echo "Test Success: non_existent_file.yml threw an error as expected"
          fi

  test-invalid-input:
    if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
    runs-on: ubuntu-latest
    needs: [should-workflow-run, build-docker]
    steps:
      - name: Download artifact
        uses: actions/download-artifact@v4
        with:
          name: asyncapi
          path: /tmp
      - name: Load Docker image
        run: |
          docker load --input /tmp/asyncapi.tar
          docker image ls -a
      - uses: actions/checkout@v4
      - name: Remove bin directory to disable developer mode
        run: rm -rf ./bin
      - name: Test GitHub Action
        id: test
        uses: ./
        with:
          filepath: github-action/test/asyncapi.yml
          command: generate # No template or language specified
          template: '' # Empty string
        continue-on-error: true
      - name: Check for failure
        run: |
          if [ "${{ steps.test.outcome }}" == "success" ]; then
            echo "Test Failure: generate command should throw an error as no template or language specified but did not"
            exit 1
          else
            echo "Test Success: generate command threw an error as expected"
          fi

  test-optimize:
    if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
    runs-on: ubuntu-latest
    needs: [should-workflow-run, build-docker]
    steps:
      - name: Download artifact
        uses: actions/download-artifact@v4
        with:
          name: asyncapi
          path: /tmp
      - name: Load Docker image
        run: |
          docker load --input /tmp/asyncapi.tar
          docker image ls -a
      - uses: actions/checkout@v4
      - name: Remove bin directory to disable developer mode
        run: rm -rf ./bin
      - name: Test GitHub Action
        uses: ./
        with:
          filepath: github-action/test/unoptimized.yml
          command: optimize
          parameters: '-o new-file --no-tty'
      - name: Assert GitHub Action
        run: |
          echo "Listing all files"
          ls -R
          echo "Asserting GitHub Action"
          if [ -f "./github-action/test/unoptimized_optimized.yml" ]; then
            echo "The specified file has been optimized"
          else
            echo "The specified file has not been optimized"
            echo "Action failed"
            exit 1
          fi

  test-bundle:
    if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
    runs-on: ubuntu-latest
    needs: [should-workflow-run, build-docker]
    steps:
      - name: Download artifact
        uses: actions/download-artifact@v4
        with:
          name: asyncapi
          path: /tmp
      - name: Load Docker image
        run: |
          docker load --input /tmp/asyncapi.tar
          docker image ls -a
      - uses: actions/checkout@v4
      - name: Remove bin directory to disable developer mode
        run: rm -rf ./bin
      - name: Make output directory
        run: mkdir -p ./output/bundle
      - name: Test GitHub Action
        uses: ./
        with:
          custom_command: 'bundle ./github-action/test/bundle/asyncapi.yaml ./github-action/test/bundle/features.yaml --base ./github-action/test/bundle/asyncapi.yaml -o ./output/bundle/asyncapi.yaml'
      - name: Assert GitHub Action
        run: |
          echo "Listing all files"
          ls -R
          echo "Asserting GitHub Action"
          if [ -f "./output/bundle/asyncapi.yaml" ]; then
            echo "The specified files have been bundled"
          else
            echo "The specified files have not been bundled"
            echo "Action failed"
            exit 1
          fi

  test-convert:
    if: ${{ needs.should-workflow-run.outputs.shouldrun == 'true' }}
    runs-on: ubuntu-latest
    needs: [should-workflow-run, build-docker]
    steps:
      - name: Download artifact
        uses: actions/download-artifact@v4
        with:
          name: asyncapi
          path: /tmp
      - name: Load Docker image
        run: |
          docker load --input /tmp/asyncapi.tar
          docker image ls -a
      - uses: actions/checkout@v4
      - name: Remove bin directory to disable developer mode
        run: rm -rf ./bin
      - name: Test GitHub Action
        uses: ./
        with:
          command: convert
          filepath: github-action/test/asyncapi.yml
          output: output/convert/asyncapi.yaml
      - name: Assert GitHub Action
        run: |
          echo "Listing all files"
          ls -R
          echo "Asserting GitHub Action"
          if [ -f "./output/convert/asyncapi.yaml" ]; then
            echo "The specified file has been converted"
          else
            echo "The specified file has not been converted"
            echo "Action failed"
            exit 1
          fi


================================================
FILE: .github/workflows/update-docs-in-website.yml
================================================
name: Update latest CLI documentation in the website

on:
  push:
    branches:
      - 'master'
    paths:
      - 'docs/*.md'
  workflow_dispatch:
jobs:
  Make-PR:
    name: Make PR on website repository with updated latest CLI documentation
    runs-on: ubuntu-latest
    env:
      GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
    steps:
      - name: Checkout Current repository
        uses: actions/checkout@v3
        with:
          path: cli
      - name: Checkout Another repository
        uses: actions/checkout@v3
        with:
          repository: asyncapi/website
          path: website
          token: ${{ env.GITHUB_TOKEN }}
      - name: Config git
        run: |
          git config --global user.name asyncapi-bot
          git config --global user.email info@asyncapi.io
      - name: Create branch
        working-directory: ./website
        run: |
          git checkout -b update-cli-docs-${{ github.sha }}
      - name: Copy cli folder from Current Repo to Another
        working-directory: ./website
        run: |
          mkdir -p ./markdown/docs/tools/cli
          printf "%s\ntitle: CLI\nweight: 10\n%s" "---" "---"> ../cli/docs/_section.md
          mv ../cli/docs/*.md ./markdown/docs/tools/cli
      - name: Commit and push
        working-directory: ./website
        run: |
          git add .
          git commit -m "docs(cli): update latest cli docs"
          git push https://${{ env.GITHUB_TOKEN }}@github.com/asyncapi/website
      - name: Create PR
        working-directory: ./website
        run: |
          gh pr create --title "docs(cli): update latest cli documentation" --body "Updated cli documentation is available and this PR introduces update to cli folder on the website" --head "update-cli-docs-${{ github.sha }}"


================================================
FILE: .github/workflows/update-docs-on-docs-commits.yml
================================================
# This workflow is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# The given workflow is responsible for generating docs and creating PR with them when there is a commit with docs: prefix

# This workflow will be updated in all repos with the topic get-global-docs-autoupdate

name: 'Update generated parts of documentation on docs: commits'

on:
  push:
    branches:
      - master

jobs:
  docs-gen:
    name: 'Generate docs and create PR'
    runs-on: ubuntu-latest
    # PR should be created within this GH action only if it is a docs: commit
    # Otherwise it will conflict with release workflow
    if: startsWith(github.event.commits[0].message, 'docs:')
    steps:
      - name: Checkout repo
        uses: actions/checkout@v4
      - name: Determine what node version to use
        # This workflow is from our own org repo and safe to reference by 'master'.
        uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master # //NOSONAR
        with:
          node-version: ${{ vars.NODE_VERSION }}
        id: lockversion
      - name: Use Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "${{ steps.lockversion.outputs.version }}"
          cache: 'npm'
          cache-dependency-path: '**/package-lock.json'
      - name: Install dependencies
        run: npm ci
      - name: Regenerate docs
        run: npm run generate:assets --if-present
      - name: Create Pull Request with updated docs
        uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # uses 7.0.8 https://github.com/peter-evans/create-pull-request/releases/tag/v7.0.8
        with:
          token: ${{ secrets.GH_TOKEN }}
          commit-message: 'chore: update generated docs'
          committer: asyncapi-bot <info@asyncapi.io>
          author: asyncapi-bot <info@asyncapi.io>
          title: 'chore: update generated docs'
          body: 'Update of docs that are generated and were forgotten on PR level.'
          branch: gen-docs-update/${{ github.job }}
      - name: Report workflow status to Slack
        if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
        uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 #using https://github.com/8398a7/action-slack/releases/tag/v3.16.2
        with:
          status: ${{ job.status }}
          fields: repo,action,workflow
          text: 'AsyncAPI docs generation workflow failed'
          author_name: asyncapi-bot
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}     

================================================
FILE: .github/workflows/update-maintainers-trigger.yaml
================================================
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

name: Trigger MAINTAINERS.yaml file update

on:
  push:
    branches: [ master ]
    paths:
      # Check all valid CODEOWNERS locations: 
      # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-file-location
      - 'CODEOWNERS'
      - '.github/CODEOWNERS'
      - '.docs/CODEOWNERS'

permissions: 
  contents: read            # Just to limit GITHUB_TOKEN as we use GH_TOKEN only

jobs:
  trigger-maintainers-update:
    name: Trigger updating MAINTAINERS.yaml because of CODEOWNERS change
    runs-on: ubuntu-latest
    
    steps:
      - name: Repository Dispatch
        uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # https://github.com/peter-evans/repository-dispatch/releases/tag/v3.0.0
        with:
          # The PAT with the 'public_repo' scope is required
          token: ${{ secrets.GH_TOKEN }}
          repository: ${{ github.repository_owner }}/community
          event-type: trigger-maintainers-update


================================================
FILE: .github/workflows/update-pr.yml
================================================
# This workflow is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

# This workflow will run on every comment with /update or /u. And will create merge-commits for the PR.
# This also works with forks, not only with branches in the same repository/organization.
# Currently, does not work with forks in different organizations.

# This workflow will be distributed to all repositories in the AsyncAPI organization

name: Update PR branches from fork

permissions:
  contents: read

on:
  issue_comment: 
    types: [created]

jobs:
  update-pr:
    name: Update the fork PR with upstream changes
    if: >
      startsWith(github.repository, 'asyncapi/') &&
      github.event.issue.pull_request && 
      github.event.issue.state != 'closed' && (
        contains(github.event.comment.body, '/update') ||
        contains(github.event.comment.body, '/u')
      )
    runs-on: ubuntu-latest
    permissions:
      issues: write                     # Required to read PR details and post comments on the PR
      pull-requests: write              # Required to update the PR branch 
      contents: read
    steps:
      - name: Get Pull Request Details
        id: pr
        uses: actions/github-script@v7
        with:
          github-token: ${{ secrets.GH_TOKEN || github.token }}
          previews: 'merge-info-preview' # https://docs.github.com/en/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview
          script: |
            const prNumber = context.payload.issue.number;
            core.debug(`PR Number: ${prNumber}`);
            const { data: pr } = await github.rest.pulls.get({
              owner: context.repo.owner,
              repo: context.repo.repo,
              pull_number: prNumber
            });

            // If the PR has conflicts, we don't want to update it
            const updateable = ['behind', 'blocked', 'unknown', 'draft', 'clean', 'unstable'].includes(pr.mergeable_state);
            console.log(`PR #${prNumber} is ${pr.mergeable_state} and is ${updateable ? 'updateable' : 'not updateable'}`);
            core.setOutput('updateable', updateable);

            core.debug(`Updating PR #${prNumber} with head ${pr.head.sha}`);

            return {
              id: pr.node_id,
              number: prNumber,
              head: pr.head.sha,
            }
      - name: Update the Pull Request
        if: steps.pr.outputs.updateable == 'true'
        uses: actions/github-script@v7
        env:
          PR_DETAILS: ${{ steps.pr.outputs.result }}
        with:
          github-token: ${{ secrets.GH_TOKEN || github.token }}
          script: |
            const mutation = `mutation update($input: UpdatePullRequestBranchInput!) {
              updatePullRequestBranch(input: $input) {
                pullRequest {
                  mergeable
                }
              }
            }`;

            const pr_details = JSON.parse(process.env.PR_DETAILS);

            try {
              const { data } = await github.graphql(mutation, {
                input: {
                  pullRequestId: pr_details.id,
                  expectedHeadOid: pr_details.head,
                }
              });
            } catch (GraphQLError) {
              core.debug(GraphQLError);
              if (
                GraphQLError.name === 'GraphqlResponseError' &&
                GraphQLError.errors.some(
                  error => error.type === 'FORBIDDEN' || error.type === 'UNAUTHORIZED'
                )
              ) {
                // Add comment to PR if the bot doesn't have permissions to update the PR
                const comment = `Hi @${context.actor}. Update of PR has failed. It can be due to one of the following reasons:
                -  I don't have permissions to update this PR. To update your fork with upstream using bot you need to enable [Allow edits from maintainers](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) option in the PR. 
                -  The fork is located in an organization, not under your personal profile. No solution for that. You are on your own with manual update.
                -  There may be a conflict in the PR. Please resolve the conflict and try again.`;

                await github.rest.issues.createComment({
                  owner: context.repo.owner,
                  repo: context.repo.repo,
                  issue_number: context.issue.number,
                  body: comment
                });

                core.setFailed('Bot does not have permissions to update the PR');
              } else {
                core.setFailed(GraphQLError.message);
              }
            }


================================================
FILE: .github/workflows/upload-release-assets.yml
================================================
name: Upload custom assets to GitHub release

on:
  release:
    types:
      - published

env:
  CI: true

jobs:
  upload-assets:
    name: Generate and upload assets
    runs-on: ${{ matrix.os }}
    continue-on-error: true
    strategy:
      matrix:
        include:
          - os: ubuntu-latest
            npm_script: pack:linux
            dist_folder: deb
            extension: deb
          - os: ubuntu-latest
            npm_script: pack:tarballs
            dist_folder: tar
            extension: tar.gz
          - os: ubuntu-latest
            npm_script: pack:tarballs:alpine
            dist_folder: tar
            extension: alpine.tar.gz
            container: 'node:20-alpine'
            alpine: true
          - os: ubuntu-latest
            npm_script: pack:windows
            dist_folder: win32
            extension: x64.exe
          - os: ubuntu-latest
            npm_script: pack:windows
            dist_folder: win32
            extension: x86.exe
          - os: macos-latest
            npm_script: pack:macos
            dist_folder: macos
            extension: arm64.pkg
          - os: macos-latest
            npm_script: pack:macos
            dist_folder: macos
            extension: x64.pkg
    
    container: ${{ matrix.container }}
    
    steps:
      - name: Install base tools for alpine container
        if: matrix.container == 'node:20-alpine'
        run: |
          apk add --no-cache bash git python3 make g++ perl-utils xz

      - name: Checkout repository
        uses: actions/checkout@v4

      # Needed to avoid "fatal: detected dubious ownership in repository" error when using alpine container
      - name: Mark GitHub workspace as safe
        if: matrix.container == 'node:20-alpine'
        run: |
          git config --global --add safe.directory "$GITHUB_WORKSPACE"

      
      - name: Check package-lock version
        if: matrix.container == ''
        uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
        id: lockversion
        with:
          node-version: ${{ vars.NODE_VERSION }}
      
      - name: Setup Node.js
        if: matrix.container == ''
        uses: actions/setup-node@v6
        with:
          node-version: "${{ steps.lockversion.outputs.version }}"

      - name: Get version from package.json
        uses: actions/github-script@v6
        id: extractver
        with:
          script: |
            const packageJson = require('./package.json');
            const packageJsonVersion = packageJson.version;
            core.setOutput('version', packageJsonVersion);
      - if: matrix.npm_script == 'pack:windows'
        #fix for windows build issue #1433
        name: Install p7zip-full nsis
        run: sudo apt-get install -y p7zip-full nsis

      - if: matrix.npm_script == 'pack:windows'
        #npm cli 10 is buggy because of some cache issue
        name: Install npm cli 10
        shell: bash
        run: npm install -g npm@latest
      - name: Install dependencies
        run: npm ci
      - name: Build project
        shell: bash
        run: npm run prepublishOnly
      - name: Assets generation
        shell: bash
        run: |
          npm run ${{ matrix.npm_script }}
          if [[ "${{ matrix.alpine }}" == "true" ]]; then
            npm run pack:rename alpine
          else
            npm run pack:rename
          fi
      
      - name: Update release
        uses: softprops/action-gh-release@v1
        with:
          files: dist/${{ matrix.dist_folder }}/asyncapi.${{ matrix.extension }}
          tag_name: v${{ steps.extractver.outputs.version }}
          token: ${{ secrets.GH_TOKEN }}
      - if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
        name: Report workflow run status to Slack
        uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 #using https://github.com/8398a7/action-slack/releases/tag/v3.15.1
        with:
          status: ${{ job.status }}
          fields: repo,action,workflow
          text: 'AsyncAPI CLI release build artifacts failed'
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}

================================================
FILE: .github/workflows/welcome-first-time-contrib.yml
================================================
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

name: Welcome first time contributors

on:
  pull_request:
    types: 
      - opened
  issues:
    types:
      - opened

permissions:
  issues: read                  # Required to check if the issue is the user's first contribution
  pull-requests: read           # Required to check if the pull request is the user's first contribution

jobs:
  welcome:
    name: Post welcome message
    if: ${{ !contains(fromJson('["asyncapi-bot", "dependabot[bot]", "dependabot-preview[bot]", "allcontributors[bot]"]'), github.actor) }} # zizmor: ignore[obfuscation]
    runs-on: ubuntu-latest
    permissions:
      contents: read            # Required to read repository data for checking if it's the user's first contribution
      issues: write             # Required to post welcome message on issues
      pull-requests: write      # Required to post welcome message on pull requests
    steps:
    - uses: actions/github-script@v7
      with:
        github-token: ${{ github.token }}
        script: |
          const issueMessage = `Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our [contributors guide](https://github.com/asyncapi/community/blob/master/CONTRIBUTING.md) and the instructions about a [basic recommended setup](https://github.com/asyncapi/community/blob/master/git-workflow.md) useful for opening a pull request.<br />Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115).`;
          const prMessage = `Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our [contributors guide](https://github.com/asyncapi/community/blob/master/CONTRIBUTING.md) useful for opening a pull request.<br />Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115).`;
          if (!issueMessage && !prMessage) {
              throw new Error('Action must have at least one of issue-message or pr-message set');
          }
          const isIssue = !!context.payload.issue;
          let isFirstContribution;
          if (isIssue) {
              const query = `query($owner:String!, $name:String!, $contributer:String!) {
              repository(owner:$owner, name:$name){
                issues(first: 1, filterBy: {createdBy:$contributer}){
                  totalCount
                }
              }
            }`;
            const variables = {
              owner: context.repo.owner,
              name: context.repo.repo,
              contributer: context.payload.sender.login
            };
            const { repository: { issues: { totalCount } } } = await github.graphql(query, variables);
            isFirstContribution = totalCount === 1;
          } else {
              const query = `query($qstr: String!) {
                search(query: $qstr, type: ISSUE, first: 1) {
                   issueCount
                 }
              }`;
            const variables = {
              "qstr": `repo:${context.repo.owner}/${context.repo.repo} type:pr author:${context.payload.sender.login}`,
            };
            const { search: { issueCount } } = await github.graphql(query, variables);
            isFirstContribution = issueCount === 1;
          }
          
          if (!isFirstContribution) {
              console.log(`Not the users first contribution.`);
              return;
          }
          const message = isIssue ? issueMessage : prMessage;
          // Add a comment to the appropriate place
          if (isIssue) {
              const issueNumber = context.payload.issue.number;
              console.log(`Adding message: ${message} to issue #${issueNumber}`);
              await github.rest.issues.createComment({
                  owner: context.payload.repository.owner.login,
                  repo: context.payload.repository.name,
                  issue_number: issueNumber,
                  body: message
              });
          }
          else {
            const pullNumber = context.payload.pull_request.number;
              console.log(`Adding message: ${message} to pull request #${pullNumber}`);
              await github.rest.pulls.createReview({
                  owner: context.payload.repository.owner.login,
                  repo: context.payload.repository.name,
                  pull_number: pullNumber,
                  body: message,
                  event: 'COMMENT'
              });
          }


================================================
FILE: .gitignore
================================================
*-debug.log
*-error.log
.DS_Store
.idea
/.nyc_output
/dist
/dist/
/lib
/node_modules/
/tmp
/yarn.lock
/assets/examples/**
!assets/examples/default-example.yaml
!assets/examples/tutorial.yml'
!assets/examples/default-example.json
node_modules
/test/integration/generate/models/
test.asyncapi-cli
asyncapi.json
test/fixtures/minimaltemplate/__transpiled
test/fixtures/newtemplate/__transpiled
test/fixtures/specification-conv.yml
test/fixtures/specification-conv.yaml
test/fixtures/specification-conv.json
.vscode
src/domains/models/generate/ClientLanguages.ts

/action/
/github-action/output/

oclif.manifest.json
spec-examples.zip

# Coverage for testing

coverage
.asyncapi-analytics

# Analytics

.asyncapi-analytics

# Modelina
test/fixtures/generate/models


================================================
FILE: .prettierrc
================================================
{
    "singleQuote": true
}

================================================
FILE: .sonarcloud.properties
================================================
sonar.exclusions=test/**/*,Dockerfile,github-action/Dockerfile
sonar.issue.ignore.multicriteria=e1,e2

# Exclude copy recursively and root user issue in Dockerfile
sonar.issue.ignore.multicriteria.e1.ruleKey=docker:S6470
sonar.issue.ignore.multicriteria.e1.resourceKey=**/Dockerfile

sonar.issue.ignore.multicriteria.e2.ruleKey=docker:S6471
sonar.issue.ignore.multicriteria.e2.resourceKey=**/Dockerfile


================================================
FILE: CHANGELOG.md
================================================
# @asyncapi/cli

## 6.0.0

### Major Changes

- 7580cee: Removal of postman -> asyncapi conversion functionality

  ## ⚠ BREAKING CHANGES

  Remove postman conversion utilities due to unmaintained dependencies and compatibility issues.

  **Why this change?**
  - The `postman2openapi` dependency causes multiple issues due to its WASM involvement
  - WASM file loading causes browser compatibility issues after webpack updates
  - Alternative libraries like `postman-to-openapi` did not provide adequate functionality
  - The underlying dependencies are unmaintained and pose long-term maintenance risks

  **Impact:**
  - The `convert` command no longer supports postman format conversion
  - Users relying on postman conversion will need to find alternative solutions

  **Future:**
  We can consider re-adding this feature after community discussion and establishing a sustainable maintenance plan with actively maintained dependencies.

  Related: https://github.com/asyncapi/converter-js/pull/311

## 5.0.7

### Patch Changes

- 72fd21f: Bump @asyncapi/generator from v3.1.0 &rarr; v3.1.1

## 5.0.6

### Patch Changes

- a414293: - Updated `@asyncapi/generator` from `3.0.1` → `3.1.0`

## 5.0.5

### Patch Changes

- be7c41d: chore: bump Node.js version to 24 in remaining Dockerfiles

## 5.0.4

### Patch Changes

- cacf566: Update server-api image to use Node 24.

## 5.0.3

### Patch Changes

- 125e907: Update dependencies to the latest feasible ones thus eliminating vulnerabilities.

## 5.0.2

### Patch Changes

- 4073175: - Alpine Releases have been fixed now.
  - Smaller docker image sizes and pruned dependencies.

## 5.0.1

### Patch Changes

- 394967f: fix: remove unnecessary await from startPreview call

  The startPreview function returns void, not a Promise, so awaiting it
  was incorrect and triggered a linter error. This matches the pattern
  used in the studio command.

## 5.0.0

### Major Changes

- dac7bb4: Removed support for AsyncAPI Generator v1 and v2. The CLI now exclusively uses Generator v3. The `--use-new-generator` flag has been removed from the `generate fromTemplate` command.

- b90a9b7: ## Major release with important security updates
  - Keeping in mind the recent Shai-Hulud attack, we have adopted trusted publishing with NPM.
  - This requires us to use node >= 24 and npm >= 11
  - Next.js version is in sync with Studio, and is currently 14.2.35 deemed safe by CVE. [For more details](https://nextjs.org/blog/CVE-2025-66478)

  ### Breaking Changes
  - Node.js version 24 or higher is now required.
  - NPM version 11 or higher is now required.
  - Next.js version is now 14.2.35 or higher.
  - The CLI now exclusively uses Generator v3 only.
  - The `--use-new-generator` flag has been removed from the `generate fromTemplate` command.
  - Default template in action has been upgraded to `@asyncapi/markdown-template@2.0.0`

  Please make sure to update your environment accordingly before upgrading to this version.

### Minor Changes

- c648614: Studio updated to 1.1.0 with Next.js 14.2.35 in https://github.com/asyncapi/cli/pull/1922/changes

## 4.1.3

### Patch Changes

- a77940f: fix: show the correct path to the newly created optimized file
  - e16ebf5: fix: show the correct path to the newly created optimized file

## 4.1.2

### Patch Changes

- df62a63: fix: generate optimized output corresponding to the input format
  - c756765: fix: generate optimized output corresponding to the input format

## 4.1.1

### Patch Changes

- 8eca9ed: fix: update redoc
  - adde5d4: chore: update redoc

  Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>

## 4.1.0

### Minor Changes

- 70761f0: feat: add new custom resolver to fetch the reference from private repo
  - 88ceb3d: add new custom resolver to fetch the reference from private repo
  - 4974358: Update src/domains/services/validation.service.ts

  Co-authored-by: Fran Méndez <fmvilas@gmail.com>
  - c764ee6: update instruction in the test case for the validation success
  - 2b9457f: fix test-cases
  - 86bbfc4: fix lint issue across the project
  - 6813ef0: Update 1875.md

## 4.0.1

### Patch Changes

- 9b479fc: fix: lockfile fixed
  - 92bb81b: fix:lockfile fixed

  Signed-off-by: Tushar Anand <tusharannand@gmail.com>

## 4.0.0

### Major Changes

- 9d05d49: feat!: tests, flags and glee command code removed
  - 7df684f: chore: major tests flags and glee command code removed

  Signed-off-by: Tushar Anand <tusharannand@gmail.com>
  - 4a94f51: chore:glee removal complete

  Signed-off-by: Tushar Anand <tusharannand@gmail.com>

## 3.6.0

### Minor Changes

- ca8101f: feat: output flag renamed and writing to file functionality added to diff command
  - 8c2e940: fix:parse flag output renamed to save-output and saving diff output to file functionality added to diff command

  Signed-off-by: Tushar Anand <tusharannand@gmail.com>
  - 59e1df9: chore:tests added for flags save-output in validate and diff command

  Signed-off-by: Tushar Anand <tusharannand@gmail.com>
  - 7228a36: chore:cleanup

  Signed-off-by: Tushar Anand <tusharannand@gmail.com>
  - ccb5388: chore:cleanup

  Signed-off-by: Tushar Anand <tusharannand@gmail.com>

## 3.5.2

### Patch Changes

- bbc9451: fix: server-api deploy
  - 837be8a: fix: server-api release and deployment

  Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>
  - 09af23e: chore: add app platform spec

  Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>
  - a5eef9f: chore: install generator templates globally

  Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>

## 3.5.1

### Patch Changes

- 5a99f6f: fix: modify api:build script to generate languages
  - 9488a1b: fix: modify script to generate languages

  Updated the 'api:build' script to include language generation.

## 3.5.0

### Minor Changes

- 129f531: Introduced a new `asyncapi generate client` command to the CLI.

  This command allows you to generate client libraries using the new **AsyncAPI Generator** baked-in templates. Read more about [baked-in templates in official documentation](https://www.asyncapi.com/docs/tools/generator/baked-in-templates).

  This feature is based on a new concept introduced in [AsyncAPI Generator version 2.8.3](https://github.com/asyncapi/generator/releases/tag/%40asyncapi%2Fgenerator%402.8.3). The number of templates is limited and the solution is still in the experimental phase. It is not recommended to use them in production. Instead, join us in the [Generator project](https://github.com/asyncapi/generator) to help improve templates with your use cases and your AsyncAPI documents.

## 3.4.2

### Patch Changes

- d832abc: Fixes the dependencies and package-lock.json

## 3.4.2

### Patch Changes

- 80dcadd: fix: get server-api release ready
  - 35248ba: chore: fix server-api release

  Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>
  - 4dcdd02: fix: get server-api release ready

  Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>

## 3.4.1

### Patch Changes

- e2a3583: fix: made studio start on different port if one is already in use
  - 43a8cb8: fix: made studio start on differnt port if one is already in use

  Signed-off-by: Tushar Anand <tusharannand@gmail.com>
  - ce4b061: Merge remote-tracking branch 'remote/master' into fix-studio-multiple-instance
  - 122812a: chore: new approach for port allocation done

  Signed-off-by: Tushar Anand <tusharannand@gmail.com>
  - 5946001: fix: removed comment and fix linting errors

  Signed-off-by: Tushar Anand <tusharannand@gmail.com>

## 3.4.0

### Minor Changes

- 6b00166: feat: asyncapi release for alpine distros
  - 54ba750: feat: asyncapi on alpine distros
  - 44d72c3: fix: rename the scripts to use rename instead of tarballs

## 3.3.0

### Minor Changes

- c944268: feat: refactor CLI to be service based and initial migration of server-api
  - ac95777: feat: refactor cli to be service based and migrate server-api

  Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>
  - 6b925f4: chore: fix diff test

  Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>
  - cfe6e8d: feat: add generator controller

  Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>
  - b2d7bcc: chore: don't need to install everytime

  Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>
  - dd71d22: Merge remote-tracking branch 'origin/master' into refactor
  - 1fd1216: fix: linting

  Signed-off-by: Ashish Padhy <ashishpadhy1729@gmail.com>
  - 6bd3e73: chore: run prettier

  Signed-off-by: Ashish Padhy <ashishpadhy1729@gmail.com>
  - ca3fdee: chore: run linter

  Signed-off-by: Ashish Padhy <ashishpadhy1729@gmail.com>
  - 1d03d79: chore: quick startup of server-api

  Signed-off-by: Shurtu-gal <ashishpadhy1729@gmail.com>
  - 13729bb: chore: rename to apps

  Signed-off-by: Ashish Padhy <ashishpadhy1729@gmail.com>
  - cdd2a43: chore: rename npm commands

  Signed-off-by: Ashish Padhy <ashishpadhy1729@gmail.com>
  - 90aca02: Merge remote-tracking branch 'remote/master' into refactor

## 3.2.0

### Minor Changes

- 0754d1d: feat: add new feature to supress the warnings
  - ab94c15: Add a new flag that is --x-suppress-warnings to supress the warning in the validate command
  - 55819cd: Allow to pass multiple warnings to supress and add check to verify the warning is correct or not
  - 885fc71: Update src/core/parser.ts

  Co-authored-by: Souvik De <souvikde.ns@gmail.com>
  - 16b22de: Update src/core/flags/validate.flags.ts

  Co-authored-by: Souvik De <souvikde.ns@gmail.com>
  - de1caad: Add another flag to supressallwarnings and update test case

## 3.1.1

### Patch Changes

- 152c272: feat: made the start studio command interactive along with addition of…
  - 0e8e3c1: feat: made the start studio command inteactive along with addition of a flag to disable prompt.

## 3.1.0

### Minor Changes

- d17aa54: feat: new command `asyncapi start preview` has been added

## 3.0.1

### Patch Changes

- 1b62a66: - Fixes script detection issue in version 3.0.0
  - Fixes testing by testing the github action with local CLI

## 3.0.0

### Major Changes

- b6f8b82: feat: add autocomplete feature in cli

## 2.17.0

### Minor Changes

- f0268d4: Remove `--renderer` flag and make `React` as the de-facto renderer, deprecating `Nunjucks`

## 2.16.10

### Patch Changes

- e11fe05: fix: Wrong Error message in -h command #1725

## 2.16.9

### Patch Changes

- 819b585: [Fix]: Json file supported in asyncapi new file command
- 830fe82: Fix studio not opening in CLI studio command
- 830fe82: fix: studio command not working

## 2.16.8

### Patch Changes

- 460c99a: feat: use next.js version of studio
- 460c99a: Upgrade studio to latest and allow use of next server

## 2.16.7

### Patch Changes

- 6ca17b3: fix: update packages to latest stable version

## 2.16.6

### Patch Changes

- 82b441f: fix: resolve error in AsyncAPI optimize

## 2.16.5

### Patch Changes

- f873423: docs: update docs regarding asyncapi new command
- 2deeb36: fix: print in cli asyncapi generate models without -o flag

## 2.16.4

### Patch Changes

- 67d7e8f: fix: proxy implementation for optimize validate and convert fixed

## 2.16.3

### Patch Changes

- cec8081: feat: added Proxy support for the generate commands.

## 2.16.2

### Patch Changes

- 755339a: feat: change the implementation of new command

## 2.16.1

### Patch Changes

- 3ab019f: chore(deps): bump jsonpath-plus and @stoplight/spectral-core
- 07514e6: implemented new UI/UX improvements in config command
- a774ae2: fix: starting of studio fixed when using example with new file

## 2.16.0

### Minor Changes

- a37e124: Deprecate the --file flag in `start studio` command

## 2.15.0

### Minor Changes

- dcfb8c7: fix: Remove unused package lodash.template

## 2.14.1

### Patch Changes

- 08afb45: Prepare github action for release
- da64c63: ci: bump artifact actions to v4

## 2.14.0

### Minor Changes

- 6839c8f: - Changed docker build to a source code based build
  - Changed name of github action to avoid clash
  - Fixed Docker and Release Pipeline

## 2.13.1

### Patch Changes

- 8ae33c4: Handle AsyncAPI v3 in diff command

## 2.13.0

### Minor Changes

- a76b0fb: Add github-action to monorepo and set up changesets

### Patch Changes

- 81b925e: Updated README with Development.md file


================================================
FILE: CODEOWNERS
================================================
# This file provides an overview of code owners in this repository.

# Each line is a file pattern followed by one or more owners.
# The last matching pattern has the most precedence.
# For more details, read the following article on GitHub: https://help.github.com/articles/about-codeowners/.

# The default owners are automatically added as reviewers when you open a pull request unless different owners are specified in the file.
* @Souvikns @Amzani @Shurtu-gal @asyncapi-bot-eve @AayushSaini101


================================================
FILE: CODE_OF_CONDUCT.md
================================================

# Contributor Covenant 3.0 Code of Conduct

## Our Pledge

We pledge to make our community welcoming, safe, and equitable for all.

We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.

## Encouraged Behaviors

While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.

With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:

1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
2. Engaging **kindly and honestly** with others.
3. Respecting **different viewpoints** and experiences.
4. **Taking responsibility** for our actions and contributions.
5. Gracefully giving and accepting **constructive feedback**.
6. Committing to **repairing harm** when it occurs.
7. Behaving in other ways that promote and sustain the **well-being of our community**.


## Restricted Behaviors

We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.

1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
7. Behaving in other ways that **threaten the well-being** of our community.

### Other Restrictions

1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.


## Reporting an Issue

Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.

When an incident does occur, it is important to report it promptly. To report a possible violation, here are a few simple ways to do it:  

- Join our [AsyncAPI Slack](https://asyncapi.com/slack-invite) and share your report in the `#coc` channel.  
- Reach out directly to any member of the [Code of Conduct Committee](https://github.com/orgs/asyncapi/teams/code_of_conduct).
- Or, if you’d prefer, just send us an email at **conduct@asyncapi.com**.

Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.


## Addressing and Repairing Harm

****

If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.

1) Warning
   1) Event: A violation involving a single incident or series of incidents.
   2) Consequence: A private, written warning from the Community Moderators.
   3) Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
2) Temporarily Limited Activities
   1) Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
   2) Consequence: A private, written warning with a time-limited coold
Download .txt
gitextract_blnuhiyp/

├── .all-contributorsrc
├── .asyncapi-tool
├── .changeset/
│   └── config.json
├── .dockerignore
├── .editorconfig
├── .gitattributes
├── .github/
│   └── workflows/
│       ├── add-good-first-issue-labels.yml
│       ├── automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml
│       ├── automerge-for-humans-merging.yml
│       ├── automerge-for-humans-remove-ready-to-merge-label-on-edit.yml
│       ├── automerge-orphans.yml
│       ├── automerge.yml
│       ├── autoupdate.yml
│       ├── bounty-program-commands.yml
│       ├── bump-homebrew-formula.yml
│       ├── bump.yml
│       ├── deploy/
│       │   └── chocolatey/
│       │       ├── asyncapi-cli.nuspec
│       │       ├── replace.ps1
│       │       └── tools/
│       │           └── chocolateyinstall.ps1
│       ├── help-command.yml
│       ├── if-docker-pr-testing.yml
│       ├── if-nodejs-pr-testing.yml
│       ├── issues-prs-notifications.yml
│       ├── lint-pr-title.yml
│       ├── notify-tsc-members-mention.yml
│       ├── please-take-a-look-command.yml
│       ├── release-announcements.yml
│       ├── release-chocolatey.yml
│       ├── release-docker.yml
│       ├── release-server-api.yml
│       ├── release-with-changesets.yml
│       ├── scripts/
│       │   ├── README.md
│       │   ├── kit/
│       │   │   ├── htmlContent.js
│       │   │   ├── index.js
│       │   │   └── package.json
│       │   └── mailchimp/
│       │       └── htmlContent.js
│       ├── stale-issues-prs.yml
│       ├── test-action.yml
│       ├── update-docs-in-website.yml
│       ├── update-docs-on-docs-commits.yml
│       ├── update-maintainers-trigger.yaml
│       ├── update-pr.yml
│       ├── upload-release-assets.yml
│       └── welcome-first-time-contrib.yml
├── .gitignore
├── .prettierrc
├── .sonarcloud.properties
├── CHANGELOG.md
├── CODEOWNERS
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── DEVELOPMENT.md
├── Dockerfile
├── LICENSE
├── NOTICE
├── README.md
├── action-template.yml
├── action.yml
├── assets/
│   ├── create-template/
│   │   └── templates/
│   │       └── default/
│   │           ├── asyncapi.yaml
│   │           ├── package.json
│   │           ├── readme.md
│   │           └── template/
│   │               └── index.js
│   └── examples/
│       ├── default-example.json
│       └── default-example.yaml
├── bin/
│   ├── dev
│   ├── dev.cmd
│   ├── run
│   ├── run.cmd
│   ├── run_bin
│   └── run_bin.cmd
├── docs/
│   ├── architecture.md
│   ├── autocompleteEnabled.md
│   ├── context.md
│   ├── contributing-prs.md
│   ├── debugging-testing.md
│   ├── github-action.md
│   ├── index.md
│   ├── installation.md
│   ├── metrics_collection.md
│   └── usage.md
├── eslint.config.mjs
├── github-action/
│   ├── .asyncapi-tool
│   ├── Dockerfile
│   ├── Makefile
│   ├── README.md
│   ├── bump-test.sh
│   ├── entrypoint.sh
│   ├── lib/
│   │   └── bump-action-version.js
│   └── test/
│       ├── asyncapi.yml
│       ├── bundle/
│       │   ├── asyncapi.yaml
│       │   ├── features.yaml
│       │   └── messages.yaml
│       ├── dummy.yml
│       ├── specification-invalid.yml
│       ├── unoptimized.yml
│       └── unoptimized_optimized.yml
├── jest.config.ts
├── nodemon.json
├── openapi.yaml
├── package.json
├── scripts/
│   ├── enableAutoComplete.js
│   ├── fetch-asyncapi-example.js
│   ├── generateTypesForGenerateCommand.js
│   ├── releasePackagesRename.js
│   └── updateUsageDocs.js
├── src/
│   ├── apps/
│   │   ├── api/
│   │   │   ├── .do/
│   │   │   │   ├── app.yaml
│   │   │   │   └── apps/
│   │   │   │       ├── .gitignore
│   │   │   │       ├── .terraform.lock.hcl
│   │   │   │       └── main.tf
│   │   │   ├── Dockerfile
│   │   │   ├── README.md
│   │   │   ├── app.ts
│   │   │   ├── configs/
│   │   │   │   ├── development.json
│   │   │   │   ├── production.json
│   │   │   │   └── test.json
│   │   │   ├── constants.ts
│   │   │   ├── controllers/
│   │   │   │   ├── bundle.controller.ts
│   │   │   │   ├── convert.controller.ts
│   │   │   │   ├── diff.controller.ts
│   │   │   │   ├── docs.controller.ts
│   │   │   │   ├── generate.controller.ts
│   │   │   │   ├── help.controller.ts
│   │   │   │   ├── parse.controller.ts
│   │   │   │   ├── validate.controller.ts
│   │   │   │   └── version.controller.ts
│   │   │   ├── exceptions/
│   │   │   │   └── problem.exception.ts
│   │   │   ├── index.ts
│   │   │   ├── middlewares/
│   │   │   │   ├── logger.middleware.ts
│   │   │   │   ├── problem.middleware.ts
│   │   │   │   └── validation.middleware.ts
│   │   │   ├── server-api.d.ts
│   │   │   ├── server.ts
│   │   │   └── templates.json
│   │   └── cli/
│   │       ├── commands/
│   │       │   ├── bundle.ts
│   │       │   ├── config/
│   │       │   │   ├── analytics.ts
│   │       │   │   ├── auth/
│   │       │   │   │   └── add.ts
│   │       │   │   ├── context/
│   │       │   │   │   ├── add.ts
│   │       │   │   │   ├── current.ts
│   │       │   │   │   ├── edit.ts
│   │       │   │   │   ├── index.ts
│   │       │   │   │   ├── init.ts
│   │       │   │   │   ├── list.ts
│   │       │   │   │   ├── remove.ts
│   │       │   │   │   └── use.ts
│   │       │   │   ├── index.ts
│   │       │   │   └── versions.ts
│   │       │   ├── convert.ts
│   │       │   ├── diff.ts
│   │       │   ├── format.ts
│   │       │   ├── generate/
│   │       │   │   ├── client.ts
│   │       │   │   ├── fromTemplate.ts
│   │       │   │   ├── index.ts
│   │       │   │   └── models.ts
│   │       │   ├── new/
│   │       │   │   ├── file.ts
│   │       │   │   ├── index.ts
│   │       │   │   └── template.ts
│   │       │   ├── optimize.ts
│   │       │   ├── pretty.ts
│   │       │   ├── start/
│   │       │   │   ├── api.ts
│   │       │   │   ├── index.ts
│   │       │   │   ├── preview.ts
│   │       │   │   └── studio.ts
│   │       │   └── validate.ts
│   │       └── internal/
│   │           ├── args/
│   │           │   └── generate.args.ts
│   │           ├── base/
│   │           │   └── BaseGeneratorCommand.ts
│   │           ├── base.ts
│   │           ├── flags/
│   │           │   ├── bundle.flags.ts
│   │           │   ├── config/
│   │           │   │   ├── analytics.flags.ts
│   │           │   │   └── context.flags.ts
│   │           │   ├── convert.flags.ts
│   │           │   ├── diff.flags.ts
│   │           │   ├── format.flags.ts
│   │           │   ├── generate/
│   │           │   │   ├── clients.flags.ts
│   │           │   │   ├── fromTemplate.flags.ts
│   │           │   │   ├── models.flags.ts
│   │           │   │   └── sharedFlags.ts
│   │           │   ├── global.flags.ts
│   │           │   ├── new/
│   │           │   │   ├── file.flags.ts
│   │           │   │   └── template.flags.ts
│   │           │   ├── optimize.flags.ts
│   │           │   ├── parser.flags.ts
│   │           │   ├── pretty.flags.ts
│   │           │   ├── proxy.flags.ts
│   │           │   ├── start/
│   │           │   │   ├── api.flags.ts
│   │           │   │   ├── preview.flags.ts
│   │           │   │   └── studio.flags.ts
│   │           │   └── validate.flags.ts
│   │           ├── global.d.ts
│   │           ├── globals.ts
│   │           └── hooks/
│   │               └── command_not_found/
│   │                   └── myhook.ts
│   ├── domains/
│   │   ├── models/
│   │   │   ├── Context.ts
│   │   │   ├── Preview.ts
│   │   │   ├── SpecificationFile.ts
│   │   │   ├── Studio.ts
│   │   │   └── generate/
│   │   │       └── Flags.ts
│   │   └── services/
│   │       ├── archiver.service.ts
│   │       ├── base.service.ts
│   │       ├── config.service.ts
│   │       ├── convert.service.ts
│   │       ├── generator.service.ts
│   │       ├── module.d.ts
│   │       └── validation.service.ts
│   ├── errors/
│   │   ├── context-error.ts
│   │   ├── diff-error.ts
│   │   ├── generator-error.ts
│   │   ├── specification-file.ts
│   │   └── validation-error.ts
│   ├── index.ts
│   ├── interfaces/
│   │   └── index.ts
│   └── utils/
│       ├── ajv.ts
│       ├── app-openapi.ts
│       ├── error-handler.ts
│       ├── generate/
│       │   ├── flags.ts
│       │   ├── mapBaseUrl.ts
│       │   ├── parseParams.ts
│       │   ├── prompts.ts
│       │   ├── registry.ts
│       │   └── watcher.ts
│       ├── logger.ts
│       ├── proxy.ts
│       ├── retrieve-language.ts
│       ├── scoreCalculator.ts
│       ├── temp-dir.ts
│       └── validation.ts
├── test/
│   ├── fixtures/
│   │   ├── asyncapiTestingScore.yml
│   │   ├── asyncapiValid_v1.yml
│   │   ├── asyncapi_v1.yml
│   │   ├── asyncapi_v2.yml
│   │   ├── badFormatAsyncapi.json
│   │   ├── dummyspec/
│   │   │   ├── apiwithref.json
│   │   │   ├── dummySpec.yml
│   │   │   ├── dummySpecWithoutSecurity.yml
│   │   │   ├── shared.json
│   │   │   ├── unoptimizedSpec.json
│   │   │   └── unoptimizedSpec.yml
│   │   ├── external-refs/
│   │   │   ├── main.yaml
│   │   │   └── schemas.yaml
│   │   ├── generate-same-dir-ref/
│   │   │   ├── asyncapi.yaml
│   │   │   └── messages.yaml
│   │   ├── invalid-overrides.json
│   │   ├── minimaltemplate/
│   │   │   ├── hooks/
│   │   │   │   └── generateAsyncapiFile.js
│   │   │   ├── package.json
│   │   │   └── template/
│   │   │       └── index.js
│   │   ├── newtemplate/
│   │   │   ├── hooks/
│   │   │   │   └── generateAsyncapiFile.js
│   │   │   ├── package.json
│   │   │   └── template/
│   │   │       └── index.js
│   │   ├── openapi.yml
│   │   ├── overrides.json
│   │   ├── specification-avro.yml
│   │   ├── specification-invalid.yml
│   │   ├── specification-v3-diff.yml
│   │   ├── specification-v3.yml
│   │   ├── specification.json
│   │   ├── specification.yml
│   │   ├── valid-specification-latest.yml
│   │   └── valid-specification.yml
│   ├── helpers/
│   │   ├── index.ts
│   │   └── init.js
│   ├── hooks/
│   │   └── command_not_found/
│   │       └── myhook.spec.ts
│   ├── integration/
│   │   ├── bundle/
│   │   │   ├── bundle.test.ts
│   │   │   ├── channels.yaml
│   │   │   ├── feature.yaml
│   │   │   ├── final-asyncapi.yaml
│   │   │   ├── first-asyncapi.yaml
│   │   │   ├── first-asyncapiv3.yaml
│   │   │   └── messages.yaml
│   │   ├── config/
│   │   │   ├── analytics.test.ts
│   │   │   └── versions.test.ts
│   │   ├── context.test.ts
│   │   ├── convert.test.ts
│   │   ├── diff.test.ts
│   │   ├── format.test.ts
│   │   ├── generate/
│   │   │   ├── __snapshots__/
│   │   │   │   └── models.test.ts.snap
│   │   │   ├── client.test.ts
│   │   │   ├── fromTemplate.test.ts
│   │   │   └── models.test.ts
│   │   ├── new/
│   │   │   ├── file.test.ts
│   │   │   └── template.test.ts
│   │   ├── optimize.test.ts
│   │   ├── pretty.test.ts
│   │   ├── studio.test.ts
│   │   └── validate.test.ts
│   ├── jest.setup.ts
│   ├── system/
│   │   └── .gitkeep
│   ├── tsconfig.json
│   └── unit/
│       ├── controllers/
│       │   ├── convert.controller.test.ts
│       │   ├── diff.controller.test.ts
│       │   ├── parse.controller.test.ts
│       │   ├── setup.test.ts
│       │   └── validate.controller.test.ts
│       ├── services/
│       │   ├── archiver.service.test.ts
│       │   ├── convert.service.test.ts
│       │   └── validation.service.test.ts
│       └── utils/
│           ├── ajv.test.ts
│           ├── app-openapi.test.ts
│           ├── registry.test.ts
│           ├── retrieve-language.test.ts
│           └── temp-dir.test.ts
└── tsconfig.json
Download .txt
SYMBOL INDEX (478 symbols across 99 files)

FILE: .github/workflows/scripts/kit/htmlContent.js
  function escapeHtml (line 11) | function escapeHtml(text) {

FILE: .github/workflows/scripts/mailchimp/htmlContent.js
  function escapeHtml (line 9) | function escapeHtml(text) {

FILE: github-action/lib/bump-action-version.js
  function bumpActionVersion (line 4) | function bumpActionVersion() {

FILE: scripts/enableAutoComplete.js
  function findExistingFile (line 10) | function findExistingFile(possibleFiles) {
  function getShellConfig (line 60) | function getShellConfig(shell) {
  function detectShell (line 67) | function detectShell() {
  function checkPotentialPath (line 77) | function checkPotentialPath(potentialPath) {
  function findCliExecutable (line 94) | function findCliExecutable() {
  function generateAutocompleteScript (line 117) | function generateAutocompleteScript(shell) {
  function setupAutocomplete (line 135) | function setupAutocomplete(shell) {

FILE: scripts/fetch-asyncapi-example.js
  constant SPEC_EXAMPLES_ZIP_URL (line 24) | const SPEC_EXAMPLES_ZIP_URL = 'https://github.com/asyncapi/spec/archive/...
  constant EXAMPLE_DIRECTORY (line 25) | const EXAMPLE_DIRECTORY = path.join(__dirname, '../assets/examples');
  constant TEMP_ZIP_NAME (line 26) | const TEMP_ZIP_NAME = 'spec-examples.zip';

FILE: scripts/generateTypesForGenerateCommand.js
  function generateClientLanguages (line 5) | async function generateClientLanguages() {
  function capitalize (line 34) | function capitalize(str) {

FILE: scripts/releasePackagesRename.js
  function fileExists (line 9) | async function fileExists(checkPath) {
  function checkAndRenameFile (line 18) | async function checkAndRenameFile(generatedPath, newPath) {
  function createDirectory (line 24) | async function createDirectory(directoryPath) {
  function renameDeb (line 31) | async function renameDeb({version, name, sha}) {
  function renameTar (line 40) | async function renameTar({version, name, sha, isAlpine}) {
  function renameWindows (line 54) | async function renameWindows({version, name, sha, arch}) {
  function renamePkg (line 62) | async function renamePkg({version, name, sha, arch}) {
  function renamePackages (line 70) | async function renamePackages() {

FILE: scripts/updateUsageDocs.js
  constant README_PATH (line 5) | const README_PATH = './scripts/README.md';
  constant USAGE_PATH (line 6) | const USAGE_PATH = './docs/usage.md';
  function run (line 32) | async function run() {
  function readContents (line 45) | async function readContents() {
  function delay (line 71) | function delay(ms) {

FILE: src/apps/api/app.ts
  class App (line 17) | class App {
    method constructor (line 20) | constructor(
    method init (line 28) | public async init() {
    method listen (line 37) | public listen() {
    method getServer (line 48) | public getServer() {
    method initializeMiddlewares (line 52) | private async initializeMiddlewares() {
    method initializeControllers (line 96) | private async initializeControllers() {
    method initializeErrorHandling (line 102) | private async initializeErrorHandling() {

FILE: src/apps/api/constants.ts
  constant API_VERSION (line 1) | const API_VERSION = 'v1';

FILE: src/apps/api/controllers/bundle.controller.ts
  class BundleController (line 9) | class BundleController implements Controller {
    method bundle (line 12) | private async bundle(req: Request, res: Response, next: NextFunction) {
    method boot (line 32) | public async boot(): Promise<Router> {

FILE: src/apps/api/controllers/convert.controller.ts
  type ConvertDTO (line 8) | interface ConvertDTO extends ConversionOptions {
  class ConvertController (line 15) | class ConvertController implements Controller {
    method convert (line 19) | private async convert(req: Request, res: Response, next: NextFunction) {
    method boot (line 63) | public async boot(): Promise<Router> {

FILE: src/apps/api/controllers/diff.controller.ts
  class DiffController (line 9) | class DiffController implements Controller {
    method diff (line 12) | private async diff(req: Request, res: Response, next: NextFunction) {
    method boot (line 30) | public async boot(): Promise<Router> {

FILE: src/apps/api/controllers/docs.controller.ts
  class DocsController (line 8) | class DocsController implements Controller {
    method boot (line 11) | public boot(): Router {

FILE: src/apps/api/controllers/generate.controller.ts
  class GenerateController (line 19) | class GenerateController implements Controller {
    method generate (line 26) | private async generate(req: Request, res: Response, next: NextFunction) {
    method validateTemplateParameters (line 102) | private async validateTemplateParameters(req: Request) {
    method getAjvValidator (line 132) | public async getAjvValidator(templateName: string) {
    method serializeTemplateParameters (line 151) | public async serializeTemplateParameters(
    method boot (line 193) | public async boot(): Promise<Router> {

FILE: src/apps/api/controllers/help.controller.ts
  class HelpController (line 65) | class HelpController implements Controller {
    method boot (line 68) | public async boot(): Promise<Router> {

FILE: src/apps/api/controllers/parse.controller.ts
  class ParseController (line 8) | class ParseController implements Controller {
    method parse (line 11) | private async parse(req: Request, res: Response) {
    method boot (line 18) | public async boot(): Promise<Router> {

FILE: src/apps/api/controllers/validate.controller.ts
  class ValidateController (line 10) | class ValidateController implements Controller {
    method validate (line 13) | private async validate(req: Request, res: Response) {
    method boot (line 35) | public async boot(): Promise<Router> {

FILE: src/apps/api/controllers/version.controller.ts
  class VersionController (line 7) | class VersionController implements Controller {
    method getPackageInfo (line 11) | private async getPackageInfo() {
    method boot (line 20) | public async boot(): Promise<Router> {

FILE: src/apps/api/exceptions/problem.exception.ts
  type ProblemExceptionProps (line 3) | interface ProblemExceptionProps {
  class ProblemException (line 10) | class ProblemException extends ProblemMixin<ProblemExceptionProps>({

FILE: src/apps/api/index.ts
  constant CONTROLLERS (line 11) | const CONTROLLERS = [

FILE: src/apps/api/middlewares/logger.middleware.ts
  function loggerMiddleware (line 4) | function loggerMiddleware(req: Request, res: Response, next: NextFunctio...

FILE: src/apps/api/middlewares/problem.middleware.ts
  function problemMiddleware (line 9) | function problemMiddleware(

FILE: src/apps/api/middlewares/validation.middleware.ts
  type ValidationMiddlewareOptions (line 14) | interface ValidationMiddlewareOptions {
  function compileAjv (line 35) | async function compileAjv(options: ValidationMiddlewareOptions) {
  function validateRequestBody (line 85) | async function validateRequestBody(validate: ValidateFunction, body: any) {
  function validateSingleDocument (line 99) | async function validateSingleDocument(
  function validateListDocuments (line 129) | async function validateListDocuments(
  function validationMiddleware (line 158) | async function validationMiddleware(
  constant TYPES_400 (line 262) | const TYPES_400 = [
  function retrieveStatusCode (line 273) | function retrieveStatusCode(type: string): number {
  function mergeParserError (line 283) | function mergeParserError(
  function tryConvertToProblemException (line 306) | function tryConvertToProblemException(err: any) {

FILE: src/apps/api/server-api.d.ts
  type Request (line 4) | interface Request {

FILE: src/apps/api/server.ts
  function main (line 12) | async function main() {

FILE: src/apps/cli/commands/bundle.ts
  class Bundle (line 11) | class Bundle extends Command {
    method run (line 27) | async run() {
    method collectMetricsData (line 75) | private async collectMetricsData(document: Document) {

FILE: src/apps/cli/commands/config/analytics.ts
  class Analytics (line 10) | class Analytics extends Command {
    method run (line 15) | async run() {

FILE: src/apps/cli/commands/config/auth/add.ts
  class AuthAdd (line 6) | class AuthAdd extends Command {
    method run (line 36) | async run() {

FILE: src/apps/cli/commands/config/context/add.ts
  class ContextAdd (line 11) | class ContextAdd extends Command {
    method run (line 26) | async run() {

FILE: src/apps/cli/commands/config/context/current.ts
  class ContextCurrent (line 12) | class ContextCurrent extends Command {
    method run (line 16) | async run() {

FILE: src/apps/cli/commands/config/context/edit.ts
  class ContextEdit (line 12) | class ContextEdit extends Command {
    method run (line 26) | async run() {

FILE: src/apps/cli/commands/config/context/index.ts
  class Context (line 4) | class Context extends Command {
    method run (line 8) | async run() {

FILE: src/apps/cli/commands/config/context/init.ts
  class ContextInit (line 6) | class ContextInit extends Command {
    method run (line 22) | async run() {

FILE: src/apps/cli/commands/config/context/list.ts
  class ContextList (line 14) | class ContextList extends Command {
    method run (line 18) | async run() {

FILE: src/apps/cli/commands/config/context/remove.ts
  class ContextRemove (line 12) | class ContextRemove extends Command {
    method run (line 23) | async run() {

FILE: src/apps/cli/commands/config/context/use.ts
  class ContextUse (line 12) | class ContextUse extends Command {
    method run (line 23) | async run() {

FILE: src/apps/cli/commands/config/index.ts
  class Config (line 4) | class Config extends Command {
    method run (line 6) | async run() {

FILE: src/apps/cli/commands/config/versions.ts
  class Versions (line 5) | class Versions extends Command {
    method run (line 10) | async run() {

FILE: src/apps/cli/commands/convert.ts
  constant TARGET_VERSION_FLAG (line 15) | const TARGET_VERSION_FLAG = 'target-version';
  class Convert (line 17) | class Convert extends Command {
    method run (line 33) | async run() {
    method handleError (line 82) | private handleError(err: unknown, filePath: string, targetVersion: str...

FILE: src/apps/cli/commands/diff.ts
  class Diff (line 28) | class Diff extends Command {
    method run (line 45) | async run() {
    method outputJSON (line 177) | outputJSON(diffOutput: AsyncAPIDiff, outputType: string) {
    method writeOutputToFile (line 191) | async writeOutputToFile(diffOutput: AsyncAPIDiff, outputType: string, ...
    method outputYAML (line 222) | outputYAML(diffOutput: AsyncAPIDiff, outputType: string) {
    method outputMarkdown (line 226) | outputMarkdown(diffOutput: AsyncAPIDiff, outputType: string) {
    method parseDocuments (line 230) | async parseDocuments(
    method handleGovernanceMessage (line 317) | async handleGovernanceMessage(
  function genericOutput (line 346) | function genericOutput(diffOutput: AsyncAPIDiff, outputType: string) {
  function readOverrideFile (line 366) | async function readOverrideFile(path: string): Promise<diff.OverrideObje...
  function throwOnBreakingChange (line 394) | function throwOnBreakingChange(diffOutput: AsyncAPIDiff, outputFormat: s...
  function checkAndWarnFalseFlag (line 408) | function checkAndWarnFalseFlag(
  function setDefaultMarkdownSubtype (line 423) | function setDefaultMarkdownSubtype(

FILE: src/apps/cli/commands/format.ts
  class Format (line 18) | class Format extends Command {
    method run (line 31) | async run() {
    method handleConversion (line 63) | private handleConversion(
    method handleOutput (line 83) | private async handleOutput(
    method removeExtensionFromOutputPath (line 103) | private removeExtensionFromOutputPath(filename: string): string {

FILE: src/apps/cli/commands/generate/client.ts
  class Client (line 14) | class Client extends BaseGeneratorCommand {
    method run (line 31) | async run() {
    method parseArgs (line 95) | private async parseArgs(args: Record<string, any>, output?: string): P...
    method getTemplateName (line 115) | private getTemplateName(language: AvailableLanguageType): string {

FILE: src/apps/cli/commands/generate/fromTemplate.ts
  class Template (line 12) | class Template extends BaseGeneratorCommand {
    method run (line 29) | async run() {
    method parseArgs (line 106) | private async parseArgs(

FILE: src/apps/cli/commands/generate/index.ts
  class Generate (line 4) | class Generate extends Command {
    method run (line 7) | async run() {

FILE: src/apps/cli/commands/generate/models.ts
  class Models (line 20) | class Models extends Command {
    method run (line 30) | async run() {
    method parseArgs (line 146) | private async parseArgs(args: Record<string, any>, output?: string) {
    method handleGovernanceMessage (line 199) | async handleGovernanceMessage(

FILE: src/apps/cli/commands/new/file.ts
  constant DEFAULT_ASYNCAPI_FILE_NAME (line 11) | const DEFAULT_ASYNCAPI_FILE_NAME = 'asyncapi.yaml';
  constant DEFAULT_ASYNCAPI_YAML_TEMPLATE (line 12) | const DEFAULT_ASYNCAPI_YAML_TEMPLATE = 'default-example.yaml';
  constant DEFAULT_ASYNCAPI_JSON_TEMPLATE (line 13) | const DEFAULT_ASYNCAPI_JSON_TEMPLATE = 'default-example.json';
  type IExample (line 15) | interface IExample {
  function loadExampleFile (line 20) | function loadExampleFile(): IExample[] {
  function getExamplesFlagDescription (line 28) | function getExamplesFlagDescription(): string {
  class NewFile (line 37) | class NewFile extends Command {
    method run (line 47) | async run() {
    method runInteractive (line 79) | async runInteractive() {
    method createAsyncapiFile (line 167) | async createAsyncapiFile(fileName: string, selectedTemplate: string) {

FILE: src/apps/cli/commands/new/index.ts
  class New (line 4) | class New extends Command {
    method run (line 7) | async run() {

FILE: src/apps/cli/commands/new/template.ts
  class template (line 30) | class template extends Command {
    method run (line 37) | async run() {
  function copyAndModify (line 89) | async function copyAndModify(

FILE: src/apps/cli/commands/optimize.ts
  type Optimizations (line 16) | enum Optimizations {
  type DisableOptimizations (line 23) | enum DisableOptimizations {
  type Outputs (line 27) | enum Outputs {
  class Optimize (line 32) | class Optimize extends Command {
    method run (line 61) | async run() {
    method showOptimizations (line 196) | private showOptimizations(elements: ReportElement[] | undefined) {
    method interactiveRun (line 219) | private async interactiveRun(report: Report) {
    method collectMetricsData (line 328) | private collectMetricsData(report: Report) {

FILE: src/apps/cli/commands/pretty.ts
  class Pretty (line 9) | class Pretty extends Command {
    method run (line 27) | async run() {

FILE: src/apps/cli/commands/start/api.ts
  class Api (line 8) | class Api extends Command {
    method run (line 15) | async run() {

FILE: src/apps/cli/commands/start/index.ts
  class Start (line 4) | class Start extends Command {
    method run (line 7) | async run() {

FILE: src/apps/cli/commands/start/preview.ts
  class PreviewStudio (line 7) | class PreviewStudio extends Command {
    method run (line 21) | async run() {

FILE: src/apps/cli/commands/start/studio.ts
  class StartStudio (line 8) | class StartStudio extends Command {
    method run (line 20) | async run() {
    method parseArgs (line 61) | private async parseArgs(args: Record<string, any>, port?: string) {

FILE: src/apps/cli/commands/validate.ts
  class Validate (line 18) | class Validate extends Command {
    method run (line 34) | async run() {
    method handleDiagnostics (line 84) | private async handleDiagnostics(

FILE: src/apps/cli/internal/base.ts
  class DiscardSink (line 20) | class DiscardSink implements Sink {
    method send (line 21) | async send() {
  method init (line 32) | async init(): Promise<void> {
  method catch (line 38) | async catch(err: Error & { exitCode?: number }): Promise<void> {
  method recordActionFinished (line 53) | async recordActionFinished(
  method recordActionInvoked (line 81) | async recordActionInvoked(action: string, metadata?: MetricMetadata) {
  method recordActionMetric (line 89) | async recordActionMetric(recordFunc: (recorder: Recorder) => Promise<voi...
  method setSource (line 103) | async setSource() {
  method finally (line 115) | async finally(error: Error | undefined): Promise<any> {
  method recorderFromEnv (line 125) | async recorderFromEnv(prefix: string): Promise<Recorder> {

FILE: src/apps/cli/internal/base/BaseGeneratorCommand.ts
  type GeneratorOptions (line 20) | interface GeneratorOptions {
  method buildGeneratorOptions (line 47) | protected async buildGeneratorOptions(flags: any, parsedFlags: ParsedFla...
  method applyProxyConfiguration (line 64) | protected applyProxyConfiguration(asyncapi: string, proxyHost?: string, ...
  method handleWatchMode (line 68) | protected async handleWatchMode(
  method buildGenOption (line 80) | protected buildGenOption(flags: any, parsedFlags: ParsedFlags): any {
  method generate (line 88) | protected async generate(
  method parseCommonArgs (line 112) | protected async parseCommonArgs(
  method loadAsyncAPIInput (line 138) | protected async loadAsyncAPIInput(asyncapi: string) {
  method handleCancellation (line 142) | protected handleCancellation(value: any): void {
  method loadSpecificationSafely (line 148) | protected async loadSpecificationSafely(asyncapi: string | undefined): P...

FILE: src/apps/cli/internal/flags/format.flags.ts
  type fileFormat (line 3) | type fileFormat = 'yaml' | 'yml' | 'json';

FILE: src/apps/cli/internal/flags/optimize.flags.ts
  type Optimizations (line 3) | enum Optimizations {
  type DisableOptimizations (line 10) | enum DisableOptimizations {
  type Outputs (line 14) | enum Outputs {

FILE: src/apps/cli/internal/flags/parser.flags.ts
  type ValidationFlagsOptions (line 4) | interface ValidationFlagsOptions {
  function parserFlags (line 8) | function parserFlags({

FILE: src/apps/cli/internal/globals.ts
  constant CHOKIDAR_CONFIG (line 9) | const CHOKIDAR_CONFIG = {
  constant WATCH_MESSAGES (line 12) | const WATCH_MESSAGES = {
  constant CHOKIDAR_INSTANCE_STORE (line 26) | const CHOKIDAR_INSTANCE_STORE = new Map<string, boolean>();
  type SpecWatcherParams (line 28) | type SpecWatcherParams = {

FILE: src/domains/models/Context.ts
  constant REPO_ROOT_PATH (line 27) | let REPO_ROOT_PATH = process.cwd();
  constant DEFAULT_CONTEXT_FILENAME (line 30) | const DEFAULT_CONTEXT_FILENAME = '.asyncapi-cli';
  constant DEFAULT_CONTEXT_FILE_LOCATION (line 31) | const DEFAULT_CONTEXT_FILE_LOCATION = os.homedir();
  constant DEFAULT_CONTEXT_FILE_PATH (line 32) | const DEFAULT_CONTEXT_FILE_PATH = path.resolve(
  constant CONTEXT_FILENAME (line 37) | const CONTEXT_FILENAME =
  constant CONTEXT_FILE_LOCATION (line 39) | const CONTEXT_FILE_LOCATION =
  constant CONTEXT_FILE_PATH (line 61) | let CONTEXT_FILE_PATH =
  type IContextFile (line 72) | interface IContextFile {
  type ICurrentContext (line 79) | interface ICurrentContext {
  function initContext (line 84) | async function initContext(contextFilePath: string) {
  function loadContext (line 124) | async function loadContext(contextName?: string): Promise<string> {
  function addContext (line 142) | async function addContext(contextName: string, pathToFile: string) {
  function removeContext (line 156) | async function removeContext(contextName: string) {
  function getCurrentContext (line 173) | async function getCurrentContext(): Promise<ICurrentContext> {
  function setCurrentContext (line 188) | async function setCurrentContext(contextName: string) {
  function editContext (line 203) | async function editContext(contextName: string, pathToFile: string) {
  function loadContextFile (line 218) | async function loadContextFile(): Promise<IContextFile> {
  function saveContextFile (line 249) | async function saveContextFile(fileContent: IContextFile) {
  function getRepoRootPath (line 264) | async function getRepoRootPath(repoRootPath: string): Promise<string | n...
  function getContextFilePath (line 312) | async function getContextFilePath(): Promise<string | null> {
  function isContextFileValid (line 351) | async function isContextFileValid(fileContent: IContextFile): Promise<bo...
  function isContextFileEmpty (line 365) | async function isContextFileEmpty(

FILE: src/domains/models/Preview.ts
  constant DEFAULT_PORT (line 20) | const DEFAULT_PORT = 0;
  function isValidFilePath (line 22) | function isValidFilePath(filePath: string): boolean {
  type NextFactory (line 26) | type NextFactory = (config?: any) => any;
  function resolveStudioNextInstance (line 29) | function resolveStudioNextInstance(studioPath: string): NextFactory {
  function startPreview (line 35) | function startPreview(filePath:string,base:string | undefined,baseDirect...
  function sendQueuedMessages (line 202) | function sendQueuedMessages() {
  function isLocalRefAPath (line 211) | function isLocalRefAPath(key: string, value: any): boolean {
  function findPathsToWatchFromSchemaRef (line 217) | function findPathsToWatchFromSchemaRef(filePath: string,baseDir:string) {

FILE: src/domains/models/SpecificationFile.ts
  constant TYPE_CONTEXT_NAME (line 18) | const TYPE_CONTEXT_NAME = 'context-name';
  constant TYPE_FILE_PATH (line 19) | const TYPE_FILE_PATH = 'file-path';
  constant TYPE_URL (line 20) | const TYPE_URL = 'url-path';
  class Specification (line 22) | class Specification {
    method constructor (line 28) | constructor(
    method isAsyncAPI3 (line 42) | isAsyncAPI3() {
    method toJson (line 47) | toJson(): Record<string, any> {
    method text (line 55) | text() {
    method getFilePath (line 59) | getFilePath() {
    method getFileURL (line 63) | getFileURL() {
    method getKind (line 67) | getKind() {
    method getSource (line 71) | getSource() {
    method toSourceString (line 75) | toSourceString() {
    method fromFile (line 82) | static async fromFile(filepath: string) {
    method fromURL (line 92) | static async fromURL(URLpath: string) {
  class SpecificationFile (line 139) | class SpecificationFile {
    method constructor (line 142) | constructor(filePath: string) {
    method getPath (line 146) | getPath(): string {
    method read (line 150) | async read(): Promise<string> {
  type LoadType (line 155) | interface LoadType {
  function load (line 162) | async function load(
  function nameType (line 207) | async function nameType(name: string): Promise<string> {
  function isURL (line 225) | async function isURL(urlpath: string): Promise<boolean> {
  function fileExists (line 234) | async function fileExists(name: string): Promise<boolean> {
  function loadFromContext (line 254) | async function loadFromContext(contextName?: string): Promise<Specificat...
  function detectSpecFile (line 266) | async function detectSpecFile(): Promise<string | undefined> {
  function retrieveFileFormat (line 280) | function retrieveFileFormat(content: string): fileFormat | undefined {
  function convertToYaml (line 301) | function convertToYaml(spec: string): string | undefined {
  function convertToJSON (line 318) | function convertToJSON(spec: string): string | undefined {

FILE: src/domains/models/Studio.ts
  constant DEFAULT_PORT (line 16) | const DEFAULT_PORT = 0;
  function isValidFilePath (line 18) | function isValidFilePath(filePath: string): boolean {
  type NextFactory (line 22) | type NextFactory = (config?: any) => any;
  function resolveStudioNextInstance (line 25) | function resolveStudioNextInstance(studioPath: string): NextFactory {
  function start (line 31) | function start(filePath: string, port: number = DEFAULT_PORT, noBrowser?...
  function sendQueuedMessages (line 187) | function sendQueuedMessages() {
  function getFileContent (line 196) | function getFileContent(filePath: string): Promise<string> {
  function saveFileContent (line 206) | function saveFileContent(filePath: string, fileContent: string): void {

FILE: src/domains/models/generate/Flags.ts
  type IMapBaseUrlToFlag (line 1) | interface IMapBaseUrlToFlag {
  type ParsedFlags (line 6) | interface ParsedFlags {

FILE: src/domains/services/archiver.service.ts
  class ArchiverService (line 14) | class ArchiverService {
    method createZip (line 15) | public createZip(res?: Response) {
    method appendDirectory (line 24) | public appendDirectory(archive: Archiver, from: string, to: string) {
    method appendAsyncAPIDocument (line 28) | public appendAsyncAPIDocument(
    method finalize (line 42) | public async finalize(archive: Archiver) {
    method createTempDirectory (line 50) | public createTempDirectory() {
    method removeTempDirectory (line 54) | public removeTempDirectory(tmpDir: string) {

FILE: src/domains/services/base.service.ts
  method createSuccessResult (line 15) | protected createSuccessResult<T>(data: T): ServiceResult<T> {
  method createErrorResult (line 29) | protected createErrorResult<T>(
  method handleServiceError (line 46) | protected async handleServiceError<T>(error: unknown): Promise<ServiceRe...

FILE: src/domains/services/config.service.ts
  constant CONFIG_DIR (line 5) | const CONFIG_DIR = path.join(os.homedir(), '.asyncapi');
  constant CONFIG_FILE (line 6) | const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
  type AuthEntry (line 8) | interface AuthEntry {
  type AuthResult (line 15) | interface AuthResult {
  type Config (line 21) | interface Config {
  class ConfigService (line 25) | class ConfigService {
    method loadConfig (line 29) | static async loadConfig(): Promise<Config> {
    method saveConfig (line 44) | static async saveConfig(config: Config): Promise<void> {
    method addAuthEntry (line 52) | static async addAuthEntry(entry: AuthEntry): Promise<void> {
    method getAuthForUrl (line 68) | static async getAuthForUrl(url: string): Promise<AuthResult | null> {
    method wildcardToRegex (line 98) | private static wildcardToRegex(pattern: string): RegExp {

FILE: src/domains/services/convert.service.ts
  class ConversionService (line 16) | class ConversionService extends BaseService {
    method convertDocument (line 20) | async convertDocument(
    method handleLogging (line 53) | handleLogging(specFile: Specification, flags: ConversionOptions): stri...
    method formatConvertedFile (line 71) | private formatConvertedFile(convertedFile: string | object): string {
    method handleOutput (line 83) | async handleOutput(outputPath: string, convertedFileFormatted: string)...

FILE: src/domains/services/generator.service.ts
  type GeneratorRunOptions (line 21) | interface GeneratorRunOptions {
  class GeneratorService (line 26) | class GeneratorService extends BaseService {
    method constructor (line 29) | constructor(interactive = false) {
    method verifyTemplateSupportForV3 (line 57) | private verifyTemplateSupportForV3(template: string) {
    method getGenerationSuccessMessage (line 64) | private getGenerationSuccessMessage(output: string): string {
    method checkV3NotSupported (line 68) | private checkV3NotSupported(asyncapi: Specification, template: string) {
    method getGeneratorParseSource (line 80) | private getGeneratorParseSource(spec: Specification): string | undefin...
    method generate (line 102) | async generate(

FILE: src/domains/services/validation.service.ts
  type GitHubFileInfo (line 38) | interface GitHubFileInfo {
  type ValidationStatus (line 177) | enum ValidationStatus {
  class ValidationService (line 202) | class ValidationService extends BaseService {
    method constructor (line 205) | constructor(parserOptions: ParserOptions = {}) {
    method determineDiagnosticsStatus (line 234) | private determineDiagnosticsStatus(
    method parseDocument (line 249) | async parseDocument(
    method validateDocument (line 284) | async validateDocument(
    method buildCustomParser (line 328) | private buildCustomParser(rulesToSuppress: string[]): Parser {
    method registerSchemaParsers (line 348) | private registerSchemaParsers(parser: Parser): void {
    method buildParserWithAllWarningsSuppressed (line 358) | private async buildParserWithAllWarningsSuppressed(
    method buildParserWithSpecificWarningsSuppressed (line 377) | private buildParserWithSpecificWarningsSuppressed(
    method buildAndRegisterCustomParser (line 401) | private async buildAndRegisterCustomParser(
    method saveDiagnosticsToFile (line 421) | async saveDiagnosticsToFile(
    method generateGovernanceMessage (line 457) | generateGovernanceMessage(
    method hasFailSeverity (line 474) | private hasFailSeverity(
    method formatDiagnosticsOutput (line 487) | formatDiagnosticsOutput(
    method formatStylish (line 523) | private formatStylish(
    method getSeverityTitle (line 549) | private getSeverityTitle(severity: DiagnosticSeverity): string {

FILE: src/errors/context-error.ts
  constant NO_CONTEXTS_SAVED (line 1) | const NO_CONTEXTS_SAVED = `These are your options to specify in the CLI ...
  constant MISSING_CURRENT_CONTEXT (line 8) | const MISSING_CURRENT_CONTEXT =
  class ContextError (line 21) | class ContextError extends Error {
    method constructor (line 22) | constructor() {
  class MissingContextFileError (line 28) | class MissingContextFileError extends ContextError {
    method constructor (line 29) | constructor() {
  class MissingCurrentContextError (line 35) | class MissingCurrentContextError extends ContextError {
    method constructor (line 36) | constructor() {
  class ContextNotFoundError (line 42) | class ContextNotFoundError extends ContextError {
    method constructor (line 43) | constructor(contextName: string) {
  class ContextAlreadyExistsError (line 49) | class ContextAlreadyExistsError extends ContextError {
    method constructor (line 50) | constructor(contextName: string, contextFileName: string) {
  class ContextFileWrongFormatError (line 56) | class ContextFileWrongFormatError extends ContextError {
    method constructor (line 57) | constructor(contextFileName: string) {
  class ContextFileEmptyError (line 63) | class ContextFileEmptyError extends ContextError {
    method constructor (line 64) | constructor(contextFileName: string) {
  class ContextFileWriteError (line 70) | class ContextFileWriteError extends ContextError {
    method constructor (line 71) | constructor(contextFileName: string) {

FILE: src/errors/diff-error.ts
  class DiffOverrideFileError (line 1) | class DiffOverrideFileError extends Error {
    method constructor (line 2) | constructor() {
  class DiffOverrideJSONError (line 9) | class DiffOverrideJSONError extends Error {
    method constructor (line 10) | constructor() {
  class DiffBreakingChangeError (line 17) | class DiffBreakingChangeError extends Error {
    method constructor (line 18) | constructor() {

FILE: src/errors/generator-error.ts
  class GeneratorError (line 1) | class GeneratorError extends Error {
    method constructor (line 2) | constructor(err: Error) {

FILE: src/errors/specification-file.ts
  class SpecificationFileError (line 2) | class SpecificationFileError extends Error {
    method constructor (line 3) | constructor() {
  class SpecificationFileNotFound (line 9) | class SpecificationFileNotFound extends SpecificationFileError {
    method constructor (line 10) | constructor(filePath?: string) {
  class SpecificationWrongFileFormat (line 20) | class SpecificationWrongFileFormat extends SpecificationFileError {
    method constructor (line 21) | constructor(filePath?: string) {
  class SpecificationURLNotFound (line 27) | class SpecificationURLNotFound extends SpecificationFileError {
    method constructor (line 28) | constructor(URL: string) {
  type From (line 34) | type From = 'file' | 'url' | 'context' | 'invalid file';
  class ErrorLoadingSpec (line 36) | class ErrorLoadingSpec extends Error {
    method constructor (line 40) | constructor(from?: From, param?: string) {

FILE: src/errors/validation-error.ts
  type ErrorType (line 1) | type ErrorType =
  type IValidationErrorInput (line 7) | interface IValidationErrorInput {
  class ValidationError (line 13) | class ValidationError extends Error {
    method constructor (line 14) | constructor(error: IValidationErrorInput) {
    method buildError (line 32) | private buildError(err: any) {

FILE: src/interfaces/index.ts
  type DiagnosticsFormat (line 7) | type DiagnosticsFormat =
  type SeverityKind (line 19) | type SeverityKind = 'error' | 'warn' | 'info' | 'hint';
  type Adapter (line 24) | type Adapter = 'cli' | 'api';
  type Controller (line 33) | interface Controller {
  type Problem (line 41) | interface Problem {
  type AsyncAPIDocument (line 50) | type AsyncAPIDocument = { asyncapi: string } & Record<string, unknown>;
  constant ALL_SPECS (line 52) | const ALL_SPECS = [...Object.keys(specs)];
  constant LAST_SPEC_VERSION (line 53) | const LAST_SPEC_VERSION = ALL_SPECS[ALL_SPECS.length - 1];
  type SpecsEnum (line 55) | type SpecsEnum = keyof typeof specs | 'latest';
  type AsyncAPIServiceOptions (line 57) | interface AsyncAPIServiceOptions {
  type ServiceResult (line 67) | interface ServiceResult<T = unknown> {
  type ParsedDocument (line 77) | interface ParsedDocument {
  type ValidationOptions (line 86) | interface ValidationOptions {
  type ValidationResult (line 98) | interface ValidationResult {
  type ConversionOptions (line 105) | interface ConversionOptions {
  type ConversionResult (line 111) | interface ConversionResult {
  type IMapBaseUrlToFlag (line 119) | interface IMapBaseUrlToFlag {
  type RegistryConfig (line 127) | interface RegistryConfig {
  type GenerationOptions (line 136) | interface GenerationOptions {
  type GenerationResult (line 150) | interface GenerationResult {

FILE: src/utils/ajv.ts
  function createAjvInstance (line 6) | function createAjvInstance(): AjvCore {

FILE: src/utils/app-openapi.ts
  function getAppOpenAPI (line 12) | async function getAppOpenAPI(): Promise<any> {

FILE: src/utils/error-handler.ts
  function getErrorMessage (line 22) | function getErrorMessage(error: unknown, fallbackMessage = 'An unknown e...
  function getErrorStack (line 41) | function getErrorStack(error: unknown): string | undefined {
  function isError (line 54) | function isError(value: unknown): value is Error {
  function hasErrorCode (line 75) | function hasErrorCode(error: unknown, code: string): boolean {
  function withErrorHandling (line 98) | function withErrorHandling<T, Args extends unknown[]>(
  type ErrorResult (line 116) | interface ErrorResult {
  type SuccessResult (line 123) | interface SuccessResult<T> {
  type Result (line 128) | type Result<T> = SuccessResult<T> | ErrorResult;
  function success (line 133) | function success<T>(data: T): SuccessResult<T> {
  function failure (line 140) | function failure(error: string, code?: string, details?: Record<string, ...
  function failureFromError (line 147) | function failureFromError(

FILE: src/utils/generate/flags.ts
  function parseGeneratorFlags (line 12) | function parseGeneratorFlags(

FILE: src/utils/generate/mapBaseUrl.ts
  function getMapBaseUrlToFolderResolver (line 4) | function getMapBaseUrlToFolderResolver(urlToFolder: IMapBaseUrlToFlag) {

FILE: src/utils/generate/parseParams.ts
  function paramParser (line 3) | function paramParser(inputs?: string[]) {
  function disableHooksParser (line 16) | function disableHooksParser(inputs?: string[]) {
  function mapBaseURLParser (line 34) | function mapBaseURLParser(input?: string) {

FILE: src/utils/generate/prompts.ts
  constant OPERATION_CANCELLED_ERROR (line 4) | const OPERATION_CANCELLED_ERROR = 'Operation cancelled';
  function promptForAsyncAPIPath (line 6) | async function promptForAsyncAPIPath(): Promise<string> {
  function promptForLanguage (line 27) | async function promptForLanguage(defaultLanguage: string): Promise<strin...
  function promptForTemplate (line 41) | async function promptForTemplate(): Promise<string> {
  function promptForOutputDir (line 55) | async function promptForOutputDir(): Promise<string> {

FILE: src/utils/generate/registry.ts
  constant REGISTRY_REACHABILITY_TIMEOUT_MS (line 5) | const REGISTRY_REACHABILITY_TIMEOUT_MS = 15_000;
  function registryReachabilityTimeoutMs (line 7) | function registryReachabilityTimeoutMs(): number {
  function registryURLParser (line 18) | function registryURLParser(input?: string) {
  function isAbortError (line 26) | function isAbortError(err: unknown): boolean {
  function fetchWithTimeout (line 37) | async function fetchWithTimeout(
  function registryValidation (line 51) | async function registryValidation(registryUrl?: string, registryAuth?: s...

FILE: src/utils/generate/watcher.ts
  function isLocalTemplate (line 11) | async function isLocalTemplate(templatePath: string) {
  class Watcher (line 16) | class Watcher {
    method constructor (line 23) | constructor(paths: string | string[], ignorePaths: string[]) {
    method initiateWatchOnPath (line 46) | initiateWatchOnPath(path: string, changeCallback: any, errorCallback: ...
    method watch (line 56) | async watch(changeCallback: any, errorCallback: any) {
    method fileChanged (line 71) | fileChanged(listenerPath: string, changedPath: string, eventType: stri...
    method convertEventType (line 96) | convertEventType(currentEventType: string) {
    method getAllNonExistingPaths (line 123) | getAllNonExistingPaths() {
    method closeWatchers (line 137) | closeWatchers() {
    method closeWatcher (line 149) | closeWatcher(path: string) {
  function runWatchMode (line 163) | async function runWatchMode(
  function watcherHandler (line 209) | function watcherHandler(

FILE: src/utils/proxy.ts
  function applyProxyToPath (line 22) | function applyProxyToPath(
  function buildProxyUrl (line 46) | function buildProxyUrl(

FILE: src/utils/retrieve-language.ts
  function retrieveLangauge (line 1) | function retrieveLangauge(content: string): 'json' | 'yaml' {

FILE: src/utils/scoreCalculator.ts
  function calculateScore (line 3) | async function calculateScore(

FILE: src/utils/temp-dir.ts
  function createTempDirectory (line 8) | function createTempDirectory() {
  function removeTempDirectory (line 12) | async function removeTempDirectory(tmpDir: string) {

FILE: src/utils/validation.ts
  function validateFilePath (line 13) | function validateFilePath(
  function validateEnum (line 34) | function validateEnum<T extends string>(
  function validatePort (line 61) | function validatePort(
  function validateUrl (line 91) | function validateUrl(
  function validateNonEmptyString (line 120) | function validateNonEmptyString(
  function validateVersion (line 140) | function validateVersion(
  function isDefined (line 169) | function isDefined<T>(value: T | null | undefined): value is T {
  function isNonEmptyArray (line 179) | function isNonEmptyArray<T>(value: T[] | null | undefined): value is [T,...

FILE: test/helpers/index.ts
  constant ASYNCAPI_FILE_PATH (line 10) | const ASYNCAPI_FILE_PATH = path.resolve(process.cwd(), 'specification.ya...
  constant SERVER_DIRECTORY (line 11) | const SERVER_DIRECTORY= path.join(__dirname, '../fixtures/dummyspec');
  constant PROJECT_DIRECTORY_PATH (line 12) | const PROJECT_DIRECTORY_PATH = path.join(process.cwd(), 'test-project');
  class ContextTestingHelper (line 16) | class ContextTestingHelper {
    method constructor (line 18) | constructor() {
    method context (line 31) | get context(): IContextFile {
    method createDummyContextFile (line 35) | createDummyContextFile(): void {
    method createDummyContextFileWrong (line 39) | createDummyContextFileWrong(data: string): void {
    method deleteDummyContextFile (line 43) | deleteDummyContextFile(): void {
    method unsetCurrentContext (line 49) | unsetCurrentContext(): void {
    method setCurrentContext (line 53) | setCurrentContext(context: string): void {
    method getPath (line 57) | getPath(key: string): string | undefined {
    method createSpecFileAtWorkingDir (line 61) | createSpecFileAtWorkingDir(): void {
    method deleteSpecFileAtWorkingDir (line 65) | deleteSpecFileAtWorkingDir(): void {
    method createDummyProjectDirectory (line 69) | createDummyProjectDirectory(): void {
    method deleteDummyProjectDirectory (line 73) | deleteDummyProjectDirectory(): void {
  function fileCleanup (line 78) | function fileCleanup(filepath: string) {
  function testStudio (line 82) | async function testStudio(){
  function testPreview (line 98) | async function testPreview(){
  function createMockServer (line 116) | function createMockServer (port = 8080) {
  function stopMockServer (line 138) | function stopMockServer() {
  function closeStudioServer (line 142) | async function closeStudioServer(port = 3210): Promise<void> {
  function getContentType (line 155) | function getContentType(filePath:string):string {

FILE: test/integration/bundle/bundle.test.ts
  function validateGeneratedSpec (line 8) | function validateGeneratedSpec(filePath: string, spec: string) {

FILE: test/integration/generate/client.test.ts
  function cleanup (line 5) | function cleanup(filepath: string) {

FILE: test/integration/generate/fromTemplate.test.ts
  function cleanup (line 16) | function cleanup(filepath: string) {

FILE: test/jest.setup.ts
  type Global (line 6) | interface Global {

FILE: test/unit/controllers/setup.test.ts
  type Request (line 4) | interface Request extends Express.Request {
Condensed preview — 299 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (995K chars).
[
  {
    "path": ".all-contributorsrc",
    "chars": 9180,
    "preview": "{\n  \"files\": [\n    \"README.md\"\n  ],\n  \"imageSize\": 100,\n  \"commit\": false,\n  \"contributors\": [\n    {\n      \"login\": \"jot"
  },
  {
    "path": ".asyncapi-tool",
    "chars": 474,
    "preview": "title: AsyncAPI CLI\ndescription: |\n    One CLI to rule them all. \n    This is a CLI that aims to integrate all AsyncAPI "
  },
  {
    "path": ".changeset/config.json",
    "chars": 352,
    "preview": "{\n  \"$schema\": \"https://unpkg.com/@changesets/config@2.3.0/schema.json\",\n  \"changelog\": [\"@changesets/changelog-git\", { "
  },
  {
    "path": ".dockerignore",
    "chars": 57,
    "preview": "node_modules\nnpm-debug.log\nDockerfile\n.dockerignore\n.git\n"
  },
  {
    "path": ".editorconfig",
    "chars": 171,
    "preview": "root = true\n\n[*]\nindent_style = space\nindent_size = 2\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newli"
  },
  {
    "path": ".gitattributes",
    "chars": 19,
    "preview": "* text=auto eol=lf\n"
  },
  {
    "path": ".github/workflows/add-good-first-issue-labels.yml",
    "chars": 3123,
    "preview": "# This workflow is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this r"
  },
  {
    "path": ".github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml",
    "chars": 5375,
    "preview": "# This workflow is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this r"
  },
  {
    "path": ".github/workflows/automerge-for-humans-merging.yml",
    "chars": 4365,
    "preview": "# This workflow is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this r"
  },
  {
    "path": ".github/workflows/automerge-for-humans-remove-ready-to-merge-label-on-edit.yml",
    "chars": 1323,
    "preview": "# This workflow is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this r"
  },
  {
    "path": ".github/workflows/automerge-orphans.yml",
    "chars": 3122,
    "preview": "# This action is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this rep"
  },
  {
    "path": ".github/workflows/automerge.yml",
    "chars": 2170,
    "preview": "# This action is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this rep"
  },
  {
    "path": ".github/workflows/autoupdate.yml",
    "chars": 1489,
    "preview": "# This action is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this rep"
  },
  {
    "path": ".github/workflows/bounty-program-commands.yml",
    "chars": 5187,
    "preview": "# This workflow is centrally managed at https://github.com/asyncapi/.github/\n# Don't make changes to this file in this r"
  },
  {
    "path": ".github/workflows/bump-homebrew-formula.yml",
    "chars": 1996,
    "preview": "name: Bump Homebrew formula for CLI\n\non:\n  # Since now release depends on schedule, might be that there is a situation w"
  },
  {
    "path": ".github/workflows/bump.yml",
    "chars": 1895,
    "preview": "# This action is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this rep"
  },
  {
    "path": ".github/workflows/deploy/chocolatey/asyncapi-cli.nuspec",
    "chars": 1915,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase "
  },
  {
    "path": ".github/workflows/deploy/chocolatey/replace.ps1",
    "chars": 502,
    "preview": "param (\n  [Parameter(Mandatory=$true)]\n  [string]$version,\n  [string]$checksum,\n  [string]$checksum64\n)\n\n$filePaths = @("
  },
  {
    "path": ".github/workflows/deploy/chocolatey/tools/chocolateyinstall.ps1",
    "chars": 1006,
    "preview": "$ErrorActionPreference = 'Stop' # stop on all errors\n$toolsDir   = \"$(Split-Path -parent $MyInvocation.MyCommand.Defini"
  },
  {
    "path": ".github/workflows/help-command.yml",
    "chars": 4053,
    "preview": "# This workflow is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this r"
  },
  {
    "path": ".github/workflows/if-docker-pr-testing.yml",
    "chars": 2933,
    "preview": "#This action is centrally managed in https://github.com/asyncapi/.github/\n#Don't make changes to this file in this repo "
  },
  {
    "path": ".github/workflows/if-nodejs-pr-testing.yml",
    "chars": 3786,
    "preview": "# This action is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this rep"
  },
  {
    "path": ".github/workflows/issues-prs-notifications.yml",
    "chars": 4114,
    "preview": "# This action is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this rep"
  },
  {
    "path": ".github/workflows/lint-pr-title.yml",
    "chars": 2723,
    "preview": "# This action is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this rep"
  },
  {
    "path": ".github/workflows/notify-tsc-members-mention.yml",
    "chars": 13211,
    "preview": "# This action is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this rep"
  },
  {
    "path": ".github/workflows/please-take-a-look-command.yml",
    "chars": 2310,
    "preview": "# This action is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this rep"
  },
  {
    "path": ".github/workflows/release-announcements.yml",
    "chars": 5108,
    "preview": "# This action is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this rep"
  },
  {
    "path": ".github/workflows/release-chocolatey.yml",
    "chars": 4534,
    "preview": "name: Release Chocolatey Package\non:\n  # We cannot run chocolatey release continusly every time we release something as "
  },
  {
    "path": ".github/workflows/release-docker.yml",
    "chars": 3710,
    "preview": "name: Release Docker Image\non:\n  release:\n    types:\n      - published\n\njobs:\n  publish-docker:\n    name: Generating Doc"
  },
  {
    "path": ".github/workflows/release-server-api.yml",
    "chars": 2366,
    "preview": "name: Release Server API Image\non: \n  release:\n    types: \n      - published\n  workflow_dispatch:\n    inputs:\n      vers"
  },
  {
    "path": ".github/workflows/release-with-changesets.yml",
    "chars": 7214,
    "preview": "# It does magic only if there is a package.json file in the root of the project\nname: Release\n\non:\n  push:\n    branches:"
  },
  {
    "path": ".github/workflows/scripts/README.md",
    "chars": 179,
    "preview": "The entire `scripts` directory is centrally managed in [.github](https://github.com/asyncapi/.github/) repository. Any c"
  },
  {
    "path": ".github/workflows/scripts/kit/htmlContent.js",
    "chars": 17763,
    "preview": "/**\n * This code is centrally managed in https://github.com/asyncapi/.github/\n * Don't make changes to this file in this"
  },
  {
    "path": ".github/workflows/scripts/kit/index.js",
    "chars": 2393,
    "preview": "/**\n * This code is centrally managed in https://github.com/asyncapi/.github/\n * Don't make changes to this file in this"
  },
  {
    "path": ".github/workflows/scripts/kit/package.json",
    "chars": 257,
    "preview": "{\n  \"name\": \"schedule-email\",\n  \"description\": \"Kit.com email broadcast script for TSC notifications. This file is centr"
  },
  {
    "path": ".github/workflows/scripts/mailchimp/htmlContent.js",
    "chars": 18302,
    "preview": "/**\n * This code is centrally managed in https://github.com/asyncapi/.github/\n * Don't make changes to this file in this"
  },
  {
    "path": ".github/workflows/stale-issues-prs.yml",
    "chars": 2891,
    "preview": "# This action is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this rep"
  },
  {
    "path": ".github/workflows/test-action.yml",
    "chars": 12083,
    "preview": "name: PR testing of CLI action\n\non:\n  pull_request:\n    types: [ opened, synchronize, reopened, ready_for_review ]\n\njobs"
  },
  {
    "path": ".github/workflows/update-docs-in-website.yml",
    "chars": 1772,
    "preview": "name: Update latest CLI documentation in the website\n\non:\n  push:\n    branches:\n      - 'master'\n    paths:\n      - 'doc"
  },
  {
    "path": ".github/workflows/update-docs-on-docs-commits.yml",
    "chars": 2734,
    "preview": "# This workflow is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this r"
  },
  {
    "path": ".github/workflows/update-maintainers-trigger.yaml",
    "chars": 1264,
    "preview": "# This action is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this rep"
  },
  {
    "path": ".github/workflows/update-pr.yml",
    "chars": 4944,
    "preview": "# This workflow is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this r"
  },
  {
    "path": ".github/workflows/upload-release-assets.yml",
    "chars": 4187,
    "preview": "name: Upload custom assets to GitHub release\n\non:\n  release:\n    types:\n      - published\n\nenv:\n  CI: true\n\njobs:\n  uplo"
  },
  {
    "path": ".github/workflows/welcome-first-time-contrib.yml",
    "chars": 4817,
    "preview": "# This action is centrally managed in https://github.com/asyncapi/.github/\n# Don't make changes to this file in this rep"
  },
  {
    "path": ".gitignore",
    "chars": 761,
    "preview": "*-debug.log\n*-error.log\n.DS_Store\n.idea\n/.nyc_output\n/dist\n/dist/\n/lib\n/node_modules/\n/tmp\n/yarn.lock\n/assets/examples/*"
  },
  {
    "path": ".prettierrc",
    "chars": 27,
    "preview": "{\n    \"singleQuote\": true\n}"
  },
  {
    "path": ".sonarcloud.properties",
    "chars": 403,
    "preview": "sonar.exclusions=test/**/*,Dockerfile,github-action/Dockerfile\nsonar.issue.ignore.multicriteria=e1,e2\n\n# Exclude copy re"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 12237,
    "preview": "# @asyncapi/cli\n\n## 6.0.0\n\n### Major Changes\n\n- 7580cee: Removal of postman -> asyncapi conversion functionality\n\n  ## ⚠"
  },
  {
    "path": "CODEOWNERS",
    "chars": 499,
    "preview": "# This file provides an overview of code owners in this repository.\n\n# Each line is a file pattern followed by one or mo"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 8829,
    "preview": "\n# Contributor Covenant 3.0 Code of Conduct\n\n## Our Pledge\n\nWe pledge to make our community welcoming, safe, and equitab"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 4643,
    "preview": "# Contributing to AsyncAPI\nWe love your input! We want to make contributing to this project as easy and transparent as p"
  },
  {
    "path": "DEVELOPMENT.md",
    "chars": 5154,
    "preview": "# Development guide\n\nThis guide will help you set up the `cli` locally, run tests, and use Docker for isolated testing.\n"
  },
  {
    "path": "Dockerfile",
    "chars": 2261,
    "preview": "FROM node:24-alpine AS build\n\n# Copy the source code\nCOPY ./ /tmp/source_code\n\n# Install dependencies\nRUN cd /tmp/source"
  },
  {
    "path": "LICENSE",
    "chars": 11356,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "NOTICE",
    "chars": 132,
    "preview": "Copyright 2016-2025 AsyncAPI Initiative\n\nThis product includes software developed at\nAsyncAPI Initiative (http://www.asy"
  },
  {
    "path": "README.md",
    "chars": 16955,
    "preview": "[![AsyncAPI CLI](./assets/logo.png)](https://www.asyncapi.com/tools/cli)\n\nCLI to work with your AsyncAPI files. Currentl"
  },
  {
    "path": "action-template.yml",
    "chars": 2635,
    "preview": "name: 'AsyncAPI CLI Action'\ndescription: 'One stop solution for all your AsyncAPI Specification needs in github actions."
  },
  {
    "path": "action.yml",
    "chars": 2628,
    "preview": "name: 'AsyncAPI CLI Action'\ndescription: 'One stop solution for all your AsyncAPI Specification needs in github actions."
  },
  {
    "path": "assets/create-template/templates/default/asyncapi.yaml",
    "chars": 874,
    "preview": "asyncapi: 3.1.0\ninfo:\n  title: Temperature Service\n  version: 1.0.0\n  description: This service is in charge of processi"
  },
  {
    "path": "assets/create-template/templates/default/package.json",
    "chars": 174,
    "preview": "{\n  \"name\": \"myTemplate\",\n  \"generator\": {\n    \"renderer\": \"react\",\n    \"supportedProtocols\": []\n  },\n  \"dependencies\": "
  },
  {
    "path": "assets/create-template/templates/default/readme.md",
    "chars": 215,
    "preview": "### First install all the dependencies for template using below command:\nnpm install \n### Run the template using for a s"
  },
  {
    "path": "assets/create-template/templates/default/template/index.js",
    "chars": 351,
    "preview": "import { File, Text } from '@asyncapi/generator-react-sdk';\n\n// Pass the others parameters to get the specificatin of th"
  },
  {
    "path": "assets/examples/default-example.json",
    "chars": 1187,
    "preview": "{\n    \"asyncapi\": \"3.1.0\",\n    \"info\": {\n      \"title\": \"Account Service\",\n      \"version\": \"1.0.0\",\n      \"description\""
  },
  {
    "path": "assets/examples/default-example.yaml",
    "chars": 743,
    "preview": "asyncapi: 3.1.0\ninfo:\n  title: Account Service\n  version: 1.0.0\n  description: This service is in charge of processing u"
  },
  {
    "path": "bin/dev",
    "chars": 418,
    "preview": "#!/usr/bin/env node\n\nconst oclif = require('@oclif/core')\n\nconst path = require('path')\nconst project = path.join(__dirn"
  },
  {
    "path": "bin/dev.cmd",
    "chars": 30,
    "preview": "@echo off\n\nnode \"%~dp0\\dev\" %*"
  },
  {
    "path": "bin/run",
    "chars": 253,
    "preview": "#!/usr/bin/env node\n\nprocess.env.NODE_ENV = 'development';\n\nconst oclif = require('@oclif/core');\n\noclif.run()\n  .then(r"
  },
  {
    "path": "bin/run.cmd",
    "chars": 31,
    "preview": "@echo off\n\nnode \"%~dp0\\run\" %*\n"
  },
  {
    "path": "bin/run_bin",
    "chars": 358,
    "preview": "#!/usr/bin/env node\n\n// Only the binary installed through NPM is considered production environment. See \"bin\" in package"
  },
  {
    "path": "bin/run_bin.cmd",
    "chars": 35,
    "preview": "@echo off\n\nnode \"%~dp0\\run_bin\" %*\n"
  },
  {
    "path": "docs/architecture.md",
    "chars": 4323,
    "preview": "---\ntitle: 'CLI Architecture'\nweight: 40\n---\n\n# CLI Architecture\n\n## Overview\n\nThe AsyncAPI CLI is built with [oclif](ht"
  },
  {
    "path": "docs/autocompleteEnabled.md",
    "chars": 2350,
    "preview": "---\ntitle: 'Auto-complete setup'\nweight: 30\n---\n\n# AsyncAPI CLI Autocomplete Setup\n\nThis guide provides steps to enable "
  },
  {
    "path": "docs/context.md",
    "chars": 8370,
    "preview": "---\ntitle: 'Context concept'\nweight: 60\n---\n\n## Overview\n\nAsyncAPI CLI provides functionality called `context`. It's pur"
  },
  {
    "path": "docs/contributing-prs.md",
    "chars": 2653,
    "preview": "---\ntitle: 'Contributing via Pull Requests'\nweight: 50\n---\n\n# Contributing via Pull Requests\n\n## Getting Started\n\n1. **O"
  },
  {
    "path": "docs/debugging-testing.md",
    "chars": 14312,
    "preview": "---\ntitle: 'Debugging & Testing Guide'\nweight: 60\n---\n\n# Debugging & Testing Guide\n\nThis guide provides step-by-step ins"
  },
  {
    "path": "docs/github-action.md",
    "chars": 9140,
    "preview": "---\ntitle: GitHub Action for CLI\nweight: 50\n---\n\nThis action exposes the [AsyncAPI CLI](https://github.com/asyncapi/cli)"
  },
  {
    "path": "docs/index.md",
    "chars": 3597,
    "preview": "---\ntitle: 'Introduction'\nweight: 20\n---\n\n\nThe AsyncAPI CLI is a command-line tool that provides a set of commands for w"
  },
  {
    "path": "docs/installation.md",
    "chars": 7588,
    "preview": "---\ntitle: 'Installation guide'\nweight: 20\n---\n\n## Node and npm\n\nTo use the AsyncAPI CLI tool, you must install NPM and "
  },
  {
    "path": "docs/metrics_collection.md",
    "chars": 2840,
    "preview": "---\ntitle: 'Metrics Collection'\nweight: 70\n---\n\n# Metrics collection guideline\n\nAsyncAPI **anonymously** tracks command "
  },
  {
    "path": "docs/usage.md",
    "chars": 38631,
    "preview": "---\ntitle: 'Usage'\nweight: 40\n---\n\n<!-- \n\nThis file is automatically generated from updateUsageDocs.js script. In packag"
  },
  {
    "path": "eslint.config.mjs",
    "chars": 5902,
    "preview": "import js from '@eslint/js';\nimport tseslint from 'typescript-eslint';\nimport sonarjs from 'eslint-plugin-sonarjs';\nimpo"
  },
  {
    "path": "github-action/.asyncapi-tool",
    "chars": 130,
    "preview": "title: GitHub Action for Generator\nfilters:\n    technology:\n        - AsyncAPI Generator\n    categories:\n        - githu"
  },
  {
    "path": "github-action/Dockerfile",
    "chars": 1626,
    "preview": "# Stage 1: Build stage with Node setup\nFROM node:24-alpine as build\n\n# Copy the source code\nCOPY ./ /tmp/source_code\n\n# "
  },
  {
    "path": "github-action/Makefile",
    "chars": 3368,
    "preview": "DEFAULT_VERSION = 'latest'\nDEFAULT_COMMAND = 'generate'\nTEST_FILEPATH = 'test/asyncapi.yml'\nDEFAULT_TEMPLATE = '@asyncap"
  },
  {
    "path": "github-action/README.md",
    "chars": 292,
    "preview": "# GitHub Action for CLI\n\nThis action exposes the [AsyncAPI CLI](https://github.com/asyncapi/cli). It allows you to gener"
  },
  {
    "path": "github-action/bump-test.sh",
    "chars": 536,
    "preview": "#!/bin/bash\n\nversion=$(cat package.json | jq -r '.version');\naction=$(cat action.yml);\nregex='docker:\\/\\/asyncapi\\/githu"
  },
  {
    "path": "github-action/entrypoint.sh",
    "chars": 5847,
    "preview": "#!/usr/bin/env bash\n\n# Exit immediately if a command exits with a non-zero status.\n# Treat unset variables as an error w"
  },
  {
    "path": "github-action/lib/bump-action-version.js",
    "chars": 678,
    "preview": "const fs = require('fs');\nconst path = require('path');\n\nfunction bumpActionVersion() {\n  const packageJsonPath = path.j"
  },
  {
    "path": "github-action/test/asyncapi.yml",
    "chars": 989,
    "preview": "asyncapi: '2.0.0'\ninfo:\n  title: Streetlights API\n  version: '1.0.0'\n  description: |\n    The Smartylighting Streetlight"
  },
  {
    "path": "github-action/test/bundle/asyncapi.yaml",
    "chars": 245,
    "preview": "asyncapi: \"2.5.0\"\ninfo:\n  title: Account Service\n  version: 1.0.0\n  description: This service is in charge of processing"
  },
  {
    "path": "github-action/test/bundle/features.yaml",
    "chars": 247,
    "preview": "asyncapi: \"2.5.0\"\ninfo:\n  title: Account Service\n  version: 1.0.0\n  description: This service is in charge of processing"
  },
  {
    "path": "github-action/test/bundle/messages.yaml",
    "chars": 589,
    "preview": "messages:\n  UserSignedUp:\n    payload:\n      type: object\n      properties:\n        displayName:\n          type: string\n"
  },
  {
    "path": "github-action/test/dummy.yml",
    "chars": 11280,
    "preview": "asyncapi: '2.3.0'\n\nexternalDocs:\n  description: Find more info here\n  url: https://www.asyncapi.com\n\ninfo:\n  title: Dumm"
  },
  {
    "path": "github-action/test/specification-invalid.yml",
    "chars": 535,
    "preview": "asyncapi: 2.2.0\ninfo:\n  title: Account Service\nversion: 1.0.0\ndescription: This service is in charge of processing user "
  },
  {
    "path": "github-action/test/unoptimized.yml",
    "chars": 2157,
    "preview": "asyncapi: 2.0.0\ninfo:\n  title: Streetlights API\n  version: '1.0.0'\nchannels:\n  smartylighting/event/{streetlightId}/ligh"
  },
  {
    "path": "github-action/test/unoptimized_optimized.yml",
    "chars": 1899,
    "preview": "asyncapi: 2.0.0\ninfo:\n  title: Streetlights API\n  version: 1.0.0\nchannels:\n  smartylighting/event/{streetlightId}/lighti"
  },
  {
    "path": "jest.config.ts",
    "chars": 478,
    "preview": "import type { Config } from '@jest/types';\n\nconst config: Config.InitialOptions = {\n  coverageReporters: [\n    'text',\n "
  },
  {
    "path": "nodemon.json",
    "chars": 226,
    "preview": "{\n  \"watch\": [\n    \"src\",\n    \".env\"\n  ],\n  \"ext\": \"js,ts,json\",\n  \"ignore\": [\n    \"src/**/*.spec.ts\",\n    \"src/**/*.tes"
  },
  {
    "path": "openapi.yaml",
    "chars": 21919,
    "preview": "openapi: 3.1.0\ninfo:\n  version: 0.2.0\n  title: AsyncAPI Server API\n  description: Server API providing official AsyncAPI"
  },
  {
    "path": "package.json",
    "chars": 9425,
    "preview": "{\n  \"name\": \"@asyncapi/cli\",\n  \"description\": \"All in one CLI for all AsyncAPI tools\",\n  \"version\": \"6.0.0\",\n  \"author\":"
  },
  {
    "path": "scripts/enableAutoComplete.js",
    "chars": 5017,
    "preview": "/* eslint-disable @typescript-eslint/no-var-requires */\nconst { spawnSync } = require('child_process');\nconst os = requi"
  },
  {
    "path": "scripts/fetch-asyncapi-example.js",
    "chars": 4016,
    "preview": "/* eslint-disable @typescript-eslint/no-var-requires */\n\nconst fs = require('fs');\nconst unzipper = require('unzipper');"
  },
  {
    "path": "scripts/generateTypesForGenerateCommand.js",
    "chars": 1260,
    "preview": "const { writeFile } = require('fs/promises');\nconst path = require('path');\nconst { listBakedInTemplates } = require('@a"
  },
  {
    "path": "scripts/releasePackagesRename.js",
    "chars": 3009,
    "preview": "/* eslint-disable @typescript-eslint/no-var-requires */\n\nconst { rename, access, mkdir } = require('fs').promises;\nconst"
  },
  {
    "path": "scripts/updateUsageDocs.js",
    "chars": 3295,
    "preview": "/* eslint-disable @typescript-eslint/no-var-requires */\nconst {writeFile, readFile} = require('fs').promises;\n\n// Define"
  },
  {
    "path": "src/apps/api/.do/app.yaml",
    "chars": 863,
    "preview": "name: server-api\nregion: sfo3\n\ndomains:\n  - domain: api.asyncapi.com\n    type: PRIMARY\n\ningress:\n  rules:\n    - componen"
  },
  {
    "path": "src/apps/api/.do/apps/.gitignore",
    "chars": 54,
    "preview": ".terraform\nterraform.tfstate\nterraform.tfstate.backup\n"
  },
  {
    "path": "src/apps/api/.do/apps/.terraform.lock.hcl",
    "chars": 1495,
    "preview": "# This file is maintained automatically by \"terraform init\".\n# Manual edits may be lost in future updates.\n\nprovider \"re"
  },
  {
    "path": "src/apps/api/.do/apps/main.tf",
    "chars": 1476,
    "preview": "terraform {\n  required_version = \">= 1.0.0\"\n\n  required_providers {\n    digitalocean = {\n      source  = \"digitalocean/d"
  },
  {
    "path": "src/apps/api/Dockerfile",
    "chars": 2073,
    "preview": "# ---- Base Alpine with Node ----\nFROM node:24-alpine AS base\n\n# Install required system packages\nRUN apk add --update n"
  },
  {
    "path": "src/apps/api/README.md",
    "chars": 8121,
    "preview": "[![AsyncAPI Server API](../../../assets/server-api.png)](https://www.asyncapi.com)\n\nServer API providing official AsyncA"
  },
  {
    "path": "src/apps/api/app.ts",
    "chars": 2981,
    "preview": "import bodyParser from 'body-parser';\nimport compression from 'compression';\nimport config from 'config';\nimport cors fr"
  },
  {
    "path": "src/apps/api/configs/development.json",
    "chars": 208,
    "preview": "{\n  \"env\": \"development\",\n  \"log\": {\n    \"format\": \"dev\",\n    \"dir\": \"../logs\"\n  },\n  \"cors\": {\n    \"origin\": true,\n    "
  },
  {
    "path": "src/apps/api/configs/production.json",
    "chars": 212,
    "preview": "{\n  \"env\": \"production\",\n  \"log\": {\n    \"format\": \"combined\",\n    \"dir\": \"../logs\"\n  },\n  \"cors\": {\n    \"origin\": true,\n"
  },
  {
    "path": "src/apps/api/configs/test.json",
    "chars": 201,
    "preview": "{\n  \"env\": \"test\",\n  \"log\": {\n    \"format\": \"dev\",\n    \"dir\": \"../logs\"\n  },\n  \"cors\": {\n    \"origin\": true,\n    \"creden"
  },
  {
    "path": "src/apps/api/constants.ts",
    "chars": 33,
    "preview": "export const API_VERSION = 'v1';\n"
  },
  {
    "path": "src/apps/api/controllers/bundle.controller.ts",
    "chars": 1262,
    "preview": "import { NextFunction, Request, Response, Router } from 'express';\nimport bundler from '@asyncapi/bundler';\n\nimport { va"
  },
  {
    "path": "src/apps/api/controllers/convert.controller.ts",
    "chars": 2304,
    "preview": "import { NextFunction, Request, Response, Router } from 'express';\nimport { Controller, AsyncAPIDocument, ConversionOpti"
  },
  {
    "path": "src/apps/api/controllers/diff.controller.ts",
    "chars": 1159,
    "preview": "import { NextFunction, Request, Response, Router } from 'express';\nimport { diff } from '@asyncapi/diff';\n\nimport { vali"
  },
  {
    "path": "src/apps/api/controllers/docs.controller.ts",
    "chars": 618,
    "preview": "import { Router } from 'express';\nimport redoc from 'redoc-express';\n\nimport { Controller } from '@/interfaces';\n\nimport"
  },
  {
    "path": "src/apps/api/controllers/generate.controller.ts",
    "chars": 6118,
    "preview": "import fs from 'fs';\nimport path from 'path';\nimport { NextFunction, Request, Response, Router } from 'express';\nimport "
  },
  {
    "path": "src/apps/api/controllers/help.controller.ts",
    "chars": 3632,
    "preview": "import { Router, Request, Response, NextFunction } from 'express';\nimport { Controller } from '@/interfaces';\nimport { P"
  },
  {
    "path": "src/apps/api/controllers/parse.controller.ts",
    "chars": 849,
    "preview": "import { Request, Response, Router } from 'express';\nimport { validationMiddleware } from '../middlewares/validation.mid"
  },
  {
    "path": "src/apps/api/controllers/validate.controller.ts",
    "chars": 1377,
    "preview": "import { Request, Response, Router } from 'express';\n\nimport { validationMiddleware } from '../middlewares/validation.mi"
  },
  {
    "path": "src/apps/api/controllers/version.controller.ts",
    "chars": 2179,
    "preview": "import * as os from 'os';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { Router, Request, Response, Ne"
  },
  {
    "path": "src/apps/api/exceptions/problem.exception.ts",
    "chars": 287,
    "preview": "import { ProblemMixin } from '@asyncapi/problem';\n\nexport interface ProblemExceptionProps {\n  status: number;\n  [key: st"
  },
  {
    "path": "src/apps/api/index.ts",
    "chars": 876,
    "preview": "import { ValidateController } from './controllers/validate.controller';\nimport { ParseController } from './controllers/p"
  },
  {
    "path": "src/apps/api/middlewares/logger.middleware.ts",
    "chars": 400,
    "preview": "import { NextFunction, Request, Response } from 'express';\nimport { logger } from '@utils/logger';\n\nexport function logg"
  },
  {
    "path": "src/apps/api/middlewares/problem.middleware.ts",
    "chars": 1072,
    "preview": "import { NextFunction, Request, Response } from 'express';\n\nimport { ProblemException } from '../exceptions/problem.exce"
  },
  {
    "path": "src/apps/api/middlewares/validation.middleware.ts",
    "chars": 8794,
    "preview": "import { Request, Response, NextFunction } from 'express';\n\nimport { ProblemException } from '../exceptions/problem.exce"
  },
  {
    "path": "src/apps/api/server-api.d.ts",
    "chars": 343,
    "preview": "import { AsyncAPIDocument, ValidationResult } from '@interfaces/index';\n\ndeclare module 'express' {\n  export interface R"
  },
  {
    "path": "src/apps/api/server.ts",
    "chars": 394,
    "preview": "// include configs in the `dist` folder\nimport './configs/production.json';\nimport './configs/development.json';\nimport "
  },
  {
    "path": "src/apps/api/templates.json",
    "chars": 453,
    "preview": "[\n  \"@asyncapi/html-template\",\n  \"@asyncapi/markdown-template\",\n  \"@asyncapi/nodejs-template\",\n  \"@asyncapi/nodejs-ws-te"
  },
  {
    "path": "src/apps/cli/commands/bundle.ts",
    "chars": 2730,
    "preview": "import Command from '@cli/internal/base';\nimport bundle from '@asyncapi/bundler';\nimport { promises } from 'fs';\nimport "
  },
  {
    "path": "src/apps/cli/commands/config/analytics.ts",
    "chars": 2971,
    "preview": "import { join, resolve } from 'path';\nimport Command from '@cli/internal/base';\nimport { promises as fPromises } from 'f"
  },
  {
    "path": "src/apps/cli/commands/config/auth/add.ts",
    "chars": 2336,
    "preview": "import { Args, Flags } from '@oclif/core';\nimport Command from '@cli/internal/base';\nimport { blueBright } from 'picocol"
  },
  {
    "path": "src/apps/cli/commands/config/context/add.ts",
    "chars": 1970,
    "preview": "import { Args } from '@oclif/core';\nimport Command from '@cli/internal/base';\nimport { addContext, setCurrentContext } f"
  },
  {
    "path": "src/apps/cli/commands/config/context/current.ts",
    "chars": 1498,
    "preview": "import Command from '@cli/internal/base';\nimport { getCurrentContext, CONTEXT_FILE_PATH } from '@models/Context';\nimport"
  },
  {
    "path": "src/apps/cli/commands/config/context/edit.ts",
    "chars": 1878,
    "preview": "import { Args } from '@oclif/core';\nimport Command from '@cli/internal/base';\nimport { editContext, CONTEXT_FILE_PATH } "
  },
  {
    "path": "src/apps/cli/commands/config/context/index.ts",
    "chars": 389,
    "preview": "import { loadHelpClass } from '@oclif/core';\nimport Command from '@cli/internal/base';\n\nexport default class Context ext"
  },
  {
    "path": "src/apps/cli/commands/config/context/init.ts",
    "chars": 1144,
    "preview": "import { Args } from '@oclif/core';\nimport Command from '@cli/internal/base';\nimport { initContext } from '@models/Conte"
  },
  {
    "path": "src/apps/cli/commands/config/context/list.ts",
    "chars": 1309,
    "preview": "import Command from '@cli/internal/base';\nimport {\n  loadContextFile,\n  isContextFileEmpty,\n  CONTEXT_FILE_PATH,\n} from "
  },
  {
    "path": "src/apps/cli/commands/config/context/remove.ts",
    "chars": 1361,
    "preview": "import { Args } from '@oclif/core';\nimport Command from '@cli/internal/base';\nimport { removeContext, CONTEXT_FILE_PATH "
  },
  {
    "path": "src/apps/cli/commands/config/context/use.ts",
    "chars": 1376,
    "preview": "import { Args } from '@oclif/core';\nimport Command from '@cli/internal/base';\nimport { setCurrentContext, CONTEXT_FILE_P"
  },
  {
    "path": "src/apps/cli/commands/config/index.ts",
    "chars": 334,
    "preview": "import Command from '@cli/internal/base';\nimport { loadHelpClass } from '@oclif/core';\n\nexport default class Config exte"
  },
  {
    "path": "src/apps/cli/commands/config/versions.ts",
    "chars": 2276,
    "preview": "import Command from '@cli/internal/base';\nimport { helpFlag } from '@cli/internal/flags/global.flags';\nimport { blueBrig"
  },
  {
    "path": "src/apps/cli/commands/convert.ts",
    "chars": 3156,
    "preview": "import { Args } from '@oclif/core';\nimport Command from '@cli/internal/base';\nimport { ValidationError } from '@errors/v"
  },
  {
    "path": "src/apps/cli/commands/diff.ts",
    "chars": 12675,
    "preview": " \nimport { Args } from '@oclif/core';\nimport * as diff from '@asyncapi/diff';\nimport AsyncAPIDiff from '@asyncapi/diff/l"
  },
  {
    "path": "src/apps/cli/commands/format.ts",
    "chars": 3505,
    "preview": "import { promises as fPromises } from 'fs';\nimport { Args } from '@oclif/core';\nimport Command from '@cli/internal/base'"
  },
  {
    "path": "src/apps/cli/commands/generate/client.ts",
    "chars": 4791,
    "preview": "import { Args } from '@oclif/core';\nimport { BaseGeneratorCommand } from '@cli/internal/base/BaseGeneratorCommand';\n// e"
  },
  {
    "path": "src/apps/cli/commands/generate/fromTemplate.ts",
    "chars": 3954,
    "preview": "import { Args } from '@oclif/core';\nimport { BaseGeneratorCommand } from '@cli/internal/base/BaseGeneratorCommand';\nimpo"
  },
  {
    "path": "src/apps/cli/commands/generate/index.ts",
    "chars": 371,
    "preview": "import Command from '@cli/internal/base';\nimport { Help } from '@oclif/core';\n\nexport default class Generate extends Com"
  },
  {
    "path": "src/apps/cli/commands/generate/models.ts",
    "chars": 6122,
    "preview": "import Command from '@cli/internal/base';\nimport { load, Specification } from '@models/SpecificationFile';\nimport { canc"
  },
  {
    "path": "src/apps/cli/commands/new/file.ts",
    "chars": 6311,
    "preview": "import { promises as fPromises, readFileSync } from 'fs';\nimport Command from '@cli/internal/base';\nimport inquirer from"
  },
  {
    "path": "src/apps/cli/commands/new/index.ts",
    "chars": 356,
    "preview": "import Command from '@cli/internal/base';\nimport { Help } from '@oclif/core';\n\nexport default class New extends Command "
  },
  {
    "path": "src/apps/cli/commands/new/template.ts",
    "chars": 4152,
    "preview": "import { promises as fPromises } from 'fs';\nimport Command from '@cli/internal/base';\nimport { resolve, join } from 'pat"
  },
  {
    "path": "src/apps/cli/commands/optimize.ts",
    "chars": 10971,
    "preview": "import { Args } from '@oclif/core';\nimport { Optimizer, Output, Report, ReportElement } from '@asyncapi/optimizer';\nimpo"
  },
  {
    "path": "src/apps/cli/commands/pretty.ts",
    "chars": 2163,
    "preview": "import { Args } from '@oclif/core';\nimport { promises as fs } from 'fs';\nimport * as yaml from 'yaml';\nimport Command fr"
  },
  {
    "path": "src/apps/cli/commands/start/api.ts",
    "chars": 676,
    "preview": "process.env['NODE_CONFIG_DIR'] = `${__dirname}/../../../api/configs`;\n\nimport Command from '@cli/internal/base';\nimport "
  },
  {
    "path": "src/apps/cli/commands/start/index.ts",
    "chars": 343,
    "preview": "import Command from '@cli/internal/base';\nimport { Help } from '@oclif/core';\n\nexport default class Start extends Comman"
  },
  {
    "path": "src/apps/cli/commands/start/preview.ts",
    "chars": 1417,
    "preview": "import { Args } from '@oclif/core';\nimport Command from '@cli/internal/base';\nimport { previewFlags } from '@cli/interna"
  },
  {
    "path": "src/apps/cli/commands/start/studio.ts",
    "chars": 2849,
    "preview": "import Command from '@cli/internal/base';\nimport { start as startStudio } from '@models/Studio';\nimport { load } from '@"
  },
  {
    "path": "src/apps/cli/commands/validate.ts",
    "chars": 3577,
    "preview": "import { Args } from '@oclif/core';\nimport Command from '@cli/internal/base';\nimport { load } from '@models/Specificatio"
  },
  {
    "path": "src/apps/cli/internal/args/generate.args.ts",
    "chars": 201,
    "preview": "import { Args } from '@oclif/core';\n\nexport const generateArgs = {\n  asyncapi: Args.string({\n    description: '- Local p"
  },
  {
    "path": "src/apps/cli/internal/base/BaseGeneratorCommand.ts",
    "chars": 4661,
    "preview": "import Command from '@cli/internal/base';\n// eslint-disable-next-line\n// @ts-ignore\nimport AsyncAPIGenerator from '@asyn"
  },
  {
    "path": "src/apps/cli/internal/base.ts",
    "chars": 5798,
    "preview": "import { Command } from '@oclif/core';\nimport {\n  MetadataFromDocument,\n  MetricMetadata,\n  NewRelicSink,\n  Recorder,\n  "
  },
  {
    "path": "src/apps/cli/internal/flags/bundle.flags.ts",
    "chars": 886,
    "preview": "import { Flags } from '@oclif/core';\n\nexport const bundleFlags = () => {\n  return {\n    help: Flags.help({ char: 'h' }),"
  },
  {
    "path": "src/apps/cli/internal/flags/config/analytics.flags.ts",
    "chars": 470,
    "preview": "import { Flags } from '@oclif/core';\n\nexport const analyticsFlags = () => {\n  return {\n    help: Flags.help({ char: 'h' "
  },
  {
    "path": "src/apps/cli/internal/flags/config/context.flags.ts",
    "chars": 300,
    "preview": "import { Flags } from '@oclif/core';\n\nexport const addFlags = () => {\n  return {\n    help: Flags.help({ char: 'h' }),\n  "
  },
  {
    "path": "src/apps/cli/internal/flags/convert.flags.ts",
    "chars": 931,
    "preview": "import { Flags } from '@oclif/core';\n\nexport const convertFlags = (latestVersion: string) => {\n  return {\n    help: Flag"
  },
  {
    "path": "src/apps/cli/internal/flags/diff.flags.ts",
    "chars": 1214,
    "preview": "import { Flags } from '@oclif/core';\nimport { watchFlag } from './global.flags';\nimport { parserFlags } from './parser.f"
  },
  {
    "path": "src/apps/cli/internal/flags/format.flags.ts",
    "chars": 554,
    "preview": "import { Flags } from '@oclif/core';\n\nexport type fileFormat = 'yaml' | 'yml' | 'json';\n\nconst availFileFormats: fileFor"
  },
  {
    "path": "src/apps/cli/internal/flags/generate/clients.flags.ts",
    "chars": 120,
    "preview": "import { sharedFlags } from './sharedFlags';\n\nexport const clientsFlags = () => {\n  return {\n    ...sharedFlags\n  };\n};\n"
  },
  {
    "path": "src/apps/cli/internal/flags/generate/fromTemplate.flags.ts",
    "chars": 126,
    "preview": "import { sharedFlags } from './sharedFlags';\n\nexport const fromTemplateFlags = () => {\n  return {\n    ...sharedFlags,\n  "
  },
  {
    "path": "src/apps/cli/internal/flags/generate/models.flags.ts",
    "chars": 456,
    "preview": "import { Flags } from '@oclif/core';\nimport { ModelinaFlags } from '@asyncapi/modelina-cli';\nimport { parserFlags } from"
  },
  {
    "path": "src/apps/cli/internal/flags/generate/sharedFlags.ts",
    "chars": 2088,
    "preview": "import { Flags } from '@oclif/core';\nimport { watchFlag } from '../global.flags';\n\nexport const sharedFlags = {\n  help: "
  },
  {
    "path": "src/apps/cli/internal/flags/global.flags.ts",
    "chars": 302,
    "preview": "import { Flags } from '@oclif/core';\n\nexport const watchFlag = (description?: string) => {\n  return Flags.boolean({\n    "
  },
  {
    "path": "src/apps/cli/internal/flags/new/file.flags.ts",
    "chars": 586,
    "preview": "import { Flags } from '@oclif/core';\n\nexport const fileFlags = (exampleFlagDescription: string) => {\n  return {\n    help"
  },
  {
    "path": "src/apps/cli/internal/flags/new/template.flags.ts",
    "chars": 734,
    "preview": "import { Flags } from '@oclif/core';\n\nexport const templateFlags = () => {\n  return {\n    help: Flags.help({ char: 'h' }"
  },
  {
    "path": "src/apps/cli/internal/flags/optimize.flags.ts",
    "chars": 1311,
    "preview": "import { Flags } from '@oclif/core';\n\nexport enum Optimizations {\n  REMOVE_COMPONENTS = 'remove-components',\n  REUSE_COM"
  },
  {
    "path": "src/apps/cli/internal/flags/parser.flags.ts",
    "chars": 1045,
    "preview": "import { Flags } from '@oclif/core';\nimport { OutputFormat } from '@stoplight/spectral-cli/dist/services/config';\n\nexpor"
  },
  {
    "path": "src/apps/cli/internal/flags/pretty.flags.ts",
    "chars": 183,
    "preview": "import { Flags } from '@oclif/core';\n\nexport const prettyFlags = () => {\n  return {\n    output: Flags.string({\n      cha"
  },
  {
    "path": "src/apps/cli/internal/flags/proxy.flags.ts",
    "chars": 317,
    "preview": "import { Flags } from '@oclif/core';\n\nexport const proxyFlags = () => {\n  return {\n    proxyHost: Flags.string({\n      d"
  },
  {
    "path": "src/apps/cli/internal/flags/start/api.flags.ts",
    "chars": 416,
    "preview": "import { Flags } from '@oclif/core';\n\nexport const apiFlags = () => {\n  return {\n    help: Flags.help({ char: 'h' }),\n  "
  },
  {
    "path": "src/apps/cli/internal/flags/start/preview.flags.ts",
    "chars": 1164,
    "preview": "import { Flags } from '@oclif/core';\n\nexport const previewFlags = () => {\n  return {\n    help: Flags.help({ char: 'h' })"
  },
  {
    "path": "src/apps/cli/internal/flags/start/studio.flags.ts",
    "chars": 720,
    "preview": "import { Flags } from '@oclif/core';\n\nexport const studioFlags = () => {\n  return {\n    help: Flags.help({ char: 'h' }),"
  },
  {
    "path": "src/apps/cli/internal/flags/validate.flags.ts",
    "chars": 860,
    "preview": "import { Flags } from '@oclif/core';\nimport { watchFlag } from './global.flags';\nimport { parserFlags } from './parser.f"
  },
  {
    "path": "src/apps/cli/internal/global.d.ts",
    "chars": 233,
    "preview": "declare module '@asyncapi/specs';\n\ndeclare module '@asyncapi/openapi-schema-parser';\ndeclare module '@asyncapi/avro-sche"
  },
  {
    "path": "src/apps/cli/internal/globals.ts",
    "chars": 1955,
    "preview": "import chokidar from 'chokidar';\nimport chalk from 'chalk';\nimport Command from './base';\nimport { Specification } from "
  },
  {
    "path": "src/apps/cli/internal/hooks/command_not_found/myhook.ts",
    "chars": 3139,
    "preview": "import { Help, Hook, toConfiguredId } from '@oclif/core';\nimport { confirm } from '@clack/prompts';\nimport chalk from 'c"
  },
  {
    "path": "src/domains/models/Context.ts",
    "chars": 12697,
    "preview": "import { readFileSync, promises as fs, existsSync, lstatSync } from 'fs';\nimport * as path from 'path';\nimport * as os f"
  },
  {
    "path": "src/domains/models/Preview.ts",
    "chars": 8218,
    "preview": "import { SpecificationFileNotFound } from '@errors/specification-file';\nimport { existsSync,readFileSync } from 'fs';\nim"
  },
  {
    "path": "src/domains/models/SpecificationFile.ts",
    "chars": 8443,
    "preview": "import { promises as fs } from 'fs';\nimport path from 'path';\nimport { URL } from 'url';\nimport yaml from 'js-yaml';\nimp"
  },
  {
    "path": "src/domains/models/Studio.ts",
    "chars": 6222,
    "preview": "import { existsSync, promises as fPromises } from 'fs';\nimport { SpecificationFileNotFound } from '@errors/specification"
  },
  {
    "path": "src/domains/models/generate/Flags.ts",
    "chars": 219,
    "preview": "export interface IMapBaseUrlToFlag {\n  url: string,\n  folder: string\n}\n\nexport interface ParsedFlags {\n  params: Record<"
  },
  {
    "path": "src/domains/services/archiver.service.ts",
    "chars": 1500,
    "preview": "import archiver, { Archiver } from 'archiver';\nimport { Response } from 'express';\n\nimport { retrieveLangauge } from '@u"
  },
  {
    "path": "src/domains/services/base.service.ts",
    "chars": 1487,
    "preview": "import { ServiceResult } from '@/interfaces';\nimport type { Diagnostic } from '@asyncapi/parser/cjs';\n\n/**\n * Base servi"
  },
  {
    "path": "src/domains/services/config.service.ts",
    "chars": 2766,
    "preview": "import path from 'path';\nimport os from 'os';\nimport { promises as fs } from 'fs';\n\nconst CONFIG_DIR = path.join(os.home"
  },
  {
    "path": "src/domains/services/convert.service.ts",
    "chars": 2740,
    "preview": "import {\n  ConversionOptions,\n  ConversionResult,\n  ServiceResult,\n} from '@/interfaces';\nimport { Specification } from "
  },
  {
    "path": "src/domains/services/generator.service.ts",
    "chars": 5457,
    "preview": "import {\n  GenerationOptions,\n  GenerationResult,\n  ServiceResult,\n} from '@/interfaces';\nimport { Specification } from "
  }
]

// ... and 99 more files (download for full content)

About this extraction

This page contains the full source code of the asyncapi/cli GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 299 files (911.1 KB), approximately 234.2k tokens, and a symbol index with 478 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!