chore(orchestration): modules method context (#9669)

** What **
* Test to check if the MedusaContext is being injected when calling a Module's method
This commit is contained in:
Carlos R. L. Rodrigues
2024-10-18 18:08:06 -03:00
committed by GitHub
parent 8209d936a0
commit 6fa98b6a4d
7 changed files with 132 additions and 4 deletions

View File

@@ -107,12 +107,9 @@ export class LocalWorkflow {
return resolved
}
const nonWrappable = Object.getOwnPropertyNames(resolved)
return new Proxy(resolved, {
get: function (target, prop) {
const shouldWrap = !nonWrappable.includes(prop as string)
if (!shouldWrap) {
if (typeof target[prop] !== "function") {
return target[prop]
}