headlamp 0.1.4 → 0.1.6

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/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 __require2() {
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 win32 = utils.isWindows(options);
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(win32);
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 ? "" : "?:";
@@ -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 = utils.isWindows(options);
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, posix = utils.isWindows(options)) => {
2295
+ picomatch2.matchBase = (input, glob, options) => {
2303
2296
  const regex = glob instanceof RegExp ? glob : picomatch2.makeRe(glob, options);
2304
- return regex.test(path10.basename(input));
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
- module.exports = require_picomatch();
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
 
@@ -6579,10 +6581,10 @@ init_args();
6579
6581
  import * as path9 from "node:path";
6580
6582
  import * as os2 from "node:os";
6581
6583
  import * as fsSync3 from "node:fs";
6582
- import { createCoverageMap as createCoverageMap2 } from "istanbul-lib-coverage";
6583
6584
  import * as fs5 from "node:fs/promises";
6584
6585
  import * as LibReport from "istanbul-lib-report";
6585
6586
  import * as Reports from "istanbul-reports";
6587
+ import { createCoverageMap as createCoverageMap2 } from "istanbul-lib-coverage";
6586
6588
  var jestBin = "./node_modules/.bin/jest";
6587
6589
  var babelNodeBin = "./node_modules/.bin/babel-node";
6588
6590
  var moduleSpecifierForRequire = (
@@ -6811,7 +6813,7 @@ var emitMergedCoverage = async (ui, opts) => {
6811
6813
  }
6812
6814
  }
6813
6815
  } else {
6814
- const stdoutReporters = ui === "jest" ? [Reports.create("text")] : [Reports.create("text"), Reports.create("text-summary")];
6816
+ const stdoutReporters = ui === "jest" ? [Reports.create("text", {})] : [Reports.create("text", {}), Reports.create("text-summary", {})];
6815
6817
  for (const reporter of stdoutReporters) {
6816
6818
  reporter.execute(context);
6817
6819
  }