@theia/metrics 1.48.1 → 1.48.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 (47) hide show
  1. package/README.md +30 -30
  2. package/lib/browser/metrics-frontend-application-contribution.d.ts +12 -12
  3. package/lib/browser/metrics-frontend-application-contribution.js +58 -58
  4. package/lib/browser/metrics-frontend-module.d.ts +3 -3
  5. package/lib/browser/metrics-frontend-module.js +28 -28
  6. package/lib/common/index.d.ts +1 -1
  7. package/lib/common/index.js +19 -19
  8. package/lib/common/measurement-notification-service.d.ts +11 -11
  9. package/lib/common/measurement-notification-service.js +20 -20
  10. package/lib/electron-node/electron-metrics-backend-module.d.ts +3 -3
  11. package/lib/electron-node/electron-metrics-backend-module.js +24 -24
  12. package/lib/electron-node/electron-token-validator.d.ts +9 -9
  13. package/lib/electron-node/electron-token-validator.js +43 -43
  14. package/lib/node/extensions-metrics-contribution.d.ts +8 -8
  15. package/lib/node/extensions-metrics-contribution.js +54 -54
  16. package/lib/node/index.d.ts +5 -5
  17. package/lib/node/index.js +23 -23
  18. package/lib/node/measurement-metrics-contribution.d.ts +17 -17
  19. package/lib/node/measurement-metrics-contribution.js +75 -75
  20. package/lib/node/metrics-backend-application-contribution.d.ts +16 -16
  21. package/lib/node/metrics-backend-application-contribution.js +50 -50
  22. package/lib/node/metrics-backend-module.d.ts +3 -3
  23. package/lib/node/metrics-backend-module.js +35 -35
  24. package/lib/node/metrics-contribution.d.ts +5 -5
  25. package/lib/node/metrics-contribution.js +19 -19
  26. package/lib/node/node-metrics-contribution.d.ts +5 -5
  27. package/lib/node/node-metrics-contribution.js +35 -35
  28. package/lib/node/prometheus.d.ts +2 -2
  29. package/lib/node/prometheus.js +27 -27
  30. package/lib/node/prometheus.spec.d.ts +1 -1
  31. package/lib/node/prometheus.spec.js +40 -40
  32. package/package.json +4 -4
  33. package/src/browser/metrics-frontend-application-contribution.ts +51 -51
  34. package/src/browser/metrics-frontend-module.ts +28 -28
  35. package/src/common/index.ts +17 -17
  36. package/src/common/measurement-notification-service.ts +29 -29
  37. package/src/electron-node/electron-metrics-backend-module.ts +24 -24
  38. package/src/electron-node/electron-token-validator.ts +37 -37
  39. package/src/node/extensions-metrics-contribution.ts +51 -51
  40. package/src/node/index.ts +21 -21
  41. package/src/node/measurement-metrics-contribution.ts +75 -75
  42. package/src/node/metrics-backend-application-contribution.ts +51 -51
  43. package/src/node/metrics-backend-module.ts +40 -40
  44. package/src/node/metrics-contribution.ts +20 -20
  45. package/src/node/node-metrics-contribution.ts +33 -33
  46. package/src/node/prometheus.spec.ts +49 -49
  47. package/src/node/prometheus.ts +25 -25
package/README.md CHANGED
@@ -1,30 +1,30 @@
1
- <div align='center'>
2
-
3
- <br />
4
-
5
- <img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
6
-
7
- <h2>ECLIPSE THEIA - METRICS EXTENSION</h2>
8
-
9
- <hr />
10
-
11
- </div>
12
-
13
- ## Description
14
-
15
- The `@theia/metrics` extension provides metrics using the [Prometheus](https://prometheus.io/) API.
16
-
17
- ## Additional Information
18
-
19
- - [API documentation for `@theia/metrics`](https://eclipse-theia.github.io/theia/docs/next/modules/metrics.html)
20
- - [Theia - GitHub](https://github.com/eclipse-theia/theia)
21
- - [Theia - Website](https://theia-ide.org/)
22
-
23
- ## License
24
-
25
- - [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
26
- - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
27
-
28
- ## Trademark
29
- "Theia" is a trademark of the Eclipse Foundation
30
- https://www.eclipse.org/theia
1
+ <div align='center'>
2
+
3
+ <br />
4
+
5
+ <img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
6
+
7
+ <h2>ECLIPSE THEIA - METRICS EXTENSION</h2>
8
+
9
+ <hr />
10
+
11
+ </div>
12
+
13
+ ## Description
14
+
15
+ The `@theia/metrics` extension provides metrics using the [Prometheus](https://prometheus.io/) API.
16
+
17
+ ## Additional Information
18
+
19
+ - [API documentation for `@theia/metrics`](https://eclipse-theia.github.io/theia/docs/next/modules/metrics.html)
20
+ - [Theia - GitHub](https://github.com/eclipse-theia/theia)
21
+ - [Theia - Website](https://theia-ide.org/)
22
+
23
+ ## License
24
+
25
+ - [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
26
+ - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
27
+
28
+ ## Trademark
29
+ "Theia" is a trademark of the Eclipse Foundation
30
+ https://www.eclipse.org/theia
@@ -1,13 +1,13 @@
1
- import { FrontendApplicationContribution } from '@theia/core/lib/browser';
2
- import { ILogger, MeasurementResult, Stopwatch } from '@theia/core';
3
- import { MeasurementNotificationService } from '../common';
4
- export declare class MetricsFrontendApplicationContribution implements FrontendApplicationContribution {
5
- protected stopwatch: Stopwatch;
6
- protected notificationService: MeasurementNotificationService;
7
- protected logger: ILogger;
8
- readonly id: string;
9
- initialize(): void;
10
- protected doInitialize(): Promise<void>;
11
- protected notify(result: MeasurementResult): void;
12
- }
1
+ import { FrontendApplicationContribution } from '@theia/core/lib/browser';
2
+ import { ILogger, MeasurementResult, Stopwatch } from '@theia/core';
3
+ import { MeasurementNotificationService } from '../common';
4
+ export declare class MetricsFrontendApplicationContribution implements FrontendApplicationContribution {
5
+ protected stopwatch: Stopwatch;
6
+ protected notificationService: MeasurementNotificationService;
7
+ protected logger: ILogger;
8
+ readonly id: string;
9
+ initialize(): void;
10
+ protected doInitialize(): Promise<void>;
11
+ protected notify(result: MeasurementResult): void;
12
+ }
13
13
  //# sourceMappingURL=metrics-frontend-application-contribution.d.ts.map
@@ -1,59 +1,59 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MetricsFrontendApplicationContribution = void 0;
4
- const tslib_1 = require("tslib");
5
- // *****************************************************************************
6
- // Copyright (C) 2023 STMicroelectronics and others.
7
- //
8
- // This program and the accompanying materials are made available under the
9
- // terms of the Eclipse Public License v. 2.0 which is available at
10
- // http://www.eclipse.org/legal/epl-2.0.
11
- //
12
- // This Source Code may also be made available under the following Secondary
13
- // Licenses when the conditions for such availability set forth in the Eclipse
14
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
15
- // with the GNU Classpath Exception which is available at
16
- // https://www.gnu.org/software/classpath/license.html.
17
- //
18
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
19
- // *****************************************************************************
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const core_1 = require("@theia/core");
22
- const coreutils_1 = require("@theia/core/shared/@phosphor/coreutils");
23
- const common_1 = require("../common");
24
- let MetricsFrontendApplicationContribution = class MetricsFrontendApplicationContribution {
25
- constructor() {
26
- this.id = coreutils_1.UUID.uuid4();
27
- }
28
- initialize() {
29
- this.doInitialize();
30
- }
31
- async doInitialize() {
32
- const logLevel = await this.logger.getLogLevel();
33
- if (logLevel !== core_1.LogLevel.DEBUG) {
34
- return;
35
- }
36
- this.stopwatch.storedMeasurements.forEach(result => this.notify(result));
37
- this.stopwatch.onDidAddMeasurementResult(result => this.notify(result));
38
- }
39
- notify(result) {
40
- this.notificationService.onFrontendMeasurement(this.id, result);
41
- }
42
- };
43
- (0, tslib_1.__decorate)([
44
- (0, inversify_1.inject)(core_1.Stopwatch),
45
- (0, tslib_1.__metadata)("design:type", core_1.Stopwatch)
46
- ], MetricsFrontendApplicationContribution.prototype, "stopwatch", void 0);
47
- (0, tslib_1.__decorate)([
48
- (0, inversify_1.inject)(common_1.MeasurementNotificationService),
49
- (0, tslib_1.__metadata)("design:type", Object)
50
- ], MetricsFrontendApplicationContribution.prototype, "notificationService", void 0);
51
- (0, tslib_1.__decorate)([
52
- (0, inversify_1.inject)(core_1.ILogger),
53
- (0, tslib_1.__metadata)("design:type", Object)
54
- ], MetricsFrontendApplicationContribution.prototype, "logger", void 0);
55
- MetricsFrontendApplicationContribution = (0, tslib_1.__decorate)([
56
- (0, inversify_1.injectable)()
57
- ], MetricsFrontendApplicationContribution);
58
- exports.MetricsFrontendApplicationContribution = MetricsFrontendApplicationContribution;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MetricsFrontendApplicationContribution = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // *****************************************************************************
6
+ // Copyright (C) 2023 STMicroelectronics and others.
7
+ //
8
+ // This program and the accompanying materials are made available under the
9
+ // terms of the Eclipse Public License v. 2.0 which is available at
10
+ // http://www.eclipse.org/legal/epl-2.0.
11
+ //
12
+ // This Source Code may also be made available under the following Secondary
13
+ // Licenses when the conditions for such availability set forth in the Eclipse
14
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
15
+ // with the GNU Classpath Exception which is available at
16
+ // https://www.gnu.org/software/classpath/license.html.
17
+ //
18
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
19
+ // *****************************************************************************
20
+ const inversify_1 = require("@theia/core/shared/inversify");
21
+ const core_1 = require("@theia/core");
22
+ const coreutils_1 = require("@theia/core/shared/@phosphor/coreutils");
23
+ const common_1 = require("../common");
24
+ let MetricsFrontendApplicationContribution = class MetricsFrontendApplicationContribution {
25
+ constructor() {
26
+ this.id = coreutils_1.UUID.uuid4();
27
+ }
28
+ initialize() {
29
+ this.doInitialize();
30
+ }
31
+ async doInitialize() {
32
+ const logLevel = await this.logger.getLogLevel();
33
+ if (logLevel !== core_1.LogLevel.DEBUG) {
34
+ return;
35
+ }
36
+ this.stopwatch.storedMeasurements.forEach(result => this.notify(result));
37
+ this.stopwatch.onDidAddMeasurementResult(result => this.notify(result));
38
+ }
39
+ notify(result) {
40
+ this.notificationService.onFrontendMeasurement(this.id, result);
41
+ }
42
+ };
43
+ (0, tslib_1.__decorate)([
44
+ (0, inversify_1.inject)(core_1.Stopwatch),
45
+ (0, tslib_1.__metadata)("design:type", core_1.Stopwatch)
46
+ ], MetricsFrontendApplicationContribution.prototype, "stopwatch", void 0);
47
+ (0, tslib_1.__decorate)([
48
+ (0, inversify_1.inject)(common_1.MeasurementNotificationService),
49
+ (0, tslib_1.__metadata)("design:type", Object)
50
+ ], MetricsFrontendApplicationContribution.prototype, "notificationService", void 0);
51
+ (0, tslib_1.__decorate)([
52
+ (0, inversify_1.inject)(core_1.ILogger),
53
+ (0, tslib_1.__metadata)("design:type", Object)
54
+ ], MetricsFrontendApplicationContribution.prototype, "logger", void 0);
55
+ MetricsFrontendApplicationContribution = (0, tslib_1.__decorate)([
56
+ (0, inversify_1.injectable)()
57
+ ], MetricsFrontendApplicationContribution);
58
+ exports.MetricsFrontendApplicationContribution = MetricsFrontendApplicationContribution;
59
59
  //# sourceMappingURL=metrics-frontend-application-contribution.js.map
@@ -1,4 +1,4 @@
1
- import { ContainerModule } from '@theia/core/shared/inversify';
2
- declare const _default: ContainerModule;
3
- export default _default;
1
+ import { ContainerModule } from '@theia/core/shared/inversify';
2
+ declare const _default: ContainerModule;
3
+ export default _default;
4
4
  //# sourceMappingURL=metrics-frontend-module.d.ts.map
@@ -1,29 +1,29 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2023 STMicroelectronics and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const inversify_1 = require("@theia/core/shared/inversify");
19
- const metrics_frontend_application_contribution_1 = require("./metrics-frontend-application-contribution");
20
- const common_1 = require("../common");
21
- const browser_1 = require("@theia/core/lib/browser");
22
- exports.default = new inversify_1.ContainerModule(bind => {
23
- bind(browser_1.FrontendApplicationContribution).to(metrics_frontend_application_contribution_1.MetricsFrontendApplicationContribution).inSingletonScope();
24
- bind(common_1.MeasurementNotificationService).toDynamicValue(ctx => {
25
- const connection = ctx.container.get(browser_1.WebSocketConnectionProvider);
26
- return connection.createProxy(common_1.measurementNotificationServicePath);
27
- });
28
- });
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2023 STMicroelectronics and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const inversify_1 = require("@theia/core/shared/inversify");
19
+ const metrics_frontend_application_contribution_1 = require("./metrics-frontend-application-contribution");
20
+ const common_1 = require("../common");
21
+ const browser_1 = require("@theia/core/lib/browser");
22
+ exports.default = new inversify_1.ContainerModule(bind => {
23
+ bind(browser_1.FrontendApplicationContribution).to(metrics_frontend_application_contribution_1.MetricsFrontendApplicationContribution).inSingletonScope();
24
+ bind(common_1.MeasurementNotificationService).toDynamicValue(ctx => {
25
+ const connection = ctx.container.get(browser_1.WebSocketConnectionProvider);
26
+ return connection.createProxy(common_1.measurementNotificationServicePath);
27
+ });
28
+ });
29
29
  //# sourceMappingURL=metrics-frontend-module.js.map
@@ -1,2 +1,2 @@
1
- export * from './measurement-notification-service';
1
+ export * from './measurement-notification-service';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,20 +1,20 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2023 STMicroelectronics and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const tslib_1 = require("tslib");
19
- (0, tslib_1.__exportStar)(require("./measurement-notification-service"), exports);
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2023 STMicroelectronics and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const tslib_1 = require("tslib");
19
+ (0, tslib_1.__exportStar)(require("./measurement-notification-service"), exports);
20
20
  //# sourceMappingURL=index.js.map
@@ -1,12 +1,12 @@
1
- import { MeasurementResult } from '@theia/core';
2
- export declare const measurementNotificationServicePath = "/services/measurement-notification";
3
- export declare const MeasurementNotificationService: unique symbol;
4
- export interface MeasurementNotificationService {
5
- /**
6
- * Notify the backend when a fronted stopwatch provides a new measurement.
7
- * @param frontendId The unique id associated with the frontend that sends the notification
8
- * @param result The new measurement result
9
- */
10
- onFrontendMeasurement(frontendId: string, result: MeasurementResult): void;
11
- }
1
+ import { MeasurementResult } from '@theia/core';
2
+ export declare const measurementNotificationServicePath = "/services/measurement-notification";
3
+ export declare const MeasurementNotificationService: unique symbol;
4
+ export interface MeasurementNotificationService {
5
+ /**
6
+ * Notify the backend when a fronted stopwatch provides a new measurement.
7
+ * @param frontendId The unique id associated with the frontend that sends the notification
8
+ * @param result The new measurement result
9
+ */
10
+ onFrontendMeasurement(frontendId: string, result: MeasurementResult): void;
11
+ }
12
12
  //# sourceMappingURL=measurement-notification-service.d.ts.map
@@ -1,21 +1,21 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2023 STMicroelectronics and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.MeasurementNotificationService = exports.measurementNotificationServicePath = void 0;
19
- exports.measurementNotificationServicePath = '/services/measurement-notification';
20
- exports.MeasurementNotificationService = Symbol('MeasurementNotificationService');
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2023 STMicroelectronics and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.MeasurementNotificationService = exports.measurementNotificationServicePath = void 0;
19
+ exports.measurementNotificationServicePath = '/services/measurement-notification';
20
+ exports.MeasurementNotificationService = Symbol('MeasurementNotificationService');
21
21
  //# sourceMappingURL=measurement-notification-service.js.map
@@ -1,4 +1,4 @@
1
- import { ContainerModule } from '@theia/core/shared/inversify';
2
- declare const _default: ContainerModule;
3
- export default _default;
1
+ import { ContainerModule } from '@theia/core/shared/inversify';
2
+ declare const _default: ContainerModule;
3
+ export default _default;
4
4
  //# sourceMappingURL=electron-metrics-backend-module.d.ts.map
@@ -1,25 +1,25 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2023 STMicroelectronics and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const inversify_1 = require("@theia/core/shared/inversify");
19
- const electron_token_validator_1 = require("./electron-token-validator");
20
- const electron_token_validator_2 = require("@theia/core/lib/electron-node/token/electron-token-validator");
21
- exports.default = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
22
- bind(electron_token_validator_1.MetricsElectronTokenValidator).toSelf().inSingletonScope();
23
- rebind(electron_token_validator_2.ElectronTokenValidator).to(electron_token_validator_1.MetricsElectronTokenValidator);
24
- });
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2023 STMicroelectronics and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const inversify_1 = require("@theia/core/shared/inversify");
19
+ const electron_token_validator_1 = require("./electron-token-validator");
20
+ const electron_token_validator_2 = require("@theia/core/lib/electron-node/token/electron-token-validator");
21
+ exports.default = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
22
+ bind(electron_token_validator_1.MetricsElectronTokenValidator).toSelf().inSingletonScope();
23
+ rebind(electron_token_validator_2.ElectronTokenValidator).to(electron_token_validator_1.MetricsElectronTokenValidator);
24
+ });
25
25
  //# sourceMappingURL=electron-metrics-backend-module.js.map
@@ -1,10 +1,10 @@
1
- /// <reference types="node" />
2
- import { ElectronTokenValidator } from '@theia/core/lib/electron-node/token/electron-token-validator';
3
- import { IncomingMessage } from 'http';
4
- import { MaybePromise } from '@theia/core';
5
- export declare class MetricsElectronTokenValidator extends ElectronTokenValidator {
6
- protected init(): void;
7
- allowWsUpgrade(request: IncomingMessage): MaybePromise<boolean>;
8
- allowRequest(request: IncomingMessage): boolean;
9
- }
1
+ /// <reference types="node" />
2
+ import { ElectronTokenValidator } from '@theia/core/lib/electron-node/token/electron-token-validator';
3
+ import { IncomingMessage } from 'http';
4
+ import { MaybePromise } from '@theia/core';
5
+ export declare class MetricsElectronTokenValidator extends ElectronTokenValidator {
6
+ protected init(): void;
7
+ allowWsUpgrade(request: IncomingMessage): MaybePromise<boolean>;
8
+ allowRequest(request: IncomingMessage): boolean;
9
+ }
10
10
  //# sourceMappingURL=electron-token-validator.d.ts.map
@@ -1,44 +1,44 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2023 STMicroelectronics and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.MetricsElectronTokenValidator = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const electron_token_validator_1 = require("@theia/core/lib/electron-node/token/electron-token-validator");
22
- const metrics_backend_application_contribution_1 = require("../node/metrics-backend-application-contribution");
23
- let MetricsElectronTokenValidator = class MetricsElectronTokenValidator extends electron_token_validator_1.ElectronTokenValidator {
24
- init() {
25
- super.init();
26
- }
27
- allowWsUpgrade(request) {
28
- return this.allowRequest(request);
29
- }
30
- allowRequest(request) {
31
- return request.url === metrics_backend_application_contribution_1.MetricsBackendApplicationContribution.ENDPOINT || super.allowRequest(request);
32
- }
33
- };
34
- (0, tslib_1.__decorate)([
35
- (0, inversify_1.postConstruct)(),
36
- (0, tslib_1.__metadata)("design:type", Function),
37
- (0, tslib_1.__metadata)("design:paramtypes", []),
38
- (0, tslib_1.__metadata)("design:returntype", void 0)
39
- ], MetricsElectronTokenValidator.prototype, "init", null);
40
- MetricsElectronTokenValidator = (0, tslib_1.__decorate)([
41
- (0, inversify_1.injectable)()
42
- ], MetricsElectronTokenValidator);
43
- exports.MetricsElectronTokenValidator = MetricsElectronTokenValidator;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2023 STMicroelectronics and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.MetricsElectronTokenValidator = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const inversify_1 = require("@theia/core/shared/inversify");
21
+ const electron_token_validator_1 = require("@theia/core/lib/electron-node/token/electron-token-validator");
22
+ const metrics_backend_application_contribution_1 = require("../node/metrics-backend-application-contribution");
23
+ let MetricsElectronTokenValidator = class MetricsElectronTokenValidator extends electron_token_validator_1.ElectronTokenValidator {
24
+ init() {
25
+ super.init();
26
+ }
27
+ allowWsUpgrade(request) {
28
+ return this.allowRequest(request);
29
+ }
30
+ allowRequest(request) {
31
+ return request.url === metrics_backend_application_contribution_1.MetricsBackendApplicationContribution.ENDPOINT || super.allowRequest(request);
32
+ }
33
+ };
34
+ (0, tslib_1.__decorate)([
35
+ (0, inversify_1.postConstruct)(),
36
+ (0, tslib_1.__metadata)("design:type", Function),
37
+ (0, tslib_1.__metadata)("design:paramtypes", []),
38
+ (0, tslib_1.__metadata)("design:returntype", void 0)
39
+ ], MetricsElectronTokenValidator.prototype, "init", null);
40
+ MetricsElectronTokenValidator = (0, tslib_1.__decorate)([
41
+ (0, inversify_1.injectable)()
42
+ ], MetricsElectronTokenValidator);
43
+ exports.MetricsElectronTokenValidator = MetricsElectronTokenValidator;
44
44
  //# sourceMappingURL=electron-token-validator.js.map
@@ -1,9 +1,9 @@
1
- import { MetricsContribution } from './metrics-contribution';
2
- import { ApplicationPackage } from '@theia/core/shared/@theia/application-package';
3
- export declare class ExtensionMetricsContribution implements MetricsContribution {
4
- private metrics;
5
- protected readonly applicationPackage: ApplicationPackage;
6
- getMetrics(): string;
7
- startCollecting(): void;
8
- }
1
+ import { MetricsContribution } from './metrics-contribution';
2
+ import { ApplicationPackage } from '@theia/core/shared/@theia/application-package';
3
+ export declare class ExtensionMetricsContribution implements MetricsContribution {
4
+ private metrics;
5
+ protected readonly applicationPackage: ApplicationPackage;
6
+ getMetrics(): string;
7
+ startCollecting(): void;
8
+ }
9
9
  //# sourceMappingURL=extensions-metrics-contribution.d.ts.map