@minimaltech/node-infra 0.5.9-7 → 0.5.9-8
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,4 +1,5 @@
|
|
|
1
|
-
import { BaseApplication
|
|
1
|
+
import { BaseApplication } from '../../base/applications';
|
|
2
|
+
import { BaseComponent } from '../../base/base.component';
|
|
2
3
|
export declare class HealthcheckComponent extends BaseComponent {
|
|
3
4
|
protected application: BaseApplication;
|
|
4
5
|
constructor(application: BaseApplication);
|
|
@@ -14,11 +14,12 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
var HealthcheckComponent_1;
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.HealthcheckComponent = void 0;
|
|
17
|
+
const applications_1 = require("../../base/applications");
|
|
18
|
+
const base_component_1 = require("../../base/base.component");
|
|
17
19
|
const health_1 = require("@loopback/health");
|
|
18
|
-
const node_infra_1 = require("@minimaltech/node-infra");
|
|
19
20
|
const lb_core_1 = require("@minimaltech/node-infra/lb-core");
|
|
20
21
|
const lb_repo_1 = require("@minimaltech/node-infra/lb-repo");
|
|
21
|
-
let HealthcheckComponent = HealthcheckComponent_1 = class HealthcheckComponent extends
|
|
22
|
+
let HealthcheckComponent = HealthcheckComponent_1 = class HealthcheckComponent extends base_component_1.BaseComponent {
|
|
22
23
|
constructor(application) {
|
|
23
24
|
super({ scope: HealthcheckComponent_1.name });
|
|
24
25
|
this.application = application;
|
|
@@ -27,12 +28,6 @@ let HealthcheckComponent = HealthcheckComponent_1 = class HealthcheckComponent e
|
|
|
27
28
|
binding() {
|
|
28
29
|
const t = performance.now();
|
|
29
30
|
this.logger.info('[binding] START | Binding application/datasource healthcheck...!');
|
|
30
|
-
this.application.configure(health_1.HealthBindings.COMPONENT).to({
|
|
31
|
-
healthPath: '/health',
|
|
32
|
-
livePath: '/live',
|
|
33
|
-
readyPath: '/ready',
|
|
34
|
-
openApiSpec: true,
|
|
35
|
-
});
|
|
36
31
|
this.application.component(health_1.HealthComponent);
|
|
37
32
|
const dsBindings = this.application.findByTag(lb_repo_1.RepositoryTags.DATASOURCE);
|
|
38
33
|
for (const dsBinding of dsBindings) {
|
|
@@ -51,6 +46,6 @@ let HealthcheckComponent = HealthcheckComponent_1 = class HealthcheckComponent e
|
|
|
51
46
|
exports.HealthcheckComponent = HealthcheckComponent;
|
|
52
47
|
exports.HealthcheckComponent = HealthcheckComponent = HealthcheckComponent_1 = __decorate([
|
|
53
48
|
__param(0, (0, lb_core_1.inject)(lb_core_1.CoreBindings.APPLICATION_INSTANCE)),
|
|
54
|
-
__metadata("design:paramtypes", [
|
|
49
|
+
__metadata("design:paramtypes", [applications_1.BaseApplication])
|
|
55
50
|
], HealthcheckComponent);
|
|
56
51
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/components/health-check/component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA+
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/components/health-check/component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAsD;AACtD,0DAAsD;AACtD,6CAA+D;AAC/D,6DAAuE;AACvE,6DAA6E;AAE7E,IAAa,oBAAoB,4BAAjC,MAAa,oBAAqB,SAAQ,8BAAa;IACrD,YAEY,WAA4B;QAEtC,KAAK,CAAC,EAAE,KAAK,EAAE,sBAAoB,CAAC,IAAI,EAAE,CAAC,CAAC;QAFlC,gBAAW,GAAX,WAAW,CAAiB;QAGtC,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,OAAO;QACL,MAAM,CAAC,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAC;QACrF,IAAI,CAAC,WAAW,CAAC,SAAS,CAA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