@mongosh/browser-repl 3.23.0 → 3.26.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.
|
@@ -43,6 +43,7 @@ const errors_1 = require("@mongosh/errors");
|
|
|
43
43
|
const compass_components_1 = require("@mongodb-js/compass-components");
|
|
44
44
|
const simple_type_output_1 = require("./simple-type-output");
|
|
45
45
|
const expandable_1 = require("../utils/expandable");
|
|
46
|
+
const strip_ansi_1 = __importDefault(require("strip-ansi"));
|
|
46
47
|
const errInfoCss = (0, compass_components_1.css)({
|
|
47
48
|
'&&': {
|
|
48
49
|
borderLeft: '3px solid',
|
|
@@ -57,6 +58,7 @@ class ErrorOutput extends react_1.Component {
|
|
|
57
58
|
renderCollapsed(toggle) {
|
|
58
59
|
const { name, message, codeName } = this.props.value;
|
|
59
60
|
const formattedName = name + (codeName ? `[${codeName}]` : '');
|
|
61
|
+
const strippedMessage = name === 'SyntaxError' ? (0, strip_ansi_1.default)(message) : message;
|
|
60
62
|
return (react_1.default.createElement("div", null,
|
|
61
63
|
react_1.default.createElement("pre", null,
|
|
62
64
|
react_1.default.createElement("a", { href: "#", onClick: (e) => {
|
|
@@ -66,10 +68,12 @@ class ErrorOutput extends react_1.Component {
|
|
|
66
68
|
formattedName || 'Error',
|
|
67
69
|
":"),
|
|
68
70
|
' ',
|
|
69
|
-
react_1.default.createElement("span", { className: messageCss },
|
|
71
|
+
react_1.default.createElement("span", { className: messageCss }, strippedMessage))));
|
|
70
72
|
}
|
|
71
73
|
formatStack() {
|
|
72
|
-
|
|
74
|
+
const err = this.props.value;
|
|
75
|
+
const stack = err.name === 'SyntaxError' ? (0, strip_ansi_1.default)(err.stack) : err.stack;
|
|
76
|
+
return stack.split('\n').slice(1).join('\n');
|
|
73
77
|
}
|
|
74
78
|
formatErrorBugReportInfo() {
|
|
75
79
|
if ((0, errors_1.isShouldReportAsBugError)(this.props.value)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-output.js","sourceRoot":"","sources":["../../../src/components/types/error-output.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,4DAAmC;AACnC,4CAA2D;AAC3D,uEAA8D;AAE9D,6DAAwD;AACxD,oDAAiD;
|
|
1
|
+
{"version":3,"file":"error-output.js","sourceRoot":"","sources":["../../../src/components/types/error-output.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,4DAAmC;AACnC,4CAA2D;AAC3D,uEAA8D;AAE9D,6DAAwD;AACxD,oDAAiD;AAEjD,4DAAmC;AAMnC,MAAM,UAAU,GAAG,IAAA,wBAAG,EAAC;IACrB,IAAI,EAAE;QACJ,UAAU,EAAE,WAAW;QACvB,WAAW,EAAE,KAAK;QAClB,WAAW,EAAE,4BAAO,CAAC,GAAG,CAAC,MAAM;KAChC;CACF,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,IAAA,wBAAG,EAAC;IACrB,KAAK,EAAE,4BAAO,CAAC,KAAK;CACrB,CAAC,CAAC;AAEH,MAAa,WAAY,SAAQ,iBAA2B;IAK1D,eAAe,CAAC,MAAkB;QAChC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAyB,CAAC;QACzE,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC/D,MAAM,eAAe,GACnB,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,IAAA,oBAAS,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QACxD,OAAO,CACL;YACE;gBACE,qCACE,IAAI,EAAC,GAAG,EACR,OAAO,EAAE,CAAC,CAAC,EAAQ,EAAE;wBACnB,CAAC,CA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,CAAC,KAAK,CAAC,MAAM,GAAI,CAChD,CACP,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,cAAc,CAAC,MAAkB;QAC/B,OAAO,CACL;YACG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;YAC7B,uCAAK,SAAS,EAAE,UAAU;gBACvB,IAAI,CAAC,wBAAwB,EAAE;gBAC/B,IAAI,CAAC,eAAe,EAAE;gBACtB,IAAI,CAAC,iBAAiB,EAAE;gBACzB,uCAAK,SAAS,EAAE,UAAU,IAAG,IAAI,CAAC,WAAW,EAAE,CAAO,CAClD,CACF,CACP,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,CACL,8BAAC,uBAAU,QACR,CAAC,QAAiB,EAAE,MAAkB,EAAe,EAAE,CACtD,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAE5D,CACd,CAAC;IACJ,CAAC;;AAnGH,kCAoGC;AAnGQ,qBAAS,GAAG;IACjB,KAAK,EAAE,oBAAS,CAAC,GAAG;CACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mongosh/browser-repl",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.26.0",
|
|
4
4
|
"description": "Browser presentation component for Mongo Shell",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=14.15.1"
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
]
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@mongosh/browser-runtime-core": "^3.
|
|
60
|
+
"@mongosh/browser-runtime-core": "^3.26.0",
|
|
61
61
|
"@mongosh/errors": "2.4.4",
|
|
62
62
|
"@mongosh/history": "2.4.9",
|
|
63
|
-
"@mongosh/i18n": "^2.
|
|
64
|
-
"@mongosh/node-runtime-worker-thread": "3.3.
|
|
65
|
-
"@mongosh/service-provider-core": "3.6.
|
|
66
|
-
"@mongosh/shell-bson": "1.0.
|
|
63
|
+
"@mongosh/i18n": "^2.19.0",
|
|
64
|
+
"@mongosh/node-runtime-worker-thread": "3.3.28",
|
|
65
|
+
"@mongosh/service-provider-core": "3.6.1",
|
|
66
|
+
"@mongosh/shell-bson": "1.0.2",
|
|
67
67
|
"bson": "^6.10.4",
|
|
68
68
|
"numeral": "^2.0.6",
|
|
69
69
|
"text-table": "^0.2.0"
|
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
"react-refresh": "^0.14.0",
|
|
114
114
|
"rimraf": "^3.0.2",
|
|
115
115
|
"stream-browserify": "^3.0.0",
|
|
116
|
+
"strip-ansi": "^6.0.0",
|
|
116
117
|
"util": "^0.12.5",
|
|
117
118
|
"webpack": "^5.99.9",
|
|
118
119
|
"webpack-cli": "^6.0.1",
|
|
@@ -125,5 +126,5 @@
|
|
|
125
126
|
"react": "^17.0.2",
|
|
126
127
|
"react-dom": "^17.0.2"
|
|
127
128
|
},
|
|
128
|
-
"gitHead": "
|
|
129
|
+
"gitHead": "6cfca044bd9c3dd60ea67dc8e9cbff3fa1cd9fcf"
|
|
129
130
|
}
|