@nsshunt/stsconfig 1.25.80 → 1.25.81
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/stsconfig.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import Debug from "debug";
|
|
2
1
|
import * as dotenv from "dotenv";
|
|
3
2
|
const __viteBrowserExternal = {};
|
|
4
3
|
const fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1438,9 +1437,8 @@ chalk.stderr.supportsColor = stderrColor;
|
|
|
1438
1437
|
var source = chalk;
|
|
1439
1438
|
const chalk$1 = /* @__PURE__ */ getDefaultExportFromCjs(source);
|
|
1440
1439
|
const { accessSync, constants, readFileSync } = fs;
|
|
1441
|
-
const debug = Debug(`proc:${process.pid}`);
|
|
1442
1440
|
let envOptions = null;
|
|
1443
|
-
function SetupConfig(envOptions2) {
|
|
1441
|
+
function SetupConfig(envOptions2, logger) {
|
|
1444
1442
|
const envfile = process.env.STSENVFILE === void 0 ? "/.env" : process.env.STSENVFILE;
|
|
1445
1443
|
dotenv.config({ path: envfile });
|
|
1446
1444
|
const defconfig = {
|
|
@@ -1650,10 +1648,12 @@ function SetupConfig(envOptions2) {
|
|
|
1650
1648
|
try {
|
|
1651
1649
|
accessSync(passwordFile, constants.R_OK);
|
|
1652
1650
|
const data = readFileSync(passwordFile, "utf8");
|
|
1653
|
-
|
|
1651
|
+
if (logger)
|
|
1652
|
+
logger.debug(chalk$1.green(`Successfully loaded password file: [${passwordFile}]`));
|
|
1654
1653
|
return data;
|
|
1655
1654
|
} catch (err) {
|
|
1656
|
-
|
|
1655
|
+
if (logger)
|
|
1656
|
+
logger.debug(chalk$1.red(`Problem loading password file: [${passwordFile}], Error: [${err}]`));
|
|
1657
1657
|
return "";
|
|
1658
1658
|
}
|
|
1659
1659
|
};
|