@theia/console 1.13.0-next.fd91f213 → 1.13.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ansi-console-item.d.ts","sourceRoot":"","sources":["../../src/browser/ansi-console-item.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;;AAElF,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"ansi-console-item.d.ts","sourceRoot":"","sources":["../../src/browser/ansi-console-item.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;;AAElF,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG3D,qBAAa,eAAgB,YAAW,WAAW;aAK3B,OAAO,EAAE,MAAM;aACf,QAAQ,CAAC;IAJ7B,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;gBAGnB,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,sBAAU;IAQvC,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,MAAM,IAAI,KAAK,CAAC,SAAS;CAO5B"}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.AnsiConsoleItem = void 0;
|
|
19
19
|
var React = require("@theia/core/shared/react");
|
|
20
|
+
var DOMPurify = require("dompurify");
|
|
20
21
|
var Anser = require("anser");
|
|
21
22
|
var AnsiConsoleItem = /** @class */ (function () {
|
|
22
23
|
function AnsiConsoleItem(content, severity) {
|
|
@@ -35,7 +36,7 @@ var AnsiConsoleItem = /** @class */ (function () {
|
|
|
35
36
|
configurable: true
|
|
36
37
|
});
|
|
37
38
|
AnsiConsoleItem.prototype.render = function () {
|
|
38
|
-
return React.createElement("div", { className: 'theia-console-ansi-console-item', dangerouslySetInnerHTML: { __html: this.htmlContent } });
|
|
39
|
+
return React.createElement("div", { className: 'theia-console-ansi-console-item', dangerouslySetInnerHTML: { __html: DOMPurify.sanitize(this.htmlContent) } });
|
|
39
40
|
};
|
|
40
41
|
return AnsiConsoleItem;
|
|
41
42
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ansi-console-item.js","sourceRoot":"","sources":["../../src/browser/ansi-console-item.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,gDAAkD;
|
|
1
|
+
{"version":3,"file":"ansi-console-item.js","sourceRoot":"","sources":["../../src/browser/ansi-console-item.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,gDAAkD;AAClD,qCAAuC;AAGvC,6BAAgC;AAEhC;IAII,yBACoB,OAAe,EACf,QAAmB;QADnB,YAAO,GAAP,OAAO,CAAQ;QACf,aAAQ,GAAR,QAAQ,CAAW;QAEnC,IAAI,CAAC,WAAW,GAAG,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE;YACpD,WAAW,EAAE,IAAI;YACjB,YAAY,EAAE,IAAI;SACrB,CAAC,CAAC;IACP,CAAC;IAED,sBAAI,oCAAO;aAAX;YACI,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;QAC9B,CAAC;;;OAAA;IAED,gCAAM,GAAN;QACI,OAAO,6BACH,SAAS,EAAC,iCAAiC,EAC3C,uBAAuB,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,GAC3E,CAAC;IACP,CAAC;IAEL,sBAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,0CAAe"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/console",
|
|
3
|
-
"version": "1.13.0
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Theia - Console Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.13.0
|
|
7
|
-
"@theia/monaco": "1.13.0
|
|
8
|
-
"
|
|
6
|
+
"@theia/core": "1.13.0",
|
|
7
|
+
"@theia/monaco": "1.13.0",
|
|
8
|
+
"@types/dompurify": "^2.0.2",
|
|
9
|
+
"anser": "^2.0.1",
|
|
10
|
+
"dompurify": "^2.0.11"
|
|
9
11
|
},
|
|
10
12
|
"publishConfig": {
|
|
11
13
|
"access": "public"
|
|
@@ -39,7 +41,7 @@
|
|
|
39
41
|
"test": "theiaext test"
|
|
40
42
|
},
|
|
41
43
|
"devDependencies": {
|
|
42
|
-
"@theia/ext-scripts": "1.13.0
|
|
44
|
+
"@theia/ext-scripts": "1.13.0"
|
|
43
45
|
},
|
|
44
46
|
"nyc": {
|
|
45
47
|
"extends": "../../configs/nyc.json"
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
17
|
import * as React from '@theia/core/shared/react';
|
|
18
|
+
import * as DOMPurify from 'dompurify';
|
|
18
19
|
import { ConsoleItem } from './console-session';
|
|
19
20
|
import { Severity } from '@theia/core/lib/common/severity';
|
|
20
21
|
import Anser = require('anser');
|
|
@@ -38,7 +39,10 @@ export class AnsiConsoleItem implements ConsoleItem {
|
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
render(): React.ReactNode {
|
|
41
|
-
return <div
|
|
42
|
+
return <div
|
|
43
|
+
className='theia-console-ansi-console-item'
|
|
44
|
+
dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(this.htmlContent) }}
|
|
45
|
+
/>;
|
|
42
46
|
}
|
|
43
47
|
|
|
44
48
|
}
|