@haneinfo/health-check 3.0.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/LICENSE +14 -0
- package/dist/frontend/index.d.ts +2 -0
- package/dist/frontend/index.d.ts.map +1 -0
- package/dist/frontend/index.js +6 -0
- package/dist/frontend/index.js.map +1 -0
- package/dist/frontend.d.ts +2 -0
- package/dist/frontend.d.ts.map +1 -0
- package/dist/frontend.js +18 -0
- package/dist/frontend.js.map +1 -0
- package/dist/health.controller.d.ts +10 -0
- package/dist/health.controller.d.ts.map +1 -0
- package/dist/health.controller.js +44 -0
- package/dist/health.controller.js.map +1 -0
- package/dist/health.module.d.ts +3 -0
- package/dist/health.module.d.ts.map +1 -0
- package/dist/health.module.js +23 -0
- package/dist/health.module.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin-catalog.controller.d.ts +52 -0
- package/dist/plugin-catalog.controller.d.ts.map +1 -0
- package/dist/plugin-catalog.controller.js +56 -0
- package/dist/plugin-catalog.controller.js.map +1 -0
- package/dist/plugin.d.ts +28 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +96 -0
- package/dist/plugin.js.map +1 -0
- package/haneinfo.plugin.json +57 -0
- package/package.json +84 -0
- package/plugin.d.ts +2 -0
- package/plugin.js +4 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Copyright (c) 2026 Haneinfo. All Rights Reserved.
|
|
2
|
+
|
|
3
|
+
This software and associated documentation files (the "Software") are the proprietary and
|
|
4
|
+
confidential property of Haneinfo. No part of the Software may be copied, modified, merged,
|
|
5
|
+
published, distributed, sublicensed, or sold without the prior written permission of Haneinfo.
|
|
6
|
+
|
|
7
|
+
The Software is provided for internal use by Haneinfo and its authorized personnel only, and is
|
|
8
|
+
NOT licensed for external distribution or open-source use.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
|
|
11
|
+
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
12
|
+
NONINFRINGEMENT. IN NO EVENT SHALL HANEINFO BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
13
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
|
|
14
|
+
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/frontend/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,kBAAkB,EAClB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,YAAY,GAClB,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PluginCatalogTable = void 0;
|
|
4
|
+
var frontend_shell_1 = require("@haneinfo/frontend-shell");
|
|
5
|
+
Object.defineProperty(exports, "PluginCatalogTable", { enumerable: true, get: function () { return frontend_shell_1.PluginCatalogTable; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/frontend/index.ts"],"names":[],"mappings":";;;AAAA,2DAQkC;AAJhC,oHAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../src/frontend.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
package/dist/frontend.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./frontend/index.js"), exports);
|
|
18
|
+
//# sourceMappingURL=frontend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontend.js","sourceRoot":"","sources":["../src/frontend.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PrismaService } from '@haneinfo/common';
|
|
2
|
+
import { HealthCheckService, PrismaHealthIndicator } from '@nestjs/terminus';
|
|
3
|
+
export declare class HealthController {
|
|
4
|
+
private health;
|
|
5
|
+
private prisma;
|
|
6
|
+
private prismaService;
|
|
7
|
+
constructor(health: HealthCheckService, prisma: PrismaHealthIndicator, prismaService: PrismaService);
|
|
8
|
+
check(): Promise<import("@nestjs/terminus").HealthCheckResult<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>> & import("@nestjs/terminus").HealthIndicatorResult<"database">, Partial<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>> & import("@nestjs/terminus").HealthIndicatorResult<"database">> | undefined, Partial<import("@nestjs/terminus").HealthIndicatorResult<string, import("@nestjs/terminus").HealthIndicatorStatus, Record<string, any>> & import("@nestjs/terminus").HealthIndicatorResult<"database">> | undefined>>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=health.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.controller.d.ts","sourceRoot":"","sources":["../src/health.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAe,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAI1F,qBACa,gBAAgB;IAEzB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,aAAa;gBAFb,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,qBAAqB,EAC7B,aAAa,EAAE,aAAa;IAKtC,KAAK;CAON"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.HealthController = void 0;
|
|
13
|
+
const common_1 = require("@haneinfo/common");
|
|
14
|
+
const common_2 = require("@nestjs/common");
|
|
15
|
+
const terminus_1 = require("@nestjs/terminus");
|
|
16
|
+
let HealthController = class HealthController {
|
|
17
|
+
constructor(health, prisma, prismaService) {
|
|
18
|
+
this.health = health;
|
|
19
|
+
this.prisma = prisma;
|
|
20
|
+
this.prismaService = prismaService;
|
|
21
|
+
}
|
|
22
|
+
check() {
|
|
23
|
+
return this.health.check([
|
|
24
|
+
// PrismaService delegates to the consuming app's generated client, while Terminus keeps
|
|
25
|
+
// its compatible structural client union private. Keep the cast at this adapter boundary.
|
|
26
|
+
() => this.prisma.pingCheck('database', this.prismaService),
|
|
27
|
+
]);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.HealthController = HealthController;
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, common_2.Get)(),
|
|
33
|
+
(0, terminus_1.HealthCheck)(),
|
|
34
|
+
__metadata("design:type", Function),
|
|
35
|
+
__metadata("design:paramtypes", []),
|
|
36
|
+
__metadata("design:returntype", void 0)
|
|
37
|
+
], HealthController.prototype, "check", null);
|
|
38
|
+
exports.HealthController = HealthController = __decorate([
|
|
39
|
+
(0, common_2.Controller)('health'),
|
|
40
|
+
__metadata("design:paramtypes", [terminus_1.HealthCheckService,
|
|
41
|
+
terminus_1.PrismaHealthIndicator,
|
|
42
|
+
common_1.PrismaService])
|
|
43
|
+
], HealthController);
|
|
44
|
+
//# sourceMappingURL=health.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.controller.js","sourceRoot":"","sources":["../src/health.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAiD;AACjD,2CAAiD;AACjD,+CAA0F;AAKnF,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YACU,MAA0B,EAC1B,MAA6B,EAC7B,aAA4B;QAF5B,WAAM,GAAN,MAAM,CAAoB;QAC1B,WAAM,GAAN,MAAM,CAAuB;QAC7B,kBAAa,GAAb,aAAa,CAAe;IACnC,CAAC;IAIJ,KAAK;QACH,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;YACvB,wFAAwF;YACxF,0FAA0F;YAC1F,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,aAA4C,CAAC;SAC3F,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAhBY,4CAAgB;AAS3B;IAFC,IAAA,YAAG,GAAE;IACL,IAAA,sBAAW,GAAE;;;;6CAOb;2BAfU,gBAAgB;IAD5B,IAAA,mBAAU,EAAC,QAAQ,CAAC;qCAGD,6BAAkB;QAClB,gCAAqB;QACd,sBAAa;GAJ3B,gBAAgB,CAgB5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.module.d.ts","sourceRoot":"","sources":["../src/health.module.ts"],"names":[],"mappings":"AAKA,qBAIa,YAAY;CAAG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.HealthModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const terminus_1 = require("@nestjs/terminus");
|
|
12
|
+
const health_controller_1 = require("./health.controller");
|
|
13
|
+
const plugin_catalog_controller_1 = require("./plugin-catalog.controller");
|
|
14
|
+
let HealthModule = class HealthModule {
|
|
15
|
+
};
|
|
16
|
+
exports.HealthModule = HealthModule;
|
|
17
|
+
exports.HealthModule = HealthModule = __decorate([
|
|
18
|
+
(0, common_1.Module)({
|
|
19
|
+
imports: [terminus_1.TerminusModule],
|
|
20
|
+
controllers: [health_controller_1.HealthController, plugin_catalog_controller_1.PluginCatalogController],
|
|
21
|
+
})
|
|
22
|
+
], HealthModule);
|
|
23
|
+
//# sourceMappingURL=health.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.module.js","sourceRoot":"","sources":["../src/health.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAClD,2DAAuD;AACvD,2EAAsE;AAM/D,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IAJxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,yBAAc,CAAC;QACzB,WAAW,EAAE,CAAC,oCAAgB,EAAE,mDAAuB,CAAC;KACzD,CAAC;GACW,YAAY,CAAG"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./health.controller"), exports);
|
|
18
|
+
__exportStar(require("./health.module"), exports);
|
|
19
|
+
__exportStar(require("./plugin-catalog.controller"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,kDAAgC;AAChC,8DAA4C"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { HaneinfoPluginHost } from '@haneinfo/plugin-host-nest';
|
|
2
|
+
/**
|
|
3
|
+
* Controller exposing the plugin catalog and runtime diagnostics to administrators.
|
|
4
|
+
*
|
|
5
|
+
* Protected with InteractiveAuthGuard and SystemAdminGuard so non-administrators
|
|
6
|
+
* receive 403 Forbidden.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PluginCatalogController {
|
|
9
|
+
private readonly host?;
|
|
10
|
+
constructor(host?: HaneinfoPluginHost | undefined);
|
|
11
|
+
getCatalog(): {
|
|
12
|
+
outcome: import("@haneinfo/plugin-api").HostBootOutcome;
|
|
13
|
+
order: string[];
|
|
14
|
+
shutdownOrder: string[];
|
|
15
|
+
resolutionDigest: string;
|
|
16
|
+
authenticationStrategies: {
|
|
17
|
+
id: string;
|
|
18
|
+
kind: import("@haneinfo/plugin-host-nest").AuthStrategyKind;
|
|
19
|
+
}[];
|
|
20
|
+
hostCapabilities: string[];
|
|
21
|
+
plugins: {
|
|
22
|
+
key: string;
|
|
23
|
+
pluginId: string;
|
|
24
|
+
instanceId: string;
|
|
25
|
+
package: string;
|
|
26
|
+
digest: string;
|
|
27
|
+
status: import("@haneinfo/plugin-api").PluginInstanceStatus;
|
|
28
|
+
required: boolean;
|
|
29
|
+
provides: string[];
|
|
30
|
+
requires: string[];
|
|
31
|
+
unresolvedOptional: string[];
|
|
32
|
+
startupMs: number;
|
|
33
|
+
error: string | undefined;
|
|
34
|
+
config: unknown;
|
|
35
|
+
}[];
|
|
36
|
+
disabled: {
|
|
37
|
+
key: string;
|
|
38
|
+
pluginId: string;
|
|
39
|
+
instanceId: string;
|
|
40
|
+
packageName: string;
|
|
41
|
+
}[];
|
|
42
|
+
} | {
|
|
43
|
+
outcome: string;
|
|
44
|
+
order: never[];
|
|
45
|
+
shutdownOrder: never[];
|
|
46
|
+
resolutionDigest: string;
|
|
47
|
+
plugins: never[];
|
|
48
|
+
authenticationStrategies: never[];
|
|
49
|
+
hostCapabilities: never[];
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=plugin-catalog.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-catalog.controller.d.ts","sourceRoot":"","sources":["../src/plugin-catalog.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAGnB,MAAM,4BAA4B,CAAC;AAGpC;;;;;GAKG;AACH,qBAEa,uBAAuB;IACV,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAAL,IAAI,CAAC,EAAE,kBAAkB,YAAA;IAGlE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcX"}
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.PluginCatalogController = void 0;
|
|
16
|
+
const plugin_host_nest_1 = require("@haneinfo/plugin-host-nest");
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
/**
|
|
19
|
+
* Controller exposing the plugin catalog and runtime diagnostics to administrators.
|
|
20
|
+
*
|
|
21
|
+
* Protected with InteractiveAuthGuard and SystemAdminGuard so non-administrators
|
|
22
|
+
* receive 403 Forbidden.
|
|
23
|
+
*/
|
|
24
|
+
let PluginCatalogController = class PluginCatalogController {
|
|
25
|
+
constructor(host) {
|
|
26
|
+
this.host = host;
|
|
27
|
+
}
|
|
28
|
+
getCatalog() {
|
|
29
|
+
if (!this.host) {
|
|
30
|
+
return {
|
|
31
|
+
outcome: 'ready',
|
|
32
|
+
order: [],
|
|
33
|
+
shutdownOrder: [],
|
|
34
|
+
resolutionDigest: '',
|
|
35
|
+
plugins: [],
|
|
36
|
+
authenticationStrategies: [],
|
|
37
|
+
hostCapabilities: [],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return this.host.describe();
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.PluginCatalogController = PluginCatalogController;
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, common_1.Get)(),
|
|
46
|
+
__metadata("design:type", Function),
|
|
47
|
+
__metadata("design:paramtypes", []),
|
|
48
|
+
__metadata("design:returntype", void 0)
|
|
49
|
+
], PluginCatalogController.prototype, "getCatalog", null);
|
|
50
|
+
exports.PluginCatalogController = PluginCatalogController = __decorate([
|
|
51
|
+
(0, common_1.Controller)('admin/plugins'),
|
|
52
|
+
(0, common_1.UseGuards)(plugin_host_nest_1.InteractiveAuthGuard, plugin_host_nest_1.SystemAdminGuard),
|
|
53
|
+
__param(0, (0, common_1.Optional)()),
|
|
54
|
+
__metadata("design:paramtypes", [plugin_host_nest_1.HaneinfoPluginHost])
|
|
55
|
+
], PluginCatalogController);
|
|
56
|
+
//# sourceMappingURL=plugin-catalog.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-catalog.controller.js","sourceRoot":"","sources":["../src/plugin-catalog.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iEAIoC;AACpC,2CAAsE;AAEtE;;;;;GAKG;AAGI,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAAyC,IAAyB;QAAzB,SAAI,GAAJ,IAAI,CAAqB;IAAG,CAAC;IAGtE,UAAU;QACR,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,OAAO;gBAChB,KAAK,EAAE,EAAE;gBACT,aAAa,EAAE,EAAE;gBACjB,gBAAgB,EAAE,EAAE;gBACpB,OAAO,EAAE,EAAE;gBACX,wBAAwB,EAAE,EAAE;gBAC5B,gBAAgB,EAAE,EAAE;aACrB,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;CACF,CAAA;AAlBY,0DAAuB;AAIlC;IADC,IAAA,YAAG,GAAE;;;;yDAcL;kCAjBU,uBAAuB;IAFnC,IAAA,mBAAU,EAAC,eAAe,CAAC;IAC3B,IAAA,kBAAS,EAAC,uCAAoB,EAAE,mCAAgB,CAAC;IAEnC,WAAA,IAAA,iBAAQ,GAAE,CAAA;qCAAyB,qCAAkB;GADvD,uBAAuB,CAkBnC"}
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@haneinfo/health-check/plugin` — the runtime half of the plugin contract (PL1-08).
|
|
3
|
+
*
|
|
4
|
+
* First pilot of the 051 migration: the smallest possible shape (one controller, one health
|
|
5
|
+
* contribution, no Prisma models, no config). Extended in Phase 3 (PL3-10) to declare the
|
|
6
|
+
* plugin catalog and health admin page contribution.
|
|
7
|
+
*/
|
|
8
|
+
import { type PluginManifestV1 } from '@haneinfo/plugin-api';
|
|
9
|
+
import { HealthModule } from './health.module';
|
|
10
|
+
/**
|
|
11
|
+
* Mirrors `haneinfo.plugin.json` at the package root.
|
|
12
|
+
*
|
|
13
|
+
* Two copies, one enforced truth: the JSON is what a CLI or the loader reads *without executing
|
|
14
|
+
* package code* (051 plan section 9), and this constant is what `definePlugin()` type-checks
|
|
15
|
+
* against. `plugin.spec.ts` fails the build if they ever differ, so the duplication cannot drift.
|
|
16
|
+
*/
|
|
17
|
+
export declare const healthCheckManifest: PluginManifestV1;
|
|
18
|
+
/**
|
|
19
|
+
* The plugin descriptor. `healthCheckPlugin()` matches the `plugin()` naming 051 plan section 5.1
|
|
20
|
+
* fixes for capability factories; the constant is exported too so a preset can list descriptors
|
|
21
|
+
* without calling anything.
|
|
22
|
+
*/
|
|
23
|
+
export declare const healthCheckPlugin: import("@haneinfo/plugin-api").DefinedPlugin<unknown, typeof HealthModule>;
|
|
24
|
+
export declare function healthCheck(): import("@haneinfo/plugin-api").DefinedPlugin<unknown, typeof HealthModule>;
|
|
25
|
+
export { HealthController } from './health.controller';
|
|
26
|
+
export { HealthModule } from './health.module';
|
|
27
|
+
export { PluginCatalogController } from './plugin-catalog.controller';
|
|
28
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,gBAwDjC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,4EAG5B,CAAC;AAEH,wBAAgB,WAAW,+EAE1B;AAED,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* `@haneinfo/health-check/plugin` — the runtime half of the plugin contract (PL1-08).
|
|
4
|
+
*
|
|
5
|
+
* First pilot of the 051 migration: the smallest possible shape (one controller, one health
|
|
6
|
+
* contribution, no Prisma models, no config). Extended in Phase 3 (PL3-10) to declare the
|
|
7
|
+
* plugin catalog and health admin page contribution.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.PluginCatalogController = exports.HealthModule = exports.HealthController = exports.healthCheckPlugin = exports.healthCheckManifest = void 0;
|
|
11
|
+
exports.healthCheck = healthCheck;
|
|
12
|
+
const plugin_api_1 = require("@haneinfo/plugin-api");
|
|
13
|
+
const health_module_1 = require("./health.module");
|
|
14
|
+
/**
|
|
15
|
+
* Mirrors `haneinfo.plugin.json` at the package root.
|
|
16
|
+
*
|
|
17
|
+
* Two copies, one enforced truth: the JSON is what a CLI or the loader reads *without executing
|
|
18
|
+
* package code* (051 plan section 9), and this constant is what `definePlugin()` type-checks
|
|
19
|
+
* against. `plugin.spec.ts` fails the build if they ever differ, so the duplication cannot drift.
|
|
20
|
+
*/
|
|
21
|
+
exports.healthCheckManifest = {
|
|
22
|
+
schemaVersion: 'haneinfo.plugin/v1',
|
|
23
|
+
id: 'health-check',
|
|
24
|
+
displayName: 'Health Check',
|
|
25
|
+
cardinality: 'singleton',
|
|
26
|
+
distribution: 'official',
|
|
27
|
+
engine: {
|
|
28
|
+
haneinfoPluginApi: '^1.0.0',
|
|
29
|
+
node: '>=22.0.0',
|
|
30
|
+
frameworks: {
|
|
31
|
+
'@nestjs/common': '^11.0.5',
|
|
32
|
+
'@nestjs/core': '^11.0.5',
|
|
33
|
+
'@prisma/client': '^6.2.0',
|
|
34
|
+
react: '^19.2.7',
|
|
35
|
+
'react-dom': '^19.2.7',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
provides: ['haneinfo.health-indicator'],
|
|
39
|
+
requires: ['haneinfo.prisma'],
|
|
40
|
+
facets: {
|
|
41
|
+
backend: {
|
|
42
|
+
modulePath: './dist/health.module.js',
|
|
43
|
+
exportName: 'HealthModule',
|
|
44
|
+
controllerRoutes: ['health', 'admin/plugins'],
|
|
45
|
+
},
|
|
46
|
+
frontend: {
|
|
47
|
+
adminPages: [
|
|
48
|
+
{
|
|
49
|
+
id: 'plugins',
|
|
50
|
+
routePath: '/dashboard/plugins',
|
|
51
|
+
title: 'Plugins',
|
|
52
|
+
componentExport: 'PluginCatalogTable',
|
|
53
|
+
order: 50,
|
|
54
|
+
requiredPermission: 'plugin:catalog:read',
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
navigationItems: [
|
|
58
|
+
{
|
|
59
|
+
id: 'plugins',
|
|
60
|
+
title: 'Plugins',
|
|
61
|
+
href: '/dashboard/plugins',
|
|
62
|
+
icon: 'Puzzle',
|
|
63
|
+
order: 50,
|
|
64
|
+
requiredPermission: 'plugin:catalog:read',
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
i18nNamespace: 'health-check',
|
|
68
|
+
clientEntry: './dist/frontend.js',
|
|
69
|
+
},
|
|
70
|
+
operations: {
|
|
71
|
+
healthIndicatorId: 'health-check',
|
|
72
|
+
},
|
|
73
|
+
permissions: {
|
|
74
|
+
definitions: ['plugin:catalog:read'],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* The plugin descriptor. `healthCheckPlugin()` matches the `plugin()` naming 051 plan section 5.1
|
|
80
|
+
* fixes for capability factories; the constant is exported too so a preset can list descriptors
|
|
81
|
+
* without calling anything.
|
|
82
|
+
*/
|
|
83
|
+
exports.healthCheckPlugin = (0, plugin_api_1.definePlugin)({
|
|
84
|
+
manifest: exports.healthCheckManifest,
|
|
85
|
+
backend: () => health_module_1.HealthModule,
|
|
86
|
+
});
|
|
87
|
+
function healthCheck() {
|
|
88
|
+
return exports.healthCheckPlugin;
|
|
89
|
+
}
|
|
90
|
+
var health_controller_1 = require("./health.controller");
|
|
91
|
+
Object.defineProperty(exports, "HealthController", { enumerable: true, get: function () { return health_controller_1.HealthController; } });
|
|
92
|
+
var health_module_2 = require("./health.module");
|
|
93
|
+
Object.defineProperty(exports, "HealthModule", { enumerable: true, get: function () { return health_module_2.HealthModule; } });
|
|
94
|
+
var plugin_catalog_controller_1 = require("./plugin-catalog.controller");
|
|
95
|
+
Object.defineProperty(exports, "PluginCatalogController", { enumerable: true, get: function () { return plugin_catalog_controller_1.PluginCatalogController; } });
|
|
96
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAgFH,kCAEC;AAhFD,qDAA2E;AAC3E,mDAA+C;AAE/C;;;;;;GAMG;AACU,QAAA,mBAAmB,GAAqB;IACnD,aAAa,EAAE,oBAAoB;IACnC,EAAE,EAAE,cAAc;IAClB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,WAAW;IACxB,YAAY,EAAE,UAAU;IACxB,MAAM,EAAE;QACN,iBAAiB,EAAE,QAAQ;QAC3B,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE;YACV,gBAAgB,EAAE,SAAS;YAC3B,cAAc,EAAE,SAAS;YACzB,gBAAgB,EAAE,QAAQ;YAC1B,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,SAAS;SACvB;KACF;IACD,QAAQ,EAAE,CAAC,2BAA2B,CAAC;IACvC,QAAQ,EAAE,CAAC,iBAAiB,CAAC;IAC7B,MAAM,EAAE;QACN,OAAO,EAAE;YACP,UAAU,EAAE,yBAAyB;YACrC,UAAU,EAAE,cAAc;YAC1B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC;SAC9C;QACD,QAAQ,EAAE;YACR,UAAU,EAAE;gBACV;oBACE,EAAE,EAAE,SAAS;oBACb,SAAS,EAAE,oBAAoB;oBAC/B,KAAK,EAAE,SAAS;oBAChB,eAAe,EAAE,oBAAoB;oBACrC,KAAK,EAAE,EAAE;oBACT,kBAAkB,EAAE,qBAAqB;iBAC1C;aACF;YACD,eAAe,EAAE;gBACf;oBACE,EAAE,EAAE,SAAS;oBACb,KAAK,EAAE,SAAS;oBAChB,IAAI,EAAE,oBAAoB;oBAC1B,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,EAAE;oBACT,kBAAkB,EAAE,qBAAqB;iBAC1C;aACF;YACD,aAAa,EAAE,cAAc;YAC7B,WAAW,EAAE,oBAAoB;SAClC;QACD,UAAU,EAAE;YACV,iBAAiB,EAAE,cAAc;SAClC;QACD,WAAW,EAAE;YACX,WAAW,EAAE,CAAC,qBAAqB,CAAC;SACrC;KACF;CACF,CAAC;AAEF;;;;GAIG;AACU,QAAA,iBAAiB,GAAG,IAAA,yBAAY,EAAC;IAC5C,QAAQ,EAAE,2BAAmB;IAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,4BAAY;CAC5B,CAAC,CAAC;AAEH,SAAgB,WAAW;IACzB,OAAO,yBAAiB,CAAC;AAC3B,CAAC;AAED,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,yEAAsE;AAA7D,oIAAA,uBAAuB,OAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "haneinfo.plugin/v1",
|
|
3
|
+
"id": "health-check",
|
|
4
|
+
"displayName": "Health Check",
|
|
5
|
+
"cardinality": "singleton",
|
|
6
|
+
"distribution": "official",
|
|
7
|
+
"engine": {
|
|
8
|
+
"haneinfoPluginApi": "^1.0.0",
|
|
9
|
+
"node": ">=22.0.0",
|
|
10
|
+
"frameworks": {
|
|
11
|
+
"@nestjs/common": "^11.0.5",
|
|
12
|
+
"@nestjs/core": "^11.0.5",
|
|
13
|
+
"@prisma/client": "^6.2.0",
|
|
14
|
+
"react": "^19.2.7",
|
|
15
|
+
"react-dom": "^19.2.7"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"provides": ["haneinfo.health-indicator"],
|
|
19
|
+
"requires": ["haneinfo.prisma"],
|
|
20
|
+
"facets": {
|
|
21
|
+
"backend": {
|
|
22
|
+
"modulePath": "./dist/health.module.js",
|
|
23
|
+
"exportName": "HealthModule",
|
|
24
|
+
"controllerRoutes": ["health", "admin/plugins"]
|
|
25
|
+
},
|
|
26
|
+
"frontend": {
|
|
27
|
+
"adminPages": [
|
|
28
|
+
{
|
|
29
|
+
"id": "plugins",
|
|
30
|
+
"routePath": "/dashboard/plugins",
|
|
31
|
+
"title": "Plugins",
|
|
32
|
+
"componentExport": "PluginCatalogTable",
|
|
33
|
+
"order": 50,
|
|
34
|
+
"requiredPermission": "plugin:catalog:read"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"navigationItems": [
|
|
38
|
+
{
|
|
39
|
+
"id": "plugins",
|
|
40
|
+
"title": "Plugins",
|
|
41
|
+
"href": "/dashboard/plugins",
|
|
42
|
+
"icon": "Puzzle",
|
|
43
|
+
"order": 50,
|
|
44
|
+
"requiredPermission": "plugin:catalog:read"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"i18nNamespace": "health-check",
|
|
48
|
+
"clientEntry": "./dist/frontend.js"
|
|
49
|
+
},
|
|
50
|
+
"operations": {
|
|
51
|
+
"healthIndicatorId": "health-check"
|
|
52
|
+
},
|
|
53
|
+
"permissions": {
|
|
54
|
+
"definitions": ["plugin:catalog:read"]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@haneinfo/health-check",
|
|
3
|
+
"version": "3.0.4",
|
|
4
|
+
"private": false,
|
|
5
|
+
"files": [
|
|
6
|
+
"dist",
|
|
7
|
+
"haneinfo.plugin.json",
|
|
8
|
+
"plugin.js",
|
|
9
|
+
"plugin.d.ts"
|
|
10
|
+
],
|
|
11
|
+
"type": "commonjs",
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./frontend": {
|
|
20
|
+
"types": "./dist/frontend/index.d.ts",
|
|
21
|
+
"default": "./dist/frontend/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./plugin": {
|
|
24
|
+
"types": "./dist/plugin.d.ts",
|
|
25
|
+
"default": "./dist/plugin.js"
|
|
26
|
+
},
|
|
27
|
+
"./haneinfo.plugin.json": "./haneinfo.plugin.json",
|
|
28
|
+
"./package.json": "./package.json"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@haneinfo/common": "0.3.4",
|
|
32
|
+
"@haneinfo/frontend-shell": "1.2.0",
|
|
33
|
+
"@haneinfo/plugin-host-nest": "2.0.0",
|
|
34
|
+
"@haneinfo/plugin-api": "1.4.0"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"@haneinfo/frontend-shell": "^1.1.0",
|
|
38
|
+
"@haneinfo/plugin-host-nest": "^2.0.0",
|
|
39
|
+
"@nestjs/common": "^11.0.5",
|
|
40
|
+
"@nestjs/core": "^11.0.5",
|
|
41
|
+
"@nestjs/terminus": "^11.1.1",
|
|
42
|
+
"@prisma/client": "^6.2.0",
|
|
43
|
+
"react": "^19.2.7",
|
|
44
|
+
"react-dom": "^19.2.7"
|
|
45
|
+
},
|
|
46
|
+
"peerDependenciesMeta": {
|
|
47
|
+
"@haneinfo/frontend-shell": {
|
|
48
|
+
"optional": true
|
|
49
|
+
},
|
|
50
|
+
"react": {
|
|
51
|
+
"optional": true
|
|
52
|
+
},
|
|
53
|
+
"react-dom": {
|
|
54
|
+
"optional": true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@nestjs/common": "^11.0.0",
|
|
59
|
+
"@nestjs/core": "^11.0.0",
|
|
60
|
+
"@nestjs/terminus": "^11.1.1",
|
|
61
|
+
"@prisma/client": "^6.19.0",
|
|
62
|
+
"@types/node": "^24.13.0",
|
|
63
|
+
"@types/react": "^19.2.17",
|
|
64
|
+
"@types/react-dom": "^19.2.3",
|
|
65
|
+
"react": "^19.2.7",
|
|
66
|
+
"react-dom": "^19.2.7",
|
|
67
|
+
"typescript": "^5.9.3",
|
|
68
|
+
"vitest": "^4.1.11",
|
|
69
|
+
"@haneinfo/plugin-testkit": "2.2.0",
|
|
70
|
+
"@haneinfo/frontend-shell": "1.2.0",
|
|
71
|
+
"@haneinfo/plugin-host-nest": "2.0.0"
|
|
72
|
+
},
|
|
73
|
+
"license": "UNLICENSED",
|
|
74
|
+
"publishConfig": {
|
|
75
|
+
"registry": "https://registry.npmjs.org/",
|
|
76
|
+
"access": "public"
|
|
77
|
+
},
|
|
78
|
+
"scripts": {
|
|
79
|
+
"build": "tsc -p tsconfig.build.json",
|
|
80
|
+
"dev": "tsc -p tsconfig.build.json --watch",
|
|
81
|
+
"test": "vitest run",
|
|
82
|
+
"typecheck": "tsc --noEmit"
|
|
83
|
+
}
|
|
84
|
+
}
|
package/plugin.d.ts
ADDED
package/plugin.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// Compatibility shim for consumers whose TypeScript config uses "classic"/"node10"
|
|
2
|
+
// moduleResolution, which resolves `@haneinfo/health-check/plugin` by looking for a real file at
|
|
3
|
+
// the package root — it does not consult package.json's "exports" map at all.
|
|
4
|
+
module.exports = require('./dist/plugin');
|