@schemavaults/dbh 0.8.6 → 0.8.8

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.
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+ if [ ! -d "node_modules" ]; then
3
+ echo "No node_modules/ folder appears to exist so we're going to install dependencies..."
4
+ bun install
5
+ fi
@@ -0,0 +1,15 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": ".claude/hooks/install-deps-in-fresh-environment.sh"
10
+ }
11
+ ]
12
+ }
13
+ ]
14
+ }
15
+ }
package/README.md CHANGED
@@ -20,7 +20,7 @@ Ensure that you have both `postgres` and a `postgres-ws-proxy` containers runnin
20
20
 
21
21
  You'll likely want to replace the `build:` sections for the services in the e2e test example `.yml` file with `image:`. For example, use `image: postgres:17.7` for the `postgres` service. For the proxy, you can pull the docker image from `ghcr.io/schemavaults/dbh/postgres-ws-proxy`; use the version number equal to your `@schemavaults/dbh` npm package installation:
22
22
  ```md
23
- # NPM Package: @schemavaults/dbh@0.8.6 => ghcr.io/schemavaults/dbh/postgres-ws-proxy:0.8.6
23
+ # NPM Package: @schemavaults/dbh@0.8.8 => ghcr.io/schemavaults/dbh/postgres-ws-proxy:0.8.8
24
24
  ```
25
25
 
26
26
  ### In your application server code
@@ -36,7 +36,7 @@ You may need to define a custom `WsProxyUrlGenerator` function to determine how
36
36
  #### CLI Help Command
37
37
  ```bash
38
38
  # run migrations (and more) from the cli
39
- bunx @schemavaults/dbh --help
39
+ npx @schemavaults/dbh --help
40
40
  # or `bun run cli --help` if you have the dbh source repository as your working directory
41
41
  ```
42
42
 
@@ -44,11 +44,14 @@ bunx @schemavaults/dbh --help
44
44
  ```bash
45
45
  mkdir ./tests/tmp
46
46
 
47
- # compile TypeScript Kysely migrations to JavaScript
47
+ # compile TypeScript Kysely migrations to JavaScript (Bun is used for building migrations)
48
48
  bunx @schemavaults/dbh build-db-migrations ./src/tests/example-migrations \
49
49
  --outdir ./tests/tmp/example-compiled-migrations \
50
50
  --sql-module ./src/sql.ts \
51
51
  --sql-outdir ./tests/tmp/
52
+
53
+ # apply built migrations to database (NodeJS is used for applying migrations)
54
+ npx @schemavaults/dbh migrate ./tests/tmp/example-compiled-migrations --environment production --env-file ./.env.production
52
55
 
53
56
  rm -rf ./tests/tmp
54
57
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schemavaults/dbh",
3
- "version": "0.8.6",
3
+ "version": "0.8.8",
4
4
  "description": "Easily connect to PostgresDB from serverless environment",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,