0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-20 22:52:46 -05:00

#103 Config file must not be aware of storage database, storage class should handle it.

This commit is contained in:
Juan Picado @jotadeveloper 2017-05-25 12:07:18 +02:00
parent 1307181005
commit db3233075c
No known key found for this signature in database
GPG key ID: 18AC54485952D158
2 changed files with 4 additions and 1 deletions

View file

@ -40,9 +40,11 @@ class Storage {
/**
* Constructor
* @param {Object} config config list of properties
* @param {LocalData} localList reference
*/
constructor(config) {
constructor(config, localList) {
this.config = config;
this.localList = localList;
// local data handler is linked with the configuration handler
this.localList = new LocalData(Path.join(Path.resolve(Path.dirname(config.self_path || ''), config.storage),
// FUTURE: the database might be parameterizable from config.yaml

View file

@ -15,6 +15,7 @@ const MyStreams = require('./streams');
const Proxy = require('./up-storage');
const Utils = require('./utils');
/**
* Implements Storage interface
* (same for storage.js, local-storage.js, up-storage.js).