@mongosh/browser-repl 1.6.0 → 1.6.2

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.
Files changed (97) hide show
  1. package/.depcheckrc +8 -2
  2. package/config/webpack.config.base.js +46 -61
  3. package/config/webpack.config.test.js +1 -17
  4. package/config/webpack.config.watch.js +27 -0
  5. package/lib/components/ace-autocompleter-adapter.d.ts +15 -0
  6. package/lib/components/ace-autocompleter-adapter.js +26 -0
  7. package/lib/components/ace-autocompleter-adapter.js.map +1 -0
  8. package/lib/components/editor.d.ts +41 -0
  9. package/lib/components/editor.js +140 -0
  10. package/lib/components/editor.js.map +1 -0
  11. package/lib/components/password-prompt.d.ts +12 -0
  12. package/lib/components/password-prompt.js +67 -0
  13. package/lib/components/password-prompt.js.map +1 -0
  14. package/lib/components/shell-input.d.ts +33 -0
  15. package/lib/components/shell-input.js +127 -0
  16. package/lib/components/shell-input.js.map +1 -0
  17. package/lib/components/shell-loader.d.ts +11 -0
  18. package/lib/components/shell-loader.js +42 -0
  19. package/lib/components/shell-loader.js.map +1 -0
  20. package/lib/components/shell-output-line.d.ts +23 -0
  21. package/lib/components/shell-output-line.js +135 -0
  22. package/lib/components/shell-output-line.js.map +1 -0
  23. package/lib/components/shell-output.d.ts +14 -0
  24. package/lib/components/shell-output.js +48 -0
  25. package/lib/components/shell-output.js.map +1 -0
  26. package/lib/components/shell.d.ts +61 -0
  27. package/lib/components/shell.js +283 -0
  28. package/lib/components/shell.js.map +1 -0
  29. package/lib/components/types/cursor-iteration-result-output.d.ts +19 -0
  30. package/lib/components/types/cursor-iteration-result-output.js +57 -0
  31. package/lib/components/types/cursor-iteration-result-output.js.map +1 -0
  32. package/lib/components/types/cursor-output.d.ts +16 -0
  33. package/lib/components/types/cursor-output.js +45 -0
  34. package/lib/components/types/cursor-output.js.map +1 -0
  35. package/lib/components/types/error-output.d.ts +18 -0
  36. package/lib/components/types/error-output.js +92 -0
  37. package/lib/components/types/error-output.js.map +1 -0
  38. package/lib/components/types/help-output.d.ts +25 -0
  39. package/lib/components/types/help-output.js +102 -0
  40. package/lib/components/types/help-output.js.map +1 -0
  41. package/lib/components/types/object-output.d.ts +12 -0
  42. package/lib/components/types/object-output.js +43 -0
  43. package/lib/components/types/object-output.js.map +1 -0
  44. package/lib/components/types/show-banner-result-output.d.ts +15 -0
  45. package/lib/components/types/show-banner-result-output.js +45 -0
  46. package/lib/components/types/show-banner-result-output.js.map +1 -0
  47. package/lib/components/types/show-collections-output.d.ts +17 -0
  48. package/lib/components/types/show-collections-output.js +81 -0
  49. package/lib/components/types/show-collections-output.js.map +1 -0
  50. package/lib/components/types/show-dbs-output.d.ts +17 -0
  51. package/lib/components/types/show-dbs-output.js +54 -0
  52. package/lib/components/types/show-dbs-output.js.map +1 -0
  53. package/lib/components/types/show-profile-output.d.ts +16 -0
  54. package/lib/components/types/show-profile-output.js +67 -0
  55. package/lib/components/types/show-profile-output.js.map +1 -0
  56. package/lib/components/types/simple-type-output.d.ts +14 -0
  57. package/lib/components/types/simple-type-output.js +45 -0
  58. package/lib/components/types/simple-type-output.js.map +1 -0
  59. package/lib/components/types/stats-result-output.d.ts +12 -0
  60. package/lib/components/types/stats-result-output.js +51 -0
  61. package/lib/components/types/stats-result-output.js.map +1 -0
  62. package/lib/components/utils/expandable.d.ts +12 -0
  63. package/lib/components/utils/expandable.js +53 -0
  64. package/lib/components/utils/expandable.js.map +1 -0
  65. package/lib/components/utils/inspect.d.ts +1 -0
  66. package/lib/components/utils/inspect.js +75 -0
  67. package/lib/components/utils/inspect.js.map +1 -0
  68. package/lib/components/utils/line-with-icon.d.ts +14 -0
  69. package/lib/components/utils/line-with-icon.js +59 -0
  70. package/lib/components/utils/line-with-icon.js.map +1 -0
  71. package/lib/components/utils/syntax-highlight.d.ts +12 -0
  72. package/lib/components/utils/syntax-highlight.js +53 -0
  73. package/lib/components/utils/syntax-highlight.js.map +1 -0
  74. package/lib/iframe-runtime/iframe-interpreter-environment.d.ts +7 -0
  75. package/lib/iframe-runtime/iframe-interpreter-environment.js +17 -0
  76. package/lib/iframe-runtime/iframe-interpreter-environment.js.map +1 -0
  77. package/lib/iframe-runtime/iframe-runtime.d.ts +17 -0
  78. package/lib/iframe-runtime/iframe-runtime.js +68 -0
  79. package/lib/iframe-runtime/iframe-runtime.js.map +1 -0
  80. package/lib/iframe-runtime/index.d.ts +1 -0
  81. package/lib/iframe-runtime/index.js +18 -0
  82. package/lib/iframe-runtime/index.js.map +1 -0
  83. package/lib/index.d.ts +2 -0
  84. package/lib/index.js +8 -0
  85. package/lib/index.js.map +1 -0
  86. package/lib/sandbox.d.ts +1 -0
  87. package/lib/sandbox.js +212 -0
  88. package/lib/sandbox.js.map +1 -0
  89. package/package.json +49 -52
  90. package/.babelrc +0 -11
  91. package/.storybook/main.js +0 -4
  92. package/.storybook/webpack.config.js +0 -12
  93. package/config/plain-url.js +0 -1
  94. package/config/webpack.config.prod.js +0 -21
  95. package/config/webpack.config.stats.js +0 -9
  96. package/lib/mongosh-browser-repl.js +0 -1991
  97. package/lib/mongosh-browser-repl.js.map +0 -1
@@ -0,0 +1,19 @@
1
+ import { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ export interface Document {
4
+ [property: string]: number | string | null | undefined | Document | Document[];
5
+ }
6
+ interface CursorIterationResultOutputProps {
7
+ value: {
8
+ documents: Document[];
9
+ cursorHasMore: boolean;
10
+ };
11
+ }
12
+ export declare class CursorIterationResultOutput extends Component<CursorIterationResultOutputProps> {
13
+ static propTypes: {
14
+ value: PropTypes.Validator<(object | null | undefined)[]>;
15
+ };
16
+ render(): JSX.Element;
17
+ renderDocument: (document: Document, i: number) => JSX.Element;
18
+ }
19
+ export {};
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.CursorIterationResultOutput = void 0;
30
+ const react_1 = __importStar(require("react"));
31
+ const prop_types_1 = __importDefault(require("prop-types"));
32
+ const object_output_1 = require("./object-output");
33
+ const i18n_1 = __importDefault(require("@mongosh/i18n"));
34
+ class CursorIterationResultOutput extends react_1.Component {
35
+ constructor() {
36
+ super(...arguments);
37
+ this.renderDocument = (document, i) => {
38
+ return react_1.default.createElement(object_output_1.ObjectOutput, { key: `document-${i}`, value: document });
39
+ };
40
+ }
41
+ render() {
42
+ if (!this.props.value.documents.length) {
43
+ return (react_1.default.createElement("div", null, i18n_1.default.__('shell-api.classes.Cursor.iteration.no-cursor')));
44
+ }
45
+ const more = this.props.value.cursorHasMore ?
46
+ (react_1.default.createElement("pre", null, i18n_1.default.__('shell-api.classes.Cursor.iteration.type-it-for-more'))) :
47
+ '';
48
+ return (react_1.default.createElement("div", null,
49
+ this.props.value.documents.map(this.renderDocument),
50
+ more));
51
+ }
52
+ }
53
+ exports.CursorIterationResultOutput = CursorIterationResultOutput;
54
+ CursorIterationResultOutput.propTypes = {
55
+ value: prop_types_1.default.arrayOf(prop_types_1.default.object).isRequired
56
+ };
57
+ //# sourceMappingURL=cursor-iteration-result-output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor-iteration-result-output.js","sourceRoot":"","sources":["../../../src/components/types/cursor-iteration-result-output.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,4DAAmC;AACnC,mDAA+C;AAC/C,yDAAiC;AAUjC,MAAa,2BAA4B,SAAQ,iBAA2C;IAA5F;;QAwBE,mBAAc,GAAG,CAAC,QAAkB,EAAE,CAAS,EAAe,EAAE;YAC9D,OAAO,8BAAC,4BAAY,IAAC,GAAG,EAAE,YAAY,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,GAAI,CAAC;QACjE,CAAC,CAAC;IACJ,CAAC;IAtBC,MAAM;QACJ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE;YACtC,OAAO,CACL,2CAAM,cAAI,CAAC,EAAE,CAAC,8CAA8C,CAAC,CAAO,CACrE,CAAC;SACH;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;YAC3C,CAAC,2CAAM,cAAI,CAAC,EAAE,CAAC,qDAAqD,CAAC,CAAO,CAAC,CAAC,CAAC;YAC/E,EAAE,CAAC;QAEL,OAAO,CACL;YACG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC;YACnD,IAAI,CACD,CACP,CAAC;IACJ,CAAC;;AAtBH,kEA2BC;AA1BQ,qCAAS,GAAG;IACjB,KAAK,EAAE,oBAAS,CAAC,OAAO,CAAC,oBAAS,CAAC,MAAM,CAAC,CAAC,UAAU;CACtD,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Document } from './cursor-iteration-result-output';
4
+ interface CursorOutputProps {
5
+ value: {
6
+ documents: Document[];
7
+ cursorHasMore: boolean;
8
+ };
9
+ }
10
+ export declare class CursorOutput extends Component<CursorOutputProps> {
11
+ static propTypes: {
12
+ value: PropTypes.Validator<(object | null | undefined)[]>;
13
+ };
14
+ render(): JSX.Element;
15
+ }
16
+ export {};
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.CursorOutput = void 0;
30
+ const react_1 = __importStar(require("react"));
31
+ const prop_types_1 = __importDefault(require("prop-types"));
32
+ const cursor_iteration_result_output_1 = require("./cursor-iteration-result-output");
33
+ class CursorOutput extends react_1.Component {
34
+ render() {
35
+ if (!this.props.value.documents.length) {
36
+ return react_1.default.createElement("pre", null);
37
+ }
38
+ return react_1.default.createElement(cursor_iteration_result_output_1.CursorIterationResultOutput, { value: this.props.value });
39
+ }
40
+ }
41
+ exports.CursorOutput = CursorOutput;
42
+ CursorOutput.propTypes = {
43
+ value: prop_types_1.default.arrayOf(prop_types_1.default.object).isRequired
44
+ };
45
+ //# sourceMappingURL=cursor-output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor-output.js","sourceRoot":"","sources":["../../../src/components/types/cursor-output.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,4DAAmC;AACnC,qFAAyF;AAMzF,MAAa,YAAa,SAAQ,iBAA4B;IAK5D,MAAM;QACJ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE;YACtC,OAAO,0CAAM,CAAC;SACf;QAED,OAAO,8BAAC,4DAA2B,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAI,CAAC;IAClE,CAAC;;AAXH,oCAYC;AAXQ,sBAAS,GAAG;IACjB,KAAK,EAAE,oBAAS,CAAC,OAAO,CAAC,oBAAS,CAAC,MAAM,CAAC,CAAC,UAAU;CACtD,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ interface ErrorOutputProps {
4
+ value: any;
5
+ }
6
+ export declare class ErrorOutput extends Component<ErrorOutputProps> {
7
+ static propTypes: {
8
+ value: PropTypes.Requireable<any>;
9
+ };
10
+ renderCollapsed(toggle: () => void): JSX.Element;
11
+ formatStack(): string;
12
+ formatErrorBugReportInfo(): JSX.Element | undefined;
13
+ formatErrorInfo(): JSX.Element | undefined;
14
+ formatErrorResult(): JSX.Element | undefined;
15
+ renderExpanded(toggle: () => void): JSX.Element;
16
+ render(): JSX.Element;
17
+ }
18
+ export {};
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ErrorOutput = void 0;
30
+ const react_1 = __importStar(require("react"));
31
+ const prop_types_1 = __importDefault(require("prop-types"));
32
+ const errors_1 = require("@mongosh/errors");
33
+ const simple_type_output_1 = require("./simple-type-output");
34
+ const expandable_1 = require("../utils/expandable");
35
+ class ErrorOutput extends react_1.Component {
36
+ renderCollapsed(toggle) {
37
+ return (react_1.default.createElement("div", null,
38
+ react_1.default.createElement("pre", null,
39
+ react_1.default.createElement("a", { href: "#", onClick: (e) => { e.preventDefault(); toggle(); } },
40
+ this.props.value.name || 'Error',
41
+ ":"),
42
+ " ",
43
+ this.props.value.message)));
44
+ }
45
+ formatStack() {
46
+ return this.props.value.stack.split('\n').slice(1).join('\n');
47
+ }
48
+ formatErrorBugReportInfo() {
49
+ if ((0, errors_1.isShouldReportAsBugError)(this.props.value)) {
50
+ return (react_1.default.createElement("div", null,
51
+ "This is an error inside mongosh. Please ",
52
+ react_1.default.createElement("a", { href: "https://jira.mongodb.org/projects/MONGOSH/issues", target: "_blank" }, "file a bug report for the MONGOSH project"),
53
+ "."));
54
+ }
55
+ return undefined;
56
+ }
57
+ formatErrorInfo() {
58
+ if (this.props.value.errInfo) {
59
+ return (react_1.default.createElement("div", null,
60
+ "Additional information:",
61
+ react_1.default.createElement(simple_type_output_1.SimpleTypeOutput, { value: this.props.value.errInfo })));
62
+ }
63
+ return undefined;
64
+ }
65
+ formatErrorResult() {
66
+ if (this.props.value.result) {
67
+ return (react_1.default.createElement("div", null,
68
+ "Result:",
69
+ react_1.default.createElement(simple_type_output_1.SimpleTypeOutput, { value: this.props.value.result })));
70
+ }
71
+ return undefined;
72
+ }
73
+ renderExpanded(toggle) {
74
+ return (react_1.default.createElement("div", null,
75
+ this.renderCollapsed(toggle),
76
+ react_1.default.createElement("div", null,
77
+ this.formatErrorBugReportInfo(),
78
+ this.formatErrorInfo(),
79
+ this.formatErrorResult(),
80
+ react_1.default.createElement("pre", null, this.formatStack()))));
81
+ }
82
+ render() {
83
+ return (react_1.default.createElement(expandable_1.Expandable, null, (expanded, toggle) => (expanded ?
84
+ this.renderExpanded(toggle) :
85
+ this.renderCollapsed(toggle))));
86
+ }
87
+ }
88
+ exports.ErrorOutput = ErrorOutput;
89
+ ErrorOutput.propTypes = {
90
+ value: prop_types_1.default.any
91
+ };
92
+ //# sourceMappingURL=error-output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-output.js","sourceRoot":"","sources":["../../../src/components/types/error-output.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,4DAAmC;AACnC,4CAA2D;AAE3D,6DAAwD;AACxD,oDAAiD;AAOjD,MAAa,WAAY,SAAQ,iBAA2B;IAK1D,eAAe,CAAC,MAAkB;QAChC,OAAO,CAAC;YAAK;g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YACL,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;YAC7B;gBACG,IAAI,CAAC,wBAAwB,EAAE;gBAC/B,IAAI,CAAC,eAAe,EAAE;gBACtB,IAAI,CAAC,iBAAiB,EAAE;gBACzB,2CAAM,IAAI,CAAC,WAAW,EAAE,CAAO,CAC3B,CACF,CAAC,CAAC;IACV,CAAC;IAED,MAAM;QACJ,OAAO,CAAC,8BAAC,uBAAU,QACjB,CAAC,QAAiB,EAAE,MAAkB,EAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;YACjE,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;YAC7B,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CACnB,CAAC,CAAC;IAClB,CAAC;;AAjEH,kCAkEC;AAjEQ,qBAAS,GAAG;IACjB,KAAK,EAAE,oBAAS,CAAC,GAAG;CACrB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ declare type HelpApiObject = {
4
+ help: string;
5
+ docs: string;
6
+ attr: HelpApiObjectAttr[];
7
+ };
8
+ declare type HelpApiObjectAttr = {
9
+ name: string;
10
+ description: string;
11
+ };
12
+ interface HelpOutputProps {
13
+ value: HelpApiObject;
14
+ }
15
+ export declare class HelpOutput extends Component<HelpOutputProps> {
16
+ static propTypes: {
17
+ value: PropTypes.Validator<object>;
18
+ };
19
+ renderAttrTable: (attr: HelpApiObjectAttr[]) => JSX.Element | undefined;
20
+ renderAttrTableRow: (attr: HelpApiObjectAttr, i: number) => JSX.Element;
21
+ renderHelpDocsLink(docs: string): JSX.Element | undefined;
22
+ renderHelpText(helpText: string): JSX.Element | undefined;
23
+ render(): JSX.Element;
24
+ }
25
+ export {};
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.HelpOutput = void 0;
30
+ const react_1 = __importStar(require("react"));
31
+ const compass_components_1 = require("@mongodb-js/compass-components");
32
+ const prop_types_1 = __importDefault(require("prop-types"));
33
+ const i18n_1 = __importDefault(require("@mongosh/i18n"));
34
+ const helpOutput = (0, compass_components_1.css)({
35
+ '& table, & caption, & tbody, & tfoot, & thead, & tr, & th, & td': {
36
+ margin: 0,
37
+ padding: 0,
38
+ border: 0,
39
+ outline: 0,
40
+ fontSize: '100%',
41
+ verticalAlign: 'baseline',
42
+ background: 'transparent'
43
+ },
44
+ '& table': {
45
+ width: '100%',
46
+ tableLayout: 'fixed',
47
+ overflowWrap: 'break-word',
48
+ textAlign: 'left',
49
+ margin: '1em 0',
50
+ '& th': {
51
+ width: '25%',
52
+ fontWeight: 'bold'
53
+ },
54
+ '& th, & td': {
55
+ textAlign: 'left'
56
+ }
57
+ }
58
+ });
59
+ class HelpOutput extends react_1.Component {
60
+ constructor() {
61
+ super(...arguments);
62
+ this.renderAttrTable = (attr) => {
63
+ if (!attr || !attr.length) {
64
+ return;
65
+ }
66
+ return (react_1.default.createElement("table", null,
67
+ react_1.default.createElement("tbody", null, attr.map(this.renderAttrTableRow))));
68
+ };
69
+ this.renderAttrTableRow = (attr, i) => {
70
+ return (react_1.default.createElement("tr", { key: `row-${i}` },
71
+ react_1.default.createElement("th", null, attr.name),
72
+ react_1.default.createElement("td", null, attr.description)));
73
+ };
74
+ }
75
+ renderHelpDocsLink(docs) {
76
+ if (!docs) {
77
+ return;
78
+ }
79
+ return (react_1.default.createElement("div", null,
80
+ i18n_1.default.__('cli-repl.args.moreInformation'),
81
+ " ",
82
+ react_1.default.createElement("a", { href: docs, target: "_blank" }, docs)));
83
+ }
84
+ renderHelpText(helpText) {
85
+ if (!helpText) {
86
+ return;
87
+ }
88
+ return (react_1.default.createElement("div", null, helpText));
89
+ }
90
+ render() {
91
+ const help = this.props.value;
92
+ return (react_1.default.createElement("div", { className: helpOutput },
93
+ this.renderHelpText(help.help),
94
+ this.renderAttrTable(help.attr),
95
+ this.renderHelpDocsLink(help.docs)));
96
+ }
97
+ }
98
+ exports.HelpOutput = HelpOutput;
99
+ HelpOutput.propTypes = {
100
+ value: prop_types_1.default.object.isRequired
101
+ };
102
+ //# sourceMappingURL=help-output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-output.js","sourceRoot":"","sources":["../../../src/components/types/help-output.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,uEAAqD;AACrD,4DAAmC;AACnC,yDAAiC;AAEjC,MAAM,UAAU,GAAG,IAAA,wBAAG,EAAC;IACrB,iEAAiE,EAAE;QACjE,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,MAAM;QAChB,aAAa,EAAE,UAAU;QACzB,UAAU,EAAE,aA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GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;QAE9B,OAAO,CACL,uCAAK,SAAS,EAAE,UAAU;YACvB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC;YAC9B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;YAC/B,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAC/B,CACP,CAAC;IACJ,CAAC;;AA5CH,gCA6CC;AA5CQ,oBAAS,GAAG;IACjB,KAAK,EAAE,oBAAS,CAAC,MAAM,CAAC,UAAU;CACnC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ interface ObjectOutputProps {
4
+ value: any;
5
+ }
6
+ export declare class ObjectOutput extends Component<ObjectOutputProps> {
7
+ static propTypes: {
8
+ value: PropTypes.Requireable<any>;
9
+ };
10
+ render(): JSX.Element;
11
+ }
12
+ export {};
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ObjectOutput = void 0;
30
+ const react_1 = __importStar(require("react"));
31
+ const prop_types_1 = __importDefault(require("prop-types"));
32
+ const syntax_highlight_1 = require("../utils/syntax-highlight");
33
+ const inspect_1 = require("../utils/inspect");
34
+ class ObjectOutput extends react_1.Component {
35
+ render() {
36
+ return react_1.default.createElement(syntax_highlight_1.SyntaxHighlight, { code: (0, inspect_1.inspect)(this.props.value) });
37
+ }
38
+ }
39
+ exports.ObjectOutput = ObjectOutput;
40
+ ObjectOutput.propTypes = {
41
+ value: prop_types_1.default.any
42
+ };
43
+ //# sourceMappingURL=object-output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object-output.js","sourceRoot":"","sources":["../../../src/components/types/object-output.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,4DAAmC;AACnC,gEAA4D;AAC5D,8CAA2C;AAM3C,MAAa,YAAa,SAAQ,iBAA4B;IAK5D,MAAM;QACJ,OAAO,8BAAC,kCAAe,IAAC,IAAI,EAAE,IAAA,iBAAO,EAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAI,CAAC;IAC9D,CAAC;;AAPH,oCAQC;AAPQ,sBAAS,GAAG;IACjB,KAAK,EAAE,oBAAS,CAAC,GAAG;CACrB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ interface ShowBannerResultOutputProps {
4
+ value: null | {
5
+ header?: string;
6
+ content: string;
7
+ };
8
+ }
9
+ export declare class ShowBannerResultOutput extends Component<ShowBannerResultOutputProps> {
10
+ static propTypes: {
11
+ value: PropTypes.Requireable<any>;
12
+ };
13
+ render(): JSX.Element;
14
+ }
15
+ export {};
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ShowBannerResultOutput = void 0;
30
+ const react_1 = __importStar(require("react"));
31
+ const prop_types_1 = __importDefault(require("prop-types"));
32
+ const compass_components_1 = require("@mongodb-js/compass-components");
33
+ class ShowBannerResultOutput extends react_1.Component {
34
+ render() {
35
+ var _a, _b;
36
+ return (react_1.default.createElement(react_1.default.Fragment, null,
37
+ ((_a = this.props.value) === null || _a === void 0 ? void 0 : _a.header) && react_1.default.createElement(compass_components_1.H3, null, this.props.value.header),
38
+ ((_b = this.props.value) === null || _b === void 0 ? void 0 : _b.content) && react_1.default.createElement("pre", null, this.props.value.content)));
39
+ }
40
+ }
41
+ exports.ShowBannerResultOutput = ShowBannerResultOutput;
42
+ ShowBannerResultOutput.propTypes = {
43
+ value: prop_types_1.default.any
44
+ };
45
+ //# sourceMappingURL=show-banner-result-output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"show-banner-result-output.js","sourceRoot":"","sources":["../../../src/components/types/show-banner-result-output.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,4DAAmC;AACnC,uEAAoD;AAMpD,MAAa,sBAAuB,SAAQ,iBAAsC;IAKhF,MAAM;;QACJ,OAAO,CAAC;YACL,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,MAAM,KAAI,8BAAC,uBAAE,QAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAM;YAC9D,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,OAAO,KAAI,2CAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAO,CAClE,CAAC,CAAC;IACP,CAAC;;AAVH,wDAWC;AAVQ,gCAAS,GAAG;IACjB,KAAK,EAAE,oBAAS,CAAC,GAAG;CACrB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import PropTypes from 'prop-types';
2
+ import { Component } from 'react';
3
+ interface ShowCollectionsOutputProps {
4
+ value: CollectionObject[];
5
+ }
6
+ declare type CollectionObject = {
7
+ name: string;
8
+ badge: string;
9
+ };
10
+ export declare class ShowCollectionsOutput extends Component<ShowCollectionsOutputProps> {
11
+ static propTypes: {
12
+ value: PropTypes.Requireable<any[]>;
13
+ };
14
+ renderTable: (value: CollectionObject[]) => JSX.Element;
15
+ render(): JSX.Element;
16
+ }
17
+ export {};
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ShowCollectionsOutput = void 0;
30
+ const compass_components_1 = require("@mongodb-js/compass-components");
31
+ const prop_types_1 = __importDefault(require("prop-types"));
32
+ const react_1 = __importStar(require("react"));
33
+ const shellCollectionsOutputCollectionName = (0, compass_components_1.css)({
34
+ fontWeight: 'bold'
35
+ });
36
+ const shellCollectionsOutputSystemCollection = (0, compass_components_1.css)({
37
+ color: compass_components_1.palette.gray.base
38
+ });
39
+ function isSystemCollection(coll) {
40
+ return coll.name.startsWith('system.') || coll.name.startsWith('enxcol_.');
41
+ }
42
+ class ShowCollectionsOutput extends react_1.Component {
43
+ constructor() {
44
+ super(...arguments);
45
+ this.renderTable = (value) => {
46
+ const systemCollections = [];
47
+ const otherCollections = [];
48
+ let maxCollectionNameLength = 0;
49
+ value.forEach(coll => {
50
+ maxCollectionNameLength = Math.max(maxCollectionNameLength, coll.name.length);
51
+ if (isSystemCollection(coll)) {
52
+ systemCollections.push(coll);
53
+ }
54
+ else {
55
+ otherCollections.push(coll);
56
+ }
57
+ });
58
+ const tableEntries = [];
59
+ [
60
+ ...otherCollections,
61
+ ...systemCollections
62
+ ].forEach((coll, i) => {
63
+ const fillLength = maxCollectionNameLength - coll.name.length + 1;
64
+ const className = (0, compass_components_1.cx)(shellCollectionsOutputCollectionName, isSystemCollection(coll) && shellCollectionsOutputSystemCollection);
65
+ tableEntries.push(react_1.default.createElement("span", { key: `row-${i}` },
66
+ react_1.default.createElement("span", { className: className }, coll.name),
67
+ coll.badge ? coll.badge.padStart(coll.badge.length + fillLength) : '',
68
+ react_1.default.createElement("br", null)));
69
+ });
70
+ return react_1.default.createElement(react_1.default.Fragment, null, tableEntries);
71
+ };
72
+ }
73
+ render() {
74
+ return react_1.default.createElement("pre", null, this.renderTable(this.props.value));
75
+ }
76
+ }
77
+ exports.ShowCollectionsOutput = ShowCollectionsOutput;
78
+ ShowCollectionsOutput.propTypes = {
79
+ value: prop_types_1.default.array
80
+ };
81
+ //# sourceMappingURL=show-collections-output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"show-collections-output.js","sourceRoot":"","sources":["../../../src/components/types/show-collections-output.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uEAAkE;AAClE,4DAAmC;AACnC,+CAAyC;AAEzC,MAAM,oCAAoC,GAAG,IAAA,wBAAG,EAAC;IAC/C,UAAU,EAAE,MAAM;CACnB,CAAC,CAAC;AAEH,MAAM,sCAAsC,GAAG,IAAA,wBAAG,EAAC;IACjD,KAAK,EAAE,4BAAO,CAAC,IAAI,CAAC,IAAI;CACzB,CAAC,CAAC;AAWH,SAAS,kBAAkB,CAAC,IAAsB;IAChD,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAC7E,CAAC;AAED,MAAa,qBAAsB,SAAQ,iBAAqC;IAAhF;;QAKE,gBAAW,GAAG,CAAC,KAAyB,EAAe,EAAE;YACvD,MAAM,iBAAiB,GAAuB,EAA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,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAO,CAAC;IACzD,CAAC;;AAvCH,sDAwCC;AAvCQ,+BAAS,GAAG;IACjB,KAAK,EAAE,oBAAS,CAAC,KAAK;CACvB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ interface ShowDbsOutputProps {
4
+ value: any;
5
+ }
6
+ declare type DatabaseObject = {
7
+ databases: object;
8
+ map: any;
9
+ };
10
+ export declare class ShowDbsOutput extends Component<ShowDbsOutputProps> {
11
+ static propTypes: {
12
+ value: PropTypes.Requireable<any>;
13
+ };
14
+ renderTable: (value: DatabaseObject) => string;
15
+ render(): JSX.Element;
16
+ }
17
+ export {};