@invizi/cli 0.1.7 → 0.1.8
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/commands/trades.js +2 -0
- package/dist/config.js +2 -2
- package/package.json +1 -1
package/dist/commands/trades.js
CHANGED
|
@@ -172,6 +172,8 @@ function formatTable(stats, address, days) {
|
|
|
172
172
|
lines.push(` Best: ${best.coin} ${formatUsd(best.netPnl)}`);
|
|
173
173
|
if (worst.netPnl < 0)
|
|
174
174
|
lines.push(` Worst: ${worst.coin} ${formatUsd(worst.netPnl)}`);
|
|
175
|
+
lines.push('');
|
|
176
|
+
lines.push(` Fetched: ${new Date().toISOString().replace('T', ' ').slice(0, 19)} UTC`);
|
|
175
177
|
return lines.join('\n');
|
|
176
178
|
}
|
|
177
179
|
function formatCoinDetail(fills, coin) {
|
package/dist/config.js
CHANGED
|
@@ -22,8 +22,8 @@ export function loadConfig(configPath = getConfigPath()) {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
export function saveConfig(config, configPath = getConfigPath()) {
|
|
25
|
-
mkdirSync(dirname(configPath), { recursive: true });
|
|
26
|
-
writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
25
|
+
mkdirSync(dirname(configPath), { recursive: true, mode: 0o700 });
|
|
26
|
+
writeFileSync(configPath, JSON.stringify(config, null, 2), { mode: 0o600 });
|
|
27
27
|
}
|
|
28
28
|
export function resolveApiUrl(config, env = process.env) {
|
|
29
29
|
return config.apiUrl || env.INVIZI_API_URL || env.INVIZI_SERVER || DEFAULT_API_URL;
|