Comparing version 6.0.1 to 6.0.2
@@ -174,2 +174,5 @@ /** | ||
var newExample; | ||
// TODO: would be good to _not_ cloneDeep here | ||
// (for performance, but also just because you might not actually want that in a lot of | ||
// cases, like streams) | ||
try { | ||
@@ -176,0 +179,0 @@ newExample = exitDef.getExample.apply(env, [_.cloneDeep(allConfiguredInputValues), env]); |
@@ -138,3 +138,2 @@ /** | ||
Machine.pack = require('./Machine.pack'); | ||
Machine.toAction = require('./Machine.toAction'); | ||
Machine.buildNoopMachine = require('./Machine.buildNoopMachine'); | ||
@@ -217,3 +216,2 @@ Machine.buildHaltMachine = require('./Machine.buildHaltMachine'); | ||
_.extend(this._configuredInputs, configuredInputs); | ||
// _.extend(this._configuredInputs, _.cloneDeep(configuredInputs)); | ||
return this; | ||
@@ -220,0 +218,0 @@ }; |
@@ -8,4 +8,7 @@ /** | ||
var rttc = require('rttc'); | ||
var buildLambdaMachine = require('./build-lambda-machine'); | ||
/** | ||
@@ -72,2 +75,4 @@ * validateConfiguredInputValues() | ||
// Note that the `inputs` provided to `validate()` and `getExample()` are: | ||
@@ -156,2 +161,18 @@ // (1) a deep clone, and | ||
// If this is a lambda input, instantiate it into a usable machine. | ||
if (_.isString(inputDef.example) && inputDef.example.match(/(^-+>$)|(^=+>$)|(^<=+$)|(^<-+$)/) ) { | ||
try { | ||
coercedInputValues[inputName] = | ||
buildLambdaMachine(machine._configuredInputs[inputName], inputName, machine); | ||
return; | ||
} | ||
catch (e) { | ||
e.input = inputName; | ||
errors.push(e); | ||
return; | ||
} | ||
} | ||
// Prefer the example over typeclass, if one exists. | ||
@@ -292,2 +313,1 @@ if (!_.isUndefined(example)){ | ||
{ | ||
"name": "machine", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"description": "Configure and execute machines", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
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
74754
1662
1