pgpm 0.2.3 β†’ 0.2.5

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.
Files changed (2) hide show
  1. package/README.md +30 -93
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -13,9 +13,6 @@
13
13
  - 🐘 **Portable Postgres Development** β€” Rely on standard SQL migrations for a workflow that runs anywhere Postgres does.
14
14
  - πŸš€ **Turnkey Module-First Workspaces** β€” `pgpm init` delivers a ready-to-code Postgres workspace with CI/CD, Docker, end-to-end testing, and modern TS tooling.
15
15
 
16
-
17
- Here’s a version that keeps it **light**, **simple**, and **zero-fluff**, but still feels tight and confident:
18
-
19
16
  ## πŸš€ Quick Start
20
17
 
21
18
  ### Install & Setup
@@ -33,7 +30,7 @@ eval "$(pgpm env)"
33
30
 
34
31
  ---
35
32
 
36
- ### Create Your First Project
33
+ ### Create a Workspace and Install a Package
37
34
 
38
35
  ```bash
39
36
  # 1. Create a workspace
@@ -42,12 +39,15 @@ cd my-app
42
39
 
43
40
  # 2. Create your first module
44
41
  pgpm init
42
+ cd packages/your-module
45
43
 
46
- # 3. Add a database change
47
- pgpm add some_change
44
+ # 3. Install a package
45
+ pgpm install @pgpm/faker
48
46
 
49
47
  # 4. Deploy everything
50
- pgpm deploy --createdb
48
+ pgpm deploy --createdb --database mydb1
49
+ psql -d mydb1 -c "SELECT faker.city('MI');"
50
+ > Ann Arbor
51
51
  ```
52
52
 
53
53
  ## πŸ› οΈ Commands
@@ -101,7 +101,7 @@ pgpm deploy --createdb
101
101
 
102
102
  ## πŸ’‘ Common Workflows
103
103
 
104
- ### Starting a New Project
104
+ ### Starting a New Project and Adding a Change
105
105
 
106
106
  ```bash
107
107
  # 1. Create workspace
@@ -110,6 +110,7 @@ cd my-app
110
110
 
111
111
  # 2. Create your first module
112
112
  pgpm init
113
+ cd packages/new-module
113
114
 
114
115
  # 3. Add some SQL migrations to sql/ directory
115
116
  pgpm add some_change
@@ -121,14 +122,16 @@ pgpm deploy --createdb
121
122
  ### Working with Existing Projects
122
123
 
123
124
  ```bash
124
- # 1. Clone and enter project
125
- git clone <repo> && cd <project>
125
+ # 1. Navigate to your module
126
+ cd packages/your-module
126
127
 
127
- # 2. Install dependencies
128
- pgpm install
128
+ # 2. Install a package
129
+ pgpm install @pgpm/faker
129
130
 
130
- # 3. Deploy to local database
131
- pgpm deploy --createdb
131
+ # 3. Deploy all installed modules
132
+ pgpm deploy --createdb --database mydb1
133
+ psql -d mydb1 -c "SELECT faker.city('MI');"
134
+ > Ann Arbor
132
135
  ```
133
136
 
134
137
  ### Testing a pgpm module in a workspace
@@ -289,89 +292,18 @@ pgpm kill
289
292
  pgpm kill --no-drop
290
293
  ```
291
294
 
292
- ## πŸ’‘ Common Workflows
293
-
294
- ### Starting a New Project
295
-
296
- ```bash
297
- # 1. Create workspace
298
- mkdir my-app && cd my-app
299
- pgpm init --workspace
300
-
301
- # 2. Create your first module
302
- pgpm init
303
-
304
- # 3. Add some SQL migrations to sql/ directory
305
- # 4. Deploy to database
306
- pgpm deploy --createdb
307
-
308
- # 5. Start developing
309
- pgpm server
310
- ```
311
-
312
- ### Using Custom Templates
313
-
314
- You can use custom templates from GitHub repositories or local paths:
315
-
316
- ```bash
317
- # Initialize workspace with templates from GitHub
318
- pgpm init --workspace --repo owner/repo
319
-
320
- # Initialize workspace with templates from local path
321
- pgpm init --workspace --template-path ./my-custom-templates
322
-
323
- # Initialize module with custom templates
324
- pgpm init --template-path ./my-custom-templates
325
-
326
- # Use specific branch from GitHub repository
327
- pgpm init --workspace --repo owner/repo --from-branch develop
328
- ```
329
-
330
- **Template Structure:**
331
- Custom templates should follow the same structure as the default templates:
332
-
333
- - For workspace: `boilerplates/workspace/` directory
334
- - For module: `boilerplates/module/` directory
335
- - Or provide direct path to `workspace/` or `module/` directory
336
-
337
- ### Working with Existing Projects
338
-
339
- ```bash
340
- # 1. Clone and enter project
341
- git clone <repo> && cd <project>
342
-
343
- # 2. Install dependencies
344
- pgpm install
345
-
346
- # 3. Deploy to local database
347
- pgpm deploy --createdb
295
+ ## βš™οΈ Configuration
348
296
 
349
- # 4. Start development server
350
- pgpm server
351
- ```
297
+ ### Environment Variables
352
298
 
353
- ### Production Deployment
299
+ `pgpm` uses standard PostgreSQL environment variables (`PGHOST`, `PGPORT`, `PGDATABASE`, `PGUSER`, `PGPASSWORD`).
354
300
 
301
+ **Quick setup** (recommended):
355
302
  ```bash
356
- # 1. Create deployment plan
357
- pgpm plan
358
-
359
- # 2. Package module
360
- pgpm package
361
-
362
- # 3. Deploy to production
363
- pgpm deploy --package myapp --to @production
364
-
365
- # 4. Verify deployment
366
- pgpm verify --package myapp
303
+ eval "$(pgpm env)"
367
304
  ```
368
305
 
369
- ## βš™οΈ Configuration
370
-
371
- ### Environment Variables
372
-
373
- LaunchQL respects standard PostgreSQL environment variables:
374
-
306
+ **Manual setup** (if you prefer):
375
307
  ```bash
376
308
  export PGHOST=localhost
377
309
  export PGPORT=5432
@@ -380,7 +312,12 @@ export PGUSER=postgres
380
312
  export PGPASSWORD=password
381
313
  ```
382
314
 
383
- ## πŸ†˜ Getting Help
315
+ **Supabase local development:**
316
+ ```bash
317
+ eval "$(pgpm env --supabase)"
318
+ ```
319
+
320
+ ## Getting Help
384
321
 
385
322
  ### Command Help
386
323
 
@@ -390,7 +327,7 @@ pgpm --help
390
327
 
391
328
  # Command-specific help
392
329
  pgpm deploy --help
393
- pgpm server -h
330
+ pgpm tag -h
394
331
  ```
395
332
 
396
333
  ### Common Options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgpm",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "author": "Dan Lynch <pyramation@gmail.com>",
5
5
  "description": "PostgreSQL Package Manager - Database migration and package management CLI",
6
6
  "main": "index.js",
@@ -70,5 +70,5 @@
70
70
  "pg",
71
71
  "pgsql"
72
72
  ],
73
- "gitHead": "6fc8eb0f1fdf69575f7198708121e4f43134c965"
73
+ "gitHead": "cdcef66768541f6ca352d89e52fe33e8cc0c8ff0"
74
74
  }