{"id":16429595,"url":"https://github.com/stbui/one","last_synced_at":"2025-10-18T17:43:52.085Z","repository":{"id":57142245,"uuid":"73477710","full_name":"stbui/one","owner":"stbui","description":"全栈构架解决方案","archived":false,"fork":false,"pushed_at":"2023-12-05T12:28:47.000Z","size":6105,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T07:13:18.865Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"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/stbui.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}},"created_at":"2016-11-11T12:56:04.000Z","updated_at":"2023-07-22T03:38:33.000Z","dependencies_parsed_at":"2022-09-05T10:01:12.952Z","dependency_job_id":"448ada06-7354-463e-bd74-503b07bae067","html_url":"https://github.com/stbui/one","commit_stats":{"total_commits":65,"total_committers":3,"mean_commits":"21.666666666666668","dds":"0.24615384615384617","last_synced_commit":"2736a325617c8d06f78976733d8dfa85a65abb1e"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/stbui/one","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stbui%2Fone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stbui%2Fone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stbui%2Fone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stbui%2Fone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stbui","download_url":"https://codeload.github.com/stbui/one/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stbui%2Fone/sbom","scorecard":{"id":847155,"data":{"date":"2025-08-11","repo":{"name":"github.com/stbui/one","commit":"2736a325617c8d06f78976733d8dfa85a65abb1e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"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":"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":"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 '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"}}]},"last_synced_at":"2025-08-23T21:44:30.484Z","repository_id":57142245,"created_at":"2025-08-23T21:44:30.485Z","updated_at":"2025-08-23T21:44:30.485Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279512667,"owners_count":26182999,"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-10-18T02:00:06.492Z","response_time":62,"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":[],"created_at":"2024-10-11T08:23:36.743Z","updated_at":"2025-10-18T17:43:52.050Z","avatar_url":"https://github.com/stbui.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `onejs`\n\n全栈架构解决方案\n\n-   **一体式全栈架构：**\n-   **更轻松的开箱体验：**\n\n\n## 前端中的依赖注入\n\n软件开发最富有挑战性也最有趣的一项任务就是如何化繁为简。\n\n在保证业务需求得到满足的前提下，我们（软件工程师们）需要确保软件的可用性、可扩展性、性能、一致性、容错性、稳定性、可重用性等等非功能特性，这决定了软件天生是复杂的。但是人的思维能力是有限的，我们没法兼顾这么多的方面，因此，我们借助“抽象”思想来帮助我们设计软件的架构，征服软件的复杂性。\n\n抽象思想给开发者的武器库里增加了“分层”，“函数、类、模块”，“客户端-服务端”这样的思维工具，开发者们将软件抽象成各个组成部分，然后确定它们内部的工作原理和相互之间的协作方式，这样就能通过一次解决一个小问题，最终解决一个大问题。进一步地，为了更好地做“将软件划分成各个组成部分”这件事，业界提出了各种各样的设计原则和设计方法：职责驱动设计、SOLID 原则、GRASP 原则、高内聚低耦合等。但是这样的原则和设计方法可能还是不够具体，因此设计模式被提出了，最著名的就是 GoF 的 23 种设计模式，这样我们实际编写代码时就能够按图索骥了。\n\n依赖注入是最近几年在前端领域用得越来越多的一种设计模式，本文的目的就是要介绍这种模式如何贯彻抽象思想并反映面向对象设计原则的，还会讨论依赖注入模式本身的特性，以及如何在项目中运用它。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstbui%2Fone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstbui%2Fone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstbui%2Fone/lists"}