pgpm 4.13.0 → 4.14.0

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.
@@ -8,8 +8,7 @@ Docker Command:
8
8
  pgpm docker <subcommand> [OPTIONS]
9
9
 
10
10
  Manage Docker containers for local development.
11
- PostgreSQL is always started by default. Additional services can be
12
- included with the --include flag.
11
+ PostgreSQL is always started by default.
13
12
 
14
13
  Subcommands:
15
14
  start Start containers
@@ -24,23 +23,22 @@ PostgreSQL Options:
24
23
  --password <pass> PostgreSQL password (default: password)
25
24
  --shm-size <size> Shared memory size for container (default: 2g)
26
25
 
26
+ Additional Services:
27
+ --minio Include MinIO S3-compatible object storage (port 9000)
28
+
27
29
  General Options:
28
30
  --help, -h Show this help message
29
31
  --recreate Remove and recreate containers on start
30
- --include <svc> Include additional service (can be repeated)
31
-
32
- Available Additional Services:
33
- minio MinIO S3-compatible object storage (port 9000)
34
32
 
35
33
  Examples:
36
34
  pgpm docker start Start PostgreSQL only
37
- pgpm docker start --include minio Start PostgreSQL + MinIO
35
+ pgpm docker start --minio Start PostgreSQL + MinIO
38
36
  pgpm docker start --port 5433 Start on custom port
39
37
  pgpm docker start --shm-size 4g Start with 4GB shared memory
40
38
  pgpm docker start --recreate Remove and recreate containers
41
- pgpm docker start --recreate --include minio Recreate PostgreSQL + MinIO
39
+ pgpm docker start --recreate --minio Recreate PostgreSQL + MinIO
42
40
  pgpm docker stop Stop PostgreSQL
43
- pgpm docker stop --include minio Stop PostgreSQL + MinIO
41
+ pgpm docker stop --minio Stop PostgreSQL + MinIO
44
42
  pgpm docker ls List services and status
45
43
  `;
46
44
  const ADDITIONAL_SERVICES = {
@@ -253,24 +251,10 @@ async function startService(service, recreate) {
253
251
  async function stopService(service) {
254
252
  await stopContainer(service.name);
255
253
  }
256
- function parseInclude(args) {
257
- const include = args.include;
258
- if (!include)
259
- return [];
260
- if (Array.isArray(include))
261
- return include;
262
- if (typeof include === 'string')
263
- return [include];
264
- return [];
265
- }
266
- function resolveIncludedServices(includeNames) {
254
+ function resolveServiceFlags(args) {
267
255
  const services = [];
268
- for (const name of includeNames) {
269
- const service = ADDITIONAL_SERVICES[name];
270
- if (!service) {
271
- console.warn(`⚠️ Unknown service: "${name}". Available: ${Object.keys(ADDITIONAL_SERVICES).join(', ')}`);
272
- }
273
- else {
256
+ for (const [key, service] of Object.entries(ADDITIONAL_SERVICES)) {
257
+ if (args[key] === true || typeof args[key] === 'string') {
274
258
  services.push(service);
275
259
  }
276
260
  }
@@ -288,7 +272,7 @@ async function listServices() {
288
272
  else {
289
273
  console.log(' postgres constructiveio/postgres-plus:18 \x1b[90m(docker not available)\x1b[0m');
290
274
  }
291
- console.log('\n Additional (use --include <name>):');
275
+ console.log('\n Additional (use --<name> flag):');
292
276
  for (const [key, service] of Object.entries(ADDITIONAL_SERVICES)) {
293
277
  if (dockerAvailable) {
294
278
  const running = await isContainerRunning(service.name);
@@ -322,8 +306,7 @@ exports.default = async (argv, _prompter, _options) => {
322
306
  const password = args.password || 'password';
323
307
  const shmSize = args['shm-size'] || args.shmSize || '2g';
324
308
  const recreate = args.recreate === true;
325
- const includeNames = parseInclude(args);
326
- const includedServices = resolveIncludedServices(includeNames);
309
+ const includedServices = resolveServiceFlags(args);
327
310
  switch (subcommand) {
328
311
  case 'start':
329
312
  await startContainer({ name, image, port, user, password, shmSize, recreate });
@@ -6,8 +6,7 @@ Docker Command:
6
6
  pgpm docker <subcommand> [OPTIONS]
7
7
 
8
8
  Manage Docker containers for local development.
9
- PostgreSQL is always started by default. Additional services can be
10
- included with the --include flag.
9
+ PostgreSQL is always started by default.
11
10
 
12
11
  Subcommands:
13
12
  start Start containers
@@ -22,23 +21,22 @@ PostgreSQL Options:
22
21
  --password <pass> PostgreSQL password (default: password)
23
22
  --shm-size <size> Shared memory size for container (default: 2g)
24
23
 
24
+ Additional Services:
25
+ --minio Include MinIO S3-compatible object storage (port 9000)
26
+
25
27
  General Options:
26
28
  --help, -h Show this help message
27
29
  --recreate Remove and recreate containers on start
28
- --include <svc> Include additional service (can be repeated)
29
-
30
- Available Additional Services:
31
- minio MinIO S3-compatible object storage (port 9000)
32
30
 
33
31
  Examples:
34
32
  pgpm docker start Start PostgreSQL only
35
- pgpm docker start --include minio Start PostgreSQL + MinIO
33
+ pgpm docker start --minio Start PostgreSQL + MinIO
36
34
  pgpm docker start --port 5433 Start on custom port
37
35
  pgpm docker start --shm-size 4g Start with 4GB shared memory
38
36
  pgpm docker start --recreate Remove and recreate containers
39
- pgpm docker start --recreate --include minio Recreate PostgreSQL + MinIO
37
+ pgpm docker start --recreate --minio Recreate PostgreSQL + MinIO
40
38
  pgpm docker stop Stop PostgreSQL
41
- pgpm docker stop --include minio Stop PostgreSQL + MinIO
39
+ pgpm docker stop --minio Stop PostgreSQL + MinIO
42
40
  pgpm docker ls List services and status
43
41
  `;
44
42
  const ADDITIONAL_SERVICES = {
@@ -251,24 +249,10 @@ async function startService(service, recreate) {
251
249
  async function stopService(service) {
252
250
  await stopContainer(service.name);
253
251
  }
254
- function parseInclude(args) {
255
- const include = args.include;
256
- if (!include)
257
- return [];
258
- if (Array.isArray(include))
259
- return include;
260
- if (typeof include === 'string')
261
- return [include];
262
- return [];
263
- }
264
- function resolveIncludedServices(includeNames) {
252
+ function resolveServiceFlags(args) {
265
253
  const services = [];
266
- for (const name of includeNames) {
267
- const service = ADDITIONAL_SERVICES[name];
268
- if (!service) {
269
- console.warn(`⚠️ Unknown service: "${name}". Available: ${Object.keys(ADDITIONAL_SERVICES).join(', ')}`);
270
- }
271
- else {
254
+ for (const [key, service] of Object.entries(ADDITIONAL_SERVICES)) {
255
+ if (args[key] === true || typeof args[key] === 'string') {
272
256
  services.push(service);
273
257
  }
274
258
  }
@@ -286,7 +270,7 @@ async function listServices() {
286
270
  else {
287
271
  console.log(' postgres constructiveio/postgres-plus:18 \x1b[90m(docker not available)\x1b[0m');
288
272
  }
289
- console.log('\n Additional (use --include <name>):');
273
+ console.log('\n Additional (use --<name> flag):');
290
274
  for (const [key, service] of Object.entries(ADDITIONAL_SERVICES)) {
291
275
  if (dockerAvailable) {
292
276
  const running = await isContainerRunning(service.name);
@@ -320,8 +304,7 @@ export default async (argv, _prompter, _options) => {
320
304
  const password = args.password || 'password';
321
305
  const shmSize = args['shm-size'] || args.shmSize || '2g';
322
306
  const recreate = args.recreate === true;
323
- const includeNames = parseInclude(args);
324
- const includedServices = resolveIncludedServices(includeNames);
307
+ const includedServices = resolveServiceFlags(args);
325
308
  switch (subcommand) {
326
309
  case 'start':
327
310
  await startContainer({ name, image, port, user, password, shmSize, recreate });
@@ -39,7 +39,7 @@ export const usageText = `
39
39
  deps Show change dependencies
40
40
 
41
41
  Development Tools:
42
- docker Manage Docker containers (start/stop/ls, --include for additional services)
42
+ docker Manage Docker containers (start/stop/ls, --minio)
43
43
  env Manage environment variables (--supabase, --minio)
44
44
  test-packages Run integration tests on workspace packages
45
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgpm",
3
- "version": "4.13.0",
3
+ "version": "4.14.0",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "PostgreSQL Package Manager - Database migration and package management CLI",
6
6
  "main": "index.js",
@@ -76,5 +76,5 @@
76
76
  "pg",
77
77
  "pgsql"
78
78
  ],
79
- "gitHead": "0409a02b8af8c76fe607910a23cdb1a8e2d859d7"
79
+ "gitHead": "2572aaf6c2a3298917362e80ed68276c88a88f82"
80
80
  }
@@ -1 +1 @@
1
- export declare const usageText = "\n Usage: pgpm <command> [options]\n\n Core Database Operations:\n add Add database changes to plans and create SQL files\n deploy Deploy database changes and migrations\n verify Verify database state and migrations\n revert Revert database changes and migrations\n\n Project Management:\n init Initialize workspace or module\n extension Manage module dependencies\n plan Generate module deployment plans\n package Package module for distribution\n export Export database migrations from existing databases\n update Update pgpm to the latest version\n cache Manage cached templates (clean)\n upgrade Upgrade installed pgpm modules to latest versions (alias: up)\n\n Database Administration:\n dump Dump a database to a sql file\n kill Terminate database connections and optionally drop databases\n install Install database modules\n tag Add tags to changes for versioning\n clear Clear database state\n remove Remove database changes\n analyze Analyze database structure\n rename Rename database changes\n admin-users Manage admin users\n\n Testing:\n test-packages Run integration tests on all workspace packages\n\n Migration Tools:\n migrate Migration management subcommands\n init Initialize migration tracking\n status Show migration status\n list List all changes\n deps Show change dependencies\n \n Development Tools:\n docker Manage Docker containers (start/stop/ls, --include for additional services)\n env Manage environment variables (--supabase, --minio)\n test-packages Run integration tests on workspace packages\n \n Global Options:\n -h, --help Display this help information\n -v, --version Display version information\n --cwd <directory> Working directory (default: current directory)\n\n Individual Command Help:\n pgpm <command> --help Display detailed help for specific command\n pgpm <command> -h Display detailed help for specific command\n\n Examples:\n pgpm deploy --help Show deploy command options\n pgpm init workspace Initialize new workspace\n pgpm install @pgpm/base32 Install a database module\n ";
1
+ export declare const usageText = "\n Usage: pgpm <command> [options]\n\n Core Database Operations:\n add Add database changes to plans and create SQL files\n deploy Deploy database changes and migrations\n verify Verify database state and migrations\n revert Revert database changes and migrations\n\n Project Management:\n init Initialize workspace or module\n extension Manage module dependencies\n plan Generate module deployment plans\n package Package module for distribution\n export Export database migrations from existing databases\n update Update pgpm to the latest version\n cache Manage cached templates (clean)\n upgrade Upgrade installed pgpm modules to latest versions (alias: up)\n\n Database Administration:\n dump Dump a database to a sql file\n kill Terminate database connections and optionally drop databases\n install Install database modules\n tag Add tags to changes for versioning\n clear Clear database state\n remove Remove database changes\n analyze Analyze database structure\n rename Rename database changes\n admin-users Manage admin users\n\n Testing:\n test-packages Run integration tests on all workspace packages\n\n Migration Tools:\n migrate Migration management subcommands\n init Initialize migration tracking\n status Show migration status\n list List all changes\n deps Show change dependencies\n \n Development Tools:\n docker Manage Docker containers (start/stop/ls, --minio)\n env Manage environment variables (--supabase, --minio)\n test-packages Run integration tests on workspace packages\n \n Global Options:\n -h, --help Display this help information\n -v, --version Display version information\n --cwd <directory> Working directory (default: current directory)\n\n Individual Command Help:\n pgpm <command> --help Display detailed help for specific command\n pgpm <command> -h Display detailed help for specific command\n\n Examples:\n pgpm deploy --help Show deploy command options\n pgpm init workspace Initialize new workspace\n pgpm install @pgpm/base32 Install a database module\n ";
package/utils/display.js CHANGED
@@ -42,7 +42,7 @@ exports.usageText = `
42
42
  deps Show change dependencies
43
43
 
44
44
  Development Tools:
45
- docker Manage Docker containers (start/stop/ls, --include for additional services)
45
+ docker Manage Docker containers (start/stop/ls, --minio)
46
46
  env Manage environment variables (--supabase, --minio)
47
47
  test-packages Run integration tests on workspace packages
48
48