{"id":17383622,"url":"https://github.com/trailsjs/trailpack-repl","last_synced_at":"2025-04-15T09:53:42.184Z","repository":{"id":57378855,"uuid":"46767708","full_name":"trailsjs/trailpack-repl","owner":"trailsjs","description":":package: REPL Trailpack","archived":false,"fork":false,"pushed_at":"2017-11-19T04:10:06.000Z","size":96,"stargazers_count":8,"open_issues_count":3,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-28T19:07:40.582Z","etag":null,"topics":["repl","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-24T04:52:17.000Z","updated_at":"2017-08-08T01:30:39.000Z","dependencies_parsed_at":"2022-09-02T21:21:17.687Z","dependency_job_id":null,"html_url":"https://github.com/trailsjs/trailpack-repl","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Ftrailpack-repl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Ftrailpack-repl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Ftrailpack-repl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Ftrailpack-repl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trailsjs","download_url":"https://codeload.github.com/trailsjs/trailpack-repl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249048716,"owners_count":21204306,"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","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":["repl","trailpack","trails"],"created_at":"2024-10-16T07:43:17.818Z","updated_at":"2025-04-15T09:53:42.162Z","avatar_url":"https://github.com/trailsjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trailpack-repl\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\n[REPL](https://nodejs.org/api/repl.html) Trailpack. Adds an interactive shell to your Trails app to help with\ndevelopment and debugging. Saves command history between sessions.\n\n## Usage\nThe repl trailpack is loaded in your trailpack config per usual.\n\n```js\n// config/main.js\nmodule.exports = {\n  // ...\n  packs: [\n    // ...\n    require('trailpack-repl')\n  ]\n}\n```\n\n```js\n// config/repl.js\nmodule.exports = {\n  /**\n   * REPL is disabled automatically if no text terminal is available. Set\n   * to \"true\" to override this behavior.\n   */\n  allowNoTTY: false\n}\n```\n\n## Shell Commands\nWith the [REPL Trailpack](https://github.com/trailsjs/trailpack-repl) you can test your REST API directly from the interactive shell.\n\n### GET \n`get(\"/api/v1/default/info\")`\n\n### HEAD \n`head(\"/api/v1/default/info\")`\n\n### OPTIONS \n`options(\"/api/v1/default/info\")`\n\n### POST\n`post(\"/api/v1/default/info\", {some : 'data'})`\n\nIf you want to simulate some HTML form you can do : \n\n`post(\"/api/v1/default/info\", 'some=data', 'application/x-www-form-urlencoded')`\n### PUT \n`put(\"/api/v1/default/info\", {some : 'data'})`\n\nIf you want to simulate some HTML form you can do : \n\n`put(\"/api/v1/default/info\", 'some=data', 'application/x-www-form-urlencoded')`\n\n### PATCH \n`patch(\"/api/v1/default/info\", {some : 'data'})`\n\n### DELETE \n`delete(\"/api/v1/default/info\")`\n\nBy default headers are `{'Accept': 'application/json'}` but they can be modified by adding an extra param of each method like this :\n\n```\nget(\"/api/v1/default/info\", {'Accept': 'text/xml'})\nhead(\"/api/v1/default/info\", {'Accept': 'text/xml'})\noptions(\"/api/v1/default/info\", 'some=data', 'application/x-www-form-urlencoded', {'Accept': 'text/xml'})\npost(\"/api/v1/default/info\", 'some=data', 'application/x-www-form-urlencoded', {'Accept': 'text/xml'})\nput(\"/api/v1/default/info\", 'some=data', 'application/x-www-form-urlencoded', {'Accept': 'text/xml'})\npatch(\"/api/v1/default/info\", 'some=data', 'application/x-www-form-urlencoded', {'Accept': 'text/xml'})\ndelete(\"/api/v1/default/info\", 'some=data', 'application/x-www-form-urlencoded', {'Accept': 'text/xml'})\n```\n\n## Contributing\nWe love contributions! Please check out our [Contributor's Guide](https://github.com/trailsjs/trails/blob/master/.github/CONTRIBUTING.md) for more\ninformation on how our projects are organized and how to get started.\n\n## License\n[MIT](https://github.com/trailsjs/trailpack-repl/blob/master/LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/trailpack-repl.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/trailpack-repl\n[ci-image]: https://img.shields.io/travis/trailsjs/trailpack-repl/master.svg?style=flat-square\n[ci-url]: https://travis-ci.org/trailsjs/trailpack-repl\n[daviddm-image]: http://img.shields.io/david/trailsjs/trailpack-repl.svg?style=flat-square\n[daviddm-url]: https://david-dm.org/trailsjs/trailpack-repl\n[codeclimate-image]: https://img.shields.io/codeclimate/github/trailsjs/trailpack-repl.svg?style=flat-square\n[codeclimate-url]: https://codeclimate.com/github/trailsjs/trailpack-repl\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\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailsjs%2Ftrailpack-repl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrailsjs%2Ftrailpack-repl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailsjs%2Ftrailpack-repl/lists"}