fable 3.0.35 → 3.0.36

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",
3
- "version": "3.0.35",
3
+ "version": "3.0.36",
4
4
  "description": "An entity behavior management and API bundling library.",
5
5
  "main": "source/Fable.js",
6
6
  "scripts": {
@@ -30,6 +30,9 @@
30
30
  "lib/vendor"
31
31
  ]
32
32
  },
33
+ "browser": {
34
+ "./source/service/Fable-Service-EnvironmentData.js": "./source/service/Fable-Service-EnvironmentData-Web.js"
35
+ },
33
36
  "repository": {
34
37
  "type": "git",
35
38
  "url": "https://github.com/stevenvelozo/fable.git"
package/source/Fable.js CHANGED
@@ -10,6 +10,7 @@ const libFableLog = require('fable-log');
10
10
  const libFableServiceManager = require('./Fable-ServiceManager.js');
11
11
 
12
12
  // Default Services
13
+ const libFableServiceEnvironmentData = require('./services/Fable-Service-EnvironmentData.js');
13
14
  const libFableServiceDataFormat = require('./services/Fable-Service-DataFormat.js');
14
15
  const libFableServiceMetaTemplate = require('./services/Fable-Service-MetaTemplate.js');
15
16
  const libFableServiceOperation = require('./services/Fable-Service-Operation.js');
@@ -50,6 +51,7 @@ class Fable
50
51
  this.serviceManager.connectPreinitServiceProviderInstance(this._coreServices.SettingsManager);
51
52
 
52
53
  // Initialize and instantiate the default baked-in Data Arithmatic service
54
+ this.serviceManager.addAndInstantiateServiceType('EnvironmentData', libFableServiceEnvironmentData);
53
55
  this.serviceManager.addServiceType('Template', libFableServiceTemplate);
54
56
  this.serviceManager.addServiceType('MetaTemplate', libFableServiceMetaTemplate);
55
57
  this.serviceManager.addAndInstantiateServiceType('DataFormat', libFableServiceDataFormat);
@@ -0,0 +1,15 @@
1
+ const libFableServiceBase = require('../Fable-ServiceManager.js').ServiceProviderBase;
2
+
3
+ class FableServiceEnvironmentData extends libFableServiceBase
4
+ {
5
+ constructor(pFable, pOptions, pServiceHash)
6
+ {
7
+ super(pFable, pOptions, pServiceHash);
8
+
9
+ this.serviceType = 'EnvironmentData';
10
+
11
+ this.Environment = `web`;
12
+ }
13
+ }
14
+
15
+ module.exports = FableServiceEnvironmentData;
@@ -0,0 +1,15 @@
1
+ const libFableServiceBase = require('../Fable-ServiceManager.js').ServiceProviderBase;
2
+
3
+ class FableServiceEnvironmentData extends libFableServiceBase
4
+ {
5
+ constructor(pFable, pOptions, pServiceHash)
6
+ {
7
+ super(pFable, pOptions, pServiceHash);
8
+
9
+ this.serviceType = 'EnvironmentData';
10
+
11
+ this.Environment = `node.js`;
12
+ }
13
+ }
14
+
15
+ module.exports = FableServiceEnvironmentData;
@@ -62,6 +62,8 @@ suite
62
62
  .that.is.a('object');
63
63
  Expect(testFable.settings.Product)
64
64
  .to.equal('LegacyApplicationNameHere')
65
+ Expect(testFable.EnvironmentData.Environment)
66
+ .to.equal('node.js');
65
67
  }
66
68
  );
67
69
  test