INNER CODE UNIT · TypeScript

connectMongoClient

mongodb-js/mongodb-mcp-server · packages/browser-tests/polyfills/@mongodb-js/devtools-connect/index.ts:9

export async function connectMongoClient(url: string, options: any, logger: any, MongoClient: any): Promise<any> {
    // Remove options not understood by the plain Node.js driver
    delete options.proxy;
    delete options.applyProxyToOIDC;
    delete options.productDocsLink;
    delete options.productName;
    delete options.oidc;
    delete options.parentState;
    delete options.parentHandle;
    options.__skipPingOnConnect = true;
    const client = new MongoClient(url, options);
    await client.connect();
    return {
        client,
        state: {
            getStateShareServer() {
                return Promise.resolve("Not Available");
            },

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…