Transformation: generic support for variables, yay

This commit is contained in:
Dominik Prokop 2025-02-06 18:42:45 +01:00
parent 126396399e
commit deec7c306b
1 changed files with 4 additions and 1 deletions

View File

@ -24,11 +24,14 @@ const getOperator =
const defaultOptions = info.transformation.defaultOptions ?? {};
const options = { ...defaultOptions, ...config.options };
const interpolated = JSON.parse(ctx.interpolate(JSON.stringify(options)));
console.log('interpolated', interpolated);
const matcher = config.filter?.options ? getFrameMatchers(config.filter) : undefined;
return source.pipe(
mergeMap((before) =>
of(filterInput(before, matcher)).pipe(
info.transformation.operator(options, ctx),
info.transformation.operator(interpolated, ctx),
postProcessTransform(before, info, matcher)
)
)