Skip to content

Commit 86a9451

Browse files
authored
feat: add per-connection proxy settings COMPASS-8142 (#6133)
- Remove the `ssh-tunnel` package from Compass and its usage from data-service - Add relevant fields to the connection form and integrate them into data-service
1 parent bf6a9bf commit 86a9451

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1566
-1932
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ Is there anything else you’d like to see in Compass? Let us know by submitting
6262
- [**@mongodb-js/databases-collections-list**](packages/databases-collections-list): List view for the databases and collections
6363
- [**@mongodb-js/explain-plan-helper**](packages/explain-plan-helper): Explain plan utility methods for MongoDB Compass
6464
- [**@mongodb-js/my-queries-storage**](packages/my-queries-storage): Saved aggregations and queries storage
65-
- [**@mongodb-js/ssh-tunnel**](packages/ssh-tunnel): Yet another ssh tunnel based on ssh2
6665
- [**bson-transpilers**](packages/bson-transpilers): Source to source compilers using ANTLR
6766
- [**compass-e2e-tests**](packages/compass-e2e-tests): E2E test suite for Compass app that follows smoke tests / feature testing matrix
6867
- [**compass-preferences-model**](packages/compass-preferences-model): Compass preferences model

configs/webpack-config-compass/src/index.ts

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import type {
2-
ResolveOptions,
3-
WebpackPluginInstance,
4-
Configuration,
1+
import {
2+
type ResolveOptions,
3+
type WebpackPluginInstance,
4+
type Configuration,
5+
ProvidePlugin,
56
} from 'webpack';
67
import { merge } from 'webpack-merge';
78
import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
@@ -110,6 +111,11 @@ const sharedResolveOptions = (
110111
};
111112
};
112113

114+
const providePlugin = new ProvidePlugin({
115+
URL: ['whatwg-url', 'URL'],
116+
URLSearchParams: ['whatwg-url', 'URLSearchParams'],
117+
});
118+
113119
export function createElectronMainConfig(
114120
args: Partial<ConfigArgs>
115121
): WebpackConfig {
@@ -212,6 +218,7 @@ export function createElectronRendererConfig(
212218
plugins: [
213219
...entriesToHtml(entries),
214220
new WebpackPluginMulticompilerProgress(),
221+
providePlugin,
215222
],
216223
node: false as const,
217224
externals: toCommonJsExternal(sharedExternals),
@@ -339,8 +346,9 @@ export function createWebConfig(args: Partial<ConfigArgs>): WebpackConfig {
339346
...sharedResolveOptions(opts.target),
340347
},
341348
ignoreWarnings: sharedIgnoreWarnings,
342-
plugins:
343-
isServe(opts) && opts.hot
349+
plugins: [
350+
providePlugin,
351+
...(isServe(opts) && opts.hot
344352
? [
345353
// Plugin types are not matching Webpack 5, but they work
346354
new ReactRefreshWebpackPlugin() as unknown as WebpackPluginInstance,
@@ -355,7 +363,8 @@ export function createWebConfig(args: Partial<ConfigArgs>): WebpackConfig {
355363

356364
new DuplicatePackageCheckerPlugin(),
357365
]
358-
: [],
366+
: []),
367+
],
359368
};
360369
}
361370

0 commit comments

Comments
 (0)