MCPcopy Create free account
hub / github.com/PicoCreator/smol-dev-js / OutputHandlerClass

Class OutputHandlerClass

src/cli/OutputHandler.js:133–705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131// Class implementation (to be initialized)
132//
133class OutputHandlerClass {
134
135 //--------------
136 // OutputHandler Setup
137 //--------------
138
139 /**
140 * Constructor for the OutputHandler
141 */
142 constructor() {
143 // Default config values
144 this.stdOutput = true;
145 this.tableOutput = false;
146 this.jsonOutput = false;
147 // this.jsonOutputFile = null;
148
149 this.trace = false;
150 this.silent = false;
151 }
152
153 /**
154 * Setup the required arguments for sywac to process output configurations
155 *
156 * @param {sywac} main
157 */
158 argsSetup_output( main ) {
159
160 // Self reference
161 let self = this;
162
163 // We disabled the --json, and --table
164 // --------------------------------------------
165
166 // // The various configuration options
167 // main.boolean("--json, --jsonOutput", {
168 // description: "Output result as a single final JSON object, disables default step by step line output"
169 // })
170
171 // // Output using table format instead
172 // main.boolean("--table, --tableOutput", {
173 // description: "Output result in a table like format, note that some commands (eg. list) defaults to this format"
174 // })
175
176 // @TODO - consider if there is demand to support this use case specifically
177 // main.file("--jsonOutputFile <json-out-file>", {
178 // description: "Output the JSON result into the file seperately, does not disable step by step line output"
179 // })
180
181 // Trace and silent supporessions
182 // --------------------------------------------
183 main.boolean("-t, --trace", {
184 description: "Extremely extremely verbose and noisy logging of all API calls [Note: this will log provided secrets]"
185 })
186 main.boolean("-s, --silent", {
187 description: "Surpression of output stream, disables std/json output"
188 })
189
190 // Processing the various configuration settings

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected