fable 3.0.145 → 3.0.146

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.
@@ -2,6 +2,12 @@
2
2
  "Scope": "FruitsOfTheWorld",
3
3
  "Descriptors":
4
4
  {
5
+ "FruityVice[]":
6
+ {
7
+ "Name": "List of Fruits",
8
+ "Hash": "FruitSet",
9
+ "DataType": "Array"
10
+ },
5
11
  "FruityVice[].name":
6
12
  {
7
13
  "Name": "Fruit Name",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fable",
3
- "version": "3.0.145",
3
+ "version": "3.0.146",
4
4
  "description": "A service dependency injection, configuration and logging library.",
5
5
  "main": "source/Fable.js",
6
6
  "scripts": {
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "homepage": "https://github.com/stevenvelozo/fable",
52
52
  "devDependencies": {
53
- "quackage": "^1.0.33"
53
+ "quackage": "^1.0.36"
54
54
  },
55
55
  "dependencies": {
56
56
  "async.eachlimit": "^0.5.2",
@@ -64,7 +64,7 @@
64
64
  "fable-serviceproviderbase": "^3.0.15",
65
65
  "fable-settings": "^3.0.12",
66
66
  "fable-uuid": "^3.0.11",
67
- "manyfest": "^1.0.37",
67
+ "manyfest": "^1.0.38",
68
68
  "simple-get": "^4.0.1"
69
69
  }
70
70
  }
@@ -28,6 +28,10 @@ class ExpressionParserOperationBase extends libFableServiceProviderBase
28
28
  {
29
29
  return 'Token.StateAddress';
30
30
  }
31
+ else if ((pToken.length > 2) && (pToken[0] === '"') && (pToken[pToken.length-1] === '"'))
32
+ {
33
+ return 'Token.String';
34
+ }
31
35
  else if (this.numberTest.test(pToken))
32
36
  {
33
37
  return 'Token.Constant';
@@ -82,5 +82,9 @@
82
82
  "round": {
83
83
  "Name": "Round",
84
84
  "Address": "fable.Math.roundPrecise"
85
+ },
86
+ "valuemapcount": {
87
+ "Name": "Histogram Count Value Map",
88
+ "Address": "fable.Math.valueMapCountPrecise"
85
89
  }
86
90
  }
@@ -119,6 +119,14 @@ class ExpressionParserValueMarshal extends libExpressionParserOperationBase
119
119
  }
120
120
  }
121
121
  }
122
+ if ((pTokenizedObjects[i].Type === 'Token.String') && !tmpToken.Resolved)
123
+ {
124
+ tmpResults.ExpressionParserLog.push(`INFO: ExpressionParser.substituteValuesInTokenizedObjects found a value [${tmpToken.Token}] for the string ${tmpToken.Token} at index ${i}`);
125
+ if (this.LogNoisiness > 1) this.log.info(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);
126
+ tmpToken.Resolved = true;
127
+ // Take the quotes off the string
128
+ tmpToken.Value = tmpToken.Token.substring(1, tmpToken.Token.length-1);
129
+ }
122
130
  if ((pTokenizedObjects[i].Type === 'Token.Constant') && !tmpToken.Resolved)
123
131
  {
124
132
  tmpResults.ExpressionParserLog.push(`INFO: ExpressionParser.substituteValuesInTokenizedObjects found a value [${tmpToken.Token}] for the constant ${tmpToken.Token} at index ${i}`);
@@ -22,6 +22,8 @@ class FableServiceMath extends libFableServiceBase
22
22
  this.serviceType = 'Math';
23
23
 
24
24
  this.pi = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679';
25
+
26
+ // this.manifest = this.fable.newManyfest();
25
27
  }
26
28
 
27
29
  /*
@@ -559,6 +561,27 @@ class FableServiceMath extends libFableServiceBase
559
561
  return this.bucketSetPrecise(pValueSet);
560
562
  }
561
563
 
564
+ /**
565
+ *
566
+ * @param {Array<Object>} pValueSet - An array of objects
567
+ * @param {string} pValueMapAddress - The address in each object to find the value to count in the histogram. Undefined will be 'Unknown'.
568
+ */
569
+ valueMapCountPrecise(pValueSet, pValueMapAddress)
570
+ {
571
+ let tmpHistogram = {};
572
+
573
+ this.log.info(`ValueSet is a ${typeof(pValueSet)}`);
574
+ this.log.info(`ValueMapAddress is ${pValueMapAddress}`);
575
+
576
+ return tmpHistogram;
577
+ }
578
+
579
+ valueMapSumPrecise(pValueSet, pValueMapAddress, pValueMapAmount)
580
+ {
581
+
582
+ }
583
+
584
+
562
585
  /**
563
586
  * Sorts the histogram object in ascending order based on the frequencies of the buckets.
564
587
  *
@@ -42,8 +42,6 @@ suite
42
42
  Expect(testFable.settings.Product).to.equal('ApplicationNameHere');
43
43
 
44
44
  // Test package anthropology
45
- Expect(testFable._PackageFableServiceProvider).to.be.an('object', 'Fable should have a _PackageFableServiceProvider object.');
46
- Expect(testFable._PackageFableServiceProvider.name).equal('fable-serviceproviderbase', 'Fable _PackageFableServiceProvider.package.name should be set.');
47
45
  Expect(testFable._Package).to.be.an('object', 'Fable should have a _Package object.');
48
46
  Expect(testFable._Package.name).to.equal('fable', 'Fable _Package.package.name should be set.');
49
47
  }