fix(orchestration): local workflow proxy (#9664)
This commit is contained in:
committed by
GitHub
parent
d77d184729
commit
d3c1580c06
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user