From aebc758cbf7635441d928be749494c4b3c8480dc Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Fri, 29 Aug 2025 19:06:36 -0400 Subject: [PATCH] fix: objutil --- src/backend/src/util/objutil.js | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/backend/src/util/objutil.js b/src/backend/src/util/objutil.js index 6d635ad14..2670af8cf 100644 --- a/src/backend/src/util/objutil.js +++ b/src/backend/src/util/objutil.js @@ -1,4 +1,3 @@ -const { config } = require("yargs"); const { whatis } = require("./langutil"); const DO_NOT_DEFINE = Symbol('DO_NOT_DEFINE'); @@ -15,7 +14,7 @@ const createTransformedValues = (input, options = {}, state = {}) => { for ( let i=0 ; i < input.length; i++ ) { const value = input[i]; state.keys.push(i); - output.push(createTransformedValues(value, options)); + output.push(createTransformedValues(value, options, state)); state.keys.pop(); } return output; @@ -25,7 +24,7 @@ const createTransformedValues = (input, options = {}, state = {}) => { Object.setPrototypeOf(output, input); for ( const k in input ) { state.keys.push(k); - const new_value = createTransformedValues(input[k], options); + const new_value = createTransformedValues(input[k], options, state); if ( new_value !== DO_NOT_DEFINE ) { output[k] = new_value; } @@ -40,20 +39,6 @@ const createTransformedValues = (input, options = {}, state = {}) => { return value; }; - -config.__set_config_object__(createTransformedValues(config, { - mutateValue: (input, { state }) => { - const path = state.keys.join('.'); // or jq - // .... - if ( should_replace ) { - return 'replacement'; - } else { - return DO_NOT_DEFINE; - } - } -})) - - module.exports = { createTransformedValues, DO_NOT_DEFINE,