El outdir estaba mal
This commit is contained in:
6
lib/index.js
Executable file → Normal file
6
lib/index.js
Executable file → Normal file
@@ -25,6 +25,7 @@ async function loadEnv(envpath) {
|
|||||||
process.env[key.trim()] = value.trim();
|
process.env[key.trim()] = value.trim();
|
||||||
});
|
});
|
||||||
console.log('[i] Archivo .env cargado desde ' + envpath);
|
console.log('[i] Archivo .env cargado desde ' + envpath);
|
||||||
|
console.log("ENV:", process_1.env);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -184,6 +185,11 @@ async function writeAppliedVersion(db, versionTable, version) {
|
|||||||
*/
|
*/
|
||||||
async function runMigrations(args) {
|
async function runMigrations(args) {
|
||||||
let db;
|
let db;
|
||||||
|
console.log(`
|
||||||
|
[i] Lanzado migraciones\n
|
||||||
|
-> Servidor: ${process_1.env.POSTGRES_HOST}:${process_1.env.POSTGRES_PORT}
|
||||||
|
-> Objetivo: ${args.targetVersion}
|
||||||
|
`);
|
||||||
try {
|
try {
|
||||||
db = new pg_1.Pool({
|
db = new pg_1.Pool({
|
||||||
host: process_1.env.POSTGRES_HOST,
|
host: process_1.env.POSTGRES_HOST,
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
"@types/node": "^25.2.3",
|
"@types/node": "^25.2.3",
|
||||||
"@types/pg": "^8.16.0",
|
"@types/pg": "^8.16.0",
|
||||||
"@types/yargs": "^17.0.35",
|
"@types/yargs": "^17.0.35",
|
||||||
"tsx": "^4.21.0"
|
"tsx": "^4.21.0",
|
||||||
|
"typescript": "^5.9.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pg": "^8.18.0",
|
"pg": "^8.18.0",
|
||||||
"typescript": "^5.9.3",
|
|
||||||
"yargs": "^18.0.0"
|
"yargs": "^18.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"extends": "@tsconfig/node22/tsconfig.json",
|
"extends": "@tsconfig/node22/tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"rootDir": "./src/",
|
"rootDir": "./src/",
|
||||||
"outDir": "./dist",
|
"outDir": "./lib",
|
||||||
// Environment Settings
|
// Environment Settings
|
||||||
// See also https://aka.ms/tsconfig/module,
|
// See also https://aka.ms/tsconfig/module,
|
||||||
"esModuleInterop": true
|
"esModuleInterop": true
|
||||||
|
|||||||
Reference in New Issue
Block a user