{"version":3,"sources":["../src/connections/createConnection.ts"],"sourcesContent":["import { MongoClient, MongoClientOptions } from 'mongodb';\n\ninterface MonkoClientOptions {\n  uri: string;\n  mongoClientOptions?: MongoClientOptions;\n}\n\nexport interface MonkoClient {\n  client: MongoClient;\n  connect: () => Promise<MongoClient>;\n  close: () => Promise<void>;\n}\n\nexport const createMonkoClient = (options: MonkoClientOptions): MonkoClient => {\n  const client = new MongoClient(options.uri, options.mongoClientOptions);\n\n  return {\n    client,\n    connect: async () => {\n      await client.connect();\n      return client;\n    },\n    close: async () => {\n      await client.close();\n    },\n  };\n};"],"mappings":";AAAA,SAAS,mBAAuC;AAazC,IAAM,oBAAoB,CAAC,YAA6C;AAC7E,QAAM,SAAS,IAAI,YAAY,QAAQ,KAAK,QAAQ,kBAAkB;AAEtE,SAAO;AAAA,IACL;AAAA,IACA,SAAS,YAAY;AACnB,YAAM,OAAO,QAAQ;AACrB,aAAO;AAAA,IACT;AAAA,IACA,OAAO,YAAY;AACjB,YAAM,OAAO,MAAM;AAAA,IACrB;AAAA,EACF;AACF;","names":[]}