{"id":22959206,"url":"https://github.com/leocode/rabbitmq-defgen","last_synced_at":"2026-05-01T13:33:05.116Z","repository":{"id":57126750,"uuid":"356220649","full_name":"leocode/rabbitmq-defgen","owner":"leocode","description":"CLI tool for generating rabbitmq definitions in various format (JSON, Terraform resources) directly out of application code.","archived":false,"fork":false,"pushed_at":"2021-07-16T17:17:44.000Z","size":79,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-09-01T19:25:23.032Z","etag":null,"topics":["nestjs","rabbitmq"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leocode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-09T09:52:05.000Z","updated_at":"2021-09-02T08:23:10.000Z","dependencies_parsed_at":"2022-08-31T17:02:34.912Z","dependency_job_id":null,"html_url":"https://github.com/leocode/rabbitmq-defgen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leocode/rabbitmq-defgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leocode%2Frabbitmq-defgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leocode%2Frabbitmq-defgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leocode%2Frabbitmq-defgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leocode%2Frabbitmq-defgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leocode","download_url":"https://codeload.github.com/leocode/rabbitmq-defgen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leocode%2Frabbitmq-defgen/sbom","scorecard":{"id":584550,"data":{"date":"2025-08-11","repo":{"name":"github.com/leocode/rabbitmq-defgen","commit":"f64c363a45050cc033cede9798084bd04550e43e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/18 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T20:06:07.321Z","repository_id":57126750,"created_at":"2025-08-20T20:06:07.321Z","updated_at":"2025-08-20T20:06:07.321Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32499681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nestjs","rabbitmq"],"created_at":"2024-12-14T18:16:17.493Z","updated_at":"2026-05-01T13:33:05.093Z","avatar_url":"https://github.com/leocode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rabbitmq-defgen\n\nCLI tool for generating rabbitmq definitions in various format (JSON, Terraform resources) directly out of application code.\n\nCurrently it supports only NestJS and requires specific decorators.\n\n## Installation\n\n`yarn add --dev @leocode/rabbitmq-defgen`\n\n(it can be also installed globally and/or with `npm`)\n\n## Usage\n\n### Quick reference\n\nTerraform output:\n\n`yarn rabbitmq-defgen --vhost dev -o terraform -i ./dist/app.module.js \u003e rabbitmq.tf`\n\nJSON output:\n\n`yarn rabbitmq-defgen --vhost dev --username rabbitmq --password rabbitmq -o json -i ./dist/app.module.js \u003e rabbitmq.tf`\n\n### Parameters\n\nparameter | required | description\n--- | --- | ---\n--vhost | [x] | vhost parameter for which definitions will be generated\n-o / --output | [x] | (terraform/json) determines export style\n-i / --input | [x] | path to file with **build** root application NestJS module. **Expected to export named AppModule variable**\n--username | json | username for vhost admin user\n--password | json | password for vhost admin user\n\n### Output\n\nEverything is printed into `stdout` so can be saved in a file or used in a script\n\n### Decorators\n\n`rabbitmq-defgen` is able to build all queues by detecting certain decorators (which play nicely with other @leocode libraries).\n\nWe do not provide decorators (yet, probably, see [issue](https://github.com/leocode/rabbitmq-defgen/issues/1) for more info).\nYou can just copy them from the file: [readme-decorators.ts](./readme-decorators.ts).\n\nRelation between decorators is outlined on the diagram:\n\n![](./plan.png)\n\nDecorators described in the file also specify related metadata interfaces.\nUpon them you can build logic for communicating with rabbitmq, or just create one provider with all decorators.\n\nRemember, that all classes with decorators should be imported (as provider) somewhere in NestJS dependency tree relative to root module that you require in CLI.\n\n### Caveats\n\n`rabbitmq-defgen` basically requires the code, which executes it. If your code has any immediate side-effects **they will be executed**.\n\nThis can lead to some errors, like missing environment variables. It's up to user to create side-effects free code or provide any required variables.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleocode%2Frabbitmq-defgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleocode%2Frabbitmq-defgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleocode%2Frabbitmq-defgen/lists"}