@asyncapi/generator 2.0.3 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +2 -0
- package/CHANGELOG.md +15 -0
- package/docs/configuration-file.md +2 -2
- package/docs/nunjucks-render-engine.md +2 -1
- package/jest.config.js +9 -0
- package/lib/__mocks__/filtersRegistry.js +3 -0
- package/lib/__mocks__/hooksRegistry.js +3 -0
- package/lib/__mocks__/templateConfigValidator.js +3 -0
- package/lib/__mocks__/utils.js +25 -0
- package/lib/filtersRegistry.js +14 -10
- package/package.json +9 -9
- package/test/__mocks__/@npmcli/arborist.js +11 -0
- package/test/__mocks__/@npmcli/config.js +3 -0
- package/test/__mocks__/fs.extra.js +3 -0
- package/test/__mocks__/loglevel.js +3 -0
- package/test/__mocks__/resolve-from.js +8 -0
- package/test/__mocks__/resolve-pkg.js +8 -0
- package/test/__snapshots__/integration.test.js.snap +25 -0
- package/test/docs/apiwithref.json +41 -0
- package/test/docs/dummy.yml +390 -0
- package/test/docs/dummyV3.yml +31 -0
- package/test/docs/shared.json +27 -0
- package/test/docs/ws.yml +36 -0
- package/test/generator.test.js +626 -0
- package/test/integration.test.js +58 -0
- package/test/parser.test.js +107 -0
- package/test/renderer.test.js +62 -0
- package/test/templateConfigValidator.test.js +277 -0
- package/test/test-project/.yarncr.yml +3 -0
- package/test/test-project/README.md +4 -0
- package/test/test-project/docker-compose.yml +24 -0
- package/test/test-project/package.json +25 -0
- package/test/test-project/test-entrypoint.sh +12 -0
- package/test/test-project/test-global.test.js +37 -0
- package/test/test-project/test-project.test.js +98 -0
- package/test/test-project/test-registry.test.js +55 -0
- package/test/test-project/test.sh +99 -0
- package/test/test-project/verdaccio/config.yaml +16 -0
- package/test/test-project/verdaccio/htpasswd +1 -0
- package/test/test-templates/nunjucks-template/package-lock.json +4143 -0
- package/test/test-templates/nunjucks-template/package.json +21 -0
- package/test/test-templates/nunjucks-template/template/test-file.md +5 -0
- package/test/test-templates/react-template/__transpiled/test-file.md.js +24 -0
- package/test/test-templates/react-template/__transpiled/test-file.md.js.map +1 -0
- package/test/test-templates/react-template/package-lock.json +4143 -0
- package/test/test-templates/react-template/package.json +23 -0
- package/test/test-templates/react-template/template/test-file.md.js +11 -0
- package/test/utils.test.js +76 -0
- package/.eslintignore +0 -5
- package/.eslintrc +0 -113
- package/.npmrc.template +0 -1
- package/.releaserc +0 -24
- package/.sonarcloud.properties +0 -2
- package/CODEOWNERS +0 -12
- package/CODE_OF_CONDUCT.md +0 -46
- package/CONTRIBUTING.md +0 -79
- package/LICENSE +0 -201
- package/README.md +0 -98
- package/assets/readme-banner.png +0 -0
package/README.md
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
[](https://www.asyncapi.com/tools/generator)
|
|
2
|
-
|
|
3
|
-
 
|
|
4
|
-
|
|
5
|
-
> :warning: This package doesn't support AsyncAPI 1.x anymore. We recommend to upgrade to the latest AsyncAPI version using the [AsyncAPI converter](https://github.com/asyncapi/converter-js). If you need to convert documents on the fly, you may use the [Node.js](https://github.com/asyncapi/converter-js) or [Go](https://github.com/asyncapi/converter-go) converters.
|
|
6
|
-
|
|
7
|
-
<!-- toc is generated with GitHub Actions do not remove toc markers -->
|
|
8
|
-
|
|
9
|
-
<!-- toc -->
|
|
10
|
-
|
|
11
|
-
- [Overview](#overview)
|
|
12
|
-
- [List of official generator templates](#list-of-official-generator-templates)
|
|
13
|
-
- [Contributing](#contributing)
|
|
14
|
-
- [Contributors ✨](#contributors-%E2%9C%A8)
|
|
15
|
-
|
|
16
|
-
<!-- tocstop -->
|
|
17
|
-
|
|
18
|
-
## Overview
|
|
19
|
-
|
|
20
|
-
Generator is a tool that you can use to generate whatever you want basing on the AsyncAPI specification file as an input. For more information [read the docs](https://www.asyncapi.com/docs/tools/generator).
|
|
21
|
-
|
|
22
|
-
There is a large number of templates that are ready to use and are officially supported by the AsyncAPI Initiative.
|
|
23
|
-
|
|
24
|
-
## List of official generator templates
|
|
25
|
-
|
|
26
|
-
<!-- templates list is validated with GitHub Actions do not remove list markers -->
|
|
27
|
-
<!-- TEMPLATES-LIST:START -->
|
|
28
|
-
|
|
29
|
-
Template Name | Description | Source code
|
|
30
|
-
---|---|---
|
|
31
|
-
`@asyncapi/nodejs-template` | Generates Nodejs service that uses Hermes package | [click here](https://github.com/asyncapi/nodejs-template)
|
|
32
|
-
`@asyncapi/nodejs-ws-template` | Generates Nodejs service that supports WebSockets protocol only | [click here](https://github.com/asyncapi/nodejs-ws-template)
|
|
33
|
-
`@asyncapi/java-template` | Generates Java JMS application | [click here](https://github.com/asyncapi/java-template)
|
|
34
|
-
`@asyncapi/java-spring-template` | Generates Java Spring service | [click here](https://github.com/asyncapi/java-spring-template)
|
|
35
|
-
`@asyncapi/java-spring-cloud-stream-template` | Generates Java Spring Cloud Stream service | [click here](https://github.com/asyncapi/java-spring-cloud-stream-template)
|
|
36
|
-
`@asyncapi/python-paho-template` | Generates Python service that uses Paho library | [click here](https://github.com/asyncapi/python-paho-template)
|
|
37
|
-
`@asyncapi/html-template` | Generates HTML documentation site | [click here](https://github.com/asyncapi/html-template)
|
|
38
|
-
`@asyncapi/markdown-template` | Generates documentation in Markdown file | [click here](https://github.com/asyncapi/markdown-template)
|
|
39
|
-
`@asyncapi/ts-nats-template` | Generates TypeScript NATS client | [click here](https://github.com/asyncapi/ts-nats-template/)
|
|
40
|
-
`@asyncapi/go-watermill-template` | Generates Go client using Watermill | [click here](https://github.com/asyncapi/go-watermill-template)
|
|
41
|
-
`@asyncapi/dotnet-nats-template` | Generates .NET C# client using NATS | [click here](https://github.com/asyncapi/dotnet-nats-template)
|
|
42
|
-
`@asyncapi/php-template` | Generates PHP client using RabbitMQ | [click here](https://github.com/asyncapi/php-template)
|
|
43
|
-
`@asyncapi/dotnet-rabbitmq-template` | Generates .NET C# client using RabbitMQ | [click here](https://github.com/asyncapi/dotnet-rabbitmq-template)
|
|
44
|
-
|
|
45
|
-
<!-- TEMPLATES-LIST:END -->
|
|
46
|
-
|
|
47
|
-
You can find above templates and the ones provided by the community in **[this list](https://github.com/search?q=topic%3Aasyncapi+topic%3Agenerator+topic%3Atemplate)**
|
|
48
|
-
|
|
49
|
-
## Contributing
|
|
50
|
-
|
|
51
|
-
Read [CONTRIBUTING](CONTRIBUTING.md) guide.
|
|
52
|
-
|
|
53
|
-
## Contributors ✨
|
|
54
|
-
|
|
55
|
-
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
56
|
-
|
|
57
|
-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
58
|
-
<!-- prettier-ignore-start -->
|
|
59
|
-
<!-- markdownlint-disable -->
|
|
60
|
-
<table>
|
|
61
|
-
<tbody>
|
|
62
|
-
<tr>
|
|
63
|
-
<td align="center" valign="top" width="33.33%"><a href="http://www.fmvilas.com"><img src="https://avatars3.githubusercontent.com/u/242119?v=4?s=100" width="100px;" alt="Fran Méndez"/><br /><sub><b>Fran Méndez</b></sub></a><br /><a href="#question-fmvilas" title="Answering Questions">💬</a> <a href="https://github.com/asyncapi/generator/issues?q=author%3Afmvilas" title="Bug reports">🐛</a> <a href="https://github.com/asyncapi/generator/commits?author=fmvilas" title="Code">💻</a> <a href="https://github.com/asyncapi/generator/commits?author=fmvilas" title="Documentation">📖</a> <a href="#ideas-fmvilas" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-fmvilas" title="Maintenance">🚧</a> <a href="#plugin-fmvilas" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/asyncapi/generator/pulls?q=is%3Apr+reviewed-by%3Afmvilas" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/asyncapi/generator/commits?author=fmvilas" title="Tests">⚠️</a> <a href="#tutorial-fmvilas" title="Tutorials">✅</a></td>
|
|
64
|
-
<td align="center" valign="top" width="33.33%"><a href="https://github.com/jonaslagoni"><img src="https://avatars1.githubusercontent.com/u/13396189?v=4?s=100" width="100px;" alt="Jonas Lagoni"/><br /><sub><b>Jonas Lagoni</b></sub></a><br /><a href="#question-jonaslagoni" title="Answering Questions">💬</a> <a href="https://github.com/asyncapi/generator/issues?q=author%3Ajonaslagoni" title="Bug reports">🐛</a> <a href="https://github.com/asyncapi/generator/commits?author=jonaslagoni" title="Code">💻</a> <a href="https://github.com/asyncapi/generator/commits?author=jonaslagoni" title="Documentation">📖</a> <a href="#ideas-jonaslagoni" title="Ideas, Planning, & Feedback">🤔</a> <a href="#plugin-jonaslagoni" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/asyncapi/generator/pulls?q=is%3Apr+reviewed-by%3Ajonaslagoni" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/asyncapi/generator/commits?author=jonaslagoni" title="Tests">⚠️</a></td>
|
|
65
|
-
<td align="center" valign="top" width="33.33%"><a href="https://resume.github.io/?derberg"><img src="https://avatars1.githubusercontent.com/u/6995927?v=4?s=100" width="100px;" alt="Lukasz Gornicki"/><br /><sub><b>Lukasz Gornicki</b></sub></a><br /><a href="#question-derberg" title="Answering Questions">💬</a> <a href="https://github.com/asyncapi/generator/issues?q=author%3Aderberg" title="Bug reports">🐛</a> <a href="#blog-derberg" title="Blogposts">📝</a> <a href="https://github.com/asyncapi/generator/commits?author=derberg" title="Code">💻</a> <a href="https://github.com/asyncapi/generator/commits?author=derberg" title="Documentation">📖</a> <a href="#ideas-derberg" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-derberg" title="Maintenance">🚧</a> <a href="#plugin-derberg" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/asyncapi/generator/pulls?q=is%3Apr+reviewed-by%3Aderberg" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/asyncapi/generator/commits?author=derberg" title="Tests">⚠️</a> <a href="#tutorial-derberg" title="Tutorials">✅</a> <a href="#infra-derberg" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
|
|
66
|
-
</tr>
|
|
67
|
-
<tr>
|
|
68
|
-
<td align="center" valign="top" width="33.33%"><a href="https://twitter.com/treeder"><img src="https://avatars3.githubusercontent.com/u/75826?v=4?s=100" width="100px;" alt="Travis Reeder"/><br /><sub><b>Travis Reeder</b></sub></a><br /><a href="#infra-treeder" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/asyncapi/generator/commits?author=treeder" title="Documentation">📖</a></td>
|
|
69
|
-
<td align="center" valign="top" width="33.33%"><a href="https://github.com/Tenischev"><img src="https://avatars1.githubusercontent.com/u/4137916?v=4?s=100" width="100px;" alt="Semen"/><br /><sub><b>Semen</b></sub></a><br /><a href="https://github.com/asyncapi/generator/issues?q=author%3ATenischev" title="Bug reports">🐛</a> <a href="https://github.com/asyncapi/generator/commits?author=Tenischev" title="Code">💻</a> <a href="https://github.com/asyncapi/generator/commits?author=Tenischev" title="Documentation">📖</a> <a href="#ideas-Tenischev" title="Ideas, Planning, & Feedback">🤔</a> <a href="#plugin-Tenischev" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/asyncapi/generator/pulls?q=is%3Apr+reviewed-by%3ATenischev" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/asyncapi/generator/commits?author=Tenischev" title="Tests">⚠️</a></td>
|
|
70
|
-
<td align="center" valign="top" width="33.33%"><a href="https://waleedashraf.me/"><img src="https://avatars0.githubusercontent.com/u/8335457?v=4?s=100" width="100px;" alt="Waleed Ashraf"/><br /><sub><b>Waleed Ashraf</b></sub></a><br /><a href="https://github.com/asyncapi/generator/commits?author=WaleedAshraf" title="Code">💻</a> <a href="https://github.com/asyncapi/generator/issues?q=author%3AWaleedAshraf" title="Bug reports">🐛</a></td>
|
|
71
|
-
</tr>
|
|
72
|
-
<tr>
|
|
73
|
-
<td align="center" valign="top" width="33.33%"><a href="https://github.com/sebastian-palma"><img src="https://avatars2.githubusercontent.com/u/11888191?v=4?s=100" width="100px;" alt="Sebastián"/><br /><sub><b>Sebastián</b></sub></a><br /><a href="https://github.com/asyncapi/generator/commits?author=sebastian-palma" title="Code">💻</a></td>
|
|
74
|
-
<td align="center" valign="top" width="33.33%"><a href="https://github.com/muenchhausen"><img src="https://avatars.githubusercontent.com/u/1210783?v=4?s=100" width="100px;" alt="Derk Muenchhausen"/><br /><sub><b>Derk Muenchhausen</b></sub></a><br /><a href="https://github.com/asyncapi/generator/commits?author=muenchhausen" title="Code">💻</a></td>
|
|
75
|
-
<td align="center" valign="top" width="33.33%"><a href="http://ben.timby.com/"><img src="https://avatars.githubusercontent.com/u/669270?v=4?s=100" width="100px;" alt="Ben Timby"/><br /><sub><b>Ben Timby</b></sub></a><br /><a href="https://github.com/asyncapi/generator/commits?author=btimby" title="Code">💻</a></td>
|
|
76
|
-
</tr>
|
|
77
|
-
<tr>
|
|
78
|
-
<td align="center" valign="top" width="33.33%"><a href="https://github.com/lkmandy"><img src="https://avatars.githubusercontent.com/u/17765231?v=4?s=100" width="100px;" alt="Amanda Shafack "/><br /><sub><b>Amanda Shafack </b></sub></a><br /><a href="https://github.com/asyncapi/generator/commits?author=lkmandy" title="Documentation">📖</a></td>
|
|
79
|
-
<td align="center" valign="top" width="33.33%"><a href="https://github.com/Florence-Njeri"><img src="https://avatars.githubusercontent.com/u/40742916?v=4?s=100" width="100px;" alt="Florence Njeri"/><br /><sub><b>Florence Njeri</b></sub></a><br /><a href="https://github.com/asyncapi/generator/commits?author=Florence-Njeri" title="Documentation">📖</a> <a href="https://github.com/asyncapi/generator/pulls?q=is%3Apr+reviewed-by%3AFlorence-Njeri" title="Reviewed Pull Requests">👀</a> <a href="#infra-Florence-Njeri" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-Florence-Njeri" title="Maintenance">🚧</a></td>
|
|
80
|
-
<td align="center" valign="top" width="33.33%"><a href="https://unruffled-goodall-dd424e.netlify.app/"><img src="https://avatars.githubusercontent.com/u/77961530?v=4?s=100" width="100px;" alt="Pratik Haldankar"/><br /><sub><b>Pratik Haldankar</b></sub></a><br /><a href="https://github.com/asyncapi/generator/commits?author=pratik2315" title="Documentation">📖</a> <a href="https://github.com/asyncapi/generator/pulls?q=is%3Apr+reviewed-by%3Apratik2315" title="Reviewed Pull Requests">👀</a> <a href="#maintenance-pratik2315" title="Maintenance">🚧</a> <a href="#talk-pratik2315" title="Talks">📢</a></td>
|
|
81
|
-
</tr>
|
|
82
|
-
<tr>
|
|
83
|
-
<td align="center" valign="top" width="33.33%"><a href="https://github.com/swastiksuvam55"><img src="https://avatars.githubusercontent.com/u/90003260?v=4?s=100" width="100px;" alt="swastik suvam singh"/><br /><sub><b>swastik suvam singh</b></sub></a><br /><a href="https://github.com/asyncapi/generator/commits?author=swastiksuvam55" title="Code">💻</a></td>
|
|
84
|
-
<td align="center" valign="top" width="33.33%"><a href="https://blog.orzzh.icu/"><img src="https://avatars.githubusercontent.com/u/33168669?v=4?s=100" width="100px;" alt="GavinZhengOI"/><br /><sub><b>GavinZhengOI</b></sub></a><br /><a href="https://github.com/asyncapi/generator/commits?author=GavinZhengOI" title="Documentation">📖</a></td>
|
|
85
|
-
<td align="center" valign="top" width="33.33%"><a href="https://github.com/lmgyuan"><img src="https://avatars.githubusercontent.com/u/16447041?v=4?s=100" width="100px;" alt="lmgyuan"/><br /><sub><b>lmgyuan</b></sub></a><br /><a href="https://github.com/asyncapi/generator/commits?author=lmgyuan" title="Documentation">📖</a></td>
|
|
86
|
-
</tr>
|
|
87
|
-
<tr>
|
|
88
|
-
<td align="center" valign="top" width="33.33%"><a href="https://github.com/pierrick-boule"><img src="https://avatars.githubusercontent.com/u/3237116?v=4?s=100" width="100px;" alt="pierrick-boule"/><br /><sub><b>pierrick-boule</b></sub></a><br /><a href="https://github.com/asyncapi/generator/commits?author=pierrick-boule" title="Code">💻</a> <a href="https://github.com/asyncapi/generator/commits?author=pierrick-boule" title="Tests">⚠️</a> <a href="https://github.com/asyncapi/generator/commits?author=pierrick-boule" title="Documentation">📖</a></td>
|
|
89
|
-
</tr>
|
|
90
|
-
</tbody>
|
|
91
|
-
</table>
|
|
92
|
-
|
|
93
|
-
<!-- markdownlint-restore -->
|
|
94
|
-
<!-- prettier-ignore-end -->
|
|
95
|
-
|
|
96
|
-
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
97
|
-
|
|
98
|
-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
package/assets/readme-banner.png
DELETED
|
Binary file
|