@mongodb-js/connection-form 1.87.2 → 1.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/advanced-connection-options.d.ts.map +1 -1
- package/dist/components/advanced-options-tabs/advanced-options-tabs.d.ts.map +1 -1
- package/dist/components/advanced-options-tabs/advanced-options-tabs.js +3 -3
- package/dist/components/advanced-options-tabs/advanced-tab/advanced-tab.d.ts +1 -7
- package/dist/components/advanced-options-tabs/advanced-tab/advanced-tab.d.ts.map +1 -1
- package/dist/components/advanced-options-tabs/advanced-tab/advanced-tab.js +3 -37
- package/dist/components/advanced-options-tabs/advanced-tab/read-preference-form.d.ts +17 -0
- package/dist/components/advanced-options-tabs/advanced-tab/read-preference-form.d.ts.map +1 -0
- package/dist/components/advanced-options-tabs/advanced-tab/read-preference-form.js +148 -0
- package/dist/components/advanced-options-tabs/advanced-tab/url-options-list-editor.d.ts.map +1 -1
- package/dist/components/advanced-options-tabs/advanced-tab/url-options-list-editor.js +2 -1
- package/dist/components/advanced-options-tabs/authentication-tab/authentication-tab.js +1 -1
- package/dist/components/advanced-options-tabs/csfle-tab/csfle-tab.d.ts.map +1 -1
- package/dist/components/advanced-options-tabs/csfle-tab/csfle-tab.js +3 -3
- package/dist/components/advanced-options-tabs/csfle-tab/encrypted-field-config-input.d.ts.map +1 -1
- package/dist/components/advanced-options-tabs/csfle-tab/encrypted-field-config-input.js +4 -2
- package/dist/components/advanced-options-tabs/csfle-tab/kms-local-key-generator.d.ts.map +1 -1
- package/dist/components/advanced-options-tabs/csfle-tab/kms-provider-card.d.ts +1 -1
- package/dist/components/advanced-options-tabs/csfle-tab/kms-provider-card.d.ts.map +1 -1
- package/dist/components/advanced-options-tabs/csfle-tab/kms-provider-content.d.ts +1 -1
- package/dist/components/advanced-options-tabs/csfle-tab/kms-provider-content.d.ts.map +1 -1
- package/dist/components/advanced-options-tabs/csfle-tab/kms-provider-fields.d.ts +1 -1
- package/dist/components/advanced-options-tabs/csfle-tab/kms-provider-fields.d.ts.map +1 -1
- package/dist/components/advanced-options-tabs/csfle-tab/kms-provider-status-indicator.d.ts.map +1 -1
- package/dist/components/advanced-options-tabs/general-tab/general-tab.d.ts.map +1 -1
- package/dist/components/advanced-options-tabs/general-tab/host-input.d.ts.map +1 -1
- package/dist/components/advanced-options-tabs/general-tab/host-input.js +1 -1
- package/dist/components/advanced-options-tabs/ssh-tunnel-tab/proxy-and-ssh-tunnel-tab.d.ts.map +1 -1
- package/dist/components/advanced-options-tabs/ssh-tunnel-tab/proxy-and-ssh-tunnel-tab.js +1 -1
- package/dist/components/advanced-options-tabs/tls-ssl-tab/tls-ssl-tab.d.ts.map +1 -1
- package/dist/components/connection-form.d.ts.map +1 -1
- package/dist/components/connection-form.js +64 -35
- package/dist/hooks/use-connect-form.d.ts +3 -2
- package/dist/hooks/use-connect-form.d.ts.map +1 -1
- package/dist/hooks/use-connect-form.js +15 -5
- package/dist/utils/authentication-handler.d.ts.map +1 -1
- package/dist/utils/authentication-handler.js +1 -1
- package/dist/utils/connection-ssh-handler.d.ts.map +1 -1
- package/dist/utils/csfle-handler.d.ts +3 -2
- package/dist/utils/csfle-handler.d.ts.map +1 -1
- package/dist/utils/csfle-handler.js +14 -7
- package/dist/utils/csfle-kms-fields.d.ts.map +1 -1
- package/dist/utils/read-preference-handler.d.ts +18 -0
- package/dist/utils/read-preference-handler.d.ts.map +1 -0
- package/dist/utils/read-preference-handler.js +37 -0
- package/dist/utils/url-options.d.ts.map +1 -1
- package/dist/utils/url-options.js +0 -4
- package/dist/utils/validation.d.ts +4 -2
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +53 -7
- package/package.json +13 -14
|
@@ -40,13 +40,16 @@ exports.ColorCircleGlyph = void 0;
|
|
|
40
40
|
const react_1 = __importStar(require("react"));
|
|
41
41
|
const compass_components_1 = require("@mongodb-js/compass-components");
|
|
42
42
|
const lodash_1 = require("lodash");
|
|
43
|
-
const connection_string_input_1 = __importDefault(require("./connection-string-input"));
|
|
44
|
-
const advanced_connection_options_1 = __importDefault(require("./advanced-connection-options"));
|
|
45
|
-
const connection_form_modal_actions_1 = require("./connection-form-modal-actions");
|
|
46
43
|
const use_connect_form_1 = require("../hooks/use-connect-form");
|
|
47
44
|
const validation_1 = require("../utils/validation");
|
|
45
|
+
const csfle_handler_1 = require("../utils/csfle-handler");
|
|
46
|
+
const connection_string_helpers_1 = require("../utils/connection-string-helpers");
|
|
48
47
|
const use_connect_form_settings_1 = require("../hooks/use-connect-form-settings");
|
|
49
48
|
const use_connection_color_1 = require("../hooks/use-connection-color");
|
|
49
|
+
const connection_form_modal_actions_1 = require("./connection-form-modal-actions");
|
|
50
|
+
const read_preference_form_1 = __importDefault(require("./advanced-options-tabs/advanced-tab/read-preference-form"));
|
|
51
|
+
const advanced_connection_options_1 = __importDefault(require("./advanced-connection-options"));
|
|
52
|
+
const connection_string_input_1 = __importDefault(require("./connection-string-input"));
|
|
50
53
|
const form_help_1 = __importDefault(require("./form-help/form-help"));
|
|
51
54
|
const descriptionStyles = (0, compass_components_1.css)({
|
|
52
55
|
marginTop: compass_components_1.spacing[200],
|
|
@@ -85,12 +88,10 @@ const formContentStyles = (0, compass_components_1.css)({
|
|
|
85
88
|
flex: '1 1 auto',
|
|
86
89
|
// To prevent input outline being cut by the overflow
|
|
87
90
|
paddingLeft: compass_components_1.spacing[100],
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
|
|
92
|
-
paddingBottom: compass_components_1.spacing[600],
|
|
93
|
-
},
|
|
91
|
+
// Leaves some space after the last field when scrolled to the end. Set here
|
|
92
|
+
// rather than on the last child, which can be the disconnect banner and
|
|
93
|
+
// would get the padding inside it.
|
|
94
|
+
paddingBottom: compass_components_1.spacing[600],
|
|
94
95
|
});
|
|
95
96
|
const formHelpContainerStyles = (0, compass_components_1.css)({
|
|
96
97
|
position: 'sticky',
|
|
@@ -196,6 +197,7 @@ function ConnectionPersonalizationForm({ updateConnectionFormField, personalizat
|
|
|
196
197
|
function ConnectionForm({ initialConnectionInfo, connectionErrorMessage, disableEditingConnectedConnection = false, onSaveAndConnectClicked, onSaveClicked, onConnectClicked, onDisconnectClicked, onCancel, onAdvancedOptionsToggle, openSettingsModal, }) {
|
|
197
198
|
const [advancedOpen, setAdvancedOpen] = (0, react_1.useState)(false);
|
|
198
199
|
const isDarkMode = (0, compass_components_1.useDarkMode)();
|
|
200
|
+
const isAtlas = !!initialConnectionInfo.atlasMetadata;
|
|
199
201
|
const onAdvancedChange = (0, react_1.useCallback)((newState) => {
|
|
200
202
|
setAdvancedOpen(newState);
|
|
201
203
|
onAdvancedOptionsToggle?.(newState);
|
|
@@ -218,9 +220,11 @@ function ConnectionForm({ initialConnectionInfo, connectionErrorMessage, disable
|
|
|
218
220
|
];
|
|
219
221
|
}, [_warnings, forceConnectionOptions]);
|
|
220
222
|
const connectionStringInvalidError = errors.find((error) => error.fieldName === 'connectionString');
|
|
221
|
-
const
|
|
223
|
+
const [connectionStringUrl] = (0, react_1.useMemo)(() => (0, connection_string_helpers_1.tryToParseConnectionString)(connectionOptions.connectionString), [connectionOptions.connectionString]);
|
|
224
|
+
const getConnectionInfoToSave = (0, react_1.useCallback)(async (favoriteInfo) => ({
|
|
222
225
|
...(0, lodash_1.cloneDeep)(initialConnectionInfo),
|
|
223
|
-
|
|
226
|
+
// Encrypted field maps typed in the form are only parsed here
|
|
227
|
+
connectionOptions: await (0, csfle_handler_1.adjustCSFLEParams)(connectionOptions),
|
|
224
228
|
savedConnectionType: personalizationOptions.isFavorite
|
|
225
229
|
? 'favorite'
|
|
226
230
|
: 'recent',
|
|
@@ -245,11 +249,12 @@ function ConnectionForm({ initialConnectionInfo, connectionErrorMessage, disable
|
|
|
245
249
|
]);
|
|
246
250
|
}
|
|
247
251
|
}, [onSaveClicked, setErrors]);
|
|
248
|
-
const onSubmitForm = (0, react_1.useCallback)((intendedAction) => {
|
|
249
|
-
const
|
|
252
|
+
const onSubmitForm = (0, react_1.useCallback)(async (intendedAction) => {
|
|
253
|
+
const connectionInfoToSave = await getConnectionInfoToSave();
|
|
254
|
+
const updatedConnectionOptions = connectionInfoToSave.connectionOptions;
|
|
250
255
|
// TODO: this method throws on malformed connection strings instead of
|
|
251
256
|
// returning errors
|
|
252
|
-
const formErrors = (0, validation_1.validateConnectionOptionsErrors)(updatedConnectionOptions);
|
|
257
|
+
const formErrors = (0, validation_1.validateConnectionOptionsErrors)(updatedConnectionOptions, undefined, { isAtlas });
|
|
253
258
|
if (formErrors.length) {
|
|
254
259
|
setErrors(formErrors);
|
|
255
260
|
return;
|
|
@@ -258,8 +263,7 @@ function ConnectionForm({ initialConnectionInfo, connectionErrorMessage, disable
|
|
|
258
263
|
// The user explicitly clicked connect, so we use that.
|
|
259
264
|
onConnectClicked?.({
|
|
260
265
|
...initialConnectionInfo,
|
|
261
|
-
...
|
|
262
|
-
connectionOptions: updatedConnectionOptions,
|
|
266
|
+
...connectionInfoToSave,
|
|
263
267
|
});
|
|
264
268
|
}
|
|
265
269
|
else {
|
|
@@ -267,24 +271,23 @@ function ConnectionForm({ initialConnectionInfo, connectionErrorMessage, disable
|
|
|
267
271
|
// If there is a save&connect button, we use that action by default.
|
|
268
272
|
onSaveAndConnectClicked?.({
|
|
269
273
|
...initialConnectionInfo,
|
|
270
|
-
...
|
|
271
|
-
connectionOptions: updatedConnectionOptions,
|
|
274
|
+
...connectionInfoToSave,
|
|
272
275
|
});
|
|
273
276
|
}
|
|
274
277
|
else {
|
|
275
278
|
// If there isn't a save&connect button then the next default action
|
|
276
279
|
// should be to save.
|
|
277
|
-
void callOnSaveConnectionClickedAndStoreErrors?.(
|
|
280
|
+
void callOnSaveConnectionClickedAndStoreErrors?.(connectionInfoToSave);
|
|
278
281
|
}
|
|
279
282
|
}
|
|
280
283
|
}, [
|
|
281
|
-
connectionOptions,
|
|
282
284
|
setErrors,
|
|
283
285
|
onConnectClicked,
|
|
284
286
|
initialConnectionInfo,
|
|
285
287
|
getConnectionInfoToSave,
|
|
286
288
|
callOnSaveConnectionClickedAndStoreErrors,
|
|
287
289
|
onSaveAndConnectClicked,
|
|
290
|
+
isAtlas,
|
|
288
291
|
]);
|
|
289
292
|
const showPersonalisationForm = (0, use_connect_form_settings_1.useConnectionFormSetting)('showPersonalisationForm');
|
|
290
293
|
const showHelpCardsInForm = (0, use_connect_form_settings_1.useConnectionFormSetting)('showHelpCardsInForm');
|
|
@@ -300,41 +303,65 @@ function ConnectionForm({ initialConnectionInfo, connectionErrorMessage, disable
|
|
|
300
303
|
react_1.default.createElement("form", { role: "form", className: formStyles, onSubmit: (e) => {
|
|
301
304
|
// Prevent default html page refresh.
|
|
302
305
|
e.preventDefault();
|
|
303
|
-
onSubmitForm();
|
|
306
|
+
void onSubmitForm();
|
|
304
307
|
},
|
|
305
308
|
// Prevent default html tooltip popups.
|
|
306
309
|
noValidate: true },
|
|
307
310
|
react_1.default.createElement("div", { className: formHeaderStyles },
|
|
308
311
|
react_1.default.createElement("div", { className: formHeaderContentStyles },
|
|
309
|
-
react_1.default.createElement(compass_components_1.H3, { className: headingWithHiddenButtonStyles },
|
|
310
|
-
'Edit Connection'
|
|
311
|
-
|
|
312
|
+
react_1.default.createElement(compass_components_1.H3, { className: headingWithHiddenButtonStyles }, isAtlas
|
|
313
|
+
? 'Edit Connection'
|
|
314
|
+
: (initialConnectionInfo.favorite?.name ?? 'New Connection') ||
|
|
315
|
+
'Edit Connection'),
|
|
316
|
+
react_1.default.createElement(compass_components_1.Description, { className: descriptionStyles }, isAtlas
|
|
317
|
+
? 'Manage your connection settings. Changes are not preserved across sessions.'
|
|
318
|
+
: 'Manage your connection settings'))),
|
|
312
319
|
react_1.default.createElement("div", { className: formContentContainerStyles },
|
|
313
320
|
react_1.default.createElement("div", { className: formContentStyles },
|
|
314
321
|
disableEditingConnectedConnection && onDisconnectClicked && (react_1.default.createElement(compass_components_1.Banner, { "data-testid": "disabled-connected-connection-banner", className: bannerStyles },
|
|
315
322
|
react_1.default.createElement("div", { className: disabledConnectedConnectionContentStyles },
|
|
316
|
-
react_1.default.createElement("div", null,
|
|
323
|
+
react_1.default.createElement("div", null,
|
|
324
|
+
isAtlas
|
|
325
|
+
? 'To change the read preference, you must first disconnect.'
|
|
326
|
+
: "While connected, you may only personalize your connection's name, color or favorite status. To fully configure it, you must first disconnect.",
|
|
327
|
+
' ',
|
|
328
|
+
"Beware that disconnecting might cause work in progress to be lost."),
|
|
317
329
|
react_1.default.createElement("div", null,
|
|
318
330
|
react_1.default.createElement(compass_components_1.Button, { size: "small", leftGlyph: react_1.default.createElement(compass_components_1.Icon, { glyph: "Disconnect" }), onClick: onDisconnectClicked }, "Disconnect"))))),
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
331
|
+
isAtlas ? (!disableEditingConnectedConnection &&
|
|
332
|
+
connectionStringUrl && (react_1.default.createElement(read_preference_form_1.default, { errors: errors, connectionStringUrl: connectionStringUrl, updateConnectionFormField: updateConnectionFormField }))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
333
|
+
protectConnectionStrings &&
|
|
334
|
+
!disableEditingConnectedConnection && (react_1.default.createElement(compass_components_1.Banner, { "data-testid": "protect-connection-strings-banner", className: bannerStyles }, "Advanced Connection Options are hidden while the \"Protect Connection String Secrets\" setting is enabled. Disable the setting to configure Advanced Connection Options or edit your connection string.")),
|
|
335
|
+
react_1.default.createElement(connection_string_input_1.default, { connectionString: connectionOptions.connectionString, enableEditingConnectionString: enableEditingConnectionString, disableEditingConnectedConnection: !!disableEditingConnectedConnection, setEnableEditingConnectionString: setEnableEditingConnectionString, onSubmit: () => void onSubmitForm(), updateConnectionFormField: updateConnectionFormField, protectConnectionStrings: protectConnectionStrings }),
|
|
336
|
+
connectionStringInvalidError && (react_1.default.createElement(compass_components_1.Banner, { className: connectionStringErrorStyles, variant: compass_components_1.BannerVariant.Danger }, connectionStringInvalidError.message)),
|
|
337
|
+
showPersonalisationForm && (react_1.default.createElement(ConnectionPersonalizationForm, { personalizationOptions: personalizationOptions, updateConnectionFormField: updateConnectionFormField })),
|
|
338
|
+
!(protectConnectionStrings || disableEditingConnectedConnection) && (react_1.default.createElement(advanced_connection_options_1.default, { open: advancedOpen, setOpen: onAdvancedChange, errors: connectionStringInvalidError ? [] : errors, disabled: !!(connectionStringInvalidError ||
|
|
339
|
+
disableEditingConnectedConnection), updateConnectionFormField: updateConnectionFormField, connectionOptions: connectionOptions, openSettingsModal: openSettingsModal }))))),
|
|
325
340
|
showHelpCardsInForm && (react_1.default.createElement("div", { className: formHelpContainerStyles },
|
|
326
341
|
react_1.default.createElement(form_help_1.default, null)))),
|
|
327
342
|
react_1.default.createElement("div", { className: (0, compass_components_1.cx)(formFooterStyles, isDarkMode
|
|
328
343
|
? formFooterBorderDarkModeStyles
|
|
329
344
|
: formFooterBorderLightModeStyles) },
|
|
330
|
-
react_1.default.createElement(connection_form_modal_actions_1.ConnectionFormModalActions, { errors: connectionStringInvalidError ? [] : errors, warnings: connectionStringInvalidError ? [] : warnings, onCancel: onCancel, onSave: onSaveClicked
|
|
331
|
-
? () => void
|
|
332
|
-
: undefined, onConnect: onConnectClicked
|
|
333
|
-
? () => onSubmitForm('
|
|
345
|
+
react_1.default.createElement(connection_form_modal_actions_1.ConnectionFormModalActions, { errors: connectionStringInvalidError ? [] : errors, warnings: connectionStringInvalidError ? [] : warnings, onCancel: onCancel, onSave: onSaveClicked && !isAtlas
|
|
346
|
+
? () => void getConnectionInfoToSave().then(callOnSaveConnectionClickedAndStoreErrors)
|
|
347
|
+
: undefined, onConnect: onConnectClicked && !isAtlas
|
|
348
|
+
? () => void onSubmitForm('connect')
|
|
349
|
+
: undefined, onSaveAndConnect: onSaveAndConnectClicked
|
|
350
|
+
? () => void onSubmitForm('save-and-connect')
|
|
334
351
|
: undefined })))));
|
|
335
352
|
/* eslint-enable jsx-a11y/no-redundant-roles */
|
|
336
353
|
}
|
|
354
|
+
// Atlas connections come from the Atlas API and only last for the session, so
|
|
355
|
+
// read preference is the only thing users can change and there is nothing to
|
|
356
|
+
// name, favorite or save.
|
|
357
|
+
const atlasConnectionSettings = {
|
|
358
|
+
showPersonalisationForm: false,
|
|
359
|
+
showFavoriteActions: false,
|
|
360
|
+
showHelpCardsInForm: false,
|
|
361
|
+
saveAndConnectLabel: 'Connect',
|
|
362
|
+
};
|
|
337
363
|
const ConnectionFormWithSettings = ({ showFavoriteActions, showHelpCardsInForm, showPersonalisationForm, protectConnectionStrings, forceConnectionOptions, showKerberosPasswordField, showOIDCDeviceAuthFlow, enableOidc, enableDebugUseCsfleSchemaMap, protectConnectionStringsForNewConnections, showOIDCAuth, showKerberosAuth, showCSFLE, showProxySettings, saveAndConnectLabel, ...rest }) => {
|
|
364
|
+
const isAtlas = !!rest.initialConnectionInfo.atlasMetadata;
|
|
338
365
|
const value = (0, react_1.useMemo)(() => ({
|
|
339
366
|
showFavoriteActions,
|
|
340
367
|
showHelpCardsInForm,
|
|
@@ -351,6 +378,7 @@ const ConnectionFormWithSettings = ({ showFavoriteActions, showHelpCardsInForm,
|
|
|
351
378
|
showCSFLE,
|
|
352
379
|
showProxySettings,
|
|
353
380
|
saveAndConnectLabel,
|
|
381
|
+
...(isAtlas && atlasConnectionSettings),
|
|
354
382
|
}), [
|
|
355
383
|
showFavoriteActions,
|
|
356
384
|
showHelpCardsInForm,
|
|
@@ -367,6 +395,7 @@ const ConnectionFormWithSettings = ({ showFavoriteActions, showHelpCardsInForm,
|
|
|
367
395
|
showCSFLE,
|
|
368
396
|
showProxySettings,
|
|
369
397
|
saveAndConnectLabel,
|
|
398
|
+
isAtlas,
|
|
370
399
|
]);
|
|
371
400
|
return (react_1.default.createElement(use_connect_form_settings_1.ConnectionFormSettingsContext.Provider, { value: value },
|
|
372
401
|
react_1.default.createElement(ConnectionForm, { ...rest })));
|
|
@@ -4,6 +4,7 @@ import type { MongoClientOptions, AuthMechanismProperties } from 'mongodb';
|
|
|
4
4
|
import type { ConnectionFormError, ConnectionFormWarning } from '../utils/validation';
|
|
5
5
|
import type { UpdateSshOptions } from '../utils/connection-ssh-handler';
|
|
6
6
|
import type { UpdateTlsAction, UpdateTlsOptionAction } from '../utils/tls-handler';
|
|
7
|
+
import type { UpdateReadPreferenceAction } from '../utils/read-preference-handler';
|
|
7
8
|
import type { UpdateAuthMechanismAction, UpdatePasswordAction, UpdateUsernameAction } from '../utils/authentication-handler';
|
|
8
9
|
import type { UpdateCsfleStoreCredentialsAction, UpdateCsfleAction, UpdateCsfleKmsAction, UpdateCsfleKmsTlsAction, AddCsfleProviderAction, RemoveCsfleProviderAction, RenameCsfleProviderAction } from '../utils/csfle-handler';
|
|
9
10
|
import type { UpdateOIDCAction } from '../utils/oidc-handler';
|
|
@@ -55,7 +56,7 @@ type ConnectionFormFieldActions = UpdateConnectionStringAction | {
|
|
|
55
56
|
} | {
|
|
56
57
|
type: 'delete-search-param';
|
|
57
58
|
key: keyof MongoClientOptions;
|
|
58
|
-
} | {
|
|
59
|
+
} | UpdateReadPreferenceAction | {
|
|
59
60
|
type: 'update-auth-mechanism-property';
|
|
60
61
|
key: keyof AuthMechanismProperties & string;
|
|
61
62
|
value?: string;
|
|
@@ -99,6 +100,6 @@ export declare function adjustConnectionOptionsBeforeConnect({ connectionOptions
|
|
|
99
100
|
telemetryAnonymousId?: string;
|
|
100
101
|
forceConnectionOptions: [string, string][];
|
|
101
102
|
};
|
|
102
|
-
}): ConnectionOptions
|
|
103
|
+
}): Promise<ConnectionOptions>;
|
|
103
104
|
export {};
|
|
104
105
|
//# sourceMappingURL=use-connect-form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-connect-form.d.ts","sourceRoot":"","sources":["../../src/hooks/use-connect-form.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,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EACd,gBAAgB,EAChB,WAAW,GACZ,EAAE;IACD,iBAAiB,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,CAAC,qBAAqB,EAAE;QACzC,eAAe,EAAE,MAAM,CAAC;QACxB,QAAQ,EAAE,MAAM,CAAC;KAClB,KAAK,IAAI,CAAC;IACX,WAAW,EAAE;QACX,yBAAyB,CAAC,EAAE,MAAM,CAAC;QACnC,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,sBAAsB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;KAC5C,CAAC;CACH,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAsB7B"}
|
|
@@ -9,6 +9,8 @@ exports.useConnectForm = useConnectForm;
|
|
|
9
9
|
exports.adjustConnectionOptionsBeforeConnect = adjustConnectionOptionsBeforeConnect;
|
|
10
10
|
const react_1 = require("react");
|
|
11
11
|
const lodash_1 = require("lodash");
|
|
12
|
+
const mongodb_connection_string_url_1 = __importDefault(require("mongodb-connection-string-url"));
|
|
13
|
+
const mongodb_build_info_1 = require("@mongodb-js/mongodb-build-info");
|
|
12
14
|
const validation_1 = require("../utils/validation");
|
|
13
15
|
const get_next_host_1 = require("../utils/get-next-host");
|
|
14
16
|
const default_connection_1 = require("../constants/default-connection");
|
|
@@ -16,6 +18,7 @@ const check_for_invalid_character_in_host_1 = require("../utils/check-for-invali
|
|
|
16
18
|
const connection_string_schema_1 = require("../utils/connection-string-schema");
|
|
17
19
|
const connection_ssh_handler_1 = require("../utils/connection-ssh-handler");
|
|
18
20
|
const tls_handler_1 = require("../utils/tls-handler");
|
|
21
|
+
const read_preference_handler_1 = require("../utils/read-preference-handler");
|
|
19
22
|
const authentication_handler_1 = require("../utils/authentication-handler");
|
|
20
23
|
const connection_string_helpers_1 = require("../utils/connection-string-helpers");
|
|
21
24
|
const csfle_handler_1 = require("../utils/csfle-handler");
|
|
@@ -23,8 +26,6 @@ const oidc_handler_1 = require("../utils/oidc-handler");
|
|
|
23
26
|
const set_app_name_if_missing_1 = require("../utils/set-app-name-if-missing");
|
|
24
27
|
const force_connection_options_1 = require("../utils/force-connection-options");
|
|
25
28
|
const use_connect_form_settings_1 = require("./use-connect-form-settings");
|
|
26
|
-
const mongodb_connection_string_url_1 = __importDefault(require("mongodb-connection-string-url"));
|
|
27
|
-
const mongodb_build_info_1 = require("mongodb-build-info");
|
|
28
29
|
function connectFormReducer(state, action) {
|
|
29
30
|
switch (action.type) {
|
|
30
31
|
case 'set-connection-form-state':
|
|
@@ -81,7 +82,9 @@ function buildStateFromConnectionInfo(initialConnectionInfo) {
|
|
|
81
82
|
warnings: errors?.length
|
|
82
83
|
? []
|
|
83
84
|
: (0, validation_1.validateConnectionOptionsWarnings)(initialConnectionInfo.connectionOptions),
|
|
84
|
-
|
|
85
|
+
// Encrypted field maps keep their raw text here, they are parsed (which
|
|
86
|
+
// is async) when saving or connecting
|
|
87
|
+
connectionOptions: (0, lodash_1.cloneDeep)(initialConnectionInfo.connectionOptions),
|
|
85
88
|
isDirty: false,
|
|
86
89
|
personalizationOptions: {
|
|
87
90
|
color: initialConnectionInfo.favorite?.color || undefined,
|
|
@@ -237,6 +240,13 @@ function handleConnectionFormFieldUpdate(action, currentConnectionOptions, curre
|
|
|
237
240
|
connectionOptions: currentConnectionOptions,
|
|
238
241
|
});
|
|
239
242
|
}
|
|
243
|
+
case 'update-read-preference': {
|
|
244
|
+
return (0, read_preference_handler_1.handleUpdateReadPreference)({
|
|
245
|
+
action,
|
|
246
|
+
connectionStringUrl: parsedConnectionStringUrl,
|
|
247
|
+
connectionOptions: currentConnectionOptions,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
240
250
|
case 'update-auth-mechanism': {
|
|
241
251
|
return (0, authentication_handler_1.handleUpdateAuthMechanism)({
|
|
242
252
|
action,
|
|
@@ -517,9 +527,9 @@ function setInitialState({ connectionErrorMessage, initialConnectionInfo, setErr
|
|
|
517
527
|
}
|
|
518
528
|
}, [setErrors, connectionErrorMessage]);
|
|
519
529
|
}
|
|
520
|
-
function adjustConnectionOptionsBeforeConnect({ connectionOptions, connectionId, defaultAppName, notifyDeviceFlow, preferences, }) {
|
|
530
|
+
async function adjustConnectionOptionsBeforeConnect({ connectionOptions, connectionId, defaultAppName, notifyDeviceFlow, preferences, }) {
|
|
531
|
+
connectionOptions = await (0, csfle_handler_1.adjustCSFLEParams)(connectionOptions);
|
|
521
532
|
const transformers = [
|
|
522
|
-
csfle_handler_1.adjustCSFLEParams,
|
|
523
533
|
csfle_handler_1.unsetFleOptionsIfEmptyAutoEncryption,
|
|
524
534
|
(0, set_app_name_if_missing_1.setAppNameParamIfMissing)({
|
|
525
535
|
defaultAppName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication-handler.d.ts","sourceRoot":"","sources":["../../src/utils/authentication-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,mBAAmB,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAsB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"authentication-handler.d.ts","sourceRoot":"","sources":["../../src/utils/authentication-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,mBAAmB,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAsB,MAAM,SAAS,CAAC;AAGjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAOxD,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,uBAAuB,CAAC;IAC9B,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;CACrC,CAAC;AAEF,MA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uthMechanism = handleUpdateAuthMechanism;
|
|
5
5
|
exports.handleUpdateUsername = handleUpdateUsername;
|
|
6
6
|
exports.handleUpdatePassword = handleUpdatePassword;
|
|
7
|
-
const connection_string_helpers_1 = require("./connection-string-helpers");
|
|
8
7
|
const lodash_1 = require("lodash");
|
|
8
|
+
const connection_string_helpers_1 = require("./connection-string-helpers");
|
|
9
9
|
function getConnectionUrlWithoutAuth(connectionStringUrl) {
|
|
10
10
|
const updatedConnectionString = connectionStringUrl.clone();
|
|
11
11
|
const updatedSearchParams = updatedConnectionString.typedSearchParams();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-ssh-handler.d.ts","sourceRoot":"","sources":["../../src/utils/connection-ssh-handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC;AAE/E,MAAM,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"connection-ssh-handler.d.ts","sourceRoot":"","sources":["../../src/utils/connection-ssh-handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC;AAE/E,MAAM,MAAM,UAAU,GACpB,MAAM,GAAG,cAAc,GAAG,cAAc,GAAG,OAAO,GAAG,WAAW,CAAC;AAEnE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,oBAAoB,CAAC;IAC3B,GAAG,EAAE,MAAM,oBAAoB,CAAC;IAChC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,iBAAiB,GAClB,EAAE;IACD,MAAM,EAAE,gBAAgB,CAAC;IACzB,iBAAiB,EAAE,iBAAiB,CAAC;CACtC,GAAG;IAAE,iBAAiB,EAAE,iBAAiB,CAAA;CAAE,CAe3C"}
|
|
@@ -63,9 +63,10 @@ export declare function handleUpdateCsfleKmsTlsParam<T extends KMSTLSProviderTyp
|
|
|
63
63
|
};
|
|
64
64
|
export declare function unsetFleOptionsIfEmptyAutoEncryption(connectionOptions: Readonly<ConnectionOptions>): ConnectionOptions;
|
|
65
65
|
export declare function hasAnyCsfleOption(o: Readonly<AutoEncryptionOptions>): boolean;
|
|
66
|
-
export declare function textToEncryptedFieldConfig(text: string): Document | undefined
|
|
66
|
+
export declare function textToEncryptedFieldConfig(text: string): Promise<Document | undefined>;
|
|
67
|
+
export declare function textToUnparsedEncryptedFieldConfig(text: string): Document | undefined;
|
|
67
68
|
export declare function encryptedFieldConfigToText(config: Readonly<Document> | undefined): string;
|
|
68
|
-
export declare function adjustCSFLEParams(connectionOptions: Readonly<ConnectionOptions>): ConnectionOptions
|
|
69
|
+
export declare function adjustCSFLEParams(connectionOptions: Readonly<ConnectionOptions>): Promise<ConnectionOptions>;
|
|
69
70
|
export declare function randomLocalKey(): string;
|
|
70
71
|
export declare function handleAddKmsProvider<T extends KMSProviderType>({ action, connectionOptions, }: {
|
|
71
72
|
action: AddCsfleProviderAction<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csfle-handler.d.ts","sourceRoot":"","sources":["../../src/utils/csfle-handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EACV,qBAAqB,EACrB,0BAA0B,EAC1B,QAAQ,EACT,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"csfle-handler.d.ts","sourceRoot":"","sources":["../../src/utils/csfle-handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EACV,qB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E,iBAAiB,CAAC;CACtC,CAqBA"}
|
|
@@ -40,6 +40,7 @@ exports.handleUpdateCsfleKmsTlsParam = handleUpdateCsfleKmsTlsParam;
|
|
|
40
40
|
exports.unsetFleOptionsIfEmptyAutoEncryption = unsetFleOptionsIfEmptyAutoEncryption;
|
|
41
41
|
exports.hasAnyCsfleOption = hasAnyCsfleOption;
|
|
42
42
|
exports.textToEncryptedFieldConfig = textToEncryptedFieldConfig;
|
|
43
|
+
exports.textToUnparsedEncryptedFieldConfig = textToUnparsedEncryptedFieldConfig;
|
|
43
44
|
exports.encryptedFieldConfigToText = encryptedFieldConfigToText;
|
|
44
45
|
exports.adjustCSFLEParams = adjustCSFLEParams;
|
|
45
46
|
exports.randomLocalKey = randomLocalKey;
|
|
@@ -47,7 +48,6 @@ exports.handleAddKmsProvider = handleAddKmsProvider;
|
|
|
47
48
|
exports.handleRenameKmsProvider = handleRenameKmsProvider;
|
|
48
49
|
exports.handleRemoveKmsProvider = handleRemoveKmsProvider;
|
|
49
50
|
const lodash_1 = require("lodash");
|
|
50
|
-
const mongodb_query_parser_1 = require("mongodb-query-parser");
|
|
51
51
|
const shell_bson_parser_1 = __importStar(require("@mongodb-js/shell-bson-parser"));
|
|
52
52
|
const DEFAULT_FLE_OPTIONS = {
|
|
53
53
|
storeCredentials: false,
|
|
@@ -208,7 +208,7 @@ function hasAnyCsfleOption(o) {
|
|
|
208
208
|
.flatMap((o) => Object.values(o ?? {}))
|
|
209
209
|
.filter(Boolean).length > 0);
|
|
210
210
|
}
|
|
211
|
-
function textToEncryptedFieldConfig(text) {
|
|
211
|
+
async function textToEncryptedFieldConfig(text) {
|
|
212
212
|
if (!text.trim()) {
|
|
213
213
|
return undefined;
|
|
214
214
|
}
|
|
@@ -217,7 +217,7 @@ function textToEncryptedFieldConfig(text) {
|
|
|
217
217
|
// those never contain `$`.
|
|
218
218
|
let parsed = {};
|
|
219
219
|
try {
|
|
220
|
-
parsed = (0, shell_bson_parser_1.default)(text, {
|
|
220
|
+
parsed = await (0, shell_bson_parser_1.default)(text, {
|
|
221
221
|
mode: shell_bson_parser_1.ParseMode.Strict,
|
|
222
222
|
});
|
|
223
223
|
if (!parsed || typeof parsed !== 'object') {
|
|
@@ -239,6 +239,13 @@ function textToEncryptedFieldConfig(text) {
|
|
|
239
239
|
parsed['$compass.rawText'] = text;
|
|
240
240
|
return parsed;
|
|
241
241
|
}
|
|
242
|
+
// Same shape that saved connections use, adjustCSFLEParams parses it later
|
|
243
|
+
function textToUnparsedEncryptedFieldConfig(text) {
|
|
244
|
+
if (!text.trim()) {
|
|
245
|
+
return undefined;
|
|
246
|
+
}
|
|
247
|
+
return { '$compass.error': null, '$compass.rawText': text };
|
|
248
|
+
}
|
|
242
249
|
function encryptedFieldConfigToText(config) {
|
|
243
250
|
if (!config) {
|
|
244
251
|
return '';
|
|
@@ -247,20 +254,20 @@ function encryptedFieldConfigToText(config) {
|
|
|
247
254
|
return config['$compass.rawText'];
|
|
248
255
|
}
|
|
249
256
|
const withoutCompassKeys = Object.fromEntries(Object.entries(config).filter(([key]) => !key.startsWith('$compass.')));
|
|
250
|
-
return (0,
|
|
257
|
+
return (0, shell_bson_parser_1.toJSString)(withoutCompassKeys) || '';
|
|
251
258
|
}
|
|
252
259
|
// The CSFLE encryptedFieldConfigMap contains BSON values, including
|
|
253
260
|
// UUIDs, which are not serialized correctly by the connection model.
|
|
254
261
|
// To account for this, we regenerate the actual values from its
|
|
255
262
|
// text representation on connection form load.
|
|
256
|
-
function adjustCSFLEParams(connectionOptions) {
|
|
263
|
+
async function adjustCSFLEParams(connectionOptions) {
|
|
257
264
|
connectionOptions = (0, lodash_1.cloneDeep)(connectionOptions);
|
|
258
265
|
const autoEncryptionOptions = connectionOptions.fleOptions?.autoEncryption;
|
|
259
266
|
if (autoEncryptionOptions?.schemaMap?.['$compass.error'] === null) {
|
|
260
|
-
autoEncryptionOptions.schemaMap = textToEncryptedFieldConfig(autoEncryptionOptions.schemaMap['$compass.rawText']);
|
|
267
|
+
autoEncryptionOptions.schemaMap = await textToEncryptedFieldConfig(autoEncryptionOptions.schemaMap['$compass.rawText']);
|
|
261
268
|
}
|
|
262
269
|
if (autoEncryptionOptions?.encryptedFieldsMap?.['$compass.error'] === null) {
|
|
263
|
-
autoEncryptionOptions.encryptedFieldsMap = textToEncryptedFieldConfig(autoEncryptionOptions.encryptedFieldsMap['$compass.rawText']);
|
|
270
|
+
autoEncryptionOptions.encryptedFieldsMap = await textToEncryptedFieldConfig(autoEncryptionOptions.encryptedFieldsMap['$compass.rawText']);
|
|
264
271
|
}
|
|
265
272
|
return connectionOptions;
|
|
266
273
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csfle-kms-fields.d.ts","sourceRoot":"","sources":["../../src/utils/csfle-kms-fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"csfle-kms-fields.d.ts","sourceRoot":"","sources":["../../src/utils/csfle-kms-fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGxD,YAAY,EACV,0BAA0B,EAC1B,YAAY,EACZ,6BAA6B,GAC9B,MAAM,SAAS,CAAC;AACjB,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC;AACpD,MAAM,MAAM,SAAS,CAAC,WAAW,SAAS,eAAe,IAAI,WAAW,CACtE,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CACvC,CAAC;AACF,MAAM,MAAM,eAAe,GAAG,OAAO,CACnC,MAAM,YAAY,EAClB,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAC3C,CAAC;AACF,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,eAAe,IAAI,CAAC,GAAG,GAAG,CAAC,IAAI,MAAM,EAAE,CAAC;AAC9E,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;AACjD,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,eAAe,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;AAE/E,MAAM,WAAW,QAAQ,CAAC,CAAC,SAAS,eAAe;IACjD,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,CACL,cAAc,EAAE;QAAE,YAAY,CAAC,EAAE,YAAY,CAAA;KAAE,EAC/C,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,KAChC,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,CACb,MAAM,EAAE,mBAAmB,EAAE,EAC7B,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,KAChC,MAAM,GAAG,SAAS,CAAC;IACxB,KAAK,EACH,OAAO,GAAG,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,OAAO,GAAG,MAAM,CAAC,CAAC;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAqKD,eAAO,MAAM,iBAAiB;;;;;;CAM7B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type ConnectionStringUrl from 'mongodb-connection-string-url';
|
|
2
|
+
import type { ConnectionOptions } from 'mongodb-data-service';
|
|
3
|
+
import type { ReadPreferenceMode } from 'mongodb';
|
|
4
|
+
export interface UpdateReadPreferenceAction {
|
|
5
|
+
type: 'update-read-preference';
|
|
6
|
+
mode?: ReadPreferenceMode;
|
|
7
|
+
tagSets: string[];
|
|
8
|
+
maxStalenessSeconds?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function supportsReadPreferenceOptions(mode: string | null | undefined): boolean;
|
|
11
|
+
export declare function handleUpdateReadPreference({ action, connectionStringUrl, connectionOptions, }: {
|
|
12
|
+
action: UpdateReadPreferenceAction;
|
|
13
|
+
connectionStringUrl: ConnectionStringUrl;
|
|
14
|
+
connectionOptions: ConnectionOptions;
|
|
15
|
+
}): {
|
|
16
|
+
connectionOptions: ConnectionOptions;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=read-preference-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-preference-handler.d.ts","sourceRoot":"","sources":["../../src/utils/read-preference-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,mBAAmB,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAsB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGtE,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAI1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC9B,OAAO,CAET;AAED,wBAAgB,0BAA0B,CAAC,EACzC,MAAM,EACN,mBAAmB,EACnB,iBAAiB,GAClB,EAAE;IACD,MAAM,EAAE,0BAA0B,CAAC;IACnC,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,iBAAiB,EAAE,iBAAiB,CAAC;CACtC,GAAG;IACF,iBAAiB,EAAE,iBAAiB,CAAC;CACtC,CAmCA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.supportsReadPreferenceOptions = supportsReadPreferenceOptions;
|
|
4
|
+
exports.handleUpdateReadPreference = handleUpdateReadPreference;
|
|
5
|
+
const lodash_1 = require("lodash");
|
|
6
|
+
function supportsReadPreferenceOptions(mode) {
|
|
7
|
+
return !!mode && mode !== 'primary';
|
|
8
|
+
}
|
|
9
|
+
function handleUpdateReadPreference({ action, connectionStringUrl, connectionOptions, }) {
|
|
10
|
+
const updatedConnectionString = connectionStringUrl.clone();
|
|
11
|
+
const updatedSearchParams = updatedConnectionString.typedSearchParams();
|
|
12
|
+
if (action.mode) {
|
|
13
|
+
updatedSearchParams.set('readPreference', action.mode);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
updatedSearchParams.delete('readPreference');
|
|
17
|
+
}
|
|
18
|
+
updatedSearchParams.delete('readPreferenceTags');
|
|
19
|
+
updatedSearchParams.delete('maxStalenessSeconds');
|
|
20
|
+
if (supportsReadPreferenceOptions(action.mode)) {
|
|
21
|
+
const hasTagSets = action.tagSets.some((tagSet) => tagSet !== '');
|
|
22
|
+
if (hasTagSets) {
|
|
23
|
+
for (const tagSet of action.tagSets) {
|
|
24
|
+
updatedSearchParams.append('readPreferenceTags', tagSet);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
if (action.maxStalenessSeconds) {
|
|
28
|
+
updatedSearchParams.set('maxStalenessSeconds', action.maxStalenessSeconds);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
connectionOptions: {
|
|
33
|
+
...(0, lodash_1.cloneDeep)(connectionOptions),
|
|
34
|
+
connectionString: updatedConnectionString.toString(),
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-options.d.ts","sourceRoot":"","sources":["../../src/utils/url-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,kBAAkB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,kBAAkB;;;
|
|
1
|
+
{"version":3,"file":"url-options.d.ts","sourceRoot":"","sources":["../../src/utils/url-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,kBAAkB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,kBAAkB;;;GA+C9B,CAAC"}
|
|
@@ -28,10 +28,6 @@ exports.editableUrlOptions = [
|
|
|
28
28
|
title: 'Read Concern Options',
|
|
29
29
|
values: ['readConcernLevel'],
|
|
30
30
|
},
|
|
31
|
-
{
|
|
32
|
-
title: 'Read Preferences Options',
|
|
33
|
-
values: ['maxStalenessSeconds', 'readPreferenceTags'],
|
|
34
|
-
},
|
|
35
31
|
{
|
|
36
32
|
title: 'Server Options',
|
|
37
33
|
values: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ConnectionOptions } from 'mongodb-data-service';
|
|
2
2
|
import ConnectionString from 'mongodb-connection-string-url';
|
|
3
3
|
import type { ConnectionStringParsingOptions } from 'mongodb-connection-string-url';
|
|
4
|
-
export type FieldName = 'connectionString' | 'hostname' | 'hosts' | 'isSrv' | 'kerberosPrincipal' | 'keyVaultNamespace' | 'kmip.endpoint' | `kmip:${string}.endpoint` | 'local.key' | `local:${string}.key` | 'password' | 'schema' | 'proxyHostname' | 'schemaMap' | 'encryptedFieldsMap' | 'sshHostname' | 'sshIdentityKeyFile' | 'sshPassword' | 'sshUsername' | 'tls' | 'tlsCertificateKeyFile' | 'username';
|
|
4
|
+
export type FieldName = 'connectionString' | 'hostname' | 'hosts' | 'isSrv' | 'kerberosPrincipal' | 'keyVaultNamespace' | 'kmip.endpoint' | 'maxStalenessSeconds' | `kmip:${string}.endpoint` | 'local.key' | `local:${string}.key` | 'password' | 'schema' | 'proxyHostname' | 'readPreferenceTags' | 'schemaMap' | 'encryptedFieldsMap' | 'sshHostname' | 'sshIdentityKeyFile' | 'sshPassword' | 'sshUsername' | 'tls' | 'tlsCertificateKeyFile' | 'username';
|
|
5
5
|
export type TabId = 'general' | 'authentication' | 'tls' | 'proxy' | 'csfle' | 'advanced';
|
|
6
6
|
type ConnectionFormErrorWithField = {
|
|
7
7
|
fieldName: FieldName;
|
|
@@ -23,7 +23,9 @@ export declare function errorsByFieldTab(errors: ConnectionFormError[], tabId: T
|
|
|
23
23
|
export declare function errorMessageByFieldName(errors: ConnectionFormError[], fieldName: FieldName): string | undefined;
|
|
24
24
|
export declare function fieldNameHasError(errors: ConnectionFormError[], fieldName: FieldName): boolean;
|
|
25
25
|
export declare function errorMessageByFieldNameAndIndex(errors: ConnectionFormError[], fieldName: FieldName, fieldIndex: number): string | undefined;
|
|
26
|
-
export declare function validateConnectionOptionsErrors(connectionOptions: ConnectionOptions, parsingOptions?: ConnectionStringParsingOptions
|
|
26
|
+
export declare function validateConnectionOptionsErrors(connectionOptions: ConnectionOptions, parsingOptions?: ConnectionStringParsingOptions, { isAtlas }?: {
|
|
27
|
+
isAtlas?: boolean;
|
|
28
|
+
}): ConnectionFormError[];
|
|
27
29
|
export declare function isSecure(connectionString: ConnectionString): boolean;
|
|
28
30
|
export declare function validateConnectionOptionsWarnings(connectionOptions: ConnectionOptions): ConnectionFormWarning[];
|
|
29
31
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"validation.d.ts","s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