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:
parent
1307181005
commit
db3233075c
2 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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).
|
||||
|
|
Loading…
Add table
Reference in a new issue