ultravisor 1.0.16 → 1.0.17
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
|
@@ -94,7 +94,26 @@ module.exports =
|
|
|
94
94
|
let tmpPromptMessage = pResolvedSettings.PromptMessage || 'Please provide a value:';
|
|
95
95
|
let tmpOutputAddress = pResolvedSettings.OutputAddress || '';
|
|
96
96
|
|
|
97
|
-
//
|
|
97
|
+
// Auto-resolve: if the output address already has a value in state
|
|
98
|
+
// (e.g., pre-seeded via /Operation/:Hash/Trigger with Parameters),
|
|
99
|
+
// skip the pause and fire immediately. This lets operations work both
|
|
100
|
+
// interactively (flow editor — pauses for input) and programmatically
|
|
101
|
+
// (API trigger / retold-labs experiment runner — runs straight through).
|
|
102
|
+
if (tmpOutputAddress && pExecutionContext.StateManager)
|
|
103
|
+
{
|
|
104
|
+
let tmpExistingValue = pExecutionContext.StateManager.resolveAddress(
|
|
105
|
+
tmpOutputAddress, pExecutionContext, pExecutionContext.NodeHash);
|
|
106
|
+
if (tmpExistingValue !== undefined && tmpExistingValue !== null && tmpExistingValue !== '')
|
|
107
|
+
{
|
|
108
|
+
return fCallback(null, {
|
|
109
|
+
EventToFire: 'ValueInputComplete',
|
|
110
|
+
Outputs: { InputValue: tmpExistingValue },
|
|
111
|
+
Log: [`Auto-resolved from pre-seeded state: "${tmpOutputAddress}" = "${String(tmpExistingValue).substring(0, 100)}"`]
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// No pre-seeded value — pause and wait for interactive input
|
|
98
117
|
let tmpOptions = pResolvedSettings.Options || '';
|
|
99
118
|
if (Array.isArray(tmpOptions))
|
|
100
119
|
{
|