chore: dependecies reorg (#8535)

This commit is contained in:
Carlos R. L. Rodrigues
2024-08-23 07:16:04 -03:00
committed by GitHub
parent 59599ac237
commit 058378970a
126 changed files with 958 additions and 1266 deletions

View File

@@ -1,7 +1,7 @@
import { DAL, FindConfig } from "@medusajs/types"
import { deduplicate, isDefined, isObject } from "../common"
import { SoftDeletableFilterKey } from "../dal"
import { SoftDeletableFilterKey } from "../dal/mikro-orm/mikro-orm-soft-deletable-filter"
// Following convention here is fine, we can make it configurable if needed.
const DELETED_AT_FIELD_NAME = "deleted_at"

View File

@@ -1,6 +1,6 @@
import { LinkModulesExtraFields, ModuleJoinerConfig } from "@medusajs/types"
import { camelToSnakeCase, isObject, pluralize, toPascalCase } from "../common"
import { composeLinkName } from "../link"
import { composeLinkName } from "../link/compose-link-name"
export const DefineLinkSymbol = Symbol.for("DefineLink")

View File

@@ -11,16 +11,18 @@ import {
SoftDeleteReturn,
} from "@medusajs/types"
import {
MapToConfig,
isString,
kebabCase,
lowerCaseFirst,
mapObjectTo,
MapToConfig,
pluralize,
upperCaseFirst,
} from "../common"
import { DmlEntity } from "../dml"
import { InjectManager, MedusaContext } from "./decorators"
import { ModuleRegistrationName } from "./definition"
import { buildModelsNameToLinkableKeysMap } from "./joiner-config-builder"
import {
BaseMethods,
ExtractKeysFromConfig,
@@ -29,8 +31,6 @@ import {
ModelEntries,
ModelsConfigTemplate,
} from "./types/medusa-service"
import { buildModelsNameToLinkableKeysMap } from "./joiner-config-builder"
import { DmlEntity } from "../dml"
const readMethods = ["retrieve", "list", "listAndCount"] as BaseMethods[]
const writeMethods = [
@@ -55,12 +55,12 @@ function buildMethodNamesFromModel(
if (method === "retrieve") {
normalizedModelName =
"singular" in model && model.singular
model && "singular" in model && model.singular
? model.singular
: defaultMethodName
} else {
normalizedModelName =
"plural" in model && model.plural
model && "plural" in model && model.plural
? model.plural
: pluralize(defaultMethodName)
}