fix(core): update
This commit is contained in:
parent
d5ff5b0ed8
commit
c09eaf613d
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartmongo',
|
||||
version: '2.0.4',
|
||||
version: '2.0.5',
|
||||
description: 'create a local mongodb for testing'
|
||||
}
|
||||
|
@ -42,11 +42,10 @@ export class SmartMongo {
|
||||
await this.mongoReplicaSet.cleanup();
|
||||
}
|
||||
|
||||
public async stopAndDumpToDir(dirArg: string) {
|
||||
const dumpDir = plugins.smartpath.transform.makeAbsolute(dirArg);
|
||||
public async stopAndDumpToDir(dirArg: string, nameFunctionArg?: (doc: any) => string, emptyDirArg = true) {
|
||||
const mongodumpInstance = new plugins.mongodump.MongoDump();
|
||||
const mongodumpTarget = await mongodumpInstance.addMongoTargetByMongoDescriptor(await this.getMongoDescriptor());
|
||||
await mongodumpTarget.dumpAllCollectionsToDir(dumpDir);
|
||||
await mongodumpTarget.dumpAllCollectionsToDir(dirArg, nameFunctionArg, emptyDirArg);
|
||||
await mongodumpInstance.stop();
|
||||
await this.stop();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user