summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-03-21 14:46:30 +0100
committerRory& <root@rory.gay>2026-03-21 14:46:30 +0100
commit48eb55ee07d237ff2272e9763c1bbb5c72842f53 (patch)
tree619ccf65052bc43243650b7035bb0598a873d043 /scripts
parentlambert-server: remove global namespace pollution for server (diff)
downloadserver-ts-48eb55ee07d237ff2272e9763c1bbb5c72842f53.tar.xz
Fix schemas script
Diffstat (limited to 'scripts')
-rw-r--r--scripts/schema.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/schema.js b/scripts/schema.js

index b4c156d7..f8733809 100644 --- a/scripts/schema.js +++ b/scripts/schema.js
@@ -396,6 +396,7 @@ function columnizedObjectDiff(a, b, trackEqual = false) { return diffs; } +const showScanDepth = process.env.SCHEMAS_SHOW_SCAN_DEPTH === "true"; async function removeAllMatchingRecursive(o, selector, maxDepth = 32, path = "$") { // process.stdout.write("S"); // console.log("scan @", path, "with depth", maxDepth, typeof o, o); @@ -406,9 +407,9 @@ async function removeAllMatchingRecursive(o, selector, maxDepth = 32, path = "$" process.stdout.write(yellowBright("R(" + gray(k) + " @ " + cyan(path) + ") ")); delete o[k]; } else if (maxDepth > 0 && typeof o != "string") { - process.stdout.write(gray(">")); + if (showScanDepth) process.stdout.write(gray(">")); o[k] = await removeAllMatchingRecursive(o[k], selector, maxDepth - 1, path + "." + k); - process.stdout.write(cyan("\b \b")); + if (showScanDepth) process.stdout.write(cyan("\b \b")); } }