From d0c7a95e16c684ab2ac77f961d5fa5d5d27c86c7 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Thu, 19 May 2022 08:48:43 +0200 Subject: [PATCH] fix(core): update --- ts/00_commitinfo_data.ts | 2 +- ts/index.ts | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) 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 +}