Skip to content

Commit

Permalink
chore(compass-web): stub out devtools-connect entirely COMPASS-7552 (#…
Browse files Browse the repository at this point in the history
…5305)

devtools-connect mostly just contains logic that applies to desktop application
scenarios, and not so much the web use case. Instead of manually stubbing out
the transitive dependencies that come with it, stub out the entire devtools-connect
dependency with one that connects to the driver fairly directly.
  • Loading branch information
addaleax authored Jan 8, 2024
1 parent 9271347 commit 6ef0e48
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 289 deletions.
155 changes: 0 additions & 155 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/compass-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
"chai": "^4.3.6",
"compass-preferences-model": "^2.17.1",
"depcheck": "^1.4.1",
"dns-query": "^0.11.2",
"eslint": "^7.25.0",
"events": "^3.3.0",
"hadron-app-registry": "^9.1.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export function hookLogger() {
/* no-op */
}
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.useSystemCA;
delete options.productDocsLink;
delete options.productName;
delete options.oidc;
delete options.parentState;
delete options.parentHandle;
const client = new MongoClient(url, options);
await client.connect();
return {
client,
state: {
getStateShareServer() {
return Promise.resolve('Not Available');
},
oidcPlugin: { logger },
},
};
}
21 changes: 0 additions & 21 deletions packages/compass-web/polyfills/@mongodb-js/oidc-plugin/index.ts

This file was deleted.

49 changes: 0 additions & 49 deletions packages/compass-web/polyfills/dns/index.ts

This file was deleted.

17 changes: 0 additions & 17 deletions packages/compass-web/polyfills/http/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions packages/compass-web/polyfills/os-dns-native/index.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/compass-web/polyfills/os/index.ts

This file was deleted.

Loading

0 comments on commit 6ef0e48

Please sign in to comment.