bb-content-copy
TODO
Installation
npm install @kapitchi/bb-content-copy
Usage
TODO
API
Classes
- CopyService
Content copy service
Typedefs
- HttpMethod :
Object
- FilesystemMethod :
Object
CopyService
Content copy service
Kind: global class
new CopyService(copyServiceOpts, copyServiceMessagePublisher)
Param | Type | Description |
---|---|---|
copyServiceOpts | Object |
|
copyServiceOpts.progressUpdatePeriod | number |
How often is copyServiceProgress.next() is called |
copyServiceMessagePublisher | Object |
|
copyServiceMessagePublisher.next | function |
Promise
copyService.copy(params) ⇒ Copy source to destination
Kind: instance method of CopyService
Param | Type | Description |
---|---|---|
params | Object |
|
params.id | string |
Unique copy operation ID |
params.source | FilesystemMethod | HttpMethod |
|
[params.source.size] | number |
Content size (if not provided it will be detected) |
[params.source.mime] | number |
MIME type of the content (if not provided it will be detected) |
params.destination | FilesystemMethod | HttpMethod |
Object
HttpMethod : Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
type | string |
Value: http |
url | string |
|
method | string |
HTTP method |
headers | Object |
Object
FilesystemMethod : Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
type | string |
Value: filesystem |
path | string |
File path |
Development
Run the command below before release.
npm run build
Tests
npm test
Contribute
Please feel free to submit an issue/PR or contact me at matus.zeman@gmail.com.