{"_id":"@bostrino/db","_rev":"5-8809a97d16b3cbde4591fcfe1d6a4082","name":"@bostrino/db","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@bostrino/db","version":"0.1.0","_id":"@bostrino/db@0.1.0","maintainers":[{"name":"brianmca","email":"brianmca@gmail.com"}],"dist":{"shasum":"b870d2e7edda1c0ec5be99c467c8e149599c0d2f","tarball":"https://registry.npmjs.org/@bostrino/db/-/db-0.1.0.tgz","fileCount":48,"integrity":"sha512-dHoqNsdglORWjgWuENTW30zUdesc4xiQI8sgnNk/Y5/x0b8mRiNS/nQCsrTNGPBzpK8vrkfeurZrIcTtQhQhlQ==","signatures":[{"sig":"MEUCIQC/zRKJRjraQosz5B9btXABkmYKzJWde/sX3+qdjj78kgIgWg5QBM8kaLMbDMh/XcetQ7qSeZDfvdBlQ3aiXM4NJ2I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63529},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":"22.23.2"},"gitHead":"3a69b27eb15bf7390b1b44bcd7a03fcfcb51b526","scripts":{"test":"npm run build && node --test dist/provision.test.js dist/buildLedger.test.js dist/isolation.test.js","build":"tsc -p tsconfig.json","migrate":"npm run build && node dist/scripts/run-migrate.js","set-build-ceiling":"npm run build && node dist/scripts/set-build-ceiling.js","sweep-conformance-branches":"npm run build && node dist/scripts/sweep-conformance-branches.js","provision-conformance-fixture":"npm run build && node dist/scripts/provision-conformance-fixture.js"},"_npmUser":{"name":"brianmca","email":"brianmca@gmail.com"},"_npmVersion":"11.10.0","description":"Bostrino platform: pooled/direct Postgres clients, schema-per-app provisioning, and the migration runner.","directories":{},"_nodeVersion":"24.19.0","dependencies":{"pg":"8.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.18.0","devDependencies":{"@types/pg":"8.20.3","typescript":"7.0.2","@types/node":"22.20.1"},"_npmOperationalInternal":{"tmp":"tmp/db_0.1.0_1786400066233_0.38077382426787354","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bostrino/db","version":"0.1.1","_id":"@bostrino/db@0.1.1","maintainers":[{"name":"brianmca","email":"brianmca@gmail.com"}],"dist":{"shasum":"0447d971c5e3e22b58622e7eb081d9d5ec2584b7","tarball":"https://registry.npmjs.org/@bostrino/db/-/db-0.1.1.tgz","fileCount":82,"integrity":"sha512-+PgXwjpYjPdn4yqOrO/rKfnCWtdL7rtM4OcwI6MA21N1a8h3Bz+7zlyhneH7J+3os8eDDAPA3Bn1eD1mrOU3Ww==","signatures":[{"sig":"MEYCIQDPrGmYQ0NFZOrtvtq8+pI31m011bN7pzFnguGniw1MUwIhAJY8rDOgb+j6MqMuahrA/QhCKnw0PXrvd+xCn/WFRsy9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":169596},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":"22.23.2"},"gitHead":"038a5ef32a1a8a464433e247dae80d0620860954","scripts":{"test":"npm run build && node --test dist/provision.test.js dist/migrate.test.js dist/buildLedger.test.js dist/isolation.test.js dist/appSecrets.test.js dist/appRegistry.test.js dist/buildRequests.test.js dist/buildQueue.test.js dist/buildProgress.test.js","build":"tsc -p tsconfig.json","migrate":"npm run build && node dist/scripts/run-migrate.js","set-build-ceiling":"npm run build && node dist/scripts/set-build-ceiling.js","sweep-conformance-branches":"npm run build && node dist/scripts/sweep-conformance-branches.js","provision-conformance-fixture":"npm run build && node dist/scripts/provision-conformance-fixture.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c6ad9f19-b037-4639-853a-10c91754b04b"}},"_npmVersion":"12.0.2","description":"Bostrino platform: pooled/direct Postgres clients, schema-per-app provisioning, and the migration runner.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"pg":"8.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.18.0","devDependencies":{"@types/pg":"8.20.3","typescript":"7.0.2","@types/node":"22.20.1"},"_npmOperationalInternal":{"tmp":"tmp/db_0.1.1_1787566866552_0.5690695592655888","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bostrino/db","version":"0.1.2","_id":"@bostrino/db@0.1.2","maintainers":[{"name":"brianmca","email":"brianmca@gmail.com"}],"dist":{"shasum":"93dcf326a99c533d46a0ac81749b59ce0c00397e","tarball":"https://registry.npmjs.org/@bostrino/db/-/db-0.1.2.tgz","fileCount":112,"integrity":"sha512-vlQTWQc4CqXqa9Lh45gW9KiOP1iyBiCbQRWXnWVoInyIpx/s25vFIzYXGnb2xDh2JAjqAwkyOgG42s1a1OkFyQ==","signatures":[{"sig":"MEUCIA9Bzh5ABDsjqLjw9xnC9TE810CC1TwNtOq7euBKGIg2AiEA5CRiQ7EY7MVk3+9OYUCFbXGDzcWTi1J3a0HEh+gfrg8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":269147},"main":"./dist/index.js","type":"module","_from":"file:pack-out/bostrino-db-0.1.2.tgz","types":"./dist/index.d.ts","engines":{"node":"22.23.2"},"scripts":{"test":"npm run build && node --test dist/provision.test.js dist/migrate.test.js dist/buildLedger.test.js dist/isolation.test.js dist/appSecrets.test.js dist/appRegistry.test.js dist/appGrants.test.js dist/appMemberships.test.js dist/buildRequests.test.js dist/buildQueue.test.js dist/buildProgress.test.js dist/planTurns.test.js dist/planTurnQueue.test.js","build":"tsc -p tsconfig.json","migrate":"npm run build && node dist/scripts/run-migrate.js","set-build-ceiling":"npm run build && node dist/scripts/set-build-ceiling.js","sweep-conformance-branches":"npm run build && node dist/scripts/sweep-conformance-branches.js","provision-conformance-fixture":"npm run build && node dist/scripts/provision-conformance-fixture.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c6ad9f19-b037-4639-853a-10c91754b04b"}},"_resolved":"/home/runner/work/bostrino-platform/bostrino-platform/packages/db/pack-out/bostrino-db-0.1.2.tgz","_integrity":"sha512-vlQTWQc4CqXqa9Lh45gW9KiOP1iyBiCbQRWXnWVoInyIpx/s25vFIzYXGnb2xDh2JAjqAwkyOgG42s1a1OkFyQ==","_npmVersion":"12.0.2","description":"Bostrino platform: pooled/direct Postgres clients, schema-per-app provisioning, and the migration runner.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"pg":"8.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"8.20.3","typescript":"7.0.2","@types/node":"22.20.1"},"_npmOperationalInternal":{"tmp":"tmp/db_0.1.2_1788097921976_0.35434504248414656","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@bostrino/db","version":"0.1.3","_id":"@bostrino/db@0.1.3","maintainers":[{"name":"brianmca","email":"brianmca@gmail.com"}],"dist":{"shasum":"33b4cc1ffb5860612a2bd439d6e02bfb609cba82","tarball":"https://registry.npmjs.org/@bostrino/db/-/db-0.1.3.tgz","fileCount":140,"integrity":"sha512-Am7ZoVYtPsYAu0ORRySA7KJS5svFcSrVaqXBukgfy6yIsMnyyI5kqOdZL44vOBXPxOaCpENyP6GzJaVLPfZfUg==","signatures":[{"sig":"MEUCIQC4q0PIUWARm0NE2TxO4SLMo7WZoEOjins1gsgOm/jLiQIgLe0qeQjJAMPz2OEzpNyN4+GxAgUDiiaC+Lpu7mjCKvs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIGYEdcTv8tzlw1fg8835ch106NsdSb0l3CmM2t9i3NnRAiAiEYWtCiSoXVjlb5ky4RMGnmVWEPzjMF7+GnGyhEKkbQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":381130},"main":"./dist/index.js","type":"module","_from":"file:pack-out/bostrino-db-0.1.3.tgz","types":"./dist/index.d.ts","engines":{"node":"22.23.2"},"scripts":{"test":"npm run build && node --test dist/provision.test.js dist/prototypeTurns.test.js dist/migrate.test.js dist/buildLedger.test.js dist/isolation.test.js dist/appSecrets.test.js dist/appRegistry.test.js dist/appGrants.test.js dist/appMemberships.test.js dist/buildRequests.test.js dist/buildQueue.test.js dist/buildProgress.test.js dist/planTurns.test.js dist/planTurnQueue.test.js dist/inProgressApps.test.js dist/instanceStyle.test.js","build":"tsc -p tsconfig.json","migrate":"npm run build && node dist/scripts/run-migrate.js","set-build-ceiling":"npm run build && node dist/scripts/set-build-ceiling.js","sweep-conformance-branches":"npm run build && node dist/scripts/sweep-conformance-branches.js","provision-conformance-fixture":"npm run build && node dist/scripts/provision-conformance-fixture.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c6ad9f19-b037-4639-853a-10c91754b04b"}},"_resolved":"/home/runner/work/bostrino-platform/bostrino-platform/packages/db/pack-out/bostrino-db-0.1.3.tgz","_integrity":"sha512-Am7ZoVYtPsYAu0ORRySA7KJS5svFcSrVaqXBukgfy6yIsMnyyI5kqOdZL44vOBXPxOaCpENyP6GzJaVLPfZfUg==","_npmVersion":"12.1.0","description":"Bostrino platform: pooled/direct Postgres clients, schema-per-app provisioning, and the migration runner.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"pg":"8.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"8.20.3","typescript":"7.0.2","@types/node":"22.20.1"},"_npmOperationalInternal":{"tmp":"tmp/db_0.1.3_1790111013602_0.06942322422649205","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"_id":"@bostrino/db@0.1.4","dist":{"shasum":"155300bd1a518f5c52a98ac742eab533499fb772","tarball":"https://registry.npmjs.org/@bostrino/db/-/db-0.1.4.tgz","fileCount":140,"integrity":"sha512-r3ix/smS+jpQwAe6wE1GBgbgZ6Vm0fbog0reVYC3iYgjJBcCMOZmTFDjC42Sc0m55pyQSgDhGk/vY0eqmiNm8Q==","signatures":[{"sig":"MEUCIC/6PfIxMI1yrIR8/KFYDaaZ6aWN5kh24rBmpH0KLU20AiEA6F8scNn81n/8M7Ny+ox1KibPjugU9f3EMdjoTmCJZzk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCCKDPFaU17Bs8J3hP3ARRDA7NSY+UMjHg1xVn55RxyzAIgHTazI33VRIil+hS4hb54TT2u/loN8l94UUSuVCZH5fg="}],"unpackedSize":389291},"main":"./dist/index.js","name":"@bostrino/db","type":"module","_from":"file:pack-out/bostrino-db-0.1.4.tgz","types":"./dist/index.d.ts","engines":{"node":"22.23.2"},"scripts":{"test":"npm run build && node --test dist/provision.test.js dist/prototypeTurns.test.js dist/migrate.test.js dist/buildLedger.test.js dist/isolation.test.js dist/appSecrets.test.js dist/appRegistry.test.js dist/appGrants.test.js dist/appMemberships.test.js dist/buildRequests.test.js dist/buildQueue.test.js dist/buildProgress.test.js dist/planTurns.test.js dist/planTurnQueue.test.js dist/inProgressApps.test.js dist/instanceStyle.test.js","build":"tsc -p tsconfig.json","migrate":"npm run build && node dist/scripts/run-migrate.js","set-build-ceiling":"npm run build && node dist/scripts/set-build-ceiling.js","sweep-conformance-branches":"npm run build && node dist/scripts/sweep-conformance-branches.js","provision-conformance-fixture":"npm run build && node dist/scripts/provision-conformance-fixture.js"},"version":"0.1.4","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c6ad9f19-b037-4639-853a-10c91754b04b"}},"_resolved":"/home/runner/work/bostrino-platform/bostrino-platform/packages/db/pack-out/bostrino-db-0.1.4.tgz","_integrity":"sha512-r3ix/smS+jpQwAe6wE1GBgbgZ6Vm0fbog0reVYC3iYgjJBcCMOZmTFDjC42Sc0m55pyQSgDhGk/vY0eqmiNm8Q==","_npmVersion":"12.1.0","description":"Bostrino platform: pooled/direct Postgres clients, schema-per-app provisioning, and the migration runner.","directories":{},"maintainers":[{"name":"brianmca","email":"brianmca@gmail.com"}],"_nodeVersion":"22.23.2","dependencies":{"pg":"8.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/pg":"8.20.3","typescript":"7.0.2","@types/node":"22.20.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/db_0.1.4_1790190224265_0.15447753565261357"}}},"time":{"created":"2026-08-10T22:14:26.071Z","modified":"2026-09-23T19:03:44.583Z","0.1.0":"2026-08-10T22:14:26.386Z","0.1.1":"2026-08-24T10:21:06.684Z","0.1.2":"2026-08-30T13:52:02.143Z","0.1.3":"2026-09-22T21:03:33.690Z","0.1.4":"2026-09-23T19:03:44.341Z"},"description":"Bostrino platform: pooled/direct Postgres clients, schema-per-app provisioning, and the migration runner.","maintainers":[{"name":"brianmca","email":"brianmca@gmail.com"}],"readme":"# @bostrino/db\n\nConnection client, migration runner, and schema/role provisioning helpers for the `bostrino-one` Neon project.\n\n## Neon project\n\n- Org: `Bostrino` (`org-late-lake-43545426`)\n- Project: `bostrino-one` (`nameless-shadow-28494287`), region `aws-eu-central-1`, Postgres 17\n- Owner role: `neondb_owner` — the migration credential. Full `neon_superuser` membership (`CREATEROLE`, `CREATEDB`, etc). Used only over the direct connection, only by `pnpm migrate`, never by the deployed app.\n\n### Branches\n\n- **`main`** — the real database. `bostrino-one-run`'s `role_platform` connects here over the pooled endpoint. Migrations are applied here explicitly (`pnpm migrate -- --branch main`).\n- **`dev`** — created for the future build machine (see the architecture table in the root `README.md`: the build machine reaches \"Neon dev branch only\"). **Not wired into anything yet** — no migrations run against it, nothing reads or writes to it. It exists now so the build machine's eventual isolation (no production secrets, no production database) has a real branch to target instead of being designed against a placeholder.\n\nEphemeral branches (`isolation-test-<timestamp>`, created and destroyed automatically by `src/isolation.test.ts`) are not listed here — they don't outlive a single test run.\n\n## Migrations\n\n```\npnpm migrate -- --branch <name> [--push-fly-secret]\n```\n\n- `--branch` is required, always. There is no default, so it's structurally impossible to hit the wrong target by omission.\n- The direct/migration connection string is fetched live from the `neon` CLI for the given branch and role (default `neondb_owner`) — it is never stored in a file or env var for this path.\n- `--push-fly-secret` only matters the first time `role_platform` (or a future app role) is created — it pushes the freshly generated password straight to `fly secrets set` on `bostrino-one-run`, entirely in-memory, never printed. Omit it to just apply schema/role changes without touching Fly.\n- Re-running is always safe — already-applied migrations are skipped (tracked in `public.schema_migrations`).\n\nFor local development against your own branch instead of `bostrino-one`, copy `.env.example` to `.env.local` and set `MIGRATION_DATABASE_URL` there.\n\n## Tests\n\n`pnpm test` runs the pure unit tests (`provision.test.ts`) plus `isolation.test.ts`, which requires the `neon` CLI to be authenticated in the running environment — it creates a real ephemeral Neon branch, proves the five isolation assertions against it, and deletes the branch afterward regardless of outcome. It never touches `main`.\n","readmeFilename":"README.md"}