Files
medusa-store/packages/cli/create-medusa-app/src/utils/postgres-client.ts
Adrien de Peretti 12a96a7c70 chore(): Move peer deps into a single package and re export from framework (#13439)
* chore(): Move peer deps into a single package and re export from framework

* WIP

* update core packages

* update cli and deps

* update medusa

* update exports path

* remove analyze

* update modules deps

* finalise changes

* fix yarn

* fix import

* Refactor peer dependencies into a single package

Consolidate peer dependencies into one package and re-export from the framework.

* update changeset

* Update .changeset/brown-cows-sleep.md

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>

* rm deps

* fix deps

* increase timeout

* upgrade version

* update versions

* update versions

* fixes

* update lock

* fix missing import

* fix missing import

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-09-22 18:36:22 +02:00

24 lines
425 B
TypeScript

import pg from "@medusajs/deps/pg"
const { Client } = pg as any
export const DEFAULT_HOST = "localhost"
export const DEFAULT_PORT = 5432
type PostgresConnection = {
user?: string
password?: string
connectionString?: string
database?: string
host?: string
port?: number
}
export default async (connect: PostgresConnection) => {
const client = new Client(connect)
await client.connect()
return client
}