feat: add database-postgres driver boundary package (E00-S03-T02)
- packages/database-postgres (@personal-blog/database-postgres): the single workspace package allowed to import the PostgreSQL driver — declares pg and kysely as exact dependencies (@types/pg for types) and its src/index.ts imports and re-exports the driver pieces (Pool, Kysely, PostgresDialect) so the isolation is real, not a placeholder - pnpm-lock.yaml: importer for packages/database-postgres plus the resolved pg/kysely dependency tree (frozen-lockfile install keeps working) - .gitea/workflows/ci.yml: new database-postgres-imports job runs tests/database-postgres-imports.test.mjs on every PR so the isolation criterion gates merges
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "@personal-blog/database-postgres",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"description": "EPPP PostgreSQL database adapter package. The single workspace package allowed to import the pg driver and Kysely (E00-S03-T02); the concrete adapter (migration ledger, advisory lock) lands in later stories.",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"typecheck": "tsc -p tsconfig.json --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"kysely": "0.29.5",
|
||||
"pg": "8.23.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/pg": "8.23.1"
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @personal-blog/database-postgres — EPPP PostgreSQL adapter package.
|
||||
*
|
||||
* [E00-S03-T02] this package is the single owner of the PostgreSQL driver
|
||||
* stack: it is the only workspace package allowed to import `pg` and Kysely.
|
||||
* Every piece of the workspace that talks to the database goes through this
|
||||
* boundary — the pool, the query builder dialect and the adapter API this
|
||||
* package will expose — so no other package ever imports the driver directly.
|
||||
*
|
||||
* This module is the driver boundary: it imports the PostgreSQL driver (`pg`)
|
||||
* and Kysely and re-exports the pieces later stories build the adapter on
|
||||
* (migration ledger E00-S03-T03, advisory lock E00-S03-T04). Until then the
|
||||
* re-exports keep the driver reachable only from here — the isolation is real,
|
||||
* not a placeholder.
|
||||
*/
|
||||
|
||||
import { Pool } from 'pg';
|
||||
import { Kysely, PostgresDialect } from 'kysely';
|
||||
|
||||
export { Pool, Kysely, PostgresDialect };
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
Reference in New Issue
Block a user