mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
feat(docs): update README with playback history and instant replay features
refactor(commands): remove unused imports from various command files refactor(src): clean up imports in multiple source files for better organization (#21)
This commit is contained in:
1 parent
e33fbb2fdb
commit
5dc286e364
19 files changed
+32
-39
No files matched your search
+8
-1
@@ -9,6 +9,7 @@ import { getGlobalColor } from "../src/ui/index.mjs";
|
||||
import { logger } from "../src/core/Logger.mjs";
|
||||
import { inspect } from "node:util";
|
||||
import { ERROR_COLOR, EMOJI_REMOVE_TIMEOUT } from "../src/utils/UI.mjs";
|
||||
import { collectSecrets, redactSecrets } from "../src/utils/Redact.mjs";
|
||||
|
||||
/** @private @type {string[]} Property name substrings that indicate sensitive/secret data. */
|
||||
const RESTRICTED = [
|
||||
@@ -92,7 +93,7 @@ function removeSensitive(obj, level = 0, visited = new WeakSet()) {
|
||||
* @param {*} value - The raw eval result.
|
||||
* @returns {Promise<string>} The sanitized output string.
|
||||
*/
|
||||
async function clean(value) {
|
||||
async function clean(value, config = null) {
|
||||
if (value instanceof Promise) value = await value;
|
||||
|
||||
if (typeof value === "object" && value !== null) {
|
||||
@@ -108,6 +109,12 @@ async function clean(value) {
|
||||
output = `[Inspection Error]: ${err.message}`;
|
||||
}
|
||||
|
||||
/* Mask all configured secret values */
|
||||
if (config) {
|
||||
const secrets = collectSecrets(config);
|
||||
output = redactSecrets(output, secrets);
|
||||
}
|
||||
|
||||
return output
|
||||
.replace(/`/g, "`\u200b")
|
||||
.replace(/@/g, "@\u200b") || "undefined";
|
||||
|
||||
Reference in new issue
Block a user