@pasosdejesus/m 0.17.2 → 0.17.3
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.
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import { execSync } from 'child_process';
|
|
2
|
+
import dotenv from 'dotenv';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
|
|
5
|
+
// Load hierarchical .env.test files following the same pattern as m CLI
|
|
6
|
+
const cwd = process.cwd();
|
|
7
|
+
const envPaths = [
|
|
8
|
+
path.join(cwd, '../..', '.env.test'), // apps/.env.test
|
|
9
|
+
path.join(cwd, '..', '.env.test'), // nextjs/.env.test
|
|
10
|
+
path.join(cwd, '.env.test'), // current dir
|
|
11
|
+
];
|
|
12
|
+
for (const p of envPaths) {
|
|
13
|
+
dotenv.config({ path: p, override: true });
|
|
14
|
+
}
|
|
2
15
|
|
|
3
16
|
/**
|
|
4
17
|
* Check if psql command is available in the system PATH
|