@exagent/agent 0.1.10 → 0.1.11
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/cli.js +10 -1
- package/dist/cli.mjs +10 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2921,7 +2921,16 @@ program.command("run").description("Start the trading agent").option("-c, --conf
|
|
|
2921
2921
|
const configDir = path2.dirname(
|
|
2922
2922
|
options.config.startsWith("/") ? options.config : path2.join(process.cwd(), options.config)
|
|
2923
2923
|
);
|
|
2924
|
-
|
|
2924
|
+
let passphrase = options.passphrase || process.env.EXAGENT_PASSPHRASE;
|
|
2925
|
+
const encPath = path2.join(configDir, ".env.enc");
|
|
2926
|
+
if (fs2.existsSync(encPath) && !passphrase) {
|
|
2927
|
+
console.log("");
|
|
2928
|
+
console.log(" Encrypted config found (.env.enc)");
|
|
2929
|
+
console.log("");
|
|
2930
|
+
passphrase = await prompt(" Enter passphrase: ", true);
|
|
2931
|
+
console.log("");
|
|
2932
|
+
}
|
|
2933
|
+
const usedEncrypted = loadSecureEnv(configDir, passphrase);
|
|
2925
2934
|
if (usedEncrypted) {
|
|
2926
2935
|
console.log("Loaded encrypted environment (.env.enc)");
|
|
2927
2936
|
}
|
package/dist/cli.mjs
CHANGED
|
@@ -250,7 +250,16 @@ program.command("run").description("Start the trading agent").option("-c, --conf
|
|
|
250
250
|
const configDir = path.dirname(
|
|
251
251
|
options.config.startsWith("/") ? options.config : path.join(process.cwd(), options.config)
|
|
252
252
|
);
|
|
253
|
-
|
|
253
|
+
let passphrase = options.passphrase || process.env.EXAGENT_PASSPHRASE;
|
|
254
|
+
const encPath = path.join(configDir, ".env.enc");
|
|
255
|
+
if (fs.existsSync(encPath) && !passphrase) {
|
|
256
|
+
console.log("");
|
|
257
|
+
console.log(" Encrypted config found (.env.enc)");
|
|
258
|
+
console.log("");
|
|
259
|
+
passphrase = await prompt(" Enter passphrase: ", true);
|
|
260
|
+
console.log("");
|
|
261
|
+
}
|
|
262
|
+
const usedEncrypted = loadSecureEnv(configDir, passphrase);
|
|
254
263
|
if (usedEncrypted) {
|
|
255
264
|
console.log("Loaded encrypted environment (.env.enc)");
|
|
256
265
|
}
|