vorarbeiter
Advanced tools
Comparing version 4.0.0 to 4.1.0
@@ -79,7 +79,9 @@ export type Context = object; | ||
export declare class UnknownServiceError extends Error { | ||
readonly id: string; | ||
constructor(id: string); | ||
} | ||
export declare class ServiceCircularReferenceError extends Error { | ||
readonly id: string; | ||
readonly referenceChain: string[]; | ||
constructor(referenceChain: string[]); | ||
constructor(id: string, referenceChain: string[]); | ||
} |
@@ -22,3 +22,3 @@ "use strict"; | ||
if (this.loading.has(id)) { | ||
throw new ServiceCircularReferenceError([...this.loading.values(), id]); | ||
throw new ServiceCircularReferenceError(id, [...this.loading.values(), id]); | ||
} | ||
@@ -125,2 +125,3 @@ const definition = this.spec.get(id); | ||
super(`unknown service "${id}"`); | ||
this.id = id; | ||
this.name = "UnknownServiceError"; | ||
@@ -131,4 +132,5 @@ } | ||
class ServiceCircularReferenceError extends Error { | ||
constructor(referenceChain) { | ||
constructor(id, referenceChain) { | ||
super(`circular dependency detected: ${referenceChain.join(" -> ")}`); | ||
this.id = id; | ||
this.referenceChain = referenceChain; | ||
@@ -135,0 +137,0 @@ this.name = "ServiceCircularReferenceError"; |
{ | ||
"name": "vorarbeiter", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"homepage": "https://github.com/slavamuravey/vorarbeiter", | ||
@@ -5,0 +5,0 @@ "description": "A simple service container", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
14815
224
0
22