@udohjeremiah/moniq 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -917,7 +917,7 @@ async function resolve(config, root, packages_) {
917
917
  }
918
918
  //#endregion
919
919
  //#region ../cli/dist/index.js
920
- var version = "0.3.3";
920
+ var version = "0.3.4";
921
921
  function formatDiagnostics(diagnostics, options) {
922
922
  if ((options?.format ?? "pretty") === "json") return formatJson(diagnostics);
923
923
  return formatPretty(diagnostics, options?.isDryRun);
@@ -970,8 +970,8 @@ function severityBadge(severity) {
970
970
  return styleText("gray", "OFF");
971
971
  }
972
972
  function severityIcon(severity) {
973
- if (severity === "error") return "✘";
974
- if (severity === "warn") return "⚠";
973
+ if (severity === "error") return styleText(["bold", "red"], "✘");
974
+ if (severity === "warn") return styleText(["bold", "yellow"], "⚠");
975
975
  return " ";
976
976
  }
977
977
  async function applyScriptFixes(diagnostics, options) {
@@ -1029,10 +1029,7 @@ async function check(options) {
1029
1029
  const diagnostics = await resolve(config, cwd, packages);
1030
1030
  let fixSummary;
1031
1031
  if (options.fix) fixSummary = await applyScriptFixes(diagnostics, { isDryRun: options.isDryRun });
1032
- if (options.format !== "json") {
1033
- console.log(` ${styleText("cyan", "ℹ")} Scanned ${String(packages.length)} package(s)`);
1034
- console.log();
1035
- }
1032
+ if (options.format !== "json") console.log(`${styleText("cyan", "ℹ")} Scanned ${String(packages.length)} package(s)`);
1036
1033
  console.log(formatDiagnostics(diagnostics, {
1037
1034
  format: options.format,
1038
1035
  isDryRun: options.isDryRun
@@ -1048,8 +1045,7 @@ async function check(options) {
1048
1045
  async function doctor() {
1049
1046
  const cwd = process.cwd();
1050
1047
  const issues = [];
1051
- console.log();
1052
- console.log(` ${styleText("bold", "Configuration Doctor")}`);
1048
+ console.log(styleText("bold", "Configuration Doctor"));
1053
1049
  try {
1054
1050
  const packageCount = (await discoverWorkspace(cwd)).length;
1055
1051
  if (packageCount === 0) issues.push({
@@ -1082,7 +1078,7 @@ async function doctor() {
1082
1078
  console.log();
1083
1079
  issues.sort((a, b) => severityIndex(a.severity) - severityIndex(b.severity));
1084
1080
  if (!issues.some((issue) => issue.severity !== "info")) {
1085
- console.log(` ${styleText(["bold", "green"], "✔ Everything looks good!")}`);
1081
+ console.log(styleText(["bold", "green"], "✔ Everything looks good!"));
1086
1082
  return;
1087
1083
  }
1088
1084
  for (const issue of issues) console.log(formatIssue(issue));
@@ -1090,12 +1086,12 @@ async function doctor() {
1090
1086
  const warningCount = issues.filter((issue) => issue.severity === "warn").length;
1091
1087
  const summary = styleText("dim", `Found ${`${String(errorCount)} error(s)`}, ${`${String(warningCount)} warning(s)`}`);
1092
1088
  console.log();
1093
- console.log(` ${summary}`);
1089
+ console.log(summary);
1094
1090
  if (errorCount > 0) {
1095
1091
  const tip = styleText(["bold", "cyan"], "Tip:");
1096
1092
  const hint = styleText("dim", "moniq init");
1097
1093
  console.log();
1098
- console.log(` ${tip} Run ${hint} to scaffold a starter configuration.`);
1094
+ console.log(`${tip} Run ${hint} to scaffold a starter configuration.`);
1099
1095
  }
1100
1096
  }
1101
1097
  function checkScriptPolicies(config, issues) {
@@ -1117,23 +1113,9 @@ function checkScriptPolicies(config, issues) {
1117
1113
  }
1118
1114
  }
1119
1115
  function formatIssue(issue) {
1120
- let icon;
1121
- let label;
1122
- let iconColor;
1123
- if (issue.severity === "error") {
1124
- icon = "✘";
1125
- label = styleText(["bold", "red"], "ERROR");
1126
- iconColor = "dim";
1127
- } else if (issue.severity === "warn") {
1128
- icon = "⚠";
1129
- label = styleText(["bold", "yellow"], "WARN");
1130
- iconColor = "dim";
1131
- } else {
1132
- icon = "ℹ";
1133
- label = styleText(["bold", "cyan"], "INFO");
1134
- iconColor = "cyan";
1135
- }
1136
- return ` ${styleText(iconColor, icon)} ${label} ${issue.message}`;
1116
+ if (issue.severity === "error") return ` ${styleText(["bold", "red"], "✘")} ${styleText(["bold", "red"], "ERROR")} ${issue.message}`;
1117
+ if (issue.severity === "warn") return ` ${styleText(["bold", "yellow"], "⚠")} ${styleText(["bold", "yellow"], "WARN")} ${issue.message}`;
1118
+ return ` ${styleText("cyan", "ℹ")} ${styleText(["bold", "cyan"], "INFO")} ${issue.message}`;
1137
1119
  }
1138
1120
  function severityIndex(severity) {
1139
1121
  if (severity === "error") return 2;
@@ -1264,10 +1246,10 @@ async function init(options) {
1264
1246
  const configPath = path.join(cwd, filename);
1265
1247
  if (!await handleExistingConfig(configPath, filename)) return;
1266
1248
  let workspaceLabel = "single package";
1267
- let childPackages = [];
1249
+ let workspacePackages = [];
1268
1250
  try {
1269
- childPackages = (await discoverWorkspace(cwd)).filter((p) => path.resolve(cwd, p.path) !== path.resolve(cwd));
1270
- if (childPackages.length > 1) workspaceLabel = `monorepo with ${String(childPackages.length)} packages`;
1251
+ workspacePackages = await discoverWorkspace(cwd);
1252
+ if (workspacePackages.length > 1) workspaceLabel = `monorepo with ${String(workspacePackages.length)} packages`;
1271
1253
  } catch {
1272
1254
  workspaceLabel = "unknown (workspace detection failed)";
1273
1255
  }
@@ -1285,7 +1267,7 @@ async function init(options) {
1285
1267
  const labelIndent = " ".repeat(19);
1286
1268
  console.log(topDivider);
1287
1269
  console.log(` ${dim(labelPad("Workspace:"))} ${cyan(workspaceLabel)}`);
1288
- if (childPackages.length > 1) for (const package_ of childPackages) {
1270
+ if (workspacePackages.length > 1) for (const package_ of workspacePackages) {
1289
1271
  const bullet = dim(`• ${path.relative(cwd, package_.path)}`);
1290
1272
  console.log(` ${labelIndent}${bullet}`);
1291
1273
  }
@@ -1294,11 +1276,11 @@ async function init(options) {
1294
1276
  console.log(bottomDivider);
1295
1277
  console.log();
1296
1278
  if (!_cwd) {
1297
- const stopSpinner = startSpinner("Installing @udohjeremiah/moniq as devDependency...");
1279
+ const stopSpinner = startSpinner(`Installing ${styleText("cyan", "@udohjeremiah/moniq")} as devDependency...`);
1298
1280
  try {
1299
1281
  await installPackage(pm, cwd, options.version);
1300
1282
  stopSpinner();
1301
- console.log(` ✔ Installed @udohjeremiah/moniq as devDependency`);
1283
+ console.log(` ${styleText(["bold", "green"], "✔ Installed @udohjeremiah/moniq as devDependency")}`);
1302
1284
  } catch (error) {
1303
1285
  stopSpinner();
1304
1286
  const styledError = styleText("red", `✘ ${`Installation failed: ${String(error)}`}`);
@@ -1402,7 +1384,7 @@ function startSpinner(text) {
1402
1384
  ];
1403
1385
  let index = 0;
1404
1386
  const id = setInterval(() => {
1405
- const styled = styleText("dim", `${frames.at(index) ?? ""} ${text}`);
1387
+ const styled = `${styleText("dim", frames.at(index) ?? "")} ${text}`;
1406
1388
  process.stdout.write(`\r ${styled}`);
1407
1389
  index = (index + 1) % frames.length;
1408
1390
  }, 80);
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","names":["wcmatch"],"sources":["../../../node_modules/.pnpm/cac@7.0.0/node_modules/cac/dist/index.js","../../workspace/dist/index.js","../../../node_modules/.pnpm/wildcard-match@5.1.4/node_modules/wildcard-match/build/index.es.mjs","../../core/dist/index.js","../../cli/dist/index.js"],"sourcesContent":["//#region node_modules/.pnpm/mri@1.2.0/node_modules/mri/lib/index.mjs\nfunction toArr(any) {\n\treturn any == null ? [] : Array.isArray(any) ? any : [any];\n}\nfunction toVal(out, key, val, opts) {\n\tvar x, old = out[key], nxt = !!~opts.string.indexOf(key) ? val == null || val === true ? \"\" : String(val) : typeof val === \"boolean\" ? val : !!~opts.boolean.indexOf(key) ? val === \"false\" ? false : val === \"true\" || (out._.push((x = +val, x * 0 === 0) ? x : val), !!val) : (x = +val, x * 0 === 0) ? x : val;\n\tout[key] = old == null ? nxt : Array.isArray(old) ? old.concat(nxt) : [old, nxt];\n}\nfunction lib_default(args, opts) {\n\targs = args || [];\n\topts = opts || {};\n\tvar k, arr, arg, name, val, out = { _: [] };\n\tvar i = 0, j = 0, idx = 0, len = args.length;\n\tconst alibi = opts.alias !== void 0;\n\tconst strict = opts.unknown !== void 0;\n\tconst defaults = opts.default !== void 0;\n\topts.alias = opts.alias || {};\n\topts.string = toArr(opts.string);\n\topts.boolean = toArr(opts.boolean);\n\tif (alibi) for (k in opts.alias) {\n\t\tarr = opts.alias[k] = toArr(opts.alias[k]);\n\t\tfor (i = 0; i < arr.length; i++) (opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);\n\t}\n\tfor (i = opts.boolean.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.boolean[i]] || [];\n\t\tfor (j = arr.length; j-- > 0;) opts.boolean.push(arr[j]);\n\t}\n\tfor (i = opts.string.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.string[i]] || [];\n\t\tfor (j = arr.length; j-- > 0;) opts.string.push(arr[j]);\n\t}\n\tif (defaults) for (k in opts.default) {\n\t\tname = typeof opts.default[k];\n\t\tarr = opts.alias[k] = opts.alias[k] || [];\n\t\tif (opts[name] !== void 0) {\n\t\t\topts[name].push(k);\n\t\t\tfor (i = 0; i < arr.length; i++) opts[name].push(arr[i]);\n\t\t}\n\t}\n\tconst keys = strict ? Object.keys(opts.alias) : [];\n\tfor (i = 0; i < len; i++) {\n\t\targ = args[i];\n\t\tif (arg === \"--\") {\n\t\t\tout._ = out._.concat(args.slice(++i));\n\t\t\tbreak;\n\t\t}\n\t\tfor (j = 0; j < arg.length; j++) if (arg.charCodeAt(j) !== 45) break;\n\t\tif (j === 0) out._.push(arg);\n\t\telse if (arg.substring(j, j + 3) === \"no-\") {\n\t\t\tname = arg.substring(j + 3);\n\t\t\tif (strict && !~keys.indexOf(name)) return opts.unknown(arg);\n\t\t\tout[name] = false;\n\t\t} else {\n\t\t\tfor (idx = j + 1; idx < arg.length; idx++) if (arg.charCodeAt(idx) === 61) break;\n\t\t\tname = arg.substring(j, idx);\n\t\t\tval = arg.substring(++idx) || i + 1 === len || (\"\" + args[i + 1]).charCodeAt(0) === 45 || args[++i];\n\t\t\tarr = j === 2 ? [name] : name;\n\t\t\tfor (idx = 0; idx < arr.length; idx++) {\n\t\t\t\tname = arr[idx];\n\t\t\t\tif (strict && !~keys.indexOf(name)) return opts.unknown(\"-\".repeat(j) + name);\n\t\t\t\ttoVal(out, name, idx + 1 < arr.length || val, opts);\n\t\t\t}\n\t\t}\n\t}\n\tif (defaults) {\n\t\tfor (k in opts.default) if (out[k] === void 0) out[k] = opts.default[k];\n\t}\n\tif (alibi) for (k in out) {\n\t\tarr = opts.alias[k] || [];\n\t\twhile (arr.length > 0) out[arr.shift()] = out[k];\n\t}\n\treturn out;\n}\n\n//#endregion\n//#region src/utils.ts\nfunction removeBrackets(v) {\n\treturn v.replace(/[<[].+/, \"\").trim();\n}\nfunction findAllBrackets(v) {\n\tconst ANGLED_BRACKET_RE_GLOBAL = /<([^>]+)>/g;\n\tconst SQUARE_BRACKET_RE_GLOBAL = /\\[([^\\]]+)\\]/g;\n\tconst res = [];\n\tconst parse = (match) => {\n\t\tlet variadic = false;\n\t\tlet value = match[1];\n\t\tif (value.startsWith(\"...\")) {\n\t\t\tvalue = value.slice(3);\n\t\t\tvariadic = true;\n\t\t}\n\t\treturn {\n\t\t\trequired: match[0].startsWith(\"<\"),\n\t\t\tvalue,\n\t\t\tvariadic\n\t\t};\n\t};\n\tlet angledMatch;\n\twhile (angledMatch = ANGLED_BRACKET_RE_GLOBAL.exec(v)) res.push(parse(angledMatch));\n\tlet squareMatch;\n\twhile (squareMatch = SQUARE_BRACKET_RE_GLOBAL.exec(v)) res.push(parse(squareMatch));\n\treturn res;\n}\nfunction getMriOptions(options) {\n\tconst result = {\n\t\talias: {},\n\t\tboolean: []\n\t};\n\tfor (const [index, option] of options.entries()) {\n\t\tif (option.names.length > 1) result.alias[option.names[0]] = option.names.slice(1);\n\t\tif (option.isBoolean) if (option.negated) {\n\t\t\tif (!options.some((o, i) => {\n\t\t\t\treturn i !== index && o.names.some((name) => option.names.includes(name)) && typeof o.required === \"boolean\";\n\t\t\t})) result.boolean.push(option.names[0]);\n\t\t} else result.boolean.push(option.names[0]);\n\t}\n\treturn result;\n}\nfunction findLongest(arr) {\n\treturn arr.sort((a, b) => {\n\t\treturn a.length > b.length ? -1 : 1;\n\t})[0];\n}\nfunction padRight(str, length) {\n\treturn str.length >= length ? str : `${str}${\" \".repeat(length - str.length)}`;\n}\nfunction camelcase(input) {\n\treturn input.replaceAll(/([a-z])-([a-z])/g, (_, p1, p2) => {\n\t\treturn p1 + p2.toUpperCase();\n\t});\n}\nfunction setDotProp(obj, keys, val) {\n\tlet current = obj;\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tconst key = keys[i];\n\t\tif (i === keys.length - 1) {\n\t\t\tcurrent[key] = val;\n\t\t\treturn;\n\t\t}\n\t\tif (current[key] == null) {\n\t\t\tconst nextKeyIsArrayIndex = +keys[i + 1] > -1;\n\t\t\tcurrent[key] = nextKeyIsArrayIndex ? [] : {};\n\t\t}\n\t\tcurrent = current[key];\n\t}\n}\nfunction setByType(obj, transforms) {\n\tfor (const key of Object.keys(transforms)) {\n\t\tconst transform = transforms[key];\n\t\tif (transform.shouldTransform) {\n\t\t\tobj[key] = [obj[key]].flat();\n\t\t\tif (typeof transform.transformFunction === \"function\") obj[key] = obj[key].map(transform.transformFunction);\n\t\t}\n\t}\n}\nfunction getFileName(input) {\n\tconst m = /([^\\\\/]+)$/.exec(input);\n\treturn m ? m[1] : \"\";\n}\nfunction camelcaseOptionName(name) {\n\treturn name.split(\".\").map((v, i) => {\n\t\treturn i === 0 ? camelcase(v) : v;\n\t}).join(\".\");\n}\nvar CACError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"CACError\";\n\t\tif (typeof Error.captureStackTrace !== \"function\") this.stack = new Error(message).stack;\n\t}\n};\n\n//#endregion\n//#region src/option.ts\nvar Option = class {\n\trawName;\n\tdescription;\n\t/** Option name */\n\tname;\n\t/** Option name and aliases */\n\tnames;\n\tisBoolean;\n\trequired;\n\tconfig;\n\tnegated;\n\tconstructor(rawName, description, config) {\n\t\tthis.rawName = rawName;\n\t\tthis.description = description;\n\t\tthis.config = Object.assign({}, config);\n\t\trawName = rawName.replaceAll(\".*\", \"\");\n\t\tthis.negated = false;\n\t\tthis.names = removeBrackets(rawName).split(\",\").map((v) => {\n\t\t\tlet name = v.trim().replace(/^-{1,2}/, \"\");\n\t\t\tif (name.startsWith(\"no-\")) {\n\t\t\t\tthis.negated = true;\n\t\t\t\tname = name.replace(/^no-/, \"\");\n\t\t\t}\n\t\t\treturn camelcaseOptionName(name);\n\t\t}).sort((a, b) => a.length > b.length ? 1 : -1);\n\t\tthis.name = this.names.at(-1);\n\t\tif (this.negated && this.config.default == null) this.config.default = true;\n\t\tif (rawName.includes(\"<\")) this.required = true;\n\t\telse if (rawName.includes(\"[\")) this.required = false;\n\t\telse this.isBoolean = true;\n\t}\n};\n\n//#endregion\n//#region src/runtime.ts\nlet runtimeProcessArgs;\nlet runtimeInfo;\nif (typeof process !== \"undefined\") {\n\tlet runtimeName;\n\tif (typeof Deno !== \"undefined\" && typeof Deno.version?.deno === \"string\") runtimeName = \"deno\";\n\telse if (typeof Bun !== \"undefined\" && typeof Bun.version === \"string\") runtimeName = \"bun\";\n\telse runtimeName = \"node\";\n\truntimeInfo = `${process.platform}-${process.arch} ${runtimeName}-${process.version}`;\n\truntimeProcessArgs = process.argv;\n} else if (typeof navigator === \"undefined\") runtimeInfo = `unknown`;\nelse runtimeInfo = `${navigator.platform} ${navigator.userAgent}`;\n\n//#endregion\n//#region src/command.ts\nvar Command = class {\n\trawName;\n\tdescription;\n\tconfig;\n\tcli;\n\toptions;\n\taliasNames;\n\tname;\n\targs;\n\tcommandAction;\n\tusageText;\n\tversionNumber;\n\texamples;\n\thelpCallback;\n\tglobalCommand;\n\tconstructor(rawName, description, config = {}, cli) {\n\t\tthis.rawName = rawName;\n\t\tthis.description = description;\n\t\tthis.config = config;\n\t\tthis.cli = cli;\n\t\tthis.options = [];\n\t\tthis.aliasNames = [];\n\t\tthis.name = removeBrackets(rawName);\n\t\tthis.args = findAllBrackets(rawName);\n\t\tthis.examples = [];\n\t}\n\tusage(text) {\n\t\tthis.usageText = text;\n\t\treturn this;\n\t}\n\tallowUnknownOptions() {\n\t\tthis.config.allowUnknownOptions = true;\n\t\treturn this;\n\t}\n\tignoreOptionDefaultValue() {\n\t\tthis.config.ignoreOptionDefaultValue = true;\n\t\treturn this;\n\t}\n\tversion(version, customFlags = \"-v, --version\") {\n\t\tthis.versionNumber = version;\n\t\tthis.option(customFlags, \"Display version number\");\n\t\treturn this;\n\t}\n\texample(example) {\n\t\tthis.examples.push(example);\n\t\treturn this;\n\t}\n\t/**\n\t* Add a option for this command\n\t* @param rawName Raw option name(s)\n\t* @param description Option description\n\t* @param config Option config\n\t*/\n\toption(rawName, description, config) {\n\t\tconst option = new Option(rawName, description, config);\n\t\tthis.options.push(option);\n\t\treturn this;\n\t}\n\talias(name) {\n\t\tthis.aliasNames.push(name);\n\t\treturn this;\n\t}\n\taction(callback) {\n\t\tthis.commandAction = callback;\n\t\treturn this;\n\t}\n\t/**\n\t* Check if a command name is matched by this command\n\t* @param name Command name\n\t*/\n\tisMatched(name) {\n\t\treturn this.name === name || this.aliasNames.includes(name);\n\t}\n\tget isDefaultCommand() {\n\t\treturn this.name === \"\" || this.aliasNames.includes(\"!\");\n\t}\n\tget isGlobalCommand() {\n\t\treturn this instanceof GlobalCommand;\n\t}\n\t/**\n\t* Check if an option is registered in this command\n\t* @param name Option name\n\t*/\n\thasOption(name) {\n\t\tname = name.split(\".\")[0];\n\t\treturn this.options.find((option) => {\n\t\t\treturn option.names.includes(name);\n\t\t});\n\t}\n\toutputHelp() {\n\t\tconst { name, commands } = this.cli;\n\t\tconst { versionNumber, options: globalOptions, helpCallback } = this.cli.globalCommand;\n\t\tlet sections = [{ body: `${name}${versionNumber ? `/${versionNumber}` : \"\"}` }];\n\t\tsections.push({\n\t\t\ttitle: \"Usage\",\n\t\t\tbody: ` $ ${name} ${this.usageText || this.rawName}`\n\t\t});\n\t\tif ((this.isGlobalCommand || this.isDefaultCommand) && commands.length > 0) {\n\t\t\tconst longestCommandName = findLongest(commands.map((command) => command.rawName));\n\t\t\tsections.push({\n\t\t\t\ttitle: \"Commands\",\n\t\t\t\tbody: commands.map((command) => {\n\t\t\t\t\treturn ` ${padRight(command.rawName, longestCommandName.length)} ${command.description}`;\n\t\t\t\t}).join(\"\\n\")\n\t\t\t}, {\n\t\t\t\ttitle: `For more info, run any command with the \\`--help\\` flag`,\n\t\t\t\tbody: commands.map((command) => ` $ ${name}${command.name === \"\" ? \"\" : ` ${command.name}`} --help`).join(\"\\n\")\n\t\t\t});\n\t\t}\n\t\tlet options = this.isGlobalCommand ? globalOptions : [...this.options, ...globalOptions || []];\n\t\tif (!this.isGlobalCommand && !this.isDefaultCommand) options = options.filter((option) => option.name !== \"version\");\n\t\tif (options.length > 0) {\n\t\t\tconst longestOptionName = findLongest(options.map((option) => option.rawName));\n\t\t\tsections.push({\n\t\t\t\ttitle: \"Options\",\n\t\t\t\tbody: options.map((option) => {\n\t\t\t\t\treturn ` ${padRight(option.rawName, longestOptionName.length)} ${option.description} ${option.config.default === void 0 ? \"\" : `(default: ${option.config.default})`}`;\n\t\t\t\t}).join(\"\\n\")\n\t\t\t});\n\t\t}\n\t\tif (this.examples.length > 0) sections.push({\n\t\t\ttitle: \"Examples\",\n\t\t\tbody: this.examples.map((example) => {\n\t\t\t\tif (typeof example === \"function\") return example(name);\n\t\t\t\treturn example;\n\t\t\t}).join(\"\\n\")\n\t\t});\n\t\tif (helpCallback) sections = helpCallback(sections) || sections;\n\t\tconsole.info(sections.map((section) => {\n\t\t\treturn section.title ? `${section.title}:\\n${section.body}` : section.body;\n\t\t}).join(\"\\n\\n\"));\n\t}\n\toutputVersion() {\n\t\tconst { name } = this.cli;\n\t\tconst { versionNumber } = this.cli.globalCommand;\n\t\tif (versionNumber) console.info(`${name}/${versionNumber} ${runtimeInfo}`);\n\t}\n\tcheckRequiredArgs() {\n\t\tconst minimalArgsCount = this.args.filter((arg) => arg.required).length;\n\t\tif (this.cli.args.length < minimalArgsCount) throw new CACError(`missing required args for command \\`${this.rawName}\\``);\n\t}\n\t/**\n\t* Check if the parsed options contain any unknown options\n\t*\n\t* Exit and output error when true\n\t*/\n\tcheckUnknownOptions() {\n\t\tconst { options, globalCommand } = this.cli;\n\t\tif (!this.config.allowUnknownOptions) {\n\t\t\tfor (const name of Object.keys(options)) if (name !== \"--\" && !this.hasOption(name) && !globalCommand.hasOption(name)) throw new CACError(`Unknown option \\`${name.length > 1 ? `--${name}` : `-${name}`}\\``);\n\t\t}\n\t}\n\t/**\n\t* Check if the required string-type options exist\n\t*/\n\tcheckOptionValue() {\n\t\tconst { options: parsedOptions, globalCommand } = this.cli;\n\t\tconst options = [...globalCommand.options, ...this.options];\n\t\tfor (const option of options) {\n\t\t\tconst value = parsedOptions[option.name.split(\".\")[0]];\n\t\t\tif (option.required) {\n\t\t\t\tconst hasNegated = options.some((o) => o.negated && o.names.includes(option.name));\n\t\t\t\tif (value === true || value === false && !hasNegated) throw new CACError(`option \\`${option.rawName}\\` value is missing`);\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Check if the number of args is more than expected\n\t*/\n\tcheckUnusedArgs() {\n\t\tconst maximumArgsCount = this.args.some((arg) => arg.variadic) ? Infinity : this.args.length;\n\t\tif (maximumArgsCount < this.cli.args.length) throw new CACError(`Unused args: ${this.cli.args.slice(maximumArgsCount).map((arg) => `\\`${arg}\\``).join(\", \")}`);\n\t}\n};\nvar GlobalCommand = class extends Command {\n\tconstructor(cli) {\n\t\tsuper(\"@@global@@\", \"\", {}, cli);\n\t}\n};\n\n//#endregion\n//#region src/cac.ts\nvar CAC = class extends EventTarget {\n\t/** The program name to display in help and version message */\n\tname;\n\tcommands;\n\tglobalCommand;\n\tmatchedCommand;\n\tmatchedCommandName;\n\t/**\n\t* Raw CLI arguments\n\t*/\n\trawArgs;\n\t/**\n\t* Parsed CLI arguments\n\t*/\n\targs;\n\t/**\n\t* Parsed CLI options, camelCased\n\t*/\n\toptions;\n\tshowHelpOnExit;\n\tshowVersionOnExit;\n\t/**\n\t* @param name The program name to display in help and version message\n\t*/\n\tconstructor(name = \"\") {\n\t\tsuper();\n\t\tthis.name = name;\n\t\tthis.commands = [];\n\t\tthis.rawArgs = [];\n\t\tthis.args = [];\n\t\tthis.options = {};\n\t\tthis.globalCommand = new GlobalCommand(this);\n\t\tthis.globalCommand.usage(\"<command> [options]\");\n\t}\n\t/**\n\t* Add a global usage text.\n\t*\n\t* This is not used by sub-commands.\n\t*/\n\tusage(text) {\n\t\tthis.globalCommand.usage(text);\n\t\treturn this;\n\t}\n\t/**\n\t* Add a sub-command\n\t*/\n\tcommand(rawName, description, config) {\n\t\tconst command = new Command(rawName, description || \"\", config, this);\n\t\tcommand.globalCommand = this.globalCommand;\n\t\tthis.commands.push(command);\n\t\treturn command;\n\t}\n\t/**\n\t* Add a global CLI option.\n\t*\n\t* Which is also applied to sub-commands.\n\t*/\n\toption(rawName, description, config) {\n\t\tthis.globalCommand.option(rawName, description, config);\n\t\treturn this;\n\t}\n\t/**\n\t* Show help message when `-h, --help` flags appear.\n\t*\n\t*/\n\thelp(callback) {\n\t\tthis.globalCommand.option(\"-h, --help\", \"Display this message\");\n\t\tthis.globalCommand.helpCallback = callback;\n\t\tthis.showHelpOnExit = true;\n\t\treturn this;\n\t}\n\t/**\n\t* Show version number when `-v, --version` flags appear.\n\t*\n\t*/\n\tversion(version, customFlags = \"-v, --version\") {\n\t\tthis.globalCommand.version(version, customFlags);\n\t\tthis.showVersionOnExit = true;\n\t\treturn this;\n\t}\n\t/**\n\t* Add a global example.\n\t*\n\t* This example added here will not be used by sub-commands.\n\t*/\n\texample(example) {\n\t\tthis.globalCommand.example(example);\n\t\treturn this;\n\t}\n\t/**\n\t* Output the corresponding help message\n\t* When a sub-command is matched, output the help message for the command\n\t* Otherwise output the global one.\n\t*\n\t*/\n\toutputHelp() {\n\t\tif (this.matchedCommand) this.matchedCommand.outputHelp();\n\t\telse this.globalCommand.outputHelp();\n\t}\n\t/**\n\t* Output the version number.\n\t*\n\t*/\n\toutputVersion() {\n\t\tthis.globalCommand.outputVersion();\n\t}\n\tsetParsedInfo({ args, options }, matchedCommand, matchedCommandName) {\n\t\tthis.args = args;\n\t\tthis.options = options;\n\t\tif (matchedCommand) this.matchedCommand = matchedCommand;\n\t\tif (matchedCommandName) this.matchedCommandName = matchedCommandName;\n\t\treturn this;\n\t}\n\tunsetMatchedCommand() {\n\t\tthis.matchedCommand = void 0;\n\t\tthis.matchedCommandName = void 0;\n\t}\n\t/**\n\t* Parse argv\n\t*/\n\tparse(argv, { run = true } = {}) {\n\t\tif (!argv) {\n\t\t\tif (!runtimeProcessArgs) throw new Error(\"No argv provided and runtime process argv is not available.\");\n\t\t\targv = runtimeProcessArgs;\n\t\t}\n\t\tthis.rawArgs = argv;\n\t\tif (!this.name) this.name = argv[1] ? getFileName(argv[1]) : \"cli\";\n\t\tlet shouldParse = true;\n\t\tfor (const command of this.commands) {\n\t\t\tconst parsed = this.mri(argv.slice(2), command);\n\t\t\tconst commandName = parsed.args[0];\n\t\t\tif (command.isMatched(commandName)) {\n\t\t\t\tshouldParse = false;\n\t\t\t\tconst parsedInfo = {\n\t\t\t\t\t...parsed,\n\t\t\t\t\targs: parsed.args.slice(1)\n\t\t\t\t};\n\t\t\t\tthis.setParsedInfo(parsedInfo, command, commandName);\n\t\t\t\tthis.dispatchEvent(new CustomEvent(`command:${commandName}`, { detail: command }));\n\t\t\t}\n\t\t}\n\t\tif (shouldParse) {\n\t\t\tfor (const command of this.commands) if (command.isDefaultCommand) {\n\t\t\t\tshouldParse = false;\n\t\t\t\tconst parsed = this.mri(argv.slice(2), command);\n\t\t\t\tthis.setParsedInfo(parsed, command);\n\t\t\t\tthis.dispatchEvent(new CustomEvent(\"command:!\", { detail: command }));\n\t\t\t}\n\t\t}\n\t\tif (shouldParse) {\n\t\t\tconst parsed = this.mri(argv.slice(2));\n\t\t\tthis.setParsedInfo(parsed);\n\t\t}\n\t\tif (this.options.help && this.showHelpOnExit) {\n\t\t\tthis.outputHelp();\n\t\t\trun = false;\n\t\t\tthis.unsetMatchedCommand();\n\t\t}\n\t\tif (this.options.version && this.showVersionOnExit && this.matchedCommandName == null) {\n\t\t\tthis.outputVersion();\n\t\t\trun = false;\n\t\t\tthis.unsetMatchedCommand();\n\t\t}\n\t\tconst parsedArgv = {\n\t\t\targs: this.args,\n\t\t\toptions: this.options\n\t\t};\n\t\tif (run) this.runMatchedCommand();\n\t\tif (!this.matchedCommand && this.args[0]) this.dispatchEvent(new CustomEvent(\"command:*\", { detail: this.args[0] }));\n\t\treturn parsedArgv;\n\t}\n\tmri(argv, command) {\n\t\tconst cliOptions = [...this.globalCommand.options, ...command ? command.options : []];\n\t\tconst mriOptions = getMriOptions(cliOptions);\n\t\tlet argsAfterDoubleDashes = [];\n\t\tconst doubleDashesIndex = argv.indexOf(\"--\");\n\t\tif (doubleDashesIndex !== -1) {\n\t\t\targsAfterDoubleDashes = argv.slice(doubleDashesIndex + 1);\n\t\t\targv = argv.slice(0, doubleDashesIndex);\n\t\t}\n\t\tlet parsed = lib_default(argv, mriOptions);\n\t\tparsed = Object.keys(parsed).reduce((res, name) => {\n\t\t\treturn {\n\t\t\t\t...res,\n\t\t\t\t[camelcaseOptionName(name)]: parsed[name]\n\t\t\t};\n\t\t}, { _: [] });\n\t\tconst args = parsed._;\n\t\tconst options = { \"--\": argsAfterDoubleDashes };\n\t\tconst ignoreDefault = command && command.config.ignoreOptionDefaultValue ? command.config.ignoreOptionDefaultValue : this.globalCommand.config.ignoreOptionDefaultValue;\n\t\tconst transforms = Object.create(null);\n\t\tfor (const cliOption of cliOptions) {\n\t\t\tif (!ignoreDefault && cliOption.config.default !== void 0) for (const name of cliOption.names) options[name] = cliOption.config.default;\n\t\t\tif (Array.isArray(cliOption.config.type) && transforms[cliOption.name] === void 0) {\n\t\t\t\ttransforms[cliOption.name] = Object.create(null);\n\t\t\t\ttransforms[cliOption.name].shouldTransform = true;\n\t\t\t\ttransforms[cliOption.name].transformFunction = cliOption.config.type[0];\n\t\t\t}\n\t\t}\n\t\tfor (const key of Object.keys(parsed)) if (key !== \"_\") {\n\t\t\tsetDotProp(options, key.split(\".\"), parsed[key]);\n\t\t\tsetByType(options, transforms);\n\t\t}\n\t\treturn {\n\t\t\targs,\n\t\t\toptions\n\t\t};\n\t}\n\trunMatchedCommand() {\n\t\tconst { args, options, matchedCommand: command } = this;\n\t\tif (!command || !command.commandAction) return;\n\t\tcommand.checkUnknownOptions();\n\t\tcommand.checkOptionValue();\n\t\tcommand.checkRequiredArgs();\n\t\tcommand.checkUnusedArgs();\n\t\tconst actionArgs = [];\n\t\tcommand.args.forEach((arg, index) => {\n\t\t\tif (arg.variadic) actionArgs.push(args.slice(index));\n\t\t\telse actionArgs.push(args[index]);\n\t\t});\n\t\tactionArgs.push(options);\n\t\treturn command.commandAction.apply(this, actionArgs);\n\t}\n};\n\n//#endregion\n//#region src/index.ts\n/**\n* @param name The program name to display in help and version message\n*/\nconst cac = (name = \"\") => new CAC(name);\n\n//#endregion\nexport { CAC, Command, cac, cac as default };","import { execFileSync } from \"node:child_process\";\nimport path from \"node:path\";\n//#region src/package-json.ts\nasync function readPackageJson(path) {\n\tconst { readFile } = await import(\"node:fs/promises\");\n\tconst content = await readFile(path, \"utf8\");\n\treturn JSON.parse(content);\n}\nasync function writePackageJson(filePath, data) {\n\tconst { writeFile } = await import(\"node:fs/promises\");\n\tawait writeFile(filePath, `${JSON.stringify(data, void 0, 2)}\\n`, \"utf8\");\n}\n//#endregion\n//#region src/scripts.ts\nfunction getScript(packageJson, name) {\n\tconst scripts = packageJson[\"scripts\"];\n\tif (typeof scripts !== \"object\" || scripts === null) return;\n\tconst value = Object.entries(scripts).find(([k]) => k === name)?.[1];\n\treturn typeof value === \"string\" ? value : void 0;\n}\nfunction setScript(packageJson, name, command) {\n\tlet scripts = packageJson[\"scripts\"];\n\tif (typeof scripts !== \"object\" || scripts === null) {\n\t\tscripts = {};\n\t\tpackageJson[\"scripts\"] = scripts;\n\t}\n\tObject.assign(scripts, { [name]: command });\n}\n//#endregion\n//#region src/workspace.ts\nasync function detectPackageManager(root) {\n\tfor (const [lockFile, pm] of Object.entries({\n\t\t\"bun.lock\": \"bun\",\n\t\t\"bun.lockb\": \"bun\",\n\t\t\"package-lock.json\": \"npm\",\n\t\t\"pnpm-lock.yaml\": \"pnpm\",\n\t\t\"yarn.lock\": \"yarn\"\n\t})) try {\n\t\tconst { access } = await import(\"node:fs/promises\");\n\t\tawait access(path.join(root, lockFile));\n\t\treturn pm;\n\t} catch {}\n\ttry {\n\t\tconst rawPm = (await readPackageJson(path.join(root, \"package.json\")))[\"packageManager\"];\n\t\tconst pm = typeof rawPm === \"string\" ? rawPm.split(\"@\", 2)[0] ?? \"\" : \"\";\n\t\tif ([\n\t\t\t\"bun\",\n\t\t\t\"npm\",\n\t\t\t\"pnpm\",\n\t\t\t\"yarn\"\n\t\t].includes(pm)) return pm;\n\t} catch {}\n\tconst userAgent = process.env[\"npm_config_user_agent\"] ?? \"\";\n\tif (userAgent.startsWith(\"bun\")) return \"bun\";\n\tif (userAgent.startsWith(\"pnpm\")) return \"pnpm\";\n\tif (userAgent.startsWith(\"yarn\")) return \"yarn\";\n\tif (userAgent.startsWith(\"npm\")) return \"npm\";\n\tthrow new Error(\"Could not detect package manager. Ensure a lock file (package-lock.json, pnpm-lock.yaml, yarn.lock, or bun.lock) exists in the project root.\");\n}\nasync function discoverWorkspace(root) {\n\tconst pm = await detectPackageManager(root);\n\tlet output;\n\tswitch (pm) {\n\t\tcase \"bun\": return resolveBunWorkspaces(root);\n\t\tcase \"npm\": {\n\t\t\toutput = execFileSync(pmBin(\"npm\"), [\n\t\t\t\t\"ls\",\n\t\t\t\t\"--workspaces\",\n\t\t\t\t\"--all\",\n\t\t\t\t\"--json\",\n\t\t\t\t\"--depth\",\n\t\t\t\t\"0\"\n\t\t\t], {\n\t\t\t\tcwd: root,\n\t\t\t\tencoding: \"utf8\"\n\t\t\t});\n\t\t\tconst tree = JSON.parse(output);\n\t\t\treturn Object.values(tree.dependencies ?? {}).map((entry) => ({ path: entry.path }));\n\t\t}\n\t\tcase \"pnpm\":\n\t\t\toutput = execFileSync(pmBin(\"pnpm\"), [\n\t\t\t\t\"ls\",\n\t\t\t\t\"-r\",\n\t\t\t\t\"--depth\",\n\t\t\t\t\"-1\",\n\t\t\t\t\"--json\"\n\t\t\t], {\n\t\t\t\tcwd: root,\n\t\t\t\tencoding: \"utf8\"\n\t\t\t});\n\t\t\treturn JSON.parse(output).map((entry) => ({ path: entry.path }));\n\t\tcase \"yarn\":\n\t\t\toutput = execFileSync(pmBin(\"yarn\"), [\n\t\t\t\t\"workspaces\",\n\t\t\t\t\"list\",\n\t\t\t\t\"--json\"\n\t\t\t], {\n\t\t\t\tcwd: root,\n\t\t\t\tencoding: \"utf8\"\n\t\t\t});\n\t\t\treturn output.trim().split(\"\\n\").filter(Boolean).map((line) => JSON.parse(line)).map((entry) => ({ path: path.resolve(root, entry.location) }));\n\t}\n}\nfunction getWorkspacePatterns(packageJson) {\n\tconst raw = packageJson[\"workspaces\"];\n\tif (Array.isArray(raw)) return raw;\n\tif (typeof raw === \"object\" && raw !== null && \"packages\" in raw && Array.isArray(raw.packages)) return raw.packages;\n\treturn [];\n}\nfunction pmBin(pm) {\n\treturn pm;\n}\nasync function resolveBunWorkspaces(root) {\n\tconst patterns = getWorkspacePatterns(await readPackageJson(path.join(root, \"package.json\")));\n\tconst { glob } = await import(\"node:fs/promises\");\n\tconst packagePaths = [];\n\tfor (const pattern of patterns) {\n\t\tconst iterable = glob(pattern, { cwd: root });\n\t\tfor await (const entry of iterable) {\n\t\t\tconst absolute = path.resolve(root, entry);\n\t\t\tif (!packagePaths.includes(absolute)) packagePaths.push(absolute);\n\t\t}\n\t}\n\treturn packagePaths.map((p) => ({ path: p }));\n}\n//#endregion\nexport { detectPackageManager, discoverWorkspace, getScript, readPackageJson, setScript, writePackageJson };\n\n//# sourceMappingURL=index.js.map","/**\n * Escapes a character if it has a special meaning in regular expressions\n * and returns the character as is if it doesn't\n */\nfunction escapeRegExpChar(char) {\n if (char === '-' ||\n char === '^' ||\n char === '$' ||\n char === '+' ||\n char === '.' ||\n char === '(' ||\n char === ')' ||\n char === '|' ||\n char === '[' ||\n char === ']' ||\n char === '{' ||\n char === '}' ||\n char === '*' ||\n char === '?' ||\n char === '\\\\') {\n return \"\\\\\".concat(char);\n }\n else {\n return char;\n }\n}\n/**\n * Escapes all characters in a given string that have a special meaning in regular expressions\n */\nfunction escapeRegExpString(str) {\n var result = '';\n for (var i = 0; i < str.length; i++) {\n result += escapeRegExpChar(str[i]);\n }\n return result;\n}\n/**\n * Transforms one or more glob patterns into a RegExp pattern\n */\nfunction transform(pattern, separator) {\n if (separator === void 0) { separator = true; }\n if (Array.isArray(pattern)) {\n var regExpPatterns = pattern.map(function (p) { return \"^\".concat(transform(p, separator), \"$\"); });\n return \"(?:\".concat(regExpPatterns.join('|'), \")\");\n }\n var separatorSplitter = '';\n var separatorMatcher = '';\n var wildcard = '.';\n if (separator === true) {\n separatorSplitter = '/';\n separatorMatcher = '[/\\\\\\\\]';\n wildcard = '[^/\\\\\\\\]';\n }\n else if (separator) {\n separatorSplitter = separator;\n separatorMatcher = escapeRegExpString(separatorSplitter);\n if (separatorMatcher.length > 1) {\n separatorMatcher = \"(?:\".concat(separatorMatcher, \")\");\n wildcard = \"((?!\".concat(separatorMatcher, \").)\");\n }\n else {\n wildcard = \"[^\".concat(separatorMatcher, \"]\");\n }\n }\n var requiredSeparator = separator ? \"\".concat(separatorMatcher, \"+?\") : '';\n var optionalSeparator = separator ? \"\".concat(separatorMatcher, \"*?\") : '';\n var segments = separator ? pattern.split(separatorSplitter) : [pattern];\n var result = '';\n for (var s = 0; s < segments.length; s++) {\n var segment = segments[s];\n var nextSegment = segments[s + 1];\n var currentSeparator = '';\n if (!segment && s > 0) {\n continue;\n }\n if (separator) {\n if (s === segments.length - 1) {\n currentSeparator = optionalSeparator;\n }\n else if (nextSegment !== '**') {\n currentSeparator = requiredSeparator;\n }\n else {\n currentSeparator = '';\n }\n }\n if (separator && segment === '**') {\n if (currentSeparator) {\n result +=\n s === 0\n ? ''\n : s === segments.length - 1\n ? \"(?:\".concat(requiredSeparator, \"|$)\")\n : requiredSeparator;\n result += \"(?:\".concat(wildcard, \"*?\").concat(currentSeparator, \")*?\");\n }\n continue;\n }\n for (var c = 0; c < segment.length; c++) {\n var char = segment[c];\n if (char === '\\\\') {\n if (c < segment.length - 1) {\n result += escapeRegExpChar(segment[c + 1]);\n c++;\n }\n }\n else if (char === '?') {\n result += wildcard;\n }\n else if (char === '*') {\n result += \"\".concat(wildcard, \"*?\");\n }\n else {\n result += escapeRegExpChar(char);\n }\n }\n result += currentSeparator;\n }\n return result;\n}\n\nfunction isMatch(regexp, sample) {\n if (typeof sample !== 'string') {\n throw new TypeError(\"Sample must be a string, but \".concat(typeof sample, \" given\"));\n }\n return regexp.test(sample);\n}\n/**\n * Compiles one or more glob patterns into a RegExp and returns an isMatch function.\n * The isMatch function takes a sample string as its only argument and returns `true`\n * if the string matches the pattern(s).\n *\n * ```js\n * wildcardMatch('src/*.js')('src/index.js') //=> true\n * ```\n *\n * ```js\n * const isMatch = wildcardMatch('*.example.com', '.')\n * isMatch('foo.example.com') //=> true\n * isMatch('foo.bar.com') //=> false\n * ```\n */\nfunction wildcardMatch(pattern, options) {\n if (typeof pattern !== 'string' && !Array.isArray(pattern)) {\n throw new TypeError(\"The first argument must be a single pattern string or an array of patterns, but \".concat(typeof pattern, \" given\"));\n }\n if (typeof options === 'string' || typeof options === 'boolean') {\n options = { separator: options };\n }\n if (arguments.length === 2 &&\n !(typeof options === 'undefined' ||\n (typeof options === 'object' && options !== null && !Array.isArray(options)))) {\n throw new TypeError(\"The second argument must be an options object or a string/boolean separator, but \".concat(typeof options, \" given\"));\n }\n options = options || {};\n if (options.separator === '\\\\') {\n throw new Error('\\\\ is not a valid separator because it is used for escaping. Try setting the separator to `true` instead');\n }\n var regexpPattern = transform(pattern, options.separator);\n var regexp = new RegExp(\"^\".concat(regexpPattern, \"$\"), options.flags);\n var fn = isMatch.bind(null, regexp);\n fn.options = options;\n fn.pattern = pattern;\n fn.regexp = regexp;\n return fn;\n}\n\nexport { wildcardMatch as default };\n//# sourceMappingURL=index.es.mjs.map\n","import { getScript, readPackageJson } from \"@moniq/workspace\";\nimport path from \"node:path\";\nimport wcmatch from \"wildcard-match\";\n//#region src/scripts.ts\nasync function resolveScriptPolicies(scriptsConfig, root, packages_) {\n\tconst diagnostics = [];\n\tconst entries = Object.entries(scriptsConfig ?? {});\n\tfor (const [scriptName, policyOrArray] of entries) {\n\t\tconst policies = Array.isArray(policyOrArray) ? policyOrArray : [policyOrArray];\n\t\tfor (const package_ of packages_) {\n\t\t\tconst relativePath = path.relative(root, package_.path);\n\t\t\tconst policy = pickPolicy(policies, relativePath);\n\t\t\tif (policy !== void 0 && policy.severity !== \"off\") await resolvePolicy(policy, scriptName, package_, relativePath, diagnostics);\n\t\t}\n\t}\n\treturn diagnostics;\n}\nfunction isCommandMatch(actual, expected) {\n\tif (typeof expected === \"function\") return expected(actual);\n\tif (expected instanceof RegExp) return expected.test(actual);\n\treturn actual === expected;\n}\nfunction isGlobMatch(pattern, relativePath) {\n\tif (pattern === \"*\") return true;\n\tif (pattern === \".\") return relativePath === \".\" || relativePath === \"\";\n\treturn wcmatch(pattern)(relativePath);\n}\nfunction isMatchAny(patterns, relativePath) {\n\tfor (const pattern of patterns) if (isGlobMatch(pattern, relativePath)) return true;\n\treturn false;\n}\nfunction isPolicyMatch(policy, relativePath) {\n\tconst include = policy.include ?? [\"*\"];\n\tconst exclude = policy.exclude ?? [];\n\treturn isMatchAny(include, relativePath) && !isMatchAny(exclude, relativePath);\n}\nfunction pickPolicy(policies, relativePath) {\n\tfor (const policy of policies) if (isPolicyMatch(policy, relativePath)) return policy;\n}\nasync function resolvePolicy(policy, scriptName, package_, relativePath, diagnostics) {\n\tconst packageJson = await readPackageJson(path.join(package_.path, \"package.json\"));\n\tconst packageDisplayName = packageJson[\"name\"] ?? path.basename(package_.path);\n\tconst hasScript = getScript(packageJson, scriptName) !== void 0;\n\tconst severity = policy.severity ?? \"error\";\n\tif (policy.required !== false && !hasScript) {\n\t\tdiagnostics.push({\n\t\t\tfix: policy.autofix && typeof policy.command === \"string\" ? policy.command : void 0,\n\t\t\tmessage: `Missing required script \"${scriptName}\"`,\n\t\t\tpackageName: packageDisplayName,\n\t\t\tpackagePath: package_.path,\n\t\t\tscriptName,\n\t\t\tseverity\n\t\t});\n\t\treturn;\n\t}\n\tif (policy.command === void 0 || !hasScript) return;\n\tif (policy.allowCustomCommands !== void 0 && isMatchAny(policy.allowCustomCommands, relativePath)) return;\n\tconst actualCommand = getScript(packageJson, scriptName);\n\tif (actualCommand !== void 0 && isCommandMatch(actualCommand, policy.command)) return;\n\tdiagnostics.push({\n\t\tactual: actualCommand,\n\t\texpected: typeof policy.command === \"string\" ? policy.command : void 0,\n\t\tfix: policy.autofix && typeof policy.command === \"string\" ? policy.command : void 0,\n\t\tmessage: `Unexpected command for script \"${scriptName}\"`,\n\t\tpackageName: packageDisplayName,\n\t\tpackagePath: package_.path,\n\t\tscriptName,\n\t\tseverity\n\t});\n}\n//#endregion\n//#region src/index.ts\nasync function resolve(config, root, packages_) {\n\tconst diagnostics = [];\n\tconst scriptDiags = await resolveScriptPolicies(config.scripts, root, packages_);\n\tdiagnostics.push(...scriptDiags);\n\treturn diagnostics;\n}\n//#endregion\nexport { resolve };\n\n//# sourceMappingURL=index.js.map","import { cac } from \"cac\";\nimport { loadConfig } from \"@moniq/config\";\nimport { resolve } from \"@moniq/core\";\nimport { detectPackageManager, discoverWorkspace, readPackageJson } from \"@moniq/workspace\";\nimport { styleText } from \"node:util\";\nimport path from \"node:path\";\nimport { execFile } from \"node:child_process\";\nimport { stdin } from \"node:process\";\nimport { createInterface } from \"node:readline/promises\";\n//#region ../moniq/package.json\nvar version = \"0.3.3\";\n//#endregion\n//#region src/format.ts\nfunction formatDiagnostics(diagnostics, options) {\n\tif ((options?.format ?? \"pretty\") === \"json\") return formatJson(diagnostics);\n\treturn formatPretty(diagnostics, options?.isDryRun);\n}\nfunction formatJson(diagnostics) {\n\treturn `${JSON.stringify(diagnostics, void 0, 2)}\\n`;\n}\nfunction formatPretty(diagnostics, isDryRun) {\n\tif (diagnostics.length === 0) return styleText([\"bold\", \"green\"], \"✔ No issues found.\");\n\tconst lines = [];\n\tconst byPackage = /* @__PURE__ */ new Map();\n\tfor (const d of diagnostics) {\n\t\tconst array = byPackage.get(d.packageName);\n\t\tif (array) array.push(d);\n\t\telse byPackage.set(d.packageName, [d]);\n\t}\n\tfor (const [packageName, diags] of byPackage) {\n\t\tlines.push(\"\", styleText([\"bold\", \"cyan\"], packageName));\n\t\tfor (const d of diags) pushDiagnostic(lines, d, isDryRun);\n\t}\n\tconst errorCount = diagnostics.filter((d) => d.severity === \"error\").length;\n\tconst warningCount = diagnostics.filter((d) => d.severity === \"warn\").length;\n\tconst countParts = [];\n\tif (errorCount > 0) countParts.push(styleText(\"red\", `${String(errorCount)} error(s)`));\n\tif (warningCount > 0) countParts.push(styleText(\"yellow\", `${String(warningCount)} warning(s)`));\n\tconst summary = countParts.join(\", \");\n\tconst summaryLine = `${styleText(\"cyan\", \"ℹ\")} Found ${String(diagnostics.length)} issue(s) — ${summary.length > 0 ? summary : \"all clear\"}`;\n\tlines.push(\"\", styleText(\"dim\", summaryLine));\n\tif (isDryRun) {\n\t\tconst fixableCount = diagnostics.filter((d) => d.fix && d.severity !== \"off\").length;\n\t\tlines.push(\"\", styleText(\"dim\", `${styleText(\"cyan\", \"ℹ\")} Dry-run: ${String(fixableCount)} fix(es) available`));\n\t}\n\treturn lines.join(\"\\n\");\n}\nfunction pushDiagnostic(lines, d, isDryRun) {\n\tconst badge = severityBadge(d.severity);\n\tconst icon = severityIcon(d.severity);\n\tlines.push(` ${icon} ${badge} ${d.message}`);\n\tif (d.expected && d.actual) lines.push(` ${styleText(\"dim\", \"Expected:\")} ${styleText(\"cyan\", d.expected)}`, ` ${styleText(\"dim\", \"Actual:\")} ${styleText(\"red\", d.actual)}`);\n\telse if (d.expected) lines.push(` ${styleText(\"dim\", \"Expected:\")} ${styleText(\"cyan\", d.expected)}`);\n\telse if (d.actual) lines.push(` ${styleText(\"dim\", \"Actual:\")} ${styleText(\"red\", d.actual)}`);\n\tif (d.fix) {\n\t\tconst label = styleText(\"dim\", isDryRun ? \"Would fix:\" : \"Fix:\");\n\t\tlines.push(` ${label} ${d.fix}`);\n\t}\n}\nfunction severityBadge(severity) {\n\tif (severity === \"error\") return styleText([\"bold\", \"red\"], \"ERROR\");\n\tif (severity === \"warn\") return styleText([\"bold\", \"yellow\"], \"WARN\");\n\treturn styleText(\"gray\", \"OFF\");\n}\nfunction severityIcon(severity) {\n\tif (severity === \"error\") return \"✘\";\n\tif (severity === \"warn\") return \"⚠\";\n\treturn \" \";\n}\n//#endregion\n//#region src/scripts.ts\nasync function applyScriptFixes(diagnostics, options) {\n\tconst fixable = diagnostics.filter((d) => d.fix && d.severity !== \"off\");\n\tconst isDryRun = options?.isDryRun ?? false;\n\tlet fixed = 0;\n\tlet errors = 0;\n\tconst packages = /* @__PURE__ */ new Set();\n\tfor (const d of fixable) {\n\t\tif (!d.fix) continue;\n\t\tif (isDryRun) {\n\t\t\tfixed++;\n\t\t\tpackages.add(d.packagePath);\n\t\t\tcontinue;\n\t\t}\n\t\ttry {\n\t\t\tconst packageFilePath = path.join(d.packagePath, \"package.json\");\n\t\t\tconst { readFile, writeFile } = await import(\"node:fs/promises\");\n\t\t\tconst content = await readFile(packageFilePath, \"utf8\");\n\t\t\tconst package_ = JSON.parse(content);\n\t\t\tconst scriptName = d.scriptName;\n\t\t\tif (!scriptName) continue;\n\t\t\tconst scriptsRecord = package_[\"scripts\"];\n\t\t\tif (scriptsRecord) {\n\t\t\t\tconst entries = Object.entries(scriptsRecord);\n\t\t\t\tif (!Object.hasOwn(scriptsRecord, scriptName)) entries.push([scriptName, d.fix]);\n\t\t\t\tpackage_[\"scripts\"] = Object.fromEntries(entries.map(([name, command]) => {\n\t\t\t\t\treturn name === scriptName ? [name, d.fix ?? command] : [name, command];\n\t\t\t\t}));\n\t\t\t}\n\t\t\tawait writeFile(packageFilePath, `${JSON.stringify(package_, void 0, 2)}\\n`, \"utf8\");\n\t\t\tfixed++;\n\t\t\tpackages.add(d.packagePath);\n\t\t} catch {\n\t\t\terrors++;\n\t\t}\n\t}\n\treturn {\n\t\terrors,\n\t\tfixed,\n\t\tisDryRun,\n\t\tpackageCount: packages.size\n\t};\n}\n//#endregion\n//#region src/commands/check.ts\nasync function check(options) {\n\tconst cwd = process.cwd();\n\tlet config;\n\ttry {\n\t\tconfig = await loadConfig(cwd);\n\t} catch (error) {\n\t\tthrow new Error(`Failed to load moniq.config: ${String(error)}`, { cause: error });\n\t}\n\tconst packages = await discoverWorkspace(cwd);\n\tif (packages.length === 0) throw new Error(\"No workspace packages found.\");\n\tconst diagnostics = await resolve(config, cwd, packages);\n\tlet fixSummary;\n\tif (options.fix) fixSummary = await applyScriptFixes(diagnostics, { isDryRun: options.isDryRun });\n\tif (options.format !== \"json\") {\n\t\tconsole.log(` ${styleText(\"cyan\", \"ℹ\")} Scanned ${String(packages.length)} package(s)`);\n\t\tconsole.log();\n\t}\n\tconsole.log(formatDiagnostics(diagnostics, {\n\t\tformat: options.format,\n\t\tisDryRun: options.isDryRun\n\t}));\n\tif (fixSummary) if (fixSummary.isDryRun) {\n\t\tconst message = `${styleText(\"cyan\", \"ℹ\")} Dry-run: ${String(fixSummary.fixed)} fix(es) available, ${String(fixSummary.errors)} error(s)`;\n\t\tconsole.log(styleText(\"dim\", message));\n\t} else {\n\t\tconst message = `✔ Fixed ${String(fixSummary.fixed)} issue(s) across ${String(fixSummary.packageCount)} package(s)`;\n\t\tconsole.log(styleText([\"bold\", \"green\"], message));\n\t}\n}\n//#endregion\n//#region src/commands/doctor.ts\nasync function doctor() {\n\tconst cwd = process.cwd();\n\tconst issues = [];\n\tconsole.log();\n\tconsole.log(` ${styleText(\"bold\", \"Configuration Doctor\")}`);\n\ttry {\n\t\tconst packageCount = (await discoverWorkspace(cwd)).length;\n\t\tif (packageCount === 0) issues.push({\n\t\t\tmessage: \"No workspace packages detected. Check your workspace configuration.\",\n\t\t\tseverity: \"warn\"\n\t\t});\n\t\telse issues.push({\n\t\t\tmessage: `Detected ${String(packageCount)} workspace package(s).`,\n\t\t\tseverity: \"info\"\n\t\t});\n\t} catch {\n\t\tissues.push({\n\t\t\tmessage: \"Failed to discover workspace packages. Ensure a lock file or packageManager field is present.\",\n\t\t\tseverity: \"error\"\n\t\t});\n\t}\n\ttry {\n\t\tconst config = await loadConfig(cwd);\n\t\tissues.push({\n\t\t\tmessage: \"moniq.config file found and loadable.\",\n\t\t\tseverity: \"info\"\n\t\t});\n\t\tcheckScriptPolicies(config, issues);\n\t} catch (error) {\n\t\tissues.push({\n\t\t\tmessage: `Failed to load moniq.config: ${String(error)}`,\n\t\t\tseverity: \"error\"\n\t\t});\n\t}\n\tconsole.log();\n\tissues.sort((a, b) => severityIndex(a.severity) - severityIndex(b.severity));\n\tif (!issues.some((issue) => issue.severity !== \"info\")) {\n\t\tconsole.log(` ${styleText([\"bold\", \"green\"], \"✔ Everything looks good!\")}`);\n\t\treturn;\n\t}\n\tfor (const issue of issues) console.log(formatIssue(issue));\n\tconst errorCount = issues.filter((issue) => issue.severity === \"error\").length;\n\tconst warningCount = issues.filter((issue) => issue.severity === \"warn\").length;\n\tconst summary = styleText(\"dim\", `Found ${`${String(errorCount)} error(s)`}, ${`${String(warningCount)} warning(s)`}`);\n\tconsole.log();\n\tconsole.log(` ${summary}`);\n\tif (errorCount > 0) {\n\t\tconst tip = styleText([\"bold\", \"cyan\"], \"Tip:\");\n\t\tconst hint = styleText(\"dim\", \"moniq init\");\n\t\tconsole.log();\n\t\tconsole.log(` ${tip} Run ${hint} to scaffold a starter configuration.`);\n\t}\n}\nfunction checkScriptPolicies(config, issues) {\n\tconst scripts = config.scripts;\n\tif (!scripts) return;\n\tfor (const [name, policyOrArray] of Object.entries(scripts)) {\n\t\tconst policies = Array.isArray(policyOrArray) ? policyOrArray : [policyOrArray];\n\t\tfor (const policy of policies) {\n\t\t\tconst sev = policy.severity;\n\t\t\tif (sev !== void 0 && ![\n\t\t\t\t\"error\",\n\t\t\t\t\"off\",\n\t\t\t\t\"warn\"\n\t\t\t].includes(sev)) issues.push({\n\t\t\t\tmessage: `Script policy \"${name}\" has invalid severity \"${sev}\".`,\n\t\t\t\tseverity: \"error\"\n\t\t\t});\n\t\t}\n\t}\n}\nfunction formatIssue(issue) {\n\tlet icon;\n\tlet label;\n\tlet iconColor;\n\tif (issue.severity === \"error\") {\n\t\ticon = \"✘\";\n\t\tlabel = styleText([\"bold\", \"red\"], \"ERROR\");\n\t\ticonColor = \"dim\";\n\t} else if (issue.severity === \"warn\") {\n\t\ticon = \"⚠\";\n\t\tlabel = styleText([\"bold\", \"yellow\"], \"WARN\");\n\t\ticonColor = \"dim\";\n\t} else {\n\t\ticon = \"ℹ\";\n\t\tlabel = styleText([\"bold\", \"cyan\"], \"INFO\");\n\t\ticonColor = \"cyan\";\n\t}\n\treturn ` ${styleText(iconColor, icon)} ${label} ${issue.message}`;\n}\nfunction severityIndex(severity) {\n\tif (severity === \"error\") return 2;\n\tif (severity === \"warn\") return 1;\n\treturn 0;\n}\n//#endregion\n//#region src/banner.ts\nconst colorFns = [\n\t(s) => styleText(\"cyan\", s),\n\t(s) => styleText(\"magenta\", s),\n\t(s) => styleText(\"green\", s),\n\t(s) => styleText(\"yellow\", s),\n\t(s) => styleText(\"blue\", s)\n];\nconst letterRows = [\n\t[\n\t\t\"███╗ ███╗\",\n\t\t\"████╗ ████║\",\n\t\t\"██╔████╔██║\",\n\t\t\"██║╚██╔╝██║\",\n\t\t\"██║ ╚═╝ ██║\",\n\t\t\"╚═╝ ╚═╝\"\n\t],\n\t[\n\t\t\" ██████╗ \",\n\t\t\"██╔═══██╗\",\n\t\t\"██║ ██║\",\n\t\t\"██║ ██║\",\n\t\t\"╚██████╔╝\",\n\t\t\" ╚═════╝ \"\n\t],\n\t[\n\t\t\"███╗ ██╗\",\n\t\t\"████╗ ██║\",\n\t\t\"██╔██╗ ██║\",\n\t\t\"██║╚██╗██║\",\n\t\t\"██║ ╚████║\",\n\t\t\"╚═╝ ╚═══╝\"\n\t],\n\t[\n\t\t\"██╗\",\n\t\t\"██║\",\n\t\t\"██║\",\n\t\t\"██║\",\n\t\t\"██║\",\n\t\t\"╚═╝\"\n\t],\n\t[\n\t\t\" ██████╗ \",\n\t\t\"██╔═══██╗\",\n\t\t\"██║ ██║\",\n\t\t\"██║ ██║\",\n\t\t\"╚██████╔╝\",\n\t\t\" ╚════╝╲╲ \"\n\t]\n];\nconst DESCRIPTION = \"Policy-driven workspace linter for JavaScript/TypeScript monorepos.\";\nfunction renderBanner() {\n\tconst lines = [\"\"];\n\tfor (let rowIndex = 0; rowIndex < 6; rowIndex++) lines.push(assembleRow(rowIndex));\n\tconst description = styleText(\"bold\", DESCRIPTION);\n\tlines.push(description, \"\");\n\treturn lines.join(\"\\n\");\n}\nfunction assembleRow(rowIndex) {\n\tlet row = \"\";\n\tfor (let columnIndex = 0; columnIndex < 5; columnIndex++) {\n\t\trow += rowPart(columnIndex, rowIndex);\n\t\tif (columnIndex < 4) row += \" \";\n\t}\n\treturn row;\n}\nfunction rowPart(columnIndex, rowIndex) {\n\tconst rows = letterRows.at(columnIndex);\n\tconst colorFunction = colorFns.at(columnIndex);\n\tif (rows === void 0 || colorFunction === void 0) return \"\";\n\tconst line = rows.at(rowIndex);\n\treturn line === void 0 ? \"\" : colorFunction(line);\n}\n//#endregion\n//#region src/commands/init.ts\nconst SUPPORTED_LANGS = [\n\t\"ts\",\n\t\"js\",\n\t\"mjs\",\n\t\"cjs\",\n\t\"mts\",\n\t\"cts\"\n];\nconst DIVIDER_WIDTH = 44;\nfunction labelPad(label) {\n\treturn label.padEnd(18);\n}\nconst STARTER_CONFIG = `import { defineConfig } from \"@udohjeremiah/moniq\";\n\nexport default defineConfig({\n scripts: {\n dev: { required: true },\n build: { required: true },\n lint: { required: true },\n },\n});\n`;\nasync function detectLang(cwd, packageJson) {\n\tconst rawDependencies = packageJson[\"dependencies\"];\n\tconst rawDevelopmentDependencies = packageJson[\"devDependencies\"];\n\tconst isModule = packageJson[\"type\"] === \"module\";\n\tconst { access } = await import(\"node:fs/promises\");\n\ttry {\n\t\tawait access(path.join(cwd, \"tsconfig.json\"));\n\t\treturn isModule ? \"ts\" : \"mts\";\n\t} catch {}\n\tif (typeof rawDependencies === \"object\" && rawDependencies !== null && Object.hasOwn(rawDependencies, \"typescript\")) return isModule ? \"ts\" : \"mts\";\n\tif (typeof rawDevelopmentDependencies === \"object\" && rawDevelopmentDependencies !== null && Object.hasOwn(rawDevelopmentDependencies, \"typescript\")) return isModule ? \"ts\" : \"mts\";\n\treturn isModule ? \"js\" : \"mjs\";\n}\nasync function init(options) {\n\tconst { _cwd, lang: explicitLang } = options;\n\tconst cwd = _cwd ?? process.cwd();\n\tconsole.log(renderBanner());\n\tconst rootPackageJson = await readRootPackageJson(cwd);\n\tif (rootPackageJson === void 0) return;\n\tconst lang = explicitLang ?? await detectLang(cwd, rootPackageJson);\n\tif (!SUPPORTED_LANGS.includes(lang)) {\n\t\tconst unsupportedMessage = `Unsupported --lang \"${lang}\". Supported: ${SUPPORTED_LANGS.join(\", \")}`;\n\t\tconsole.error(` ${styleText(\"yellow\", unsupportedMessage)}`);\n\t\tprocess.exitCode = 1;\n\t\treturn;\n\t}\n\tconst filename = `moniq.config.${lang}`;\n\tconst configPath = path.join(cwd, filename);\n\tif (!await handleExistingConfig(configPath, filename)) return;\n\tlet workspaceLabel = \"single package\";\n\tlet childPackages = [];\n\ttry {\n\t\tchildPackages = (await discoverWorkspace(cwd)).filter((p) => path.resolve(cwd, p.path) !== path.resolve(cwd));\n\t\tif (childPackages.length > 1) workspaceLabel = `monorepo with ${String(childPackages.length)} packages`;\n\t} catch {\n\t\tworkspaceLabel = \"unknown (workspace detection failed)\";\n\t}\n\tconst pm = await detectPackageManager(cwd);\n\tconst langDisplay = [\n\t\t\"cts\",\n\t\t\"mts\",\n\t\t\"ts\"\n\t].includes(lang) ? \"TypeScript\" : \"JavaScript\";\n\tconst dim = (s) => styleText(\"dim\", s);\n\tconst cyan = (s) => styleText(\"cyan\", s);\n\tconst sideDashes = (DIVIDER_WIDTH - 10) / 2;\n\tconst topDivider = dim(` ${\"─\".repeat(sideDashes)} Detected ${\"─\".repeat(sideDashes)}`);\n\tconst bottomDivider = dim(` ${\"─\".repeat(DIVIDER_WIDTH)}`);\n\tconst labelIndent = \" \".repeat(19);\n\tconsole.log(topDivider);\n\tconsole.log(` ${dim(labelPad(\"Workspace:\"))} ${cyan(workspaceLabel)}`);\n\tif (childPackages.length > 1) for (const package_ of childPackages) {\n\t\tconst bullet = dim(`• ${path.relative(cwd, package_.path)}`);\n\t\tconsole.log(` ${labelIndent}${bullet}`);\n\t}\n\tconsole.log(` ${dim(labelPad(\"Package Manager:\"))} ${cyan(pm)}`);\n\tconsole.log(` ${dim(labelPad(\"Language:\"))} ${cyan(langDisplay)}`);\n\tconsole.log(bottomDivider);\n\tconsole.log();\n\tif (!_cwd) {\n\t\tconst stopSpinner = startSpinner(\"Installing @udohjeremiah/moniq as devDependency...\");\n\t\ttry {\n\t\t\tawait installPackage(pm, cwd, options.version);\n\t\t\tstopSpinner();\n\t\t\tconsole.log(` ✔ Installed @udohjeremiah/moniq as devDependency`);\n\t\t} catch (error) {\n\t\t\tstopSpinner();\n\t\t\tconst styledError = styleText(\"red\", `✘ ${`Installation failed: ${String(error)}`}`);\n\t\t\tconsole.log(` ${styledError}`);\n\t\t\tconsole.log(` ${styleText(\"dim\", \"Make sure you have a working internet connection and try again.\")}`);\n\t\t\tconsole.log();\n\t\t\tprocess.exitCode = 1;\n\t\t\treturn;\n\t\t}\n\t}\n\tconst { writeFile } = await import(\"node:fs/promises\");\n\tawait writeFile(configPath, STARTER_CONFIG, \"utf8\");\n\tconst createdMessage = `✔ Created ${filename}`;\n\tconsole.log(` ${styleText([\"bold\", \"green\"], createdMessage)}`);\n\tconsole.log();\n\tconsole.log(` ${styleText(\"dim\", \"Next steps:\")}`);\n\tconsole.log(` 1. ${styleText(\"dim\", \"Edit\")} ${styleText(\"cyan\", filename)} ${styleText(\"dim\", \"to configure your policies.\")}`);\n\tconsole.log(` 2. ${styleText(\"dim\", \"Run\")} ${styleText(\"cyan\", \"moniq check\")} ${styleText(\"dim\", \"to validate your workspace.\")}`);\n\tconsole.log(` 3. ${styleText(\"dim\", \"Run\")} ${styleText(\"cyan\", \"moniq fix\")} ${styleText(\"dim\", \"to apply automatic fixes.\")}`);\n\tconsole.log();\n}\nasync function handleExistingConfig(configPath, filename) {\n\tconst { access } = await import(\"node:fs/promises\");\n\ttry {\n\t\tawait access(configPath);\n\t} catch {\n\t\treturn true;\n\t}\n\tif (!stdin.isTTY) return true;\n\tconst rl = createInterface({\n\t\tinput: stdin,\n\t\toutput: process.stdout\n\t});\n\tconst message = `${filename} already exists. Overwrite?`;\n\tconst answer = await rl.question(` ${styleText(\"dim\", message + \" (y/N) \")}`);\n\trl.close();\n\tif (answer.trim().length === 0) return false;\n\treturn answer.toLowerCase() === \"y\" || answer.toLowerCase() === \"yes\";\n}\nfunction installArguments(pm, version) {\n\tconst spec = version ? `@udohjeremiah/moniq@${version}` : \"@udohjeremiah/moniq\";\n\tswitch (pm) {\n\t\tcase \"bun\": return [\n\t\t\t\"add\",\n\t\t\t\"--dev\",\n\t\t\tspec\n\t\t];\n\t\tcase \"npm\": return [\n\t\t\t\"install\",\n\t\t\t\"--save-dev\",\n\t\t\tspec\n\t\t];\n\t\tcase \"pnpm\": return [\n\t\t\t\"add\",\n\t\t\t\"-D\",\n\t\t\t\"-w\",\n\t\t\tspec\n\t\t];\n\t\tcase \"yarn\": return [\n\t\t\t\"add\",\n\t\t\t\"--dev\",\n\t\t\tspec\n\t\t];\n\t}\n\tthrow new Error(`Unknown package manager: ${pm}`);\n}\nfunction installPackage(pm, root, version) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst child = execFile(pm, installArguments(pm, version), { cwd: root });\n\t\tlet stderr = \"\";\n\t\tchild.stderr?.on(\"data\", (chunk) => {\n\t\t\tstderr += chunk.toString();\n\t\t});\n\t\tchild.on(\"exit\", (code) => {\n\t\t\tif (code === 0) resolve();\n\t\t\telse reject(/* @__PURE__ */ new Error(`Exit code ${String(code)}: ${stderr.trim()}`));\n\t\t});\n\t\tchild.on(\"error\", reject);\n\t});\n}\nasync function readRootPackageJson(cwd) {\n\ttry {\n\t\treturn await readPackageJson(path.join(cwd, \"package.json\"));\n\t} catch {\n\t\tconsole.log();\n\t\tconsole.log(` ${styleText(\"yellow\", \"⚠ No package.json found in current directory.\")}`);\n\t\tconsole.log(` Create one first, then run ${styleText(\"cyan\", \"moniq init\")} again.`);\n\t\tconsole.log();\n\t\tprocess.exitCode = 1;\n\t\treturn;\n\t}\n}\nfunction startSpinner(text) {\n\tconst frames = [\n\t\t\"⠋\",\n\t\t\"⠙\",\n\t\t\"⠸\",\n\t\t\"⠴\",\n\t\t\"⠦\",\n\t\t\"⠧\"\n\t];\n\tlet index = 0;\n\tconst id = setInterval(() => {\n\t\tconst styled = styleText(\"dim\", `${frames.at(index) ?? \"\"} ${text}`);\n\t\tprocess.stdout.write(`\\r ${styled}`);\n\t\tindex = (index + 1) % frames.length;\n\t}, 80);\n\treturn () => {\n\t\tclearInterval(id);\n\t\tprocess.stdout.write(\"\\r\\x1B[K\");\n\t};\n}\n//#endregion\n//#region src/index.ts\nconst cli = cac(\"moniq\");\ncli.command(\"check\", \"Run policy checks\").option(\"--format <fmt>\", \"Output format: pretty or json\", { default: \"pretty\" }).action(async (options) => {\n\tconst fmt = typeof options[\"format\"] === \"string\" ? options[\"format\"] : \"pretty\";\n\ttry {\n\t\tawait check({\n\t\t\tfix: false,\n\t\t\tformat: fmt\n\t\t});\n\t} catch (error) {\n\t\tconsole.error(String(error));\n\t\tprocess.exitCode = 1;\n\t}\n});\ncli.command(\"fix\", \"Run policy checks and apply autofixes\").option(\"--dry-run\", \"Preview autofixes without writing to files\").option(\"--format <fmt>\", \"Output format: pretty or json\", { default: \"pretty\" }).action(async (options) => {\n\tconst isDryRun = options[\"dryRun\"] === true;\n\tconst fmt = typeof options[\"format\"] === \"string\" ? options[\"format\"] : \"pretty\";\n\ttry {\n\t\tawait check({\n\t\t\tfix: true,\n\t\t\tformat: fmt,\n\t\t\tisDryRun\n\t\t});\n\t} catch (error) {\n\t\tconsole.error(String(error));\n\t\tprocess.exitCode = 1;\n\t}\n});\ncli.command(\"doctor\", \"Detect configuration mistakes\").action(async () => {\n\tawait doctor();\n});\ncli.command(\"init\", \"Scaffold a moniq.config file in the current directory\").option(\"--lang <type>\", \"Config language: ts, js, mjs, cjs, mts, cts (default: auto-detected)\").action(async (options) => {\n\tawait init({\n\t\tlang: typeof options[\"lang\"] === \"string\" ? options[\"lang\"] : void 0,\n\t\tversion\n\t});\n});\ncli.help();\ncli.version(version);\ncli.parse();\n//#endregion\nexport {};\n\n//# sourceMappingURL=index.js.map"],"x_google_ignoreList":[0,2],"mappings":";;;;;;;;AACA,SAAS,MAAM,KAAK;CACnB,OAAO,OAAO,OAAO,CAAC,IAAI,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,GAAG;AAC1D;AACA,SAAS,MAAM,KAAK,KAAK,KAAK,MAAM;CACnC,IAAI,GAAG,MAAM,IAAI,MAAM,MAAM,CAAC,CAAC,CAAC,KAAK,OAAO,QAAQ,GAAG,IAAI,OAAO,QAAQ,QAAQ,OAAO,KAAK,OAAO,GAAG,IAAI,OAAO,QAAQ,YAAY,MAAM,CAAC,CAAC,CAAC,KAAK,QAAQ,QAAQ,GAAG,IAAI,QAAQ,UAAU,QAAQ,QAAQ,WAAW,IAAI,EAAE,MAAM,IAAI,CAAC,KAAK,IAAI,MAAM,KAAK,IAAI,GAAG,GAAG,CAAC,CAAC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../../node_modules/.pnpm/cac@7.0.0/node_modules/cac/dist/index.js","../../workspace/dist/index.js","../../../node_modules/.pnpm/wildcard-match@5.1.4/node_modules/wildcard-match/build/index.es.mjs","../../core/dist/index.js","../../cli/dist/index.js"],"sourcesContent":["//#region node_modules/.pnpm/mri@1.2.0/node_modules/mri/lib/index.mjs\nfunction toArr(any) {\n\treturn any == null ? [] : Array.isArray(any) ? any : [any];\n}\nfunction toVal(out, key, val, opts) {\n\tvar x, old = out[key], nxt = !!~opts.string.indexOf(key) ? val == null || val === true ? \"\" : String(val) : typeof val === \"boolean\" ? val : !!~opts.boolean.indexOf(key) ? val === \"false\" ? false : val === \"true\" || (out._.push((x = +val, x * 0 === 0) ? x : val), !!val) : (x = +val, x * 0 === 0) ? x : val;\n\tout[key] = old == null ? nxt : Array.isArray(old) ? old.concat(nxt) : [old, nxt];\n}\nfunction lib_default(args, opts) {\n\targs = args || [];\n\topts = opts || {};\n\tvar k, arr, arg, name, val, out = { _: [] };\n\tvar i = 0, j = 0, idx = 0, len = args.length;\n\tconst alibi = opts.alias !== void 0;\n\tconst strict = opts.unknown !== void 0;\n\tconst defaults = opts.default !== void 0;\n\topts.alias = opts.alias || {};\n\topts.string = toArr(opts.string);\n\topts.boolean = toArr(opts.boolean);\n\tif (alibi) for (k in opts.alias) {\n\t\tarr = opts.alias[k] = toArr(opts.alias[k]);\n\t\tfor (i = 0; i < arr.length; i++) (opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);\n\t}\n\tfor (i = opts.boolean.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.boolean[i]] || [];\n\t\tfor (j = arr.length; j-- > 0;) opts.boolean.push(arr[j]);\n\t}\n\tfor (i = opts.string.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.string[i]] || [];\n\t\tfor (j = arr.length; j-- > 0;) opts.string.push(arr[j]);\n\t}\n\tif (defaults) for (k in opts.default) {\n\t\tname = typeof opts.default[k];\n\t\tarr = opts.alias[k] = opts.alias[k] || [];\n\t\tif (opts[name] !== void 0) {\n\t\t\topts[name].push(k);\n\t\t\tfor (i = 0; i < arr.length; i++) opts[name].push(arr[i]);\n\t\t}\n\t}\n\tconst keys = strict ? Object.keys(opts.alias) : [];\n\tfor (i = 0; i < len; i++) {\n\t\targ = args[i];\n\t\tif (arg === \"--\") {\n\t\t\tout._ = out._.concat(args.slice(++i));\n\t\t\tbreak;\n\t\t}\n\t\tfor (j = 0; j < arg.length; j++) if (arg.charCodeAt(j) !== 45) break;\n\t\tif (j === 0) out._.push(arg);\n\t\telse if (arg.substring(j, j + 3) === \"no-\") {\n\t\t\tname = arg.substring(j + 3);\n\t\t\tif (strict && !~keys.indexOf(name)) return opts.unknown(arg);\n\t\t\tout[name] = false;\n\t\t} else {\n\t\t\tfor (idx = j + 1; idx < arg.length; idx++) if (arg.charCodeAt(idx) === 61) break;\n\t\t\tname = arg.substring(j, idx);\n\t\t\tval = arg.substring(++idx) || i + 1 === len || (\"\" + args[i + 1]).charCodeAt(0) === 45 || args[++i];\n\t\t\tarr = j === 2 ? [name] : name;\n\t\t\tfor (idx = 0; idx < arr.length; idx++) {\n\t\t\t\tname = arr[idx];\n\t\t\t\tif (strict && !~keys.indexOf(name)) return opts.unknown(\"-\".repeat(j) + name);\n\t\t\t\ttoVal(out, name, idx + 1 < arr.length || val, opts);\n\t\t\t}\n\t\t}\n\t}\n\tif (defaults) {\n\t\tfor (k in opts.default) if (out[k] === void 0) out[k] = opts.default[k];\n\t}\n\tif (alibi) for (k in out) {\n\t\tarr = opts.alias[k] || [];\n\t\twhile (arr.length > 0) out[arr.shift()] = out[k];\n\t}\n\treturn out;\n}\n\n//#endregion\n//#region src/utils.ts\nfunction removeBrackets(v) {\n\treturn v.replace(/[<[].+/, \"\").trim();\n}\nfunction findAllBrackets(v) {\n\tconst ANGLED_BRACKET_RE_GLOBAL = /<([^>]+)>/g;\n\tconst SQUARE_BRACKET_RE_GLOBAL = /\\[([^\\]]+)\\]/g;\n\tconst res = [];\n\tconst parse = (match) => {\n\t\tlet variadic = false;\n\t\tlet value = match[1];\n\t\tif (value.startsWith(\"...\")) {\n\t\t\tvalue = value.slice(3);\n\t\t\tvariadic = true;\n\t\t}\n\t\treturn {\n\t\t\trequired: match[0].startsWith(\"<\"),\n\t\t\tvalue,\n\t\t\tvariadic\n\t\t};\n\t};\n\tlet angledMatch;\n\twhile (angledMatch = ANGLED_BRACKET_RE_GLOBAL.exec(v)) res.push(parse(angledMatch));\n\tlet squareMatch;\n\twhile (squareMatch = SQUARE_BRACKET_RE_GLOBAL.exec(v)) res.push(parse(squareMatch));\n\treturn res;\n}\nfunction getMriOptions(options) {\n\tconst result = {\n\t\talias: {},\n\t\tboolean: []\n\t};\n\tfor (const [index, option] of options.entries()) {\n\t\tif (option.names.length > 1) result.alias[option.names[0]] = option.names.slice(1);\n\t\tif (option.isBoolean) if (option.negated) {\n\t\t\tif (!options.some((o, i) => {\n\t\t\t\treturn i !== index && o.names.some((name) => option.names.includes(name)) && typeof o.required === \"boolean\";\n\t\t\t})) result.boolean.push(option.names[0]);\n\t\t} else result.boolean.push(option.names[0]);\n\t}\n\treturn result;\n}\nfunction findLongest(arr) {\n\treturn arr.sort((a, b) => {\n\t\treturn a.length > b.length ? -1 : 1;\n\t})[0];\n}\nfunction padRight(str, length) {\n\treturn str.length >= length ? str : `${str}${\" \".repeat(length - str.length)}`;\n}\nfunction camelcase(input) {\n\treturn input.replaceAll(/([a-z])-([a-z])/g, (_, p1, p2) => {\n\t\treturn p1 + p2.toUpperCase();\n\t});\n}\nfunction setDotProp(obj, keys, val) {\n\tlet current = obj;\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tconst key = keys[i];\n\t\tif (i === keys.length - 1) {\n\t\t\tcurrent[key] = val;\n\t\t\treturn;\n\t\t}\n\t\tif (current[key] == null) {\n\t\t\tconst nextKeyIsArrayIndex = +keys[i + 1] > -1;\n\t\t\tcurrent[key] = nextKeyIsArrayIndex ? [] : {};\n\t\t}\n\t\tcurrent = current[key];\n\t}\n}\nfunction setByType(obj, transforms) {\n\tfor (const key of Object.keys(transforms)) {\n\t\tconst transform = transforms[key];\n\t\tif (transform.shouldTransform) {\n\t\t\tobj[key] = [obj[key]].flat();\n\t\t\tif (typeof transform.transformFunction === \"function\") obj[key] = obj[key].map(transform.transformFunction);\n\t\t}\n\t}\n}\nfunction getFileName(input) {\n\tconst m = /([^\\\\/]+)$/.exec(input);\n\treturn m ? m[1] : \"\";\n}\nfunction camelcaseOptionName(name) {\n\treturn name.split(\".\").map((v, i) => {\n\t\treturn i === 0 ? camelcase(v) : v;\n\t}).join(\".\");\n}\nvar CACError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"CACError\";\n\t\tif (typeof Error.captureStackTrace !== \"function\") this.stack = new Error(message).stack;\n\t}\n};\n\n//#endregion\n//#region src/option.ts\nvar Option = class {\n\trawName;\n\tdescription;\n\t/** Option name */\n\tname;\n\t/** Option name and aliases */\n\tnames;\n\tisBoolean;\n\trequired;\n\tconfig;\n\tnegated;\n\tconstructor(rawName, description, config) {\n\t\tthis.rawName = rawName;\n\t\tthis.description = description;\n\t\tthis.config = Object.assign({}, config);\n\t\trawName = rawName.replaceAll(\".*\", \"\");\n\t\tthis.negated = false;\n\t\tthis.names = removeBrackets(rawName).split(\",\").map((v) => {\n\t\t\tlet name = v.trim().replace(/^-{1,2}/, \"\");\n\t\t\tif (name.startsWith(\"no-\")) {\n\t\t\t\tthis.negated = true;\n\t\t\t\tname = name.replace(/^no-/, \"\");\n\t\t\t}\n\t\t\treturn camelcaseOptionName(name);\n\t\t}).sort((a, b) => a.length > b.length ? 1 : -1);\n\t\tthis.name = this.names.at(-1);\n\t\tif (this.negated && this.config.default == null) this.config.default = true;\n\t\tif (rawName.includes(\"<\")) this.required = true;\n\t\telse if (rawName.includes(\"[\")) this.required = false;\n\t\telse this.isBoolean = true;\n\t}\n};\n\n//#endregion\n//#region src/runtime.ts\nlet runtimeProcessArgs;\nlet runtimeInfo;\nif (typeof process !== \"undefined\") {\n\tlet runtimeName;\n\tif (typeof Deno !== \"undefined\" && typeof Deno.version?.deno === \"string\") runtimeName = \"deno\";\n\telse if (typeof Bun !== \"undefined\" && typeof Bun.version === \"string\") runtimeName = \"bun\";\n\telse runtimeName = \"node\";\n\truntimeInfo = `${process.platform}-${process.arch} ${runtimeName}-${process.version}`;\n\truntimeProcessArgs = process.argv;\n} else if (typeof navigator === \"undefined\") runtimeInfo = `unknown`;\nelse runtimeInfo = `${navigator.platform} ${navigator.userAgent}`;\n\n//#endregion\n//#region src/command.ts\nvar Command = class {\n\trawName;\n\tdescription;\n\tconfig;\n\tcli;\n\toptions;\n\taliasNames;\n\tname;\n\targs;\n\tcommandAction;\n\tusageText;\n\tversionNumber;\n\texamples;\n\thelpCallback;\n\tglobalCommand;\n\tconstructor(rawName, description, config = {}, cli) {\n\t\tthis.rawName = rawName;\n\t\tthis.description = description;\n\t\tthis.config = config;\n\t\tthis.cli = cli;\n\t\tthis.options = [];\n\t\tthis.aliasNames = [];\n\t\tthis.name = removeBrackets(rawName);\n\t\tthis.args = findAllBrackets(rawName);\n\t\tthis.examples = [];\n\t}\n\tusage(text) {\n\t\tthis.usageText = text;\n\t\treturn this;\n\t}\n\tallowUnknownOptions() {\n\t\tthis.config.allowUnknownOptions = true;\n\t\treturn this;\n\t}\n\tignoreOptionDefaultValue() {\n\t\tthis.config.ignoreOptionDefaultValue = true;\n\t\treturn this;\n\t}\n\tversion(version, customFlags = \"-v, --version\") {\n\t\tthis.versionNumber = version;\n\t\tthis.option(customFlags, \"Display version number\");\n\t\treturn this;\n\t}\n\texample(example) {\n\t\tthis.examples.push(example);\n\t\treturn this;\n\t}\n\t/**\n\t* Add a option for this command\n\t* @param rawName Raw option name(s)\n\t* @param description Option description\n\t* @param config Option config\n\t*/\n\toption(rawName, description, config) {\n\t\tconst option = new Option(rawName, description, config);\n\t\tthis.options.push(option);\n\t\treturn this;\n\t}\n\talias(name) {\n\t\tthis.aliasNames.push(name);\n\t\treturn this;\n\t}\n\taction(callback) {\n\t\tthis.commandAction = callback;\n\t\treturn this;\n\t}\n\t/**\n\t* Check if a command name is matched by this command\n\t* @param name Command name\n\t*/\n\tisMatched(name) {\n\t\treturn this.name === name || this.aliasNames.includes(name);\n\t}\n\tget isDefaultCommand() {\n\t\treturn this.name === \"\" || this.aliasNames.includes(\"!\");\n\t}\n\tget isGlobalCommand() {\n\t\treturn this instanceof GlobalCommand;\n\t}\n\t/**\n\t* Check if an option is registered in this command\n\t* @param name Option name\n\t*/\n\thasOption(name) {\n\t\tname = name.split(\".\")[0];\n\t\treturn this.options.find((option) => {\n\t\t\treturn option.names.includes(name);\n\t\t});\n\t}\n\toutputHelp() {\n\t\tconst { name, commands } = this.cli;\n\t\tconst { versionNumber, options: globalOptions, helpCallback } = this.cli.globalCommand;\n\t\tlet sections = [{ body: `${name}${versionNumber ? `/${versionNumber}` : \"\"}` }];\n\t\tsections.push({\n\t\t\ttitle: \"Usage\",\n\t\t\tbody: ` $ ${name} ${this.usageText || this.rawName}`\n\t\t});\n\t\tif ((this.isGlobalCommand || this.isDefaultCommand) && commands.length > 0) {\n\t\t\tconst longestCommandName = findLongest(commands.map((command) => command.rawName));\n\t\t\tsections.push({\n\t\t\t\ttitle: \"Commands\",\n\t\t\t\tbody: commands.map((command) => {\n\t\t\t\t\treturn ` ${padRight(command.rawName, longestCommandName.length)} ${command.description}`;\n\t\t\t\t}).join(\"\\n\")\n\t\t\t}, {\n\t\t\t\ttitle: `For more info, run any command with the \\`--help\\` flag`,\n\t\t\t\tbody: commands.map((command) => ` $ ${name}${command.name === \"\" ? \"\" : ` ${command.name}`} --help`).join(\"\\n\")\n\t\t\t});\n\t\t}\n\t\tlet options = this.isGlobalCommand ? globalOptions : [...this.options, ...globalOptions || []];\n\t\tif (!this.isGlobalCommand && !this.isDefaultCommand) options = options.filter((option) => option.name !== \"version\");\n\t\tif (options.length > 0) {\n\t\t\tconst longestOptionName = findLongest(options.map((option) => option.rawName));\n\t\t\tsections.push({\n\t\t\t\ttitle: \"Options\",\n\t\t\t\tbody: options.map((option) => {\n\t\t\t\t\treturn ` ${padRight(option.rawName, longestOptionName.length)} ${option.description} ${option.config.default === void 0 ? \"\" : `(default: ${option.config.default})`}`;\n\t\t\t\t}).join(\"\\n\")\n\t\t\t});\n\t\t}\n\t\tif (this.examples.length > 0) sections.push({\n\t\t\ttitle: \"Examples\",\n\t\t\tbody: this.examples.map((example) => {\n\t\t\t\tif (typeof example === \"function\") return example(name);\n\t\t\t\treturn example;\n\t\t\t}).join(\"\\n\")\n\t\t});\n\t\tif (helpCallback) sections = helpCallback(sections) || sections;\n\t\tconsole.info(sections.map((section) => {\n\t\t\treturn section.title ? `${section.title}:\\n${section.body}` : section.body;\n\t\t}).join(\"\\n\\n\"));\n\t}\n\toutputVersion() {\n\t\tconst { name } = this.cli;\n\t\tconst { versionNumber } = this.cli.globalCommand;\n\t\tif (versionNumber) console.info(`${name}/${versionNumber} ${runtimeInfo}`);\n\t}\n\tcheckRequiredArgs() {\n\t\tconst minimalArgsCount = this.args.filter((arg) => arg.required).length;\n\t\tif (this.cli.args.length < minimalArgsCount) throw new CACError(`missing required args for command \\`${this.rawName}\\``);\n\t}\n\t/**\n\t* Check if the parsed options contain any unknown options\n\t*\n\t* Exit and output error when true\n\t*/\n\tcheckUnknownOptions() {\n\t\tconst { options, globalCommand } = this.cli;\n\t\tif (!this.config.allowUnknownOptions) {\n\t\t\tfor (const name of Object.keys(options)) if (name !== \"--\" && !this.hasOption(name) && !globalCommand.hasOption(name)) throw new CACError(`Unknown option \\`${name.length > 1 ? `--${name}` : `-${name}`}\\``);\n\t\t}\n\t}\n\t/**\n\t* Check if the required string-type options exist\n\t*/\n\tcheckOptionValue() {\n\t\tconst { options: parsedOptions, globalCommand } = this.cli;\n\t\tconst options = [...globalCommand.options, ...this.options];\n\t\tfor (const option of options) {\n\t\t\tconst value = parsedOptions[option.name.split(\".\")[0]];\n\t\t\tif (option.required) {\n\t\t\t\tconst hasNegated = options.some((o) => o.negated && o.names.includes(option.name));\n\t\t\t\tif (value === true || value === false && !hasNegated) throw new CACError(`option \\`${option.rawName}\\` value is missing`);\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Check if the number of args is more than expected\n\t*/\n\tcheckUnusedArgs() {\n\t\tconst maximumArgsCount = this.args.some((arg) => arg.variadic) ? Infinity : this.args.length;\n\t\tif (maximumArgsCount < this.cli.args.length) throw new CACError(`Unused args: ${this.cli.args.slice(maximumArgsCount).map((arg) => `\\`${arg}\\``).join(\", \")}`);\n\t}\n};\nvar GlobalCommand = class extends Command {\n\tconstructor(cli) {\n\t\tsuper(\"@@global@@\", \"\", {}, cli);\n\t}\n};\n\n//#endregion\n//#region src/cac.ts\nvar CAC = class extends EventTarget {\n\t/** The program name to display in help and version message */\n\tname;\n\tcommands;\n\tglobalCommand;\n\tmatchedCommand;\n\tmatchedCommandName;\n\t/**\n\t* Raw CLI arguments\n\t*/\n\trawArgs;\n\t/**\n\t* Parsed CLI arguments\n\t*/\n\targs;\n\t/**\n\t* Parsed CLI options, camelCased\n\t*/\n\toptions;\n\tshowHelpOnExit;\n\tshowVersionOnExit;\n\t/**\n\t* @param name The program name to display in help and version message\n\t*/\n\tconstructor(name = \"\") {\n\t\tsuper();\n\t\tthis.name = name;\n\t\tthis.commands = [];\n\t\tthis.rawArgs = [];\n\t\tthis.args = [];\n\t\tthis.options = {};\n\t\tthis.globalCommand = new GlobalCommand(this);\n\t\tthis.globalCommand.usage(\"<command> [options]\");\n\t}\n\t/**\n\t* Add a global usage text.\n\t*\n\t* This is not used by sub-commands.\n\t*/\n\tusage(text) {\n\t\tthis.globalCommand.usage(text);\n\t\treturn this;\n\t}\n\t/**\n\t* Add a sub-command\n\t*/\n\tcommand(rawName, description, config) {\n\t\tconst command = new Command(rawName, description || \"\", config, this);\n\t\tcommand.globalCommand = this.globalCommand;\n\t\tthis.commands.push(command);\n\t\treturn command;\n\t}\n\t/**\n\t* Add a global CLI option.\n\t*\n\t* Which is also applied to sub-commands.\n\t*/\n\toption(rawName, description, config) {\n\t\tthis.globalCommand.option(rawName, description, config);\n\t\treturn this;\n\t}\n\t/**\n\t* Show help message when `-h, --help` flags appear.\n\t*\n\t*/\n\thelp(callback) {\n\t\tthis.globalCommand.option(\"-h, --help\", \"Display this message\");\n\t\tthis.globalCommand.helpCallback = callback;\n\t\tthis.showHelpOnExit = true;\n\t\treturn this;\n\t}\n\t/**\n\t* Show version number when `-v, --version` flags appear.\n\t*\n\t*/\n\tversion(version, customFlags = \"-v, --version\") {\n\t\tthis.globalCommand.version(version, customFlags);\n\t\tthis.showVersionOnExit = true;\n\t\treturn this;\n\t}\n\t/**\n\t* Add a global example.\n\t*\n\t* This example added here will not be used by sub-commands.\n\t*/\n\texample(example) {\n\t\tthis.globalCommand.example(example);\n\t\treturn this;\n\t}\n\t/**\n\t* Output the corresponding help message\n\t* When a sub-command is matched, output the help message for the command\n\t* Otherwise output the global one.\n\t*\n\t*/\n\toutputHelp() {\n\t\tif (this.matchedCommand) this.matchedCommand.outputHelp();\n\t\telse this.globalCommand.outputHelp();\n\t}\n\t/**\n\t* Output the version number.\n\t*\n\t*/\n\toutputVersion() {\n\t\tthis.globalCommand.outputVersion();\n\t}\n\tsetParsedInfo({ args, options }, matchedCommand, matchedCommandName) {\n\t\tthis.args = args;\n\t\tthis.options = options;\n\t\tif (matchedCommand) this.matchedCommand = matchedCommand;\n\t\tif (matchedCommandName) this.matchedCommandName = matchedCommandName;\n\t\treturn this;\n\t}\n\tunsetMatchedCommand() {\n\t\tthis.matchedCommand = void 0;\n\t\tthis.matchedCommandName = void 0;\n\t}\n\t/**\n\t* Parse argv\n\t*/\n\tparse(argv, { run = true } = {}) {\n\t\tif (!argv) {\n\t\t\tif (!runtimeProcessArgs) throw new Error(\"No argv provided and runtime process argv is not available.\");\n\t\t\targv = runtimeProcessArgs;\n\t\t}\n\t\tthis.rawArgs = argv;\n\t\tif (!this.name) this.name = argv[1] ? getFileName(argv[1]) : \"cli\";\n\t\tlet shouldParse = true;\n\t\tfor (const command of this.commands) {\n\t\t\tconst parsed = this.mri(argv.slice(2), command);\n\t\t\tconst commandName = parsed.args[0];\n\t\t\tif (command.isMatched(commandName)) {\n\t\t\t\tshouldParse = false;\n\t\t\t\tconst parsedInfo = {\n\t\t\t\t\t...parsed,\n\t\t\t\t\targs: parsed.args.slice(1)\n\t\t\t\t};\n\t\t\t\tthis.setParsedInfo(parsedInfo, command, commandName);\n\t\t\t\tthis.dispatchEvent(new CustomEvent(`command:${commandName}`, { detail: command }));\n\t\t\t}\n\t\t}\n\t\tif (shouldParse) {\n\t\t\tfor (const command of this.commands) if (command.isDefaultCommand) {\n\t\t\t\tshouldParse = false;\n\t\t\t\tconst parsed = this.mri(argv.slice(2), command);\n\t\t\t\tthis.setParsedInfo(parsed, command);\n\t\t\t\tthis.dispatchEvent(new CustomEvent(\"command:!\", { detail: command }));\n\t\t\t}\n\t\t}\n\t\tif (shouldParse) {\n\t\t\tconst parsed = this.mri(argv.slice(2));\n\t\t\tthis.setParsedInfo(parsed);\n\t\t}\n\t\tif (this.options.help && this.showHelpOnExit) {\n\t\t\tthis.outputHelp();\n\t\t\trun = false;\n\t\t\tthis.unsetMatchedCommand();\n\t\t}\n\t\tif (this.options.version && this.showVersionOnExit && this.matchedCommandName == null) {\n\t\t\tthis.outputVersion();\n\t\t\trun = false;\n\t\t\tthis.unsetMatchedCommand();\n\t\t}\n\t\tconst parsedArgv = {\n\t\t\targs: this.args,\n\t\t\toptions: this.options\n\t\t};\n\t\tif (run) this.runMatchedCommand();\n\t\tif (!this.matchedCommand && this.args[0]) this.dispatchEvent(new CustomEvent(\"command:*\", { detail: this.args[0] }));\n\t\treturn parsedArgv;\n\t}\n\tmri(argv, command) {\n\t\tconst cliOptions = [...this.globalCommand.options, ...command ? command.options : []];\n\t\tconst mriOptions = getMriOptions(cliOptions);\n\t\tlet argsAfterDoubleDashes = [];\n\t\tconst doubleDashesIndex = argv.indexOf(\"--\");\n\t\tif (doubleDashesIndex !== -1) {\n\t\t\targsAfterDoubleDashes = argv.slice(doubleDashesIndex + 1);\n\t\t\targv = argv.slice(0, doubleDashesIndex);\n\t\t}\n\t\tlet parsed = lib_default(argv, mriOptions);\n\t\tparsed = Object.keys(parsed).reduce((res, name) => {\n\t\t\treturn {\n\t\t\t\t...res,\n\t\t\t\t[camelcaseOptionName(name)]: parsed[name]\n\t\t\t};\n\t\t}, { _: [] });\n\t\tconst args = parsed._;\n\t\tconst options = { \"--\": argsAfterDoubleDashes };\n\t\tconst ignoreDefault = command && command.config.ignoreOptionDefaultValue ? command.config.ignoreOptionDefaultValue : this.globalCommand.config.ignoreOptionDefaultValue;\n\t\tconst transforms = Object.create(null);\n\t\tfor (const cliOption of cliOptions) {\n\t\t\tif (!ignoreDefault && cliOption.config.default !== void 0) for (const name of cliOption.names) options[name] = cliOption.config.default;\n\t\t\tif (Array.isArray(cliOption.config.type) && transforms[cliOption.name] === void 0) {\n\t\t\t\ttransforms[cliOption.name] = Object.create(null);\n\t\t\t\ttransforms[cliOption.name].shouldTransform = true;\n\t\t\t\ttransforms[cliOption.name].transformFunction = cliOption.config.type[0];\n\t\t\t}\n\t\t}\n\t\tfor (const key of Object.keys(parsed)) if (key !== \"_\") {\n\t\t\tsetDotProp(options, key.split(\".\"), parsed[key]);\n\t\t\tsetByType(options, transforms);\n\t\t}\n\t\treturn {\n\t\t\targs,\n\t\t\toptions\n\t\t};\n\t}\n\trunMatchedCommand() {\n\t\tconst { args, options, matchedCommand: command } = this;\n\t\tif (!command || !command.commandAction) return;\n\t\tcommand.checkUnknownOptions();\n\t\tcommand.checkOptionValue();\n\t\tcommand.checkRequiredArgs();\n\t\tcommand.checkUnusedArgs();\n\t\tconst actionArgs = [];\n\t\tcommand.args.forEach((arg, index) => {\n\t\t\tif (arg.variadic) actionArgs.push(args.slice(index));\n\t\t\telse actionArgs.push(args[index]);\n\t\t});\n\t\tactionArgs.push(options);\n\t\treturn command.commandAction.apply(this, actionArgs);\n\t}\n};\n\n//#endregion\n//#region src/index.ts\n/**\n* @param name The program name to display in help and version message\n*/\nconst cac = (name = \"\") => new CAC(name);\n\n//#endregion\nexport { CAC, Command, cac, cac as default };","import { execFileSync } from \"node:child_process\";\nimport path from \"node:path\";\n//#region src/package-json.ts\nasync function readPackageJson(path) {\n\tconst { readFile } = await import(\"node:fs/promises\");\n\tconst content = await readFile(path, \"utf8\");\n\treturn JSON.parse(content);\n}\nasync function writePackageJson(filePath, data) {\n\tconst { writeFile } = await import(\"node:fs/promises\");\n\tawait writeFile(filePath, `${JSON.stringify(data, void 0, 2)}\\n`, \"utf8\");\n}\n//#endregion\n//#region src/scripts.ts\nfunction getScript(packageJson, name) {\n\tconst scripts = packageJson[\"scripts\"];\n\tif (typeof scripts !== \"object\" || scripts === null) return;\n\tconst value = Object.entries(scripts).find(([k]) => k === name)?.[1];\n\treturn typeof value === \"string\" ? value : void 0;\n}\nfunction setScript(packageJson, name, command) {\n\tlet scripts = packageJson[\"scripts\"];\n\tif (typeof scripts !== \"object\" || scripts === null) {\n\t\tscripts = {};\n\t\tpackageJson[\"scripts\"] = scripts;\n\t}\n\tObject.assign(scripts, { [name]: command });\n}\n//#endregion\n//#region src/workspace.ts\nasync function detectPackageManager(root) {\n\tfor (const [lockFile, pm] of Object.entries({\n\t\t\"bun.lock\": \"bun\",\n\t\t\"bun.lockb\": \"bun\",\n\t\t\"package-lock.json\": \"npm\",\n\t\t\"pnpm-lock.yaml\": \"pnpm\",\n\t\t\"yarn.lock\": \"yarn\"\n\t})) try {\n\t\tconst { access } = await import(\"node:fs/promises\");\n\t\tawait access(path.join(root, lockFile));\n\t\treturn pm;\n\t} catch {}\n\ttry {\n\t\tconst rawPm = (await readPackageJson(path.join(root, \"package.json\")))[\"packageManager\"];\n\t\tconst pm = typeof rawPm === \"string\" ? rawPm.split(\"@\", 2)[0] ?? \"\" : \"\";\n\t\tif ([\n\t\t\t\"bun\",\n\t\t\t\"npm\",\n\t\t\t\"pnpm\",\n\t\t\t\"yarn\"\n\t\t].includes(pm)) return pm;\n\t} catch {}\n\tconst userAgent = process.env[\"npm_config_user_agent\"] ?? \"\";\n\tif (userAgent.startsWith(\"bun\")) return \"bun\";\n\tif (userAgent.startsWith(\"pnpm\")) return \"pnpm\";\n\tif (userAgent.startsWith(\"yarn\")) return \"yarn\";\n\tif (userAgent.startsWith(\"npm\")) return \"npm\";\n\tthrow new Error(\"Could not detect package manager. Ensure a lock file (package-lock.json, pnpm-lock.yaml, yarn.lock, or bun.lock) exists in the project root.\");\n}\nasync function discoverWorkspace(root) {\n\tconst pm = await detectPackageManager(root);\n\tlet output;\n\tswitch (pm) {\n\t\tcase \"bun\": return resolveBunWorkspaces(root);\n\t\tcase \"npm\": {\n\t\t\toutput = execFileSync(pmBin(\"npm\"), [\n\t\t\t\t\"ls\",\n\t\t\t\t\"--workspaces\",\n\t\t\t\t\"--all\",\n\t\t\t\t\"--json\",\n\t\t\t\t\"--depth\",\n\t\t\t\t\"0\"\n\t\t\t], {\n\t\t\t\tcwd: root,\n\t\t\t\tencoding: \"utf8\"\n\t\t\t});\n\t\t\tconst tree = JSON.parse(output);\n\t\t\treturn Object.values(tree.dependencies ?? {}).map((entry) => ({ path: entry.path }));\n\t\t}\n\t\tcase \"pnpm\":\n\t\t\toutput = execFileSync(pmBin(\"pnpm\"), [\n\t\t\t\t\"ls\",\n\t\t\t\t\"-r\",\n\t\t\t\t\"--depth\",\n\t\t\t\t\"-1\",\n\t\t\t\t\"--json\"\n\t\t\t], {\n\t\t\t\tcwd: root,\n\t\t\t\tencoding: \"utf8\"\n\t\t\t});\n\t\t\treturn JSON.parse(output).map((entry) => ({ path: entry.path }));\n\t\tcase \"yarn\":\n\t\t\toutput = execFileSync(pmBin(\"yarn\"), [\n\t\t\t\t\"workspaces\",\n\t\t\t\t\"list\",\n\t\t\t\t\"--json\"\n\t\t\t], {\n\t\t\t\tcwd: root,\n\t\t\t\tencoding: \"utf8\"\n\t\t\t});\n\t\t\treturn output.trim().split(\"\\n\").filter(Boolean).map((line) => JSON.parse(line)).map((entry) => ({ path: path.resolve(root, entry.location) }));\n\t}\n}\nfunction getWorkspacePatterns(packageJson) {\n\tconst raw = packageJson[\"workspaces\"];\n\tif (Array.isArray(raw)) return raw;\n\tif (typeof raw === \"object\" && raw !== null && \"packages\" in raw && Array.isArray(raw.packages)) return raw.packages;\n\treturn [];\n}\nfunction pmBin(pm) {\n\treturn pm;\n}\nasync function resolveBunWorkspaces(root) {\n\tconst patterns = getWorkspacePatterns(await readPackageJson(path.join(root, \"package.json\")));\n\tconst { glob } = await import(\"node:fs/promises\");\n\tconst packagePaths = [];\n\tfor (const pattern of patterns) {\n\t\tconst iterable = glob(pattern, { cwd: root });\n\t\tfor await (const entry of iterable) {\n\t\t\tconst absolute = path.resolve(root, entry);\n\t\t\tif (!packagePaths.includes(absolute)) packagePaths.push(absolute);\n\t\t}\n\t}\n\treturn packagePaths.map((p) => ({ path: p }));\n}\n//#endregion\nexport { detectPackageManager, discoverWorkspace, getScript, readPackageJson, setScript, writePackageJson };\n\n//# sourceMappingURL=index.js.map","/**\n * Escapes a character if it has a special meaning in regular expressions\n * and returns the character as is if it doesn't\n */\nfunction escapeRegExpChar(char) {\n if (char === '-' ||\n char === '^' ||\n char === '$' ||\n char === '+' ||\n char === '.' ||\n char === '(' ||\n char === ')' ||\n char === '|' ||\n char === '[' ||\n char === ']' ||\n char === '{' ||\n char === '}' ||\n char === '*' ||\n char === '?' ||\n char === '\\\\') {\n return \"\\\\\".concat(char);\n }\n else {\n return char;\n }\n}\n/**\n * Escapes all characters in a given string that have a special meaning in regular expressions\n */\nfunction escapeRegExpString(str) {\n var result = '';\n for (var i = 0; i < str.length; i++) {\n result += escapeRegExpChar(str[i]);\n }\n return result;\n}\n/**\n * Transforms one or more glob patterns into a RegExp pattern\n */\nfunction transform(pattern, separator) {\n if (separator === void 0) { separator = true; }\n if (Array.isArray(pattern)) {\n var regExpPatterns = pattern.map(function (p) { return \"^\".concat(transform(p, separator), \"$\"); });\n return \"(?:\".concat(regExpPatterns.join('|'), \")\");\n }\n var separatorSplitter = '';\n var separatorMatcher = '';\n var wildcard = '.';\n if (separator === true) {\n separatorSplitter = '/';\n separatorMatcher = '[/\\\\\\\\]';\n wildcard = '[^/\\\\\\\\]';\n }\n else if (separator) {\n separatorSplitter = separator;\n separatorMatcher = escapeRegExpString(separatorSplitter);\n if (separatorMatcher.length > 1) {\n separatorMatcher = \"(?:\".concat(separatorMatcher, \")\");\n wildcard = \"((?!\".concat(separatorMatcher, \").)\");\n }\n else {\n wildcard = \"[^\".concat(separatorMatcher, \"]\");\n }\n }\n var requiredSeparator = separator ? \"\".concat(separatorMatcher, \"+?\") : '';\n var optionalSeparator = separator ? \"\".concat(separatorMatcher, \"*?\") : '';\n var segments = separator ? pattern.split(separatorSplitter) : [pattern];\n var result = '';\n for (var s = 0; s < segments.length; s++) {\n var segment = segments[s];\n var nextSegment = segments[s + 1];\n var currentSeparator = '';\n if (!segment && s > 0) {\n continue;\n }\n if (separator) {\n if (s === segments.length - 1) {\n currentSeparator = optionalSeparator;\n }\n else if (nextSegment !== '**') {\n currentSeparator = requiredSeparator;\n }\n else {\n currentSeparator = '';\n }\n }\n if (separator && segment === '**') {\n if (currentSeparator) {\n result +=\n s === 0\n ? ''\n : s === segments.length - 1\n ? \"(?:\".concat(requiredSeparator, \"|$)\")\n : requiredSeparator;\n result += \"(?:\".concat(wildcard, \"*?\").concat(currentSeparator, \")*?\");\n }\n continue;\n }\n for (var c = 0; c < segment.length; c++) {\n var char = segment[c];\n if (char === '\\\\') {\n if (c < segment.length - 1) {\n result += escapeRegExpChar(segment[c + 1]);\n c++;\n }\n }\n else if (char === '?') {\n result += wildcard;\n }\n else if (char === '*') {\n result += \"\".concat(wildcard, \"*?\");\n }\n else {\n result += escapeRegExpChar(char);\n }\n }\n result += currentSeparator;\n }\n return result;\n}\n\nfunction isMatch(regexp, sample) {\n if (typeof sample !== 'string') {\n throw new TypeError(\"Sample must be a string, but \".concat(typeof sample, \" given\"));\n }\n return regexp.test(sample);\n}\n/**\n * Compiles one or more glob patterns into a RegExp and returns an isMatch function.\n * The isMatch function takes a sample string as its only argument and returns `true`\n * if the string matches the pattern(s).\n *\n * ```js\n * wildcardMatch('src/*.js')('src/index.js') //=> true\n * ```\n *\n * ```js\n * const isMatch = wildcardMatch('*.example.com', '.')\n * isMatch('foo.example.com') //=> true\n * isMatch('foo.bar.com') //=> false\n * ```\n */\nfunction wildcardMatch(pattern, options) {\n if (typeof pattern !== 'string' && !Array.isArray(pattern)) {\n throw new TypeError(\"The first argument must be a single pattern string or an array of patterns, but \".concat(typeof pattern, \" given\"));\n }\n if (typeof options === 'string' || typeof options === 'boolean') {\n options = { separator: options };\n }\n if (arguments.length === 2 &&\n !(typeof options === 'undefined' ||\n (typeof options === 'object' && options !== null && !Array.isArray(options)))) {\n throw new TypeError(\"The second argument must be an options object or a string/boolean separator, but \".concat(typeof options, \" given\"));\n }\n options = options || {};\n if (options.separator === '\\\\') {\n throw new Error('\\\\ is not a valid separator because it is used for escaping. Try setting the separator to `true` instead');\n }\n var regexpPattern = transform(pattern, options.separator);\n var regexp = new RegExp(\"^\".concat(regexpPattern, \"$\"), options.flags);\n var fn = isMatch.bind(null, regexp);\n fn.options = options;\n fn.pattern = pattern;\n fn.regexp = regexp;\n return fn;\n}\n\nexport { wildcardMatch as default };\n//# sourceMappingURL=index.es.mjs.map\n","import { getScript, readPackageJson } from \"@moniq/workspace\";\nimport path from \"node:path\";\nimport wcmatch from \"wildcard-match\";\n//#region src/scripts.ts\nasync function resolveScriptPolicies(scriptsConfig, root, packages_) {\n\tconst diagnostics = [];\n\tconst entries = Object.entries(scriptsConfig ?? {});\n\tfor (const [scriptName, policyOrArray] of entries) {\n\t\tconst policies = Array.isArray(policyOrArray) ? policyOrArray : [policyOrArray];\n\t\tfor (const package_ of packages_) {\n\t\t\tconst relativePath = path.relative(root, package_.path);\n\t\t\tconst policy = pickPolicy(policies, relativePath);\n\t\t\tif (policy !== void 0 && policy.severity !== \"off\") await resolvePolicy(policy, scriptName, package_, relativePath, diagnostics);\n\t\t}\n\t}\n\treturn diagnostics;\n}\nfunction isCommandMatch(actual, expected) {\n\tif (typeof expected === \"function\") return expected(actual);\n\tif (expected instanceof RegExp) return expected.test(actual);\n\treturn actual === expected;\n}\nfunction isGlobMatch(pattern, relativePath) {\n\tif (pattern === \"*\") return true;\n\tif (pattern === \".\") return relativePath === \".\" || relativePath === \"\";\n\treturn wcmatch(pattern)(relativePath);\n}\nfunction isMatchAny(patterns, relativePath) {\n\tfor (const pattern of patterns) if (isGlobMatch(pattern, relativePath)) return true;\n\treturn false;\n}\nfunction isPolicyMatch(policy, relativePath) {\n\tconst include = policy.include ?? [\"*\"];\n\tconst exclude = policy.exclude ?? [];\n\treturn isMatchAny(include, relativePath) && !isMatchAny(exclude, relativePath);\n}\nfunction pickPolicy(policies, relativePath) {\n\tfor (const policy of policies) if (isPolicyMatch(policy, relativePath)) return policy;\n}\nasync function resolvePolicy(policy, scriptName, package_, relativePath, diagnostics) {\n\tconst packageJson = await readPackageJson(path.join(package_.path, \"package.json\"));\n\tconst packageDisplayName = packageJson[\"name\"] ?? path.basename(package_.path);\n\tconst hasScript = getScript(packageJson, scriptName) !== void 0;\n\tconst severity = policy.severity ?? \"error\";\n\tif (policy.required !== false && !hasScript) {\n\t\tdiagnostics.push({\n\t\t\tfix: policy.autofix && typeof policy.command === \"string\" ? policy.command : void 0,\n\t\t\tmessage: `Missing required script \"${scriptName}\"`,\n\t\t\tpackageName: packageDisplayName,\n\t\t\tpackagePath: package_.path,\n\t\t\tscriptName,\n\t\t\tseverity\n\t\t});\n\t\treturn;\n\t}\n\tif (policy.command === void 0 || !hasScript) return;\n\tif (policy.allowCustomCommands !== void 0 && isMatchAny(policy.allowCustomCommands, relativePath)) return;\n\tconst actualCommand = getScript(packageJson, scriptName);\n\tif (actualCommand !== void 0 && isCommandMatch(actualCommand, policy.command)) return;\n\tdiagnostics.push({\n\t\tactual: actualCommand,\n\t\texpected: typeof policy.command === \"string\" ? policy.command : void 0,\n\t\tfix: policy.autofix && typeof policy.command === \"string\" ? policy.command : void 0,\n\t\tmessage: `Unexpected command for script \"${scriptName}\"`,\n\t\tpackageName: packageDisplayName,\n\t\tpackagePath: package_.path,\n\t\tscriptName,\n\t\tseverity\n\t});\n}\n//#endregion\n//#region src/index.ts\nasync function resolve(config, root, packages_) {\n\tconst diagnostics = [];\n\tconst scriptDiags = await resolveScriptPolicies(config.scripts, root, packages_);\n\tdiagnostics.push(...scriptDiags);\n\treturn diagnostics;\n}\n//#endregion\nexport { resolve };\n\n//# sourceMappingURL=index.js.map","import { cac } from \"cac\";\nimport { loadConfig } from \"@moniq/config\";\nimport { resolve } from \"@moniq/core\";\nimport { detectPackageManager, discoverWorkspace, readPackageJson } from \"@moniq/workspace\";\nimport { styleText } from \"node:util\";\nimport path from \"node:path\";\nimport { execFile } from \"node:child_process\";\nimport { stdin } from \"node:process\";\nimport { createInterface } from \"node:readline/promises\";\n//#region ../moniq/package.json\nvar version = \"0.3.4\";\n//#endregion\n//#region src/format.ts\nfunction formatDiagnostics(diagnostics, options) {\n\tif ((options?.format ?? \"pretty\") === \"json\") return formatJson(diagnostics);\n\treturn formatPretty(diagnostics, options?.isDryRun);\n}\nfunction formatJson(diagnostics) {\n\treturn `${JSON.stringify(diagnostics, void 0, 2)}\\n`;\n}\nfunction formatPretty(diagnostics, isDryRun) {\n\tif (diagnostics.length === 0) return styleText([\"bold\", \"green\"], \"✔ No issues found.\");\n\tconst lines = [];\n\tconst byPackage = /* @__PURE__ */ new Map();\n\tfor (const d of diagnostics) {\n\t\tconst array = byPackage.get(d.packageName);\n\t\tif (array) array.push(d);\n\t\telse byPackage.set(d.packageName, [d]);\n\t}\n\tfor (const [packageName, diags] of byPackage) {\n\t\tlines.push(\"\", styleText([\"bold\", \"cyan\"], packageName));\n\t\tfor (const d of diags) pushDiagnostic(lines, d, isDryRun);\n\t}\n\tconst errorCount = diagnostics.filter((d) => d.severity === \"error\").length;\n\tconst warningCount = diagnostics.filter((d) => d.severity === \"warn\").length;\n\tconst countParts = [];\n\tif (errorCount > 0) countParts.push(styleText(\"red\", `${String(errorCount)} error(s)`));\n\tif (warningCount > 0) countParts.push(styleText(\"yellow\", `${String(warningCount)} warning(s)`));\n\tconst summary = countParts.join(\", \");\n\tconst summaryLine = `${styleText(\"cyan\", \"ℹ\")} Found ${String(diagnostics.length)} issue(s) — ${summary.length > 0 ? summary : \"all clear\"}`;\n\tlines.push(\"\", styleText(\"dim\", summaryLine));\n\tif (isDryRun) {\n\t\tconst fixableCount = diagnostics.filter((d) => d.fix && d.severity !== \"off\").length;\n\t\tlines.push(\"\", styleText(\"dim\", `${styleText(\"cyan\", \"ℹ\")} Dry-run: ${String(fixableCount)} fix(es) available`));\n\t}\n\treturn lines.join(\"\\n\");\n}\nfunction pushDiagnostic(lines, d, isDryRun) {\n\tconst badge = severityBadge(d.severity);\n\tconst icon = severityIcon(d.severity);\n\tlines.push(` ${icon} ${badge} ${d.message}`);\n\tif (d.expected && d.actual) lines.push(` ${styleText(\"dim\", \"Expected:\")} ${styleText(\"cyan\", d.expected)}`, ` ${styleText(\"dim\", \"Actual:\")} ${styleText(\"red\", d.actual)}`);\n\telse if (d.expected) lines.push(` ${styleText(\"dim\", \"Expected:\")} ${styleText(\"cyan\", d.expected)}`);\n\telse if (d.actual) lines.push(` ${styleText(\"dim\", \"Actual:\")} ${styleText(\"red\", d.actual)}`);\n\tif (d.fix) {\n\t\tconst label = styleText(\"dim\", isDryRun ? \"Would fix:\" : \"Fix:\");\n\t\tlines.push(` ${label} ${d.fix}`);\n\t}\n}\nfunction severityBadge(severity) {\n\tif (severity === \"error\") return styleText([\"bold\", \"red\"], \"ERROR\");\n\tif (severity === \"warn\") return styleText([\"bold\", \"yellow\"], \"WARN\");\n\treturn styleText(\"gray\", \"OFF\");\n}\nfunction severityIcon(severity) {\n\tif (severity === \"error\") return styleText([\"bold\", \"red\"], \"✘\");\n\tif (severity === \"warn\") return styleText([\"bold\", \"yellow\"], \"⚠\");\n\treturn \" \";\n}\n//#endregion\n//#region src/scripts.ts\nasync function applyScriptFixes(diagnostics, options) {\n\tconst fixable = diagnostics.filter((d) => d.fix && d.severity !== \"off\");\n\tconst isDryRun = options?.isDryRun ?? false;\n\tlet fixed = 0;\n\tlet errors = 0;\n\tconst packages = /* @__PURE__ */ new Set();\n\tfor (const d of fixable) {\n\t\tif (!d.fix) continue;\n\t\tif (isDryRun) {\n\t\t\tfixed++;\n\t\t\tpackages.add(d.packagePath);\n\t\t\tcontinue;\n\t\t}\n\t\ttry {\n\t\t\tconst packageFilePath = path.join(d.packagePath, \"package.json\");\n\t\t\tconst { readFile, writeFile } = await import(\"node:fs/promises\");\n\t\t\tconst content = await readFile(packageFilePath, \"utf8\");\n\t\t\tconst package_ = JSON.parse(content);\n\t\t\tconst scriptName = d.scriptName;\n\t\t\tif (!scriptName) continue;\n\t\t\tconst scriptsRecord = package_[\"scripts\"];\n\t\t\tif (scriptsRecord) {\n\t\t\t\tconst entries = Object.entries(scriptsRecord);\n\t\t\t\tif (!Object.hasOwn(scriptsRecord, scriptName)) entries.push([scriptName, d.fix]);\n\t\t\t\tpackage_[\"scripts\"] = Object.fromEntries(entries.map(([name, command]) => {\n\t\t\t\t\treturn name === scriptName ? [name, d.fix ?? command] : [name, command];\n\t\t\t\t}));\n\t\t\t}\n\t\t\tawait writeFile(packageFilePath, `${JSON.stringify(package_, void 0, 2)}\\n`, \"utf8\");\n\t\t\tfixed++;\n\t\t\tpackages.add(d.packagePath);\n\t\t} catch {\n\t\t\terrors++;\n\t\t}\n\t}\n\treturn {\n\t\terrors,\n\t\tfixed,\n\t\tisDryRun,\n\t\tpackageCount: packages.size\n\t};\n}\n//#endregion\n//#region src/commands/check.ts\nasync function check(options) {\n\tconst cwd = process.cwd();\n\tlet config;\n\ttry {\n\t\tconfig = await loadConfig(cwd);\n\t} catch (error) {\n\t\tthrow new Error(`Failed to load moniq.config: ${String(error)}`, { cause: error });\n\t}\n\tconst packages = await discoverWorkspace(cwd);\n\tif (packages.length === 0) throw new Error(\"No workspace packages found.\");\n\tconst diagnostics = await resolve(config, cwd, packages);\n\tlet fixSummary;\n\tif (options.fix) fixSummary = await applyScriptFixes(diagnostics, { isDryRun: options.isDryRun });\n\tif (options.format !== \"json\") console.log(`${styleText(\"cyan\", \"ℹ\")} Scanned ${String(packages.length)} package(s)`);\n\tconsole.log(formatDiagnostics(diagnostics, {\n\t\tformat: options.format,\n\t\tisDryRun: options.isDryRun\n\t}));\n\tif (fixSummary) if (fixSummary.isDryRun) {\n\t\tconst message = `${styleText(\"cyan\", \"ℹ\")} Dry-run: ${String(fixSummary.fixed)} fix(es) available, ${String(fixSummary.errors)} error(s)`;\n\t\tconsole.log(styleText(\"dim\", message));\n\t} else {\n\t\tconst message = `✔ Fixed ${String(fixSummary.fixed)} issue(s) across ${String(fixSummary.packageCount)} package(s)`;\n\t\tconsole.log(styleText([\"bold\", \"green\"], message));\n\t}\n}\n//#endregion\n//#region src/commands/doctor.ts\nasync function doctor() {\n\tconst cwd = process.cwd();\n\tconst issues = [];\n\tconsole.log(styleText(\"bold\", \"Configuration Doctor\"));\n\ttry {\n\t\tconst packageCount = (await discoverWorkspace(cwd)).length;\n\t\tif (packageCount === 0) issues.push({\n\t\t\tmessage: \"No workspace packages detected. Check your workspace configuration.\",\n\t\t\tseverity: \"warn\"\n\t\t});\n\t\telse issues.push({\n\t\t\tmessage: `Detected ${String(packageCount)} workspace package(s).`,\n\t\t\tseverity: \"info\"\n\t\t});\n\t} catch {\n\t\tissues.push({\n\t\t\tmessage: \"Failed to discover workspace packages. Ensure a lock file or packageManager field is present.\",\n\t\t\tseverity: \"error\"\n\t\t});\n\t}\n\ttry {\n\t\tconst config = await loadConfig(cwd);\n\t\tissues.push({\n\t\t\tmessage: \"moniq.config file found and loadable.\",\n\t\t\tseverity: \"info\"\n\t\t});\n\t\tcheckScriptPolicies(config, issues);\n\t} catch (error) {\n\t\tissues.push({\n\t\t\tmessage: `Failed to load moniq.config: ${String(error)}`,\n\t\t\tseverity: \"error\"\n\t\t});\n\t}\n\tconsole.log();\n\tissues.sort((a, b) => severityIndex(a.severity) - severityIndex(b.severity));\n\tif (!issues.some((issue) => issue.severity !== \"info\")) {\n\t\tconsole.log(styleText([\"bold\", \"green\"], \"✔ Everything looks good!\"));\n\t\treturn;\n\t}\n\tfor (const issue of issues) console.log(formatIssue(issue));\n\tconst errorCount = issues.filter((issue) => issue.severity === \"error\").length;\n\tconst warningCount = issues.filter((issue) => issue.severity === \"warn\").length;\n\tconst summary = styleText(\"dim\", `Found ${`${String(errorCount)} error(s)`}, ${`${String(warningCount)} warning(s)`}`);\n\tconsole.log();\n\tconsole.log(summary);\n\tif (errorCount > 0) {\n\t\tconst tip = styleText([\"bold\", \"cyan\"], \"Tip:\");\n\t\tconst hint = styleText(\"dim\", \"moniq init\");\n\t\tconsole.log();\n\t\tconsole.log(`${tip} Run ${hint} to scaffold a starter configuration.`);\n\t}\n}\nfunction checkScriptPolicies(config, issues) {\n\tconst scripts = config.scripts;\n\tif (!scripts) return;\n\tfor (const [name, policyOrArray] of Object.entries(scripts)) {\n\t\tconst policies = Array.isArray(policyOrArray) ? policyOrArray : [policyOrArray];\n\t\tfor (const policy of policies) {\n\t\t\tconst sev = policy.severity;\n\t\t\tif (sev !== void 0 && ![\n\t\t\t\t\"error\",\n\t\t\t\t\"off\",\n\t\t\t\t\"warn\"\n\t\t\t].includes(sev)) issues.push({\n\t\t\t\tmessage: `Script policy \"${name}\" has invalid severity \"${sev}\".`,\n\t\t\t\tseverity: \"error\"\n\t\t\t});\n\t\t}\n\t}\n}\nfunction formatIssue(issue) {\n\tif (issue.severity === \"error\") return ` ${styleText([\"bold\", \"red\"], \"✘\")} ${styleText([\"bold\", \"red\"], \"ERROR\")} ${issue.message}`;\n\tif (issue.severity === \"warn\") return ` ${styleText([\"bold\", \"yellow\"], \"⚠\")} ${styleText([\"bold\", \"yellow\"], \"WARN\")} ${issue.message}`;\n\treturn ` ${styleText(\"cyan\", \"ℹ\")} ${styleText([\"bold\", \"cyan\"], \"INFO\")} ${issue.message}`;\n}\nfunction severityIndex(severity) {\n\tif (severity === \"error\") return 2;\n\tif (severity === \"warn\") return 1;\n\treturn 0;\n}\n//#endregion\n//#region src/banner.ts\nconst colorFns = [\n\t(s) => styleText(\"cyan\", s),\n\t(s) => styleText(\"magenta\", s),\n\t(s) => styleText(\"green\", s),\n\t(s) => styleText(\"yellow\", s),\n\t(s) => styleText(\"blue\", s)\n];\nconst letterRows = [\n\t[\n\t\t\"███╗ ███╗\",\n\t\t\"████╗ ████║\",\n\t\t\"██╔████╔██║\",\n\t\t\"██║╚██╔╝██║\",\n\t\t\"██║ ╚═╝ ██║\",\n\t\t\"╚═╝ ╚═╝\"\n\t],\n\t[\n\t\t\" ██████╗ \",\n\t\t\"██╔═══██╗\",\n\t\t\"██║ ██║\",\n\t\t\"██║ ██║\",\n\t\t\"╚██████╔╝\",\n\t\t\" ╚═════╝ \"\n\t],\n\t[\n\t\t\"███╗ ██╗\",\n\t\t\"████╗ ██║\",\n\t\t\"██╔██╗ ██║\",\n\t\t\"██║╚██╗██║\",\n\t\t\"██║ ╚████║\",\n\t\t\"╚═╝ ╚═══╝\"\n\t],\n\t[\n\t\t\"██╗\",\n\t\t\"██║\",\n\t\t\"██║\",\n\t\t\"██║\",\n\t\t\"██║\",\n\t\t\"╚═╝\"\n\t],\n\t[\n\t\t\" ██████╗ \",\n\t\t\"██╔═══██╗\",\n\t\t\"██║ ██║\",\n\t\t\"██║ ██║\",\n\t\t\"╚██████╔╝\",\n\t\t\" ╚════╝╲╲ \"\n\t]\n];\nconst DESCRIPTION = \"Policy-driven workspace linter for JavaScript/TypeScript monorepos.\";\nfunction renderBanner() {\n\tconst lines = [\"\"];\n\tfor (let rowIndex = 0; rowIndex < 6; rowIndex++) lines.push(assembleRow(rowIndex));\n\tconst description = styleText(\"bold\", DESCRIPTION);\n\tlines.push(description, \"\");\n\treturn lines.join(\"\\n\");\n}\nfunction assembleRow(rowIndex) {\n\tlet row = \"\";\n\tfor (let columnIndex = 0; columnIndex < 5; columnIndex++) {\n\t\trow += rowPart(columnIndex, rowIndex);\n\t\tif (columnIndex < 4) row += \" \";\n\t}\n\treturn row;\n}\nfunction rowPart(columnIndex, rowIndex) {\n\tconst rows = letterRows.at(columnIndex);\n\tconst colorFunction = colorFns.at(columnIndex);\n\tif (rows === void 0 || colorFunction === void 0) return \"\";\n\tconst line = rows.at(rowIndex);\n\treturn line === void 0 ? \"\" : colorFunction(line);\n}\n//#endregion\n//#region src/commands/init.ts\nconst SUPPORTED_LANGS = [\n\t\"ts\",\n\t\"js\",\n\t\"mjs\",\n\t\"cjs\",\n\t\"mts\",\n\t\"cts\"\n];\nconst DIVIDER_WIDTH = 44;\nfunction labelPad(label) {\n\treturn label.padEnd(18);\n}\nconst STARTER_CONFIG = `import { defineConfig } from \"@udohjeremiah/moniq\";\n\nexport default defineConfig({\n scripts: {\n dev: { required: true },\n build: { required: true },\n lint: { required: true },\n },\n});\n`;\nasync function detectLang(cwd, packageJson) {\n\tconst rawDependencies = packageJson[\"dependencies\"];\n\tconst rawDevelopmentDependencies = packageJson[\"devDependencies\"];\n\tconst isModule = packageJson[\"type\"] === \"module\";\n\tconst { access } = await import(\"node:fs/promises\");\n\ttry {\n\t\tawait access(path.join(cwd, \"tsconfig.json\"));\n\t\treturn isModule ? \"ts\" : \"mts\";\n\t} catch {}\n\tif (typeof rawDependencies === \"object\" && rawDependencies !== null && Object.hasOwn(rawDependencies, \"typescript\")) return isModule ? \"ts\" : \"mts\";\n\tif (typeof rawDevelopmentDependencies === \"object\" && rawDevelopmentDependencies !== null && Object.hasOwn(rawDevelopmentDependencies, \"typescript\")) return isModule ? \"ts\" : \"mts\";\n\treturn isModule ? \"js\" : \"mjs\";\n}\nasync function init(options) {\n\tconst { _cwd, lang: explicitLang } = options;\n\tconst cwd = _cwd ?? process.cwd();\n\tconsole.log(renderBanner());\n\tconst rootPackageJson = await readRootPackageJson(cwd);\n\tif (rootPackageJson === void 0) return;\n\tconst lang = explicitLang ?? await detectLang(cwd, rootPackageJson);\n\tif (!SUPPORTED_LANGS.includes(lang)) {\n\t\tconst unsupportedMessage = `Unsupported --lang \"${lang}\". Supported: ${SUPPORTED_LANGS.join(\", \")}`;\n\t\tconsole.error(` ${styleText(\"yellow\", unsupportedMessage)}`);\n\t\tprocess.exitCode = 1;\n\t\treturn;\n\t}\n\tconst filename = `moniq.config.${lang}`;\n\tconst configPath = path.join(cwd, filename);\n\tif (!await handleExistingConfig(configPath, filename)) return;\n\tlet workspaceLabel = \"single package\";\n\tlet workspacePackages = [];\n\ttry {\n\t\tworkspacePackages = await discoverWorkspace(cwd);\n\t\tif (workspacePackages.length > 1) workspaceLabel = `monorepo with ${String(workspacePackages.length)} packages`;\n\t} catch {\n\t\tworkspaceLabel = \"unknown (workspace detection failed)\";\n\t}\n\tconst pm = await detectPackageManager(cwd);\n\tconst langDisplay = [\n\t\t\"cts\",\n\t\t\"mts\",\n\t\t\"ts\"\n\t].includes(lang) ? \"TypeScript\" : \"JavaScript\";\n\tconst dim = (s) => styleText(\"dim\", s);\n\tconst cyan = (s) => styleText(\"cyan\", s);\n\tconst sideDashes = (DIVIDER_WIDTH - 10) / 2;\n\tconst topDivider = dim(` ${\"─\".repeat(sideDashes)} Detected ${\"─\".repeat(sideDashes)}`);\n\tconst bottomDivider = dim(` ${\"─\".repeat(DIVIDER_WIDTH)}`);\n\tconst labelIndent = \" \".repeat(19);\n\tconsole.log(topDivider);\n\tconsole.log(` ${dim(labelPad(\"Workspace:\"))} ${cyan(workspaceLabel)}`);\n\tif (workspacePackages.length > 1) for (const package_ of workspacePackages) {\n\t\tconst bullet = dim(`• ${path.relative(cwd, package_.path)}`);\n\t\tconsole.log(` ${labelIndent}${bullet}`);\n\t}\n\tconsole.log(` ${dim(labelPad(\"Package Manager:\"))} ${cyan(pm)}`);\n\tconsole.log(` ${dim(labelPad(\"Language:\"))} ${cyan(langDisplay)}`);\n\tconsole.log(bottomDivider);\n\tconsole.log();\n\tif (!_cwd) {\n\t\tconst stopSpinner = startSpinner(`Installing ${styleText(\"cyan\", \"@udohjeremiah/moniq\")} as devDependency...`);\n\t\ttry {\n\t\t\tawait installPackage(pm, cwd, options.version);\n\t\t\tstopSpinner();\n\t\t\tconsole.log(` ${styleText([\"bold\", \"green\"], \"✔ Installed @udohjeremiah/moniq as devDependency\")}`);\n\t\t} catch (error) {\n\t\t\tstopSpinner();\n\t\t\tconst styledError = styleText(\"red\", `✘ ${`Installation failed: ${String(error)}`}`);\n\t\t\tconsole.log(` ${styledError}`);\n\t\t\tconsole.log(` ${styleText(\"dim\", \"Make sure you have a working internet connection and try again.\")}`);\n\t\t\tconsole.log();\n\t\t\tprocess.exitCode = 1;\n\t\t\treturn;\n\t\t}\n\t}\n\tconst { writeFile } = await import(\"node:fs/promises\");\n\tawait writeFile(configPath, STARTER_CONFIG, \"utf8\");\n\tconst createdMessage = `✔ Created ${filename}`;\n\tconsole.log(` ${styleText([\"bold\", \"green\"], createdMessage)}`);\n\tconsole.log();\n\tconsole.log(` ${styleText(\"dim\", \"Next steps:\")}`);\n\tconsole.log(` 1. ${styleText(\"dim\", \"Edit\")} ${styleText(\"cyan\", filename)} ${styleText(\"dim\", \"to configure your policies.\")}`);\n\tconsole.log(` 2. ${styleText(\"dim\", \"Run\")} ${styleText(\"cyan\", \"moniq check\")} ${styleText(\"dim\", \"to validate your workspace.\")}`);\n\tconsole.log(` 3. ${styleText(\"dim\", \"Run\")} ${styleText(\"cyan\", \"moniq fix\")} ${styleText(\"dim\", \"to apply automatic fixes.\")}`);\n\tconsole.log();\n}\nasync function handleExistingConfig(configPath, filename) {\n\tconst { access } = await import(\"node:fs/promises\");\n\ttry {\n\t\tawait access(configPath);\n\t} catch {\n\t\treturn true;\n\t}\n\tif (!stdin.isTTY) return true;\n\tconst rl = createInterface({\n\t\tinput: stdin,\n\t\toutput: process.stdout\n\t});\n\tconst message = `${filename} already exists. Overwrite?`;\n\tconst answer = await rl.question(` ${styleText(\"dim\", message + \" (y/N) \")}`);\n\trl.close();\n\tif (answer.trim().length === 0) return false;\n\treturn answer.toLowerCase() === \"y\" || answer.toLowerCase() === \"yes\";\n}\nfunction installArguments(pm, version) {\n\tconst spec = version ? `@udohjeremiah/moniq@${version}` : \"@udohjeremiah/moniq\";\n\tswitch (pm) {\n\t\tcase \"bun\": return [\n\t\t\t\"add\",\n\t\t\t\"--dev\",\n\t\t\tspec\n\t\t];\n\t\tcase \"npm\": return [\n\t\t\t\"install\",\n\t\t\t\"--save-dev\",\n\t\t\tspec\n\t\t];\n\t\tcase \"pnpm\": return [\n\t\t\t\"add\",\n\t\t\t\"-D\",\n\t\t\t\"-w\",\n\t\t\tspec\n\t\t];\n\t\tcase \"yarn\": return [\n\t\t\t\"add\",\n\t\t\t\"--dev\",\n\t\t\tspec\n\t\t];\n\t}\n\tthrow new Error(`Unknown package manager: ${pm}`);\n}\nfunction installPackage(pm, root, version) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst child = execFile(pm, installArguments(pm, version), { cwd: root });\n\t\tlet stderr = \"\";\n\t\tchild.stderr?.on(\"data\", (chunk) => {\n\t\t\tstderr += chunk.toString();\n\t\t});\n\t\tchild.on(\"exit\", (code) => {\n\t\t\tif (code === 0) resolve();\n\t\t\telse reject(/* @__PURE__ */ new Error(`Exit code ${String(code)}: ${stderr.trim()}`));\n\t\t});\n\t\tchild.on(\"error\", reject);\n\t});\n}\nasync function readRootPackageJson(cwd) {\n\ttry {\n\t\treturn await readPackageJson(path.join(cwd, \"package.json\"));\n\t} catch {\n\t\tconsole.log();\n\t\tconsole.log(` ${styleText(\"yellow\", \"⚠ No package.json found in current directory.\")}`);\n\t\tconsole.log(` Create one first, then run ${styleText(\"cyan\", \"moniq init\")} again.`);\n\t\tconsole.log();\n\t\tprocess.exitCode = 1;\n\t\treturn;\n\t}\n}\nfunction startSpinner(text) {\n\tconst frames = [\n\t\t\"⠋\",\n\t\t\"⠙\",\n\t\t\"⠸\",\n\t\t\"⠴\",\n\t\t\"⠦\",\n\t\t\"⠧\"\n\t];\n\tlet index = 0;\n\tconst id = setInterval(() => {\n\t\tconst styled = `${styleText(\"dim\", frames.at(index) ?? \"\")} ${text}`;\n\t\tprocess.stdout.write(`\\r ${styled}`);\n\t\tindex = (index + 1) % frames.length;\n\t}, 80);\n\treturn () => {\n\t\tclearInterval(id);\n\t\tprocess.stdout.write(\"\\r\\x1B[K\");\n\t};\n}\n//#endregion\n//#region src/index.ts\nconst cli = cac(\"moniq\");\ncli.command(\"check\", \"Run policy checks\").option(\"--format <fmt>\", \"Output format: pretty or json\", { default: \"pretty\" }).action(async (options) => {\n\tconst fmt = typeof options[\"format\"] === \"string\" ? options[\"format\"] : \"pretty\";\n\ttry {\n\t\tawait check({\n\t\t\tfix: false,\n\t\t\tformat: fmt\n\t\t});\n\t} catch (error) {\n\t\tconsole.error(String(error));\n\t\tprocess.exitCode = 1;\n\t}\n});\ncli.command(\"fix\", \"Run policy checks and apply autofixes\").option(\"--dry-run\", \"Preview autofixes without writing to files\").option(\"--format <fmt>\", \"Output format: pretty or json\", { default: \"pretty\" }).action(async (options) => {\n\tconst isDryRun = options[\"dryRun\"] === true;\n\tconst fmt = typeof options[\"format\"] === \"string\" ? options[\"format\"] : \"pretty\";\n\ttry {\n\t\tawait check({\n\t\t\tfix: true,\n\t\t\tformat: fmt,\n\t\t\tisDryRun\n\t\t});\n\t} catch (error) {\n\t\tconsole.error(String(error));\n\t\tprocess.exitCode = 1;\n\t}\n});\ncli.command(\"doctor\", \"Detect configuration mistakes\").action(async () => {\n\tawait doctor();\n});\ncli.command(\"init\", \"Scaffold a moniq.config file in the current directory\").option(\"--lang <type>\", \"Config language: ts, js, mjs, cjs, mts, cts (default: auto-detected)\").action(async (options) => {\n\tawait init({\n\t\tlang: typeof options[\"lang\"] === \"string\" ? options[\"lang\"] : void 0,\n\t\tversion\n\t});\n});\ncli.help();\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AO,QAAQ,cAAc,WAAW,QAAQ,YAAY;CACxE,IAAI;EACH,MAAM,MAAM;GACX,KAAK;GACL,QAAQ;GACR;EACD,CAAC;CACF,SAAS,OAAO;EACf,QAAQ,MAAM,OAAO,KAAK,CAAC;EAC3B,QAAQ,WAAW;CACpB;AACD,CAAC;AACD,IAAI,QAAQ,UAAU,+BAA+B,CAAC,CAAC,OAAO,YAAY;CACzE,MAAM,OAAO;AACd,CAAC;AACD,IAAI,QAAQ,QAAQ,uDAAuD,CAAC,CAAC,OAAO,iBAAiB,sEAAsE,CAAC,CAAC,OAAO,OAAO,YAAY;CACtM,MAAM,KAAK;EACV,MAAM,OAAO,QAAQ,YAAY,WAAW,QAAQ,UAAU,KAAK;EACnE;CACD,CAAC;AACF,CAAC;AACD,IAAI,KAAK;AACT,IAAI,QAAQ,OAAO;AACnB,IAAI,MAAM"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@udohjeremiah/moniq",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Policy-driven workspace linter for JavaScript/TypeScript monorepos",
5
5
  "type": "module",
6
6
  "license": "MIT",