fix(core): update
This commit is contained in:
parent
ed38ff50e7
commit
d0c7a95e16
@ -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'
|
||||
}
|
||||
|
16
ts/index.ts
16
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,7 +34,7 @@ export class SmartMongo {
|
||||
await this.readyPromise;
|
||||
return {
|
||||
mongoDbUrl: this.mongoReplicaSet.getUri(),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public async stop() {
|
||||
|
Loading…
Reference in New Issue
Block a user