@opensumi/ide-addons 2.20.7 → 2.20.8-next-1666320902.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,6 +1,7 @@
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;
4
5
  protected readonly rttService: ConnectionRTTBrowserService;
5
6
  private interval?;
6
7
  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,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"}
1
+ {"version":3,"file":"chrome-devtools.contribution.d.ts","sourceRoot":"","sources":["../../src/browser/chrome-devtools.contribution.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAG9E,OAAO,EAAoC,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAWzG,qBACa,0BAA2B,YAAW,qBAAqB;IAEtE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IAGtC,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,2BAA2B,CAAC;IAE3D,OAAO,CAAC,QAAQ,CAAC,CAAiB;IAElC,MAAM,CAAC,QAAQ,SAAQ;IAEvB,UAAU;IA2BV,OAAO,CAAC,gBAAgB;CAWzB"}
@@ -19,26 +19,29 @@ var DevtoolsCommand;
19
19
  let ChromeDevtoolsContribution = ChromeDevtoolsContribution_1 = class ChromeDevtoolsContribution {
20
20
  initialize() {
21
21
  var _a;
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) {
22
+ // only runs when devtools supoprt is enabled
23
+ if (this.appConfig.devtools) {
24
+ // receive notification from opensumi devtools by custom event
25
+ window.addEventListener(DevtoolsEvent.Latency, (event) => {
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) {
26
41
  if (!this.interval) {
27
42
  this.startRTTInterval();
28
43
  }
29
44
  }
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
- }
42
45
  }
43
46
  }
44
47
  startRTTInterval() {
@@ -47,13 +50,17 @@ let ChromeDevtoolsContribution = ChromeDevtoolsContribution_1 = class ChromeDevt
47
50
  await this.rttService.measure();
48
51
  const rtt = Date.now() - start;
49
52
  // "if" below is to prevent setting latency after stoping capturing
50
- if (window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__.capture) {
53
+ if (window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__.captureRPC) {
51
54
  window.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__.latency = rtt;
52
55
  }
53
56
  }, ChromeDevtoolsContribution_1.INTERVAL);
54
57
  }
55
58
  };
56
59
  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);
57
64
  tslib_1.__decorate([
58
65
  (0, di_1.Autowired)(connection_rtt_service_1.ConnectionRTTBrowserServiceToken),
59
66
  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,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,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;YACjC,IAAI,OAAO,KAAK,eAAe,CAAC,KAAK,EAAE;gBACrC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;oBAClB,IAAI,CAAC,gBAAgB,EAAE,CAAC;iBACzB;aACF;iBAAM,IAAI,OAAO,KAAK,eAAe,CAAC,I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,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;YAC/B,mEAAmE;YACnE,IAAI,MAAM,CAAC,iCAAiC,CAAC,UAAU,EAAE;gBACvD,MAAM,CAAC,iCAAiC,CAAC,OAAO,GAAG,GAAG,CAAC;aACxD;QACH,CAAC,EAAE,4BAA0B,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;CACF,CAAA;AAxCQ,mCAAQ,GAAG,IAAI,CAAC;AAPvB;IADC,IAAA,cAAS,EAAC,4BAAS,CAAC;;6DACiB;AAGtC;IADC,IAAA,cAAS,EAAC,yDAAgC,CAAC;sCACb,oDAA2B;8DAAC;AALhD,0BAA0B;IADtC,IAAA,kBAAM,EAAC,wCAAqB,CAAC;GACjB,0BAA0B,CAiDtC;AAjDY,gEAA0B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensumi/ide-addons",
3
- "version": "2.20.7",
3
+ "version": "2.20.8-next-1666320902.0",
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.7",
20
- "@opensumi/ide-core-node": "2.20.7"
19
+ "@opensumi/ide-core-common": "2.20.8-next-1666320902.0",
20
+ "@opensumi/ide-core-node": "2.20.8-next-1666320902.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@opensumi/ide-components": "2.20.7",
24
- "@opensumi/ide-core-browser": "2.20.7",
23
+ "@opensumi/ide-components": "2.20.8-next-1666320902.0",
24
+ "@opensumi/ide-core-browser": "2.20.8-next-1666320902.0",
25
25
  "@opensumi/ide-dev-tool": "^1.3.1",
26
- "@opensumi/ide-editor": "2.20.7",
27
- "@opensumi/ide-file-search": "2.20.7",
28
- "@opensumi/ide-file-service": "2.20.7",
29
- "@opensumi/ide-overlay": "2.20.7",
30
- "@opensumi/ide-quick-open": "2.20.7",
31
- "@opensumi/ide-workspace": "2.20.7",
32
- "@opensumi/ide-workspace-edit": "2.20.7"
26
+ "@opensumi/ide-editor": "2.20.8-next-1666320902.0",
27
+ "@opensumi/ide-file-search": "2.20.8-next-1666320902.0",
28
+ "@opensumi/ide-file-service": "2.20.8-next-1666320902.0",
29
+ "@opensumi/ide-overlay": "2.20.8-next-1666320902.0",
30
+ "@opensumi/ide-quick-open": "2.20.8-next-1666320902.0",
31
+ "@opensumi/ide-workspace": "2.20.8-next-1666320902.0",
32
+ "@opensumi/ide-workspace-edit": "2.20.8-next-1666320902.0"
33
33
  },
34
- "gitHead": "677dcb037e3232718f1a80ee6c3f3117281ff9ac"
34
+ "gitHead": "ee9abae0712912ad323b7d12f42a1a4b75bd194d"
35
35
  }