{"id":19020233,"url":"https://github.com/trailsjs/trailpack-router","last_synced_at":"2025-10-05T16:34:22.242Z","repository":{"id":57378859,"uuid":"46884388","full_name":"trailsjs/trailpack-router","owner":"trailsjs","description":":package: Router. Aggregate and Configure Application Routes.","archived":false,"fork":false,"pushed_at":"2017-11-19T20:17:25.000Z","size":145,"stargazers_count":12,"open_issues_count":5,"forks_count":7,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-10-03T09:29:02.393Z","etag":null,"topics":["trailpack","trails"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/trailsjs.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":"2015-11-25T20:23:54.000Z","updated_at":"2024-03-07T07:33:34.000Z","dependencies_parsed_at":"2022-09-02T21:21:05.025Z","dependency_job_id":null,"html_url":"https://github.com/trailsjs/trailpack-router","commit_stats":null,"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"purl":"pkg:github/trailsjs/trailpack-router","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Ftrailpack-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Ftrailpack-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Ftrailpack-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Ftrailpack-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trailsjs","download_url":"https://codeload.github.com/trailsjs/trailpack-router/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Ftrailpack-router/sbom","scorecard":{"id":896676,"data":{"date":"2025-08-11","repo":{"name":"github.com/trailsjs/trailpack-router","commit":"140e2ae36980efb7a8c9f6312bbe71504688cd98"},"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":"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":"Code-Review","score":0,"reason":"Found 1/16 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":"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":"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":"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":"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":"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":"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 16 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-24T13:58:25.382Z","repository_id":57378859,"created_at":"2025-08-24T13:58:25.382Z","updated_at":"2025-08-24T13:58:25.382Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278484897,"owners_count":25994934,"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-05T02:00:06.059Z","response_time":54,"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":["trailpack","trails"],"created_at":"2024-11-08T20:16:12.091Z","updated_at":"2025-10-05T16:34:22.224Z","avatar_url":"https://github.com/trailsjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trailpack-router\n\n\n[![Gitter][gitter-image]][gitter-url]\n[![NPM version][npm-image]][npm-url]\n[![Build status][ci-image]][ci-url]\n[![Dependency Status][daviddm-image]][daviddm-url]\n[![Code Climate][codeclimate-image]][codeclimate-url]\n[![Follow @trailsjs on Twitter][twitter-image]][twitter-url]\n\nTrailpack Router. Aggregates all routes from `config.routes` to create [hapi.js route objects](http://hapijs.com/api#route-configuration).\n\n## Usage\nLoad from your trailpack config. (This pack is included by default).\n\n```js\n// config/main.js\nmodule.exports = {\n  // ...\n  packs: [\n    require('trailpack-router')\n  ]\n}\n```\n\n## Configure\n\n#### `config.routes`\nThe list of route objects to be compiled for use by the webserver.\n\n```js\n// config/routes.js\nmodule.exports = [\n  {\n    method: [ 'GET' ],\n    path: '/example/test',\n    handler: 'ExampleController.test'\n  }\n]\n```\n\nDuring initialization, for the above example, a route object will be compiled\nthat takes the following form:\n\n```js\n  {\n    method: [ 'GET' ],\n    path: '/example/test',\n    handler: 'ExampleController.test',\n    config: {\n      pre: [ 'ExamplePolicy.test' ]\n    }\n  }\n```\n\n## Footprints and Policies\n\nSupport for Footprints and Policies is provided by [trailpack-footprints](https://github.com/trailsjs/trailpack-footprints).\n\n## Compatible Trailpacks\n- [trailpack-hapi](https://github.com/trailsjs/trailpack-hapi)\n- [trailpack-express4](https://github.com/trailsjs/trailpack-express4)\n- [trailpack-koa](https://github.com/trailsjs/trailpack-koa) (TODO)\n\n## Contributing\nWe love contributions! Please see our [Contribution Guide](https://github.com/trailsjs/trails/blob/master/CONTRIBUTING.md)\nfor more information.\n\n## License\n[MIT](https://github.com/trailsjs/trailpack-router/blob/master/LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/trailpack-router.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/trailpack-router\n[ci-image]: https://img.shields.io/travis/trailsjs/trailpack-router/master.svg?style=flat-square\n[ci-url]: https://travis-ci.org/trailsjs/trailpack-router\n[daviddm-image]: http://img.shields.io/david/trailsjs/trailpack-router.svg?style=flat-square\n[daviddm-url]: https://david-dm.org/trailsjs/trailpack-router\n[codeclimate-image]: https://img.shields.io/codeclimate/github/trailsjs/trailpack-router.svg?style=flat-square\n[codeclimate-url]: https://codeclimate.com/github/trailsjs/trailpack-router\n[gitter-image]: http://img.shields.io/badge/+%20GITTER-JOIN%20CHAT%20%E2%86%92-1DCE73.svg?style=flat-square\n[gitter-url]: https://gitter.im/trailsjs/trails\n[twitter-image]: https://img.shields.io/twitter/follow/trailsjs.svg?style=social\n[twitter-url]: https://twitter.com/trailsjs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailsjs%2Ftrailpack-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrailsjs%2Ftrailpack-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailsjs%2Ftrailpack-router/lists"}