MCPcopy
hub / github.com/webpack/webpack / addResetFlag

Function addResetFlag

lib/cli.js:217–240  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

215 * @returns {void}
216 */
217 const addResetFlag = (path) => {
218 const schemaPath = path[0].path;
219 const name = pathToArgumentName(`${schemaPath}.reset`);
220 const description =
221 getResetDescription(path) ||
222 `Clear all items provided in '${schemaPath}' configuration. ${getDescription(
223 path
224 )}`;
225 flags[name] = {
226 configs: [
227 {
228 type: "reset",
229 multiple: false,
230 description,
231 path: schemaPath
232 }
233 ],
234 description: undefined,
235 simpleType:
236 /** @type {SimpleType} */
237 (/** @type {unknown} */ (undefined)),
238 multiple: /** @type {boolean} */ (/** @type {unknown} */ (undefined))
239 };
240 };
241
242 /**
243 * Joins the per-item segments into a JSON pointer (built only when needed).

Callers 1

traverseFunction · 0.85

Calls 3

pathToArgumentNameFunction · 0.85
getResetDescriptionFunction · 0.85
getDescriptionFunction · 0.85

Tested by

no test coverage detected