{"id":13992107,"url":"https://github.com/ddliu/node-svn-spawn","last_synced_at":"2025-07-22T06:03:37.921Z","repository":{"id":41390267,"uuid":"10187704","full_name":"ddliu/node-svn-spawn","owner":"ddliu","description":"Easy way to access svn repository with node.js.","archived":false,"fork":false,"pushed_at":"2019-07-01T01:52:23.000Z","size":19,"stargazers_count":86,"open_issues_count":4,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-30T02:48:39.547Z","etag":null,"topics":["nodejs","subversion","svn"],"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/ddliu.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":"2013-05-21T04:15:53.000Z","updated_at":"2025-04-09T14:24:53.000Z","dependencies_parsed_at":"2022-08-27T12:31:30.381Z","dependency_job_id":null,"html_url":"https://github.com/ddliu/node-svn-spawn","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ddliu/node-svn-spawn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddliu%2Fnode-svn-spawn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddliu%2Fnode-svn-spawn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddliu%2Fnode-svn-spawn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddliu%2Fnode-svn-spawn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddliu","download_url":"https://codeload.github.com/ddliu/node-svn-spawn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddliu%2Fnode-svn-spawn/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266437355,"owners_count":23928226,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["nodejs","subversion","svn"],"created_at":"2024-08-09T14:01:47.617Z","updated_at":"2025-07-22T06:03:37.841Z","avatar_url":"https://github.com/ddliu.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# svn-spawn\n\n[![npm](https://img.shields.io/npm/v/svn-spawn.svg?style=flat-square)](https://www.npmjs.com/package/svn-spawn)\n[![npm](https://img.shields.io/npm/dm/svn-spawn.svg?style=flat-square)](https://www.npmjs.com/package/svn-spawn)\n[![Travis](https://img.shields.io/travis/ddliu/node-svn-spawn.svg?style=flat-square)](https://travis-ci.org/ddliu/node-svn-spawn)\n![npm](https://img.shields.io/npm/l/svn-spawn.svg?style=flat-square)\n\nEasy way to access svn repository with node.js.\n\n## Features\n\n- Easy to use\n- Fast way to add local changes\n- Query svn infomation as array or object\n- Common svn commands are all supported\n\n## Usage\n\nCreate a svn client instance\n\n```js\nvar Client = require('svn-spawn');\nvar client = new Client({\n    cwd: '/path to your svn working directory',\n    username: 'username', // optional if authentication not required or is already saved\n    password: 'password', // optional if authentication not required or is already saved\n    noAuthCache: true, // optional, if true, username does not become the logged in user on the machine\n});\n```\n`svn update`\n\n```js\nclient.update(function(err, data) {\n    console.log('updated');\n});\n```\n\n`svn info`\n\n```js\nclient.getInfo(function(err, data) {\n    console.log('Repository url is %s', data.url);\n});\n```\n\nMake some changes and commit all\n\n```js\nclient.addLocal(function(err, data) {\n    console.log('all local changes has been added for commit');\n\n    client.commit('commit message here', function(err, data) {\n        console.log('local changes has been committed!');\n    });\n});\n```\n\nSingle file\n\n```js\nclient.add('relative/path/to/file', function(err, data) {\n    client.commit(['commit message here', 'relative/path/to/file'], function(err, data) {\n        console.log('committed one file!');\n    });\n});\n```\n\nRun any svn command\n\n```js\nclient.cmd(['subcommand', '--option1=xx', '--option2=xx', 'arg1', 'arg2'], function(err, data) {\n    console.log('subcommand done');\n});\n```\n\n## Result Object\n\n`getXXX` methods will return parsed data as object.\n\n`getInfo` result example:\n\n```json\n{\n  \"$\": {\n    \"path\": \".\",\n    \"revision\": \"1\",\n    \"kind\": \"dir\"\n  },\n  \"url\": \"file:///home/dong/projects/node-packages/node-svn-spawn/test/tmp/repo\",\n  \"repository\": {\n    \"root\": \"file:///home/dong/projects/node-packages/node-svn-spawn/test/tmp/repo\",\n    \"uuid\": \"302eb8ee-a81a-4432-8477-1ad8fe3a9a1e\"\n  },\n  \"wc-info\": {\n    \"wcroot-abspath\": \"/home/dong/projects/node-packages/node-svn-spawn/test/tmp/copy\",\n    \"schedule\": \"normal\",\n    \"depth\": \"infinity\"\n  },\n  \"commit\": {\n    \"$\": {\n      \"revision\": \"1\"\n    },\n    \"author\": \"dong\",\n    \"date\": \"2013-11-08T02:07:25.884985Z\"\n  }\n}\n```\n\n`getLog` result example:\n\n```json\n[\n    {\n      \"$\": {\n        \"revision\": \"1\"\n      },\n      \"author\": \"dong\",\n      \"date\": \"2013-11-08T02:10:37.656902Z\",\n      \"msg\": \"init repo\"\n    },\n    ...\n]\n```\n\n`getStatus` result example:\n\n```json\n[\n  {\n    \"$\": {\n      \"path\": \"a.txt\"\n    },\n    \"wc-status\": {\n      \"$\": {\n        \"props\": \"none\",\n        \"item\": \"modified\",\n        \"revision\": \"1\"\n      },\n      \"commit\": {\n        \"$\": {\n          \"revision\": \"1\"\n        },\n        \"author\": \"dong\",\n        \"date\": \"2013-11-08T02:17:20.390152Z\"\n      }\n    }\n  }\n]\n```\n\n## Requirements\n\nYou need to have the `svn` command installed.\n\n## Installation\n\n```bash\nnpm install svn-spawn\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddliu%2Fnode-svn-spawn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddliu%2Fnode-svn-spawn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddliu%2Fnode-svn-spawn/lists"}