svn-dav-fs
Version:
handler for 'svn+https' url scheme (plain js svn dav fs)
228 lines (153 loc) • 9.39 kB
Markdown
[](https://www.npmjs.com/package/svn-dav-fs)
[](https://greenkeeper.io/)
[](https://github.com/arlac77/svn-dav-fs)
[](https://github.com/prettier/prettier)
[](http://travis-ci.org/arlac77/svn-dav-fs)
[](http://codecov.io/github/arlac77/svn-dav-fs?branch=master)
[](https://snyk.io/test/github/arlac77/svn-dav-fs)
[](https://github.com/arlac77/svn-dav-fs/issues)
[](https://david-dm.org/arlac77/svn-dav-fs)
[](https://david-dm.org/arlac77/svn-dav-fs#info=devDependencies)
[](http://inch-ci.org/github/arlac77/svn-dav-fs)
[](https://npmjs.org/package/svn-dav-fs)
[](http://commitizen.github.io/cz-cli/)
# svn-dav-fs
handler for 'svn+https' url scheme (plain js svn dav fs)
# API
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
### Table of Contents
- [SVNHTTPSScheme](#svnhttpsscheme)
- [optionsRequest](#optionsrequest)
- [Parameters](#parameters)
- [activityCollectionSet](#activitycollectionset)
- [Parameters](#parameters-1)
- [userAgent](#useragent)
- [clientVersion](#clientversion)
- [davHeader](#davheader)
- [mkcol](#mkcol)
- [Parameters](#parameters-2)
- [Examples](#examples)
- [startTransaction](#starttransaction)
- [Parameters](#parameters-3)
- [Examples](#examples-1)
- [put](#put)
- [Parameters](#parameters-4)
- [optionsFromEnvironment](#optionsfromenvironment)
- [Parameters](#parameters-5)
- [ActivityCollectionSet](#activitycollectionset-1)
- [Parameters](#parameters-6)
- [Properties](#properties)
- [repositoryRoot](#repositoryroot)
- [absoluteRepositoryRoot](#absoluterepositoryroot)
- [pathInsideRepository](#pathinsiderepository)
- [encodeProperties](#encodeproperties)
- [Parameters](#parameters-7)
- [Examples](#examples-2)
## SVNHTTPSScheme
**Extends HTTPSScheme**
URL scheme 'svn+https' svn over https
### optionsRequest
Execute options request
#### Parameters
- `context` **Context** execution context
- `url` **[URL](https://developer.mozilla.org/docs/Web/API/URL/URL)**
- `body` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** xml lines
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Request](https://developer.mozilla.org/Add-ons/SDK/High-Level_APIs/request)>**
### activityCollectionSet
query for the activity collection set.
#### Parameters
- `context` **Context** execution context
- `url` **[URL](https://developer.mozilla.org/docs/Web/API/URL/URL)**
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[ActivityCollectionSet](#activitycollectionset)>**
### userAgent
Delivers svn user agent
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** user agent identifier
### clientVersion
Delivers svn client version
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** version
### davHeader
Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
### mkcol
<!-- skip-example -->
#### Parameters
- `context` **Context**
- `url` **[URL](https://developer.mozilla.org/docs/Web/API/URL/URL)**
- `tx` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
#### Examples
```javascript
MKCOL /svn/delivery_notes/!svn/txr/1485-1cs/data/comp2 HTTP/1.1
DAV http://subversion.tigris.org/xmlns/dav/svn/depth
DAV http://subversion.tigris.org/xmlns/dav/svn/mergeinfo
DAV http://subversion.tigris.org/xmlns/dav/svn/log-revprops
```
### startTransaction
<!-- skip-example -->
Start a new transaction
#### Parameters
- `context` **Context**
- `url` **ULR**
- `message` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
#### Examples
```javascript
POST /svn/delivery_notes/!svn/me HTTP/1.1
Content-Type application/vnd.svn-skel
DAV http://subversion.tigris.org/xmlns/dav/svn/depth
DAV http://subversion.tigris.org/xmlns/dav/svn/mergeinfo
DAV http://subversion.tigris.org/xmlns/dav/svn/log-revprops
(create-txn-with-props (svn:txn-user-agent 48 SVN/1.9.4 (x86_64-apple-darwin15.0.0) serf/1.3.8 svn:log 19 this is the message svn:txn-client-compat-version 5 1.9.4))
Response:
SVN-Txn-Name: 1483-1a1
```
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** acs, txn
### put
- **See: <http://svn.apache.org/repos/asf/subversion/trunk/notes/svndiff>**
- **See: <http://stackoverflow.com/questions/24865265/how-to-do-svn-http-request-checkin-commit-within-html>**
- **See: <https://git.tmatesoft.com/repos/svnkit.git>**
#### Parameters
- `context` **Context**
- `url` **[URL](https://developer.mozilla.org/docs/Web/API/URL/URL)**
- `stream` **ReadableStream**
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
### optionsFromEnvironment
Extract options suitable for the constructor
form the given set of environment variables
#### Parameters
- `env` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** undefined if no suitable environment variables have been found
## ActivityCollectionSet
### Parameters
- `url` **[URL](https://developer.mozilla.org/docs/Web/API/URL/URL)**
- `attributes` **[Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>**
- `davFeatures` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**
- `allowedMethods` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**
### Properties
- `url` **[URL](https://developer.mozilla.org/docs/Web/API/URL/URL)**
- `attributes` **[Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>**
- `davFeatures` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**
- `allowedMethods` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**
### repositoryRoot
Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
### absoluteRepositoryRoot
Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
### pathInsideRepository
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path of the url inside of the repository
## encodeProperties
<!-- skip-example -->
Encodes objects into strings as used by svn
### Parameters
- `object` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** to be encoded
### Examples
```javascript
(create-txn-with-props
(svn:txn-user-agent 48 SVN/1.9.4 (x86_64-apple-darwin15.0.0) serf/1.3.8
svn:log 19 this is the message
svn:txn-client-compat-version 5 1.9.4))
```
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** encoded object value
# install
With [npm](http://npmjs.org) do:
```shell
npm install svn-dav-fs
```
# license
BSD-2-Clause