@utilix-tech/sdk 0.92.0 → 0.94.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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  Full release notes for all Utilix surfaces (browser tools, REST API, SDKs, MCP server) live at [utilix.tech/changelog](https://utilix.tech/changelog). This file tracks just this package.
4
4
 
5
+ ## 0.94.0
6
+ - Add `buildAltSvcHeader`/`parseAltSvcHeader` (alt-svc-header-builder): build an `Alt-Svc` response header (RFC 7838) from one or more alternative services with a plain-English note per protocol-id, flagging outdated HTTP/3 draft protocol-ids, or parse an existing header back into its alternatives, including the special `clear` value.
7
+
8
+ ## 0.93.0
9
+ - Add `findDuplicateLockfileVersions`/`detectLockfileFormat` (lockfile-duplicate-version-reporter): parse an npm, yarn, or pnpm lockfile and report every package installed at more than one resolved version, with a count of install locations per version.
10
+ - Add `summarizeGitDiffStat` (git-diff-stat-summarizer): parse `git diff --stat` / `git log --stat` output into structured per-file insertion/deletion counts plus overall totals, flagging a scaled-down bar's split as approximate.
11
+
5
12
  ## 0.92.0
6
13
  - Add `buildClearSiteData`/`parseClearSiteData` (clear-site-data-header-builder): build a `Clear-Site-Data` response header from directives (cache, cookies, storage, executionContexts, or `*` for all of them), flagging redundant directives alongside the wildcard, or parse an existing header back into its directives.
7
14
  - Add `summarizeCsvColumnStats` (csv-column-stats-summarizer): parse CSV/TSV data and compute per-column null/unique counts plus min/max/mean/median/standard deviation for numeric columns, or the most common value for categorical ones.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @utilix-tech/sdk
2
2
 
3
- **735 developer utility functions for Node.js: runs locally, no API key required.**
3
+ **740 developer utility functions for Node.js: runs locally, no API key required.**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@utilix-tech/sdk?style=flat-square&color=cb3837)](https://www.npmjs.com/package/@utilix-tech/sdk)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/@utilix-tech/sdk?style=flat-square)](https://www.npmjs.com/package/@utilix-tech/sdk)
@@ -757,6 +757,21 @@ buildClearSiteData(["cache", "cookies"]);
757
757
  import { summarizeCsvColumnStats } from "@utilix-tech/sdk/data";
758
758
  summarizeCsvColumnStats("name,score\nAlice,90\nBob,80\n");
759
759
  // { rowCount: 2, columns: [{ name: "name", isNumeric: false, ... }, { name: "score", isNumeric: true, min: 80, max: 90, mean: 85, median: 85, stdDev: 5, ... }] }
760
+
761
+ // Report every package in a lockfile installed at more than one resolved version
762
+ import { findDuplicateLockfileVersions } from "@utilix-tech/sdk/code";
763
+ findDuplicateLockfileVersions('{"lockfileVersion":3,"packages":{"node_modules/lodash":{"version":"4.17.21"},"node_modules/x/node_modules/lodash":{"version":"3.10.1"}}}');
764
+ // { format: "npm", totalPackages: 1, duplicatePackages: [{ name: "lodash", versions: [{ version: "3.10.1", count: 1 }, { version: "4.17.21", count: 1 }], isDuplicate: true }], packages: [...] }
765
+
766
+ // Parse `git diff --stat` output into structured per-file insertion/deletion counts
767
+ import { summarizeGitDiffStat } from "@utilix-tech/sdk/code";
768
+ summarizeGitDiffStat(" src/foo.ts | 12 +++++-------\n 1 file changed, 5 insertions(+), 7 deletions(-)\n");
769
+ // { files: [{ file: "src/foo.ts", changes: 12, insertions: 5, deletions: 7, binary: false, approximate: false }], filesChanged: 1, totalInsertions: 5, totalDeletions: 7 }
770
+
771
+ // Build an Alt-Svc header (RFC 7838) advertising HTTP/3, or parse an existing one
772
+ import { buildAltSvcHeader, parseAltSvcHeader } from "@utilix-tech/sdk/network";
773
+ buildAltSvcHeader([{ protocolId: "h3", port: 443, maxAge: 86400 }]);
774
+ // { header: 'Alt-Svc: h3=":443"; ma=86400', headerValue: 'h3=":443"; ma=86400', entries: [{ protocolId: "h3", authority: ":443", maxAge: 86400, persist: false, note: "..." }], cleared: false, warnings: [] }
760
775
  ```
761
776
 
762
777
  ---
@@ -1076,7 +1091,7 @@ readMidiInfo(new Uint8Array(midiBytes));
1076
1091
  | `@utilix-tech/sdk/generators` | UUID v4/v7, ULID, passwords, strength check, entropy estimator, fake data, CSP nonce generator |
1077
1092
  | `@utilix-tech/sdk/time` | Date diff, timezone convert, cron parse, relative time |
1078
1093
  | `@utilix-tech/sdk/units` | Bytes, CSS px/rem, number bases, currency format, credit card/IBAN/barcode/ISBN/VIN/ISIN validation, loan calculator, EMI calculator, compound/simple interest calculators, VAT/sales tax calculator, tip/bill split calculator, break-even point calculator, Rule of 72 calculator, savings goal calculator, ROI calculator, cash denomination/till calculator, payback period calculator, CD maturity calculator, debt-to-income ratio calculator, freelancer hourly rate calculator, debt snowball/avalanche payoff planner, tax-equivalent yield calculator, mortgage discount points break-even calculator, loan prepayment penalty calculator, data transfer time / required bandwidth estimator, real rate of return (Fisher equation) calculator, sales commission calculator (flat or tiered), annuity payout calculator, semver range intersection checker |
1079
- | `@utilix-tech/sdk/network` | HTTP status codes, IP validation, country flags, geolocation URLs, HAR file parsing, User-Agent parsing, IPv6 address compress/expand, Permissions-Policy header builder, Client Hints header builder/parser, Content-Disposition header builder/parser, X-Content-Type-Options header builder/risk assessor, sitemap.xml validator, sitemap index splitter, robots.txt validator, robots.txt generator, Prefer header builder/parser (RFC 7240), Retry-After header builder/parser (RFC 9110), Priority header builder/parser (RFC 9218), WebSocket close code reference/lookup, Strict-Transport-Security (HSTS) header builder/parser, X-Robots-Tag header builder/parser, WebSocket frame opcode reference/lookup, robots meta tag builder/parser, Cookie header byte-size budget calculator |
1094
+ | `@utilix-tech/sdk/network` | HTTP status codes, IP validation, country flags, geolocation URLs, HAR file parsing, User-Agent parsing, IPv6 address compress/expand, Permissions-Policy header builder, Client Hints header builder/parser, Content-Disposition header builder/parser, X-Content-Type-Options header builder/risk assessor, sitemap.xml validator, sitemap index splitter, robots.txt validator, robots.txt generator, Prefer header builder/parser (RFC 7240), Retry-After header builder/parser (RFC 9110), Priority header builder/parser (RFC 9218), WebSocket close code reference/lookup, Strict-Transport-Security (HSTS) header builder/parser, X-Robots-Tag header builder/parser, WebSocket frame opcode reference/lookup, robots meta tag builder/parser, Cookie header byte-size budget calculator, Alt-Svc header builder/parser (RFC 7838) |
1080
1095
  | `@utilix-tech/sdk/api` | cURL build/parse, JWT decode/sign, JWKS parse, CORS headers, CSP header, TOTP/HOTP code generator, webhook HMAC signature verifier |
1081
1096
  | `@utilix-tech/sdk/code` | SQL format/minify, HTML format/minify, regex tester, GraphQL format, MIME type lookup, GitHub URL parsing, regex ReDoS detector, Conventional Commits linter, package.json exports field validator, package.json dependency range auditor, regex capture group/backreference visualizer, SVG sprite symbol extractor, ARIA role & attribute validator, database connection string parser, Markdown code fence language tag validator, SQL query parameter placeholder counter, Markdown link reference extractor, regex character class builder, Dockerfile linter, Mermaid diagram syntax validator |
1082
1097
  | `@utilix-tech/sdk/color` | Hex/RGB/HSL/HSV/CMYK convert, palette generation, contrast check |
@@ -14,6 +14,7 @@ __export(network_exports, {
14
14
  analyzeEmailHeaders: () => analyzeEmailHeaders,
15
15
  assessContentTypeRisk: () => assessContentTypeRisk,
16
16
  buildAcceptLanguage: () => buildAcceptLanguage,
17
+ buildAltSvcHeader: () => buildAltSvcHeader,
17
18
  buildCacheControl: () => buildCacheControl,
18
19
  buildClearSiteData: () => buildClearSiteData,
19
20
  buildClientHints: () => buildClientHints,
@@ -56,6 +57,7 @@ __export(network_exports, {
56
57
  lookupCloseCode: () => lookupCloseCode,
57
58
  lookupOpcode: () => lookupOpcode,
58
59
  parseAcceptLanguage: () => parseAcceptLanguage,
60
+ parseAltSvcHeader: () => parseAltSvcHeader,
59
61
  parseClearSiteData: () => parseClearSiteData,
60
62
  parseClientHintHeaders: () => parseClientHintHeaders,
61
63
  parseContentDisposition: () => parseContentDisposition,
@@ -3711,5 +3713,113 @@ function parseClearSiteData(raw) {
3711
3713
  }
3712
3714
  return buildClearSiteData(directives);
3713
3715
  }
3716
+ var ALT_SVC_DEFAULT_MAX_AGE = 86400;
3717
+ var ALT_SVC_DEPRECATED_H3_DRAFTS = /* @__PURE__ */ new Set(["h3-29", "h3-27", "h3-25", "h3-24", "h3-23", "h3-22"]);
3718
+ var ALT_SVC_PROTOCOL_NOTES = {
3719
+ "h3": "HTTP/3 over QUIC, the current protocol ID clients should be offered.",
3720
+ "h3-29": 'An outdated HTTP/3 draft version (draft-29); modern clients only match "h3".',
3721
+ "h3-27": 'An outdated HTTP/3 draft version (draft-27); modern clients only match "h3".',
3722
+ "h3-25": 'An outdated HTTP/3 draft version (draft-25); modern clients only match "h3".',
3723
+ "h2": "HTTP/2 over TLS.",
3724
+ "h2c": "HTTP/2 over cleartext TCP; rarely advertised via Alt-Svc since it needs an out-of-band upgrade rather than ALPN negotiation.",
3725
+ "http/1.1": "Plain HTTP/1.1; advertising it via Alt-Svc is unusual since it is already the universal fallback."
3726
+ };
3727
+ function buildAltSvcHeader(alternatives) {
3728
+ if (!Array.isArray(alternatives) || alternatives.length === 0) {
3729
+ return { error: "At least one alternative service is required" };
3730
+ }
3731
+ const warnings = [];
3732
+ const entries = [];
3733
+ const seen = /* @__PURE__ */ new Set();
3734
+ for (const alt of alternatives) {
3735
+ const protocolId = typeof alt.protocolId === "string" ? alt.protocolId.trim() : "";
3736
+ if (!protocolId) return { error: 'Each alternative needs a protocol-id (e.g. "h3")' };
3737
+ if (!Number.isInteger(alt.port) || alt.port < 1 || alt.port > 65535) {
3738
+ return { error: `Each alternative needs a valid port (1-65535), got ${JSON.stringify(alt.port)}` };
3739
+ }
3740
+ const host = alt.host?.trim();
3741
+ const authority = `${host ?? ""}:${alt.port}`;
3742
+ const maxAge = alt.maxAge !== void 0 ? alt.maxAge : ALT_SVC_DEFAULT_MAX_AGE;
3743
+ if (!Number.isFinite(maxAge) || maxAge < 0) return { error: "maxAge must be a non-negative number of seconds" };
3744
+ const persist = alt.persist === true;
3745
+ const dedupeKey = `${protocolId.toLowerCase()}|${authority.toLowerCase()}`;
3746
+ if (seen.has(dedupeKey)) {
3747
+ warnings.push(`duplicate alternative "${protocolId}=${JSON.stringify(authority)}" was removed`);
3748
+ continue;
3749
+ }
3750
+ seen.add(dedupeKey);
3751
+ if (maxAge === 0) warnings.push(`"${protocolId}" has ma=0, so clients should treat it as already expired`);
3752
+ if (persist && maxAge === 0) warnings.push(`"${protocolId}" sets persist=1 with ma=0, which is contradictory: the entry expires immediately`);
3753
+ if (ALT_SVC_DEPRECATED_H3_DRAFTS.has(protocolId.toLowerCase())) {
3754
+ warnings.push(`"${protocolId}" is an outdated HTTP/3 draft protocol-id; modern clients only match "h3"`);
3755
+ }
3756
+ const note = ALT_SVC_PROTOCOL_NOTES[protocolId.toLowerCase()] ?? `Advertises "${protocolId}" as an alternative protocol clients may switch to for this authority.`;
3757
+ entries.push({ protocolId, authority, maxAge, persist, note });
3758
+ }
3759
+ if (entries.length === 0) return { error: "At least one alternative service is required" };
3760
+ const headerValue = entries.map((e) => {
3761
+ let s = `${e.protocolId}="${e.authority}"; ma=${e.maxAge}`;
3762
+ if (e.persist) s += "; persist=1";
3763
+ return s;
3764
+ }).join(", ");
3765
+ return { header: `Alt-Svc: ${headerValue}`, headerValue, entries, cleared: false, warnings };
3766
+ }
3767
+ function altSvcSplitTopLevel(s, sep) {
3768
+ const out = [];
3769
+ let inQuotes = false;
3770
+ let current = "";
3771
+ for (const ch of s) {
3772
+ if (ch === '"') inQuotes = !inQuotes;
3773
+ if (ch === sep && !inQuotes) {
3774
+ out.push(current);
3775
+ current = "";
3776
+ } else {
3777
+ current += ch;
3778
+ }
3779
+ }
3780
+ out.push(current);
3781
+ return out;
3782
+ }
3783
+ function parseAltSvcHeader(raw) {
3784
+ if (!raw || raw.trim() === "") return { error: "Input is empty" };
3785
+ const withoutLabel = raw.trim().replace(/^alt-svc:\s*/i, "");
3786
+ if (withoutLabel.toLowerCase() === "clear") {
3787
+ return { header: "Alt-Svc: clear", headerValue: "clear", entries: [], cleared: true, warnings: [] };
3788
+ }
3789
+ const parts = altSvcSplitTopLevel(withoutLabel, ",");
3790
+ const alternatives = [];
3791
+ for (const part of parts) {
3792
+ const trimmedPart = part.trim();
3793
+ if (!trimmedPart) continue;
3794
+ const eq = trimmedPart.indexOf("=");
3795
+ if (eq === -1) return { error: `Could not parse alternative: "${trimmedPart}"` };
3796
+ const protocolId = trimmedPart.slice(0, eq).trim();
3797
+ const rest = trimmedPart.slice(eq + 1).trim();
3798
+ const segments = altSvcSplitTopLevel(rest, ";").map((s) => s.trim());
3799
+ const authorityMatch = segments[0]?.match(/^"(.*)"$/);
3800
+ if (!authorityMatch) return { error: `Alternative "${protocolId}" is missing a quoted authority (e.g. ":443")` };
3801
+ const authority = authorityMatch[1];
3802
+ const colonIdx = authority.lastIndexOf(":");
3803
+ if (colonIdx === -1) return { error: `Alternative "${protocolId}" has an authority with no port: "${authority}"` };
3804
+ const host = authority.slice(0, colonIdx) || void 0;
3805
+ const portStr = authority.slice(colonIdx + 1);
3806
+ const port = Number(portStr);
3807
+ if (!Number.isInteger(port) || port < 1 || port > 65535) return { error: `Alternative "${protocolId}" has an invalid port: "${portStr}"` };
3808
+ let maxAge;
3809
+ let persist = false;
3810
+ for (const seg of segments.slice(1)) {
3811
+ const sepIdx = seg.indexOf("=");
3812
+ if (sepIdx === -1) continue;
3813
+ const key = seg.slice(0, sepIdx).trim().toLowerCase();
3814
+ const value = seg.slice(sepIdx + 1).trim();
3815
+ if (key === "ma") maxAge = Number(value);
3816
+ if (key === "persist") persist = value === "1";
3817
+ }
3818
+ if (maxAge !== void 0 && !Number.isFinite(maxAge)) return { error: `Alternative "${protocolId}" has a non-numeric ma value` };
3819
+ alternatives.push({ protocolId, host, port, maxAge, persist });
3820
+ }
3821
+ if (alternatives.length === 0) return { error: "No alternative services found" };
3822
+ return buildAltSvcHeader(alternatives);
3823
+ }
3714
3824
 
3715
- export { CLIENT_HINTS, DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, PERMISSIONS_POLICY_FEATURES, REFERRER_POLICY_VALUES, STATUS_CODES, X_CONTENT_TYPE_OPTIONS_HEADER, analyzeEmailHeaders, assessContentTypeRisk, buildAcceptLanguage, buildCacheControl, buildClearSiteData, buildClientHints, buildContentDisposition, buildDnsQueryUrl, buildGeoUrl, buildHsts, buildLinkHeader, buildMapUrl, buildPermissionsPolicy, buildPreferHeader, buildPriorityHeader, buildRangeHeader, buildReferrerPolicy, buildRetryAfterHeader, buildRobotsMetaTag, buildVaryHeader, buildXContentTypeOptionsHeader, buildXRobotsTag, calculateCookieSizeBudget, checkSetCookieHeader, countryCodeToFlag, extractMultipartBoundary, formatCoordinates, formatTtl, generateRobotsTxt, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, listCloseCodes, listOpcodes, lookupCloseCode, lookupOpcode, network_exports, parseAcceptLanguage, parseClearSiteData, parseClientHintHeaders, parseContentDisposition, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseHsts, parseIpv6Address, parseMultipartFormData, parsePermissionsPolicy, parsePreferHeader, parsePriorityHeader, parseRetryAfterHeader, parseRobotsMetaTag, parseUserAgent, parseVaryHeader, parseXContentTypeOptionsHeader, parseXRobotsTag, scoreSecurityHeaders, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap };
3825
+ export { CLIENT_HINTS, DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, PERMISSIONS_POLICY_FEATURES, REFERRER_POLICY_VALUES, STATUS_CODES, X_CONTENT_TYPE_OPTIONS_HEADER, analyzeEmailHeaders, assessContentTypeRisk, buildAcceptLanguage, buildAltSvcHeader, buildCacheControl, buildClearSiteData, buildClientHints, buildContentDisposition, buildDnsQueryUrl, buildGeoUrl, buildHsts, buildLinkHeader, buildMapUrl, buildPermissionsPolicy, buildPreferHeader, buildPriorityHeader, buildRangeHeader, buildReferrerPolicy, buildRetryAfterHeader, buildRobotsMetaTag, buildVaryHeader, buildXContentTypeOptionsHeader, buildXRobotsTag, calculateCookieSizeBudget, checkSetCookieHeader, countryCodeToFlag, extractMultipartBoundary, formatCoordinates, formatTtl, generateRobotsTxt, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, listCloseCodes, listOpcodes, lookupCloseCode, lookupOpcode, network_exports, parseAcceptLanguage, parseAltSvcHeader, parseClearSiteData, parseClientHintHeaders, parseContentDisposition, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseHsts, parseIpv6Address, parseMultipartFormData, parsePermissionsPolicy, parsePreferHeader, parsePriorityHeader, parseRetryAfterHeader, parseRobotsMetaTag, parseUserAgent, parseVaryHeader, parseXContentTypeOptionsHeader, parseXRobotsTag, scoreSecurityHeaders, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap };
@@ -23,6 +23,7 @@ __export(code_exports, {
23
23
  countRules: () => countRules,
24
24
  countSqlPlaceholders: () => countSqlPlaceholders,
25
25
  detectDialect: () => detectDialect,
26
+ detectLockfileFormat: () => detectLockfileFormat,
26
27
  detectOperationType: () => detectOperationType,
27
28
  detectRedos: () => detectRedos,
28
29
  envToExport: () => envToExport,
@@ -30,6 +31,7 @@ __export(code_exports, {
30
31
  extractMarkdownFootnotes: () => extractMarkdownFootnotes,
31
32
  extractMarkdownLinkReferences: () => extractMarkdownLinkReferences,
32
33
  extractSvgSpriteSymbols: () => extractSvgSpriteSymbols,
34
+ findDuplicateLockfileVersions: () => findDuplicateLockfileVersions,
33
35
  formatCss: () => formatCss,
34
36
  formatGql: () => formatGql,
35
37
  formatHtml: () => formatHtml,
@@ -63,6 +65,7 @@ __export(code_exports, {
63
65
  searchCheatsheet: () => searchCheatsheet,
64
66
  searchEndpoints: () => searchEndpoints,
65
67
  splitStatements: () => splitStatements,
68
+ summarizeGitDiffStat: () => summarizeGitDiffStat,
66
69
  testGitignorePatterns: () => testGitignorePatterns,
67
70
  testPattern: () => testPattern,
68
71
  testRegex: () => testRegex,
@@ -4617,5 +4620,208 @@ function buildCharacterClass(options) {
4617
4620
  const pattern = `[${negate ? "^" : ""}${parts.join("")}]`;
4618
4621
  return { pattern, negate, includes };
4619
4622
  }
4623
+ function detectLockfileFormat(input) {
4624
+ const trimmed = input.trim();
4625
+ if (trimmed.startsWith("{")) return "npm";
4626
+ if (/^lockfileVersion:/m.test(trimmed) || /^packages:\s*$/m.test(trimmed)) return "pnpm";
4627
+ if (/yarn lockfile v\d/i.test(trimmed)) return "yarn";
4628
+ if (/^\s*version\s+"[^"]+"/m.test(trimmed) && /@[^\s",]+["']?\s*:?\s*$/m.test(trimmed)) return "yarn";
4629
+ return null;
4630
+ }
4631
+ function parseNpmLockfile(input) {
4632
+ const data = JSON.parse(input);
4633
+ const entries = [];
4634
+ const packages = data.packages;
4635
+ if (packages && typeof packages === "object" && !Array.isArray(packages)) {
4636
+ for (const [path, metaRaw] of Object.entries(packages)) {
4637
+ if (path === "" || !metaRaw || typeof metaRaw !== "object") continue;
4638
+ const meta = metaRaw;
4639
+ if (typeof meta.version !== "string") continue;
4640
+ const idx = path.lastIndexOf("node_modules/");
4641
+ const name = idx === -1 ? path : path.slice(idx + "node_modules/".length);
4642
+ entries.push({ name, version: meta.version });
4643
+ }
4644
+ return entries;
4645
+ }
4646
+ const dependencies = data.dependencies;
4647
+ if (dependencies && typeof dependencies === "object" && !Array.isArray(dependencies)) {
4648
+ const walk = (deps) => {
4649
+ for (const [name, metaRaw] of Object.entries(deps)) {
4650
+ if (!metaRaw || typeof metaRaw !== "object") continue;
4651
+ const meta = metaRaw;
4652
+ if (typeof meta.version === "string") entries.push({ name, version: meta.version });
4653
+ if (meta.dependencies && typeof meta.dependencies === "object") {
4654
+ walk(meta.dependencies);
4655
+ }
4656
+ }
4657
+ };
4658
+ walk(dependencies);
4659
+ }
4660
+ return entries;
4661
+ }
4662
+ function splitYarnKey(key) {
4663
+ const trimmedKey = key.trim().replace(/^"|"$/g, "");
4664
+ const idx = trimmedKey.lastIndexOf("@");
4665
+ if (idx <= 0) return null;
4666
+ return { name: trimmedKey.slice(0, idx), range: trimmedKey.slice(idx + 1) };
4667
+ }
4668
+ function parseYarnLockfile(input) {
4669
+ const entries = [];
4670
+ const blocks = input.replace(/\r\n/g, "\n").split(/\n\n+/);
4671
+ for (const block of blocks) {
4672
+ const lines = block.split("\n");
4673
+ const headerLines = [];
4674
+ let i = 0;
4675
+ while (i < lines.length && lines[i].trim() !== "" && !lines[i].startsWith(" ") && !lines[i].startsWith("#")) {
4676
+ headerLines.push(lines[i]);
4677
+ i++;
4678
+ }
4679
+ if (headerLines.length === 0) continue;
4680
+ const header = headerLines.join(" ").replace(/:\s*$/, "");
4681
+ const keys = header.split(",").map((k) => k.trim()).filter(Boolean);
4682
+ const versionLine = lines.find((l) => /^\s+version\s+"/.test(l));
4683
+ if (!versionLine) continue;
4684
+ const versionMatch = versionLine.match(/version\s+"([^"]+)"/);
4685
+ if (!versionMatch) continue;
4686
+ const version = versionMatch[1];
4687
+ const names = /* @__PURE__ */ new Set();
4688
+ for (const key of keys) {
4689
+ const split = splitYarnKey(key);
4690
+ if (split) names.add(split.name);
4691
+ }
4692
+ for (const name of names) entries.push({ name, version });
4693
+ }
4694
+ return entries;
4695
+ }
4696
+ function parsePnpmPackageKey(rawKey) {
4697
+ let key = rawKey.trim();
4698
+ if (key.startsWith("/")) key = key.slice(1);
4699
+ const parenIdx = key.indexOf("(");
4700
+ if (parenIdx !== -1) key = key.slice(0, parenIdx);
4701
+ const idx = key.lastIndexOf("@");
4702
+ if (idx <= 0) return null;
4703
+ const name = key.slice(0, idx);
4704
+ const version = key.slice(idx + 1).trim();
4705
+ if (!version) return null;
4706
+ return { name, version };
4707
+ }
4708
+ function parsePnpmLockfile(input) {
4709
+ const data = load(input);
4710
+ const entries = [];
4711
+ const packages = data?.packages;
4712
+ if (!packages || typeof packages !== "object" || Array.isArray(packages)) return entries;
4713
+ for (const rawKey of Object.keys(packages)) {
4714
+ const parsed = parsePnpmPackageKey(rawKey);
4715
+ if (parsed) entries.push(parsed);
4716
+ }
4717
+ return entries;
4718
+ }
4719
+ function findDuplicateLockfileVersions(input, format) {
4720
+ if (!input || !input.trim()) return { error: "Input is empty" };
4721
+ const detected = format ?? detectLockfileFormat(input);
4722
+ if (!detected) {
4723
+ return { error: "Could not detect lockfile format; expected an npm package-lock.json, a yarn.lock, or a pnpm-lock.yaml" };
4724
+ }
4725
+ let rawEntries;
4726
+ try {
4727
+ if (detected === "npm") rawEntries = parseNpmLockfile(input);
4728
+ else if (detected === "yarn") rawEntries = parseYarnLockfile(input);
4729
+ else rawEntries = parsePnpmLockfile(input);
4730
+ } catch (e) {
4731
+ return { error: `Failed to parse ${detected} lockfile: ${e.message}` };
4732
+ }
4733
+ if (rawEntries.length === 0) {
4734
+ return { error: `No packages found in ${detected} lockfile. If this is a pnpm lockfile older than v6 (slash-separated versions instead of "name@version"), re-generate it with a current pnpm version first.` };
4735
+ }
4736
+ const byName = /* @__PURE__ */ new Map();
4737
+ for (const { name, version } of rawEntries) {
4738
+ let versions = byName.get(name);
4739
+ if (!versions) {
4740
+ versions = /* @__PURE__ */ new Map();
4741
+ byName.set(name, versions);
4742
+ }
4743
+ versions.set(version, (versions.get(version) ?? 0) + 1);
4744
+ }
4745
+ const packages = [];
4746
+ for (const [name, versions] of byName) {
4747
+ const versionList = [...versions.entries()].map(([version, count]) => ({ version, count })).sort((a, b) => b.count - a.count || a.version.localeCompare(b.version));
4748
+ packages.push({ name, versions: versionList, isDuplicate: versionList.length > 1 });
4749
+ }
4750
+ packages.sort((a, b) => a.name.localeCompare(b.name));
4751
+ const duplicatePackages = packages.filter((p) => p.isDuplicate);
4752
+ return {
4753
+ format: detected,
4754
+ totalPackages: packages.length,
4755
+ duplicatePackages,
4756
+ packages
4757
+ };
4758
+ }
4759
+ var GIT_DIFF_STAT_FILE_RE = /^\s*(.+?)\s*\|\s*(Bin|\d+)\s*(.*)$/;
4760
+ var GIT_DIFF_STAT_SUMMARY_RE = /^\s*(\d+)\s+files?\s+changed(?:,\s*(\d+)\s+insertions?\(\+\))?(?:,\s*(\d+)\s+deletions?\(-\))?/;
4761
+ function summarizeGitDiffStat(input) {
4762
+ if (!input || !input.trim()) return { error: "Input is empty" };
4763
+ const lines = input.replace(/\r\n/g, "\n").split("\n");
4764
+ const files = [];
4765
+ let summaryMatch = null;
4766
+ for (const line of lines) {
4767
+ if (!line.trim()) continue;
4768
+ const sm = line.match(GIT_DIFF_STAT_SUMMARY_RE);
4769
+ if (sm) {
4770
+ summaryMatch = sm;
4771
+ continue;
4772
+ }
4773
+ const m = line.match(GIT_DIFF_STAT_FILE_RE);
4774
+ if (!m) continue;
4775
+ const rawName = m[1];
4776
+ const countRaw = m[2];
4777
+ const bar = m[3];
4778
+ let file = rawName;
4779
+ let oldFile;
4780
+ const renameMatch = rawName.match(/^(.*?)\s*=>\s*(.*)$/);
4781
+ if (renameMatch) {
4782
+ oldFile = renameMatch[1].trim();
4783
+ file = renameMatch[2].trim();
4784
+ }
4785
+ if (countRaw === "Bin") {
4786
+ files.push({ file, oldFile, changes: null, insertions: null, deletions: null, binary: true, approximate: false });
4787
+ continue;
4788
+ }
4789
+ const changes = parseInt(countRaw, 10);
4790
+ const plusCount = (bar.match(/\+/g) ?? []).length;
4791
+ const minusCount = (bar.match(/-/g) ?? []).length;
4792
+ const barTotal = plusCount + minusCount;
4793
+ let insertions;
4794
+ let deletions;
4795
+ let approximate = false;
4796
+ if (barTotal === changes) {
4797
+ insertions = plusCount;
4798
+ deletions = minusCount;
4799
+ } else if (barTotal > 0) {
4800
+ approximate = true;
4801
+ insertions = Math.round(changes * plusCount / barTotal);
4802
+ deletions = changes - insertions;
4803
+ } else if (changes === 0) {
4804
+ insertions = 0;
4805
+ deletions = 0;
4806
+ } else {
4807
+ approximate = true;
4808
+ insertions = null;
4809
+ deletions = null;
4810
+ }
4811
+ files.push({ file, oldFile, changes, insertions, deletions, binary: false, approximate });
4812
+ }
4813
+ if (files.length === 0) {
4814
+ return { error: "No file stat lines found; expected output from `git diff --stat` or `git log --stat`" };
4815
+ }
4816
+ let filesChanged = files.length;
4817
+ let totalInsertions = files.reduce((sum, f) => sum + (f.insertions ?? 0), 0);
4818
+ let totalDeletions = files.reduce((sum, f) => sum + (f.deletions ?? 0), 0);
4819
+ if (summaryMatch) {
4820
+ filesChanged = parseInt(summaryMatch[1], 10);
4821
+ if (summaryMatch[2]) totalInsertions = parseInt(summaryMatch[2], 10);
4822
+ if (summaryMatch[3]) totalDeletions = parseInt(summaryMatch[3], 10);
4823
+ }
4824
+ return { files, filesChanged, totalInsertions, totalDeletions };
4825
+ }
4620
4826
 
4621
- export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, KNOWN_LANGUAGE_TAGS, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, analyzeRegexGroups, auditDependencyRanges, buildCharacterClass, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, countSqlPlaceholders, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, extractMarkdownFootnotes, extractMarkdownLinkReferences, extractSvgSpriteSymbols, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lintDockerfile, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseCommitTrailers, parseConnectionString, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateAria, validateEditorConfig, validateEnvKey, validateFenceLanguageTags, validateMermaidSyntax, validatePackageExports, validateTsconfig };
4827
+ export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, KNOWN_LANGUAGE_TAGS, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, analyzeRegexGroups, auditDependencyRanges, buildCharacterClass, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, countSqlPlaceholders, detectDialect, detectLockfileFormat, detectOperationType, detectRedos, envToExport, envToJson, extractMarkdownFootnotes, extractMarkdownLinkReferences, extractSvgSpriteSymbols, findDuplicateLockfileVersions, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lintDockerfile, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseCommitTrailers, parseConnectionString, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, summarizeGitDiffStat, testGitignorePatterns, testPattern, testRegex, validateAria, validateEditorConfig, validateEnvKey, validateFenceLanguageTags, validateMermaidSyntax, validatePackageExports, validateTsconfig };
@@ -37,6 +37,8 @@
37
37
  * - sql-placeholder-counter (countSqlPlaceholders)
38
38
  * - regex-character-class-builder (buildCharacterClass)
39
39
  * - mermaid-syntax-validator (validateMermaidSyntax)
40
+ * - lockfile-duplicate-version-reporter (findDuplicateLockfileVersions, detectLockfileFormat)
41
+ * - git-diff-stat-summarizer (summarizeGitDiffStat)
40
42
  */
41
43
  type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u';
42
44
  declare const ALL_FLAGS: RegexFlag[];
@@ -835,6 +837,62 @@ interface CharClassResult {
835
837
  declare function buildCharacterClass(options: CharClassOptions): CharClassResult | {
836
838
  error: string;
837
839
  };
840
+ type LockfileFormat = 'npm' | 'yarn' | 'pnpm';
841
+ interface LockfileVersionInstance {
842
+ version: string;
843
+ count: number;
844
+ }
845
+ interface LockfilePackageEntry {
846
+ name: string;
847
+ versions: LockfileVersionInstance[];
848
+ isDuplicate: boolean;
849
+ }
850
+ interface LockfileDuplicateReport {
851
+ format: LockfileFormat;
852
+ totalPackages: number;
853
+ duplicatePackages: LockfilePackageEntry[];
854
+ packages: LockfilePackageEntry[];
855
+ }
856
+ /**
857
+ * Detect whether lockfile text is npm's package-lock.json, a classic
858
+ * yarn.lock, or a pnpm-lock.yaml, from its content alone.
859
+ */
860
+ declare function detectLockfileFormat(input: string): LockfileFormat | null;
861
+ /**
862
+ * Parse an npm (package-lock.json), yarn (yarn.lock), or pnpm (pnpm-lock.yaml)
863
+ * lockfile and report every package installed at more than one resolved
864
+ * version, with a count of how many install locations resolve to each
865
+ * version. Format is auto-detected from content unless given explicitly.
866
+ */
867
+ declare function findDuplicateLockfileVersions(input: string, format?: LockfileFormat): LockfileDuplicateReport | {
868
+ error: string;
869
+ };
870
+ interface GitDiffStatFileEntry {
871
+ file: string;
872
+ oldFile?: string;
873
+ changes: number | null;
874
+ insertions: number | null;
875
+ deletions: number | null;
876
+ binary: boolean;
877
+ approximate: boolean;
878
+ }
879
+ interface GitDiffStatSummary {
880
+ files: GitDiffStatFileEntry[];
881
+ filesChanged: number;
882
+ totalInsertions: number;
883
+ totalDeletions: number;
884
+ }
885
+ /**
886
+ * Parse the per-file lines and trailing summary line of `git diff --stat`
887
+ * or `git log --stat` output into structured insertion/deletion counts.
888
+ * The number before each file's bar is always exact; the bar's +/- split
889
+ * is scaled down by git once a diff is wide enough, in which case the
890
+ * split below is a proportional estimate (flagged via `approximate`) rather
891
+ * than an exact count.
892
+ */
893
+ declare function summarizeGitDiffStat(input: string): GitDiffStatSummary | {
894
+ error: string;
895
+ };
838
896
 
839
897
  declare const code_ALL_FLAGS: typeof ALL_FLAGS;
840
898
  type code_ApiEndpoint = ApiEndpoint;
@@ -881,6 +939,8 @@ type code_FenceTagIssueType = FenceTagIssueType;
881
939
  type code_FenceValidationResult = FenceValidationResult;
882
940
  type code_GitCommandConfig = GitCommandConfig;
883
941
  type code_GitCommandResult = GitCommandResult;
942
+ type code_GitDiffStatFileEntry = GitDiffStatFileEntry;
943
+ type code_GitDiffStatSummary = GitDiffStatSummary;
884
944
  type code_GitOperation = GitOperation;
885
945
  type code_GithubUrlInfo = GithubUrlInfo;
886
946
  type code_GithubUrlType = GithubUrlType;
@@ -894,6 +954,10 @@ type code_JsMinifyResult = JsMinifyResult;
894
954
  declare const code_KNOWN_LANGUAGE_TAGS: typeof KNOWN_LANGUAGE_TAGS;
895
955
  type code_LinkReferenceDefinition = LinkReferenceDefinition;
896
956
  type code_LinkReferenceUsage = LinkReferenceUsage;
957
+ type code_LockfileDuplicateReport = LockfileDuplicateReport;
958
+ type code_LockfileFormat = LockfileFormat;
959
+ type code_LockfilePackageEntry = LockfilePackageEntry;
960
+ type code_LockfileVersionInstance = LockfileVersionInstance;
897
961
  declare const code_MIME_TABLE: typeof MIME_TABLE;
898
962
  type code_MarkdownFootnoteDefinition = MarkdownFootnoteDefinition;
899
963
  type code_MarkdownFootnoteReference = MarkdownFootnoteReference;
@@ -945,6 +1009,7 @@ declare const code_countProperties: typeof countProperties;
945
1009
  declare const code_countRules: typeof countRules;
946
1010
  declare const code_countSqlPlaceholders: typeof countSqlPlaceholders;
947
1011
  declare const code_detectDialect: typeof detectDialect;
1012
+ declare const code_detectLockfileFormat: typeof detectLockfileFormat;
948
1013
  declare const code_detectOperationType: typeof detectOperationType;
949
1014
  declare const code_detectRedos: typeof detectRedos;
950
1015
  declare const code_envToExport: typeof envToExport;
@@ -952,6 +1017,7 @@ declare const code_envToJson: typeof envToJson;
952
1017
  declare const code_extractMarkdownFootnotes: typeof extractMarkdownFootnotes;
953
1018
  declare const code_extractMarkdownLinkReferences: typeof extractMarkdownLinkReferences;
954
1019
  declare const code_extractSvgSpriteSymbols: typeof extractSvgSpriteSymbols;
1020
+ declare const code_findDuplicateLockfileVersions: typeof findDuplicateLockfileVersions;
955
1021
  declare const code_formatCss: typeof formatCss;
956
1022
  declare const code_formatGql: typeof formatGql;
957
1023
  declare const code_formatHtml: typeof formatHtml;
@@ -985,6 +1051,7 @@ declare const code_removeRedundantAttributes: typeof removeRedundantAttributes;
985
1051
  declare const code_searchCheatsheet: typeof searchCheatsheet;
986
1052
  declare const code_searchEndpoints: typeof searchEndpoints;
987
1053
  declare const code_splitStatements: typeof splitStatements;
1054
+ declare const code_summarizeGitDiffStat: typeof summarizeGitDiffStat;
988
1055
  declare const code_testGitignorePatterns: typeof testGitignorePatterns;
989
1056
  declare const code_testPattern: typeof testPattern;
990
1057
  declare const code_testRegex: typeof testRegex;
@@ -996,7 +1063,7 @@ declare const code_validateMermaidSyntax: typeof validateMermaidSyntax;
996
1063
  declare const code_validatePackageExports: typeof validatePackageExports;
997
1064
  declare const code_validateTsconfig: typeof validateTsconfig;
998
1065
  declare namespace code {
999
- export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, type code_AriaIssue as AriaIssue, type code_AriaValidationResult as AriaValidationResult, code_CHEATSHEET as CHEATSHEET, type code_CharClassOptions as CharClassOptions, type code_CharClassResult as CharClassResult, type code_CheatsheetEntry as CheatsheetEntry, type code_CommitTrailer as CommitTrailer, type code_CommitTrailerResult as CommitTrailerResult, type code_ConnectionStringHost as ConnectionStringHost, type code_ConnectionStringResult as ConnectionStringResult, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DependencyAuditDuplicate as DependencyAuditDuplicate, type code_DependencyAuditEntry as DependencyAuditEntry, type code_DependencyAuditIssue as DependencyAuditIssue, type code_DependencyAuditResult as DependencyAuditResult, type code_DependencyRangeType as DependencyRangeType, type code_DependencySection as DependencySection, type code_DockerImageRef as DockerImageRef, type code_DockerfileLintFinding as DockerfileLintFinding, type code_DockerfileLintResult as DockerfileLintResult, type code_DockerfileStage as DockerfileStage, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_ExportsIssue as ExportsIssue, type code_ExportsShape as ExportsShape, type code_ExportsValidationResult as ExportsValidationResult, type code_FenceTagIssue as FenceTagIssue, type code_FenceTagIssueType as FenceTagIssueType, type code_FenceValidationResult as FenceValidationResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_KNOWN_LANGUAGE_TAGS as KNOWN_LANGUAGE_TAGS, type code_LinkReferenceDefinition as LinkReferenceDefinition, type code_LinkReferenceUsage as LinkReferenceUsage, code_MIME_TABLE as MIME_TABLE, type code_MarkdownFootnoteDefinition as MarkdownFootnoteDefinition, type code_MarkdownFootnoteReference as MarkdownFootnoteReference, type code_MarkdownFootnoteResult as MarkdownFootnoteResult, type code_MarkdownLinkReferenceResult as MarkdownLinkReferenceResult, type code_MatchResult as MatchResult, type code_MermaidSyntaxIssue as MermaidSyntaxIssue, type code_MermaidSyntaxResult as MermaidSyntaxResult, type code_MermaidSyntaxRule as MermaidSyntaxRule, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_PlaceholderStyle as PlaceholderStyle, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexBackreferenceInfo as RegexBackreferenceInfo, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexGroupAnalysis as RegexGroupAnalysis, type code_RegexGroupInfo as RegexGroupInfo, type code_RegexGroupIssue as RegexGroupIssue, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, type code_ResolvedLinkReference as ResolvedLinkReference, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_SqlPlaceholder as SqlPlaceholder, type code_SqlPlaceholderResult as SqlPlaceholderResult, type code_SvgSpriteResult as SvgSpriteResult, type code_SvgSpriteSymbol as SvgSpriteSymbol, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_analyzeRegexGroups as analyzeRegexGroups, code_auditDependencyRanges as auditDependencyRanges, code_buildCharacterClass as buildCharacterClass, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_countSqlPlaceholders as countSqlPlaceholders, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_extractMarkdownFootnotes as extractMarkdownFootnotes, code_extractMarkdownLinkReferences as extractMarkdownLinkReferences, code_extractSvgSpriteSymbols as extractSvgSpriteSymbols, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lintDockerfile as lintDockerfile, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseCommitTrailers as parseCommitTrailers, code_parseConnectionString as parseConnectionString, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateAria as validateAria, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateFenceLanguageTags as validateFenceLanguageTags, code_validateMermaidSyntax as validateMermaidSyntax, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
1066
+ export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, type code_AriaIssue as AriaIssue, type code_AriaValidationResult as AriaValidationResult, code_CHEATSHEET as CHEATSHEET, type code_CharClassOptions as CharClassOptions, type code_CharClassResult as CharClassResult, type code_CheatsheetEntry as CheatsheetEntry, type code_CommitTrailer as CommitTrailer, type code_CommitTrailerResult as CommitTrailerResult, type code_ConnectionStringHost as ConnectionStringHost, type code_ConnectionStringResult as ConnectionStringResult, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DependencyAuditDuplicate as DependencyAuditDuplicate, type code_DependencyAuditEntry as DependencyAuditEntry, type code_DependencyAuditIssue as DependencyAuditIssue, type code_DependencyAuditResult as DependencyAuditResult, type code_DependencyRangeType as DependencyRangeType, type code_DependencySection as DependencySection, type code_DockerImageRef as DockerImageRef, type code_DockerfileLintFinding as DockerfileLintFinding, type code_DockerfileLintResult as DockerfileLintResult, type code_DockerfileStage as DockerfileStage, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_ExportsIssue as ExportsIssue, type code_ExportsShape as ExportsShape, type code_ExportsValidationResult as ExportsValidationResult, type code_FenceTagIssue as FenceTagIssue, type code_FenceTagIssueType as FenceTagIssueType, type code_FenceValidationResult as FenceValidationResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitDiffStatFileEntry as GitDiffStatFileEntry, type code_GitDiffStatSummary as GitDiffStatSummary, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_KNOWN_LANGUAGE_TAGS as KNOWN_LANGUAGE_TAGS, type code_LinkReferenceDefinition as LinkReferenceDefinition, type code_LinkReferenceUsage as LinkReferenceUsage, type code_LockfileDuplicateReport as LockfileDuplicateReport, type code_LockfileFormat as LockfileFormat, type code_LockfilePackageEntry as LockfilePackageEntry, type code_LockfileVersionInstance as LockfileVersionInstance, code_MIME_TABLE as MIME_TABLE, type code_MarkdownFootnoteDefinition as MarkdownFootnoteDefinition, type code_MarkdownFootnoteReference as MarkdownFootnoteReference, type code_MarkdownFootnoteResult as MarkdownFootnoteResult, type code_MarkdownLinkReferenceResult as MarkdownLinkReferenceResult, type code_MatchResult as MatchResult, type code_MermaidSyntaxIssue as MermaidSyntaxIssue, type code_MermaidSyntaxResult as MermaidSyntaxResult, type code_MermaidSyntaxRule as MermaidSyntaxRule, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_PlaceholderStyle as PlaceholderStyle, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexBackreferenceInfo as RegexBackreferenceInfo, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexGroupAnalysis as RegexGroupAnalysis, type code_RegexGroupInfo as RegexGroupInfo, type code_RegexGroupIssue as RegexGroupIssue, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, type code_ResolvedLinkReference as ResolvedLinkReference, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_SqlPlaceholder as SqlPlaceholder, type code_SqlPlaceholderResult as SqlPlaceholderResult, type code_SvgSpriteResult as SvgSpriteResult, type code_SvgSpriteSymbol as SvgSpriteSymbol, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_analyzeRegexGroups as analyzeRegexGroups, code_auditDependencyRanges as auditDependencyRanges, code_buildCharacterClass as buildCharacterClass, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_countSqlPlaceholders as countSqlPlaceholders, code_detectDialect as detectDialect, code_detectLockfileFormat as detectLockfileFormat, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_extractMarkdownFootnotes as extractMarkdownFootnotes, code_extractMarkdownLinkReferences as extractMarkdownLinkReferences, code_extractSvgSpriteSymbols as extractSvgSpriteSymbols, code_findDuplicateLockfileVersions as findDuplicateLockfileVersions, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lintDockerfile as lintDockerfile, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseCommitTrailers as parseCommitTrailers, code_parseConnectionString as parseConnectionString, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_summarizeGitDiffStat as summarizeGitDiffStat, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateAria as validateAria, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateFenceLanguageTags as validateFenceLanguageTags, code_validateMermaidSyntax as validateMermaidSyntax, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
1000
1067
  }
1001
1068
 
1002
- export { type HtmlMinifyResult as $, ALL_FLAGS as A, type DockerfileLintFinding as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type DockerfileLintResult as E, type DockerfileStage as F, type EditorConfigIssue as G, type EditorConfigProperty as H, type EditorConfigSection as I, type EditorConfigValidationResult as J, type EnvEntry as K, type EnvParseResult as L, type ExportsIssue as M, type ExportsShape as N, type ExportsValidationResult as O, type FenceTagIssue as P, type FenceTagIssueType as Q, type FenceValidationResult as R, type GitCommandConfig as S, type GitCommandResult as T, type GitOperation as U, type GithubUrlInfo as V, type GithubUrlType as W, type GitignoreTestResult as X, type GqlFormatResult as Y, type HtmlFormatResult as Z, type HtmlMinifyOptions as _, type ApiEndpoint as a, formatCss as a$, type JsMinifyOptions as a0, type JsMinifyResult as a1, KNOWN_LANGUAGE_TAGS as a2, type LinkReferenceDefinition as a3, type LinkReferenceUsage as a4, MIME_TABLE as a5, type MarkdownFootnoteDefinition as a6, type MarkdownFootnoteReference as a7, type MarkdownFootnoteResult as a8, type MarkdownLinkReferenceResult as a9, type SqlFormatOptions as aA, type SqlPlaceholder as aB, type SqlPlaceholderResult as aC, type SvgSpriteResult as aD, type SvgSpriteSymbol as aE, type TestPatternResult as aF, type TsconfigIssue as aG, type TsconfigValidationResult as aH, analyzeRegexGroups as aI, auditDependencyRanges as aJ, buildCharacterClass as aK, buildDockerPull as aL, buildDockerRun as aM, buildGitCommand as aN, collapseHtmlWhitespace as aO, collapseJsWhitespace as aP, countProperties as aQ, countRules as aR, countSqlPlaceholders as aS, detectDialect as aT, detectOperationType as aU, detectRedos as aV, envToExport as aW, envToJson as aX, extractMarkdownFootnotes as aY, extractMarkdownLinkReferences as aZ, extractSvgSpriteSymbols as a_, type MatchResult as aa, type MermaidSyntaxIssue as ab, type MermaidSyntaxResult as ac, type MermaidSyntaxRule as ad, type MimeEntry as ae, type MimeLookupResult as af, OPERATIONS as ag, type ParsedSpec as ah, type PlaceholderStyle as ai, type RedosFinding as aj, type RedosResult as ak, type RedosSeverity as al, type RegexBackreferenceInfo as am, type RegexError as an, type RegexFlag as ao, type RegexGroupAnalysis as ap, type RegexGroupInfo as aq, type RegexGroupIssue as ar, type RegexMatch as as, type RegexResult as at, type RegexSuccess as au, type ResolvedLinkReference as av, SQL_DEFAULT_OPTIONS as aw, type Segment as ax, type SpecVersion as ay, type SqlDialect as az, type ApiInfo as b, formatGql as b0, formatHtml as b1, formatSql as b2, getEndpointsByTag as b3, getHtmlStats as b4, getJsStats as b5, getMethodColor as b6, isValidTag as b7, lintConventionalCommit as b8, lintDockerfile as b9, validateEditorConfig as bA, validateEnvKey as bB, validateFenceLanguageTags as bC, validateMermaidSyntax as bD, validatePackageExports as bE, validateTsconfig as bF, lookupMime as ba, minifyCss as bb, minifyGql as bc, minifyHtml as bd, minifyJs as be, minifySql as bf, normalizeRef as bg, parseCommitTrailers as bh, parseConnectionString as bi, parseDockerImage as bj, parseEnv as bk, parseGitCommand as bl, parseGithubUrl as bm, parseSpec as bn, removeConsoleCalls as bo, removeEmptyAttributes as bp, removeHtmlComments as bq, removeJsComments as br, removeRedundantAttributes as bs, searchCheatsheet as bt, searchEndpoints as bu, splitStatements as bv, testGitignorePatterns as bw, testPattern as bx, testRegex as by, validateAria as bz, code as c, type AriaIssue as d, type AriaValidationResult as e, type CharClassOptions as f, type CharClassResult as g, type CheatsheetEntry as h, type CommitTrailer as i, type CommitTrailerResult as j, type ConnectionStringHost as k, type ConnectionStringResult as l, type ConventionalCommitFinding as m, type ConventionalCommitFooter as n, type ConventionalCommitOptions as o, type ConventionalCommitParsed as p, type ConventionalCommitResult as q, type ConventionalCommitSeverity as r, type CssResult as s, type DependencyAuditDuplicate as t, type DependencyAuditEntry as u, type DependencyAuditIssue as v, type DependencyAuditResult as w, type DependencyRangeType as x, type DependencySection as y, type DockerImageRef as z };
1069
+ export { type HtmlFormatResult as $, ALL_FLAGS as A, type DockerfileLintFinding as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type DockerfileLintResult as E, type DockerfileStage as F, type EditorConfigIssue as G, type EditorConfigProperty as H, type EditorConfigSection as I, type EditorConfigValidationResult as J, type EnvEntry as K, type EnvParseResult as L, type ExportsIssue as M, type ExportsShape as N, type ExportsValidationResult as O, type FenceTagIssue as P, type FenceTagIssueType as Q, type FenceValidationResult as R, type GitCommandConfig as S, type GitCommandResult as T, type GitDiffStatFileEntry as U, type GitDiffStatSummary as V, type GitOperation as W, type GithubUrlInfo as X, type GithubUrlType as Y, type GitignoreTestResult as Z, type GqlFormatResult as _, type ApiEndpoint as a, detectOperationType as a$, type HtmlMinifyOptions as a0, type HtmlMinifyResult as a1, type JsMinifyOptions as a2, type JsMinifyResult as a3, KNOWN_LANGUAGE_TAGS as a4, type LinkReferenceDefinition as a5, type LinkReferenceUsage as a6, type LockfileDuplicateReport as a7, type LockfileFormat as a8, type LockfilePackageEntry as a9, type RegexSuccess as aA, type ResolvedLinkReference as aB, SQL_DEFAULT_OPTIONS as aC, type Segment as aD, type SpecVersion as aE, type SqlDialect as aF, type SqlFormatOptions as aG, type SqlPlaceholder as aH, type SqlPlaceholderResult as aI, type SvgSpriteResult as aJ, type SvgSpriteSymbol as aK, type TestPatternResult as aL, type TsconfigIssue as aM, type TsconfigValidationResult as aN, analyzeRegexGroups as aO, auditDependencyRanges as aP, buildCharacterClass as aQ, buildDockerPull as aR, buildDockerRun as aS, buildGitCommand as aT, collapseHtmlWhitespace as aU, collapseJsWhitespace as aV, countProperties as aW, countRules as aX, countSqlPlaceholders as aY, detectDialect as aZ, detectLockfileFormat as a_, type LockfileVersionInstance as aa, MIME_TABLE as ab, type MarkdownFootnoteDefinition as ac, type MarkdownFootnoteReference as ad, type MarkdownFootnoteResult as ae, type MarkdownLinkReferenceResult as af, type MatchResult as ag, type MermaidSyntaxIssue as ah, type MermaidSyntaxResult as ai, type MermaidSyntaxRule as aj, type MimeEntry as ak, type MimeLookupResult as al, OPERATIONS as am, type ParsedSpec as an, type PlaceholderStyle as ao, type RedosFinding as ap, type RedosResult as aq, type RedosSeverity as ar, type RegexBackreferenceInfo as as, type RegexError as at, type RegexFlag as au, type RegexGroupAnalysis as av, type RegexGroupInfo as aw, type RegexGroupIssue as ax, type RegexMatch as ay, type RegexResult as az, type ApiInfo as b, detectRedos as b0, envToExport as b1, envToJson as b2, extractMarkdownFootnotes as b3, extractMarkdownLinkReferences as b4, extractSvgSpriteSymbols as b5, findDuplicateLockfileVersions as b6, formatCss as b7, formatGql as b8, formatHtml as b9, removeRedundantAttributes as bA, searchCheatsheet as bB, searchEndpoints as bC, splitStatements as bD, summarizeGitDiffStat as bE, testGitignorePatterns as bF, testPattern as bG, testRegex as bH, validateAria as bI, validateEditorConfig as bJ, validateEnvKey as bK, validateFenceLanguageTags as bL, validateMermaidSyntax as bM, validatePackageExports as bN, validateTsconfig as bO, formatSql as ba, getEndpointsByTag as bb, getHtmlStats as bc, getJsStats as bd, getMethodColor as be, isValidTag as bf, lintConventionalCommit as bg, lintDockerfile as bh, lookupMime as bi, minifyCss as bj, minifyGql as bk, minifyHtml as bl, minifyJs as bm, minifySql as bn, normalizeRef as bo, parseCommitTrailers as bp, parseConnectionString as bq, parseDockerImage as br, parseEnv as bs, parseGitCommand as bt, parseGithubUrl as bu, parseSpec as bv, removeConsoleCalls as bw, removeEmptyAttributes as bx, removeHtmlComments as by, removeJsComments as bz, code as c, type AriaIssue as d, type AriaValidationResult as e, type CharClassOptions as f, type CharClassResult as g, type CheatsheetEntry as h, type CommitTrailer as i, type CommitTrailerResult as j, type ConnectionStringHost as k, type ConnectionStringResult as l, type ConventionalCommitFinding as m, type ConventionalCommitFooter as n, type ConventionalCommitOptions as o, type ConventionalCommitParsed as p, type ConventionalCommitResult as q, type ConventionalCommitSeverity as r, type CssResult as s, type DependencyAuditDuplicate as t, type DependencyAuditEntry as u, type DependencyAuditIssue as v, type DependencyAuditResult as w, type DependencyRangeType as x, type DependencySection as y, type DockerImageRef as z };