@mongodb-js/compass-shell 2.17.0 → 2.19.1
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/lib/1.js +383 -384
- package/lib/2.js +66 -33
- package/lib/index.js +67895 -28649
- package/package.json +16 -16
package/lib/2.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
(window["webpackJsonpCompassShellPlugin"] = window["webpackJsonpCompassShellPlugin"] || []).push([[2],{
|
|
2
2
|
|
|
3
|
-
/***/
|
|
3
|
+
/***/ 429:
|
|
4
4
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5
5
|
|
|
6
6
|
"use strict";
|
|
7
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
7
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(401);
|
|
8
8
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
9
9
|
// Imports
|
|
10
10
|
|
|
@@ -22,11 +22,11 @@ ___CSS_LOADER_EXPORT___.locals = {
|
|
|
22
22
|
|
|
23
23
|
/***/ }),
|
|
24
24
|
|
|
25
|
-
/***/
|
|
25
|
+
/***/ 430:
|
|
26
26
|
/***/ (function(module, exports, __webpack_require__) {
|
|
27
27
|
|
|
28
28
|
!function (t, n) {
|
|
29
|
-
true ? module.exports = n(__webpack_require__(
|
|
29
|
+
true ? module.exports = n(__webpack_require__(170), __webpack_require__(2)) : undefined;
|
|
30
30
|
}(window, function (t, n) {
|
|
31
31
|
return function (t) {
|
|
32
32
|
var n = {};
|
|
@@ -2077,11 +2077,11 @@ ___CSS_LOADER_EXPORT___.locals = {
|
|
|
2077
2077
|
|
|
2078
2078
|
/***/ }),
|
|
2079
2079
|
|
|
2080
|
-
/***/
|
|
2080
|
+
/***/ 431:
|
|
2081
2081
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2082
2082
|
|
|
2083
2083
|
"use strict";
|
|
2084
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2084
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(401);
|
|
2085
2085
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
2086
2086
|
// Imports
|
|
2087
2087
|
|
|
@@ -2102,11 +2102,11 @@ ___CSS_LOADER_EXPORT___.locals = {
|
|
|
2102
2102
|
|
|
2103
2103
|
/***/ }),
|
|
2104
2104
|
|
|
2105
|
-
/***/
|
|
2105
|
+
/***/ 499:
|
|
2106
2106
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2107
2107
|
|
|
2108
2108
|
"use strict";
|
|
2109
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2109
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(401);
|
|
2110
2110
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
2111
2111
|
// Imports
|
|
2112
2112
|
|
|
@@ -2128,7 +2128,7 @@ ___CSS_LOADER_EXPORT___.locals = {
|
|
|
2128
2128
|
|
|
2129
2129
|
/***/ }),
|
|
2130
2130
|
|
|
2131
|
-
/***/
|
|
2131
|
+
/***/ 502:
|
|
2132
2132
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2133
2133
|
|
|
2134
2134
|
"use strict";
|
|
@@ -2139,19 +2139,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2139
2139
|
__webpack_require__.d(__webpack_exports__, "CompassShell", function() { return /* reexport */ compass_shell_CompassShell; });
|
|
2140
2140
|
|
|
2141
2141
|
// EXTERNAL MODULE: external "react"
|
|
2142
|
-
var external_react_ = __webpack_require__(
|
|
2142
|
+
var external_react_ = __webpack_require__(2);
|
|
2143
2143
|
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
2144
2144
|
|
|
2145
|
-
// EXTERNAL MODULE: /Users/
|
|
2146
|
-
var classnames = __webpack_require__(
|
|
2145
|
+
// EXTERNAL MODULE: /Users/alena.khineika/www/compass/node_modules/classnames/index.js
|
|
2146
|
+
var classnames = __webpack_require__(387);
|
|
2147
2147
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
2148
2148
|
|
|
2149
|
-
// EXTERNAL MODULE: /Users/
|
|
2150
|
-
var injectStylesIntoStyleTag = __webpack_require__(
|
|
2149
|
+
// EXTERNAL MODULE: /Users/alena.khineika/www/compass/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
|
|
2150
|
+
var injectStylesIntoStyleTag = __webpack_require__(400);
|
|
2151
2151
|
var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);
|
|
2152
2152
|
|
|
2153
|
-
// EXTERNAL MODULE: /Users/
|
|
2154
|
-
var compass_shell_module = __webpack_require__(
|
|
2153
|
+
// EXTERNAL MODULE: /Users/alena.khineika/www/compass/node_modules/css-loader/dist/cjs.js??ref--5-1!/Users/alena.khineika/www/compass/node_modules/postcss-loader/lib??ref--5-2!/Users/alena.khineika/www/compass/node_modules/less-loader/dist/cjs.js??ref--5-3!./src/components/compass-shell/compass-shell.module.less
|
|
2154
|
+
var compass_shell_module = __webpack_require__(429);
|
|
2155
2155
|
|
|
2156
2156
|
// CONCATENATED MODULE: ./src/components/compass-shell/compass-shell.module.less
|
|
2157
2157
|
|
|
@@ -2168,32 +2168,32 @@ var update = injectStylesIntoStyleTag_default()(compass_shell_module["a" /* defa
|
|
|
2168
2168
|
|
|
2169
2169
|
/* harmony default export */ var compass_shell_compass_shell_module = (compass_shell_module["a" /* default */].locals || {});
|
|
2170
2170
|
// EXTERNAL MODULE: external "prop-types"
|
|
2171
|
-
var external_prop_types_ = __webpack_require__(
|
|
2171
|
+
var external_prop_types_ = __webpack_require__(170);
|
|
2172
2172
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
2173
2173
|
|
|
2174
2174
|
// EXTERNAL MODULE: ./node_modules/react-redux/es/index.js + 25 modules
|
|
2175
|
-
var es = __webpack_require__(
|
|
2175
|
+
var es = __webpack_require__(167);
|
|
2176
2176
|
|
|
2177
|
-
// EXTERNAL MODULE: /Users/
|
|
2178
|
-
var mongosh_browser_repl = __webpack_require__(
|
|
2177
|
+
// EXTERNAL MODULE: /Users/alena.khineika/www/compass/node_modules/@mongosh/browser-repl/lib/mongosh-browser-repl.js
|
|
2178
|
+
var mongosh_browser_repl = __webpack_require__(409);
|
|
2179
2179
|
|
|
2180
2180
|
// EXTERNAL MODULE: external "@mongodb-js/compass-components"
|
|
2181
|
-
var compass_components_ = __webpack_require__(
|
|
2181
|
+
var compass_components_ = __webpack_require__(383);
|
|
2182
2182
|
|
|
2183
2183
|
// EXTERNAL MODULE: ../hadron-react-buttons/lib/index.js
|
|
2184
|
-
var lib = __webpack_require__(
|
|
2184
|
+
var lib = __webpack_require__(430);
|
|
2185
2185
|
|
|
2186
|
-
// EXTERNAL MODULE: /Users/
|
|
2187
|
-
var Modal = __webpack_require__(
|
|
2186
|
+
// EXTERNAL MODULE: /Users/alena.khineika/www/compass/node_modules/react-bootstrap/es/Modal.js + 16 modules
|
|
2187
|
+
var Modal = __webpack_require__(501);
|
|
2188
2188
|
|
|
2189
2189
|
// EXTERNAL MODULE: ../compass-logging/dist/index.js
|
|
2190
|
-
var dist = __webpack_require__(
|
|
2190
|
+
var dist = __webpack_require__(166);
|
|
2191
2191
|
|
|
2192
2192
|
// EXTERNAL MODULE: ./package.json
|
|
2193
|
-
var package_0 = __webpack_require__(
|
|
2193
|
+
var package_0 = __webpack_require__(58);
|
|
2194
2194
|
|
|
2195
|
-
// EXTERNAL MODULE: /Users/
|
|
2196
|
-
var info_modal_module = __webpack_require__(
|
|
2195
|
+
// EXTERNAL MODULE: /Users/alena.khineika/www/compass/node_modules/css-loader/dist/cjs.js??ref--5-1!/Users/alena.khineika/www/compass/node_modules/postcss-loader/lib??ref--5-2!/Users/alena.khineika/www/compass/node_modules/less-loader/dist/cjs.js??ref--5-3!./src/components/info-modal/info-modal.module.less
|
|
2196
|
+
var info_modal_module = __webpack_require__(431);
|
|
2197
2197
|
|
|
2198
2198
|
// CONCATENATED MODULE: ./src/components/info-modal/info-modal.module.less
|
|
2199
2199
|
|
|
@@ -2224,6 +2224,9 @@ const {
|
|
|
2224
2224
|
const mongoshVersion = `v${package_0.dependencies['@mongosh/browser-repl'].replace('^', '')}`;
|
|
2225
2225
|
|
|
2226
2226
|
const hotkeys = [{
|
|
2227
|
+
key: 'Ctrl+`',
|
|
2228
|
+
description: 'Toggle shell.'
|
|
2229
|
+
}, {
|
|
2227
2230
|
key: 'Ctrl+A',
|
|
2228
2231
|
description: 'Moves the cursor to the beginning of the line.'
|
|
2229
2232
|
}, {
|
|
@@ -2280,6 +2283,8 @@ class info_modal_InfoModal extends external_react_["PureComponent"] {
|
|
|
2280
2283
|
show
|
|
2281
2284
|
} = this.props;
|
|
2282
2285
|
return /*#__PURE__*/external_react_default.a.createElement(Modal["a" /* default */], {
|
|
2286
|
+
restoreFocus: false,
|
|
2287
|
+
onEscapeKeyDown: hideInfoModal,
|
|
2283
2288
|
show: show,
|
|
2284
2289
|
onShow: this.showHandler
|
|
2285
2290
|
}, /*#__PURE__*/external_react_default.a.createElement(Modal["a" /* default */].Header, {
|
|
@@ -2329,8 +2334,8 @@ _defineProperty(info_modal_InfoModal, "propTypes", {
|
|
|
2329
2334
|
// CONCATENATED MODULE: ./src/components/info-modal/index.js
|
|
2330
2335
|
|
|
2331
2336
|
/* harmony default export */ var components_info_modal = (info_modal);
|
|
2332
|
-
// EXTERNAL MODULE: /Users/
|
|
2333
|
-
var shell_header_module = __webpack_require__(
|
|
2337
|
+
// EXTERNAL MODULE: /Users/alena.khineika/www/compass/node_modules/css-loader/dist/cjs.js??ref--5-1!/Users/alena.khineika/www/compass/node_modules/postcss-loader/lib??ref--5-2!/Users/alena.khineika/www/compass/node_modules/less-loader/dist/cjs.js??ref--5-3!./src/components/shell-header/shell-header.module.less
|
|
2338
|
+
var shell_header_module = __webpack_require__(499);
|
|
2334
2339
|
|
|
2335
2340
|
// CONCATENATED MODULE: ./src/components/shell-header/shell-header.module.less
|
|
2336
2341
|
|
|
@@ -2356,11 +2361,29 @@ function shell_header_defineProperty(obj, key, value) { if (key in obj) { Object
|
|
|
2356
2361
|
|
|
2357
2362
|
|
|
2358
2363
|
class shell_header_ShellHeader extends external_react_["Component"] {
|
|
2364
|
+
componentDidMount() {
|
|
2365
|
+
document.addEventListener('keydown', this.handleKeyboardToggle.bind(this));
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
componentWillUnmount() {
|
|
2369
|
+
document.removeEventListener('keydown', this.handleKeyboardToggle.bind(this));
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
handleKeyboardToggle({
|
|
2373
|
+
ctrlKey,
|
|
2374
|
+
key
|
|
2375
|
+
}) {
|
|
2376
|
+
if (ctrlKey && key === '`') {
|
|
2377
|
+
this.props.onShellToggleClicked();
|
|
2378
|
+
}
|
|
2379
|
+
}
|
|
2359
2380
|
/**
|
|
2360
2381
|
* Render ShellHeader component.
|
|
2361
2382
|
*
|
|
2362
2383
|
* @returns {React.Component} The rendered component.
|
|
2363
2384
|
*/
|
|
2385
|
+
|
|
2386
|
+
|
|
2364
2387
|
render() {
|
|
2365
2388
|
const {
|
|
2366
2389
|
isExpanded,
|
|
@@ -2505,6 +2528,7 @@ class compass_shell_CompassShell extends external_react_["Component"] {
|
|
|
2505
2528
|
}
|
|
2506
2529
|
});
|
|
2507
2530
|
|
|
2531
|
+
this.shellRef = /*#__PURE__*/external_react_default.a.createRef();
|
|
2508
2532
|
this.shellOutput = this.props.shellOutput || [];
|
|
2509
2533
|
this.state = {
|
|
2510
2534
|
height: shellHeightClosed,
|
|
@@ -2544,6 +2568,16 @@ class compass_shell_CompassShell extends external_react_["Component"] {
|
|
|
2544
2568
|
height
|
|
2545
2569
|
});
|
|
2546
2570
|
}
|
|
2571
|
+
|
|
2572
|
+
hideInfoModal() {
|
|
2573
|
+
this.setState({
|
|
2574
|
+
showInfoModal: false
|
|
2575
|
+
});
|
|
2576
|
+
|
|
2577
|
+
if (this.shellRef.current) {
|
|
2578
|
+
this.shellRef.current.focusEditor();
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2547
2581
|
/**
|
|
2548
2582
|
* Render CompassShell component.
|
|
2549
2583
|
*
|
|
@@ -2567,9 +2601,7 @@ class compass_shell_CompassShell extends external_react_["Component"] {
|
|
|
2567
2601
|
const renderedHeight = isExpanded ? boundShellHeight(height) : shellHeightClosed;
|
|
2568
2602
|
return /*#__PURE__*/external_react_default.a.createElement(external_react_["Fragment"], null, /*#__PURE__*/external_react_default.a.createElement(components_info_modal, {
|
|
2569
2603
|
show: showInfoModal,
|
|
2570
|
-
hideInfoModal:
|
|
2571
|
-
showInfoModal: false
|
|
2572
|
-
})
|
|
2604
|
+
hideInfoModal: this.hideInfoModal.bind(this)
|
|
2573
2605
|
}), /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
2574
2606
|
"data-test-id": "shell-section",
|
|
2575
2607
|
className: compass_shell_compass_shell_module['compass-shell'],
|
|
@@ -2597,6 +2629,7 @@ class compass_shell_CompassShell extends external_react_["Component"] {
|
|
|
2597
2629
|
[compass_shell_compass_shell_module['compass-shell-shell-container-visible']]: isExpanded
|
|
2598
2630
|
})
|
|
2599
2631
|
}, /*#__PURE__*/external_react_default.a.createElement(mongosh_browser_repl["Shell"], {
|
|
2632
|
+
ref: this.shellRef,
|
|
2600
2633
|
runtime: this.props.runtime,
|
|
2601
2634
|
initialHistory: this.state.initialHistory,
|
|
2602
2635
|
initialOutput: this.shellOutput,
|