mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-21 07:29:37 +01:00
Merge pull request #676 from verdaccio/fix-673
fix: allow do not include storage if uses a storage plugin
This commit is contained in:
commit
64e72d5002
@ -91,9 +91,7 @@ class Config {
|
|||||||
// some weird shell scripts are valid yaml files parsed as string
|
// some weird shell scripts are valid yaml files parsed as string
|
||||||
assert.equal(typeof(config), 'object', 'CONFIG: it doesn\'t look like a valid config file');
|
assert.equal(typeof(config), 'object', 'CONFIG: it doesn\'t look like a valid config file');
|
||||||
|
|
||||||
assert(self.storage, 'CONFIG: storage path not defined');
|
// sanity check for strategic config properties
|
||||||
|
|
||||||
// sanity check for strategic config properties
|
|
||||||
strategicConfigProps.forEach(function(x) {
|
strategicConfigProps.forEach(function(x) {
|
||||||
if (self[x] == null) self[x] = {};
|
if (self[x] == null) self[x] = {};
|
||||||
assert(Utils.isObject(self[x]), `CONFIG: bad "${x}" value (object expected)`);
|
assert(Utils.isObject(self[x]), `CONFIG: bad "${x}" value (object expected)`);
|
||||||
|
@ -842,6 +842,7 @@ class LocalStorage implements IStorage {
|
|||||||
const Storage = this._loadStorePlugin();
|
const Storage = this._loadStorePlugin();
|
||||||
|
|
||||||
if (_.isNil(Storage)) {
|
if (_.isNil(Storage)) {
|
||||||
|
assert(this.config.storage, 'CONFIG: storage path not defined');
|
||||||
return new LocalDatabase(this.config, logger);
|
return new LocalDatabase(this.config, logger);
|
||||||
} else {
|
} else {
|
||||||
return Storage;
|
return Storage;
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
# this is useless yet since we use a custom storage, just ignore it
|
|
||||||
storage: ./store-e2e
|
|
||||||
|
|
||||||
web:
|
web:
|
||||||
enable: true
|
enable: true
|
||||||
title: verdaccio-server-protected-e2e
|
title: verdaccio-server-protected-e2e
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
# this is useless yet since we use a custom storage, just ignore it
|
|
||||||
storage: ./store-e2e
|
|
||||||
|
|
||||||
web:
|
web:
|
||||||
enable: true
|
enable: true
|
||||||
title: verdaccio-server-e2e
|
title: verdaccio-server-e2e
|
||||||
|
Loading…
Reference in New Issue
Block a user