pgpm 4.13.0 → 4.14.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/commands/docker.js +19 -33
- package/esm/commands/docker.js +19 -33
- package/esm/utils/display.js +1 -1
- package/package.json +2 -2
- package/utils/display.d.ts +1 -1
- package/utils/display.js +1 -1
package/commands/docker.js
CHANGED
|
@@ -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.
|
|
12
|
-
included with the --include flag.
|
|
11
|
+
PostgreSQL is always started by default.
|
|
13
12
|
|
|
14
13
|
Subcommands:
|
|
15
14
|
start Start containers
|
|
@@ -24,35 +23,37 @@ 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 (API: 9000, Console: 9001)
|
|
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 --
|
|
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 --
|
|
39
|
+
pgpm docker start --recreate --minio Recreate PostgreSQL + MinIO
|
|
42
40
|
pgpm docker stop Stop PostgreSQL
|
|
43
|
-
pgpm docker stop --
|
|
41
|
+
pgpm docker stop --minio Stop PostgreSQL + MinIO
|
|
44
42
|
pgpm docker ls List services and status
|
|
45
43
|
`;
|
|
46
44
|
const ADDITIONAL_SERVICES = {
|
|
47
45
|
minio: {
|
|
48
46
|
name: 'minio',
|
|
49
47
|
image: 'minio/minio',
|
|
50
|
-
ports: [
|
|
48
|
+
ports: [
|
|
49
|
+
{ host: 9000, container: 9000 },
|
|
50
|
+
{ host: 9001, container: 9001 },
|
|
51
|
+
],
|
|
51
52
|
env: {
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
MINIO_ROOT_USER: 'minioadmin',
|
|
54
|
+
MINIO_ROOT_PASSWORD: 'minioadmin',
|
|
54
55
|
},
|
|
55
|
-
command: ['server', '/data'],
|
|
56
|
+
command: ['server', '/data', '--console-address', ':9001'],
|
|
56
57
|
volumes: [{ name: 'minio-data', containerPath: '/data' }],
|
|
57
58
|
},
|
|
58
59
|
};
|
|
@@ -253,24 +254,10 @@ async function startService(service, recreate) {
|
|
|
253
254
|
async function stopService(service) {
|
|
254
255
|
await stopContainer(service.name);
|
|
255
256
|
}
|
|
256
|
-
function
|
|
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) {
|
|
257
|
+
function resolveServiceFlags(args) {
|
|
267
258
|
const services = [];
|
|
268
|
-
for (const
|
|
269
|
-
|
|
270
|
-
if (!service) {
|
|
271
|
-
console.warn(`⚠️ Unknown service: "${name}". Available: ${Object.keys(ADDITIONAL_SERVICES).join(', ')}`);
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
259
|
+
for (const [key, service] of Object.entries(ADDITIONAL_SERVICES)) {
|
|
260
|
+
if (args[key] === true || typeof args[key] === 'string') {
|
|
274
261
|
services.push(service);
|
|
275
262
|
}
|
|
276
263
|
}
|
|
@@ -288,7 +275,7 @@ async function listServices() {
|
|
|
288
275
|
else {
|
|
289
276
|
console.log(' postgres constructiveio/postgres-plus:18 \x1b[90m(docker not available)\x1b[0m');
|
|
290
277
|
}
|
|
291
|
-
console.log('\n Additional (use
|
|
278
|
+
console.log('\n Additional (use --<name> flag):');
|
|
292
279
|
for (const [key, service] of Object.entries(ADDITIONAL_SERVICES)) {
|
|
293
280
|
if (dockerAvailable) {
|
|
294
281
|
const running = await isContainerRunning(service.name);
|
|
@@ -322,8 +309,7 @@ exports.default = async (argv, _prompter, _options) => {
|
|
|
322
309
|
const password = args.password || 'password';
|
|
323
310
|
const shmSize = args['shm-size'] || args.shmSize || '2g';
|
|
324
311
|
const recreate = args.recreate === true;
|
|
325
|
-
const
|
|
326
|
-
const includedServices = resolveIncludedServices(includeNames);
|
|
312
|
+
const includedServices = resolveServiceFlags(args);
|
|
327
313
|
switch (subcommand) {
|
|
328
314
|
case 'start':
|
|
329
315
|
await startContainer({ name, image, port, user, password, shmSize, recreate });
|
package/esm/commands/docker.js
CHANGED
|
@@ -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.
|
|
10
|
-
included with the --include flag.
|
|
9
|
+
PostgreSQL is always started by default.
|
|
11
10
|
|
|
12
11
|
Subcommands:
|
|
13
12
|
start Start containers
|
|
@@ -22,35 +21,37 @@ 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 (API: 9000, Console: 9001)
|
|
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 --
|
|
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 --
|
|
37
|
+
pgpm docker start --recreate --minio Recreate PostgreSQL + MinIO
|
|
40
38
|
pgpm docker stop Stop PostgreSQL
|
|
41
|
-
pgpm docker stop --
|
|
39
|
+
pgpm docker stop --minio Stop PostgreSQL + MinIO
|
|
42
40
|
pgpm docker ls List services and status
|
|
43
41
|
`;
|
|
44
42
|
const ADDITIONAL_SERVICES = {
|
|
45
43
|
minio: {
|
|
46
44
|
name: 'minio',
|
|
47
45
|
image: 'minio/minio',
|
|
48
|
-
ports: [
|
|
46
|
+
ports: [
|
|
47
|
+
{ host: 9000, container: 9000 },
|
|
48
|
+
{ host: 9001, container: 9001 },
|
|
49
|
+
],
|
|
49
50
|
env: {
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
MINIO_ROOT_USER: 'minioadmin',
|
|
52
|
+
MINIO_ROOT_PASSWORD: 'minioadmin',
|
|
52
53
|
},
|
|
53
|
-
command: ['server', '/data'],
|
|
54
|
+
command: ['server', '/data', '--console-address', ':9001'],
|
|
54
55
|
volumes: [{ name: 'minio-data', containerPath: '/data' }],
|
|
55
56
|
},
|
|
56
57
|
};
|
|
@@ -251,24 +252,10 @@ async function startService(service, recreate) {
|
|
|
251
252
|
async function stopService(service) {
|
|
252
253
|
await stopContainer(service.name);
|
|
253
254
|
}
|
|
254
|
-
function
|
|
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) {
|
|
255
|
+
function resolveServiceFlags(args) {
|
|
265
256
|
const services = [];
|
|
266
|
-
for (const
|
|
267
|
-
|
|
268
|
-
if (!service) {
|
|
269
|
-
console.warn(`⚠️ Unknown service: "${name}". Available: ${Object.keys(ADDITIONAL_SERVICES).join(', ')}`);
|
|
270
|
-
}
|
|
271
|
-
else {
|
|
257
|
+
for (const [key, service] of Object.entries(ADDITIONAL_SERVICES)) {
|
|
258
|
+
if (args[key] === true || typeof args[key] === 'string') {
|
|
272
259
|
services.push(service);
|
|
273
260
|
}
|
|
274
261
|
}
|
|
@@ -286,7 +273,7 @@ async function listServices() {
|
|
|
286
273
|
else {
|
|
287
274
|
console.log(' postgres constructiveio/postgres-plus:18 \x1b[90m(docker not available)\x1b[0m');
|
|
288
275
|
}
|
|
289
|
-
console.log('\n Additional (use
|
|
276
|
+
console.log('\n Additional (use --<name> flag):');
|
|
290
277
|
for (const [key, service] of Object.entries(ADDITIONAL_SERVICES)) {
|
|
291
278
|
if (dockerAvailable) {
|
|
292
279
|
const running = await isContainerRunning(service.name);
|
|
@@ -320,8 +307,7 @@ export default async (argv, _prompter, _options) => {
|
|
|
320
307
|
const password = args.password || 'password';
|
|
321
308
|
const shmSize = args['shm-size'] || args.shmSize || '2g';
|
|
322
309
|
const recreate = args.recreate === true;
|
|
323
|
-
const
|
|
324
|
-
const includedServices = resolveIncludedServices(includeNames);
|
|
310
|
+
const includedServices = resolveServiceFlags(args);
|
|
325
311
|
switch (subcommand) {
|
|
326
312
|
case 'start':
|
|
327
313
|
await startContainer({ name, image, port, user, password, shmSize, recreate });
|
package/esm/utils/display.js
CHANGED
|
@@ -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, --
|
|
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.
|
|
3
|
+
"version": "4.14.1",
|
|
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": "
|
|
79
|
+
"gitHead": "8a4291a1c8809bf9063e6e29ec87bd78c94bbf57"
|
|
80
80
|
}
|
package/utils/display.d.ts
CHANGED
|
@@ -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, --
|
|
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, --
|
|
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
|
|