mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
feat: format rules JSON output for better readability
This commit is contained in:
@@ -112,7 +112,7 @@ const [enumSource, staticStoreSource] = await Promise.all([
|
||||
const enumTypes = parseEnumTypes(enumSource);
|
||||
const rules = parseGlobalDomains(staticStoreSource, enumTypes);
|
||||
const domainsCount = rules.reduce((sum, rule) => sum + rule.domains.length, 0);
|
||||
const rulesJson = JSON.stringify(rules, null, 2);
|
||||
const rulesJson = `[\n${rules.map((rule) => ` ${JSON.stringify(rule)}`).join(',\n')}\n]`;
|
||||
|
||||
async function readJsonFile(filePath) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user