@storm-software/linting-tools 1.46.4 → 1.46.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/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ ## 1.46.6 (2024-04-08)
2
+
3
+
4
+ ### 🩹 Fixes
5
+
6
+ - **build-tools:** Resolved issue with module types used in build ([50a368d3](https://github.com/storm-software/storm-ops/commit/50a368d3))
7
+
8
+
9
+ ### ❤️ Thank You
10
+
11
+ - Patrick Sullivan
12
+
13
+ ## 1.46.5 (2024-04-08)
14
+
15
+
16
+ ### 🩹 Fixes
17
+
18
+ - **build-tools:** Resolved issue with duplicate require definition ([63aa1d16](https://github.com/storm-software/storm-ops/commit/63aa1d16))
19
+
20
+
21
+ ### ❤️ Thank You
22
+
23
+ - Patrick Sullivan
24
+
1
25
  ## 1.46.4 (2024-04-08)
2
26
 
3
27
  ### 🩹 Fixes
package/README.md CHANGED
@@ -16,7 +16,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
16
16
 
17
17
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
18
18
 
19
- [![Version](https://img.shields.io/badge/version-1.46.2-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
19
+ [![Version](https://img.shields.io/badge/version-1.46.5-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
20
20
  [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
21
21
 
22
22
  > [!IMPORTANT]
package/bin/lint.js CHANGED
@@ -4513,7 +4513,7 @@ var require_lib3 = __commonJS({
4513
4513
  return _chalk.default.level > 0 || options.forceColor;
4514
4514
  }
4515
4515
  var chalkWithForcedColor = void 0;
4516
- function getChalk(forceColor) {
4516
+ function getChalk2(forceColor) {
4517
4517
  if (forceColor) {
4518
4518
  var _chalkWithForcedColor;
4519
4519
  (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({
@@ -4525,11 +4525,11 @@ var require_lib3 = __commonJS({
4525
4525
  return _chalk.default;
4526
4526
  }
4527
4527
  {
4528
- exports.getChalk = (options) => getChalk(options.forceColor);
4528
+ exports.getChalk = (options) => getChalk2(options.forceColor);
4529
4529
  }
4530
4530
  function highlight(code, options = {}) {
4531
4531
  if (code !== "" && shouldHighlight(options)) {
4532
- const defs = getDefs(getChalk(options.forceColor));
4532
+ const defs = getDefs(getChalk2(options.forceColor));
4533
4533
  return highlightTokens(defs, code);
4534
4534
  } else {
4535
4535
  return code;
@@ -4574,7 +4574,7 @@ var require_lib4 = __commonJS({
4574
4574
  return n.default = e, t && t.set(e, n), n;
4575
4575
  }
4576
4576
  var chalkWithForcedColor = void 0;
4577
- function getChalk(forceColor) {
4577
+ function getChalk2(forceColor) {
4578
4578
  if (forceColor) {
4579
4579
  var _chalkWithForcedColor;
4580
4580
  (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({
@@ -4652,7 +4652,7 @@ var require_lib4 = __commonJS({
4652
4652
  }
4653
4653
  function codeFrameColumns2(rawLines, loc, opts = {}) {
4654
4654
  const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
4655
- const chalk8 = getChalk(opts.forceColor);
4655
+ const chalk8 = getChalk2(opts.forceColor);
4656
4656
  const defs = getDefs(chalk8);
4657
4657
  const maybeHighlight = (chalkFn, string) => {
4658
4658
  return highlighted ? chalkFn(string) : string;
@@ -294706,7 +294706,7 @@ function dependenciesToMismatchSummary(dependencies) {
294706
294706
  throw new Error("No mismatching versions to output.");
294707
294707
  }
294708
294708
  const tables = mismatchingDependencyVersions.map((object) => {
294709
- const headers = [import_chalk7.default.bold(object.dependency), "Usages", "Packages"];
294709
+ const headers = [import_chalk8.default.bold(object.dependency), "Usages", "Packages"];
294710
294710
  const usageCounts = object.versions.map((versionObject) => versionObject.packages.length);
294711
294711
  const latestUsageCount = Math.max(...usageCounts);
294712
294712
  const hasMultipleUsageCounts = !usageCounts.every((count3) => count3 === latestUsageCount);
@@ -294715,9 +294715,9 @@ function dependenciesToMismatchSummary(dependencies) {
294715
294715
  const packageNames = versionObject.packages.map((package_) => package_.name);
294716
294716
  const packageListSentence = usageCount > 3 ? `${packageNames.slice(0, 3).join(", ")}, and ${usageCount - 3} other${usageCount - 3 === 1 ? "" : "s"}` : packageNames.join(", ");
294717
294717
  return [
294718
- import_chalk7.default.redBright(versionObject.version),
294718
+ import_chalk8.default.redBright(versionObject.version),
294719
294719
  // Bold the usage count if it's the latest, as long as it's not the only usage count present.
294720
- usageCount === latestUsageCount && hasMultipleUsageCounts ? import_chalk7.default.bold(usageCount) : usageCount,
294720
+ usageCount === latestUsageCount && hasMultipleUsageCounts ? import_chalk8.default.bold(usageCount) : usageCount,
294721
294721
  packageListSentence
294722
294722
  ];
294723
294723
  });
@@ -294747,10 +294747,10 @@ function dependenciesToFixedSummary(dependencies) {
294747
294747
  }).sort((a, b) => a.dependency.localeCompare(b.dependency));
294748
294748
  return `Fixed versions for ${dependenciesAndFixedVersions.length} ${dependenciesAndFixedVersions.length === 1 ? "dependency" : "dependencies"}: ${dependenciesAndFixedVersions.map((object) => `${object.dependency}@${object.version}`).join(", ")}`;
294749
294749
  }
294750
- var import_chalk7, import_table;
294750
+ var import_chalk8, import_table;
294751
294751
  var init_output = __esm({
294752
294752
  "node_modules/.pnpm/check-dependency-version-consistency@4.1.0/node_modules/check-dependency-version-consistency/dist/lib/output.js"() {
294753
- import_chalk7 = __toESM(require_source(), 1);
294753
+ import_chalk8 = __toESM(require_source(), 1);
294754
294754
  init_semver();
294755
294755
  import_table = __toESM(require_src5(), 1);
294756
294756
  }
@@ -300741,7 +300741,7 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
300741
300741
  return LogLevelLabel.INFO;
300742
300742
  };
300743
300743
 
300744
- // packages/config-tools/src/utilities/logger.ts
300744
+ // packages/config-tools/src/utilities/chalk.ts
300745
300745
  var import_chalk = __toESM(require_source());
300746
300746
  var chalkDefault = {
300747
300747
  hex: (_) => (message) => message,
@@ -300757,11 +300757,17 @@ var chalkDefault = {
300757
300757
  whiteBright: (message) => message
300758
300758
  }
300759
300759
  };
300760
- var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
300760
+ var getChalk = () => {
300761
300761
  let _chalk = import_chalk.default;
300762
300762
  if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright) {
300763
300763
  _chalk = chalkDefault;
300764
300764
  }
300765
+ return _chalk;
300766
+ };
300767
+
300768
+ // packages/config-tools/src/utilities/logger.ts
300769
+ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
300770
+ let _chalk = getChalk();
300765
300771
  const configLogLevel = config.logLevel ?? process.env?.STORM_LOG_LEVEL ?? LogLevelLabel.INFO;
300766
300772
  if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
300767
300773
  return (_) => {
@@ -320808,12 +320814,12 @@ async function getDictionary(settings) {
320808
320814
  }
320809
320815
 
320810
320816
  // node_modules/.pnpm/cspell@8.6.1/node_modules/cspell/dist/esm/cli-reporter.mjs
320811
- var import_chalk3 = __toESM(require_source(), 1);
320817
+ var import_chalk4 = __toESM(require_source(), 1);
320812
320818
  import * as path13 from "node:path";
320813
320819
  import { format as format3 } from "node:util";
320814
320820
 
320815
320821
  // node_modules/.pnpm/chalk-template@1.1.0/node_modules/chalk-template/index.js
320816
- var import_chalk2 = __toESM(require_source(), 1);
320822
+ var import_chalk3 = __toESM(require_source(), 1);
320817
320823
  var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.))|(?:{(~)?(#?[\w:]+(?:\([^)]*\))?(?:\.#?[\w:]+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(})|((?:.|[\r\n\f])+?)/gi;
320818
320824
  var STYLE_REGEX = /(?:^|\.)(?:(?:(\w+)(?:\(([^)]*)\))?)|(?:#(?=[:a-fA-F\d]{2,})([a-fA-F\d]{6})?(?::([a-fA-F\d]{6}))?))/g;
320819
320825
  var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
@@ -320956,9 +320962,9 @@ function makeChalkTemplate(template3) {
320956
320962
  }
320957
320963
  return chalkTemplate;
320958
320964
  }
320959
- var template = makeTemplate(import_chalk2.default);
320965
+ var template = makeTemplate(import_chalk3.default);
320960
320966
  var chalk_template_default = makeChalkTemplate(template);
320961
- var templateStderr = makeTemplate(import_chalk2.chalkStderr);
320967
+ var templateStderr = makeTemplate(import_chalk3.chalkStderr);
320962
320968
  var chalkTemplateStderr = makeChalkTemplate(templateStderr);
320963
320969
 
320964
320970
  // node_modules/.pnpm/cspell@8.6.1/node_modules/cspell/dist/esm/util/util.mjs
@@ -320990,7 +320996,7 @@ var templateIssueWithSuggestions = `{green $filename}:{yellow $row:$col} - $mess
320990
320996
  var templateIssueWithContext = `{green $filename}:{yellow $row:$col} $padRowCol- $message ({red $text})$padContext -- {gray $contextLeft}{red {underline $text}}{gray $contextRight}`;
320991
320997
  var templateIssueWithContextWithSuggestions = `{green $filename}:{yellow $row:$col} $padRowCol- $message ({red $text})$padContext -- {gray $contextLeft}{red {underline $text}}{gray $contextRight}
320992
320998
  Suggestions: {yellow [$suggestions]}`;
320993
- var templateIssueLegacy = `${import_chalk3.default.green("$filename")}[$row, $col]: $message: ${import_chalk3.default.red("$text")}`;
320999
+ var templateIssueLegacy = `${import_chalk4.default.green("$filename")}[$row, $col]: $message: ${import_chalk4.default.red("$text")}`;
320994
321000
  var templateIssueWordsOnly = "$text";
320995
321001
  function genIssueEmitter(template3, uniqueIssues, reportedIssuesCollection) {
320996
321002
  const uniqueFilter = uniqueIssues ? uniqueFilterFnGenerator2((issue) => issue.text) : () => true;
@@ -321037,21 +321043,21 @@ function reportProgressFileBegin(p, cwd) {
321037
321043
  const fc = "" + p.fileCount;
321038
321044
  const fn = (" ".repeat(fc.length) + p.fileNum).slice(-fc.length);
321039
321045
  const idx2 = fn + "/" + fc;
321040
- const filename = import_chalk3.default.gray(relativeFilename(p.filename, cwd));
321046
+ const filename = import_chalk4.default.gray(relativeFilename(p.filename, cwd));
321041
321047
  process.stderr.write(`\r${idx2} ${filename}`);
321042
321048
  }
321043
321049
  function reportProgressFileComplete(p) {
321044
321050
  const time = reportTime(p.elapsedTimeMs, !!p.cached);
321045
321051
  const skipped = p.processed === false ? " skipped" : "";
321046
- const hasErrors = p.numErrors ? import_chalk3.default.red` X` : "";
321052
+ const hasErrors = p.numErrors ? import_chalk4.default.red` X` : "";
321047
321053
  console.error(` ${time}${skipped}${hasErrors}`);
321048
321054
  }
321049
321055
  function reportTime(elapsedTimeMs, cached) {
321050
321056
  if (cached)
321051
- return import_chalk3.default.green("cached");
321057
+ return import_chalk4.default.green("cached");
321052
321058
  if (elapsedTimeMs === void 0)
321053
321059
  return "-";
321054
- const color4 = elapsedTimeMs < 1e3 ? import_chalk3.default.white : elapsedTimeMs < 2e3 ? import_chalk3.default.yellow : import_chalk3.default.redBright;
321060
+ const color4 = elapsedTimeMs < 1e3 ? import_chalk4.default.white : elapsedTimeMs < 2e3 ? import_chalk4.default.yellow : import_chalk4.default.redBright;
321055
321061
  return color4(elapsedTimeMs.toFixed(2) + "ms");
321056
321062
  }
321057
321063
  function getReporter(options, config) {
@@ -321059,9 +321065,9 @@ function getReporter(options, config) {
321059
321065
  const issueTemplate = options.wordsOnly ? templateIssueWordsOnly : options.legacy ? templateIssueLegacy : options.showContext ? options.showSuggestions ? templateIssueWithContextWithSuggestions : templateIssueWithContext : options.showSuggestions ? templateIssueWithSuggestions : options.showSuggestions === false ? templateIssueNoFix : templateIssue;
321060
321066
  const { fileGlobs, silent, summary, issues, progress, verbose, debug: debug14 } = options;
321061
321067
  const emitters = {
321062
- Debug: !silent && debug14 ? (s) => console.info(import_chalk3.default.cyan(s)) : nullEmitter,
321063
- Info: !silent && verbose ? (s) => console.info(import_chalk3.default.yellow(s)) : nullEmitter,
321064
- Warning: (s) => console.info(import_chalk3.default.yellow(s))
321068
+ Debug: !silent && debug14 ? (s) => console.info(import_chalk4.default.cyan(s)) : nullEmitter,
321069
+ Info: !silent && verbose ? (s) => console.info(import_chalk4.default.yellow(s)) : nullEmitter,
321070
+ Warning: (s) => console.info(import_chalk4.default.yellow(s))
321065
321071
  };
321066
321072
  function infoEmitter(message, msgType) {
321067
321073
  emitters[msgType]?.(message);
@@ -321082,7 +321088,7 @@ function getReporter(options, config) {
321082
321088
  if (isSpellingDictionaryLoadError(error2)) {
321083
321089
  error2 = error2.cause;
321084
321090
  }
321085
- const errorText = format3(import_chalk3.default.red(message), error2.toString());
321091
+ const errorText = format3(import_chalk4.default.red(message), error2.toString());
321086
321092
  errorCollection?.push(errorText);
321087
321093
  console.error(errorText);
321088
321094
  }
@@ -321153,7 +321159,7 @@ function formatIssue(templateStr, issue, maxIssueTextWidth) {
321153
321159
  }
321154
321160
  function formatSuggestions(issue) {
321155
321161
  if (issue.suggestionsEx) {
321156
- return issue.suggestionsEx.map((sug) => sug.isPreferred ? import_chalk3.default.italic(import_chalk3.default.bold(sug.wordAdjustedToMatchCase || sug.word)) + "*" : sug.wordAdjustedToMatchCase || sug.word).join(", ");
321162
+ return issue.suggestionsEx.map((sug) => sug.isPreferred ? import_chalk4.default.italic(import_chalk4.default.bold(sug.wordAdjustedToMatchCase || sug.word)) + "*" : sug.wordAdjustedToMatchCase || sug.word).join(", ");
321157
321163
  }
321158
321164
  if (issue.suggestions) {
321159
321165
  return issue.suggestions.join(", ");
@@ -321166,7 +321172,7 @@ function formatQuickFix(issue) {
321166
321172
  const preferred = issue.suggestionsEx.filter((sug) => sug.isPreferred).map((sug) => sug.wordAdjustedToMatchCase || sug.word);
321167
321173
  if (!preferred.length)
321168
321174
  return "";
321169
- const fixes = preferred.map((w) => import_chalk3.default.italic(import_chalk3.default.yellow(w)));
321175
+ const fixes = preferred.map((w) => import_chalk4.default.italic(import_chalk4.default.yellow(w)));
321170
321176
  return `fix: (${fixes.join(", ")})`;
321171
321177
  }
321172
321178
  var TS = class extends Array {
@@ -321219,7 +321225,7 @@ function parseFeatureFlags(flags, featureFlags = getFeatureFlags()) {
321219
321225
  }
321220
321226
 
321221
321227
  // node_modules/.pnpm/cspell@8.6.1/node_modules/cspell/dist/esm/lint/lint.mjs
321222
- var import_chalk4 = __toESM(require_source(), 1);
321228
+ var import_chalk5 = __toESM(require_source(), 1);
321223
321229
 
321224
321230
  // node_modules/.pnpm/cspell-gitignore@8.6.1/node_modules/cspell-gitignore/dist/GitIgnore.js
321225
321231
  import * as path17 from "path";
@@ -322606,7 +322612,7 @@ Options:
322606
322612
  }
322607
322613
  }
322608
322614
  function checkGlobs(globs, reporter2) {
322609
- globs.filter((g) => g.startsWith("'") || g.endsWith("'")).map((glob3) => import_chalk4.default.yellow(glob3)).forEach((glob3) => reporter2.error("Linter", new CheckFailed(`Glob starting or ending with ' (single quote) is not likely to match any files: ${glob3}.`)));
322615
+ globs.filter((g) => g.startsWith("'") || g.endsWith("'")).map((glob3) => import_chalk5.default.yellow(glob3)).forEach((glob3) => reporter2.error("Linter", new CheckFailed(`Glob starting or ending with ' (single quote) is not likely to match any files: ${glob3}.`)));
322610
322616
  }
322611
322617
  async function determineGlobs(configInfo, cfg) {
322612
322618
  const useGitignore = cfg.options.gitignore ?? configInfo.config.useGitignore ?? false;
@@ -344053,7 +344059,7 @@ var MULTIPLE_DEPENDENCY_TYPES_default = makeCheck({
344053
344059
  });
344054
344060
 
344055
344061
  // node_modules/.pnpm/@manypkg+cli@0.21.3/node_modules/@manypkg/cli/src/checks/ROOT_HAS_DEV_DEPENDENCIES.ts
344056
- var import_chalk5 = __toESM(require_source());
344062
+ var import_chalk6 = __toESM(require_source());
344057
344063
  var ROOT_HAS_DEV_DEPENDENCIES_default = makeCheck({
344058
344064
  type: "root",
344059
344065
  validate: (rootWorkspace) => {
@@ -344070,11 +344076,11 @@ var ROOT_HAS_DEV_DEPENDENCIES_default = makeCheck({
344070
344076
  delete error2.workspace.packageJson.devDependencies;
344071
344077
  },
344072
344078
  print: () => {
344073
- return `the root package.json contains ${import_chalk5.default.yellow(
344079
+ return `the root package.json contains ${import_chalk6.default.yellow(
344074
344080
  "devDependencies"
344075
- )}, this is disallowed as ${import_chalk5.default.yellow(
344081
+ )}, this is disallowed as ${import_chalk6.default.yellow(
344076
344082
  "devDependencies"
344077
- )} vs ${import_chalk5.default.green(
344083
+ )} vs ${import_chalk6.default.green(
344078
344084
  "dependencies"
344079
344085
  )} in a private package does not affect anything and creates confusion.`;
344080
344086
  }
@@ -344273,13 +344279,13 @@ var import_get_packages2 = __toESM(require_manypkg_get_packages_cjs());
344273
344279
  var import_spawndamnit2 = __toESM(require_spawndamnit());
344274
344280
 
344275
344281
  // node_modules/.pnpm/@manypkg+cli@0.21.3/node_modules/@manypkg/cli/src/logger.ts
344276
- var import_chalk6 = __toESM(require_source());
344282
+ var import_chalk7 = __toESM(require_source());
344277
344283
  import util2 from "util";
344278
344284
  function format6(args, messageType, scope) {
344279
344285
  let prefix = {
344280
- error: import_chalk6.default.red("error"),
344281
- success: import_chalk6.default.green("success"),
344282
- info: import_chalk6.default.cyan("info")
344286
+ error: import_chalk7.default.red("error"),
344287
+ success: import_chalk7.default.green("success"),
344288
+ info: import_chalk7.default.cyan("info")
344283
344289
  }[messageType];
344284
344290
  let fullPrefix = "\u2614\uFE0F " + prefix + (scope === void 0 ? "" : " " + scope);
344285
344291
  return fullPrefix + util2.format("", ...args).split("\n").join("\n" + fullPrefix + " ");
@@ -344496,7 +344502,8 @@ var Queue = class {
344496
344502
  }
344497
344503
  };
344498
344504
 
344499
- // node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
344505
+ // node_modules/.pnpm/p-limit@5.0.0/node_modules/p-limit/index.js
344506
+ import { AsyncResource } from "async_hooks";
344500
344507
  function pLimit3(concurrency) {
344501
344508
  if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
344502
344509
  throw new TypeError("Expected `concurrency` to be a number from 1 and up");
@@ -344509,9 +344516,9 @@ function pLimit3(concurrency) {
344509
344516
  queue2.dequeue()();
344510
344517
  }
344511
344518
  };
344512
- const run = async (fn, resolve12, args) => {
344519
+ const run = async (function_, resolve12, arguments_) => {
344513
344520
  activeCount++;
344514
- const result = (async () => fn(...args))();
344521
+ const result = (async () => function_(...arguments_))();
344515
344522
  resolve12(result);
344516
344523
  try {
344517
344524
  await result;
@@ -344519,8 +344526,10 @@ function pLimit3(concurrency) {
344519
344526
  }
344520
344527
  next();
344521
344528
  };
344522
- const enqueue = (fn, resolve12, args) => {
344523
- queue2.enqueue(run.bind(void 0, fn, resolve12, args));
344529
+ const enqueue = (function_, resolve12, arguments_) => {
344530
+ queue2.enqueue(
344531
+ AsyncResource.bind(run.bind(void 0, function_, resolve12, arguments_))
344532
+ );
344524
344533
  (async () => {
344525
344534
  await Promise.resolve();
344526
344535
  if (activeCount < concurrency && queue2.size > 0) {
@@ -344528,8 +344537,8 @@ function pLimit3(concurrency) {
344528
344537
  }
344529
344538
  })();
344530
344539
  };
344531
- const generator = (fn, ...args) => new Promise((resolve12) => {
344532
- enqueue(fn, resolve12, args);
344540
+ const generator = (function_, ...arguments_) => new Promise((resolve12) => {
344541
+ enqueue(function_, resolve12, arguments_);
344533
344542
  });
344534
344543
  Object.defineProperties(generator, {
344535
344544
  activeCount: {
@@ -344539,7 +344548,7 @@ function pLimit3(concurrency) {
344539
344548
  get: () => queue2.size
344540
344549
  },
344541
344550
  clearQueue: {
344542
- value: () => {
344551
+ value() {
344543
344552
  queue2.clear();
344544
344553
  }
344545
344554
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/linting-tools",
3
- "version": "1.46.4",
3
+ "version": "1.46.6",
4
4
  "private": false,
5
5
  "description": "⚡ A package containing various linting tools used to validate syntax, enforce design standards, and format code in a Storm workspace.",
6
6
  "keywords": [
@@ -92,7 +92,7 @@
92
92
  "dpdm": "3.14.0",
93
93
  "eslint": "9.0.0",
94
94
  "fs-extra": "11.2.0",
95
- "p-limit": "4.0.0",
95
+ "p-limit": "5.0.0",
96
96
  "rehype-parse": "9.0.0",
97
97
  "rehype-retext": "4.0.0",
98
98
  "remark-frontmatter": "5.0.0",
package/src/cli/index.js CHANGED
@@ -242795,7 +242795,7 @@ var require_lib5 = __commonJS({
242795
242795
  return _chalk.default.level > 0 || options.forceColor;
242796
242796
  }
242797
242797
  var chalkWithForcedColor = void 0;
242798
- function getChalk(forceColor) {
242798
+ function getChalk2(forceColor) {
242799
242799
  if (forceColor) {
242800
242800
  var _chalkWithForcedColor;
242801
242801
  (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({
@@ -242807,11 +242807,11 @@ var require_lib5 = __commonJS({
242807
242807
  return _chalk.default;
242808
242808
  }
242809
242809
  {
242810
- exports.getChalk = (options) => getChalk(options.forceColor);
242810
+ exports.getChalk = (options) => getChalk2(options.forceColor);
242811
242811
  }
242812
242812
  function highlight(code, options = {}) {
242813
242813
  if (code !== "" && shouldHighlight(options)) {
242814
- const defs = getDefs(getChalk(options.forceColor));
242814
+ const defs = getDefs(getChalk2(options.forceColor));
242815
242815
  return highlightTokens(defs, code);
242816
242816
  } else {
242817
242817
  return code;
@@ -242856,7 +242856,7 @@ var require_lib6 = __commonJS({
242856
242856
  return n.default = e, t && t.set(e, n), n;
242857
242857
  }
242858
242858
  var chalkWithForcedColor = void 0;
242859
- function getChalk(forceColor) {
242859
+ function getChalk2(forceColor) {
242860
242860
  if (forceColor) {
242861
242861
  var _chalkWithForcedColor;
242862
242862
  (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({
@@ -242934,7 +242934,7 @@ var require_lib6 = __commonJS({
242934
242934
  }
242935
242935
  function codeFrameColumns2(rawLines, loc, opts = {}) {
242936
242936
  const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
242937
- const chalk8 = getChalk(opts.forceColor);
242937
+ const chalk8 = getChalk2(opts.forceColor);
242938
242938
  const defs = getDefs(chalk8);
242939
242939
  const maybeHighlight = (chalkFn, string) => {
242940
242940
  return highlighted ? chalkFn(string) : string;
@@ -290566,7 +290566,7 @@ function dependenciesToMismatchSummary(dependencies) {
290566
290566
  throw new Error("No mismatching versions to output.");
290567
290567
  }
290568
290568
  const tables = mismatchingDependencyVersions.map((object) => {
290569
- const headers = [import_chalk7.default.bold(object.dependency), "Usages", "Packages"];
290569
+ const headers = [import_chalk8.default.bold(object.dependency), "Usages", "Packages"];
290570
290570
  const usageCounts = object.versions.map((versionObject) => versionObject.packages.length);
290571
290571
  const latestUsageCount = Math.max(...usageCounts);
290572
290572
  const hasMultipleUsageCounts = !usageCounts.every((count3) => count3 === latestUsageCount);
@@ -290575,9 +290575,9 @@ function dependenciesToMismatchSummary(dependencies) {
290575
290575
  const packageNames = versionObject.packages.map((package_) => package_.name);
290576
290576
  const packageListSentence = usageCount > 3 ? `${packageNames.slice(0, 3).join(", ")}, and ${usageCount - 3} other${usageCount - 3 === 1 ? "" : "s"}` : packageNames.join(", ");
290577
290577
  return [
290578
- import_chalk7.default.redBright(versionObject.version),
290578
+ import_chalk8.default.redBright(versionObject.version),
290579
290579
  // Bold the usage count if it's the latest, as long as it's not the only usage count present.
290580
- usageCount === latestUsageCount && hasMultipleUsageCounts ? import_chalk7.default.bold(usageCount) : usageCount,
290580
+ usageCount === latestUsageCount && hasMultipleUsageCounts ? import_chalk8.default.bold(usageCount) : usageCount,
290581
290581
  packageListSentence
290582
290582
  ];
290583
290583
  });
@@ -290607,10 +290607,10 @@ function dependenciesToFixedSummary(dependencies) {
290607
290607
  }).sort((a, b) => a.dependency.localeCompare(b.dependency));
290608
290608
  return `Fixed versions for ${dependenciesAndFixedVersions.length} ${dependenciesAndFixedVersions.length === 1 ? "dependency" : "dependencies"}: ${dependenciesAndFixedVersions.map((object) => `${object.dependency}@${object.version}`).join(", ")}`;
290609
290609
  }
290610
- var import_chalk7, import_table;
290610
+ var import_chalk8, import_table;
290611
290611
  var init_output = __esm({
290612
290612
  "node_modules/.pnpm/check-dependency-version-consistency@4.1.0/node_modules/check-dependency-version-consistency/dist/lib/output.js"() {
290613
- import_chalk7 = __toESM(require_source(), 1);
290613
+ import_chalk8 = __toESM(require_source(), 1);
290614
290614
  init_semver();
290615
290615
  import_table = __toESM(require_src5(), 1);
290616
290616
  }
@@ -294633,7 +294633,7 @@ var getLogLevel = (label) => {
294633
294633
  }
294634
294634
  };
294635
294635
 
294636
- // packages/config-tools/src/utilities/logger.ts
294636
+ // packages/config-tools/src/utilities/chalk.ts
294637
294637
  var import_chalk = __toESM(require_source());
294638
294638
  var chalkDefault = {
294639
294639
  hex: (_) => (message) => message,
@@ -294649,11 +294649,17 @@ var chalkDefault = {
294649
294649
  whiteBright: (message) => message
294650
294650
  }
294651
294651
  };
294652
- var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
294652
+ var getChalk = () => {
294653
294653
  let _chalk = import_chalk.default;
294654
294654
  if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright) {
294655
294655
  _chalk = chalkDefault;
294656
294656
  }
294657
+ return _chalk;
294658
+ };
294659
+
294660
+ // packages/config-tools/src/utilities/logger.ts
294661
+ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
294662
+ let _chalk = getChalk();
294657
294663
  const configLogLevel = config.logLevel ?? process.env?.STORM_LOG_LEVEL ?? LogLevelLabel.INFO;
294658
294664
  if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
294659
294665
  return (_) => {
@@ -314425,12 +314431,12 @@ async function getDictionary(settings) {
314425
314431
  }
314426
314432
 
314427
314433
  // node_modules/.pnpm/cspell@8.6.1/node_modules/cspell/dist/esm/cli-reporter.mjs
314428
- var import_chalk3 = __toESM(require_source(), 1);
314434
+ var import_chalk4 = __toESM(require_source(), 1);
314429
314435
  import * as path13 from "node:path";
314430
314436
  import { format as format3 } from "node:util";
314431
314437
 
314432
314438
  // node_modules/.pnpm/chalk-template@1.1.0/node_modules/chalk-template/index.js
314433
- var import_chalk2 = __toESM(require_source(), 1);
314439
+ var import_chalk3 = __toESM(require_source(), 1);
314434
314440
  var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.))|(?:{(~)?(#?[\w:]+(?:\([^)]*\))?(?:\.#?[\w:]+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(})|((?:.|[\r\n\f])+?)/gi;
314435
314441
  var STYLE_REGEX = /(?:^|\.)(?:(?:(\w+)(?:\(([^)]*)\))?)|(?:#(?=[:a-fA-F\d]{2,})([a-fA-F\d]{6})?(?::([a-fA-F\d]{6}))?))/g;
314436
314442
  var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
@@ -314573,9 +314579,9 @@ function makeChalkTemplate(template3) {
314573
314579
  }
314574
314580
  return chalkTemplate;
314575
314581
  }
314576
- var template = makeTemplate(import_chalk2.default);
314582
+ var template = makeTemplate(import_chalk3.default);
314577
314583
  var chalk_template_default = makeChalkTemplate(template);
314578
- var templateStderr = makeTemplate(import_chalk2.chalkStderr);
314584
+ var templateStderr = makeTemplate(import_chalk3.chalkStderr);
314579
314585
  var chalkTemplateStderr = makeChalkTemplate(templateStderr);
314580
314586
 
314581
314587
  // node_modules/.pnpm/cspell@8.6.1/node_modules/cspell/dist/esm/util/util.mjs
@@ -314607,7 +314613,7 @@ var templateIssueWithSuggestions = `{green $filename}:{yellow $row:$col} - $mess
314607
314613
  var templateIssueWithContext = `{green $filename}:{yellow $row:$col} $padRowCol- $message ({red $text})$padContext -- {gray $contextLeft}{red {underline $text}}{gray $contextRight}`;
314608
314614
  var templateIssueWithContextWithSuggestions = `{green $filename}:{yellow $row:$col} $padRowCol- $message ({red $text})$padContext -- {gray $contextLeft}{red {underline $text}}{gray $contextRight}
314609
314615
  Suggestions: {yellow [$suggestions]}`;
314610
- var templateIssueLegacy = `${import_chalk3.default.green("$filename")}[$row, $col]: $message: ${import_chalk3.default.red("$text")}`;
314616
+ var templateIssueLegacy = `${import_chalk4.default.green("$filename")}[$row, $col]: $message: ${import_chalk4.default.red("$text")}`;
314611
314617
  var templateIssueWordsOnly = "$text";
314612
314618
  function genIssueEmitter(template3, uniqueIssues, reportedIssuesCollection) {
314613
314619
  const uniqueFilter = uniqueIssues ? uniqueFilterFnGenerator2((issue) => issue.text) : () => true;
@@ -314654,21 +314660,21 @@ function reportProgressFileBegin(p, cwd) {
314654
314660
  const fc = "" + p.fileCount;
314655
314661
  const fn = (" ".repeat(fc.length) + p.fileNum).slice(-fc.length);
314656
314662
  const idx2 = fn + "/" + fc;
314657
- const filename = import_chalk3.default.gray(relativeFilename(p.filename, cwd));
314663
+ const filename = import_chalk4.default.gray(relativeFilename(p.filename, cwd));
314658
314664
  process.stderr.write(`\r${idx2} ${filename}`);
314659
314665
  }
314660
314666
  function reportProgressFileComplete(p) {
314661
314667
  const time = reportTime(p.elapsedTimeMs, !!p.cached);
314662
314668
  const skipped = p.processed === false ? " skipped" : "";
314663
- const hasErrors = p.numErrors ? import_chalk3.default.red` X` : "";
314669
+ const hasErrors = p.numErrors ? import_chalk4.default.red` X` : "";
314664
314670
  console.error(` ${time}${skipped}${hasErrors}`);
314665
314671
  }
314666
314672
  function reportTime(elapsedTimeMs, cached) {
314667
314673
  if (cached)
314668
- return import_chalk3.default.green("cached");
314674
+ return import_chalk4.default.green("cached");
314669
314675
  if (elapsedTimeMs === void 0)
314670
314676
  return "-";
314671
- const color4 = elapsedTimeMs < 1e3 ? import_chalk3.default.white : elapsedTimeMs < 2e3 ? import_chalk3.default.yellow : import_chalk3.default.redBright;
314677
+ const color4 = elapsedTimeMs < 1e3 ? import_chalk4.default.white : elapsedTimeMs < 2e3 ? import_chalk4.default.yellow : import_chalk4.default.redBright;
314672
314678
  return color4(elapsedTimeMs.toFixed(2) + "ms");
314673
314679
  }
314674
314680
  function getReporter(options, config) {
@@ -314676,9 +314682,9 @@ function getReporter(options, config) {
314676
314682
  const issueTemplate = options.wordsOnly ? templateIssueWordsOnly : options.legacy ? templateIssueLegacy : options.showContext ? options.showSuggestions ? templateIssueWithContextWithSuggestions : templateIssueWithContext : options.showSuggestions ? templateIssueWithSuggestions : options.showSuggestions === false ? templateIssueNoFix : templateIssue;
314677
314683
  const { fileGlobs, silent, summary, issues, progress, verbose, debug: debug14 } = options;
314678
314684
  const emitters = {
314679
- Debug: !silent && debug14 ? (s) => console.info(import_chalk3.default.cyan(s)) : nullEmitter,
314680
- Info: !silent && verbose ? (s) => console.info(import_chalk3.default.yellow(s)) : nullEmitter,
314681
- Warning: (s) => console.info(import_chalk3.default.yellow(s))
314685
+ Debug: !silent && debug14 ? (s) => console.info(import_chalk4.default.cyan(s)) : nullEmitter,
314686
+ Info: !silent && verbose ? (s) => console.info(import_chalk4.default.yellow(s)) : nullEmitter,
314687
+ Warning: (s) => console.info(import_chalk4.default.yellow(s))
314682
314688
  };
314683
314689
  function infoEmitter(message, msgType) {
314684
314690
  emitters[msgType]?.(message);
@@ -314699,7 +314705,7 @@ function getReporter(options, config) {
314699
314705
  if (isSpellingDictionaryLoadError(error2)) {
314700
314706
  error2 = error2.cause;
314701
314707
  }
314702
- const errorText = format3(import_chalk3.default.red(message), error2.toString());
314708
+ const errorText = format3(import_chalk4.default.red(message), error2.toString());
314703
314709
  errorCollection?.push(errorText);
314704
314710
  console.error(errorText);
314705
314711
  }
@@ -314770,7 +314776,7 @@ function formatIssue(templateStr, issue, maxIssueTextWidth) {
314770
314776
  }
314771
314777
  function formatSuggestions(issue) {
314772
314778
  if (issue.suggestionsEx) {
314773
- return issue.suggestionsEx.map((sug) => sug.isPreferred ? import_chalk3.default.italic(import_chalk3.default.bold(sug.wordAdjustedToMatchCase || sug.word)) + "*" : sug.wordAdjustedToMatchCase || sug.word).join(", ");
314779
+ return issue.suggestionsEx.map((sug) => sug.isPreferred ? import_chalk4.default.italic(import_chalk4.default.bold(sug.wordAdjustedToMatchCase || sug.word)) + "*" : sug.wordAdjustedToMatchCase || sug.word).join(", ");
314774
314780
  }
314775
314781
  if (issue.suggestions) {
314776
314782
  return issue.suggestions.join(", ");
@@ -314783,7 +314789,7 @@ function formatQuickFix(issue) {
314783
314789
  const preferred = issue.suggestionsEx.filter((sug) => sug.isPreferred).map((sug) => sug.wordAdjustedToMatchCase || sug.word);
314784
314790
  if (!preferred.length)
314785
314791
  return "";
314786
- const fixes = preferred.map((w) => import_chalk3.default.italic(import_chalk3.default.yellow(w)));
314792
+ const fixes = preferred.map((w) => import_chalk4.default.italic(import_chalk4.default.yellow(w)));
314787
314793
  return `fix: (${fixes.join(", ")})`;
314788
314794
  }
314789
314795
  var TS = class extends Array {
@@ -314836,7 +314842,7 @@ function parseFeatureFlags(flags, featureFlags = getFeatureFlags()) {
314836
314842
  }
314837
314843
 
314838
314844
  // node_modules/.pnpm/cspell@8.6.1/node_modules/cspell/dist/esm/lint/lint.mjs
314839
- var import_chalk4 = __toESM(require_source(), 1);
314845
+ var import_chalk5 = __toESM(require_source(), 1);
314840
314846
 
314841
314847
  // node_modules/.pnpm/cspell-gitignore@8.6.1/node_modules/cspell-gitignore/dist/GitIgnore.js
314842
314848
  import * as path17 from "path";
@@ -316223,7 +316229,7 @@ Options:
316223
316229
  }
316224
316230
  }
316225
316231
  function checkGlobs(globs, reporter2) {
316226
- globs.filter((g) => g.startsWith("'") || g.endsWith("'")).map((glob3) => import_chalk4.default.yellow(glob3)).forEach((glob3) => reporter2.error("Linter", new CheckFailed(`Glob starting or ending with ' (single quote) is not likely to match any files: ${glob3}.`)));
316232
+ globs.filter((g) => g.startsWith("'") || g.endsWith("'")).map((glob3) => import_chalk5.default.yellow(glob3)).forEach((glob3) => reporter2.error("Linter", new CheckFailed(`Glob starting or ending with ' (single quote) is not likely to match any files: ${glob3}.`)));
316227
316233
  }
316228
316234
  async function determineGlobs(configInfo, cfg) {
316229
316235
  const useGitignore = cfg.options.gitignore ?? configInfo.config.useGitignore ?? false;
@@ -337670,7 +337676,7 @@ var MULTIPLE_DEPENDENCY_TYPES_default = makeCheck({
337670
337676
  });
337671
337677
 
337672
337678
  // node_modules/.pnpm/@manypkg+cli@0.21.3/node_modules/@manypkg/cli/src/checks/ROOT_HAS_DEV_DEPENDENCIES.ts
337673
- var import_chalk5 = __toESM(require_source());
337679
+ var import_chalk6 = __toESM(require_source());
337674
337680
  var ROOT_HAS_DEV_DEPENDENCIES_default = makeCheck({
337675
337681
  type: "root",
337676
337682
  validate: (rootWorkspace) => {
@@ -337687,11 +337693,11 @@ var ROOT_HAS_DEV_DEPENDENCIES_default = makeCheck({
337687
337693
  delete error2.workspace.packageJson.devDependencies;
337688
337694
  },
337689
337695
  print: () => {
337690
- return `the root package.json contains ${import_chalk5.default.yellow(
337696
+ return `the root package.json contains ${import_chalk6.default.yellow(
337691
337697
  "devDependencies"
337692
- )}, this is disallowed as ${import_chalk5.default.yellow(
337698
+ )}, this is disallowed as ${import_chalk6.default.yellow(
337693
337699
  "devDependencies"
337694
- )} vs ${import_chalk5.default.green(
337700
+ )} vs ${import_chalk6.default.green(
337695
337701
  "dependencies"
337696
337702
  )} in a private package does not affect anything and creates confusion.`;
337697
337703
  }
@@ -337890,13 +337896,13 @@ var import_get_packages2 = __toESM(require_manypkg_get_packages_cjs());
337890
337896
  var import_spawndamnit2 = __toESM(require_spawndamnit());
337891
337897
 
337892
337898
  // node_modules/.pnpm/@manypkg+cli@0.21.3/node_modules/@manypkg/cli/src/logger.ts
337893
- var import_chalk6 = __toESM(require_source());
337899
+ var import_chalk7 = __toESM(require_source());
337894
337900
  import util2 from "util";
337895
337901
  function format6(args, messageType, scope) {
337896
337902
  let prefix = {
337897
- error: import_chalk6.default.red("error"),
337898
- success: import_chalk6.default.green("success"),
337899
- info: import_chalk6.default.cyan("info")
337903
+ error: import_chalk7.default.red("error"),
337904
+ success: import_chalk7.default.green("success"),
337905
+ info: import_chalk7.default.cyan("info")
337900
337906
  }[messageType];
337901
337907
  let fullPrefix = "\u2614\uFE0F " + prefix + (scope === void 0 ? "" : " " + scope);
337902
337908
  return fullPrefix + util2.format("", ...args).split("\n").join("\n" + fullPrefix + " ");
@@ -338113,7 +338119,8 @@ var Queue = class {
338113
338119
  }
338114
338120
  };
338115
338121
 
338116
- // node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
338122
+ // node_modules/.pnpm/p-limit@5.0.0/node_modules/p-limit/index.js
338123
+ import { AsyncResource } from "async_hooks";
338117
338124
  function pLimit3(concurrency) {
338118
338125
  if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
338119
338126
  throw new TypeError("Expected `concurrency` to be a number from 1 and up");
@@ -338126,9 +338133,9 @@ function pLimit3(concurrency) {
338126
338133
  queue2.dequeue()();
338127
338134
  }
338128
338135
  };
338129
- const run = async (fn, resolve12, args) => {
338136
+ const run = async (function_, resolve12, arguments_) => {
338130
338137
  activeCount++;
338131
- const result = (async () => fn(...args))();
338138
+ const result = (async () => function_(...arguments_))();
338132
338139
  resolve12(result);
338133
338140
  try {
338134
338141
  await result;
@@ -338136,8 +338143,10 @@ function pLimit3(concurrency) {
338136
338143
  }
338137
338144
  next();
338138
338145
  };
338139
- const enqueue = (fn, resolve12, args) => {
338140
- queue2.enqueue(run.bind(void 0, fn, resolve12, args));
338146
+ const enqueue = (function_, resolve12, arguments_) => {
338147
+ queue2.enqueue(
338148
+ AsyncResource.bind(run.bind(void 0, function_, resolve12, arguments_))
338149
+ );
338141
338150
  (async () => {
338142
338151
  await Promise.resolve();
338143
338152
  if (activeCount < concurrency && queue2.size > 0) {
@@ -338145,8 +338154,8 @@ function pLimit3(concurrency) {
338145
338154
  }
338146
338155
  })();
338147
338156
  };
338148
- const generator = (fn, ...args) => new Promise((resolve12) => {
338149
- enqueue(fn, resolve12, args);
338157
+ const generator = (function_, ...arguments_) => new Promise((resolve12) => {
338158
+ enqueue(function_, resolve12, arguments_);
338150
338159
  });
338151
338160
  Object.defineProperties(generator, {
338152
338161
  activeCount: {
@@ -338156,7 +338165,7 @@ function pLimit3(concurrency) {
338156
338165
  get: () => queue2.size
338157
338166
  },
338158
338167
  clearQueue: {
338159
- value: () => {
338168
+ value() {
338160
338169
  queue2.clear();
338161
338170
  }
338162
338171
  }
@@ -34589,7 +34589,8 @@ var Queue = class {
34589
34589
  }
34590
34590
  };
34591
34591
 
34592
- // node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
34592
+ // node_modules/.pnpm/p-limit@5.0.0/node_modules/p-limit/index.js
34593
+ import { AsyncResource } from "async_hooks";
34593
34594
  function pLimit3(concurrency) {
34594
34595
  if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
34595
34596
  throw new TypeError("Expected `concurrency` to be a number from 1 and up");
@@ -34602,9 +34603,9 @@ function pLimit3(concurrency) {
34602
34603
  queue.dequeue()();
34603
34604
  }
34604
34605
  };
34605
- const run = async (fn, resolve, args) => {
34606
+ const run = async (function_, resolve, arguments_) => {
34606
34607
  activeCount++;
34607
- const result = (async () => fn(...args))();
34608
+ const result = (async () => function_(...arguments_))();
34608
34609
  resolve(result);
34609
34610
  try {
34610
34611
  await result;
@@ -34612,8 +34613,10 @@ function pLimit3(concurrency) {
34612
34613
  }
34613
34614
  next();
34614
34615
  };
34615
- const enqueue = (fn, resolve, args) => {
34616
- queue.enqueue(run.bind(void 0, fn, resolve, args));
34616
+ const enqueue = (function_, resolve, arguments_) => {
34617
+ queue.enqueue(
34618
+ AsyncResource.bind(run.bind(void 0, function_, resolve, arguments_))
34619
+ );
34617
34620
  (async () => {
34618
34621
  await Promise.resolve();
34619
34622
  if (activeCount < concurrency && queue.size > 0) {
@@ -34621,8 +34624,8 @@ function pLimit3(concurrency) {
34621
34624
  }
34622
34625
  })();
34623
34626
  };
34624
- const generator = (fn, ...args) => new Promise((resolve) => {
34625
- enqueue(fn, resolve, args);
34627
+ const generator = (function_, ...arguments_) => new Promise((resolve) => {
34628
+ enqueue(function_, resolve, arguments_);
34626
34629
  });
34627
34630
  Object.defineProperties(generator, {
34628
34631
  activeCount: {
@@ -34632,7 +34635,7 @@ function pLimit3(concurrency) {
34632
34635
  get: () => queue.size
34633
34636
  },
34634
34637
  clearQueue: {
34635
- value: () => {
34638
+ value() {
34636
34639
  queue.clear();
34637
34640
  }
34638
34641
  }