@opensumi/ide-addons 2.20.5-rc-1665562305.0 → 2.20.5
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,7 +1,6 @@
|
|
|
1
1
|
import { ClientAppContribution } from '@opensumi/ide-core-browser';
|
|
2
2
|
import { ConnectionRTTBrowserService } from './connection-rtt-service';
|
|
3
3
|
export declare class ChromeDevtoolsContribution implements ClientAppContribution {
|
|
4
|
-
private readonly appConfig;
|
|
5
4
|
protected readonly rttService: ConnectionRTTBrowserService;
|
|
6
5
|
private interval?;
|
|
7
6
|
static INTERVAL: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chrome-devtools.contribution.d.ts","sourceRoot":"","sources":["../../src/browser/chrome-devtools.contribution.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"chrome-devtools.contribution.d.ts","sourceRoot":"","sources":["../../src/browser/chrome-devtools.contribution.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,EAAoC,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAWzG,qBACa,0BAA2B,YAAW,qBAAqB;IAEtE,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,2BAA2B,CAAC;IAE3D,OAAO,CAAC,QAAQ,CAAC,CAAiB;IAElC,MAAM,CAAC,QAAQ,SAAQ;IAEvB,UAAU;IAwBV,OAAO,CAAC,gBAAgB;CAWzB"}
|
|
@@ -19,29 +19,26 @@ var DevtoolsCommand;
|
|
|
19
19
|
let ChromeDevtoolsContribution = ChromeDevtoolsContribution_1 = class ChromeDevtoolsContribution {
|
|
20
20
|
initialize() {
|
|
21
21
|
var _a;
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const { command } = event.detail;
|
|
27
|
-
if (command === DevtoolsCommand.Start) {
|
|
28
|
-
if (!this.interval) {
|
|
29
|
-
this.startRTTInterval();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
else if (command === DevtoolsCommand.Stop) {
|
|
33
|
-
if (this.interval) {
|
|
34
|
-
global.clearInterval(this.interval);
|
|
35
|
-
this.interval = undefined;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
// if opensumi devtools has started capturing before this contribution point is registered
|
|
40
|
-
if ((_a = window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__) === null || _a === void 0 ? void 0 : _a.captureRPC) {
|
|
22
|
+
// receive notification from opensumi devtools by custom event
|
|
23
|
+
window.addEventListener(DevtoolsEvent.Latency, (event) => {
|
|
24
|
+
const { command } = event.detail;
|
|
25
|
+
if (command === DevtoolsCommand.Start) {
|
|
41
26
|
if (!this.interval) {
|
|
42
27
|
this.startRTTInterval();
|
|
43
28
|
}
|
|
44
29
|
}
|
|
30
|
+
else if (command === DevtoolsCommand.Stop) {
|
|
31
|
+
if (this.interval) {
|
|
32
|
+
global.clearInterval(this.interval);
|
|
33
|
+
this.interval = undefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
// if opensumi devtools has started capturing before this contribution point is registered
|
|
38
|
+
if ((_a = window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__) === null || _a === void 0 ? void 0 : _a.capture) {
|
|
39
|
+
if (!this.interval) {
|
|
40
|
+
this.startRTTInterval();
|
|
41
|
+
}
|
|
45
42
|
}
|
|
46
43
|
}
|
|
47
44
|
startRTTInterval() {
|
|
@@ -50,17 +47,13 @@ let ChromeDevtoolsContribution = ChromeDevtoolsContribution_1 = class ChromeDevt
|
|
|
50
47
|
await this.rttService.measure();
|
|
51
48
|
const rtt = Date.now() - start;
|
|
52
49
|
// "if" below is to prevent setting latency after stoping capturing
|
|
53
|
-
if (window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__.
|
|
50
|
+
if (window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__.capture) {
|
|
54
51
|
window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__.latency = rtt;
|
|
55
52
|
}
|
|
56
53
|
}, ChromeDevtoolsContribution_1.INTERVAL);
|
|
57
54
|
}
|
|
58
55
|
};
|
|
59
56
|
ChromeDevtoolsContribution.INTERVAL = 1000;
|
|
60
|
-
tslib_1.__decorate([
|
|
61
|
-
(0, di_1.Autowired)(ide_core_browser_1.AppConfig),
|
|
62
|
-
tslib_1.__metadata("design:type", Object)
|
|
63
|
-
], ChromeDevtoolsContribution.prototype, "appConfig", void 0);
|
|
64
57
|
tslib_1.__decorate([
|
|
65
58
|
(0, di_1.Autowired)(connection_rtt_service_1.ConnectionRTTBrowserServiceToken),
|
|
66
59
|
tslib_1.__metadata("design:type", connection_rtt_service_1.ConnectionRTTBrowserService)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chrome-devtools.contribution.js","sourceRoot":"","sources":["../../src/browser/chrome-devtools.contribution.ts"],"names":[],"mappings":";;;;;AAAA,qCAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"chrome-devtools.contribution.js","sourceRoot":"","sources":["../../src/browser/chrome-devtools.contribution.ts"],"names":[],"mappings":";;;;;AAAA,qCAAyC;AACzC,iEAAmE;AACnE,uEAAiE;AAEjE,qEAAyG;AAEzG,IAAK,aAEJ;AAFD,WAAK,aAAa;IAChB,6CAA4B,CAAA;AAC9B,CAAC,EAFI,aAAa,KAAb,aAAa,QAEjB;AAED,IAAK,eAGJ;AAHD,WAAK,eAAe;IAClB,kCAAe,CAAA;IACf,gCAAa,CAAA;AACf,CAAC,EAHI,eAAe,KAAf,eAAe,QAGnB;AAGD,IAAa,0BAA0B,kCAAvC,MAAa,0BAA0B;IAQrC,UAAU;;QACR,8DAA8D;QAC9D,MAAM,CAAC,gBAAgB,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACvD,MAAM,EAAE,OAAO,EA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C;AA3CY,gEAA0B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensumi/ide-addons",
|
|
3
|
-
"version": "2.20.5
|
|
3
|
+
"version": "2.20.5",
|
|
4
4
|
"files": [
|
|
5
5
|
"lib"
|
|
6
6
|
],
|
|
@@ -16,20 +16,20 @@
|
|
|
16
16
|
"url": "git@github.com:opensumi/core.git"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@opensumi/ide-core-common": "2.20.5
|
|
20
|
-
"@opensumi/ide-core-node": "2.20.5
|
|
19
|
+
"@opensumi/ide-core-common": "2.20.5",
|
|
20
|
+
"@opensumi/ide-core-node": "2.20.5"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@opensumi/ide-components": "2.20.5
|
|
24
|
-
"@opensumi/ide-core-browser": "2.20.5
|
|
23
|
+
"@opensumi/ide-components": "2.20.5",
|
|
24
|
+
"@opensumi/ide-core-browser": "2.20.5",
|
|
25
25
|
"@opensumi/ide-dev-tool": "^1.3.1",
|
|
26
|
-
"@opensumi/ide-editor": "2.20.5
|
|
27
|
-
"@opensumi/ide-file-search": "2.20.5
|
|
28
|
-
"@opensumi/ide-file-service": "2.20.5
|
|
29
|
-
"@opensumi/ide-overlay": "2.20.5
|
|
30
|
-
"@opensumi/ide-quick-open": "2.20.5
|
|
31
|
-
"@opensumi/ide-workspace": "2.20.5
|
|
32
|
-
"@opensumi/ide-workspace-edit": "2.20.5
|
|
26
|
+
"@opensumi/ide-editor": "2.20.5",
|
|
27
|
+
"@opensumi/ide-file-search": "2.20.5",
|
|
28
|
+
"@opensumi/ide-file-service": "2.20.5",
|
|
29
|
+
"@opensumi/ide-overlay": "2.20.5",
|
|
30
|
+
"@opensumi/ide-quick-open": "2.20.5",
|
|
31
|
+
"@opensumi/ide-workspace": "2.20.5",
|
|
32
|
+
"@opensumi/ide-workspace-edit": "2.20.5"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "e05a1f702d8b8c6e6d147fddde5f771eee5fceaa"
|
|
35
35
|
}
|