diff --git a/lib/modules/ipfs/index.js b/lib/modules/ipfs/index.js index 190888d8d..7d36d5e0d 100644 --- a/lib/modules/ipfs/index.js +++ b/lib/modules/ipfs/index.js @@ -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 { diff --git a/lib/processes/storageProcesses/ipfs.js b/lib/modules/ipfs/process.js similarity index 98% rename from lib/processes/storageProcesses/ipfs.js rename to lib/modules/ipfs/process.js index 724a47724..b64f9fa95 100644 --- a/lib/processes/storageProcesses/ipfs.js +++ b/lib/modules/ipfs/process.js @@ -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 diff --git a/lib/processes/storageProcesses/storageProcessesLauncher.js b/lib/modules/storage/storageProcessesLauncher.js similarity index 97% rename from lib/processes/storageProcesses/storageProcessesLauncher.js rename to lib/modules/storage/storageProcessesLauncher.js index 6e7b23593..cac28f57c 100644 --- a/lib/processes/storageProcesses/storageProcessesLauncher.js +++ b/lib/modules/storage/storageProcessesLauncher.js @@ -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)); diff --git a/lib/modules/swarm/index.js b/lib/modules/swarm/index.js index 8c3531706..c479a1008 100644 --- a/lib/modules/swarm/index.js +++ b/lib/modules/swarm/index.js @@ -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 { diff --git a/lib/processes/storageProcesses/swarm.js b/lib/modules/swarm/process.js similarity index 97% rename from lib/processes/storageProcesses/swarm.js rename to lib/modules/swarm/process.js index ac0ca9bb9..5278fa196 100644 --- a/lib/processes/storageProcesses/swarm.js +++ b/lib/modules/swarm/process.js @@ -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');