headlamp 0.1.4 → 0.1.5
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/README.md +22 -24
- package/dist/cli.cjs +737 -4496
- package/dist/cli.cjs.map +4 -4
- package/dist/index.js +48 -48
- package/dist/index.js.map +3 -3
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -4,16 +4,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
-
}) : x)(function(x) {
|
|
10
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
|
-
});
|
|
13
7
|
var __esm = (fn, res) => function __init() {
|
|
14
8
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
15
9
|
};
|
|
16
|
-
var __commonJS = (cb, mod) => function
|
|
10
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
17
11
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
18
12
|
};
|
|
19
13
|
var __export = (target, all) => {
|
|
@@ -855,7 +849,6 @@ var init_fast_related = __esm({
|
|
|
855
849
|
var require_constants = __commonJS({
|
|
856
850
|
"node_modules/picomatch/lib/constants.js"(exports, module) {
|
|
857
851
|
"use strict";
|
|
858
|
-
var path10 = __require("path");
|
|
859
852
|
var WIN_SLASH = "\\\\/";
|
|
860
853
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
861
854
|
var DOT_LITERAL = "\\.";
|
|
@@ -873,6 +866,7 @@ var require_constants = __commonJS({
|
|
|
873
866
|
var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
|
|
874
867
|
var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
|
|
875
868
|
var STAR = `${QMARK}*?`;
|
|
869
|
+
var SEP = "/";
|
|
876
870
|
var POSIX_CHARS = {
|
|
877
871
|
DOT_LITERAL,
|
|
878
872
|
PLUS_LITERAL,
|
|
@@ -888,7 +882,8 @@ var require_constants = __commonJS({
|
|
|
888
882
|
NO_DOTS_SLASH,
|
|
889
883
|
QMARK_NO_DOT,
|
|
890
884
|
STAR,
|
|
891
|
-
START_ANCHOR
|
|
885
|
+
START_ANCHOR,
|
|
886
|
+
SEP
|
|
892
887
|
};
|
|
893
888
|
var WINDOWS_CHARS = {
|
|
894
889
|
...POSIX_CHARS,
|
|
@@ -902,7 +897,8 @@ var require_constants = __commonJS({
|
|
|
902
897
|
NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
|
|
903
898
|
QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
|
|
904
899
|
START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
|
|
905
|
-
END_ANCHOR: `(?:[${WIN_SLASH}]|$)
|
|
900
|
+
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
|
|
901
|
+
SEP: "\\"
|
|
906
902
|
};
|
|
907
903
|
var POSIX_REGEX_SOURCE = {
|
|
908
904
|
alnum: "a-zA-Z0-9",
|
|
@@ -932,6 +928,7 @@ var require_constants = __commonJS({
|
|
|
932
928
|
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
933
929
|
// Replace globs with equivalent patterns to reduce parsing time.
|
|
934
930
|
REPLACEMENTS: {
|
|
931
|
+
__proto__: null,
|
|
935
932
|
"***": "*",
|
|
936
933
|
"**/**": "**",
|
|
937
934
|
"**/**/**": "**"
|
|
@@ -1025,7 +1022,6 @@ var require_constants = __commonJS({
|
|
|
1025
1022
|
/* | */
|
|
1026
1023
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
1027
1024
|
/* \uFEFF */
|
|
1028
|
-
SEP: path10.sep,
|
|
1029
1025
|
/**
|
|
1030
1026
|
* Create EXTGLOB_CHARS
|
|
1031
1027
|
*/
|
|
@@ -1052,8 +1048,6 @@ var require_constants = __commonJS({
|
|
|
1052
1048
|
var require_utils = __commonJS({
|
|
1053
1049
|
"node_modules/picomatch/lib/utils.js"(exports) {
|
|
1054
1050
|
"use strict";
|
|
1055
|
-
var path10 = __require("path");
|
|
1056
|
-
var win32 = process.platform === "win32";
|
|
1057
1051
|
var {
|
|
1058
1052
|
REGEX_BACKSLASH,
|
|
1059
1053
|
REGEX_REMOVE_BACKSLASH,
|
|
@@ -1065,24 +1059,21 @@ var require_utils = __commonJS({
|
|
|
1065
1059
|
exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
|
|
1066
1060
|
exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
|
|
1067
1061
|
exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
|
|
1062
|
+
exports.isWindows = () => {
|
|
1063
|
+
if (typeof navigator !== "undefined" && navigator.platform) {
|
|
1064
|
+
const platform2 = navigator.platform.toLowerCase();
|
|
1065
|
+
return platform2 === "win32" || platform2 === "windows";
|
|
1066
|
+
}
|
|
1067
|
+
if (typeof process !== "undefined" && process.platform) {
|
|
1068
|
+
return process.platform === "win32";
|
|
1069
|
+
}
|
|
1070
|
+
return false;
|
|
1071
|
+
};
|
|
1068
1072
|
exports.removeBackslashes = (str) => {
|
|
1069
1073
|
return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
|
|
1070
1074
|
return match === "\\" ? "" : match;
|
|
1071
1075
|
});
|
|
1072
1076
|
};
|
|
1073
|
-
exports.supportsLookbehinds = () => {
|
|
1074
|
-
const segs = process.version.slice(1).split(".").map(Number);
|
|
1075
|
-
if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) {
|
|
1076
|
-
return true;
|
|
1077
|
-
}
|
|
1078
|
-
return false;
|
|
1079
|
-
};
|
|
1080
|
-
exports.isWindows = (options) => {
|
|
1081
|
-
if (options && typeof options.windows === "boolean") {
|
|
1082
|
-
return options.windows;
|
|
1083
|
-
}
|
|
1084
|
-
return win32 === true || path10.sep === "\\";
|
|
1085
|
-
};
|
|
1086
1077
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
1087
1078
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
1088
1079
|
if (idx === -1) return input;
|
|
@@ -1106,6 +1097,14 @@ var require_utils = __commonJS({
|
|
|
1106
1097
|
}
|
|
1107
1098
|
return output;
|
|
1108
1099
|
};
|
|
1100
|
+
exports.basename = (path10, { windows } = {}) => {
|
|
1101
|
+
const segs = path10.split(windows ? /[\\/]/ : "/");
|
|
1102
|
+
const last = segs[segs.length - 1];
|
|
1103
|
+
if (last === "") {
|
|
1104
|
+
return segs[segs.length - 2];
|
|
1105
|
+
}
|
|
1106
|
+
return last;
|
|
1107
|
+
};
|
|
1109
1108
|
}
|
|
1110
1109
|
});
|
|
1111
1110
|
|
|
@@ -1482,8 +1481,7 @@ var require_parse = __commonJS({
|
|
|
1482
1481
|
const bos = { type: "bos", value: "", output: opts.prepend || "" };
|
|
1483
1482
|
const tokens = [bos];
|
|
1484
1483
|
const capture = opts.capture ? "" : "?:";
|
|
1485
|
-
const
|
|
1486
|
-
const PLATFORM_CHARS = constants.globChars(win32);
|
|
1484
|
+
const PLATFORM_CHARS = constants.globChars(opts.windows);
|
|
1487
1485
|
const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
|
|
1488
1486
|
const {
|
|
1489
1487
|
DOT_LITERAL,
|
|
@@ -1586,8 +1584,8 @@ var require_parse = __commonJS({
|
|
|
1586
1584
|
}
|
|
1587
1585
|
if (tok.value || tok.output) append(tok);
|
|
1588
1586
|
if (prev && prev.type === "text" && tok.type === "text") {
|
|
1587
|
+
prev.output = (prev.output || prev.value) + tok.value;
|
|
1589
1588
|
prev.value += tok.value;
|
|
1590
|
-
prev.output = (prev.output || "") + tok.value;
|
|
1591
1589
|
return;
|
|
1592
1590
|
}
|
|
1593
1591
|
tok.prev = prev;
|
|
@@ -1923,9 +1921,6 @@ var require_parse = __commonJS({
|
|
|
1923
1921
|
if (prev && prev.type === "paren") {
|
|
1924
1922
|
const next = peek();
|
|
1925
1923
|
let output = value;
|
|
1926
|
-
if (next === "<" && !utils.supportsLookbehinds()) {
|
|
1927
|
-
throw new Error("Node.js v10 or higher is required for regex lookbehinds");
|
|
1928
|
-
}
|
|
1929
1924
|
if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
|
|
1930
1925
|
output = `\\${value}`;
|
|
1931
1926
|
}
|
|
@@ -2150,7 +2145,6 @@ var require_parse = __commonJS({
|
|
|
2150
2145
|
throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
|
|
2151
2146
|
}
|
|
2152
2147
|
input = REPLACEMENTS[input] || input;
|
|
2153
|
-
const win32 = utils.isWindows(options);
|
|
2154
2148
|
const {
|
|
2155
2149
|
DOT_LITERAL,
|
|
2156
2150
|
SLASH_LITERAL,
|
|
@@ -2161,7 +2155,7 @@ var require_parse = __commonJS({
|
|
|
2161
2155
|
NO_DOTS_SLASH,
|
|
2162
2156
|
STAR,
|
|
2163
2157
|
START_ANCHOR
|
|
2164
|
-
} = constants.globChars(
|
|
2158
|
+
} = constants.globChars(opts.windows);
|
|
2165
2159
|
const nodot = opts.dot ? NO_DOTS : NO_DOT;
|
|
2166
2160
|
const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
|
|
2167
2161
|
const capture = opts.capture ? "" : "?:";
|
|
@@ -2174,7 +2168,7 @@ var require_parse = __commonJS({
|
|
|
2174
2168
|
if (opts2.noglobstar === true) return star;
|
|
2175
2169
|
return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
|
|
2176
2170
|
};
|
|
2177
|
-
const
|
|
2171
|
+
const create = (str) => {
|
|
2178
2172
|
switch (str) {
|
|
2179
2173
|
case "*":
|
|
2180
2174
|
return `${nodot}${ONE_CHAR}${star}`;
|
|
@@ -2195,14 +2189,14 @@ var require_parse = __commonJS({
|
|
|
2195
2189
|
default: {
|
|
2196
2190
|
const match = /^(.*?)\.(\w+)$/.exec(str);
|
|
2197
2191
|
if (!match) return;
|
|
2198
|
-
const source2 =
|
|
2192
|
+
const source2 = create(match[1]);
|
|
2199
2193
|
if (!source2) return;
|
|
2200
2194
|
return source2 + DOT_LITERAL + match[2];
|
|
2201
2195
|
}
|
|
2202
2196
|
}
|
|
2203
2197
|
};
|
|
2204
2198
|
const output = utils.removePrefix(input, state);
|
|
2205
|
-
let source =
|
|
2199
|
+
let source = create(output);
|
|
2206
2200
|
if (source && opts.strictSlashes !== true) {
|
|
2207
2201
|
source += `${SLASH_LITERAL}?`;
|
|
2208
2202
|
}
|
|
@@ -2216,7 +2210,6 @@ var require_parse = __commonJS({
|
|
|
2216
2210
|
var require_picomatch = __commonJS({
|
|
2217
2211
|
"node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
2218
2212
|
"use strict";
|
|
2219
|
-
var path10 = __require("path");
|
|
2220
2213
|
var scan = require_scan();
|
|
2221
2214
|
var parse = require_parse();
|
|
2222
2215
|
var utils = require_utils();
|
|
@@ -2239,7 +2232,7 @@ var require_picomatch = __commonJS({
|
|
|
2239
2232
|
throw new TypeError("Expected pattern to be a non-empty string");
|
|
2240
2233
|
}
|
|
2241
2234
|
const opts = options || {};
|
|
2242
|
-
const posix =
|
|
2235
|
+
const posix = opts.windows;
|
|
2243
2236
|
const regex = isState ? picomatch2.compileRe(glob, options) : picomatch2.makeRe(glob, options, false, true);
|
|
2244
2237
|
const state = regex.state;
|
|
2245
2238
|
delete regex.state;
|
|
@@ -2299,9 +2292,9 @@ var require_picomatch = __commonJS({
|
|
|
2299
2292
|
}
|
|
2300
2293
|
return { isMatch: Boolean(match), match, output };
|
|
2301
2294
|
};
|
|
2302
|
-
picomatch2.matchBase = (input, glob, options
|
|
2295
|
+
picomatch2.matchBase = (input, glob, options) => {
|
|
2303
2296
|
const regex = glob instanceof RegExp ? glob : picomatch2.makeRe(glob, options);
|
|
2304
|
-
return regex.test(
|
|
2297
|
+
return regex.test(utils.basename(input));
|
|
2305
2298
|
};
|
|
2306
2299
|
picomatch2.isMatch = (str, patterns, options) => picomatch2(patterns, options)(str);
|
|
2307
2300
|
picomatch2.parse = (pattern, options) => {
|
|
@@ -2357,7 +2350,16 @@ var require_picomatch = __commonJS({
|
|
|
2357
2350
|
var require_picomatch2 = __commonJS({
|
|
2358
2351
|
"node_modules/picomatch/index.js"(exports, module) {
|
|
2359
2352
|
"use strict";
|
|
2360
|
-
|
|
2353
|
+
var pico = require_picomatch();
|
|
2354
|
+
var utils = require_utils();
|
|
2355
|
+
function picomatch2(glob, options, returnState = false) {
|
|
2356
|
+
if (options && (options.windows === null || options.windows === void 0)) {
|
|
2357
|
+
options = { ...options, windows: utils.isWindows() };
|
|
2358
|
+
}
|
|
2359
|
+
return pico(glob, options, returnState);
|
|
2360
|
+
}
|
|
2361
|
+
Object.assign(picomatch2, pico);
|
|
2362
|
+
module.exports = picomatch2;
|
|
2361
2363
|
}
|
|
2362
2364
|
});
|
|
2363
2365
|
|
|
@@ -6582,7 +6584,8 @@ import * as fsSync3 from "node:fs";
|
|
|
6582
6584
|
import { createCoverageMap as createCoverageMap2 } from "istanbul-lib-coverage";
|
|
6583
6585
|
import * as fs5 from "node:fs/promises";
|
|
6584
6586
|
import * as LibReport from "istanbul-lib-report";
|
|
6585
|
-
import
|
|
6587
|
+
import textReport from "istanbul-reports/lib/text";
|
|
6588
|
+
import textSummaryReport from "istanbul-reports/lib/text-summary";
|
|
6586
6589
|
var jestBin = "./node_modules/.bin/jest";
|
|
6587
6590
|
var babelNodeBin = "./node_modules/.bin/babel-node";
|
|
6588
6591
|
var moduleSpecifierForRequire = (
|
|
@@ -6721,10 +6724,7 @@ var emitMergedCoverage = async (ui, opts) => {
|
|
|
6721
6724
|
coverageMap: filteredMap,
|
|
6722
6725
|
defaultSummarizer: "nested"
|
|
6723
6726
|
});
|
|
6724
|
-
const reporters = ui === "jest" ? [
|
|
6725
|
-
Reports.create("text", { file: "coverage.txt" }),
|
|
6726
|
-
Reports.create("text-summary", { file: "coverage-summary.txt" })
|
|
6727
|
-
];
|
|
6727
|
+
const reporters = ui === "jest" ? [textReport({ file: "coverage.txt" })] : [textReport({ file: "coverage.txt" }), textSummaryReport({ file: "coverage-summary.txt" })];
|
|
6728
6728
|
const colorizeIstanbulLine = (lineText) => {
|
|
6729
6729
|
const separator = /^[-=\s]+$/;
|
|
6730
6730
|
if (separator.test(lineText.trim())) {
|
|
@@ -6811,7 +6811,7 @@ var emitMergedCoverage = async (ui, opts) => {
|
|
|
6811
6811
|
}
|
|
6812
6812
|
}
|
|
6813
6813
|
} else {
|
|
6814
|
-
const stdoutReporters = ui === "jest" ? [
|
|
6814
|
+
const stdoutReporters = ui === "jest" ? [textReport({})] : [textReport({}), textSummaryReport({})];
|
|
6815
6815
|
for (const reporter of stdoutReporters) {
|
|
6816
6816
|
reporter.execute(context);
|
|
6817
6817
|
}
|