@nodeswork/kiws
Advanced tools
Comparing version 0.0.4 to 0.0.5
export * from './service.handler'; | ||
export * from './service.stats'; | ||
export * from './service.stats.handler'; |
@@ -7,3 +7,5 @@ "use strict"; | ||
__export(require("./service.handler")); | ||
__export(require("./service.stats")); | ||
__export(require("./service.stats.handler")); | ||
//# sourceMappingURL=index.js.map |
@@ -6,6 +6,2 @@ import { ModuleService } from '../providers'; | ||
constructor(modules: ModuleService); | ||
stats(): Promise<{ | ||
stats: string; | ||
externalAccess: boolean; | ||
}>; | ||
structure(): { | ||
@@ -12,0 +8,0 @@ providers: InjectionMetadata[]; |
@@ -12,3 +12,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const request = require("request-promise"); | ||
const handler_1 = require("../handler"); | ||
@@ -20,15 +19,2 @@ const providers_1 = require("../providers"); | ||
} | ||
async stats() { | ||
let externalAccess = false; | ||
try { | ||
await request.get('http://www.google.com'); | ||
externalAccess = true; | ||
} | ||
catch (e) { | ||
} | ||
return { | ||
stats: 'ok', | ||
externalAccess, | ||
}; | ||
} | ||
structure() { | ||
@@ -41,8 +27,2 @@ return { | ||
__decorate([ | ||
handler_1.Endpoint({ path: '/sstats' }), | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", []), | ||
__metadata("design:returntype", Promise) | ||
], ServiceHandler.prototype, "stats", null); | ||
__decorate([ | ||
handler_1.Endpoint({ path: '/sstruct' }), | ||
@@ -49,0 +29,0 @@ __metadata("design:type", Function), |
export * from './bootstrap'; | ||
export * from './handler'; | ||
export * from './handlers'; | ||
export * from './injection'; | ||
@@ -4,0 +5,0 @@ export * from './input'; |
@@ -8,2 +8,3 @@ "use strict"; | ||
__export(require("./handler")); | ||
__export(require("./handlers")); | ||
__export(require("./injection")); | ||
@@ -10,0 +11,0 @@ __export(require("./input")); |
@@ -34,2 +34,3 @@ "use strict"; | ||
handlers_1.ServiceHandler, | ||
handlers_1.ServiceStatsHandler, | ||
], | ||
@@ -43,2 +44,7 @@ inputs: [ | ||
providers_1.KoaService, | ||
{ | ||
provide: handlers_1.SERVICE_STATS_PROVIDER, | ||
useClass: handlers_1.ServiceHealthStats, | ||
multi: true, | ||
}, | ||
], | ||
@@ -45,0 +51,0 @@ }), |
{ | ||
"name": "@nodeswork/kiws", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Koa-based Injectable Web Service", | ||
@@ -32,2 +32,4 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@types/mocha": "^2.2.43", | ||
"@types/should": "^11.2.0", | ||
"gulp": "^3.9.1", | ||
@@ -38,2 +40,3 @@ "gulp-typescript": "^3.2.2", | ||
"source-map-support": "^0.4.18", | ||
"ts-node": "^3.3.0", | ||
"typescript": "^2.5.2" | ||
@@ -40,0 +43,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
109969
69
1160
9