diff --git a/app/lib/dal/fileDAL.ts b/app/lib/dal/fileDAL.ts index b5118d27cbc3109f816aa361128bc135da060855..539da781e70915b24c2033be170965ba79296987 100644 --- a/app/lib/dal/fileDAL.ts +++ b/app/lib/dal/fileDAL.ts @@ -59,7 +59,6 @@ export interface FileDALParams { export class FileDAL { rootPath:string - myFS:any sqliteDriver:SQLiteDriver wotb:any profile:string @@ -87,19 +86,18 @@ export class FileDAL { constructor(params:FileDALParams) { this.rootPath = params.home - this.myFS = params.fs this.sqliteDriver = params.dbf() this.wotb = params.wotb this.profile = 'DAL' // DALs - this.powDAL = new PowDAL(this.rootPath, this.myFS) - this.confDAL = new ConfDAL(this.rootPath, this.myFS) + this.powDAL = new PowDAL(this.rootPath, params.fs) + this.confDAL = new ConfDAL(this.rootPath, params.fs) this.metaDAL = new (require('./sqliteDAL/MetaDAL').MetaDAL)(this.sqliteDriver); this.peerDAL = new (require('./sqliteDAL/PeerDAL').PeerDAL)(this.sqliteDriver); this.blockDAL = new (require('./sqliteDAL/BlockDAL').BlockDAL)(this.sqliteDriver); this.txsDAL = new (require('./sqliteDAL/TxsDAL').TxsDAL)(this.sqliteDriver); - this.statDAL = new StatDAL(this.rootPath, this.myFS) + this.statDAL = new StatDAL(this.rootPath, params.fs) this.idtyDAL = new (require('./sqliteDAL/IdentityDAL').IdentityDAL)(this.sqliteDriver); this.certDAL = new (require('./sqliteDAL/CertDAL').CertDAL)(this.sqliteDriver); this.msDAL = new (require('./sqliteDAL/MembershipDAL').MembershipDAL)(this.sqliteDriver); diff --git a/app/lib/dal/fileDALs/AbstractCFS.ts b/app/lib/dal/fileDALs/AbstractCFS.ts index dae85e9024defb11706ddef4a485391f0cba77c9..729dee10fc1bb2b321dce4c638f08aebadf9c99c 100644 --- a/app/lib/dal/fileDALs/AbstractCFS.ts +++ b/app/lib/dal/fileDALs/AbstractCFS.ts @@ -13,13 +13,15 @@ import {CFSCore} from "./CFSCore"; import {Initiable} from "../sqliteDAL/Initiable" +import {FileSystem} from "../../system/directory" +import {FileDAL} from "../fileDAL" export abstract class AbstractCFS extends Initiable { public coreFS:CFSCore - protected dal:any + protected dal:FileDAL - constructor(rootPath:string, qioFS:any) { + constructor(rootPath:string, qioFS:FileSystem) { super() this.coreFS = new CFSCore(rootPath, qioFS) } diff --git a/app/lib/dal/fileDALs/ConfDAL.ts b/app/lib/dal/fileDALs/ConfDAL.ts index 1fa90e1482b5fe29c177c819cea9c0df9dce8a43..5ecef21a9a5cf29ab976ec4cbe9b86064ebccf3d 100644 --- a/app/lib/dal/fileDALs/ConfDAL.ts +++ b/app/lib/dal/fileDALs/ConfDAL.ts @@ -14,6 +14,7 @@ import {AbstractCFS} from "./AbstractCFS" import {ConfDTO} from "../../dto/ConfDTO" import {CommonConstants} from "../../common-libs/constants"; +import {FileSystem} from "../../system/directory" const _ = require('underscore'); @@ -21,7 +22,7 @@ export class ConfDAL extends AbstractCFS { private logger:any - constructor(rootPath:string, qioFS:any) { + constructor(rootPath:string, qioFS:FileSystem) { super(rootPath, qioFS) this.logger = require('../../logger').NewLogger() } diff --git a/app/lib/dal/fileDALs/PowDAL.ts b/app/lib/dal/fileDALs/PowDAL.ts index eaba6594d4243fc2b7bec5551887c167a54fc527..095bb9f4117f02b8d6b38f95dbf9eece8bfb3eba 100644 --- a/app/lib/dal/fileDALs/PowDAL.ts +++ b/app/lib/dal/fileDALs/PowDAL.ts @@ -12,12 +12,13 @@ // GNU Affero General Public License for more details. import {AbstractCFS} from "./AbstractCFS" +import {FileSystem} from "../../system/directory" export class PowDAL extends AbstractCFS { private static POW_FILE = "pow.txt" - constructor(rootPath:string, qioFS:any) { + constructor(rootPath:string, qioFS:FileSystem) { super(rootPath, qioFS) } diff --git a/app/lib/dal/fileDALs/StatDAL.ts b/app/lib/dal/fileDALs/StatDAL.ts index 1e913c5fe57558c051c3fd611de5d143ed264fc2..6e3501469203c64de026655bae958163439f813a 100644 --- a/app/lib/dal/fileDALs/StatDAL.ts +++ b/app/lib/dal/fileDALs/StatDAL.ts @@ -12,12 +12,13 @@ // GNU Affero General Public License for more details. import {AbstractCFS} from "./AbstractCFS"; -import {CFSCore} from "./CFSCore"; +import {FileSystem} from "../../system/directory" + const _ = require('underscore'); export class StatDAL extends AbstractCFS { - constructor(rootPath:string, qioFS:any) { + constructor(rootPath:string, qioFS:FileSystem) { super(rootPath, qioFS) }