feat(medusa, modules-sdk, types, utils): Re work modules loading and remove legacy functions (#5496)

This commit is contained in:
Adrien de Peretti authored and GitHub committed 2023-11-02 17:59:13 +01:00
1 parent ca411e54eb
commit 154c9b43bd
39 files changed
+616 -393

No files matched your search

@@ -1,7 +1,9 @@
import { buildRegexpIfValid } from "./build-regexp-if-valid";
import { buildRegexpIfValid } from "./build-regexp-if-valid"
export function parseCorsOrigins(str: string): (string | RegExp)[] {
return str.split(",").map((subStr) => {
return buildRegexpIfValid(subStr) ?? subStr
})
return !str
? []
: str.split(",").map((subStr) => {
return buildRegexpIfValid(subStr) ?? subStr
})
}