mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 07:51:52 +00:00
Merge branch 'main' into fix-torch-lock-commands-3759471574036935483
This commit is contained in:
4 files changed
+16
-6
No files matched your search
@@ -61,6 +61,7 @@ function filterActiveLocks(locks) {
|
||||
return locks.filter((lock) => !lock.expiresAt || lock.expiresAt > now);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Queries relays for active lock events matching the criteria.
|
||||
* Uses a tiered approach: tries primary relays first, then falls back to others if needed.
|
||||
|
||||
@@ -61,10 +61,6 @@ export function withTimeout(promise, timeoutMs, timeoutMessage) {
|
||||
});
|
||||
}
|
||||
|
||||
export function mergeRelayList(primaryRelays, fallbackRelays) {
|
||||
return [...new Set([...primaryRelays, ...fallbackRelays])];
|
||||
}
|
||||
|
||||
const MAX_RANDOM = 281474976710655; // 2**48 - 1
|
||||
|
||||
export function secureRandom() {
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
test('torch-config.example.json Security', () => {
|
||||
const configPath = path.resolve('torch-config.example.json');
|
||||
const content = fs.readFileSync(configPath, 'utf8');
|
||||
const config = JSON.parse(content);
|
||||
|
||||
if (config.dashboard) {
|
||||
assert.strictEqual(config.dashboard.auth, undefined, 'Example config should not contain auth field');
|
||||
}
|
||||
});
|
||||
@@ -18,8 +18,7 @@
|
||||
},
|
||||
"dashboard": {
|
||||
"defaultCadenceView": "daily",
|
||||
"defaultStatusView": "active",
|
||||
"auth": "admin:password"
|
||||
"defaultStatusView": "active"
|
||||
},
|
||||
"scheduler": {
|
||||
"firstPromptByCadence": {
|
||||
|
||||
Reference in new issue
Block a user