{"id":27008854,"url":"https://github.com/alvitoraidhy/pluggers","last_synced_at":"2026-03-03T07:43:07.812Z","repository":{"id":45090916,"uuid":"190675351","full_name":"alvitoraidhy/pluggers","owner":"alvitoraidhy","description":"A convenient plugin manager library.","archived":false,"fork":false,"pushed_at":"2023-01-07T10:31:02.000Z","size":475,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-24T07:58:07.440Z","etag":null,"topics":["node-js","plugin-manager","typescript"],"latest_commit_sha":null,"homepage":"https://alvitoraidhy.github.io/pluggers/","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/alvitoraidhy.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":"2019-06-07T01:59:48.000Z","updated_at":"2023-01-19T20:10:20.000Z","dependencies_parsed_at":"2023-02-06T22:20:04.951Z","dependency_job_id":null,"html_url":"https://github.com/alvitoraidhy/pluggers","commit_stats":null,"previous_names":["icarus213/pluggers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alvitoraidhy/pluggers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvitoraidhy%2Fpluggers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvitoraidhy%2Fpluggers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvitoraidhy%2Fpluggers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvitoraidhy%2Fpluggers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvitoraidhy","download_url":"https://codeload.github.com/alvitoraidhy/pluggers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvitoraidhy%2Fpluggers/sbom","scorecard":{"id":187721,"data":{"date":"2025-08-11","repo":{"name":"github.com/alvitoraidhy/pluggers","commit":"a5b9396ab5b62fb46310580435d67e088f27f9e5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/23 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":-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":"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":"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":"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":"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 '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":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","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-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","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-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"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-16T20:06:15.332Z","repository_id":45090916,"created_at":"2025-08-16T20:06:15.332Z","updated_at":"2025-08-16T20:06:15.332Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30036105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T06:58:30.252Z","status":"ssl_error","status_checked_at":"2026-03-03T06:58:15.329Z","response_time":61,"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":["node-js","plugin-manager","typescript"],"created_at":"2025-04-04T09:17:04.706Z","updated_at":"2026-03-03T07:43:07.779Z","avatar_url":"https://github.com/alvitoraidhy.png","language":"TypeScript","readme":"# Pluggers\n\n[![npm](https://img.shields.io/npm/v/pluggers.svg)](https://www.npmjs.com/package/pluggers)\n[![CircleCI](https://circleci.com/gh/alvitoraidhy/pluggers.svg?style=shield)](https://circleci.com/gh/alvitoraidhy/pluggers)\n[![Codecov](https://codecov.io/gh/alvitoraidhy/pluggers/branch/master/graph/badge.svg?token=MZY3IEV0HS)](https://codecov.io/gh/alvitoraidhy/pluggers)\n\n_A convenient plugin manager library._\n\n[pluggers](https://www.npmjs.com/package/pluggers) is designed to make modular projects easier to create. [recursive-install](https://www.npmjs.com/package/recursive-install) is recommended for making plugins truly independent.\n\n**Warning**: there are breaking changes for those who are upgrading from pre-v3 to v3.\n\n- [Pluggers](#pluggers)\n  - [Features \u0026 Plans](#features--plans)\n  - [Installation](#installation)\n  - [Usage](#usage)\n  - [API](#api)\n  - [How Priorities Work](#how-priorities-work)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## Features \u0026 Plans\n\n- [x] **Synchronous** or **Asynchronous** plugin loading\n- [x] **Flexible access** between plugins\n- [x] **Priority-based** load order (explicit or automatic)\n\n## Installation\n\nUse the package manager **npm** to install pluggers.\n\n```bash\nnpm install --save pluggers\n```\n\n## Usage\n\n`./plugin1.js`\n\n```javascript\n// ./plugin1.js\nconst Plugger = require(\"pluggers\").default;\n\nconst plugin = new Plugger(\"plugin1\");\n\nplugin.pluginCallbacks.init = () =\u003e {\n  const test = \"Hello World!\";\n  return test;\n};\n\nmodule.exports = plugin;\n```\n\n`./plugin2.js`\n\n```javascript\n// ./plugin2.js\nconst Plugger = require(\"pluggers\").default;\n\n// Error will be thrown if the plugin is using a used name (\"plugin1\") when loaded\nconst plugin = new Plugger(\"plugin2\");\n\n// Error will be thrown if a plugin named \"plugin1\" is not loaded\nplugin.requirePlugin({ name: \"plugin1\" });\n\nplugin.pluginCallbacks.init = (plugins) =\u003e {\n  const { plugin1 } = plugins;\n  console.log(plugin1);\n};\n\nmodule.exports = plugin;\n```\n\n`./master.js`\n\n```javascript\n// ./master.js\nconst Plugger = require(\"pluggers\").default;\n\n// Create instance\nconst master = new Plugger(\"master\");\n\n// Add plugins\nmaster.addPlugin(require(\"./plugin1\"));\nmaster.addPlugin(require(\"./plugin2\"));\n\nmaster.initAll().then(() =\u003e {\n  console.log(\"Complete!\");\n});\n```\n\nThe above codes will print \"Hello World!\" and then \"Complete!\" if `master.js` is executed.\n\n## API\n\nCheck out [this documentation page](https://alvitoraidhy.github.io/pluggers/).\n\n## How Priorities Work\n\nThere are 3 types of priorities that can be used, in order of the load order:\n\n- **Positive priority**, which is from `0` to `Infinity`.\\\n  Plugins with positive number priorities will be initialized with the order from the lowest number (`0`) to the highest number (`Infinity`).\n\n- **Undefined priority**\\\n  Plugins with undefined priorities will be initialized after plugins with positive number priorities with the order of which plugin gets loaded with `addPlugin()` first.\n\n- **Negative priority**, which is from `-Infinity` to `-1`.\\\n  Negative priorities work like how negative indexes work in Python (ex: a plugin with the priority of `-1` will be initialized last, `-2` will be initialized second last, etc). Plugins with negative priorities will be processed after plugins with positive number priorities and undefined priorities, with the order from the lowest number (`-Infinity`) to the highest number (`-1`), and will be initialized according to their respective priorities.\n\nAll types of priorities are stackable, for example:\n\n```javascript\n...\nloader.addPlugin(plugin1, { priority: 1 }); // this will be initialized first\nloader.addPlugin(plugin2, { priority: 1 }); // this will be initialized after 'plugin1'. Note that its priority is the same as 'plugin1'\n\nloader.initAll();\n```\n\nBecause of their nature, plugins with negative priorities will be processed differently:\n\n```javascript\n...\nloader.addPlugin(plugin1, { priority: 1 }); // this will be initialized first\nloader.addPlugin(plugin2, { priority: 1 });\n\nloader.addPlugin(plugin3, { priority: -2 }) // this will be initialized after 'plugin1', before 'plugin2'\nloader.addPlugin(plugin4, { priority: -1 }) // this will be initialized after 'plugin2'\n\nloader.initAll(); // Load order: 'plugin1', 'plugin3', 'plugin2', 'plugin4'\n```\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvitoraidhy%2Fpluggers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvitoraidhy%2Fpluggers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvitoraidhy%2Fpluggers/lists"}