fable-serviceproviderbase 3.0.4 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fable-serviceproviderbase",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "Simple base classes for fable services.",
|
|
5
5
|
"main": "source/Fable-ServiceProviderBase.js",
|
|
6
6
|
"scripts": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"homepage": "https://github.com/stevenvelozo/fable-serviceproviderbase",
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"chai": "4.3.7",
|
|
45
|
-
"fable": "^3.0.
|
|
45
|
+
"fable": "^3.0.46",
|
|
46
46
|
"mocha": "10.2.0",
|
|
47
47
|
"nyc": "^15.1.0"
|
|
48
48
|
}
|
|
@@ -25,6 +25,11 @@ class FableServiceProviderBase
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
this.Hash = (typeof(pServiceHash) === 'string') ? pServiceHash : `${this.UUID}`;
|
|
28
|
+
|
|
29
|
+
// Pull back a few things
|
|
30
|
+
this.log = this.fable.log;
|
|
31
|
+
this.services = this.fable.services;
|
|
32
|
+
this.defaultServices = this.fable.defaultServices;
|
|
28
33
|
}
|
|
29
34
|
|
|
30
35
|
static isFableService = true;
|
|
@@ -115,10 +115,13 @@ suite
|
|
|
115
115
|
{
|
|
116
116
|
testFable = new libFable();
|
|
117
117
|
testFable.serviceManager.addServiceType('SimpleService', SimpleService);
|
|
118
|
-
testFable.serviceManager.instantiateServiceProvider('SimpleService', {SomeOption: true}, 'SimpleService-123');
|
|
118
|
+
let tmpSimpleService = testFable.serviceManager.instantiateServiceProvider('SimpleService', {SomeOption: true}, 'SimpleService-123');
|
|
119
119
|
|
|
120
120
|
Expect(testFable.serviceManager.services['SimpleService']['SimpleService-123']).to.be.an('object');
|
|
121
121
|
|
|
122
|
+
// The passed-in magic stuff should work too.
|
|
123
|
+
tmpSimpleService.log.info(`There were almost ${tmpSimpleService.defaultServices.DataFormat.formatterDollars(9821229.37)} dollars just lying here!`);
|
|
124
|
+
|
|
122
125
|
Expect(testFable.serviceManager.defaultServices['SimpleService']).to.be.an('object');
|
|
123
126
|
|
|
124
127
|
testFable.serviceManager.defaultServices.SimpleService.doSomething();
|