@spinajs/reflection
Advanced tools
Comparing version 2.0.278 to 2.0.279
@@ -164,18 +164,23 @@ "use strict"; | ||
const type = fTypes[`${nameToResolve}`]; | ||
if (type.prototype instanceof di_1.AsyncService) { | ||
return di_1.DI.resolve(type).then((instance) => { | ||
return { | ||
file: f, | ||
instance, | ||
name: nameToResolve, | ||
type, | ||
}; | ||
try { | ||
if (type.prototype instanceof di_1.AsyncService) { | ||
return di_1.DI.resolve(type).then((instance) => { | ||
return { | ||
file: f, | ||
instance, | ||
name: nameToResolve, | ||
type, | ||
}; | ||
}); | ||
} | ||
return Promise.resolve({ | ||
file: f, | ||
instance: di_1.DI.resolve(type), | ||
name: nameToResolve, | ||
type, | ||
}); | ||
} | ||
return Promise.resolve({ | ||
file: f, | ||
instance: di_1.DI.resolve(type), | ||
name: nameToResolve, | ||
type, | ||
}); | ||
catch (err) { | ||
logger.error(err, `Cannot resolve type ${type.name} from file ${f}`); | ||
} | ||
} | ||
@@ -182,0 +187,0 @@ }); |
@@ -129,18 +129,23 @@ import * as fs from 'fs'; | ||
const type = fTypes[`${nameToResolve}`]; | ||
if (type.prototype instanceof AsyncService) { | ||
return DI.resolve(type).then((instance) => { | ||
return { | ||
file: f, | ||
instance, | ||
name: nameToResolve, | ||
type, | ||
}; | ||
try { | ||
if (type.prototype instanceof AsyncService) { | ||
return DI.resolve(type).then((instance) => { | ||
return { | ||
file: f, | ||
instance, | ||
name: nameToResolve, | ||
type, | ||
}; | ||
}); | ||
} | ||
return Promise.resolve({ | ||
file: f, | ||
instance: DI.resolve(type), | ||
name: nameToResolve, | ||
type, | ||
}); | ||
} | ||
return Promise.resolve({ | ||
file: f, | ||
instance: DI.resolve(type), | ||
name: nameToResolve, | ||
type, | ||
}); | ||
catch (err) { | ||
logger.error(err, `Cannot resolve type ${type.name} from file ${f}`); | ||
} | ||
} | ||
@@ -147,0 +152,0 @@ }); |
{ | ||
"name": "@spinajs/reflection", | ||
"version": "2.0.278", | ||
"version": "2.0.279", | ||
"description": "SpinaJS reflection helpers", | ||
@@ -46,6 +46,6 @@ "main": "lib/cjs/index.js", | ||
"dependencies": { | ||
"@spinajs/configuration": "^2.0.278", | ||
"@spinajs/di": "^2.0.278", | ||
"@spinajs/exceptions": "^2.0.278", | ||
"@spinajs/log": "^2.0.278", | ||
"@spinajs/configuration": "^2.0.279", | ||
"@spinajs/di": "^2.0.279", | ||
"@spinajs/exceptions": "^2.0.279", | ||
"@spinajs/log": "^2.0.279", | ||
"glob": "^8.1.0", | ||
@@ -52,0 +52,0 @@ "lodash": "^4.17.21", |
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
164468
441
Updated@spinajs/di@^2.0.279
Updated@spinajs/exceptions@^2.0.279
Updated@spinajs/log@^2.0.279