@bytebase/dbhub 0.0.1 → 0.0.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.
- package/dist/config/env.js +2 -17
- package/package.json +1 -1
package/dist/config/env.js
CHANGED
|
@@ -2,7 +2,6 @@ import dotenv from "dotenv";
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import fs from 'fs';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
5
|
-
import { parseArgs } from 'node:util';
|
|
6
5
|
// Create __dirname equivalent for ES modules
|
|
7
6
|
const __filename = fileURLToPath(import.meta.url);
|
|
8
7
|
const __dirname = path.dirname(__filename);
|
|
@@ -30,22 +29,8 @@ export function parseCommandLineArgs() {
|
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
|
-
//
|
|
34
|
-
|
|
35
|
-
const { values } = parseArgs({
|
|
36
|
-
options: {
|
|
37
|
-
dsn: { type: 'string' },
|
|
38
|
-
transport: { type: 'string' },
|
|
39
|
-
port: { type: 'string' }
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
// Merge both results, with manually parsed taking precedence
|
|
43
|
-
return { ...values, ...parsedManually };
|
|
44
|
-
}
|
|
45
|
-
catch (err) {
|
|
46
|
-
// If parseArgs fails, just return the manually parsed args
|
|
47
|
-
return parsedManually;
|
|
48
|
-
}
|
|
32
|
+
// Just use the manually parsed args - removed parseArgs dependency for Node.js <18.3.0 compatibility
|
|
33
|
+
return parsedManually;
|
|
49
34
|
}
|
|
50
35
|
/**
|
|
51
36
|
* Load environment files from various locations
|