{"id":16244652,"url":"https://github.com/indexzero/node-checkout","last_synced_at":"2025-03-19T18:33:23.457Z","repository":{"id":4462271,"uuid":"5600995","full_name":"indexzero/node-checkout","owner":"indexzero","description":"Pull down local or remote repositories to local directories.","archived":false,"fork":false,"pushed_at":"2013-09-27T08:56:42.000Z","size":124,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-18T21:03:37.759Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/indexzero.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":"2012-08-29T13:38:11.000Z","updated_at":"2024-07-03T09:12:31.000Z","dependencies_parsed_at":"2022-09-03T19:51:25.108Z","dependency_job_id":null,"html_url":"https://github.com/indexzero/node-checkout","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indexzero%2Fnode-checkout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indexzero%2Fnode-checkout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indexzero%2Fnode-checkout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indexzero%2Fnode-checkout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indexzero","download_url":"https://codeload.github.com/indexzero/node-checkout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221450991,"owners_count":16823936,"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":[],"created_at":"2024-10-10T14:20:05.749Z","updated_at":"2024-10-27T20:32:54.168Z","avatar_url":"https://github.com/indexzero.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# checkout\n\nSimple unpacking of repositories to local directories.\n\n## Git Repositories\n\n``` js\ncheckout({\n  type: 'git',\n  url: 'git@github.com:bmeck/ruffian',\n  destination: 'my-apps/ruffian'\n}, function (err) {\n  console.error(err)\n});\n```\n\n## Streams from .tar files\n\n``` js\ncheckout({\n  type: 'tar-stream',\n  stream: req,\n  destination: 'my-apps/ruffian'\n}, function (err) {\n  console.error(err)\n});\n```\n\n## Local directories\n\n``` js\ncheckout({\n  type: 'directory',\n  directory: 'my-repos/ruffian',\n  destination: 'my-apps/ruffian'\n}, function (err) {\n  console.error(err)\n});\n```\n\n## npm packages\n\n``` js\ncheckout({\n  type: 'npm',\n  package: 'ruffian',\n  version: '0.0.0',\n  destination: 'my-apps/ruffian',\n  //\n  // Optional\n  //\n  protocol: 'https',\n  proxy: 'http://outbound-proxy.com',\n  registry: 'registry.npmjs.org',\n  'strict-ssl': false,\n  headers: {\n    // Custom HTTP headers\n    'user-agent': 'node-checkout'\n  }\n}, function (err) {\n  console.error(err)\n})\n```\n\n## Custom Handler\n\n``` js\ncheckout({\n  type: function (description, callback) {\n    // PERFORM THE CHECKOUT HERE\n    // @description matches the first argument to checkout\n  },\n}, function (err) {\n  console.error(err)\n})\n```\n\n## Registering a generic handler\n\n``` js\ncheckout.handlers.myHandler = function (description, callback) {\n  // Same as Custom Handler\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findexzero%2Fnode-checkout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findexzero%2Fnode-checkout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findexzero%2Fnode-checkout/lists"}