diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 0263874..8753bdd 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@pushrocks/smartmongo', - version: '2.0.1', + version: '2.0.2', description: 'create a local mongodb for testing' } diff --git a/ts/index.ts b/ts/index.ts index 03cdf5b..639e353 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -14,13 +14,17 @@ export class SmartMongo { public readyPromise = this._readyDeferred.promise; public mongoReplicaSet: plugins.mongoPlugin.MongoMemoryReplSet; - constructor() { - } + constructor() {} public async start(countArg: number = 1) { - this.mongoReplicaSet = await plugins.mongoPlugin.MongoMemoryReplSet.create({ replSet: { count: countArg }, instanceOpts: [{ - storageEngine: 'wiredTiger' - }]}); + this.mongoReplicaSet = await plugins.mongoPlugin.MongoMemoryReplSet.create({ + replSet: { count: countArg }, + instanceOpts: [ + { + storageEngine: 'wiredTiger', + }, + ], + }); this._readyDeferred.resolve(); console.log(`mongoReplicaSet with ${countArg} replicas started.`); console.log(`@pushrocks/smartmongo version ${commitinfo.version}`); @@ -30,10 +34,10 @@ export class SmartMongo { await this.readyPromise; return { mongoDbUrl: this.mongoReplicaSet.getUri(), - } + }; } public async stop() { await this.mongoReplicaSet.stop(true); } -} \ No newline at end of file +}