fix(orchestration): local workflow proxy (#9664)

This commit is contained in:
Carlos R. L. Rodrigues
2024-10-18 10:30:16 -03:00
committed by GitHub
parent d77d184729
commit d3c1580c06

View File

@@ -107,15 +107,10 @@ export class LocalWorkflow {
return resolved
}
const wrappableMethods = Object.getOwnPropertyNames(resolved).filter(
(key) => key !== "constructor"
)
const nonWrappable = Object.getOwnPropertyNames(resolved)
return new Proxy(resolved, {
get: function (target, prop) {
const shouldWrap =
wrappableMethods.includes(prop as string) &&
typeof target[prop] === "function"
const shouldWrap = !nonWrappable.includes(prop as string)
if (!shouldWrap) {
return target[prop]