feat(filter): add filter app

This commit is contained in:
Ali BARIN
2023-01-15 16:10:53 +01:00
parent 1f7228f95a
commit 5ee7b85cc4
22 changed files with 570 additions and 10993 deletions

View File

@@ -38,6 +38,13 @@ export default function computeParameters(
};
}
if (Array.isArray(value)) {
return {
...result,
[key]: value.map(item => computeParameters(item, executionSteps)),
};
}
return {
...result,
[key]: value,

View File

@@ -13,6 +13,7 @@ import {
IRequest,
} from '@automatisch/types';
import EarlyExitError from '../errors/early-exit';
import AlreadyProcessedError from '../errors/already-processed';
type GlobalVariableOptions = {
connection?: Connection;
@@ -77,6 +78,9 @@ const globalVariable = async (
execution: {
id: execution?.id,
testRun,
exit: () => {
throw new EarlyExitError();
}
},
lastExecutionStep: (await step?.getLastExecutionStep())?.toJSON(),
triggerOutput: {
@@ -93,7 +97,7 @@ const globalVariable = async (
!$.execution.testRun
) {
// early exit as we do not want to process duplicate items in actual executions
throw new EarlyExitError();
throw new AlreadyProcessedError();
}
$.triggerOutput.data.push(triggerItem);