configorama 0.6.6 → 0.6.7
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 +1 -1
- package/src/main.js +8 -1
package/package.json
CHANGED
package/src/main.js
CHANGED
|
@@ -829,6 +829,7 @@ class Configorama {
|
|
|
829
829
|
throw new Error(errorMessage)
|
|
830
830
|
}
|
|
831
831
|
if (typeof rawValue === 'string') {
|
|
832
|
+
// console.log('rawValue', rawValue)
|
|
832
833
|
/* Process inline functions like merge() */
|
|
833
834
|
if (ENABLE_FUNCTIONS && rawValue.match(/> function /)) {
|
|
834
835
|
// console.log('RAW FUNCTION', rawFunction)
|
|
@@ -889,6 +890,7 @@ class Configorama {
|
|
|
889
890
|
})
|
|
890
891
|
}
|
|
891
892
|
runFunction(variableString) {
|
|
893
|
+
// console.log('runFunction', variableString)
|
|
892
894
|
/* If json object value return it */
|
|
893
895
|
if (variableString.match(/^\s*{/) && variableString.match(/}\s*$/)) {
|
|
894
896
|
return variableString
|
|
@@ -1498,7 +1500,12 @@ Missing Value ${missingValue} - ${matchedString}
|
|
|
1498
1500
|
// @TODO fix this for eval refs
|
|
1499
1501
|
// console.log('prop', prop)
|
|
1500
1502
|
// console.log('func', func)
|
|
1501
|
-
|
|
1503
|
+
|
|
1504
|
+
if (
|
|
1505
|
+
!prop.match(fileRefSyntax)
|
|
1506
|
+
&& !prop.match(getValueFromEval.match)
|
|
1507
|
+
// AND is not multiline value
|
|
1508
|
+
&& (func && prop.split('\n').length < 3)) {
|
|
1502
1509
|
// console.log('IS FUNCTION')
|
|
1503
1510
|
/* if matches function signature like ${merge('foo', 'bar')}
|
|
1504
1511
|
rewrite the variable to run the function after inputs resolved
|