This commit is contained in:
Benjamin Toby 2025-07-09 21:24:33 +01:00
parent 382da38bb0
commit 03abe33d22
3 changed files with 16 additions and 5 deletions

View File

@ -10,8 +10,13 @@ const grab_dir_names_1 = __importDefault(require("./names/grab-dir-names"));
* # Grab SSL * # Grab SSL
*/ */
function grabDbSSL() { function grabDbSSL() {
let maxscaleSSLCaCertFileFinal;
try {
const { maxscaleSSLCaCertFile } = (0, grab_dir_names_1.default)(); const { maxscaleSSLCaCertFile } = (0, grab_dir_names_1.default)();
const caFilePath = process.env.DSQL_SSL_CA_CERT || maxscaleSSLCaCertFile; maxscaleSSLCaCertFileFinal = maxscaleSSLCaCertFile;
}
catch (error) { }
const caFilePath = process.env.DSQL_SSL_CA_CERT || maxscaleSSLCaCertFileFinal;
if (!(caFilePath === null || caFilePath === void 0 ? void 0 : caFilePath.match(/./))) { if (!(caFilePath === null || caFilePath === void 0 ? void 0 : caFilePath.match(/./))) {
return undefined; return undefined;
} }

View File

@ -8,9 +8,15 @@ type Return = ConnectionConfig["ssl"] | undefined;
* # Grab SSL * # Grab SSL
*/ */
export default function grabDbSSL(): Return { export default function grabDbSSL(): Return {
const { maxscaleSSLCaCertFile } = grabDirNames(); let maxscaleSSLCaCertFileFinal;
const caFilePath = process.env.DSQL_SSL_CA_CERT || maxscaleSSLCaCertFile; try {
const { maxscaleSSLCaCertFile } = grabDirNames();
maxscaleSSLCaCertFileFinal = maxscaleSSLCaCertFile;
} catch (error) {}
const caFilePath =
process.env.DSQL_SSL_CA_CERT || maxscaleSSLCaCertFileFinal;
if (!caFilePath?.match(/./)) { if (!caFilePath?.match(/./)) {
return undefined; return undefined;

View File

@ -1,6 +1,6 @@
{ {
"name": "@moduletrace/datasquirel", "name": "@moduletrace/datasquirel",
"version": "4.9.1", "version": "4.9.2",
"description": "Cloud-based SQL data management tool", "description": "Cloud-based SQL data management tool",
"main": "dist/index.js", "main": "dist/index.js",
"bin": { "bin": {