Comparing version 0.2.0 to 0.3.0
@@ -13,2 +13,3 @@ /** | ||
const _ = require("lodash"); | ||
const Case = require("case"); | ||
@@ -37,4 +38,10 @@ class Service { | ||
const apiName = filenames[i].substr(0, filenames[i].length - 3).toLowerCase(); | ||
this.services[apiName] = new (require(`${directory}/${filenames[i]}`))(); | ||
this.serviceClasses[apiName] = require(`${directory}/${filenames[i]}`); | ||
const apiClass = require(`${directory}/${filenames[i]}`); | ||
const apiClassInstance = new apiClass(); | ||
let apiClassName = apiClassInstance.constructor.name; | ||
apiClassName = Case.snake(apiClassName); | ||
this.services[apiClassName] = apiClassInstance; | ||
this.serviceClasses[apiClassName] = apiClass; | ||
this.logger.info(`Service \`${apiName}\` loaded.`); | ||
@@ -41,0 +48,0 @@ } |
{ | ||
"name": "akyuu", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Yet another web framework based on express.js named Akyuu.", | ||
@@ -30,2 +30,3 @@ "main": "index.js", | ||
"async": "^2.1.5", | ||
"case": "^1.5.2", | ||
"config": "^1.20.1", | ||
@@ -32,0 +33,0 @@ "debug": "^2.2.0", |
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
64639
51
1840
22
13
+ Addedcase@^1.5.2
+ Addedcase@1.6.3(transitive)