@mongodb-js/compass-shell 3.19.0 → 3.20.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/304.browser.js +1741 -0
- package/dist/304.browser.js.LICENSE.txt +75 -0
- package/dist/304.index.js +1858 -0
- package/dist/304.index.js.LICENSE.txt +75 -0
- package/dist/480.browser.js +1 -0
- package/dist/72.index.js +1 -0
- package/dist/browser.js +1 -1
- package/dist/browser.js.LICENSE.txt +0 -63
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +0 -63
- package/dist/src/components/compass-shell/compass-shell.d.ts +58 -0
- package/dist/src/components/compass-shell/compass-shell.d.ts.map +1 -0
- package/dist/src/components/compass-shell/index.d.ts +4 -0
- package/dist/src/components/compass-shell/index.d.ts.map +1 -0
- package/dist/src/components/shell-header/index.d.ts +4 -0
- package/dist/src/components/shell-header/index.d.ts.map +1 -0
- package/dist/src/components/shell-header/shell-header.d.ts +23 -0
- package/dist/src/components/shell-header/shell-header.d.ts.map +1 -0
- package/dist/src/components/shell-info-modal/index.d.ts +3 -0
- package/dist/src/components/shell-info-modal/index.d.ts.map +1 -0
- package/dist/src/components/shell-info-modal/keyboard-shortcuts-table.d.ts +3 -0
- package/dist/src/components/shell-info-modal/keyboard-shortcuts-table.d.ts.map +1 -0
- package/dist/src/components/shell-info-modal/shell-info-modal.d.ts +13 -0
- package/dist/src/components/shell-info-modal/shell-info-modal.d.ts.map +1 -0
- package/dist/src/index.d.ts +11 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/modules/history-storage.d.ts +9 -0
- package/dist/src/modules/history-storage.d.ts.map +1 -0
- package/dist/src/modules/index.d.ts +10 -0
- package/dist/src/modules/index.d.ts.map +1 -0
- package/dist/src/modules/runtime.d.ts +35 -0
- package/dist/src/modules/runtime.d.ts.map +1 -0
- package/dist/src/modules/worker-runtime.d.ts +3 -0
- package/dist/src/modules/worker-runtime.d.ts.map +1 -0
- package/dist/src/plugin.d.ts +13 -0
- package/dist/src/plugin.d.ts.map +1 -0
- package/dist/src/stores/index.d.ts +4 -0
- package/dist/src/stores/index.d.ts.map +1 -0
- package/dist/src/stores/store.d.ts +17 -0
- package/dist/src/stores/store.d.ts.map +1 -0
- package/package.json +28 -25
- package/dist/716.browser.js +0 -1
- package/dist/766.browser.js +0 -1741
- package/dist/766.browser.js.LICENSE.txt +0 -12
- package/dist/766.index.js +0 -1858
- package/dist/766.index.js.LICENSE.txt +0 -12
- package/dist/925.index.js +0 -1
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
object-assign
|
|
3
|
-
(c) Sindre Sorhus
|
|
4
|
-
@license MIT
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
1
|
/*!
|
|
8
2
|
* accepts
|
|
9
3
|
* Copyright(c) 2014 Jonathan Ong
|
|
@@ -263,60 +257,3 @@ object-assign
|
|
|
263
257
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
264
258
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
265
259
|
*/
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* @license React
|
|
269
|
-
* react-is.production.min.js
|
|
270
|
-
*
|
|
271
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
272
|
-
*
|
|
273
|
-
* This source code is licensed under the MIT license found in the
|
|
274
|
-
* LICENSE file in the root directory of this source tree.
|
|
275
|
-
*/
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* @license React
|
|
279
|
-
* use-sync-external-store-shim.production.min.js
|
|
280
|
-
*
|
|
281
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
282
|
-
*
|
|
283
|
-
* This source code is licensed under the MIT license found in the
|
|
284
|
-
* LICENSE file in the root directory of this source tree.
|
|
285
|
-
*/
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* @license React
|
|
289
|
-
* use-sync-external-store-shim/with-selector.production.min.js
|
|
290
|
-
*
|
|
291
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
292
|
-
*
|
|
293
|
-
* This source code is licensed under the MIT license found in the
|
|
294
|
-
* LICENSE file in the root directory of this source tree.
|
|
295
|
-
*/
|
|
296
|
-
|
|
297
|
-
/** @license React v0.20.2
|
|
298
|
-
* scheduler.production.min.js
|
|
299
|
-
*
|
|
300
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
301
|
-
*
|
|
302
|
-
* This source code is licensed under the MIT license found in the
|
|
303
|
-
* LICENSE file in the root directory of this source tree.
|
|
304
|
-
*/
|
|
305
|
-
|
|
306
|
-
/** @license React v16.13.1
|
|
307
|
-
* react-is.production.min.js
|
|
308
|
-
*
|
|
309
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
310
|
-
*
|
|
311
|
-
* This source code is licensed under the MIT license found in the
|
|
312
|
-
* LICENSE file in the root directory of this source tree.
|
|
313
|
-
*/
|
|
314
|
-
|
|
315
|
-
/** @license React v17.0.2
|
|
316
|
-
* react-dom.production.min.js
|
|
317
|
-
*
|
|
318
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
319
|
-
*
|
|
320
|
-
* This source code is licensed under the MIT license found in the
|
|
321
|
-
* LICENSE file in the root directory of this source tree.
|
|
322
|
-
*/
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import type { Shell as ShellType } from '@mongosh/browser-repl';
|
|
4
|
+
import type { WorkerRuntime } from '@mongosh/node-runtime-worker-thread';
|
|
5
|
+
import type { HistoryStorage } from '../../modules/history-storage';
|
|
6
|
+
export interface CompassShellProps {
|
|
7
|
+
emitShellPluginOpened?: () => void;
|
|
8
|
+
runtime: WorkerRuntime | null;
|
|
9
|
+
shellOutput?: ShellOutputEntry[];
|
|
10
|
+
historyStorage?: HistoryStorage;
|
|
11
|
+
enableShell: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface CompassShellState {
|
|
14
|
+
height: number;
|
|
15
|
+
prevHeight: number;
|
|
16
|
+
initialHistory: string[] | null;
|
|
17
|
+
isOperationInProgress: boolean;
|
|
18
|
+
showInfoModal: boolean;
|
|
19
|
+
}
|
|
20
|
+
type ShellOutputEntry = ShellType['state']['output'][number];
|
|
21
|
+
export declare class CompassShell extends Component<CompassShellProps, CompassShellState> {
|
|
22
|
+
static propTypes: {
|
|
23
|
+
emitShellPluginOpened: PropTypes.Requireable<(...args: any[]) => any>;
|
|
24
|
+
runtime: PropTypes.Requireable<object>;
|
|
25
|
+
shellOutput: PropTypes.Requireable<any[]>;
|
|
26
|
+
historyStorage: PropTypes.Requireable<object>;
|
|
27
|
+
enableShell: PropTypes.Requireable<boolean>;
|
|
28
|
+
};
|
|
29
|
+
shellRef: React.RefObject<ShellType>;
|
|
30
|
+
shellOutput: readonly ShellOutputEntry[];
|
|
31
|
+
static defaultProps: {
|
|
32
|
+
emitShellPluginOpened: () => void;
|
|
33
|
+
runtime: null;
|
|
34
|
+
};
|
|
35
|
+
constructor(props: CompassShellProps);
|
|
36
|
+
componentDidMount(): void;
|
|
37
|
+
componentDidUpdate(prevProps: CompassShellProps, prevState: CompassShellState): void;
|
|
38
|
+
componentWillUnmount(): void;
|
|
39
|
+
onShellOutputChanged: (output: readonly ShellOutputEntry[]) => void;
|
|
40
|
+
onOperationStarted: () => void;
|
|
41
|
+
onOperationEnd: () => void;
|
|
42
|
+
terminateRuntime: () => void;
|
|
43
|
+
saveHistory: (history: readonly string[]) => void;
|
|
44
|
+
loadHistory: () => Promise<void>;
|
|
45
|
+
updateHeight(height: number): void;
|
|
46
|
+
hideInfoModal(): void;
|
|
47
|
+
focusEditor(): void;
|
|
48
|
+
render(): JSX.Element;
|
|
49
|
+
}
|
|
50
|
+
declare const _default: import("react-redux").ConnectedComponent<(props: Omit<CompassShellProps, "enableShell"> & Partial<Pick<CompassShellProps, "enableShell">>) => React.ReactElement<{}, string | React.JSXElementConstructor<any>>, {
|
|
51
|
+
enableShell?: boolean | undefined;
|
|
52
|
+
shellOutput?: import("@mongosh/browser-repl/lib/components/shell-output-line").ShellOutputEntry[] | undefined;
|
|
53
|
+
historyStorage?: HistoryStorage | undefined;
|
|
54
|
+
context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
|
|
55
|
+
store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
|
|
56
|
+
}>;
|
|
57
|
+
export default _default;
|
|
58
|
+
//# sourceMappingURL=compass-shell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compass-shell.d.ts","sourceRoot":"","sources":["../../../../src/components/compass-shell/compass-shell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AACnD,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAiBhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AA0CpE,MAAM,WAAW,iBAAiB;IAChC,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC;IAC9B,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACjC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAChC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,KAAK,gBAAgB,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,qBAAa,YAAa,SAAQ,SAAS,CACzC,iBAAiB,EACjB,iBAAiB,CAClB;IACC,MAAM,CAAC,SAAS;;;;;;MAMd;IAEF,QAAQ,6BAAgC;IACxC,WAAW,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAEzC,MAAM,CAAC,YAAY;;;MAKjB;gBACU,KAAK,EAAE,iBAAiB;IAcpC,iBAAiB;IAKjB,kBAAkB,CAChB,SAAS,EAAE,iBAAiB,EAC5B,SAAS,EAAE,iBAAiB;IAW9B,oBAAoB;IAIpB,oBAAoB,WAAY,SAAS,gBAAgB,EAAE,UAEzD;IAEF,kBAAkB,aAIhB;IAEF,cAAc,aAIZ;IAEF,gBAAgB,aAId;IAEF,WAAW,YAAa,SAAS,MAAM,EAAE,UAavC;IAEF,WAAW,sBAiBT;IAEF,YAAY,CAAC,MAAM,EAAE,MAAM;IAe3B,aAAa;IAIb,WAAW;IAYX,MAAM;CA4EP;;;;;;;;AAED,wBAK2D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/compass-shell/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,EAAE,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEnE,eAAe,kBAAkB,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/shell-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
export interface ShellHeaderProps {
|
|
4
|
+
isExpanded: boolean;
|
|
5
|
+
isOperationInProgress: boolean;
|
|
6
|
+
onShellToggleClicked: () => void;
|
|
7
|
+
showInfoModal: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ShellHeader: {
|
|
10
|
+
({ darkMode, isExpanded, isOperationInProgress, onShellToggleClicked, showInfoModal, }: {
|
|
11
|
+
darkMode: boolean | undefined;
|
|
12
|
+
} & ShellHeaderProps): JSX.Element;
|
|
13
|
+
propTypes: {
|
|
14
|
+
darkMode: PropTypes.Requireable<boolean>;
|
|
15
|
+
isExpanded: PropTypes.Validator<boolean>;
|
|
16
|
+
isOperationInProgress: PropTypes.Validator<boolean>;
|
|
17
|
+
onShellToggleClicked: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
+
showInfoModal: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
declare const _default: React.FunctionComponent<ShellHeaderProps>;
|
|
22
|
+
export default _default;
|
|
23
|
+
//# sourceMappingURL=shell-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-header.d.ts","sourceRoot":"","sources":["../../../../src/components/shell-header/shell-header.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAuDnC,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,eAAO,MAAM,WAAW;;kBAOZ,OAAO,GAAG,SAAS;;;;;;;;;CAgD9B,CAAC;;AAUF,wBAE+C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/shell-info-modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAEhD,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard-shortcuts-table.d.ts","sourceRoot":"","sources":["../../../../src/components/shell-info-modal/keyboard-shortcuts-table.tsx"],"names":[],"mappings":"AAkEA,iBAAS,sBAAsB,gBAuB9B;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
declare function ShellInfoModal({ hideInfoModal, show, }: {
|
|
3
|
+
hideInfoModal: () => void;
|
|
4
|
+
show: boolean;
|
|
5
|
+
}): JSX.Element;
|
|
6
|
+
declare namespace ShellInfoModal {
|
|
7
|
+
var propTypes: {
|
|
8
|
+
hideInfoModal: PropTypes.Validator<(...args: any[]) => any>;
|
|
9
|
+
show: PropTypes.Validator<boolean>;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export default ShellInfoModal;
|
|
13
|
+
//# sourceMappingURL=shell-info-modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-info-modal.d.ts","sourceRoot":"","sources":["../../../../src/components/shell-info-modal/shell-info-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AA6BnC,iBAAS,cAAc,CAAC,EACtB,aAAa,EACb,IAAI,GACL,EAAE;IACD,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,IAAI,EAAE,OAAO,CAAC;CACf,eAwCA;kBA9CQ,cAAc;;;;;;AAqDvB,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LoggerAndTelemetry } from '@mongodb-js/compass-logging/provider';
|
|
2
|
+
import type { DataService } from 'mongodb-data-service';
|
|
3
|
+
declare function activate(): void;
|
|
4
|
+
declare function deactivate(): void;
|
|
5
|
+
export declare const CompassShellPlugin: import("hadron-app-registry").HadronPluginComponent<unknown, {
|
|
6
|
+
logger: () => LoggerAndTelemetry;
|
|
7
|
+
dataService: () => DataService;
|
|
8
|
+
}>;
|
|
9
|
+
export { activate, deactivate };
|
|
10
|
+
export { default as metadata } from '../package.json';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAK/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,iBAAS,QAAQ,IAAI,IAAI,CAExB;AAED,iBAAS,UAAU,IAAI,IAAI,CAE1B;AAED,eAAO,MAAM,kBAAkB;YAEnB,MAAM,kBAAkB;iBAAe,MAAM,WAAW;EAWnE,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UserData, z } from '@mongodb-js/compass-user-data';
|
|
2
|
+
export declare class HistoryStorage {
|
|
3
|
+
fileName: string;
|
|
4
|
+
userData: UserData<z.ZodArray<z.ZodString, "many">>;
|
|
5
|
+
constructor(basePath?: string);
|
|
6
|
+
save(history: string[]): Promise<void>;
|
|
7
|
+
load(): Promise<string[]>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=history-storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-storage.d.ts","sourceRoot":"","sources":["../../../src/modules/history-storage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,+BAA+B,CAAC;AAE5D,qBAAa,cAAc;IACzB,QAAQ,SAAmB;IAC3B,QAAQ,4CAAC;gBAEG,QAAQ,CAAC,EAAE,MAAM;IAevB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE;IAWtB,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAOhC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RuntimeAction, RuntimeState } from './runtime';
|
|
2
|
+
export interface RootState {
|
|
3
|
+
runtime: RuntimeState;
|
|
4
|
+
}
|
|
5
|
+
export type RootAction = RuntimeAction;
|
|
6
|
+
declare const reducer: import("redux").Reducer<import("redux").CombinedState<{
|
|
7
|
+
runtime: RuntimeState;
|
|
8
|
+
}>, RuntimeAction>;
|
|
9
|
+
export default reducer;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG7D,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC;AAEvC,QAAA,MAAM,OAAO;;kBAEX,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { DataService } from 'mongodb-data-service';
|
|
2
|
+
import { WorkerRuntime } from './worker-runtime';
|
|
3
|
+
import type AppRegistry from 'hadron-app-registry';
|
|
4
|
+
import type { RootAction } from '.';
|
|
5
|
+
export declare const SETUP_RUNTIME: "shell/runtime/SETUP_RUNTIME";
|
|
6
|
+
type SetupRuntimeAction = {
|
|
7
|
+
type: typeof SETUP_RUNTIME;
|
|
8
|
+
error: Error | null;
|
|
9
|
+
dataService: DataService | null;
|
|
10
|
+
appRegistry: AppRegistry | null;
|
|
11
|
+
};
|
|
12
|
+
export declare const CHANGE_ENABLE_SHELL: "shell/runtime/CHANGE_ENABLE_SHELL";
|
|
13
|
+
type ChangeEnableShellAction = {
|
|
14
|
+
type: typeof CHANGE_ENABLE_SHELL;
|
|
15
|
+
enableShell: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type RuntimeAction = SetupRuntimeAction | ChangeEnableShellAction;
|
|
18
|
+
export declare const INITIAL_STATE: RuntimeState;
|
|
19
|
+
export interface RuntimeState {
|
|
20
|
+
error: null | Error;
|
|
21
|
+
dataService: null | DataService;
|
|
22
|
+
runtime: null | typeof WorkerRuntime['prototype'];
|
|
23
|
+
appRegistry: null | AppRegistry;
|
|
24
|
+
enableShell: boolean;
|
|
25
|
+
}
|
|
26
|
+
export default function reducer(state: RuntimeState | undefined, action: RootAction): RuntimeState;
|
|
27
|
+
export declare const setupRuntime: (error: Error | null, dataService: DataService | null, appRegistry: AppRegistry | null) => {
|
|
28
|
+
type: "shell/runtime/SETUP_RUNTIME";
|
|
29
|
+
error: Error | null;
|
|
30
|
+
dataService: DataService | null;
|
|
31
|
+
appRegistry: AppRegistry | null;
|
|
32
|
+
};
|
|
33
|
+
export declare const changeEnableShell: (enableShell: boolean) => ChangeEnableShellAction;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/modules/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAUpC,eAAO,MAAM,aAAa,+BAAqC,CAAC;AAChE,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,OAAO,aAAa,CAAC;IAC3B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;CACjC,CAAC;AAKF,eAAO,MAAM,mBAAmB,qCAA2C,CAAC;AAC5E,KAAK,uBAAuB,GAAG;IAC7B,IAAI,EAAE,OAAO,mBAAmB,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,uBAAuB,CAAC;AAKzE,eAAO,MAAM,aAAa,EAAE,YAM3B,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,IAAI,GAAG,KAAK,CAAC;IACpB,WAAW,EAAE,IAAI,GAAG,WAAW,CAAC;IAChC,OAAO,EAAE,IAAI,GAAG,OAAO,aAAa,CAAC,WAAW,CAAC,CAAC;IAClD,WAAW,EAAE,IAAI,GAAG,WAAW,CAAC;IAChC,WAAW,EAAE,OAAO,CAAC;CACtB;AAUD,MAAM,CAAC,OAAO,UAAU,OAAO,CAC7B,KAAK,0BAA8B,EACnC,MAAM,EAAE,UAAU,GACjB,YAAY,CAUd;AAiDD,eAAO,MAAM,YAAY,UAChB,KAAK,GAAG,IAAI,eACN,WAAW,GAAG,IAAI,eAClB,WAAW,GAAG,IAAI;;;;;CAM/B,CAAC;AAEH,eAAO,MAAM,iBAAiB,gBACf,OAAO,KACnB,uBAGD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-runtime.d.ts","sourceRoot":"","sources":["../../../src/modules/worker-runtime.ts"],"names":[],"mappings":"AAeA,QAAA,MAAQ,aAAa,oEAkBuC,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type AppRegistry from 'hadron-app-registry';
|
|
2
|
+
import type { LoggerAndTelemetry } from '@mongodb-js/compass-logging';
|
|
3
|
+
import type { DataService } from 'mongodb-data-service';
|
|
4
|
+
export declare function ShellPlugin(): JSX.Element | null;
|
|
5
|
+
export declare function onActivated(_: unknown, { globalAppRegistry, logger, dataService, }: {
|
|
6
|
+
globalAppRegistry: AppRegistry;
|
|
7
|
+
logger: LoggerAndTelemetry;
|
|
8
|
+
dataService: DataService;
|
|
9
|
+
}): {
|
|
10
|
+
store: import("redux").Store<import("./modules").RootState, import("./modules/runtime").RuntimeAction>;
|
|
11
|
+
deactivate: () => void;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,wBAAgB,WAAW,uBA+B1B;AAED,wBAAgB,WAAW,CACzB,CAAC,EAAE,OAAO,EACV,EACE,iBAAiB,EACjB,MAAM,EACN,WAAW,GACZ,EAAE;IACD,iBAAiB,EAAE,WAAW,CAAC;IAC/B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,WAAW,EAAE,WAAW,CAAC;CAC1B;;;EAYF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/stores/index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,SAAS,CAAC;AAExC,eAAe,iBAAiB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Store } from 'redux';
|
|
2
|
+
import type { RootAction, RootState } from '../modules';
|
|
3
|
+
import type { LoggerAndTelemetry } from '@mongodb-js/compass-logging';
|
|
4
|
+
import type AppRegistry from 'hadron-app-registry';
|
|
5
|
+
import type { DataService } from 'mongodb-data-service';
|
|
6
|
+
export default class CompassShellStore {
|
|
7
|
+
reduxStore: Store<RootState, RootAction>;
|
|
8
|
+
constructor();
|
|
9
|
+
globalAppRegistry: AppRegistry | null;
|
|
10
|
+
onActivated({ globalAppRegistry, logger: { log, track, debug }, dataService, }: {
|
|
11
|
+
globalAppRegistry: AppRegistry;
|
|
12
|
+
logger: LoggerAndTelemetry;
|
|
13
|
+
dataService: DataService;
|
|
14
|
+
}): () => void;
|
|
15
|
+
onEnableShellChanged: (value: boolean) => void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/stores/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC,UAAU,EAAE,KAAK,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;;IAMzC,iBAAiB,EAAE,WAAW,GAAG,IAAI,CAAQ;IAE7C,WAAW,CAAC,EACV,iBAAiB,EACjB,MAAM,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAC7B,WAAW,GACZ,EAAE;QACD,iBAAiB,EAAE,WAAW,CAAC;QAC/B,MAAM,EAAE,kBAAkB,CAAC;QAC3B,WAAW,EAAE,WAAW,CAAC;KAC1B,GAAG,MAAM,IAAI;IAgDd,oBAAoB,UAAW,OAAO,UAEpC;CACH"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mongodb-js/compass-shell",
|
|
3
3
|
"productName": "Compass Shell plugin",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.20.0",
|
|
5
5
|
"description": "Compass Shell Plugin",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "MongoDB Inc",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"main": "dist/index.js",
|
|
27
27
|
"compass:main": "src/index.ts",
|
|
28
|
+
"types": "dist/src/index.d.ts",
|
|
28
29
|
"exports": {
|
|
29
30
|
"browser": "./dist/browser.js",
|
|
30
31
|
"require": "./dist/index.js"
|
|
@@ -33,9 +34,11 @@
|
|
|
33
34
|
".": "./src/index.ts"
|
|
34
35
|
},
|
|
35
36
|
"scripts": {
|
|
37
|
+
"bootstrap": "npm run postcompile",
|
|
36
38
|
"prepublishOnly": "npm run compile && compass-scripts check-exports-exist",
|
|
37
39
|
"compile": "npm run webpack -- --mode production",
|
|
38
40
|
"webpack": "webpack-compass",
|
|
41
|
+
"postcompile": "tsc --emitDeclarationOnly",
|
|
39
42
|
"start": "npm run webpack serve -- --mode development",
|
|
40
43
|
"analyze": "npm run webpack -- --mode production --analyze",
|
|
41
44
|
"typecheck": "tsc --noEmit",
|
|
@@ -51,42 +54,42 @@
|
|
|
51
54
|
"test-watch": "npm run test -- --watch",
|
|
52
55
|
"test-ci": "npm run test-cov",
|
|
53
56
|
"test-ci-electron": "echo \"TODO(COMPASS-6779): These tests are broken and disabled for now\"",
|
|
54
|
-
"reformat": "npm run
|
|
57
|
+
"reformat": "npm run eslint . -- --fix && npm run prettier -- --write ."
|
|
55
58
|
},
|
|
56
59
|
"dependencies": {
|
|
57
|
-
"@mongodb-js/compass-components": "^1.
|
|
58
|
-
"@mongodb-js/compass-logging": "^1.2.
|
|
59
|
-
"@mongodb-js/compass-user-data": "^0.1.
|
|
60
|
-
"@mongodb-js/compass-utils": "^0.5.
|
|
61
|
-
"@
|
|
62
|
-
"
|
|
63
|
-
"
|
|
60
|
+
"@mongodb-js/compass-components": "^1.20.0",
|
|
61
|
+
"@mongodb-js/compass-logging": "^1.2.7",
|
|
62
|
+
"@mongodb-js/compass-user-data": "^0.1.10",
|
|
63
|
+
"@mongodb-js/compass-utils": "^0.5.6",
|
|
64
|
+
"@mongosh/node-runtime-worker-thread": "^2.1.0",
|
|
65
|
+
"compass-preferences-model": "^2.16.0",
|
|
66
|
+
"hadron-app-registry": "^9.1.0",
|
|
67
|
+
"mongodb-data-service": "^22.16.0"
|
|
64
68
|
},
|
|
65
69
|
"peerDependencies": {
|
|
66
|
-
"@mongodb-js/compass-components": "^1.
|
|
67
|
-
"@mongodb-js/compass-logging": "^1.2.
|
|
68
|
-
"@mongodb-js/compass-user-data": "^0.1.
|
|
69
|
-
"@mongodb-js/compass-utils": "^0.5.
|
|
70
|
-
"@
|
|
71
|
-
"
|
|
72
|
-
"
|
|
70
|
+
"@mongodb-js/compass-components": "^1.20.0",
|
|
71
|
+
"@mongodb-js/compass-logging": "^1.2.7",
|
|
72
|
+
"@mongodb-js/compass-user-data": "^0.1.10",
|
|
73
|
+
"@mongodb-js/compass-utils": "^0.5.6",
|
|
74
|
+
"@mongosh/node-runtime-worker-thread": "^2.1.0",
|
|
75
|
+
"compass-preferences-model": "^2.16.0",
|
|
76
|
+
"hadron-app-registry": "^9.1.0",
|
|
77
|
+
"mongodb-data-service": "^22.16.0",
|
|
73
78
|
"react": "^17.0.2"
|
|
74
79
|
},
|
|
75
80
|
"devDependencies": {
|
|
76
|
-
"@mongodb-js/eslint-config-compass": "^1.0.
|
|
77
|
-
"@mongodb-js/mocha-config-compass": "^1.3.
|
|
81
|
+
"@mongodb-js/eslint-config-compass": "^1.0.12",
|
|
82
|
+
"@mongodb-js/mocha-config-compass": "^1.3.3",
|
|
78
83
|
"@mongodb-js/prettier-config-compass": "^1.0.1",
|
|
79
84
|
"@mongodb-js/tsconfig-compass": "^1.0.3",
|
|
80
|
-
"@mongodb-js/webpack-config-compass": "^1.2.
|
|
81
|
-
"@mongosh/browser-repl": "^2.0
|
|
82
|
-
"@mongosh/logging": "^2.0
|
|
85
|
+
"@mongodb-js/webpack-config-compass": "^1.2.6",
|
|
86
|
+
"@mongosh/browser-repl": "^2.1.0",
|
|
87
|
+
"@mongosh/logging": "^2.1.0",
|
|
83
88
|
"chai": "^4.2.0",
|
|
84
89
|
"depcheck": "^1.4.1",
|
|
85
|
-
"electron": "^25.9.
|
|
90
|
+
"electron": "^25.9.7",
|
|
86
91
|
"enzyme": "^3.11.0",
|
|
87
92
|
"eslint": "^7.25.0",
|
|
88
|
-
"hadron-app-registry": "^9.0.13",
|
|
89
|
-
"hadron-ipc": "^3.2.4",
|
|
90
93
|
"mocha": "^10.2.0",
|
|
91
94
|
"nyc": "^15.1.0",
|
|
92
95
|
"prop-types": "^15.7.2",
|
|
@@ -95,5 +98,5 @@
|
|
|
95
98
|
"redux": "^4.2.1",
|
|
96
99
|
"sinon": "^9.2.3"
|
|
97
100
|
},
|
|
98
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "2aaff7aaa6a39f883cd621f627cf29f8fa187ba0"
|
|
99
102
|
}
|
package/dist/716.browser.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkCompassShellPlugin=self.webpackChunkCompassShellPlugin||[]).push([[716],{49945:(e,t,o)=>{"use strict";o.r(t),o.d(t,{CompassShell:()=>P,default:()=>B});var n=o(99497),i=o.n(n),s=o(13980),r=o.n(s),a=o(86993),l=o(39662),c=o(30709),h=o(25378);const d=[{key:"Ctrl+`",description:"Toggle shell."},{key:"Ctrl+A",description:"Moves the cursor to the beginning of the line."},{key:"Ctrl+B",description:"Moves the cursor Backward one character."},{key:"Ctrl+C",description:"Stop currently running command."},{key:"Ctrl+D",description:"Deletes the next character."},{key:"Ctrl+E",description:"Moves the cursor to the end of the line."},{key:"Ctrl+F",description:"Moves the cursor Forward one character."},{key:"Ctrl+H",description:"Erases one character, similar to hitting backspace."},{key:"mod+L",description:"Clears the screen, similar to the clear command."},{key:"Ctrl+T",description:"Swap the last two characters before the cursor."},{key:"Ctrl+U",description:"Changes the line to Uppercase."},{key:"ArrowUp",description:"Cycle backwards through command history."},{key:"ArrowDown",description:"Cycle forwards through command history."}];function p(){return i().createElement(c.Table,{data:d,columns:[i().createElement(c.TableHeader,{key:"name",label:"Key"}),i().createElement(c.TableHeader,{key:"value",label:"Description"})]},(({datum:e})=>i().createElement(c.Row,{key:e.key},i().createElement(c.Cell,null,i().createElement(c.Body,{weight:"medium"},i().createElement(c.KeyboardShortcut,{hotkey:e.key}))),i().createElement(c.Cell,null,i().createElement(c.Description,null,e.description)))))}const m=`v${o(74841).i8}`,u=(0,c.css)({marginTop:c.spacing[2],maxHeight:"50vh",overflow:"auto"}),g=(0,c.css)({marginTop:c.spacing[4]});function y({hideInfoModal:e,show:t}){(0,h.useTrackOnChange)("COMPASS-SHELL",(e=>{t&&e("Screen",{name:"shell_info_modal"})}),[t],void 0,i());const o=(0,n.useCallback)((()=>{e()}),[e]);return i().createElement(c.InfoModal,{open:t,title:`mongosh ${m}`,"data-testid":"shell-info-modal",onClose:o},i().createElement(c.Banner,null,"For more information please visit the ",i().createElement(c.Link,{id:"mongosh-info-link",href:"https://docs.mongodb.com/compass/beta/embedded-shell/",target:"_blank"},"MongoDB Shell Documentation"),"."),i().createElement(c.Subtitle,{className:g},"Keyboard Shortcuts"),i().createElement("div",{className:u},i().createElement(p,null)))}y.propTypes={hideInfoModal:r().func.isRequired,show:r().bool.isRequired};const f=y,b=(0,c.css)({height:c.spacing[5],display:"flex",color:c.palette.gray.light1}),S=(0,c.css)({borderTop:`1px solid ${c.palette.gray.dark2}`}),k=(0,c.css)({flexGrow:1,display:"flex",alignItems:"center"}),E=c.palette.gray.light1,C=(0,c.css)({background:"none",border:"none",cursor:"pointer",color:E,padding:`0px ${c.spacing[2]}px`,height:"100%",display:"flex",verticalAlign:"middle",flexDirection:"row",alignItems:"center",margin:"auto 0",fontWeight:"bold",fontSize:1.5*c.spacing[2],lineHeight:`${c.spacing[5]}px`,transition:"all 200ms",userSelect:"none",textTransform:"uppercase","&:hover":{color:c.palette.gray.light3}}),w=(0,c.css)({display:"flex",paddingTop:c.spacing[1]/2,paddingRight:c.spacing[2],gap:c.spacing[2]}),v=(0,c.css)({color:c.palette.green.light2,marginLeft:c.spacing[2]}),O=({darkMode:e,isExpanded:t,isOperationInProgress:o,onShellToggleClicked:n,showInfoModal:s})=>((0,c.useHotkeys)("ctrl + `",n),i().createElement("div",{className:(0,c.cx)(b,e&&S)},i().createElement("div",{className:k},i().createElement("button",{type:"button","data-testid":"shell-expand-button",className:C,"aria-label":t?"Close Shell":"Open Shell",onClick:n,"aria-pressed":t},i().createElement(c.GuideCue,{cueId:"shell-title",title:"Using the embedded MongoDB Shell",description:i().createElement(i().Fragment,null,"Compass includes an embedded mongosh, allowing you to test queries and operations in your databases.",i().createElement(c.Link,{href:"https://www.mongodb.com/docs/compass/beta/embedded-shell/#embedded-mongodb-shell",hideExternalIcon:!0},"Learn more about running operations in mongosh.")),trigger:({ref:e})=>i().createElement("span",{ref:e},">_MONGOSH")}),!t&&o&&i().createElement("span",{className:v},i().createElement(c.SpinLoader,{darkMode:!0})," Command in progress…"))),i().createElement("div",{className:w},t&&i().createElement(c.GuideCue,{cueId:"shell-info",title:"Using the embedded MongoDB Shell",description:"When expanded, mongosh enables you to run commands on your data. Click on the info icon to learn more about the keyboard shortcuts available to you when using mongosh.",trigger:({ref:e})=>i().createElement(c.IconButton,{ref:e,"data-testid":"shell-info-button",variant:"dark","aria-label":"Shell Info","aria-haspopup":"dialog",onClick:s},i().createElement(c.Icon,{glyph:"InfoWithCircle",size:"small"}))}),i().createElement(c.IconButton,{variant:"dark","aria-label":t?"Close Shell":"Open Shell",onClick:n,"aria-pressed":t},i().createElement(c.Icon,{glyph:t?"ChevronDown":"ChevronUp",size:"small"})))));O.propTypes={darkMode:r().bool,isExpanded:r().bool.isRequired,isOperationInProgress:r().bool.isRequired,onShellToggleClicked:r().func.isRequired,showInfoModal:r().func.isRequired};const x=(0,c.withDarkMode)(O),{Shell:I}=o(72519),M=(0,c.css)({backgroundColor:c.palette.gray.dark4,display:"flex",flexBasis:"auto",position:"relative",flexDirection:"column",width:"100vw"},(0,c.getScrollbarStyles)(!0)),H=(0,c.css)({flexGrow:1,display:"none",overflow:"auto",borderTop:`1px solid ${c.palette.gray.dark2}`}),R=(0,c.css)({display:"flex"}),T=100;function D(){return Math.max(240,window.innerHeight-100)}class P extends n.Component{static propTypes={emitShellPluginOpened:r().func,runtime:r().object,shellOutput:r().array,historyStorage:r().object,enableShell:r().bool};static defaultProps={emitShellPluginOpened:()=>{},runtime:null};constructor(e){super(e),this.shellRef=i().createRef(),this.shellOutput=this.props.shellOutput||[],this.state={height:32,prevHeight:240,initialHistory:this.props.historyStorage?null:[],isOperationInProgress:!1,showInfoModal:!1}}componentDidMount(){this.loadHistory(),window.addEventListener("beforeunload",this.terminateRuntime)}componentDidUpdate(e,t){const{height:o}=this.state;t.height<T&&o>T&&this.props.emitShellPluginOpened()}componentWillUnmount(){window.removeEventListener("beforeunload",this.terminateRuntime)}onShellOutputChanged=e=>{this.shellOutput=e};onOperationStarted=()=>{this.setState({isOperationInProgress:!0})};onOperationEnd=()=>{this.setState({isOperationInProgress:!1})};terminateRuntime=()=>{this.props.runtime&&this.props.runtime.terminate()};saveHistory=async e=>{if(this.props.historyStorage)try{await this.props.historyStorage.save(e)}catch(e){console.error(e)}};loadHistory=async()=>{if(this.props.historyStorage)try{const e=await this.props.historyStorage.load();this.setState({initialHistory:e})}catch(e){console.error(e),this.setState({initialHistory:[]})}};updateHeight(e){this.setState(e>T?{height:e,prevHeight:e}:{height:e})}hideInfoModal(){this.setState({showInfoModal:!1})}focusEditor(){this.shellRef.current&&"Range"!==window.getSelection()?.type&&this.shellRef.current.focusEditor()}render(){const{height:e,prevHeight:t,isOperationInProgress:o,showInfoModal:s}=this.state;if(!this.props.enableShell||!this.props.runtime||!this.state.initialHistory)return i().createElement("div",null);const r=e>T,a=r?function(e){const t=D();return Math.min(t,Math.max(T,e))}(e):32;return i().createElement(n.Fragment,null,i().createElement(f,{show:s,hideInfoModal:this.hideInfoModal.bind(this)}),i().createElement("div",{"data-testid":"shell-section",className:M,style:{height:a},id:"content",onClick:this.focusEditor.bind(this)},i().createElement(c.ResizeHandle,{direction:c.ResizeDirection.TOP,onChange:e=>this.updateHeight(e),value:e,minValue:32,maxValue:D(),title:"MongoDB Shell"}),i().createElement(x,{isExpanded:r,onShellToggleClicked:()=>r?this.updateHeight(32):this.updateHeight(t),isOperationInProgress:o,showInfoModal:()=>this.setState({showInfoModal:!0})}),i().createElement("div",{"data-testid":"shell-content",className:(0,c.cx)(H,r&&R)},i().createElement(I,{ref:this.shellRef,runtime:this.props.runtime,initialHistory:this.state.initialHistory,initialOutput:this.shellOutput,onHistoryChanged:this.saveHistory,onOutputChanged:this.onShellOutputChanged,onOperationStarted:this.onOperationStarted,onOperationEnd:this.onOperationEnd}))))}}const B=(0,a.$j)((e=>({emitShellPluginOpened:()=>{e.appRegistry&&e.appRegistry.globalAppRegistry&&e.appRegistry.globalAppRegistry.emit("compass:compass-shell:opened")},runtime:e.runtime?e.runtime.runtime:null})))((0,l.withPreferences)(P,["enableShell"],i()))},70648:()=>{}}]);
|