Comparing version 3.0.123 to 3.0.124
{ | ||
"name": "fable", | ||
"version": "3.0.123", | ||
"version": "3.0.124", | ||
"description": "Anentity behavior management and API bundling library.", | ||
@@ -5,0 +5,0 @@ "main": "source/Fable.js", |
@@ -118,3 +118,3 @@ /** | ||
// TODO: Check if any services are running? | ||
this.log.warn(`Adding a service type [${pServiceType}] that already exists.`); | ||
this.log.warn(`Adding a service type [${pServiceType}] that already exists. This will change the default class prototype for this service.`); | ||
} | ||
@@ -142,4 +142,18 @@ else | ||
} | ||
return this.serviceClasses[pServiceType]; | ||
} | ||
addServiceTypeIfNotExists(pServiceType, pServiceClass) | ||
{ | ||
if (!this.servicesMap.hasOwnProperty(pServiceType)) | ||
{ | ||
return this.addServiceType(pServiceType, pServiceClass); | ||
} | ||
else | ||
{ | ||
return this.serviceClasses[pServiceType]; | ||
} | ||
} | ||
// This is for the services that are meant to run mostly single-instance so need a default at initialization | ||
@@ -192,2 +206,14 @@ addAndInstantiateServiceType(pServiceType, pServiceClass) | ||
instantiateServiceProviderIfNotExists(pServiceType, pOptions, pCustomServiceHash) | ||
{ | ||
if (this.services.hasOwnProperty(pServiceType)) | ||
{ | ||
return this.services[pServiceType]; | ||
} | ||
else | ||
{ | ||
return this.instantiateServiceProvider(pServiceType, pOptions, pCustomServiceHash); | ||
} | ||
} | ||
// Create a service provider but don't register it to live forever in fable.services | ||
@@ -194,0 +220,0 @@ instantiateServiceProviderWithoutRegistration(pServiceType, pOptions, pCustomServiceHash) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
9066711
18423