@utilix-tech/sdk 0.62.0 → 0.64.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,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.64.0
6
+ - Add `calculateLoanRefinance` (loan-refinance-calculator): compare a current loan's remaining payments against a new refinanced loan on the same outstanding balance, and compute the monthly savings and the break-even month where cumulative savings recoup the closing costs.
7
+ - Add `extractMultipartBoundary`, `parseMultipartFormData` (multipart-form-parser): parse a raw multipart/form-data request body into its individual parts (field name, filename, headers, decoded value) per RFC 7578, or extract the boundary from a Content-Type header value.
8
+
9
+ ## 0.63.0
10
+ - Add `planDebtPayoff` (debt-payoff-planner): simulate paying off a list of debts under both the snowball (smallest balance first) and avalanche (highest rate first) strategies given a fixed extra monthly payment, and compare months to payoff and total interest.
11
+ - Add `auditDependencyRanges` (package-json-dependency-auditor): classify each dependency's version specifier range type and flag wildcard ranges, the "latest" tag, git/URL/file/link dependencies, and packages listed with conflicting or redundant ranges across sections.
12
+
5
13
  ## 0.62.0
6
14
  - Add `buildPriorityHeader`, `parsePriorityHeader` (priority-header): build an HTTP Priority request/response-header value from an urgency (0-7) and/or an incremental flag per RFC 9218, or parse an existing one into the same shape.
7
15
  - Add `lookupCloseCode`, `listCloseCodes` (websocket-close-codes): look up what a WebSocket close code means per RFC 6455 and the IANA reserved ranges, or list every well-known code.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @utilix-tech/sdk
2
2
 
3
- **670 developer utility functions for Node.js: runs locally, no API key required.**
3
+ **672 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)
@@ -343,7 +343,7 @@ formatIso8601Duration(90061); // { iso: "P1DT1H1M1S", ... }
343
343
  ### `/units`: Conversions
344
344
 
345
345
  ```ts
346
- 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, calculateDebtToIncomeRatio, calculateBlendedLoanRate, calculateFreelancerRate, calculateExtraPaymentPayoff } from "@utilix-tech/sdk/units";
346
+ 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, calculateDebtToIncomeRatio, calculateBlendedLoanRate, calculateFreelancerRate, calculateExtraPaymentPayoff, calculateLoanRefinance } from "@utilix-tech/sdk/units";
347
347
 
348
348
  // File sizes
349
349
  convertBytes(1073741824, "GB"); // 1
@@ -493,6 +493,14 @@ calculateFreelancerRate({ targetAnnualIncome: 80000, billableHoursPerWeek: 25, w
493
493
  // How much sooner a loan pays off, and how much interest is saved, with a fixed extra monthly payment
494
494
  calculateExtraPaymentPayoff(200000, 6, 360, 200);
495
495
  // { monthlyPayment: 1199.1, newPayoffMonths: 252, monthsSaved: 108, interestSaved: 79800.86, ... }
496
+
497
+ // Debt snowball vs avalanche payoff simulation with a fixed extra monthly payment
498
+ planDebtPayoff([{ label: "Credit card", balance: 4000, ratePercent: 22, minPayment: 100 }, { label: "Car loan", balance: 12000, ratePercent: 6, minPayment: 250 }], 200);
499
+ // { snowball: { monthsToPayoff, totalInterestPaid, order, schedule }, avalanche: { ... }, comparison: { fasterStrategy, cheaperStrategy, ... } }
500
+
501
+ // Loan refinance break-even: monthly savings and the month closing costs are recouped
502
+ calculateLoanRefinance(300000, 6.5, 300, 5.5, 300, 6000);
503
+ // { monthlySavings: 183.36, breakEvenMonths: 33, currentTotalInterest: 307687.31, newTotalInterest: 252679.7, ... }
496
504
  ```
497
505
 
498
506
  ---
@@ -510,7 +518,8 @@ import { getStatusCode, isValidIp, isValidIpv4, isValidIpv6,
510
518
  buildXContentTypeOptionsHeader, parseXContentTypeOptionsHeader, assessContentTypeRisk,
511
519
  buildAcceptLanguage, parseAcceptLanguage,
512
520
  buildPreferHeader, parsePreferHeader,
513
- buildRetryAfterHeader, parseRetryAfterHeader } from "@utilix-tech/sdk/network";
521
+ buildRetryAfterHeader, parseRetryAfterHeader,
522
+ extractMultipartBoundary, parseMultipartFormData } from "@utilix-tech/sdk/network";
514
523
 
515
524
  getStatusCode(404);
516
525
  // { code: 404, text: "Not Found", description: "...", category: "Client Error" }
@@ -659,6 +668,14 @@ lookupCloseCode(1006);
659
668
  // List every well-known WebSocket close code (1000-1015)
660
669
  listCloseCodes();
661
670
  // [{ code: 1000, name: "Normal Closure", ... }, ...]
671
+
672
+ // Parse a raw multipart/form-data request body into its individual parts, per RFC 7578
673
+ parseMultipartFormData('--X\r\nContent-Disposition: form-data; name="a"\r\n\r\nhello\r\n--X--\r\n', "X");
674
+ // { boundary: "X", parts: [{ name: "a", filename: null, headers: {...}, value: "hello", isBinary: false }] }
675
+
676
+ // Extract the boundary parameter from a Content-Type header value
677
+ extractMultipartBoundary("multipart/form-data; boundary=----WebKitFormBoundaryABC123");
678
+ // "----WebKitFormBoundaryABC123"
662
679
  ```
663
680
 
664
681
  ---
@@ -761,6 +778,10 @@ validateTsconfig(JSON.stringify({ compilerOptions: { target: "ES2020", strict: t
761
778
  // Validate a package.json "exports" field for dual-package (ESM/CJS) misconfigurations
762
779
  validatePackageExports(JSON.stringify({ exports: { import: "./index.mjs", require: "./index.cjs", default: "./index.cjs" } }));
763
780
  // { parsed: true, exportsShape: "conditions", subpaths: ["."], issues: [], valid: true }
781
+
782
+ // Classify each package.json dependency's version range and flag wildcards, "latest", git/URL/file deps, and conflicting duplicates
783
+ auditDependencyRanges(JSON.stringify({ dependencies: { lodash: "^4.17.21", "left-pad": "*" } }));
784
+ // { totalDependencies: 2, dependencies: [{ name: "lodash", rangeType: "caret", issues: [] }, { name: "left-pad", rangeType: "wildcard", issues: [...] }], duplicates: [], issues: [...] }
764
785
  ```
765
786
 
766
787
  ---
@@ -917,10 +938,10 @@ inspectGifFrames(new Uint8Array(gifBytes));
917
938
  | `@utilix-tech/sdk/data` | CSV, YAML, TOML, XML, INI, NDJSON parse and convert, NDJSON record deduplicator, SRT/WebVTT subtitles, Markdown front matter parser, YAML anchor/alias resolver, CSV column type inferencer |
918
939
  | `@utilix-tech/sdk/generators` | UUID v4/v7, ULID, passwords, strength check, entropy estimator, fake data, CSP nonce generator |
919
940
  | `@utilix-tech/sdk/time` | Date diff, timezone convert, cron parse, relative time |
920
- | `@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, debt-to-income ratio calculator, freelancer hourly rate calculator |
941
+ | `@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, debt-to-income ratio calculator, freelancer hourly rate calculator, debt snowball/avalanche payoff planner |
921
942
  | `@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, Prefer header builder/parser (RFC 7240), Retry-After header builder/parser (RFC 9110), Priority header builder/parser (RFC 9218), WebSocket close code reference/lookup |
922
943
  | `@utilix-tech/sdk/api` | cURL build/parse, JWT decode/sign, JWKS parse, CORS headers, CSP header |
923
- | `@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 |
944
+ | `@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 |
924
945
  | `@utilix-tech/sdk/color` | Hex/RGB/HSL/HSV/CMYK convert, palette generation, contrast check |
925
946
  | `@utilix-tech/sdk/css` | CSS gradient, box-shadow, border-radius, keyframe animation generators |
926
947
  | `@utilix-tech/sdk/misc` | SVG optimize/sanitize, file size format, Unicode inspector |
@@ -37,6 +37,7 @@ __export(units_exports, {
37
37
  calculateFreelancerRate: () => calculateFreelancerRate,
38
38
  calculateGpa: () => calculateGpa,
39
39
  calculateLoan: () => calculateLoan,
40
+ calculateLoanRefinance: () => calculateLoanRefinance,
40
41
  calculateMarginMarkup: () => calculateMarginMarkup,
41
42
  calculateMovingAverages: () => calculateMovingAverages,
42
43
  calculatePaybackPeriod: () => calculatePaybackPeriod,
@@ -87,6 +88,7 @@ __export(units_exports, {
87
88
  permissionsToChmod: () => permissionsToChmod,
88
89
  permissionsToOctal: () => permissionsToOctal,
89
90
  permissionsToSymbolic: () => permissionsToSymbolic,
91
+ planDebtPayoff: () => planDebtPayoff,
90
92
  ptToPx: () => ptToPx,
91
93
  pxToAll: () => pxToAll,
92
94
  pxToViewport: () => pxToViewport,
@@ -2381,5 +2383,125 @@ function calculateFreelancerRate(input) {
2381
2383
  monthlyRevenueTarget: round22(requiredAnnualRevenue / 12)
2382
2384
  };
2383
2385
  }
2386
+ var DEBT_PAYOFF_MAX_MONTHS = 1200;
2387
+ function _simulateDebtPayoff(debts, order, extraMonthlyPayment) {
2388
+ const round22 = (n) => Math.round(n * 100) / 100;
2389
+ const balances = debts.map((d) => d.balance);
2390
+ const totalMinPayment = debts.reduce((sum, d) => sum + d.minPayment, 0);
2391
+ const totalBudget = totalMinPayment + extraMonthlyPayment;
2392
+ let totalInterestPaid = 0;
2393
+ let totalPaid = 0;
2394
+ const schedule = [];
2395
+ let month = 0;
2396
+ while (balances.some((b) => b > 5e-3) && month < DEBT_PAYOFF_MAX_MONTHS) {
2397
+ month++;
2398
+ for (let i = 0; i < balances.length; i++) {
2399
+ if (balances[i] <= 0) continue;
2400
+ const interest = balances[i] * debts[i].ratePercent / 100 / 12;
2401
+ balances[i] += interest;
2402
+ totalInterestPaid += interest;
2403
+ }
2404
+ let remainingBudget = totalBudget;
2405
+ for (let i = 0; i < balances.length; i++) {
2406
+ if (balances[i] <= 0) continue;
2407
+ const pay = Math.min(balances[i], debts[i].minPayment);
2408
+ balances[i] -= pay;
2409
+ remainingBudget -= pay;
2410
+ totalPaid += pay;
2411
+ }
2412
+ for (const i of order) {
2413
+ if (remainingBudget <= 0) break;
2414
+ if (balances[i] <= 0) continue;
2415
+ const pay = Math.min(balances[i], remainingBudget);
2416
+ balances[i] -= pay;
2417
+ remainingBudget -= pay;
2418
+ totalPaid += pay;
2419
+ }
2420
+ for (const i of order) {
2421
+ if (balances[i] <= 5e-3 && !schedule.some((s) => s.label === debts[i].label)) {
2422
+ schedule.push({ label: debts[i].label, monthPaidOff: month });
2423
+ }
2424
+ }
2425
+ }
2426
+ if (balances.some((b) => b > 5e-3)) return null;
2427
+ return {
2428
+ order: order.map((i) => debts[i].label),
2429
+ monthsToPayoff: month,
2430
+ totalInterestPaid: round22(totalInterestPaid),
2431
+ totalPaid: round22(totalPaid),
2432
+ schedule
2433
+ };
2434
+ }
2435
+ function planDebtPayoff(debts, extraMonthlyPayment = 0) {
2436
+ if (!Array.isArray(debts) || debts.length === 0) {
2437
+ return { error: "debts must be a non-empty array" };
2438
+ }
2439
+ if (!Number.isFinite(extraMonthlyPayment) || extraMonthlyPayment < 0) {
2440
+ return { error: "extraMonthlyPayment must be a finite, non-negative number" };
2441
+ }
2442
+ const normalized = [];
2443
+ for (let i = 0; i < debts.length; i++) {
2444
+ const d = debts[i];
2445
+ if (typeof d.balance !== "number" || !Number.isFinite(d.balance) || d.balance <= 0) {
2446
+ return { error: `debt ${i + 1}: balance must be a finite number greater than zero` };
2447
+ }
2448
+ if (typeof d.ratePercent !== "number" || !Number.isFinite(d.ratePercent) || d.ratePercent < 0) {
2449
+ return { error: `debt ${i + 1}: ratePercent must be a finite, non-negative number` };
2450
+ }
2451
+ if (typeof d.minPayment !== "number" || !Number.isFinite(d.minPayment) || d.minPayment <= 0) {
2452
+ return { error: `debt ${i + 1}: minPayment must be a finite number greater than zero` };
2453
+ }
2454
+ normalized.push({
2455
+ label: d.label?.trim() || `Debt ${i + 1}`,
2456
+ balance: d.balance,
2457
+ ratePercent: d.ratePercent,
2458
+ minPayment: d.minPayment
2459
+ });
2460
+ }
2461
+ const snowballOrder = normalized.map((_, i) => i).sort((a, b) => normalized[a].balance - normalized[b].balance);
2462
+ const avalancheOrder = normalized.map((_, i) => i).sort((a, b) => normalized[b].ratePercent - normalized[a].ratePercent);
2463
+ const snowball = _simulateDebtPayoff(normalized, snowballOrder, extraMonthlyPayment);
2464
+ const avalanche = _simulateDebtPayoff(normalized, avalancheOrder, extraMonthlyPayment);
2465
+ if (!snowball || !avalanche) {
2466
+ return { error: `debts cannot be paid off within ${DEBT_PAYOFF_MAX_MONTHS} months at this payment level; increase a minimum payment or the extra monthly payment` };
2467
+ }
2468
+ const round22 = (n) => Math.round(n * 100) / 100;
2469
+ const monthsDifference = Math.abs(snowball.monthsToPayoff - avalanche.monthsToPayoff);
2470
+ const interestDifference = round22(Math.abs(snowball.totalInterestPaid - avalanche.totalInterestPaid));
2471
+ return {
2472
+ debts: normalized,
2473
+ totalMonthlyBudget: round22(normalized.reduce((sum, d) => sum + d.minPayment, 0) + extraMonthlyPayment),
2474
+ extraMonthlyPayment,
2475
+ snowball,
2476
+ avalanche,
2477
+ comparison: {
2478
+ fasterStrategy: snowball.monthsToPayoff === avalanche.monthsToPayoff ? "tie" : snowball.monthsToPayoff < avalanche.monthsToPayoff ? "snowball" : "avalanche",
2479
+ monthsDifference,
2480
+ cheaperStrategy: snowball.totalInterestPaid === avalanche.totalInterestPaid ? "tie" : snowball.totalInterestPaid < avalanche.totalInterestPaid ? "snowball" : "avalanche",
2481
+ interestDifference
2482
+ }
2483
+ };
2484
+ }
2485
+ function calculateLoanRefinance(currentBalance, currentRatePercent, currentRemainingMonths, newRatePercent, newTermMonths, closingCosts) {
2486
+ const current = calculateLoan(currentBalance, currentRatePercent, currentRemainingMonths);
2487
+ if ("error" in current) return current;
2488
+ const refinanced = calculateLoan(currentBalance, newRatePercent, newTermMonths);
2489
+ if ("error" in refinanced) return refinanced;
2490
+ if (!Number.isFinite(closingCosts) || closingCosts < 0) {
2491
+ return { error: "Closing costs must be zero or a positive number" };
2492
+ }
2493
+ const monthlySavings = round2(current.monthlyPayment - refinanced.monthlyPayment);
2494
+ const breakEvenMonths = monthlySavings > 0 ? Math.ceil(closingCosts / monthlySavings) : null;
2495
+ return {
2496
+ currentMonthlyPayment: current.monthlyPayment,
2497
+ newMonthlyPayment: refinanced.monthlyPayment,
2498
+ monthlySavings,
2499
+ closingCosts: round2(closingCosts),
2500
+ breakEvenMonths,
2501
+ currentTotalInterest: current.totalInterest,
2502
+ newTotalInterest: refinanced.totalInterest,
2503
+ totalInterestSavings: round2(current.totalInterest - refinanced.totalInterest)
2504
+ };
2505
+ }
2384
2506
 
2385
- 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, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, 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 };
2507
+ 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, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanRefinance, 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, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx };
@@ -31,6 +31,7 @@ __export(network_exports, {
31
31
  buildXContentTypeOptionsHeader: () => buildXContentTypeOptionsHeader,
32
32
  checkSetCookieHeader: () => checkSetCookieHeader,
33
33
  countryCodeToFlag: () => countryCodeToFlag,
34
+ extractMultipartBoundary: () => extractMultipartBoundary,
34
35
  formatCoordinates: () => formatCoordinates,
35
36
  formatTtl: () => formatTtl,
36
37
  getByCategory: () => getByCategory,
@@ -54,6 +55,7 @@ __export(network_exports, {
54
55
  parseGeoResponse: () => parseGeoResponse,
55
56
  parseHar: () => parseHar,
56
57
  parseIpv6Address: () => parseIpv6Address,
58
+ parseMultipartFormData: () => parseMultipartFormData,
57
59
  parsePermissionsPolicy: () => parsePermissionsPolicy,
58
60
  parsePreferHeader: () => parsePreferHeader,
59
61
  parsePriorityHeader: () => parsePriorityHeader,
@@ -3114,5 +3116,53 @@ function lookupCloseCode(code) {
3114
3116
  }
3115
3117
  return { error: `${code} is outside the defined close code ranges (0-4999); codes 5000 and above have no assigned meaning` };
3116
3118
  }
3119
+ function extractMultipartBoundary(contentType) {
3120
+ if (!contentType) return null;
3121
+ const match = contentType.match(/boundary=(?:"([^"]*)"|([^;\s]+))/i);
3122
+ if (!match) return null;
3123
+ return match[1] ?? match[2] ?? null;
3124
+ }
3125
+ function parseMultipartFormData(body, boundary) {
3126
+ if (!body || !body.trim()) return { error: "Body is empty" };
3127
+ if (!boundary || !boundary.trim()) return { error: "Boundary is required" };
3128
+ const normalized = body.replace(/\r\n/g, "\n");
3129
+ const delimiter = `--${boundary}`;
3130
+ const segments = normalized.split(delimiter);
3131
+ if (segments.length < 3) {
3132
+ return { error: `No parts found for boundary "${boundary}"; check that it matches the boundary used in the body` };
3133
+ }
3134
+ const parts = [];
3135
+ for (let i = 1; i < segments.length; i++) {
3136
+ let segment = segments[i];
3137
+ if (segment.startsWith("--")) break;
3138
+ segment = segment.replace(/^\n/, "").replace(/\n$/, "");
3139
+ const headerEnd = segment.indexOf("\n\n");
3140
+ if (headerEnd === -1) continue;
3141
+ const headerBlock = segment.slice(0, headerEnd);
3142
+ const value = segment.slice(headerEnd + 2);
3143
+ const headers = {};
3144
+ for (const line of headerBlock.split("\n")) {
3145
+ const colon = line.indexOf(":");
3146
+ if (colon === -1) continue;
3147
+ headers[line.slice(0, colon).trim().toLowerCase()] = line.slice(colon + 1).trim();
3148
+ }
3149
+ const disposition = headers["content-disposition"] ?? "";
3150
+ const nameMatch = disposition.match(/name="([^"]*)"/);
3151
+ const filenameMatch = disposition.match(/filename="([^"]*)"/);
3152
+ const partContentType = headers["content-type"] ?? "";
3153
+ const isBinary = !!filenameMatch && !partContentType.startsWith("text/") && !partContentType.includes("json") && !partContentType.includes("xml");
3154
+ parts.push({
3155
+ name: nameMatch ? nameMatch[1] : null,
3156
+ filename: filenameMatch ? filenameMatch[1] : null,
3157
+ headers,
3158
+ value,
3159
+ isBinary
3160
+ });
3161
+ }
3162
+ if (parts.length === 0) {
3163
+ return { error: `No parts found for boundary "${boundary}"; check that it matches the boundary used in the body` };
3164
+ }
3165
+ return { boundary, parts };
3166
+ }
3117
3167
 
3118
- 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, buildClientHints, buildContentDisposition, buildDnsQueryUrl, buildGeoUrl, buildLinkHeader, buildMapUrl, buildPermissionsPolicy, buildPreferHeader, buildPriorityHeader, buildRangeHeader, buildReferrerPolicy, buildRetryAfterHeader, buildVaryHeader, buildXContentTypeOptionsHeader, checkSetCookieHeader, countryCodeToFlag, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, listCloseCodes, lookupCloseCode, network_exports, parseAcceptLanguage, parseClientHintHeaders, parseContentDisposition, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parsePermissionsPolicy, parsePreferHeader, parsePriorityHeader, parseRetryAfterHeader, parseUserAgent, parseVaryHeader, parseXContentTypeOptionsHeader, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap };
3168
+ 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, buildClientHints, buildContentDisposition, buildDnsQueryUrl, buildGeoUrl, buildLinkHeader, buildMapUrl, buildPermissionsPolicy, buildPreferHeader, buildPriorityHeader, buildRangeHeader, buildReferrerPolicy, buildRetryAfterHeader, buildVaryHeader, buildXContentTypeOptionsHeader, checkSetCookieHeader, countryCodeToFlag, extractMultipartBoundary, formatCoordinates, formatTtl, getByCategory, getHeader, getHeadersByCategory, getStatusByCategory, getStatusCode, isClientError, isServerError, isSuccess, isValidIp, isValidIpv4, isValidIpv6, listCloseCodes, lookupCloseCode, network_exports, parseAcceptLanguage, parseClientHintHeaders, parseContentDisposition, parseContentRangeHeader, parseDnsResponse, parseGeoResponse, parseHar, parseIpv6Address, parseMultipartFormData, parsePermissionsPolicy, parsePreferHeader, parsePriorityHeader, parseRetryAfterHeader, parseUserAgent, parseVaryHeader, parseXContentTypeOptionsHeader, searchHeaders, searchStatusCodes, splitSitemap, statusCodeToText, typeNumberToLabel, validateDomain, validateHeaderName, validateHeaderValue, validateManifest, validateRobotsTxt, validateSitemap };
@@ -10,6 +10,7 @@ __export(code_exports, {
10
10
  MIME_TABLE: () => MIME_TABLE,
11
11
  OPERATIONS: () => OPERATIONS,
12
12
  SQL_DEFAULT_OPTIONS: () => SQL_DEFAULT_OPTIONS,
13
+ auditDependencyRanges: () => auditDependencyRanges,
13
14
  buildDockerPull: () => buildDockerPull,
14
15
  buildDockerRun: () => buildDockerRun,
15
16
  buildGitCommand: () => buildGitCommand,
@@ -3394,5 +3395,95 @@ function validatePackageExports(packageJsonText) {
3394
3395
  const valid = !issues.some((i) => i.severity === "error");
3395
3396
  return { parsed: true, exportsShape, subpaths, issues, valid };
3396
3397
  }
3398
+ var DEPENDENCY_SECTIONS = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
3399
+ var EXACT_SEMVER_RE = /^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/;
3400
+ function classifyDependencyRange(version) {
3401
+ const v = version.trim();
3402
+ if (v === "" || v === "*" || v.toLowerCase() === "x") return "wildcard";
3403
+ if (v.startsWith("workspace:")) return "workspace";
3404
+ if (v.startsWith("file:")) return "file";
3405
+ if (v.startsWith("link:")) return "link";
3406
+ if (v.startsWith("http://") || v.startsWith("https://")) return "url";
3407
+ if (v.startsWith("git+") || v.startsWith("git://") || v.startsWith("github:") || v.endsWith(".git") || /^[\w-]+\/[\w.-]+$/.test(v)) return "git";
3408
+ if (v.startsWith("^")) return "caret";
3409
+ if (v.startsWith("~")) return "tilde";
3410
+ if (v.includes("||") || v.includes(" ") || v.startsWith(">") || v.startsWith("<") || v.startsWith("=")) return "range";
3411
+ if (EXACT_SEMVER_RE.test(v)) return "exact";
3412
+ if (/^[A-Za-z][\w.-]*$/.test(v)) return "tag";
3413
+ return "unknown";
3414
+ }
3415
+ function auditDependencyRanges(packageJsonText) {
3416
+ if (!packageJsonText || !packageJsonText.trim()) return { error: "Input is empty" };
3417
+ let parsed;
3418
+ try {
3419
+ parsed = JSON.parse(packageJsonText);
3420
+ } catch (e) {
3421
+ return { error: `Invalid JSON: ${e.message}` };
3422
+ }
3423
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
3424
+ return { error: "Root of package.json must be an object" };
3425
+ }
3426
+ const obj = parsed;
3427
+ const presentSections = DEPENDENCY_SECTIONS.filter((s) => obj[s] && typeof obj[s] === "object");
3428
+ if (presentSections.length === 0) {
3429
+ return { error: "package.json has no dependencies, devDependencies, peerDependencies, or optionalDependencies field" };
3430
+ }
3431
+ const dependencies = [];
3432
+ const issues = [];
3433
+ const byName = /* @__PURE__ */ new Map();
3434
+ for (const section of presentSections) {
3435
+ const map = obj[section];
3436
+ for (const [name, versionRaw] of Object.entries(map)) {
3437
+ const version = typeof versionRaw === "string" ? versionRaw : String(versionRaw);
3438
+ const rangeType = classifyDependencyRange(version);
3439
+ const entryIssues = [];
3440
+ if (rangeType === "wildcard") {
3441
+ entryIssues.push("no real version constraint; any version, including breaking ones, could be installed");
3442
+ }
3443
+ if (rangeType === "tag" && version.trim().toLowerCase() === "latest") {
3444
+ entryIssues.push('"latest" is not reproducible; a fresh install can pull in a different, potentially breaking version at any time');
3445
+ }
3446
+ if (rangeType === "git" || rangeType === "url") {
3447
+ entryIssues.push(`not resolved from the npm registry (${rangeType}); can't be checked against registry advisories the same way`);
3448
+ }
3449
+ if (rangeType === "file" || rangeType === "link") {
3450
+ entryIssues.push(`local ${rangeType === "file" ? "path" : "symlink"} dependency; not portable to a machine or CI runner without the same local path`);
3451
+ }
3452
+ const entry = { name, version, section, rangeType, issues: entryIssues };
3453
+ dependencies.push(entry);
3454
+ for (const issue of entryIssues) {
3455
+ issues.push({ severity: "warning", name, message: issue });
3456
+ }
3457
+ const existing = byName.get(name);
3458
+ if (existing) existing.push(entry);
3459
+ else byName.set(name, [entry]);
3460
+ }
3461
+ }
3462
+ const duplicates = [];
3463
+ for (const [name, entries] of byName) {
3464
+ if (entries.length < 2) continue;
3465
+ const versions = new Set(entries.map((e) => e.version));
3466
+ const sameVersion = versions.size === 1;
3467
+ duplicates.push({ name, sections: entries.map((e) => e.section), sameVersion });
3468
+ if (!sameVersion) {
3469
+ issues.push({ severity: "error", name, message: `listed with different version ranges in ${entries.map((e) => `${e.section} ("${e.version}")`).join(" and ")}` });
3470
+ } else {
3471
+ issues.push({ severity: "warning", name, message: `listed in more than one section (${entries.map((e) => e.section).join(", ")}) with the same range; redundant` });
3472
+ }
3473
+ }
3474
+ const rangeTypeCounts = {};
3475
+ for (const dep of dependencies) {
3476
+ rangeTypeCounts[dep.rangeType] = (rangeTypeCounts[dep.rangeType] ?? 0) + 1;
3477
+ }
3478
+ return {
3479
+ parsed: true,
3480
+ sections: presentSections,
3481
+ totalDependencies: dependencies.length,
3482
+ dependencies,
3483
+ duplicates,
3484
+ rangeTypeCounts,
3485
+ issues
3486
+ };
3487
+ }
3397
3488
 
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 };
3489
+ export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, auditDependencyRanges, 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 };
@@ -25,6 +25,7 @@
25
25
  * - editorconfig-validator (validateEditorConfig)
26
26
  * - tsconfig-validator (validateTsconfig)
27
27
  * - package-json-exports-validator (validatePackageExports)
28
+ * - package-json-dependency-auditor (auditDependencyRanges)
28
29
  */
29
30
  type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u';
30
31
  declare const ALL_FLAGS: RegexFlag[];
@@ -471,6 +472,45 @@ interface ExportsValidationResult {
471
472
  declare function validatePackageExports(packageJsonText: string): ExportsValidationResult | {
472
473
  error: string;
473
474
  };
475
+ type DependencyRangeType = 'exact' | 'caret' | 'tilde' | 'range' | 'wildcard' | 'tag' | 'git' | 'url' | 'file' | 'link' | 'workspace' | 'unknown';
476
+ type DependencySection = 'dependencies' | 'devDependencies' | 'peerDependencies' | 'optionalDependencies';
477
+ interface DependencyAuditEntry {
478
+ name: string;
479
+ version: string;
480
+ section: DependencySection;
481
+ rangeType: DependencyRangeType;
482
+ issues: string[];
483
+ }
484
+ interface DependencyAuditIssue {
485
+ severity: 'error' | 'warning';
486
+ name: string;
487
+ message: string;
488
+ }
489
+ interface DependencyAuditDuplicate {
490
+ name: string;
491
+ sections: DependencySection[];
492
+ sameVersion: boolean;
493
+ }
494
+ interface DependencyAuditResult {
495
+ parsed: true;
496
+ sections: DependencySection[];
497
+ totalDependencies: number;
498
+ dependencies: DependencyAuditEntry[];
499
+ duplicates: DependencyAuditDuplicate[];
500
+ rangeTypeCounts: Partial<Record<DependencyRangeType, number>>;
501
+ issues: DependencyAuditIssue[];
502
+ }
503
+ /**
504
+ * Parse a package.json's dependencies, devDependencies, peerDependencies,
505
+ * and optionalDependencies fields, classify each version specifier's range
506
+ * type, and flag common risks: wildcard/"*" ranges with no real constraint,
507
+ * the non-reproducible "latest" tag, git/URL/file/link dependencies that
508
+ * bypass the registry, and the same package listed in more than one section
509
+ * (a conflict if the ranges differ, redundant if they match).
510
+ */
511
+ declare function auditDependencyRanges(packageJsonText: string): DependencyAuditResult | {
512
+ error: string;
513
+ };
474
514
 
475
515
  declare const code_ALL_FLAGS: typeof ALL_FLAGS;
476
516
  type code_ApiEndpoint = ApiEndpoint;
@@ -485,6 +525,12 @@ type code_ConventionalCommitResult = ConventionalCommitResult;
485
525
  type code_ConventionalCommitSeverity = ConventionalCommitSeverity;
486
526
  type code_CssResult = CssResult;
487
527
  declare const code_DEFAULT_COMMIT_TYPES: typeof DEFAULT_COMMIT_TYPES;
528
+ type code_DependencyAuditDuplicate = DependencyAuditDuplicate;
529
+ type code_DependencyAuditEntry = DependencyAuditEntry;
530
+ type code_DependencyAuditIssue = DependencyAuditIssue;
531
+ type code_DependencyAuditResult = DependencyAuditResult;
532
+ type code_DependencyRangeType = DependencyRangeType;
533
+ type code_DependencySection = DependencySection;
488
534
  type code_DockerImageRef = DockerImageRef;
489
535
  type code_EditorConfigIssue = EditorConfigIssue;
490
536
  type code_EditorConfigProperty = EditorConfigProperty;
@@ -529,6 +575,7 @@ type code_SqlFormatOptions = SqlFormatOptions;
529
575
  type code_TestPatternResult = TestPatternResult;
530
576
  type code_TsconfigIssue = TsconfigIssue;
531
577
  type code_TsconfigValidationResult = TsconfigValidationResult;
578
+ declare const code_auditDependencyRanges: typeof auditDependencyRanges;
532
579
  declare const code_buildDockerPull: typeof buildDockerPull;
533
580
  declare const code_buildDockerRun: typeof buildDockerRun;
534
581
  declare const code_buildGitCommand: typeof buildGitCommand;
@@ -579,7 +626,7 @@ declare const code_validateEnvKey: typeof validateEnvKey;
579
626
  declare const code_validatePackageExports: typeof validatePackageExports;
580
627
  declare const code_validateTsconfig: typeof validateTsconfig;
581
628
  declare namespace code {
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 };
629
+ 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_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_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_auditDependencyRanges as auditDependencyRanges, 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 };
583
630
  }
584
631
 
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 };
632
+ export { type RegexMatch as $, ALL_FLAGS as A, type GitCommandResult as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EditorConfigIssue as E, type GitOperation as F, type GitCommandConfig as G, type GithubUrlInfo as H, type GithubUrlType as I, type GitignoreTestResult as J, type GqlFormatResult as K, type HtmlFormatResult as L, type HtmlMinifyOptions as M, type HtmlMinifyResult as N, type JsMinifyOptions as O, type JsMinifyResult as P, MIME_TABLE as Q, type MatchResult as R, type MimeEntry as S, type MimeLookupResult as T, OPERATIONS as U, type ParsedSpec as V, type RedosFinding as W, type RedosResult as X, type RedosSeverity as Y, type RegexError as Z, type RegexFlag as _, type ApiEndpoint as a, type RegexResult as a0, type RegexSuccess as a1, SQL_DEFAULT_OPTIONS as a2, type Segment as a3, type SpecVersion as a4, type SqlDialect as a5, type SqlFormatOptions as a6, type TestPatternResult as a7, type TsconfigIssue as a8, type TsconfigValidationResult as a9, minifyHtml as aA, minifyJs as aB, minifySql as aC, normalizeRef as aD, parseDockerImage as aE, parseEnv as aF, parseGitCommand as aG, parseGithubUrl as aH, parseSpec as aI, removeConsoleCalls as aJ, removeEmptyAttributes as aK, removeHtmlComments as aL, removeJsComments as aM, removeRedundantAttributes as aN, searchCheatsheet as aO, searchEndpoints as aP, splitStatements as aQ, testGitignorePatterns as aR, testPattern as aS, testRegex as aT, validateEditorConfig as aU, validateEnvKey as aV, validatePackageExports as aW, validateTsconfig as aX, auditDependencyRanges as aa, buildDockerPull as ab, buildDockerRun as ac, buildGitCommand as ad, collapseHtmlWhitespace as ae, collapseJsWhitespace as af, countProperties as ag, countRules as ah, detectDialect as ai, detectOperationType as aj, detectRedos as ak, envToExport as al, envToJson as am, formatCss as an, formatGql as ao, formatHtml as ap, formatSql as aq, getEndpointsByTag as ar, getHtmlStats as as, getJsStats as at, getMethodColor as au, isValidTag as av, lintConventionalCommit as aw, lookupMime as ax, minifyCss as ay, minifyGql 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 DependencyAuditDuplicate as l, type DependencyAuditEntry as m, type DependencyAuditIssue as n, type DependencyAuditResult as o, type DependencyRangeType as p, type DependencySection as q, type DockerImageRef as r, type EditorConfigProperty as s, type EditorConfigSection as t, type EditorConfigValidationResult as u, type EnvEntry as v, type EnvParseResult as w, type ExportsIssue as x, type ExportsShape as y, type ExportsValidationResult as z };