{"id":23789991,"url":"https://github.com/blackglory/bundle","last_synced_at":"2026-05-07T03:32:45.904Z","repository":{"id":44953478,"uuid":"290446617","full_name":"BlackGlory/bundle","owner":"BlackGlory","description":"🌳 A directory structure for describing documents, inspired by TextBundle.","archived":false,"fork":false,"pushed_at":"2025-04-13T12:36:35.000Z","size":851,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T01:13:13.321Z","etag":null,"topics":["esm","library","nodejs","npm-package","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@blackglory/bundle","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/BlackGlory.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-08-26T08:57:32.000Z","updated_at":"2025-04-13T12:36:39.000Z","dependencies_parsed_at":"2025-05-29T10:44:17.646Z","dependency_job_id":"5ff904f0-94ac-408b-ad5d-63bdee10a4d3","html_url":"https://github.com/BlackGlory/bundle","commit_stats":{"total_commits":85,"total_committers":2,"mean_commits":42.5,"dds":"0.12941176470588234","last_synced_commit":"8a9984483b6862515db6312fc8d650143c0d9de0"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/BlackGlory/bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Fbundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Fbundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Fbundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Fbundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlackGlory","download_url":"https://codeload.github.com/BlackGlory/bundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Fbundle/sbom","scorecard":{"id":22488,"data":{"date":"2025-08-11","repo":{"name":"github.com/BlackGlory/bundle","commit":"20031ae74e76ce1a851c7fedad7bc47f16202aba"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/21 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":"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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/BlackGlory/bundle/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/BlackGlory/bundle/nodejs.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/nodejs.yml:21","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/nodejs.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":"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":"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":"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":"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":"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 9 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"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3"],"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-14T17:07:52.028Z","repository_id":44953478,"created_at":"2025-08-14T17:07:52.028Z","updated_at":"2025-08-14T17:07:52.028Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283073600,"owners_count":26774726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-06T02:00:06.180Z","response_time":55,"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":["esm","library","nodejs","npm-package","typescript"],"created_at":"2025-01-01T17:17:56.074Z","updated_at":"2026-05-07T03:32:45.897Z","avatar_url":"https://github.com/BlackGlory.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bundle\n一种用于描述文档的目录结构, 受到[TextBundle]的启发.\n\n与TextBundle的不同点:\n- Bundle直接以目录结构在文件系统里表示, 不需要打包.\n- Bundle的文本文件和元数据文件的格式是任意的, 不局限于Markdown和JSON.\n\n[TextBundle]: http://textbundle.org/\n\n## Install\n```sh\nnpm install --save @blackglory/bundle\n# or\nyarn add @blackglory/bundle\n```\n\n## 定义\n一个典型的bundle目录结构如下:\n```\n.\n├── assets\n│   ├── foo.png\n│   └── bar.png\n├── meta.json\n└── text.md\n```\n\nbundle目录下的其他文件和目录会被忽略, 从而允许在此存放临时文件, 系统文件和版本控制系统.\n\n### `/`\nbundle的根目录, 目录名称是随意的, 只需要便于人类识别.\n\n### `/meta.{extension}`\nbundle的元数据, 它是一种能够被解析为键值对字典的文件, 格式不受限制, 取决于具体实现.\n\n如果meta文件不存在, 或meta文件存在多个, 则不会将此目录视作一个bundle.\n\n解析器使用`.`作为分隔符, 因此扩展名不可包含`.`.\n\n### `/meta.{variant}.{extension}`\nbundle元数据的变体, 可选.\n\n相同变体名的meta文件只能存在一个, 否则将被视作无效变体.\n\n解析器使用`.`作为分隔符, 因此变体名、扩展名不可包含`.`.\n\n### `/text.{extension}`\nbundle的文本, 格式不受限制, 取决于具体实现.\n\n如果text文件不存在, 或text文件存在多个, 则不会将此目录视作一个bundle.\n\n解析器使用`.`作为分隔符, 因此扩展名不可包含`.`.\n\n### `/text.{variant}.{extension}`\nbundle文本的变体, 可选.\n\n相同变体名的text文件只能存在一个, 否则将被视作无效变体.\n\n解析器使用`.`作为分隔符, 因此变体名、扩展名不可包含`.`.\n\n### `/assets/**/*`\nbundle的资源文件, 可选.\n\n## API\n```ts\ninterface IBundle {\n  /**\n   * The path of the root directory.\n   */\n  root: string\n\n  /**\n   * The path of the meta file, relative to the root directory.\n   */\n  meta: string\n\n  /**\n   * The path of the text file, relative to the root directory.\n   */\n  text: string\n\n  /**\n   * The paths of assets, relative to the root directory.\n   */\n  assets: string[]\n\n  /**\n   * The variants.\n   */\n  variants: Record\u003cstring, IBundleVariant\u003e\n}\n\ninterface IBundleVariant {\n  /**\n   * The path of the meta file variant, relative to the root directory.\n   */\n  meta?: string\n\n  /**\n   * The path of the text file variant, relative to the root directory.\n   */\n  text?: string\n}\n```\n\n### buildBundle\n```ts\n/**\n * @throws {NotDirectoryError}\n * @throws {NoMetaFileError}\n * @throws {NoTextFileError}\n * @throws {TooManyMetaFilesError}\n * @throws {TooManyTextFilesError}\n */\nfunction buildBundle(pathname: string): Promise\u003cIBundle\u003e\n```\n\n### isBundle\n```ts\nfunction isBundle(pathname: string): Promise\u003cboolean\u003e\n```\n\n### findAllBundles\n```ts\nfunction findAllBundles(pathname: string): AsyncIterable\u003cIBundle\u003e \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackglory%2Fbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackglory%2Fbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackglory%2Fbundle/lists"}