@udohjeremiah/moniq 0.1.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/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +1295 -0
- package/dist/cli.js.map +1 -0
- package/dist/dist-B1TNZsla.js +12055 -0
- package/dist/dist-B1TNZsla.js.map +1 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +289 -0
- package/dist/index.js.map +1 -0
- package/package.json +62 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//#region src/bin.d.ts
|
|
2
|
+
declare function bin(name: string): (command: string) => boolean;
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region ../config/dist/index.d.ts
|
|
5
|
+
//#region src/scripts.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* A single script policy configuration.
|
|
8
|
+
*
|
|
9
|
+
* See the `scripts` field of `Config` for usage.
|
|
10
|
+
*/
|
|
11
|
+
interface ScriptPolicy {
|
|
12
|
+
/**
|
|
13
|
+
* Package globs that may define their own command for this script (no-op unless `command` is set).
|
|
14
|
+
* Special values: `"."` for root only, `"*"` for all packages. Defaults to `[]`.
|
|
15
|
+
*/
|
|
16
|
+
allowCustomCommands?: string[];
|
|
17
|
+
/**
|
|
18
|
+
* Whether to autofix mismatched or missing scripts when running `moniq fix`.
|
|
19
|
+
* Only applies when `command` is a plain string. Defaults to `false`.
|
|
20
|
+
*/
|
|
21
|
+
autofix?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The expected command — exact string, RegExp, or predicate like `bin("eslint")`.
|
|
24
|
+
* When omitted, only existence is validated (subject to `required`).
|
|
25
|
+
*/
|
|
26
|
+
command?: ((command: string) => boolean) | RegExp | string;
|
|
27
|
+
/** Human-readable explanation displayed alongside diagnostics. */
|
|
28
|
+
description?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Package globs to exclude, evaluated after `include`.
|
|
31
|
+
* Defaults to `[]`.
|
|
32
|
+
*/
|
|
33
|
+
exclude?: string[];
|
|
34
|
+
/**
|
|
35
|
+
* Package globs this policy applies to.
|
|
36
|
+
* Special values: `"."` for root only, `"*"` for all packages.
|
|
37
|
+
* Defaults to `["*"]`.
|
|
38
|
+
*/
|
|
39
|
+
include?: string[];
|
|
40
|
+
/**
|
|
41
|
+
* Whether the script must exist. If `false`, the script is optional.
|
|
42
|
+
* Defaults to `true`.
|
|
43
|
+
*/
|
|
44
|
+
required?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Severity of violations: `"off"` (disabled), `"warn"`, or `"error"`.
|
|
47
|
+
* Defaults to `"error"`.
|
|
48
|
+
*/
|
|
49
|
+
severity?: "error" | "off" | "warn";
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/index.d.ts
|
|
53
|
+
/** Moniq configuration. */
|
|
54
|
+
interface Config {
|
|
55
|
+
/** Policies keyed by script name. Maps script names to one or more policies (first match wins). */
|
|
56
|
+
scripts?: Record<string, ScriptPolicy | ScriptPolicy[]>;
|
|
57
|
+
}
|
|
58
|
+
/** Identity helper for type inference. Use in your `moniq.config.ts` to get full type safety. */
|
|
59
|
+
declare function defineConfig(config: Config): Config;
|
|
60
|
+
//#endregion
|
|
61
|
+
export { type Config, type ScriptPolicy, bin, defineConfig };
|
|
62
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/bin.ts","../../config/dist/index.d.ts"],"mappings":";iBAUgB,IAAI,gBACV;;;;;;;;;UCJA;;;;;EAKR;;;;;EAKA;;;;;EAKA,YAAY,+BAA+B;;EAE3C;;;;;EAKA;;;;;;EAMA;;;;;EAKA;;;;;EAKA;;;;;UAKQ;;EAER,UAAU,eAAe,eAAe;;;iBAGzB,aAAa,QAAQ,SAAS"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { r as __commonJSMin, t as defineConfig } from "./dist-B1TNZsla.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.9.0/node_modules/shell-quote/quote.js
|
|
3
|
+
var require_quote = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
/** @import { ControlOperator } from './parse' */
|
|
5
|
+
/** @type {ControlOperator['op'][]} */
|
|
6
|
+
var OPS = [
|
|
7
|
+
"||",
|
|
8
|
+
"&&",
|
|
9
|
+
";;",
|
|
10
|
+
"|&",
|
|
11
|
+
"<(",
|
|
12
|
+
"<<<",
|
|
13
|
+
">>",
|
|
14
|
+
">&",
|
|
15
|
+
"<&",
|
|
16
|
+
"&",
|
|
17
|
+
";",
|
|
18
|
+
"(",
|
|
19
|
+
")",
|
|
20
|
+
"|",
|
|
21
|
+
"<",
|
|
22
|
+
">"
|
|
23
|
+
];
|
|
24
|
+
var LINE_TERMINATORS = /[\n\r\u2028\u2029]/;
|
|
25
|
+
var GLOB_SHELL_SPECIAL = /[\s#!"$&'():;<=>@\\^`|]/g;
|
|
26
|
+
/** @type {import('./quote')} */
|
|
27
|
+
module.exports = function quote(xs) {
|
|
28
|
+
return xs.map(function(s) {
|
|
29
|
+
if (s === "") return "''";
|
|
30
|
+
if (s && typeof s === "object") {
|
|
31
|
+
if ("op" in s && s.op === "glob") {
|
|
32
|
+
if (typeof s.pattern !== "string") throw new TypeError("glob token requires a string `pattern`");
|
|
33
|
+
if (LINE_TERMINATORS.test(s.pattern)) throw new TypeError("glob `pattern` must not contain line terminators");
|
|
34
|
+
return s.pattern.replace(GLOB_SHELL_SPECIAL, "\\$&");
|
|
35
|
+
}
|
|
36
|
+
if ("op" in s && typeof s.op === "string") {
|
|
37
|
+
if (OPS.indexOf(s.op) < 0) throw new TypeError("invalid `op` value: " + JSON.stringify(s.op));
|
|
38
|
+
return s.op.replace(/[\s\S]/g, "\\$&");
|
|
39
|
+
}
|
|
40
|
+
if ("comment" in s && typeof s.comment === "string") {
|
|
41
|
+
if (LINE_TERMINATORS.test(s.comment)) throw new TypeError("`comment` must not contain line terminators");
|
|
42
|
+
return "#" + s.comment;
|
|
43
|
+
}
|
|
44
|
+
throw new TypeError("unrecognized object token shape");
|
|
45
|
+
}
|
|
46
|
+
if (/["\s\\]/.test(s) && !/'/.test(s)) return "'" + s.replace(/(['])/g, "\\$1") + "'";
|
|
47
|
+
if (/["'\s]/.test(s)) return "\"" + s.replace(/(["\\$`!])/g, "\\$1") + "\"";
|
|
48
|
+
return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g, "$1\\$2");
|
|
49
|
+
}).join(" ");
|
|
50
|
+
};
|
|
51
|
+
}));
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region ../../node_modules/.pnpm/shell-quote@1.9.0/node_modules/shell-quote/parse.js
|
|
54
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
55
|
+
/**
|
|
56
|
+
* @import {
|
|
57
|
+
* ControlOperator,
|
|
58
|
+
* Env,
|
|
59
|
+
* GlobPattern,
|
|
60
|
+
* ParseEntry,
|
|
61
|
+
* } from './parse' */
|
|
62
|
+
var CONTROL = "(?:" + [
|
|
63
|
+
"\\|\\|",
|
|
64
|
+
"\\&\\&",
|
|
65
|
+
";;",
|
|
66
|
+
"\\|\\&",
|
|
67
|
+
"\\<\\(",
|
|
68
|
+
"\\<\\<\\<",
|
|
69
|
+
">>",
|
|
70
|
+
">\\&",
|
|
71
|
+
"<\\&",
|
|
72
|
+
"[&;()|<>]"
|
|
73
|
+
].join("|") + ")";
|
|
74
|
+
var controlRE = new RegExp("^" + CONTROL + "$");
|
|
75
|
+
var META = "|&;()<> \\t";
|
|
76
|
+
var SINGLE_QUOTE = "\"((\\\\\"|[^\"])*?)\"";
|
|
77
|
+
var DOUBLE_QUOTE = "'((\\\\'|[^'])*?)'";
|
|
78
|
+
var hash = /^#$/;
|
|
79
|
+
var SQ = "'";
|
|
80
|
+
var DQ = "\"";
|
|
81
|
+
var DS = "$";
|
|
82
|
+
var TOKEN = "";
|
|
83
|
+
var mult = 4294967296;
|
|
84
|
+
for (var i = 0; i < 4; i++) TOKEN += (mult * Math.random()).toString(16);
|
|
85
|
+
var startsWithToken = new RegExp("^" + TOKEN);
|
|
86
|
+
/**
|
|
87
|
+
* @param {string} s
|
|
88
|
+
* @param {RegExp} r
|
|
89
|
+
*/
|
|
90
|
+
function matchAll(s, r) {
|
|
91
|
+
var origIndex = r.lastIndex;
|
|
92
|
+
var matches = [];
|
|
93
|
+
var matchObj;
|
|
94
|
+
while (matchObj = r.exec(s)) {
|
|
95
|
+
matches[matches.length] = matchObj;
|
|
96
|
+
if (r.lastIndex === matchObj.index) r.lastIndex += 1;
|
|
97
|
+
}
|
|
98
|
+
r.lastIndex = origIndex;
|
|
99
|
+
return matches;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* @param {Env} env
|
|
103
|
+
* @param {string} pre
|
|
104
|
+
* @param {string} key
|
|
105
|
+
*/
|
|
106
|
+
function getVar(env, pre, key) {
|
|
107
|
+
var r = typeof env === "function" ? env(key) : env[key];
|
|
108
|
+
if (typeof r === "undefined" && key != "") r = "";
|
|
109
|
+
else if (typeof r === "undefined") r = "$";
|
|
110
|
+
if (typeof r === "object") return pre + TOKEN + JSON.stringify(r) + TOKEN;
|
|
111
|
+
return pre + r;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* @param {string} string
|
|
115
|
+
* @param {Env} [env]
|
|
116
|
+
* @param {{ escape?: string }} [opts]
|
|
117
|
+
* @returns {ParseEntry[]}
|
|
118
|
+
*/
|
|
119
|
+
function parseInternal(string, env, opts) {
|
|
120
|
+
if (!opts) opts = {};
|
|
121
|
+
var BS = opts.escape || "\\";
|
|
122
|
+
var BAREWORD = "(\\" + BS + "['\"" + META + "]|[^\\s'\"" + META + "])+";
|
|
123
|
+
var matches = matchAll(string, new RegExp(["(" + CONTROL + ")", "(" + BAREWORD + "|" + SINGLE_QUOTE + "|" + DOUBLE_QUOTE + ")+"].join("|"), "g"));
|
|
124
|
+
if (matches.length === 0) return [];
|
|
125
|
+
if (!env) env = {};
|
|
126
|
+
var commented = false;
|
|
127
|
+
return matches.map(function(match) {
|
|
128
|
+
var s = match[0];
|
|
129
|
+
if (!s || commented) return;
|
|
130
|
+
if (controlRE.test(s)) return { op: s };
|
|
131
|
+
/** @type {string | boolean} */
|
|
132
|
+
var quote = false;
|
|
133
|
+
var esc = false;
|
|
134
|
+
var out = "";
|
|
135
|
+
var isGlob = false;
|
|
136
|
+
/** @type {number} */
|
|
137
|
+
var i;
|
|
138
|
+
function parseEnvVar() {
|
|
139
|
+
i += 1;
|
|
140
|
+
/** @type {number | RegExpMatchArray | null} */
|
|
141
|
+
var varend;
|
|
142
|
+
/** @type {string} */
|
|
143
|
+
var varname;
|
|
144
|
+
var char = s.charAt(i);
|
|
145
|
+
if (char === "{") {
|
|
146
|
+
i += 1;
|
|
147
|
+
if (s.charAt(i) === "}") throw new Error("Bad substitution: " + s.slice(i - 2, i + 1));
|
|
148
|
+
varend = s.indexOf("}", i);
|
|
149
|
+
if (varend < 0) throw new Error("Bad substitution: " + s.slice(i));
|
|
150
|
+
varname = s.slice(i, varend);
|
|
151
|
+
i = varend;
|
|
152
|
+
} else if (/[*@#?$!_-]/.test(char)) {
|
|
153
|
+
varname = char;
|
|
154
|
+
i += 1;
|
|
155
|
+
} else {
|
|
156
|
+
var slicedFromI = s.slice(i);
|
|
157
|
+
varend = slicedFromI.match(/[^\w\d_]/);
|
|
158
|
+
if (!varend) {
|
|
159
|
+
varname = slicedFromI;
|
|
160
|
+
i = s.length;
|
|
161
|
+
} else {
|
|
162
|
+
varname = slicedFromI.slice(0, varend.index);
|
|
163
|
+
i += varend.index - 1;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return getVar(env, "", varname);
|
|
167
|
+
}
|
|
168
|
+
for (i = 0; i < s.length; i++) {
|
|
169
|
+
var c = s.charAt(i);
|
|
170
|
+
isGlob = isGlob || !quote && (c === "*" || c === "?");
|
|
171
|
+
if (esc) {
|
|
172
|
+
out += c;
|
|
173
|
+
esc = false;
|
|
174
|
+
} else if (quote) if (c === quote) quote = false;
|
|
175
|
+
else if (quote == SQ) out += c;
|
|
176
|
+
else if (c === BS) {
|
|
177
|
+
i += 1;
|
|
178
|
+
c = s.charAt(i);
|
|
179
|
+
if (c === DQ || c === BS || c === DS) out += c;
|
|
180
|
+
else out += BS + c;
|
|
181
|
+
} else if (c === DS) out += parseEnvVar();
|
|
182
|
+
else out += c;
|
|
183
|
+
else if (c === DQ || c === SQ) quote = c;
|
|
184
|
+
else if (controlRE.test(c)) return { op: s };
|
|
185
|
+
else if (hash.test(c)) {
|
|
186
|
+
commented = true;
|
|
187
|
+
var commentObj = { comment: string.slice(match.index + i + 1) };
|
|
188
|
+
if (out.length) return [out, commentObj];
|
|
189
|
+
return [commentObj];
|
|
190
|
+
} else if (c === BS) esc = true;
|
|
191
|
+
else if (c === DS) out += parseEnvVar();
|
|
192
|
+
else out += c;
|
|
193
|
+
}
|
|
194
|
+
if (isGlob) return {
|
|
195
|
+
op: "glob",
|
|
196
|
+
pattern: out
|
|
197
|
+
};
|
|
198
|
+
return out;
|
|
199
|
+
}).reduce(function(prev, arg) {
|
|
200
|
+
if (typeof arg === "undefined") return prev;
|
|
201
|
+
/** @type {ParseEntry[]} */ [].concat(arg).forEach(function(entry) {
|
|
202
|
+
prev[prev.length] = entry;
|
|
203
|
+
});
|
|
204
|
+
return prev;
|
|
205
|
+
}, []);
|
|
206
|
+
}
|
|
207
|
+
/** @type {import('./parse')} */
|
|
208
|
+
module.exports = function parse(s, env, opts) {
|
|
209
|
+
var mapped = parseInternal(s, env, opts);
|
|
210
|
+
if (typeof env !== "function") return mapped;
|
|
211
|
+
return mapped.reduce(function(acc, s) {
|
|
212
|
+
if (typeof s === "object") {
|
|
213
|
+
acc[acc.length] = s;
|
|
214
|
+
return acc;
|
|
215
|
+
}
|
|
216
|
+
var xs = s.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
|
|
217
|
+
if (xs.length === 1) {
|
|
218
|
+
acc[acc.length] = xs[0];
|
|
219
|
+
return acc;
|
|
220
|
+
}
|
|
221
|
+
xs.filter(Boolean).forEach(function(x) {
|
|
222
|
+
acc[acc.length] = startsWithToken.test(x) ? JSON.parse(x.split(TOKEN)[1]) : x;
|
|
223
|
+
});
|
|
224
|
+
return acc;
|
|
225
|
+
}, []);
|
|
226
|
+
};
|
|
227
|
+
}));
|
|
228
|
+
//#endregion
|
|
229
|
+
//#region src/bin.ts
|
|
230
|
+
var import_shell_quote = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
231
|
+
exports.quote = require_quote();
|
|
232
|
+
exports.parse = require_parse();
|
|
233
|
+
})))();
|
|
234
|
+
const WRAPPER_SEQUENCES = [
|
|
235
|
+
["pnpm", "exec"],
|
|
236
|
+
["pnpm", "dlx"],
|
|
237
|
+
["yarn", "dlx"]
|
|
238
|
+
];
|
|
239
|
+
const WRAPPER_SINGLE = /* @__PURE__ */ new Set([
|
|
240
|
+
"bunx",
|
|
241
|
+
"node",
|
|
242
|
+
"npx",
|
|
243
|
+
"yarn"
|
|
244
|
+
]);
|
|
245
|
+
function bin(name) {
|
|
246
|
+
return (command) => {
|
|
247
|
+
let tokens = (0, import_shell_quote.parse)(command).filter((t) => typeof t === "string");
|
|
248
|
+
while (tokens[0] === "cross-env" || /^[A-Z_]\w*=/i.test(tokens[0] ?? "")) tokens = tokens.slice(1);
|
|
249
|
+
({remaining: tokens} = stripWrappers(tokens));
|
|
250
|
+
let index = 0;
|
|
251
|
+
while (tokens.slice(index, index + 1)[0]?.startsWith("-")) index++;
|
|
252
|
+
const candidate = tokens.slice(index, index + 1)[0];
|
|
253
|
+
return candidate !== void 0 && toBinaryName(candidate) === name;
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
function stripWrappers(tokens) {
|
|
257
|
+
let remaining = tokens;
|
|
258
|
+
let isChanged = true;
|
|
259
|
+
while (isChanged) {
|
|
260
|
+
isChanged = false;
|
|
261
|
+
const seq = WRAPPER_SEQUENCES.find((w) => {
|
|
262
|
+
const slice = remaining.slice(0, w.length);
|
|
263
|
+
return slice.length === w.length && slice.every((t, index_) => t === w.slice(index_, index_ + 1)[0]);
|
|
264
|
+
});
|
|
265
|
+
if (seq) {
|
|
266
|
+
remaining = remaining.slice(seq.length);
|
|
267
|
+
isChanged = true;
|
|
268
|
+
} else if (WRAPPER_SINGLE.has(remaining[0] ?? "")) {
|
|
269
|
+
remaining = remaining.slice(1);
|
|
270
|
+
isChanged = true;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return { remaining };
|
|
274
|
+
}
|
|
275
|
+
function toBinaryName(token) {
|
|
276
|
+
if (token.startsWith("@")) {
|
|
277
|
+
const atIndexes = Array.from(token.matchAll(/@/g), (m) => m.index);
|
|
278
|
+
if (atIndexes.length >= 2) return token.slice(0, atIndexes[1] ?? token.length);
|
|
279
|
+
return token;
|
|
280
|
+
}
|
|
281
|
+
const basename = token.split("/").pop() ?? token;
|
|
282
|
+
const atIndex = basename.lastIndexOf("@");
|
|
283
|
+
if (atIndex > 0) return basename.slice(0, atIndex);
|
|
284
|
+
return basename;
|
|
285
|
+
}
|
|
286
|
+
//#endregion
|
|
287
|
+
export { bin, defineConfig };
|
|
288
|
+
|
|
289
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../node_modules/.pnpm/shell-quote@1.9.0/node_modules/shell-quote/quote.js","../../../node_modules/.pnpm/shell-quote@1.9.0/node_modules/shell-quote/parse.js","../../../node_modules/.pnpm/shell-quote@1.9.0/node_modules/shell-quote/index.js","../src/bin.ts"],"sourcesContent":["'use strict';\n\n/** @import { ControlOperator } from './parse' */\n\n/** @type {ControlOperator['op'][]} */\nvar OPS = /** @type {const} */ ([\n\t'||',\n\t'&&',\n\t';;',\n\t'|&',\n\t'<(',\n\t'<<<',\n\t'>>',\n\t'>&',\n\t'<&',\n\t'&',\n\t';',\n\t'(',\n\t')',\n\t'|',\n\t'<',\n\t'>'\n]);\nvar LINE_TERMINATORS = /[\\n\\r\\u2028\\u2029]/;\nvar GLOB_SHELL_SPECIAL = /[\\s#!\"$&'():;<=>@\\\\^`|]/g;\n\n/** @type {import('./quote')} */\nmodule.exports = function quote(xs) {\n\treturn xs.map(function (s) {\n\t\tif (s === '') {\n\t\t\treturn /** @type {const} */ ('\\'\\'');\n\t\t}\n\t\tif (s && typeof s === 'object') {\n\t\t\tif ('op' in s && s.op === 'glob') {\n\t\t\t\tif (typeof s.pattern !== 'string') {\n\t\t\t\t\tthrow new TypeError('glob token requires a string `pattern`');\n\t\t\t\t}\n\t\t\t\tif (LINE_TERMINATORS.test(s.pattern)) {\n\t\t\t\t\tthrow new TypeError('glob `pattern` must not contain line terminators');\n\t\t\t\t}\n\t\t\t\treturn s.pattern.replace(GLOB_SHELL_SPECIAL, '\\\\$&');\n\t\t\t}\n\t\t\tif ('op' in s && typeof s.op === 'string') {\n\t\t\t\tif (OPS.indexOf(s.op) < 0) {\n\t\t\t\t\tthrow new TypeError('invalid `op` value: ' + JSON.stringify(s.op));\n\t\t\t\t}\n\t\t\t\treturn s.op.replace(/[\\s\\S]/g, '\\\\$&');\n\t\t\t}\n\t\t\tif ('comment' in s && typeof s.comment === 'string') {\n\t\t\t\tif (LINE_TERMINATORS.test(s.comment)) {\n\t\t\t\t\tthrow new TypeError('`comment` must not contain line terminators');\n\t\t\t\t}\n\t\t\t\treturn '#' + s.comment;\n\t\t\t}\n\t\t\tthrow new TypeError('unrecognized object token shape');\n\t\t}\n\t\tif ((/[\"\\s\\\\]/).test(s) && !(/'/).test(s)) {\n\t\t\treturn \"'\" + s.replace(/(['])/g, '\\\\$1') + \"'\";\n\t\t}\n\t\tif ((/[\"'\\s]/).test(s)) {\n\t\t\treturn '\"' + s.replace(/([\"\\\\$`!])/g, '\\\\$1') + '\"';\n\t\t}\n\t\treturn String(s).replace(/([A-Za-z]:)?([#!\"$&'()*,:;<=>?@[\\\\\\]^`{|}~])/g, '$1\\\\$2');\n\t}).join(' ');\n};\n","'use strict';\n\n/**\n * @import {\n * \tControlOperator,\n * \tEnv,\n * \tGlobPattern,\n * \tParseEntry,\n * } from './parse' */\n\n// '<(' is process substitution operator and\n// can be parsed the same as control operator\nvar CONTROL = /** @type {const} */ ('(?:') + /** @type {const} */ ([\n\t'\\\\|\\\\|',\n\t'\\\\&\\\\&',\n\t';;',\n\t'\\\\|\\\\&',\n\t'\\\\<\\\\(',\n\t'\\\\<\\\\<\\\\<',\n\t'>>',\n\t'>\\\\&',\n\t'<\\\\&',\n\t'[&;()|<>]'\n]).join(/** @type {const} */ ('|')) + /** @type {const} */ (')');\nvar controlRE = new RegExp('^' + CONTROL + '$');\nvar META = /** @type {const} */ ('|&;()<> \\\\t');\nvar SINGLE_QUOTE = /** @type {const} */ ('\"((\\\\\\\\\"|[^\"])*?)\"');\nvar DOUBLE_QUOTE = /** @type {const} */ ('\\'((\\\\\\\\\\'|[^\\'])*?)\\'');\nvar hash = /^#$/;\n\nvar SQ = /** @type {const} */ (\"'\");\nvar DQ = /** @type {const} */ ('\"');\nvar DS = /** @type {const} */ ('$');\n\nvar TOKEN = '';\nvar mult = /** @type {const} */ (0x100000000); // Math.pow(16, 8);\nfor (var i = 0; i < 4; i++) {\n\tTOKEN += (mult * Math.random()).toString(16);\n}\nvar startsWithToken = new RegExp('^' + TOKEN);\n\n/**\n * @param {string} s\n * @param {RegExp} r\n */\nfunction matchAll(s, r) {\n\tvar origIndex = r.lastIndex;\n\n\tvar matches = [];\n\tvar matchObj;\n\n\twhile ((matchObj = r.exec(s))) {\n\t\tmatches[matches.length] = matchObj;\n\t\tif (r.lastIndex === matchObj.index) {\n\t\t\tr.lastIndex += 1;\n\t\t}\n\t}\n\n\tr.lastIndex = origIndex;\n\n\treturn matches;\n}\n\n/**\n * @param {Env} env\n * @param {string} pre\n * @param {string} key\n */\nfunction getVar(env, pre, key) {\n\tvar r = typeof env === 'function' ? env(key) : env[key];\n\tif (typeof r === 'undefined' && key != '') {\n\t\tr = '';\n\t} else if (typeof r === 'undefined') {\n\t\tr = '$';\n\t}\n\n\tif (typeof r === 'object') {\n\t\treturn pre + TOKEN + JSON.stringify(r) + TOKEN;\n\t}\n\treturn pre + r;\n}\n\n/**\n * @param {string} string\n * @param {Env} [env]\n * @param {{ escape?: string }} [opts]\n * @returns {ParseEntry[]}\n */\nfunction parseInternal(string, env, opts) {\n\tif (!opts) {\n\t\topts = {};\n\t}\n\tvar BS = opts.escape || '\\\\';\n\tvar BAREWORD = '(\\\\' + BS + '[\\'\"' + META + ']|[^\\\\s\\'\"' + META + '])+';\n\n\tvar chunker = new RegExp([\n\t\t'(' + CONTROL + ')', // control chars\n\t\t'(' + BAREWORD + '|' + SINGLE_QUOTE + '|' + DOUBLE_QUOTE + ')+'\n\t].join('|'), 'g');\n\n\tvar matches = matchAll(string, chunker);\n\n\tif (matches.length === 0) {\n\t\treturn [];\n\t}\n\tif (!env) {\n\t\tenv = {};\n\t}\n\n\tvar commented = false;\n\n\treturn matches.map(function (match) {\n\t\tvar s = match[0];\n\t\tif (!s || commented) {\n\t\t\treturn void undefined;\n\t\t}\n\t\tif (controlRE.test(s)) {\n\t\t\treturn /** @type {ControlOperator} */ ({ op: s });\n\t\t}\n\n\t\t// Hand-written scanner/parser for Bash quoting rules:\n\t\t//\n\t\t// 1. inside single quotes, all characters are printed literally.\n\t\t// 2. inside double quotes, all characters are printed literally\n\t\t// except variables prefixed by '$' and backslashes followed by\n\t\t// either a double quote or another backslash.\n\t\t// 3. outside of any quotes, backslashes are treated as escape\n\t\t// characters and not printed (unless they are themselves escaped)\n\t\t// 4. quote context can switch mid-token if there is no whitespace\n\t\t// between the two quote contexts (e.g. all'one'\"token\" parses as\n\t\t// \"allonetoken\")\n\t\t/** @type {string | boolean} */\n\t\tvar quote = false;\n\t\tvar esc = false;\n\t\tvar out = '';\n\t\tvar isGlob = false;\n\t\t/** @type {number} */\n\t\tvar i;\n\n\t\tfunction parseEnvVar() {\n\t\t\ti += 1;\n\t\t\t/** @type {number | RegExpMatchArray | null} */\n\t\t\tvar varend;\n\t\t\t/** @type {string} */\n\t\t\tvar varname;\n\t\t\tvar char = s.charAt(i);\n\n\t\t\tif (char === '{') {\n\t\t\t\ti += 1;\n\t\t\t\tif (s.charAt(i) === '}') {\n\t\t\t\t\tthrow new Error('Bad substitution: ' + s.slice(i - 2, i + 1));\n\t\t\t\t}\n\t\t\t\tvarend = s.indexOf('}', i);\n\t\t\t\tif (varend < 0) {\n\t\t\t\t\tthrow new Error('Bad substitution: ' + s.slice(i));\n\t\t\t\t}\n\t\t\t\tvarname = s.slice(i, varend);\n\t\t\t\ti = varend;\n\t\t\t} else if ((/[*@#?$!_-]/).test(char)) {\n\t\t\t\tvarname = char;\n\t\t\t\ti += 1;\n\t\t\t} else {\n\t\t\t\tvar slicedFromI = s.slice(i);\n\t\t\t\tvarend = slicedFromI.match(/[^\\w\\d_]/);\n\t\t\t\tif (!varend) {\n\t\t\t\t\tvarname = slicedFromI;\n\t\t\t\t\ti = s.length;\n\t\t\t\t} else {\n\t\t\t\t\tvarname = slicedFromI.slice(0, varend.index);\n\t\t\t\t\ti += /** @type {number} */ (varend.index) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn getVar(/** @type {NonNullable<typeof env>} */ (env), '', varname);\n\t\t}\n\n\t\tfor (i = 0; i < s.length; i++) {\n\t\t\tvar c = s.charAt(i);\n\t\t\tisGlob = isGlob || (!quote && (c === '*' || c === '?'));\n\t\t\tif (esc) {\n\t\t\t\tout += c;\n\t\t\t\tesc = false;\n\t\t\t} else if (quote) {\n\t\t\t\tif (c === quote) {\n\t\t\t\t\tquote = false;\n\t\t\t\t} else if (quote == SQ) {\n\t\t\t\t\tout += c;\n\t\t\t\t} else { // Double quote\n\t\t\t\t\tif (c === BS) {\n\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\tc = s.charAt(i);\n\t\t\t\t\t\tif (c === DQ || c === BS || c === DS) {\n\t\t\t\t\t\t\tout += c;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tout += BS + c;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (c === DS) {\n\t\t\t\t\t\tout += parseEnvVar();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tout += c;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (c === DQ || c === SQ) {\n\t\t\t\tquote = c;\n\t\t\t} else if (controlRE.test(c)) {\n\t\t\t\treturn /** @type {ControlOperator} */ ({ op: s });\n\t\t\t} else if (hash.test(c)) {\n\t\t\t\tcommented = true;\n\t\t\t\tvar commentObj = { comment: string.slice(match.index + i + 1) };\n\t\t\t\tif (out.length) {\n\t\t\t\t\treturn /** @type {const} */ ([out, commentObj]);\n\t\t\t\t}\n\t\t\t\treturn /** @type {const} */ ([commentObj]);\n\t\t\t} else if (c === BS) {\n\t\t\t\tesc = true;\n\t\t\t} else if (c === DS) {\n\t\t\t\tout += parseEnvVar();\n\t\t\t} else {\n\t\t\t\tout += c;\n\t\t\t}\n\t\t}\n\n\t\tif (isGlob) {\n\t\t\treturn /** @type {GlobPattern} */ ({ op: 'glob', pattern: out });\n\t\t}\n\n\t\treturn out;\n\t}).reduce(function (prev, arg) { // finalize parsed arguments\n\t\tif (typeof arg === 'undefined') {\n\t\t\treturn prev;\n\t\t}\n\t\t/** @type {ParseEntry[]} */ ([]).concat(arg).forEach(function (entry) {\n\t\t\tprev[prev.length] = entry;\n\t\t});\n\t\treturn prev;\n\t}, /** @type {ParseEntry[]} */ ([]));\n}\n\n/** @type {import('./parse')} */\nmodule.exports = function parse(s, env, opts) {\n\tvar mapped = parseInternal(s, env, opts);\n\tif (typeof env !== 'function') {\n\t\treturn mapped;\n\t}\n\treturn mapped.reduce(function (acc, s) {\n\t\tif (typeof s === 'object') {\n\t\t\tacc[acc.length] = s;\n\t\t\treturn acc;\n\t\t}\n\t\tvar xs = s.split(RegExp('(' + TOKEN + '.*?' + TOKEN + ')', 'g'));\n\t\tif (xs.length === 1) {\n\t\t\tacc[acc.length] = xs[0];\n\t\t\treturn acc;\n\t\t}\n\t\txs.filter(Boolean).forEach(function (x) {\n\t\t\tacc[acc.length] = startsWithToken.test(x)\n\t\t\t\t? JSON.parse(x.split(TOKEN)[1])\n\t\t\t\t: x;\n\t\t});\n\t\treturn acc;\n\t}, /** @type {ParseEntry[]} */ ([]));\n};\n","'use strict';\n\nexports.quote = require('./quote');\nexports.parse = require('./parse');\n","import { parse } from \"shell-quote\";\n\nconst WRAPPER_SEQUENCES = [\n [\"pnpm\", \"exec\"],\n [\"pnpm\", \"dlx\"],\n [\"yarn\", \"dlx\"],\n];\n\nconst WRAPPER_SINGLE = new Set([\"bunx\", \"node\", \"npx\", \"yarn\"]);\n\nexport function bin(name: string) {\n return (command: string): boolean => {\n let tokens = parse(command).filter(\n (t): t is string => typeof t === \"string\",\n );\n\n while (tokens[0] === \"cross-env\" || /^[A-Z_]\\w*=/i.test(tokens[0] ?? \"\")) {\n tokens = tokens.slice(1);\n }\n\n ({ remaining: tokens } = stripWrappers(tokens));\n\n let index = 0;\n\n while (tokens.slice(index, index + 1)[0]?.startsWith(\"-\")) {\n index++;\n }\n\n const candidate = tokens.slice(index, index + 1)[0];\n return candidate !== undefined && toBinaryName(candidate) === name;\n };\n}\n\nfunction stripWrappers(tokens: string[]): { remaining: string[] } {\n let remaining = tokens;\n let isChanged = true;\n\n while (isChanged) {\n isChanged = false;\n\n const seq = WRAPPER_SEQUENCES.find((w) => {\n const slice = remaining.slice(0, w.length);\n return (\n slice.length === w.length &&\n slice.every((t, index_) => t === w.slice(index_, index_ + 1)[0])\n );\n });\n if (seq) {\n remaining = remaining.slice(seq.length);\n isChanged = true;\n } else if (WRAPPER_SINGLE.has(remaining[0] ?? \"\")) {\n remaining = remaining.slice(1);\n isChanged = true;\n }\n }\n\n return { remaining };\n}\n\nfunction toBinaryName(token: string): string {\n if (token.startsWith(\"@\")) {\n const atIndexes = Array.from(token.matchAll(/@/g), (m) => m.index);\n\n if (atIndexes.length >= 2) {\n return token.slice(0, atIndexes[1] ?? token.length);\n }\n\n return token;\n }\n\n const basename = token.split(\"/\").pop() ?? token;\n const atIndex = basename.lastIndexOf(\"@\");\n\n if (atIndex > 0) {\n return basename.slice(0, atIndex);\n }\n\n return basename;\n}\n"],"x_google_ignoreList":[0,1,2],"mappings":";;;;;CAKA,IAAI,MAA4B;EAC/B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACA,IAAI,mBAAmB;CACvB,IAAI,qBAAqB;;CAGzB,OAAO,UAAU,SAAS,MAAM,IAAI;EACnC,OAAO,GAAG,IAAI,SAAU,GAAG;GAC1B,IAAI,MAAM,IACT,OAA6B;GAE9B,IAAI,KAAK,OAAO,MAAM,UAAU;IAC/B,IAAI,QAAQ,KAAK,EAAE,OAAO,QAAQ;KACjC,IAAI,OAAO,EAAE,YAAY,UACxB,MAAM,IAAI,UAAU,wCAAwC;KAE7D,IAAI,iBAAiB,KAAK,EAAE,OAAO,GAClC,MAAM,IAAI,UAAU,kDAAkD;KAEvE,OAAO,EAAE,QAAQ,QAAQ,oBAAoB,MAAM;IACpD;IACA,IAAI,QAAQ,KAAK,OAAO,EAAE,OAAO,UAAU;KAC1C,IAAI,IAAI,QAAQ,EAAE,EAAE,IAAI,GACvB,MAAM,IAAI,UAAU,yBAAyB,KAAK,UAAU,EAAE,EAAE,CAAC;KAElE,OAAO,EAAE,GAAG,QAAQ,WAAW,MAAM;IACtC;IACA,IAAI,aAAa,KAAK,OAAO,EAAE,YAAY,UAAU;KACpD,IAAI,iBAAiB,KAAK,EAAE,OAAO,GAClC,MAAM,IAAI,UAAU,6CAA6C;KAElE,OAAO,MAAM,EAAE;IAChB;IACA,MAA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,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@udohjeremiah/moniq",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Policy-driven workspace linter for JavaScript/TypeScript monorepos",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Udoh Jeremiah",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist/"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"bin": {
|
|
21
|
+
"moniq": "./dist/cli.js"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=24"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/udohjeremiah/moniq.git"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"workspace",
|
|
32
|
+
"monorepo",
|
|
33
|
+
"Turborepo",
|
|
34
|
+
"Nx",
|
|
35
|
+
"cli",
|
|
36
|
+
"policy",
|
|
37
|
+
"linter"
|
|
38
|
+
],
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/udohjeremiah/moniq/issues"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/udohjeremiah/moniq#readme",
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^26.1.1",
|
|
45
|
+
"eslint": "^10.6.0",
|
|
46
|
+
"shell-quote": "^1.9.0",
|
|
47
|
+
"tsdown": "^0.22.4",
|
|
48
|
+
"vitest": "^4.1.10",
|
|
49
|
+
"@moniq/config": "0.0.0",
|
|
50
|
+
"@moniq/cli": "0.0.0",
|
|
51
|
+
"@moniq/eslint-config": "0.0.0",
|
|
52
|
+
"@moniq/typescript-config": "0.0.0"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"dev": "tsdown --watch",
|
|
56
|
+
"build": "tsdown",
|
|
57
|
+
"lint": "eslint . --max-warnings=0",
|
|
58
|
+
"lint:fix": "eslint --fix .",
|
|
59
|
+
"check-types": "tsc --noEmit",
|
|
60
|
+
"test": "vitest run"
|
|
61
|
+
}
|
|
62
|
+
}
|