Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bem-site-snapshot-master

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bem-site-snapshot-master

Tools for suitable snapshot manipulation

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

snapshot-master

Tools for suitable snapshot manipulation

NPM

Coveralls branch Travis David David

GitHub Logo

Usage

As npm package

At first you should install npm package by:

$ npm install --save bem-site-snapshot-master

2 different strategies can be used via this package:

  • Simple
  • YDisk (snapshot operations performs also on Yandex Disk)

Both strategies have the same API.

API
constructor

You should create instance of snapshot master API class before using its methods.

var API = require('bem-site-snapshot-master').Simple,
api = new API(options);

// here you can call instance methods of API class
api.getSnapshots(function (err) {
    // TODO implement your handler
});

options - is object with available fields:

  • path - full path to operation folder. (required).
  • symlinks - array with available symlink names (required).
  • logger - settings for logger module. See Logger for more details.

For YDisk API also yandex-disk options section needed:

'yandex-disk': {
    user: 'john.smith',
    password: '12345678',
    namespace: 'test'
}
getSnapshots

Returns list of snapshot folder names.

Arguments:

  • {Function} callback function

Returns name of snapshot which given symlink is pointed to

Arguments:

  • {String} symlink - name of symlink
  • {Function} callback function

Retrieves data of snapshot which given symlink is pointed to and pipes it to destination stream

Arguments:

  • {String} symlink - name of symlink
  • {String} destination - destination stream
  • {Function} callback function
getSnapshotChanges

Reads content of data.json file of given snapshot

Arguments:

  • {String} snapshot - name of given snapshot
  • {Function} callback function
switchSymlinkToSnapshot

Switch symlink to folder with given snapshot name

Arguments:

  • {String} symlink - name of symlink
  • {String} snapshot - name of given snapshot
  • {Function} callback function
removeSnapshot

Removes snapshot by given snapshot name

Arguments:

  • {String} snapshot - name of given snapshot
  • {Function} callback function

Testing

Run tests:

npm run mocha

Run tests with istanbul coverage calculation:

npm run istanbul

Run codestyle verification (jshint and jscs)

npm run codestyle

Maintainer @tormozz48 Please send your questions and proposals to: tormozz48@gmail.com

FAQs

Package last updated on 03 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc