@spinajs/configuration
Advanced tools
Comparing version 2.0.297 to 2.0.299
@@ -17,3 +17,3 @@ import { Class } from '@spinajs/di'; | ||
*/ | ||
export declare function _service<T>(path: string, type: Class<T>): () => Promise<T>; | ||
export declare function _service<T>(path: string, type: Class<T>, options?: []): () => Promise<T>; | ||
//# sourceMappingURL=fp.d.ts.map |
@@ -26,4 +26,4 @@ "use strict"; | ||
*/ | ||
function _service(path, type) { | ||
return () => (0, util_1._chain)(_cfg(path), (0, util_1._catch)(({ service }) => (0, util_1._chain)(() => di_1.DI.getRegisteredTypes(type), (types) => types.find((t) => t.name === service), (t) => di_1.DI.resolve(t)), (err) => { | ||
function _service(path, type, options) { | ||
return () => (0, util_1._chain)(_cfg(path), (0, util_1._catch)((service) => (0, util_1._chain)(() => di_1.DI.getRegisteredTypes(type), (types) => types.find((t) => t.name === service), (t) => di_1.DI.resolve(t, options)), (err) => { | ||
throw new di_1.ResolveException(`Cannot resolve service from ${path}. Check your configuration file at this path.`, err); | ||
@@ -30,0 +30,0 @@ })); |
@@ -17,3 +17,3 @@ import { Class } from '@spinajs/di'; | ||
*/ | ||
export declare function _service<T>(path: string, type: Class<T>): () => Promise<T>; | ||
export declare function _service<T>(path: string, type: Class<T>, options?: []): () => Promise<T>; | ||
//# sourceMappingURL=fp.d.ts.map |
@@ -22,4 +22,4 @@ import { Configuration } from '@spinajs/configuration-common'; | ||
*/ | ||
export function _service(path, type) { | ||
return () => _chain(_cfg(path), _catch(({ service }) => _chain(() => DI.getRegisteredTypes(type), (types) => types.find((t) => t.name === service), (t) => DI.resolve(t)), (err) => { | ||
export function _service(path, type, options) { | ||
return () => _chain(_cfg(path), _catch((service) => _chain(() => DI.getRegisteredTypes(type), (types) => types.find((t) => t.name === service), (t) => DI.resolve(t, options)), (err) => { | ||
throw new ResolveException(`Cannot resolve service from ${path}. Check your configuration file at this path.`, err); | ||
@@ -26,0 +26,0 @@ })); |
{ | ||
"name": "@spinajs/configuration", | ||
"version": "2.0.297", | ||
"version": "2.0.299", | ||
"description": "framework configuration module", | ||
@@ -55,7 +55,7 @@ "main": "lib/cjs/index.js", | ||
"dependencies": { | ||
"@spinajs/configuration-common": "^2.0.297", | ||
"@spinajs/di": "^2.0.297", | ||
"@spinajs/exceptions": "^2.0.297", | ||
"@spinajs/internal-logger": "^2.0.297", | ||
"@spinajs/util": "2.0.297", | ||
"@spinajs/configuration-common": "^2.0.299", | ||
"@spinajs/di": "^2.0.299", | ||
"@spinajs/exceptions": "^2.0.299", | ||
"@spinajs/internal-logger": "^2.0.299", | ||
"@spinajs/util": "2.0.299", | ||
"ajv": "^8.12.0", | ||
@@ -62,0 +62,0 @@ "ajv-formats": "^2.1.1", |
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
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
275179
+ Added@spinajs/util@2.0.299(transitive)
- Removed@spinajs/util@2.0.297(transitive)
Updated@spinajs/di@^2.0.299
Updated@spinajs/exceptions@^2.0.299
Updated@spinajs/util@2.0.299