@hawkeyexl/manni 2.5.1 → 2.5.2

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.
@@ -61,7 +61,7 @@ import {
61
61
  supportedExtensions,
62
62
  terminalConfirm,
63
63
  toJsonText
64
- } from "./chunk-22WVCFP4.js";
64
+ } from "./chunk-4ZDL67X6.js";
65
65
 
66
66
  // src/meta/cli.ts
67
67
  import { existsSync } from "node:fs";
@@ -1517,4 +1517,4 @@ export {
1517
1517
  reportConfig,
1518
1518
  buildProgram
1519
1519
  };
1520
- //# sourceMappingURL=chunk-KZDTVSFK.js.map
1520
+ //# sourceMappingURL=chunk-UJWQH3DJ.js.map
@@ -71,7 +71,7 @@ import {
71
71
  withValueAt,
72
72
  writeEncryptionKey,
73
73
  writeFileAtomic
74
- } from "./chunk-22WVCFP4.js";
74
+ } from "./chunk-4ZDL67X6.js";
75
75
 
76
76
  // src/meta/core/reencrypt.ts
77
77
  import { extname } from "node:path";
@@ -5315,4 +5315,4 @@ export {
5315
5315
  runKeyRotate,
5316
5316
  runKeySet
5317
5317
  };
5318
- //# sourceMappingURL=chunk-NFCH7HCA.js.map
5318
+ //# sourceMappingURL=chunk-V22X36RJ.js.map
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  readStdin,
8
8
  reportConfig,
9
9
  splitList
10
- } from "./chunk-KZDTVSFK.js";
10
+ } from "./chunk-UJWQH3DJ.js";
11
11
  import {
12
12
  CiteError,
13
13
  KeyError,
@@ -40,7 +40,7 @@ import {
40
40
  shortPin,
41
41
  shortSrc,
42
42
  spellSource
43
- } from "./chunk-NFCH7HCA.js";
43
+ } from "./chunk-V22X36RJ.js";
44
44
  import {
45
45
  COMMON_FORMAT_LIST,
46
46
  OMITTED_WHEN_CLEAN,
@@ -78,7 +78,7 @@ import {
78
78
  splitPageArgument,
79
79
  terminalConfirm,
80
80
  valeConfigPath
81
- } from "./chunk-22WVCFP4.js";
81
+ } from "./chunk-4ZDL67X6.js";
82
82
 
83
83
  // src/cli.ts
84
84
  import { Command as Command5 } from "commander";
@@ -921,6 +921,18 @@ function positiveInteger(value, flag) {
921
921
  }
922
922
  return Number(value);
923
923
  }
924
+ function parseMaxPages(value) {
925
+ if (value === false) return "uncapped";
926
+ if (value === void 0) return void 0;
927
+ return positiveInteger(value, "--max-pages");
928
+ }
929
+ function resolveMaxPages(flag, configured) {
930
+ if (flag === "uncapped") return void 0;
931
+ return flag ?? configured;
932
+ }
933
+ function resolveCrawl(flag, configured) {
934
+ return flag ?? configured ?? CHECK_DEFAULTS.crawl;
935
+ }
924
936
  function assertSeverity(value) {
925
937
  if (!isSeverity(value)) {
926
938
  throw new A11yError(`Unknown --severity "${value}". Use ${SEVERITY_LIST}.`);
@@ -933,10 +945,10 @@ function buildProgram2() {
933
945
  program.command("check").description("Crawl from the given URLs and check every page with axe-core").argument(
934
946
  "[urls...]",
935
947
  "http(s) seed URLs; falls back to a collection's url: or a11y.urls in manni.config.yaml"
936
- ).option("-f, --format <format>", `output: ${A11Y_FORMAT_LIST}`, "pretty").option("--no-crawl", "check exactly the given URLs: no sitemap, no link following").option(
948
+ ).option("-f, --format <format>", `output: ${A11Y_FORMAT_LIST}`, "pretty").option("--crawl", "crawl from the given URLs: sitemap and link following (default)").option("--no-crawl", "check exactly the given URLs: no sitemap, no link following").option(
937
949
  "--max-pages <n>",
938
950
  "cap on pages checked; the rest are reported as skipped (default: no cap)"
939
- ).option("--tags <list>", "comma-separated axe tags to restrict the rules to").option(
951
+ ).option("--no-max-pages", "check every page found, ignoring a configured maxPages").option("--tags <list>", "comma-separated axe tags to restrict the rules to").option(
940
952
  "--severity <level>",
941
953
  `minimum severity reported: ${SEVERITY_LIST}`,
942
954
  CHECK_DEFAULTS.severity
@@ -958,7 +970,7 @@ function buildProgram2() {
958
970
  throw new A11yError(`Unknown --format "${format}". Use ${A11Y_FORMAT_LIST}.`);
959
971
  }
960
972
  const severity = assertSeverity(options.severity);
961
- const maxPages = options.maxPages === void 0 ? void 0 : positiveInteger(options.maxPages, "--max-pages");
973
+ const maxPages = parseMaxPages(options.maxPages);
962
974
  const timeout = positiveInteger(options.timeout, "--timeout");
963
975
  const loaded = options.config === false ? { config: {}, source: null, collections: [] } : await loadA11yConfig(process.cwd(), options.config);
964
976
  const cfg = loaded.config;
@@ -975,9 +987,10 @@ function buildProgram2() {
975
987
  const run = await runCheck2(
976
988
  {
977
989
  urls: seeds,
978
- crawl: typed("crawl") ? options.crawl : cfg.crawl ?? CHECK_DEFAULTS.crawl,
979
- // Typed flag > config key > no cap. There is no default to fall to.
980
- maxPages: maxPages ?? cfg.maxPages,
990
+ crawl: resolveCrawl(options.crawl, cfg.crawl),
991
+ // Typed flag > config key > no cap. There is no default to fall
992
+ // to, and `--no-max-pages` is the typed way to ask for none.
993
+ maxPages: resolveMaxPages(maxPages, cfg.maxPages),
981
994
  tags: options.tags !== void 0 ? splitList2(options.tags) : cfg.tags ?? CHECK_DEFAULTS.tags,
982
995
  severity: typed("severity") ? severity : cfg.severity ?? CHECK_DEFAULTS.severity,
983
996
  timeout: typed("timeout") ? timeout : cfg.timeout ?? CHECK_DEFAULTS.timeout