@shivaedev/local-postgres 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1 - 2026-10-16
4
+
5
+ ### Changed
6
+
7
+ - Document local service preparation, application-owned database names and schemas, data-preservation priorities and test boundaries in the README, agent guidance, north star and roadmap. Publish `docs/` with the README while keeping agent guidance out of the package.
8
+ - Build package JavaScript, declarations and source maps with TypeScript 7.
9
+
10
+ ## 0.2.0 - 2026-10-04
11
+
12
+ ### Changed
13
+
14
+ - Breaking: no root entry and no module that re-exports another. `exports` maps one `"./*.ts"` pattern to every module (`src` under the `source` condition, `dist` otherwise), so you import the module that defines a name, and a bundler sees only the modules you use. Where each name now lives:
15
+ - `@shivaedev/local-postgres`: `@shivaedev/local-postgres/localPostgres.ts` (`assertLocalDatabase`, `localPostgres`, `localServer`)
16
+ - The module that was the package entry is `localPostgres.ts`.
17
+
3
18
  ## 0.1.1 - 2026-10-04
4
19
 
5
20
  ### Changed
package/README.md CHANGED
@@ -1,20 +1,120 @@
1
1
  # @shivaedev/local-postgres
2
2
 
3
- Prepare one shared local PostgreSQL service without replacing containers, deleting volumes or resetting data. The service uses PostgreSQL 18.6 on loopback port 55432, pinned to `postgres:18.6-alpine@sha256:77f585114c32fbca283dc835b0596f4e52b51b4c6662d7810b2f4084f60a1873`.
3
+ Make development and integration tests share one persistent local PostgreSQL service. Repeat setup without rebuilding the database contents, and keep each application's database names and schema preparation in its own setup script.
4
4
 
5
- This Node 24+ package has no runtime dependencies. It uses a local Docker daemon when no service is available; an existing native service requires host `psql`. With Docker, the container provides `psql` when it is absent from the host.
5
+ ## Why you want this
6
+
7
+ A setup command should make a machine ready to work without erasing the work already on it. Reimplementing PostgreSQL startup in every repository makes that promise harder to keep. This package gives a setup script one place to prepare the service and its databases:
6
8
 
7
9
  ```ts
8
- import { assertLocalDatabase, localPostgres, localServer } from "@shivaedev/local-postgres";
10
+ import { assertLocalDatabase, localPostgres, localServer } from "@shivaedev/local-postgres/localPostgres.ts";
9
11
 
10
12
  const development = `${localServer}/example_dev`;
11
13
  assertLocalDatabase(development, ["example_dev"]);
14
+ localPostgres(process.env).prepareDatabases([development]);
15
+ ```
16
+
17
+ The application chooses `example_dev`. Preparation can run again: the package's real PostgreSQL test inserts a row, repeats preparation and reads the same row back.
18
+
19
+ ## Using it
20
+
21
+ ### How to think about it
22
+
23
+ There are three separate responsibilities:
24
+
25
+ 1. The **service** is PostgreSQL running on the local machine. This package prepares access to it.
26
+ 2. A **database** is an application-chosen name on that service. This package creates missing databases; the application explicitly permits their names.
27
+ 3. The **schema and data** belong to the application. Its setup script runs migrations, loads fixtures or seeds data after preparation.
28
+
29
+ `localPostgres(environment)` returns three synchronous functions: `startPostgres`, `prepareDatabases` and `sql`. Use them in setup tooling. Use your application's database client and `@shivaedev/effect-sql` for persistence and migrations in an Effect application.
30
+
31
+ ### 1. Once per application: choose and validate the databases
32
+
33
+ ```ts
34
+ import { assertLocalDatabase, localPostgres, localServer } from "@shivaedev/local-postgres/localPostgres.ts";
35
+
36
+ const development = process.env.DATABASE_URL ?? `${localServer}/example_dev`;
37
+ const tests = process.env.TEST_DATABASE_URL ?? `${localServer}/example_test`;
38
+
39
+ assertLocalDatabase(development, ["example_dev"]);
40
+ assertLocalDatabase(tests, ["example_test"]);
41
+
12
42
  const postgres = localPostgres(process.env);
13
- postgres.prepareDatabases([development]);
43
+ postgres.prepareDatabases([development, tests]);
14
44
  ```
15
45
 
16
- `localPostgres(environment)` reads only `DOCKER_CONTEXT` and `DOCKER_HOST` from the supplied settings. Pass the actual process environment or both settings from the application's configuration service so remote Docker endpoints are rejected. Importing this package does not start a service.
46
+ This is a complete preparation script for two application-owned databases. `assertLocalDatabase` checks the name against the list the caller supplies. It rejects a remote host, the wrong port, a different database name or a `host` connection parameter that redirects the connection. Preparation and SQL execution also reject remote database targets.
47
+
48
+ Keep the explicit name checks even though the preparation functions check their destinations. The application's allowlist says which database it intends to touch; service preparation does not choose that policy for it.
49
+
50
+ ### 2. Once per feature: prepare its schema in application tooling
51
+
52
+ After `prepareDatabases`, run the application's own schema or migration entry point. This package provides no schema model, migration ledger, fixture catalogue or seed convention. In this monorepo, `script/setup-database.ts` chooses the database names and loads test schemas; `@shivaedev/effect-sql` owns the SQL and migration APIs.
53
+
54
+ ### 3. In daily setup: prepare again and inspect with SQL
55
+
56
+ ```ts
57
+ import { assertLocalDatabase, localPostgres, localServer } from "@shivaedev/local-postgres/localPostgres.ts";
58
+
59
+ const database = `${localServer}/example_dev`;
60
+ assertLocalDatabase(database, ["example_dev"]);
61
+
62
+ const postgres = localPostgres(process.env);
63
+ postgres.prepareDatabases([database]);
64
+ console.log(postgres.sql(database, "SHOW server_version"));
65
+ ```
66
+
67
+ The version query returns the string `18.6`. `sql` also accepts a `URL` and returns the command's trimmed text. URLs carrying the application's `schema` and `connection_limit` settings work for this query; those settings are removed before calling PostgreSQL's client.
68
+
69
+ `startPostgres(connection)` prepares the service without choosing an application database to create. Its connection defaults to `localServer`. Prefer `prepareDatabases` when the setup script needs named databases as well.
70
+
71
+ ### API
72
+
73
+ Import the setup API from `@shivaedev/local-postgres/localPostgres.ts`:
74
+
75
+ | Export | Purpose |
76
+ | --- | --- |
77
+ | `localServer` | The base URL `postgresql://postgres:postgres@127.0.0.1:55432`. Append the application database name. |
78
+ | `assertLocalDatabase(value: string, names: readonly string[]): URL` | Validate a local database URL against application-owned allowed names. |
79
+ | `localPostgres(environment: DockerEnvironment)` | Create the setup functions using the Docker settings to validate. |
80
+ | `prepareDatabases(values: readonly string[]): void` | Prepare the service and create absent databases. |
81
+ | `startPostgres(connection?: string): void` | Prepare the service; the default connection is `localServer`. |
82
+ | `sql(value: string \| URL, query: string): string` | Execute SQL through PostgreSQL's command-line client. |
83
+
84
+ The last three functions are members of the object returned by `localPostgres`, not module-level exports. They throw on failure; they are synchronous Node functions rather than Effects.
85
+
86
+ The package's module export pattern also exposes these lower-level functions:
87
+
88
+ | Module | Exports |
89
+ | --- | --- |
90
+ | `@shivaedev/local-postgres/local-docker.ts` | `DockerEnvironment`, the type with optional `DOCKER_CONTEXT` and `DOCKER_HOST`; `docker(environment, args, options?)`, the local-endpoint-checked Docker command function. |
91
+ | `@shivaedev/local-postgres/local-container.ts` | `startContainer(docker)`, the container-start function; `sqlInContainer(docker, url, args, options)`, the container SQL-client function. Both take a Docker command callback. |
92
+
93
+ Use `localPostgres.ts` for application preparation. The lower-level functions describe the command paths it uses and take Node child-process options where shown.
94
+
95
+ ### Install and machine setup
96
+
97
+ ```sh
98
+ pnpm add --save-dev @shivaedev/local-postgres
99
+ ```
100
+
101
+ The package requires Node 24 or later and has no runtime dependencies. It needs host `psql` or a local Docker installation. SQL uses host `psql` when available and falls back to the container's client when the host executable is missing.
102
+
103
+ The shared baseline is PostgreSQL 18.6 on loopback port 55432. Docker preparation uses container and volume name `development-postgres`, loopback publication `127.0.0.1:55432:5432`, and this image:
104
+
105
+ ```text
106
+ postgres:18.6-alpine@sha256:77f585114c32fbca283dc835b0596f4e52b51b4c6662d7810b2f4084f60a1873
107
+ ```
108
+
109
+ A newly created container uses username and password `postgres`; connection URLs supply credentials for client commands. An existing service with a different version requires an explicit upgrade that preserves its data. Container preparation and container-client fallback also check the managed image; a successful host-`psql` version probe does not inspect that image.
110
+
111
+ Pass the process's actual Docker settings to `localPostgres`, as `process.env` in the examples does. With `DOCKER_CONTEXT`, endpoint validation uses that context and ignores `DOCKER_HOST`; otherwise it validates `DOCKER_HOST` or the active context. Remote endpoints are rejected before a Docker operation. Docker subprocesses inherit the process environment. Supplying a different object does not configure those subprocesses.
17
112
 
18
- `prepareDatabases(urls)` starts or reuses the service, checks its version and creates missing databases. `startPostgres(connection)` only prepares the service. `sql(connection, query)` uses host `psql`, or the pinned container's client. Database connection settings come from the supplied URL, including credentials. A new container uses the documented local defaults and a persistent `development-postgres` volume; it is never automatically upgraded.
113
+ ### Limits
19
114
 
20
- `assertLocalDatabase(url, names)` permits only the supplied names on localhost or 127.0.0.1 port 55432. It rejects connection parameters that override the destination. Callers own their application-specific names, test isolation, schema initialization, migrations and seeds. This package does not select application databases or run migrations or seeds.
115
+ - The service version, port, container name and volume name are fixed. Choose any upgrade and data-preservation procedure outside this package.
116
+ - Commands block the calling thread. Keep them in development and test setup tooling.
117
+ - Keep allowed names, schema changes, test isolation and cleanup in the application. Preparation is not a database reset.
118
+ - A prepared database name has 1–63 lowercase letters, digits or underscores and starts with a letter. An allowlisted connection URL does not bypass this SQL-name constraint.
119
+ - The PostgreSQL preservation test checks repeated preparation on a real service. It does not establish container creation, image-mismatch handling or host-client fallback.
120
+ - Concurrent creation of the same absent database is not covered by the package's tests. Prepare databases before parallel tests begin.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-container.d.ts","sourceRoot":"","sources":["../../src/server/local-container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,oBAAoB,CAAC;AAIhF,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,qCAAqC,KAAK,MAAM,CAAC;AAEnG,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,qCAAqC,UAY/H;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,QA6B5C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-container.js","sourceRoot":"","sources":["../../src/server/local-container.ts"],"names":[],"mappings":"AAEA,MAAM,KAAK,GAAG,8FAA8F,CAAC;AAC7G,MAAM,SAAS,GAAG,sBAAsB,CAAC;AAGzC,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,GAAQ,EAAE,IAAuB,EAAE,OAA8C;IAC/H,MAAM,EAAE,GAAG,MAAM,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C;YACtF,MAAM,IAAI,KAAK,CAAC,wGAAwG,CAAC,CAAC;QAC3H,CAAC;QACD,MAAM,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;IAC9B,CAAC;SAAM,CAAC;QACP,MAAM,CAAC;YACN,KAAK;YACL,UAAU;YACV,QAAQ;YACR,SAAS;YACT,WAAW;YACX,sBAAsB;YACtB,OAAO;YACP,wBAAwB;YACxB,OAAO;YACP,4BAA4B;YAC5B,SAAS;YACT,8DAA8D;YAC9D,KAAK;SACL,CAAC,CAAC;IACJ,CAAC;AACF,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { type ExecFileSyncOptionsWithStringEncoding } from "node:child_process";
2
2
  export type DockerEnvironment = Readonly<{
3
- DOCKER_CONTEXT?: string | undefined;
4
- DOCKER_HOST?: string | undefined;
3
+ "DOCKER_CONTEXT"?: string | undefined;
4
+ "DOCKER_HOST"?: string | undefined;
5
5
  }>;
6
6
  export declare function docker(environment: DockerEnvironment, args: readonly string[], options?: ExecFileSyncOptionsWithStringEncoding): string;
7
7
  //# sourceMappingURL=local-docker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-docker.d.ts","sourceRoot":"","sources":["../../src/server/local-docker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qCAAqC,EAAgB,MAAM,oBAAoB,CAAC;AAE9F,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC,CAAC;AAExH,wBAAgB,MAAM,CACrB,WAAW,EAAE,iBAAiB,EAC9B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,GAAE,qCAA4D,UAmBrE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-docker.js","sourceRoot":"","sources":["../../src/server/local-docker.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8C,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAI9F,MAAM,UAAU,MAAM,CACrB,WAA8B,EAC9B,IAAuB,EACvB,OAAO,GAA0C,EAAE,QAAQ,EAAE,MAAM,EAAE;IAErE,MAAM,OAAO,GAAG,WAAW,CAAC,cAAc,CAAC;IAC3C,MAAM,IAAI,GAAG,WAAW,CAAC,WAAW,CAAC;IACrC,MAAM,QAAQ,GACb,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC;WACf,YAAY,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,4BAA4B,CAAC,EAAE;YAC1H,QAAQ,EAAE,MAAM;SAChB,CAAC,CAAC,IAAI,EAAE,CAAC;IACX,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC9B,IACC,CAAC,CACA,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;WACrF,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAC1F,EACA,CAAC;QACF,MAAM,IAAI,KAAK,CAAC,qFAAqF,CAAC,CAAC;IACxG,CAAC;IACD,OAAO,YAAY,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC"}
@@ -6,4 +6,4 @@ export declare function localPostgres(environment: DockerEnvironment): {
6
6
  sql: (value: string | URL, query: string) => string;
7
7
  startPostgres: (connection?: string) => void;
8
8
  };
9
- //# sourceMappingURL=index.d.ts.map
9
+ //# sourceMappingURL=localPostgres.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localPostgres.d.ts","sourceRoot":"","sources":["../../src/server/localPostgres.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAU,MAAM,mBAAmB,CAAC;AAEnE,eAAO,MAAM,WAAW,mDAAmD,CAAC;AAE5E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,qBAY1E;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,iBAAiB;+BAiDzB,SAAS,MAAM,EAAE;iBA7C/B,MAAM,GAAG,GAAG,SAAS,MAAM;;EAiE/C"}
@@ -14,7 +14,9 @@ export function assertLocalDatabase(value, names) {
14
14
  return url;
15
15
  }
16
16
  export function localPostgres(environment) {
17
- const localDocker = (args, options = { encoding: "utf8" }) => docker(environment, args, options);
17
+ function localDocker(args, options = { encoding: "utf8" }) {
18
+ return docker(environment, args, options);
19
+ }
18
20
  function sql(value, query) {
19
21
  const url = new URL(value);
20
22
  assertLocalDatabase(url.toString(), [url.pathname.slice(1)]);
@@ -46,7 +48,7 @@ export function localPostgres(environment) {
46
48
  }
47
49
  catch {
48
50
  startContainer(localDocker);
49
- for (let attempt = 0; attempt < 30; attempt++) {
51
+ for (let attempt = 0; attempt < 30; attempt += 1) {
50
52
  try {
51
53
  version = sql(server, "SHOW server_version");
52
54
  break;
@@ -81,4 +83,4 @@ export function localPostgres(environment) {
81
83
  }
82
84
  return { prepareDatabases, sql, startPostgres };
83
85
  }
84
- //# sourceMappingURL=index.js.map
86
+ //# sourceMappingURL=localPostgres.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localPostgres.js","sourceRoot":"","sources":["../../src/server/localPostgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8C,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MA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,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC3C,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;YACjD,CAAC;QACF,CAAC;QACD,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACzB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC5B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;YAC3B,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACnC,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;YAC5B,MAAM,CAAC,QAAQ,GAAG,WAAW,CAAC;YAC9B,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,8CAA8C,IAAI,GAAG,CAAC,EAAE,CAAC;gBACzE,GAAG,CAAC,MAAM,EAAE,oBAAoB,IAAI,GAAG,CAAC,CAAC;YAC1C,CAAC;QACF,CAAC;IACF,CAAC;IACD,OAAO,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,EAAE,CAAC;AACjD,CAAC"}
@@ -0,0 +1,41 @@
1
+ # North star
2
+
3
+ ## The problem
4
+
5
+ Development and integration tests need PostgreSQL, but each repository has its own database names, schemas and test fixtures. Copying the whole setup script between repositories mixes those application choices with service management. A later shortcut in one copy can replace a container, lose a persistent volume or point a local setup command at a remote machine.
6
+
7
+ Setup also runs more than once. The developer's useful state must survive another checkout, another dependency install and another test run. A mismatch is a reason to stop and inspect the machine, not a reason to rebuild its database service automatically.
8
+
9
+ ## The ideal
10
+
11
+ There is one small utility for preparing the shared local service, and each application writes only its own choices. A caller chooses explicit database names, checks incoming URLs against those names, prepares absent databases, and then runs its own schema and seed work. The common utility handles reaching the service and PostgreSQL's command-line client.
12
+
13
+ Repeated preparation preserves existing data. Locality checks come before a command can act on a database or Docker endpoint. Upgrades are explicit decisions with a data-preservation plan rather than recovery work hidden inside a readiness check.
14
+
15
+ ## What good looks like
16
+
17
+ - A setup script names the databases it owns and validates configured URLs against those names.
18
+ - A service mismatch fails clearly without destructive repair.
19
+ - The application owns schemas, migrations, fixture loading, production guards and test cleanup. The package knows none of its domain tables or database naming conventions.
20
+ - The common setup path stays visible: ordinary Node tools, PostgreSQL client commands and a fixed local baseline. Application runtime persistence goes through its database client and the framework's SQL path.
21
+ - Tests distinguish real database preservation from inspection of generated commands. A test against an already-running PostgreSQL service cannot stand in for a test that starts Docker or exercises a missing client.
22
+
23
+ ## Trade-offs
24
+
25
+ When these goals conflict, prefer existing data, then an explicit local destination, then application ownership, then a small setup utility.
26
+
27
+ A fixed service baseline is less flexible than a configurable process manager. It makes one shared machine service easier to reason about and avoids changing the version as a side effect of setup. A machine that needs an upgrade requires a deliberate action outside preparation.
28
+
29
+ Explicit application name checks add a line to a setup script. That line records which database the script is authorized to prepare; an environment URL alone cannot answer that question.
30
+
31
+ Synchronous commands are a fit for setup tooling. They should not become an application request path or a second database abstraction. A need for runtime SQL belongs with the native Effect SQL client and repository packages.
32
+
33
+ ## What it deliberately leaves out
34
+
35
+ - Remote or production database provisioning.
36
+ - Automatic upgrades, container replacement, volume removal, database resets and test cleanup policy.
37
+ - An application database catalogue, schema authoring, migrations and seeds.
38
+ - Query composition, connection pooling, repository APIs or an Effect runtime owner.
39
+ - A configurable multi-service process manager.
40
+
41
+ The [package roadmap](./roadmap.md) owns implementation work and open decisions. The [framework roadmap](https://github.com/ShivaeDev/platform/blob/main/docs/framework/roadmap.md) owns composed database fixtures and host-level validation.
@@ -0,0 +1,22 @@
1
+ # Roadmap
2
+
3
+ This file owns local service preparation, its command paths and package API questions. The [framework roadmap](https://github.com/ShivaeDev/platform/blob/main/docs/framework/roadmap.md) owns composed repository and migration fixtures, application adoption and host-level validation. Their completion status is recorded there rather than repeated here.
4
+
5
+ ## Built
6
+
7
+ - [x] The main setup module exposes an explicit local server URL, application name validation, service preparation, missing-database preparation and SQL execution.
8
+ - [x] Tests reject a remote database host, the wrong port, an unapproved database name and a `host` query redirect. All three setup functions reject remote database targets before connecting.
9
+ - [x] A real PostgreSQL test retains an inserted row across repeated preparation and checks PostgreSQL 18.6, including queries whose URLs carry `schema` and `connection_limit` settings.
10
+ - [x] The remote `DOCKER_HOST` rejection test checks that SSH and non-loopback TCP endpoints fail before a Docker operation.
11
+ - [x] The installed consumer fixture checks the main module's exports and types.
12
+
13
+ ## Next
14
+
15
+ - [ ] Add focused command-path tests for host-client absence, container client selection, container start/create, image mismatch and exact service-version mismatch. The real preservation test does not prove these branches.
16
+ - [ ] Extend destination tests to each redirected connection parameter and invalid database name, and Docker tests to context selection and local endpoint variants.
17
+ - [ ] Establish whether parallel setup needs coordinated creation of an absent database; keep application test startup ordered until there is evidence for another contract.
18
+
19
+ ## Open questions
20
+
21
+ - Should `localPostgres(environment)` configure the environment of its Docker subprocesses, or only validate it? The implementation validates the supplied settings while Docker commands inherit the process environment. The README therefore asks callers to pass the actual process settings. Selecting a different context through the argument would need an explicit API decision and tests.
22
+ - Should `docker`, `startContainer` and `sqlInContainer` be supported standalone public APIs? The package's wildcard module exports expose them, while the usage examples and installed consumer fixture use `localPostgres.ts`. Narrowing the exports would change the public API; supporting the helpers would need direct consumer and command-path tests.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shivaedev/local-postgres",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "Repeatable local PostgreSQL preparation with one shared persistent service",
5
5
  "homepage": "https://github.com/ShivaeDev/platform/tree/main/packages/local-postgres#readme",
6
6
  "bugs": {
@@ -15,34 +15,38 @@
15
15
  "sideEffects": false,
16
16
  "type": "module",
17
17
  "imports": {
18
- "#test/*": "./test/*",
18
+ "#test/*": "./src/test-support/*",
19
19
  "#*.ts": {
20
- "source": "./src/*.ts",
21
- "types": "./dist/*.d.ts",
22
- "default": "./dist/*.js"
20
+ "source": "./src/server/*.ts",
21
+ "types": "./dist/server/*.d.ts",
22
+ "default": "./dist/server/*.js"
23
23
  }
24
24
  },
25
25
  "exports": {
26
- ".": {
27
- "types": "./dist/index.d.ts",
28
- "source": "./src/index.ts",
29
- "import": "./dist/index.js",
30
- "default": "./dist/index.js"
26
+ "./*.ts": {
27
+ "types": "./dist/server/*.d.ts",
28
+ "source": "./src/server/*.ts",
29
+ "import": "./dist/server/*.js",
30
+ "default": "./dist/server/*.js"
31
31
  },
32
32
  "./package.json": "./package.json"
33
33
  },
34
34
  "files": [
35
35
  "dist",
36
36
  "src",
37
+ "!src/**/*.test.ts",
38
+ "!src/**/*.spec.ts",
39
+ "!src/**/test-support",
40
+ "docs",
37
41
  "CHANGELOG.md",
38
42
  "README.md"
39
43
  ],
40
44
  "devDependencies": {
41
- "@shivaedev/quality": "0.7.3",
42
- "@types/node": "24.10.1",
45
+ "@shivaedev/quality": "0.20.0",
46
+ "@types/node": "24.19.1",
43
47
  "@typescript/native": "npm:typescript@7.0.2",
44
48
  "typescript": "npm:@typescript/typescript6@6.0.2",
45
- "vitest": "4.1.9"
49
+ "vitest": "5.0.3"
46
50
  },
47
51
  "engines": {
48
52
  "node": ">=24"
@@ -52,7 +56,7 @@
52
56
  "provenance": true
53
57
  },
54
58
  "scripts": {
55
- "build": "node --eval \"import('node:fs').then(({ rmSync }) => rmSync('dist', { force: true, recursive: true }))\" && tsc6 --project tsconfig.build.json",
59
+ "build": "node --eval \"import('node:fs').then(({ rmSync }) => rmSync('dist', { force: true, recursive: true }))\" && tsc --project tsconfig.build.json",
56
60
  "ready": "pnpm typecheck && pnpm test && pnpm build",
57
61
  "test": "vitest run",
58
62
  "typecheck": "tsc --noEmit"
@@ -1,6 +1,6 @@
1
1
  import { type ExecFileSyncOptionsWithStringEncoding, execFileSync } from "node:child_process";
2
2
 
3
- export type DockerEnvironment = Readonly<{ DOCKER_CONTEXT?: string | undefined; DOCKER_HOST?: string | undefined }>;
3
+ export type DockerEnvironment = Readonly<{ "DOCKER_CONTEXT"?: string | undefined; "DOCKER_HOST"?: string | undefined }>;
4
4
 
5
5
  export function docker(
6
6
  environment: DockerEnvironment,
@@ -19,8 +19,9 @@ export function assertLocalDatabase(value: string, names: readonly string[]) {
19
19
  }
20
20
 
21
21
  export function localPostgres(environment: DockerEnvironment) {
22
- const localDocker = (args: readonly string[], options: ExecFileSyncOptionsWithStringEncoding = { encoding: "utf8" }) =>
23
- docker(environment, args, options);
22
+ function localDocker(args: readonly string[], options: ExecFileSyncOptionsWithStringEncoding = { encoding: "utf8" }) {
23
+ return docker(environment, args, options);
24
+ }
24
25
  function sql(value: string | URL, query: string) {
25
26
  const url = new URL(value);
26
27
  assertLocalDatabase(url.toString(), [url.pathname.slice(1)]);
@@ -52,7 +53,7 @@ export function localPostgres(environment: DockerEnvironment) {
52
53
  version = sql(server, "SHOW server_version");
53
54
  } catch {
54
55
  startContainer(localDocker);
55
- for (let attempt = 0; attempt < 30; attempt++) {
56
+ for (let attempt = 0; attempt < 30; attempt += 1) {
56
57
  try {
57
58
  version = sql(server, "SHOW server_version");
58
59
  break;
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAU,MAAM,mBAAmB,CAAC;AAEnE,eAAO,MAAM,WAAW,mDAAmD,CAAC;AAE5E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,qBAY1E;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,iBAAiB;+BAgDzB,SAAS,MAAM,EAAE;iBA7C/B,MAAM,GAAG,GAAG,SAAS,MAAM;;EAiE/C"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8C,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,cA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I,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC3C,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;YACjD,CAAC;QACF,CAAC;QACD,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACzB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC5B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;YAC3B,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACnC,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;YAC5B,MAAM,CAAC,QAAQ,GAAG,WAAW,CAAC;YAC9B,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,8CAA8C,IAAI,GAAG,CAAC,EAAE,CAAC;gBACzE,GAAG,CAAC,MAAM,EAAE,oBAAoB,IAAI,GAAG,CAAC,CAAC;YAC1C,CAAC;QACF,CAAC;IACF,CAAC;IACD,OAAO,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,EAAE,CAAC;AACjD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-container.d.ts","sourceRoot":"","sources":["../src/local-container.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,oBAAoB,CAAC;AAIhF,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,qCAAqC,KAAK,MAAM,CAAC;AAEnG,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,qCAAqC,UAY/H;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,QA6B5C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-container.js","source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C,QAAQ,GAAG,IAAI,CAAC;IACjB,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IACV,IAAI,QAAQ,EAAE,CAAC;QACd,IAAI,MAAM,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,mBAAmB,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK,EAAE,CAAC;YACtF,MAAM,IAAI,KAAK,CAAC,wGAAwG,CAAC,CAAC;QAC3H,CAAC;QACD,MAAM,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;IAC9B,CAAC;SAAM,CAAC;QACP,MAAM,CAAC;YACN,KAAK;YACL,UAAU;YACV,QAAQ;YACR,SAAS;YACT,WAAW;YACX,sBAAsB;YACtB,OAAO;YACP,wBAAwB;YACxB,OAAO;YACP,4BAA4B;YAC5B,SAAS;YACT,8DAA8D;YAC9D,KAAK;SACL,CAAC,CAAC;IACJ,CAAC;AACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-docker.d.ts","sourceRoot":"","sources":["../src/local-docker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qCAAqC,EAAgB,MAAM,oBAAoB,CAAC;AAE9F,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IAAE,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC,CAAC;AAEpH,wBAAgB,MAAM,CACrB,WAAW,EAAE,iBAAiB,EAC9B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,GAAE,qCAA4D,UAmBrE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-docker.js","sourceRoot":"","sources":["../src/local-docker.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8C,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAI9F,MAAM,UAAU,MAAM,CACrB,WAA8B,EAC9B,IAAuB,EACvB,UAAiD,EAAE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