{"id":46479760,"url":"https://github.com/aliyun/darabonba-cpp-generator","last_synced_at":"2026-03-06T08:02:15.762Z","repository":{"id":51346570,"uuid":"297248061","full_name":"aliyun/darabonba-cpp-generator","owner":"aliyun","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-06T15:15:12.000Z","size":576,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-02-06T23:29:52.338Z","etag":null,"topics":["api","darabonba","sdk"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aliyun.png","metadata":{"files":{"readme":"README-zh-CN.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-09-21T06:26:11.000Z","updated_at":"2026-02-06T15:15:16.000Z","dependencies_parsed_at":"2025-06-05T08:35:38.027Z","dependency_job_id":"9bff5cd8-415e-4b95-963a-34483ccbeeca","html_url":"https://github.com/aliyun/darabonba-cpp-generator","commit_stats":{"total_commits":111,"total_committers":3,"mean_commits":37.0,"dds":"0.027027027027026973","last_synced_commit":"484e7e8d4475233e49383a43725125ea32c1d13e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aliyun/darabonba-cpp-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliyun%2Fdarabonba-cpp-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliyun%2Fdarabonba-cpp-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliyun%2Fdarabonba-cpp-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliyun%2Fdarabonba-cpp-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aliyun","download_url":"https://codeload.github.com/aliyun/darabonba-cpp-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliyun%2Fdarabonba-cpp-generator/sbom","scorecard":{"id":184779,"data":{"date":"2025-08-11","repo":{"name":"github.com/aliyun/darabonba-cpp-generator","commit":"65378a25d5917aa04a3340ff4bcdc4f5e7d9a9a7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"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":"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":10,"reason":"no dangerous workflow patterns detected","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"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":"Code-Review","score":4,"reason":"Found 11/24 approved changesets -- score normalized to 4","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":"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":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/aliyun/darabonba-cpp-generator/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/aliyun/darabonba-cpp-generator/ci.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:28","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   2 npmCommand dependencies pinned"],"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T19:35:50.577Z","repository_id":51346570,"created_at":"2025-08-16T19:35:50.578Z","updated_at":"2025-08-16T19:35:50.578Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30166863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","darabonba","sdk"],"created_at":"2026-03-06T08:02:15.322Z","updated_at":"2026-03-06T08:02:15.735Z","avatar_url":"https://github.com/aliyun.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[English](/README.md) | 简体中文\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![codecov][cov-image]][cov-url]\n[![David deps][david-image]][david-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/@darabonba/cpp-generator.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@darabonba/cpp-generator\n[travis-image]: https://img.shields.io/travis/aliyun/darabonba-cpp-generator.svg?style=flat-square\n[travis-url]: https://travis-ci.org/aliyun/darabonba-cpp-generator\n[cov-image]: https://codecov.io/gh/aliyun/darabonba-cpp-generator/branch/master/graph/badge.svg\n[cov-url]: https://codecov.io/gh/aliyun/darabonba-cpp-generator\n[david-image]: https://img.shields.io/david/aliyun/darabonba-cpp-generator.svg?style=flat-square\n[david-url]: https://david-dm.org/aliyun/darabonba-cpp-generator\n[download-image]: https://img.shields.io/npm/dm/@darabonba/cpp-generator.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@darabonba/cpp-generator\n\n# Darabonba C++ 生成器\n\n## 安装\n\nDarabonba 生成器只能在 Node.js 环境下运行。建议使用 [NPM](https://www.npmjs.com/) 包管理工具安装。在终端输入以下命令进行安装:\n\n```shell\nnpm install @darabonba/cpp-generator\n```\n\n## 使用示例\n\n生成 C++ 代码\n\n```javascript\n'use strict';\n\nconst path = require('path');\nconst fs = require('fs');\n\nconst parser = require('@darabonba/parser');\nconst CppGenerator = require('@darabonba/cpp-generator');\n\nconst sourceDir = \"\u003cDarabonda package directory\u003e\";\nconst outputDir = \"\u003cGenerate output directory\u003e\";\n\n// generate AST data by Darabonba Parser\nlet packageMetaFilePath = path.join(sourceDir, 'Darafile');\nlet packageMeta = JSON.parse(fs.readFileSync(packageMetaFilePath, 'utf8'));\nlet mainFile = path.join(sourceDir, packageMeta.main);\nlet ast = parser.parse(fs.readFileSync(mainFile, 'utf8'), mainFile);\n\n// initialize generator\nlet generatorConfig = {\n    ...packageMeta,\n    pkgDir: sourceDir,\n    outputDir\n};\n\nlet generator = new CppGenerator(generatorConfig);\n\n// generate cpp code by generator\ngenerator.visit(ast);\n\n// The execution result will be output in the 'outputDir'\n```\n\n## 快速开始\n\n```bash\ngit clone https://github.com/aliyun/darabonba-cpp-generator.git\ncd darabonba-cpp-generator/\nnode examples/complex.js\n```\n\n## 问题反馈\n\n[提出问题](https://github.com/aliyun/darabonba-cpp-generator/issues/new/choose), 不符合指南的问题可能会立即关闭。\n\n## 发布日志\n\n发布详情会更新在 [release notes](/CHANGELOG.md) 文件中\n\n## 许可证\n\n[Apache-2.0](/LICENSE)\nCopyright (c) 2009-present, Alibaba Cloud All rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliyun%2Fdarabonba-cpp-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliyun%2Fdarabonba-cpp-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliyun%2Fdarabonba-cpp-generator/lists"}