nest storage directory inside './lib'

pull/1/head
ansuz 5 years ago
parent 58193a1969
commit 725d10fc60

@ -63,12 +63,12 @@ module.exports.create = function (config, cb) {
Log.verbose('HK_ID', 'History keeper ID: ' + Env.id);
nThen(function (w) {
require('../storage/file').create(config, w(function (_store) {
require('./storage/file').create(config, w(function (_store) {
config.store = _store;
Env.store = _store;
}));
}).nThen(function (w) {
require("../storage/tasks").create(config, w(function (e, tasks) {
require("./storage/tasks").create(config, w(function (e, tasks) {
if (e) {
throw e;
}

@ -1,5 +1,5 @@
/*jshint esversion: 6 */
var Store = require("../storage/file");
var Store = require("./storage/file");
var Logger = module.exports;

@ -14,8 +14,8 @@ const Upload = require("./commands/upload");
var RPC = module.exports;
const Store = require("../storage/file");
const BlobStore = require("../storage/blob");
const Store = require("./storage/file");
const BlobStore = require("./storage/blob");
const UNAUTHENTICATED_CALLS = {
GET_FILE_SIZE: Pinning.getFileSize,

@ -6,7 +6,7 @@ var Path = require("path");
var BlobStore = module.exports;
var nThen = require("nthen");
var Semaphore = require("saferphore");
var Util = require("../lib/common-util");
var Util = require("../common-util");
var isValidSafeKey = function (safeKey) {
return typeof(safeKey) === 'string' && !/\//.test(safeKey) && safeKey.length === 44;

@ -6,11 +6,11 @@ var Fse = require("fs-extra");
var Path = require("path");
var nThen = require("nthen");
var Semaphore = require("saferphore");
var Util = require("../lib/common-util");
var Meta = require("../lib/metadata");
var Extras = require("../lib/hk-util");
var Util = require("../common-util");
var Meta = require("../metadata");
var Extras = require("../hk-util");
const Schedule = require("../lib/schedule");
const Schedule = require("../schedule");
const Readline = require("readline");
const ToPull = require('stream-to-pull-stream');
const Pull = require('pull-stream');

@ -1,6 +1,6 @@
var nThen = require("nthen");
var Store = require("../storage/file");
var Store = require("../lib/storage/file");
var config = require("../lib/load-config");
var store;

@ -1,7 +1,7 @@
var nThen = require("nthen");
var Store = require("../storage/file");
var BlobStore = require("../storage/blob");
var Store = require("../lib/storage/file");
var BlobStore = require("../lib/storage/blob");
var Pins = require("../lib/pins");
var config = require("../lib/load-config");

@ -1,9 +1,9 @@
var nThen = require("nthen");
var Tasks = require("../storage/tasks");
var Tasks = require("../lib/storage/tasks");
var Logger = require("../lib/log");
var config = require("../lib/load-config");
var FileStorage = require('../' + config.storage || './storage/file');
var FileStorage = require('../lib/storage/file');
nThen(function (w) {
Logger.create(config, w(function (_log) {

@ -1,5 +1,5 @@
var nThen = require("nthen");
var Tasks = require("../../storage/tasks");
var Tasks = require("../../lib/storage/tasks");
var Logger = require("../../lib/log");
var config = require("../../lib/load-config");
@ -7,7 +7,7 @@ var config = require("../../lib/load-config");
// this isn't strictly necessary for what we want to do
// but the API requires it, and I don't feel like changing that
// --ansuz
var FileStorage = require("../../" + (config.storage || "./storage/file"));
var FileStorage = require("../../lib/storage/file"));
var tasks;
nThen(function (w) {

@ -1,6 +1,6 @@
var nThen = require("nthen");
var Store = require("../storage/file");
var Store = require("../lib/storage/file");
var config = require("../lib/load-config");
var store;

Loading…
Cancel
Save