@theia/metrics 1.34.3 → 1.34.4

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.
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,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
@@ -1,63 +1,63 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ExtensionMetricsContribution = void 0;
13
- // *****************************************************************************
14
- // Copyright (C) 2018 Ericsson and others.
15
- //
16
- // This program and the accompanying materials are made available under the
17
- // terms of the Eclipse Public License v. 2.0 which is available at
18
- // http://www.eclipse.org/legal/epl-2.0.
19
- //
20
- // This Source Code may also be made available under the following Secondary
21
- // Licenses when the conditions for such availability set forth in the Eclipse
22
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
23
- // with the GNU Classpath Exception which is available at
24
- // https://www.gnu.org/software/classpath/license.html.
25
- //
26
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
27
- // *****************************************************************************
28
- const inversify_1 = require("@theia/core/shared/inversify");
29
- const application_package_1 = require("@theia/core/shared/@theia/application-package");
30
- const prometheus_1 = require("./prometheus");
31
- const metricsName = 'theia_extension_version';
32
- let ExtensionMetricsContribution = class ExtensionMetricsContribution {
33
- constructor() {
34
- this.metrics = '';
35
- }
36
- getMetrics() {
37
- return this.metrics;
38
- }
39
- startCollecting() {
40
- let latestMetrics = '';
41
- const installedExtensions = this.applicationPackage.extensionPackages;
42
- latestMetrics += `# HELP ${metricsName} Theia extension version info.\n`;
43
- latestMetrics += `# TYPE ${metricsName} gauge\n`;
44
- installedExtensions.forEach(extensionInfo => {
45
- let extensionName = extensionInfo.name;
46
- if (!prometheus_1.PROMETHEUS_REGEXP.test(extensionName)) {
47
- extensionName = (0, prometheus_1.toPrometheusValidName)(extensionName);
48
- }
49
- const metricsValue = metricsName + `{extension="${extensionName}",version="${extensionInfo.version}"} 1`;
50
- latestMetrics += metricsValue + '\n';
51
- });
52
- this.metrics = latestMetrics;
53
- }
54
- };
55
- __decorate([
56
- (0, inversify_1.inject)(application_package_1.ApplicationPackage),
57
- __metadata("design:type", application_package_1.ApplicationPackage)
58
- ], ExtensionMetricsContribution.prototype, "applicationPackage", void 0);
59
- ExtensionMetricsContribution = __decorate([
60
- (0, inversify_1.injectable)()
61
- ], ExtensionMetricsContribution);
62
- exports.ExtensionMetricsContribution = ExtensionMetricsContribution;
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ExtensionMetricsContribution = void 0;
13
+ // *****************************************************************************
14
+ // Copyright (C) 2018 Ericsson and others.
15
+ //
16
+ // This program and the accompanying materials are made available under the
17
+ // terms of the Eclipse Public License v. 2.0 which is available at
18
+ // http://www.eclipse.org/legal/epl-2.0.
19
+ //
20
+ // This Source Code may also be made available under the following Secondary
21
+ // Licenses when the conditions for such availability set forth in the Eclipse
22
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
23
+ // with the GNU Classpath Exception which is available at
24
+ // https://www.gnu.org/software/classpath/license.html.
25
+ //
26
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
27
+ // *****************************************************************************
28
+ const inversify_1 = require("@theia/core/shared/inversify");
29
+ const application_package_1 = require("@theia/core/shared/@theia/application-package");
30
+ const prometheus_1 = require("./prometheus");
31
+ const metricsName = 'theia_extension_version';
32
+ let ExtensionMetricsContribution = class ExtensionMetricsContribution {
33
+ constructor() {
34
+ this.metrics = '';
35
+ }
36
+ getMetrics() {
37
+ return this.metrics;
38
+ }
39
+ startCollecting() {
40
+ let latestMetrics = '';
41
+ const installedExtensions = this.applicationPackage.extensionPackages;
42
+ latestMetrics += `# HELP ${metricsName} Theia extension version info.\n`;
43
+ latestMetrics += `# TYPE ${metricsName} gauge\n`;
44
+ installedExtensions.forEach(extensionInfo => {
45
+ let extensionName = extensionInfo.name;
46
+ if (!prometheus_1.PROMETHEUS_REGEXP.test(extensionName)) {
47
+ extensionName = (0, prometheus_1.toPrometheusValidName)(extensionName);
48
+ }
49
+ const metricsValue = metricsName + `{extension="${extensionName}",version="${extensionInfo.version}"} 1`;
50
+ latestMetrics += metricsValue + '\n';
51
+ });
52
+ this.metrics = latestMetrics;
53
+ }
54
+ };
55
+ __decorate([
56
+ (0, inversify_1.inject)(application_package_1.ApplicationPackage),
57
+ __metadata("design:type", application_package_1.ApplicationPackage)
58
+ ], ExtensionMetricsContribution.prototype, "applicationPackage", void 0);
59
+ ExtensionMetricsContribution = __decorate([
60
+ (0, inversify_1.injectable)()
61
+ ], ExtensionMetricsContribution);
62
+ exports.ExtensionMetricsContribution = ExtensionMetricsContribution;
63
63
  //# sourceMappingURL=extensions-metrics-contribution.js.map
@@ -1,6 +1,6 @@
1
- export * from './metrics-backend-application-contribution';
2
- export * from './metrics-contribution';
3
- export * from './node-metrics-contribution';
4
- export * from './extensions-metrics-contribution';
5
- export * from './prometheus';
1
+ export * from './metrics-backend-application-contribution';
2
+ export * from './metrics-contribution';
3
+ export * from './node-metrics-contribution';
4
+ export * from './extensions-metrics-contribution';
5
+ export * from './prometheus';
6
6
  //# sourceMappingURL=index.d.ts.map
package/lib/node/index.js CHANGED
@@ -1,33 +1,33 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 Ericsson 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 WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
- };
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- __exportStar(require("./metrics-backend-application-contribution"), exports);
29
- __exportStar(require("./metrics-contribution"), exports);
30
- __exportStar(require("./node-metrics-contribution"), exports);
31
- __exportStar(require("./extensions-metrics-contribution"), exports);
32
- __exportStar(require("./prometheus"), exports);
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2018 Ericsson 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 WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ __exportStar(require("./metrics-backend-application-contribution"), exports);
29
+ __exportStar(require("./metrics-contribution"), exports);
30
+ __exportStar(require("./node-metrics-contribution"), exports);
31
+ __exportStar(require("./extensions-metrics-contribution"), exports);
32
+ __exportStar(require("./prometheus"), exports);
33
33
  //# sourceMappingURL=index.js.map
@@ -1,16 +1,16 @@
1
- /// <reference types="express" />
2
- /// <reference types="node" />
3
- import * as http from 'http';
4
- import * as https from 'https';
5
- import * as express from '@theia/core/shared/express';
6
- import { ContributionProvider } from '@theia/core/lib/common';
7
- import { BackendApplicationContribution } from '@theia/core/lib/node';
8
- import { MetricsContribution } from './metrics-contribution';
9
- export declare class MetricsBackendApplicationContribution implements BackendApplicationContribution {
10
- protected readonly metricsProviders: ContributionProvider<MetricsContribution>;
11
- constructor(metricsProviders: ContributionProvider<MetricsContribution>);
12
- configure(app: express.Application): void;
13
- onStart(server: http.Server | https.Server): void;
14
- fetchMetricsFromProviders(): string;
15
- }
1
+ /// <reference types="express" />
2
+ /// <reference types="node" />
3
+ import * as http from 'http';
4
+ import * as https from 'https';
5
+ import * as express from '@theia/core/shared/express';
6
+ import { ContributionProvider } from '@theia/core/lib/common';
7
+ import { BackendApplicationContribution } from '@theia/core/lib/node';
8
+ import { MetricsContribution } from './metrics-contribution';
9
+ export declare class MetricsBackendApplicationContribution implements BackendApplicationContribution {
10
+ protected readonly metricsProviders: ContributionProvider<MetricsContribution>;
11
+ constructor(metricsProviders: ContributionProvider<MetricsContribution>);
12
+ configure(app: express.Application): void;
13
+ onStart(server: http.Server | https.Server): void;
14
+ fetchMetricsFromProviders(): string;
15
+ }
16
16
  //# sourceMappingURL=metrics-backend-application-contribution.d.ts.map
@@ -1,60 +1,60 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2017-2018 Ericsson 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 WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- var __param = (this && this.__param) || function (paramIndex, decorator) {
27
- return function (target, key) { decorator(target, key, paramIndex); }
28
- };
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.MetricsBackendApplicationContribution = void 0;
31
- const inversify_1 = require("@theia/core/shared/inversify");
32
- const common_1 = require("@theia/core/lib/common");
33
- const metrics_contribution_1 = require("./metrics-contribution");
34
- let MetricsBackendApplicationContribution = class MetricsBackendApplicationContribution {
35
- constructor(metricsProviders) {
36
- this.metricsProviders = metricsProviders;
37
- }
38
- configure(app) {
39
- app.get('/metrics', (req, res) => {
40
- const lastMetrics = this.fetchMetricsFromProviders();
41
- res.send(lastMetrics);
42
- });
43
- }
44
- onStart(server) {
45
- this.metricsProviders.getContributions().forEach(contribution => {
46
- contribution.startCollecting();
47
- });
48
- }
49
- fetchMetricsFromProviders() {
50
- return this.metricsProviders.getContributions().reduce((total, contribution) => total += contribution.getMetrics() + '\n', '');
51
- }
52
- };
53
- MetricsBackendApplicationContribution = __decorate([
54
- (0, inversify_1.injectable)(),
55
- __param(0, (0, inversify_1.inject)(common_1.ContributionProvider)),
56
- __param(0, (0, inversify_1.named)(metrics_contribution_1.MetricsContribution)),
57
- __metadata("design:paramtypes", [Object])
58
- ], MetricsBackendApplicationContribution);
59
- exports.MetricsBackendApplicationContribution = MetricsBackendApplicationContribution;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2017-2018 Ericsson 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 WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
27
+ return function (target, key) { decorator(target, key, paramIndex); }
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.MetricsBackendApplicationContribution = void 0;
31
+ const inversify_1 = require("@theia/core/shared/inversify");
32
+ const common_1 = require("@theia/core/lib/common");
33
+ const metrics_contribution_1 = require("./metrics-contribution");
34
+ let MetricsBackendApplicationContribution = class MetricsBackendApplicationContribution {
35
+ constructor(metricsProviders) {
36
+ this.metricsProviders = metricsProviders;
37
+ }
38
+ configure(app) {
39
+ app.get('/metrics', (req, res) => {
40
+ const lastMetrics = this.fetchMetricsFromProviders();
41
+ res.send(lastMetrics);
42
+ });
43
+ }
44
+ onStart(server) {
45
+ this.metricsProviders.getContributions().forEach(contribution => {
46
+ contribution.startCollecting();
47
+ });
48
+ }
49
+ fetchMetricsFromProviders() {
50
+ return this.metricsProviders.getContributions().reduce((total, contribution) => total += contribution.getMetrics() + '\n', '');
51
+ }
52
+ };
53
+ MetricsBackendApplicationContribution = __decorate([
54
+ (0, inversify_1.injectable)(),
55
+ __param(0, (0, inversify_1.inject)(common_1.ContributionProvider)),
56
+ __param(0, (0, inversify_1.named)(metrics_contribution_1.MetricsContribution)),
57
+ __metadata("design:paramtypes", [Object])
58
+ ], MetricsBackendApplicationContribution);
59
+ exports.MetricsBackendApplicationContribution = MetricsBackendApplicationContribution;
60
60
  //# sourceMappingURL=metrics-backend-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-backend-module.d.ts.map
@@ -1,31 +1,31 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2017-2018 Ericsson 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 WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const inversify_1 = require("@theia/core/shared/inversify");
19
- const node_1 = require("@theia/core/lib/node");
20
- const common_1 = require("@theia/core/lib/common");
21
- const metrics_contribution_1 = require("./metrics-contribution");
22
- const node_metrics_contribution_1 = require("./node-metrics-contribution");
23
- const extensions_metrics_contribution_1 = require("./extensions-metrics-contribution");
24
- const metrics_backend_application_contribution_1 = require("./metrics-backend-application-contribution");
25
- exports.default = new inversify_1.ContainerModule(bind => {
26
- (0, common_1.bindContributionProvider)(bind, metrics_contribution_1.MetricsContribution);
27
- bind(metrics_contribution_1.MetricsContribution).to(node_metrics_contribution_1.NodeMetricsContribution).inSingletonScope();
28
- bind(metrics_contribution_1.MetricsContribution).to(extensions_metrics_contribution_1.ExtensionMetricsContribution).inSingletonScope();
29
- bind(node_1.BackendApplicationContribution).to(metrics_backend_application_contribution_1.MetricsBackendApplicationContribution).inSingletonScope();
30
- });
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2017-2018 Ericsson 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 WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const inversify_1 = require("@theia/core/shared/inversify");
19
+ const node_1 = require("@theia/core/lib/node");
20
+ const common_1 = require("@theia/core/lib/common");
21
+ const metrics_contribution_1 = require("./metrics-contribution");
22
+ const node_metrics_contribution_1 = require("./node-metrics-contribution");
23
+ const extensions_metrics_contribution_1 = require("./extensions-metrics-contribution");
24
+ const metrics_backend_application_contribution_1 = require("./metrics-backend-application-contribution");
25
+ exports.default = new inversify_1.ContainerModule(bind => {
26
+ (0, common_1.bindContributionProvider)(bind, metrics_contribution_1.MetricsContribution);
27
+ bind(metrics_contribution_1.MetricsContribution).to(node_metrics_contribution_1.NodeMetricsContribution).inSingletonScope();
28
+ bind(metrics_contribution_1.MetricsContribution).to(extensions_metrics_contribution_1.ExtensionMetricsContribution).inSingletonScope();
29
+ bind(node_1.BackendApplicationContribution).to(metrics_backend_application_contribution_1.MetricsBackendApplicationContribution).inSingletonScope();
30
+ });
31
31
  //# sourceMappingURL=metrics-backend-module.js.map
@@ -1,6 +1,6 @@
1
- export declare const MetricsContribution: unique symbol;
2
- export interface MetricsContribution {
3
- startCollecting(): void;
4
- getMetrics(): string;
5
- }
1
+ export declare const MetricsContribution: unique symbol;
2
+ export interface MetricsContribution {
3
+ startCollecting(): void;
4
+ getMetrics(): string;
5
+ }
6
6
  //# sourceMappingURL=metrics-contribution.d.ts.map
@@ -1,20 +1,20 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MetricsContribution = void 0;
4
- // *****************************************************************************
5
- // Copyright (C) 2018 Ericsson and others.
6
- //
7
- // This program and the accompanying materials are made available under the
8
- // terms of the Eclipse Public License v. 2.0 which is available at
9
- // http://www.eclipse.org/legal/epl-2.0.
10
- //
11
- // This Source Code may also be made available under the following Secondary
12
- // Licenses when the conditions for such availability set forth in the Eclipse
13
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
14
- // with the GNU Classpath Exception which is available at
15
- // https://www.gnu.org/software/classpath/license.html.
16
- //
17
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
18
- // *****************************************************************************
19
- exports.MetricsContribution = Symbol('MetricsContribution');
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MetricsContribution = void 0;
4
+ // *****************************************************************************
5
+ // Copyright (C) 2018 Ericsson and others.
6
+ //
7
+ // This program and the accompanying materials are made available under the
8
+ // terms of the Eclipse Public License v. 2.0 which is available at
9
+ // http://www.eclipse.org/legal/epl-2.0.
10
+ //
11
+ // This Source Code may also be made available under the following Secondary
12
+ // Licenses when the conditions for such availability set forth in the Eclipse
13
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
14
+ // with the GNU Classpath Exception which is available at
15
+ // https://www.gnu.org/software/classpath/license.html.
16
+ //
17
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
18
+ // *****************************************************************************
19
+ exports.MetricsContribution = Symbol('MetricsContribution');
20
20
  //# sourceMappingURL=metrics-contribution.js.map
@@ -1,6 +1,6 @@
1
- import { MetricsContribution } from './metrics-contribution';
2
- export declare class NodeMetricsContribution implements MetricsContribution {
3
- getMetrics(): string;
4
- startCollecting(): void;
5
- }
1
+ import { MetricsContribution } from './metrics-contribution';
2
+ export declare class NodeMetricsContribution implements MetricsContribution {
3
+ getMetrics(): string;
4
+ startCollecting(): void;
5
+ }
6
6
  //# sourceMappingURL=node-metrics-contribution.d.ts.map