@utilix-tech/sdk 0.52.0 → 0.54.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +32 -7
  3. package/dist/{chunk-BDQXYFTO.js → chunk-3KIUADK4.js} +49 -1
  4. package/dist/{chunk-Y7YY733Z.js → chunk-DEBIH7QS.js} +58 -1
  5. package/dist/{chunk-K4ZERKBD.js → chunk-JW4NG2GN.js} +119 -1
  6. package/dist/{chunk-ZZJPD366.js → chunk-NKN656TQ.js} +44 -1
  7. package/dist/{code-B_gDkRAx.d.cts → code-rxidGgvB.d.cts} +28 -2
  8. package/dist/{code-B_gDkRAx.d.ts → code-rxidGgvB.d.ts} +28 -2
  9. package/dist/{data-BI_007dA.d.cts → data-CupeugaR.d.cts} +37 -2
  10. package/dist/{data-BI_007dA.d.ts → data-CupeugaR.d.ts} +37 -2
  11. package/dist/index.cjs +266 -0
  12. package/dist/index.d.cts +4 -4
  13. package/dist/index.d.ts +4 -4
  14. package/dist/index.js +4 -4
  15. package/dist/{network-DelcJeJa.d.cts → network-C6IcHeMB.d.cts} +51 -2
  16. package/dist/{network-DelcJeJa.d.ts → network-C6IcHeMB.d.ts} +51 -2
  17. package/dist/tools/code.cjs +118 -0
  18. package/dist/tools/code.d.cts +1 -1
  19. package/dist/tools/code.d.ts +1 -1
  20. package/dist/tools/code.js +1 -1
  21. package/dist/tools/data.cjs +48 -0
  22. package/dist/tools/data.d.cts +1 -1
  23. package/dist/tools/data.d.ts +1 -1
  24. package/dist/tools/data.js +1 -1
  25. package/dist/tools/network.cjs +57 -0
  26. package/dist/tools/network.d.cts +1 -1
  27. package/dist/tools/network.d.ts +1 -1
  28. package/dist/tools/network.js +1 -1
  29. package/dist/tools/units.cjs +43 -0
  30. package/dist/tools/units.d.cts +1 -1
  31. package/dist/tools/units.d.ts +1 -1
  32. package/dist/tools/units.js +1 -1
  33. package/dist/{units-y30YVhqI.d.cts → units-p-1Ikx7l.d.cts} +39 -2
  34. package/dist/{units-y30YVhqI.d.ts → units-p-1Ikx7l.d.ts} +39 -2
  35. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
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.54.0
6
+ - Add `validatePackageExports` (package-json-exports-validator): parse a package.json's exports field and flag common dual-package (ESM/CJS) misconfigurations, a types condition not listed first, a missing default fallback, mismatched require/import extensions, mixed subpath/condition keys, and pattern mismatches.
7
+ - Add `buildXContentTypeOptionsHeader`, `parseXContentTypeOptionsHeader`, `assessContentTypeRisk` (x-content-type-options-builder): build the fixed X-Content-Type-Options: nosniff header, validate a pasted value, and assess MIME-sniffing risk for a given Content-Type.
8
+
9
+ ## 0.53.0
10
+ - Add `calculateCreditUtilization` (credit-utilization-calculator): compute per-account and overall credit utilization (balance / limit) from one or more credit accounts, plus a qualitative tier matching common credit-scoring guidance.
11
+ - Add `analyzeCaptionSpeed` (caption-reading-speed-checker): parse an SRT or WebVTT file and report the words-per-minute reading speed of every cue, flagging ones that exceed common broadcast accessibility guidelines.
12
+
5
13
  ## 0.52.0
6
14
  - Add `validateEditorConfig` (editorconfig-validator): parse an .editorconfig file into its root flag and glob sections, and flag structural mistakes against the EditorConfig spec.
7
15
  - Add `validateTsconfig` (tsconfig-validator): parse a tsconfig.json file as JSONC and flag unknown keys, unknown compilerOptions, and type mismatches against a curated list of known options.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @utilix-tech/sdk
2
2
 
3
- **644 developer utility functions for Node.js: runs locally, no API key required.**
3
+ **646 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)
@@ -204,7 +204,7 @@ analyzeKeywordDensity("machine learning models power machine learning systems");
204
204
  import { parseCsv, csvToJson, validateYaml, resolveYamlAnchors, tomlToJson, jsonToToml,
205
205
  formatXml, xmlToJson, jsonToXml, parseIni,
206
206
  validateNdjson, formatNdjson, ndjsonToJsonArray, diffEnvExample,
207
- parseSubtitles, convertSubtitles, shiftSubtitles, parseFrontMatter,
207
+ parseSubtitles, convertSubtitles, shiftSubtitles, analyzeCaptionSpeed, parseFrontMatter,
208
208
  generateMarkdownToc, csvToSqlInsert, findCsvDuplicateRows, calculateMarkdownTaskListProgress } from "@utilix-tech/sdk/data";
209
209
 
210
210
  // CSV
@@ -242,6 +242,10 @@ convertSubtitles("1\n00:00:01,000 --> 00:00:04,000\nHello there.\n", "vtt");
242
242
  shiftSubtitles("1\n00:00:01,000 --> 00:00:04,000\nHi\n", -2.5);
243
243
  // shifts every cue 2.5s earlier, clamping anything below zero to 00:00:00
244
244
 
245
+ // Caption reading speed: flag cues faster than ~180 WPM / ~20 chars/sec (both adjustable)
246
+ analyzeCaptionSpeed("1\n00:00:01,000 --> 00:00:02,000\nThis line is read far too fast for anyone to follow.\n");
247
+ // { cueCount: 1, averageWpm: 660, flaggedCount: 1, cues: [{ wpm: 660, exceedsWpm: true, ... }], ... }
248
+
245
249
  // Markdown front matter: split a document into its YAML front matter and body
246
250
  parseFrontMatter("---\ntitle: Hello World\ntags: [foo, bar]\n---\n# Body");
247
251
  // { frontMatter: { title: "Hello World", tags: ["foo", "bar"] }, body: "# Body", hasFrontMatter: true, ... }
@@ -322,7 +326,7 @@ formatIso8601Duration(90061); // { iso: "P1DT1H1M1S", ... }
322
326
  ### `/units`: Conversions
323
327
 
324
328
  ```ts
325
- import { convertBytes, pxToAll, convert, formatValue, validateCardNumber, validateIban, calculateLoan, validateBarcode, calculateTax, calculateCompoundInterest, validateIsbn, calculateTipSplit, calculateSimpleInterest, calculateTimeValue, calculatePercentageChange, convertAprApy, calculateMarginMarkup, calculateDiscount, applySuccessiveDiscounts, calculateBreakEven, calculateVideoBitrate, calculateRuleOf72, calculateEmi, calculateRoi, compareUnitPrices, calculatePaybackPeriod, calculateCdMaturity, calculateDepreciationSchedule, calculateCashRounding, calculateMovingAverages, calculateGpa } from "@utilix-tech/sdk/units";
329
+ import { convertBytes, pxToAll, convert, formatValue, validateCardNumber, validateIban, calculateLoan, validateBarcode, calculateTax, calculateCompoundInterest, validateIsbn, calculateTipSplit, calculateSimpleInterest, calculateTimeValue, calculatePercentageChange, convertAprApy, calculateMarginMarkup, calculateDiscount, applySuccessiveDiscounts, calculateBreakEven, calculateVideoBitrate, calculateRuleOf72, calculateEmi, calculateRoi, compareUnitPrices, calculatePaybackPeriod, calculateCdMaturity, calculateDepreciationSchedule, calculateCashRounding, calculateMovingAverages, calculateGpa, calculateCreditUtilization } from "@utilix-tech/sdk/units";
326
330
 
327
331
  // File sizes
328
332
  convertBytes(1073741824, "GB"); // 1
@@ -456,6 +460,10 @@ calculateMovingAverages([102, 104, 101, 108, 112], 3);
456
460
  // Weighted GPA from a list of courses (letter grade + credit hours)
457
461
  calculateGpa([{ name: "Calculus", grade: "A", credits: 4 }, { name: "History", grade: "B+", credits: 3 }]);
458
462
  // { gpa: 3.7, totalCredits: 7, totalQualityPoints: 25.9, courses: [...] }
463
+
464
+ // Per-account and overall credit utilization, plus a qualitative tier
465
+ calculateCreditUtilization([{ label: "Visa", balance: 500, limit: 5000 }, { label: "Amex", balance: 1200, limit: 3000 }]);
466
+ // { overallUtilizationPercent: 21.25, overallTier: "good", totalBalance: 1700, totalLimit: 8000, accounts: [...] }
459
467
  ```
460
468
 
461
469
  ---
@@ -469,7 +477,8 @@ import { getStatusCode, isValidIp, isValidIpv4, isValidIpv6,
469
477
  parseUserAgent, buildCacheControl, buildReferrerPolicy, parseIpv6Address, buildLinkHeader, checkSetCookieHeader, analyzeEmailHeaders,
470
478
  buildRangeHeader, parseContentRangeHeader, buildVaryHeader, parseVaryHeader, validateManifest,
471
479
  buildPermissionsPolicy, parsePermissionsPolicy, buildClientHints, parseClientHintHeaders,
472
- buildContentDisposition, parseContentDisposition } from "@utilix-tech/sdk/network";
480
+ buildContentDisposition, parseContentDisposition,
481
+ buildXContentTypeOptionsHeader, parseXContentTypeOptionsHeader, assessContentTypeRisk } from "@utilix-tech/sdk/network";
473
482
 
474
483
  getStatusCode(404);
475
484
  // { code: 404, text: "Not Found", description: "...", category: "Client Error" }
@@ -574,6 +583,18 @@ buildContentDisposition({ type: "attachment", filename: "résumé.pdf" });
574
583
  // Parse an existing Content-Disposition header, decoding filename* in preference to filename
575
584
  parseContentDisposition('attachment; filename="report.pdf"');
576
585
  // { type: "attachment", filename: "report.pdf", filenameIsExtended: false, params: { filename: "report.pdf" } }
586
+
587
+ // Build the fixed X-Content-Type-Options header, with a plain-English explanation of the MIME-sniffing attack it prevents
588
+ buildXContentTypeOptionsHeader();
589
+ // { header: "X-Content-Type-Options: nosniff", value: "nosniff", explanation: "..." }
590
+
591
+ // Validate a pasted X-Content-Type-Options header value
592
+ parseXContentTypeOptionsHeader("nosniff");
593
+ // { raw: "nosniff", valid: true, message: "Valid. The browser will not MIME-sniff this response." }
594
+
595
+ // Assess how risky it is to serve a given Content-Type without X-Content-Type-Options: nosniff
596
+ assessContentTypeRisk("text/plain");
597
+ // { contentType: "text/plain", risk: "high", reason: "..." }
577
598
  ```
578
599
 
579
600
  ---
@@ -624,7 +645,7 @@ generateCspHeader({ "default-src": ["'self'"], "script-src": ["'self'", "cdn.exa
624
645
  import { formatSql, minifySql, testRegex, formatHtml, formatGql,
625
646
  detectDialect, splitStatements, lookupMime, parseGithubUrl,
626
647
  detectRedos, testGitignorePatterns, validateEditorConfig,
627
- validateTsconfig } from "@utilix-tech/sdk/code";
648
+ validateTsconfig, validatePackageExports } from "@utilix-tech/sdk/code";
628
649
 
629
650
  // SQL
630
651
  formatSql("SELECT id,name FROM users WHERE active=1 ORDER BY name");
@@ -672,6 +693,10 @@ validateEditorConfig("root = true\n\n[*]\nindent_style = space\nindent_size = 2\
672
693
  // Validate a tsconfig.json file (JSONC comments and trailing commas are stripped first)
673
694
  validateTsconfig(JSON.stringify({ compilerOptions: { target: "ES2020", strict: true } }));
674
695
  // { parsed: true, topLevelKeys: ["compilerOptions"], compilerOptionKeys: ["target", "strict"], issues: [], valid: true }
696
+
697
+ // Validate a package.json "exports" field for dual-package (ESM/CJS) misconfigurations
698
+ validatePackageExports(JSON.stringify({ exports: { import: "./index.mjs", require: "./index.cjs", default: "./index.cjs" } }));
699
+ // { parsed: true, exportsShape: "conditions", subpaths: ["."], issues: [], valid: true }
675
700
  ```
676
701
 
677
702
  ---
@@ -829,9 +854,9 @@ inspectGifFrames(new Uint8Array(gifBytes));
829
854
  | `@utilix-tech/sdk/generators` | UUID v4/v7, ULID, passwords, strength check, entropy estimator, fake data |
830
855
  | `@utilix-tech/sdk/time` | Date diff, timezone convert, cron parse, relative time |
831
856
  | `@utilix-tech/sdk/units` | Bytes, CSS px/rem, number bases, currency format, credit card/IBAN/barcode/ISBN 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 |
832
- | `@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, sitemap.xml validator, sitemap index splitter |
857
+ | `@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 |
833
858
  | `@utilix-tech/sdk/api` | cURL build/parse, JWT decode/sign, JWKS parse, CORS headers, CSP header |
834
- | `@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 |
859
+ | `@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 |
835
860
  | `@utilix-tech/sdk/color` | Hex/RGB/HSL/HSV/CMYK convert, palette generation, contrast check |
836
861
  | `@utilix-tech/sdk/css` | CSS gradient, box-shadow, border-radius, keyframe animation generators |
837
862
  | `@utilix-tech/sdk/misc` | SVG optimize/sanitize, file size format, Unicode inspector |
@@ -5,6 +5,7 @@ import { parse, stringify } from 'smol-toml';
5
5
  // src/tools/data.ts
6
6
  var data_exports = {};
7
7
  __export(data_exports, {
8
+ analyzeCaptionSpeed: () => analyzeCaptionSpeed,
8
9
  calculateMarkdownTaskListProgress: () => calculateMarkdownTaskListProgress,
9
10
  convertSubtitles: () => convertSubtitles,
10
11
  csvToJson: () => csvToJson,
@@ -1340,6 +1341,53 @@ function shiftSubtitles(input, offsetSeconds, target) {
1340
1341
  warnings
1341
1342
  };
1342
1343
  }
1344
+ function analyzeCaptionSpeed(input, wpmThreshold = 180, cpsThreshold = 20) {
1345
+ if (!Number.isFinite(wpmThreshold) || wpmThreshold <= 0) {
1346
+ return { error: "wpmThreshold must be a finite number greater than zero" };
1347
+ }
1348
+ if (!Number.isFinite(cpsThreshold) || cpsThreshold <= 0) {
1349
+ return { error: "cpsThreshold must be a finite number greater than zero" };
1350
+ }
1351
+ const parsed = parseSubtitles(input);
1352
+ if ("error" in parsed) return parsed;
1353
+ const round1 = (n) => Math.round(n * 10) / 10;
1354
+ const cues = [];
1355
+ for (const cue of parsed.cues) {
1356
+ const text = cue.text.replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim();
1357
+ const durationSeconds = cue.end - cue.start;
1358
+ if (text.length === 0 || durationSeconds <= 0) continue;
1359
+ const wordCount = text.split(" ").filter(Boolean).length;
1360
+ const charCount = text.length;
1361
+ const wpm = wordCount / durationSeconds * 60;
1362
+ const charsPerSecond = charCount / durationSeconds;
1363
+ cues.push({
1364
+ index: cues.length + 1,
1365
+ start: round1(cue.start),
1366
+ end: round1(cue.end),
1367
+ text,
1368
+ durationSeconds: round1(durationSeconds),
1369
+ wordCount,
1370
+ charCount,
1371
+ wpm: round1(wpm),
1372
+ charsPerSecond: round1(charsPerSecond),
1373
+ exceedsWpm: wpm > wpmThreshold,
1374
+ exceedsCps: charsPerSecond > cpsThreshold
1375
+ });
1376
+ }
1377
+ if (cues.length === 0) {
1378
+ return { error: "No cues with both text and a positive duration were found" };
1379
+ }
1380
+ const wpmValues = cues.map((c) => c.wpm);
1381
+ return {
1382
+ cueCount: cues.length,
1383
+ cues,
1384
+ averageWpm: round1(wpmValues.reduce((a, b) => a + b, 0) / wpmValues.length),
1385
+ maxWpm: round1(Math.max(...wpmValues)),
1386
+ flaggedCount: cues.filter((c) => c.exceedsWpm || c.exceedsCps).length,
1387
+ wpmThreshold,
1388
+ cpsThreshold
1389
+ };
1390
+ }
1343
1391
  function parseFrontMatterScalar(value) {
1344
1392
  if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
1345
1393
  return value.slice(1, -1);
@@ -1673,4 +1721,4 @@ function calculateMarkdownTaskListProgress(markdown) {
1673
1721
  return { totalItems, completedItems, percentComplete, sections, items };
1674
1722
  }
1675
1723
 
1676
- export { calculateMarkdownTaskListProgress, convertSubtitles, csvToJson, csvToSqlInsert, data_exports, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, findCsvDuplicateRows, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, resolveYamlAnchors, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson };
1724
+ export { analyzeCaptionSpeed, calculateMarkdownTaskListProgress, convertSubtitles, csvToJson, csvToSqlInsert, data_exports, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, findCsvDuplicateRows, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, resolveYamlAnchors, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson };
@@ -10,7 +10,9 @@ __export(network_exports, {
10
10
  PERMISSIONS_POLICY_FEATURES: () => PERMISSIONS_POLICY_FEATURES,
11
11
  REFERRER_POLICY_VALUES: () => REFERRER_POLICY_VALUES,
12
12
  STATUS_CODES: () => STATUS_CODES,
13
+ X_CONTENT_TYPE_OPTIONS_HEADER: () => X_CONTENT_TYPE_OPTIONS_HEADER,
13
14
  analyzeEmailHeaders: () => analyzeEmailHeaders,
15
+ assessContentTypeRisk: () => assessContentTypeRisk,
14
16
  buildCacheControl: () => buildCacheControl,
15
17
  buildClientHints: () => buildClientHints,
16
18
  buildContentDisposition: () => buildContentDisposition,
@@ -22,6 +24,7 @@ __export(network_exports, {
22
24
  buildRangeHeader: () => buildRangeHeader,
23
25
  buildReferrerPolicy: () => buildReferrerPolicy,
24
26
  buildVaryHeader: () => buildVaryHeader,
27
+ buildXContentTypeOptionsHeader: () => buildXContentTypeOptionsHeader,
25
28
  checkSetCookieHeader: () => checkSetCookieHeader,
26
29
  countryCodeToFlag: () => countryCodeToFlag,
27
30
  formatCoordinates: () => formatCoordinates,
@@ -47,6 +50,7 @@ __export(network_exports, {
47
50
  parsePermissionsPolicy: () => parsePermissionsPolicy,
48
51
  parseUserAgent: () => parseUserAgent,
49
52
  parseVaryHeader: () => parseVaryHeader,
53
+ parseXContentTypeOptionsHeader: () => parseXContentTypeOptionsHeader,
50
54
  searchHeaders: () => searchHeaders,
51
55
  searchStatusCodes: () => searchStatusCodes,
52
56
  splitSitemap: () => splitSitemap,
@@ -2775,5 +2779,58 @@ function parseContentDisposition(header) {
2775
2779
  }
2776
2780
  return { type, filename, filenameIsExtended, params };
2777
2781
  }
2782
+ var X_CONTENT_TYPE_OPTIONS_HEADER = "X-Content-Type-Options: nosniff";
2783
+ function buildXContentTypeOptionsHeader() {
2784
+ return {
2785
+ header: X_CONTENT_TYPE_OPTIONS_HEADER,
2786
+ value: "nosniff",
2787
+ explanation: `Tells the browser to strictly honor the declared Content-Type header instead of "sniffing" a response's bytes to guess its real type. Without it, a browser that decides an oddly-typed response looks like HTML or JavaScript may render or execute it, letting a file that was only ever meant to be downloaded or displayed as plain text be used to run a cross-site scripting attack.`
2788
+ };
2789
+ }
2790
+ function parseXContentTypeOptionsHeader(rawHeader) {
2791
+ if (typeof rawHeader !== "string" || rawHeader.trim() === "") return { error: "Provide a header line or value to check" };
2792
+ const withoutLabel = rawHeader.trim().replace(/^x-content-type-options\s*:\s*/i, "");
2793
+ const value = withoutLabel.trim();
2794
+ if (value.toLowerCase() === "nosniff") {
2795
+ return { raw: value, valid: true, message: "Valid. The browser will not MIME-sniff this response." };
2796
+ }
2797
+ if (value === "") {
2798
+ return { error: 'No value found after "X-Content-Type-Options:"' };
2799
+ }
2800
+ return { raw: value, valid: false, message: `"${value}" is not a recognized value. The only value browsers act on is "nosniff" (case-insensitive); anything else is silently ignored, same as omitting the header.` };
2801
+ }
2802
+ var X_CONTENT_TYPE_EXACT_RISK_TABLE = {
2803
+ "text/plain": { risk: "high", reason: "Browsers historically sniff text/plain responses and may render them as HTML if the body looks like markup, letting user-controlled text (comments, error pages, logs) execute as script." },
2804
+ "application/octet-stream": { risk: "high", reason: "A generic fallback type with no format hint, so browsers are the most likely to sniff its real content and may render it as HTML." },
2805
+ "": { risk: "high", reason: "A missing Content-Type header gives the browser nothing to trust, so it falls back to sniffing the response body entirely." }
2806
+ };
2807
+ var X_CONTENT_TYPE_PREFIX_RISK_TABLE = [
2808
+ { prefix: "text/html", risk: "medium", reason: "Already interpreted as HTML, so sniffing mostly matters if the type is wrong on purpose; nosniff still protects against a mismatched charset or embedded polyglot content." },
2809
+ { prefix: "image/", risk: "low", reason: 'Browsers rarely upgrade an image response to HTML, but a crafted "GIFAR"-style polyglot file can still be sniffed as HTML in older engines.' },
2810
+ { prefix: "audio/", risk: "low", reason: "Media types are rarely reinterpreted as HTML by modern sniffing algorithms." },
2811
+ { prefix: "video/", risk: "low", reason: "Media types are rarely reinterpreted as HTML by modern sniffing algorithms." },
2812
+ { prefix: "font/", risk: "low", reason: "Font types are rarely reinterpreted as HTML by modern sniffing algorithms." },
2813
+ { prefix: "application/pdf", risk: "low", reason: "PDF has a strong magic-number signature, so sniffing rarely reclassifies it, though nosniff is still worth setting for user-uploaded PDFs." },
2814
+ { prefix: "application/json", risk: "medium", reason: "Structurally distinct from HTML, but user-controlled JSONP-style responses served with a wrong or missing type have been used in real sniffing attacks." },
2815
+ { prefix: "application/javascript", risk: "medium", reason: "Already executable; nosniff mainly protects against it being served where a script tag was not expected, such as inside an <img> or <object> tag." },
2816
+ { prefix: "application/xml", risk: "medium", reason: "XML can be reinterpreted in ways that overlap with HTML/XHTML parsing in some legacy sniffing paths." }
2817
+ ];
2818
+ function assessContentTypeRisk(contentType) {
2819
+ if (typeof contentType !== "string") return { error: "contentType must be a string" };
2820
+ const normalized = contentType.trim().toLowerCase().split(";")[0].trim();
2821
+ if (normalized in X_CONTENT_TYPE_EXACT_RISK_TABLE) {
2822
+ const entry = X_CONTENT_TYPE_EXACT_RISK_TABLE[normalized];
2823
+ return { contentType: contentType.trim() || "(empty)", risk: entry.risk, reason: entry.reason };
2824
+ }
2825
+ const prefixMatch = X_CONTENT_TYPE_PREFIX_RISK_TABLE.find((e) => normalized.startsWith(e.prefix));
2826
+ if (prefixMatch) {
2827
+ return { contentType: contentType.trim(), risk: prefixMatch.risk, reason: prefixMatch.reason };
2828
+ }
2829
+ return {
2830
+ contentType: contentType.trim(),
2831
+ risk: "medium",
2832
+ reason: "Not a well-known type in this tool's lookup table. Treat any response type as sniffable unless you've confirmed the serving browser trusts it, and set nosniff regardless of type as a baseline defense."
2833
+ };
2834
+ }
2778
2835
 
2779
- export { CLIENT_HINTS, DNS_RECORD_TYPES, HTTP_HEADERS, LINK_REL_VALUES, PERMISSIONS_POLICY_FEATURES, REFERRER_POLICY_VALUES, STATUS_CODES, analyzeEmailHeaders, buildCacheControl, buildClientHints, buildContentDisposition, buildDnsQueryUrl, buildGeoUrl, buildLinkHeader, buildMapUrl, buildPermissionsPolicy, buildRangeHeader, buildReferrerPolicy, buildVaryHeader, checkSetCookieHeader, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, network_exports, parseClientHintHeaders, parseContentDisposition, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parsePermissionsPolicy, parseUserAgent, parseVaryHeader, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap };
2836
+ 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, buildCacheControl, buildClientHints, buildContentDisposition, buildDnsQueryUrl, buildGeoUrl, buildLinkHeader, buildMapUrl, buildPermissionsPolicy, buildRangeHeader, buildReferrerPolicy, buildVaryHeader, buildXContentTypeOptionsHeader, checkSetCookieHeader, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, network_exports, parseClientHintHeaders, parseContentDisposition, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parsePermissionsPolicy, parseUserAgent, parseVaryHeader, parseXContentTypeOptionsHeader, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap };
@@ -57,6 +57,7 @@ __export(code_exports, {
57
57
  testRegex: () => testRegex,
58
58
  validateEditorConfig: () => validateEditorConfig,
59
59
  validateEnvKey: () => validateEnvKey,
60
+ validatePackageExports: () => validatePackageExports,
60
61
  validateTsconfig: () => validateTsconfig
61
62
  });
62
63
  var ALL_FLAGS = ["g", "i", "m", "s", "u"];
@@ -3276,5 +3277,122 @@ function validateTsconfig(text) {
3276
3277
  const valid = !issues.some((i) => i.severity === "error");
3277
3278
  return { parsed: true, topLevelKeys, compilerOptionKeys, issues, valid };
3278
3279
  }
3280
+ function collectExportsStringLeaves(value, out = []) {
3281
+ if (typeof value === "string") out.push(value);
3282
+ else if (Array.isArray(value)) value.forEach((v) => collectExportsStringLeaves(v, out));
3283
+ else if (value && typeof value === "object") Object.values(value).forEach((v) => collectExportsStringLeaves(v, out));
3284
+ return out;
3285
+ }
3286
+ function checkExportsPatternMatch(key, value, path, issues) {
3287
+ const keyHasStar = key.includes("*");
3288
+ const leaves = collectExportsStringLeaves(value);
3289
+ if (keyHasStar) {
3290
+ const bad = leaves.filter((l) => !l.includes("*"));
3291
+ if (bad.length > 0) {
3292
+ issues.push({ severity: "error", path, message: `pattern key "${key}" contains "*" but target ${bad.map((l) => `"${l}"`).join(", ")} has no "*" to receive the matched text` });
3293
+ }
3294
+ } else {
3295
+ const bad = leaves.filter((l) => l.includes("*"));
3296
+ if (bad.length > 0) {
3297
+ issues.push({ severity: "error", path, message: `target ${bad.map((l) => `"${l}"`).join(", ")} contains "*" but key "${key}" has no "*" pattern to match against` });
3298
+ }
3299
+ }
3300
+ }
3301
+ function validateExportsValue(value, path, issues) {
3302
+ if (value === null) return;
3303
+ if (typeof value === "string") {
3304
+ if (!value.startsWith("./")) {
3305
+ issues.push({ severity: "error", path, message: `target "${value}" must start with "./"` });
3306
+ }
3307
+ return;
3308
+ }
3309
+ if (Array.isArray(value)) {
3310
+ if (value.length === 0) {
3311
+ issues.push({ severity: "warning", path, message: "empty fallback array will never resolve" });
3312
+ }
3313
+ value.forEach((v, i) => validateExportsValue(v, `${path}[${i}]`, issues));
3314
+ return;
3315
+ }
3316
+ if (typeof value === "object") {
3317
+ const obj = value;
3318
+ const keys = Object.keys(obj);
3319
+ if (keys.length === 0) {
3320
+ issues.push({ severity: "warning", path, message: "empty object will never resolve" });
3321
+ return;
3322
+ }
3323
+ const hasDotKeys = keys.some((k) => k.startsWith("."));
3324
+ const hasNonDotKeys = keys.some((k) => !k.startsWith("."));
3325
+ if (hasDotKeys && hasNonDotKeys) {
3326
+ issues.push({ severity: "error", path, message: 'cannot mix subpath keys (starting with ".") with condition keys in the same object' });
3327
+ return;
3328
+ }
3329
+ if (hasDotKeys) {
3330
+ for (const key of keys) {
3331
+ const subpath = `${path}["${key}"]`;
3332
+ if (key !== "." && !key.startsWith("./")) {
3333
+ issues.push({ severity: "error", path: subpath, message: `subpath key "${key}" must be "." or start with "./"` });
3334
+ }
3335
+ checkExportsPatternMatch(key, obj[key], subpath, issues);
3336
+ validateExportsValue(obj[key], subpath, issues);
3337
+ }
3338
+ return;
3339
+ }
3340
+ if (keys.includes("types") && keys[0] !== "types") {
3341
+ issues.push({ severity: "warning", path, message: '"types" condition should be listed first so TypeScript resolves it before any other condition matches' });
3342
+ }
3343
+ if (keys.includes("default") && keys[keys.length - 1] !== "default") {
3344
+ issues.push({ severity: "warning", path, message: '"default" condition should be listed last; conditions are matched in order and anything after "default" is unreachable' });
3345
+ }
3346
+ if ((keys.includes("import") || keys.includes("require")) && !keys.includes("default")) {
3347
+ issues.push({ severity: "warning", path, message: 'no "default" fallback condition; resolution fails for any importer using a condition not listed here' });
3348
+ }
3349
+ const requireVal = obj.require;
3350
+ if (typeof requireVal === "string" && requireVal.endsWith(".mjs")) {
3351
+ issues.push({ severity: "error", path: `${path}.require`, message: `"require" condition points to a .mjs file ("${requireVal}"), but .mjs is always treated as ESM and cannot be required` });
3352
+ }
3353
+ const importVal = obj.import;
3354
+ if (typeof importVal === "string" && importVal.endsWith(".cjs")) {
3355
+ issues.push({ severity: "error", path: `${path}.import`, message: `"import" condition points to a .cjs file ("${importVal}"), but .cjs is always treated as CommonJS and cannot be imported as ESM` });
3356
+ }
3357
+ for (const key of keys) {
3358
+ validateExportsValue(obj[key], `${path}.${key}`, issues);
3359
+ }
3360
+ return;
3361
+ }
3362
+ issues.push({ severity: "error", path, message: `unexpected value type at "${path}"` });
3363
+ }
3364
+ function validatePackageExports(packageJsonText) {
3365
+ if (!packageJsonText || !packageJsonText.trim()) return { error: "Input is empty" };
3366
+ let parsed;
3367
+ try {
3368
+ parsed = JSON.parse(packageJsonText);
3369
+ } catch (e) {
3370
+ return { error: `Invalid JSON: ${e.message}` };
3371
+ }
3372
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
3373
+ return { error: "Root of package.json must be an object" };
3374
+ }
3375
+ const obj = parsed;
3376
+ if (!("exports" in obj)) return { error: 'package.json has no "exports" field' };
3377
+ const exportsValue = obj.exports;
3378
+ const issues = [];
3379
+ let exportsShape;
3380
+ if (exportsValue === null) {
3381
+ exportsShape = "null";
3382
+ } else if (typeof exportsValue === "string") {
3383
+ exportsShape = "string";
3384
+ } else if (Array.isArray(exportsValue)) {
3385
+ exportsShape = "array";
3386
+ } else if (typeof exportsValue === "object") {
3387
+ const keys = Object.keys(exportsValue);
3388
+ exportsShape = keys.some((k) => k.startsWith(".")) ? "subpaths" : "conditions";
3389
+ } else {
3390
+ return { error: '"exports" must be a string, array, object, or null' };
3391
+ }
3392
+ validateExportsValue(exportsValue, "exports", issues);
3393
+ const subpaths = exportsShape === "subpaths" ? Object.keys(exportsValue) : ["."];
3394
+ const valid = !issues.some((i) => i.severity === "error");
3395
+ return { parsed: true, exportsShape, subpaths, issues, valid };
3396
+ }
3279
3397
 
3280
- export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateEditorConfig, validateEnvKey, validateTsconfig };
3398
+ export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateEditorConfig, validateEnvKey, validatePackageExports, validateTsconfig };
@@ -27,6 +27,7 @@ __export(units_exports, {
27
27
  calculateCdMaturity: () => calculateCdMaturity,
28
28
  calculateChange: () => calculateChange,
29
29
  calculateCompoundInterest: () => calculateCompoundInterest,
30
+ calculateCreditUtilization: () => calculateCreditUtilization,
30
31
  calculateDepreciationSchedule: () => calculateDepreciationSchedule,
31
32
  calculateDiscount: () => calculateDiscount,
32
33
  calculateEmi: () => calculateEmi,
@@ -2190,5 +2191,47 @@ function calculateGpa(courses) {
2190
2191
  gpa: round22(totalQualityPoints / totalCredits)
2191
2192
  };
2192
2193
  }
2194
+ function _classifyUtilization(percent) {
2195
+ if (percent < 10) return "excellent";
2196
+ if (percent < 30) return "good";
2197
+ if (percent < 50) return "fair";
2198
+ return "poor";
2199
+ }
2200
+ function calculateCreditUtilization(accounts) {
2201
+ if (!Array.isArray(accounts) || accounts.length === 0) {
2202
+ return { error: "accounts must be a non-empty array" };
2203
+ }
2204
+ const round22 = (n) => Math.round(n * 100) / 100;
2205
+ let totalBalance = 0;
2206
+ let totalLimit = 0;
2207
+ const results = [];
2208
+ for (let i = 0; i < accounts.length; i++) {
2209
+ const account = accounts[i];
2210
+ if (typeof account.balance !== "number" || !Number.isFinite(account.balance) || account.balance < 0) {
2211
+ return { error: `account ${i + 1}: balance must be a finite, non-negative number` };
2212
+ }
2213
+ if (typeof account.limit !== "number" || !Number.isFinite(account.limit) || account.limit <= 0) {
2214
+ return { error: `account ${i + 1}: limit must be a finite number greater than zero` };
2215
+ }
2216
+ const utilizationPercent = round22(account.balance / account.limit * 100);
2217
+ totalBalance += account.balance;
2218
+ totalLimit += account.limit;
2219
+ results.push({
2220
+ label: account.label?.trim() || `Account ${i + 1}`,
2221
+ balance: account.balance,
2222
+ limit: account.limit,
2223
+ utilizationPercent,
2224
+ tier: _classifyUtilization(utilizationPercent)
2225
+ });
2226
+ }
2227
+ const overallUtilizationPercent = round22(totalBalance / totalLimit * 100);
2228
+ return {
2229
+ accounts: results,
2230
+ totalBalance: round22(totalBalance),
2231
+ totalLimit: round22(totalLimit),
2232
+ overallUtilizationPercent,
2233
+ overallTier: _classifyUtilization(overallUtilizationPercent)
2234
+ };
2235
+ }
2193
2236
 
2194
- export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateGpa, calculateLoan, calculateMarginMarkup, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx };
2237
+ export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateGpa, calculateLoan, calculateMarginMarkup, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx };
@@ -24,6 +24,7 @@
24
24
  * - gitignore-tester (testGitignorePatterns)
25
25
  * - editorconfig-validator (validateEditorConfig)
26
26
  * - tsconfig-validator (validateTsconfig)
27
+ * - package-json-exports-validator (validatePackageExports)
27
28
  */
28
29
  type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u';
29
30
  declare const ALL_FLAGS: RegexFlag[];
@@ -449,6 +450,27 @@ interface TsconfigValidationResult {
449
450
  declare function validateTsconfig(text: string): TsconfigValidationResult | {
450
451
  error: string;
451
452
  };
453
+ interface ExportsIssue {
454
+ severity: 'error' | 'warning';
455
+ path: string;
456
+ message: string;
457
+ }
458
+ type ExportsShape = 'string' | 'array' | 'conditions' | 'subpaths' | 'null';
459
+ interface ExportsValidationResult {
460
+ parsed: true;
461
+ exportsShape: ExportsShape;
462
+ subpaths: string[];
463
+ issues: ExportsIssue[];
464
+ valid: boolean;
465
+ }
466
+ /**
467
+ * Validate a package.json's "exports" field: flag common dual-package
468
+ * (ESM/CJS) misconfigurations. Accepts the full package.json text (only the
469
+ * "exports" field is read).
470
+ */
471
+ declare function validatePackageExports(packageJsonText: string): ExportsValidationResult | {
472
+ error: string;
473
+ };
452
474
 
453
475
  declare const code_ALL_FLAGS: typeof ALL_FLAGS;
454
476
  type code_ApiEndpoint = ApiEndpoint;
@@ -470,6 +492,9 @@ type code_EditorConfigSection = EditorConfigSection;
470
492
  type code_EditorConfigValidationResult = EditorConfigValidationResult;
471
493
  type code_EnvEntry = EnvEntry;
472
494
  type code_EnvParseResult = EnvParseResult;
495
+ type code_ExportsIssue = ExportsIssue;
496
+ type code_ExportsShape = ExportsShape;
497
+ type code_ExportsValidationResult = ExportsValidationResult;
473
498
  type code_GitCommandConfig = GitCommandConfig;
474
499
  type code_GitCommandResult = GitCommandResult;
475
500
  type code_GitOperation = GitOperation;
@@ -551,9 +576,10 @@ declare const code_testPattern: typeof testPattern;
551
576
  declare const code_testRegex: typeof testRegex;
552
577
  declare const code_validateEditorConfig: typeof validateEditorConfig;
553
578
  declare const code_validateEnvKey: typeof validateEnvKey;
579
+ declare const code_validatePackageExports: typeof validatePackageExports;
554
580
  declare const code_validateTsconfig: typeof validateTsconfig;
555
581
  declare namespace code {
556
- export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, 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_DockerImageRef as DockerImageRef, 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_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_MIME_TABLE as MIME_TABLE, type code_MatchResult as MatchResult, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, 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_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, 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_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, 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_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_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_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateTsconfig as validateTsconfig };
582
+ export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, 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_DockerImageRef as DockerImageRef, 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_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_MIME_TABLE as MIME_TABLE, type code_MatchResult as MatchResult, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, 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_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, 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_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, 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_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_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_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
557
583
  }
558
584
 
559
- export { type TsconfigIssue as $, ALL_FLAGS as A, type MatchResult as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EditorConfigIssue as E, type MimeEntry as F, type GitCommandConfig as G, type HtmlFormatResult as H, type MimeLookupResult as I, type JsMinifyOptions as J, type RedosResult as K, type RedosSeverity as L, MIME_TABLE as M, type RegexError as N, OPERATIONS as O, type ParsedSpec as P, type RegexFlag as Q, type RedosFinding as R, type RegexMatch as S, type RegexResult as T, type RegexSuccess as U, SQL_DEFAULT_OPTIONS as V, type Segment as W, type SpecVersion as X, type SqlDialect as Y, type SqlFormatOptions as Z, type TestPatternResult as _, type ApiEndpoint as a, type TsconfigValidationResult as a0, buildDockerPull as a1, buildDockerRun as a2, buildGitCommand as a3, collapseHtmlWhitespace as a4, collapseJsWhitespace as a5, countProperties as a6, countRules as a7, detectDialect as a8, detectOperationType as a9, removeEmptyAttributes as aA, removeHtmlComments as aB, removeJsComments as aC, removeRedundantAttributes as aD, searchCheatsheet as aE, searchEndpoints as aF, splitStatements as aG, testGitignorePatterns as aH, testPattern as aI, testRegex as aJ, validateEditorConfig as aK, validateEnvKey as aL, validateTsconfig as aM, detectRedos as aa, envToExport as ab, envToJson as ac, formatCss as ad, formatGql as ae, formatHtml as af, formatSql as ag, getEndpointsByTag as ah, getHtmlStats as ai, getJsStats as aj, getMethodColor as ak, isValidTag as al, lintConventionalCommit as am, lookupMime as an, minifyCss as ao, minifyGql as ap, minifyHtml as aq, minifyJs as ar, minifySql as as, normalizeRef as at, parseDockerImage as au, parseEnv as av, parseGitCommand as aw, parseGithubUrl as ax, parseSpec as ay, removeConsoleCalls as az, type ApiInfo as b, code as c, type CheatsheetEntry as d, type ConventionalCommitFinding as e, type ConventionalCommitFooter as f, type ConventionalCommitOptions as g, type ConventionalCommitParsed as h, type ConventionalCommitResult as i, type ConventionalCommitSeverity as j, type CssResult as k, type DockerImageRef as l, type EditorConfigProperty as m, type EditorConfigSection as n, type EditorConfigValidationResult as o, type EnvEntry as p, type EnvParseResult as q, type GitCommandResult as r, type GitOperation as s, type GithubUrlInfo as t, type GithubUrlType as u, type GitignoreTestResult as v, type GqlFormatResult as w, type HtmlMinifyOptions as x, type HtmlMinifyResult as y, type JsMinifyResult as z };
585
+ export { type SqlDialect as $, ALL_FLAGS as A, type HtmlMinifyOptions as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EditorConfigIssue as E, type HtmlMinifyResult as F, type GitCommandConfig as G, type HtmlFormatResult as H, type JsMinifyResult as I, type JsMinifyOptions as J, type MatchResult as K, type MimeEntry as L, MIME_TABLE as M, type MimeLookupResult as N, OPERATIONS as O, type ParsedSpec as P, type RedosResult as Q, type RedosFinding as R, type RedosSeverity as S, type RegexError as T, type RegexFlag as U, type RegexMatch as V, type RegexResult as W, type RegexSuccess as X, SQL_DEFAULT_OPTIONS as Y, type Segment as Z, type SpecVersion as _, type ApiEndpoint as a, type SqlFormatOptions as a0, type TestPatternResult as a1, type TsconfigIssue as a2, type TsconfigValidationResult as a3, buildDockerPull as a4, buildDockerRun as a5, buildGitCommand as a6, collapseHtmlWhitespace as a7, collapseJsWhitespace as a8, countProperties as a9, parseGithubUrl as aA, parseSpec as aB, removeConsoleCalls as aC, removeEmptyAttributes as aD, removeHtmlComments as aE, removeJsComments as aF, removeRedundantAttributes as aG, searchCheatsheet as aH, searchEndpoints as aI, splitStatements as aJ, testGitignorePatterns as aK, testPattern as aL, testRegex as aM, validateEditorConfig as aN, validateEnvKey as aO, validatePackageExports as aP, validateTsconfig as aQ, countRules as aa, detectDialect as ab, detectOperationType as ac, detectRedos as ad, envToExport as ae, envToJson as af, formatCss as ag, formatGql as ah, formatHtml as ai, formatSql as aj, getEndpointsByTag as ak, getHtmlStats as al, getJsStats as am, getMethodColor as an, isValidTag as ao, lintConventionalCommit as ap, lookupMime as aq, minifyCss as ar, minifyGql as as, minifyHtml as at, minifyJs as au, minifySql as av, normalizeRef as aw, parseDockerImage as ax, parseEnv as ay, parseGitCommand as az, type ApiInfo as b, code as c, type CheatsheetEntry as d, type ConventionalCommitFinding as e, type ConventionalCommitFooter as f, type ConventionalCommitOptions as g, type ConventionalCommitParsed as h, type ConventionalCommitResult as i, type ConventionalCommitSeverity as j, type CssResult as k, type DockerImageRef as l, type EditorConfigProperty as m, type EditorConfigSection as n, type EditorConfigValidationResult as o, type EnvEntry as p, type EnvParseResult as q, type ExportsIssue as r, type ExportsShape as s, type ExportsValidationResult as t, type GitCommandResult as u, type GitOperation as v, type GithubUrlInfo as w, type GithubUrlType as x, type GitignoreTestResult as y, type GqlFormatResult as z };