mirror of https://github.com/embarklabs/embark.git
move storage processes to their own modules
This commit is contained in:
parent
feda245b3e
commit
a49a1870bc
|
@ -2,7 +2,8 @@ const UploadIPFS = require('./upload.js');
|
|||
const utils = require('../../utils/utils.js');
|
||||
const fs = require('../../core/fs.js');
|
||||
const IpfsApi = require('ipfs-api');
|
||||
const StorageProcessesLauncher = require('../../processes/storageProcesses/storageProcessesLauncher');
|
||||
// TODO: not great, breaks module isolation
|
||||
const StorageProcessesLauncher = require('../storage/storageProcessesLauncher');
|
||||
|
||||
class IPFS {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const child_process = require('child_process');
|
||||
const ProcessWrapper = require('../processWrapper');
|
||||
const ProcessWrapper = require('../../processes/processWrapper');
|
||||
const constants = require('../../constants');
|
||||
|
||||
let ipfsProcess; // eslint-disable-line no-unused-vars
|
|
@ -1,7 +1,7 @@
|
|||
const fs = require('../../core/fs');
|
||||
const shellJs = require('shelljs');
|
||||
const utils = require('../../utils/utils');
|
||||
const ProcessLauncher = require('../processLauncher');
|
||||
const ProcessLauncher = require('../../processes/processLauncher');
|
||||
const constants = require('../../constants');
|
||||
const {canonicalHost} = require('../../utils/host');
|
||||
|
||||
|
@ -87,7 +87,7 @@ class StorageProcessesLauncher {
|
|||
if (self.processes[storageName]) {
|
||||
return callback(__('Storage process already started'));
|
||||
}
|
||||
const filePath = utils.joinPath(__dirname, `./${storageName}.js`);
|
||||
const filePath = utils.joinPath(__dirname, `../${storageName}/process.js`);
|
||||
fs.access(filePath, (err) => {
|
||||
if (err) {
|
||||
return callback(__('No process file for this storage type (%s) exists. Please start the process locally.', storageName));
|
|
@ -2,7 +2,8 @@ const UploadSwarm = require('./upload.js');
|
|||
const utils = require('../../utils/utils.js');
|
||||
const fs = require('../../core/fs.js');
|
||||
const Web3Bzz = require('web3-bzz');
|
||||
const StorageProcessesLauncher = require('../../processes/storageProcesses/storageProcessesLauncher');
|
||||
// TODO: not great, breaks module isolation
|
||||
const StorageProcessesLauncher = require('../storage/storageProcessesLauncher');
|
||||
|
||||
class Swarm {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const child_process = require('child_process');
|
||||
const ProcessWrapper = require('../processWrapper');
|
||||
const ProcessWrapper = require('../../processes/processWrapper');
|
||||
const constants = require('../../constants');
|
||||
const fs = require('../../core/fs');
|
||||
|
Loading…
Reference in New Issue