@deinossrl/dgp-agent 1.5.3 → 1.5.4
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/CHANGELOG.md +8 -0
- package/index.mjs +13 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog - DGP Agent
|
|
2
2
|
|
|
3
|
+
## [1.5.4] - 2026-01-12
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- **CRÍTICO**: Ahora configura PGPASSWORD antes de ejecutar psql para crear schemas
|
|
7
|
+
- **CRÍTICO**: Corregido password para Supabase - usa database password en vez de service_role_key
|
|
8
|
+
- Resuelve "Password for user postgres..." - ahora se autentica automáticamente
|
|
9
|
+
- Aplica a pg_dump, pg_restore y psql para conexiones Supabase y PostgreSQL
|
|
10
|
+
|
|
3
11
|
## [1.5.3] - 2026-01-12
|
|
4
12
|
|
|
5
13
|
### Changed
|
package/index.mjs
CHANGED
|
@@ -1723,9 +1723,9 @@ async function executePgDump(command) {
|
|
|
1723
1723
|
pgDumpArgs.push(`--username=postgres`);
|
|
1724
1724
|
pgDumpArgs.push(`--dbname=postgres`);
|
|
1725
1725
|
|
|
1726
|
-
//
|
|
1727
|
-
if (params.
|
|
1728
|
-
process.env.PGPASSWORD = params.
|
|
1726
|
+
// Database password (no service_role_key)
|
|
1727
|
+
if (params.password_encrypted) {
|
|
1728
|
+
process.env.PGPASSWORD = params.password_encrypted;
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
|
1731
1731
|
|
|
@@ -2067,6 +2067,11 @@ async function executePgRestore(command) {
|
|
|
2067
2067
|
if (!existsSync(psqlExe)) {
|
|
2068
2068
|
logInfo('psql no disponible, schemas deben existir previamente');
|
|
2069
2069
|
} else {
|
|
2070
|
+
// Configurar PGPASSWORD para psql (database password, no service_role_key)
|
|
2071
|
+
if (params.password_encrypted) {
|
|
2072
|
+
process.env.PGPASSWORD = params.password_encrypted;
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2070
2075
|
// Crear cada schema
|
|
2071
2076
|
for (const schemaName of schemas) {
|
|
2072
2077
|
try {
|
|
@@ -2133,9 +2138,9 @@ async function executePgRestore(command) {
|
|
|
2133
2138
|
pgRestoreArgs.push(`--username=postgres`);
|
|
2134
2139
|
pgRestoreArgs.push(`--dbname=postgres`);
|
|
2135
2140
|
|
|
2136
|
-
//
|
|
2137
|
-
if (
|
|
2138
|
-
process.env.PGPASSWORD =
|
|
2141
|
+
// Database password (no service_role_key)
|
|
2142
|
+
if (params.password_encrypted) {
|
|
2143
|
+
process.env.PGPASSWORD = params.password_encrypted;
|
|
2139
2144
|
}
|
|
2140
2145
|
} else if (target_environment.connection_type === 'postgresql') {
|
|
2141
2146
|
pgRestoreArgs.push(`--host=${target_environment.db_host}`);
|
|
@@ -2143,8 +2148,8 @@ async function executePgRestore(command) {
|
|
|
2143
2148
|
pgRestoreArgs.push(`--username=${target_environment.db_user}`);
|
|
2144
2149
|
pgRestoreArgs.push(`--dbname=${target_environment.db_name}`);
|
|
2145
2150
|
|
|
2146
|
-
if (
|
|
2147
|
-
process.env.PGPASSWORD =
|
|
2151
|
+
if (params.password_encrypted) {
|
|
2152
|
+
process.env.PGPASSWORD = params.password_encrypted;
|
|
2148
2153
|
}
|
|
2149
2154
|
}
|
|
2150
2155
|
|