@udohjeremiah/moniq 0.1.1 → 0.2.0
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 +96 -21
- package/dist/cli.js.map +1 -1
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import { n as loadConfig } from "./dist-B1TNZsla.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import path from "node:path";
|
|
5
|
+
import { stdin } from "node:process";
|
|
5
6
|
import { styleText } from "node:util";
|
|
6
|
-
import { access } from "node:fs/promises";
|
|
7
7
|
import { execFileSync } from "node:child_process";
|
|
8
|
+
import { createInterface } from "node:readline/promises";
|
|
8
9
|
//#region ../../node_modules/.pnpm/cac@7.0.0/node_modules/cac/dist/index.js
|
|
9
10
|
function toArr(any) {
|
|
10
11
|
return any == null ? [] : Array.isArray(any) ? any : [any];
|
|
@@ -927,6 +928,7 @@ async function resolve(config, root, packages_) {
|
|
|
927
928
|
}
|
|
928
929
|
//#endregion
|
|
929
930
|
//#region ../cli/dist/index.js
|
|
931
|
+
var version = "0.2.0";
|
|
930
932
|
function formatDiagnostics(diagnostics, options) {
|
|
931
933
|
if ((options?.format ?? "pretty") === "json") return formatJson(diagnostics);
|
|
932
934
|
return formatPretty(diagnostics, options?.isDryRun);
|
|
@@ -1183,7 +1185,8 @@ function renderBanner() {
|
|
|
1183
1185
|
const lines = [];
|
|
1184
1186
|
for (let rowIndex = 0; rowIndex < 6; rowIndex++) lines.push(assembleRow(rowIndex));
|
|
1185
1187
|
const description = centerPad(DESCRIPTION, 62);
|
|
1186
|
-
|
|
1188
|
+
const versionLine = centerPad(`v${version}`, 62);
|
|
1189
|
+
lines.push("", versionLine, description);
|
|
1187
1190
|
return lines.join("\n");
|
|
1188
1191
|
}
|
|
1189
1192
|
function assembleRow(rowIndex) {
|
|
@@ -1213,7 +1216,20 @@ const SUPPORTED_LANGS = [
|
|
|
1213
1216
|
"mts",
|
|
1214
1217
|
"cts"
|
|
1215
1218
|
];
|
|
1216
|
-
|
|
1219
|
+
async function detectLang(cwd, packageJson) {
|
|
1220
|
+
const rawDependencies = packageJson["dependencies"];
|
|
1221
|
+
const rawDevelopmentDependencies = packageJson["devDependencies"];
|
|
1222
|
+
const { access } = await import("node:fs/promises");
|
|
1223
|
+
try {
|
|
1224
|
+
await access(path.join(cwd, "tsconfig.json"));
|
|
1225
|
+
return "ts";
|
|
1226
|
+
} catch {}
|
|
1227
|
+
if (typeof rawDependencies === "object" && rawDependencies !== null && Object.hasOwn(rawDependencies, "typescript")) return "ts";
|
|
1228
|
+
if (typeof rawDevelopmentDependencies === "object" && rawDevelopmentDependencies !== null && Object.hasOwn(rawDevelopmentDependencies, "typescript")) return "ts";
|
|
1229
|
+
return "js";
|
|
1230
|
+
}
|
|
1231
|
+
function generateConfig() {
|
|
1232
|
+
return `import { defineConfig } from "@udohjeremiah/moniq";
|
|
1217
1233
|
|
|
1218
1234
|
export default defineConfig({
|
|
1219
1235
|
scripts: {
|
|
@@ -1223,37 +1239,95 @@ export default defineConfig({
|
|
|
1223
1239
|
},
|
|
1224
1240
|
});
|
|
1225
1241
|
`;
|
|
1242
|
+
}
|
|
1226
1243
|
async function init(options) {
|
|
1227
|
-
const { lang } = options;
|
|
1244
|
+
const { _cwd, lang: explicitLang } = options;
|
|
1245
|
+
const cwd = _cwd ?? process.cwd();
|
|
1246
|
+
const rootPackageJson = await readRootPackageJson(cwd);
|
|
1247
|
+
if (rootPackageJson === void 0) return;
|
|
1248
|
+
const lang = explicitLang ?? await detectLang(cwd, rootPackageJson);
|
|
1228
1249
|
if (!SUPPORTED_LANGS.includes(lang)) {
|
|
1229
1250
|
const unsupportedMessage = `Unsupported --lang "${lang}". Supported: ${SUPPORTED_LANGS.join(", ")}`;
|
|
1230
1251
|
console.error(` ${styleText("yellow", unsupportedMessage)}`);
|
|
1231
1252
|
process.exitCode = 1;
|
|
1232
1253
|
return;
|
|
1233
1254
|
}
|
|
1234
|
-
const cwd = process.cwd();
|
|
1235
1255
|
const filename = `moniq.config.${lang}`;
|
|
1236
|
-
const
|
|
1256
|
+
const configPath = path.join(cwd, filename);
|
|
1257
|
+
console.log(renderBanner());
|
|
1258
|
+
console.log();
|
|
1259
|
+
let packages = [];
|
|
1260
|
+
let workspaceLabel = "single package";
|
|
1237
1261
|
try {
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
}
|
|
1262
|
+
packages = discoverWorkspace(cwd);
|
|
1263
|
+
if (packages.length > 1) workspaceLabel = `monorepo with ${String(packages.length)} packages`;
|
|
1264
|
+
} catch {
|
|
1265
|
+
workspaceLabel = "unknown (workspace detection failed)";
|
|
1266
|
+
}
|
|
1267
|
+
const detectedLabel = `🔍 Detected: ${styleText("cyan", workspaceLabel)}`;
|
|
1268
|
+
console.log(` ${styleText("dim", detectedLabel)}`);
|
|
1269
|
+
if (packages.length > 1) for (const package_ of packages) {
|
|
1270
|
+
const packageLine = ` • ${path.relative(cwd, package_.path)}`;
|
|
1271
|
+
console.log(` ${styleText("dim", packageLine)}`);
|
|
1272
|
+
}
|
|
1273
|
+
const langLine = `🔍 Language: ${styleText("cyan", langLabel(lang))}`;
|
|
1274
|
+
console.log(` ${styleText("dim", langLine)}`);
|
|
1275
|
+
console.log();
|
|
1276
|
+
if (!await handleExistingConfig(configPath, filename)) return;
|
|
1243
1277
|
const { writeFile } = await import("node:fs/promises");
|
|
1244
|
-
await writeFile(
|
|
1245
|
-
|
|
1278
|
+
await writeFile(configPath, generateConfig(), "utf8");
|
|
1279
|
+
const createdMessage = `✅ Created ${filename}`;
|
|
1280
|
+
console.log(` ${styleText(["bold", "green"], createdMessage)}`);
|
|
1246
1281
|
console.log();
|
|
1247
|
-
|
|
1248
|
-
console.log(` ${styleText(["bold", "green"], created)}`);
|
|
1282
|
+
await doctor();
|
|
1249
1283
|
console.log();
|
|
1250
1284
|
console.log(` ${styleText("dim", "Next steps:")}`);
|
|
1251
|
-
console.log(` 1. ${styleText("dim", "Edit")} ${styleText("cyan",
|
|
1252
|
-
console.log(` 2. ${styleText("dim", "Run")} ${styleText("cyan", "moniq
|
|
1253
|
-
console.log(` 3. ${styleText("dim", "Run")} ${styleText("cyan", "moniq
|
|
1254
|
-
console.log(` 4. ${styleText("dim", "Run")} ${styleText("cyan", "moniq fix")} ${styleText("dim", "to apply automatic fixes.")}`);
|
|
1285
|
+
console.log(` 1. ${styleText("dim", "Edit")} ${styleText("cyan", "moniq.config")} ${styleText("dim", "to fine-tune your policies.")}`);
|
|
1286
|
+
console.log(` 2. ${styleText("dim", "Run")} ${styleText("cyan", "moniq check")} ${styleText("dim", "to validate your workspace.")}`);
|
|
1287
|
+
console.log(` 3. ${styleText("dim", "Run")} ${styleText("cyan", "moniq fix")} ${styleText("dim", "to apply automatic fixes.")}`);
|
|
1255
1288
|
console.log();
|
|
1256
1289
|
}
|
|
1290
|
+
async function handleExistingConfig(configPath, filename) {
|
|
1291
|
+
const { access } = await import("node:fs/promises");
|
|
1292
|
+
try {
|
|
1293
|
+
await access(configPath);
|
|
1294
|
+
} catch {
|
|
1295
|
+
return true;
|
|
1296
|
+
}
|
|
1297
|
+
if (!stdin.isTTY) return true;
|
|
1298
|
+
const rl = createInterface({
|
|
1299
|
+
input: stdin,
|
|
1300
|
+
output: process.stdout
|
|
1301
|
+
});
|
|
1302
|
+
const message = `${filename} already exists. Overwrite?`;
|
|
1303
|
+
const answer = await rl.question(` ${styleText("dim", message + " (y/N) ")}`);
|
|
1304
|
+
rl.close();
|
|
1305
|
+
if (answer.trim().length === 0) return false;
|
|
1306
|
+
return answer.toLowerCase() === "y" || answer.toLowerCase() === "yes";
|
|
1307
|
+
}
|
|
1308
|
+
function langLabel(lang) {
|
|
1309
|
+
switch (lang) {
|
|
1310
|
+
case "cjs": return "JavaScript (CommonJS)";
|
|
1311
|
+
case "cts": return "TypeScript (CommonJS)";
|
|
1312
|
+
case "js": return "JavaScript";
|
|
1313
|
+
case "mjs": return "JavaScript (ESM)";
|
|
1314
|
+
case "mts": return "TypeScript (ESM)";
|
|
1315
|
+
case "ts": return "TypeScript";
|
|
1316
|
+
default: return lang;
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
async function readRootPackageJson(cwd) {
|
|
1320
|
+
try {
|
|
1321
|
+
return await readPackageJson(path.join(cwd, "package.json"));
|
|
1322
|
+
} catch {
|
|
1323
|
+
console.log();
|
|
1324
|
+
console.log(` ${styleText("yellow", "⚠ No package.json found in current directory.")}`);
|
|
1325
|
+
console.log(` Create one first, then run ${styleText("cyan", "moniq init")} again.`);
|
|
1326
|
+
console.log();
|
|
1327
|
+
process.exitCode = 1;
|
|
1328
|
+
return;
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1257
1331
|
const cli = cac("moniq");
|
|
1258
1332
|
cli.command("check", "Run policy checks").option("--format <fmt>", "Output format: pretty or json", { default: "pretty" }).action(async (options) => {
|
|
1259
1333
|
const fmt = typeof options["format"] === "string" ? options["format"] : "pretty";
|
|
@@ -1284,10 +1358,11 @@ cli.command("fix", "Run policy checks and apply autofixes").option("--dry-run",
|
|
|
1284
1358
|
cli.command("doctor", "Detect configuration mistakes").action(async () => {
|
|
1285
1359
|
await doctor();
|
|
1286
1360
|
});
|
|
1287
|
-
cli.command("init", "Scaffold a moniq.config file in the current directory").option("--lang <type>", "Config language: ts, js, mjs, cjs, mts, cts (default:
|
|
1288
|
-
await init({ lang: typeof options["lang"] === "string" ? options["lang"] :
|
|
1361
|
+
cli.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) => {
|
|
1362
|
+
await init({ lang: typeof options["lang"] === "string" ? options["lang"] : void 0 });
|
|
1289
1363
|
});
|
|
1290
1364
|
cli.help();
|
|
1365
|
+
cli.version(version);
|
|
1291
1366
|
cli.parse();
|
|
1292
1367
|
//#endregion
|
|
1293
1368
|
export {};
|
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 { createRequire } from \"node:module\";\nimport { 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\nconst npmCommand = getNpmCommand();\nconst pnpmCommand = getPnpmCommand();\nconst yarnCommand = getYarnCommand();\nfunction discoverWorkspace(root) {\n\tconst pm = detectPackageManager(root);\n\tlet output;\n\tswitch (pm) {\n\t\tcase \"npm\": {\n\t\t\toutput = execFileSync(npmCommand, [\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(pnpmCommand, [\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(yarnCommand, [\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 detectPackageManager(root) {\n\tconst userAgent = process.env[\"npm_config_user_agent\"] ?? \"\";\n\tif (userAgent.startsWith(\"pnpm\")) return \"pnpm\";\n\tif (userAgent.startsWith(\"yarn\")) return \"yarn\";\n\tif (userAgent.startsWith(\"npm\")) return \"npm\";\n\tconst request = createRequire(import.meta.url);\n\tfor (const [lockFile, pm] of Object.entries({\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\trequest.resolve(path.join(root, lockFile));\n\t\treturn pm;\n\t} catch {}\n\ttry {\n\t\tconst rawPm = request(path.join(root, \"package.json\"))[\"packageManager\"];\n\t\tconst pm = typeof rawPm === \"string\" ? rawPm.split(\"@\", 2)[0] ?? \"\" : \"\";\n\t\tif ([\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\treturn \"pnpm\";\n}\nfunction getNpmCommand() {\n\treturn path.join(path.dirname(process.execPath), \"npm\");\n}\nfunction getPnpmCommand() {\n\ttry {\n\t\tconst request = createRequire(import.meta.url);\n\t\tconst specifier = [\"pnpm\", \"package.json\"].join(\"/\");\n\t\tconst packagePath = request.resolve(specifier);\n\t\treturn path.resolve(path.dirname(packagePath), \"bin\", \"pnpm.cjs\");\n\t} catch {\n\t\treturn \"pnpm\";\n\t}\n}\nfunction getYarnCommand() {\n\ttry {\n\t\tconst request = createRequire(import.meta.url);\n\t\tconst specifier = [\n\t\t\t\"@yarnpkg\",\n\t\t\t\"cli\",\n\t\t\t\"package.json\"\n\t\t].join(\"/\");\n\t\tconst packagePath = request.resolve(specifier);\n\t\treturn path.resolve(path.dirname(packagePath), \"sources\", \"bin\", \"yarn.js\");\n\t} catch {\n\t\ttry {\n\t\t\tconst request = createRequire(import.meta.url);\n\t\t\tconst specifier = [\"yarn\", \"package.json\"].join(\"/\");\n\t\t\tconst packagePath = request.resolve(specifier);\n\t\t\treturn path.resolve(path.dirname(packagePath), \"bin\", \"yarn.js\");\n\t\t} catch {\n\t\t\treturn \"yarn\";\n\t\t}\n\t}\n}\n//#endregion\nexport { 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 { discoverWorkspace } from \"@moniq/workspace\";\nimport { styleText } from \"node:util\";\nimport path from \"node:path\";\nimport { access } from \"node:fs/promises\";\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 = `📋 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\", `🔮 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 emoji = severityEmoji(d.severity);\n\tlines.push(` ${emoji} ${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\tconst icon = isDryRun ? \"🔮\" : \"🔧\";\n\t\tlines.push(` ${icon} ${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 severityEmoji(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 {\n\t\tthrow new Error(\"No moniq.config file found in or above the current directory.\");\n\t}\n\tconst packages = 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(` 🔍 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 = `🔮 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\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: \"warn\"\n\t\t});\n\t\tcheckScriptPolicies(config, issues);\n\t} catch {\n\t\tissues.push({\n\t\t\tmessage: \"No moniq.config file found in or above the current directory.\",\n\t\t\tseverity: \"error\"\n\t\t});\n\t}\n\ttry {\n\t\tconst packageCount = 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: \"warn\"\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\tconsole.log();\n\tconsole.log(` ${styleText(\"bold\", \"🏥 Configuration Doctor\")}`);\n\tconsole.log();\n\tif (issues.length === 0) {\n\t\tconsole.log(` ${styleText([\"bold\", \"green\"], \"✅ Everything looks good!\")}`);\n\t\treturn;\n\t}\n\tfor (const issue of issues) {\n\t\tconst icon = issue.severity === \"error\" ? \"❌\" : \"⚠️ \";\n\t\tconst label = issue.severity === \"error\" ? styleText([\"bold\", \"red\"], \"ERROR\") : styleText([\"bold\", \"yellow\"], \"WARN\");\n\t\tconsole.log(` ${icon} ${label} ${issue.message}`);\n\t}\n\tconst errorCount = issues.filter((index) => index.severity === \"error\").length;\n\tconst warningCount = issues.filter((index) => index.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}\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 = centerPad(DESCRIPTION, 62);\n\tlines.push(\"\", description);\n\treturn lines.join(\"\\n\");\n}\nfunction assembleRow(rowIndex) {\n\tlet row = \" \".repeat(6);\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 centerPad(text, width) {\n\tconst pad = Math.max(0, Math.floor((width - text.length) / 2));\n\treturn \" \".repeat(pad) + text;\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 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 init(options) {\n\tconst { lang } = options;\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 cwd = process.cwd();\n\tconst filename = `moniq.config.${lang}`;\n\tconst targetPath = path.join(cwd, filename);\n\ttry {\n\t\tawait access(targetPath);\n\t\tconst existsMessage = `⚠️ ${filename} already exists. Remove it first to reinitialize.`;\n\t\tconsole.log(` ${styleText(\"yellow\", existsMessage)}`);\n\t\treturn;\n\t} catch {}\n\tconst { writeFile } = await import(\"node:fs/promises\");\n\tawait writeFile(targetPath, STARTER_CONFIG, \"utf8\");\n\tconsole.log(renderBanner());\n\tconsole.log();\n\tconst created = `✅ Created ${filename}`;\n\tconsole.log(` ${styleText([\"bold\", \"green\"], created)}`);\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 script policies.\")}`);\n\tconsole.log(` 2. ${styleText(\"dim\", \"Run\")} ${styleText(\"cyan\", \"moniq doctor\")} ${styleText(\"dim\", \"to verify your configuration.\")}`);\n\tconsole.log(` 3. ${styleText(\"dim\", \"Run\")} ${styleText(\"cyan\", \"moniq check\")} ${styleText(\"dim\", \"to validate your workspace.\")}`);\n\tconsole.log(` 4. ${styleText(\"dim\", \"Run\")} ${styleText(\"cyan\", \"moniq fix\")} ${styleText(\"dim\", \"to apply automatic fixes.\")}`);\n\tconsole.log();\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: ts)\").action(async (options) => {\n\tawait init({ lang: typeof options[\"lang\"] === \"string\" ? options[\"lang\"] : \"ts\" });\n});\ncli.help();\ncli.parse();\n//#endregion\nexport {};\n\n//# sourceMappingURL=index.js.map"],"x_google_ignoreList":[0,2],"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C,OAAO,kBAAkB,iCAAiC,EAAE,SAAS,SAAS,CAAC,CAAC,CAAC,OAAO,OAAO,YAAY;CACpJ,MAAM,MAAM,OAAO,QAAQ,cAAc,WAAW,QAAQ,YAAY;CACxE,IAAI;EACH,MAAM,MAAM;GACX,KAAK;GACL,QAAQ;EACT,CAAC;CACF,SAAS,OAAO;EACf,QAAQ,MAAM,OAAO,KAAK,CAAC;EAC3B,QAAQ,WAAW;CACpB;AACD,CAAC;AACD,IAAI,QAAQ,OAAO,uCAAuC,CAAC,CAAC,OAAO,aAAa,4CAA4C,CAAC,CAAC,OAAO,kBAAkB,iCAAiC,EAAE,SAAS,SAAS,CAAC,CAAC,CAAC,OAAO,OAAO,YAAY;CACxO,MAAM,WAAW,QAAQ,cAAc;CACvC,MAAM,MAAM,OAAO,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,2DAA2D,CAAC,CAAC,OAAO,OAAO,YAAY;CAC3L,MAAM,KAAK,EAAE,MAAM,OAAO,QAAQ,YAAY,WAAW,QAAQ,UAAU,KAAK,CAAC;AAClF,CAAC;AACD,IAAI,KAAK;AACT,IAAI,MAAM"}
|
|
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 { createRequire } from \"node:module\";\nimport { 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\nconst npmCommand = getNpmCommand();\nconst pnpmCommand = getPnpmCommand();\nconst yarnCommand = getYarnCommand();\nfunction discoverWorkspace(root) {\n\tconst pm = detectPackageManager(root);\n\tlet output;\n\tswitch (pm) {\n\t\tcase \"npm\": {\n\t\t\toutput = execFileSync(npmCommand, [\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(pnpmCommand, [\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(yarnCommand, [\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 detectPackageManager(root) {\n\tconst userAgent = process.env[\"npm_config_user_agent\"] ?? \"\";\n\tif (userAgent.startsWith(\"pnpm\")) return \"pnpm\";\n\tif (userAgent.startsWith(\"yarn\")) return \"yarn\";\n\tif (userAgent.startsWith(\"npm\")) return \"npm\";\n\tconst request = createRequire(import.meta.url);\n\tfor (const [lockFile, pm] of Object.entries({\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\trequest.resolve(path.join(root, lockFile));\n\t\treturn pm;\n\t} catch {}\n\ttry {\n\t\tconst rawPm = request(path.join(root, \"package.json\"))[\"packageManager\"];\n\t\tconst pm = typeof rawPm === \"string\" ? rawPm.split(\"@\", 2)[0] ?? \"\" : \"\";\n\t\tif ([\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\treturn \"pnpm\";\n}\nfunction getNpmCommand() {\n\treturn path.join(path.dirname(process.execPath), \"npm\");\n}\nfunction getPnpmCommand() {\n\ttry {\n\t\tconst request = createRequire(import.meta.url);\n\t\tconst specifier = [\"pnpm\", \"package.json\"].join(\"/\");\n\t\tconst packagePath = request.resolve(specifier);\n\t\treturn path.resolve(path.dirname(packagePath), \"bin\", \"pnpm.cjs\");\n\t} catch {\n\t\treturn \"pnpm\";\n\t}\n}\nfunction getYarnCommand() {\n\ttry {\n\t\tconst request = createRequire(import.meta.url);\n\t\tconst specifier = [\n\t\t\t\"@yarnpkg\",\n\t\t\t\"cli\",\n\t\t\t\"package.json\"\n\t\t].join(\"/\");\n\t\tconst packagePath = request.resolve(specifier);\n\t\treturn path.resolve(path.dirname(packagePath), \"sources\", \"bin\", \"yarn.js\");\n\t} catch {\n\t\ttry {\n\t\t\tconst request = createRequire(import.meta.url);\n\t\t\tconst specifier = [\"yarn\", \"package.json\"].join(\"/\");\n\t\t\tconst packagePath = request.resolve(specifier);\n\t\t\treturn path.resolve(path.dirname(packagePath), \"bin\", \"yarn.js\");\n\t\t} catch {\n\t\t\treturn \"yarn\";\n\t\t}\n\t}\n}\n//#endregion\nexport { 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 { discoverWorkspace, readPackageJson } from \"@moniq/workspace\";\nimport { styleText } from \"node:util\";\nimport path from \"node:path\";\nimport { stdin } from \"node:process\";\nimport { createInterface } from \"node:readline/promises\";\n//#region ../moniq/package.json\nvar version = \"0.2.0\";\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 = `📋 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\", `🔮 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 emoji = severityEmoji(d.severity);\n\tlines.push(` ${emoji} ${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\tconst icon = isDryRun ? \"🔮\" : \"🔧\";\n\t\tlines.push(` ${icon} ${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 severityEmoji(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 {\n\t\tthrow new Error(\"No moniq.config file found in or above the current directory.\");\n\t}\n\tconst packages = 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(` 🔍 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 = `🔮 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\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: \"warn\"\n\t\t});\n\t\tcheckScriptPolicies(config, issues);\n\t} catch {\n\t\tissues.push({\n\t\t\tmessage: \"No moniq.config file found in or above the current directory.\",\n\t\t\tseverity: \"error\"\n\t\t});\n\t}\n\ttry {\n\t\tconst packageCount = 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: \"warn\"\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\tconsole.log();\n\tconsole.log(` ${styleText(\"bold\", \"🏥 Configuration Doctor\")}`);\n\tconsole.log();\n\tif (issues.length === 0) {\n\t\tconsole.log(` ${styleText([\"bold\", \"green\"], \"✅ Everything looks good!\")}`);\n\t\treturn;\n\t}\n\tfor (const issue of issues) {\n\t\tconst icon = issue.severity === \"error\" ? \"❌\" : \"⚠️ \";\n\t\tconst label = issue.severity === \"error\" ? styleText([\"bold\", \"red\"], \"ERROR\") : styleText([\"bold\", \"yellow\"], \"WARN\");\n\t\tconsole.log(` ${icon} ${label} ${issue.message}`);\n\t}\n\tconst errorCount = issues.filter((index) => index.severity === \"error\").length;\n\tconst warningCount = issues.filter((index) => index.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}\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 = centerPad(DESCRIPTION, 62);\n\tconst versionLine = centerPad(`v${version}`, 62);\n\tlines.push(\"\", versionLine, description);\n\treturn lines.join(\"\\n\");\n}\nfunction assembleRow(rowIndex) {\n\tlet row = \" \".repeat(6);\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 centerPad(text, width) {\n\tconst pad = Math.max(0, Math.floor((width - text.length) / 2));\n\treturn \" \".repeat(pad) + text;\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];\nasync function detectLang(cwd, packageJson) {\n\tconst rawDependencies = packageJson[\"dependencies\"];\n\tconst rawDevelopmentDependencies = packageJson[\"devDependencies\"];\n\tconst { access } = await import(\"node:fs/promises\");\n\ttry {\n\t\tawait access(path.join(cwd, \"tsconfig.json\"));\n\t\treturn \"ts\";\n\t} catch {}\n\tif (typeof rawDependencies === \"object\" && rawDependencies !== null && Object.hasOwn(rawDependencies, \"typescript\")) return \"ts\";\n\tif (typeof rawDevelopmentDependencies === \"object\" && rawDevelopmentDependencies !== null && Object.hasOwn(rawDevelopmentDependencies, \"typescript\")) return \"ts\";\n\treturn \"js\";\n}\nfunction generateConfig() {\n\treturn `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`;\n}\nasync function init(options) {\n\tconst { _cwd, lang: explicitLang } = options;\n\tconst cwd = _cwd ?? process.cwd();\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\tconsole.log(renderBanner());\n\tconsole.log();\n\tlet packages = [];\n\tlet workspaceLabel = \"single package\";\n\ttry {\n\t\tpackages = discoverWorkspace(cwd);\n\t\tif (packages.length > 1) workspaceLabel = `monorepo with ${String(packages.length)} packages`;\n\t} catch {\n\t\tworkspaceLabel = \"unknown (workspace detection failed)\";\n\t}\n\tconst detectedLabel = `🔍 Detected: ${styleText(\"cyan\", workspaceLabel)}`;\n\tconsole.log(` ${styleText(\"dim\", detectedLabel)}`);\n\tif (packages.length > 1) for (const package_ of packages) {\n\t\tconst packageLine = ` • ${path.relative(cwd, package_.path)}`;\n\t\tconsole.log(` ${styleText(\"dim\", packageLine)}`);\n\t}\n\tconst langLine = `🔍 Language: ${styleText(\"cyan\", langLabel(lang))}`;\n\tconsole.log(` ${styleText(\"dim\", langLine)}`);\n\tconsole.log();\n\tif (!await handleExistingConfig(configPath, filename)) return;\n\tconst { writeFile } = await import(\"node:fs/promises\");\n\tawait writeFile(configPath, generateConfig(), \"utf8\");\n\tconst createdMessage = `✅ Created ${filename}`;\n\tconsole.log(` ${styleText([\"bold\", \"green\"], createdMessage)}`);\n\tconsole.log();\n\tawait doctor();\n\tconsole.log();\n\tconsole.log(` ${styleText(\"dim\", \"Next steps:\")}`);\n\tconsole.log(` 1. ${styleText(\"dim\", \"Edit\")} ${styleText(\"cyan\", \"moniq.config\")} ${styleText(\"dim\", \"to fine-tune 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 langLabel(lang) {\n\tswitch (lang) {\n\t\tcase \"cjs\": return \"JavaScript (CommonJS)\";\n\t\tcase \"cts\": return \"TypeScript (CommonJS)\";\n\t\tcase \"js\": return \"JavaScript\";\n\t\tcase \"mjs\": return \"JavaScript (ESM)\";\n\t\tcase \"mts\": return \"TypeScript (ESM)\";\n\t\tcase \"ts\": return \"TypeScript\";\n\t\tdefault: return lang;\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}\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({ lang: typeof options[\"lang\"] === \"string\" ? options[\"lang\"] : void 0 });\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,QAAQ,IAAI,CAAC,KAAK,IAAI,MAAM,KAAK,IAAI;CAC/S,IAAI,OAAO,OAAO,OAAO,MAAM,MAAM,QAAQ,GAAG,IAAI,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,GAAG;AAChF;AACA,SAAS,YAAY,MAAM,MAAM;CAChC,OAAO,QAAQ,CAAC;CAChB,OAAO,QAAQ,CAAC;CAChB,IAAI,GAAG,KAAK,KAAK,MAAM,KAAK,MAAM,EAAE,GAAG,CAAC,EAAE;CAC1C,IAAI,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,KAAK;CACtC,MAAM,QAAQ,KAAK,UAAU,KA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WAAW,QAAQ,YAAY;CACxE,IAAI;EACH,MAAM,MAAM;GACX,KAAK;GACL,QAAQ;EACT,CAAC;CACF,SAAS,OAAO;EACf,QAAQ,MAAM,OAAO,KAAK,CAAC;EAC3B,QAAQ,WAAW;CACpB;AACD,CAAC;AACD,IAAI,QAAQ,OAAO,uCAAuC,CAAC,CAAC,OAAO,aAAa,4CAA4C,CAAC,CAAC,OAAO,kBAAkB,iCAAiC,EAAE,SAAS,SAAS,CAAC,CAAC,CAAC,OAAO,OAAO,YAAY;CACxO,MAAM,WAAW,QAAQ,cAAc;CACvC,MAAM,MAAM,OAAO,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,EAAE,MAAM,OAAO,QAAQ,YAAY,WAAW,QAAQ,UAAU,KAAK,EAAE,CAAC;AACpF,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
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Policy-driven workspace linter for JavaScript/TypeScript monorepos",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"tsdown": "^0.22.4",
|
|
49
49
|
"vitest": "^4.1.10",
|
|
50
50
|
"@moniq/config": "0.0.0",
|
|
51
|
-
"@moniq/
|
|
51
|
+
"@moniq/typescript-config": "0.0.0",
|
|
52
52
|
"@moniq/cli": "0.0.0",
|
|
53
|
-
"@moniq/
|
|
53
|
+
"@moniq/eslint-config": "0.0.0"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"dev": "tsdown --watch",
|