diff --git a/.changeset/odd-squids-invite.md b/.changeset/odd-squids-invite.md new file mode 100644 index 000000000000..f9d54479acba --- /dev/null +++ b/.changeset/odd-squids-invite.md @@ -0,0 +1,14 @@ +--- +"@refinedev/cli": patch +--- + +fix: `refine add resource` generating invalid React component name. #6225 + +`refine add resource blog-posts` command was generating invalid React component name when the resource name contains a hyphen. This issue has been fixed by converting the resource name to PascalCase before generating the React component name. + +```diff +- export const Blog-PostsList: React.FC = () => {}; ++ export const BlogPostsList: React.FC = () => {}; +``` + +[Resolves #6225](https://github.com/refinedev/refine/issues/6225) diff --git a/packages/cli/package.json b/packages/cli/package.json index c52084f82946..816e1ef0aaa5 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -36,6 +36,7 @@ "@npmcli/package-json": "^5.2.0", "@refinedev/devtools-server": "1.1.34", "boxen": "^5.1.2", + "camelcase": "^6.2.0", "cardinal": "^2.1.1", "center-align": "1.0.1", "chalk": "^4.1.2", diff --git a/packages/cli/src/commands/add/sub-commands/resource/index.test.ts b/packages/cli/src/commands/add/sub-commands/resource/index.test.ts index 551e7c245edb..cc91d7aabf35 100644 --- a/packages/cli/src/commands/add/sub-commands/resource/index.test.ts +++ b/packages/cli/src/commands/add/sub-commands/resource/index.test.ts @@ -6,7 +6,10 @@ import { existsSync, readFileSync, rmdirSync } from "fs-extra"; const srcDirPath = `${__dirname}/../../../..`; describe("add", () => { - beforeEach(() => { + beforeAll(() => { + // usefull for speed up the tests. + jest.spyOn(console, "log").mockImplementation(); + jest.spyOn(testTargetModule, "installInferencer").mockImplementation(); }); @@ -84,4 +87,76 @@ describe("add", () => { // cleanup rmdirSync(reactComponentRootDirPath, { recursive: true }); }); + + it.each([ + { + resourceName: "blog-posts", + folderName: "blog-posts", + componentNamesByActions: { + list: "BlogPostsList", + create: "BlogPostsCreate", + show: "BlogPostsShow", + edit: "BlogPostsEdit", + }, + }, + { + resourceName: "blog-post", + folderName: "blog-posts", + componentNamesByActions: { + list: "BlogPostList", + create: "BlogPostCreate", + show: "BlogPostShow", + edit: "BlogPostEdit", + }, + }, + { + resourceName: "product", + folderName: "products", + componentNamesByActions: { + list: "ProductList", + create: "ProductCreate", + show: "ProductShow", + edit: "ProductEdit", + }, + }, + { + resourceName: "blogPosts", + folderName: "blogposts", + componentNamesByActions: { + list: "BlogPostsList", + create: "BlogPostsCreate", + show: "BlogPostsShow", + edit: "BlogPostsEdit", + }, + }, + ])( + "should generate components and folders for '$resourceName'", + (testCase) => { + jest + .spyOn(utilsProject, "getProjectType") + .mockReturnValue(ProjectTypes.VITE); + + jest + .spyOn(testTargetModule, "getCommandRootDir") + .mockReturnValue(srcDirPath); + + const actions = ["list", "create", "show", "edit"] as const; + testTargetModule.createResources({ actions: actions.join(",") }, [ + testCase.resourceName, + ]); + + const reactComponentRootDirPath = `${srcDirPath}/pages`; + + actions.forEach((action) => { + const componentFilePath = `${reactComponentRootDirPath}/${testCase.folderName}/${action}.tsx`; + const componentContent = readFileSync(componentFilePath, "utf-8"); + expect(componentContent).toContain( + `const ${testCase.componentNamesByActions[action]} = () => {`, + ); + }); + + // cleanup + rmdirSync(reactComponentRootDirPath, { recursive: true }); + }, + ); }); diff --git a/packages/cli/src/utils/compile/index.ts b/packages/cli/src/utils/compile/index.ts index c6f996798c7b..4c3249068629 100644 --- a/packages/cli/src/utils/compile/index.ts +++ b/packages/cli/src/utils/compile/index.ts @@ -6,6 +6,7 @@ import { writeFileSync, unlinkSync, } from "fs-extra"; +import { getComponentNameByResource } from "@utils/resource"; export const compile = (filePath: string, params: any): string => { const content = readFileSync(filePath); @@ -39,6 +40,14 @@ export const compile = (filePath: string, params: any): string => { return string.charAt(0).toUpperCase() + string.slice(1); }); + Handlebars.registerHelper("getComponentNameByResource", (string) => { + if (!string) { + return; + } + + return getComponentNameByResource(string); + }); + const template = Handlebars.compile(content.toString()); return template(params); }; diff --git a/packages/cli/src/utils/resource/index.ts b/packages/cli/src/utils/resource/index.ts index 5904aabc56c2..0fe9f4354c84 100644 --- a/packages/cli/src/utils/resource/index.ts +++ b/packages/cli/src/utils/resource/index.ts @@ -1,4 +1,5 @@ import { ProjectTypes } from "@definitions/projectTypes"; +import camelCase from "camelcase"; export const getResourcePath = ( projectType: ProjectTypes, @@ -54,3 +55,10 @@ export const getFilesPathByProject = (projectType?: ProjectTypes) => { return "./src"; } }; + +export const getComponentNameByResource = (resource: string): string => { + return camelCase(resource, { + preserveConsecutiveUppercase: true, + pascalCase: true, + }); +}; diff --git a/packages/cli/templates/resource/components/create.tsx.hbs b/packages/cli/templates/resource/components/create.tsx.hbs index 14ab08a5d4b1..a1d94d2012fa 100644 --- a/packages/cli/templates/resource/components/create.tsx.hbs +++ b/packages/cli/templates/resource/components/create.tsx.hbs @@ -8,7 +8,7 @@ import { {{formatInferencerComponent uiFramework}}Inferencer } from "@refinedev/ import { HeadlessInferencer } from "@refinedev/inferencer/headless"; {{/if}} -export const {{capitalize resource}}Create = () => { +export const {{getComponentNameByResource resource}}Create = () => { {{#if uiFramework}} return <{{formatInferencerComponent uiFramework}}Inferencer />; {{else}} diff --git a/packages/cli/templates/resource/components/edit.tsx.hbs b/packages/cli/templates/resource/components/edit.tsx.hbs index b48930194f68..116fc44dff63 100644 --- a/packages/cli/templates/resource/components/edit.tsx.hbs +++ b/packages/cli/templates/resource/components/edit.tsx.hbs @@ -8,7 +8,7 @@ import { {{formatInferencerComponent uiFramework}}Inferencer } from "@refinedev/ import { HeadlessInferencer } from "@refinedev/inferencer/headless"; {{/if}} -export const {{capitalize resource}}Edit = () => { +export const {{getComponentNameByResource resource}}Edit = () => { {{#if uiFramework}} return <{{formatInferencerComponent uiFramework}}Inferencer />; {{else}} diff --git a/packages/cli/templates/resource/components/list.tsx.hbs b/packages/cli/templates/resource/components/list.tsx.hbs index 59001f89aa38..9d979673079a 100644 --- a/packages/cli/templates/resource/components/list.tsx.hbs +++ b/packages/cli/templates/resource/components/list.tsx.hbs @@ -8,7 +8,7 @@ import { {{formatInferencerComponent uiFramework}}Inferencer } from "@refinedev/ import { HeadlessInferencer } from "@refinedev/inferencer/headless"; {{/if}} -export const {{capitalize resource}}List = () => { +export const {{getComponentNameByResource resource}}List = () => { {{#if uiFramework}} return <{{formatInferencerComponent uiFramework}}Inferencer />; {{else}} diff --git a/packages/cli/templates/resource/components/show.tsx.hbs b/packages/cli/templates/resource/components/show.tsx.hbs index 1904cf5d3937..944a66a628aa 100644 --- a/packages/cli/templates/resource/components/show.tsx.hbs +++ b/packages/cli/templates/resource/components/show.tsx.hbs @@ -8,7 +8,7 @@ import { {{formatInferencerComponent uiFramework}}Inferencer } from "@refinedev/ import { HeadlessInferencer } from "@refinedev/inferencer/headless"; {{/if}} -export const {{capitalize resource}}Show = () => { +export const {{getComponentNameByResource resource}}Show = () => { {{#if uiFramework}} return <{{formatInferencerComponent uiFramework}}Inferencer />; {{else}} diff --git a/packages/cli/templates/resource/pages/next/create/page.tsx.hbs b/packages/cli/templates/resource/pages/next/create/page.tsx.hbs index 228c786fb63f..5501ae02ba26 100644 --- a/packages/cli/templates/resource/pages/next/create/page.tsx.hbs +++ b/packages/cli/templates/resource/pages/next/create/page.tsx.hbs @@ -1,5 +1,5 @@ -import { {{capitalize resource}}Create } from "@components/{{resourceFolderName}}"; +import { {{getComponentNameByResource resource}}Create } from "@components/{{resourceFolderName}}"; -export default function {{capitalize resource}}CreatePage() { - return <{{capitalize resource}}Create />; +export default function {{getComponentNameByResource resource}}CreatePage() { + return <{{getComponentNameByResource resource}}Create />; }; diff --git a/packages/cli/templates/resource/pages/next/edit/[id]/page.tsx.hbs b/packages/cli/templates/resource/pages/next/edit/[id]/page.tsx.hbs index ad4230fe9470..4471d0f90e2b 100644 --- a/packages/cli/templates/resource/pages/next/edit/[id]/page.tsx.hbs +++ b/packages/cli/templates/resource/pages/next/edit/[id]/page.tsx.hbs @@ -1,5 +1,5 @@ -import { {{capitalize resource}}Edit } from "@components/{{resourceFolderName}}"; +import { {{getComponentNameByResource resource}}Edit } from "@components/{{resourceFolderName}}"; -export default function {{capitalize resource}}EditPage() { - return <{{capitalize resource}}Edit />; +export default function {{getComponentNameByResource resource}}EditPage() { + return <{{getComponentNameByResource resource}}Edit />; }; diff --git a/packages/cli/templates/resource/pages/next/page.tsx.hbs b/packages/cli/templates/resource/pages/next/page.tsx.hbs index 6699e3070b98..5fde69269441 100644 --- a/packages/cli/templates/resource/pages/next/page.tsx.hbs +++ b/packages/cli/templates/resource/pages/next/page.tsx.hbs @@ -1,5 +1,5 @@ -import { {{capitalize resource}}List } from "@components/{{resourceFolderName}}"; +import { {{getComponentNameByResource resource}}List } from "@components/{{resourceFolderName}}"; -export default function {{capitalize resource}}ListPage() { - return <{{capitalize resource}}List />; +export default function {{getComponentNameByResource resource}}ListPage() { + return <{{getComponentNameByResource resource}}List />; }; diff --git a/packages/cli/templates/resource/pages/next/show/[id]/page.tsx.hbs b/packages/cli/templates/resource/pages/next/show/[id]/page.tsx.hbs index ba302299105f..a0430db02b87 100644 --- a/packages/cli/templates/resource/pages/next/show/[id]/page.tsx.hbs +++ b/packages/cli/templates/resource/pages/next/show/[id]/page.tsx.hbs @@ -1,5 +1,5 @@ -import { {{capitalize resource}}Show } from "@components/{{resourceFolderName}}"; +import { {{getComponentNameByResource resource}}Show } from "@components/{{resourceFolderName}}"; -export default function {{capitalize resource}}ShowPage() { - return <{{capitalize resource}}Show />; +export default function {{getComponentNameByResource resource}}ShowPage() { + return <{{getComponentNameByResource resource}}Show />; }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b4da49c9153c..0c668d2bf170 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13821,6 +13821,9 @@ importers: boxen: specifier: ^5.1.2 version: 5.1.2 + camelcase: + specifier: ^6.2.0 + version: 6.3.0 cardinal: specifier: ^2.1.1 version: 2.1.1 @@ -41659,8 +41662,8 @@ snapshots: '@medusajs/modules-sdk': 1.12.10(@types/node@18.19.31) '@medusajs/types': 1.11.15 '@medusajs/utils': 1.11.8(@types/node@18.19.31)(pg@8.11.5) - '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7) - '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7)(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5)) + '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7) + '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5)) awilix: 8.0.1 transitivePeerDependencies: - '@mikro-orm/better-sqlite' @@ -41909,9 +41912,9 @@ snapshots: '@medusajs/utils@1.11.8(@types/node@18.19.31)(pg@8.11.5)': dependencies: '@medusajs/types': 1.11.15 - '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7) - '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5) - '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7)(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5)) + '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7) + '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5) + '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5)) awilix: 8.0.1 bignumber.js: 9.1.2 knex: 2.4.2(pg@8.11.5) @@ -41963,7 +41966,7 @@ snapshots: - supports-color - tedious - '@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7)': + '@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7)': dependencies: acorn-loose: 8.3.0 acorn-walk: 8.2.0 @@ -41973,17 +41976,17 @@ snapshots: mikro-orm: 5.9.7 reflect-metadata: 0.1.13 optionalDependencies: - '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5) - '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7)(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5)) + '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5) + '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5)) - '@mikro-orm/knex@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(pg@8.11.3)': + '@mikro-orm/knex@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5))(pg@8.11.3)': dependencies: - '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7) + '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7) fs-extra: 11.1.1 knex: 2.5.1(pg@8.11.3) sqlstring: 2.3.3 optionalDependencies: - '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5) + '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5) pg: 8.11.3 transitivePeerDependencies: - pg-native @@ -41992,21 +41995,21 @@ snapshots: '@mikro-orm/knex@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(pg@8.11.5)': dependencies: - '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7) + '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7) fs-extra: 11.1.1 knex: 2.5.1(pg@8.11.5) sqlstring: 2.3.3 optionalDependencies: - '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5) + '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5) pg: 8.11.5 transitivePeerDependencies: - pg-native - supports-color - tedious - '@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5)': + '@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5)': dependencies: - '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7) + '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7) '@mikro-orm/knex': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(pg@8.11.5) fs-extra: 11.1.1 knex: 2.5.1(pg@8.11.5) @@ -42024,13 +42027,13 @@ snapshots: - supports-color - tedious - '@mikro-orm/postgresql@5.9.7(@mikro-orm/core@5.9.7)(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))': + '@mikro-orm/postgresql@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5))': dependencies: - '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7) - '@mikro-orm/knex': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5))(pg@8.11.3) + '@mikro-orm/core': 5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7) + '@mikro-orm/knex': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5))(pg@8.11.3) pg: 8.11.3 optionalDependencies: - '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5) + '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5) transitivePeerDependencies: - better-sqlite3 - mssql @@ -55358,8 +55361,8 @@ snapshots: dependencies: '@medusajs/modules-sdk': 1.12.10(@types/node@18.19.31) '@medusajs/utils': 1.11.8(@types/node@18.19.31)(pg@8.11.5) - '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5) - '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7)(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7)(@types/node@18.19.31)(pg@8.11.5)) + '@mikro-orm/migrations': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5) + '@mikro-orm/postgresql': 5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@mikro-orm/migrations@5.9.7(@mikro-orm/core@5.9.7(@mikro-orm/migrations@5.9.7)(@mikro-orm/postgresql@5.9.7))(@types/node@18.19.31)(pg@8.11.5)) medusa-core-utils: 1.2.1 randomatic: 3.1.1 optionalDependencies: