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 authored and GitHub committed 2024-10-18 21:08:06 +00:00
1 parent 8209d936a0
commit 6fa98b6a4d
7 files changed
+132 -4

No files matched your search

@@ -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]
}